/* Explicit surfaces preserve product photos, status meaning and chosen sidebar colors. */
html[data-color-mode=dark]{color-scheme:dark;--ink:#e3ece9;--muted:#a5b6b0;--line:#354740;--bg:#111a17;--paper:#1b2822;--green:#8ad6bd;--green-dark:#b2e7d5;--mint:#263e33;--red:#f2a3a3;--amber:#e8bf7d;--blue:#9bc9e5;--shadow:0 12px 40px #0005}
html[data-color-mode=dark] :is(.topbar,.card,.metric:not(.accent),.system-card,.filterbar,.mini-stat,.modal,.drawer,.search-results,.deal-card,.calendar-day,.quick-card,.note,.dispatch-panel,.source-offer,.brand-product,.brand-box,.estimate-area,.estimate-box,.account-hub,.hub-card){background:var(--paper);color:var(--ink);border-color:var(--line)}
html[data-color-mode=dark] :is(input:not([type=color]):not([type=checkbox]):not([type=radio]),select,textarea){background:#14201a;color:var(--ink);border-color:#50645a}
html[data-color-mode=dark] :is(input,textarea)::placeholder{color:#a5b6b0}
html[data-color-mode=dark] :is(.modal-footer,.data-table th,.line-head,.segmented,.kanban-col,.date-chip,.data-table .row-icon){background:#233229;color:var(--ink);border-color:var(--line)}
html[data-color-mode=dark] :is(.data-table td,.data-table .primary-cell,.detail-field .value,.detail-items td,.detail-items th,.document-totals .total-row,.document-totals .total-row.grand,.note p,.quick-card,.day-heading strong,.empty h3,.line-row .line-total){color:var(--ink);border-color:var(--line)}
html[data-color-mode=dark] :is(.text-muted,.help-copy,.field label,.field .help,.check-row,.settings-layout p,.sidebar-color-controls>p,.sidebar-preview-code,.sidebar-color-preview>.eyebrow,.dispatch-help,.dispatch-panel summary,.system-pill){color:var(--muted)}
html[data-color-mode=dark] :is(.search-result:hover,.quick-card:hover,.dispatch-tile:hover,.data-table tbody tr[data-action]:hover,.segmented button.active){background:#30483a;color:var(--ink)}
html[data-color-mode=dark] .badge{background:#30443a;color:#d1dfd7}
html[data-color-mode=dark] .badge.good{background:#234532;color:#abebc2}
html[data-color-mode=dark] .badge.warn{background:#4d3d23;color:#f6d59c}
html[data-color-mode=dark] .badge.bad{background:#4b2929;color:#ffc1bb}
html[data-color-mode=dark] .badge.blue{background:#263e51;color:#b5dafa}
html[data-color-mode=dark] .badge.purple{background:#413150;color:#dfc1fa}
html[data-color-mode=dark] :is(.notice,.calendar-event.ticket){background:#423821;color:#f1d5a2;border-color:#6a5832}
html[data-color-mode=dark] :is(.notice.green,.dispatch-notice,.calendar-event){background:#263f30;color:#c1e6c9;border-color:#46694d}
html[data-color-mode=dark] .btn.danger{background:#412626;color:#ffc1bb;border-color:#8c5656}
html[data-color-mode=dark][data-button-theme] .btn.subtle:not(.danger){color:#b9decf}
html[data-color-mode=dark] :focus-visible{outline-color:#b9decf}
html[data-color-mode=dark] .btn:focus-visible{outline-color:#b9decf}
@media print{html[data-color-mode=dark]{color-scheme:light;--ink:#1c3031;--muted:#627472;--line:#e5ebea;--bg:white;--paper:white;--green:#237465}}
