/* The saved theme is applied in the head, before the interface is painted. */
:root{color-scheme:light}
.theme-settings{padding-bottom:22px;margin-bottom:22px;border-bottom:1px solid var(--line)}
.theme-options{display:flex;gap:8px;flex-wrap:wrap}.theme-options button{min-width:110px}.theme-options button[aria-pressed=true]{background:var(--blue);border-color:var(--blue);color:#fff}
.sidebar-theme-toggle{display:flex;align-items:center;gap:12px;width:100%;min-height:38px;padding:5px 10px;margin:0 0 5px;background:transparent;border-color:transparent;color:#263858;font-size:12px;text-align:left}
.sidebar-theme-toggle:hover{background:#e6eeff}.theme-toggle-icon{display:grid;place-items:center;width:36px;flex:0 0 36px;font-size:23px;line-height:1}
.sidebar-collapsed .sidebar-theme-toggle{justify-content:center;padding:5px 0}
:root[data-theme=dark]{--bg:#101722;--panel:#192332;--text:#e7edf7;--muted:#a7b6cb;--line:#344255;--nav:#151f30;--blue:#78a5ff;--red:#ff8d91;--amber:#f0c272;--green:#79d5a0;--shadow:0 2px 12px #0003;color-scheme:dark}
:root[data-theme=dark] a{color:#9cbdff}
:root[data-theme=dark] :is(button,input,select,textarea,.field){background-color:#202c3e;color:var(--text);border-color:var(--line)}
:root[data-theme=dark] :is(button.primary,.signin-action){background:#356fe8;color:#fff;border-color:#356fe8}
:root[data-theme=dark] button.work-danger{background:#ce302a;color:#fff;border-color:#e55047}
:root[data-theme=dark] button.work-danger:hover{background:#af2923}
:root[data-theme=dark] :is(.vehiclebutton,.work-edit-button,.inline-add,.picker-option,.sidebar-toggle,.sidebar-theme-toggle){background-color:transparent}
:root[data-theme=dark] :is(.modal,.work-delete-confirm,.registry-picker,.guide-image-dialog,.board,.car,.eff-table,.eff-metrics article,.guide-index,.guide-chapter,.guide-empty,.guide-shortcuts a,.feed-issue){background:#192332;color:var(--text);border-color:var(--line)}
:root[data-theme=dark] :is(.modalback,.picker-backdrop){background:#050a14b8}
:root[data-theme=dark] :is(.worktable th,.worktable th:first-child,.queue-table th,.import-table th,.eff-table th,.board-floating-header,.board-floating-header th:first-child){background:#243145;color:#d7e3f4;border-color:var(--line)}
:root[data-theme=dark] :is(.worktable td:first-child,.worktable .add-car-row td,.worktable .add-car-row td:first-child){background:#192332;border-color:var(--line)}
:root[data-theme=dark] :is(.worktable tbody tr:hover td,.queue-table tbody tr:hover,.picker-option:not(:disabled):hover,.metrics .metric:hover){background:#202e42}
:root[data-theme=dark] .worktable tbody tr:hover td:first-child{background:#243550}
:root[data-theme=dark] :is(.worktable td.vehicle-cell.has-active-work,.worktable tbody tr:hover td.vehicle-cell.has-active-work){background:#203752}
:root[data-theme=dark] :is(.worktable td.vehicle-cell.has-not-running,.worktable tbody tr:hover td.vehicle-cell.has-not-running){background:#47242e}
:root[data-theme=dark] :is(.workcell,.queue-location-button,.queue-cell-expanded,.queue-full-preview,.integration-box,.queue-state,.feed-form,.queue-note,.stage,.feed-issue-fields>div,.import-summary,.max-settings-hint,.work-schedule-note){background:#202c3e;color:var(--text);border-color:var(--line)}
:root[data-theme=dark] .workcell.is-empty{background:transparent;border-color:#43516a;color:#a7b6cb}
:root[data-theme=dark] .workcell[data-status=doing]{background:#203954;border-color:#42628f}
:root[data-theme=dark] .workcell[data-status=waiting]{background:#3a3021;border-color:#75613a}
:root[data-theme=dark] .workcell[data-status=done]{background:#1e392d;border-color:#3b6950}
:root[data-theme=dark] .workcell[data-status=ordered]{background:#183849;border-color:#39657c}
:root[data-theme=dark] .workcell[data-status=pickup]{background:#332747;border-color:#6d518f}
:root[data-theme=dark] .workcell[data-status=stock]{background:#1b3938;border-color:#396c66}
:root[data-theme=dark] .workcell[data-status=not_running]{background:#47242e;border-color:#dd586c}
:root[data-theme=dark] :is(.workbadge,.tag,.count){background:#354156;color:#d2dced}
:root[data-theme=dark] :is(.workbadge.doing,.specialization-badge,.vehicle-durations span,.vin-copy,.picker-manual,.file-choice,.guide-number){background:#244675;color:#b7d2ff;border-color:#42618e}
:root[data-theme=dark] :is(.workbadge.waiting,.tag.amber,.queue-photo-status.no,.queue-logistics-badge){background:#624a21;color:#ffe0a1}
:root[data-theme=dark] :is(.workbadge.done,.tag.green,.queue-photo-status.yes){background:#24583d;color:#a6edbf}
:root[data-theme=dark] .workbadge.ordered{background:#21516d;color:#b2e1ff}
:root[data-theme=dark] .workbadge.pickup{background:#573d79;color:#e1c5ff}
:root[data-theme=dark] .workbadge.stock{background:#23584e;color:#b0ebda}
:root[data-theme=dark] :is(.workbadge.late,.tag.red){background:#652d36;color:#ffc1c3}
:root[data-theme=dark] .workbadge.not_running{background:#c51936;color:#fff}
:root[data-theme=dark] .vehicle-durations span+span{background:#303b4c;color:#bdcadd}
:root[data-theme=dark] :is(.work-meta-line,.workmeta,.person,.vehicle-stage,.work-start-summary){color:#aebdd2}
:root[data-theme=dark] :is(.notice,.work-notification-state.ready){background:#1c392c;color:#b0e4c4;border-color:#38674d}
:root[data-theme=dark] :is(.work-save-result,.work-notification-state,.integration-box.warning,.guide-note){background:#3a3021;color:#f0d7a3;border-color:#73613b}
:root[data-theme=dark] :is(.work-form-error,.integration-box.error,.queue-state.is-error,.feed-issue-fields .missing){background:#47272f;color:#ffbec2;border-color:#8e4951}
:root[data-theme=dark] .feed-issue-fields .unrecognized{background:#3a2c52}
:root[data-theme=dark] :is(.feed-issue-fields .missing b,.feed-issue-fields .unrecognized b){color:inherit}
:root[data-theme=dark] :is(.column-filter-menu,.filter-menu,.queue-dealer-popup,.import-footer){background:#192332;color:var(--text);border-color:var(--line)}
:root[data-theme=dark] .queue-dealer-filter summary{background:#202c3e;border-color:var(--line)}
:root[data-theme=dark] :is(.status-legend .all-statuses,.status-legend .all-statuses[aria-pressed=true]){background:#243b5a;color:#c4d9ff;border-color:#567cba}
:root[data-theme=dark] :is(.guide-hero,.guide-note){background:linear-gradient(115deg,#203451,#192332);border-color:#3a5479;color:#c3d2e9}
:root[data-theme=dark] :is(.guide-chapter details p,.guide-eyebrow,.guide-back,.eff-table summary){color:#afcaff}
:root[data-theme=dark] :is(.guide-index a:hover,.guide-index a[aria-current]){background:#283f60;color:#c2d8ff}
:root[data-theme=dark] .sidebar{background:linear-gradient(145deg,#1d293d,#151f30 70%,#1a263b);border-color:#34435c;box-shadow:0 12px 40px #0003;color:#dce7ff}
:root[data-theme=dark] .sidebar-brand-title{color:#ecf2ff}
:root[data-theme=dark] .sidebar-brand-symbol{background:linear-gradient(145deg,#273854,#202e46);border-color:#3e5174;box-shadow:0 7px 20px #0003}
:root[data-theme=dark] .sidebar-brand-symbol svg{fill:#8eafff}
:root[data-theme=dark] .sidebar .navitem{background:transparent;color:#d1def3;border-color:transparent}
:root[data-theme=dark] .sidebar .navitem:hover{background:#293c5b;color:#fff}
:root[data-theme=dark] .sidebar .navitem.active{background:linear-gradient(165deg,#2457e9,#1238a7);border-color:#729bff;color:#fff}
:root[data-theme=dark] .sidebar-system{background:#202e4480;border-color:#34435c}
:root[data-theme=dark] :is(.sidebar-footer .sidebar-toggle,.sidebar-theme-toggle){color:#cfddf3}
:root[data-theme=dark] :is(.sidebar-footer .sidebar-toggle:hover,.sidebar-theme-toggle:hover){background:#293c5b}
:root[data-theme=dark] .sidebar-toggle svg{background:#23334e;border-color:#455a7f}
:root[data-theme=dark] .theme-options button[aria-pressed=true]{background:#356fe8;color:#fff;border-color:#78a5ff}
:root[data-theme=dark] :is(.filter-menu-actions,.dictation-note,.dictation-note>button,.dictation-activity){background:#202e43;color:#b9d2ff;border-color:#425c80}
:root[data-theme=dark] :is(.filter-sort button[aria-pressed=true],.filter-summary .filter-chip){background:#29466c;color:#c9deff;border-color:#4f77aa}
:root[data-theme=dark] .dictation-field>.dictation-button{background:transparent;color:#b3c7e3}
:root[data-theme=dark] .dictation-field.is-listening>.dictation-button{background:#672e3b;color:#ffbecb}
:root[data-theme=dark] .vehicle-active-works .vehicle-work-sticker:not(.late){background:#244675;color:#c2d9ff;border-color:#4c6da0}

:root[data-theme=dark] :is(.sidebar-footer .sidebar-toggle,.sidebar-theme-toggle){border-color:transparent}

@media(max-height:700px){.sidebar-heading{min-height:60px;margin-bottom:10px}.sidebar-navigation{gap:2px}.sidebar .navitem{min-height:40px;padding-top:7px;padding-bottom:7px}.sidebar-system{gap:2px}}

:root[data-theme=dark] body{background:var(--bg);color:var(--text)}
:root[data-theme=dark] body.embedded{background:transparent}
:root[data-theme=dark] :is(.card,.dealer-dropdown){background:#192332;color:var(--text);border-color:var(--line)}
:root[data-theme=dark] :is(.dealer-dropdown>summary,.muted,small,th,.badge){color:var(--muted)}
:root[data-theme=dark] :is(td,th,fieldset,.dealer-dropdown-list){border-color:var(--line)}
:root[data-theme=dark] #message{color:var(--red)}
:root[data-theme=dark] #success{color:var(--green)}
:root[data-theme=dark] :is(#loginForm button,#setupForm button,#addForm>button){background:#356fe8;color:#fff}

:root[data-theme=dark] .vehicle-active-works .vehicle-work-sticker.late{background:#652d36;color:#ffc1c3;border-color:#d76a76}
