.theme-toggle{display:inline-grid;place-items:center;width:36px;height:36px;min-height:36px;padding:0;border:1px solid var(--line,#dce5df);border-radius:50%;background:transparent;color:inherit;font-size:21px;flex-shrink:0;cursor:pointer}.top-actions .theme-toggle{color:#496556}.profile-menu{padding:0;margin:0;border:0;background:none;position:relative}.profile-menu>summary{cursor:pointer;list-style:none;border:1px solid transparent}.profile-menu>summary::-webkit-details-marker{display:none}.profile-menu>summary:hover{border-color:#99b7a3}.profile-popover{position:absolute;right:0;top:46px;width:min(300px,calc(100vw - 30px));z-index:60;background:#fff;border:1px solid var(--line);box-shadow:0 12px 40px #12321e20;border-radius:12px;padding:18px;text-align:left}.profile-popover>strong,.profile-popover>small{display:block;overflow-wrap:anywhere}.profile-popover>small{color:#758579;font-size:11px;margin:5px 0 13px}.profile-popover a{display:block;padding:11px 0;border-top:1px solid var(--line);font-size:13px}.profile-popover label{display:block;font-size:12px;color:#657a6b}.profile-popover select{margin-top:7px}.profile-layout{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr);gap:24px}.profile-identity{display:flex;align-items:center;gap:14px;margin-bottom:24px}.profile-identity .avatar{width:50px;height:50px;font-size:22px}.profile-identity p{margin:4px 0 0}input[readonly]{background:#f4f7f4;color:#697e70}.profile-layout>section{align-self:start}@media(max-width:900px){.profile-layout{grid-template-columns:1fr;gap:0}.top-actions{gap:10px}}header>.theme-toggle{color:inherit}
html[data-theme=dark]{--bg:#080808;--navy:#e1e1e1;--green:#a3a3a3;--line:#3c3c3c;--muted:#a9a9a9;background:#080808;color:#e6e6e6}
html[data-theme=dark] body,html[data-theme=dark] body.guest{background:#080808;color:#e6e6e6}
html[data-theme=dark] :is(.sidebar,.topbar,.panel,.stat,.profile-popover,.action-dialog,.provider-card,.row-menu>div,.context-menu>div,.card,nav#nav){background:#141414;color:#e6e6e6;border-color:#3c3c3c}
html[data-theme=dark] :is(input,select,textarea,button,.button){background:#282828;color:#e1e1e1;border-color:#4a4a4a}
html[data-theme=dark] :is(input,textarea)::placeholder{color:#a9a9a9}
html[data-theme=dark] :is(input,select,textarea):focus{outline-color:#a3a3a3}
html[data-theme=dark] :is(h1,h2,h3,.stat strong,.welcome-banner h2,.empty h3,.receipt-total,.provider-card strong){color:#e8e8e8}
html[data-theme=dark] :is(.muted,.field>span,.panel-subtitle,.stat-label,.stat small,.today,.breadcrumb,.language,.text-button,.nav-caption,footer,.profile-popover label,.profile-popover>small,.profile-identity p,header small,.connection){color:#aeaeae}
html[data-theme=dark] :is(.sidebar nav a,.sidebar nav .nav-group a,.nav-group summary,.sidebar .account-link,.sidebar-close,.top-actions .theme-toggle){color:#c6c6c6}
html[data-theme=dark] :is(.sidebar nav a:hover,.sidebar nav a.active,.sidebar nav .nav-group a.active,.settings-switch a.active,.section-tabs a.active,.admin-tabs a.active,nav button.active){background:#363636;color:#c7c7c7}
html[data-theme=dark] :is(.section-tabs,.admin-tabs){background:transparent;border-color:#3c3c3c}
html[data-theme=dark] :is(.section-tabs a,.admin-tabs a,.settings-switch a,.row-menu a,.context-menu a,a){color:#bcbcbc}
html[data-theme=dark] :is(.button.primary,button.primary){background:#959595;color:#1a1a1a;border-color:#959595}
html[data-theme=dark] :is(th,.upload-fields input[type=file],input[readonly],.avatar,.badge,.stat-icon,.quick-actions a>span,.unit-tile,.notice,.welcome-banner,.settings-switch){background:#2d2d2d;color:#cecece;border-color:#4a4a4a}
html[data-theme=dark] :is(td,th,.table-wrap,.form-actions,.page-heading,.metric-line,.notice,.electricity-history,.upload-fields,.quick-actions a,.profile-popover a){border-color:#3c3c3c}
html[data-theme=dark] :is(.alert.success,.badge.active){background:#2e2e2e;color:#c9c9c9}
html[data-theme=dark] :is(.status-note,.badge.pending){background:#323232;color:#c6c6c6;border-color:#5b5b5b}
html[data-theme=dark] :is(.alert.error,.button.danger){background:#343434;color:#c9c9c9;border-color:#5c5c5c}
html[data-theme=dark] .provider-card.selected{border-color:#a3a3a3;box-shadow:0 0 0 1px #a3a3a3}html[data-theme=dark] .progress{background:#3c3c3c}html[data-theme=dark] .brand-logo{background:#f6f6f6;border-radius:8px;padding:6px}html[data-theme=dark] .sidebar nav{background:transparent}html[data-theme=dark] header{background:#141414;color:#e6e6e6}html[data-theme=dark] #toast{background:#dedede;color:#141414}
@media print{html[data-theme=dark],html[data-theme=dark] body,html[data-theme=dark] :is(.panel,.card,.stat){background:white!important;color:#142a1d!important}.theme-toggle,.profile-menu{display:none!important}html[data-theme=dark] :is(h1,h2,h3,td,th,p,strong){color:#142a1d!important;background:transparent!important}}

/* Monochrome logo retains its SVG transparency in dark mode. */
html[data-theme=dark] :is(.brand-logo,.auth-logo,.receipt-logo,header>img){filter:brightness(0) invert(1);background:transparent!important;border:0!important;border-radius:0;padding:0!important;box-shadow:none}
.ui-icon{width:21px;height:21px;display:inline-block;flex:none;vertical-align:middle}.page-heading h1,.panel-heading h2{display:flex;align-items:center;gap:11px}.page-heading .ui-icon{width:25px;height:25px;color:#7c9183}.panel-heading .ui-icon{color:#819087}.stat-icon{display:grid;place-items:center}.stat-icon .ui-icon{width:21px;height:21px}.sidebar nav a>span{display:grid;place-items:center}.quick-actions a>span{display:grid;place-items:center}.quick-actions .ui-icon{width:22px;height:22px}html[data-theme=dark] :is(.page-heading,.panel-heading) .ui-icon{color:#adadad}@media(max-width:900px){.stat-icon{display:grid!important;top:12px;right:12px;padding:5px}.stat-icon .ui-icon{width:18px;height:18px}.stat-label{display:block;padding-right:28px}.page-heading .ui-icon{width:22px;height:22px}}@media print{html[data-theme=dark] :is(.brand-logo,.auth-logo,.receipt-logo,.print-brand){filter:none!important;background:transparent!important}}

/* Light-toned vector artwork for black backgrounds; preserve leaf and sun detail. */
html[data-theme=dark] :is(.brand-logo,.auth-logo,.receipt-logo,header>img){content:url("brand-logo-dark.svg");filter:none!important;background:transparent!important}
@media print{html[data-theme=dark] :is(.brand-logo,.auth-logo,.receipt-logo,header>img){content:url("brand-logo.svg");filter:none!important}}
