
:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;color:#eeeeF2;background:#101013;--surface:#1c1c21;--raised:#25252c;--border:#3c3c46;--muted:#b7b7c3}
[data-theme="dark"] button,[data-theme="dark"] input,[data-theme="dark"] select,[data-theme="dark"] textarea{background:var(--raised);color:#eeeef2;border-color:var(--border)}
[data-theme="dark"] button:hover{background:#383039}
[data-theme="dark"] .primary,[data-theme="dark"] .tabs button.active{background:#bb0d1a;color:#fff;border-color:#e13a48}
[data-theme="dark"] .primary:hover,[data-theme="dark"] .tabs button.active:hover{background:#d31b2a}
[data-theme="dark"] .stat,[data-theme="dark"] .sheet,[data-theme="dark"] .refcard,[data-theme="dark"] .refintro,[data-theme="dark"] dialog,[data-theme="dark"] #login,[data-theme="dark"] .edit-heading,[data-theme="dark"] .edit-section,[data-theme="dark"] .edit-details,[data-theme="dark"] .edit-footer{background:var(--surface);color:#eeeef2;border-color:var(--border)}
[data-theme="dark"] th,[data-theme="dark"] .calc,[data-theme="dark"] .itemrow{background:var(--raised);border-color:var(--border)}
[data-theme="dark"] td{border-bottom-color:var(--border)}
[data-theme="dark"] tbody tr:hover{background:#302329}
[data-theme="dark"] .edit-content{background:#141418}
[data-theme="dark"] #edit{border-color:var(--border)}
[data-theme="dark"] .stat span,[data-theme="dark"] .stat small,[data-theme="dark"] .note,[data-theme="dark"] td small,[data-theme="dark"] .statushint,[data-theme="dark"] .itemhelp,[data-theme="dark"] .field-note,[data-theme="dark"] .edit-heading p,[data-theme="dark"] .calc-card small,[data-theme="dark"] .refcard p,[data-theme="dark"] td::before{color:var(--muted)}
[data-theme="dark"] #edit label{color:#dddde5}
[data-theme="dark"] .tag{background:#34343e;color:#dddde5}
[data-theme="dark"] .eyebrow,[data-theme="dark"] .refcard summary,[data-theme="dark"] .refintro strong,[data-theme="dark"] .itemrow button,[data-theme="dark"] #formError,[data-theme="dark"] .calc .gain-negative{color:#ff8c97}
[data-theme="dark"] .good,[data-theme="dark"] .calc .gain-positive{color:#78d8aa}
[data-theme="dark"] .warn{color:#f4c56e}
[data-theme="dark"] .notice,[data-theme="dark"] #syncBanner{background:#3a301c;color:#f4d796}
[data-theme="dark"] .s-open{--status-bg:#172b43;--status-ink:#9bcaff;--status-color:#619ddd}
[data-theme="dark"] .s-negotiation{--status-bg:#352c18;--status-ink:#f4d17c;--status-color:#cba43b}
[data-theme="dark"] .s-closed{--status-bg:#143034;--status-ink:#83d8df;--status-color:#42abb2}
[data-theme="dark"] .s-production,[data-theme="dark"] .s-producing{--status-bg:#2d223e;--status-ink:#d2adfa;--status-color:#a87ed5}
[data-theme="dark"] .s-delivered{--status-bg:#1c3225;--status-ink:#94dda9;--status-color:#59ad72}
[data-theme="dark"] .s-cancelled{--status-bg:#2c2c33;--status-ink:#c4c4ce;--status-color:#92929e}
[data-theme="dark"] .workflow button{background:var(--status-bg);color:var(--status-ink)}
[data-theme="dark"] .tag.status{background:var(--status-bg);color:var(--status-ink)}
[data-theme="dark"] dialog::backdrop{background:#000a}
:where(button,input,select,textarea,summary):focus-visible{outline:2px solid #ef6672;outline-offset:3px}
#login [data-theme-toggle]{display:block;margin:0 0 20px auto}
@media(max-width:760px){[data-theme="dark"] tr{background:var(--surface);border-color:var(--border)}[data-theme="dark"] .sheet{background:transparent}}
