/* WPC DESIGN SYSTEM — Dark Glass / Modern Fintech */
/* Loaded by every screen. Single source of truth. */
/* Generated 2026-05-25 — full dark-mode overhaul */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600;700&display=swap');

:root {
  /* ── BRAND / NAVY (website palette) ──────── */
  --navy:    #1A2A44;
  --navy2:   #223558;
  --navy3:   #2C446E;
  --navy4:   #274468;

  /* ── FUB-LIGHT RE-SKIN (2026-05-30) ────────────────────────────
     The team's muscle memory is Follow Up Boss: white bg, light-gray
     sidebar, dark top-nav, BLUE accent. The "--gold*" tokens are
     referenced 100+ times across this stylesheet for accents, links,
     KPI values, active states, etc. To flip the whole accent system
     to FUB-blue in ONE move (without touching 100+ rules), we REMAP
     the gold tokens to FUB-blue here. True WestPoint gold is preserved
     as --wpc-gold for the wordmark + active sidebar accent only. */
  --wpc-gold:      #C9A84C;   /* real gold — wordmark + active sidebar only */
  --wpc-gold-deep: #8A6B2A;

  /* ── GOLD tokens REMAPPED → FUB blue ──────── */
  --gold:      #4E6CF5;   /* FUB primary blue */
  --gold2:     #3B5BD5;
  --gold3:     #6E86F7;
  --gold-deep: #3B5BD5;
  --gold-bg:   rgba(78,108,245,0.10);

  /* ── ACCENT (alt brand) → also FUB blue ───── */
  --accent:     #4E6CF5;
  --accent-dim: #3B5BD5;

  /* ── LEGACY CREAM (kept for back-compat — mapped to light surfaces) ─── */
  --cream:   #F5F5F7;
  --cream2:  #FFFFFF;
  --cream3:  #F0F0F3;

  /* ── STATUS (light bg defaults) ──────────── */
  --rust:    #B04A2F;
  --rust-bg: #FEF2F0;
  --rust-bdr:rgba(176,74,47,0.22);
  --red:     #DC2626;
  --red-bg:  #FEF2F2;
  --redbg:   #FEF2F2;
  --redbdr:  rgba(220,38,38,0.22);
  --amber:   #92400E;
  --amber-bg:#FFFBEB;
  --amberbg: #FFFBEB;
  --ambbdr:  rgba(146,64,14,0.22);
  --moss:    #2D7A45;
  --moss-bg: #ECFDF5;
  --moss-bdr:rgba(45,122,69,0.22);
  --green:   #166534;
  --green-bg:#F0FDF4;
  --greenbg: #F0FDF4;
  --green-badge:#166534;
  --grnbdr:  rgba(22,101,52,0.22);
  --blue:    #2563EB;
  --bluebg:  #EFF6FF;
  --bluebdr: rgba(37,99,235,0.22);
  --teal:    #0D9488;
  --tealbg:  #F0FDFA;
  --purple:  #7C3AED;
  --purplebg:#F5F3FF;

  /* ── TYPOGRAPHY (all Inter, no serif) ────── */
  --font-display: 'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-body:    'Inter Tight', system-ui, -apple-system, sans-serif;
  --font-mono:    'JetBrains Mono', 'IBM Plex Mono', 'SF Mono', monospace;

  /* ── BASE BACKGROUNDS (FUB-light) ───── */
  --bg-base:    #F7F8FA;   /* FUB light-gray app bg */
  --bg-surface: #FFFFFF;
  --bg-card:    #FFFFFF;
  --bg-hover:   #F0F4FF;   /* FUB very-light-blue row hover */
  --bg-active:  #E8EDF8;

  /* ── SURFACES (FUB-light) ────────────────── */
  --surface-shell:      #F7F8FA;   /* light gray */
  --surface-card:       #FFFFFF;   /* white panes */
  --surface-card-solid: #FFFFFF;
  --surface-muted:      #F0F4F8;
  --surface-raised:     #F7F8FA;
  --surface-cockpit:    var(--navy);
  --surface-cockpit-card: #FFFFFF;

  /* ── TEXT (FUB-light) ───────────────── */
  --text-primary:   #111827;   /* FUB near-black */
  --text-secondary: #4A5568;
  --text-muted:     #6B7280;   /* FUB gray */
  --text-dark:      #1A1A2E; /* legacy alias */
  --text-on-navy:   #FFFFFF;
  --text-on-navy-2: rgba(255,255,255,0.75);
  --text-on-navy-3: rgba(255,255,255,0.50);

  /* ── BORDERS (FUB hairline) ────────────── */
  --border:        #E2E6EA;   /* FUB border */
  --border-light:  #EDF0F3;
  --border-strong: #CBD5E1;
  --border-card:   #E2E6EA;
  --border-navy:   rgba(255,255,255,0.12);
  --border-navy-2: rgba(255,255,255,0.20);

  /* ── LEGACY WHITE ALIAS ──────────────────── */
  --white: #FFFFFF;

  /* ── COMPAT ALIASES (luiza.html, guide.html) ── */
  --surface-1:       var(--surface-card);
  --surface-2:       var(--surface-raised);
  --border-subtle:   var(--border);
  --bg:              var(--surface-shell);
  --text-faint:      var(--text-muted);
  /* --surface: legacy token used as a modal/dialog bg fallback in profile.html
     (var(--surface,#161b27)). Define it so dialogs match the active theme
     instead of always rendering the dark #161b27 fallback on the light app. */
  --surface:         var(--surface-card-solid);

  /* ── RADIUS ──────────────────────────────── */
  --r-xs: 4px;
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* ── SHADOW (soft for light) ─────────────── */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.08), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.10);
  --shadow-lg:    0 10px 30px rgba(0,0,0,0.12);
  --shadow-card:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lift:  0 4px 18px rgba(0,0,0,0.10);
  --shadow-gold:  0 0 20px rgba(78,108,245,0.18);
  --shadow-focus: 0 0 0 3px rgba(78,108,245,0.25);

  /* ── MOTION ──────────────────────────────── */
  --ease: cubic-bezier(.22,.61,.36,1);
  --t-fast: 90ms;
  --t-base: 180ms;
  --t-slow: 280ms;
}

/* ── DARK MODE OVERRIDE ─────────────────────── */
[data-theme="dark"] {
  /* Brand stays — but a touch deeper for dark canvas */
  --navy:    #0F1B2D;
  --navy2:   #162438;
  --navy3:   #1E3450;
  --navy4:   #274468;

  /* Cream aliases re-mapped to dark surfaces */
  --cream:   #131927;
  --cream2:  #1A2235;
  --cream3:  #243149;

  /* Status (adjusted for dark bg) */
  --rust:    #FF6B4A;
  --rust-bg: rgba(255,107,74,0.12);
  --rust-bdr:rgba(255,107,74,0.25);
  --red:     #FF4444;
  --red-bg:  rgba(255,68,68,0.10);
  --redbg:   rgba(255,68,68,0.10);
  --redbdr:  rgba(255,68,68,0.22);
  --amber:   #FFC947;
  --amber-bg:rgba(255,201,71,0.10);
  --amberbg: rgba(255,201,71,0.10);
  --ambbdr:  rgba(255,201,71,0.25);
  --moss:    #4ADE80;
  --moss-bg: rgba(74,222,128,0.10);
  --moss-bdr:rgba(74,222,128,0.22);
  --green:   #4ADE80;
  --green-bg:rgba(74,222,128,0.10);
  --greenbg: rgba(74,222,128,0.10);
  --green-badge:#4ADE80;
  --grnbdr:  rgba(74,222,128,0.22);
  --blue:    #60A5FA;
  --bluebg:  rgba(96,165,250,0.10);
  --bluebdr: rgba(96,165,250,0.22);
  --teal:    #2DD4BF;
  --tealbg:  rgba(45,212,191,0.10);
  --purple:  #A78BFA;
  --purplebg:rgba(167,139,250,0.10);

  /* Backgrounds */
  --bg-base:    #0B0F18;
  --bg-surface: #131927;
  --bg-card:    #131927;
  --bg-hover:   #1A2235;
  --bg-active:  #243149;

  /* Surfaces (glass / dark) */
  --surface-shell:      #0B0F18;
  --surface-card:       rgba(255,255,255,0.04);
  --surface-card-solid: #131927;
  --surface-muted:      rgba(255,255,255,0.02);
  --surface-raised:     rgba(255,255,255,0.06);
  --surface-cockpit:    var(--navy);
  --surface-cockpit-card: #131927;

  /* Text */
  --text-primary:   rgba(255,255,255,0.92);
  --text-secondary: rgba(255,255,255,0.60);
  --text-muted:     rgba(255,255,255,0.32);
  --text-dark:      rgba(255,255,255,0.92);
  --text-on-navy:   rgba(255,255,255,0.92);
  --text-on-navy-2: rgba(255,255,255,0.52);
  --text-on-navy-3: rgba(255,255,255,0.35);

  /* Borders (hairline glass) */
  --border:        rgba(255,255,255,0.08);
  --border-light:  rgba(255,255,255,0.06);
  --border-strong: rgba(255,255,255,0.14);
  --border-card:   rgba(255,255,255,0.06);
  --border-navy:   rgba(255,255,255,0.09);
  --border-navy-2: rgba(255,255,255,0.16);

  --white: rgba(255,255,255,0.04);

  /* Shadows (glow-based for dark) */
  --shadow-sm:    0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:    0 4px 12px rgba(0,0,0,0.5);
  --shadow-lg:    0 10px 30px rgba(0,0,0,0.6);
  --shadow-card:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-lift:  0 4px 24px rgba(0,0,0,0.5);
  --shadow-gold:  0 0 24px rgba(78,108,245,0.15);
  --shadow-focus: 0 0 0 3px rgba(78,108,245,0.25);
}

/* ── LEGACY LIGHT MODE ALIAS (light is now default; keep selector for back-compat) */
[data-theme="light"] {
  /* Light = default :root values; keep selector as no-op so JS toggling still works */
}

/* ── RESET ─────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; background: var(--surface-shell); }
body {
  font-family: var(--font-body);
  font-size: 13px;
  font-feature-settings: 'cv11','ss01';
  line-height: 1.5;
  color: var(--text-primary);
  background: var(--surface-shell);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
img, svg { display: block; max-width: 100%; }

/* Tabular numerics on money + counters + times */
.mono, .amount, .stat-val, .num,
td.num, [data-type="money"], [data-type="num"] {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum','zero';
  letter-spacing: -0.01em;
}

/* Display utility (now sans, kept for back-compat) */
.display {
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 600;
}

/* ── ENTRANCE ANIMATION ────────────────────── */
@keyframes wpc-rise {
  0%   { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}
.stagger > * {
  animation: wpc-rise 360ms var(--ease) backwards;
}
.stagger > *:nth-child(1) { animation-delay: 40ms; }
.stagger > *:nth-child(2) { animation-delay: 100ms; }
.stagger > *:nth-child(3) { animation-delay: 160ms; }
.stagger > *:nth-child(4) { animation-delay: 220ms; }
.stagger > *:nth-child(5) { animation-delay: 280ms; }
.stagger > *:nth-child(6) { animation-delay: 340ms; }
.stagger > *:nth-child(7) { animation-delay: 400ms; }
.stagger > *:nth-child(8) { animation-delay: 460ms; }

/* ── TOPBAR (FUB-faithful dark navy bar, WPC accent) ─────────── */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: #1A2A44; /* WPC navy — FUB uses a dark nav bar */
  height: 50px;
  display: flex; align-items: center; gap: 12px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(0,0,0,0.04);
  flex-shrink: 0;
}
[data-theme="dark"] .topbar {
  background: #0F1B2D;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: none;
}
.tb-logo {
  width: 30px; height: 30px;
  background: var(--wpc-gold);
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 15px; font-weight: 800;
  color: #0F1B2D; flex-shrink: 0;
  letter-spacing: -0.04em;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(201,168,76,0.30);
}
/* FUB-style wordmark next to the logo mark */
.tb-wordmark {
  font-family: var(--font-display);
  font-size: 15px; font-weight: 800;
  color: #fff; letter-spacing: -0.02em;
  white-space: nowrap; flex-shrink: 0;
}
.tb-wordmark span { color: var(--wpc-gold); }
.tb-page-title {
  font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,0.55);
  letter-spacing: 0.01em;
  white-space: nowrap;
  padding-left: 12px; margin-left: 2px;
  border-left: 1px solid rgba(255,255,255,0.14);
}
.topbar .tb-spacer { flex: 1; min-width: 12px; }
.topbar .tb-search {
  display: flex; align-items: center; gap: 7px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 7px;
  padding: 6px 11px;
  cursor: pointer;
  font-size: 12px; color: rgba(255,255,255,0.55);
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap; min-width: 200px;
}
.topbar .tb-search:hover {
  background: rgba(255,255,255,0.13);
  border-color: rgba(255,255,255,0.22);
  color: #fff;
}
.tb-search-label { flex: 1; }
.topbar .tb-search kbd {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 500;
  padding: 2px 5px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 4px;
  color: rgba(255,255,255,0.55);
}
.tb-presence {
  display: flex; align-items: center; gap: 4px;
}
.tb-icon-btn {
  width: 32px; height: 32px;
  border: none; background: none; border-radius: 7px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.65); font-size: 14px;
  transition: all var(--t-fast) var(--ease);
  flex-shrink: 0;
}
.tb-icon-btn:hover { background: rgba(255,255,255,0.10); color: #fff; }
.tb-admin-btn { color: rgba(255,255,255,0.50); }
.tb-admin-btn:hover { color: var(--gold); }
.topbar .tb-user {
  display: flex; align-items: center; gap: 8px; cursor: default;
}
.topbar .tb-user-meta { font-size: 11px; line-height: 1.3; text-align: right; }
.topbar .tb-user-name { color: #fff; font-weight: 600; font-size: 12px; }
.topbar .tb-user-role { color: rgba(255,255,255,0.50); font-size: 10px; }
.topbar .tb-avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: #0F1B2D;
  cursor: pointer; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* ── SUBNAV → PRIMARY FUB TOP-TAB SPINE (2026-05-31) ──────────
   Promoted from a secondary tab row to the app's PRIMARY navigation,
   matching Follow Up Boss: a clean white bar directly beneath the dark
   brand row, primary tabs across the top, FUB-blue (#4E6CF5 = --gold)
   underline on the active tab. The left icon-rail is retired (see
   USE_LEFT_SIDEBAR in wpc.js). */
.subnav {
  position: sticky; top: 50px; z-index: 99;
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: stretch; gap: 1px;
  padding: 0 14px; height: 48px;
  overflow-x: auto; scrollbar-width: none;
  flex-shrink: 0;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
[data-theme="dark"] .subnav {
  background: var(--surface-card-solid);
  border-bottom-color: var(--border);
}
.subnav::-webkit-scrollbar { display: none; }
.snav-link {
  display: flex; align-items: center;
  padding: 0 15px;
  font-size: 13.5px; font-weight: 500;
  color: var(--text-secondary);
  white-space: nowrap; text-decoration: none;
  border: none; background: none; cursor: pointer;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
  letter-spacing: -0.005em;
  border-bottom: 3px solid transparent;
}
.snav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
/* FUB-style active = bottom border in FUB blue + near-black text */
.snav-link.active {
  color: var(--text-primary);
  font-weight: 700;
  border-bottom-color: var(--gold);
  background: none;
  box-shadow: none;
}
[data-theme="dark"] .snav-link:hover { color: var(--text-primary); background: var(--bg-hover); }
[data-theme="dark"] .snav-link.active { color: var(--gold3); border-bottom-color: var(--gold); background: none; }
.snav-spacer { flex: 1; }
/* "+ Add" quick-add pill — FUB-blue solid CTA on the right of the spine */
.snav-action {
  align-self: center;
  color: #fff; font-size: 12.5px; font-weight: 600;
  border-bottom: none !important;
  height: 32px;
  padding: 0 14px; border-radius: 7px;
  background: var(--gold);
  box-shadow: 0 1px 3px rgba(78,108,245,0.30);
}
.snav-action:hover { color: #fff; background: var(--gold2); box-shadow: 0 3px 10px rgba(78,108,245,0.38); }
[data-theme="dark"] .snav-action { color: #fff; background: var(--gold); }
[data-theme="dark"] .snav-action:hover { background: var(--gold2); }

/* ── ADMIN BAR (collapsible, executive only) */
.admin-bar {
  display: none;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.admin-bar.ab-open { display: block; }
.ab-inner {
  display: flex; align-items: center; gap: 8px;
  height: 36px; padding: 0 16px;
  overflow-x: auto; scrollbar-width: none;
}
.ab-inner::-webkit-scrollbar { display: none; }
[data-theme="light"] .admin-bar { background: #1A2A44; }
.ab-label {
  font-size: 9px; font-weight: 800; letter-spacing: .1em;
  color: var(--gold); text-transform: uppercase; flex-shrink: 0;
}
.ab-stat {
  font-size: 11px; color: rgba(255,255,255,0.65);
  white-space: nowrap; flex-shrink: 0;
}
.ab-sep { width: 1px; height: 16px; background: rgba(255,255,255,0.12); flex-shrink: 0; }
.ab-btn {
  padding: 3px 10px; border-radius: 5px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.75); font-size: 11px;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
  transition: all 90ms;
}
.ab-btn:hover { background: rgba(255,255,255,0.14); color: #fff; }
.ab-btn.ab-danger { color: #f87171; border-color: rgba(248,113,113,0.3); }
.ab-btn.ab-logout { color: rgba(255,255,255,0.5); }
.ab-broadcast-panel {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 16px; border-top: 1px solid rgba(255,255,255,0.07);
}

/* ── MOBILE BOTTOM NAV (PWA-first) ─────── */
.mobile-bottom-nav { display: none !important; }
.mobile-bottom-nav svg { width: 24px !important; height: 24px !important; max-width: 24px !important; max-height: 24px !important; }

@media (min-width: 768px) {
  .mobile-bottom-nav { display: none !important; }
}

@media (max-width: 640px) {
  .subnav { display: none; }
  .tb-user-meta { display: none; }
  .tb-search-label { display: none; }
  .tb-search { padding: 5px 9px; min-width: unset; }
  body { padding-bottom: 58px; }
  .mobile-bottom-nav {
    position: fixed; bottom: 0; left: 0; right: 0; z-index: 200;
    background: var(--surface-card);
    border-top: 1px solid var(--border);
    display: flex; align-items: stretch;
    height: 58px;
    padding-bottom: env(safe-area-inset-bottom, 0);
    box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
  }
  .mbn-item {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    gap: 3px; font-size: 10px; font-weight: 600;
    color: var(--text-muted); text-decoration: none;
    border: none; background: none; cursor: pointer;
    transition: color 90ms; padding: 8px 0;
  }
  .mbn-item svg { width: 20px; height: 20px; stroke-width: 1.8; }
  .mbn-item.active { color: var(--gold); }
  .mbn-item:hover { color: var(--text-primary); }
}

/* ── COMPETING CLAIMS BANNER ──────────────── */
.competing-banner {
  background: linear-gradient(90deg, rgba(255,201,71,0.18) 0%, rgba(255,107,74,0.10) 100%);
  border-bottom: 1px solid rgba(255,201,71,0.25);
  color: var(--text-primary);
  padding: 10px 22px;
  display: flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 500;
  letter-spacing: 0.01em;
}
.competing-banner .cb-count {
  background: var(--amber);
  color: #000;
  border-radius: 12px;
  padding: 1px 9px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
}
.competing-banner .cb-link {
  margin-left: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  color: var(--amber);
  opacity: 0.9;
}
.competing-banner .cb-link:hover { opacity: 1; }

/* ── CMD+K PALETTE ────────────────────────── */
.cmdk-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: flex-start; justify-content: center;
  padding-top: 14vh;
}
.cmdk-overlay.open { display: flex; }
.cmdk-box {
  width: 600px; max-width: calc(100vw - 32px);
  max-height: 64vh;
  background: var(--surface-card-solid);
  border-radius: var(--r-xl);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lift);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: wpc-rise 200ms var(--ease);
}
.cmdk-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cmdk-input-wrap svg {
  color: var(--text-muted); flex-shrink: 0;
}
.cmdk-input {
  flex: 1; border: none; outline: none;
  font-family: var(--font-body);
  font-size: 15px; color: var(--text-primary);
  background: transparent; padding: 0;
}
.cmdk-input::placeholder { color: var(--text-muted); }
.cmdk-input-wrap kbd {
  font-family: var(--font-mono);
  font-size: 10px; padding: 2px 6px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-secondary);
}
.cmdk-results {
  overflow-y: auto;
  padding: 8px;
}
.cmdk-section-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 12px 4px;
}
.cmdk-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 12px;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.cmdk-item:hover, .cmdk-item.selected {
  background: rgba(255,255,255,0.06);
}
.cmdk-item-icon {
  width: 28px; height: 28px;
  border-radius: var(--r-sm);
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  color: var(--text-primary);
  flex-shrink: 0;
}
.cmdk-item-icon.gold {
  background: var(--gold);
  color: #000;
}
.cmdk-item-icon svg {
  width: 14px; height: 14px;
}
.cmdk-item-text { flex: 1; min-width: 0; }
.cmdk-item-name {
  font-size: 13px; font-weight: 500;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
}
.cmdk-item-sub {
  font-size: 11px; color: var(--text-muted);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis;
}
.cmdk-item-value {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 600;
  color: var(--gold);
}
.cmdk-empty {
  padding: 40px 16px; text-align: center;
  color: var(--text-muted); font-size: 13px;
}

/* ── PIPELINE STAGE PILL ──────────────────── */
.stage-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.05em;
  white-space: nowrap;
  border: 1px solid transparent;
}
.stage-1 { background: var(--surface-muted); color: var(--text-secondary); border-color: var(--border); }
[data-theme="dark"] .stage-1 { background: rgba(255,255,255,0.06); }
.stage-2 { background: var(--amberbg);  color: var(--amber);  border-color: var(--ambbdr); }
.stage-3 { background: var(--moss-bg);  color: var(--moss);   border-color: var(--moss-bdr); }
.stage-4 { background: var(--bluebg);   color: var(--blue);   border-color: var(--bluebdr); }
.stage-5 { background: var(--purplebg); color: var(--purple); border-color: rgba(167,139,250,0.22); }
.stage-6 { background: rgba(232,121,249,0.10); color: #E879F9; border-color: rgba(232,121,249,0.22); }
.stage-7 { background: var(--greenbg);  color: var(--green);  border-color: var(--grnbdr); }

/* ── PIPELINE TRACK ───────────────────────── */
.pipeline-track { display: inline-flex; gap: 3px; align-items: center; }
.pt-step {
  width: 18px; height: 3px;
  border-radius: 2px;
  background: rgba(255,255,255,0.10);
  transition: background var(--t-fast) var(--ease);
}
.pt-step.done    { background: var(--gold); }
.pt-step.active  { background: var(--gold2); height: 5px; box-shadow: 0 0 8px rgba(78,108,245,0.5); }

/* ── BADGES ───────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 7px;
  border-radius: var(--r-xs);
  font-size: 9px; font-weight: 700;
  letter-spacing: 0.06em;
  white-space: nowrap;
  font-family: var(--font-body);
  text-transform: uppercase;
}
.badge-competing {
  background: var(--amberbg); color: var(--amber);
  border: 1px solid var(--ambbdr);
}
.badge-file-now { background: var(--moss-bg); color: var(--moss); border: 1px solid var(--moss-bdr); }
.badge-ready    { background: var(--bluebg); color: var(--blue); border: 1px solid var(--bluebdr); }
.badge-active   { background: rgba(255,255,255,0.06); color: var(--text-primary); border: 1px solid var(--border); }
.badge-new      { background: var(--amberbg); color: var(--amber); border: 1px solid var(--ambbdr); }
.badge-dead     { background: rgba(255,255,255,0.04); color: var(--text-muted); border: 1px solid var(--border); }
.badge-hot {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #000;
  border: 1px solid var(--gold-deep);
  box-shadow: 0 0 12px rgba(78,108,245,0.30);
}
.badge-inbound {
  background: var(--gold); color: #000;
}
.badge-deceased {
  background: rgba(255,255,255,0.06); color: var(--text-muted);
  border: 1px solid var(--border);
}
.badge-quiet { background: rgba(255,255,255,0.04); color: var(--text-secondary); border: 1px solid var(--border); }
/* Light-mode (default FUB) — the neutral badges above use rgba(white) fills
   that vanish on white cards. Give them a visible light-gray fill. Dark theme
   keeps the original glass fills via the rules above. */
:root:not([data-theme="dark"]) .badge-active,
:root:not([data-theme="dark"]) .badge-dead,
:root:not([data-theme="dark"]) .badge-deceased,
:root:not([data-theme="dark"]) .badge-quiet {
  background: var(--surface-muted);
}

/* ── GLOBAL WARNING BANNER (FUB-style heads-up bar) ─────────
   Used by the Twilio low-balance banner on index + caller. Soft
   amber tint that reads as "attention" without the harsh brown. */
.wpc-warn-banner {
  position: relative; z-index: 50;
  padding: 9px 40px 9px 16px;
  font-size: 13px; font-weight: 600;
  text-align: center;
  background: var(--amber-bg);
  color: var(--amber);
  border-bottom: 1px solid var(--ambbdr);
}
.wpc-warn-banner-x {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: transparent; border: none;
  color: var(--amber); opacity: 0.7;
  font-size: 18px; line-height: 1; cursor: pointer;
  transition: opacity var(--t-fast) var(--ease);
}
.wpc-warn-banner-x:hover { opacity: 1; }
[data-theme="dark"] .wpc-warn-banner { background: rgba(255,201,71,0.10); color: var(--amber); border-bottom-color: rgba(255,201,71,0.25); }

/* ── PILLS (unified status system) ────────── */
.pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; border-radius: 100px;
  padding: 2px 8px; border: 1px solid transparent;
  white-space: nowrap;
}
/* FUB-light status pills: light bg, colored text (Spec §F) */
.pill-gold  { background: var(--bluebg);  color: var(--blue);  border-color: var(--bluebdr); }
.pill-green { background: var(--moss-bg); color: var(--moss);  border-color: var(--moss-bdr); }
.pill-red   { background: var(--redbg);   color: var(--red);   border-color: var(--redbdr); }
.pill-blue  { background: var(--bluebg);  color: var(--blue);  border-color: var(--bluebdr); }
.pill-amber { background: var(--amberbg); color: var(--amber); border-color: var(--ambbdr); }
.pill-muted { background: #F9FAFB; color: #6B7280; border-color: var(--border); }
[data-theme="dark"] .pill-muted { background: rgba(255,255,255,0.06); color: var(--text-secondary); }

/* ── CARDS (glass) ────────────────────────── */
.card {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-base) var(--ease), border-color var(--t-base) var(--ease);
}
.card:hover {
  border-color: rgba(255,255,255,0.12);
  box-shadow: var(--shadow-lift);
}
.card-hdr {
  padding: 14px 18px 12px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.02);
}
.card-title {
  font-size: 11px; font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  flex: 1;
}
.card-title .display {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 600;
  color: var(--text-primary);
  text-transform: none;
  letter-spacing: -0.01em;
}
.card-body { padding: 16px 18px; }
.card-hdr-count {
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  background: var(--gold-bg); color: var(--gold);
  border: 1px solid rgba(78,108,245,0.25);
  border-radius: 10px;
  padding: 1px 7px;
}

/* ── KPI CARD ──────────────────────────────── */
.kpi {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease), box-shadow var(--t-base) var(--ease);
}
.kpi:hover { border-color: rgba(255,255,255,0.14); box-shadow: var(--shadow-lift); }
.kpi-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 10px;
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 30px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1;
  letter-spacing: -0.03em;
}
.kpi-value.display {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 32px;
}
.kpi-value.gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--gold);
}
.kpi-value.rust  { color: var(--rust); }
.kpi-value.moss  { color: var(--moss); }
.kpi-sub {
  font-size: 11px; color: var(--text-muted);
  margin-top: 8px;
  font-family: var(--font-body);
}
.kpi-trend {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; font-weight: 600;
  font-family: var(--font-mono);
}
.kpi-trend.up   { color: var(--moss); }
.kpi-trend.down { color: var(--rust); }

/* ── STAT VAL (large-number display) ──────── */
.stat-val {
  font-size: 28px; font-weight: 800; line-height: 1;
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold2) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  color: var(--gold);
}
.stat-label {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* ── TIMELINE ──────────────────────────────── */
.timeline { padding-left: 6px; }
.tl-item {
  position: relative;
  padding: 7px 0 7px 18px;
  border-left: 1.5px solid var(--border);
}
.tl-item:last-child { border-color: transparent; padding-bottom: 0; }
.tl-dot {
  position: absolute; left: -5px; top: 11px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--border-strong);
  box-shadow: 0 0 0 2px var(--surface-shell);
}
.tl-dot.call    { background: var(--blue); }
.tl-dot.sms     { background: var(--amber); }
.tl-dot.email   { background: var(--moss); }
.tl-dot.note    { background: var(--purple); }
.tl-dot.inbound {
  background: var(--gold);
  width: 11px; height: 11px;
  left: -6px; top: 10px;
  box-shadow: 0 0 0 2px var(--surface-shell),
              0 0 0 4px rgba(78,108,245,0.25);
}
.tl-who {
  font-size: 11px; font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 5px;
  flex-wrap: wrap;
}
.tl-who .ch-mark {
  font-family: var(--font-mono);
  font-size: 9px; font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.tl-when {
  font-family: var(--font-mono);
  font-size: 10px;
  color: var(--text-muted);
}
.tl-text {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
  line-height: 1.5;
}
.tl-text-inbound {
  color: var(--gold); font-weight: 500;
}

/* ── PRIYA SCORE BADGE ────────────────────── */
.priya-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px 3px 7px;
  background: rgba(78,108,245,0.12);
  border: 1px solid rgba(78,108,245,0.30);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  color: var(--gold);
  letter-spacing: 0.02em;
}
.priya-badge::before {
  content: '★';
  font-family: var(--font-body);
  color: var(--gold);
}
.priya-badge.hot {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-deep) 100%);
  color: #000;
  border-color: var(--gold-deep);
  box-shadow: 0 0 12px rgba(78,108,245,0.35);
}
.priya-badge.hot::before { color: #000; }

/* ── FEE DISCREPANCY BLOCK ────────────────── */
.fee-block {
  border: 1px solid var(--rust-bdr);
  border-radius: var(--r-md);
  background: var(--rust-bg);
  padding: 10px 14px;
  display: flex; align-items: center; gap: 10px;
}
.fee-block-icon {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--rust); color: #000;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; flex-shrink: 0;
  font-size: 14px;
}
.fee-block-label {
  font-size: 11px; font-weight: 700;
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.fee-block-sub {
  font-size: 11px; color: var(--text-secondary);
  margin-top: 1px;
}

/* ── BUTTONS ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: 12px; font-weight: 600;
  cursor: pointer; border: none;
  letter-spacing: 0.02em;
  transition: all var(--t-fast) var(--ease);
  white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:focus-visible { box-shadow: var(--shadow-focus); outline: none; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary {
  background: var(--gold);
  color: #000;
  font-weight: 700; letter-spacing: 0.04em;
  border-radius: var(--r-md);
  padding: 8px 18px;
  box-shadow: 0 2px 10px rgba(78,108,245,0.30);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  background: var(--gold2);
  box-shadow: 0 4px 20px rgba(78,108,245,0.45);
}
.btn-gold    { background: var(--gold); color: #000; }
.btn-gold:hover { background: var(--gold2); box-shadow: 0 4px 16px rgba(78,108,245,0.35); }
.btn-ghost {
  background: transparent; color: var(--text-secondary);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: rgba(255,255,255,0.06);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-danger { background: var(--rust); color: #000; font-weight: 700; }
.btn-danger:hover { background: #FF8266; }
.btn-call {
  background: var(--moss); color: #000;
  font-weight: 700;
}
.btn-call:hover { background: #6EEAA0; box-shadow: 0 4px 16px rgba(74,222,128,0.30); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-lg { padding: 11px 20px; font-size: 13px; }

/* ── INPUT ─────────────────────────────────── */
.input, input.input, select.input, textarea.input {
  font-family: var(--font-body);
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 8px 12px;
  outline: none;
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  transition: all var(--t-fast) var(--ease);
  width: 100%;
}
.input::placeholder { color: var(--text-muted); }
.input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(78,108,245,0.15);
  background: rgba(255,255,255,0.06);
}

/* ── TABLE (clean rows) ──────────────────── */
table { border-collapse: collapse; width: 100%; }
thead th {
  font-size: 10px; font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 8px 12px; text-align: left;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.01);
}
tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background var(--t-fast) var(--ease);
}
tbody tr:hover { background: rgba(255,255,255,0.03); }
tbody td { padding: 10px 12px; color: var(--text-primary); }

/* Legacy .tbl class kept for back-compat */
table.tbl { width: 100%; border-collapse: collapse; font-size: 12px; }
.tbl th {
  text-align: left;
  padding: 9px 12px;
  background: rgba(255,255,255,0.01);
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border-bottom: 1px solid var(--border);
}
.tbl th.right { text-align: right; }
.tbl td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-primary);
}
.tbl td.right { text-align: right; }
.tbl tbody tr { transition: background var(--t-fast) var(--ease); }
.tbl tbody tr:hover { background: rgba(255,255,255,0.03); cursor: pointer; }
.tbl tbody tr:last-child td { border-bottom: none; }

/* ── DETAIL ROWS (key/value) ───────────────── */
.detail-row {
  display: flex; justify-content: space-between;
  padding: 7px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.detail-row:last-child { border-bottom: none; }
.detail-row .dk {
  color: var(--text-muted);
  font-size: 11px;
}
.detail-row .dv {
  color: var(--text-primary);
  font-weight: 500;
}

/* ── CASE ROW ──────────────────────────────── */
.case-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background var(--t-fast) var(--ease);
}
.case-row:hover { background: rgba(255,255,255,0.03); }
.case-row.priya-hot {
  border-left: 3px solid var(--gold);
  padding-left: 11px;
  background: linear-gradient(90deg, rgba(78,108,245,0.06), transparent 30%);
}
.case-row .cr-main { flex: 1; min-width: 0; }
.case-row .cr-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 6px;
}
.case-row .cr-meta {
  font-size: 11px; color: var(--text-muted);
  margin-top: 3px;
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
}
.case-row .cr-value {
  font-family: var(--font-mono);
  font-size: 14px; font-weight: 700;
  color: var(--gold);
  flex-shrink: 0;
  text-align: right;
}

/* ── ASK AGENT PANEL ──────────────────────── */
.agent-panel {
  background: var(--surface-card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.agent-hdr {
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
  display: flex; align-items: center; gap: 8px;
}
.agent-badge {
  width: 24px; height: 24px;
  border-radius: 6px;
  background: rgba(78,108,245,0.15);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid rgba(78,108,245,0.25);
}
.agent-name {
  font-size: 12px; font-weight: 600;
  color: var(--text-primary);
}
.agent-name .display {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.agent-role {
  font-size: 10px; color: var(--text-muted);
}
.agent-msgs {
  padding: 10px;
  min-height: 140px;
  max-height: 280px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.agent-msg {
  padding: 8px 11px;
  border-radius: var(--r-md);
  font-size: 12px; line-height: 1.55;
  max-width: 85%;
}
.agent-msg.user {
  background: rgba(78,108,245,0.15);
  color: var(--gold2);
  align-self: flex-end;
  border: 1px solid rgba(78,108,245,0.25);
}
.agent-msg.agent {
  background: rgba(255,255,255,0.05);
  color: var(--text-primary);
  align-self: flex-start;
  border: 1px solid var(--border);
}
.agent-input-wrap {
  display: flex; gap: 5px; padding: 8px;
  border-top: 1px solid var(--border);
}
.agent-input-wrap .input { padding: 6px 10px; font-size: 12px; }

/* ── FORECAST BARS ────────────────────────── */
.fc-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.fc-cell {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 14px 16px;
}
.fc-h {
  font-size: 10px; font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}
.fc-v {
  font-family: var(--font-mono);
  font-size: 22px; font-weight: 700;
  color: var(--gold);
  letter-spacing: -0.02em;
}
.fc-bar-wrap {
  height: 5px;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  margin-top: 10px;
  overflow: hidden;
}
.fc-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--gold), var(--gold2));
  border-radius: 3px;
  transition: width var(--t-slow) var(--ease);
  box-shadow: 0 0 8px rgba(78,108,245,0.4);
}

.assumption {
  padding: 10px 12px 10px 14px;
  background: var(--amberbg);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  font-size: 11px; line-height: 1.55;
  color: var(--text-primary);
  margin-bottom: 6px;
}
.assumption:last-child { margin-bottom: 0; }

/* ── COCKPIT (caller/dark) ───────────────── */
.cockpit-bg {
  background: var(--navy);
  color: var(--text-on-navy);
  min-height: 100vh;
}
.cockpit-bg .card {
  background: var(--surface-cockpit-card);
}
.cockpit-bg .card-hdr {
  background: rgba(255,255,255,0.02);
}

/* ── DRAWER ───────────────────────────────── */
.drawer-overlay {
  position: fixed; inset: 0; z-index: 900;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  display: none;
}
.drawer-overlay.open { display: block; }
.drawer {
  position: fixed; top: 0; right: -480px;
  width: 480px; max-width: 100vw; height: 100vh;
  background: var(--surface-card-solid);
  border-left: 1px solid var(--border);
  z-index: 901;
  transition: right var(--t-base) var(--ease);
  display: flex; flex-direction: column;
}
.drawer.open { right: 0; }

/* ── SCROLLBAR ───────────────────────────── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.10);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.20); }

/* ── UTILITIES ────────────────────────────── */
.muted { color: var(--text-muted); }
.secondary { color: var(--text-secondary); }
.gold-text { color: var(--gold); }
.serif { font-family: var(--font-display); font-weight: 600; }
.mono-text { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.loading {
  padding: 18px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11px;
}

/* ── STATUS-PILL (alias for .pill) ────────── */
.status-pill {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; border-radius: 100px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.06);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ── RESPONSIVE ───────────────────────────── */
@media (max-width: 900px) {
  .topbar { padding: 0 14px; gap: 8px; }
  .topbar .tb-search { min-width: 0; padding: 5px 8px; }
  .topbar .tb-search-text { display: none; }
  .topbar .wordmark { font-size: 13px; }
  .fc-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .kpi-value { font-size: 24px; }
  .stat-val { font-size: 22px; }
  .card-body { padding: 14px; }
}

/* ── ADMIN BAR ────────────────────────────── */
.admin-bar {
  background: #050A14;
  border-bottom: 1px solid rgba(78,108,245,0.20);
  padding: 0 16px;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 0;
  position: relative;
  z-index: 200;
  flex-shrink: 0;
}
.ab-left  { display: flex; align-items: center; gap: 4px; flex: 1; }
.ab-right { display: flex; align-items: center; gap: 6px; }
.ab-label {
  font-size: 8px; font-weight: 800; letter-spacing: .12em;
  color: var(--gold); background: rgba(78,108,245,0.12);
  padding: 2px 7px; border-radius: 4px; margin-right: 6px;
  white-space: nowrap;
  border: 1px solid rgba(78,108,245,0.20);
}
.ab-stat {
  font-size: 10px; color: rgba(255,255,255,0.55);
  padding: 2px 8px; border-radius: 4px;
  background: rgba(255,255,255,0.04);
  white-space: nowrap;
}
.ab-sep {
  width: 1px; height: 14px;
  background: rgba(255,255,255,0.1);
  margin: 0 6px;
}
.ab-btn {
  font-size: 10px; padding: 3px 9px;
  border-radius: 4px; border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.75);
  cursor: pointer; white-space: nowrap;
  transition: all .1s;
}
.ab-btn:hover { background: rgba(255,255,255,0.10); color: #fff; }
.ab-danger { border-color: rgba(255,107,74,0.30); color: var(--rust); }
.ab-danger:hover { background: rgba(255,107,74,0.15); }
.ab-logout { border-color: rgba(96,165,250,0.30); color: var(--blue); }
.ab-broadcast-panel {
  position: absolute; top: 30px; left: 0; right: 0;
  background: #050A14;
  border-bottom: 1px solid rgba(78,108,245,0.20);
  padding: 6px 16px;
  display: flex; gap: 6px; align-items: center;
  z-index: 300;
}

/* ── TOPBAR ADD BUTTON ─────────────────────── */
.tb-add-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 12px; border-radius: var(--r-sm);
  background: var(--gold); color: #000;
  border: none; font-size: 12px; font-weight: 700;
  cursor: pointer; transition: all .12s; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(78,108,245,0.25);
}
.tb-add-btn:hover { background: var(--gold2); box-shadow: 0 4px 14px rgba(78,108,245,0.40); }
.tb-add-btn svg { flex-shrink: 0; }

/* ── QUICK-ADD MODAL ───────────────────────── */
.qa-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  z-index: 99990; display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.qa-modal {
  background: var(--surface-card-solid);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  width: min(540px, 100%); max-height: 90vh; overflow-y: auto;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
  font-family: var(--font-body);
  color: var(--text-primary);
}
.qa-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.qa-header h2 { font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 0; }
.qa-header button { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }
.qa-header button:hover { color: var(--text-primary); }
.qa-body { padding: 20px 24px; }
.qa-step { display: none; }
.qa-step.active { display: block; }
.qa-step-label {
  font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 12px;
}
.qa-field { margin-bottom: 14px; }
.qa-field label { display: block; font-size: 11px; font-weight: 600; color: var(--text-secondary); margin-bottom: 4px; }
.qa-field input, .qa-field select, .qa-field textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-sm); font-size: 13px;
  background: rgba(255,255,255,0.04);
  color: var(--text-primary);
  box-sizing: border-box; font-family: var(--font-body);
}
.qa-field input::placeholder, .qa-field textarea::placeholder { color: var(--text-muted); }
.qa-field input:focus, .qa-field select:focus, .qa-field textarea:focus {
  outline: none; border-color: var(--gold);
  background: rgba(255,255,255,0.06);
  box-shadow: 0 0 0 3px rgba(78,108,245,0.15);
}
.qa-field-hint { font-size: 10px; color: var(--text-muted); margin-top: 3px; }
.qa-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.qa-footer {
  padding: 14px 24px 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 8px; justify-content: flex-end;
}
.qa-btn {
  padding: 9px 20px; border-radius: var(--r-sm); font-size: 13px;
  font-weight: 700; cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(255,255,255,0.05); color: var(--text-primary);
  transition: all .12s;
}
.qa-btn:hover { background: rgba(255,255,255,0.10); border-color: var(--border-strong); }
.qa-btn.primary {
  background: var(--gold); color: #000; border-color: var(--gold);
  box-shadow: 0 2px 10px rgba(78,108,245,0.30);
}
.qa-btn.primary:hover { background: var(--gold2); }
.qa-progress { display: flex; gap: 6px; padding: 0 24px 14px; }
.qa-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--border); transition: all .2s; }
.qa-dot.done { background: var(--gold-deep); }
.qa-dot.active { background: var(--gold); width: 20px; border-radius: 6px; box-shadow: 0 0 8px rgba(78,108,245,0.5); }
.qa-success {
  text-align: center; padding: 24px;
}
.qa-success h3 { font-size: 18px; color: var(--gold); margin-bottom: 8px; }
.qa-success p { font-size: 13px; color: var(--text-muted); margin-bottom: 16px; }
.qa-dup-warn {
  background: var(--amberbg); border: 1px solid var(--ambbdr); border-radius: var(--r-sm);
  padding: 10px 14px; font-size: 12px; color: var(--amber); margin-bottom: 14px;
}

/* ── LIGHT MODE GLOBAL CLEANUP ─────────────────
   Kills dark rgba micro-transparencies that read as near-black
   on a light page background and would otherwise stay dark even
   though the theme switched. Page-level inline styles can still
   override these by adding their own [data-theme="light"] rules. */
[data-theme="light"] .sidebar {
  background: var(--surface-card) !important;
  border-right: 1px solid var(--border) !important;
}
[data-theme="light"] .filter-surface {
  background: var(--surface-card) !important;
  border-color: var(--border) !important;
}
[data-theme="light"] .sort-bar {
  background: var(--surface-card) !important;
  border-color: var(--border) !important;
}
[data-theme="light"] .filter-chips {
  background: var(--surface-card) !important;
  border-color: var(--border) !important;
}
[data-theme="light"] .toolbar {
  background: var(--surface-card) !important;
  border-color: var(--border) !important;
}
[data-theme="light"] .pagination {
  background: var(--surface-card) !important;
  border-color: var(--border) !important;
}
/* Card body — flatten translucent surface to solid white */
[data-theme="light"] .card {
  background: var(--surface-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
[data-theme="light"] .card-hdr {
  background: var(--surface-muted) !important;
}
[data-theme="light"] .card:hover {
  border-color: var(--border-strong) !important;
}
/* Sticky table headers — switch from dark blur to light solid */
[data-theme="light"] .people-table th,
[data-theme="light"] .task-table th {
  background: var(--surface-card) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
[data-theme="light"] .people-table tr:hover td {
  background: var(--surface-muted) !important;
}
/* Inputs / selects — light surface, dark text */
[data-theme="light"] .toolbar input[type=text],
[data-theme="light"] .filter-sel,
[data-theme="light"] .filter-input,
[data-theme="light"] .btn-sm,
[data-theme="light"] .page-btn,
[data-theme="light"] .cluster-pill,
[data-theme="light"] .sort-pill,
[data-theme="light"] .action-btn {
  background: var(--surface-card) !important;
  color: var(--text-primary) !important;
}
[data-theme="light"] .toolbar input[type=text]:focus,
[data-theme="light"] .filter-sel:focus {
  background: #FFFFFF !important;
}
[data-theme="light"] .btn-sm:hover,
[data-theme="light"] .page-btn:hover,
[data-theme="light"] .cluster-pill:hover,
[data-theme="light"] .sort-pill:hover,
[data-theme="light"] .action-btn:hover {
  background: var(--surface-muted) !important;
}
/* Sort-pill and active pill states keep gold */
[data-theme="light"] .sort-pill.active,
[data-theme="light"] .cluster-pill.active,
[data-theme="light"] .btn-sm.active,
[data-theme="light"] .page-btn.active {
  background: var(--gold) !important;
  color: #000 !important;
  border-color: var(--gold) !important;
}

@media print {
  .mobile-bottom-nav,
  .sidebar-nav,
  .snav-wrap { display: none !important; }
  svg { max-width: 32px; max-height: 32px; }
}
</content>
</invoke>
/* ── CLUSTER PILLS ── */
.cluster-pill {
  display: inline-flex; align-items: center;
  padding: 4px 14px; border-radius: 20px;
  font-size: 12px; font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface-raised);
  color: var(--text-secondary);
  cursor: pointer; transition: all .15s;
  white-space: nowrap; font-family: var(--font-body);
}
.cluster-pill:hover { border-color: var(--gold); color: var(--text-primary); }
.cluster-pill.active, .cluster-pill[data-active="true"] {
  background: var(--gold); color: var(--navy);
  border-color: var(--gold); font-weight: 600;
}

/* ═══════════════════════════════════════════════════════════════
   FUB SHARED SHELL — unified left sidebar on every page
   Injected by WPC.mountSidebar(). Body gets .has-fub-shell.
   Mirrors people.html's FUB chrome (light sidebar, gold active rail).
   ═══════════════════════════════════════════════════════════════ */
:root { --fub-sb-w: 220px; --fub-sb-w-collapsed: 0px; }

/* Left sidebar — fixed, sits below the full-width topbar */
.fub-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--fub-sb-w);
  background: #F7F8FA;
  border-right: 1px solid #E5E7EB;
  display: flex; flex-direction: column;
  z-index: 95;
  overflow: hidden;
  font-family: var(--font-body);
}
[data-theme="dark"] .fub-sidebar {
  background: #0F1B2D;
  border-right-color: rgba(255,255,255,0.07);
}

/* Brand / wordmark block at top — matches topbar logo */
.fub-sb-brand {
  display: flex; align-items: center; gap: 9px;
  height: 50px; flex-shrink: 0;
  padding: 0 14px;
  border-bottom: 1px solid #E5E7EB;
  text-decoration: none;
  background: #1A2A44;
}
[data-theme="dark"] .fub-sb-brand { background: #0F1B2D; border-bottom-color: rgba(255,255,255,0.07); }
.fub-sb-mark {
  width: 28px; height: 28px; flex-shrink: 0;
  background: var(--wpc-gold); color: #0F1B2D;
  border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 800; font-size: 15px;
  letter-spacing: -0.04em;
  box-shadow: 0 2px 8px rgba(201,168,76,0.30);
}
.fub-sb-word {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 800; color: #fff;
  letter-spacing: -0.02em; white-space: nowrap;
}
.fub-sb-word span { color: var(--wpc-gold); }

/* Scrollable nav body */
.fub-sb-nav {
  flex: 1; overflow-y: auto; overflow-x: hidden;
  padding: 8px 0;
  scrollbar-width: thin;
}
.fub-sb-nav::-webkit-scrollbar { width: 6px; }
.fub-sb-nav::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 3px; }

.fub-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 14px; cursor: pointer;
  font-size: 13px; font-weight: 500; color: #374151;
  border-left: 3px solid transparent;
  text-decoration: none; white-space: nowrap;
  transition: background .1s, color .1s;
}
.fub-nav-item:hover { background: #ECEDF0; color: #111827; }
.fub-nav-item.active {
  background: #FBF3DE;            /* subtle WPC gold tint — the one WPC twist */
  color: #1A2A44;
  border-left-color: var(--wpc-gold);
  font-weight: 600;
}
.fub-nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
[data-theme="dark"] .fub-nav-item { color: rgba(255,255,255,0.78); }
[data-theme="dark"] .fub-nav-item:hover { background: rgba(255,255,255,0.06); color: #fff; }
[data-theme="dark"] .fub-nav-item.active {
  background: rgba(201,168,76,0.16); color: var(--gold);
}

.fub-sb-sep { height: 1px; background: #E5E7EB; margin: 8px 14px; }
[data-theme="dark"] .fub-sb-sep { background: rgba(255,255,255,0.07); }
.fub-sb-hdr {
  padding: 6px 14px 4px;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .08em; color: #6B7280;
}
[data-theme="dark"] .fub-sb-hdr { color: rgba(255,255,255,0.40); }

.fub-sb-foot {
  flex-shrink: 0; padding: 6px 0;
  border-top: 1px solid #E5E7EB;
}
[data-theme="dark"] .fub-sb-foot { border-top-color: rgba(255,255,255,0.07); }

/* ── SHELL: reserve sidebar width, shift everything right ── */
body.has-fub-shell { padding-left: var(--fub-sb-w); }
/* Topbar + subnav span only the content column (right of sidebar) */
body.has-fub-shell .topbar { padding-left: 16px; }
/* The horizontal subnav is redundant with the sidebar — hide it,
   keep the topbar (full FUB chrome = topbar + left sidebar). */
body.has-fub-shell .subnav { display: none !important; }
/* Pages that wrap content in .shell still work — shell flows in content column */
body.has-fub-shell .shell { min-height: 100vh; }

/* Mobile hamburger toggle (hidden on desktop) */
.fub-sb-toggle {
  display: none;
  position: fixed; top: 9px; left: 10px; z-index: 110;
  width: 32px; height: 32px; border-radius: 7px;
  background: rgba(255,255,255,0.10);
  border: 1px solid rgba(255,255,255,0.16);
  color: #fff; cursor: pointer;
  align-items: center; justify-content: center;
}
.fub-sb-toggle svg { width: 18px; height: 18px; }
.fub-sb-toggle:hover { background: rgba(255,255,255,0.18); }

/* ── RESPONSIVE: collapse sidebar off-canvas below 900px ── */
@media (max-width: 900px) {
  body.has-fub-shell { padding-left: 0; }
  .fub-sidebar {
    transform: translateX(-100%);
    transition: transform .2s ease;
    box-shadow: 0 0 40px rgba(0,0,0,0.35);
  }
  .fub-sidebar.fub-open { transform: translateX(0); }
  .fub-sb-toggle { display: flex; }
  /* nudge topbar content so it doesn't sit under the hamburger */
  body.has-fub-shell .topbar { padding-left: 50px; }
}
