/* Dark theme. The pre-paint theme script resolves automatic/device mode or a
   saved manual choice and sets data-theme before these styles load.
   Tokens are redefined here; hard-coded light colours in app.css use var(--dk-*, original),
   so light mode is unchanged and only this file decides dark values.
   Status colours keep their meaning: red = risk, amber = waiting/warning, green = done. */
:root[data-theme="dark"] {
    color-scheme: dark;
    --brand:#b9a6ff; --brand-soft:#2a2347; --brand-line:#4b4083;
    --success:#86d9a8; --success-soft:#143021; --success-line:#2f5e42;
    --border-input:#4a4f59; --ink:#e9eaee; --muted:#a7adb8; --line:#2e3139;
    --surface:#17191d; --canvas:#0f1114;
    --amber:#f3c26e; --amber-soft:#30250f; --red:#ff9f9f; --red-soft:#361818;
    --risk:#ff9f9f; --risk-soft:#361818; --wait:#f3c26e; --wait-soft:#30250f; --done:#86d9a8; --done-soft:#143021;
    --shadow:0 1px 2px rgba(0,0,0,.45);
    --dk-surface:#17191d; --dk-surface-2:#1f2127; --dk-brand-soft:#2a2347; --dk-wait-soft:#30250f;
    --dk-risk-soft:#361818; --dk-done-soft:#143021; --dk-glass:rgba(23,25,29,.96);
    --dk-line:#2e3139; --dk-line-strong:#5b616c; --dk-brand-line:#4b4083; --dk-wait-line:#6e5622; --dk-risk-line:#6e2e2e;
    --dk-ink:#e9eaee; --dk-muted:#a7adb8; --dk-wait-ink:#f3c26e; --dk-risk-ink:#ff9f9f; --dk-brand-hover:#6a50e8;
    --dk-shadow-tint:rgba(0,0,0,.5);
}
/* Brand-filled controls keep white text on a purple that reads on dark. */
:root[data-theme="dark"] .button-primary,:root[data-theme="dark"] .skip-link,
:root[data-theme="dark"] .nav-badge,:root[data-theme="dark"] .status-chip span,
:root[data-theme="dark"] .progress-steps span.on,:root[data-theme="dark"] .order-progress li.done span,
:root[data-theme="dark"] .order-progress li.now span,:root[data-theme="dark"] .step-indicator .is-current::before,
:root[data-theme="dark"] .auth-steps .is-current::before { background:#5a3fd4; color:#fff; }
:root[data-theme="dark"] .button-primary:hover { background:#6a50e8; }
:root[data-theme="dark"] .tab-bar .nav-badge { box-shadow:0 0 0 2px var(--surface); }
/* Preserve the approved logo colours. Inverting the combined mark/wordmark
   turned its purple square into an unrecognisable white block. */
:root[data-theme="dark"] .brand-logo { height:34px; padding:4px 6px; border-radius:6px; background:#fff; filter:none; }
:root[data-theme="dark"] img { color-scheme:normal; }
:root[data-theme="dark"] ::placeholder { color:#7d8390; }
