/* The existing dark palette remains the default. */
.theme-toggle{position:fixed;left:18px;bottom:18px;z-index:90;display:inline-flex;align-items:center;justify-content:center;min-width:116px;min-height:38px;padding:8px 12px;border:1px solid #ad60ed;border-radius:8px;background:#171021;color:#fff;font:700 12px/1 Inter,Segoe UI,Arial,sans-serif;box-shadow:0 6px 20px #0007;cursor:pointer}
.theme-toggle:hover{border-color:#c99afd;background:#311044}
.theme-toggle:focus-visible{outline:3px solid #24cbe1;outline-offset:3px}
.dashboard-theme-toggle{position:relative;left:auto;bottom:auto;z-index:3;flex:0 0 auto;margin-left:auto;white-space:nowrap}
.presentation-controls .theme-toggle{position:absolute;left:22px;top:50%;bottom:auto;transform:translateY(-50%);width:auto;min-width:116px;height:36px;font-size:12px}
.presentation-presenting .dashboard-theme-toggle{display:none}

html[data-theme="light"]{color-scheme:light;--bg:#ecf2f7;--card:#fff;--panel:#f6f9fc;--text:#1a2938;--muted:#536579;--cyan:#087f9d}
html[data-theme="light"] body{background:#ecf2f7;color:#1a2938}
html[data-theme="light"] .card{background:#fff!important;border-color:#cbd7e2!important;box-shadow:0 4px 18px #1c395014!important;color:#1a2938}
html[data-theme="light"] .card small,html[data-theme="light"] .muted,html[data-theme="light"] .label{color:#536579}
html[data-theme="light"] .dashboard>.report-title{background:linear-gradient(110deg,#fff,#e8f5fa)!important;border-color:#bddce8!important}
html[data-theme="light"] .report-title p{color:#536579}
html[data-theme="light"] .report-title p b{color:#842ed1}
html[data-theme="light"] .report-kicker{color:#007e9c}
html[data-theme="light"] .ageing-head h2 span,html[data-theme="light"] .customer-pie-head h2 span,html[data-theme="light"] .action-plan-head h2 span,html[data-theme="light"] .action-chart-title b span{color:#087f9d}
html[data-theme="light"] .dashboard>.ageing .ageing-key,html[data-theme="light"] .presentation-slide[data-layout="ageing-only"] .ageing-key{color:#273b50}
html[data-theme="light"] .presentation-slide[data-layout="team-analysis"] .heatmap-legend{color:#273b50}
html[data-theme="light"] .heatmap-filter-caption{color:#52677a}
html[data-theme="light"] .heatmap-status-filter label{background:#f3f7fa;border-color:#b9cad8;color:#26394a}
html[data-theme="light"] .heatmap-status-filter label:has(input:checked){background:#eee1fa;border-color:#a955ef;color:#4e1d73}
html[data-theme="light"] .heatmap-status-filter label:has(input[value="open"]:checked){background:#d8f6f2;border-color:#20a9a2;color:#115b61}
html[data-theme="light"] .earnings hr,html[data-theme="light"] .paid hr{border-top-color:#c9d6e1}
html[data-theme="light"] .plant-checklist{background:#f5f8fc;border-color:#c8d4df}
html[data-theme="light"] .plant-checklist legend,html[data-theme="light"] .plant-checklist b{color:#536579}
html[data-theme="light"] .ring{background:radial-gradient(circle,#fff 59%,transparent 61%),conic-gradient(var(--ring-color) calc(var(--p)*1%),#d8e1e8 0)}
html[data-theme="light"] .location-donut{background:radial-gradient(circle,#fff 0 56%,transparent 57%)}
html[data-theme="light"] .location-donut small,html[data-theme="light"] .location-donut span,html[data-theme="light"] .location-row>em{color:#536579}
html[data-theme="light"] .location-row>u,html[data-theme="light"] .risk-track{background:#dfe7ed}

/* Keep the delivery slicer vivid, while making its controls clear in either theme. */
html[data-theme="light"] .dashboard>.slicer,html[data-theme="light"] .presentation-grid>.slicer{background:linear-gradient(145deg,#8e2bd1,#7233bd)!important;color:#fff;border-color:#7730bc!important}
html[data-theme="light"] .slicer small,html[data-theme="light"] .slicer-year-label,html[data-theme="light"] .slicer-hint{color:#f5eaff!important}
html[data-theme="light"] .slicer #deliveryYear{background:#fff;color:#48266e;border-color:#ead7fb}
html[data-theme="light"] .slicer #deliveryYear option{background:#fff;color:#48266e}
html[data-theme="light"] .slicer .months button{color:#fff}
html[data-theme="light"] .slicer .months button:hover,html[data-theme="light"] .slicer .months button.active{background:#fff;color:#6631a8}
html[data-theme="light"] .slicer .months button:disabled{color:#f7eaff}

html[data-theme="light"] .ageing-table-wrap,html[data-theme="light"] .heatmap-wrap{background:#fff;border-color:#cad7e2}
html[data-theme="light"] .ageing-table th,html[data-theme="light"] .heatmap-table thead th{background:#eaf1f7;color:#385066}
html[data-theme="light"] .ageing-table td,html[data-theme="light"] .ageing-table th,html[data-theme="light"] .heatmap-table td,html[data-theme="light"] .heatmap-table th{border-color:#d4dee8}
html[data-theme="light"] .ageing-table tbody td,html[data-theme="light"] .heatmap-table tbody th{background:#fff;color:#182a3a}
html[data-theme="light"] .ageing-table td.zero,html[data-theme="light"] .heat-zero{color:#8293a2}
html[data-theme="light"] .ageing-table td.band-fresh{background:linear-gradient(90deg,#c8f4ef,#a9ece5)}
html[data-theme="light"] .ageing-table td.band-watch{background:linear-gradient(90deg,#fff4d7,#ffe7ac)}
html[data-theme="light"] .ageing-table td.band-alert{background:linear-gradient(90deg,#ffe2c9,#ffc893);color:#81421d}
html[data-theme="light"] .ageing-table td.band-risk{background:linear-gradient(90deg,#ffd4dc,#ffb2c1);color:#8a203d}
html[data-theme="light"] .ageing-table tfoot td,html[data-theme="light"] .heatmap-table tfoot th,html[data-theme="light"] .heatmap-table tfoot td,html[data-theme="light"] .heat-total{background:#dce8f1;color:#1c3143}
html[data-theme="light"] .heatmap-table tfoot th{color:#087f9d}
html[data-theme="light"] .customer-ageing-card .heatmap-table tfoot th{color:#a52f52}
html[data-theme="light"] .heatmap-table .heat-cell{background:var(--heat);color:var(--heat-ink,#173047);text-shadow:none}
html[data-theme="light"] .heatmap-table tfoot .heat-cell{background:var(--heat);color:var(--heat-ink,#173047)}

html[data-theme="light"] .customer-stock-pie{background:#fff!important;border-color:#cbd7e2!important}
html[data-theme="light"] .customer-pie-head,html[data-theme="light"] .customer-pie-legend-row{border-color:#d5e0e8}
html[data-theme="light"] .customer-pie-total small,html[data-theme="light"] .customer-pie-total span,html[data-theme="light"] .customer-pie-empty{color:#536579}
html[data-theme="light"] .customer-pie-visual svg{filter:drop-shadow(0 5px 7px #31556b36)}

html[data-theme="light"] .action-plan{background:linear-gradient(145deg,#fff,#f4f9fd)!important;border-color:#c6d7e2!important}
html[data-theme="light"] .action-plan-head small,html[data-theme="light"] .action-chart-title>span{color:#536579}
html[data-theme="light"] .action-plan-head h2{text-shadow:none}
html[data-theme="light"] .action-status-filter{border-color:#bdcbd7;color:#1a2938}
html[data-theme="light"] .action-kpi{background:#f7f9fc!important;box-shadow:none}
html[data-theme="light"] .action-kpi.urgent{background:#fff1f3!important}
html[data-theme="light"] .action-kpi.year-2026{background:#f5efff!important}
html[data-theme="light"] .action-kpi.year-2027{background:#eaf9fb!important}
html[data-theme="light"] .action-kpi b{color:#1a2938}
html[data-theme="light"] .action-kpi em{color:#536579}
html[data-theme="light"] .action-main-chart,html[data-theme="light"] .action-side-year{background:#fff;border-color:#cad7e2;box-shadow:none}
html[data-theme="light"] .month-bars,html[data-theme="light"] .side-year-bars{background:repeating-linear-gradient(to bottom,#d7e2eb 0 1px,transparent 1px 16.666%);border-bottom-color:#9bafbf}
html[data-theme="light"] .axis-labels,html[data-theme="light"] .month-bar>small{color:#43586c}
html[data-theme="light"] .month-bar>b{color:#1b2d3d;text-shadow:0 1px 0 #fff}
html[data-theme="light"] .side-year-bars .month-bar>b{color:#087e96}
html[data-theme="light"] .presentation-slide[data-layout="action-only"] .month-bar.tone-upcoming>b{color:#9a5900}
html[data-theme="light"] .presentation-slide[data-layout="action-only"] .month-bar.tone-side>b{color:#087e96}
html[data-theme="light"] .action-side-year>strong{background:#edf8fa;border-color:#b8dce3;color:#087e96}
html[data-theme="light"] .action-alert{background:#fff3f5;border-color:#e85a70;color:#633044}
html[data-theme="light"] .action-alert>span{color:#633044;border-left-color:#dfadb8}
html[data-theme="light"] .action-alert>b{color:#9a2542}

html[data-theme="light"] .presentation{background:#e9f0f5;color:#1a2938}
html[data-theme="light"] .presentation-controls{background:#f5f8fb;border-top-color:#cad7e2}
html[data-theme="light"] .presentation-controls button:not(.theme-toggle){background:#fff;border-color:#b8c9d6;color:#1a2938}
html[data-theme="light"] .presentation-controls span{color:#43586c}
html[data-theme="light"] .theme-toggle{background:#fff;color:#513378;border-color:#b887df;box-shadow:0 4px 14px #1c395021}
html[data-theme="light"] .theme-toggle:hover{background:#f6edff}
@media(max-width:600px){.theme-toggle{min-width:96px;padding:7px 9px}.dashboard>.report-title{flex-wrap:wrap}.dashboard-theme-toggle{width:100%;margin-left:0}.presentation-controls .theme-toggle{left:8px;min-width:90px;font-size:10px}}
