.theme-selector{display:inline-flex;align-items:center;padding:3px;border:1px solid rgba(255,255,255,.28);border-radius:9px;background:rgba(0,0,0,.16)}.theme-option{height:30px;padding:0 10px;border:0;border-radius:6px;background:transparent;color:#dbe7f3;font-size:11px;font-weight:800;cursor:pointer}.theme-option[aria-pressed="true"]{background:#fff;color:#10243a;box-shadow:0 1px 4px rgba(0,0,0,.22)}
html[data-theme="dark"]{color-scheme:dark;--text:#e6edf5;--muted:#9dacbd;--line:#314153;--panel:#172330;--bg:#0d1620;--blue-soft:#172f4b;--shadow:0 8px 24px rgba(0,0,0,.28)}html[data-theme="dark"] :is(.tabs,.panel,.login-card){background:#172330;color:var(--text)}html[data-theme="dark"] .tab-button{color:#aab8c8}html[data-theme="dark"] .tab-button.active{color:#62a6ff}html[data-theme="dark"] :is(.metric-card,.metric-card.green,.metric-card.red){background:linear-gradient(145deg,#1b2a39,#14202c);border-color:#35495e}
html[data-theme="dark"] :is(input,select,.secondary-button,.rate-save-button,.range-buttons button,.period-toggle,.period-toggle button,.report-mode-tabs button){background:#111c27;color:#dce7f2;border-color:#3b4d60}html[data-theme="dark"] :is(.tenant-table th,.meter-group-row td){background:#1d2b39;color:#becbd8}html[data-theme="dark"] :is(.report-table thead th,.meter-subtotal td,.meter-subtotal th){background:#1b3046;color:#dce7f2}html[data-theme="dark"] .report-table tfoot th{background:#403a20;color:#fff0aa}html[data-theme="dark"] :is(.tenant-table th,.tenant-table td,.report-table th,.report-table td){border-bottom-color:#2b3a49}
html[data-theme="dark"] :is(.login-card input,.login-card input#loginUsername){background:#111c27;color:#e6edf5;border-color:#3b4d60}html[data-theme="dark"] .login-footer{background:#111c27;color:#c5d1dc;border-color:#314153}html[data-theme="dark"] .global-message{background:#3b2024;color:#ffb4b9;border-color:#714047}html[data-theme="dark"] .trend-period-control select{background:#111c27!important;color:#dce7f2!important;border-color:#3b4d60!important}
@media(max-width:760px){.top-actions{flex-wrap:wrap;justify-content:flex-end}.theme-selector{order:2}.theme-option{padding:0 8px}}@media print{.theme-selector{display:none!important}html[data-theme]{color-scheme:light;--text:#142033;--muted:#667085;--line:#dfe5ec;--panel:#fff;--bg:#fff}html[data-theme] body,html[data-theme] .panel{background:#fff;color:#142033}}

/* v1.1.1 Silver component contrast */
html[data-theme="dark"] :is(.live-metrics>div,.power-live-metrics>div,.quality-stat,.phase-readings,.phase-group,.snapshot-chart-block,.pf-gauge-block,.pf-trend-block,.power-snapshot-stats>div,.snapshot-subchart,.power-demand-gauge,.power-demand-mini,.weather-stats>div,.ai-summary){background:#172330;color:#e6edf5}
html[data-theme="dark"] :is(.live-metrics strong,.phase-values strong,.quality-stat strong,.pf-gauge-value,.power-live-metrics strong,.power-snapshot-stats strong,.weather-stats strong,.power-gauge-value){color:#f2f7fc}
html[data-theme="dark"] :is(.live-metrics span,.phase-values span,.quality-stat span,.snapshot-eyebrow,.phase-group-title,.snapshot-chart-block h3,.pf-direction,.power-live-metrics span,.power-snapshot-stats span,.weather-stats span,.weather-toggle,.ai-summary){color:#a9b8c7}
html[data-theme="dark"] :is(.power-selects select,.icon-button,.power-metric-toggle button){background:#111c27;color:#dce7f2;border-color:#3b4d60}
html[data-theme="dark"] :is(.power-metric-toggle button.active,.report-mode-tabs button.active){background:#2f80ed;color:#fff;border-color:#62a6ff;box-shadow:0 0 0 2px rgba(98,166,255,.2)}
html[data-theme="dark"] .weather-status{background:#172d46;color:#9dc8ff;border-color:#315a86}html[data-theme="dark"] .weather-status.ok{background:#173528;color:#7ce0aa;border-color:#2c6b4a}html[data-theme="dark"] .weather-status.error{background:#3b2024;color:#ffb4b9;border-color:#714047}
html[data-theme="dark"] :is(.period-toggle button.active,.range-buttons button.active){background:#2f80ed;color:#fff;border-color:#62a6ff;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16)}
