:root {
  --vizor-page: #f8fafc;
  --vizor-surface: #ffffff;
  --vizor-surface-muted: #f8fafc;
  --vizor-surface-raised: #ffffff;
  --vizor-border: #e2e8f0;
  --vizor-border-soft: #f1f5f9;
  --vizor-text: #0f172a;
  --vizor-text-secondary: #475569;
  --vizor-text-muted: #64748b;
  --vizor-text-faint: #94a3b8;
  --vizor-brand: #fb4e0b;
  --vizor-brand-secondary: #fb4e0b;
  --vizor-brand-hover: #fb4e0b;
  --vizor-brand-soft: rgba(251, 78, 11, 0.12);
  --vizor-success-text: #15803d;
  --vizor-danger-text: #b91c1c;
  --vizor-warning-text: #b45309;
  --vizor-overlay: rgba(15, 23, 42, 0.58);
  --vizor-shadow: rgba(15, 23, 42, 0.12);
  --vizor-progress-idle: #e2e8f0;
  --vizor-progress-idle-text: #94a3b8;
  --vizor-progress-active: #fb4e0b;
  --vizor-progress-done: #c8961e;
  --vizor-progress-done-text: #9a720f;
}

:root[data-theme="dark"] {
  --vizor-page: #080808;
  --vizor-surface: #141414;
  --vizor-surface-muted: #1b1b1b;
  --vizor-surface-raised: #222222;
  --vizor-border: #333333;
  --vizor-border-soft: #292929;
  --vizor-text: #f8fafc;
  --vizor-text-secondary: #d4d4d4;
  --vizor-text-muted: #a3a3a3;
  --vizor-text-faint: #737373;
  --vizor-brand: #fb4e0b;
  --vizor-brand-secondary: #fb4e0b;
  --vizor-brand-hover: #fb4e0b;
  --vizor-brand-soft: rgba(251, 78, 11, 0.16);
  --vizor-success-text: #4ade80;
  --vizor-danger-text: #fca5a5;
  --vizor-warning-text: #fbbf24;
  --vizor-overlay: rgba(2, 6, 23, 0.78);
  --vizor-shadow: rgba(0, 0, 0, 0.42);
  --vizor-progress-idle: #333333;
  --vizor-progress-idle-text: #a3a3a3;
  --vizor-progress-active: #fb4e0b;
  --vizor-progress-done: #e8b43d;
  --vizor-progress-done-text: #fbbf24;
}

/* Original blue/purple member experience, exposed as the member-only Custom theme. */
:root[data-theme="custom"] {
  --vizor-page: #f5f4fd;
  --vizor-surface: #ffffff;
  --vizor-surface-muted: #f8f7ff;
  --vizor-surface-raised: #ffffff;
  --vizor-border: #ded9f4;
  --vizor-border-soft: #ece9fb;
  --vizor-text: #0f172a;
  --vizor-text-secondary: #475569;
  --vizor-text-muted: #64748b;
  --vizor-text-faint: #94a3b8;
  --vizor-brand: #2e1b8c;
  --vizor-brand-secondary: #5b3fdb;
  --vizor-brand-hover: #1c0f66;
  --vizor-brand-soft: #f0eeff;
  --vizor-overlay: rgba(28, 15, 102, 0.5);
  --vizor-shadow: rgba(46, 27, 140, 0.14);
  --vizor-progress-active: #2e1b8c;
  --vizor-progress-done: #c8961e;
  --vizor-progress-done-text: #9a720f;
}

/* Shared accessible header/login theme control. */
.vizor-theme-toggle {
  display: inline-flex;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid var(--vizor-border);
  border-radius: 999px;
  background: var(--vizor-surface-raised);
  color: var(--vizor-text-secondary);
  cursor: pointer;
  box-shadow: 0 1px 4px var(--vizor-shadow);
  transition: transform 150ms ease, background-color 220ms ease, color 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.vizor-theme-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.vizor-theme-toggle:hover { color: var(--vizor-text); transform: translateY(-1px); }
.vizor-theme-toggle:hover { border-color: rgba(251, 78, 11, 0.45); color: var(--vizor-brand); }
.vizor-theme-toggle:focus-visible { outline: 2px solid var(--vizor-brand); outline-offset: 2px; }
.vizor-theme-icon-sun { display: none; }
:root[data-theme="dark"] .vizor-theme-icon-moon { display: none; }
:root[data-theme="dark"] .vizor-theme-icon-sun { display: block; }
.member-main-nav { display: none; }

.vizor-theme-menu {
  position: relative;
  flex: 0 0 auto;
}

.vizor-theme-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 70;
  width: 188px;
  padding: 6px;
  border: 1px solid var(--vizor-border);
  border-radius: 12px;
  background: var(--vizor-surface-raised);
  box-shadow: 0 14px 34px var(--vizor-shadow);
}

.vizor-theme-menu-panel[hidden] { display: none; }

.vizor-theme-menu-panel button {
  display: grid;
  width: 100%;
  min-height: 40px;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--vizor-text-secondary);
  cursor: pointer;
  font: 600 12px/1.2 Inter, ui-sans-serif, system-ui, sans-serif;
  text-align: left;
}

.vizor-theme-menu-panel button:hover,
.vizor-theme-menu-panel button[data-selected="true"] {
  background: var(--vizor-brand-soft);
  color: var(--vizor-brand);
}

.vizor-theme-swatch {
  width: 16px;
  height: 16px;
  border: 1px solid rgba(100, 116, 139, 0.3);
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.72);
}

.vizor-theme-swatch-light { background: #fb4e0b; }
.vizor-theme-swatch-dark { background: #141414; }
.vizor-theme-swatch-custom { background: #2e1b8c; }

.vizor-theme-option-check {
  display: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.2;
}

.vizor-theme-menu-panel button[data-selected="true"] .vizor-theme-option-check {
  display: block;
}

.claim-form-actions {
  justify-content: flex-start;
  align-items: center;
}

/* Apply transitions only while the theme changes, so existing hover/motion
   behavior remains untouched during normal interaction. */
:root.vizor-theme-transitioning body.member-shell,
:root.vizor-theme-transitioning body.member-shell *,
:root.vizor-theme-transitioning body.agent-shell,
:root.vizor-theme-transitioning body.agent-shell *,
:root.vizor-theme-transitioning #sso-login-overlay,
:root.vizor-theme-transitioning #sso-login-overlay *,
:root.vizor-theme-transitioning .__cbw_panel,
:root.vizor-theme-transitioning .__cbw_panel *,
:root.vizor-theme-transitioning .__cbw_toast,
:root.vizor-theme-transitioning #__cobrowse_session_gate__,
:root.vizor-theme-transitioning #__cobrowse_session_gate__ * {
  transition-property: background-color, color, border-color, box-shadow, fill, stroke !important;
  transition-duration: 220ms !important;
  transition-timing-function: ease !important;
}

/* Member portal dark palette: every Tailwind surface used by the page. */
:root[data-theme="dark"] body.member-shell { background-color: var(--vizor-page) !important; color: var(--vizor-text); }
:root[data-theme="dark"] body.member-shell .bg-white { background-color: var(--vizor-surface) !important; }
:root[data-theme="dark"] body.member-shell .bg-slate-50 { background-color: var(--vizor-surface-muted) !important; }
:root[data-theme="dark"] body.member-shell .bg-slate-100 { background-color: #242424 !important; }
:root[data-theme="dark"] body.member-shell .bg-slate-200 { background-color: #303030 !important; }
:root[data-theme="dark"] body.member-shell .bg-slate-300 { background-color: #404040 !important; }
:root[data-theme="dark"] body.member-shell .bg-brand-light,
:root[data-theme="dark"] body.member-shell .bg-orange-50 { background-color: var(--vizor-brand-soft) !important; }
:root[data-theme="dark"] body.member-shell .bg-gold-light,
:root[data-theme="dark"] body.member-shell .bg-amber-50 { background-color: #2b2110 !important; }
:root[data-theme="dark"] body.member-shell .bg-amber-100 { background-color: #3a2b0f !important; }
:root[data-theme="dark"] body.member-shell .bg-green-50 { background-color: #10291d !important; }
:root[data-theme="dark"] body.member-shell .bg-green-100 { background-color: #173b29 !important; }
:root[data-theme="dark"] body.member-shell .bg-red-50 { background-color: #351619 !important; }

:root[data-theme="dark"] body.member-shell .text-slate-900,
:root[data-theme="dark"] body.member-shell .text-slate-800 { color: #f8fafc !important; }
:root[data-theme="dark"] body.member-shell .text-slate-700 { color: #e2e8f0 !important; }
:root[data-theme="dark"] body.member-shell .text-slate-600 { color: #d4d4d4 !important; }
:root[data-theme="dark"] body.member-shell .text-slate-500 { color: #b3b3b3 !important; }
:root[data-theme="dark"] body.member-shell .text-slate-400,
:root[data-theme="dark"] body.member-shell .text-slate-300 { color: #a3a3a3 !important; }
:root[data-theme="dark"] body.member-shell .text-brand { color: var(--vizor-brand) !important; }
:root[data-theme="dark"] body.member-shell .text-brand-mid { color: var(--vizor-brand) !important; }
:root[data-theme="dark"] body.member-shell .member-selected-nav,
:root[data-theme="dark"] body.member-shell .member-selected-quick-action {
  background-color: var(--vizor-brand-secondary) !important;
  color: #ffffff !important;
}
:root[data-theme="dark"] body.member-shell .text-gold,
:root[data-theme="dark"] body.member-shell .text-gold-dark,
:root[data-theme="dark"] body.member-shell .text-amber-600,
:root[data-theme="dark"] body.member-shell .text-amber-700,
:root[data-theme="dark"] body.member-shell .text-amber-800,
:root[data-theme="dark"] body.member-shell .text-amber-900 { color: #fbbf24 !important; }
:root[data-theme="dark"] body.member-shell .text-green-500,
:root[data-theme="dark"] body.member-shell .text-green-600 { color: #4ade80 !important; }
:root[data-theme="dark"] body.member-shell .text-red-500,
:root[data-theme="dark"] body.member-shell .text-red-700 { color: #fca5a5 !important; }

:root[data-theme="dark"] body.member-shell .border-slate-50,
:root[data-theme="dark"] body.member-shell .border-slate-100,
:root[data-theme="dark"] body.member-shell .border-slate-200,
:root[data-theme="dark"] body.member-shell .border-slate-300,
:root[data-theme="dark"] body.member-shell .divide-slate-50 > :not([hidden]) ~ :not([hidden]) { border-color: var(--vizor-border) !important; }
:root[data-theme="dark"] body.member-shell .border-amber-100,
:root[data-theme="dark"] body.member-shell .border-amber-200 { border-color: #765b19 !important; }
:root[data-theme="dark"] body.member-shell .border-red-200 { border-color: #7f1d1d !important; }
:root[data-theme="dark"] body.member-shell .border-orange-100 { border-color: rgba(251, 78, 11, 0.35) !important; }
:root[data-theme="dark"] body.member-shell input,
:root[data-theme="dark"] body.member-shell select,
:root[data-theme="dark"] body.member-shell textarea {
  border-color: var(--vizor-border) !important;
  background-color: #0d0d0d;
  color: var(--vizor-text);
}
:root[data-theme="dark"] body.member-shell input::placeholder,
:root[data-theme="dark"] body.member-shell textarea::placeholder { color: #737373; }
:root[data-theme="dark"] body.member-shell select option { background: #0d0d0d; color: #f8fafc; }
:root[data-theme="dark"] body.member-shell .drop-zone:hover,
:root[data-theme="dark"] body.member-shell .drop-zone.drag-over { background: var(--vizor-brand-soft) !important; }
:root[data-theme="dark"] body.member-shell .shadow-sm,
:root[data-theme="dark"] body.member-shell .shadow-xl,
:root[data-theme="dark"] body.member-shell .shadow-2xl { box-shadow: 0 10px 30px var(--vizor-shadow) !important; }
:root[data-theme="dark"] body.member-shell .hover\:bg-slate-50:hover,
:root[data-theme="dark"] body.member-shell .hover\:bg-brand-light:hover { background-color: #242424 !important; }
:root[data-theme="dark"] body.member-shell #vizor-support-v1[aria-pressed="true"],
:root[data-theme="dark"] body.member-shell #vizor-support-v2[aria-pressed="true"] {
  background-color: var(--vizor-brand-soft) !important;
  color: var(--vizor-brand) !important;
}

/* Member-only Custom palette restores the original Vizor blue theme. */
:root[data-theme="custom"] body.member-shell {
  background-color: var(--vizor-page) !important;
  color: var(--vizor-text);
}
:root[data-theme="custom"] body.member-shell .bg-brand { background-color: var(--vizor-brand) !important; }
:root[data-theme="custom"] body.member-shell .bg-brand-mid { background-color: var(--vizor-brand-secondary) !important; }
:root[data-theme="custom"] body.member-shell .bg-brand-light,
:root[data-theme="custom"] body.member-shell .bg-orange-50 { background-color: var(--vizor-brand-soft) !important; }
:root[data-theme="custom"] body.member-shell .text-brand { color: var(--vizor-brand) !important; }
:root[data-theme="custom"] body.member-shell .text-brand-mid { color: var(--vizor-brand-secondary) !important; }
:root[data-theme="custom"] body.member-shell .text-orange-100 { color: #ede9fe !important; }
:root[data-theme="custom"] body.member-shell .border-brand { border-color: var(--vizor-brand) !important; }
:root[data-theme="custom"] body.member-shell .member-selected-nav,
:root[data-theme="custom"] body.member-shell .member-selected-quick-action {
  background-color: var(--vizor-brand-soft) !important;
  color: var(--vizor-brand) !important;
}
:root[data-theme="custom"] body.member-shell .hover\:bg-brand-dark:hover { background-color: var(--vizor-brand-hover) !important; }
:root[data-theme="custom"] body.member-shell .hover\:bg-brand-light:hover { background-color: var(--vizor-brand-soft) !important; }
:root[data-theme="custom"] body.member-shell .hover\:text-brand:hover { color: var(--vizor-brand) !important; }
:root[data-theme="custom"] body.member-shell input:focus,
:root[data-theme="custom"] body.member-shell select:focus,
:root[data-theme="custom"] body.member-shell textarea:focus {
  --tw-ring-color: var(--vizor-brand) !important;
}
:root[data-theme="custom"] body.member-shell .drop-zone:hover,
:root[data-theme="custom"] body.member-shell .drop-zone.drag-over {
  border-color: var(--vizor-brand) !important;
  background: var(--vizor-brand-soft) !important;
}
:root[data-theme="custom"] body.member-shell .shadow-sm,
:root[data-theme="custom"] body.member-shell .shadow-xl,
:root[data-theme="custom"] body.member-shell .shadow-2xl { box-shadow: 0 10px 30px var(--vizor-shadow) !important; }
:root[data-theme="custom"] body.member-shell #vizor-support-v1[aria-pressed="true"],
:root[data-theme="custom"] body.member-shell #vizor-support-v2[aria-pressed="true"] {
  background-color: var(--vizor-brand-soft) !important;
  color: var(--vizor-brand) !important;
}

:root[data-theme="custom"] .__cbw_fab,
:root[data-theme="custom"] .__cbw_head,
:root[data-theme="custom"] .__cbw_btn,
:root[data-theme="custom"] .__cbw_call_dial,
:root[data-theme="custom"] .__cbw_toast_icon,
:root[data-theme="custom"] .__cbw_toast_btn_primary,
:root[data-theme="custom"] #__cobrowse_switch_here__,
:root[data-theme="custom"] #__cobrowse_confirm_switch__,
:root[data-theme="custom"] #__cobrowse_reconnect_here__,
:root[data-theme="custom"] #__cbs_allow__ {
  border-color: var(--vizor-brand) !important;
  background: var(--vizor-brand) !important;
}
:root[data-theme="custom"] .__cbw_call_icon {
  background: var(--vizor-brand-soft) !important;
  color: var(--vizor-brand) !important;
}
:root[data-theme="custom"] .__cbw_call_copy {
  border-color: #c4b5fd !important;
  background: var(--vizor-brand-soft) !important;
  color: var(--vizor-brand) !important;
}
:root[data-theme="custom"] .__cbw_toast {
  border-color: #c4b5fd !important;
  box-shadow: 0 10px 30px var(--vizor-shadow) !important;
}
:root[data-theme="custom"] .__cbw_toast_title { color: var(--vizor-brand) !important; }

/* Agent console light palette: maps all current dark Tailwind surfaces. */
:root[data-theme="dark"] body.agent-shell { background-color: #050505; color: #f5f5f5; }
:root[data-theme="dark"] body.agent-shell .bg-slate-950 { background-color: #050505; }
:root[data-theme="dark"] body.agent-shell .bg-slate-900 { background-color: #121212; }
:root[data-theme="dark"] body.agent-shell .bg-slate-800,
:root[data-theme="dark"] body.agent-shell .bg-slate-800\/70 { background-color: #1c1c1c; }
:root[data-theme="dark"] body.agent-shell .bg-slate-700 { background-color: #2b2b2b; }
:root[data-theme="dark"] body.agent-shell .bg-brand-light { background-color: var(--vizor-brand-soft) !important; }
:root[data-theme="dark"] body.agent-shell .border-slate-700 { border-color: #333333; }
:root[data-theme="dark"] body.agent-shell .border-slate-800 { border-color: #242424; }
:root[data-theme="dark"] body.agent-shell .text-slate-100,
:root[data-theme="dark"] body.agent-shell .text-slate-200 { color: #f5f5f5; }
:root[data-theme="dark"] body.agent-shell .text-slate-300 { color: #d4d4d4; }
:root[data-theme="dark"] body.agent-shell .text-slate-400 { color: #b3b3b3; }
:root[data-theme="dark"] body.agent-shell .text-slate-500 { color: #8f8f8f; }
:root[data-theme="dark"] body.agent-shell .text-slate-600,
:root[data-theme="dark"] body.agent-shell .text-slate-700 { color: #737373; }
:root[data-theme="dark"] body.agent-shell .text-brand { color: var(--vizor-brand) !important; }
:root[data-theme="dark"] body.agent-shell .placeholder-slate-600::placeholder { color: #737373; }
:root[data-theme="dark"] body.agent-shell .divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: #242424; }
:root[data-theme="dark"] body.agent-shell .hover\:bg-slate-800:hover,
:root[data-theme="dark"] body.agent-shell .hover\:bg-slate-800\/50:hover,
:root[data-theme="dark"] body.agent-shell .hover\:bg-slate-700:hover { background-color: #292929; }
:root[data-theme="light"] body.agent-shell { background-color: #f4f7fb !important; color: #0f172a !important; }
:root[data-theme="light"] body.agent-shell .bg-slate-950 { background-color: #f4f7fb !important; }
:root[data-theme="light"] body.agent-shell .bg-slate-900 { background-color: #ffffff !important; }
:root[data-theme="light"] body.agent-shell .bg-slate-800,
:root[data-theme="light"] body.agent-shell .bg-slate-800\/70 { background-color: #f1f5f9 !important; }
:root[data-theme="light"] body.agent-shell .bg-slate-700 { background-color: #e2e8f0 !important; }
:root[data-theme="light"] body.agent-shell .bg-slate-600 { background-color: #cbd5e1 !important; }
:root[data-theme="light"] body.agent-shell .bg-amber-950 { background-color: #fffbeb !important; }
:root[data-theme="light"] body.agent-shell .bg-red-950 { background-color: #fef2f2 !important; }
:root[data-theme="light"] body.agent-shell .bg-orange-950 { background-color: rgba(251, 78, 11, 0.08) !important; }

:root[data-theme="light"] body.agent-shell .text-slate-100,
:root[data-theme="light"] body.agent-shell .text-slate-200 { color: #0f172a !important; }
:root[data-theme="light"] body.agent-shell .text-slate-300 { color: #334155 !important; }
:root[data-theme="light"] body.agent-shell .text-slate-400 { color: #475569 !important; }
:root[data-theme="light"] body.agent-shell .text-slate-500 { color: #64748b !important; }
:root[data-theme="light"] body.agent-shell .text-slate-600,
:root[data-theme="light"] body.agent-shell .text-slate-700 { color: #94a3b8 !important; }
:root[data-theme="light"] body.agent-shell .text-brand,
:root[data-theme="light"] body.agent-shell .text-orange-300,
:root[data-theme="light"] body.agent-shell .text-orange-400 { color: var(--vizor-brand) !important; }
:root[data-theme="light"] body.agent-shell .text-green-400 { color: #15803d !important; }
:root[data-theme="light"] body.agent-shell .text-red-400,
:root[data-theme="light"] body.agent-shell .text-red-600 { color: #b91c1c !important; }
:root[data-theme="light"] body.agent-shell .text-amber-300,
:root[data-theme="light"] body.agent-shell .text-amber-400,
:root[data-theme="light"] body.agent-shell .text-amber-500 { color: #b45309 !important; }

:root[data-theme="light"] body.agent-shell .border-slate-700,
:root[data-theme="light"] body.agent-shell .border-slate-800,
:root[data-theme="light"] body.agent-shell .divide-slate-800 > :not([hidden]) ~ :not([hidden]) { border-color: #d9e1eb !important; }
:root[data-theme="light"] body.agent-shell .border-amber-700,
:root[data-theme="light"] body.agent-shell .border-amber-800 { border-color: #fcd34d !important; }
:root[data-theme="light"] body.agent-shell .border-red-800 { border-color: #fecaca !important; }
:root[data-theme="light"] body.agent-shell .border-orange-800 { border-color: rgba(251, 78, 11, 0.25) !important; }
:root[data-theme="light"] body.agent-shell input,
:root[data-theme="light"] body.agent-shell textarea {
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}
:root[data-theme="light"] body.agent-shell input::placeholder,
:root[data-theme="light"] body.agent-shell textarea::placeholder { color: #94a3b8 !important; }
:root[data-theme="light"] body.agent-shell .hover\:bg-slate-800:hover,
:root[data-theme="light"] body.agent-shell .hover\:bg-slate-800\/50:hover,
:root[data-theme="light"] body.agent-shell .hover\:bg-slate-700:hover { background-color: #e2e8f0 !important; }
:root[data-theme="light"] body.agent-shell .hover\:text-white:hover { color: #0f172a !important; }
:root[data-theme="light"] body.agent-shell .shadow-lg,
:root[data-theme="light"] body.agent-shell .shadow-2xl,
:root[data-theme="light"] body.agent-shell .shadow-inner { box-shadow: 0 8px 24px rgba(15, 23, 42, 0.1) !important; }

/* SSO is part of the same theme and is switchable before login. */
:root[data-theme="dark"] #sso-login-overlay,
:root[data-theme="dark"] #sso-login-overlay.sso-theme-member {
  color: #e2e8f0;
  background: radial-gradient(circle at 85% 12%, rgba(251, 78, 11, 0.13), transparent 28%), linear-gradient(135deg, #050505, #111111 55%, #050505);
}
:root[data-theme="dark"] #sso-login-overlay .sso-nav { border-color: #2f2f2f; background: rgba(5, 5, 5, 0.92); }
:root[data-theme="dark"] #sso-login-overlay .sso-brand,
:root[data-theme="dark"] #sso-login-overlay .sso-card-brand h2,
:root[data-theme="dark"] #sso-login-overlay .sso-login-card h1 { color: #f8fafc; }
:root[data-theme="dark"] #sso-login-overlay .sso-divider { background: #3a3a3a; }
:root[data-theme="dark"] #sso-login-overlay .sso-login-card { border-color: #333333; background: rgba(20, 20, 20, 0.94); box-shadow: 0 25px 55px rgba(0, 0, 0, 0.58); }
:root[data-theme="dark"] #sso-login-overlay .sso-card-brand p,
:root[data-theme="dark"] #sso-login-overlay .sso-intro,
:root[data-theme="dark"] #sso-login-overlay .sso-processing { color: #d4d4d4; }
:root[data-theme="dark"] #sso-login-overlay .sso-authorized { color: #a3a3a3; }
:root[data-theme="dark"] #sso-login-overlay .sso-notice { border-color: rgba(251, 78, 11, 0.35); background: rgba(251, 78, 11, 0.16); color: #e2e8f0; }
:root[data-theme="dark"] #sso-login-overlay .sso-notice svg { color: var(--vizor-brand); }
:root[data-theme="dark"] #sso-login-overlay .sso-login-btn { background: var(--vizor-brand); }
:root[data-theme="dark"] #sso-login-overlay .sso-login-btn:hover { background: var(--vizor-brand-hover); }

:root[data-theme="light"] #sso-login-overlay,
:root[data-theme="light"] #sso-login-overlay.sso-theme-dark {
  color: #1e293b;
  background: radial-gradient(circle at 85% 12%, rgba(251, 78, 11, 0.1), transparent 28%), linear-gradient(180deg, #ffffff 0 72px, #f8fafc 72px 100%);
}
:root[data-theme="light"] #sso-login-overlay .sso-nav { border-bottom: 3px solid var(--vizor-brand); background: rgba(255,255,255,.96); box-shadow: 0 2px 10px rgba(251,78,11,.09); }
:root[data-theme="light"] #sso-login-overlay .sso-brand { color: #0f172a; }
:root[data-theme="light"] #sso-login-overlay .sso-divider { background: rgba(251, 78, 11, 0.25); }
:root[data-theme="light"] #sso-login-overlay .sso-login-card { border-color: rgba(251, 78, 11, 0.18); background: rgba(255,255,255,.96); box-shadow: 0 24px 60px rgba(251,78,11,.13); }
:root[data-theme="light"] #sso-login-overlay .sso-card-brand h2,
:root[data-theme="light"] #sso-login-overlay .sso-login-card h1 { color: #0f172a; }
:root[data-theme="light"] #sso-login-overlay .sso-card-brand p,
:root[data-theme="light"] #sso-login-overlay .sso-intro,
:root[data-theme="light"] #sso-login-overlay .sso-processing { color: #64748b; }
:root[data-theme="light"] #sso-login-overlay .sso-notice { border-color: rgba(251,78,11,.2); background: rgba(251,78,11,.08); color: #334155; }
:root[data-theme="light"] #sso-login-overlay .sso-notice svg { color: var(--vizor-brand); }
:root[data-theme="light"] #sso-login-overlay .sso-login-btn { background: var(--vizor-brand); }
:root[data-theme="light"] #sso-login-overlay .sso-login-btn:hover { background: var(--vizor-brand-hover); }

/* Dynamically injected member UI: single-session gates, widget and toasts. */
#__cobrowse_session_gate__[data-state="locked"] { background: var(--vizor-page) !important; }
#__cobrowse_session_gate__:not([data-state="locked"]) { background: var(--vizor-overlay) !important; }
#__cobrowse_session_gate__ > div { background: var(--vizor-surface) !important; color: var(--vizor-text) !important; border: 1px solid var(--vizor-border); }
#__cobrowse_gate_description__,
#__cobrowse_gate_status__ { color: var(--vizor-text-muted) !important; }
#__cobrowse_session_gate__ button:not([style*="#fb4e0b"]):not([style*="#FB4E0B"]) { background: var(--vizor-surface-muted) !important; border-color: var(--vizor-border) !important; color: var(--vizor-text-secondary) !important; }

:root[data-theme="dark"] .__cbw_panel { background: var(--vizor-surface) !important; border-color: var(--vizor-border) !important; box-shadow: 0 18px 50px rgba(0,0,0,.5) !important; }
:root[data-theme="dark"] .__cbw_menu_btn { background: var(--vizor-surface) !important; border-color: var(--vizor-border-soft) !important; color: var(--vizor-text) !important; }
:root[data-theme="dark"] .__cbw_menu_icon { background: #3a2b0f !important; }
:root[data-theme="dark"] .__cbw_menu_btn:hover { background: var(--vizor-surface-muted) !important; }
:root[data-theme="dark"] .__cbw_menu_title,
:root[data-theme="dark"] .__cbw_sub_title,
:root[data-theme="dark"] .__cbw_active_text { color: var(--vizor-text) !important; }
:root[data-theme="dark"] .__cbw_menu_desc,
:root[data-theme="dark"] .__cbw_label,
:root[data-theme="dark"] .__cbw_active_desc,
:root[data-theme="dark"] .__cbw_status_muted { color: var(--vizor-text-muted) !important; }
:root[data-theme="dark"] .__cbw_sub_head { border-color: var(--vizor-border-soft) !important; }
:root[data-theme="dark"] .__cbw_input { background: #0d0d0d !important; border-color: var(--vizor-border) !important; color: var(--vizor-text) !important; }
:root[data-theme="dark"] .__cbw_toast { background: var(--vizor-surface) !important; border-color: #765b19 !important; color: var(--vizor-text-secondary) !important; }
:root[data-theme="dark"] .__cbw_toast_title { color: #fbbf24 !important; }
:root[data-theme="dark"] .__cbw_toast_text { color: #d4d4d4 !important; }
:root[data-theme="dark"] .__cbw_toast_btn_secondary { background: #242424 !important; color: #e5e5e5 !important; }

#vizor-push-status-toast { color: var(--vizor-success-text) !important; background: var(--vizor-surface) !important; border-color: var(--vizor-border) !important; }
#vizor-push-status-toast[data-error="true"] { color: var(--vizor-danger-text) !important; }

:root[data-theme="dark"] #__cbs_toast__,
:root[data-theme="dark"] #__cbs_nudge__ {
  background: var(--vizor-surface) !important;
  border-color: var(--vizor-border) !important;
  color: var(--vizor-text-secondary) !important;
  box-shadow: 0 12px 36px rgba(0,0,0,.45) !important;
}
:root[data-theme="dark"] #__cbs_toast__ > div:first-child > div:nth-child(2) > div:last-child,
:root[data-theme="dark"] #__cbs_nudge__ > div:nth-child(2) { color: var(--vizor-text-secondary) !important; }
:root[data-theme="dark"] #__cbs_decline__ { background: #242424 !important; color: #e5e5e5 !important; }
:root[data-theme="dark"] #__cbs_dismiss__,
:root[data-theme="dark"] #__cbs_nudge__ button { color: #a3a3a3 !important; }

@media (max-width: 900px) {
  .vizor-theme-toggle { width: 36px; height: 36px; flex-basis: 36px; }
}

@media (min-width: 1100px) {
  body.member-shell .member-main-nav { display: flex !important; }
}

@media (max-width: 640px) {
  .vizor-theme-toggle { width: 34px; height: 34px; flex-basis: 34px; }
  body.member-shell > header .max-w-7xl { padding-left: 12px; padding-right: 12px; gap: 8px; }
  body.member-shell #sso-user-email,
  body.member-shell #sso-user-toggle > svg { display: none; }
  body.member-shell #sso-user-toggle { padding-left: 2px; padding-right: 2px; }
  body.member-shell #help-fab {
    right: 12px;
    bottom: 12px;
    left: 12px;
    align-items: stretch;
  }
  body.member-shell #help-panel {
    width: 100%;
    max-height: calc(100dvh - 88px);
    overflow-x: hidden;
    overflow-y: auto;
  }
  body.member-shell #help-fab-btn { align-self: flex-end; }
  #__cobrowse_gate_actions__ { flex-direction: column; }
}

@media (max-width: 1023px) {
  body.agent-shell .agent-header {
    position: sticky;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 12px;
  }
  body.agent-shell .agent-brand { width: 100%; }
  body.agent-shell .agent-header-actions {
    display: grid;
    width: 100%;
    margin-left: 0;
    grid-template-columns: minmax(110px, 1fr) auto auto auto;
    gap: 7px;
  }
  body.agent-shell .agent-session-control { width: auto; min-width: 0; }
  body.agent-shell .agent-session-control > span { display: none; }
  body.agent-shell .agent-session-control input { padding-left: 10px; }
  body.agent-shell #btn-new-session { padding-left: 9px; padding-right: 9px; }
  body.agent-shell #sso-user-menu { padding-left: 0; }
  body.agent-shell #sso-user-toggle { padding: 1px; }
  body.agent-shell #sso-user-email,
  body.agent-shell #sso-user-toggle > svg { display: none; }
}

@media (max-width: 760px) {
  body.agent-shell { display: block; min-height: 100vh; }
  body.agent-shell .agent-layout { display: flex; min-height: 0; overflow: visible; flex-direction: column; }
  body.agent-shell .agent-sidebar {
    width: 100%;
    max-height: none;
    overflow: visible;
    border-right: 0;
    border-bottom: 1px solid var(--vizor-border);
  }
  body.agent-shell .agent-main { min-height: 440px; overflow: visible; }
}

@media (prefers-reduced-motion: reduce) {
  :root.vizor-theme-transitioning body.member-shell,
  :root.vizor-theme-transitioning body.member-shell *,
  :root.vizor-theme-transitioning body.agent-shell,
  :root.vizor-theme-transitioning body.agent-shell *,
  :root.vizor-theme-transitioning #sso-login-overlay,
  :root.vizor-theme-transitioning #sso-login-overlay *,
  :root.vizor-theme-transitioning .__cbw_panel,
  :root.vizor-theme-transitioning .__cbw_panel *,
  :root.vizor-theme-transitioning .__cbw_toast,
  :root.vizor-theme-transitioning #__cobrowse_session_gate__,
  :root.vizor-theme-transitioning #__cobrowse_session_gate__ * { transition: none !important; }
}
