:root[data-theme="dark"]{
  --bg:#0f1720;--card:#17212b;--ink:#eef4f7;--muted:#9babb8;--line:#2b3945;--shadow:0 10px 28px rgba(0,0,0,.18);--shadow2:0 18px 50px rgba(0,0,0,.28)
}
:root[data-theme="dark"] body,:root[data-theme="dark"] .main{background:var(--bg);color:var(--ink)}
:root[data-theme="dark"] .content,:root[data-theme="dark"] .headline,:root[data-theme="dark"] .settings-pane{color:var(--ink)}
:root[data-theme="dark"] .panel,:root[data-theme="dark"] .card,:root[data-theme="dark"] .kpi,:root[data-theme="dark"] .track-detail,:root[data-theme="dark"] .settings-section,:root[data-theme="dark"] .pref-card{background:var(--card)!important;border-color:var(--line)!important;color:var(--ink)!important}
:root[data-theme="dark"] .panel-head,:root[data-theme="dark"] .activity-row,:root[data-theme="dark"] .driver-row,:root[data-theme="dark"] .history-item,:root[data-theme="dark"] .detail-head,:root[data-theme="dark"] .detail-section,:root[data-theme="dark"] .detail-tabs,:root[data-theme="dark"] .track-list,:root[data-theme="dark"] .table td,:root[data-theme="dark"] .table th{border-color:var(--line)!important}
:root[data-theme="dark"] .table,:root[data-theme="dark"] table{color:var(--ink)}
:root[data-theme="dark"] .table tbody tr:hover,:root[data-theme="dark"] .driver-row:hover,:root[data-theme="dark"] .search-result:hover{background:#1d2a35!important}
:root[data-theme="dark"] .driver-group-title,:root[data-theme="dark"] .settings-nav,:root[data-theme="dark"] .notice,:root[data-theme="dark"] .empty{background:#121c25!important;color:var(--muted)!important;border-color:var(--line)!important}
:root[data-theme="dark"] .search-results,:root[data-theme="dark"] .modal-card,:root[data-theme="dark"] .map-layers,:root[data-theme="dark"] .map-status{background:#17212b!important;color:var(--ink)!important;border-color:var(--line)!important}
:root[data-theme="dark"] .field input,:root[data-theme="dark"] .field select,:root[data-theme="dark"] .field textarea,:root[data-theme="dark"] .track-search input,:root[data-theme="dark"] .threshold input{background:#101922!important;color:var(--ink)!important;border-color:#334553!important}
:root[data-theme="dark"] .field input::placeholder,:root[data-theme="dark"] input::placeholder{color:#708392}
:root[data-theme="dark"] .btn{background:#1d2a35;border-color:#364754;color:#eef4f7}
:root[data-theme="dark"] .btn.dark{background:#050a0f;border-color:#050a0f}
:root[data-theme="dark"] .btn.danger{background:#341820;color:#ff9ba6;border-color:#62303a}
:root[data-theme="dark"] .badge{background:#243340;color:#cbd6dd}
:root[data-theme="dark"] .badge.green{background:#153926;color:#84e9aa}
:root[data-theme="dark"] .badge.red{background:#441b24;color:#ff9eaa}
:root[data-theme="dark"] .badge.orange{background:#402d16;color:#ffc879}
:root[data-theme="dark"] .kpi-icon{filter:saturate(.9) brightness(.9)}
:root[data-theme="dark"] .search-result{border-color:var(--line)}
:root[data-theme="dark"] .auth-card{background:#17212b;color:var(--ink)}
:root[data-theme="dark"] body[data-page="dashboard"] .dash-insight-strip>div,:root[data-theme="dark"] body[data-page="dashboard"] .dash-safety>div,:root[data-theme="dark"] body[data-page="dashboard"] .dash-assignment>div{background:var(--card)!important;border-color:var(--line)!important;color:var(--ink)!important}
:root[data-theme="dark"] body[data-page="dashboard"] .dash-insight-strip strong,:root[data-theme="dark"] body[data-page="dashboard"] .dash-metric-grid strong,:root[data-theme="dark"] body[data-page="dashboard"] .dash-group-row strong,:root[data-theme="dark"] body[data-page="dashboard"] .dash-safety strong,:root[data-theme="dark"] body[data-page="dashboard"] .dash-assignment strong{color:var(--ink)!important}
:root[data-theme="dark"] body[data-page="dashboard"] .dash-metric-grid>div,:root[data-theme="dark"] body[data-page="dashboard"] .dash-group-row,:root[data-theme="dark"] body[data-page="dashboard"] .dash-attention-row,:root[data-theme="dark"] body[data-page="dashboard"] .dash-inspection-row{border-color:var(--line)!important}
:root[data-theme="dark"] body[data-page="dashboard"] .dash-safety,:root[data-theme="dark"] body[data-page="dashboard"] .dash-assignment{background:var(--line)!important}

.fleet-head-tools{display:flex;align-items:center;gap:7px;margin-left:2px}.head-tool{height:34px;min-width:34px;border:1px solid #30414e;border-radius:9px;background:#14222e;color:#e7eef3;cursor:pointer;font-weight:850;position:relative}.head-tool:hover{background:#1c2d3a}.head-tool.bell span{position:absolute;right:-5px;top:-6px;min-width:17px;height:17px;padding:0 4px;border-radius:9px;background:#ed1b2f;color:#fff;font-size:9px;display:grid;place-items:center;border:2px solid #101c28}.account-wrap{border-radius:10px;padding:5px 7px}.account-wrap:hover{background:#172631}

.preferences-grid{display:grid;grid-template-columns:minmax(0,1.25fr) minmax(300px,.75fr);gap:12px}.pref-card{background:#fff;border:1px solid var(--line);border-radius:13px;box-shadow:var(--shadow);padding:16px}.pref-card.span2{grid-column:1/-1}.pref-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:13px}.pref-head h3{margin:0;font-size:16px}.pref-head p{margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.45}.toggle-list{display:grid;gap:0;border-top:1px solid var(--line)}.toggle-list>label{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:13px 2px;border-bottom:1px solid var(--line);cursor:pointer}.toggle-list>label span{display:block}.toggle-list>label b{display:block;font-size:12px}.toggle-list>label small{display:block;color:var(--muted);margin-top:3px;line-height:1.35}.toggle-list input[type="checkbox"],.checkline input[type="checkbox"]{width:18px;height:18px;accent-color:#ed1b2f}.threshold{display:grid;grid-template-columns:1fr 84px 50px;align-items:center;gap:8px;padding:10px 2px 12px;border-bottom:1px solid var(--line);color:var(--muted);font-size:11px}.threshold input{height:36px;border:1px solid #ced8e0;border-radius:8px;background:#fbfcfd;color:#111820;padding:0 9px}.threshold b{color:var(--muted)}.theme-choice{display:grid;grid-template-columns:1fr 1fr;gap:9px}.theme-choice button{min-height:64px;border:1px solid var(--line);border-radius:11px;background:var(--card);color:var(--ink);font-weight:800;cursor:pointer}.theme-choice button.active{border-color:#ed1b2f;box-shadow:inset 0 0 0 1px #ed1b2f;background:rgba(237,27,47,.06)}.notification-row{display:grid;grid-template-columns:10px minmax(0,1fr) auto;gap:10px;align-items:flex-start;padding:11px 0;border-bottom:1px solid var(--line)}.notification-row:last-child{border-bottom:0}.notification-dot{width:8px;height:8px;border-radius:50%;background:#ff8a00;margin-top:4px}.notification-row.critical .notification-dot{background:#ed1b2f}.notification-row b{display:block;font-size:12px}.notification-row small{display:block;color:var(--muted);margin-top:3px;line-height:1.4}.notification-row>span{font-size:9px;color:var(--muted);white-space:nowrap}.optional{font-weight:500!important;text-transform:none!important;letter-spacing:0!important;color:var(--muted)}.temporary-password{font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:24px;font-weight:850;letter-spacing:.04em;padding:18px;background:#101820;color:#fff;border-radius:10px;text-align:center;margin:15px 0}.account-notice{margin-bottom:12px}.notice.warning{border-color:#f5c46e!important;background:#fff7e8!important;color:#6f4a07!important}.checkline{display:flex!important;align-items:center;gap:9px!important;text-transform:none!important;letter-spacing:0!important;font-size:12px!important;color:var(--ink)!important}.row-actions{display:flex;gap:8px;flex-wrap:wrap}

@media(max-width:1050px){.preferences-grid{grid-template-columns:1fr}.pref-card.span2{grid-column:auto}.fleet-head-tools{display:none}}
