/* Exactly three palettes. Plum keeps the existing appearance. */
:root[data-theme="blue"]{--ink:#0B1F3B;--plum:#0B1F3B;--plum-mid:#2563EB;--mauve:#1d4ed8;--blush:#60A5FA;--cream:#DBEAFE;--page:#F0F7FF;--panel:#fff;--muted:#526780;--border:#c6daf2;--surface:#DBEAFE;--soft:#e8f1ff;--on-nav:#dbeafe}
:root[data-theme="violet"]{--ink:#29134c;--plum:#5B21B6;--plum-mid:#6d28d9;--mauve:#6d28d9;--blush:#C7B3FF;--cream:#EDE9FE;--page:#FAF9FF;--panel:#fff;--muted:#6d6083;--border:#ddd2f4;--surface:#EDE9FE;--soft:#f3efff;--on-nav:#ede9fe;--accent:#8B5CF6}
.theme-select{width:auto;max-width:160px;padding:8px 12px;font:inherit;font-size:13px;border:1px solid var(--border);border-radius:8px;background:var(--panel);color:var(--plum);cursor:pointer;min-height:38px}
.theme-select:focus-visible{outline:2px solid var(--plum-mid);outline-offset:2px}
:root:is([data-theme="blue"],[data-theme="violet"]) .topbar{background:var(--panel)}
:root:is([data-theme="blue"],[data-theme="violet"]) :is(input,select,textarea){border-color:var(--border);background:var(--panel);color:var(--ink)}
:root:is([data-theme="blue"],[data-theme="violet"]) :is(button:hover,th,.badge,.profile,.flow-index,.line-grid,.scale-strip,.receipt-summary,.receipt-evidence-status,.role-access-preview,input[readonly]){background:var(--surface);color:var(--ink);border-color:var(--border)}
:root:is([data-theme="blue"],[data-theme="violet"]) :is(td,.dialog-head){border-color:var(--border)}
:root:is([data-theme="blue"],[data-theme="violet"]) tbody tr:hover{background:var(--soft)}
:root:is([data-theme="blue"],[data-theme="violet"]) .notice:not(.amber){background:var(--soft);color:var(--ink);border-color:var(--border)}
:root:is([data-theme="blue"],[data-theme="violet"]) .receipt-metric.payable{background:var(--surface);border-color:var(--blush)}
:root:is([data-theme="blue"],[data-theme="violet"]) nav button{color:var(--on-nav)}
:root:is([data-theme="blue"],[data-theme="violet"]) nav button:hover{background:#ffffff20;color:white}
:root:is([data-theme="blue"],[data-theme="violet"]) nav button.active{background:var(--plum-mid);color:white}
:root[data-theme="violet"] nav button.active{background:#7c3aed}
:root:is([data-theme="blue"],[data-theme="violet"]) aside .nav-caption{color:var(--blush)}
:root:is([data-theme="blue"],[data-theme="violet"]) .login-panel{background:linear-gradient(145deg,var(--panel),var(--cream))}
:root:is([data-theme="blue"],[data-theme="violet"]) .login-story{background:linear-gradient(90deg,#081424a8,#08142430),linear-gradient(0deg,var(--plum),#08142444 70%),url('/static/login-scrap.png') center/cover no-repeat var(--plum)}
:root:is([data-theme="blue"],[data-theme="violet"]) :is(.story-grid b,.login-story p){color:#f5f7ff}
:root:is([data-theme="blue"],[data-theme="violet"]) .login-story>small{color:var(--blush)}
:root:is([data-theme="blue"],[data-theme="violet"]) button.primary:hover{background:var(--plum-mid);color:white}
@media(max-width:720px){.topbar{height:auto;min-height:56px;flex-wrap:wrap;gap:6px;padding-top:8px;padding-bottom:8px}.top-actions{flex-wrap:wrap}.theme-select{max-width:130px}}
:root:is([data-theme="blue"],[data-theme="violet"]) dialog{background:var(--panel)}
:root:is([data-theme="blue"],[data-theme="violet"]) .receipt-metric span{color:var(--muted)}
:root[data-theme="violet"] .login-panel .primary{background:#5B21B6;border-color:#5B21B6}
:root[data-theme="violet"] input:focus,:root[data-theme="violet"] select:focus,:root[data-theme="violet"] textarea:focus{border-color:#8B5CF6;box-shadow:0 0 0 3px #8B5CF626}
:root[data-theme="blue"] input:focus,:root[data-theme="blue"] select:focus,:root[data-theme="blue"] textarea:focus{border-color:#2563EB;box-shadow:0 0 0 3px #2563EB26}
