/* Auth screens stay light. Semantic fallbacks in the shared styles preserve
   the existing light palette; all dark colours are owned here. */
:root{color-scheme:light}
:root[data-theme="dark"]{
  color-scheme:dark;
  --ui-ink:#e3ebf7;--ui-muted:#a4b3c8;--ui-border:#304159;
  --ui-focus:#68b8ff;--ui-accent:#68b8ff;--ui-subtle:#18283f;
  --ink:var(--ui-ink);--muted:var(--ui-muted);--faint:#91a3bd;
  --line:var(--ui-border);--line-strong:#455a76;
  --canvas:#0b1423;--card:#111f33;--blue:#68b8ff;--blue-dark:#96cfff;
  --blue-wash:#163453;--ui-navy:#d1e4fb;--ui-primary:#0965c5;
  --teal:#6fdbc5;--teal-wash:#173c38;--amber:#f0c781;--amber-wash:#3c321f;
  --red:#ff9aac;--red-wash:#3d2532;--purple:#c9b1ff;--purple-wash:#302743;
  --ui-popup-shadow:0 12px 36px #0006,0 2px 6px #0004;
  --ui-control-shadow:0 1px 2px #0003;
  --theme-surface:var(--card);--theme-subtle:#15243a;--theme-raised:#1b2c44;
  --theme-glass:rgba(17,31,51,.94);--theme-border:var(--ui-border);
  --theme-text:var(--ui-ink);--theme-muted:var(--ui-muted);
  --theme-ink-blue:#78bfff;--theme-ink-green:#79d8bf;
  --theme-ink-amber:#f0c781;--theme-ink-red:#ff9aac;
  --theme-wash-blue:var(--blue-wash);--theme-wash-green:#173c38;
  --theme-wash-amber:#3c321f;--theme-wash-red:#3d2532;
}
:root[data-theme="dark"] .button.primary{background:var(--ui-primary);border-color:var(--ui-primary);color:#fff}
:root[data-theme="dark"] .button.primary:not(:disabled):not([aria-disabled=true]):hover{background:#1475d5;border-color:#1475d5}
:root[data-theme="dark"] .global-rail .nav-link.active{color:var(--blue)}
:root[data-theme="dark"] :is(.rail-toggle,.record-activity-collapse,.shared-columns-collapse){background:#0d2b4f;color:#e3ebf7;border-color:#455a76}
:root[data-theme="dark"] dialog::backdrop{background:rgba(0,7,18,.6)}
