:root[data-theme=light]{color-scheme:light}
:root[data-theme=dark]{color-scheme:dark;--muted:#a5b2bc;--border:#35434c;--accent:#b8d7c9;--soft:#222c33;--surface:#1b242b;--surface-raised:#26323b;--text:#e7edf1;color:var(--text);background:#151c22}
[data-theme=dark] :is(.shell,.topbar){background:#151c22}
[data-theme=dark] .sidebar{background:#1b242b;border-color:var(--border)}
[data-theme=dark] :is(button,input,select,textarea,.card,.panel,.summary-card,.page-banner,.customer-tile,dialog,.dashboard-point,.schedule-card table th,.schedule-card table td){background:var(--surface);color:var(--text);border-color:var(--border)}
[data-theme=dark] :is(button:hover,.tree-row:hover,.account-button:hover,.tabs button:hover,.equipment-dashboard .dashboard-point summary:hover,tbody tr:hover){background:var(--surface-raised)}
[data-theme=dark] :is(.primary,button.active){background:#b8d7c9;color:#15261e;border-color:#b8d7c9}
[data-theme=dark] .primary:hover{background:#cae6d9}
[data-theme=dark] :is(.brand,.brand:hover,.tree-row .tree-label,.tree-row .tree-expander,.side-alarm,.account-button,.sidebar-toggle,.favorite-toggle,.inline-link){background:transparent}
[data-theme=dark] :is(.brand>span,.tree-row .tree-label,.tree-row .tree-expander,.tree-row .icon-svg,.summary-line b,.summary-line button,.equipment-link,.favorite-toggle,.crumbs b){color:var(--text)}
[data-theme=dark] .brand img{filter:brightness(0) invert(1)}
[data-theme=dark] .favorite-toggle.is-favorite svg{fill:var(--text)}
[data-theme=dark] :is(.topbar .tabs,.avatar,.account-button .avatar,.reading,.step,.day,code,.activity .symbol){background:#222e36;color:#c8d6df}
[data-theme=dark] .topbar .tabs button{background:transparent;color:#c8d6df}
[data-theme=dark] :is(.topbar .tabs button.active,.tree-row.active){background:#34434d;color:#f1f5f7;border-color:#43545e}
[data-theme=dark] :is(.tabs button.active:hover,.tree-row.active:hover){background:#3c4d57}
[data-theme=dark] :is(.brand small,.account-button small,.page-banner p,.summary-line>span,.summary-line .icon-svg,.summary-footnote,.customer-tile p,.empty-favorites p,.tree-row .tree-label small,.side-alarm span,.metric-label,.metric-note,.footer-note,.legend,.legend-box,.dashboard-point-label){color:var(--muted)}
[data-theme=dark] :is(.dashboard-point strong,.dashboard-group>h2,.name-cell){color:#d5e5ed}
[data-theme=dark] :is(a,.inline-link,.connection){color:#b8d7c9}
[data-theme=dark] :is(.panel-head,.summary-line,.section-title,.empty-favorites,.sidebar-bottom,.info-row,.equipment-bottom,td,.activity,.dashboard-group>h2,.dashboard-point-detail){border-color:var(--border)}
[data-theme=dark] .tree-row.level-4:before{background:var(--border)}
[data-theme=dark] th{background:#222e36;color:#b8c6cf;border-color:var(--border)}
[data-theme=dark] .dashboard-point.writable{border-color:#6c9a87;box-shadow:inset -2px 0 #6c9a87}
[data-theme=dark] :is(.badge,.notice){background:#22392e;color:#c3dfcb;border-color:#3d5a49}
[data-theme=dark] :is(.badge.gray,.demo-pill){background:#2a343c;color:#b7c3cc;border-color:#3b4851}
[data-theme=dark] :is(.badge.warning,.notice.amber){background:#3e3222;color:#f1cd91;border-color:#6a5331}
[data-theme=dark] .badge.danger{background:#472a2a;color:#ffc1ba}
[data-theme=dark] :is(.schedule-editor #schedule-error,.dashboard-point strong small){color:#ffbe9d}
[data-theme=dark] .schedule-column{background:repeating-linear-gradient(to bottom,#1b242b 0,#1b242b 49px,#39454e 50px);border-color:#45515b}
[data-theme=dark] :is(.schedule-block,.occupied){background:#294535;color:#d4efdc;border-color:#628e74}
[data-theme=dark] .day.off .occupied{background:#27333b;color:#b7c4cc}
[data-theme=dark] dialog::backdrop{background:#070c11bb}
[data-theme=dark] .statiq-map{background:#1b242b;border-color:var(--border)}
[data-theme=dark] .statiq-map-tiles{filter:invert(.9) hue-rotate(180deg) saturate(.35) brightness(.85)}
[data-theme=dark] :is(.statiq-map-controls,.statiq-map-controls button,.statiq-map-label,.statiq-map-attribution,.statiq-map-status){background:#222e36;color:#cbd7df;border-color:#45515b}
.appearance-control{display:flex;align-items:center;justify-content:space-between;padding:7px 10px;gap:12px;font-size:12px;color:var(--muted)}.appearance-control select{padding:5px 30px 5px 10px;font-size:12px;width:105px}
@media print{html[data-theme]{color-scheme:light}html[data-theme=dark] .shell{background:white;color:black}}
