/* main-1-login-theme-2.css -- split from main-1-login-theme.css (File Split Plan #6, CSS pass).
   Pure move: byte-identical rules, only the file boundary is new. Loaded via
   its own <link> tag in index.html immediately after main-1-login-theme.css's, preserving
   the exact cascade order the single file had. */

/* ── Second wave of overrides — targets the components still showing dark
   after the first wave based on screenshot feedback. ────────────────── */

/* Send button (paper-plane in bottom-right of composer) — was dark-gradient
   metallic. In light mode: clean white with steel-blue accent. */
body[data-theme="light"] .send-btn {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface2) 100%) !important;
  border: 1px solid rgba(30, 58, 95, 0.22) !important;
  border-top-color: rgba(30, 58, 95, 0.12) !important;
  border-bottom-color: rgba(30, 58, 95, 0.28) !important;
  color: var(--smoke2) !important;
  box-shadow:
    0 1px 2px rgba(30, 58, 95, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
body[data-theme="light"] .send-btn:hover {
  color: var(--accent) !important;
  border-color: rgba(30, 58, 95, 0.40) !important;
  background: linear-gradient(160deg, rgba(30, 58, 95, 0.04) 0%, rgba(30, 58, 95, 0.06) 100%) !important;
  box-shadow:
    0 2px 6px rgba(30, 58, 95, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
}
body[data-theme="light"] .send-btn::before {
  background: none !important;
}

/* Microphone button (voice input toggle in composer) */
body[data-theme="light"] .mic-btn {
  background: var(--surface) !important;
  border: 1px solid rgba(30, 58, 95, 0.22) !important;
  color: var(--smoke2) !important;
  box-shadow:
    0 1px 2px rgba(30, 58, 95, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}
body[data-theme="light"] .mic-btn:hover {
  border-color: rgba(30, 58, 95, 0.40) !important;
  color: var(--accent) !important;
  background: rgba(30, 58, 95, 0.04) !important;
  box-shadow: 0 2px 4px rgba(30, 58, 95, 0.10) !important;
}

/* Image attach button (paperclip in composer) */
body[data-theme="light"] .img-attach-btn {
  background: var(--surface) !important;
  border: 1px solid rgba(30, 58, 95, 0.22) !important;
  color: rgba(30, 58, 95, 0.70) !important;
}
body[data-theme="light"] .img-attach-btn:hover {
  border-color: rgba(30, 58, 95, 0.40) !important;
  color: var(--smoke2) !important;
  background: rgba(30, 58, 95, 0.04) !important;
}
body[data-theme="light"] .img-attach-btn.has-image {
  border-color: var(--accent) !important;
  color: var(--smoke2) !important;
  background: rgba(59, 111, 168, 0.08) !important;
}

/* Feedback send button ("Send" in fb-comment-input) */
body[data-theme="light"] .fb-send-btn {
  background: var(--surface);
  color: var(--smoke2);
  border-color: rgba(30, 58, 95, 0.22);
}
body[data-theme="light"] .fb-send-btn:hover {
  border-color: var(--accent);
  color: var(--smoke2);
  background: rgba(30, 58, 95, 0.06);
}

/* Sidebar footer user card block — has inline styles with hardcoded gold
   colors (built by JavaScript in appendMsg-adjacent code). We override
   each known selector pattern with !important to force the light treatment
   despite the inline styles. */
body[data-theme="light"] #sb-user-block > div {
  border-top: 1px solid rgba(30, 58, 95, 0.12) !important;
}
body[data-theme="light"] #sb-user-block > div > div:first-child {
  /* Avatar square — was gold-tinted */
  background: linear-gradient(135deg, rgba(30, 58, 95, 0.10), rgba(30, 58, 95, 0.05)) !important;
  border: 1px solid rgba(30, 58, 95, 0.25) !important;
}
body[data-theme="light"] #sb-user-block > div > div:first-child span {
  color: var(--smoke2) !important;
}
body[data-theme="light"] #sb-user-block > div > div:nth-child(2) > div:first-child {
  /* User display name */
  color: var(--smoke2) !important;
}
body[data-theme="light"] #sb-user-block > div > div:nth-child(2) > div:nth-child(2) {
  /* ADMIN / USER role label */
  color: rgba(30, 58, 95, 0.55) !important;
}
body[data-theme="light"] #sb-user-block button {
  border-color: rgba(30, 58, 95, 0.22) !important;
}
body[data-theme="light"] #sb-user-block button:hover {
  border-color: rgba(30, 58, 95, 0.50) !important;
}
body[data-theme="light"] #sb-user-block button svg * {
  stroke: rgba(30, 58, 95, 0.75) !important;
  fill: rgba(30, 58, 95, 0.75) !important;
}
/* But preserve some SVG strokes that shouldn't fill */
body[data-theme="light"] #sb-user-block button svg rect,
body[data-theme="light"] #sb-user-block button svg path,
body[data-theme="light"] #sb-user-block button svg circle {
  fill: none !important;
  stroke: rgba(30, 58, 95, 0.75) !important;
}
body[data-theme="light"] #sb-user-block button svg circle[fill] {
  fill: rgba(30, 58, 95, 0.75) !important;
}

/* Model pill (Claude Sonnet / Grok / etc. at bottom of sidebar) — was dark
   gradient with gold border. Becomes clean white with steel accent. */
body[data-theme="light"] .model-pill {
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface2) 100%) !important;
  border: 1px solid rgba(30, 58, 95, 0.22) !important;
  border-top-color: rgba(30, 58, 95, 0.10) !important;
  border-bottom-color: rgba(30, 58, 95, 0.30) !important;
  color: var(--smoke2) !important;
  box-shadow:
    0 1px 3px rgba(30, 58, 95, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
}
body[data-theme="light"] .model-pill:hover {
  border-color: rgba(30, 58, 95, 0.40) !important;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface3) 100%) !important;
  box-shadow:
    0 2px 6px rgba(30, 58, 95, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

/* Welcome / intro text in empty chat — expanded selectors */
body[data-theme="light"] .chat-welcome,
body[data-theme="light"] .chat-intro,
body[data-theme="light"] .empty-chat-text,
body[data-theme="light"] #chat-welcome,
body[data-theme="light"] #chat-intro,
body[data-theme="light"] .chat-empty-msg,
body[data-theme="light"] .welcome-message {
  color: rgba(30, 58, 95, 0.78) !important;
}

/* Watermark — tone way down */
body[data-theme="light"] .brand-watermark,
body[data-theme="light"] #brand-mark,
body[data-theme="light"] .brand-mark,
body[data-theme="light"] #brand-wm,
body[data-theme="light"] .brand-wm {
  opacity: 0.10 !important;
  filter: none !important;
}

/* Switch collection button (upper left, below topbar) */
body[data-theme="light"] #switch-collection-btn,
body[data-theme="light"] .switch-collection-btn,
body[data-theme="light"] #sw-col-btn,
body[data-theme="light"] .sw-col-btn {
  background: var(--surface) !important;
  color: var(--smoke2) !important;
  border: 1px solid rgba(30, 58, 95, 0.22) !important;
}

/* Top-bar components — broader selector set */
body[data-theme="light"] #tb-dept,
body[data-theme="light"] #tb-status,
body[data-theme="light"] #tb-user,
body[data-theme="light"] #tb-user-chip,
body[data-theme="light"] .topbar-dept,
body[data-theme="light"] .topbar-status,
body[data-theme="light"] .topbar-user,
body[data-theme="light"] .tb-pill,
body[data-theme="light"] .tb-status,
body[data-theme="light"] .tb-model-chip {
  background: var(--surface) !important;
  color: var(--smoke2) !important;
  border: 1px solid rgba(30, 58, 95, 0.22) !important;
  box-shadow: 0 1px 2px rgba(30, 58, 95, 0.05) !important;
}
/* Inner elements of topbar pills */
body[data-theme="light"] .tb-status .tb-status-text,
body[data-theme="light"] .tb-model-chip .tmc-name {
  color: var(--smoke2) !important;
}
/* TIM KOSUGE user chip has massive inline styles — need deep overrides */
body[data-theme="light"] #tb-user-chip {
  background: var(--surface) !important;
  border-color: rgba(30, 58, 95, 0.22) !important;
}
body[data-theme="light"] #tb-user-chip svg {
  color: rgba(30, 58, 95, 0.60) !important;
}
body[data-theme="light"] #tb-user-name {
  color: var(--smoke2) !important;
}
body[data-theme="light"] #tb-user-role {
  color: rgba(30, 58, 95, 0.55) !important;
}

/* Green status dot ("ONLINE" indicator) — stays green */
body[data-theme="light"] .status-dot.online,
body[data-theme="light"] .online-dot {
  background: var(--green-lt) !important;
}

/* ── LIGHT MODE CHROME — white sidebar, navy text, white buttons navy trim ── */

/* SIDEBAR */
body[data-theme="light"] #sidebar {
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink2) 100%) !important;
  box-shadow: inset -1px 0 0 rgba(60,100,145,0.25), 3px 0 12px rgba(0,0,0,0.12) !important;
}
body[data-theme="light"] #sidebar::after { display:none !important; }
body[data-theme="light"] #sidebar::before { display:none !important; }
body[data-theme="light"] .sb-nav,
body[data-theme="light"] .sb-depts,
body[data-theme="light"] #sb-nav,
body[data-theme="light"] #sb-depts { background: transparent !important; }
body[data-theme="light"] .sb-footer { background: linear-gradient(180deg, var(--ink2) 0%, var(--ink3) 100%) !important; border-top: 1px solid rgba(60,100,145,0.30) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.35) !important; }
body[data-theme="light"] .model-pill .mp-name { color: var(--ink-deep) !important; }
body[data-theme="light"] .model-pill .mp-sub { color: var(--smoke4) !important; }
body[data-theme="light"] .model-pill .mp-arrow svg path,
body[data-theme="light"] .model-pill .mp-arrow svg { fill: var(--gold) !important; stroke: var(--gold) !important; }

/* Sidebar header — atmospheric pale-blue plaque (was: stays dark) */
body[data-theme="light"] .sb-header { background: linear-gradient(160deg,rgba(247,250,253,0.92) 0%,rgba(220,231,242,0.88) 100%) !important; border: 1px solid rgba(60,100,145,0.30) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.7), 0 2px 8px rgba(45,90,143,0.10) !important; }

/* Inner KAIT plaque — keep dark in light mode, it looks better */
body[data-theme="light"] .sb-plaque {
  background: linear-gradient(170deg, rgba(18,24,42,1) 0%, rgba(12,16,30,1) 50%, rgba(8,11,22,1) 100%) !important;
  border: 1px solid rgba(160,120,32,0.40) !important;
  border-top-color: rgba(210,175,90,0.55) !important;
  border-bottom-color: rgba(0,0,0,0.60) !important;
  box-shadow:
    0 4px 16px rgba(0,0,0,0.35),
    0 2px 6px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(210,175,90,0.20),
    inset 0 -2px 8px rgba(0,0,0,0.40) !important;
}
body[data-theme="light"] .sb-plaque::before {
  display: block !important;
  background: linear-gradient(90deg, transparent 5%, rgba(160,120,32,0.55) 25%, rgba(210,175,90,0.90) 50%, rgba(160,120,32,0.55) 75%, transparent 95%) !important;
  opacity: 1 !important;
}
body[data-theme="light"] .sb-plaque::after {
  background: linear-gradient(90deg, transparent, rgba(160,120,32,0.35) 25%, rgba(210,175,90,0.70) 50%, rgba(160,120,32,0.35) 75%, transparent) !important;
}
body[data-theme="light"] .sb-wordmark {
  background: linear-gradient(160deg,
    #C9A440 0%,
    #C9A440 15%,
    #C9A440 35%,
    #C9A440 50%,
    #C9A440 65%,
    #C9A440 85%,
    #C9A440 100%
  ) !important;
  -webkit-background-clip: text !important;
  background-clip: text !important;
  -webkit-text-fill-color: transparent !important;
  filter: drop-shadow(0 1px 0 rgba(0,0,0,0.5)) drop-shadow(0 -1px 0 rgba(210,175,90,0.15)) !important;
}
body[data-theme="light"] .sb-tagline {
  color: rgba(200,170,100,0.70) !important;
}
body[data-theme="light"] .sb-dept-engraved {
  color: rgba(200,170,100,0.80) !important;
  font-weight: 600 !important;
}

/* Sidebar toggle */
body[data-theme="light"] #sb-toggle { background: var(--surface) !important; border-color: rgba(60,100,145,0.30) !important; color: var(--gold) !important; box-shadow: 0 2px 8px rgba(45,90,143,0.12) !important; }
body[data-theme="light"] #sb-toggle:hover { background: var(--ink4) !important; }

/* Nav buttons — MUST override the base rgba(212,168,50) color.
   Consolidated May 3 — earlier rules had thin navy text that was invisible
   against the pale gradient sidebar. Now: bold weight, near-black navy,
   with a faint card background so they read as actual buttons. */
body[data-theme="light"] .nav-btn,
html body[data-theme="light"] .nav-btn {
  color: var(--smoke) !important;
  background: rgba(255,255,255,0.55) !important;
  border: 1px solid rgba(60,100,145,0.20) !important;
  box-shadow: 0 1px 2px rgba(45,90,143,0.08) !important;
  text-shadow: none !important;
  font-weight: 500 !important;
}
body[data-theme="light"] .nav-btn:hover,
html body[data-theme="light"] .nav-btn:hover {
  background: rgba(255,255,255,0.85) !important;
  color: var(--smoke) !important;
  border-color: rgba(60,100,145,0.45) !important;
  box-shadow: 0 2px 6px rgba(45,90,143,0.15) !important;
}
body[data-theme="light"] .nav-btn.active,
html body[data-theme="light"] .nav-btn.active {
  background: linear-gradient(180deg, rgba(74,130,194,0.30) 0%, rgba(45,90,143,0.22) 100%) !important;
  color: var(--smoke) !important;
  border-color: rgba(60,100,145,0.60) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.6), 0 2px 6px rgba(45,90,143,0.20) !important;
  text-shadow: none !important;
  font-weight: 600 !important;
}
body[data-theme="light"] .nav-btn::before,
html body[data-theme="light"] .nav-btn::before { display: none !important; }

/* Dept section label */
body[data-theme="light"] .sb-section-label,
body[data-theme="light"] .sb-dept-label { color: var(--smoke4) !important; border-color: rgba(60,100,145,0.18) !important; }

/* Dept buttons */
body[data-theme="light"] .dept-btn { color: var(--smoke3) !important; background: transparent !important; border-color: transparent !important; box-shadow: none !important; text-shadow: none !important; }
body[data-theme="light"] .dept-btn:hover { background: rgba(74,130,194,0.12) !important; color: var(--gold) !important; border-color: rgba(60,100,145,0.20) !important; box-shadow: none !important; }
body[data-theme="light"] .dept-btn.active { background: linear-gradient(180deg, rgba(74,130,194,0.22) 0%, rgba(45,90,143,0.14) 100%) !important; color: var(--gold) !important; border-color: rgba(60,100,145,0.40) !important; box-shadow: inset 0 1px 0 rgba(255,255,255,0.5) !important; text-shadow: none !important; }
body[data-theme="light"] .dept-btn::before { display: none !important; }

/* Sidebar user block */
body[data-theme="light"] #sb-user-block > div { border-top: 1px solid rgba(60,100,145,0.22) !important; background: transparent !important; }
body[data-theme="light"] #sb-user-block > div > div:first-child { background: linear-gradient(135deg, var(--gold-lt), var(--gold)) !important; border: 1px solid rgba(60,100,145,0.40) !important; }
body[data-theme="light"] #sb-user-block > div > div:first-child span { color: var(--surface) !important; }
body[data-theme="light"] #sb-user-block > div > div:nth-child(2) > div:first-child { color: var(--ink-deep) !important; }
body[data-theme="light"] #sb-user-block > div > div:nth-child(2) > div:nth-child(2) { color: var(--gold) !important; }
body[data-theme="light"] #sb-user-block button { background: transparent !important; border-color: rgba(60,100,145,0.25) !important; }
body[data-theme="light"] #sb-user-block button svg,
body[data-theme="light"] #sb-user-block button svg * { stroke: var(--smoke4) !important; fill: none !important; }
body[data-theme="light"] #sb-user-block button:hover svg,
body[data-theme="light"] #sb-user-block button:hover svg * { stroke: var(--gold) !important; }

/* Model pill */
body[data-theme="light"] .model-pill { background: linear-gradient(180deg, rgba(247,250,253,0.92) 0%, rgba(220,231,242,0.88) 100%) !important; border: 1px solid rgba(60,100,145,0.25) !important; color: var(--smoke3) !important; box-shadow: 0 1px 3px rgba(45,90,143,0.10) !important; }
body[data-theme="light"] .model-pill:hover { background: rgba(199,213,229,0.85) !important; }
body[data-theme="light"] .model-pill .mpip,
body[data-theme="light"] .model-pill svg { stroke: var(--smoke4) !important; }

/* TOPBAR */
body[data-theme="light"] #topbar { background: linear-gradient(180deg, var(--ink) 0%, var(--ink2) 100%) !important; border-bottom: 1px solid rgba(60,100,145,0.30) !important; box-shadow: inset 0 1px 2px rgba(255,255,255,0.5), 0 1px 0 rgba(0,0,0,0.10), 0 2px 12px rgba(0,0,0,0.10) !important; }
body[data-theme="light"] .tb-logo { color: var(--gold) !important; }
body[data-theme="light"] .tb-module { color: var(--smoke4) !important; }
body[data-theme="light"] .tb-sep { background: rgba(30,58,95,0.15) !important; }

/* All topbar chips — white bg, navy text, navy border */
body[data-theme="light"] .tb-status,
body[data-theme="light"] .tb-model-chip,
body[data-theme="light"] #tb-user-chip { background: linear-gradient(180deg, var(--ink), var(--ink2)) !important; border: 1.5px solid var(--border-strong) !important; box-shadow: 0 1px 2px rgba(15, 37, 64, 0.08) !important; }
body[data-theme="light"] .tb-status .tb-status-text { color: var(--ink-deep) !important; }
body[data-theme="light"] .tb-model-chip .tmc-name { color: var(--ink-deep) !important; }
body[data-theme="light"] #tb-user-chip { background: linear-gradient(180deg, var(--ink), var(--ink2)) !important; border-color: var(--border-strong) !important; }
body[data-theme="light"] #tb-user-name { color: var(--ink-deep) !important; }
body[data-theme="light"] #tb-user-role { color: var(--smoke2) !important; }
body[data-theme="light"] #tb-user-chip svg * { stroke: var(--ink-deep) !important; }

/* Brightness and theme buttons */
body[data-theme="light"] #tb-brightness-btn,
body[data-theme="light"] #theme-toggle { background: linear-gradient(180deg, var(--ink), var(--ink2)) !important; border: 1.5px solid var(--border-strong) !important; box-shadow: 0 1px 2px rgba(15, 37, 64, 0.08) !important; }
body[data-theme="light"] #tb-brightness-btn svg,
body[data-theme="light"] #theme-toggle svg { stroke: var(--ink-deep) !important; }
body[data-theme="light"] #tb-brightness-btn:hover,
body[data-theme="light"] #theme-toggle:hover { background: var(--surface3) !important; border-color: var(--border-dark) !important; }
body[data-theme="light"] #tb-brightness-panel { background: var(--surface) !important; border: 1px solid rgba(30,58,95,0.15) !important; box-shadow: 0 8px 24px rgba(30,58,95,0.12) !important; }
body[data-theme="light"] #tb-bg-val,
body[data-theme="light"] #tb-sidebar-val,
body[data-theme="light"] #tb-text-val { color: var(--smoke3) !important; }

/* SCOPE BAR */
body[data-theme="light"] .scope-btn { background: var(--surface) !important; color: var(--ink-deep) !important; border: 1.5px solid var(--border-strong) !important; box-shadow: none !important; }
body[data-theme="light"] .scope-btn.active { background: var(--ink4) !important; color: var(--gold) !important; border-color: var(--border-strong) !important; }
body[data-theme="light"] .scope-btn:hover { background: var(--surface3) !important; color: var(--smoke2) !important; }
body[data-theme="light"] #col-picker-btn,
body[data-theme="light"] .col-picker-btn { background: var(--surface) !important; color: var(--ink-deep) !important; border: 1.5px solid var(--border-strong) !important; box-shadow: none !important; }
body[data-theme="light"] #col-picker-btn:hover,
body[data-theme="light"] .col-picker-btn:hover { background: var(--surface3) !important; }
body[data-theme="light"] .col-picker-dropdown { background: var(--surface) !important; border: 1px solid rgba(30,58,95,0.15) !important; box-shadow: 0 8px 20px rgba(30,58,95,0.10) !important; }

/* CHAT BAR */
body[data-theme="light"] #chat-bar,
body[data-theme="light"] .chat-bar { background: linear-gradient(180deg, var(--ink) 0%, var(--ink2) 100%) !important; border-top: 1px solid rgba(60,100,145,0.30) !important; box-shadow: 0 -2px 8px rgba(0,0,0,0.10) !important; }
body[data-theme="light"] .chat-bar-inner { background: transparent !important; }
body[data-theme="light"] #chat-ta,
body[data-theme="light"] .chat-ta { color: var(--smoke) !important; background: transparent !important; }
body[data-theme="light"] #chat-ta::placeholder,
body[data-theme="light"] .chat-ta::placeholder { color: var(--smoke4) !important; }

/* Bottom bar buttons — white bg, navy icon, navy border */
body[data-theme="light"] .scenario-btn { background: var(--surface) !important; border: 1.5px solid var(--border-strong) !important; color: var(--ink-deep) !important; box-shadow: none !important; }
body[data-theme="light"] .scenario-btn svg * { stroke: var(--ink-deep) !important; }
body[data-theme="light"] .scenario-btn:hover { background: var(--surface3) !important; }
body[data-theme="light"] .mic-btn,
body[data-theme="light"] .spk-toggle-btn { background: var(--surface) !important; border: 1.5px solid var(--border-strong) !important; color: var(--ink-deep) !important; box-shadow: none !important; }
body[data-theme="light"] .mic-btn svg,
body[data-theme="light"] .spk-toggle-btn svg,
body[data-theme="light"] .mic-btn svg *,
body[data-theme="light"] .spk-toggle-btn svg * { stroke: var(--ink-deep) !important; }
body[data-theme="light"] .mic-btn:hover,
body[data-theme="light"] .spk-toggle-btn:hover { background: var(--surface3) !important; }
body[data-theme="light"] .img-attach-btn { background: var(--surface) !important; border: 1.5px solid var(--border-strong) !important; color: var(--ink-deep) !important; box-shadow: none !important; }
body[data-theme="light"] .img-attach-btn svg,
body[data-theme="light"] .img-attach-btn svg * { stroke: var(--ink-deep) !important; }
body[data-theme="light"] .img-attach-btn:hover { background: var(--surface3) !important; }
body[data-theme="light"] .send-btn { background: var(--smoke2) !important; border: 1px solid var(--border-strong) !important; color: var(--surface) !important; box-shadow: none !important; }
body[data-theme="light"] .send-btn svg,
body[data-theme="light"] .send-btn svg * { stroke: var(--surface) !important; fill: var(--surface) !important; }
body[data-theme="light"] .send-btn:hover { background: var(--gold) !important; border-color: var(--gold) !important; }
body[data-theme="light"] .send-btn::before { display: none !important; }

/* Message action buttons */
body[data-theme="light"] .msg-action-btn { background: var(--surface) !important; color: var(--ink-deep) !important; border-color: var(--border-strong) !important; box-shadow: none !important; }
body[data-theme="light"] .msg-action-btn:hover { background: var(--surface3) !important; color: var(--smoke2) !important; border-color: rgba(30,58,95,0.30) !important; }

/* Feedback */
body[data-theme="light"] .fb-btn { background: var(--surface) !important; color: var(--ink-deep) !important; border-color: var(--border-strong) !important; box-shadow: none !important; }
body[data-theme="light"] .fb-btn.sharp { color: var(--green) !important; border-color: rgba(21,128,61,0.30) !important; }
body[data-theme="light"] .fb-btn.missed { color: var(--red) !important; border-color: rgba(153,27,27,0.30) !important; }
body[data-theme="light"] .fb-btn.incomplete { color: var(--amber) !important; border-color: rgba(180,83,9,0.30) !important; }

/* Labels */
body[data-theme="light"] .msg-model,
body[data-theme="light"] .model-label,
body[data-theme="light"] .msg-provider { color: var(--smoke4) !important; }
body[data-theme="light"] .msg-sources a { color: var(--ink-deep) !important; }
body[data-theme="light"] .msg-sources a:hover { color: var(--smoke2) !important; }
body[data-theme="light"] .sources-label { color: var(--smoke4) !important; }

/* Status dot stays green */
body[data-theme="light"] .status-dot.online,
body[data-theme="light"] .online-dot { background: var(--green-lt) !important; }

/* ── Login ─────────────────────────────────────────────── */
#login-screen {
  position: fixed; inset: 0; z-index: 9000;
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  /* Deep navy base */
  background-color: var(--ink-deep);
  /* Candlelight — warm amber source, subtle flicker */
  background-image:
    linear-gradient(180deg,
      rgba(200,120,20,0.068) 0%,
      rgba(200,120,20,0.119) 3%,
      rgba(180,100,15,0.068) 12%,
      rgba(155,80,10,0.034) 26%,
      rgba(120,60,8,0.014) 40%,
      transparent 60%
    ),
    radial-gradient(ellipse 100% 32% at 50% -8%, rgba(210,130,25,0.060) 0%, transparent 100%),
    radial-gradient(ellipse 45% 18% at 49% -6%, rgba(230,150,30,0.054) 0%, transparent 100%);
  /* Suede noise overlay via pseudo-element — see ::before */
}
#login-screen::before {
  content: '';
  position: absolute; inset: 0;
  z-index: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n' color-interpolation-filters='sRGB'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.95' numOctaves='2' stitchTiles='stitch' result='noise'/%3E%3CfeColorMatrix type='matrix' values='0.5 0.35 0 0 0.14 0.4 0.28 0 0 0.09 0.25 0.15 0 0 0.04 0 0 0 1 0' in='noise'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 160px 160px;
  pointer-events: none;
}
/* Candle flicker overlay */
#login-screen::after {
  content: '';
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(180deg,
      rgba(200,110,15,0.068) 0%,
      rgba(170,85,10,0.034) 15%,
      transparent 45%
    ),
    radial-gradient(ellipse 60% 22% at 50% 0%, rgba(220,135,20,0.047) 0%, transparent 100%);
  animation: candleFlicker 4s ease-in-out infinite;
}
@keyframes candleFlicker {
  0%   { opacity: 1;    }
  15%  { opacity: 0.82; }
  30%  { opacity: 0.95; }
  45%  { opacity: 0.87; }
  60%  { opacity: 1.0;  }
  75%  { opacity: 0.84; }
  88%  { opacity: 0.92; }
  100% { opacity: 1;    }
}
/* Light mode: replace the dark navy + candlelight with a soft light field.
   The login card stays dark (see preservation rules above) so it remains the
   centerpiece — a dark premium artifact surrounded by a clean cool page. */
body[data-theme="light"] #login-screen {
  background-color: var(--surface2);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 30%, rgba(30,58,95,0.04) 0%, transparent 70%),
    radial-gradient(ellipse 50% 30% at 50% 90%, rgba(30,58,95,0.03) 0%, transparent 70%);
}
body[data-theme="light"] #login-screen::before {
  display: none;
}
body[data-theme="light"] .login-frame-box {
  /* Frame still visible but toned for light bg — the gold border reads fine here */
  opacity: 0.55;
}
#login-screen > * { position: relative; z-index: 1; }
.login-wrap {
  width: 100%; max-width: 380px;
  animation: fadeUp 0.9s var(--ease) both;
}
/* Gold rectangle frame — wraps the entire login content area */
.login-frame-box {
  position: fixed;
  top: 12vh; bottom: 12vh;
  left: 8vw; right: 8vw;
  border: 1px solid rgba(160,120,32,0.40);
  pointer-events: none;
  z-index: 8999;
  box-shadow: 0 0 40px rgba(160,120,32,0.05), inset 0 0 0 1px rgba(210,175,90,0.03);
  animation: fadeUp 1.1s var(--ease) both;
  transition: opacity 0.1s;
}
.login-frame-box.flipping {
  opacity: 0;
}
/* Top bright edge */
.login-frame-box::before {
  content: '';
  position: absolute; top: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(210,175,90,0.5) 25%, rgba(232,200,120,0.9) 50%, rgba(210,175,90,0.5) 75%, transparent);
}
/* Bottom dim edge */
.login-frame-box::after {
  content: '';
  position: absolute; bottom: 0; left: 8%; right: 8%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160,120,32,0.30) 25%, rgba(160,120,32,0.45) 50%, rgba(160,120,32,0.30) 75%, transparent);
}
/* Shimmer sweep */
.login-frame-shimmer {
  position: absolute; inset: 0;
  background: linear-gradient(108deg,
    transparent 0%, transparent 30%,
    rgba(210,175,90,0.04) 42%, rgba(232,200,120,0.08) 50%,
    rgba(210,175,90,0.04) 58%, transparent 70%, transparent 100%
  );
  background-size: 300% 100%;
  background-position: 140% 0;
  animation: frameShimmer 3.4s ease 0.8s both;
  pointer-events: none;
}
@keyframes frameShimmer {
  0%   { background-position: 140% 0; opacity: 0; }
  6%   { opacity: 1; }
  100% { background-position: -60% 0; opacity: 0.8; }
}
/* Corner dots — removed */
.login-frame-box .fc {
  display: none;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
.login-mark {
  margin-bottom: 44px;
  text-align: center;
  display: none;
}
.login-wordmark {
  font-family: var(--f-display);
  font-size: 56px;
  font-weight: 300;
  letter-spacing: 0.28em;
  white-space: nowrap;
  margin-right: -0.28em;
  background: linear-gradient(160deg,
    var(--gold-lt) 0%,
    var(--gold-lt) 12%,
    var(--gold-metal-2) 32%,
    var(--gold) 48%,
    var(--gold) 54%,
    var(--gold-metal-3) 65%,
    var(--gold-lt) 80%,
    var(--gold-lt) 92%,
    var(--gold-metal-2) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  display: inline-block;
  position: relative;
  filter:
    drop-shadow(0 1px 0px rgba(0,0,0,1))
    drop-shadow(0 2px 2px rgba(0,0,0,0.90))
    drop-shadow(0 4px 6px rgba(0,0,0,0.55))
    drop-shadow(0 0 16px rgba(160,120,32,0.28));
}
.login-wordmark::after {
  content: '';
  display: block;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(160,120,32,0.2) 15%,
    rgba(210,175,90,0.7) 40%,
    rgba(160,120,32,0.9) 50%,
    rgba(210,175,90,0.7) 60%,
    rgba(160,120,32,0.2) 85%,
    transparent
  );
  margin-top: 14px;
}
.login-sub {
  font-family: var(--f-ui);
  font-size: 9px;
  font-weight: 300;
  letter-spacing: 0.26em;
  color: rgba(255,255,255,0.18);
  text-transform: uppercase;
  margin-top: 12px;
  text-align: center;
  -webkit-font-smoothing: antialiased;
}

/* Login card — metallic bordered, glimmering on load */
.login-card {
  background: linear-gradient(160deg, rgba(10,15,28,0.99) 0%, rgba(6,9,18,1) 100%);
  border-radius: 10px;
  padding: 38px 34px;
  position: relative;
  overflow: hidden;
  /* Recessed vault panel effect — outer gold frame, deep inset shadows */
  box-shadow:
    0 0 0 1px rgba(160,120,32,0.50),
    0 0 0 2px rgba(160,120,32,0.14),
    /* inner top-left dark shadow — recessed lid */
    inset 0 2px 8px rgba(0,0,0,0.70),
    inset 2px 0 6px rgba(0,0,0,0.40),
    /* inner bottom highlight — raised floor */
    inset 0 -1px 0 rgba(210,175,90,0.06),
    inset 0 0 0 1px rgba(210,175,90,0.10),
    /* ambient gold inner glow */
    inset 0 0 40px rgba(160,120,32,0.06),
    /* outer drop shadow */
    0 40px 100px rgba(0,0,0,0.85),
    0 4px 8px rgba(0,0,0,0.6);
}

/* Metallic top edge — the brightest part of a gold frame */
.login-card::before {
  content: '';
  position: absolute; top: 0; left: 0%; right: 0%;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(160,120,32,0.3) 20%,
    rgba(210,175,90,0.85) 45%,
    rgba(220,180,100,1) 50%,
    rgba(210,175,90,0.85) 55%,
    rgba(160,120,32,0.3) 80%,
    transparent
  );
}

/* Glimmer sweep animation — once on load */
.login-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    110deg,
    transparent 0%,
    transparent 30%,
    rgba(210,175,90,0.04) 40%,
    rgba(210,175,90,0.09) 48%,
    rgba(232,200,120,0.12) 50%,
    rgba(210,175,90,0.09) 52%,
    rgba(210,175,90,0.04) 60%,
    transparent 70%,
    transparent 100%
  );
  background-size: 300% 100%;
  background-position: 120% 0;
  animation: goldGlimmer 2.2s ease 1s both;
  pointer-events: none;
  border-radius: 10px;
}
@keyframes goldGlimmer {
  0%   { background-position: 120% 0; opacity: 0; }
  5%   { opacity: 1; }
  100% { background-position: -40% 0; opacity: 0.6; }
}

/* Corner accents — hand-crafted feel */
.login-card .corner {
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
}
.login-card .corner::before,
.login-card .corner::after {
  content: '';
  position: absolute;
  background: linear-gradient(135deg, rgba(220,180,100,0.92), rgba(160,120,32,0.55));
}
.login-card .corner::before { width: 1px; height: 100%; }
.login-card .corner::after  { width: 100%; height: 1px; }
.login-card .corner.tl { top: 0; left: 0; }
.login-card .corner.tr { top: 0; right: 0; transform: scaleX(-1); }
.login-card .corner.bl { bottom: 0; left: 0; transform: scaleY(-1); }
.login-card .corner.br { bottom: 0; right: 0; transform: scale(-1); }

.lfield-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 22px;
  position: relative;
}
/* Ornamental rule above label */
.lfield-rule {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-bottom: 13px;
}
.lfield-rule::before,
.lfield-rule::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(160,120,32,0.26));
}
.lfield-rule::after {
  background: linear-gradient(90deg, rgba(160,120,32,0.26), transparent);
}
.lfield-rule-diamond {
  width: 4px; height: 4px;
  background: rgba(160,120,32,0.55);
  transform: rotate(45deg);
  flex-shrink: 0;
  visibility: hidden;
}
