/* ============================================================================
   Chadow light theme — ADDITIVE override layer.

   Loaded LAST (via assets/includes/chadow_theme_head.php) on the core product.
   The bootstrap resolves the effective theme (explicit choice, else OS) and puts
   `theme-light` / `theme-dark` on <html>. This sheet ONLY styles `html.theme-light`,
   so in dark mode it is completely inert — the existing dark styling is untouched
   (zero risk to the live look). One selector prefix, no media-query duplication.

   Chadow's components reference a token vocabulary (--cyber-*, --text-*, --chat-*,
   --neon-*, and Cortex's --cx-*). We give those tokens light values so token-driven
   UI flips automatically; per-surface overrides for hardcoded colors follow below.

   ── LIGHT PALETTE (for any hand-written overrides) ──────────────────────────
     page bg     #eef1f7   deep panel #e6eaf2   card #ffffff   input/hover #eef1f6
     text        #0f1729   secondary  #475569   muted #64748b
     border      rgba(15,23,42,.10)   border-strong rgba(15,23,42,.16)
     accents     cyan #0a97b8  blue #0a84d4  purple #9d00d6  pink #d10f9e
     status      green/ok #0f9d6b  warn #b45309  crit #e11d48  low/link #2563eb
     shadow      0 6px 20px rgba(15,23,42,.10)     code bg rgba(15,23,42,.06)
   ============================================================================ */

html.theme-light {
  color-scheme: light;

  /* base surfaces */
  --cyber-black: #eef1f7;
  --cyber-dark:  #e6eaf2;
  --cyber-gray:  #ffffff;
  --cyber-gray-light: #eef1f6;

  /* brand accents — darkened so they stay legible on light surfaces */
  --neon-cyan:   #0a97b8;
  --neon-blue:   #0a84d4;
  --neon-purple: #9d00d6;
  --neon-pink:   #d10f9e;
  --neon-green:  #0f9d6b;
  --gradient-cyber: linear-gradient(135deg, #0a97b8 0%, #9d00d6 50%, #d10f9e 100%);

  --chat-accent-light:  rgba(10,151,184,0.10);
  --chat-accent-border: rgba(10,151,184,0.30);
  --chat-secondary-light: rgba(157,0,214,0.10);

  /* text */
  --text-primary:   #0f1729;
  --text-secondary: #475569;
  --text-muted:     #64748b;

  /* chat response */
  --chat-response-text:    #334155;
  --chat-response-heading: #0f1729;
  --chat-response-link:    #1d4ed8;
  --chat-response-strong:  #b45309;
  --chat-border:   rgba(10,151,184,0.25);
  --chat-code:     #0e7490;
  --chat-code-bg:  rgba(15,23,42,0.06);

  --shadow-cyan:   0 6px 20px rgba(10,151,184,0.18);
  --shadow-purple: 0 6px 20px rgba(157,0,214,0.16);

  /* Cortex "Mission Control" tokens */
  --cx-pur:#9d00d6; --cx-pur2:#8b3fd6; --cx-cy:#0a97b8; --cx-cy2:#0891b2;
  --cx-crit:#e11d48; --cx-warn:#b45309; --cx-med:#a16207; --cx-low:#2563eb; --cx-ok:#059669;
  --cx-tx:#0f1729; --cx-tx2:#475569; --cx-tx3:#64748b;
  --cx-panel:rgba(255,255,255,.80); --cx-panel2:rgba(255,255,255,.93);
  --cx-bd:rgba(15,23,42,.10); --cx-bd2:rgba(15,23,42,.16);
}

/* Page frame: many pages set the body background/text directly. Flip the common
   dark page backdrops to the light base + readable text. Per-surface rules below
   refine specific components. */
html.theme-light body {
  background: #eef1f7;
  color: var(--text-primary, #0f1729);
}
html.theme-light ::selection { background: rgba(10,151,184,0.20); color: #0f1729; }

/* ── The theme-toggle button (shared across every core nav) ─────────────── */
.chadow-theme-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; flex-shrink: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px; cursor: pointer; color: inherit; font-size: .95rem; line-height: 1;
  transition: background .15s, border-color .15s, color .15s;
}
.chadow-theme-toggle:hover { border-color: var(--neon-cyan, #00ffff); color: var(--neon-cyan, #00ffff); }
.chadow-theme-toggle .fa-sun  { display: none; }
.chadow-theme-toggle .fa-moon { display: inline; }
html.theme-light .chadow-theme-toggle { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.12); color: #334155; }
html.theme-light .chadow-theme-toggle:hover { border-color: #0a97b8; color: #0a97b8; }
html.theme-light .chadow-theme-toggle .fa-moon { display: none; }
html.theme-light .chadow-theme-toggle .fa-sun  { display: inline; }

/* Broad safety net: faint white inline TEXT greys used as muted labels across
   pages are near-invisible on light. Map by alpha to graded readable greys.
   (Per-surface rules below are more specific / later, so they still win ties.) */
html.theme-light [style*="color: rgba(255, 255, 255, 0.3"],
html.theme-light [style*="color: rgba(255, 255, 255, 0.4"],
html.theme-light [style*="color: rgba(255, 255, 255, 0.5"],
html.theme-light [style*="color:rgba(255,255,255,0.3"],
html.theme-light [style*="color:rgba(255,255,255,0.4"],
html.theme-light [style*="color:rgba(255,255,255,0.5"] { color: #64748b !important; }
html.theme-light [style*="color: rgba(255, 255, 255, 0.6"],
html.theme-light [style*="color: rgba(255, 255, 255, 0.7"],
html.theme-light [style*="color: rgba(255, 255, 255, 0.8"],
html.theme-light [style*="color:rgba(255,255,255,0.6"],
html.theme-light [style*="color:rgba(255,255,255,0.7"],
html.theme-light [style*="color:rgba(255,255,255,0.8"] { color: #475569 !important; }

/* ==========================================================================
   PER-SURFACE LIGHT OVERRIDES (hardcoded-color components)
   Everything from here down is scoped to html.theme-light … only.
   ========================================================================== */


/* ===== SURFACE: chadow-chrome ===== */
/* ===== Chadow shared chrome — light mode ===== */

/* --- Top header bar (dark glass -> light glass) --- */
html.theme-light .chadow-header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(15, 23, 42, .10);
}
html.theme-light .chadow-brand img {
    filter: drop-shadow(0 0 8px rgba(10, 151, 184, 0.25));
}

/* --- AI Tools pill (inline gradient + white text in topnav.php) --- */
html.theme-light .chadow-ai-tools-btn {
    background: linear-gradient(135deg, rgba(10, 151, 184, 0.12), rgba(157, 0, 214, 0.12)) !important;
    border-color: rgba(10, 151, 184, 0.40) !important;
    color: #0f1729 !important;
}
html.theme-light .chadow-ai-tools-btn i {
    color: #0a97b8 !important;
}

/* --- Project selector button icons (inline white on the topnav <i>s) --- */
html.theme-light .chadow-project-btn i {
    color: rgba(15, 23, 42, .45) !important;
}

/* --- Profile dropdown button + menu --- */
html.theme-light .chadow-profile-btn {
    background: rgba(10, 151, 184, 0.08);
    border-color: rgba(10, 151, 184, 0.35);
}
html.theme-light .chadow-profile-btn:hover {
    background: rgba(10, 151, 184, 0.14);
    box-shadow: 0 4px 14px rgba(10, 151, 184, 0.18);
}
html.theme-light .chadow-profile-menu {
    border-color: rgba(15, 23, 42, .12);
    box-shadow: 0 10px 40px rgba(15, 23, 42, .16);
}
html.theme-light .chadow-profile-menu-item:hover {
    background: rgba(10, 151, 184, 0.08);
}
html.theme-light .chadow-profile-menu-divider {
    background: rgba(15, 23, 42, .10);
}
html.theme-light .chadow-profile-menu-logout,
html.theme-light .chadow-profile-menu-logout i {
    color: #e11d48;
}
html.theme-light .chadow-profile-menu-logout:hover {
    background: rgba(225, 29, 72, 0.10);
    color: #e11d48;
}

/* --- Composer input focus (heavy cyan neon glow -> soft ring) --- */
html.theme-light .chadow-input:focus {
    box-shadow: 0 0 0 3px rgba(10, 151, 184, 0.12);
}

/* --- Subscribe modal scrim (near-opaque black -> light scrim) --- */
html.theme-light .chadow-subscribe-modal {
    background: rgba(15, 23, 42, .45);
}

/* --- Sidebar frame + history items --- */
html.theme-light .chadow-sidebar {
    border-right: 1px solid rgba(15, 23, 42, .10);
}
html.theme-light .chadow-sidebar-collapse-btn:hover,
html.theme-light .chadow-sidebar-close:hover,
html.theme-light .chadow-history-action:hover {
    background: rgba(15, 23, 42, .06);
}
html.theme-light .chadow-history-item:hover {
    background: rgba(15, 23, 42, .04);
}
html.theme-light .chadow-history-item.active {
    box-shadow: 0 0 0 1px rgba(10, 151, 184, 0.15);
}
html.theme-light .chadow-history-action.delete:hover {
    color: #e11d48;
}
html.theme-light .chadow-sidebar-overlay {
    background: rgba(15, 23, 42, .40);
}


/* ===== SURFACE: chadow-chat ===== */
/* ===== chadow-chat: light-mode overrides (hardcoded colors only) ===== */

/* --- User message bubble (hardcoded cyan tint) --- */
html.theme-light .chadow-message.user .chadow-message-content {
    background: rgba(10, 151, 184, 0.10);
    border-color: rgba(10, 151, 184, 0.22);
}

/* --- Code block chrome: dark near-black headers/expanders --- */
html.theme-light .code-block-header {
    background: rgba(15, 23, 42, 0.04);
    border-bottom-color: rgba(10, 151, 184, 0.16);
}
html.theme-light .code-block-expand {
    background: rgba(15, 23, 42, 0.04);
    border-top-color: rgba(15, 23, 42, 0.10);
    color: #0a97b8;
}
html.theme-light .code-block-expand:hover {
    background: rgba(10, 151, 184, 0.10);
}

/* --- "Copied" state: neon green invisible on white --- */
html.theme-light .code-copy-btn.copied {
    background: rgba(15, 157, 107, 0.14);
    border-color: #0f9d6b;
    color: #0f9d6b;
}

/* --- Markdown tables: dark panel bg + invisible white cell borders --- */
html.theme-light .chadow-message-content .chat-table-wrapper {
    background: #ffffff;
    border-color: rgba(10, 151, 184, 0.16);
}
html.theme-light .chadow-message-content .chat-table-row-odd {
    background: rgba(15, 23, 42, 0.03);
}
html.theme-light .chadow-message-content .chat-table-row-even {
    background: rgba(10, 151, 184, 0.04);
}
html.theme-light .chadow-message-content .chat-table-cell {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
html.theme-light .chadow-message-content .chat-table tr:hover:not(.chat-table-header) {
    background: rgba(10, 151, 184, 0.07);
}

/* --- Composer input focus: heavy neon glow → soft brand ring --- */
html.theme-light .chadow-input:focus {
    box-shadow: 0 0 0 3px rgba(10, 151, 184, 0.15);
}

/* --- Send button hover: 30px neon glow → soft shadow --- */
html.theme-light .chadow-send:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(10, 151, 184, 0.30);
}

/* --- File attachment chip: dark bg + white border --- */
html.theme-light .chadow-message-file {
    background: rgba(15, 23, 42, 0.03);
    border-color: rgba(15, 23, 42, 0.10);
}
/* File-type icon accents that are too light on their pale tints */
html.theme-light .chadow-message-file-icon.code {
    background: rgba(15, 157, 107, 0.14);
    color: #0f9d6b;
}
html.theme-light .chadow-message-file-icon.text {
    background: rgba(180, 83, 9, 0.14);
    color: #b45309;
}

/* --- Searching indicator green (a touch light on white) --- */
html.theme-light .chadow-searching-indicator {
    color: #0f9d6b;
}

/* --- Model picker (composer control): white text on pale pill + dark dropdown --- */
html.theme-light .chadow-model-picker {
    background: rgba(10, 151, 184, 0.08);
    border-color: rgba(10, 151, 184, 0.20);
    color: #0a97b8;
}
html.theme-light .chadow-model-picker:hover {
    background: rgba(10, 151, 184, 0.12);
    border-color: rgba(10, 151, 184, 0.34);
}
html.theme-light .chadow-model-picker select {
    color: #0f1729;
}
html.theme-light .chadow-model-picker select option {
    background: #ffffff;
    color: #0f1729;
}

/* --- Arsenal chat prose code blocks: dark near-black panels --- */
html.theme-light .arsenal-chat-message-content pre {
    background: rgba(15, 23, 42, 0.05);
}
html.theme-light .arsenal-chat-message-content .code-block-wrapper {
    background: #ffffff;
    border-color: rgba(249, 115, 22, 0.22);
}
html.theme-light .arsenal-chat-message-content .code-block-header {
    background: rgba(15, 23, 42, 0.04);
}


/* ===== SURFACE: cortex-css ===== */
/* ===== Cortex Mission Control — light-mode hardcoded-color fixes ===== */

/* --- White titles/values that vanish on light bg → dark ink --- */
html.theme-light #arsenalModeContent .cortex-hero h2{color:#0f1729 !important;-webkit-text-fill-color:#0f1729 !important;}
html.theme-light #arsenalModeContent .cortex-kpi-value{color:#0f1729 !important;}
html.theme-light #arsenalModeContent .agent-card-title{color:#0f1729 !important;}
html.theme-light #arsenalModeContent .cortex-tab:hover{color:#0f1729 !important;}
html.theme-light .cf-panel-head{color:#0f1729 !important;}
html.theme-light .cf-title{color:#0f1729 !important;}
html.theme-light .chadow-sidebar-title{color:#0f1729 !important;}
html.theme-light .arsenal-history-agent{color:#0f1729 !important;}
html.theme-light .chadow-profile-name{color:#0f1729 !important;}

/* --- White-overlay glass fills (rgba(255,255,255,.02–.06)) → white cards / dark glass --- */
html.theme-light #arsenalModeContent .chadow-arsenal-agent-card{background:#ffffff !important;}
html.theme-light #arsenalModeContent .chadow-arsenal-agent-card:hover{background:rgba(15,23,42,.03) !important;}
html.theme-light #arsenalModeContent .agent-card-tag{background:rgba(15,23,42,.05) !important;}
html.theme-light #arsenalModeContent .cortex-tab{background:rgba(15,23,42,.03) !important;}
html.theme-light .cf-count{background:rgba(15,23,42,.05) !important;}
html.theme-light .cf-item{background:#ffffff !important;}
html.theme-light .cf-head:hover{background:rgba(15,23,42,.03) !important;}
html.theme-light .cf-info{background:rgba(15,23,42,.06) !important;}
html.theme-light .arsenal-history-item{background:#ffffff !important;}
html.theme-light .arsenal-action-btn{background:rgba(15,23,42,.04) !important;}

/* --- Dark panels / overlays / chrome → light surfaces --- */
html.theme-light .arsenal-scan-overlay{background:rgba(238,241,247,.88) !important;}
html.theme-light .cortex-live-stream{
  background:linear-gradient(180deg,#ffffff,#f4f6fb) !important;
  border:1px solid rgba(157,0,214,.20) !important;box-shadow:inset 0 0 42px rgba(157,0,214,.05) !important;
}
html.theme-light .cortex-live-stream::-webkit-scrollbar-thumb{background:rgba(157,0,214,.35) !important;}
html.theme-light .cf-codeline{background:rgba(15,23,42,.06) !important;color:#0e7490 !important;}
html.theme-light .chadow-sidebar{
  background:linear-gradient(180deg,#f7f9fc,#eef1f6) !important;
  border-right:1px solid rgba(157,0,214,.16) !important;box-shadow:1px 0 30px rgba(15,23,42,.08) !important;
}
html.theme-light .chadow-header{background:rgba(238,241,247,.90) !important;border-bottom:1px solid rgba(15,23,42,.10) !important;}
html.theme-light .chadow-profile-menu{box-shadow:0 20px 60px rgba(15,23,42,.16) !important;}

/* --- Severity chips: keep MEANING at readable light values --- */
html.theme-light .cf-critical{color:#e11d48 !important;background:rgba(225,29,72,.10) !important;border:1px solid rgba(225,29,72,.30) !important;}
html.theme-light .cf-high{color:#b45309 !important;background:rgba(180,83,9,.10) !important;border:1px solid rgba(180,83,9,.28) !important;}
html.theme-light .cf-medium{color:#a16207 !important;background:rgba(161,98,7,.10) !important;border:1px solid rgba(161,98,7,.28) !important;}
html.theme-light .cf-low{color:#2563eb !important;background:rgba(37,99,235,.10) !important;border:1px solid rgba(37,99,235,.28) !important;}
html.theme-light .cf-info{color:#475569 !important;}
html.theme-light .arsenal-action-btn.danger:hover{background:rgba(225,29,72,.12) !important;border-color:rgba(225,29,72,.5) !important;color:#e11d48 !important;}


/* ===== SURFACE: cognition-inline ===== */
/* ── Cognition welcome hero ── */
html.theme-light .chadow-welcome-icon {
  background: radial-gradient(circle, rgba(10,151,184,0.14), rgba(10,132,212,0.06) 60%, transparent 100%);
  border: 1px solid rgba(10,151,184,0.30);
}
html.theme-light .chadow-welcome-icon::after {
  background: conic-gradient(from 0deg, rgba(10,151,184,0.28), rgba(10,132,212,0.24), rgba(10,151,184,0.28));
  opacity: 0.35;
}
html.theme-light .chadow-welcome-icon img {
  filter: drop-shadow(0 0 8px rgba(10,151,184,0.35));
}
html.theme-light .chadow-welcome h2 {
  background: linear-gradient(135deg, #0f1729 8%, #0a97b8 55%, #0a84d4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.theme-light .chadow-welcome p {
  color: #475569;
}
html.theme-light .chadow-welcome-sub {
  color: #64748b;
}

/* ── Suggestion cards ── */
html.theme-light .chadow-welcome-card {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .chadow-welcome-card:hover {
  border-color: rgba(10,151,184,0.40);
  background: rgba(10,151,184,0.05);
}
html.theme-light .chadow-welcome-card-icon {
  background: rgba(15,23,42,0.04);
  border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .chadow-welcome-card-title {
  color: #0f1729;
}
html.theme-light .chadow-welcome-card-desc {
  color: #64748b;
}

/* ── Composer container + input ── */
html.theme-light .chadow-input-container {
  background: rgba(255,255,255,0.85);
  border: 1px solid rgba(15,23,42,0.12);
}
html.theme-light .chadow-input-container:focus-within {
  border-color: rgba(10,151,184,0.45);
  box-shadow: 0 0 0 4px rgba(10,151,184,0.08), 0 8px 28px rgba(15,23,42,0.12);
}
html.theme-light .chadow-input {
  color: #0f1729;
}
html.theme-light .chadow-input::placeholder {
  color: #94a3b8;
}
html.theme-light .chadow-file-btn,
html.theme-light .chadow-image-btn {
  background: rgba(15,23,42,0.04) !important;
  border: 1px solid rgba(15,23,42,0.10) !important;
  color: #475569 !important;
}
html.theme-light .chadow-file-btn:hover:not(:disabled),
html.theme-light .chadow-image-btn:hover:not(:disabled) {
  background: rgba(10,151,184,0.08) !important;
  color: #0a97b8 !important;
  border-color: rgba(10,151,184,0.30) !important;
}

/* ── Keyboard hint ── */
html.theme-light .chadow-input-hint {
  color: #64748b;
}
html.theme-light .chadow-input-hint kbd {
  background: rgba(15,23,42,0.05);
  border: 1px solid rgba(15,23,42,0.12);
  color: #475569;
}

/* ── Cortex guided-launch stepper ── */
html.theme-light .cortex-step-node {
  color: #64748b;
  background: rgba(15,23,42,0.03);
  border: 1.5px solid rgba(15,23,42,0.14);
}
html.theme-light .cortex-step-title {
  color: #475569;
}
html.theme-light .cortex-step-sub {
  color: #64748b;
}
html.theme-light .cortex-step-bar {
  background: rgba(15,23,42,0.12);
}
html.theme-light .cortex-step-bar::after {
  background: linear-gradient(90deg, #9d00d6, #0a97b8);
}
html.theme-light .cortex-step.is-active .cortex-step-node {
  color: #ffffff;
  background: linear-gradient(135deg, #9d00d6, #0a97b8);
  border-color: transparent;
  box-shadow: 0 0 0 4px rgba(157,0,214,0.12), 0 4px 18px rgba(157,0,214,0.25);
}
html.theme-light .cortex-step.is-active .cortex-step-title {
  color: #0f1729;
}
html.theme-light .cortex-step.is-active .cortex-step-sub {
  color: #475569;
}
html.theme-light .cortex-step.is-done .cortex-step-node {
  color: #0a97b8;
  background: rgba(10,151,184,0.10);
  border-color: rgba(10,151,184,0.50);
}
html.theme-light .cortex-step.is-done .cortex-step-title {
  color: #0f1729;
}

/* ── Per-zone step eyebrow ── */
html.theme-light .cortex-zone-eyebrow {
  color: #9d00d6;
}
html.theme-light .cortex-zone-eyebrow::before {
  background: linear-gradient(90deg, #9d00d6, #0a97b8);
}


/* ===== SURFACE: projects ===== */
/* ===== Projects portfolio (projects.php inline) — light mode ===== */

/* Page background + radial glow */
html.theme-light body {
  background: #eef1f7;
  color: #0f1729;
}
html.theme-light body::before {
  background: radial-gradient(720px 380px at 84% -4%, rgba(157,0,214,0.06), transparent 60%),
              radial-gradient(600px 360px at 4% 2%, rgba(10,151,184,0.05), transparent 60%);
}

/* Header */
html.theme-light .proj-header h1 .proj-folder-icon { color: #9d00d6; }
html.theme-light .proj-back-btn {
  background: rgba(15,23,42,0.03);
  color: #475569;
  border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .proj-back-btn:hover {
  border-color: rgba(15,23,42,0.16);
  color: #0f1729;
}
html.theme-light .proj-new-btn {
  background: linear-gradient(135deg, #9d00d6, #0a97b8);
  color: #ffffff;
}

/* Search */
html.theme-light .proj-search {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .proj-search input { color: #0f1729; }
html.theme-light .proj-search i.fa-search { color: #64748b; }

/* Cards */
html.theme-light .proj-card {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,0.10);
  box-shadow: 0 6px 20px rgba(15,23,42,0.06);
}
html.theme-light .proj-card:hover {
  border-color: rgba(157,0,214,0.35);
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(15,23,42,0.10);
}
html.theme-light .proj-card-icon {
  background: rgba(157,0,214,0.10);
  color: #9d00d6;
}
html.theme-light .proj-card-target { color: #64748b; }
html.theme-light .proj-card-desc { color: #475569; }
html.theme-light .proj-card-stats { color: #64748b; }
html.theme-light .proj-card-stats i { color: #94a3b8; }
html.theme-light .proj-card-footer {
  border-top: 1px solid rgba(15,23,42,0.10);
  color: #64748b;
}
html.theme-light .proj-card-edit-btn { color: #64748b; }
html.theme-light .proj-card-edit-btn:hover {
  background: rgba(15,23,42,0.06);
  color: #9d00d6;
}

/* Empty state */
html.theme-light .proj-empty {
  color: #64748b;
  border: 1px dashed rgba(15,23,42,0.16);
}
html.theme-light .proj-empty i { color: rgba(157,0,214,0.55); }
html.theme-light .proj-empty h3 { color: #0f1729; }

/* Paywall */
html.theme-light .proj-paywall {
  background: linear-gradient(180deg, rgba(157,0,214,0.06), rgba(157,0,214,0.02));
  border: 1px solid rgba(157,0,214,0.18);
}
html.theme-light .proj-paywall h2 { color: #9d00d6; }
html.theme-light .proj-paywall p { color: #475569; }

/* Risk left-borders */
html.theme-light .proj-card.has-crit { border-left: 2px solid #e11d48; }
html.theme-light .proj-card.has-high { border-left: 2px solid #b45309; }

/* Severity + status chips */
html.theme-light .pc-sev.crit {
  color: #e11d48;
  background: rgba(225,29,72,0.10);
  border: 1px solid rgba(225,29,72,0.30);
}
html.theme-light .pc-sev.high {
  color: #b45309;
  background: rgba(180,83,9,0.10);
  border: 1px solid rgba(180,83,9,0.30);
}
html.theme-light .pc-open {
  color: #475569;
  background: rgba(15,23,42,0.05);
  border: 1px solid rgba(15,23,42,0.12);
}

/* Live "N running" pill */
html.theme-light .pc-live {
  color: #0a97b8;
  background: rgba(10,151,184,0.10);
  border: 1px solid rgba(10,151,184,0.30);
}
html.theme-light .pc-live-dot {
  background: #0a97b8;
  box-shadow: 0 0 7px rgba(10,151,184,0.55);
}


/* ===== SURFACE: project-detail ===== */
/* ══ project.php — light-mode overrides ══════════════════════════ */

/* ── Local design tokens: redefine the --proj-* / --c-* / --sev-* scales
      to light values so everything referencing them flips automatically.
      html.theme-light beats :root on the same element. ── */
html.theme-light {
    --proj-bg: #eef1f7;
    --proj-fg: #0f1729;
    --proj-fg-dim: #475569;
    --proj-fg-muted: #64748b;
    --proj-border: rgba(15,23,42,0.10);
    --proj-border-soft: rgba(15,23,42,0.06);
    --proj-glass: rgba(15,23,42,0.03);
    --proj-glass-2: rgba(15,23,42,0.05);
    --proj-shell-color: #9d00d6;
    --proj-shell-color-2: #0a97b8;
    --c-cog: #0a97b8;
    --c-cor: #9d00d6;
    --c-apx: #e11d48;
    --c-tal: #a16207;
    --c-bcn: #0f9d6b;
    --c-snt: #9d00d6;
    --sev-critical: #e11d48;
    --sev-high: #b45309;
    --sev-medium: #a16207;
    --sev-low: #2563eb;
    --sev-info: #64748b;
}

/* Ambient backdrop — soften neon dual-glow to faint light tints. */
html.theme-light body::before {
    background:
        radial-gradient(ellipse 1100px 480px at 50% -8%, rgba(157,0,214,0.05), transparent 65%),
        radial-gradient(ellipse 800px 500px at 88% 18%, rgba(10,132,212,0.04), transparent 65%),
        radial-gradient(ellipse 700px 400px at 5% 70%, rgba(10,151,184,0.03), transparent 65%);
}

/* ── Breadcrumb ── */
html.theme-light .proj-crumb a:hover { color: #0f1729; }

/* ── Hero ── */
html.theme-light .proj-hero {
    background: #ffffff;
    box-shadow: 0 6px 20px rgba(15,23,42,0.06);
}
html.theme-light .proj-hero-icon {
    color: #9d00d6;
    box-shadow: inset 0 0 24px rgba(157,0,214,0.10);
}
html.theme-light .proj-hero-text h1 { color: #0f1729; }
html.theme-light .proj-hero-target {
    color: #475569;
    background: rgba(15,23,42,0.04);
}

/* ── Buttons ── */
html.theme-light .proj-btn {
    background: rgba(15,23,42,0.04);
    color: #0f1729;
    border-color: rgba(15,23,42,0.14);
}
html.theme-light .proj-btn:hover {
    border-color: rgba(15,23,42,0.28);
    background: rgba(15,23,42,0.07);
    color: #0f1729;
}
html.theme-light .proj-btn-primary {
    color: #ffffff;
    box-shadow: 0 6px 20px rgba(157,0,214,0.20);
}
html.theme-light .proj-btn-primary:hover {
    color: #ffffff;
    box-shadow: 0 8px 26px rgba(157,0,214,0.28);
}

/* ── KPI tiles ── */
html.theme-light .proj-kpi,
html.theme-light .proj-kpi.active { background: #ffffff; }
html.theme-light .proj-kpi-label { color: #64748b; }
html.theme-light .proj-kpi-val { color: #0f1729; }
html.theme-light .proj-sev-bar { background: rgba(15,23,42,0.08); }

/* ── Section heads ── */
html.theme-light .proj-section-head h3 { color: #0f1729; }

/* ── List items ── */
html.theme-light .proj-list-item { background: #ffffff; }
html.theme-light .proj-list-item:hover { background: #eef1f6; }
html.theme-light .proj-list-title { color: #0f1729; }
html.theme-light .proj-list-meta .dot { color: rgba(15,23,42,0.22); }
html.theme-light .proj-list-actions > i { color: rgba(15,23,42,0.32) !important; }

/* ── Status badges (readable text, keep hue meaning) ── */
html.theme-light .stat-completed,
html.theme-light .stat-active   { background: rgba(15,157,107,0.14); color: #0f9d6b; }
html.theme-light .stat-processing,
html.theme-light .stat-running  { background: rgba(37,99,235,0.14);  color: #2563eb; }
html.theme-light .stat-queued   { background: rgba(157,0,214,0.14);  color: #9d00d6; }
html.theme-light .stat-failed,
html.theme-light .stat-stopped  { background: rgba(225,29,72,0.14);  color: #e11d48; }
html.theme-light .stat-pending,
html.theme-light .stat-paused   { background: rgba(100,116,139,0.16); color: #64748b; }

/* ── Empty state ── */
html.theme-light .proj-empty { background: rgba(15,23,42,0.02); }
html.theme-light .proj-empty-icon { color: #9d00d6; }
html.theme-light .proj-empty p { color: #475569; }
html.theme-light .proj-empty p code,
html.theme-light .proj-empty pre { background: rgba(15,23,42,0.06); color: #0f1729; }
html.theme-light .proj-empty a { color: #9d00d6; }

/* ── Quick-action cards ── */
html.theme-light .proj-action::after {
    background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1729' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='9 18 15 12 9 6'/></svg>") no-repeat center / contain;
}
html.theme-light .proj-action-title { color: #0f1729; }
html.theme-light .proj-action-sub { color: #64748b; }

/* ── Overview cards ── */
html.theme-light .proj-card { background: #ffffff; }
html.theme-light .proj-card-head h3 { color: #0f1729; }
html.theme-light .proj-card-link:hover { color: #9d00d6; }
html.theme-light .proj-mini-item { background: #ffffff; }
html.theme-light .proj-mini-item:hover { background: #eef1f6; }
html.theme-light .proj-mini-title { color: #0f1729; }
html.theme-light .proj-info-dl dd { color: #0f1729; }
html.theme-light .proj-info-dl dd code { background: rgba(15,23,42,0.06); }
html.theme-light .proj-risk-bar { background: rgba(15,23,42,0.08); }

/* ══ Posture band ══ */
html.theme-light .proj-gauge::before { background: #ffffff; }
html.theme-light .proj-gauge-in b { color: #0f1729; }
html.theme-light .proj-psev { background: rgba(15,23,42,0.03); }
html.theme-light .proj-op-ic { color: #9d00d6; }
html.theme-light .proj-op-v { color: #0f1729; }
html.theme-light .proj-op-tag { color: #0f9d6b; background: rgba(15,157,107,0.12); border-color: rgba(15,157,107,0.30); }

/* ── Segmented nav + sub-nav ── */
html.theme-light .proj-nav a:hover { color: #0f1729; }
html.theme-light .proj-nav a.on {
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(157,0,214,0.20);
}
html.theme-light .proj-nav a .ct { background: rgba(15,23,42,0.08); }
html.theme-light .proj-nav a.on .ct { background: rgba(255,255,255,0.28); }
html.theme-light .proj-subnav a { background: rgba(15,23,42,0.03); }
html.theme-light .proj-subnav a:hover { color: #0f1729; }
html.theme-light .proj-subnav a.on {
    color: #9d00d6;
    border-color: rgba(157,0,214,0.42);
    background: rgba(157,0,214,0.08);
}

/* ══ Attention queue ══ */
html.theme-light .proj-aq:hover { background: rgba(15,23,42,0.03); }
html.theme-light .proj-aq-ic.f { color: #64748b; background: rgba(100,116,139,0.14); border-color: rgba(100,116,139,0.30); }

/* ══ Findings — filter bars & pills ══ */
html.theme-light .findings-filter-bar { background: #ffffff; }
/* neutral "All" pills (no --pill-color set → would fall back to #fff) */
html.theme-light .findings-filter-pill[data-sev="all"],
html.theme-light .findings-filter-pill[data-src="all"],
html.theme-light .findings-filter-pill[data-status="all"] {
    color: #475569;
    border-color: rgba(15,23,42,0.16);
}
html.theme-light .findings-filter-pill[data-sev="all"].active,
html.theme-light .findings-filter-pill[data-src="all"].active,
html.theme-light .findings-filter-pill[data-status="all"].active {
    background: rgba(15,23,42,0.08);
    color: #0f1729;
}
/* Low-contrast inline --pill-color values → darken text/border, keep meaning.
   (--pill-color is set inline, so we override the consumed props with !important.) */
html.theme-light .findings-filter-pill[data-sev="high"] {
    color: #b45309 !important; border-color: color-mix(in srgb, #b45309 50%, transparent) !important;
}
html.theme-light .findings-filter-pill[data-sev="medium"] {
    color: #a16207 !important; border-color: color-mix(in srgb, #a16207 50%, transparent) !important;
}
html.theme-light .findings-filter-pill[data-src="cortex"] {
    color: #9d00d6 !important; border-color: color-mix(in srgb, #9d00d6 50%, transparent) !important;
}
html.theme-light .findings-filter-pill[data-status="open"] {
    color: #0a97b8 !important; border-color: color-mix(in srgb, #0a97b8 50%, transparent) !important;
}
html.theme-light .findings-filter-pill[data-status="resolved"] {
    color: #0f9d6b !important; border-color: color-mix(in srgb, #0f9d6b 50%, transparent) !important;
}
html.theme-light .findings-filter-pill.active { color: #ffffff; }

/* ── Finding rows ── */
html.theme-light .finding-row { background: #ffffff; }
html.theme-light .finding-row:hover { background: #eef1f6; }
html.theme-light .finding-sev,
html.theme-light .ticket-sev { color: #ffffff; }
html.theme-light .finding-meta-pill,
html.theme-light .ticket-meta-pill {
    color: #475569;
    background: rgba(15,23,42,0.04);
}
html.theme-light .finding-title { color: #0f1729; }
html.theme-light .finding-endpoint { color: #475569; }
html.theme-light .finding-desc { color: #475569; }
html.theme-light .finding-status-select {
    background: #eef1f6;
    border-color: rgba(15,23,42,0.16);
    color: #0f1729;
}
html.theme-light .finding-status-select:hover { border-color: rgba(15,23,42,0.28); }
html.theme-light .finding-source-link { color: #64748b; }
html.theme-light .finding-source-link:hover { color: #9d00d6; }

/* Reporter chip */
html.theme-light .finding-reporter {
    color: #475569;
    background: rgba(157,0,214,0.06);
    border-color: rgba(157,0,214,0.22);
}
html.theme-light .finding-reporter-avatar { background: rgba(157,0,214,0.16); color: #9d00d6; }
html.theme-light .finding-reporter-label { color: #b45309; }

/* Comments thread */
html.theme-light .finding-comments-toggle { color: #475569; }
html.theme-light .finding-comments-toggle:hover {
    border-color: rgba(157,0,214,0.40); color: #9d00d6; background: rgba(157,0,214,0.06);
}
html.theme-light .finding-comments-toggle.is-open {
    background: rgba(157,0,214,0.10); border-color: rgba(157,0,214,0.40); color: #9d00d6;
}
html.theme-light .finding-comment { background: #ffffff; }
html.theme-light .finding-comment-avatar { background: rgba(157,0,214,0.14); color: #9d00d6; }
html.theme-light .finding-comment-author { color: #0f1729; }
html.theme-light .finding-comment-delete { color: #64748b; }
html.theme-light .finding-comment-delete:hover { color: #e11d48; background: rgba(225,29,72,0.08); }
html.theme-light .finding-comment-text { color: #334155; }
html.theme-light .finding-comment-form textarea {
    background: #eef1f6;
    border-color: rgba(15,23,42,0.16);
    color: #0f1729;
}
html.theme-light .finding-comment-form textarea:focus { border-color: rgba(157,0,214,0.5); }
html.theme-light .finding-comment-form button { color: #ffffff; }

/* Assignee picker / badge */
html.theme-light .finding-assignee { background: #ffffff; }
html.theme-light .finding-assignee-avatar { background: rgba(157,0,214,0.14); color: #9d00d6; }
html.theme-light .finding-assignee-avatar.is-empty {
    background: rgba(15,23,42,0.05); color: #64748b; border-color: rgba(15,23,42,0.16);
}
html.theme-light .finding-assignee-name { color: #0f1729; }
html.theme-light .finding-assignee-name.is-unassigned { color: #64748b; }
html.theme-light .finding-assignee-pick {
    background: #eef1f6;
    border-color: rgba(15,23,42,0.16);
    color: #0f1729;
}
html.theme-light .finding-assignee-pick:hover { border-color: rgba(15,23,42,0.28); }
html.theme-light .finding-assignee-pick:focus { border-color: rgba(157,0,214,0.6); }

/* Small icon action button */
html.theme-light .arsenal-action-btn { background: rgba(15,23,42,0.04); color: #475569; }
html.theme-light .arsenal-action-btn:hover { border-color: rgba(15,23,42,0.28); color: #0f1729; }
html.theme-light .arsenal-action-btn.danger:hover {
    border-color: rgba(225,29,72,0.40); color: #e11d48; background: rgba(225,29,72,0.08);
}

/* Section-head titles (inline #fff / near-white) */
html.theme-light .findings-group-head h4 { color: #0f1729 !important; }
html.theme-light .findings-group-title span { color: #0f1729 !important; }

/* ── Mobile platform tabs ── */
html.theme-light .mob-tabs { border-bottom-color: rgba(15,23,42,0.10); }
html.theme-light .mob-tab { color: #64748b; }
html.theme-light .mob-tab:hover { color: #0f1729; }
html.theme-light .mob-tab.active { color: #0a97b8 !important; border-bottom-color: #0a97b8 !important; }
html.theme-light .mob-tab-count { background: rgba(15,23,42,0.08); }

/* ══ Stack table ══ */
html.theme-light .proj-stack-table thead th {
    color: #475569; background: #e6eaf2;
}
html.theme-light .proj-stack-table tbody td { color: #0f1729; }
html.theme-light .proj-stack-table tbody tr:hover { background: rgba(15,23,42,0.025); }
html.theme-light .cve-chip-more { color: #64748b !important; border-color: rgba(15,23,42,0.20) !important; }
html.theme-light .stack-chip-manual {
    background: rgba(15,157,107,0.12); color: #0f9d6b; border-color: rgba(15,157,107,0.30);
}
html.theme-light .stack-chip-discovered {
    background: rgba(10,151,184,0.10); color: #0a97b8; border-color: rgba(10,151,184,0.28);
}

/* ══ Patch tickets ══ */
html.theme-light .ticket-row { background: #ffffff; }
html.theme-light .ticket-row:hover { background: #eef1f6; }
html.theme-light .ticket-cve-link { color: #0f1729; }
html.theme-light .ticket-cve-link:hover { color: #9d00d6; }
html.theme-light .ticket-kev {
    background: rgba(225,29,72,0.14); color: #e11d48; border-color: rgba(225,29,72,0.40);
}
html.theme-light .ticket-what { color: #0f1729; }
html.theme-light .ticket-status-select,
html.theme-light .ticket-notes {
    background: #eef1f6; border-color: rgba(15,23,42,0.16); color: #0f1729;
}
html.theme-light .ticket-status-select:hover { border-color: rgba(15,23,42,0.28); }
html.theme-light .ticket-notes:focus { border-color: rgba(157,0,214,0.5); }
html.theme-light .ticket-notes-save {
    background: rgba(157,0,214,0.10); border-color: rgba(157,0,214,0.35); color: #9d00d6;
}
html.theme-light .ticket-notes-save:hover { background: rgba(157,0,214,0.18); }

/* ══ Finding detail modal (.fdm-*) ══ */
html.theme-light .fdm-overlay { background: rgba(15,23,42,0.45); }
html.theme-light .fdm-card {
    background: #ffffff; border-color: rgba(15,23,42,0.10);
    box-shadow: 0 12px 40px rgba(15,23,42,0.18);
}
html.theme-light .fdm-close {
    background: rgba(15,23,42,0.05); border-color: rgba(15,23,42,0.12); color: #475569;
}
html.theme-light .fdm-close:hover { background: rgba(15,23,42,0.12); color: #0f1729; }
html.theme-light .fdm-header { border-bottom-color: rgba(15,23,42,0.08); }
html.theme-light .fdm-pill {
    background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.10); color: #475569;
}
html.theme-light .fdm-title { color: #0f1729; }
html.theme-light .fdm-endpoint { color: #64748b; }
html.theme-light .fdm-label { color: #64748b; }
html.theme-light .fdm-value { color: #0f1729; }
html.theme-light .fdm-pre {
    background: rgba(15,23,42,0.06); border-color: rgba(15,23,42,0.10); color: #0f1729;
}
html.theme-light .fdm-copy-btn {
    background: rgba(10,151,184,0.10); color: #0a97b8; border-color: rgba(10,151,184,0.30);
}
html.theme-light .fdm-copy-btn:hover { background: rgba(10,151,184,0.18); }
html.theme-light .fdm-poc { border-color: rgba(10,151,184,0.22); background: rgba(10,151,184,0.05); }
html.theme-light .fdm-poc-title { color: #0a97b8; }
html.theme-light .fdm-poc .fdm-pre { border-color: rgba(10,151,184,0.28); }
html.theme-light .fdm-ev-shot img { border-color: rgba(15,23,42,0.14); }
html.theme-light .fdm-meta { border-top-color: rgba(15,23,42,0.08); color: #475569; }
html.theme-light .fdm-meta-label { color: #64748b; }
html.theme-light .fdm-link { color: #0a97b8; }

/* Call-graph native cards (inside modal) */
html.theme-light .cg-native-card { background: rgba(180,83,9,0.04); }
html.theme-light .cg-native-name { color: #b45309; }
html.theme-light .cg-native-arch { background: rgba(15,23,42,0.05); }
html.theme-light .cg-chip {
    background: rgba(15,23,42,0.06); border-color: rgba(15,23,42,0.10); color: #0f1729;
}
html.theme-light .cg-chip-danger {
    background: rgba(225,29,72,0.12); border-color: rgba(225,29,72,0.35); color: #e11d48;
}
html.theme-light .cg-chip-fuzz {
    background: rgba(180,83,9,0.14); border-color: rgba(180,83,9,0.40); color: #b45309;
}


/* ===== SURFACE: dashboard ===== */
/* ── Dashboard (Command Center) light-mode overrides ── */

/* Local design tokens defined in this file's :root (NOT the shared --cyber/--text set,
   so they don't auto-flip). Re-point them to readable light values. */
html.theme-light .dash-topbar,
html.theme-light .dash-shell {
    /* no-op anchor to keep grouping; real token override below */
}
html.theme-light :root, html.theme-light body {
    --panel: rgba(15,23,42,0.03);
    --panel-brd: rgba(15,23,42,0.10);
    --cyan: #0a97b8;
    --cyan-deep: #0891b2;
    --ink: #0f1729;
    --muted: #64748b;
    --crit: #e11d48;
    --high: #c2410c;
    --med: #b45309;
    --low: #0f9d6b;
    --info: #64748b;
}

/* Page background + grid overlay */
html.theme-light body {
    background:
        radial-gradient(1100px 560px at 82% -8%, rgba(10,151,184,0.08), transparent 60%),
        radial-gradient(900px 520px at 6% 4%, rgba(157,0,214,0.06), transparent 58%),
        linear-gradient(180deg, #eef1f7 0%, #e6eaf2 60%);
}
html.theme-light body::before {
    background-image: linear-gradient(rgba(15,23,42,0.035) 1px, transparent 1px),
                      linear-gradient(90deg, rgba(15,23,42,0.035) 1px, transparent 1px);
}

/* Top app bar */
html.theme-light .dash-topbar {
    background: rgba(238,241,247,0.8);
    border-bottom: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .dash-brand img {
    filter: drop-shadow(0 0 8px rgba(10,151,184,0.25));
}
html.theme-light .dash-link-btn {
    background: rgba(15,23,42,0.04);
    color: #475569;
    border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .dash-link-btn:hover {
    border-color: #0a97b8;
    color: #0f1729;
    background: rgba(10,151,184,0.08);
}

/* Hero */
html.theme-light .dash-hero {
    background:
        radial-gradient(620px 280px at 100% 0%, color-mix(in srgb, var(--risk) 14%, transparent), transparent 70%),
        linear-gradient(180deg, #ffffff, #f5f7fb);
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 6px 20px rgba(15,23,42,0.10);
}
html.theme-light .dash-hero-ws .chip {
    background: rgba(10,151,184,0.10);
    border: 1px solid rgba(10,151,184,0.28);
    color: #0a97b8;
}
html.theme-light .dash-posture { color: #475569; }
html.theme-light .dash-posture b { color: #0f1729; }
html.theme-light .dash-sevbar {
    background: rgba(15,23,42,0.06);
    border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .dash-sev-leg { color: #475569; }
html.theme-light .dash-sev-leg b { color: #0f1729; }

/* Risk gauge — track + inner disc must go light/white */
html.theme-light .dash-gauge {
    background: conic-gradient(var(--risk) calc(var(--score) * 1%), rgba(15,23,42,0.10) 0);
    filter: drop-shadow(0 0 20px color-mix(in srgb, var(--risk) 30%, transparent));
}
html.theme-light .dash-gauge::before {
    background: #ffffff;
    box-shadow: inset 0 0 20px rgba(15,23,42,0.06);
}

/* Stat tiles */
html.theme-light .dash-stat {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 6px 20px rgba(15,23,42,0.06);
}
html.theme-light .dash-stat:hover { border-color: rgba(10,151,184,0.40); }

/* Column head pill */
html.theme-light .dash-col-head .count-pill {
    background: rgba(15,23,42,0.05);
    border: 1px solid rgba(15,23,42,0.10);
}

/* Project cards */
html.theme-light .dash-proj-card {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.10);
    border-left: 4px solid var(--pc);
}
html.theme-light .dash-proj-card:hover {
    background: #eef1f6;
    border-color: rgba(10,151,184,0.35);
    border-left-color: var(--pc);
}
html.theme-light .dash-proj-gauge {
    background: conic-gradient(var(--pc) calc(var(--ps) * 1%), rgba(15,23,42,0.10) 0);
}
html.theme-light .dash-proj-gauge::before { background: #ffffff; }
html.theme-light .dash-proj-counts { color: #475569; }
html.theme-light .dash-proj-arrow { color: #94a3b8; }

/* Empty states */
html.theme-light .dash-empty {
    color: #64748b;
    border: 1px dashed rgba(15,23,42,0.16);
    background: rgba(15,23,42,0.02);
}
html.theme-light .dash-empty i { color: #0a97b8; }
html.theme-light .dash-empty h3 { color: #0f1729; }

/* AI insights panel */
html.theme-light .dash-ai-panel {
    background: linear-gradient(180deg, rgba(10,151,184,0.06), rgba(157,0,214,0.04) 60%, #ffffff);
    border: 1px solid rgba(10,151,184,0.28);
    box-shadow: 0 6px 20px rgba(15,23,42,0.10);
}
html.theme-light .dash-ai-banner {
    border-bottom: 1px solid rgba(15,23,42,0.10);
    background: linear-gradient(100deg, rgba(10,151,184,0.12), rgba(157,0,214,0.10));
}
html.theme-light .dash-ai-meta { color: #64748b; }
html.theme-light .dash-ai-refresh {
    background: rgba(10,151,184,0.12);
    color: #0a97b8;
    border: 1px solid rgba(10,151,184,0.35);
}
html.theme-light .dash-ai-refresh:hover { background: rgba(10,151,184,0.20); }

html.theme-light .dash-ai-summary {
    color: #475569;
    background: rgba(15,23,42,0.03);
}
html.theme-light .dash-scenario {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.10);
    border-left: 4px solid var(--sc, #b45309);
}
html.theme-light .dash-scenario:hover {
    border-color: rgba(15,23,42,0.16);
    border-left-color: var(--sc, #b45309);
}
html.theme-light .dash-scenario-narrative { color: #475569; }
html.theme-light .dash-scenario-meta { color: #64748b; }
html.theme-light .dash-scenario-meta strong { color: #0f1729; }
html.theme-light .dash-badge-lk {
    background: rgba(15,23,42,0.05);
    border: 1px solid rgba(15,23,42,0.14);
    color: #475569;
}
html.theme-light .dash-involved li {
    background: rgba(10,151,184,0.09);
    border: 1px solid rgba(10,151,184,0.25);
    color: #475569;
}
html.theme-light .dash-rec {
    color: #475569;
    background: rgba(15,157,107,0.10);
}
html.theme-light .dash-ai-empty { color: #64748b; }
html.theme-light .dash-ai-empty i { color: #0a97b8; }

/* Locked / upgrade state */
html.theme-light .dash-ai-locked .lock-icon {
    background: rgba(10,151,184,0.12);
    box-shadow: 0 0 24px rgba(10,151,184,0.18);
}
html.theme-light .dash-ai-locked h3 { color: #0f1729; }
html.theme-light .dash-ai-locked p { color: #475569; }
html.theme-light .dash-upgrade-btn {
    box-shadow: 0 8px 20px -8px rgba(10,151,184,0.5);
}

/* Error banner */
html.theme-light .dash-ai-error {
    color: #e11d48;
    background: rgba(225,29,72,0.08);
    border: 1px solid rgba(225,29,72,0.25);
}

/* Inline #fca5a5 (light-pink) crit/high emphasis text — invisible on white.
   Catch every inline occurrence (posture <b>, stat .v) and darken to readable red. */
html.theme-light [style*="fca5a5"] { color: #e11d48 !important; }


/* ===== SURFACE: profile ===== */
/* ===== Profile (profile/index.php) light-mode overrides ===== */

/* --- Local design tokens (these are NOT in the --cyber/--text/--chat/--neon/--cx
   namespaces, so the shared light sheet does not flip them; redefine here) --- */
html.theme-light {
    --bg-primary: #eef1f7;
    --bg-card: #ffffff;
    --border: rgba(15, 23, 42, 0.10);
    --border-hover: rgba(10, 151, 184, 0.45);
    --text-primary: #0f1729;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --cyan: #0a97b8;
    --cyan-dim: #0a84d4;
    --purple: #9d00d6;
    --red: #e11d48;
    --green: #0f9d6b;
    --yellow: #b45309;
}

/* --- Page + selection --- */
html.theme-light body {
    background-image:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(10, 151, 184, 0.05), transparent),
        radial-gradient(ellipse 60% 50% at 80% 100%, rgba(157, 0, 214, 0.04), transparent);
}
html.theme-light ::selection {
    background: rgba(10, 151, 184, 0.22);
    color: #0f1729;
}

/* --- Topbar / brand --- */
html.theme-light .topbar {
    background: rgba(255, 255, 255, 0.82);
}
html.theme-light .brand {
    color: #0f1729;
}
html.theme-light .brand-logo {
    background: linear-gradient(135deg, rgba(10, 151, 184, 0.14), rgba(10, 132, 212, 0.08));
    border-color: rgba(10, 151, 184, 0.30);
}

/* --- Hero card --- */
html.theme-light .hero {
    background: linear-gradient(135deg, #ffffff, #eef1f6);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}
html.theme-light .hero::before {
    background: radial-gradient(circle, rgba(10, 151, 184, 0.08), transparent 60%);
}
html.theme-light .hero-name {
    color: #0f1729;
}
html.theme-light .hero-email .dot {
    background: rgba(15, 23, 42, 0.20);
}
html.theme-light .avatar {
    border-color: rgba(10, 151, 184, 0.40);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.12);
}
html.theme-light .avatar-default {
    background: linear-gradient(135deg, rgba(10, 151, 184, 0.14), rgba(157, 0, 214, 0.08));
    border-color: rgba(10, 151, 184, 0.30);
}

/* --- Stat cells --- */
html.theme-light .stat-cell {
    background: rgba(15, 23, 42, 0.03);
}
html.theme-light .stat-v {
    color: #0f1729;
}

/* --- Tabs --- */
html.theme-light .tab:hover {
    color: #0f1729;
    background: rgba(15, 23, 42, 0.04);
}
html.theme-light .tab.active {
    box-shadow: 0 0 0 1px rgba(10, 151, 184, 0.30) inset;
}

/* --- Cards --- */
html.theme-light .card {
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.08);
}

/* --- Form inputs --- */
html.theme-light .field input,
html.theme-light .field textarea,
html.theme-light .field select {
    background: #ffffff;
}
html.theme-light .field input:focus,
html.theme-light .field textarea:focus,
html.theme-light .field select:focus {
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(10, 151, 184, 0.15);
}
html.theme-light .pw-bar {
    background: rgba(15, 23, 42, 0.08);
}

/* --- Buttons --- */
html.theme-light .btn-primary {
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(10, 151, 184, 0.22);
}
html.theme-light .btn-primary:hover:not(:disabled) {
    box-shadow: 0 6px 20px rgba(10, 151, 184, 0.30);
}
html.theme-light .btn-ghost {
    background: rgba(15, 23, 42, 0.04);
}
html.theme-light .btn-ghost:hover {
    color: #0f1729;
}
html.theme-light .btn-danger {
    color: #e11d48;
}
html.theme-light .btn-danger:hover {
    background: rgba(239, 68, 68, 0.18);
    color: #b91c1c;
}

/* --- Toggle switch --- */
html.theme-light .toggle-slider {
    background: rgba(15, 23, 42, 0.10);
}
html.theme-light .toggle input:checked + .toggle-slider {
    background: rgba(10, 151, 184, 0.20);
    border-color: rgba(10, 151, 184, 0.35);
}
html.theme-light .toggle input:checked + .toggle-slider::before {
    box-shadow: 0 0 8px rgba(10, 151, 184, 0.35);
}

/* --- Toasts --- */
html.theme-light .toast {
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
}

/* --- Overlays / spinner --- */
html.theme-light .loading-overlay {
    background: rgba(238, 241, 247, 0.75);
}
html.theme-light .spinner {
    border-color: rgba(10, 151, 184, 0.20);
}
html.theme-light .modal-overlay {
    background: rgba(15, 23, 42, 0.45);
}

/* --- Modal --- */
html.theme-light .modal {
    background: #ffffff;
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.25);
}
html.theme-light .modal h3 {
    color: #0f1729;
}

/* --- API keys table --- */
html.theme-light .keys-table th {
    background: rgba(15, 23, 42, 0.04);
}
html.theme-light .keys-table td {
    border-bottom-color: rgba(15, 23, 42, 0.08);
}
html.theme-light .keys-table tbody tr:hover {
    background: rgba(15, 23, 42, 0.03);
}
html.theme-light .key-code {
    background: rgba(15, 23, 42, 0.06);
    color: #0e7490;
}
html.theme-light .new-key-row code {
    background: rgba(15, 23, 42, 0.06);
}

/* --- Profile dropdown (top right) --- */
html.theme-light .profile-dd-btn {
    background: rgba(15, 23, 42, 0.03);
    color: #0f1729;
}
html.theme-light .profile-dd-menu {
    background: #ffffff;
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
}
html.theme-light .profile-dd-menu a {
    color: #0f1729;
}
html.theme-light .profile-dd-menu a:hover {
    background: rgba(10, 151, 184, 0.08);
}
html.theme-light .profile-dd-menu a i {
    color: #64748b;
}
html.theme-light .profile-dd-menu a.logout,
html.theme-light .profile-dd-menu a.logout i {
    color: #e11d48;
}

/* --- Payment-method switch (second inline <style>) --- */
html.theme-light .pm-slider {
    background: rgba(15, 23, 42, 0.12);
}
html.theme-light .pm-slider:before {
    background: #64748b;
}
html.theme-light .pm-switch input:checked + .pm-slider:before {
    background: #ffffff;
}

/* --- Inline style="" overrides (hardcoded literals in billing / plan / keys markup) --- */
html.theme-light [style*="color:#fff"] {
    color: #0f1729 !important;
}
html.theme-light [style*="color:#00ffff"] {
    color: #0a97b8 !important;
}
html.theme-light [style*="color:#fbbf24"] {
    color: #b45309 !important;
}
html.theme-light [style*="color:#34d399"] {
    color: #0f9d6b !important;
}
html.theme-light [style*="color:#f87171"] {
    color: #e11d48 !important;
}
html.theme-light [style*="rgba(255,255,255,0.02)"] {
    background: rgba(15, 23, 42, 0.03) !important;
}
html.theme-light [style*="rgba(255,255,255,0.04)"] {
    background: rgba(15, 23, 42, 0.04) !important;
}


/* ===== SURFACE: subscribe ===== */
/* ===== subscribe/index.php — light mode overrides ===== */

/* Page shell + header */
html.theme-light body {
    background: #eef1f7;
    color: #0f1729;
}
html.theme-light .pr-header h1 span {
    background: linear-gradient(135deg, #0a97b8, #0a84d4);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
html.theme-light .pr-header h1 i {
    color: #0a97b8 !important; /* inline color:#00ffff on rocket icon */
}
html.theme-light .pr-header p {
    color: #475569;
}
html.theme-light .pr-back {
    background: rgba(10, 151, 184, 0.08);
    border-color: rgba(10, 151, 184, 0.30);
    color: #0f1729;
}
html.theme-light .pr-back:hover {
    border-color: rgba(10, 151, 184, 0.55);
}

/* Current-plan banner (subscribed / green) */
html.theme-light .pr-current-banner {
    background: linear-gradient(135deg, rgba(15, 157, 107, 0.10), rgba(10, 132, 212, 0.10));
    border-color: rgba(15, 157, 107, 0.30);
}
html.theme-light .pr-current-banner h3 {
    color: #0f9d6b;
}
html.theme-light .pr-current-banner p {
    color: #475569;
}
html.theme-light .pr-current-badge {
    background: #0f9d6b;
    color: #ffffff;
}
/* Pending-downgrade cancel button (inline amber text) */
html.theme-light #pr-cancel-downgrade {
    color: #b45309 !important;
    border-color: rgba(180, 83, 9, 0.5) !important;
}

/* Billing toggle */
html.theme-light .pr-toggle {
    background: rgba(15, 23, 42, 0.05);
}
html.theme-light .pr-toggle-btn {
    color: #64748b;
}
html.theme-light .pr-toggle-btn.active {
    background: linear-gradient(135deg, #0a97b8, #0a84d4);
    color: #ffffff;
}
html.theme-light .pr-toggle-btn:hover:not(.active) {
    color: #0f1729;
}
html.theme-light .pr-save-badge {
    background: rgba(15, 157, 107, 0.16);
    color: #0f9d6b;
}

/* Plan cards */
html.theme-light .pr-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.10);
}
html.theme-light .pr-card:hover {
    box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}
html.theme-light .pr-card.featured {
    border-color: rgba(10, 151, 184, 0.45);
}
html.theme-light .pr-card.current {
    border-color: rgba(15, 157, 107, 0.50);
}
html.theme-light .pr-badge-featured {
    background: linear-gradient(135deg, #0a97b8, #0a84d4);
    color: #ffffff;
}
html.theme-light .pr-badge-current {
    background: #0f9d6b;
    color: #ffffff;
}
html.theme-light .pr-plan-desc {
    color: #64748b;
}
html.theme-light .pr-price-period,
html.theme-light .pr-addon-price span {
    color: #64748b;
}
html.theme-light .pr-divider {
    background: rgba(15, 23, 42, 0.10);
}
html.theme-light .pr-feature {
    color: #475569;
}
html.theme-light .pr-feature i {
    color: #0f9d6b;
}

/* CTA buttons */
html.theme-light .pr-btn-primary {
    background: linear-gradient(135deg, #0a97b8, #0a84d4);
    color: #ffffff;
}
html.theme-light .pr-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(10, 132, 212, 0.25);
}
html.theme-light .pr-btn-outline {
    border-color: rgba(15, 23, 42, 0.16);
    color: #475569;
}
html.theme-light .pr-btn-outline:hover {
    border-color: #0a97b8;
    color: #0a97b8;
}
html.theme-light .pr-btn-current {
    background: rgba(15, 157, 107, 0.12);
    border-color: rgba(15, 157, 107, 0.30);
    color: #0f9d6b;
}
/* Add-on "paid plan required" disabled button (inline white border/text) */
html.theme-light .pr-btn-outline[disabled] {
    border-color: rgba(15, 23, 42, 0.16) !important;
    color: #64748b !important;
}

/* Add-ons section */
html.theme-light .pr-section-title p {
    color: #64748b;
}
html.theme-light .pr-section-title h2 i {
    color: #9d00d6 !important; /* inline color:#bf00ff */
}
html.theme-light .pr-addon-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.10);
}
html.theme-light .pr-addon-desc {
    color: #64748b;
}
html.theme-light .pr-addon-features li {
    color: #475569;
}

/* FAQ */
html.theme-light .pr-faq {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.10);
}
html.theme-light .pr-faq h2,
html.theme-light .pr-faq-item h4 {
    color: #0f1729;
}
html.theme-light .pr-faq-item {
    background: rgba(15, 23, 42, 0.04);
}
html.theme-light .pr-faq-item p {
    color: #64748b;
}

/* Guarantee */
html.theme-light .pr-guarantee {
    background: linear-gradient(135deg, rgba(15, 157, 107, 0.08), rgba(10, 132, 212, 0.08));
    border-color: rgba(15, 157, 107, 0.25);
}
html.theme-light .pr-guarantee i {
    color: #0f9d6b;
}
html.theme-light .pr-guarantee h3 {
    color: #0f1729;
}
html.theme-light .pr-guarantee p {
    color: #475569;
}

/* Modals (login + contact-sales) */
html.theme-light .pr-modal-overlay {
    background: rgba(15, 23, 42, 0.45);
}
html.theme-light .pr-modal {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.12);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10);
}
html.theme-light .pr-modal h3 {
    color: #0a97b8;
}
html.theme-light .pr-modal p {
    color: #475569;
}
html.theme-light .pr-modal-btn-primary {
    background: linear-gradient(135deg, #0a97b8, #0a84d4);
    color: #ffffff;
}
html.theme-light .pr-modal-btn-secondary {
    background: rgba(15, 23, 42, 0.05);
    color: #0f1729;
    border-color: rgba(15, 23, 42, 0.16);
}
html.theme-light .pr-modal-close {
    color: #64748b;
}
/* Contact-sales modal inline bits */
html.theme-light #contactPlanLabel {
    color: #0a97b8 !important;
}
html.theme-light #contactForm label span {
    color: #475569 !important; /* inline white field labels */
}
html.theme-light #contactForm input,
html.theme-light #contactForm textarea {
    background: #eef1f6 !important;
    border-color: rgba(15, 23, 42, 0.16) !important;
    color: #0f1729 !important;
}
html.theme-light #contactFormError {
    color: #e11d48 !important;
}
html.theme-light #contactFormSuccess {
    color: #0f9d6b !important;
}
html.theme-light .pr-modal h3 i[style] {
    color: #b45309 !important; /* inline amber envelope icon stays warn-hued */
}

/* Loading overlay */
html.theme-light .pr-loading {
    background: rgba(238, 241, 247, 0.85);
}
html.theme-light .pr-spinner {
    border-color: rgba(10, 151, 184, 0.20);
    border-top-color: #0a97b8;
}
html.theme-light .pr-loading-text {
    color: #0a97b8;
}


/* ===== SURFACE: targets ===== */
/* ===== Targets page — light mode overrides ===== */

/* Page background + base text */
html.theme-light body {
  background: #eef1f7;
  color: #0f1729;
}

/* Header */
html.theme-light .head h1 { color: #0a97b8; }
html.theme-light .ws-pill { color: #475569; }
html.theme-light .back { color: #475569; }
html.theme-light .back:hover { color: #0f1729; }

/* Cards (glass panels) */
html.theme-light .card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.10);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
html.theme-light .card h2 { color: #0f1729; }
html.theme-light .card h2 i { color: #0a97b8; }

/* Inline-styled cards: viewer notice (amber), upgrade notice (cyan),
   and the "How leak search works" panel — beat inline background/border */
html.theme-light .card[style*="rgba(250,204,21"] {
  background: rgba(180, 83, 9, 0.06) !important;
  border-color: rgba(180, 83, 9, 0.30) !important;
}
html.theme-light .card[style*="rgba(0,255,255"] {
  background: rgba(10, 151, 184, 0.05) !important;
  border-color: rgba(10, 151, 184, 0.28) !important;
}
/* Inline text colors inside those cards */
html.theme-light .card > div[style*="#facc15"] { color: #b45309 !important; }
html.theme-light .card > div[style*="#00ffff"] { color: #0a97b8 !important; }
html.theme-light .card a[style*="#00ffff"] { color: #0a97b8 !important; }

/* Type tabs */
html.theme-light .type-tab {
  background: #eef1f6;
  border: 1px solid rgba(15, 23, 42, 0.10);
  color: #475569;
}
html.theme-light .type-tab.active {
  background: rgba(10, 151, 184, 0.10);
  border-color: #0a97b8;
  color: #0a97b8;
}

/* Inputs */
html.theme-light .add-row input[type=text],
html.theme-light .add-row input[type=email] {
  background: #eef1f6;
  color: #0f1729;
  border: 1px solid rgba(15, 23, 42, 0.16);
}
html.theme-light .add-row input:focus { border-color: #0a97b8; }
html.theme-light .add-row input::placeholder { color: #64748b; }

/* Buttons */
html.theme-light .btn {
  background: linear-gradient(135deg, #0a97b8, #0a84d4);
  color: #ffffff;
}
html.theme-light .btn-ghost {
  background: transparent;
  color: #475569;
  border: 1px solid rgba(15, 23, 42, 0.16);
}
html.theme-light .btn-danger {
  background: #e11d48;
  color: #ffffff;
}

/* Help text + usage badges */
html.theme-light .help-text { color: #475569; }
html.theme-light div[style*="color:rgba(255,255,255,0.55)"] { color: #475569 !important; }
html.theme-light strong[style*="color:rgba(255,255,255,0.85)"] { color: #0f1729 !important; }

/* Table */
html.theme-light th {
  color: #475569;
  border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}
html.theme-light td { border-bottom: 1px solid rgba(15, 23, 42, 0.06); }
html.theme-light td[style*="color:rgba(255,255,255,0.55)"] { color: #64748b !important; }
html.theme-light .value-mono { color: #0f1729; }

/* Reject reason + "no targets" inline text */
html.theme-light div[style*="#fca5a5"] { color: #e11d48 !important; }
html.theme-light div[style*="color:rgba(255,255,255,0.5)"] { color: #64748b !important; }

/* Status pills — preserve severity meaning at readable values */
html.theme-light .status.verified {
  background: rgba(15, 157, 107, 0.14);
  color: #0f9d6b;
  border: 1px solid rgba(15, 157, 107, 0.35);
}
html.theme-light .status.pending {
  background: rgba(180, 83, 9, 0.14);
  color: #b45309;
  border: 1px solid rgba(180, 83, 9, 0.35);
}
html.theme-light .status.rejected {
  background: rgba(225, 29, 72, 0.12);
  color: #e11d48;
  border: 1px solid rgba(225, 29, 72, 0.35);
}

/* Type pill */
html.theme-light .type-pill {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

/* DNS verify box */
html.theme-light .verify-box {
  background: rgba(10, 151, 184, 0.05);
  border: 1px dashed rgba(10, 151, 184, 0.30);
  color: #0f1729;
}
html.theme-light .verify-box code {
  background: rgba(15, 23, 42, 0.06);
  color: #0e7490;
}
html.theme-light .dns-token[style*="color:rgba(255,255,255,0.5)"] { color: #64748b !important; }

/* "How leak search works" list text */
html.theme-light ul[style*="color:rgba(255,255,255,0.75)"] { color: #475569 !important; }

/* Toast */
html.theme-light .toast {
  background: #ffffff;
  border: 1px solid rgba(10, 151, 184, 0.30);
  color: #0f1729;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10);
}
html.theme-light .toast.error { border-color: rgba(225, 29, 72, 0.5); }


/* ===== SURFACE: module-tools ===== */
/* ================================================================
   MODULE-TOOLS — light-mode overrides (Talon / Beacon / Pulse + shared
   module header .cmh-*). The Talon & Beacon inline <style> blocks define
   their own dark :root tokens (--bg-card, --text-*, --cyan, --red …); the
   token names collide across the two pages, so we remap the neutral +
   severity tokens ONCE on html.theme-light. Severity meaning is kept:
   danger/crit=red, warn/high=amber, ok=green, info=cyan.
   ================================================================ */

/* ---- Talon + Beacon page-local token remap (dark -> light) ---- */
html.theme-light {
    --bg-card: #ffffff;
    --bg-card-hover: #eef1f6;
    --border: rgba(15, 23, 42, .10);
    --border-hover: rgba(15, 23, 42, .16);
    --text-primary: #0f1729;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --cyan: #0a97b8;
    --red: #e11d48;      /* danger / crit -> readable red */
    --green: #0f9d6b;    /* ok / safe */
    --yellow: #b45309;   /* warn / pending / high -> amber */
    --purple: #9d00d6;
    --beacon: #0f9d6b;   /* beacon brand green, legible on white */
    --beacon-2: #0f9d6b;
    --accent: #0f9d6b;   /* pulse brand green */
}

/* Page canvas: kills the near-black body bg + dark radial wash on all
   three tools (Pulse hardcodes #0a0a0f directly, not via token). */
html.theme-light body {
    background: #eef1f7;
    color: #0f1729;
}

/* ================= SHARED MODULE HEADER (.cmh-*) ================= */
html.theme-light .cmh-bar {
    background: rgba(255, 255, 255, .82);
    border-bottom: 1px solid rgba(15, 23, 42, .10);
}
html.theme-light .cmh-brand {
    color: #0f1729;
    background: rgba(15, 23, 42, .03);
}
html.theme-light .cmh-brand:hover { background: rgba(15, 23, 42, .06); }
html.theme-light .cmh-brand-icon { background: rgba(15, 23, 42, .06); }
html.theme-light .cmh-nav-link { color: #475569; }
html.theme-light .cmh-nav-link:hover { color: #0f1729; background: rgba(15, 23, 42, .05); }
html.theme-light .cmh-profile-btn {
    background: rgba(15, 23, 42, .03);
    border: 1px solid rgba(15, 23, 42, .12);
    color: #0f1729;
}
html.theme-light .cmh-profile-arrow { color: #64748b; }
html.theme-light .cmh-profile-menu {
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, .12);
    box-shadow: 0 12px 40px rgba(15, 23, 42, .16);
}
html.theme-light .cmh-profile-menu a { color: #0f1729; }
html.theme-light .cmh-profile-menu a i { color: #64748b; }
html.theme-light .cmh-profile-menu .cmh-divider { background: rgba(15, 23, 42, .10); }
html.theme-light .cmh-profile-menu a.cmh-logout,
html.theme-light .cmh-profile-menu a.cmh-logout i { color: #e11d48; }
/* Inline cyan/aqua accent icons + active-workspace text in the menu
   (style="color:#00ffff" / "#67e8f9") are invisible on white -> darken. */
html.theme-light .cmh-profile-menu a[style*="00ffff"],
html.theme-light .cmh-profile-menu a[style*="00ffff"] i,
html.theme-light .cmh-profile-menu a i[style*="00ffff"],
html.theme-light .cmh-profile-menu a i[style*="67e8f9"] { color: #0a97b8 !important; }
/* Faint white workspace label / role text inline (rgba(255,255,255,0.3/0.35)) */
html.theme-light .cmh-profile-menu div[style*="rgba(255,255,255,0.35)"],
html.theme-light .cmh-profile-menu span[style*="rgba(255,255,255,0.3)"] { color: #64748b !important; }

/* ============ TALON + BEACON shared component classes ============ */
/* Stat / card values hardcoded #fff -> dark (severity variants keep tokens) */
html.theme-light .stat .v { color: #0f1729; }
html.theme-light .target-value { color: #0f1729; }   /* Talon */
html.theme-light .cve-title { color: #0f1729; }      /* Beacon */
html.theme-light .btn-ghost:hover { color: #0f1729; }

/* Talon page title (workspace name span) is inline color:#fff */
html.theme-light .shell h1 span { color: #0f1729 !important; }

/* Card hover shadow: heavy black -> soft light */
html.theme-light .target-card:hover { box-shadow: 0 6px 20px rgba(15, 23, 42, .10); }

/* ---------------------- TALON specifics ---------------------- */
html.theme-light .badge.danger {
    background: rgba(225, 29, 72, .10);
    color: #e11d48;
    border-color: rgba(225, 29, 72, .30);
}
html.theme-light .breach-count-pill { background: rgba(225, 29, 72, .10); color: #e11d48; }
/* Near-black breach rows -> light glass */
html.theme-light .breach-entry {
    background: rgba(15, 23, 42, .03);
    border-color: rgba(15, 23, 42, .10);
}
html.theme-light .breach-entry:hover { border-color: rgba(15, 23, 42, .16); }
html.theme-light .breach-summary:hover { background: rgba(15, 23, 42, .03); }
html.theme-light .breach-details-inner { border-top-color: rgba(15, 23, 42, .10); }
/* Empty state / toggle chips: white-on-dark fill fixups */
html.theme-light .empty-icon { background: rgba(15, 23, 42, .05); }
html.theme-light .toggle-icon {
    background: rgba(15, 23, 42, .05);
    border-color: rgba(15, 23, 42, .10);
}
/* Talon scanner: dark gradient panel -> light glass card */
html.theme-light .talon-scanner {
    background: linear-gradient(135deg, #ffffff, #eef1f6);
    border-color: rgba(180, 83, 9, .20);
}
html.theme-light .talon-feed-msg { color: #64748b; }
/* Talon toolbar (inline-styled) — beat the inline dark styles */
html.theme-light .leak-search {
    background: #ffffff !important;
    color: #0f1729 !important;
    border-color: rgba(15, 23, 42, .16) !important;
}
html.theme-light .leak-select-all { color: #475569 !important; }
html.theme-light .leak-email-btn,
html.theme-light .leak-email-all-btn { color: #e11d48 !important; }
html.theme-light .leak-export-btn { color: #0a97b8 !important; }
html.theme-light .leak-pagination { color: #475569 !important; }
html.theme-light .leak-page-btn {
    background: #eef1f6 !important;
    color: #0f1729 !important;
    border-color: rgba(15, 23, 42, .12) !important;
}
/* AI recommendation body: injected inline color:#fff strong/headings */
html.theme-light .ai-body [style*="#fff"] { color: #0f1729 !important; }

/* ---------------------- BEACON specifics ---------------------- */
html.theme-light .filter-search {
    background: #ffffff;
    color: #0f1729;
    border-color: rgba(15, 23, 42, .16);
}
html.theme-light .filter-chip:hover { color: #0f1729; }
html.theme-light .filter-sep { color: #94a3b8; }
html.theme-light .pagination a:hover { color: #0f1729; }
/* Beacon scanner: dark gradient panel -> light glass card */
html.theme-light .beacon-scanner {
    background: linear-gradient(135deg, #ffffff, #eef1f6);
    border-color: rgba(15, 157, 107, .22);
}
html.theme-light .beacon-feed-msg { color: #64748b; }

/* =========================== PULSE =========================== */
/* Pulse hardcodes everything (no shared tokens beyond --accent). */

/* Buttons — plain .btn has white text on translucent white (invisible).
   Scoped to pulse-only containers so Talon/Beacon .btn is untouched;
   .btn-primary (green gradient) already reads fine, left as-is. */
html.theme-light .pulse-shell .btn:not(.btn-primary),
html.theme-light .modal .btn:not(.btn-primary),
html.theme-light .slideover .btn:not(.btn-primary) {
    background: #eef1f6;
    color: #0f1729;
    border-color: rgba(15, 23, 42, .14);
}
html.theme-light .pulse-shell .btn:not(.btn-primary):hover,
html.theme-light .modal .btn:not(.btn-primary):hover,
html.theme-light .slideover .btn:not(.btn-primary):hover { background: #e2e7f0; }
html.theme-light .monitor-actions .btn-icon {
    background: rgba(15, 23, 42, .04);
    border-color: rgba(15, 23, 42, .12);
    color: #475569;
}
html.theme-light .monitor-actions .btn-icon:hover { background: rgba(15, 23, 42, .08); color: #0f1729; }

/* Summary tiles + monitors card: dark navy panels -> white cards */
html.theme-light .summary-tile {
    background: #ffffff;
    border-color: rgba(15, 23, 42, .10);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}
html.theme-light .summary-tile .lbl { color: #64748b; }
html.theme-light .summary-tile.up .num { color: #0f9d6b; }
html.theme-light .summary-tile.down .num { color: #e11d48; }
html.theme-light .summary-tile.degraded .num { color: #b45309; }
html.theme-light .summary-tile.unknown .num { color: #64748b; }
html.theme-light .monitors-card {
    background: #ffffff;
    border-color: rgba(15, 23, 42, .10);
    box-shadow: 0 6px 20px rgba(15, 23, 42, .06);
}
html.theme-light .monitors-card-header { border-bottom-color: rgba(15, 23, 42, .10); }
html.theme-light .monitors-card-header h2 { color: #0f1729; }
html.theme-light .monitor-row { border-bottom-color: rgba(15, 23, 42, .08); }
html.theme-light .monitor-row:hover { background: rgba(15, 23, 42, .03); }

/* Status dots: keep meaning, darken for contrast on white */
html.theme-light .dot-up { background: #0f9d6b; color: #0f9d6b; }
html.theme-light .dot-down { background: #e11d48; color: #e11d48; }
html.theme-light .dot-degraded { background: #d97706; color: #d97706; }
html.theme-light .dot-unknown { background: #94a3b8; color: #94a3b8; }

html.theme-light .domain-name { color: #0f1729; }
html.theme-light .domain-meta { color: #64748b; }
html.theme-light .cell-label { color: #64748b; }
html.theme-light .cell-value { color: #0f1729; }
html.theme-light .pulse-shell .empty-state { color: #475569; }
html.theme-light .pulse-shell .empty-state h3 { color: #0f1729; }

/* Modal + slide-over: dark panels/backdrops -> light */
html.theme-light .overlay { background: rgba(15, 23, 42, .45); }
html.theme-light .modal {
    background: #ffffff;
    border-color: rgba(15, 157, 107, .30);
}
html.theme-light .modal-header,
html.theme-light .modal-footer { border-color: rgba(15, 23, 42, .10); }
html.theme-light .modal-close { color: #64748b; }
html.theme-light .form-group label { color: #475569; }
html.theme-light .form-group select {
    background: #ffffff;
    border-color: rgba(15, 23, 42, .16);
    color: #0f1729;
}
html.theme-light .form-group small { color: #64748b; }
html.theme-light .slideover {
    background: #ffffff;
    border-left-color: rgba(15, 157, 107, .30);
    box-shadow: -20px 0 60px rgba(15, 23, 42, .18);
}
html.theme-light .slideover-header { background: #ffffff; border-bottom-color: rgba(15, 23, 42, .10); }
html.theme-light .slideover-tabs { background: #ffffff; border-bottom-color: rgba(15, 23, 42, .10); }
html.theme-light .slideover-tab { color: #475569; }
html.theme-light .slideover-tab:hover { color: #0f1729; }
html.theme-light .slideover-section h4 { color: #475569; }

/* KV rows / checks / timeline */
html.theme-light .kv-row { border-bottom-color: rgba(15, 23, 42, .08); }
html.theme-light .kv-row .k { color: #64748b; }
html.theme-light .kv-row .v { color: #0f1729; }
html.theme-light .timeline-bar.up { background: #0f9d6b; }
html.theme-light .timeline-bar.down { background: #e11d48; }
html.theme-light .timeline-bar.degraded { background: #d97706; }
html.theme-light .timeline-legend { color: #64748b; }
html.theme-light .check-row { color: #475569; border-bottom-color: rgba(15, 23, 42, .08); }
html.theme-light .badge-up { background: rgba(15, 157, 107, .14); color: #0f9d6b; }
html.theme-light .badge-down { background: rgba(225, 29, 72, .14); color: #e11d48; }
html.theme-light .badge-degraded { background: rgba(180, 83, 9, .14); color: #b45309; }
html.theme-light .trigger-cron { color: #64748b; }

/* Posture cards */
html.theme-light .posture-card {
    background: rgba(15, 23, 42, .03);
    border-color: rgba(15, 23, 42, .10);
}
html.theme-light .posture-card-head .title { color: #0f1729; }
html.theme-light .posture-summary { color: #475569; }
html.theme-light .posture-issues { color: #b45309; }
html.theme-light .posture-details {
    background: rgba(15, 23, 42, .06);
    color: #475569;
}
html.theme-light .grade-good { background: rgba(15, 157, 107, .16); color: #0f9d6b; }
html.theme-light .grade-warn { background: rgba(180, 83, 9, .16); color: #b45309; }
html.theme-light .grade-fail { background: rgba(225, 29, 72, .16); color: #e11d48; }
html.theme-light .grade-info { background: rgba(148, 163, 184, .18); color: #475569; }
html.theme-light .dkim-pill {
    background: rgba(15, 23, 42, .04);
    border-color: rgba(15, 23, 42, .12);
}
html.theme-light .dkim-pill .remove { color: #64748b; }
html.theme-light .dkim-pill.user-added {
    border-color: rgba(15, 157, 107, .40);
    background: rgba(15, 157, 107, .10);
}

/* AI advisor */
html.theme-light .ai-advisor {
    background: linear-gradient(135deg, rgba(15, 157, 107, .10), rgba(10, 151, 184, .06));
    border-color: rgba(15, 157, 107, .28);
}
html.theme-light .ai-advisor-title { color: #0f1729; }
html.theme-light .ai-headline { color: #0f1729; }
html.theme-light .ai-meta { color: #64748b; }
html.theme-light .ai-meta .stale { color: #b45309; }
html.theme-light .ai-prio {
    background: rgba(15, 23, 42, .04);
    border-left-color: #0f9d6b;
}
html.theme-light .ai-prio-title { color: #0f1729; }
html.theme-light .ai-prio-why { color: #475569; }
html.theme-light .ai-prio-fix {
    background: rgba(15, 23, 42, .06);
    color: #0f1729;
}
html.theme-light .ai-tag.sev-high { background: rgba(225, 29, 72, .16); color: #e11d48; }
html.theme-light .ai-tag.sev-medium { background: rgba(180, 83, 9, .16); color: #b45309; }
html.theme-light .ai-tag.sev-low { background: rgba(148, 163, 184, .18); color: #475569; }
html.theme-light .ai-tag.cat { background: rgba(10, 151, 184, .12); color: #0a97b8; }
html.theme-light .ai-tag.effort-low { background: rgba(15, 157, 107, .16); color: #0f9d6b; }
html.theme-light .ai-tag.effort-medium { background: rgba(180, 83, 9, .16); color: #b45309; }
html.theme-light .ai-tag.effort-high { background: rgba(225, 29, 72, .16); color: #e11d48; }
html.theme-light .ai-grade.good { background: rgba(15, 157, 107, .18); color: #0f9d6b; }
html.theme-light .ai-grade.warn { background: rgba(180, 83, 9, .18); color: #b45309; }
html.theme-light .ai-grade.fail { background: rgba(225, 29, 72, .18); color: #e11d48; }

/* Live-monitor banner */
html.theme-light .live-monitor {
    background: linear-gradient(135deg, rgba(15, 157, 107, .10), rgba(15, 157, 107, .03));
    border-color: rgba(15, 157, 107, .24);
}
html.theme-light .live-monitor::before {
    background: radial-gradient(ellipse at left center, rgba(15, 157, 107, .12), transparent 55%);
}
html.theme-light .lm-status { color: #0f9d6b; }
html.theme-light .lm-text { color: #475569; }
html.theme-light .lm-text strong { color: #0f9d6b; }
html.theme-light .lm-trace {
    background: rgba(15, 23, 42, .04);
    border-color: rgba(15, 157, 107, .16);
}
/* Slide-over detail subtitle (inline faint white) */
html.theme-light #detailSubtitle { color: #64748b !important; }


/* ===== SURFACE: cyber-css ===== */
/* ===== cyber.css light-mode overrides (hardcoded dark values only) ===== */

/* --- Fixed nav: hardcoded near-black translucent bg would sit behind now-dark text --- */
html.theme-light .cyber-nav {
    background: rgba(238, 241, 247, 0.9);
    border-bottom: 1px solid rgba(15, 23, 42, 0.10);
}
html.theme-light .cyber-nav.scrolled {
    background: rgba(238, 241, 247, 0.98);
}

/* --- Auth (login/signup) container: hardcoded dark panel rgba(22,27,34,.9) --- */
html.theme-light .cyber-auth-container {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(15, 23, 42, 0.10);
}

/* --- Card hover: heavy black drop shadow -> soft light shadow --- */
html.theme-light .cyber-card:hover {
    border-color: rgba(10, 151, 184, 0.35);
    box-shadow: 0 6px 20px rgba(15, 23, 42, 0.10), 0 0 20px rgba(10, 151, 184, 0.08);
}

/* --- Neon glow shadows: soften so they read as accents, not blooms, on white --- */
html.theme-light .cyber-btn-primary:hover {
    box-shadow: 0 6px 20px rgba(10, 151, 184, 0.25);
}
html.theme-light .cyber-chatbot-toggle:hover {
    box-shadow: 0 6px 20px rgba(10, 151, 184, 0.30);
}
html.theme-light .cyber-link:hover {
    text-shadow: none;
}

/* --- Scanline overlay: black lines -> keep effect but far fainter on light --- */
html.theme-light body::after {
    background: repeating-linear-gradient(0deg,
            rgba(15, 23, 42, 0.04) 0px,
            rgba(15, 23, 42, 0.04) 1px,
            transparent 1px,
            transparent 2px);
}

/* --- Button glitch sheen: white streak is invisible on light -> dark sheen --- */
html.theme-light .cyber-btn::before {
    background: linear-gradient(90deg,
            transparent,
            rgba(15, 23, 42, 0.08),
            transparent);
}

/* --- Pricing link: amber #f59e0b too light on white -> readable warn amber --- */
html.theme-light .pricing-link {
    color: #b45309 !important;
}
html.theme-light .pricing-link:hover {
    color: #92400e !important;
    text-shadow: none;
}
html.theme-light .chadow-link:hover {
    text-shadow: none;
}


/* ===== SURFACE: islands (ChadowAITools orbit/modal + ChadowChat) ===== */
/* ============================================================
   CHADOW ISLANDS — light-mode overrides
   Two live surfaces:
   1) ChadowAITools launcher modal — .cait-* classes (runtime <style>)
      + an inline-styled backdrop / close button.
   2) ChadowChat island — root .chadow-chat-root + .cha-md markdown,
      everything else Tailwind utility classes in chadow-islands.css.
   ============================================================ */

/* ---------- 1. AI-Tools launcher modal (.cait-*) ---------- */

/* Backdrop + close button are INLINE-styled (no class) -> !important */
html.theme-light [aria-label="Chadow AI Tools"] {
  background: rgba(238, 241, 247, 0.92) !important;
}
html.theme-light [aria-label="Chadow AI Tools"] [aria-label="Close"] {
  background: #ffffff !important;
  color: #0f1729 !important;
  border: 1px solid rgba(15, 23, 42, 0.16) !important;
}

/* Eyebrow chip (hardcoded neon cyan on dark) */
html.theme-light .cait-eyebrow {
  color: #0a97b8;
  background: rgba(10, 151, 184, 0.08);
  border: 1px solid rgba(10, 151, 184, 0.3);
}
html.theme-light .cait-eyebrow-dot {
  background: #0a97b8;
  box-shadow: 0 0 8px rgba(10, 151, 184, 0.5);
}

/* Titles / body copy (white + light-grey on dark) */
html.theme-light .cait-title { color: #0f1729; }
html.theme-light .cait-title b {
  background: linear-gradient(90deg, #0a97b8, #9d00d6);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
html.theme-light .cait-sub { color: #475569; }
html.theme-light .cait-name { color: #0f1729; }
html.theme-light .cait-cat { color: #64748b; }
html.theme-light .cait-desc { color: #475569; }

/* Cards: near-transparent-on-dark glass -> white cards */
html.theme-light .cait-card {
  background: #ffffff;
  border-color: rgba(15, 23, 42, 0.10);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}
html.theme-light .cait-card:hover:not(:disabled) {
  background: #f4f7fb;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12), 0 0 0 1px var(--ac);
}
html.theme-light .cait-card.is-active {
  background: linear-gradient(160deg, color-mix(in srgb, var(--ac) 13%, transparent), #ffffff);
  box-shadow: 0 0 0 1px var(--ac), 0 12px 30px rgba(15, 23, 42, 0.12);
}

/* Locked / disabled affordances */
html.theme-light .cait-badge.lock {
  color: #64748b;
  background: rgba(15, 23, 42, 0.05);
  border: 1px solid rgba(15, 23, 42, 0.12);
}
html.theme-light .cait-card.is-locked .cait-cta { color: #64748b; }
html.theme-light .cait-card:disabled .cait-cta { color: #94a3b8; }

/* ---------- 2. ChadowChat island (scoped to .chadow-chat-root) ---------- */

/* Primary text: white / near-white -> ink */
html.theme-light .chadow-chat-root .text-white,
html.theme-light .chadow-chat-root .text-white\/90,
html.theme-light .chadow-chat-root .text-white\/85,
html.theme-light .chadow-chat-root .text-white\/80,
html.theme-light .chadow-chat-root .text-white\/75 { color: #0f1729; }

html.theme-light .chadow-chat-root .text-white\/70,
html.theme-light .chadow-chat-root .text-white\/65,
html.theme-light .chadow-chat-root .text-white\/60,
html.theme-light .chadow-chat-root .text-white\/55 { color: #334155; }

html.theme-light .chadow-chat-root .text-white\/50,
html.theme-light .chadow-chat-root .text-white\/45,
html.theme-light .chadow-chat-root .text-white\/40 { color: #475569; }

html.theme-light .chadow-chat-root .text-white\/35,
html.theme-light .chadow-chat-root .text-white\/30 { color: #64748b; }

html.theme-light .chadow-chat-root .hover\:text-white:hover,
html.theme-light .chadow-chat-root .hover\:text-white\/95:hover,
html.theme-light .chadow-chat-root .hover\:text-white\/90:hover,
html.theme-light .chadow-chat-root .hover\:text-white\/85:hover { color: #0f1729; }

/* Placeholders (vendor pseudos must be split into their own rules) */
html.theme-light .chadow-chat-root .placeholder\:text-white\/25::placeholder,
html.theme-light .chadow-chat-root .placeholder\:text-white\/20::placeholder { color: #94a3b8; }
html.theme-light .chadow-chat-root .placeholder\:text-white\/25::-moz-placeholder,
html.theme-light .chadow-chat-root .placeholder\:text-white\/20::-moz-placeholder { color: #94a3b8; }

/* Glass fills: translucent-white-on-dark -> light glass / white cards */
html.theme-light .chadow-chat-root .bg-white\/\[0\.02\] { background-color: rgba(15, 23, 42, 0.03); }
html.theme-light .chadow-chat-root .bg-white\/\[0\.03\] { background-color: #ffffff; }
html.theme-light .chadow-chat-root .bg-white\/\[0\.04\] { background-color: rgba(15, 23, 42, 0.04); }
html.theme-light .chadow-chat-root .bg-white\/\[0\.05\] { background-color: rgba(15, 23, 42, 0.05); }
html.theme-light .chadow-chat-root .bg-white\/\[0\.06\] { background-color: rgba(15, 23, 42, 0.06); }
html.theme-light .chadow-chat-root .bg-white\/10 { background-color: rgba(15, 23, 42, 0.10); }
html.theme-light .chadow-chat-root .bg-white\/50 { background-color: rgba(15, 23, 42, 0.30); }
html.theme-light .chadow-chat-root .bg-white\/80 { background-color: rgba(15, 23, 42, 0.55); }
html.theme-light .chadow-chat-root .bg-white\/90 { background-color: rgba(15, 23, 42, 0.70); }

html.theme-light .chadow-chat-root .hover\:bg-white\/\[0\.05\]:hover { background-color: rgba(15, 23, 42, 0.05); }
html.theme-light .chadow-chat-root .hover\:bg-white\/\[0\.08\]:hover { background-color: rgba(15, 23, 42, 0.07); }
html.theme-light .chadow-chat-root .hover\:bg-white\/5:hover { background-color: rgba(15, 23, 42, 0.05); }
html.theme-light .chadow-chat-root .hover\:bg-white\/10:hover { background-color: rgba(15, 23, 42, 0.08); }
html.theme-light .chadow-chat-root .hover\:bg-white\/20:hover { background-color: rgba(15, 23, 42, 0.12); }

/* Borders: white-on-dark -> ink borders */
html.theme-light .chadow-chat-root .border-white\/\[0\.05\],
html.theme-light .chadow-chat-root .border-white\/\[0\.06\],
html.theme-light .chadow-chat-root .border-white\/\[0\.07\],
html.theme-light .chadow-chat-root .border-white\/\[0\.08\],
html.theme-light .chadow-chat-root .border-white\/10 { border-color: rgba(15, 23, 42, 0.10); }
html.theme-light .chadow-chat-root .border-white\/20,
html.theme-light .chadow-chat-root .border-white\/25,
html.theme-light .chadow-chat-root .border-white\/30 { border-color: rgba(15, 23, 42, 0.16); }
html.theme-light .chadow-chat-root .border-white\/40,
html.theme-light .chadow-chat-root .border-white\/50 { border-color: rgba(15, 23, 42, 0.24); }
html.theme-light .chadow-chat-root .hover\:border-white\/20:hover { border-color: rgba(15, 23, 42, 0.16); }

/* Dark popovers / buttons (command palette bg-black/9x, image-remove bg-black) */
html.theme-light .chadow-chat-root .bg-black,
html.theme-light .chadow-chat-root .bg-black\/40,
html.theme-light .chadow-chat-root .bg-black\/80,
html.theme-light .chadow-chat-root .bg-black\/90,
html.theme-light .chadow-chat-root .bg-black\/95 { background-color: #ffffff; }

/* Send button: solid white w/ near-black label -> brand blue w/ white label */
html.theme-light .chadow-chat-root .bg-white { background-color: #0a84d4; }
html.theme-light .chadow-chat-root .text-\[\#0A0A0B\] { color: #ffffff; }
html.theme-light .chadow-chat-root .shadow-white\/10 { --tw-shadow-color: rgba(15, 23, 42, 0.12); }
html.theme-light .chadow-chat-root .shadow-white\/30 { --tw-shadow-color: rgba(15, 23, 42, 0.14); }

/* Model-picker <option> (mostly UA-controlled, set for completeness) */
html.theme-light .chadow-chat-root .bg-\[\#111827\] { background-color: #ffffff; }

/* Heading + divider gradients built from white/transparent -> ink */
html.theme-light .chadow-chat-root .from-white\/95,
html.theme-light .chadow-chat-root .from-white\/90 {
  --tw-gradient-from: #0f1729 var(--tw-gradient-from-position);
  --tw-gradient-to: rgba(15, 23, 42, 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}
html.theme-light .chadow-chat-root .to-white\/50 { --tw-gradient-to: #475569 var(--tw-gradient-to-position); }
html.theme-light .chadow-chat-root .to-white\/40 { --tw-gradient-to: #64748b var(--tw-gradient-to-position); }
html.theme-light .chadow-chat-root .via-white\/20 {
  --tw-gradient-to: rgba(15, 23, 42, 0) var(--tw-gradient-to-position);
  --tw-gradient-stops: var(--tw-gradient-from), rgba(15, 23, 42, 0.15) var(--tw-gradient-via-position), var(--tw-gradient-to);
}

/* Status / accent text tints (tuned for dark -> readable light equivalents,
   severity meaning preserved) */
html.theme-light .chadow-chat-root .text-red-200,
html.theme-light .chadow-chat-root .text-red-300,
html.theme-light .chadow-chat-root .text-red-200\/60 { color: #dc2626; }
html.theme-light .chadow-chat-root .text-emerald-300,
html.theme-light .chadow-chat-root .text-emerald-300\/80,
html.theme-light .chadow-chat-root .text-emerald-300\/90 { color: #0f9d6b; }
html.theme-light .chadow-chat-root .text-orange-200 { color: #b45309; }
html.theme-light .chadow-chat-root .text-orange-300,
html.theme-light .chadow-chat-root .text-orange-300\/70,
html.theme-light .chadow-chat-root .text-orange-400 { color: #c2410c; }
html.theme-light .chadow-chat-root .text-cyan-200 { color: #0a97b8; }
html.theme-light .chadow-chat-root .text-violet-200,
html.theme-light .chadow-chat-root .text-violet-300 { color: #7c3aed; }

/* ---------- 3. Assistant markdown (.cha-md) — hardcoded hex/rgba ---------- */
html.theme-light .cha-md { color: #0f1729; }
html.theme-light .cha-md h1,
html.theme-light .cha-md h2,
html.theme-light .cha-md h3,
html.theme-light .cha-md h4 { color: #0f1729; }
html.theme-light .cha-md h5,
html.theme-light .cha-md h6 { color: #475569; }
html.theme-light .cha-md h2 { border-bottom-color: rgba(15, 23, 42, 0.10); }
html.theme-light .cha-md strong { color: #0f1729; }
html.theme-light .cha-md th { color: #0f1729; }
html.theme-light .cha-md a { color: #2563eb; text-decoration-color: rgba(37, 99, 235, 0.35); }
html.theme-light .cha-md a:hover { text-decoration-color: rgba(37, 99, 235, 0.7); }
html.theme-light .cha-md code {
  background: rgba(15, 23, 42, 0.06);
  border-color: rgba(15, 23, 42, 0.10);
  color: #0e7490;
}
html.theme-light .cha-md blockquote {
  color: #334155;
  background: rgba(15, 23, 42, 0.04);
  border-left-color: #7c3aed;
}
html.theme-light .cha-md hr { background: rgba(15, 23, 42, 0.12); }
html.theme-light .cha-md thead { background: rgba(15, 23, 42, 0.04); }
html.theme-light .cha-md th,
html.theme-light .cha-md td { border-color: rgba(15, 23, 42, 0.10); }
html.theme-light .cha-md tr:nth-child(2n) td { background: rgba(15, 23, 42, 0.03); }
/* Code block stays dark (atom-one-dark tokens need it); keep its plain text
   light so the now-dark .cha-md inherited color doesn't vanish inside it. */
html.theme-light .cha-md pre code { color: #cbd5e1; }

/* ===== Light-mode polish: keep prominent gradient primary buttons legible ===== */
html.theme-light .proj-btn-primary {
  background: linear-gradient(135deg, #9d00d6, #0891b2) !important;
  color: #ffffff !important;
  box-shadow: 0 6px 18px rgba(157,0,214,0.22) !important;
}
html.theme-light .proj-btn-primary:hover { color: #ffffff !important; filter: brightness(1.05); }


/* ==========================================================================
   POLISH PASS — render-verified fixes (apex, cortex arsenal, profile, projects,
   subscribe, talon). targets/beacon/pulse verified clean.
   ========================================================================== */


/* ===== POLISH: projects (chadow/projects.php) ===== */
html.theme-light .proj-card-icon { color: #9d00d6; background: rgba(157,0,214,0.10); }
html.theme-light .proj-header h1 .proj-folder-icon { color: #9d00d6; }
html.theme-light .pc-live { color: #0a97b8; background: rgba(10,151,184,0.10); border-color: rgba(10,151,184,0.30); }
html.theme-light .pc-live-dot { background: #0a97b8; box-shadow: 0 0 7px rgba(10,151,184,0.6); }


/* ===== POLISH: profile ===== */
html.theme-light .btn-primary{background:linear-gradient(135deg,#0a97b8,#0a84d4);color:#ffffff;box-shadow:0 4px 14px rgba(10,132,212,.22);}
html.theme-light .btn-primary:hover:not(:disabled){box-shadow:0 6px 20px rgba(10,132,212,.32);}
html.theme-light .pw-bar{background:rgba(15,23,42,.10);}
html.theme-light .pw-bar.filled-weak{background:#e11d48;}
html.theme-light .pw-bar.filled-med{background:#b45309;}
html.theme-light .pw-bar.filled-strong{background:#0f9d6b;}


/* ===== POLISH: subscribe ===== */
html.theme-light .pr-modal input,
html.theme-light .pr-modal textarea {
  background: #eef1f6 !important;
  border-color: rgba(15, 23, 42, .10) !important;
  color: #0f1729 !important;
}
html.theme-light .pr-modal input::placeholder,
html.theme-light .pr-modal textarea::placeholder {
  color: #64748b !important;
}


/* ===== POLISH: talon ===== */
/* Target-type icons — cyan/purple/yellow glyphs were invisible on light tinted boxes */
html.theme-light .target-icon.email  { color:#0a97b8; background:rgba(10,151,184,.12); }
html.theme-light .target-icon.domain { color:#9d00d6; background:rgba(157,0,214,.10); }
html.theme-light .target-icon.keyword{ color:#b45309; background:rgba(180,83,9,.10); }

/* Collapse toggle chevron — make it legible in its pale box */
html.theme-light .toggle-icon { color:#475569; }

/* Toolbar buttons — inline light text was washed out on light fills */
html.theme-light .leak-export-btn    { color:#0a97b8 !important; }
html.theme-light .leak-email-all-btn { color:#e11d48 !important; }
html.theme-light .leak-email-btn     { color:#e11d48 !important; }

/* Inline color:#fff controls — white text became invisible on light */
html.theme-light .breach-toolbar .leak-search { color:#0f1729 !important; }
html.theme-light .leak-page-btn { color:#0f1729 !important; }


/* ===== POLISH: apex ===== */
/* ── APEX light-mode overrides ── */

/* Hero */
html.theme-light .chadow-apex-header.apex-hero {
    background: linear-gradient(135deg, rgba(225,29,72,0.06) 0%, rgba(255,255,255,0) 70%), #ffffff;
    border: 1px solid rgba(225,29,72,0.22);
    box-shadow: 0 6px 20px rgba(15,23,42,0.10);
}
html.theme-light .chadow-apex-header.apex-hero p { color: #475569; }
html.theme-light .apex-hero-badge { color: #b1213f; }

/* KPI strip */
html.theme-light .apex-kpi-card {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 6px 20px rgba(15,23,42,0.06);
}
html.theme-light .apex-kpi-card:hover { border-color: rgba(225,29,72,0.30); }
html.theme-light .apex-kpi-label { color: #64748b; }
html.theme-light .apex-kpi-value { color: #0f1729; }
html.theme-light .apex-kpi-sub { color: #64748b; }

/* Panes */
html.theme-light .apex-pane {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.10);
    box-shadow: 0 6px 20px rgba(15,23,42,0.06);
}
html.theme-light .apex-pane-header {
    background: #eef1f6;
    border-bottom: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .apex-pane-title { color: #0f1729; }
html.theme-light .apex-pane-sub { color: #64748b; }

/* Launcher form */
html.theme-light .apex-launcher-pane .apex-field .chadow-arsenal-label { color: #0f1729; }
html.theme-light #apexAdvancedGroup > summary { color: #0f1729; }
html.theme-light .apex-optional { color: #64748b; }
html.theme-light .apex-launcher-pane input.apex-input,
html.theme-light .apex-launcher-pane textarea.apex-input {
    background: #eef1f6 !important;
    border: 1px solid rgba(15,23,42,0.10) !important;
    color: #0f1729 !important;
}
html.theme-light .apex-launcher-pane input.apex-input:focus,
html.theme-light .apex-launcher-pane textarea.apex-input:focus {
    background: #ffffff !important;
    border-color: #e11d48 !important;
    box-shadow: 0 0 0 3px rgba(225,29,72,0.14) !important;
}
html.theme-light .apex-field-hint { color: #64748b; }

/* Authenticated testing */
html.theme-light .apex-auth-details {
    background: #eef1f6;
    border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .apex-auth-details[open] { border-color: rgba(180,83,9,0.35); }
html.theme-light .apex-auth-details > summary { color: #0f1729; }
html.theme-light .apex-auth-badge {
    color: #b45309;
    background: rgba(180,83,9,0.10);
    border: 1px solid rgba(180,83,9,0.28);
}
html.theme-light .apex-auth-chevron { color: #64748b; }
html.theme-light .apex-launcher-pane .apex-auth-block {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .apex-add-user-btn {
    background: rgba(180,83,9,0.08);
    color: #b45309;
    border: 1px dashed rgba(180,83,9,0.40);
}
html.theme-light .apex-add-user-btn:hover {
    background: rgba(180,83,9,0.14);
    border-color: rgba(180,83,9,0.60);
}
html.theme-light .apex-auth-note { color: #64748b; }

/* Deep exploitation opt-in (inline styles → need !important) */
html.theme-light #apexDeepExploitOpt > label {
    color: #475569 !important;
    background: rgba(180,83,9,0.07) !important;
    border: 1px solid rgba(180,83,9,0.30) !important;
}
html.theme-light #apexDeepExploitOpt > label strong { color: #b45309 !important; }

/* Scan cards */
html.theme-light .apex-scan-card {
    background: #ffffff;
    border: 1px solid rgba(15,23,42,0.10);
}
html.theme-light .apex-scan-card:hover {
    border-color: rgba(225,29,72,0.30);
    box-shadow: 0 6px 20px rgba(15,23,42,0.10);
}
html.theme-light .apex-card-title { color: #0f1729; }
html.theme-light .apex-card-meta { color: #64748b; }
html.theme-light .apex-card-meta i { color: rgba(225,29,72,0.7); }
html.theme-light .apex-card-btn {
    background: rgba(10,132,212,0.08);
    border: 1px solid rgba(10,132,212,0.25);
    color: #0a84d4;
}
html.theme-light .apex-card-btn:hover {
    background: rgba(10,132,212,0.16);
    border-color: rgba(10,132,212,0.40);
}
html.theme-light .apex-card-btn-danger {
    background: rgba(225,29,72,0.08);
    border-color: rgba(225,29,72,0.25);
    color: #e11d48;
}
html.theme-light .apex-card-btn-danger:hover {
    background: rgba(225,29,72,0.16);
    border-color: rgba(225,29,72,0.40);
}
html.theme-light .apex-card-btn-warning {
    background: rgba(180,83,9,0.08);
    border-color: rgba(180,83,9,0.25);
    color: #b45309;
}
html.theme-light .apex-card-btn-warning:hover {
    background: rgba(180,83,9,0.16);
    border-color: rgba(180,83,9,0.40);
}
html.theme-light .apex-card-btn-success {
    background: rgba(15,157,107,0.08);
    border-color: rgba(15,157,107,0.25);
    color: #0f9d6b;
}
html.theme-light .apex-card-btn-success:hover {
    background: rgba(15,157,107,0.16);
    border-color: rgba(15,157,107,0.40);
}

/* Status badges — keep severity meaning, darken text for light contrast */
html.theme-light .apex-status-pending,
html.theme-light .apex-status-queued {
    background: rgba(180,83,9,0.12);
    color: #b45309;
    border: 1px solid rgba(180,83,9,0.30);
}
html.theme-light .apex-status-running {
    background: rgba(10,132,212,0.12);
    color: #0a84d4;
    border: 1px solid rgba(10,132,212,0.30);
}
html.theme-light .apex-status-completed {
    background: rgba(15,157,107,0.12);
    color: #0f9d6b;
    border: 1px solid rgba(15,157,107,0.30);
}
html.theme-light .apex-status-failed {
    background: rgba(225,29,72,0.12);
    color: #e11d48;
    border: 1px solid rgba(225,29,72,0.30);
}
html.theme-light .apex-status-stopped {
    background: rgba(180,83,9,0.12);
    color: #b45309;
    border: 1px solid rgba(180,83,9,0.30);
}


/* ===== POLISH: cortex ===== */
/* Re-point Cortex "Mission Control" tokens for light mode. These drive the hero,
   KPI cards, form groups, inputs, labels, hints and descriptions in one shot. */
html.theme-light #arsenalModeContent{
  --cx-panel:#ffffff; --cx-panel2:#eef1f6;
  --cx-tx:#0f1729; --cx-tx2:#475569; --cx-tx3:#64748b;
  --cx-bd:rgba(15,23,42,.10); --cx-bd2:rgba(15,23,42,.16);
  --cx-cy:#0a97b8; --cx-cy2:#0a97b8; --cx-pur2:#9d00d6; --cx-ok:#0f9d6b; --cx-warn:#b45309;
}
/* Soft lift on the now-white cards */
html.theme-light #arsenalModeContent .cortex-hero,
html.theme-light #arsenalModeContent .cortex-kpi-card,
html.theme-light #arsenalModeContent .chadow-arsenal-group{box-shadow:0 6px 20px rgba(15,23,42,.08) !important;}
/* Badge chip was white-on-white */
html.theme-light #arsenalModeContent .agent-input-badge{background:rgba(15,23,42,.05) !important;color:#475569 !important;}
/* Auth block dark fill + its pale cyan add-user button */
html.theme-light #arsenalModeContent .arsenal-user-block{background:rgba(15,23,42,.03) !important;border-color:rgba(15,23,42,.08) !important;}
html.theme-light #arsenalModeContent #arsenalAuthGroup button.btn{background:rgba(10,151,184,.10) !important;color:#0a97b8 !important;border-color:rgba(10,151,184,.28) !important;}
/* Inline white body copy inside option labels -> secondary ink */
html.theme-light #arsenalModeContent #arsenalBackendApisOpt > label,
html.theme-light #arsenalModeContent #arsenalDynamicConsent > label,
html.theme-light #arsenalModeContent #arsenalAutoRetestGroup > label span,
html.theme-light #arsenalModeContent #arsenalDeepExploitOpt > label,
html.theme-light #arsenalModeContent #arsenalInteractiveOpt > label{color:#475569 !important;}
/* Inline accent <strong> highlights -> readable cyan / amber */
html.theme-light #arsenalModeContent #arsenalBackendApisOpt strong,
html.theme-light #arsenalModeContent #arsenalAutoRetestGroup strong,
html.theme-light #arsenalModeContent #arsenalInteractiveOpt strong{color:#0a97b8 !important;}
html.theme-light #arsenalModeContent #arsenalDynamicConsent strong,
html.theme-light #arsenalModeContent #arsenalDeepExploitOpt strong{color:#b45309 !important;}
/* Auto-retest label's dark rgba(0,0,0,.2) fill */
html.theme-light #arsenalModeContent #arsenalAutoRetestGroup > label{background:rgba(15,23,42,.03) !important;border-color:rgba(15,23,42,.12) !important;}
/* Base URL "*required" tag: pale #fca5a5 -> crit red */
html.theme-light #arsenalModeContent #arsenalApiBaseUrlGroup .chadow-arsenal-label span{color:#e11d48 !important;}
/* <details> summaries fell back to near-white --chadow-fg */
html.theme-light #arsenalModeContent .chadow-arsenal-group details > summary{color:#0f1729 !important;}

/* ===== POLISH: cognition (render-verified) — welcome heading gradient started at
   #ffffff (invisible on light). Re-anchor it dark→cyan→blue so it reads. ===== */
html.theme-light .chadow-welcome h2 {
  background: linear-gradient(135deg, #0f1729 8%, #0a97b8 58%, #0a84d4 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ===== Defensive fallback: base shared arsenal form controls (chadow.css sets
   .chadow-arsenal-label color:#fff hardcoded). Flip any usage outside the
   #arsenalModeContent / .apex-scan-form scopes that already handle them. ===== */
html.theme-light .chadow-arsenal-label { color: #475569; }
html.theme-light .chadow-arsenal-input,
html.theme-light select.chadow-arsenal-input,
html.theme-light textarea.chadow-arsenal-input { background: #eef1f6; color: #0f1729; border-color: rgba(15,23,42,.14); }
html.theme-light .chadow-arsenal-input::placeholder { color: #64748b; }

/* ==========================================================================
   WHITE-TEXT SWEEP — inline white text with NO colored background of its own
   is (almost always) sitting on an inherited light card/panel in light mode,
   so flip it to readable dark. Elements that carry their own background or a
   gradient (buttons, pills, badges) are excluded and keep their white label.
   ========================================================================== */
html.theme-light [style*="color:#fff"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color: #fff"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color:#FFF"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color:white"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color: white"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color:rgba(255,255,255,0.9"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color: rgba(255, 255, 255, 0.9"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color:rgba(255,255,255,1"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color:rgba(255,255,255,0.8"]:not([style*="background"]):not([style*="gradient"]),
html.theme-light [style*="color: rgba(255, 255, 255, 0.8"]:not([style*="background"]):not([style*="gradient"]) {
  color: #0f1729 !important;
}


/* ==========================================================================
   WHITE-TEXT SWEEP (analytical, per-surface) — flips hardcoded white/near-white
   text that sits on light surfaces; white on gradient/severity buttons kept.
   ========================================================================== */


/* ===== WHITE-SWEEP: ? ===== */
html.theme-light #arsenalModeContent .cortex-hero h2{color:#0f1729 !important;-webkit-text-fill-color:#0f1729 !important;}
html.theme-light #arsenalModeContent .cortex-kpi-value{color:#0f1729 !important;}
html.theme-light #arsenalModeContent .agent-card-title{color:#0f1729 !important;}
html.theme-light #arsenalModeContent .cortex-tab:hover{color:#0f1729 !important;}
html.theme-light .cf-panel-head{color:#0f1729 !important;}
html.theme-light .cf-title{color:#0f1729 !important;}
html.theme-light .chadow-profile-name{color:#0f1729 !important;}


/* ===== WHITE-SWEEP: ? ===== */
/* ── targets/index.php ── */
/* .ws-pill: faint white label in header → readable secondary */
html.theme-light .ws-pill { color: #475569; }
/* .back:hover: white hover on light page bg */
html.theme-light .back:hover { color: #0f1729; }
/* .card h2: heading on translucent-white card (light in light mode) */
html.theme-light .card h2 { color: #0f1729; }
/* .help-text: muted note on card */
html.theme-light .help-text { color: #64748b; }
/* table header on card */
html.theme-light th { color: #64748b; }
/* mono target value on card */
html.theme-light .value-mono { color: #334155; }

/* targets inline styles */
html.theme-light [style*="color:rgba(255,255,255,0.55)"] { color: #64748b !important; } /* usage row + Added cell */
html.theme-light [style*="color:rgba(255,255,255,0.85)"] { color: #334155 !important; } /* usage <strong> values */
html.theme-light [style*="color:rgba(255,255,255,0.5)"]  { color: #64748b !important; } /* empty-state note + used-token note */
html.theme-light [style*="color:rgba(255,255,255,0.75)"] { color: #334155 !important; } /* "how leak search works" list */

/* ── beacon/index.php ── */
/* .btn-ghost:hover: white on translucent-white ghost button */
html.theme-light .btn-ghost:hover { color: #0f1729; }
/* .stat .v: big stat number on light card — exclude colored severity variants */
html.theme-light .stat:not(.crit):not(.high):not(.kev) .v { color: #0f1729; }
/* .filter-chip:hover: white on translucent chip */
html.theme-light .filter-chip:hover { color: #0f1729; }
/* .filter-sep: near-invisible separator on light filters bar */
html.theme-light .filter-sep { color: #cbd5e1; }
/* .cve-title: title on light CVE card */
html.theme-light .cve-title { color: #0f1729; }
/* .pagination a:hover: white on translucent page button */
html.theme-light .pagination a:hover { color: #0f1729; }


/* ===== WHITE-SWEEP: ? ===== */
/* CSS-rule white text on card/translucent surfaces */
html.theme-light .t-profile-btn { color: #334155; }
html.theme-light .t-profile-arrow { color: #64748b; }
html.theme-light .btn-ghost:hover { color: #0f1729; }
html.theme-light .stat .v { color: #0f1729; }
html.theme-light .target-value { color: #0f1729; }
html.theme-light .talon-feed-msg { color: #475569; }

/* Inline white/near-white text on light surfaces */
html.theme-light [style*="color:#fff"]:not([style*="background"]):not([style*="gradient"]) { color: #0f1729 !important; }
html.theme-light [style*="color:rgba(255,255,255,0.15)"] { color: #cbd5e1 !important; }
html.theme-light [style*="color:rgba(255,255,255,0.35)"] { color: #64748b !important; }
html.theme-light [style*="color:rgba(255,255,255,0.4)"] { color: #64748b !important; }
html.theme-light [style*="color:rgba(255,255,255,0.55)"] { color: #475569 !important; }
html.theme-light [style*="color:rgba(255,255,255,0.7)"] { color: #334155 !important; }


/* ===== WHITE-SWEEP: ? ===== */
/* History action link — inline rgba(255,255,255,0.85) with mixed spacing that
   the broad inline net misses; sits on a light rgba(255,255,255,0.04) tint. */
html.theme-light [style*="color: rgba(255,255,255,0.85)"] { color: #334155 !important; }

/* Retest-fixed button — inline color set to #fff (enabled, over a pale 0.15-alpha
   cyan/green tint) or rgba(255,255,255,0.35) (disabled); also rewritten by JS.
   Target the id with !important so both states + JS updates stay readable. */
html.theme-light #retestFixedBtn { color: #0f1729 !important; }

/* Stack table product cell — inline color:#fff overrides the (non-important)
   .proj-stack-table tbody td class flip, so the cell stays white on the light table. */
html.theme-light .proj-stack-table tbody td[style*="color:#fff"] { color: #0f1729 !important; }


/* ===== WHITE-SWEEP: ? ===== */
/* topnav.php — inline faint-white labels inside the profile dropdown menu.
   The menu panel turns light in theme-light (--cyber-dark => #e6eaf2), so these
   hardcoded white labels go invisible. Inline styles => attribute selector + !important. */
html.theme-light .chadow-profile-menu div[style*="rgba(255,255,255,0.35)"] { color: #64748b !important; }
html.theme-light .chadow-profile-menu span[style*="rgba(255,255,255,0.3)"] { color: #64748b !important; }


/* ===== WHITE-SWEEP: ? ===== */
/* JS-injected "No posture audit yet" heading uses an inline color:#fff that
   beats the stylesheet .empty-state h3 override; on the white slideover it is
   white-on-white. Force the dark heading colour with !important. */
html.theme-light .slideover .empty-state h3[style*="color:#fff"] { color: #0f1729 !important; }


/* ===== WHITE-SWEEP: ? ===== */
/* Form label sits on the bare (theme-lightened) arsenal page, not a colored card */
html.theme-light .chadow-arsenal-label { color: #334155; }

/* :hover swaps bg to rgba(255,255,255,.2) (near-white in light mode) + text to white → invisible */
html.theme-light .arsenal-btn-secondary:hover { color: #0f1729; }
html.theme-light .arsenal-dashboard-btn.secondary:hover { color: #0f1729; }

/* Model picker pill (rgba(0,255,255,.06)) rides in the light composer toolbar (--chat-bg-card) */
html.theme-light .chadow-model-picker select { color: #0f1729; }

/* Active image-toggle wand icon turns white on the light composer toolbar → restore the brand accent */
html.theme-light .chadow-toggle.chadow-toggle-image input:checked ~ .chadow-toggle-label i.fa-wand-magic-sparkles { color: #bf00ff; }

/* ==========================================================================
   PROJECT SELECTOR DROPDOWN (chadow/includes/project_modal.php inline styles —
   never scanned by the earlier CSS passes). Button text + the dark dropdown panel.
   ========================================================================== */
html.theme-light .chadow-project-btn { color: #334155; }
html.theme-light .chadow-project-btn:hover { color: #0f1729; }
html.theme-light .chadow-project-btn-name { color: #0f1729; }
html.theme-light .chadow-project-btn-label,
html.theme-light .chadow-project-btn-target,
html.theme-light .chadow-project-btn-chevron { color: #64748b; }
html.theme-light .chadow-project-btn.chadow-project-btn--empty { color: #b45309; }
html.theme-light .chadow-project-btn.chadow-project-btn--empty:hover { color: #92400e; }
html.theme-light .chadow-project-btn.chadow-project-btn--empty .chadow-project-btn-name,
html.theme-light .chadow-project-btn.chadow-project-btn--empty .chadow-project-btn-label { color: #b45309; }
/* the dropdown menu panel: rgba(17,24,39,0.98) dark -> white card */
html.theme-light .chadow-project-dropdown {
  background: #ffffff;
  border-color: rgba(15,23,42,0.10);
  box-shadow: 0 16px 48px rgba(15,23,42,0.18);
}
html.theme-light .project-dropdown-item { color: #334155; }
html.theme-light .project-dropdown-item:hover { background: rgba(15,23,42,0.05); }
html.theme-light .project-dropdown-item.active { color: #b45309; }
html.theme-light .project-dropdown-create { color: #0f9d6b; }
html.theme-light .project-dropdown-manage { color: #64748b; }
html.theme-light .project-dropdown-divider { background: rgba(15,23,42,0.10); }
html.theme-light .project-count-badge { background: rgba(15,23,42,0.06); color: #64748b; }
html.theme-light .project-dropdown-search { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.10); }
html.theme-light .project-dropdown-search input { color: #0f1729; }
html.theme-light .project-dropdown-search input::placeholder { color: #64748b; }
html.theme-light .project-dropdown-label { color: #64748b; }

/* ==========================================================================
   NOTIFICATION BELL (assets/includes/notifications_bell.php inline styles).
   Bell icon was white (invisible on light) + the dropdown panel was dark.
   ========================================================================== */
html.theme-light .ch-notif-btn { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.12); color: #334155; }
html.theme-light .ch-notif-btn:hover { border-color: #0a97b8; background: rgba(10,151,184,0.08); color: #0a97b8; }
html.theme-light .ch-notif-btn.is-active { background: rgba(10,151,184,0.12); border-color: rgba(10,151,184,0.5); color: #0a97b8; }
/* panel: rgba(15,15,22,0.98) dark -> white */
html.theme-light .ch-notif-panel { background: #ffffff; border-color: rgba(15,23,42,0.10); box-shadow: 0 16px 48px rgba(15,23,42,0.18); }
html.theme-light .ch-notif-head { border-bottom-color: rgba(15,23,42,0.08); }
html.theme-light .ch-notif-title { color: #0f1729; }
html.theme-light .ch-notif-mark-all { color: #475569; }
html.theme-light .ch-notif-mark-all:hover { color: #0a97b8; background: rgba(10,151,184,0.08); }
html.theme-light .ch-notif-loading, html.theme-light .ch-notif-empty { color: #64748b; }
html.theme-light .ch-notif-item { color: #334155; }
html.theme-light .ch-notif-item:hover { background: rgba(15,23,42,0.04); }
html.theme-light .ch-notif-item.is-unread { background: rgba(10,151,184,0.05); border-left-color: #0a97b8; }
html.theme-light .ch-notif-item.is-unread:hover { background: rgba(10,151,184,0.09); }
html.theme-light .ch-notif-text { color: #334155; }
html.theme-light .ch-notif-body { color: #475569; }
html.theme-light .ch-notif-time { color: #64748b; }
html.theme-light .ch-notif-dot { background: #0a97b8; }
/* severity icon chips: light pastel text on white = low contrast -> darken text (keep tint bg) */
html.theme-light .ch-notif-icon.sev-critical { color: #dc2626; }
html.theme-light .ch-notif-icon.sev-high { color: #c2410c; }
html.theme-light .ch-notif-icon.sev-medium { color: #b45309; }
html.theme-light .ch-notif-icon.sev-low { color: #2563eb; }

/* ==========================================================================
   PROFILE DROPDOWN PARTIAL (assets/includes/chadow_profile_dropdown.php inline
   styles — .chp-* — used on projects/project/dashboard; never scanned before).
   The button username was #fff (invisible on light) + the whole menu was #161b22.
   ========================================================================== */
html.theme-light .chp-profile-btn { color: #334155; background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.12); }
html.theme-light .chp-profile-btn:hover { border-color: #0a97b8; }
html.theme-light .chp-profile-arrow { color: #64748b; }
html.theme-light .chp-profile-avatar-default { background: rgba(10,151,184,0.12); color: #0a97b8; }
/* menu panel: #161b22 dark -> white card */
html.theme-light .chp-profile-menu { background: #ffffff; border-color: rgba(15,23,42,0.10); box-shadow: 0 12px 40px rgba(15,23,42,0.18); }
html.theme-light .chp-profile-menu a { color: #334155; }
html.theme-light .chp-profile-menu a:hover { background: rgba(10,151,184,0.08); }
html.theme-light .chp-profile-menu a i { color: #64748b; }
html.theme-light .chp-profile-menu .chp-divider { background: rgba(15,23,42,0.10); }
html.theme-light .chp-profile-menu a.chp-logout,
html.theme-light .chp-profile-menu a.chp-logout i { color: #e11d48; }
html.theme-light .chp-profile-menu a.chp-logout:hover { background: rgba(225,29,72,0.08); }
/* workspace switcher rows */
html.theme-light .chp-ws-label { color: #64748b; }
html.theme-light .chp-ws-item { color: #334155; }
html.theme-light .chp-ws-item:hover:not(:disabled) { background: rgba(10,151,184,0.08); }
html.theme-light .chp-ws-item i { color: #64748b; }
html.theme-light .chp-ws-item.chp-ws-current { color: #0a97b8; }
html.theme-light .chp-ws-item.chp-ws-current i { color: #0a97b8; }
html.theme-light .chp-ws-badge { color: #64748b; background: rgba(15,23,42,0.06); }

/* ==========================================================================
   PROJECT DROPDOWN — richer CARD layout (project_modal.php) that the earlier
   project-dropdown fix missed: .project-dropdown-card-title was #f0f6fc (near-
   white → invisible on the white dropdown). Plus the full-page picker cards.
   ========================================================================== */
html.theme-light .project-dropdown-card:hover { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.08); }
html.theme-light .project-dropdown-card-icon { background: rgba(15,23,42,0.05); color: #64748b; }
html.theme-light .project-dropdown-card-title { color: #0f1729; }
html.theme-light .project-dropdown-card.active .project-dropdown-card-title { color: #b45309; }
html.theme-light .project-dropdown-card-target { color: #64748b; }
html.theme-light .project-dropdown-card-check { color: #b45309; }
html.theme-light .project-dropdown-empty { color: #64748b; }
/* full-page "pick a project" cards (.chadow-pickproject-card*) */
html.theme-light .chadow-pickproject-card { background: #ffffff; border-color: rgba(15,23,42,0.10); }
html.theme-light .chadow-pickproject-card-title { color: #0f1729; }
html.theme-light .chadow-pickproject-card-target,
html.theme-light .chadow-pickproject-card-counts { color: #64748b; }
html.theme-light .chadow-pickproject-card-arrow { color: #94a3b8; }

/* ===== Targets page header — .head h1 was #00ffff (near-invisible on white) ===== */
html.theme-light .head h1 { color: #0a97b8; }


/* ==========================================================================
   ACCOUNT PAGES — light overrides (account header partial + usage/workspace/
   devices pages, newly added to the theme). Render-verified.
   ========================================================================== */


/* ===== ACCOUNT-PAGES: ? ===== */
html.theme-light .cah-topbar {
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid rgba(15,23,42,.10);
}
html.theme-light .cah-brand { color: #0f1729; }
html.theme-light .cah-brand-text span { color: #64748b; }
html.theme-light .cah-brand-logo {
  background: linear-gradient(135deg, rgba(10,151,184,0.16), rgba(37,99,235,0.10));
  border: 1px solid rgba(10,151,184,0.35);
  color: #0a97b8;
}
html.theme-light .cah-profile-btn {
  background: #eef1f6;
  border: 1px solid rgba(15,23,42,.10);
  color: #0f1729;
}
html.theme-light .cah-profile-btn:hover { border-color: rgba(10,151,184,0.45); }
html.theme-light .cah-avatar { border: 1px solid rgba(10,151,184,0.35); }
html.theme-light .cah-avatar-default {
  background: rgba(10,151,184,0.14);
  color: #0a97b8;
}
html.theme-light .cah-menu {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 12px 40px rgba(15,23,42,.16);
}
html.theme-light .cah-menu a { color: #0f1729; }
html.theme-light .cah-menu a:hover { background: rgba(10,151,184,0.08); }
html.theme-light .cah-menu a i { color: #64748b; }
html.theme-light .cah-menu .cah-divider { background: rgba(15,23,42,.10); }
html.theme-light .cah-menu a.cah-logout,
html.theme-light .cah-menu a.cah-logout i { color: #e11d48; }


/* ===== ACCOUNT-PAGES: ? ===== */
/* ── Usage page — light theme overrides ── */

/* Page shell */
html.theme-light body {
  background: #eef1f7;
  color: #0f1729;
}

/* Gradient H1 keeps its brand fill; darken the plain cyan accents */
html.theme-light .usage-meter-used { color: #0a97b8; }

/* Back button chip */
html.theme-light .usage-back {
  background: rgba(10,151,184,.08);
  border: 1px solid rgba(10,151,184,.28);
  color: #0f1729;
}
html.theme-light .usage-back:hover { background: rgba(10,151,184,.15); }

/* Cards */
html.theme-light .usage-card,
html.theme-light .usage-stat {
  background: #ffffff;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 12px 40px rgba(15,23,42,.08);
}
html.theme-light .usage-card h2 { color: #0f1729; }
html.theme-light .usage-card h2 span { color: #64748b !important; }

/* Meter numbers/labels */
html.theme-light .usage-meter-of { color: #64748b; }
html.theme-light .usage-meter-limit { color: #0f1729; }
html.theme-light .usage-meter-pct { color: #64748b; }
html.theme-light .usage-meter-foot { color: #475569; }

/* Meter track (fill gradients kept as-is) */
html.theme-light .usage-meter-bar {
  background: #eef1f6;
  border: 1px solid rgba(15,23,42,.10);
}

/* Stat cards */
html.theme-light .usage-stat-label { color: #64748b; }
html.theme-light .usage-stat-value { color: #0f1729; }
html.theme-light .usage-stat-sub { color: #64748b; }

/* Empty state */
html.theme-light .usage-empty { color: #64748b; }

/* 30-day chart: grid lines and line stroke (fill gradient stays faint) */
html.theme-light .usage-chart line { stroke: rgba(15,23,42,.10); }
html.theme-light .usage-chart polyline { stroke: #0a97b8; }
html.theme-light .usage-chart circle { fill: #0a97b8; }

/* Tables */
html.theme-light .usage-table th {
  color: #0a97b8;
  border-bottom: 1px solid rgba(15,23,42,.10);
}
html.theme-light .usage-table td {
  border-bottom: 1px solid rgba(15,23,42,.08);
}

/* Feature icon chips keep their tinted accents; default (chat) chip */
html.theme-light .usage-feature-icon { background: rgba(10,151,184,.12); color: #0a97b8; }

/* ── Inline-styled fragments (need !important) ── */

/* Workspace bar */
html.theme-light .usage-ws-bar {
  background: rgba(10,151,184,.06) !important;
  border: 1px solid rgba(10,151,184,.22) !important;
}
html.theme-light .usage-ws-bar span { color: #64748b !important; }
html.theme-light .usage-ws-bar strong { color: #0f1729 !important; }
html.theme-light .usage-ws-bar i.fa-building { color: #0a97b8 !important; }
html.theme-light .usage-ws-bar span[style*="border"] {
  color: #64748b !important;
  border-color: rgba(15,23,42,.14) !important;
}
html.theme-light .usage-ws-bar label { color: #64748b !important; }
html.theme-light .usage-ws-bar select {
  background: #eef1f6 !important;
  color: #0f1729 !important;
  border: 1px solid rgba(15,23,42,.14) !important;
}

/* Grant / add-on boost callout */
html.theme-light .usage-card > div[style*="rgba(245,158,11,0.08)"] {
  background: rgba(180,83,9,.08) !important;
  border: 1px solid rgba(180,83,9,.28) !important;
}
html.theme-light .usage-card > div[style*="rgba(245,158,11,0.08)"] > div > div:first-child { color: #b45309 !important; }
html.theme-light .usage-card > div[style*="rgba(245,158,11,0.08)"] > div > div:last-child { color: #64748b !important; }

/* Limit-reached foot note */
html.theme-light .usage-meter-foot span[style*="fca5a5"] { color: #e11d48 !important; }

/* Team usage table: member email + last-seen + tfoot */
html.theme-light #team-usage td div[style*="0.76rem"] { color: #64748b !important; }
html.theme-light #team-usage td[style*="0.82rem"] { color: #64748b !important; }
html.theme-light #team-usage tfoot tr { border-top: 1px solid rgba(15,23,42,.12) !important; }
html.theme-light #team-usage tfoot td[style*="0.7"] { color: #0f1729 !important; }
html.theme-light #team-usage p { color: #64748b !important; }

/* Current-user highlight row */
html.theme-light #team-usage tr[style*="rgba(0,255,255,0.03)"] { background: rgba(10,151,184,.06) !important; }

/* Role pills — flip near-white/faded tints to readable brand-on-tint, keep colored ones */
html.theme-light #team-usage td span[style*="rgba(255,255,255,0.06)"] {
  background: rgba(15,23,42,.06) !important;
  color: #475569 !important;
}


/* ===== ACCOUNT-PAGES: ? ===== */
/* ── Workspace body (.ws-*) light-theme overrides ── */

/* Cards / panels */
html.theme-light .ws-card { background: #ffffff; border-color: rgba(15,23,42,.10); box-shadow: 0 12px 40px rgba(15,23,42,.16); }
html.theme-light .ws-card h2 { color: #0f1729; }

/* Back link */
html.theme-light .ws-back { background: rgba(10,151,184,.08); border-color: rgba(10,151,184,.30); color: #0f1729; }
html.theme-light .ws-back:hover { background: rgba(10,151,184,.16); }

/* Workspace name + meta */
html.theme-light .ws-name-row h3 { color: #0f1729; }
html.theme-light .ws-meta { color: #64748b; }

/* Rename button (inline dark cyan on dark) */
html.theme-light .ws-name-row button[title="Rename workspace"] { color: #0a97b8 !important; border-color: rgba(10,151,184,.35) !important; }

/* Role pills — keep the per-role tinted background, darken the text so it reads on light */
html.theme-light .role-pill { color: #0f1729 !important; }

/* Member rows */
html.theme-light .member-row { background: #f4f6fb; border-color: rgba(15,23,42,.08); }
html.theme-light .member-row:hover { background: #eef1f6; }
html.theme-light .member-avatar { background: rgba(10,151,184,.10); color: #0a97b8; }
html.theme-light .member-name { color: #0f1729; }
html.theme-light .member-name span { color: #64748b !important; }
html.theme-light .member-email { color: #64748b; }

/* Role select dropdown */
html.theme-light .role-select { background: #eef1f6; border-color: rgba(15,23,42,.15); color: #0f1729; }
html.theme-light .role-select option { background: #ffffff; color: #0f1729; }

/* Remove / action buttons (kept red-tinted; legible on light) */
html.theme-light .btn-remove { background: rgba(225,29,72,.08); border-color: rgba(225,29,72,.30); color: #e11d48; }
html.theme-light .btn-remove:hover { background: rgba(225,29,72,.16); }

/* Invite form */
html.theme-light .invite-form label { color: #475569; }
html.theme-light .invite-form input, html.theme-light .invite-form select { background: #eef1f6; border-color: rgba(15,23,42,.10); color: #0f1729; }
html.theme-light .invite-form input::placeholder { color: #94a3b8; }
html.theme-light .invite-form input:focus, html.theme-light .invite-form select:focus { border-color: #0a97b8; }
html.theme-light .invite-form select option { background: #ffffff; color: #0f1729; }

/* Advanced-permissions toggle + panel (inline styles → need !important) */
html.theme-light #advToggle { color: #0a97b8 !important; }
html.theme-light #advToggle span { color: #64748b !important; }
html.theme-light #advBox { background: #eef1f6 !important; border-color: rgba(15,23,42,.10) !important; }
html.theme-light #advBox > div { color: #475569 !important; }

/* Pending invites */
html.theme-light .invite-row { background: #f4f6fb; border-color: rgba(15,23,42,.14); }
html.theme-light .invite-email { color: #475569; }
html.theme-light .invite-badge { background: rgba(180,83,9,.12); color: #b45309; }
html.theme-light .btn-revoke { border-color: rgba(15,23,42,.14); color: #64748b; }
html.theme-light .btn-revoke:hover { border-color: #e11d48; color: #e11d48; }

/* Usage-card description (inline white text) */
html.theme-light .ws-card > div > div[style*="rgba(255,255,255"] { color: #475569 !important; }


/* ===== ACCOUNT-PAGES: ? ===== */
/* Devices page (devices/index.php) — light-theme overrides.
   Its own <style> block is dark top-to-bottom; flip text, borders,
   code blocks, ghost/danger buttons and cyan links for light. */

/* Page + shells (backgrounds mostly handled by theme, restated for safety) */
html.theme-light body { background: #eef1f7; color: #0f1729; }
html.theme-light .card { background: #ffffff; border-color: rgba(15,23,42,.10); box-shadow: 0 12px 40px rgba(15,23,42,.06); }

/* Headings + intro copy */
html.theme-light h1 { color: #0f1729; }
html.theme-light h1 i { color: #0a97b8 !important; }
html.theme-light .card h2 { color: #0f1729; }
html.theme-light .lead { color: #475569; }
html.theme-light .empty { color: #64748b; }

/* Back link + section/detail links (were faint cyan) */
html.theme-light .back { color: #2563eb; }

/* Device rows */
html.theme-light .dev-card { border-top-color: rgba(15,23,42,.10); }
html.theme-light .dev-card.is-new { background: rgba(10,151,184,.06); }
html.theme-light .dev-row .name { color: #0f1729; }
html.theme-light .dev-row .meta { color: #64748b; }
html.theme-light .dev-row .fa-mobile { color: rgba(10,151,184,.75) !important; }

/* Status pills — keep tinted bg, darken text so it reads on white */
html.theme-light .pill.connected { background: rgba(15,157,107,.14); color: #0f9d6b; }
html.theme-light .pill.enrolled  { background: rgba(180,83,9,.14);  color: #b45309; }
html.theme-light .pill.unhealthy { background: rgba(225,29,72,.12);  color: #e11d48; }
html.theme-light .pill.disabled  { background: rgba(15,23,42,.06);   color: #64748b; }

/* Buttons: primary keeps its brand gradient; restore ghost/danger,
   which the theme's generic .btn rule had flattened to solid blue */
html.theme-light .btn.ghost  { background: transparent; border: 1px solid rgba(15,23,42,.14); color: #475569; }
html.theme-light .btn.ghost:hover { background: rgba(15,23,42,.04); }
html.theme-light .btn.danger { background: transparent; border: 1px solid rgba(225,29,72,.45); color: #e11d48; }
html.theme-light .btn.danger:hover { background: rgba(225,29,72,.07); }

/* Setup block: intro line has inline white text → needs !important */
html.theme-light .setup-block p { color: #475569 !important; }

/* Command block */
html.theme-light pre.cmd { background: #e6eaf2; border-color: rgba(15,23,42,.10); color: #0f1729; }

/* Inputs / labels */
html.theme-light input[type=text],
html.theme-light textarea { background: #eef1f6; border-color: rgba(15,23,42,.12); color: #0f1729; }
html.theme-light label.lbl { color: #475569; }
html.theme-light .chadow-arsenal-hint { color: #64748b !important; }
html.theme-light .chadow-arsenal-hint code { color: #0a97b8 !important; }

/* Collapsible "steps" panels */
html.theme-light details.steps { background: #f4f6fb; border-color: rgba(15,23,42,.08); }
html.theme-light details.steps summary { color: #2563eb; }
html.theme-light details.steps ol { color: #475569; }
html.theme-light details.steps a { color: #2563eb !important; }
html.theme-light details.steps code { color: #0a97b8; }
html.theme-light details.steps em { color: #0f1729; }
