/* ============================================================================
   BitHQ — "Terminal" dark theme
   Drop-in override layer. Load AFTER css/styles.css:

     <link rel="stylesheet" href="/css/styles.css">
     <link rel="stylesheet" href="/css/bithq-terminal.css">   <!-- this file -->

   It re-skins BitHQ to the BitCopilot aesthetic by (1) remapping the design
   tokens in :root and (2) overriding the surfaces that hardcode light colors.
   Because it sits on top of styles.css it does not touch your source, so it
   won't conflict with in-flight work.

   FONTS: the app CSP is `font-src 'self'`, so Geist must be SELF-HOSTED.
   Drop Geist + Geist Mono webfonts in /fonts and add the @font-face blocks
   (see bottom of this file, commented). Until then it falls back to the
   system UI + mono stacks, which already read well in this design.

   TOKEN MAP (light -> Terminal)
     --navy  #1F3864  -> light ink (#E8EAEF) for text;  fills remapped per-rule
     --green #548235  -> #3FCF8E      --red    #C00000 -> #F0616B
     --orange#BF8F00  -> #F0A93B      --blue   #2E75B6 -> #7B6CF6 (violet)
     --teal  #1B5E5E  -> #2E8B7F      --purple #7B2D8E -> #B3A8FA
     surfaces white / #f8fafc / #fafbfc -> #0B0B0C base, #101012 panels
     --border #D0D0D0 -> rgba(255,255,255,.10)
   ========================================================================== */

/* ---- 1. TOKENS ----------------------------------------------------------- */
:root {
  /* brand / accents */
  --navy: #E8EAEF;          /* used as text ink across the app */
  --teal: #2E8B7F;
  --blue: #7B6CF6;          /* secondary / focus / charts */
  --green: #3FCF8E;
  --red: #F0616B;
  --orange: #F0A93B;
  --purple: #B3A8FA;
  --dark-green: #6FE0AE;

  /* soft tints (used for row/section backgrounds) */
  --light-blue:   rgba(123,108,246,0.14);
  --light-green:  rgba(63,207,142,0.12);
  --light-yellow: rgba(240,169,59,0.12);
  --light-red:    rgba(240,97,107,0.12);
  --light-orange: rgba(240,169,59,0.10);
  --light-purple: rgba(123,108,246,0.12);
  --gray: #15151A;
  --border: rgba(255,255,255,0.10);

  /* added surface tokens (referenced by overrides below) */
  --t-bg: #0B0B0C;          /* app background            */
  --t-bg-deep: #060607;     /* deepest wells / inputs    */
  --t-panel: #101012;       /* cards / panels            */
  --t-panel-2: #15151A;     /* raised / hover            */
  --t-line: rgba(255,255,255,0.10);
  --t-line-2: rgba(255,255,255,0.14);
  --t-text: rgba(255,255,255,0.94);
  --t-muted: rgba(255,255,255,0.66);
  --t-faint: rgba(255,255,255,0.50);
  /* dark remap of the styles.css text-ink scale — fixes class-based slate text
     (e.g. .hp-leader-name) without per-class overrides. */
  --ink: rgba(255,255,255,0.94);
  --ink-2: rgba(255,255,255,0.82);
  --ink-muted: rgba(255,255,255,0.66);
  --ink-faint: rgba(255,255,255,0.50);
  --card-bg: #101012;
  --light-gray: #15151A;

  --t-mono: "Geist Mono", ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --t-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", sans-serif;
}

/* ---- 2. GLOBAL ----------------------------------------------------------- */
/* Buttons default to the UA "buttontext" colour, which does NOT inherit from
   body — so an unstyled / transparent button (e.g. the contracts filter pills,
   Expand/Collapse) shows dark-on-dark. Give every button a readable default
   ink; any button that sets its own colour (inline or class) overrides this
   via specificity, so colored buttons are unaffected. */
button { color: var(--t-text); }

body {
  background-color: var(--t-bg) !important;
  color: var(--t-text);
  font-family: var(--t-sans);
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* numbers / data read as monospace everywhere it matters */
.hp-kpi-value, .stat-card-value, .wf-flow-value, .wf-running-net,
.ts-input, .wf-input, .wf-currency, .hp-client-rev, .hp-client-pct,
.hp-leader-value, td .mono, .mono { font-family: var(--t-mono); }

/* ---- 3. CHROME: topbar / sidebar ---------------------------------------- */
.topbar {
  background-color: var(--t-bg) !important;
  color: var(--t-text);
  border-bottom: 1px solid var(--t-line);
}
.topbar-title { color: #fff; }
/* keep the brand "Bit" green if the markup splits it; otherwise tint title */
.sidebar {
  background: var(--t-bg) !important;
  border-right: 1px solid var(--t-line);
}
.sidebar-group-trigger { color: var(--t-faint); }
.sidebar-group-trigger:hover { background: var(--t-panel) !important; color: #fff !important; }
.sidebar-group-trigger.active { color: #fff; }
.sidebar-group-body { background: transparent !important; border-top-color: var(--t-line) !important; border-bottom-color: var(--t-line) !important; }
.sidebar-item { color: var(--t-muted); }
.sidebar-item:hover { background: rgba(255,255,255,0.04) !important; color: #fff !important; }
.sidebar-item.active {
  background: rgba(63,207,142,0.10) !important;
  color: #fff !important;
  border-left-color: var(--green) !important;
}
.sidebar-collapse-btn { background: var(--t-panel) !important; border-color: var(--t-line); color: var(--t-muted); }
.sidebar-collapse-btn:hover { background: var(--t-panel-2) !important; color: #fff; }

/* notifications + actions menu + zoom */
.notif-dropdown, .actions-menu-dropdown { background: var(--t-panel) !important; border-color: var(--t-line) !important; box-shadow: 0 20px 50px -16px rgba(0,0,0,0.8); }
.notif-dropdown-header { background: var(--t-bg-deep) !important; border-bottom-color: var(--t-line) !important; }
.notif-dropdown-title { color: #fff; }
.notif-item { border-bottom-color: var(--t-line); }
.notif-item:hover { background: rgba(255,255,255,0.03) !important; }
.notif-dismiss-all:hover { background: rgba(255,255,255,0.06) !important; color: #fff !important; }
.actions-menu-item { color: var(--t-text); }
.actions-menu-item:hover { background: rgba(255,255,255,0.05) !important; }
.actions-menu-divider { background: var(--t-line) !important; }

/* ---- 4. BUTTONS ---------------------------------------------------------- */
.btn-primary, .auth-button, .cpa-pull-btn {
  background: #15A05A !important;
  border-color: #15A05A !important;
  color: #fff !important;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-secondary {
  background: var(--t-panel) !important;
  border: 1px solid var(--t-line-2) !important;
  color: var(--t-text) !important;
}
.btn-secondary:hover { background: var(--t-panel-2) !important; }
.ai-nav-btn { background: var(--t-panel) !important; border: 1px solid var(--t-line) !important; color: var(--t-text) !important; }

/* ---- 5. SURFACES: cards / panels / popovers ----------------------------- */
.card, .stat-card, .recon-project, .cpa-card, .ai-panel, .ai-container,
.notif-bell-wrap .notif-dropdown {
  background-color: var(--t-panel) !important;
  border: 1px solid var(--t-line) !important;
  box-shadow: 0 1px 0 rgba(255,255,255,0.02), 0 24px 60px -40px rgba(0,0,0,0.8);
  color: var(--t-text);
}
.recon-project:nth-child(even), .cpa-dropzone, .cpa-category, .cpa-summary, .ai-input-row { background: var(--t-panel-2) !important; }
.card-header {
  background-color: var(--t-bg-deep) !important;
  color: #fff;
  border-bottom: 1px solid var(--t-line);
}
.stat-card-label, .hp-kpi-label { color: var(--t-muted) !important; }
.stat-card-value { color: #fff; }

/* generic popovers / dropdowns / menus that hardcode white */
.ts-note-popover, .debt-note-popover, .wf-client-popup, .wf-vendor-popup,
.wf-search-dropdown, .wf-cat-popup, .actions-menu-dropdown {
  background: var(--t-panel) !important;
  border-color: var(--t-line-2) !important;
  color: var(--t-text);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.85);
}
.wf-search-row:hover, .wf-client-popup-item:hover { background: rgba(255,255,255,0.05) !important; color: #fff !important; }
/* Timesheet note cell — styles.css hardcodes color:#555 (illegible on dark) and
   a near-white #f8f9fa hover (a bright flash). Existing note text was invisible. */
.ts-note-preview { color: var(--t-text) !important; }
.ts-note-preview:hover { background: rgba(255,255,255,0.05) !important; border-color: var(--t-line-2) !important; }

/* ---- 6. TABLES ----------------------------------------------------------- */
table { color: var(--t-text); }
thead, th, .table-header, .sticky-header {
  background: var(--t-bg-deep) !important;
  color: var(--t-muted) !important;
  border-bottom: 1px solid var(--t-line) !important;
}
td { border-bottom: 1px solid var(--t-line) !important; }
tr:hover td { background-color: rgba(255,255,255,0.025) !important; }
.summary-row { background-color: var(--t-bg-deep) !important; border-top-color: var(--t-line-2) !important; border-bottom-color: var(--t-line-2) !important; color: #fff; }
.result-row-negative { background-color: rgba(240,97,107,0.10) !important; border-top-color: rgba(240,97,107,0.4) !important; border-bottom-color: rgba(240,97,107,0.4) !important; }
.result-row-positive { background-color: rgba(63,207,142,0.10) !important; border-top-color: rgba(63,207,142,0.4) !important; border-bottom-color: rgba(63,207,142,0.4) !important; }

/* ---- 7. INPUTS ----------------------------------------------------------- */
input, select, textarea, .budget-input, .ts-input, .wf-input, .wf-control-input, .item-name-input {
  background: var(--t-bg-deep) !important;
  border: 1px solid var(--t-line) !important;
  color: var(--t-text) !important;
}
input::placeholder, textarea::placeholder { color: var(--t-faint); }
input:focus, select:focus, textarea:focus, .ts-input:focus, .wf-input:focus {
  border-color: var(--blue) !important;
  outline: none;
  box-shadow: 0 0 0 2px rgba(123,108,246,0.25) !important;
}
.ts-input { border-color: transparent !important; background: transparent !important; }
.ts-input:hover { border-color: var(--t-line-2) !important; background: var(--t-bg-deep) !important; }
.ts-input:focus { border-color: var(--blue) !important; background: var(--t-bg-deep) !important; }
.item-name-input:focus { background: var(--t-bg-deep) !important; }

/* ---- 8. BADGES / PILLS / TAGS (semantic light -> dark tints) ------------- */
.status-neutral, .recon-pill--neutral, .wf-badge-pending, .wf-badge-not-invoiced,
.cpa-category-badge, .ai-suggestion-chip { background: rgba(255,255,255,0.07) !important; color: var(--t-muted) !important; border-color: var(--t-line) !important; }
.status-awaiting-data { background: rgba(255,255,255,0.05) !important; color: var(--t-faint) !important; }

.recon-pill--green, .wf-search-in { background: rgba(63,207,142,0.14) !important; color: var(--dark-green) !important; }
.recon-pill--yellow, .wf-badge-processing, .wf-badge-invoiced { background: rgba(240,169,59,0.16) !important; color: #F0C078 !important; border-color: rgba(240,169,59,0.35) !important; }
.recon-pill--red, .wf-badge-delinquent, .wf-search-out, .wf-item.delinquent { background: rgba(240,97,107,0.16) !important; color: #F4A4AB !important; border-color: rgba(240,97,107,0.4) !important; }
.wf-badge-paid, .wf-badge-received { background: rgba(63,207,142,0.16) !important; color: var(--dark-green) !important; border-color: rgba(63,207,142,0.35) !important; }

/* notification unread badge keeps a hot dot */
.notif-badge { background: var(--red) !important; color: #fff !important; }

/* ---- 9. HOMEPAGE (Executive Dashboard) ---------------------------------- */
.hp-kpi-card { background: var(--t-panel) !important; border: 1px solid var(--t-line) !important; }
.hp-kpi-card:hover { border-color: rgba(63,207,142,0.35) !important; background: var(--t-panel-2) !important; }
.hp-card { background: var(--t-panel) !important; border: 1px solid var(--t-line) !important; }
.hp-card-header { background: var(--t-bg-deep) !important; color: #fff; border-bottom: 1px solid var(--t-line); }
.hp-alerts-header { color: var(--t-muted) !important; }
.hp-alert-item { background: var(--t-panel) !important; border: 1px solid var(--t-line) !important; }
.hp-alert-critical { border-left: 3px solid var(--red) !important; }
.hp-alert-warning  { border-left: 3px solid var(--orange) !important; }
.hp-alert-info     { border-left: 3px solid var(--blue) !important; }
.hp-trend-bar { background: var(--blue) !important; }              /* violet bars */
.hp-trend-bar-wrap, .trend-bar-wrap, .hp-client-bar-wrap, .hp-leader-bar-wrap { background: var(--t-bg-deep) !important; }
.hp-client-bar { background: var(--green) !important; }
.hp-client-risk .hp-client-bar { background: var(--red) !important; }
.hp-leader-bar-hours { background: var(--green) !important; }
.hp-client-tag.hp-tag-actual { background: rgba(63,207,142,0.14) !important; color: var(--dark-green) !important; }
.hp-client-tag.hp-tag-planned { background: rgba(123,108,246,0.16) !important; color: var(--purple) !important; }

/* ---- 10. TIMESHEET ------------------------------------------------------- */
.ts-section { border-color: var(--t-line) !important; background: var(--t-panel) !important; }
.ts-section-header { filter: none !important; }                   /* section bg set inline; tint via overlay below */
.ts-section-header:hover { filter: brightness(1.1) !important; }
.ts-person-row td { border-bottom-color: var(--t-line) !important; }
.ts-person-row:hover td { background: rgba(255,255,255,0.03) !important; }
.ts-comp-line { border-top-color: var(--t-line) !important; }
/* GROSS column highlight (was #e8f5e9 / #f1f8e9), wherever it appears */
td[style*="f1f8e9"], td[style*="e8f5e9"], th[style*="e8f5e9"],
td[style*="F1F8E9"], td[style*="E8F5E9"] { background: rgba(63,207,142,0.08) !important; color: var(--dark-green) !important; }

/* ---- 11. WATERFALL ------------------------------------------------------- */
.wf-flow-bar { background: var(--t-panel) !important; border: 1px solid var(--t-line); border-radius: 12px; }
.wf-flow-step { background: var(--t-bg-deep) !important; border: 1px solid var(--t-line) !important; }
.wf-flow-label { color: var(--t-muted) !important; }
.wf-flow-value { color: #fff; }
.wf-flow-arrow { color: var(--t-faint) !important; }
.wf-flow-result.green { background: rgba(63,207,142,0.10) !important; border-color: rgba(63,207,142,0.3) !important; }
.wf-flow-result.green .wf-flow-value { color: var(--dark-green); }
.wf-flow-result.red { background: rgba(240,97,107,0.10) !important; border-color: rgba(240,97,107,0.3) !important; }
.wf-flow-result.red .wf-flow-value { color: #F4A4AB; }
.wf-controls-bar { background: var(--t-panel) !important; border: 1px solid var(--t-line) !important; }
.wf-control-label { color: var(--t-muted) !important; }
.wf-control-hint { color: var(--t-faint) !important; }
.wf-section-title { color: var(--t-muted) !important; }
/* The week/tranche column card — styles.css hardcodes background:white; the
   dark-ified rows sit on it, so without this the whole column reads as a bright
   white card behind dark rows. */
.wf-column { background-color: var(--t-panel) !important; box-shadow: none !important; border: 1px solid var(--t-line) !important; }
.wf-item { background-color: var(--t-bg-deep) !important; border: 1px solid var(--t-line) !important; }
.wf-item:hover { background-color: var(--t-panel-2) !important; border-color: var(--t-line-2) !important; }
.wf-inbound-received, .wf-status-paid { background-color: rgba(63,207,142,0.08) !important; border-left-color: var(--green) !important; }
.wf-inbound-pending { background-color: rgba(240,169,59,0.08) !important; border-left-color: var(--orange) !important; }
.wf-status-delinquent { background-color: rgba(240,97,107,0.08) !important; border-left-color: var(--red) !important; }
.wf-paid-divider span, .wf-paid-cat-header { color: var(--t-faint) !important; }
/* Outbound category pills + the per-category header band hardcode light pastels
   in styles.css (class-based → the inline sweep misses them), so they render as
   white/invisible boxes in dark mode. Re-map by hue to translucent tints + light
   text. Base rule first; per-category rules (equal specificity) win by order. */
.wf-paid-cat-header { background: var(--t-bg-deep) !important; }
.wf-category-tag { background: var(--t-panel-2) !important; color: var(--t-text) !important; border-color: var(--t-line) !important; }
.wf-cat-uncat { background: var(--t-panel-2) !important; color: var(--t-faint) !important; }
.wf-cat-labor, .wf-cat-distro { background: rgba(123,108,246,0.18) !important; color: #C9BCFF !important; }
.wf-cat-software, .wf-cat-other { background: rgba(123,108,246,0.18) !important; color: #9FB4FF !important; }
.wf-cat-proserv, .wf-cat-insurance, .wf-cat-invoice { background: rgba(63,207,142,0.16) !important; color: #6FE0AE !important; }
.wf-cat-travel, .wf-cat-rentutilities, .wf-cat-debt, .wf-cat-loan { background: rgba(240,169,59,0.16) !important; color: #F0C078 !important; }
.wf-cat-te { background: rgba(240,97,140,0.16) !important; color: #F4A4C8 !important; }
.wf-cat-taxesfees { background: rgba(240,97,107,0.16) !important; color: #F4A4AB !important; }
.wf-running { border-top: 1px solid var(--t-line); background: var(--t-bg-deep) !important; }
/* client / vendor chips */
.wf-client-chip { background: rgba(123,108,246,0.14) !important; color: var(--purple) !important; border-color: rgba(123,108,246,0.3) !important; }
.wf-vendor-chip { background: rgba(46,139,127,0.16) !important; color: #7FD0C4 !important; border-color: rgba(46,139,127,0.35) !important; }
.wf-client-chip-unlinked, .wf-vendor-chip-unlinked { background: rgba(240,169,59,0.12) !important; color: #F0C078 !important; border-color: rgba(240,169,59,0.3) !important; }
.wf-tranche-nav-btn { background: var(--t-bg-deep) !important; border-color: var(--t-line) !important; color: var(--t-text) !important; }
.wf-tranche-nav-btn:hover { background: var(--t-panel-2) !important; border-color: var(--teal) !important; }

/* ---- 12. TOASTS ---------------------------------------------------------- */
.toast-error   { background: rgba(240,97,107,0.14) !important; border-color: var(--red) !important; color: #F4A4AB !important; }
.toast-warning { background: rgba(240,169,59,0.14) !important; border-color: var(--orange) !important; color: #F0C078 !important; }
.toast-success { background: rgba(63,207,142,0.14) !important; border-color: var(--green) !important; color: var(--dark-green) !important; }

/* ---- 13. AI CHAT --------------------------------------------------------- */
.ai-message--assistant { background: var(--t-panel-2) !important; color: var(--t-text) !important; }
.ai-message--user { background: #15A05A !important; color: #fff !important; }
.ai-message--error { background: rgba(240,97,107,0.12) !important; border-color: rgba(240,97,107,0.4) !important; }
.ai-suggestion-chip:hover { background: rgba(255,255,255,0.10) !important; color: #fff !important; }
.ai-input { background: var(--t-bg-deep) !important; }

/* ---- 14. AUTH GATE ------------------------------------------------------- */
.auth-gate { background: radial-gradient(1000px 500px at 50% -10%, #15151A 0%, var(--t-bg) 60%) !important; }
.auth-card { background: var(--t-panel) !important; border: 1px solid var(--t-line); color: var(--t-text); }
.auth-input { background: var(--t-bg-deep) !important; border-color: var(--t-line) !important; color: #fff !important; }

/* ============================================================================
   15. SYSTEM-WIDE SWEEP — every remaining panel
   The app names classes by convention (prefix-card / -panel / -row / -modal /
   -input …). These attribute-substring rules dark-ify those families app-wide
   so Forecast, Debt, Distro, Vendors, Contracts, Projects, Assets, EOS, PTO,
   CPA, Reconciliation, Management, Ambassadors, Audit, etc. inherit the theme
   without per-panel work. Scoped to background/border/surface only so semantic
   colors (badges, status, charts) defined above are preserved.
   ========================================================================== */

/* surfaces — cards, panels, widgets ONLY. (-tile / -stat / -box are often
   status-COLORED, e.g. recon .margin-tile — never flatten those.) */
[class*="-card"], [class*="-panel"], [class*="-widget"] {
  background-color: var(--t-panel) !important;
  border-color: var(--t-line) !important;
  color: var(--t-text);
}
/* nested even-stripe rows inside those surfaces */
[class*="-row"]:nth-child(even), [class*="-item"]:nth-child(even) { background-color: transparent !important; }

/* overlays — modals, popovers, dropdowns, menus, dialogs, sheets */
[class*="-modal"], [class*="-popover"], [class*="-popup"], [class*="-dropdown"],
[class*="-menu-dropdown"], [class*="-dialog"], [class*="-sheet"], [class*="-flyout"],
[class*="-tooltip"], [role="dialog"], [role="menu"] {
  background-color: var(--t-panel) !important;
  border-color: var(--t-line-2) !important;
  color: var(--t-text);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,0.85);
}
[class*="-overlay"], [class*="-backdrop"], [class*="-scrim"] { background: rgba(0,0,0,0.6) !important; }

/* form controls + drop zones */
[class*="-input"], [class*="-field"], [class*="-textarea"], [class*="-select"],
[class*="-dropzone"], [class*="-search"] input, [class*="-zone"] {
  background-color: var(--t-bg-deep) !important;
  border-color: var(--t-line) !important;
  color: var(--t-text) !important;
}

/* hover affordance for any list row / item that hardcoded a light hover */
[class*="-row"]:hover, [class*="-item"]:hover, [class*="-option"]:hover,
[class*="-result"]:hover { background-color: rgba(255,255,255,0.03) !important; }

/* generic dark-ink text that hardcodes slate on light (common inline values) */
[style*="color:#1e293b"], [style*="color: #1e293b"],
[style*="color:#334155"], [style*="color: #334155"],
[style*="color:#1f2937"], [style*="color: #1f2937"],
[style*="color:#0f172a"], [style*="color: #0f172a"],
[style*="color:#333"], [style*="color: #333"] { color: var(--t-text) !important; }
[style*="color:#475569"], [style*="color: #475569"],
[style*="color:#64748b"], [style*="color: #64748b"],
[style*="color:#555"], [style*="color: #555"],
[style*="color:#666"], [style*="color: #666"] { color: var(--t-muted) !important; }
[style*="color:#94a3b8"], [style*="color: #94a3b8"],
[style*="color:#9ca3af"], [style*="color: #9ca3af"],
[style*="color:#999"], [style*="color: #999"] { color: var(--t-faint) !important; }

/* light inline backgrounds dropped onto arbitrary cells (the most common ones) */
[style*="background:#fff"], [style*="background: #fff"],
[style*="background:white"], [style*="background: white"],
[style*="background-color:#fff"], [style*="background-color: #fff"],
[style*="background:#f8fafc"], [style*="background: #f8fafc"],
[style*="background:#f9f9f9"], [style*="background: #f9f9f9"],
[style*="background:#f1f5f9"], [style*="background: #f1f5f9"],
[style*="background:#fafbfc"], [style*="background: #fafbfc"] {
  background-color: var(--t-bg-deep) !important;
}

/* semantic status highlights — light tints -> dark tints (recon row flags,
   chase NEW/REVIEW sections, banners, inline status pills) */
[style*="background:#fffbeb"],[style*="background: #fffbeb"],[style*="background:#fef3c7"],[style*="background: #fef3c7"],[style*="background:#fff3bf"],[style*="background: #fff3bf"],[style*="background:#fff9db"],[style*="background: #fff9db"],[style*="background:#fef9c3"],[style*="background: #fef9c3"] { background-color: rgba(240,169,59,0.12) !important; }
[style*="background:#d1fae5"],[style*="background: #d1fae5"],[style*="background:#dcfce7"],[style*="background: #dcfce7"],[style*="background:#f0fdf4"],[style*="background: #f0fdf4"],[style*="background:#ecfdf5"],[style*="background: #ecfdf5"] { background-color: rgba(63,207,142,0.12) !important; }
[style*="background:#fee2e2"],[style*="background: #fee2e2"],[style*="background:#fef2f2"],[style*="background: #fef2f2"],[style*="background:#fff5f5"],[style*="background: #fff5f5"] { background-color: rgba(240,97,107,0.12) !important; }
[style*="background:#dbeafe"],[style*="background: #dbeafe"],[style*="background:#e0f2fe"],[style*="background: #e0f2fe"],[style*="background:#eff6ff"],[style*="background: #eff6ff"],[style*="background:#f0f9ff"],[style*="background: #f0f9ff"] { background-color: rgba(123,108,246,0.12) !important; }
/* brand light-tints (--light-* palette) used as literal status fills */
[style*="background:#e2efda"],[style*="background: #e2efda"],[style*="background:#E2EFDA"],[style*="background: #E2EFDA"] { background-color: rgba(63,207,142,0.13) !important; }
[style*="background:#fce4ec"],[style*="background: #fce4ec"],[style*="background:#FCE4EC"],[style*="background: #FCE4EC"] { background-color: rgba(240,97,107,0.13) !important; }
[style*="background:#fff2cc"],[style*="background: #fff2cc"],[style*="background:#FFF2CC"],[style*="background: #FFF2CC"],[style*="background:#fbe5d6"],[style*="background: #fbe5d6"],[style*="background:#FBE5D6"],[style*="background: #FBE5D6"] { background-color: rgba(240,169,59,0.13) !important; }
[style*="background:#d6e4f0"],[style*="background: #d6e4f0"],[style*="background:#D6E4F0"],[style*="background: #D6E4F0"],[style*="background:#f3e5f5"],[style*="background: #f3e5f5"],[style*="background:#F3E5F5"],[style*="background: #F3E5F5"] { background-color: rgba(123,108,246,0.13) !important; }

/* status text inks -> readable on dark */
[style*="color:#92400e"],[style*="color: #92400e"],[style*="color:#b45309"],[style*="color: #b45309"],[style*="color:#e67700"],[style*="color: #e67700"] { color: #F0C078 !important; }
[style*="color:#065f46"],[style*="color: #065f46"],[style*="color:#166534"],[style*="color: #166534"],[style*="color:#2b8a3e"],[style*="color: #2b8a3e"] { color: #6FE0AE !important; }
[style*="color:#991b1b"],[style*="color: #991b1b"],[style*="color:#b91c1c"],[style*="color: #b91c1c"],[style*="color:#dc2626"],[style*="color: #dc2626"],[style*="color:#c92a2a"],[style*="color: #c92a2a"] { color: #F4A4AB !important; }
[style*="color:#1e40af"],[style*="color: #1e40af"],[style*="color:#3730a3"],[style*="color: #3730a3"],[style*="color:#1d4ed8"],[style*="color: #1d4ed8"] { color: #B3A8FA !important; }

/* generic borders that hardcoded light slate */
[style*="border:1px solid #e2e8f0"], [style*="border: 1px solid #e2e8f0"],
[style*="border:1px solid #e0e0e0"], [style*="border: 1px solid #e0e0e0"],
[style*="border:1px solid #ddd"], [style*="border: 1px solid #ddd"],
[style*="border:1px solid #cbd5e1"], [style*="border: 1px solid #cbd5e1"] {
  border-color: var(--t-line) !important;
}

/* ============================================================================
   15c. EXTENDED PASTEL SWEEP — case-insensitive
   Many inline backgrounds in the source are UPPERCASE (e.g. the timesheet
   section bands #BDD7EE / #C5E0B4 / #F2CECC / #D9C6EC) and/or weren't in the
   base list, so the case-SENSITIVE lowercase selectors above missed them and
   they stayed light → light text on light band. The [… i] flag matches any
   case; this block adds the Office/Excel accent fills + per-panel status tints
   app-wide. Surfaces only — saturated brand fills stay colored.
   ========================================================================== */
/* neutral light surfaces -> deep panel */
[style*="background:#f8f9fa" i],[style*="background: #f8f9fa" i],[style*="background:#f0f0f0" i],[style*="background: #f0f0f0" i],[style*="background:#fafafa" i],[style*="background: #fafafa" i],[style*="background:#f9fafb" i],[style*="background: #f9fafb" i],[style*="background:#f3f4f6" i],[style*="background: #f3f4f6" i],[style*="background:#f0f4f8" i],[style*="background: #f0f4f8" i],[style*="background:#e2e3e5" i],[style*="background: #e2e3e5" i],[style*="background:#e5e8e8" i],[style*="background: #e5e8e8" i],[style*="background:#e5e7eb" i],[style*="background: #e5e7eb" i],[style*="background:#e2e8f0" i],[style*="background: #e2e8f0" i] { background-color: var(--t-bg-deep) !important; }
/* green */
[style*="background:#e8f5e9" i],[style*="background: #e8f5e9" i],[style*="background:#d4edda" i],[style*="background: #d4edda" i],[style*="background:#f1f8e9" i],[style*="background: #f1f8e9" i],[style*="background:#c5e0b4" i],[style*="background: #c5e0b4" i] { background-color: rgba(63,207,142,0.12) !important; }
/* amber */
[style*="background:#fff3cd" i],[style*="background: #fff3cd" i],[style*="background:#fefce8" i],[style*="background: #fefce8" i],[style*="background:#fde68a" i],[style*="background: #fde68a" i],[style*="background:#fff8e1" i],[style*="background: #fff8e1" i],[style*="background:#fcf3cf" i],[style*="background: #fcf3cf" i],[style*="background:#fffbf0" i],[style*="background: #fffbf0" i],[style*="background:#fff3e0" i],[style*="background: #fff3e0" i],[style*="background:#fed7aa" i],[style*="background: #fed7aa" i],[style*="background:#ffedd5" i],[style*="background: #ffedd5" i],[style*="background:#fdebd0" i],[style*="background: #fdebd0" i] { background-color: rgba(240,169,59,0.12) !important; }
/* red */
[style*="background:#f8d7da" i],[style*="background: #f8d7da" i],[style*="background:#ffebee" i],[style*="background: #ffebee" i],[style*="background:#f2cecc" i],[style*="background: #f2cecc" i] { background-color: rgba(240,97,107,0.12) !important; }
/* blue + purple -> violet accent */
[style*="background:#cce5ff" i],[style*="background: #cce5ff" i],[style*="background:#e3f2fd" i],[style*="background: #e3f2fd" i],[style*="background:#d6eaf8" i],[style*="background: #d6eaf8" i],[style*="background:#bdd7ee" i],[style*="background: #bdd7ee" i],[style*="background:#eef2ff" i],[style*="background: #eef2ff" i],[style*="background:#faf5ff" i],[style*="background: #faf5ff" i],[style*="background:#e8daef" i],[style*="background: #e8daef" i],[style*="background:#f5f3ff" i],[style*="background: #f5f3ff" i],[style*="background:#d9c6ec" i],[style*="background: #d9c6ec" i] { background-color: rgba(123,108,246,0.12) !important; }

/* dark inks (any case) hardcoding slate on light -> readable light text */
[style*="color:#1e293b" i],[style*="color: #1e293b" i],[style*="color:#334155" i],[style*="color: #334155" i],[style*="color:#1f2937" i],[style*="color: #1f2937" i],[style*="color:#0f172a" i],[style*="color: #0f172a" i] { color: var(--t-text) !important; }
[style*="color:#475569" i],[style*="color: #475569" i],[style*="color:#64748b" i],[style*="color: #64748b" i] { color: var(--t-muted) !important; }

/* Buttons that hardcode a light NEUTRAL background but no text color end up
   dark-text-on-dark after the bg is darkened (e.g. timesheet Expand/Collapse).
   Give them readable ink. Colored buttons (green/amber/violet inline bg) keep
   their own text color — they aren't matched here. */
button[style*="background:#f9f9f9" i],button[style*="background: #f9f9f9" i],
button[style*="background:#f8f9fa" i],button[style*="background: #f8f9fa" i],
button[style*="background:#f0f0f0" i],button[style*="background: #f0f0f0" i],
button[style*="background:#fafafa" i],button[style*="background: #fafafa" i],
button[style*="background:#f1f5f9" i],button[style*="background: #f1f5f9" i],
button[style*="background:#fff" i],button[style*="background: #fff" i],
button[style*="background:white" i],button[style*="background: white" i] {
  color: var(--t-text) !important;
  border-color: var(--t-line) !important;
}

/* ============================================================================
   SELF-HOSTED GEIST (uncomment once the webfonts live in /fonts and
   `font-src 'self'` is satisfied):

   @font-face { font-family:"Geist"; src:url("/fonts/Geist-Variable.woff2") format("woff2"); font-weight:400 700; font-display:swap; }
   @font-face { font-family:"Geist Mono"; src:url("/fonts/GeistMono-Variable.woff2") format("woff2"); font-weight:400 600; font-display:swap; }
   ========================================================================== */

/* === GENERATED COMPREHENSIVE SWEEP (hue-aware, case-insensitive) ===
   Auto-derived from every inline color in src/js. Light low-sat surfaces ->
   dark tints; dark inks -> light by hue; light neutral borders -> line.
   Saturated fills (progress bars, bright badges) are intentionally left. */
[style*="background:#fef3c7" i],[style*="background: #fef3c7" i],[style*="background:#fffbeb" i],[style*="background: #fffbeb" i],[style*="background:#fefce8" i],[style*="background: #fefce8" i],[style*="background:#fef9e7" i],[style*="background: #fef9e7" i],[style*="background:#fff3cd" i],[style*="background: #fff3cd" i],[style*="background:#fff8e1" i],[style*="background: #fff8e1" i],[style*="background:#fcf3cf" i],[style*="background: #fcf3cf" i] { background-color: rgba(240,169,59,0.13) !important; }
[style*="background:#eff6ff" i],[style*="background: #eff6ff" i],[style*="background:#f0f9ff" i],[style*="background: #f0f9ff" i],[style*="background:#f0f4ff" i],[style*="background: #f0f4ff" i],[style*="background:#dbeafe" i],[style*="background: #dbeafe" i],[style*="background:#e8eaf6" i],[style*="background: #e8eaf6" i],[style*="background:#f0f4f8" i],[style*="background: #f0f4f8" i],[style*="background:#f1f5f9" i],[style*="background: #f1f5f9" i],[style*="background:#d1e7f5" i],[style*="background: #d1e7f5" i],[style*="background:#c7d2fe" i],[style*="background: #c7d2fe" i],[style*="background:#eef2ff" i],[style*="background: #eef2ff" i],[style*="background:#bfdbfe" i],[style*="background: #bfdbfe" i],[style*="background:#e2e8f0" i],[style*="background: #e2e8f0" i],[style*="background:#e8f4fd" i],[style*="background: #e8f4fd" i],[style*="background:#eef" i],[style*="background: #eef" i],[style*="background:#f5f3ff" i],[style*="background: #f5f3ff" i],[style*="background:#f0edff" i],[style*="background: #f0edff" i],[style*="background:#cce5ff" i],[style*="background: #cce5ff" i],[style*="background:#d6eaf8" i],[style*="background: #d6eaf8" i],[style*="background:#e3f2fd" i],[style*="background: #e3f2fd" i],[style*="background:#ede9fe" i],[style*="background: #ede9fe" i],[style*="background:#eef2f7" i],[style*="background: #eef2f7" i] { background-color: rgba(123,108,246,0.12) !important; }
[style*="background:#ecfdf5" i],[style*="background: #ecfdf5" i],[style*="background:#f0fdf4" i],[style*="background: #f0fdf4" i],[style*="background:#d4edda" i],[style*="background: #d4edda" i],[style*="background:#e8f5e9" i],[style*="background: #e8f5e9" i],[style*="background:#d1fae5" i],[style*="background: #d1fae5" i],[style*="background:#f1f8e9" i],[style*="background: #f1f8e9" i],[style*="background:#eafaf1" i],[style*="background: #eafaf1" i],[style*="background:#d5f5e3" i],[style*="background: #d5f5e3" i],[style*="background:#d4efdf" i],[style*="background: #d4efdf" i],[style*="background:#a9dfbf" i],[style*="background: #a9dfbf" i],[style*="background:#ebfbee" i],[style*="background: #ebfbee" i] { background-color: rgba(63,207,142,0.12) !important; }
[style*="background:#f8fafc" i],[style*="background: #f8fafc" i],[style*="background:#fafafa" i],[style*="background: #fafafa" i],[style*="background:#fff" i],[style*="background: #fff" i],[style*="background:#f3f4f6" i],[style*="background: #f3f4f6" i],[style*="background:#f9fafb" i],[style*="background: #f9fafb" i],[style*="background:#f0f0f0" i],[style*="background: #f0f0f0" i],[style*="background:#f8f9fa" i],[style*="background: #f8f9fa" i],[style*="background:#e0e0e0" i],[style*="background: #e0e0e0" i],[style*="background:#f9f9f9" i],[style*="background: #f9f9f9" i],[style*="background:#f5f5f5" i],[style*="background: #f5f5f5" i],[style*="background:#e5e7eb" i],[style*="background: #e5e7eb" i],[style*="background:#fafafe" i],[style*="background: #fafafe" i],[style*="background:#e2e3e5" i],[style*="background: #e2e3e5" i],[style*="background:#e5e8e8" i],[style*="background: #e5e8e8" i],[style*="background:#d5d8dc" i],[style*="background: #d5d8dc" i],[style*="background:#f0f2f5" i],[style*="background: #f0f2f5" i] { background-color: var(--t-bg-deep) !important; }
[style*="background:#fffbf0" i],[style*="background: #fffbf0" i],[style*="background:#fed7aa" i],[style*="background: #fed7aa" i],[style*="background:#fff3e0" i],[style*="background: #fff3e0" i],[style*="background:#ffedd5" i],[style*="background: #ffedd5" i],[style*="background:#fdebd0" i],[style*="background: #fdebd0" i] { background-color: rgba(240,169,59,0.13) !important; }
[style*="background:#ede7f6" i],[style*="background: #ede7f6" i],[style*="background:#e9d5ff" i],[style*="background: #e9d5ff" i],[style*="background:#faf5ff" i],[style*="background: #faf5ff" i],[style*="background:#e8daef" i],[style*="background: #e8daef" i],[style*="background:#e8e0f0" i],[style*="background: #e8e0f0" i],[style*="background:#f8f5ff" i],[style*="background: #f8f5ff" i],[style*="background:#f5eef8" i],[style*="background: #f5eef8" i],[style*="background:#f3e5f5" i],[style*="background: #f3e5f5" i] { background-color: rgba(123,108,246,0.12) !important; }
[style*="background:#fef2f2" i],[style*="background: #fef2f2" i],[style*="background:#ffebee" i],[style*="background: #ffebee" i],[style*="background:#fee2e2" i],[style*="background: #fee2e2" i],[style*="background:#fff5f5" i],[style*="background: #fff5f5" i],[style*="background:#f8d7da" i],[style*="background: #f8d7da" i],[style*="background:#fadbd8" i],[style*="background: #fadbd8" i] { background-color: rgba(240,97,107,0.13) !important; }
[style*="background:#e0f2f1" i],[style*="background: #e0f2f1" i],[style*="background:#d1ecf1" i],[style*="background: #d1ecf1" i] { background-color: rgba(46,139,127,0.16) !important; }
[style*="color:#7d6608" i],[style*="color: #7d6608" i] { color: #F0C078 !important; }
[style*="color:#2563eb" i],[style*="color: #2563eb" i],[style*="color:#1e3a8a" i],[style*="color: #1e3a8a" i],[style*="color:#1a2332" i],[style*="color: #1a2332" i],[style*="color:#1e293b" i],[style*="color: #1e293b" i],[style*="color:#64748b" i],[style*="color: #64748b" i],[style*="color:#1d4ed8" i],[style*="color: #1d4ed8" i],[style*="color:#334155" i],[style*="color: #334155" i],[style*="color:#0284c7" i],[style*="color: #0284c7" i],[style*="color:#374151" i],[style*="color: #374151" i],[style*="color:#1e40af" i],[style*="color: #1e40af" i],[style*="color:#6b7280" i],[style*="color: #6b7280" i],[style*="color:#004085" i],[style*="color: #004085" i],[style*="color:#383d41" i],[style*="color: #383d41" i],[style*="color:#1565c0" i],[style*="color: #1565c0" i],[style*="color:#6366f1" i],[style*="color: #6366f1" i],[style*="color:#37474f" i],[style*="color: #37474f" i],[style*="color:#1a5276" i],[style*="color: #1a5276" i],[style*="color:#475569" i],[style*="color: #475569" i],[style*="color:#0c4a6e" i],[style*="color: #0c4a6e" i],[style*="color:#3730a3" i],[style*="color: #3730a3" i],[style*="color:#1e1b4b" i],[style*="color: #1e1b4b" i],[style*="color:#4f46e5" i],[style*="color: #4f46e5" i],[style*="color:#566573" i],[style*="color: #566573" i],[style*="color:#1b4f72" i],[style*="color: #1b4f72" i],[style*="color:#2c3e50" i],[style*="color: #2c3e50" i],[style*="color:#4338ca" i],[style*="color: #4338ca" i] { color: #9FB4FF !important; }
[style*="color:#166534" i],[style*="color: #166534" i],[style*="color:#155724" i],[style*="color: #155724" i],[style*="color:#2e7d32" i],[style*="color: #2e7d32" i],[style*="color:#1e8449" i],[style*="color: #1e8449" i],[style*="color:#1d8348" i],[style*="color: #1d8348" i],[style*="color:#196f3d" i],[style*="color: #196f3d" i],[style*="color:#15803d" i],[style*="color: #15803d" i] { color: #6FE0AE !important; }
[style*="color:#666" i],[style*="color: #666" i],[style*="color:#555" i],[style*="color: #555" i] { color: var(--t-muted) !important; }
[style*="color:#333" i],[style*="color: #333" i],[style*="color:#444" i],[style*="color: #444" i] { color: var(--t-text) !important; }
[style*="color:#856404" i],[style*="color: #856404" i],[style*="color:#78350f" i],[style*="color: #78350f" i],[style*="color:#92400e" i],[style*="color: #92400e" i],[style*="color:#b45309" i],[style*="color: #b45309" i],[style*="color:#e65100" i],[style*="color: #e65100" i],[style*="color:#935116" i],[style*="color: #935116" i],[style*="color:#ea580c" i],[style*="color: #ea580c" i] { color: #F0C078 !important; }
[style*="color:#7c3aed" i],[style*="color: #7c3aed" i],[style*="color:#880e4f" i],[style*="color: #880e4f" i],[style*="color:#6a1b9a" i],[style*="color: #6a1b9a" i],[style*="color:#7e57c2" i],[style*="color: #7e57c2" i],[style*="color:#5e35b1" i],[style*="color: #5e35b1" i],[style*="color:#9333ea" i],[style*="color: #9333ea" i],[style*="color:#6b21a8" i],[style*="color: #6b21a8" i],[style*="color:#7d3c98" i],[style*="color: #7d3c98" i],[style*="color:#6c3483" i],[style*="color: #6c3483" i],[style*="color:#7b2d8e" i],[style*="color: #7b2d8e" i] { color: #C9BCFF !important; }
[style*="color:#dc3545" i],[style*="color: #dc3545" i],[style*="color:#dc2626" i],[style*="color: #dc2626" i],[style*="color:#991b1b" i],[style*="color: #991b1b" i],[style*="color:#721c24" i],[style*="color: #721c24" i],[style*="color:#c62828" i],[style*="color: #c62828" i],[style*="color:#b91c1c" i],[style*="color: #b91c1c" i],[style*="color:#e74c3c" i],[style*="color: #e74c3c" i],[style*="color:#c0392b" i],[style*="color: #c0392b" i],[style*="color:#9a3412" i],[style*="color: #9a3412" i],[style*="color:#78281f" i],[style*="color: #78281f" i],[style*="color:#922b21" i],[style*="color: #922b21" i] { color: #F4A4AB !important; }
[style*="color:#065f46" i],[style*="color: #065f46" i],[style*="color:#047857" i],[style*="color: #047857" i],[style*="color:#0f766e" i],[style*="color: #0f766e" i],[style*="color:#0c5460" i],[style*="color: #0c5460" i] { color: #7FD0C4 !important; }
[style*="#eee" i],[style*="#e2e8f0" i],[style*="#f1f5f9" i],[style*="#d1d5db" i],[style*="#fecaca" i],[style*="#ccc" i],[style*="#e5e7eb" i],[style*="#f3f4f6" i],[style*="#c7d2fe" i],[style*="#ddd" i],[style*="#e0e0e0" i],[style*="#c5d5e5" i],[style*="#e5c5c5" i],[style*="#cbd5e1" i],[style*="#d1e7f5" i],[style*="#e0f2fe" i],[style*="#e0e7ff" i],[style*="#fef3c7" i],[style*="#e9d5ff" i],[style*="#f3e8ff" i],[style*="#bfdbfe" i],[style*="#f0f0f0" i],[style*="#f5f5f5" i],[style*="#fcc" i],[style*="#ccd" i],[style*="#c3e6cb" i],[style*="#eef2f7" i],[style*="#bbf7d0" i],[style*="#e8ebf0" i],[style*="#fef2f2" i] { border-color: var(--t-line) !important; }

/* === NAVY-BAR FIX ===
   `--navy` is remapped to light ink (#E8EAEF) for the many places that use it as
   TEXT. But ~9 command/header bars use `background:var(--navy)` with hardcoded
   white text (management/reconciliation/projects/contracts/reimbursements). With
   the remap those bars turn light and their white buttons vanish. Force any inline
   `background:var(--navy)` back to a dark navy-tinted surface so white text reads.
   Inline `!important` author rule beats inline non-!important background. */
[style*="background:var(--navy"] { background: #1c1f2e !important; }
