/* ============================================================
   BetterWeb DARK THEME - "the teal night room".
   Claude-grade dark for the client portal (web + app frames).

   CONTRACT:
   - EVERY rule in this file is scoped under html.theme-dark
     (+ body.bw-theme for portal pages). With the class absent the
     file is inert: light mode is byte-identical.
   - The palette is the brand's own night: the boot screen's deep
     teal room (#0c2b28 -> #0b6b60), not a grey slab. No pure black.
   - Glass stays glass: translucent teal-dark surfaces + blur;
     shadows become quiet teal glows; hairlines are white at 8%.
   - The boot screen (.bw-boot) is ALREADY dark and identical in
     both themes: nothing here may touch it.
   - Geogrid / Leaflet maps stay LIGHT in both themes (Guy's call).
   Loaded AFTER betterweb-ui.css; wins by scope specificity.
   ============================================================ */

/* ─────────────────────────────────────────────────────────────
   1. TOKENS - one redefinition flips every var()-driven surface
   ───────────────────────────────────────────────────────────── */
html.theme-dark body.bw-theme {
  color-scheme: dark;

  /* Grounds */
  --bg-deep: #0b1513;
  --bg-surface: #121e1b;
  --bg-card: #14211e;
  --bg-card-hover: #1a2925;
  --bg-input: rgba(255, 255, 255, .05);
  --bg-input-focus: rgba(255, 255, 255, .07);

  /* Brand family (teal brightened for dark contrast) */
  --lime: rgba(45, 230, 198, .16);
  --lime-dark: #14b8a6;
  --lime-medium: #2de6c6;
  --lime-light: rgba(45, 230, 198, .28);
  --lime-pale: rgba(45, 230, 198, .09);
  --lime-bg: rgba(45, 230, 198, .16);

  --text-accent: #2de6c6;
  --accent: #14b8a6;
  --accent-strong: #2de6c6;
  --accent-soft: rgba(45, 230, 198, .14);
  --accent-rgb: 45, 230, 198;
  --g: #14b8a6;
  --g-600: #14b8a6; --g-alt: #2dd4bf; --g-soft: rgba(45,230,198,.25);
  --g-mui: #14b8a6; --g-deep: #2de6c6;

  /* Text */
  --text: #f2f7f5;
  --text-primary: #f2f7f5;
  --text-secondary: #e0e9e6;
  --text-muted: #a3b5af;
  --ink: #f2f7f5;
  --ink-2: #cfdcd7;
  --muted: #a3b5af;
  --muted-2: #8b9d97;

  /* Surfaces (canonical alias layer) */
  --bg: #0b1513;
  --surface: #14211e;
  --surface-alt: #101c19;
  --card: #14211e;
  --card-muted: #101c19;

  /* Lines */
  --border-subtle: rgba(255, 255, 255, .06);
  --border-default: rgba(255, 255, 255, .12);
  --border-focus: rgba(45, 230, 198, .45);
  --border: rgba(255, 255, 255, .11);
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .05);

  /* Elevation: shadows become depth + a breath of teal */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -18px rgba(0, 0, 0, .7);

  /* pl-glass / ag2 internal token systems */
  --p: #14b8a6; --p-dark: #2dd4bf; --p-deeper: #2de6c6;
  --p-50: rgba(45, 230, 198, .08); --p-100: rgba(45, 230, 198, .14);
  --p-200: rgba(45, 230, 198, .22); --p-300: rgba(45, 230, 198, .34);
  --g-dark: #2dd4bf; --g-bright: #2de6c6;
  --g-50: rgba(45, 230, 198, .08); --g-100: rgba(45, 230, 198, .14);
  --g-200: rgba(45, 230, 198, .22);

  /* Status - lifted for AA on the dark ground */
  --success: #34d399; --ok: #34d399;
  --warning: #fbbf24;
  --danger: #f87171; --err: #f87171;
  --info: #7aa7ff;
  --green-600: #34d399; --green-700: #6ee7b7;

  /* bw-* canonical sheet */
  --bw-ink: #f2f7f5;
  --bw-ink-2: #b6c6c0;
  --bw-ink-3: #a3b5af;
  --bw-teal: #14b8a6;
  --bw-teal-deep: #2dd4bf;
  --bw-teal-bright: #2de6c6;
  --bw-navy: #0d1a17;
  --bw-navy-2: #0f1e1a;
  --bw-bg: #0b1513;
  --bw-surface: #14211e;
  --bw-surface-2: #101c19;
  --bw-line: rgba(255, 255, 255, .09);
  --bw-line-2: rgba(255, 255, 255, .05);
  --bw-shadow-sm: 0 1px 2px rgba(0, 0, 0, .4);
  --bw-shadow-md: 0 10px 30px -8px rgba(0, 0, 0, .55);
  --bw-shadow-lg: 0 24px 60px -16px rgba(0, 0, 0, .7);
  --bw-glow-teal: 0 8px 26px -6px rgba(45, 230, 198, .28);

  /* Dark-only semantic vars for JS-inline conversions: these names exist
     ONLY here, so their light fallbacks are the exact original values. */
  --bwd-ink: #f2f7f5;
  --bwd-muted-ink: #a3b5af;
  --bwd-line: rgba(255, 255, 255, .1);
  --bwd-card: rgba(22, 36, 33, .66);
  --bwd-card-muted: rgba(255, 255, 255, .06);
  --bwd-sheet: rgba(18, 32, 29, .98);
  --bwd-seg-on: #1d312c;
  --bwd-ok-bg: rgba(16, 185, 129, .14);
  --bwd-ok-line: rgba(16, 185, 129, .32);
  --bwd-ok-ink: #6ee7b7;
  --bwd-ok-ink2: #34d399;
  --bwd-warn-bg: rgba(245, 158, 11, .13);
  --bwd-warn-line: rgba(245, 158, 11, .32);
  --bwd-warn-ink: #fcd34d;
  --bwd-warn-ink2: #d9c8a5;
  --bwd-err-bg: rgba(239, 68, 68, .14);
  --bwd-err-ink: #fca5a5;
  --bwd-err-line: rgba(239, 68, 68, .38);
  --bwd-info-bg: rgba(59, 130, 246, .16);
  --bwd-info-line: rgba(59, 130, 246, .34);
  --bwd-info-ink: #93c5fd;
  --bwd-card2: #16241f;
  --bwd-sticky: rgba(16, 29, 26, .92);
  --bwd-glass: rgba(255, 255, 255, .06);
  --bwd-tint: rgba(45, 230, 198, .1);
  --bwd-ink2: #cfdcd7;
  --bwd-ok-grad: linear-gradient(180deg, rgba(16, 185, 129, .14), rgba(22, 36, 33, .5));
  --bwd-warn-grad: linear-gradient(180deg, rgba(245, 158, 11, .13), rgba(22, 36, 33, .5));
  --bwd-alert-grad: linear-gradient(135deg, rgba(234, 67, 53, .18), rgba(22, 36, 33, .7));
  --bwd-teal-ink: #2de6c6;
  --bwd-plan-basic: #3c4f49;
  --bwd-plan-full: #2563eb;
  --bwd-star-off: #3f524c;
  --bwd-lime-grad: linear-gradient(135deg, rgba(172, 219, 39, .12) 0%, rgba(22, 36, 33, .6) 80%);
  /* Stage pills are painted inline by stage-pill.js, so each colour is a
     dark-only var with the exact light value as its fallback. */
  --bwd-st-new-bg: rgba(132, 204, 22, .18);  --bwd-st-new-ink: #bef264;  --bwd-st-new-line: rgba(132, 204, 22, .42);
  --bwd-st-qual-bg: rgba(124, 58, 237, .22); --bwd-st-qual-ink: #c4b5fd; --bwd-st-qual-line: rgba(124, 58, 237, .45);
  --bwd-st-book-bg: rgba(16, 185, 129, .18); --bwd-st-book-ink: #6ee7b7; --bwd-st-book-line: rgba(16, 185, 129, .42);
  --bwd-st-won-bg: rgba(6, 182, 212, .2);    --bwd-st-won-ink: #67e8f9;  --bwd-st-won-line: rgba(6, 182, 212, .45);
  --bwd-st-ret-bg: rgba(245, 158, 11, .18);  --bwd-st-ret-ink: #fcd34d;  --bwd-st-ret-line: rgba(245, 158, 11, .42);
  --bwd-st-lost-bg: rgba(239, 68, 68, .18);  --bwd-st-lost-ink: #fca5a5; --bwd-st-lost-line: rgba(239, 68, 68, .42);
  --bwd-st-spam-bg: rgba(255, 255, 255, .09); --bwd-st-spam-ink: #a3b5af; --bwd-st-spam-line: rgba(255, 255, 255, .18);
  --bwd-plate: #16241f;
}

/* Theme switch feel: a soft cross-fade, added by the toggle JS for
   ~300ms ONLY (never on page load). */
html.theme-anim body, html.theme-anim body *,
html.theme-anim body *::before, html.theme-anim body *::after {
  transition: background-color .2s ease, color .2s ease,
              border-color .2s ease, box-shadow .2s ease !important;
}

/* ─────────────────────────────────────────────────────────────
   2. CHROME - body, canvas, sidebar, scrollbars, focus
   ───────────────────────────────────────────────────────────── */
html.theme-dark body.bw-theme { background: #0b1513; color: #f2f7f5; }

/* Dotted canvas: same signature, night ink */
html.theme-dark body.bw-theme .app-main,
html.theme-dark body.bw-theme .page-content {
  background-color: #0b1513;
  background-image: radial-gradient(rgba(45, 230, 198, .055) 1px, transparent 1px);
}
/* Ambient blobs read stronger against night - keep them a whisper */
html.theme-dark body.bw-theme .app-main::before { opacity: .07; }
html.theme-dark body.bw-theme .app-main::after { opacity: .06; }

/* Sidebar: from navy to the teal night room, blending with the ground */
html.theme-dark body.bw-theme .app-sidebar,
html.theme-dark body.bw-theme .app-sidebar.admin-sidebar {
  background: linear-gradient(180deg, #0e1b18 0%, #0c1714 55%, #0a1311 100%);
  box-shadow: 4px 0 28px rgba(0, 0, 0, .5), inset -1px 0 0 rgba(45, 230, 198, .1);
}

/* Scrollbars */
html.theme-dark body.bw-theme .app-main ::-webkit-scrollbar-thumb { background: rgba(255,255,255,.14); }
html.theme-dark body.bw-theme .app-main ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.22); }

/* Headings + links */
html.theme-dark body.bw-theme .app-main h2 { color: #f2f7f5; }
html.theme-dark body.bw-theme .page-header h2 { color: #f2f7f5; }
html.theme-dark body.bw-theme .page-header p { color: #a3b5af; }
/* Prose links only.
   This used to claim EVERY <a>, at a specificity (0,2,3) that most component
   rules could not beat - so any link-shaped component turned teal, and a dark
   rule written to fix one lost silently. Fifty classes were in that state,
   six of them with a rule someone had already written and never saw take
   effect; the account switcher showed every client's name in green because of
   it. A link with a class is a component and styles itself. */
html.theme-dark body.bw-theme a:not([class]) { color: #2de6c6; }
html.theme-dark body.bw-theme a:hover { color: #7eebd6; }
html.theme-dark body.bw-theme a.pl-btn-primary:hover, html.theme-dark body.bw-theme a.btn-primary:hover,
html.theme-dark body.bw-theme a.ig-btn:not(.ghost):hover, html.theme-dark body.bw-theme a.login-btn:hover,
html.theme-dark body.bw-theme a.pl-btn:hover, html.theme-dark body.bw-theme a.cwc-btn.p:hover { color: #fff; }

/* Empty states */
html.theme-dark body.bw-theme .bwd-empty,
html.theme-dark body.bw-theme .empty-state,
html.theme-dark body.bw-theme .bwvis-empty { color: #a3b5af; }

/* ─────────────────────────────────────────────────────────────
   3. THE GLASS LAW AT NIGHT - one elevated surface recipe
   ───────────────────────────────────────────────────────────── */
html.theme-dark body.bw-theme .card,
html.theme-dark body.bw-theme .pl-section,
html.theme-dark body.bw-theme .stat-card,
html.theme-dark body.bw-theme .panel,
html.theme-dark body.bw-theme .bwvis-panel {
  background: rgba(22, 36, 33, .66) !important;
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, .08) !important;
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, .6),
              0 6px 24px -14px rgba(45, 230, 198, .12),
              inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
html.theme-dark body.bw-theme .agent-card,
html.theme-dark body.bw-theme .bwh-kpi,
html.theme-dark body.bw-theme .gx-card,
html.theme-dark body.bw-theme .ig-card,
html.theme-dark body.bw-theme .pl-card,
html.theme-dark body.bw-theme .pl-hero,
html.theme-dark body.bw-theme .pl-report,
html.theme-dark body.bw-theme .db-chart-card,
html.theme-dark body.bw-theme .db-kpi {
  background: rgba(22, 36, 33, .6) !important;
  border-color: rgba(45, 230, 198, .16) !important;
  box-shadow: 0 12px 34px -18px rgba(0, 0, 0, .55),
              0 6px 24px -14px rgba(45, 230, 198, .12),
              inset 0 1px 0 rgba(255, 255, 255, .06) !important;
}
html.theme-dark body.bw-theme .card:hover {
  border-color: rgba(45, 230, 198, .3);
  box-shadow: 0 16px 44px -18px rgba(0, 0, 0, .65),
              0 8px 28px -12px rgba(45, 230, 198, .18) !important;
}
html.theme-dark body.bw-theme .card .card,
html.theme-dark body.bw-theme .pl-section .card { background: rgba(255, 255, 255, .04) !important; }
html.theme-dark body.bw-theme .card-header { border-bottom: 1px solid rgba(45, 230, 198, .12) !important; }
html.theme-dark body.bw-theme .card-header h3 { color: #7eebd6 !important; }
html.theme-dark body.bw-theme .pl-modal-panel {
  background: rgba(16, 29, 26, .9) !important;
}

/* Charts and their wrappers */
html.theme-dark body.bw-theme .chart-container,
html.theme-dark body.bw-theme [class*="chart-wrap"] {
  background: rgba(22, 36, 33, .66); border-color: rgba(255, 255, 255, .08);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .4);
}

/* Tables inside cards */
html.theme-dark body.bw-theme .card table th {
  background: rgba(45, 230, 198, .06) !important;
  color: #a3b5af !important;
}
html.theme-dark body.bw-theme .card table td { border-color: rgba(255, 255, 255, .06) !important; }
html.theme-dark body.bw-theme th { color: #a3b5af; }
html.theme-dark body.bw-theme .bwvis-panel td { border-color: rgba(255, 255, 255, .06); }
html.theme-dark body.bw-theme .bwvis-panel tr:hover td { background: rgba(255, 255, 255, .03); }
html.theme-dark body.bw-theme .bwvis-panel-h { color: #f2f7f5; border-color: rgba(255, 255, 255, .07); }

/* ─────────────────────────────────────────────────────────────
   4. CONTROLS - inputs, selects, buttons, chips
   ───────────────────────────────────────────────────────────── */
html.theme-dark body.bw-theme input,
html.theme-dark body.bw-theme textarea {
  background-color: rgba(255, 255, 255, .05);
  border-color: rgba(255, 255, 255, .12);
  color: #f2f7f5;
}
html.theme-dark body.bw-theme input::placeholder,
html.theme-dark body.bw-theme textarea::placeholder { color: #8b9d97; }
html.theme-dark body.bw-theme input:focus,
html.theme-dark body.bw-theme textarea:focus {
  border-color: rgba(45, 230, 198, .5);
  background-color: rgba(255, 255, 255, .07);
}
/* A background-image with no `background-repeat` TILES. This rule painted a
   teal chevron across the entire width of every select in the portal -- the
   "2 mi radius" control on Local Presence read as a wall of chevrons with the
   label buried under it. It also left the native arrow on, so dark was drawing
   two arrows over each other. no-repeat, a position, a size, appearance:none
   and room on the right for the arrow to sit in. */
html.theme-dark body.bw-theme select, html.theme-dark select.pl-select {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  background-color: rgba(255, 255, 255, .06);
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%232de6c6' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 11px center;
  background-size: 11px 11px;
  padding-right: 30px;
  border-color: rgba(255, 255, 255, .14);
  color: #f2f7f5;
}
/* Multi-selects and sized lists have no arrow slot -- do not reserve one. */
html.theme-dark body.bw-theme select[multiple],
html.theme-dark body.bw-theme select[size]:not([size="1"]) {
  background-image: none; padding-right: 10px;
}
html.theme-dark body.bw-theme select:hover { background-color: rgba(255, 255, 255, .09); border-color: rgba(45, 230, 198, .45); }
html.theme-dark body.bw-theme select:focus { border-color: #2de6c6; box-shadow: 0 0 0 3px rgba(45, 230, 198, .18); }
html.theme-dark body.bw-theme option { background: #14211e; color: #f2f7f5; }

/* Ghost buttons: frosted night glass */
html.theme-dark body.bw-theme .ig-btn.ghost,
html.theme-dark body.bw-theme .pl-btn-ghost,
html.theme-dark body.bw-theme .btn-secondary,
html.theme-dark body.bw-theme .agent-btn {
  background: rgba(255, 255, 255, .06) !important;
  border: 1px solid rgba(45, 230, 198, .3) !important;
  color: #7eebd6 !important;
  box-shadow: 0 3px 12px -8px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .07) !important;
}
html.theme-dark body.bw-theme .ig-btn.ghost:hover,
html.theme-dark body.bw-theme .pl-btn-ghost:hover,
html.theme-dark body.bw-theme .btn-secondary:hover {
  border-color: rgba(45, 230, 198, .55) !important;
  background: rgba(45, 230, 198, .1) !important;
}
/* Primary buttons keep the teal gradient - it was born for the dark. */

/* Quiet hover washes */
html.theme-dark body.bw-theme .gp-date:hover:not(.active) { background: rgba(45, 230, 198, .1); color: #7eebd6; }

/* Ask bar */
html.theme-dark body.bw-theme .bwask {
  background: rgba(22, 36, 33, .78); border-color: rgba(255, 255, 255, .1);
  box-shadow: 0 16px 48px -18px rgba(0, 0, 0, .65);
}
html.theme-dark body.bw-theme .bwask::after { color: #8b9d97; border-color: rgba(255, 255, 255, .12); }
html.theme-dark body.bw-theme .bwask button { background: #0d9488 !important; }
html.theme-dark body.bw-theme .bwask button:hover { background: #10a795 !important; }
html.theme-dark body.bw-theme .bwask-answer { background: rgba(22, 36, 33, .9); border-color: rgba(255, 255, 255, .1); }

/* Modals, drawers, slide panels */
html.theme-dark body.bw-theme .modal,
html.theme-dark body.bw-theme .slide-panel,
html.theme-dark body.bw-theme [class*="drawer"] {
  background: #12201d;
  border-color: rgba(255, 255, 255, .1);
}
html.theme-dark body.bw-theme .modal-close {
  background: rgba(255, 255, 255, .06); border-color: rgba(255, 255, 255, .12); color: #b6c6c0;
}
html.theme-dark body.bw-theme .modal-close:hover { background: rgba(255, 255, 255, .1); }

/* ─────────────────────────────────────────────────────────────
   5. HERO ORB + GAUGES
   ───────────────────────────────────────────────────────────── */
html.theme-dark body.bw-theme .bw-orb-hero {
  background: rgba(22, 36, 33, .66); border-color: rgba(255, 255, 255, .09);
  box-shadow: 0 14px 40px -18px rgba(0, 0, 0, .6);
}
html.theme-dark body.bw-theme .bw-orb-name { color: #f2f7f5; }
html.theme-dark body.bw-theme .bw-orb-role { color: #a3b5af; }
html.theme-dark body.bw-theme .bw-orb-status { color: #2de6c6; background: rgba(45, 230, 198, .12); }
html.theme-dark body.bw-theme .bw-orb-status i { background: #2de6c6; }
html.theme-dark body.bw-theme .bwvis-card .l { color: #a3b5af; }
html.theme-dark body.bw-theme .bwvis-card .n { color: #f2f7f5; }
html.theme-dark body.bw-theme .bwvis-gauge {
  background: conic-gradient(from -90deg, var(--accent), #2DE6C6 calc(var(--score) * 0.6%), var(--accent) calc(var(--gp) * 1%), rgba(255,255,255,.09) 0);
  filter: drop-shadow(0 8px 20px rgba(45, 230, 198, .18));
}
html.theme-dark body.bw-theme .bwvis-gauge::before { background: #101c19; box-shadow: inset 0 1px 3px rgba(0, 0, 0, .5); }
html.theme-dark body.bw-theme .bwvis-gauge b { color: #2de6c6; }
html.theme-dark body.bw-theme .bwvis-gauge span { color: #a3b5af; }
html.theme-dark body.bw-theme .bwvis-soon { background: rgba(22, 36, 33, .4); border-color: rgba(255, 255, 255, .12); }
html.theme-dark body.bw-theme .bwvis-panel a { color: #2de6c6 !important; }

/* ─────────────────────────────────────────────────────────────
   6. TAB BAR (older app builds) + shared small chrome
   ───────────────────────────────────────────────────────────── */
html.theme-dark body.bw-theme .bw-tabbar {
  background: rgba(13, 24, 21, .88);
  border-top: 1px solid rgba(255, 255, 255, .07);
}
html.theme-dark body.bw-theme .bw-tabbar a { color: #7c8b86; }
html.theme-dark body.bw-theme .bw-tabbar a.on { color: #2de6c6; }
html.theme-dark body.bw-theme .bw-nav-progress { background: rgba(45, 230, 198, .12); }

/* ag2 tab language (also used beyond the agent studio) */
html.theme-dark body.bw-theme .ag2-tab {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .1); color: #b6c6c0;
}
html.theme-dark body.bw-theme .ag2-tab:hover { color: #f2f7f5; border-color: rgba(255, 255, 255, .2); }
html.theme-dark body.bw-theme .ag2-tab.is-active {
  background: rgba(45, 230, 198, .16) !important;
  color: #2de6c6 !important;
  border-color: rgba(45, 230, 198, .38) !important;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .3);
}
html.theme-dark body.bw-theme .ag2-card { background: rgba(22, 36, 33, .6); border-color: rgba(255, 255, 255, .08); }
html.theme-dark body.bw-theme .ag2-cw-toggle { background: rgba(255, 255, 255, .06) !important; border-color: rgba(255, 255, 255, .12) !important; }

/* Login (web) - the night room, one glass card */
html.theme-dark .login-page {
  background:
    radial-gradient(80% 90% at 85% -10%, rgba(13, 148, 136, .28) 0%, transparent 55%),
    radial-gradient(70% 80% at 0% 110%, rgba(109, 40, 217, .16) 0%, transparent 50%),
    #0b1513 !important;
}
html.theme-dark .login-card {
  background: rgba(22, 36, 33, .78);
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, .09);
  box-shadow: 0 30px 80px -24px rgba(0, 0, 0, .75);
  color: #f2f7f5;
}
html.theme-dark .login-card h1, html.theme-dark .login-card h2,
html.theme-dark .login-card label { color: #f2f7f5; }
html.theme-dark .login-card .form-input {
  background: rgba(255, 255, 255, .05); border-color: rgba(255, 255, 255, .13); color: #f2f7f5;
}
html.theme-dark .login-card .form-input::placeholder { color: #8b9d97; }
html.theme-dark .login-page { --text-muted: #a3b5af; }
/* The login page paints its own ground, but body underneath stayed white -
   an overscroll bounce or a short viewport flashed it. Body only: the
   .login-page gradient above must keep its !important layer stack. */
html.theme-dark body:has(.login-page) { background-color: #0b1513; }
html.theme-dark .login-card .bw-logo-light { display: none !important; }
html.theme-dark .login-card .bw-logo-dark { display: inline-block !important; }
html.theme-dark .login-card .brand p { color: #a3b5af !important; }
html.theme-dark .login-card .brand p:first-of-type { color: #2de6c6 !important; }
html.theme-dark .login-card a[href="/forgot"] { color: #2de6c6 !important; }
html.theme-dark .login-card .login-alt span { background: rgba(255, 255, 255, .12) !important; }
html.theme-dark .login-card .login-error {
  background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .3); color: #fca5a5;
}
/* The in-app login is already the dark room in both themes: login.html only
   applies theme-dark on the web (the boot script skips bw-native). */

/* ═════════════════════════════════════════════════════════════
   PAGE: INBOX (.ibx-*)
   ═════════════════════════════════════════════════════════════ */
/* Sticky scrims + page-bg gradients follow the night canvas */
html.theme-dark .ibx-bar { background: linear-gradient(180deg, rgba(11,21,19,.97) 72%, rgba(11,21,19,0)); }
html.theme-dark .ibx-bar.has-tok, html.theme-dark .ibx-bar.has-q { background: linear-gradient(180deg, rgba(11,21,19,.97) 86%, rgba(11,21,19,0)); }
html.theme-dark .ibx-thead { background: linear-gradient(180deg, rgba(11,21,19,.96) 72%, rgba(11,21,19,0)); }
html.theme-dark .ibx-composer, html.theme-dark .ibx-nosms { background: linear-gradient(0deg, rgba(11,21,19,.97) 74%, rgba(11,21,19,0)); }
html.theme-dark .ibx-selbar { background: linear-gradient(to bottom, #0b1513 82%, rgba(11,21,19,0)); }

/* Focus banner */
html.theme-dark .ibx-focus { border-color: rgba(45,230,198,.24); background: rgba(45,230,198,.08); }
html.theme-dark .ibx-focus b, html.theme-dark .ibx-focus button { color: #2de6c6; }
html.theme-dark .ibx-focus span { color: #a3b5af; }
html.theme-dark .ibx-focus button { background: rgba(45,230,198,.13); }

/* Segmented control + filter */
html.theme-dark .ibx-seg, html.theme-dark .ibx-pad-tabs { background: rgba(255,255,255,.08); }
html.theme-dark .ibx-seg-pill, html.theme-dark .ibx-pad-tabs .tpill { background: #1d312c; box-shadow: 0 3px 8px rgba(0,0,0,.4); }
html.theme-dark .ibx-seg button, html.theme-dark .ibx-pad-tabs button { color: #a3b5af; }
html.theme-dark .ibx-seg button.on, html.theme-dark .ibx-pad-tabs button.on { color: #2de6c6; }
html.theme-dark .ibx-seg button::before { background: rgba(255,255,255,.14); }
html.theme-dark .ibx-seg .sdot { background: #2de6c6; }
html.theme-dark .ibx-filter { border-color: rgba(255,255,255,.1); background: rgba(22,36,33,.85); color: #b6c6c0; }
html.theme-dark .ibx-fcount { border-color: #0b1513; }

/* Tokens / source chips */
html.theme-dark .ibx-tokens button { border-color: rgba(45,230,198,.3); background: rgba(45,230,198,.11); color: #7eebd6; }
html.theme-dark .ibx-tokens button .tx { background: rgba(45,230,198,.18); color: #7eebd6; }
html.theme-dark .ibx-tokens button.ghost { border-color: rgba(255,255,255,.12); color: #a3b5af; }
html.theme-dark .ibx-srcchip { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.06); color: #b6c6c0; }
html.theme-dark .ibx-srcchip.th.tap .cv { border-right-color: #7eebd6; border-bottom-color: #7eebd6; }

/* Autopilot chip states */
html.theme-dark .ibx-apchip.on { color: #7eebd6; background: rgba(45,230,198,.12); border-color: rgba(45,230,198,.26); }
html.theme-dark .ibx-apchip.off { color: #a3b5af; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); }
html.theme-dark .ibx-apchip.paused { color: #fbbf24; background: rgba(245,158,11,.13); border-color: rgba(245,158,11,.28); }
html.theme-dark .ibx-apchip.copilot { color: #c4b5fd; background: rgba(139,92,246,.15); border-color: rgba(139,92,246,.3); }

/* Copilot draft */
html.theme-dark .ibx-draft { border-color: rgba(139,92,246,.45); background: rgba(139,92,246,.09); }
html.theme-dark .ibx-draft-h { color: #c4b5fd; }
html.theme-dark .ibx-draft-body { color: #e8efec; }
html.theme-dark .ibx-draft-actions button { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.07); color: #cfdcd7; }
html.theme-dark .ibx-shimln { background: linear-gradient(90deg, rgba(139,92,246,.14) 25%, rgba(139,92,246,.3) 44%, rgba(139,92,246,.14) 63%); }

/* Autopilot mode sheet */
html.theme-dark .ibx-apopt { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
html.theme-dark .ibx-apopt.sel { border-color: rgba(45,230,198,.5); box-shadow: 0 0 0 1px rgba(45,230,198,.4) inset; }
html.theme-dark .ibx-apopt.m-auto .ico { color: #7eebd6; background: rgba(45,230,198,.14); }
html.theme-dark .ibx-apopt.m-copilot .ico { color: #c4b5fd; background: rgba(139,92,246,.16); }
html.theme-dark .ibx-apopt.m-off .ico { color: #a3b5af; background: rgba(255,255,255,.08); }
html.theme-dark .ibx-apopt .txt b { color: #f2f7f5; }
html.theme-dark .ibx-apopt .txt s { color: #a3b5af; }
html.theme-dark .ibx-apopt .chk { color: #2de6c6; }
html.theme-dark .ibx-appause { color: #fbbf24; background: rgba(245,158,11,.11); border-color: rgba(245,158,11,.24); }
html.theme-dark .ibx-appause button { background: rgba(245,158,11,.18); color: #fcd34d; }

/* Conversation rows */
html.theme-dark .ibx-row { border-color: rgba(255,255,255,.07); background: rgba(22,36,33,.6); box-shadow: 0 4px 16px -12px rgba(0,0,0,.6); }
html.theme-dark .ibx-row.picked { background: rgba(45,230,198,.1); }
html.theme-dark .ibx-row-snippet { color: #a3b5af; }
html.theme-dark .ibx-row.unread .ibx-row-snippet { color: #e0e9e6; }
html.theme-dark .ibx-none button { border-color: rgba(45,230,198,.34); background: rgba(255,255,255,.06); color: #7eebd6; }

/* Status chips - same hue families, night depth */
html.theme-dark .ibx-st.s-new { color: #bef264; background: rgba(132,204,22,.16); }
html.theme-dark .ibx-st.s-contacted, html.theme-dark .ibx-st.s-no_answer { color: #7dd3fc; background: rgba(56,189,248,.15); }
html.theme-dark .ibx-st.s-qualified { color: #c4b5fd; background: rgba(139,92,246,.17); }
html.theme-dark .ibx-st.s-booked { color: #6ee7b7; background: rgba(16,185,129,.16); }
html.theme-dark .ibx-st.s-won { color: #67e8f9; background: rgba(6,182,212,.16); }
html.theme-dark .ibx-st.s-returning { color: #fcd34d; background: rgba(245,158,11,.16); }
html.theme-dark .ibx-st.s-other { color: #cbd5e1; background: rgba(148,163,184,.14); }
html.theme-dark .ibx-st.s-lost { color: #fca5a5; background: rgba(239,68,68,.15); }
html.theme-dark .ibx-st.s-spam { color: #a1a1aa; background: rgba(113,113,122,.2); }

/* Skeleton / empty */
html.theme-dark .ibx-skel { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); }
html.theme-dark .ibx-skel i, html.theme-dark .ibx-skel b, html.theme-dark .ibx-skel u { background: linear-gradient(100deg, #1a2925 40%, #223530 50%, #1a2925 60%); }

/* Thread header */
html.theme-dark .ibx-back { color: #2de6c6; }
html.theme-dark .ibx-tbtn-round.call { background: rgba(45,230,198,.13); color: #2de6c6; }
html.theme-dark .ibx-tbtn-round.more { background: rgba(255,255,255,.08); color: #b6c6c0; }

/* Messages */
html.theme-dark .ibx-day { color: #a3b5af; background: rgba(255,255,255,.07); }
html.theme-dark .ibx-msg.in .ibx-bubble { background: rgba(30,46,42,.92); border-color: rgba(255,255,255,.08); color: #e2eae7; box-shadow: 0 3px 12px -9px rgba(0,0,0,.5); }
html.theme-dark .ibx-meta { color: #8b9d97; }
html.theme-dark .ibx-meta .ch, html.theme-dark .ibx-meta .dlv.ok { color: #4cc9b4; }
html.theme-dark .ibx-meta .fr { color: #8b9d97; }
html.theme-dark .ibx-event { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); box-shadow: none; }
html.theme-dark .ibx-event svg { color: #4cc9b4; }
html.theme-dark .ibx-event span { color: #b6c6c0; }
html.theme-dark .ibx-event time { color: #8b9d97; }
html.theme-dark .ibx-hint { color: #8b9d97; }

/* Rich event cards */
html.theme-dark .ibx-card { background: rgba(24,39,35,.92); border-color: rgba(255,255,255,.08); box-shadow: 0 5px 20px -14px rgba(0,0,0,.6); }
html.theme-dark .ibx-card-h svg { color: #4cc9b4; }
html.theme-dark .ibx-card-h strong { color: #f2f7f5; }
html.theme-dark .ibx-card-h time { color: #8b9d97; }
html.theme-dark .ibx-fact { background: rgba(45,230,198,.1); color: #7eebd6; }
html.theme-dark .ibx-fact.grey { background: rgba(255,255,255,.07); color: #b6c6c0; }
html.theme-dark .ibx-fact.hot { background: rgba(245,158,11,.15); color: #fcd34d; }
html.theme-dark .ibx-card-body { color: #cfdcd7; }
html.theme-dark .ibx-field { border-top-color: rgba(255,255,255,.06); }
html.theme-dark .ibx-field dt { color: #a3b5af; }
html.theme-dark .ibx-field dd { color: #e8efec; }
html.theme-dark .ibx-linkbtn { border-color: rgba(45,230,198,.3); background: rgba(255,255,255,.06); color: #7eebd6; }

/* Attribution sheet (brand icon plate STAYS white for the brand marks) */
html.theme-dark .ibx-attr-lead span { color: #a3b5af; }
html.theme-dark .ibx-attr-row { border-top-color: rgba(255,255,255,.06); }
html.theme-dark .ibx-attr-row dt { color: #a3b5af; }
html.theme-dark .ibx-attr-row dd { color: #e8efec; }
html.theme-dark .ibx-attr-row dd a { color: #2de6c6; border-bottom-color: rgba(45,230,198,.35); }
html.theme-dark .ibx-attr-chip { background: rgba(255,255,255,.07); color: #b6c6c0; }
html.theme-dark .ibx-transcript { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.07); color: #c6d4cf; }

/* Overflow menu */
html.theme-dark .ibx-menu { background: rgba(22,37,33,.98); border-color: rgba(255,255,255,.1); box-shadow: 0 22px 50px -18px rgba(0,0,0,.7); }
html.theme-dark .ibx-menu button { color: #f2f7f5; }
html.theme-dark .ibx-menu button:active { background: rgba(45,230,198,.1); }
html.theme-dark .ibx-menu button.danger { color: #f87171; }

/* Sheets / scrims */
html.theme-dark .ibx-sheet-scrim, html.theme-dark .ibx-pad-scrim { background: rgba(0,0,0,.55); }
html.theme-dark .ibx-fscrim { background: rgba(0,0,0,.55); }
html.theme-dark .ibx-sheet { background: rgba(18,32,29,.99); box-shadow: 0 -18px 60px -20px rgba(0,0,0,.8); }
html.theme-dark .ibx-grab { background: rgba(255,255,255,.18); }
html.theme-dark .ibx-sheet-h button { color: #2de6c6; }
html.theme-dark .ibx-sheet-h button:disabled { color: #5f736c; }
html.theme-dark .ibx-sheet-body h5 { color: #a3b5af; }
html.theme-dark .ibx-sheet-body h5:not(:first-child) { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .ibx-chips button { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: #cfdcd7; }
html.theme-dark .ibx-chips button s { color: #8b9d97; }
html.theme-dark .ibx-chips button.on { background: rgba(45,230,198,.13); border-color: rgba(45,230,198,.45); color: #7eebd6; }
html.theme-dark .ibx-chips button.on s { color: #4cc9b4; }
html.theme-dark .ibx-act2 { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.07); color: #cfdcd7; }
html.theme-dark .ibx-sheet-note { color: #a3b5af; }
html.theme-dark .ibx-update-note { color: #fcd34d; background: rgba(245,183,49,.12); border-color: rgba(245,183,49,.26); }
html.theme-dark .ibx-diag { color: #8b9d97; }

/* Select mode */
html.theme-dark .ibx-selcancel { color: #2de6c6; }
html.theme-dark .ibx-selc { border-color: #5f736c; }
html.theme-dark .ibx-selopen { border-color: rgba(255,255,255,.09); background: rgba(255,255,255,.05); }
html.theme-dark .ibx-selopen s { color: #a3b5af; }
html.theme-dark .ibx-selopen svg { color: #5f736c; }
html.theme-dark .ibx-sel-row { border-bottom-color: rgba(255,255,255,.07); }
html.theme-dark .ibx-sel-row s { color: #a3b5af; }

/* Status / number picker rows */
html.theme-dark .ibx-strow { background: rgba(255,255,255,.05); }
html.theme-dark .ibx-strow.cur { border-color: rgba(45,230,198,.4); background: rgba(45,230,198,.1); }
html.theme-dark .ibx-strow s { color: #a3b5af; }
html.theme-dark .ibx-strow svg { color: #2de6c6; }
html.theme-dark .ibx-strow b { background: rgba(45,230,198,.14); color: #7eebd6; }

/* Confirm modal */
html.theme-dark .ibx-confirm { background: #14231f; box-shadow: 0 30px 70px -20px rgba(0,0,0,.8); }
html.theme-dark .ibx-confirm b { color: #f2f7f5; }
html.theme-dark .ibx-confirm p { color: #a3b5af; }
html.theme-dark .ibx-confirm .no { background: rgba(255,255,255,.08); color: #cfdcd7; }

/* Composer + suggestions */
html.theme-dark .ibx-composer textarea { color: #f2f7f5; border-color: rgba(255,255,255,.1); background: rgba(24,39,35,.96); box-shadow: 0 4px 16px -12px rgba(0,0,0,.6); }
html.theme-dark .ibx-sugg button { color: #7eebd6; border-color: rgba(45,230,198,.28); background: rgba(24,39,35,.92); box-shadow: 0 3px 10px -8px rgba(0,0,0,.5); }
html.theme-dark .ibx-sugg button:active { background: rgba(45,230,198,.1); }
html.theme-dark .ibx-sugg .ghost { border-color: rgba(45,230,198,.16); background: linear-gradient(90deg, rgba(45,230,198,.07) 25%, rgba(45,230,198,.18) 44%, rgba(45,230,198,.07) 63%); }
html.theme-dark .ibx-sugg-cap { color: #8b9d97; }
html.theme-dark .ibx-nosms { color: #a3b5af; }
html.theme-dark .ibx-why { border-color: rgba(245,158,11,.26); background: rgba(245,158,11,.1); color: #fcd34d; }
html.theme-dark .ibx-nosms.act > .ibx-nspill { color: #fcd34d; border-color: rgba(245,158,11,.28); background: rgba(245,158,11,.12); }
html.theme-dark .ibx-nosms.act svg { color: #fbbf24; }
html.theme-dark .ibx-from { color: #a3b5af; }
html.theme-dark .ibx-from b { color: #cfdcd7; }
html.theme-dark .ibx-from.pick b, html.theme-dark .ibx-from svg { color: #7eebd6; }
html.theme-dark .ibx-regwarn { color: #fcd34d; background: rgba(217,146,32,.12); border-color: rgba(217,146,32,.26); }

/* Toast: lift off the dark ground */
html.theme-dark .ibx-toast { background: rgba(34,52,47,.98); border: 1px solid rgba(255,255,255,.12); }

/* FAB bloom labels */
html.theme-dark .ibx-fact u { color: #f2f7f5; background: rgba(29,46,42,.98); box-shadow: 0 8px 22px -10px rgba(0,0,0,.7); }
html.theme-dark .ibx-fact i { color: #7eebd6; background: rgba(29,46,42,.98); border-color: rgba(45,230,198,.24); box-shadow: 0 10px 24px -10px rgba(0,0,0,.7); }

/* Compose sheet / people / mode */
html.theme-dark .ibx-callee s { color: #a3b5af; }
html.theme-dark .ibx-search { color: #f2f7f5; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); }
html.theme-dark .ibx-person:active { background: rgba(45,230,198,.09); }
html.theme-dark .ibx-person s { color: #a3b5af; }
html.theme-dark .ibx-mode button { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: #cfdcd7; }
html.theme-dark .ibx-mode button.on { background: rgba(45,230,198,.13); border-color: rgba(45,230,198,.45); color: #7eebd6; }

/* Keypad - the night dialer */
html.theme-dark .ibx-pad { background:
  radial-gradient(120% 60% at 50% -8%, rgba(16,167,149,.16), rgba(16,167,149,0) 62%),
  linear-gradient(180deg, #10201c 0%, #0d1a17 58%, #0b1513 100%); }
html.theme-dark .ibx-pad-x { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.07); color: #b6c6c0; }
html.theme-dark .ibx-pad-x:active { background: rgba(45,230,198,.12); }
html.theme-dark .ibx-pad-disp input { caret-color: #2de6c6; }
html.theme-dark .ibx-pad-disp input::placeholder { color: #5f736c; }
html.theme-dark .ibx-pad-bs { color: #a3b5af; }
html.theme-dark .ibx-pad-bs:active { color: #2de6c6; }
html.theme-dark .ibx-pad-hint, html.theme-dark .ibx-pad-note { color: #a3b5af; }
html.theme-dark .ibx-key { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.07);
  box-shadow: 0 6px 18px -13px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.09); }
html.theme-dark .ibx-key s { color: #a3b5af; }
html.theme-dark .ibx-pad-lines { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.06); }
html.theme-dark .ibx-pad-line { background: rgba(22,36,33,.85); }
html.theme-dark .ibx-pad-line em { color: #a3b5af; }
html.theme-dark .ibx-pad-line b { color: #cfdcd7; }
html.theme-dark .ibx-pad-line svg { color: #4cc9b4; }
html.theme-dark .ibx-pad-line.pick:active { background: rgba(45,230,198,.1); }

/* Recents / blocked */
html.theme-dark .ibx-rc-row { border-color: rgba(255,255,255,.07); background: rgba(22,36,33,.6); }
html.theme-dark .ibx-rc-dir { background: rgba(45,230,198,.12); color: #4cc9b4; }
html.theme-dark .ibx-rc-dir.out { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .ibx-rc-dir.missed { background: rgba(229,72,77,.14); color: #fca5a5; }
html.theme-dark .ibx-rc-row.missed .ibx-rc-name { color: #fca5a5; }
html.theme-dark .ibx-rc-sub { color: #a3b5af; }
html.theme-dark .ibx-rc-note, html.theme-dark .ibx-rc-time { color: #8b9d97; }
html.theme-dark .ibx-rc-play { background: rgba(45,230,198,.13); color: #4cc9b4; }
html.theme-dark .ibx-rc-more { border-color: rgba(45,230,198,.3); background: rgba(255,255,255,.06); color: #7eebd6; }
html.theme-dark .ibx-rc-none { color: #a3b5af; }
html.theme-dark .ibx-blk-row { border-bottom-color: rgba(255,255,255,.07); }
html.theme-dark .ibx-blk-row s { color: #a3b5af; }
html.theme-dark .ibx-blk-un { border-color: rgba(45,230,198,.36); color: #7eebd6; }

/* Pull-to-refresh */
html.theme-dark .ibx-ptr { background: rgba(29,46,42,.96); border-color: rgba(255,255,255,.1); box-shadow: 0 8px 20px -10px rgba(0,0,0,.7); color: #2de6c6; }

/* Template / AI / mic buttons + template manager */
html.theme-dark .ibx-tplbtn, html.theme-dark .ibx-aibtn, html.theme-dark .ibx-micbtn {
  border-color: rgba(255,255,255,.1); background: rgba(24,39,35,.96); box-shadow: 0 4px 16px -12px rgba(0,0,0,.6); }
html.theme-dark .ibx-tplbtn, html.theme-dark .ibx-micbtn { color: #b6c6c0; }
html.theme-dark .ibx-tplbtn:active, html.theme-dark .ibx-micbtn:active { color: #7eebd6; }
html.theme-dark .ibx-tpl { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
html.theme-dark .ibx-tpl s { color: #a3b5af; }
html.theme-dark .ibx-tpl.ghost { border-color: rgba(45,230,198,.32); background: rgba(45,230,198,.06); }
html.theme-dark .ibx-tpl .tact { border-color: rgba(45,230,198,.34); background: rgba(255,255,255,.06); color: #7eebd6; }
html.theme-dark .ibx-tpl .tact.danger { border-color: rgba(248,113,113,.32); color: #fca5a5; }
html.theme-dark .ibx-tpl-form input, html.theme-dark .ibx-tpl-form textarea { color: #f2f7f5; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); }
html.theme-dark .ibx-tpl-count { color: #8b9d97; }
html.theme-dark .ibx-tpl-count.over { color: #fca5a5; }

/* Search bar */
html.theme-dark .ibx-qbar > svg { color: #a3b5af; }
html.theme-dark .ibx-qbar input { color: #f2f7f5; border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); }
html.theme-dark .ibx-qbar button { color: #2de6c6; }

/* ═════════════════════════════════════════════════════════════
   PAGE: TODAY (.tdy-*)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .tdy-date { color: #a3b5af; }
html.theme-dark .tdy-cap, html.theme-dark .tdy-sh { color: #8b9d97; }
html.theme-dark .tdy-stat { border-color: rgba(255,255,255,.07); background: rgba(22,36,33,.66); box-shadow: 0 6px 18px -14px rgba(0,0,0,.6); }
html.theme-dark .tdy-stat span { color: #a3b5af; }
html.theme-dark .tdy-stat.warn b { color: #fca5a5; }
html.theme-dark button.tdy-stat:active { background: rgba(45,230,198,.09); }
html.theme-dark button.tdy-stat i { border-right-color: #5f736c; border-bottom-color: #5f736c; }
html.theme-dark .tdy-sec h3 u, html.theme-dark .tdy-sec .tdy-h3 u { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .tdy-sec h3 svg, html.theme-dark .tdy-sec .tdy-h3 svg { color: #2de6c6; }
html.theme-dark button.tdy-h3 .chev { color: #5f736c; }
html.theme-dark .tdy-more { color: #2de6c6; }
html.theme-dark .tdy-more:active { background: rgba(45,230,198,.1); }
html.theme-dark .tdy-st { background: rgba(255,255,255,.07); color: #b6c6c0; }
html.theme-dark .tdy-st.s-booked { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.theme-dark .tdy-st.s-qualified { background: rgba(139,92,246,.17); color: #c4b5fd; }
html.theme-dark .tdy-row { border-color: rgba(255,255,255,.07); background: rgba(22,36,33,.66); box-shadow: 0 6px 18px -14px rgba(0,0,0,.6); }
html.theme-dark .tdy-row:active { background: rgba(45,230,198,.08); }
html.theme-dark .tdy-row.flat:active, html.theme-dark .tdy-agent:disabled:active { background: rgba(22,36,33,.66); }
html.theme-dark .tdy-row s { color: #a3b5af; }
html.theme-dark .tdy-why { background: rgba(255,255,255,.07); color: #b6c6c0; }
html.theme-dark .tdy-why.late { background: rgba(217,119,6,.16); color: #fcd34d; }
html.theme-dark .tdy-row .chev, html.theme-dark .tdy-page .chev { color: #5f736c; }
html.theme-dark .tdy-time b { color: #4cc9b4; }
html.theme-dark .tdy-time span, html.theme-dark .tdy-aago { color: #8b9d97; }
html.theme-dark .tdy-row.past .tdy-time b { color: #a3b5af; }
html.theme-dark .tdy-connect { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.04); }
html.theme-dark .tdy-connect:active { background: rgba(255,255,255,.06); }
html.theme-dark .tdy-connect u { color: #b6c6c0; }
html.theme-dark .tdy-connect s { color: #8b9d97; }
html.theme-dark .tdy-cico { background: rgba(255,255,255,.07); color: #a3b5af; }
html.theme-dark .tdy-scrim { background: rgba(0,0,0,.55); }
html.theme-dark .tdy-sheet { background: #101d1a; border-top-color: rgba(255,255,255,.09); box-shadow: 0 -20px 48px -22px rgba(0,0,0,.8); }
html.theme-dark .tdy-grab i { background: rgba(255,255,255,.18); }
html.theme-dark .tdy-sabout { color: #a3b5af; }
html.theme-dark .tdy-sline { border-color: rgba(45,230,198,.2); background: rgba(45,230,198,.08); color: #9be8db; }
html.theme-dark .tdy-sline b { color: #4cc9b4; }
html.theme-dark .tdy-item { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.07); }
html.theme-dark .tdy-item s { color: #a3b5af; }
html.theme-dark .tdy-item span { color: #8b9d97; }
html.theme-dark .tdy-act { border-color: rgba(45,230,198,.24); background: rgba(45,230,198,.09); color: #7eebd6; }
html.theme-dark .tdy-act:active { background: rgba(45,230,198,.15); }
html.theme-dark .tdy-desknote, html.theme-dark .tdy-squiet { color: #8b9d97; }
html.theme-dark .tdy-page { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
html.theme-dark .tdy-page:active { background: rgba(255,255,255,.07); }
html.theme-dark .tdy-page s { color: #a3b5af; }
html.theme-dark .tdy-empty { border-color: rgba(45,230,198,.26); background: rgba(45,230,198,.05); }
html.theme-dark .tdy-empty b { color: #7eebd6; }
html.theme-dark .tdy-empty span, html.theme-dark .tdy-quiet span { color: #a3b5af; }

/* ═════════════════════════════════════════════════════════════
   PAGE: TEAM (.tmw-*)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .tmw-hero p { color: #a3b5af; }
html.theme-dark .tmw-card { border-color: rgba(255,255,255,.07); background: rgba(22,36,33,.66); box-shadow: 0 6px 18px -14px rgba(0,0,0,.6); }
html.theme-dark .tmw-card:active { background: rgba(45,230,198,.08); }
html.theme-dark .tmw-crole { color: #a3b5af; }
html.theme-dark .tmw-cago, html.theme-dark .tmw-tago { color: #8b9d97; }
html.theme-dark .tmw-card .chev, html.theme-dark .tmw-page .chev { color: #5f736c; }
html.theme-dark .tmw-cline { border-top-color: rgba(255,255,255,.06); color: #b6c6c0; }
html.theme-dark .tmw-card.quiet .tmw-cline { color: #a3b5af; }
html.theme-dark .tmw-card.quiet .tmw-cline i { background: #5f736c; }
html.theme-dark .tmw-mh, html.theme-dark .tmw-sh { color: #8b9d97; }
html.theme-dark .tmw-mrow { border-color: rgba(255,255,255,.06); background: rgba(255,255,255,.04); }
html.theme-dark .tmw-mrow:active { background: rgba(45,230,198,.07); }
html.theme-dark .tmw-mname { color: #cfdcd7; }
html.theme-dark .tmw-mline { color: #8b9d97; }
html.theme-dark .tmw-meet { color: #7eebd6; background: rgba(45,230,198,.11); border-color: rgba(45,230,198,.24); }
html.theme-dark .tmw-back { color: #2de6c6; }
html.theme-dark .tmw-prole { color: #7eebd6; background: rgba(45,230,198,.11); }
html.theme-dark .tmw-pdesc { color: #b6c6c0; }
html.theme-dark .tmw-pline { border-color: rgba(45,230,198,.2); background: rgba(45,230,198,.08); color: #9be8db; }
html.theme-dark .tmw-pline b { color: #4cc9b4; }
html.theme-dark .tmw-act { border-color: rgba(45,230,198,.24); background: rgba(45,230,198,.09); color: #7eebd6; }
html.theme-dark .tmw-act:active { background: rgba(45,230,198,.15); }
html.theme-dark .tmw-tl::before { background: rgba(255,255,255,.1); }
html.theme-dark .tmw-ti::before { box-shadow: 0 0 0 1px rgba(255,255,255,.08); }
html.theme-dark .tmw-tsub { color: #a3b5af; }
html.theme-dark .tmw-page { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
html.theme-dark .tmw-page:active { background: rgba(255,255,255,.07); }
html.theme-dark .tmw-ps, html.theme-dark .tmw-squiet { color: #a3b5af; }
html.theme-dark .tmw-desknote { color: #8b9d97; }
html.theme-dark .tmw-empty { border-color: rgba(45,230,198,.28); background: rgba(45,230,198,.05); }
html.theme-dark .tmw-empty b { color: #7eebd6; }
html.theme-dark .tmw-empty span { color: #a3b5af; }

/* ═════════════════════════════════════════════════════════════
   PAGE: MEMORY (.mem-*) - the GRAPH is already the night; only
   the header, toggle, list, document and notes panels flip.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .mem-feeds { color: #8b9d97; }
html.theme-dark .mem-feed { color: #7eebd6; background: rgba(45,230,198,.12); }
html.theme-dark .mem-feed-soon { color: #8b9d97; }
html.theme-dark .mem-count, html.theme-dark .mem-list-empty { color: #a3b5af; }
html.theme-dark .mem-view { background: rgba(255,255,255,.08); }
html.theme-dark .mem-view button { color: #a3b5af; }
html.theme-dark .mem-view button.on { background: #1d312c; color: #2de6c6; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
html.theme-dark .mem-list { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.08);
  box-shadow: 0 24px 70px -28px rgba(0,0,0,.7); }
html.theme-dark .mem-list-head { border-bottom-color: rgba(255,255,255,.07); }
html.theme-dark .mem-list-head select { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #cfdcd7; }
html.theme-dark .mem-list-add { color: #04302b; }
html.theme-dark .mem-row { border-bottom-color: rgba(255,255,255,.06); }
html.theme-dark .mem-row .rtxt { color: #e8efec; }
html.theme-dark .mem-row .rfeeds { color: #a3b5af; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.09); }
html.theme-dark .mem-row .rdel { color: #8b9d97; }
html.theme-dark .mem-row .rdate { color: #8b9d97; }
html.theme-dark .mem-row:hover { background: rgba(255,255,255,.04); }
html.theme-dark .mem-row.sel { background: rgba(45,230,198,.09); }
html.theme-dark .mem-doc { border-left-color: rgba(255,255,255,.07); }
@media (max-width: 760px) { html.theme-dark .mem-doc { border-top-color: rgba(255,255,255,.07); } }
html.theme-dark .mem-doc-x { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #a3b5af; }
html.theme-dark .mem-doc-x:hover { background: rgba(239,68,68,.2); color: #fca5a5; }
html.theme-dark .mem-doc-title { color: #f2f7f5; }
html.theme-dark .mem-doc-title:focus { background: rgba(255,255,255,.04); }
html.theme-dark .mem-doc-title:empty::before { color: #8b9d97; }
html.theme-dark .mem-doc-body { color: #e8efec; }
html.theme-dark .mem-doc-meta span { color: #b6c6c0; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.09); }
html.theme-dark .mem-doc-forget { border-color: rgba(248,113,113,.32); background: rgba(255,255,255,.04); color: #fca5a5; }
html.theme-dark .mem-doc-forget:hover { background: #ef4444; color: #fff; }
html.theme-dark .mem-doc .mem-notes-ed:empty::before { color: #8b9d97; }
html.theme-dark .mem-notes { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.08);
  box-shadow: 0 24px 70px -28px rgba(0,0,0,.7); }
html.theme-dark .mem-notes-title { color: #f2f7f5; }
html.theme-dark .mem-notes-sub, html.theme-dark .mem-notes-stat { color: #a3b5af; }
html.theme-dark .mem-notes-bar { border-top-color: rgba(255,255,255,.07); border-bottom-color: rgba(255,255,255,.07); }
html.theme-dark .mem-notes-bar button { color: #b6c6c0; }
html.theme-dark .mem-notes-bar button:hover { background: rgba(45,230,198,.1); color: #2de6c6; }
html.theme-dark .mem-notes-bar i { background: rgba(255,255,255,.09); }
html.theme-dark .mem-notes-ed { color: #e8efec; caret-color: #2de6c6; }
html.theme-dark .mem-notes-ed:empty::before { color: #8b9d97; }
html.theme-dark .mem-notes-ed h1, html.theme-dark .mem-notes-ed h2,
html.theme-dark .mem-notes-ed b, html.theme-dark .mem-notes-ed strong { color: #f2f7f5; }
html.theme-dark .mem-notes-ed h3 { color: #e0e9e6; }
html.theme-dark .mem-notes-ed blockquote { color: #b6c6c0; }
html.theme-dark .mem-notes-ed a { color: #2de6c6; }
html.theme-dark .mem-notes-ed a.mem-att { background: rgba(45,230,198,.08); border-color: rgba(45,230,198,.22); color: #7eebd6; }
html.theme-dark .mem-notes-ed a.mem-att:hover { background: rgba(45,230,198,.14); border-color: rgba(45,230,198,.34); }
html.theme-dark .mem-notes-ed img { box-shadow: 0 8px 24px rgba(0,0,0,.5); }
html.theme-dark .mem-notes-ed hr { border-top-color: rgba(255,255,255,.09); }
html.theme-dark .mem-doc-pop { background: linear-gradient(#16241f, #16241f) padding-box,
  linear-gradient(135deg, rgba(45,230,198,.4), rgba(45,230,198,.24), rgba(93,131,216,.3)) border-box;
  box-shadow: 0 20px 50px -14px rgba(0,0,0,.7), 0 6px 22px -8px rgba(45,230,198,.14); }
html.theme-dark .mem-doc-pop-t { color: #f2f7f5; }
html.theme-dark .mem-doc-pop input { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .mem-doc-pop-row button { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #cfdcd7; }
html.theme-dark .mem-doc-pop-row button:hover { border-color: rgba(255,255,255,.24); }
html.theme-dark .mem-doc-pop-row button.ok { color: #fff; }

/* ═════════════════════════════════════════════════════════════
   PAGE: CHAT (.cw-*) - stylesheet classes only. The chat page's
   JS-inline card styles are converted in the chat phase.
   The voice room (.cwx-*) and .cw-say are already dark: untouched.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .cw-topbar-title:not(:empty) { background: rgba(255,255,255,.07); }
html.theme-dark .cw-tb-btn { background: rgba(255,255,255,.07);
  box-shadow: 0 4px 14px -6px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07); }
html.theme-dark .cw-tb-btn:hover { box-shadow: 0 8px 20px -8px rgba(45,230,198,.25), inset 0 1px 0 rgba(255,255,255,.09); }
html.theme-dark .cw-hist { box-shadow: 0 24px 60px -16px rgba(0,0,0,.7), 0 8px 28px -10px rgba(45,230,198,.12); }
html.theme-dark .cw-conv:hover { background: rgba(255,255,255,.05); }
html.theme-dark .cw-conv.on { background: rgba(45,230,198,.12); border-color: rgba(45,230,198,.3); }
html.theme-dark .cw-conv b { color: #f2f7f5; }
html.theme-dark .cw-conv.on b { color: #7eebd6; }
/* Ambient blobs: night versions of the same hues */
html.theme-dark .cw-bg .b1 { background: radial-gradient(closest-side, rgba(94,234,212,.2), rgba(94,234,212,.08) 38%, transparent 72%); }
html.theme-dark .cw-bg .b2 { background: radial-gradient(closest-side, rgba(196,181,253,.14), rgba(196,181,253,.06) 38%, transparent 72%); }
html.theme-dark .cw-bg .b3 { background: radial-gradient(closest-side, rgba(147,197,253,.12), rgba(147,197,253,.05) 38%, transparent 72%); }
html.theme-dark .cw-bg .b4 { background: radial-gradient(closest-side, rgba(153,246,228,.14), rgba(153,246,228,.06) 38%, transparent 72%); }
html.theme-dark .cw-quiet button { background: rgba(255,255,255,.06);
  box-shadow: 0 4px 14px -8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.07); }
/* Assistant bubble: the night glass card */
html.theme-dark .cw-msg.a .cw-bub {
  background: rgba(24,39,35,.72);
  border-color: rgba(45,230,198,.2);
  box-shadow: 0 10px 30px -16px rgba(0,0,0,.6), 0 6px 24px -10px rgba(45,230,198,.12),
              inset 0 1px 0 rgba(255,255,255,.06);
  color: #e8efec;
}
html.theme-dark .cw-msg.a .cw-bub strong { color: #9be8db; }
/* Markdown extras (chat has no pre/table styling of its own: give dark ones) */
html.theme-dark .cw-bub pre, html.theme-dark .cw-bub code {
  background: rgba(0,0,0,.35); color: #cfe0da; border-radius: 8px; }
html.theme-dark .cw-bub pre { padding: 10px 12px; overflow-x: auto; }
html.theme-dark .cw-bub code { padding: 1px 5px; }
html.theme-dark .cw-bub table th, html.theme-dark .cw-bub table td {
  border-color: rgba(255,255,255,.12); }
html.theme-dark .cw-metrics { border-top-color: rgba(255,255,255,.09); }
html.theme-dark .cw-metrics b { color: #2de6c6; }
html.theme-dark .cw-metrics span { color: #a3b5af; }
html.theme-dark .cw-srcs { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .cw-src { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1);
  box-shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 20px -10px rgba(45,230,198,.14); color: #c6d4cf; }
html.theme-dark .cw-src:hover { border-color: rgba(45,230,198,.44); color: #7eebd6; }
html.theme-dark .cw-src-ic { background: #fff; border-color: transparent; }
html.theme-dark .cw-src-arrow { color: #8b9d97; }
html.theme-dark .cw-chip { color: #7eebd6; border-color: rgba(45,230,198,.32); background: rgba(255,255,255,.06);
  box-shadow: 0 3px 12px -7px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06); }
html.theme-dark .cw-chip:hover { box-shadow: 0 8px 18px -8px rgba(45,230,198,.28); }
html.theme-dark .cw-chip-fix { color: #c4b5fd; border-color: rgba(147,110,255,.4);
  box-shadow: 0 3px 14px -7px rgba(147,110,255,.3), inset 0 1px 0 rgba(255,255,255,.06); }
html.theme-dark .cw-hintpill { color: #7eebd6; background: rgba(22,36,33,.85); border-color: rgba(45,230,198,.4);
  box-shadow: 0 6px 18px rgba(0,0,0,.4); }
html.theme-dark .cw-trace-step i { background: #14211e; border-color: #3a4f49; }
/* The dark override dropped background-size, so the shimmer never travelled:
   the teal midpoint froze over whatever word sat mid-line (Guy saw "recent"
   glowing on its own). Same geometry as light, dark colours. */
html.theme-dark .cw-trace-step.live span { background: linear-gradient(90deg, #a3b5af 20%, #2de6c6 50%, #a3b5af 80%);
  background-size: 200% 100%; -webkit-background-clip: text; background-clip: text;
  color: transparent; animation: cwShimmer 2.2s linear infinite; }
html.theme-dark .cw-alabel { color: #b6c6c0; }
html.theme-dark .cw-alabel b { color: #f2f7f5; }
html.theme-dark .cw-composer { box-shadow: 0 10px 30px -12px rgba(0,0,0,.55), 0 24px 60px -24px rgba(45,230,198,.2); }
html.theme-dark .cw-composer:focus-within { box-shadow: 0 10px 34px -10px rgba(45,230,198,.22); }
html.theme-dark .cw-mic { color: #a3b5af; }
html.theme-dark .cw-mic:active { color: #7eebd6; }
html.theme-dark .cw-up { border: 1.5px solid rgba(255,255,255,.12) !important; background: rgba(255,255,255,.06) !important; color: #a3b5af; }
html.theme-dark .cw-up:hover, html.theme-dark .cw-up.open { background: rgba(45,230,198,.12) !important; color: #2de6c6; border-color: rgba(45,230,198,.4) !important; }
html.theme-dark .cw-up-menu { background: #14231f; border-color: rgba(255,255,255,.1); box-shadow: 0 14px 40px rgba(0,0,0,.6); }
html.theme-dark .cw-up-menu button { color: #cfdcd7; }
html.theme-dark .cw-up-menu button svg { color: #2de6c6; }
html.theme-dark .cw-up-menu button:hover { background: rgba(45,230,198,.1); color: #f2f7f5; }
html.theme-dark .cw-att-meta span { color: #a3b5af; }
html.theme-dark .cw-att-x { color: #a3b5af; }
html.theme-dark .cw-att-chips button { border-color: rgba(45,230,198,.32); background: rgba(255,255,255,.06); color: #7eebd6; }
html.theme-dark .cw-att-chips button:hover { background: rgba(45,230,198,.12); }
html.theme-dark .cwc-btn { color: #7eebd6; border-color: rgba(45,230,198,.28); background: rgba(255,255,255,.06); }
html.theme-dark .cwc-btn:hover { background: rgba(45,230,198,.1); }
html.theme-dark .cwc-btn.warn { color: #fdba74; border-color: rgba(253,186,116,.34); }
html.theme-dark .cwc-btn.warn:hover { background: rgba(253,186,116,.1); }
/* Workspace panel: the STAGE letterboxes an iframe of the client's own page,
   so it stays a neutral well - but the DOC is our own sheet and must be night.
   (It shipped white: every translucent card inside it blended with white and
   read as muddy grey - Guy's "the dark version doesn't look good" screenshot.) */
html.theme-dark .cw-panel-bar { border-bottom-color: rgba(255,255,255,.08);
  background: linear-gradient(180deg, #14231f, #101d1a); }
html.theme-dark .cw-panel-dots i { background: #3a4f49; }
html.theme-dark .cw-panel-url { color: #a3b5af; }
html.theme-dark .cw-panel-live { color: #7eebd6; background: rgba(45,230,198,.12); }
html.theme-dark .cw-panel-dev { background: rgba(255,255,255,.08); }
html.theme-dark .cw-panel-dev button { color: #a3b5af; }
html.theme-dark .cw-panel-dev button.on { background: #1d312c; color: #2de6c6; }
html.theme-dark .cw-panel-x { color: #a3b5af; }
html.theme-dark .cw-panel-x:hover { background: rgba(239,68,68,.18); color: #fca5a5; }
html.theme-dark .cw-panel-stage { background: #101d1a; }
/* THE SHEET GROUND. Every server-driven workspace card builds into this node
   (article, report, campaign plan, transcripts, GBP, credits, agent intro...),
   so one ground fixes the whole family. Deeper than the panel chrome so the
   glass cards inside it float instead of sinking. */
html.theme-dark .cw-panel-doc { background: #0d1815; color: #e8efec; }
html.theme-dark .cw-panel-doc::-webkit-scrollbar-thumb { background: rgba(255,255,255,.12); }
html.theme-dark .cw-panel-foot { border-top: 1px solid rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(16,29,26,0), rgba(16,29,26,.9)); }
/* Plan sheet + transcripts + calls + performance */
html.theme-dark .cw-ps-stats b { color: #f2f7f5; }
html.theme-dark .cw-ps-stats span { color: #a3b5af; }
html.theme-dark .cw-ps-h { color: #a3b5af; }
html.theme-dark .cw-ps-kw { background: rgba(255,255,255,.05); color: #cfdcd7; }
html.theme-dark .cw-ps-kw.t1 i { background: rgba(16,185,129,.18); color: #6ee7b7; }
html.theme-dark .cw-ps-kw.t2 i { background: rgba(99,102,241,.2); color: #c7d2fe; }
html.theme-dark .cw-ps-kw.t3 i { background: rgba(245,158,11,.18); color: #fcd34d; }
html.theme-dark .cw-ps-neg { color: #fca5a5; background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.24); }
html.theme-dark .cw-ps-line { color: #cfdcd7; }
html.theme-dark .cw-ts-meta { color: #b6c6c0; }
html.theme-dark .cw-ts-row.ai .cw-ts-b { background: rgba(45,230,198,.09); border-color: rgba(45,230,198,.2); color: #d7efe9; }
html.theme-dark .cw-ts-row.caller .cw-ts-b { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #e8efec; }
html.theme-dark .cw-ts-who { color: #a3b5af; }
html.theme-dark .cw-call-hero { background: rgba(22,36,33,.8); box-shadow: none; }
html.theme-dark .cw-call-name { color: #f2f7f5; }
html.theme-dark .cw-call-q { background: rgba(16,185,129,.14); color: #6ee7b7; border-color: rgba(16,185,129,.3); }
html.theme-dark .cw-call-sub, html.theme-dark .cw-call-none { color: #a3b5af; }
html.theme-dark .cw-call-summary { color: #cfdcd7; background: rgba(255,255,255,.04); }
html.theme-dark .cw-call-dot.miss { background: #5f736c; box-shadow: 0 0 0 3px rgba(74,90,85,.3); }
html.theme-dark .cw-call-t1 { color: #f2f7f5; }
html.theme-dark .cw-call-t2, html.theme-dark .cw-call-when { color: #a3b5af; }
html.theme-dark .cw-pf-name { color: #f2f7f5; }
html.theme-dark .cw-pf-pill.on { color: #6ee7b7; background: rgba(16,185,129,.14); }
html.theme-dark .cw-pf-pill.off { color: #a3b5af; background: rgba(255,255,255,.07); }
html.theme-dark .cw-pf-num { color: #cfdcd7; }
html.theme-dark .cw-pf-num span { color: #8b9d97; }
html.theme-dark .cw-sw { border-color: #14211e; box-shadow: 0 0 0 1px rgba(255,255,255,.2); }
/* Generation window. The search-box window is OUR chrome (a search bar plus our
   own engine chips) so it wears night glass; only .cwg-serp is a true Google
   result mimic and stays a deliberate light plate (see below). */
html.theme-dark .cwg-window { background: rgba(24,39,35,.7); border-color: rgba(255,255,255,.09);
  box-shadow: 0 10px 30px -20px rgba(0,0,0,.75), inset 0 1px 0 rgba(255,255,255,.04); }
html.theme-dark .cwg-search { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12);
  color: #e8efec; }
html.theme-dark .cwg-search svg { color: #8b9d97; }
html.theme-dark .cwg-caret { background: #2de6c6; }
html.theme-dark .cwg-ailogo { color: #f2f7f5; }
html.theme-dark .cwg-live { background: rgba(30,48,43,.85); border-color: rgba(45,230,198,.22);
  box-shadow: 0 14px 34px -22px rgba(0,0,0,.8), inset 0 1px 0 rgba(255,255,255,.05); }
html.theme-dark .cwg-live-h { color: #7eebd6; }
html.theme-dark .cwg-live-c { color: #a3b5af; }
html.theme-dark .cwg-plats-l { color: #a3b5af; }
html.theme-dark .cwg-plat { color: #b6c6c0; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
html.theme-dark .cwg-plat.on { color: #7eebd6; border-color: rgba(45,230,198,.5); background: rgba(45,230,198,.12); }
html.theme-dark .cwg-prog { background: rgba(255,255,255,.1); }
html.theme-dark .cwg-evt { color: #b6c6c0; }
html.theme-dark .cwg-evt.is-live { color: #f2f7f5; }
html.theme-dark .cwg-evt.is-live .cwg-evt-dot { background: rgba(45,230,198,.2); }
html.theme-dark .cwg-evt.is-live .cwg-evt-dot::after { background: #2de6c6; }
/* The live quote box is an INSET well inside the live card - darker, not
   lighter, or it reads as a second flat grey slab stacked on the first. */
html.theme-dark .cwg-doc { background: rgba(6,13,11,.55); border-color: rgba(255,255,255,.07);
  box-shadow: inset 0 1px 3px rgba(0,0,0,.45); }
html.theme-dark .cwg-doc-title { color: #f2f7f5; }
html.theme-dark .cwg-doc-title:empty::before { background: linear-gradient(90deg, rgba(255,255,255,.08), rgba(255,255,255,.14), rgba(255,255,255,.08)); }
html.theme-dark .cwg-doc-sec { color: #cfdcd7; }
html.theme-dark .cwg-doc-sec.is-done .cwg-doc-lb { color: #a3b5af; }
html.theme-dark .cwg-doc-sec.is-writing .cwg-doc-ic { background: rgba(45,230,198,.16); }
html.theme-dark .cwg-doc-sec.is-writing .cwg-doc-ic::after { color: #2de6c6; }
html.theme-dark .cwg-doc-sec.is-writing .cwg-doc-lb { color: #f2f7f5; }
html.theme-dark .cwg-live-t { color: #b6c6c0; border-top-color: rgba(255,255,255,.12); }
html.theme-dark .cwg-live-t.is-stage { color: #a3b5af; }
html.theme-dark .cwg-live-t::after { color: #2de6c6; }
html.theme-dark .cwg-ic { background: rgba(45,230,198,.08); color: #a3b5af; }
html.theme-dark .cwg-ds { color: #a3b5af; }
html.theme-dark .cwg-step.is-active .cwg-lb { color: #c4b5fd; }
html.theme-dark .cwg-step.is-done .cwg-lb { color: #6ee7b7; }
html.theme-dark .cwg-celebrate-s, html.theme-dark .cwg-ai-lab { color: #a3b5af; }
html.theme-dark .cwg-celebrate-t { color: #f2f7f5; }
/* DELIBERATE LIGHT PLATE: .cwg-serp mimics a real Google search result, same
   rule as maps and QR codes. It must read as an intentional inset screenshot,
   not a leak - so it gets an explicit white ground, a lifted ring and real
   depth against the night sheet. */
html.theme-dark .cwg-serp { background: #fff; border-color: rgba(255,255,255,.16);
  box-shadow: 0 0 0 5px rgba(255,255,255,.045), 0 22px 52px -22px rgba(0,0,0,.85); }
html.theme-dark .cwg-serp .cwg-head { border-bottom-color: #f3f4f6; }
html.theme-dark .cwg-serp .cwg-url { color: #202124; }
html.theme-dark .cwg-serp .cwg-title { color: #1a0dab; }
html.theme-dark .cwg-serp .cwg-desc { color: #4d5156; }
/* Engine chips sit on the night ground, so lift the inks off their own hues. */
html.theme-dark .cwg-ai-chips .c-gpt { background: rgba(16,163,127,.18); color: #3ddcb4; border-color: rgba(16,163,127,.38); }
html.theme-dark .cwg-ai-chips .c-perp { background: rgba(32,191,196,.18); color: #4fd8dd; border-color: rgba(32,191,196,.38); }
html.theme-dark .cwg-ai-chips .c-gem { background: rgba(66,133,244,.2); color: #8ab4f8; border-color: rgba(66,133,244,.4); }
html.theme-dark .cwg-ai-chips .c-cla { background: rgba(204,115,60,.2); color: #e8a377; border-color: rgba(204,115,60,.4); }
html.theme-dark .gbp-imgph { background: linear-gradient(100deg, #1a2925 30%, #223530 50%, #1a2925 70%); }
html.theme-dark .cwreq-ok b { color: #f2f7f5; }
html.theme-dark .cwreq-ok span { color: #a3b5af; }
html.theme-dark .cw-editor-body { color: #e8efec; }
html.theme-dark .cw-editor-body a { color: #2de6c6; }
/* Voice chrome (light pieces only; the .cwx room is already night) */
html.theme-dark .cw-voice-float { border-color: rgba(45,230,198,.3); background: rgba(22,36,33,.8);
  box-shadow: 0 4px 14px -6px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.06); }
html.theme-dark .cw-voice-float.on { background: rgba(45,230,198,.16); }
html.theme-dark .cw-tb-btn.cw-voice.on { background: rgba(45,230,198,.14);
  box-shadow: 0 4px 14px -6px rgba(45,230,198,.25), inset 0 1px 0 rgba(255,255,255,.07); }
html.theme-dark .cw-speak { border-color: rgba(45,230,198,.34); background: rgba(255,255,255,.06); }
html.theme-dark .cw-vhint { border-color: rgba(245,183,49,.35); background: rgba(245,183,49,.1); color: #fcd34d; }

/* ═════════════════════════════════════════════════════════════
   BASE CHROME EXTRAS - lock modal, trust bar, onboarding overlays
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .bwlk-card { background: #13221e; box-shadow: 0 40px 90px -20px rgba(0,0,0,.8); }
html.theme-dark .bwlk-name { color: #f2f7f5; }
html.theme-dark .bwlk-role { color: #7eebd6; background: rgba(45,230,198,.12); }
html.theme-dark .bwlk-tag { color: #f2f7f5; }
html.theme-dark .bwlk-list li { color: #c6d4cf; }
html.theme-dark .bwlk-foot { color: #a3b5af; }
html.theme-dark .bwlk-cta { background: linear-gradient(135deg, #10a795, #0d9488); color: #fff; }
html.theme-dark .bwlk-x { color: #a3b5af; }
html.theme-dark .bwtb-pill { color: #f2f7f5; background: rgba(22,36,33,.85);
  border-color: rgba(45,230,198,.3); box-shadow: 0 8px 22px -12px rgba(0,0,0,.6); }
html.theme-dark .bwtb-pill b { color: #7eebd6; }
html.theme-dark .bwtb-segs i { background: rgba(255,255,255,.14); }
html.theme-dark .bwtb-pop { background: rgba(20,35,31,.96); border-color: rgba(45,230,198,.28);
  box-shadow: 0 22px 50px -18px rgba(0,0,0,.7); }
html.theme-dark .bwtb-pop h4 { color: #f2f7f5; }
html.theme-dark .bwtb-step { color: #e8efec; }
html.theme-dark .bwtb-step:hover { background: rgba(45,230,198,.1); }
html.theme-dark .bwtb-step .d { color: #7eebd6; background: rgba(45,230,198,.14); border-color: rgba(45,230,198,.4); }
html.theme-dark .bwtb-step.done { color: #8b9d97; text-decoration-color: rgba(109,125,120,.5); }
html.theme-dark .lo-card { background: #13221e; box-shadow: 0 40px 90px -20px rgba(0,0,0,.8); }
html.theme-dark .lo-h { color: #f2f7f5; }
html.theme-dark .lo-p { color: #b6c6c0; }
html.theme-dark .lo-dots i { background: rgba(255,255,255,.14); }
html.theme-dark .lo-field { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .lo-chip { background: rgba(234,67,53,.12); border-color: rgba(234,67,53,.3); color: #fca5a5; }
html.theme-dark .lo-tone { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
html.theme-dark .lo-tone b { color: #f2f7f5; }
html.theme-dark .lo-tone span { color: #a3b5af; }
html.theme-dark .lo-tone.on { border-color: #ea4335; background: rgba(234,67,53,.1); }
html.theme-dark .lo-next { background: linear-gradient(135deg, #10a795, #0d9488); color: #fff; }
html.theme-dark .lo-skip, html.theme-dark .lo-hint { color: #a3b5af; }
html.theme-dark .bwo-overlay { background:
  radial-gradient(80% 90% at 85% -10%, rgba(13,148,136,.25) 0%, transparent 55%),
  radial-gradient(70% 80% at 0% 110%, rgba(109,40,217,.18) 0%, transparent 50%),
  rgba(2,10,9,.72); }
html.theme-dark .bwo-card { background: #13221e; box-shadow: 0 30px 80px rgba(0,0,0,.7); }
html.theme-dark .bwo-h { color: #f2f7f5; }
html.theme-dark .bwo-sub { color: #b6c6c0; }
html.theme-dark .bwo-label { color: #cfdcd7; }
html.theme-dark .bwo-label .req { color: #2de6c6; }
html.theme-dark .bwo-input, html.theme-dark .bwo-select, html.theme-dark .bwo-textarea {
  border-color: rgba(255,255,255,.14); color: #f2f7f5; background: rgba(255,255,255,.05); }
html.theme-dark .bwo-dot { background: rgba(255,255,255,.16); }
html.theme-dark .bwo-back { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .bwo-back:hover { background: rgba(255,255,255,.12); }

/* ═════════════════════════════════════════════════════════════
   APP MODE (.bw-native) - the white app chrome from base.html
   goes night. Higher specificity than the light rules it beats.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .bw-native .bw-app-acct .bw-acct-pop,
html.theme-dark.bw-native .bw-app-acct .bw-acct-pop { background: rgba(16,29,26,.98); border-color: rgba(255,255,255,.1) !important; }
html.theme-dark.bw-native .bw-app-acct .bw-acct-pop input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #f2f7f5; }
html.theme-dark.bw-native .bw-acct-pop, html.theme-dark.bw-native .bw-acct-pop a,
html.theme-dark.bw-native .bw-acct-pop button, html.theme-dark.bw-native .bw-acct-pop b,
html.theme-dark.bw-native .bw-acct-pop span, html.theme-dark.bw-native .bw-acct-pop div { color: #f2f7f5 !important; }
html.theme-dark.bw-native .bw-acct-pop small, html.theme-dark.bw-native .bw-acct-pop i { color: #a3b5af !important; }
html.theme-dark.bw-native .bw-app-acct .bw-acct-cur b { color: #f2f7f5 !important; }
html.theme-dark.bw-native .bw-app-acct .bw-acct-cur i { color: #a3b5af !important; }
html.theme-dark.bw-native .bw-app-acct .bw-acct-btn { background: rgba(22,36,33,.88) !important;
  border-color: rgba(255,255,255,.1) !important; box-shadow: 0 4px 14px -6px rgba(0,0,0,.6) !important; }
html.theme-dark.bw-native .bw-app-acct .bw-acct-btn svg { color: #2de6c6 !important; }
html.theme-dark.bw-native .cw-hist { background: rgba(16,29,26,.98) !important; border-color: rgba(255,255,255,.1) !important;
  box-shadow: 0 24px 60px -18px rgba(0,0,0,.8) !important; }
html.theme-dark.bw-native .cw-hist, html.theme-dark.bw-native .cw-hist * { color: #f2f7f5; }
html.theme-dark.bw-native .cw-hist input { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
html.theme-dark.bw-native .cw-msg.a .cw-bub { background: rgba(30,46,42,.94); border-color: rgba(255,255,255,.08); color: #e8efec; }
html.theme-dark.bw-native .cw-composer { border-color: rgba(255,255,255,.12); background: rgba(24,39,35,.96);
  box-shadow: 0 6px 20px -12px rgba(0,0,0,.6); }
html.theme-dark.bw-native .cw-composer:focus-within { border-color: rgba(45,230,198,.5);
  box-shadow: 0 6px 20px -12px rgba(0,0,0,.6), 0 0 0 3px rgba(45,230,198,.12); }
html.theme-dark.bw-native .ibx-crow { border-color: rgba(255,255,255,.12); background: rgba(24,39,35,.96);
  box-shadow: 0 6px 20px -12px rgba(0,0,0,.6); }
html.theme-dark.bw-native .ibx-crow:focus-within { border-color: rgba(45,230,198,.45); }
html.theme-dark.bw-native .cw-composer textarea, html.theme-dark.bw-native .ibx-composer textarea { caret-color: #2de6c6; }
html.theme-dark.bw-native .bw-app-only { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.08);
  box-shadow: 0 5px 20px -12px rgba(0,0,0,.6); }
html.theme-dark.bw-native .bw-app-only b { color: #f2f7f5; }
html.theme-dark.bw-native .bw-app-only s { color: #a3b5af; }
html.theme-dark.bw-native .bw-app-only i { border-right-color: #8b9d97; border-bottom-color: #8b9d97; }
/* Framed variants: frames carry .bw-framed.bw-native on html/documentElement */
html.theme-dark .bw-framed.bw-native .bw-app-only,
html.theme-dark.bw-framed.bw-native .bw-app-only { background: rgba(22,36,33,.8) !important; border-color: rgba(255,255,255,.08) !important; }
html.theme-dark.bw-framed.bw-native .bw-app-only b { color: #f2f7f5; }
html.theme-dark.bw-framed.bw-native .bw-app-only s { color: #a3b5af; }

/* ═════════════════════════════════════════════════════════════
   PAGE: AI AGENT (.ag2-*) - tokens flip most of it; these are the
   raw leftovers. The chat-widget PREVIEW (.ag2-cw-pv-stage,
   .gc-preview-panel, cpv-*) stays exactly as the visitor sees it.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .bw-team-card { background: rgba(22,36,33,.66); border-color: rgba(255,255,255,.09); }
html.theme-dark .bw-team-card:hover { box-shadow: 0 14px 34px rgba(0,0,0,.5); }
html.theme-dark .bw-team-card b { color: #f2f7f5; }
html.theme-dark .bw-team-card p { color: #a3b5af; }
html.theme-dark .bw-lplist a { color: #fbbf24; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
html.theme-dark .ag2-account { background: rgba(22,36,33,.66); }
html.theme-dark .ag2-hero { background:
  radial-gradient(120% 130% at 0% 0%, rgba(20,184,166,.16), transparent 50%),
  radial-gradient(130% 130% at 100% 100%, rgba(147,110,255,.14), transparent 55%),
  linear-gradient(180deg, #14231f 0%, #101d1a 100%); }
html.theme-dark .ag2-hero-badge { background: rgba(22,36,33,.85); border-color: rgba(147,110,255,.4); }
html.theme-dark .ag2-hero-sub { color: #b6c6c0; }
html.theme-dark .ag2-btn { background: rgba(255,255,255,.06); }
html.theme-dark .ag2-btn:hover { box-shadow: 0 6px 18px rgba(0,0,0,.4); }
html.theme-dark .ag2-btn-ghost { background: rgba(255,255,255,.05); }
html.theme-dark .ag2-kpi { background: rgba(22,36,33,.66); border-color: rgba(45,230,198,.16);
  box-shadow: 0 4px 16px rgba(0,0,0,.4); }
html.theme-dark .ag2-kpi-skeleton { background: linear-gradient(90deg, #1a2925, #223530 50%, #1a2925); }
html.theme-dark .ag2-tabs { background: rgba(22,36,33,.66); border-color: rgba(45,230,198,.16); }
html.theme-dark .ag2-tab:hover { background: rgba(255,255,255,.06); box-shadow: none; }
html.theme-dark .bw-native .ag2-tab { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
html.theme-dark .ag2-card { background: rgba(22,36,33,.66) !important; border-color: rgba(45,230,198,.14) !important;
  box-shadow: 0 4px 16px rgba(0,0,0,.4) !important; }
html.theme-dark .ag2-card-preview { background: linear-gradient(180deg, #14231f, #101d1a); }
html.theme-dark .ag2-status { background: rgba(22,36,33,.66); border-color: rgba(45,230,198,.16); }
html.theme-dark .ag2-status-pill { background: rgba(255,255,255,.08); }
html.theme-dark .ag2-status-pill[data-state=idle] { background: rgba(245,158,11,.16); color: #fcd34d; }
html.theme-dark .ag2-status-meta { color: #b6c6c0; }
html.theme-dark .ag2-status-live { background: rgba(255,255,255,.05); }
html.theme-dark .ag2-status-live-dot { background: #5f736c; }
html.theme-dark .ag2-wavebtn:hover { background: rgba(45,230,198,.08); }
html.theme-dark .ag2-wavebtn-play { background: rgba(255,255,255,.08); color: #2de6c6; }
html.theme-dark .ag2-setup { background: linear-gradient(135deg, rgba(245,158,11,.1), rgba(217,119,6,.08)); border-color: rgba(245,158,11,.3); }
html.theme-dark .ag2-setup-badge { color: #fcd34d; background: rgba(245,158,11,.14); }
html.theme-dark .ag2-setup-title { color: #fde68a; }
html.theme-dark .ag2-setup-sub { color: #d9c8a5; }
html.theme-dark .ag2-setup-sub code { background: rgba(245,158,11,.16); color: #fde68a; }
html.theme-dark .ag2-provider { background: rgba(22,36,33,.8); border-color: rgba(245,158,11,.28); }
html.theme-dark .ag2-provider:hover { box-shadow: 0 10px 28px rgba(0,0,0,.5); border-color: #fbbf24; }
html.theme-dark .ag2-provider-name { color: #f2f7f5; }
html.theme-dark .ag2-provider-tagline, html.theme-dark .ag2-provider-bullets { color: #b6c6c0; }
html.theme-dark .ag2-setup-foot { border-top-color: rgba(245,158,11,.3); color: #d9c8a5; }
html.theme-dark .ag2-setup-foot code { background: rgba(255,255,255,.06); border-color: rgba(245,158,11,.3); color: #fde68a; }
html.theme-dark .ag2-tag-cheap { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.theme-dark .ag2-conv { background: rgba(22,36,33,.66); box-shadow: 0 4px 24px rgba(0,0,0,.4); }
html.theme-dark .ag2-conv-list { background: linear-gradient(180deg, #101d1a 0%, #14231f 100%); }
html.theme-dark .ag2-conv-item:hover, html.theme-dark .ag2-conv-item.is-active { background: rgba(255,255,255,.06); }
html.theme-dark .ag2-conv-item-preview { color: #a3b5af; }
html.theme-dark .ag2-conv-detail { background: #101d1a; }
html.theme-dark .ag2-conv-empty-t { color: #a3b5af; }
html.theme-dark .ag2-input { background: rgba(255,255,255,.05); }
html.theme-dark .ag2-input:focus { background: rgba(255,255,255,.07); }
html.theme-dark .ag2-field label, html.theme-dark .ag2-check { color: #b6c6c0; }
html.theme-dark .ag2-day, html.theme-dark .ag2-chip, html.theme-dark .ag2-scenario,
html.theme-dark .ag2-cat-btn, html.theme-dark .ag2-agent-tab, html.theme-dark .ag2-sched-row,
html.theme-dark .ag2-sched-time { background: rgba(255,255,255,.06); }
html.theme-dark .ag2-hmode-b.is-on { background: #1d312c; box-shadow: 0 1px 3px rgba(0,0,0,.4); }
html.theme-dark .ag2-voice-filter-btn.is-active, html.theme-dark .ag2-test-mode.is-active { background: #1d312c; box-shadow: 0 1px 2px rgba(0,0,0,.4); }
html.theme-dark .ag2-voice-card { background: rgba(255,255,255,.05); }
html.theme-dark .ag2-voice-card.is-selected { background: linear-gradient(180deg, rgba(45,230,198,.14), rgba(255,255,255,.04) 80%); }
html.theme-dark .ag2-voice-rec { color: #f2f7f5; }
html.theme-dark .ag2-test { background: rgba(22,36,33,.66); }
html.theme-dark .ag2-test-scenarios { background: linear-gradient(180deg, #101d1a, #14231f); }
html.theme-dark .ag2-test-chat { background: linear-gradient(180deg, #14231f 0%, #101d1a 100%); }
html.theme-dark .ag2-test-msg-assistant .ag2-test-bubble { background: rgba(30,46,42,.92); border-color: rgba(45,230,198,.22);
  box-shadow: 0 2px 8px rgba(0,0,0,.3); }
html.theme-dark .ag2-test-msg-assistant.is-error .ag2-test-bubble { background: rgba(239,68,68,.1); border-color: rgba(239,68,68,.28); color: #fca5a5; }
html.theme-dark .ag2-test-input { background: rgba(255,255,255,.05); }
html.theme-dark .ag2-persona, html.theme-dark .ag2-kb-src, html.theme-dark .ag2-faq-item { background: rgba(255,255,255,.05); }
html.theme-dark .ag2-kb-src-del:hover, html.theme-dark .ag2-faq-del:hover { background: rgba(239,68,68,.14); }
html.theme-dark .ag2-faq-item .ag2-faq-a { color: #b6c6c0; }
html.theme-dark .ag2-details[open] { background: rgba(255,255,255,.04); }
html.theme-dark .ag2-help-body { color: #b6c6c0; }
html.theme-dark .ag2-agent-bar { background: rgba(22,36,33,.8); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html.theme-dark .ag2-modal, html.theme-dark .ag2-modal-hd { background: #13221e; box-shadow: 0 32px 80px rgba(0,0,0,.7); }
html.theme-dark .ag2-cw-toggle { background: linear-gradient(135deg, rgba(45,230,198,.1), rgba(255,255,255,.04) 70%) !important;
  border-color: rgba(45,230,198,.28) !important; }
html.theme-dark .ag2-cw-toggle-t { color: #f2f7f5; }
html.theme-dark .ag2-cw-toggle-s, html.theme-dark .ag2-cw-branding-row { color: #b6c6c0; }
html.theme-dark .ag2-sticky-save { background: #13221e; border-color: rgba(255,255,255,.12);
  box-shadow: 0 10px 30px rgba(0,0,0,.6); }
html.theme-dark .ag2-sticky-save-status { color: #f2f7f5; }
html.theme-dark .ag2-sticky-save-hint { color: #a3b5af; }
html.theme-dark .ag2-sticky-save[data-state=saved] { border-color: rgba(16,185,129,.35); background: #12241f; }
html.theme-dark .ag2-sticky-save[data-state=unsaved] { border-color: rgba(245,158,11,.4); background: #1b2318; box-shadow: 0 10px 30px rgba(0,0,0,.6); }
html.theme-dark .ag2-sticky-save[data-state=saving] { border-color: rgba(59,130,246,.4); background: #121f26; }
html.theme-dark .ag2-sticky-save[data-state=error] { border-color: rgba(220,38,38,.45); background: #231616; }

/* ═════════════════════════════════════════════════════════════
   SHARED: pl-shell raw token blocks (content studio, pilot,
   optimizer, sms, visibility, ai agent) - one flip for all six.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .pl-shell {
  --p: #14b8a6; --p-deeper: #2de6c6;
  --p-50: rgba(45,230,198,.08); --p-100: rgba(45,230,198,.14); --p-200: rgba(45,230,198,.22);
  --g: #14b8a6; --g-dark: #2dd4bf;
  --ink: #f2f7f5; --muted: #a3b5af;
  --line: rgba(255,255,255,.1); --line-2: rgba(255,255,255,.06);
}

/* ═════════════════════════════════════════════════════════════
   PAGE: SECURITY (.sec2-*)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .sec2-wrap { color: #f2f7f5; }
html.theme-dark .sec2-rail { background: linear-gradient(180deg, rgba(22,36,33,.94), rgba(16,29,26,.9));
  border-color: rgba(255,255,255,.08); box-shadow: 0 18px 48px -20px rgba(0,0,0,.6); }
html.theme-dark .sec2-rail-h { color: #8b9d97; }
html.theme-dark .sec2-railrow { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.04); }
html.theme-dark .sec2-railrow:hover { background: rgba(45,230,198,.07); border-color: rgba(45,230,198,.28); }
html.theme-dark .sec2-railrow.on { background: linear-gradient(135deg, rgba(45,230,198,.14), rgba(45,230,198,.05)); }
html.theme-dark .sec2-railic { color: #8b9d97; }
html.theme-dark .sec2-railrow:hover .sec2-railic { color: #2de6c6; }
html.theme-dark .sec2-railrow.on .sec2-railic { color: #2de6c6; }
html.theme-dark .sec2-railnm { color: #f2f7f5; }
html.theme-dark .sec2-railnm small { color: #a3b5af; }
html.theme-dark .bw-native .sec2-railrow, html.theme-dark.bw-native .sec2-railrow { background: rgba(255,255,255,.05); }
html.theme-dark .sec2-card { border-color: rgba(45,230,198,.14); background:
  radial-gradient(80% 60% at 0% 0%, rgba(45,230,198,.07), transparent 50%),
  radial-gradient(80% 80% at 100% 0%, rgba(20,184,166,.08), transparent 55%),
  linear-gradient(180deg, #14231f 0%, #101d1a 100%); }
html.theme-dark .sec2-card-hd small { color: #a3b5af; }
html.theme-dark .sec2-soft { background: linear-gradient(160deg, rgba(45,230,198,.06), transparent); }
html.theme-dark .sec2-soft p, html.theme-dark .sec2-status-note, html.theme-dark .sec2-gate p,
html.theme-dark .sec2-steps, html.theme-dark .sec2-other-row small { color: #b6c6c0; }
html.theme-dark .sec2-btn { border-color: rgba(45,230,198,.32); background: rgba(255,255,255,.05); color: #7eebd6; }
html.theme-dark .sec2-btn:hover { border-color: #2de6c6; background: rgba(45,230,198,.1); }
html.theme-dark .sec2-status-meta, html.theme-dark .sec2-row-m, html.theme-dark .sec2-empty-sm,
html.theme-dark .sec2-foot-note { color: #a3b5af; }
html.theme-dark .sec2-stat { border-color: rgba(45,230,198,.14); background: rgba(255,255,255,.04); }
html.theme-dark .sec2-stat span { color: #a3b5af; }
html.theme-dark .sec2-stat b.ok { color: #4cc9b4; }
html.theme-dark .sec2-stat b.bad { color: #f87171; }
html.theme-dark .sec2-row { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.04); }
html.theme-dark .sec2-plat { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.04); }
html.theme-dark .sec2-plat.on { border-color: #2de6c6; background: rgba(45,230,198,.1);
  box-shadow: 0 6px 18px -8px rgba(45,230,198,.3); }
html.theme-dark .sec2-plat-ico { color: #7eebd6; background: rgba(45,230,198,.12); }
html.theme-dark .sec2-plat small { color: #a3b5af; }
html.theme-dark .sec2-plugin-card { border-color: rgba(45,230,198,.2); background: linear-gradient(160deg, rgba(45,230,198,.07), transparent); }
html.theme-dark .sec2-plugin-meta { color: #a3b5af; }
html.theme-dark .sec2-steps b { color: #f2f7f5; }
html.theme-dark .sec2-pair input { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .sec2-pair-msg.is-ok { color: #6ee7b7; }
html.theme-dark .sec2-pair-msg.is-err { color: #f87171; }
html.theme-dark .sec2-pill.ok { color: #7eebd6; background: rgba(45,230,198,.14); }
html.theme-dark .sec2-pill.warn { color: #fcd34d; background: rgba(245,158,11,.16); }
html.theme-dark .sec2-pill.dim { color: #a1adb8; background: rgba(148,163,184,.14); }
html.theme-dark .sec2-chip.on { color: #7eebd6; background: rgba(45,230,198,.14); }
html.theme-dark .sec2-chip.off { color: #a3b5af; background: rgba(148,163,184,.12); }

/* ═════════════════════════════════════════════════════════════
   PAGE: AUTOPILOT (.ap-) - token-driven; raw leftovers only
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .ap-mode:hover { border-color: rgba(45,230,198,.35); }
html.theme-dark .ap-btn-dismiss { background: rgba(255,255,255,.06); }
html.theme-dark .ap-btn-approve { color: #04302b; }
html.theme-dark .ap-item.sev-high .ap-item-ico { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .ap-item.sev-med .ap-item-ico { background: rgba(245,158,11,.14); color: #fcd34d; }

/* ═════════════════════════════════════════════════════════════
   PAGE: REPORTS - token-driven; pipeline bits
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .pipeline-bar-bg, html.theme-dark .service-count { background: rgba(255,255,255,.08); }

/* ═════════════════════════════════════════════════════════════
   PAGE: VISITORS (.vis-, .dm-, plus gx-visitors.js output)
   Inline styles need !important here.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .vis-statcard { background: rgba(22,36,33,.66) !important; border-color: rgba(255,255,255,.08) !important; }
html.theme-dark .vis-statcard div { color: #a3b5af !important; }
html.theme-dark .vis-statcard div[style*="#0a0a0a"] { color: #f2f7f5 !important; }
html.theme-dark #visSearch { border-color: rgba(255,255,255,.14) !important; background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark #visRange { background: rgba(255,255,255,.08) !important; border-color: rgba(255,255,255,.1) !important; }
html.theme-dark #visRange button { color: #a3b5af !important; }
html.theme-dark #visPager { border-top-color: rgba(255,255,255,.08) !important; color: #a3b5af !important; }
html.theme-dark .dm-shimmer { background-image: linear-gradient(90deg, #1a2925 25%, #223530 37%, #1a2925 63%) !important;
  border-color: rgba(255,255,255,.08) !important; }
html.theme-dark #draftModal > div { background: #13221e !important; box-shadow: 0 30px 80px rgba(0,0,0,.7) !important; }
html.theme-dark #draftModal h3 { color: #f2f7f5 !important; }
html.theme-dark #draftModal [style*="border-bottom"] { border-bottom-color: rgba(255,255,255,.08) !important; }
html.theme-dark #draftModal [style*="border-top"] { border-top-color: rgba(255,255,255,.08) !important; }
html.theme-dark #draftModal [style*="background:#f6f8fa"], html.theme-dark #draftModal [style*="background: #f6f8fa"] {
  background: rgba(255,255,255,.05) !important; border-color: rgba(255,255,255,.1) !important; color: #b6c6c0 !important; }
html.theme-dark #dmFrom { color: #f2f7f5 !important; }
html.theme-dark #dmTo, html.theme-dark #dmSubject, html.theme-dark #dmBody, html.theme-dark #dmInstruction {
  border-color: rgba(255,255,255,.14) !important; background: rgba(255,255,255,.05) !important; color: #f2f7f5 !important; }
html.theme-dark #dmRegen { background: rgba(255,255,255,.05) !important; }
html.theme-dark #draftModal button[style*="background:#fff"], html.theme-dark #draftModal button[style*="background: #fff"] {
  background: rgba(255,255,255,.07) !important; border-color: rgba(255,255,255,.14) !important; color: #f2f7f5 !important; }
/* gx-visitors table (JS-inline): the white plates that hold company logos
   STAY white; the rest is covered by tokens where it uses them. */

/* ═════════════════════════════════════════════════════════════
   PAGE: CONTENT STUDIO (.cs-, .pl-, .agl-, .cal-, .rv-, .rk-, .im-)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .pl-hero { background:
  radial-gradient(120% 130% at 0% 0%, rgba(20,184,166,.16), transparent 50%),
  radial-gradient(130% 130% at 100% 100%, rgba(147,110,255,.12), transparent 55%),
  linear-gradient(180deg, #14231f 0%, #101d1a 100%); }
html.theme-dark .pl-hero-eyebrow { background: rgba(22,36,33,.85); border-color: rgba(147,110,255,.4); }
html.theme-dark .pl-sub { color: #b6c6c0; }
html.theme-dark .pl-btn-ghost { background: rgba(255,255,255,.06) !important; }
html.theme-dark .pl-section { background:
  radial-gradient(80% 60% at 0% 0%, rgba(45,230,198,.06), transparent 50%),
  radial-gradient(80% 80% at 100% 0%, rgba(20,184,166,.08), transparent 55%),
  linear-gradient(180deg, rgba(22,36,33,.85) 0%, rgba(16,29,26,.85) 100%) !important; }
html.theme-dark .pl-window-bar { background: rgba(255,255,255,.06); }
html.theme-dark .pl-window-pill.is-active { background: #1d312c; color: #f2f7f5;
  box-shadow: 0 1px 3px rgba(0,0,0,.4), 0 0 0 1px rgba(45,230,198,.2); }
html.theme-dark .pl-select { background: rgba(255,255,255,.06); }
html.theme-dark .agl-card { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
html.theme-dark .agl-hd { color: #f2f7f5; }
html.theme-dark .agl-hint { color: #8b9d97; }
html.theme-dark .agl-row i { background: rgba(45,230,198,.12); color: #7eebd6; }
html.theme-dark .agl-row textarea { color: #cfdcd7; }
html.theme-dark .agl-row.add textarea { color: #8b9d97; }
html.theme-dark .agl-row button { color: #8b9d97; }
html.theme-dark .agl-row button:hover { color: #fca5a5; }
html.theme-dark .agl-saved { color: #4cc9b4; }
html.theme-dark .cs-hubrail { background: linear-gradient(180deg, rgba(22,36,33,.94), rgba(16,29,26,.9));
  border-color: rgba(255,255,255,.08); box-shadow: 0 18px 48px -20px rgba(0,0,0,.6); }
html.theme-dark .cs-hubrail-h { color: #8b9d97; }
html.theme-dark .cs-hubrow { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.04); }
html.theme-dark .cs-hubrow:hover { background: rgba(45,230,198,.07); border-color: rgba(45,230,198,.28); }
html.theme-dark .cs-hubrow.on { background: linear-gradient(135deg, rgba(45,230,198,.14), rgba(45,230,198,.05)); }
html.theme-dark .cs-hubrow.dim .cs-hubnm { color: #8b9d97; }
html.theme-dark .cs-hubic { color: #8b9d97; }
html.theme-dark .cs-hubrow:hover .cs-hubic, html.theme-dark .cs-hubrow.on .cs-hubic { color: #2de6c6; }
html.theme-dark .cs-hubnm { color: #f2f7f5; }
html.theme-dark .cs-hubnm small { color: #a3b5af; }
html.theme-dark .cs-hub-sw span { background: rgba(255,255,255,.18); }
html.theme-dark .bw-native .cs-hubrow, html.theme-dark.bw-native .cs-hubrow { background: rgba(255,255,255,.05); }
html.theme-dark .cs-sumline, html.theme-dark .cs-apline { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.07); color: #cfdcd7; }
html.theme-dark .cs-sumdot { background: #5f736c; }
html.theme-dark .cs-sumlbl, html.theme-dark .cs-kwlbl, html.theme-dark .cs-seg-cwrap,
html.theme-dark .cs-pager .cs-pinfo, html.theme-dark .cs-sumrow b { color: #a3b5af; }
html.theme-dark .cs-tile { border-color: rgba(255,255,255,.08);
  box-shadow: 0 8px 22px -14px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
html.theme-dark .cs-tile:hover { box-shadow: 0 14px 30px -14px rgba(0,0,0,.7), inset 0 1px 0 rgba(255,255,255,.06); }
html.theme-dark .cs-tile b { background: linear-gradient(135deg, #2de6c6, #7eebd6); -webkit-background-clip: text; background-clip: text; }
html.theme-dark .cs-tile.t-amber b { background: linear-gradient(135deg, #fcd34d, #fbbf24); -webkit-background-clip: text; background-clip: text; }
html.theme-dark .cs-tile.t-blue b { background: linear-gradient(135deg, #93c5fd, #7aa7ff); -webkit-background-clip: text; background-clip: text; }
html.theme-dark .cs-tile.t-teal { background: linear-gradient(150deg, rgba(20,184,166,.16), rgba(255,255,255,.03)); border-color: rgba(20,184,166,.3); }
html.theme-dark .cs-tile.t-mint { background: linear-gradient(150deg, rgba(16,185,129,.14), rgba(255,255,255,.03)); border-color: rgba(16,185,129,.28); }
html.theme-dark .cs-tile.t-amber { background: linear-gradient(150deg, rgba(245,158,11,.13), rgba(255,255,255,.03)); border-color: rgba(245,158,11,.3); }
html.theme-dark .cs-tile.t-blue { background: linear-gradient(150deg, rgba(59,130,246,.13), rgba(255,255,255,.03)); border-color: rgba(59,130,246,.28); }
html.theme-dark .cs-tile span { color: #a3b5af; }
html.theme-dark .cs-sumrow { border-bottom-color: rgba(255,255,255,.07); color: #cfdcd7; }
html.theme-dark .cs-sumrow b.on { color: #2de6c6; }
html.theme-dark .cs-setup { background: linear-gradient(160deg, rgba(20,184,166,.1), rgba(255,255,255,.03) 45%, rgba(59,130,246,.07));
  border-color: rgba(45,230,198,.24); box-shadow: 0 20px 54px -22px rgba(0,0,0,.6); }
html.theme-dark .cs-setup h2, html.theme-dark .cs-hero-t { color: #f2f7f5; }
html.theme-dark .cs-setup p, html.theme-dark .cs-hero-s { color: #b6c6c0; }
html.theme-dark .cs-setup-perks span { color: #7eebd6; background: rgba(45,230,198,.09); border-color: rgba(45,230,198,.26); }
html.theme-dark .cs-hero { background: linear-gradient(135deg, rgba(20,184,166,.14), rgba(255,255,255,.03) 42%, rgba(59,130,246,.1));
  border-color: rgba(45,230,198,.26);
  box-shadow: 0 14px 38px -16px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.06); }
html.theme-dark .cs-hero-note { color: #7eebd6; background: rgba(45,230,198,.1); border-color: rgba(45,230,198,.28); }
html.theme-dark .cs-late:hover { box-shadow: 0 10px 24px rgba(0,0,0,.5); }
html.theme-dark .cs-late-ph { background: rgba(255,255,255,.06); color: #8b9d97; }
html.theme-dark .cs-late-t { color: #f2f7f5; }
html.theme-dark .cs-late-m, html.theme-dark .cs-idea-m { color: #a3b5af; }
html.theme-dark .cs-auto { color: #cfdcd7; }
html.theme-dark .cs-pill { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .cs-pill.g { background: rgba(16,185,129,.14); color: #6ee7b7; border-color: rgba(16,185,129,.3); }
html.theme-dark .cs-seg-cwrap input { color: #f2f7f5; background: rgba(255,255,255,.05); }
html.theme-dark .cs-rhythm { color: #7eebd6; }
html.theme-dark .cs-kwlbl i { color: #8b9d97; }
html.theme-dark .cs-chip { background: rgba(45,230,198,.09); border-color: rgba(45,230,198,.32); color: #7eebd6; }
html.theme-dark .cs-chips.loc .cs-chip { background: rgba(59,130,246,.1); border-color: rgba(59,130,246,.34); color: #93c5fd; }
html.theme-dark .cs-chip button { background: rgba(255,255,255,.1); }
html.theme-dark .cs-chip button:hover { background: rgba(255,255,255,.2); }
html.theme-dark .cs-chipempty { color: #8b9d97; }
html.theme-dark .cs-idea:hover { box-shadow: 0 8px 20px rgba(0,0,0,.45); }
html.theme-dark .cs-idea-kw { color: #f2f7f5; }
html.theme-dark .cs-idea-add { border-color: rgba(45,230,198,.36); background: rgba(45,230,198,.07); color: #7eebd6; }
html.theme-dark .cs-seg-b { background: rgba(255,255,255,.05); color: #cfdcd7; }
html.theme-dark .cs-seg-b small { color: #a3b5af; }
html.theme-dark .cs-pager button { background: rgba(255,255,255,.05); color: #cfdcd7; }
html.theme-dark .cs-pager button:hover { color: #7eebd6; }
html.theme-dark .day-chip { background: rgba(255,255,255,.05); }
html.theme-dark .seg { background: rgba(255,255,255,.05); }
html.theme-dark .style-card { background: rgba(255,255,255,.05); }
html.theme-dark .cal-day { background: rgba(255,255,255,.04); }
html.theme-dark .cal-pop { background: linear-gradient(180deg, rgba(22,37,33,.98), rgba(16,29,26,.96));
  border-color: rgba(45,230,198,.32); box-shadow: 0 22px 54px -12px rgba(0,0,0,.7); }
html.theme-dark .cal-pop .cal-st { background: rgba(45,230,198,.12); color: #7eebd6; border-color: rgba(45,230,198,.28); }
html.theme-dark .cal-pop .cal-st.plan { background: rgba(59,130,246,.12); color: #93c5fd; border-color: rgba(59,130,246,.32); }
html.theme-dark .cs-lbl { color: #b6c6c0; }
html.theme-dark .cs-row { background: rgba(255,255,255,.04); }
html.theme-dark .rk-table { background: rgba(255,255,255,.03); }
html.theme-dark .rk-head { background: rgba(45,230,198,.06); }
html.theme-dark .im-cell { background: rgba(255,255,255,.05); }
html.theme-dark .im-cell:hover { box-shadow: 0 12px 28px -14px rgba(45,230,198,.24); }
html.theme-dark .im-drive { background: rgba(255,255,255,.04); }
html.theme-dark .rv-card { background: rgba(22,36,33,.7); }
html.theme-dark .rv-card:hover { box-shadow: 0 16px 40px -18px rgba(0,0,0,.6); }
html.theme-dark .rv-hero-empty { background: linear-gradient(135deg, rgba(45,230,198,.1), rgba(255,255,255,.03)); }
html.theme-dark .rv-x { color: #b6c6c0; }
html.theme-dark .rv-rej { color: #fca5a5 !important; border-color: rgba(239,68,68,.3) !important; }
html.theme-dark .se-bar { border-bottom-color: rgba(255,255,255,.08); }
/* status maps (calendar chips + row pills) */
html.theme-dark .cs-status.s-published, html.theme-dark .cal-chip.s-published { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.theme-dark .cs-status.s-review, html.theme-dark .cal-chip.s-review,
html.theme-dark .cs-status.s-generated, html.theme-dark .cal-chip.s-generated,
html.theme-dark .cs-status.s-approved, html.theme-dark .cal-chip.s-approved { background: rgba(45,230,198,.14); color: #7eebd6; }
html.theme-dark .cs-status.s-scheduled, html.theme-dark .cal-chip.s-scheduled,
html.theme-dark .cs-status.s-queued, html.theme-dark .cal-chip.s-queued { background: rgba(245,158,11,.16); color: #fcd34d; }
html.theme-dark .cs-status.s-generating, html.theme-dark .cal-chip.s-generating { background: rgba(56,189,248,.16); color: #7dd3fc; }
html.theme-dark .cs-status.s-failed, html.theme-dark .cal-chip.s-failed { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .cal-chip.planned { background: rgba(59,130,246,.08); color: #93c5fd; }
html.theme-dark .rk-p.is-top, html.theme-dark .rk-ok { color: #34d399; }
html.theme-dark .rk-p.is-mid { color: #fbbf24; }
/* glass badges v3: same jewels, night plates */
html.theme-dark .cs-badge { box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 6px 18px -8px rgba(0,0,0,.6); }
html.theme-dark .cs-badge-lead { color: #fde68a; background: linear-gradient(135deg, rgba(245,158,11,.22), rgba(180,83,9,.16)); border-color: rgba(245,158,11,.4); }
html.theme-dark .cs-badge-ai { color: #7eebd6; background: linear-gradient(135deg, rgba(45,230,198,.2), rgba(13,148,136,.14)); border-color: rgba(45,230,198,.4); }
html.theme-dark .cs-badge-opp { color: #fdba74; background: linear-gradient(135deg, rgba(251,146,60,.2), rgba(194,65,12,.15)); border-color: rgba(234,88,12,.4); }
/* Drive picker (also used on local presence) - chrome dark, thumbnails stay */
html.theme-dark .lpd-modal { background: #13221e; box-shadow: 0 30px 70px -14px rgba(0,0,0,.8); }
html.theme-dark .lpd-head { border-bottom-color: rgba(255,255,255,.08); }
html.theme-dark .lpd-head h3 { color: #f2f7f5; }
html.theme-dark .lpd-folder { border-color: rgba(255,255,255,.12); color: #f2f7f5; background: rgba(255,255,255,.06); }
html.theme-dark .lpd-close { color: #a3b5af; }
html.theme-dark .lpd-empty, html.theme-dark .lpd-spin { color: #a3b5af; }

/* ═════════════════════════════════════════════════════════════
   PAGE: LANDING PAGES (.pb-, .np-, .tpl-) - iframes stay white
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .pb-card { border-color: rgba(255,255,255,.1); }
html.theme-dark .pb-card-footer { border-top-color: rgba(255,255,255,.07); }
html.theme-dark .pb-badge--builder { background: rgba(59,130,246,.16); color: #93c5fd; }
html.theme-dark .pb-badge--form { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .pb-btn-upload { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
html.theme-dark .np-step-dot { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.05); }
html.theme-dark .np-step-line { background: rgba(255,255,255,.12); }
html.theme-dark .np-step-dot--active { color: #04302b; }
html.theme-dark .tpl-filters .tpl-chip { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #b6c6c0; }
html.theme-dark .tpl-filters .tpl-chip:hover { border-color: rgba(255,255,255,.24); color: #f2f7f5; }
html.theme-dark .tpl-filters .tpl-chip.tpl-chip--active { background: rgba(45,230,198,.16); color: #2de6c6; border-color: rgba(45,230,198,.4); }
html.theme-dark .tpl-group-head { border-bottom-color: rgba(255,255,255,.08); }
html.theme-dark .tpl-group-title { color: #f2f7f5; }
html.theme-dark .tpl-group-sub { color: #a3b5af; }
html.theme-dark .tpl-card { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.04); }
html.theme-dark .tpl-card:hover { border-color: rgba(255,255,255,.2); box-shadow: 0 4px 12px rgba(0,0,0,.4); }
html.theme-dark .tpl-check { background: #0d9488; }
html.theme-dark .tpl-tags span { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .upload-drop { border-color: rgba(255,255,255,.16); background: rgba(255,255,255,.04); }
html.theme-dark .upload-drop:hover { background: rgba(45,230,198,.06); }
html.theme-dark .tpl-preview--upload { background: repeating-linear-gradient(45deg, #14211e, #14211e 8px, #182722 8px, #182722 16px); }
html.theme-dark .tpl-preview--blank { background: #14211e; border-bottom-color: rgba(255,255,255,.06); }

/* ═════════════════════════════════════════════════════════════
   PAGE: LOCAL PRESENCE (.lp2-, .lpq-, .lov-, .lpk-, .lpc-, .lpg-)
   The geogrid maps, pins, popups, QR codes, GBP preview cards and
   photo mocks STAY LIGHT (deliberate). Chrome flips.
   Print keeps the light palette.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .lp2-grid-card { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.08);
  box-shadow: 0 14px 40px -22px rgba(0,0,0,.6); }
html.theme-dark .lp2-grid-meta, html.theme-dark .lp2-kw { color: #f2f7f5; }
html.theme-dark .lp2-biz { color: #a3b5af; }
html.theme-dark .lp2-date { color: #8b9d97; }
html.theme-dark .lp2-history { border-color: rgba(255,255,255,.12); color: #f2f7f5; background: rgba(255,255,255,.06); }
html.theme-dark .lp2-stat { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-stat .k { color: #a3b5af; }
html.theme-dark .lp2-stat .n { color: #f2f7f5; }
html.theme-dark .lp2-delta.up { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.theme-dark .lp2-delta.down { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .lp2-legend { color: #a3b5af; }
html.theme-dark .lp2-allcard { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-allcard:hover { border-color: rgba(45,230,198,.5); box-shadow: 0 12px 30px -16px rgba(0,0,0,.6); }
html.theme-dark .lp2-allcard .akw { color: #f2f7f5; }
html.theme-dark .lp2-allcard .akw small { color: #8b9d97; }
html.theme-dark .lp2-allcard .apill { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.08); color: #cfdcd7; }
html.theme-dark .lp2-allcard .apill b { color: #7eebd6; }
html.theme-dark .lp2-allsec { color: #a3b5af; }
html.theme-dark .lp2-bar { background: rgba(22,36,33,.8); border-color: rgba(45,230,198,.24);
  box-shadow: 0 10px 30px -20px rgba(0,0,0,.6); }
html.theme-dark .lp2-head h1 { color: #f2f7f5; }
html.theme-dark .lp2-head p { color: #a3b5af; }
html.theme-dark .lp2-tab, html.theme-dark .lp2-tab-pill { color: #7eebd6; background: rgba(255,255,255,.05); border-color: rgba(45,230,198,.3); }
html.theme-dark .lp2-tab-pill:hover { background: rgba(45,230,198,.1); }
html.theme-dark .lp2-kwcard { background: rgba(22,36,33,.7); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-kwcard:hover { border-color: rgba(45,230,198,.5); box-shadow: 0 10px 24px -14px rgba(0,0,0,.6); }
html.theme-dark .lp2-kwcard.on { border-color: #2de6c6; background: linear-gradient(180deg, rgba(45,230,198,.1), rgba(22,36,33,.7)); }
html.theme-dark .lp2-kwcard .kw { color: #f2f7f5; }
html.theme-dark .lp2-kwcard .st b { color: #7eebd6; }
html.theme-dark .lp2-kwcard .st small, html.theme-dark .lp2-kwcard .nodata { color: #a3b5af; }
html.theme-dark .lp2-kwcard .x { color: #8b9d97; }
html.theme-dark .lp2-kwgroup h4 { color: #f2f7f5; }
html.theme-dark .lp2-kwgroup span { color: #a3b5af; }
html.theme-dark .lp2-kwcard .st b.r-top { color: #34d399; }
html.theme-dark .lp2-kwcard .st b.r-ok { color: #4cc9b4; }
html.theme-dark .lp2-kwcard .st b.r-mid { color: #fbbf24; }
html.theme-dark .lp2-kwcard .st b.r-bad { color: #f87171; }
html.theme-dark .lp2-kwcard .st b.r-none { color: #a3b5af; }
html.theme-dark .lp2-kwcard .trend.up { color: #34d399; }
html.theme-dark .lp2-kwcard .trend.down { color: #f87171; }
html.theme-dark .lp2-histnav button { border-color: rgba(45,230,198,.3); background: rgba(255,255,255,.05); color: #7eebd6; }
html.theme-dark .lp2-histnav button:hover:not(:disabled) { background: rgba(45,230,198,.1); }
html.theme-dark .lp2-histcard { background: rgba(22,36,33,.7); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-histcard b { color: #f2f7f5; }
html.theme-dark .lp2-histcard small { color: #a3b5af; }
html.theme-dark .lp2-del { border-color: rgba(248,113,113,.3); background: rgba(255,255,255,.05); color: #fca5a5; }
html.theme-dark .lp2-del:hover { background: rgba(239,68,68,.12); }
html.theme-dark .lp2-controls input[type=text], html.theme-dark .lp2-controls select,
html.theme-dark .lp2-setup-pane input[type=text], html.theme-dark .lp2-composer textarea,
html.theme-dark .lp2-composer select, html.theme-dark .lp2-composer input[type=text],
html.theme-dark .lp2-gr-row input, html.theme-dark .lp2-bl-addrow input,
html.theme-dark .lp2-rev-auto-row select, html.theme-dark .lp2-rev-auto-row input,
html.theme-dark .lp2-ar-sel, html.theme-dark .lp2-ar-tone, html.theme-dark .lp2-gentopic,
html.theme-dark .lp2-sched, html.theme-dark .lp2-plan-ta, html.theme-dark .lp2-revcard textarea {
  border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .lp2-runmsg { color: #7eebd6; }
html.theme-dark .lp2-empty { background: rgba(22,36,33,.6); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-empty h3, html.theme-dark .lp2-setup-head h3, html.theme-dark .lp2-gbpgate h3 { color: #f2f7f5; }
html.theme-dark .lp2-empty p, html.theme-dark .lp2-setup-head p, html.theme-dark .lp2-gbpgate p,
html.theme-dark .lp2-hint { color: #a3b5af; }
html.theme-dark .lp2-setup { background: rgba(22,36,33,.85); box-shadow: 0 14px 36px -22px rgba(0,0,0,.6); }
html.theme-dark .lp2-setup-tabs button { border-color: rgba(45,230,198,.3); background: rgba(255,255,255,.05); color: #7eebd6; }
html.theme-dark .lp2-biz-row { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
html.theme-dark .lp2-biz-row:hover { border-color: rgba(45,230,198,.5); box-shadow: 0 8px 20px -12px rgba(0,0,0,.6); }
html.theme-dark .lp2-biz-nm { color: #f2f7f5; }
html.theme-dark .lp2-biz-sub { color: #a3b5af; }
html.theme-dark .lp2-biz-go { color: #7eebd6; }
html.theme-dark .lp2-tracking { color: #f2f7f5; }
html.theme-dark .lp2-tracking button { color: #7eebd6; }
html.theme-dark .lpg-modal { background: rgba(20,35,31,.96); box-shadow: 0 30px 70px -20px rgba(0,0,0,.7); }
html.theme-dark .lpg-head { border-bottom-color: rgba(255,255,255,.08); }
html.theme-dark .lpg-head h3 { color: #f2f7f5; }
html.theme-dark .lpg-head p, html.theme-dark .lpg-x { color: #a3b5af; }
html.theme-dark .lpg-item { border-bottom-color: rgba(255,255,255,.07); }
html.theme-dark .lpg-item b { color: #f2f7f5; }
html.theme-dark .lpg-item p { color: #b6c6c0; }
html.theme-dark .lp2-prog { background: rgba(22,36,33,.9); box-shadow: 0 14px 36px -20px rgba(0,0,0,.6); }
html.theme-dark .lp2-prog-mid b { color: #f2f7f5; }
html.theme-dark .lp2-prog-mid span { color: #a3b5af; }
html.theme-dark .lp2-prog-track { background: rgba(255,255,255,.1); }
html.theme-dark .lp2-prog-pct { color: #7eebd6; }
html.theme-dark .lp2-locbar-lbl { color: #a3b5af; }
html.theme-dark .lp2-locpill { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #cfdcd7; }
html.theme-dark .lp2-locpill:hover { background: rgba(45,230,198,.1); color: #7eebd6; }
html.theme-dark .lp2-scan-loc { background: rgba(45,230,198,.1); border-color: rgba(45,230,198,.28); color: #7eebd6; }
html.theme-dark .lp2-gbpgate, html.theme-dark .lp2-composer { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-comp-head { color: #f2f7f5; }
html.theme-dark .lp2-imgbtn { border-color: rgba(45,230,198,.3); color: #7eebd6; background: rgba(255,255,255,.05); }
html.theme-dark .lp2-imgbtn:hover { background: rgba(45,230,198,.1); }
html.theme-dark .lp2-comp-msg { color: #4cc9b4; }
html.theme-dark .lp2-switch { color: #f2f7f5; }
html.theme-dark .lp2-switch span { background: rgba(255,255,255,.2); }
html.theme-dark .lp2-revcard { border-color: rgba(255,255,255,.08); background: rgba(22,36,33,.7); }
html.theme-dark .lp2-revtop b { color: #f2f7f5; }
html.theme-dark .lp2-revtext { color: #cfdcd7; }
html.theme-dark .lp2-revreplied { color: #4cc9b4; }
html.theme-dark .lp2-revreply { background: rgba(45,230,198,.08); border-color: rgba(45,230,198,.22); }
html.theme-dark .lp2-revreply-h { color: #7eebd6; }
html.theme-dark .lp2-revreply-t { color: #cfdcd7; }
html.theme-dark .lp2-revfbtn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #a3b5af; }
html.theme-dark .lp2-rev-wl { color: #7eebd6; }
html.theme-dark .lp2-arcard { background: linear-gradient(180deg, rgba(22,36,33,.85) 0%, rgba(28,32,30,.85) 100%); border-color: rgba(234,67,53,.3); box-shadow: 0 14px 36px -24px rgba(0,0,0,.6); }
html.theme-dark .lp2-cit-nap { background: rgba(45,230,198,.08); border-color: rgba(45,230,198,.24); color: #9be8db; }
html.theme-dark .lp2-cit-nap b { color: #f2f7f5; }
html.theme-dark .lp2-citrow, html.theme-dark .lp2-cit-stat { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-citrow .nm, html.theme-dark .lp2-cit-stat b { color: #f2f7f5; }
html.theme-dark .lp2-citrow a { color: #2de6c6; }
html.theme-dark .lp2-citrow .why { color: #7eebd6; }
html.theme-dark .lp2-citrow a.self { color: #a3b5af; }
html.theme-dark .lp2-citrow .who span { background: rgba(245,158,11,.16); color: #fcd34d; }
html.theme-dark .lp2-cit-stat span, html.theme-dark .lp2-cit-sec, html.theme-dark .lp2-bl-comphead,
html.theme-dark .lp2-rev-auto-row>label, html.theme-dark .lp2-rev-fu, html.theme-dark .lp2-cit-sum,
html.theme-dark .lp2-rev-auto-h small { color: #a3b5af; }
html.theme-dark .lp2-bl-compbox, html.theme-dark .lp2-rev-auto { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-bl-chip { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #f2f7f5; }
html.theme-dark .lp2-bl-chip small { color: #a3b5af; }
html.theme-dark .lp2-rev-auto-h b, html.theme-dark .lp2-ar-title { color: #f2f7f5; }
html.theme-dark .lp2-ar-sub, html.theme-dark .lp2-ar-lbl { color: #a3b5af; }
html.theme-dark .lp2-ar-body { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-ar-note { color: #fcd34d; background: rgba(245,158,11,.1); border-color: rgba(245,158,11,.26); }
html.theme-dark .lp2-hubrail { background: linear-gradient(180deg, rgba(22,36,33,.94), rgba(16,29,26,.9));
  border-color: rgba(255,255,255,.08); box-shadow: 0 18px 48px -20px rgba(0,0,0,.6); }
html.theme-dark .lp2-hubrail-h { color: #8b9d97; }
html.theme-dark .lp2-hubrow { border-color: rgba(255,255,255,.07); background: rgba(255,255,255,.04); }
html.theme-dark .lp2-hubrow:hover { background: rgba(234,67,53,.08); border-color: rgba(234,67,53,.26); }
html.theme-dark .lp2-hubrow.on { background: linear-gradient(135deg, rgba(234,67,53,.12), rgba(255,154,143,.05)); }
html.theme-dark .lp2-hubrow.dim .lp2-hubnm { color: #8b9d97; }
html.theme-dark .lp2-hubic { color: #8b9d97; }
html.theme-dark .lp2-hubrow:hover .lp2-hubic { color: #ff9a8f; }
html.theme-dark .lp2-hubrow.on .lp2-hubic { color: #ea4335; }
html.theme-dark .lp2-hubnm { color: #f2f7f5; }
html.theme-dark .lp2-hubnm small { color: #a3b5af; }
html.theme-dark .lp2-hub-sw span { background: rgba(255,255,255,.18); }
html.theme-dark .lp2-hubpane { background: linear-gradient(180deg, rgba(22,36,33,.95), rgba(16,29,26,.92));
  border-color: rgba(255,255,255,.08); box-shadow: 0 18px 48px -20px rgba(0,0,0,.6); }
html.theme-dark .lp2-pane-foot { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .lppool-it { background: rgba(255,255,255,.06); }
html.theme-dark .lppool-it.shimmer { background: linear-gradient(100deg, #1a2925 30%, #223530 50%, #1a2925 70%); }
html.theme-dark .lppool-more { border-color: rgba(45,230,198,.4); background: rgba(45,230,198,.05); color: #7eebd6; }
html.theme-dark .lppool-more:hover { background: rgba(45,230,198,.1); }
html.theme-dark .lp2-pool-cell { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
html.theme-dark .lp2-pool-empty { color: #a3b5af; }
html.theme-dark .lp2-freq { background: linear-gradient(180deg, rgba(22,36,33,.85), rgba(30,26,25,.85)); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-freq-seg, html.theme-dark .lp2-segrow { background: rgba(255,255,255,.07); }
html.theme-dark .lp2-seg, html.theme-dark .lp2-stybtn { color: #b6c6c0; }
html.theme-dark .lp2-seg.on, html.theme-dark .lp2-stybtn.on { background: #1d312c; color: #ff9a8f; box-shadow: 0 2px 6px -2px rgba(0,0,0,.5); }
html.theme-dark .lp2-freq-cap { color: #a3b5af; }
html.theme-dark .lp2-freq-cap b { color: #f2f7f5; }
html.theme-dark .lp2-track { background: rgba(255,255,255,.1); }
html.theme-dark .lp2-knob { background: #14211e; }
html.theme-dark .lp2-ticks { color: #8b9d97; }
html.theme-dark .lp2-smartnote { color: #9be8db; background: rgba(45,230,198,.07); border-color: rgba(45,230,198,.22); }
html.theme-dark .lp2-status { background: linear-gradient(135deg, rgba(255,255,255,.08), rgba(45,230,198,.05));
  border-color: rgba(255,255,255,.12); color: #f2f7f5;
  box-shadow: 0 6px 18px -8px rgba(0,0,0,.5), inset 0 1px 0 rgba(255,255,255,.08); }
html.theme-dark .lp2-status.off { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); color: #b6c6c0;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.06); }
html.theme-dark .lp2-zlbl { color: #a3b5af; }
html.theme-dark .lp2-tile { border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-tile .n { color: #f2f7f5; }
html.theme-dark .lp2-tile .k { color: #a3b5af; }
html.theme-dark .lp2-actlist { color: #b6c6c0; }
html.theme-dark .lp2-actlist .li { border-top-color: rgba(255,255,255,.07); }
html.theme-dark .lp2-actlist .li .st { color: #4cc9b4; }
html.theme-dark .lp2-actlist .li .st.pend { color: #fbbf24; }
html.theme-dark .lp2-actlist .empty { color: #a3b5af; }
html.theme-dark .lp2-thumb { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.05); }
html.theme-dark .lp2-revsample { border-color: rgba(255,255,255,.08); }
html.theme-dark .lp2-revsample .txt { color: #cfdcd7; }
html.theme-dark .lp2-revsample .reply { background: rgba(234,67,53,.08); border-color: rgba(234,67,53,.2); color: #e8efec; }
html.theme-dark .lp2-revsample .reply .who { color: #ff9a8f; }
html.theme-dark .lp2-hl { background: rgba(245,183,49,.3); color: #fde68a; }
html.theme-dark .lp2-samplebtn { border-color: rgba(45,230,198,.36); background: rgba(255,255,255,.05); color: #7eebd6; }
html.theme-dark .lp2-schedwrap { color: #a3b5af; }
html.theme-dark .lp2-prev-lbl { color: #a3b5af; }
html.theme-dark .lp2-prev-empty { color: #8b9d97; }
html.theme-dark .lp2-phcard { border-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
html.theme-dark .lp2-phcard .txt { color: #cfdcd7; }
html.theme-dark .lp2-phcard .meta { color: #a3b5af; }
html.theme-dark .lp2-mini { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .lp2-daychip { color: #a3b5af; background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
html.theme-dark .lp2-calwrap { background: rgba(22,36,33,.85); border-color: rgba(255,255,255,.08); box-shadow: 0 14px 36px -26px rgba(0,0,0,.6); }
html.theme-dark .lp2-cal-month { color: #f2f7f5; }
html.theme-dark .lp2-calbtn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .lp2-cal-dow, html.theme-dark .lp2-cal-num { color: #a3b5af; }
html.theme-dark .lp2-cal-day { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.06); }
html.theme-dark .lp2-cal-chip { background: rgba(255,255,255,.08); color: #e8efec; }
html.theme-dark .lp2-cal-legend { color: #a3b5af; }
html.theme-dark .lp2-cal-pop { background: #16241f; border-color: rgba(234,67,53,.4); box-shadow: 0 14px 36px rgba(0,0,0,.6); }
html.theme-dark .lp2-plan-btn.ghost { background: rgba(255,255,255,.08); color: #cfdcd7; }
html.theme-dark .lp2-plan-edit { border-color: rgba(45,230,198,.34); background: rgba(45,230,198,.07); color: #7eebd6; }
html.theme-dark .lp2-cal-pop-t { color: #f2f7f5; }
html.theme-dark .lp2-poststatus.published { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.theme-dark .lp2-poststatus.failed { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .lp2-poststatus.scheduled { background: rgba(245,158,11,.16); color: #fcd34d; }
html.theme-dark .lp2-poststatus.review, html.theme-dark .lp2-poststatus.draft { background: rgba(234,67,53,.14); color: #ff9a8f; }
html.theme-dark .lp2-cal-chip.s-published { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.theme-dark .lp2-cal-chip.s-scheduled { background: rgba(245,158,11,.16); color: #fcd34d; }
html.theme-dark .lp2-cal-chip.s-review, html.theme-dark .lp2-cal-chip.s-draft { background: rgba(234,67,53,.14); color: #ff9a8f; }
html.theme-dark .lp2-cal-chip.s-failed { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .lp2-cal-chip.k-plan { color: #7eebd6; }
html.theme-dark .lp2-cal-chip.k-plan-offer { color: #fcd34d; }
html.theme-dark .lp2-cal-chip.k-plan-qa { color: #c4b5fd; }
html.theme-dark .lp2-cal-chip.k-plan-article { color: #93c5fd; }
html.theme-dark .lp2-cal-chip.k-offer { background: rgba(245,158,11,.16) !important; color: #fcd34d !important; }
html.theme-dark .lp2-cal-chip.k-qa { background: rgba(124,92,255,.16) !important; color: #c4b5fd !important; }
html.theme-dark .lp2-cal-chip.k-work { background: rgba(93,131,216,.16) !important; color: #93c5fd !important; }
html.theme-dark .gbp-aipop-card { background: #13221e; box-shadow: 0 30px 70px -18px rgba(0,0,0,.8); }
html.theme-dark .gbp-aipop-head { background: linear-gradient(135deg, rgba(234,67,53,.12), rgba(197,34,31,.05)); border-bottom-color: rgba(255,255,255,.08); }
html.theme-dark .gbp-aipop-head h4 { color: #f2f7f5; }
html.theme-dark .gbp-aipop-sub { color: #a3b5af; }
html.theme-dark .gbp-aipop-chip { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #e8efec; }
html.theme-dark .gbp-aipop-chip:hover { border-color: rgba(234,67,53,.4); background: rgba(234,67,53,.08); }
html.theme-dark .gbp-aipop-lbl { color: #a3b5af; }
html.theme-dark .gbp-aipop-input { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .gbp-aipop-btn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #cfdcd7; }
html.theme-dark .gbp-aipop-btn:hover { background: rgba(255,255,255,.09); }
html.theme-dark .lpw-ctrl select, html.theme-dark .lpw-ctrl input[type=color] { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
html.theme-dark .lpw-chk { color: #cfdcd7; }
html.theme-dark .lpq-card { background: rgba(22,36,33,.7); border-color: rgba(255,255,255,.09); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html.theme-dark .lpq-ctxt { color: #cfdcd7; }
html.theme-dark .lpq-when, html.theme-dark .lpq-x, html.theme-dark .lpq-lbl { color: #a3b5af; }
html.theme-dark .lpq-acts button, html.theme-dark .lpq-acts a { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #cfdcd7; }
html.theme-dark .lpq-acts button:hover, html.theme-dark .lpq-acts a:hover { background: rgba(255,255,255,.1); }
html.theme-dark .lpq-modal { background: rgba(19,34,30,.98); box-shadow: 0 18px 60px rgba(0,0,0,.7); }
html.theme-dark .lpq-imgwrap { background: rgba(255,255,255,.06); }
html.theme-dark .lpq-noimg { color: #8b9d97; }
html.theme-dark .lp2-revava { background: rgba(59,130,246,.16); color: #93c5fd; }
html.theme-dark .lpq-picker { border-color: rgba(255,255,255,.1); }
html.theme-dark .lpq-ptabs { border-bottom-color: rgba(255,255,255,.08); background: rgba(255,255,255,.04); }
html.theme-dark .lpq-ptab { color: #a3b5af; }
html.theme-dark .lpq-ptab.on { color: #7aa7ff; box-shadow: inset 0 -2px 0 #7aa7ff; background: rgba(255,255,255,.04); }
html.theme-dark .lpq-mbody textarea, html.theme-dark .lpq-mbody input, html.theme-dark .lpq-mbody select {
  border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .lpq-chip.scheduled { background: rgba(16,185,129,.14); color: #6ee7b7; }
html.theme-dark .lpq-chip.review { background: rgba(245,158,11,.14); color: #fcd34d; }
html.theme-dark .lpq-chip.failed { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .lpq-chip.published { background: rgba(59,130,246,.16); color: #93c5fd; }
html.theme-dark .lp2-revstate.ok { background: rgba(16,185,129,.14); color: #6ee7b7; }
html.theme-dark .lp2-revstate.need { background: rgba(245,158,11,.14); color: #fcd34d; }
html.theme-dark .lpk-delta.up { background: rgba(16,185,129,.14); color: #6ee7b7; }
html.theme-dark .lpk-delta.down { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .lpk-delta.flat { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .lpc-ev.published { background: rgba(59,130,246,.16); color: #93c5fd; }
html.theme-dark .lpc-ev.scheduled { background: rgba(16,185,129,.14); color: #6ee7b7; }
html.theme-dark .lpc-ev.review { background: rgba(245,158,11,.14); color: #fcd34d; }
html.theme-dark .lov-feed, html.theme-dark .lov-plan, html.theme-dark .lov-p {
  background: rgba(22,36,33,.7); border-color: rgba(255,255,255,.09); box-shadow: 0 2px 10px rgba(0,0,0,.3); }
html.theme-dark .lov-feed-hd b { color: #f2f7f5; }
html.theme-dark .lov-feed-hd small { color: #a3b5af; }
html.theme-dark .lov-fi { border-top-color: rgba(255,255,255,.07); }
html.theme-dark .lov-fi .tt { color: #cfdcd7; }
html.theme-dark .lov-fi .wh { color: #8b9d97; }
html.theme-dark .lov-fi a { color: #2de6c6; }
html.theme-dark .lov-fi .tp { background: rgba(45,230,198,.12); color: #7eebd6; }
html.theme-dark .lov-fi .tp.blog { background: rgba(124,92,255,.16); color: #c4b5fd; }
html.theme-dark .lov-fi .tp.offer { background: rgba(245,158,11,.16); color: #fcd34d; }
html.theme-dark .lov-plan li { color: #cfdcd7; }
html.theme-dark .lov-p .nm { color: #f2f7f5; }
html.theme-dark .lov-p .pts { color: #8b9d97; }
html.theme-dark .lov-p .pts b { color: #f2f7f5; }
html.theme-dark .lov-bar { background: rgba(255,255,255,.1); }
html.theme-dark .lov-ok { color: #4cc9b4; }
html.theme-dark .lov-iss { color: #b6c6c0; }
html.theme-dark .lov-iss button { background: rgba(45,230,198,.1); color: #7eebd6; }
html.theme-dark .lov-iss button:hover { background: rgba(45,230,198,.18); }
html.theme-dark .lr-open { color: #7eebd6; background: rgba(45,230,198,.1); }
html.theme-dark .lpp-tile { background: rgba(22,36,33,.7); border-color: rgba(255,255,255,.09); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html.theme-dark .lpp-tile .k { color: #a3b5af; }
html.theme-dark .lpp-tile .s { color: #8b9d97; }
html.theme-dark .lpp-tile .bars i { background: rgba(255,255,255,.12); }
html.theme-dark .lpp-tile .bars i.cur { background: #2de6c6; }
html.theme-dark .lpk-row { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); }
html.theme-dark .lpk-kw { color: #cfdcd7; }
html.theme-dark .lpk-stat small { color: #8b9d97; }
html.theme-dark .lpc-dow { color: #8b9d97; }
html.theme-dark .lpc-day { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.07); color: #8b9d97; }
html.theme-dark .lpc-day.blank { background: transparent; }
/* AI-draft purple pill (has !important in the template) */
html.theme-dark .lp2-aidraft, html.theme-dark #lpGenBtn {
  background: linear-gradient(135deg, rgba(124,92,255,.2), rgba(93,131,216,.16)) !important;
  border: 1px solid rgba(124,92,255,.4) !important; color: #c4b5fd !important; }
html.theme-dark .lp2-aidraft:disabled, html.theme-dark #lpGenBtn:disabled { color: #8b7fc9 !important; }
html.theme-dark .lp2-revcard textarea.shimmer { background: linear-gradient(90deg, #1a2925, #241f2e, #1a2925); }
/* keep the embed + print surfaces LIGHT (reports get printed/forwarded) */
@media print {
  html.theme-dark body.bw-theme, html.theme-dark .app-main, html.theme-dark .page-content { background: #fff !important; color: #131316 !important; }
}

/* ═════════════════════════════════════════════════════════════
   PAGE: OVERVIEW STRIP (.bwov-*)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .bwov-greet { color: #f2f7f5; }
html.theme-dark .bwov-sub { color: #a3b5af; }
html.theme-dark .bwov-filter { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); box-shadow: none; }
html.theme-dark .bwov-filter button { color: #a3b5af; }
html.theme-dark .bwov-filter button:hover { color: #f2f7f5; }
html.theme-dark .bwov-export { border-color: rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: #f2f7f5; box-shadow: none; }
html.theme-dark .bwov-export:hover { color: #7eebd6; box-shadow: 0 4px 14px -6px rgba(45,230,198,.2); }
html.theme-dark .bwov-brief { background: linear-gradient(180deg, rgba(22,36,33,.8), rgba(16,29,26,.8));
  border-color: rgba(255,255,255,.08); box-shadow: 0 8px 28px -18px rgba(0,0,0,.6); }
html.theme-dark .bwov-brief-body { color: #cfdcd7; }
html.theme-dark .bwov-card { background: rgba(22,36,33,.66); border-color: rgba(255,255,255,.08); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html.theme-dark .bwov-card:hover { border-color: rgba(45,230,198,.3); }
html.theme-dark .bwov-card .l { color: #a3b5af; }
html.theme-dark .bwov-card .n { color: #f2f7f5; }
html.theme-dark .bwov-card .d.up { color: #6ee7b7; background: rgba(16,185,129,.14); }
html.theme-dark .bwov-card .d.dn { color: #fca5a5; background: rgba(239,68,68,.14); }

/* ═════════════════════════════════════════════════════════════
   PAGE: BW HOME (_bw_home: .bwh-, .bwfs-)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .bwfs-row { color: #f2f7f5; background: rgba(22,36,33,.66); border-color: rgba(255,255,255,.08); }
html.theme-dark .bwfs-dot { color: #7eebd6; background: rgba(45,230,198,.14); border-color: rgba(45,230,198,.4); }
html.theme-dark .bwfs-row.done { background: rgba(255,255,255,.04); }
html.theme-dark .bwfs-row.done span.t { color: #8b9d97; text-decoration-color: rgba(109,125,120,.6); }
html.theme-dark .bwfs-go { color: #7eebd6; }
html.theme-dark .bwfs-track { background: rgba(255,255,255,.1); }
html.theme-dark .bwh-hi h1 { color: #f2f7f5; }
html.theme-dark .bwh-hi p { color: #a3b5af; }
html.theme-dark .bwh-ask { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.1);
  box-shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 22px rgba(45,230,198,.06); }
html.theme-dark .bwh-ask input { color: #f2f7f5; }
html.theme-dark .bwh-ask input::placeholder { color: #8b9d97; }
html.theme-dark .bwh-ask-up { color: #a3b5af; border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
html.theme-dark .bwh-ask-up:hover, html.theme-dark .bwh-ask-up.open { background: rgba(45,230,198,.1); }
html.theme-dark .bwh-up-menu { background: #14231f; border-color: rgba(255,255,255,.1); box-shadow: 0 14px 40px rgba(0,0,0,.6); }
html.theme-dark .bwh-up-menu button { color: #cfdcd7; }
html.theme-dark .bwh-up-menu button:hover { background: rgba(45,230,198,.1); color: #f2f7f5; }
html.theme-dark .bwh-quick { background: rgba(22,36,33,.7); border-color: rgba(45,230,198,.24); color: #f2f7f5;
  box-shadow: 0 14px 34px -14px rgba(0,0,0,.6); }
html.theme-dark .bwh-quick-head b { color: #f2f7f5; }
html.theme-dark .bwh-quick-head p { color: #a3b5af; }
html.theme-dark .bwh-kpi .d { color: #34d399; }
html.theme-dark .bwh-more { color: #2de6c6; }
html.theme-dark .bwh-call { border-top-color: rgba(255,255,255,.06); }
html.theme-dark .bwh-call .who b { color: #f2f7f5; }
html.theme-dark .bwh-call .who span, html.theme-dark .bwh-arow-meta span { color: #a3b5af; }
html.theme-dark .bwh-call:hover { background: rgba(255,255,255,.04); }
html.theme-dark .bwh-empty { color: #a3b5af; }
html.theme-dark .bwh-acthint { background: rgba(45,230,198,.07); border-color: rgba(45,230,198,.3); color: #b6c6c0; }
html.theme-dark .bwh-acthint a { color: #2de6c6; }
html.theme-dark .bwh-arow:hover { background: rgba(255,255,255,.04); }
html.theme-dark .bwh-arow-meta b, html.theme-dark .bwh-agent-meta b { color: #f2f7f5; }
html.theme-dark .bwh-arow-st.on { color: #6ee7b7; background: rgba(16,185,129,.14); }
html.theme-dark .bwh-arow-st.off { color: #a3b5af; background: rgba(255,255,255,.08); }
html.theme-dark .bwh-num { color: #a3b5af; }
html.theme-dark .bwh-live { color: #34d399; background: rgba(16,185,129,.12); }
html.theme-dark .bwh-btn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #cfdcd7; }
html.theme-dark .bwh-chip { color: #cfdcd7; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
html.theme-dark .bwh-chip-add { color: #2de6c6; }
html.theme-dark .bwh-chip-add:hover { background: rgba(45,230,198,.1); }
html.theme-dark .bwh-call .tag.booked { color: #6ee7b7; background: rgba(16,185,129,.14); }
html.theme-dark .bwh-call .tag.won { color: #6ee7b7; background: rgba(22,163,74,.16); }
html.theme-dark .bwh-call .tag.qualified { color: #7eebd6; background: rgba(45,230,198,.12); }
html.theme-dark .bwh-call .tag.new { color: #fcd34d; background: rgba(234,179,8,.14); }
html.theme-dark .bwh-call .tag.lost, html.theme-dark .bwh-call .tag.spam { color: #a3b5af; background: rgba(142,148,160,.14); }

/* ═════════════════════════════════════════════════════════════
   PAGE: DASHBOARD (.db-, .ai-, .lead-src-)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .ai-activity-card { background: rgba(22,36,33,.66); border-color: rgba(255,255,255,.08); }
html.theme-dark .ai-activity-head { border-bottom-color: rgba(255,255,255,.07); }
html.theme-dark .ai-activity-row { border-bottom-color: rgba(255,255,255,.05); }
html.theme-dark .ai-activity-row:hover { background: rgba(255,255,255,.04); }
html.theme-dark .ai-activity-name { color: #f2f7f5; }
html.theme-dark .ai-activity-sub, html.theme-dark .ai-activity-empty { color: #a3b5af; }
html.theme-dark .ai-activity-empty div[style*="#1a1a1a"] { color: #f2f7f5 !important; }
html.theme-dark .ai-play-btn { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #f2f7f5; }
html.theme-dark .ai-tier-hot { background: rgba(239,68,68,.14); color: #fca5a5; }
html.theme-dark .ai-tier-warm { background: rgba(234,88,12,.14); color: #fdba74; }
html.theme-dark .ai-tier-cold { background: rgba(3,105,161,.2); color: #7dd3fc; }
html.theme-dark .ai-tier-spam { background: rgba(113,113,122,.18); color: #a1a1aa; }
html.theme-dark .ai-tier-new { background: rgba(132,204,22,.16); color: #bef264; }
html.theme-dark .db-kpi { border-color: rgba(255,255,255,.08) !important;
  background: linear-gradient(135deg, rgba(45,230,198,.05), rgba(22,36,33,.66) 70%) !important; }
html.theme-dark .db-kpi--accent { background: linear-gradient(135deg, rgba(45,230,198,.1), rgba(22,36,33,.66) 60%) !important; }
html.theme-dark .db-kpi:hover { box-shadow: 0 4px 16px rgba(0,0,0,.4); }
html.theme-dark .db-kpi-icon { background: rgba(255,255,255,.08); }
html.theme-dark .lead-src-google { background: rgba(52,168,83,.16); color: #7fdc9c; }
html.theme-dark .lead-src-bing { background: rgba(0,120,212,.18); color: #7dd3fc; }
html.theme-dark .lead-src-meta, html.theme-dark .lead-src-facebook { background: rgba(24,119,242,.18); color: #93c5fd; }
html.theme-dark .lead-src-call { background: rgba(198,40,40,.16); color: #fca5a5; }
html.theme-dark .lead-src-form { background: rgba(22,101,52,.2); color: #86efac; }

/* ═════════════════════════════════════════════════════════════
   PAGE: AGENTS (.agent-, .team-)
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .bw-native .team-brain-row, html.theme-dark.bw-native .team-brain-row {
  border-color: rgba(255,255,255,.08); background: rgba(22,36,33,.8); }
html.theme-dark.bw-native .team-brain-row:active { background: rgba(45,230,198,.08); }
html.theme-dark .team-brain-row span { color: #a3b5af; }
html.theme-dark .team-brain-row i { border-right-color: #8b9d97; border-bottom-color: #8b9d97; }
html.theme-dark .team-head p { color: #a3b5af; }
html.theme-dark .agent-card.is-off { background: rgba(22,36,33,.4) !important; }
html.theme-dark .agent-card.is-on:hover { box-shadow: 0 14px 30px rgba(0,0,0,.5) !important; }
html.theme-dark .agent-name, html.theme-dark .agent-role b { color: #f2f7f5; }
html.theme-dark .agent-pen { color: #8b9d97; }
html.theme-dark .agent-pen:hover { color: #f2f7f5; background: rgba(255,255,255,.08); }
html.theme-dark .agent-name-input { color: #f2f7f5; background: rgba(255,255,255,.06); }
html.theme-dark .agent-role { color: #b6c6c0; }
html.theme-dark .agent-status.on { color: #6ee7b7; background: rgba(16,185,129,.14); }
html.theme-dark .agent-status.off { color: #a3b5af; background: rgba(255,255,255,.08); }
html.theme-dark .agent-desc { color: #b6c6c0; }
html.theme-dark .agent-live { color: #6ee7b7; background: rgba(16,185,129,.12); border-color: rgba(16,185,129,.26); }
html.theme-dark .agent-foot { border-top-color: rgba(255,255,255,.06); }
html.theme-dark .agent-mem { color: #7eebd6; background: rgba(45,230,198,.08); border-color: rgba(45,230,198,.26); }
html.theme-dark .agent-btn.on { background: linear-gradient(135deg, #10a795, #0d9488) !important; color: #fff !important; }
html.theme-dark .agent-btn.off { background: rgba(255,255,255,.06) !important; color: #b6c6c0 !important; border-color: rgba(255,255,255,.12) !important; }
html.theme-dark .team-note { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .agent-card .agent-status.bwlk-meet { background: linear-gradient(135deg, rgba(124,92,255,.18), rgba(59,130,246,.14)); border-color: rgba(124,92,255,.36); color: #c4b5fd; }
html.theme-dark .agent-card.bwlk-lihi { background: linear-gradient(#14231f, #14231f) padding-box,
  linear-gradient(90deg, #ea4335, #2DE6C6, #7c5cff, #ffb300, #ea4335) border-box !important; }
html.theme-dark .team-inline-link { color: #2de6c6; }

/* ═════════════════════════════════════════════════════════════
   PAGE: BILLING (.bwpl-, .ucost-, .bwb-) - out-!importants the
   template's own glass pass.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark body.bw-theme .page-content .card {
  background: rgba(22,36,33,.66) !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  box-shadow: 0 14px 40px -18px rgba(0,0,0,.6), 0 6px 24px -14px rgba(45,230,198,.12) !important; }
html.theme-dark body.bw-theme .page-content .card-header { border-bottom: 1px solid rgba(45,230,198,.12) !important; }
html.theme-dark body.bw-theme .page-content .card-header h3 { color: #7eebd6 !important; }
html.theme-dark .page-content .btn-secondary { border-color: rgba(45,230,198,.3); color: #7eebd6; background: rgba(255,255,255,.05); }
html.theme-dark .page-content .btn-secondary:hover { background: rgba(45,230,198,.1); }
html.theme-dark .bwb-hero { background: linear-gradient(135deg, rgba(45,230,198,.12), rgba(22,36,33,.85)) !important; }
html.theme-dark .bwpl-orbrow i { border-color: #14211e; }
html.theme-dark .bwpl-orbrow em { color: #a3b5af; }
html.theme-dark .bwpl-tier, html.theme-dark .bwpl-scard { border-color: rgba(255,255,255,.1) !important; background: rgba(22,36,33,.7) !important;
  box-shadow: 0 14px 34px -20px rgba(0,0,0,.6) !important; }
html.theme-dark .bwpl-scard-am { background: linear-gradient(160deg, rgba(245,183,49,.07), rgba(22,36,33,.7)) !important; }
html.theme-dark .usage-bar-wrap { background: rgba(255,255,255,.1); }
html.theme-dark .ucost { background: rgba(22,36,33,.66); border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 8px 30px -18px rgba(0,0,0,.55); }
html.theme-dark .ucost-sub, html.theme-dark .ucost-legend { color: #a3b5af; }
html.theme-dark .ucost-bal b { color: #2de6c6; }
html.theme-dark .ucost-bal span, html.theme-dark .ucost-mo { color: #a3b5af; }
html.theme-dark .ucost-chart { border-bottom-color: rgba(255,255,255,.08); }
html.theme-dark .uc-slider { background: rgba(255,255,255,.2); }
html.theme-dark .uc-lab { color: #b6c6c0; }
html.theme-dark .uc-lab b { color: #f2f7f5; }
html.theme-dark .bwpl-sub { color: #a3b5af; }
html.theme-dark .bwpl-toggle { background: rgba(255,255,255,.08); }
html.theme-dark .bwpl-toggle button { color: #a3b5af; }
html.theme-dark .bwpl-toggle button.on { background: #1d312c; color: #f2f7f5; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
html.theme-dark .bwpl-toggle button em { color: #7eebd6; }
html.theme-dark .bwpl-tier:hover { box-shadow: 0 14px 30px rgba(0,0,0,.6) !important; }
html.theme-dark .bwpl-name, html.theme-dark .bwpl-sdesc, html.theme-dark .bwpl-agency span { color: #b6c6c0; }
html.theme-dark .bwpl-price, html.theme-dark .bwpl-solos-head, html.theme-dark .bwpl-sname,
html.theme-dark .bwpl-sfoot b, html.theme-dark .bwpl-agency b, html.theme-dark .mono-price { color: #f2f7f5; }
html.theme-dark .bwpl-price span, html.theme-dark .bwpl-solos-head span, html.theme-dark .bwpl-sname em,
html.theme-dark .bwpl-sfoot b span, html.theme-dark .mono-price i, html.theme-dark .bwpl-fine { color: #a3b5af; }
html.theme-dark .bwpl-tier li { color: #cfdcd7; }
html.theme-dark .bwpl-btn { border-color: rgba(45,230,198,.4); background: rgba(45,230,198,.08); color: #7eebd6; }
html.theme-dark .bwpl-solos-head { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .bwpl-agency { background: linear-gradient(135deg, rgba(45,230,198,.08), rgba(45,230,198,.05)); border-color: rgba(45,230,198,.3); }
html.theme-dark .bwpl-msg { background: rgba(45,230,198,.09); border-color: rgba(45,230,198,.3); color: #9be8db; }

/* ═════════════════════════════════════════════════════════════
   PAGE: SETTINGS (.ss-, .ntf-, .nx-, .so-, .apr- chrome)
   The JS-injected .ss- styles land LAST: scope wins, not order.
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .ss-nav-item { color: #b6c6c0; }
html.theme-dark .ss-nav-item svg { color: #8b9d97; }
html.theme-dark .ss-nav-item:hover { background: rgba(255,255,255,.06); color: #f2f7f5; }
html.theme-dark .ss-nav-item:hover svg { color: #b6c6c0; }
html.theme-dark .ss-nav-item.is-active { background: rgba(45,230,198,.16); color: #2de6c6; }
html.theme-dark .ss-nav-item.is-active svg { color: #2de6c6; }
html.theme-dark .ntf-event-title { color: #f2f7f5; }
html.theme-dark .ntf-slider { background: rgba(255,255,255,.2); }
html.theme-dark .apr-opt { background: rgba(255,255,255,.05); }
html.theme-dark .apr-thumb { border-color: rgba(255,255,255,.14); }
/* .apr-light/.apr-dark/.apr-sys previews stay exactly as designed */
html.theme-dark .nx-lbl { color: #a3b5af; }
html.theme-dark .nx-card, html.theme-dark .nx-evt, html.theme-dark .nx-log {
  background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.09); box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html.theme-dark .nx-state { border-color: rgba(45,230,198,.2); background: linear-gradient(135deg, rgba(45,230,198,.12), rgba(22,36,33,.85) 62%); }
html.theme-dark .nx-state-txt b, html.theme-dark .nx-row-txt b, html.theme-dark .nx-ltxt b,
html.theme-dark .nx-log > summary, html.theme-dark .nx-mail p, html.theme-dark .nx-times input,
html.theme-dark .nx-sel, html.theme-dark .nx-add input, html.theme-dark .nx-find input { color: #f2f7f5; }
html.theme-dark .nx-state-txt s { color: #a3b5af; }
html.theme-dark .nx-row { border-top-color: rgba(255,255,255,.06); }
html.theme-dark .nx-row-txt s, html.theme-dark .nx-note, html.theme-dark .nx-ltxt s,
html.theme-dark .nx-mail i, html.theme-dark .nx-lempty { color: #a3b5af; }
html.theme-dark .nx-chip { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.06); color: #b6c6c0; }
html.theme-dark .nx-apseg { background: rgba(255,255,255,.08); }
html.theme-dark .nx-apseg button { color: #a3b5af; }
html.theme-dark .nx-apseg button.on { background: #1d312c; color: #f2f7f5; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
html.theme-dark .nx-apseg button.on[data-mode="auto"] { color: #7eebd6; }
html.theme-dark .nx-apseg button.on[data-mode="copilot"] { color: #c4b5fd; }
html.theme-dark .nx-sw span { background: rgba(255,255,255,.2); }
html.theme-dark .nx-times u { color: #b6c6c0; }
html.theme-dark .nx-times input, html.theme-dark .nx-sel, html.theme-dark .nx-add input,
html.theme-dark .nx-find input { border-color: rgba(255,255,255,.14); background: rgba(255,255,255,.06); }
html.theme-dark .nx-mail div { border-bottom-color: rgba(255,255,255,.06); }
html.theme-dark .nx-mail button { color: #fca5a5; }
html.theme-dark .nx-foot, html.theme-dark .nx-log > summary i, html.theme-dark .nx-log > summary u { color: #a3b5af; }
html.theme-dark #nxAcctWrap::after { background: linear-gradient(rgba(11,21,19,0), rgba(11,21,19,.95)); }
html.theme-dark .nx-acct-here { color: #7eebd6; background: rgba(45,230,198,.14); }
html.theme-dark .nx-subline { color: #b6c6c0; border-bottom-color: rgba(255,255,255,.06); }
html.theme-dark .nx-subline svg { color: #2de6c6; }
html.theme-dark .nx-test { border-color: rgba(45,230,198,.36); background: rgba(45,230,198,.1); color: #7eebd6; }
html.theme-dark .nx-result { color: #4cc9b4; }
html.theme-dark .nx-result.bad { color: #fca5a5; }
html.theme-dark .nx-logbody { border-top-color: rgba(255,255,255,.06); }
html.theme-dark .nx-lrow { border-bottom-color: rgba(255,255,255,.05); }
html.theme-dark .nx-lrow.skip .nx-ldot { background: #5f736c; }
html.theme-dark .nx-lwhen { color: #8b9d97; }
html.theme-dark .so-row { border-color: rgba(248,113,113,.24); background: rgba(22,36,33,.8); color: #fca5a5;
  box-shadow: 0 5px 20px -12px rgba(0,0,0,.6); }
html.theme-dark .so-sheet { background: rgba(16,29,26,.98); border-top-color: rgba(255,255,255,.09);
  box-shadow: 0 -24px 60px -18px rgba(0,0,0,.8); }
html.theme-dark .so-sheet h4 { color: #f2f7f5; }
html.theme-dark .so-sheet p { color: #a3b5af; }
html.theme-dark .so-stay { color: #b6c6c0; }
/* Branding/white-label inline plates: client logos keep a LIGHT plate */
html.theme-dark #brandLogoPreview, html.theme-dark #wlLogoPreview { background: #f6f8f7 !important; border-color: rgba(255,255,255,.2) !important; }

/* ═════════════════════════════════════════════════════════════
   PARTIAL: AGENT HERO (.agh-*) - the terminal-window assistant
   ═════════════════════════════════════════════════════════════ */
html.theme-dark .agh { background: rgba(20,34,30,.9); }
html.theme-dark .agh-bar { border-bottom-color: rgba(255,255,255,.07);
  background: linear-gradient(180deg, rgba(28,44,40,.9), rgba(20,34,30,.85)); }
html.theme-dark .agh-dots i { background: rgba(255,255,255,.16); }
html.theme-dark .agh-url { color: #a3b5af; }
html.theme-dark .agh-live { color: #4cc9b4; }
html.theme-dark .agh-name { color: #f2f7f5; }
html.theme-dark .agh-role { color: #a3b5af; }
html.theme-dark .agh-line { color: #c6d4cf; }
html.theme-dark .agh-line b { color: #7eebd6; }
html.theme-dark .agh-in { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .agh-in::placeholder { color: #8b9d97; }
html.theme-dark .agh-send { background: linear-gradient(135deg, #10a795, #0d9488); }
html.theme-dark .agh-send:hover { background: #10a795; }
html.theme-dark .agh-sugs button { color: #cfdcd7; background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
html.theme-dark .agh-sugs button:hover { color: #7eebd6; }
html.theme-dark .agh-frame { box-shadow: 0 24px 70px -22px rgba(0,0,0,.6), 0 0 26px -10px var(--ahc); }
html.theme-dark.bw-native .agh, html.theme-dark .bw-native .agh { background: rgba(20,34,30,.92); }
html.theme-dark.bw-native .agh-form { border-color: rgba(255,255,255,.12); background: rgba(255,255,255,.05); }
html.theme-dark.bw-native .agh-form:focus-within { border-color: rgba(45,230,198,.4);
  box-shadow: 0 0 0 3px rgba(45,230,198,.1); }

/* Mint-filled CTAs are <a> tags: the global dark link color would paint
   them mint-on-mint. Their ink stays deep teal. */
html.theme-dark body.bw-theme a.bb-cta, html.theme-dark .bb-cta { color: #07211c !important; }
html.theme-dark body.bw-theme a.lov-cta, html.theme-dark .lov-cta { color: #07211c !important; }

/* ── AGENT SWITCHER (shipped light-only; Guy: "looks bad on dark") ─────────
   Names were near-invisible grey, the selected row a white slab, the chip
   washed out. Same shapes, night palette, luminous ink. */
html.theme-dark .cw-ag-btn { background: rgba(22,36,33,.72); border-color: rgba(45,230,198,.26);
  color: #cfe0da; }
html.theme-dark .cw-ag-btn:hover { color: #7eebd6; border-color: rgba(45,230,198,.5); }
html.theme-dark .cw-ag-menu { background: linear-gradient(rgba(18,30,27,.97), rgba(18,30,27,.97)) padding-box,
  linear-gradient(135deg, rgba(45,230,198,.34), rgba(93,131,216,.24), rgba(45,230,198,.34)) border-box;
  box-shadow: 0 22px 60px -18px rgba(0,0,0,.75); }
html.theme-dark .cw-ag-cap { color: #8b9d97; }
html.theme-dark .cw-ag-row b { color: #f2f7f5; }
html.theme-dark .cw-ag-row s { color: #a3b5af; }
html.theme-dark .cw-ag-row:hover { background: rgba(255,255,255,.06); }
html.theme-dark .cw-ag-row.on { background: rgba(45,230,198,.14); border-color: rgba(45,230,198,.34); }
html.theme-dark .cw-ag-row.on b { color: #7eebd6; }
html.theme-dark .cw-ag-row.on s { color: #b6c6c0; }

/* ═════════════════════════════════════════════════════════════════════
   ROUND 2 (2026-08-23) - "the dark version doesn't look good in some
   parts". The families the first round never reached. Every rule here is
   scoped html.theme-dark, so light is untouched by construction.
   ═════════════════════════════════════════════════════════════════════ */

/* ── SHARED: compact filter dropdowns (leads, calls, campaigns, forms) ── */
html.theme-dark .filter-drop-btn { background: rgba(22,36,33,.72); color: #e8efec;
  border-color: rgba(255,255,255,.12); box-shadow: 0 1px 2px rgba(0,0,0,.35); }
html.theme-dark .filter-drop-btn:hover { background: rgba(45,230,198,.1);
  border-color: rgba(45,230,198,.42); box-shadow: 0 2px 10px rgba(0,0,0,.4); }
html.theme-dark .filter-drop-btn.has-value { background: rgba(45,230,198,.14);
  border-color: rgba(45,230,198,.5); color: #d7efe9; }
html.theme-dark .filter-drop-btn-label { color: #a3b5af; }
html.theme-dark .filter-drop-btn.has-value .filter-drop-btn-label { color: #7eebd6; }
html.theme-dark .filter-drop-panel { background: #14231f; border-color: rgba(255,255,255,.1);
  box-shadow: 0 18px 48px rgba(0,0,0,.7); }
html.theme-dark .filter-drop-opt { color: #cfdcd7; }
html.theme-dark .filter-drop-opt:hover { background: rgba(255,255,255,.07); }
html.theme-dark .filter-drop-opt.is-selected { background: rgba(45,230,198,.14); color: #f2f7f5; }
html.theme-dark .filter-drop-opt-check { color: #2de6c6; }

/* ── SHARED: source + status pills. Same hue families, night translucent
   grounds, luminous ink - the palette rule from round one. ── */
html.theme-dark .lead-source { background: rgba(255,255,255,.07); color: #cfdcd7;
  border-color: rgba(255,255,255,.13); }
html.theme-dark .lead-source.google, html.theme-dark .lead-source.google_ads,
html.theme-dark .lead-source.google_organic { background: rgba(16,185,129,.16); color: #6ee7b7; border-color: rgba(16,185,129,.34); }
html.theme-dark .lead-source.google_ads_call, html.theme-dark .lead-source.meta,
html.theme-dark .lead-source.meta_ads, html.theme-dark .lead-source.meta_organic { background: rgba(59,130,246,.18); color: #93c5fd; border-color: rgba(59,130,246,.36); }
html.theme-dark .lead-source.gbp, html.theme-dark .lead-source.lsa { background: rgba(16,185,129,.14); color: #5eead4; border-color: rgba(16,185,129,.3); }
html.theme-dark .lead-source.yelp { background: rgba(239,68,68,.16); color: #fca5a5; border-color: rgba(239,68,68,.34); }
html.theme-dark .lead-source.website, html.theme-dark .lead-source.direct { background: rgba(255,255,255,.07); color: #b6c6c0; border-color: rgba(255,255,255,.14); }
html.theme-dark .lead-source.bing, html.theme-dark .lead-source.bing_ads,
html.theme-dark .lead-source.bing_organic { background: rgba(245,158,11,.16); color: #fcd34d; border-color: rgba(245,158,11,.34); }
html.theme-dark .lead-source.call { background: rgba(236,72,153,.18); color: #f9a8d4; border-color: rgba(236,72,153,.36); }
html.theme-dark .lead-source.form { background: rgba(172,219,39,.16); color: #cdea6e; border-color: rgba(172,219,39,.36); }
html.theme-dark .lead-source.chat_widget { background: rgba(56,189,248,.18); color: #7dd3fc; border-color: rgba(56,189,248,.36); }
html.theme-dark .stage-pill-menu { background: #14231f; border-color: rgba(255,255,255,.1);
  box-shadow: 0 18px 48px rgba(0,0,0,.7); }
html.theme-dark .stage-pill-opt { color: #cfdcd7; }
html.theme-dark .stage-pill-opt:hover { background: rgba(255,255,255,.07); }
html.theme-dark .stage-pill-opt.is-selected { background: rgba(45,230,198,.12); color: #f2f7f5; }

/* ── PAGE: LEADS (.cl-, .ld-, .lv-) ── */
html.theme-dark .cl-stat { background: linear-gradient(135deg, rgba(45,230,198,.07), rgba(22,36,33,.72) 70%);
  border-color: rgba(255,255,255,.09); }
html.theme-dark .cl-stat:hover { border-color: rgba(45,230,198,.4); }
html.theme-dark .cl-stat--hi { background: linear-gradient(135deg, rgba(45,230,198,.16), rgba(22,36,33,.72) 60%);
  border-color: rgba(45,230,198,.42); }
html.theme-dark .cl-stat-val { color: #f2f7f5; }
html.theme-dark .cl-count { background: rgba(22,36,33,.72); border-color: rgba(45,230,198,.28); color: #a3b5af; }
html.theme-dark .ld-btn-out { background: rgba(22,36,33,.72); border-color: rgba(45,230,198,.28);
  color: #cfdcd7; box-shadow: 0 1px 2px rgba(0,0,0,.35); }
html.theme-dark .ld-btn-out:hover { background: rgba(45,230,198,.12); border-color: rgba(45,230,198,.5); color: #f2f7f5; }
html.theme-dark .lv-tab { background: rgba(22,36,33,.72); border-color: rgba(45,230,198,.28); color: #a3b5af; }
html.theme-dark .lv-tab.is-active { background: #2de6c6; color: #07211c; border-color: #2de6c6; }
html.theme-dark .ld-panel { background: #101d1a; box-shadow: -12px 0 60px rgba(0,0,0,.7); }
html.theme-dark .ld-panel-hd { border-bottom-color: rgba(255,255,255,.1);
  background: linear-gradient(180deg, #14231f, #101d1a); }
html.theme-dark .ld-panel-hd h3 { color: #f2f7f5; }
html.theme-dark .ld-panel-x { background: rgba(255,255,255,.07); color: #cfdcd7; }
html.theme-dark .ld-panel-x:hover { background: rgba(239,68,68,.18); color: #fca5a5; }
html.theme-dark .ld-panel-ft { border-top-color: rgba(255,255,255,.1); }
html.theme-dark .ld-top-actions { background: linear-gradient(180deg, rgba(45,230,198,.07), rgba(22,36,33,.6));
  border-color: rgba(45,230,198,.2); }
html.theme-dark #leadsTable tr:hover { background: rgba(45,230,198,.07); }

/* ── PAGE: CALENDAR (.twc-) ── */
html.theme-dark .twc-hero h1, html.theme-dark .twc-stat b, html.theme-dark .twc-nav b { color: #f2f7f5; }
html.theme-dark .twc-hero p { color: #a3b5af; }
html.theme-dark .twc-stat { background: rgba(22,36,33,.75); border-color: rgba(255,255,255,.08); }
html.theme-dark .twc-stat:hover { box-shadow: 0 12px 30px rgba(0,0,0,.5); }
html.theme-dark .twc-stat span { color: #8b9d97; }
html.theme-dark .twc-pill { background: rgba(22,36,33,.78); border-color: rgba(255,255,255,.1); color: #cfdcd7; }
html.theme-dark .twc-pill:hover { border-color: rgba(45,230,198,.4); box-shadow: 0 8px 22px rgba(0,0,0,.5); }
html.theme-dark .twc-pill.on { background: linear-gradient(135deg, rgba(13,148,136,.95), rgba(45,230,198,.9));
  color: #07211c; border-color: transparent; }
html.theme-dark .twc-nav > button:not(.twc-create) { background: rgba(22,36,33,.78);
  border-color: rgba(255,255,255,.12); color: #cfdcd7; }
html.theme-dark .twc-nav > button:not(.twc-create):hover { background: #2de6c6; color: #07211c; }
html.theme-dark .twc-card { background: rgba(22,36,33,.8); border-color: rgba(255,255,255,.08); }
html.theme-dark .twc-day { background: rgba(255,255,255,.04); border-color: rgba(255,255,255,.07); }
html.theme-dark .twc-day:hover { border-color: rgba(45,230,198,.3); box-shadow: 0 12px 26px -10px rgba(0,0,0,.6); }
html.theme-dark .twc-day.other { background: rgba(255,255,255,.015); }
html.theme-dark .twc-day.today { border-color: rgba(45,230,198,.5);
  background: linear-gradient(160deg, rgba(45,230,198,.14), rgba(255,255,255,.04) 60%); }
html.theme-dark .twc-num { color: #a3b5af; }
html.theme-dark .twc-dow { color: #8b9d97; }
/* Calendar chips: the light tints are 3-10% alpha with dark ink - invisible
   at night. Same hue families, lifted grounds, luminous ink. */
html.theme-dark .twc-chip.pub, html.theme-dark .twc-chip.plan { background: rgba(234,67,53,.18); color: #fca5a5; border-color: rgba(234,67,53,.42); }
html.theme-dark .twc-chip.rev, html.theme-dark .twc-chip.plan-offer { background: rgba(245,158,11,.18); color: #fcd34d; border-color: rgba(245,158,11,.42); }
html.theme-dark .twc-chip.fail { background: rgba(239,68,68,.2); color: #fca5a5; border-color: rgba(239,68,68,.45); }
html.theme-dark .twc-chip.plan-qa { background: rgba(124,92,255,.2); color: #c4b5fd; border-color: rgba(124,92,255,.45); }
html.theme-dark .twc-chip.art, html.theme-dark .twc-chip.art.live { background: rgba(93,155,255,.2); color: #93c5fd; border-color: rgba(93,155,255,.45); }
html.theme-dark .twc-chip.sys { background: rgba(255,255,255,.06); color: #a3b5af; border-color: rgba(255,255,255,.2); }
html.theme-dark .twc-chip.photo { background: rgba(16,185,129,.18); color: #6ee7b7; border-color: rgba(16,185,129,.45); }
html.theme-dark .twc-more { background: rgba(255,255,255,.07); color: #a3b5af; }
html.theme-dark .twc-menu { background: linear-gradient(180deg, rgba(20,35,31,.98), rgba(16,29,26,.98));
  border-color: rgba(255,255,255,.1); box-shadow: 0 20px 56px rgba(0,0,0,.7); }
html.theme-dark .twc-menu button { color: #cfdcd7; }
html.theme-dark .twc-menu button:hover { background: rgba(45,230,198,.1); }
html.theme-dark .twc-menu button small { color: #8b9d97; }
html.theme-dark .twc-create { border-color: rgba(124,92,255,.45); }

/* ── PAGE: LOOPS / AUTOMATIONS (.lp-, .lps-) ── */
html.theme-dark .lp-head h1 { color: #f2f7f5; }
html.theme-dark .lp-head p, html.theme-dark .lp-count { color: #a3b5af; }
html.theme-dark .lp-pulse { background: rgba(22,36,33,.75); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp-stat b, html.theme-dark .lp-count b, html.theme-dark .lp-sent b { color: #f2f7f5; }
html.theme-dark .lp-stat span { color: #8b9d97; }
html.theme-dark .lp-ask { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
html.theme-dark .lp-ask input { color: #f2f7f5; }
html.theme-dark .lp-ask input::placeholder { color: #8b9d97; }
html.theme-dark .lp-ask button { background: #2de6c6; color: #07211c; }
html.theme-dark .lp-ask button:hover { background: #7eebd6; }
html.theme-dark .lp-ask-out { background: rgba(45,230,198,.09); border-color: rgba(45,230,198,.22); color: #cfdcd7; }
html.theme-dark .lp-rail { background: rgba(22,36,33,.75); border-color: rgba(255,255,255,.08); }
html.theme-dark .lp-card { background: rgba(22,36,33,.72); border-color: rgba(255,255,255,.09); }
html.theme-dark .lp-card:hover { border-color: rgba(45,230,198,.35); box-shadow: 0 14px 40px -18px rgba(0,0,0,.7); }
html.theme-dark .lp-sent { color: #cfdcd7; }
html.theme-dark .lp-actions { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .lp-abtn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #cfdcd7; }
html.theme-dark .lp-abtn:hover { border-color: #2de6c6; color: #7eebd6; }
html.theme-dark .lp-sw i { background: rgba(255,255,255,.16); }
html.theme-dark .lp-sw i::after { background: #e8efec; }
html.theme-dark .lp-empty h3 { color: #f2f7f5; }
html.theme-dark .lp-empty p, html.theme-dark .lp-starters-label { color: #a3b5af; }
html.theme-dark .lps-card { background: rgba(22,36,33,.72); border-color: rgba(255,255,255,.09); }
html.theme-dark .lps-card:hover { border-color: rgba(45,230,198,.35); }
html.theme-dark .lps-card b, html.theme-dark .lps-card h4 { color: #f2f7f5; }
html.theme-dark .lps-card p, html.theme-dark .lps-card small { color: #a3b5af; }
html.theme-dark .lp-card.off .lp-loop .a { stroke: #3a4f49; }
html.theme-dark .lp-card.off .lp-loop .ic { color: #6b7d77; }

/* ── PAGE: A2P / PHONE TABS (.a2p-, .pn-tab) ── */
html.theme-dark .pn-tabs { background: rgba(22,36,33,.75); border-color: rgba(255,255,255,.1); }
html.theme-dark .pn-tab.is-active { color: #07211c; }
html.theme-dark .pn-tab-pill[data-pn-status="draft"] { background: rgba(255,255,255,.1); color: #b6c6c0; }
html.theme-dark .pn-tab-pill[data-pn-status="submitted"] { background: rgba(245,158,11,.18); color: #fcd34d; }
html.theme-dark .pn-tab-pill[data-pn-status="under_review"] { background: rgba(59,130,246,.2); color: #93c5fd; }
html.theme-dark .pn-tab-pill[data-pn-status="approved"] { background: rgba(16,185,129,.18); color: #6ee7b7; }
html.theme-dark .pn-tab-pill[data-pn-status="rejected"] { background: rgba(239,68,68,.18); color: #fca5a5; }
html.theme-dark .pn-tab { color: #a3b5af; }
html.theme-dark .pn-tab:hover { background: rgba(255,255,255,.06); color: #f2f7f5; }
html.theme-dark .pn-tab.on { color: #2de6c6; }
html.theme-dark .a2p-card, html.theme-dark .a2p-admin-card, html.theme-dark .a2p-pm-card,
html.theme-dark .a2p-tmpl-card, html.theme-dark .a2p-rd, html.theme-dark .a2p-smart,
html.theme-dark .a2p-notes { background: rgba(22,36,33,.72); border-color: rgba(255,255,255,.09);
  box-shadow: 0 1px 2px rgba(0,0,0,.3); }
html.theme-dark .a2p-card-t, html.theme-dark .a2p-smart-t, html.theme-dark .a2p-pm-label-t,
html.theme-dark .a2p-tmpl-chip-t, html.theme-dark .a2p-smart-btn-t { color: #f2f7f5; }
html.theme-dark .a2p-primer-body, html.theme-dark .a2p-primer-grid p,
html.theme-dark .a2p-notes-body, html.theme-dark .a2p-tip, html.theme-dark .a2p-tip ul { color: #b6c6c0; }
html.theme-dark .a2p-input { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.13); color: #f2f7f5; }
html.theme-dark .a2p-input::placeholder { color: #8b9d97; }
html.theme-dark .a2p-input:focus { border-color: rgba(45,230,198,.55); }
html.theme-dark .a2p-btn { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.13); color: #cfdcd7; }
html.theme-dark .a2p-btn:hover { background: rgba(45,230,198,.1); border-color: rgba(45,230,198,.4); }
html.theme-dark .a2p-btn-primary { background: #2de6c6; color: #07211c; border-color: transparent; }
html.theme-dark .a2p-btn-ghost { background: transparent; }
html.theme-dark .a2p-btn-danger { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.3); color: #fca5a5; }
html.theme-dark .a2p-btn-danger:hover { background: rgba(239,68,68,.22); }
html.theme-dark .a2p-smart-btn { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
html.theme-dark .a2p-smart-btn:hover { border-color: rgba(45,230,198,.4); background: rgba(45,230,198,.08); }
html.theme-dark .a2p-smart-ic { background: rgba(45,230,198,.12); border-color: rgba(45,230,198,.26); color: #7eebd6; }
html.theme-dark .a2p-rd-bar-wrap { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.08); }
html.theme-dark .a2p-rd-miss-pill { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.3); color: #fcd34d; }
html.theme-dark .a2p-tmpl-chip { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.12); }
html.theme-dark .a2p-pm-panel { background: rgba(255,255,255,.04); }
html.theme-dark .a2p-pm-foot { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .a2p-status-pill[data-status="draft"] { background: rgba(255,255,255,.08); color: #b6c6c0; }
html.theme-dark .a2p-status-pill[data-status="submitted"] { background: rgba(59,130,246,.18); color: #93c5fd; }
html.theme-dark .a2p-status-pill[data-status="under_review"] { color: #fcd34d; }
html.theme-dark .a2p-status-pill[data-status="rejected"] { background: rgba(239,68,68,.16); color: #fca5a5; }

/* ── PAGE: AUTOMATION HUB (.ah-). The page reads var(--card-bg,#fff) and
   that token was never defined anywhere, so #fff always won. ── */
html.theme-dark .ah-wrap { --card-bg: rgba(22,36,33,.72); }
html.theme-dark .ah-mod, html.theme-dark .ah-ring-card, html.theme-dark .ah-appr {
  background: rgba(22,36,33,.72); border-color: rgba(255,255,255,.09); }
html.theme-dark .ah-ring::after { background: #16241f; }
html.theme-dark .ah-mod-name, html.theme-dark .ah-ring-lbl b { color: #f2f7f5; }
html.theme-dark .ah-mod-meta, html.theme-dark .ah-ring-lbl, html.theme-dark .ah-sub,
html.theme-dark .ah-count, html.theme-dark .ah-loading, html.theme-dark .ah-appr-prev { color: #a3b5af; }
html.theme-dark .ah-mod-note, html.theme-dark .ah-dot.warn { color: #fcd34d; }
html.theme-dark .ah-dot.off { background: #4a5d57; }
html.theme-dark .ah-switch { background: #4a5d57; }
html.theme-dark .ah-switch::after { background: #e8efec; }
html.theme-dark .ah-empty { border-color: rgba(255,255,255,.14); color: #a3b5af; }
html.theme-dark .ah-btn.no { border-color: rgba(255,255,255,.14); color: #cfdcd7; }
html.theme-dark .ah-chip { background: rgba(45,230,198,.12); color: #7eebd6; }
html.theme-dark .ah-chip.violet { background: rgba(124,92,214,.2); color: #c4b5fd; }
html.theme-dark .ah-appr-link { color: #2de6c6; }

/* ── PAGE: OPTIMIZER (.opt-) - page-local token block, so flip the tokens ── */
html.theme-dark .opt-shell {
  --ink: #f2f7f5; --muted: #a3b5af; --muted-2: #8b9d97;
  --line: rgba(255,255,255,.11); --line-2: rgba(255,255,255,.06);
  --surface: rgba(22,36,33,.72); --surface-alt: rgba(255,255,255,.04);
  --p-50: rgba(45,230,198,.06); --p-100: rgba(45,230,198,.12);
  --p-200: rgba(45,230,198,.24); --p-300: rgba(45,230,198,.36);
  --p: #2de6c6; --p-deeper: #7eebd6;
  --g-50: rgba(172,219,39,.08); --g-100: rgba(172,219,39,.14); --g-200: rgba(172,219,39,.28);
  --g-dark: #cdea6e;
  background: none; }
html.theme-dark .opt-hero-eyebrow { background: rgba(22,36,33,.8); border-color: rgba(124,92,255,.45); }
html.theme-dark .opt-sub { color: #a3b5af; }
html.theme-dark .opt-field-lbl { color: #a3b5af; }
html.theme-dark .opt-select { background: rgba(255,255,255,.05); color: #f2f7f5; }
html.theme-dark .opt-tab:hover { background: rgba(255,255,255,.06); }
html.theme-dark .opt-tab.active { color: #07211c; }
html.theme-dark .opt-tab.active .opt-tab-icon { color: #07211c; }
html.theme-dark .opt-tab.active .opt-tab-count { background: rgba(7,33,28,.25); color: #07211c; }

/* ── SMALL LEFTOVERS ── */
html.theme-dark .team-empty { background: rgba(22,36,33,.6); border-color: rgba(255,255,255,.14); }
html.theme-dark .team-empty-title { color: #f2f7f5; }
html.theme-dark .ig-name { color: #f2f7f5; }
html.theme-dark .ig-pill.off { background: rgba(255,255,255,.08); color: #a3b5af; }
html.theme-dark .camp-filter { background: rgba(255,255,255,.07); }
html.theme-dark .camp-filter button { color: #a3b5af; }
html.theme-dark .camp-filter button.on { background: #1d312c; color: #2de6c6; }

/* ── FINAL LEAKS (round 2, second probe pass) ── */
html.theme-dark .lps-name { color: #f2f7f5; }
html.theme-dark .lps-desc, html.theme-dark .lps-sub { color: #a3b5af; }
html.theme-dark .team-empty-sub { color: #a3b5af; }
html.theme-dark .camp-chip { color: #a3b5af; }
html.theme-dark .camp-chip.active { background: #1d312c; color: #2de6c6; box-shadow: none; }
html.theme-dark .a2p-tip em { background: rgba(255,255,255,.05); color: #cfdcd7;
  border-color: rgba(172,219,39,.35); }
html.theme-dark .a2p-smart-btn-s { color: #a3b5af; }
html.theme-dark .am-platform--google { background: rgba(16,185,129,.16); color: #6ee7b7; }
html.theme-dark .am-platform--meta, html.theme-dark .am-platform--bing { background: rgba(59,130,246,.18); color: #93c5fd; }
html.theme-dark .am-platform--yelp { background: rgba(239,68,68,.16); color: #fca5a5; }

/* ── The betterweb-theme body layer uses !important on a few chips, so the
   dark rules have to match its weight to win. ── */
html.theme-dark body.bw-theme .lead-source.form {
  background: rgba(45,230,198,.14) !important; color: #7eebd6 !important;
  border-color: rgba(45,230,198,.4) !important; }
html.theme-dark body.bw-theme .lv-tab { background: rgba(22,36,33,.72); border-color: rgba(45,230,198,.28); color: #a3b5af; }
html.theme-dark body.bw-theme .lv-tab:hover { background: rgba(45,230,198,.1); border-color: #2de6c6; color: #7eebd6; }
html.theme-dark body.bw-theme .ag2-cw-toggle { background: rgba(255,255,255,.06) !important;
  border-color: rgba(255,255,255,.12) !important; }

/* ── SHARED: the date-range pill bar (leads, dashboard, campaigns, reports).
   Its ground is a GRADIENT, which is why a background-color probe never saw
   it - it stayed a white bar on every page that carries one. ── */
html.theme-dark .gp-date-wrap, html.theme-dark [id$="DatePicker"] {
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(45,230,198,.12) 0%, transparent 55%),
    radial-gradient(90% 140% at 100% 100%, rgba(124,106,255,.16) 0%, transparent 55%),
    linear-gradient(180deg, rgba(22,36,33,.8) 0%, rgba(16,29,26,.86) 100%);
  border-color: rgba(124,106,255,.34);
  box-shadow: 0 3px 14px rgba(0,0,0,.45); }
html.theme-dark .gp-date { color: #a3b5af; }
html.theme-dark .gp-date:hover:not(.active) { color: #f2f7f5; background: rgba(255,255,255,.07); box-shadow: none; }
html.theme-dark .gp-cust-panel { background: #14231f; border-color: rgba(255,255,255,.1);
  box-shadow: 0 18px 48px rgba(0,0,0,.7); }
html.theme-dark .gp-cust-input { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.13); color: #f2f7f5; }

/* ── PAGE: CAMPAIGNS drill-down drawer (.drill-) - opens only on a row
   click, which is why the first round never saw it. ── */
html.theme-dark .drill { background: #101d1a; box-shadow: -12px 0 50px rgba(0,0,0,.7); }
html.theme-dark .drill-name { color: #f2f7f5; }
html.theme-dark .drill-sub, html.theme-dark .drill-sec,
html.theme-dark .drill-kpis span, html.theme-dark .drill-kw span { color: #8b9d97; }
html.theme-dark .drill-x { background: rgba(255,255,255,.07); color: #cfdcd7; }
html.theme-dark .drill-x:hover { background: rgba(239,68,68,.18); color: #fca5a5; }
html.theme-dark .drill-kpis > div { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.09); }
html.theme-dark .drill-kpis b { color: #f2f7f5; }
html.theme-dark .drill-kw { background: rgba(255,255,255,.05); color: #cfdcd7; }
html.theme-dark .drill-ad { border-color: rgba(255,255,255,.1); }
html.theme-dark .drill-ad b { color: #8ab4f8; }
html.theme-dark .drill-ad p { color: #a3b5af; }
html.theme-dark .drill-ask { color: #2de6c6; }
html.theme-dark .drill-back { background: rgba(0,0,0,.6); }
html.theme-dark .ag2-prompt { color: #b6c6c0; }

/* Calendar "Create" and the Loops starter tiles: pastel plates that shout on
   a night ground. Same hues, night grounds. */
html.theme-dark .twc-create { background: linear-gradient(135deg, rgba(124,92,255,.2), rgba(59,130,246,.16));
  color: #c4b5fd; }
html.theme-dark .lps-logo { background: color-mix(in srgb, var(--lc,#2de6c6) 16%, #16241f);
  border-color: color-mix(in srgb, var(--lc,#2de6c6) 34%, transparent);
  box-shadow: 0 2px 8px rgba(0,0,0,.4); }
html.theme-dark .lps-foot { border-top-color: rgba(255,255,255,.08); }
html.theme-dark .lps-btn { color: #7eebd6; background: rgba(45,230,198,.1); border-color: rgba(45,230,198,.3); }
html.theme-dark .lps-card:hover .lps-btn { background: #2de6c6; color: #07211c; border-color: #2de6c6; }
html.theme-dark .lp-start { background: rgba(255,255,255,.05); border-color: rgba(255,255,255,.1); }

/* ── THE "pill in a gradient bar" RECIPE, at night. The same three-layer
   gradient ground is used by the date picker, the phone tab bar, the
   optimizer hero/tabs/scorecard - all of them ended in a white
   linear-gradient stop, which no background-COLOR override can reach. ── */
html.theme-dark #pnTabsBar,
html.theme-dark .opt-tabs,
html.theme-dark .opt-sc-cell {
  background:
    radial-gradient(90% 140% at 0% 0%, rgba(45,230,198,.1) 0%, transparent 55%),
    radial-gradient(90% 140% at 100% 100%, rgba(20,184,166,.16) 0%, transparent 55%),
    linear-gradient(180deg, rgba(22,36,33,.82) 0%, rgba(16,29,26,.9) 100%);
  border-color: rgba(45,230,198,.2);
  box-shadow: 0 4px 18px rgba(0,0,0,.45); }
html.theme-dark .opt-hero {
  background:
    radial-gradient(120% 130% at 0% 0%, rgba(45,230,198,.14) 0%, transparent 50%),
    radial-gradient(130% 130% at 100% 100%, rgba(196,188,255,.16) 0%, transparent 55%),
    linear-gradient(180deg, rgba(22,36,33,.8) 0%, rgba(16,29,26,.88) 100%);
  border-color: rgba(45,230,198,.22); }
html.theme-dark .opt-sc-cell:hover { box-shadow: 0 14px 34px rgba(0,0,0,.55); }
html.theme-dark .team-empty-icon { background: linear-gradient(135deg, rgba(255,255,255,.1) 0%, rgba(255,255,255,.05) 100%); }

/* ── Lead-detail drawer controls (only visible once a row is opened) ── */
html.theme-dark .cl-call-btn { background: rgba(16,185,129,.16); color: #6ee7b7; border-color: rgba(16,185,129,.45); }
html.theme-dark .cl-call-btn:hover { background: rgba(16,185,129,.26); box-shadow: 0 4px 14px rgba(0,0,0,.5); }
html.theme-dark .ld-remember-btn { background: #2de6c6; color: #07211c; border-color: transparent; }
html.theme-dark .ld-remember-btn:hover { background: #7eebd6; }
html.theme-dark .ld-status-btn { border-color: rgba(255,255,255,.1); }
html.theme-dark .ld-status-btn.new,      html.theme-dark .ld-status-btn.new.active      { background: rgba(132,204,22,.16);  color: #bef264; }
html.theme-dark .ld-status-btn.qualified,html.theme-dark .ld-status-btn.qualified.active{ background: rgba(124,58,237,.2);   color: #c4b5fd; }
html.theme-dark .ld-status-btn.booked,   html.theme-dark .ld-status-btn.booked.active   { background: rgba(16,185,129,.16);  color: #6ee7b7; }
html.theme-dark .ld-status-btn.won,      html.theme-dark .ld-status-btn.won.active      { background: rgba(6,182,212,.18);   color: #67e8f9; }
html.theme-dark .ld-status-btn.returning,html.theme-dark .ld-status-btn.returning.active{ background: rgba(245,158,11,.16);  color: #fcd34d; }
html.theme-dark .ld-status-btn.lost,     html.theme-dark .ld-status-btn.lost.active     { background: rgba(239,68,68,.16);   color: #fca5a5; }
html.theme-dark .ld-status-btn.spam,     html.theme-dark .ld-status-btn.spam.active     { background: rgba(255,255,255,.07); color: #a3b5af; }
html.theme-dark .ld-status-btn.active { border-color: currentColor; }
html.theme-dark .ld-panel .btn:not(.btn-primary) { background: rgba(255,255,255,.06); color: #cfdcd7; }

/* ------------------------------------------------------------------
   Dark mode: secondary text that never got an override.
   These set a dark colour for the light theme and had no dark
   counterpart, so they rendered dark-on-dark. The integrations card
   descriptions were one of dozens across the portal.
   Grouped by the role the light colour implied, so the hierarchy each
   page was designed with survives the theme flip. Buttons, chips,
   avatars and logos are deliberately excluded - they carry their own
   background and recolouring them blind breaks the control.
   ------------------------------------------------------------------ */
html.theme-dark .ag2-tag-rec,
html.theme-dark .auto-filter,
html.theme-dark .bwchat-bub,
html.theme-dark .clio-roi-vs,
html.theme-dark .ct,
html.theme-dark .ld-cust-apply,
html.theme-dark .lp-rail-head,
html.theme-dark .lp2-prev-biz,
html.theme-dark .lp2-prev-body,
html.theme-dark .lpc-sentence,
html.theme-dark .opt-card-reason,
html.theme-dark .opt-outcome-sum,
html.theme-dark .pbko-line,
html.theme-dark .pl-card-head,
html.theme-dark .pl-md,
html.theme-dark .pl-platform-note,
html.theme-dark .pl-summary-p,
html.theme-dark .sms-bubble-outbound,
html.theme-dark .sms-cmp-body,
html.theme-dark .sms-sub,
html.theme-dark .sms-tab-count,
html.theme-dark .sp,
html.theme-dark .url,
html.theme-dark .v
  { color: #f2f7f5; }

html.theme-dark .a2p-notes-label,
html.theme-dark .a2p-pm-label-s,
html.theme-dark .a2p-rd-label,
html.theme-dark .ag2-cw-pf-timing-s,
html.theme-dark .ds,
html.theme-dark .ig-note,
html.theme-dark .lp2-prev-meta,
html.theme-dark .lppool-eye,
html.theme-dark .opt-card-win,
html.theme-dark .pl-field-lbl,
html.theme-dark .pl-reco-why,
html.theme-dark .pl-row-head,
html.theme-dark .sms-detail-empty-title,
html.theme-dark .sms-field-lbl,
html.theme-dark .sms-lead-meta,
html.theme-dark .sms-preview-lbl,
html.theme-dark .sms-thread-preview,
html.theme-dark .team-card-email,
html.theme-dark .team-modal-sub,
html.theme-dark .team-sub,
html.theme-dark .twc-mangle,
html.theme-dark .wz-ad-callouts,
html.theme-dark .wz-ad-desc,
html.theme-dark .wz-ad-url
  { color: #c6d3ce; }

html.theme-dark .a2p-card-s,
html.theme-dark .a2p-hd-sub,
html.theme-dark .a2p-hint,
html.theme-dark .a2p-pm-close,
html.theme-dark .a2p-pm-subtitle,
html.theme-dark .a2p-rd-msg,
html.theme-dark .a2p-rd-pct,
html.theme-dark .a2p-smart-s,
html.theme-dark .a2p-subhd,
html.theme-dark .a2p-tmpl-s,
html.theme-dark .ag2-cw-coming-t,
html.theme-dark .ag2-cw-palette-sub,
html.theme-dark .aisample,
html.theme-dark .al-meta,
html.theme-dark .al-no-match,
html.theme-dark .at-tab,
html.theme-dark .auto-stat-lbl,
html.theme-dark .auto-stat-sub,
html.theme-dark .fb-tab,
html.theme-dark .feeds,
html.theme-dark .ig-desc,
html.theme-dark .ld-label,
html.theme-dark .lpc-sub,
html.theme-dark .mem-card-feeds,
html.theme-dark .twc-empty,
html.theme-dark .wf-node-ctrl,
html.theme-dark .wf-picker-group-lbl,
html.theme-dark .wf-picker-opt-desc
  { color: #a8b8b2; }

/* Integrations: the card descriptions and status lines had no dark rule at all,
   so they stayed near-black on a dark card. These are the lines that say what
   each integration does - unreadable makes the page useless. */
html.theme-dark .ig-desc { color: #c6d3ce; }
html.theme-dark .ig-sub  { color: #a8b8b2; }
html.theme-dark .ig-count { color: #2de6c6; }
html.theme-dark .gads-msg { color: #d8c9a4; }

/* Account switcher: names read as tinted rather than plain white because the
   only dark rules for this popover were scoped to the native app shell, so the
   web portal never got them. */
/* These rows are <a> elements, and "html.theme-dark body.bw-theme a" above
   paints every link teal at (0,2,3). The previous fix here scored (0,2,1) and
   lost, which is why every account in the switcher still read as green rather
   than as a name. Matching that selector's shape wins it back. */
html.theme-dark body.bw-theme .bw-acct-item,
html.theme-dark body.bw-theme .bw-acct-item span.nm { color: #f2f7f5; }
html.theme-dark body.bw-theme .bw-acct-item:hover { color: #ffffff; }
html.theme-dark body.bw-theme .bw-acct-item.cur { color: #2de6c6; }
html.theme-dark body.bw-theme .bw-acct-foot a { color: #c6d3ce; }
html.theme-dark body.bw-theme .bw-acct-foot a:hover { color: #ffffff; }
html.theme-dark .bw-acct-empty { color: #8b9997; }

/* The current account's logo sits on a tinted chip with no backing, so a dark
   logo - most of them - disappears into it. The rows below already give their
   logos a white plate; the one at the top never did. */
html.theme-dark body.bw-theme .bw-acct-cur-ic img,
html.theme-dark body.bw-theme .bw-acct-btn img {
  background: #ffffff;
  border-radius: 6px;
}

/* AI Team: the secondary "Open X's page" buttons carry neither .on nor .off, so
   they fell to the generic ghost treatment - teal text at #7eebd6 on a 6% white
   surface. Next to the brighter "Ask X" pill they read as disabled, which is
   the opposite of true: that button is how you reach the agent's own page.
   Near-white text on a slightly firmer surface keeps it clearly secondary
   without looking switched off. */
html.theme-dark body.bw-theme .agent-btn:not(.on):not(.off) {
  background: rgba(255, 255, 255, .10) !important;
  border: 1px solid rgba(45, 230, 198, .34) !important;
  color: #dff5ef !important;
}
html.theme-dark body.bw-theme .agent-btn:not(.on):not(.off):hover {
  background: rgba(45, 230, 198, .16) !important;
  border-color: rgba(45, 230, 198, .55) !important;
  color: #ffffff !important;
}

/* One classed link with no colour of its own anywhere - it relied on the
   blanket teal that no longer claims components. Given it explicitly rather
   than left to inherit. */
html.theme-dark body.bw-theme .bwd-link { color: #2de6c6; }
