:root{color-scheme:light}
:root[data-theme="dark"]{color-scheme:dark;--surface:#111d2e;--canvas:#0b1220;--tint:#152b42;--line-soft:#263e56;--line:#2c3d52;--input-line:#41536a;--sky-soft:#345a78;--sky-light:#7dd3fc;--brand:#7dd3fc;--brand-strong:#bae6fd;--ink:#e2e8f0;--text:#d4dfeb;--text-secondary:#bfccdc;--muted:#a3b3c6;--subtle:#97aac0;--sky:#38bdf8;--danger:#fca5a5;--danger-bg:#361d29;--danger-line:#7b394a;--warning:#fcd38a;--warning-bg:#302819;--warning-line:#715a2a;--accent:#7dd3fc;--navy:#7dd3fc;--sava-blue:#7dd3fc;--phase-color:#7dd3fc}
.color-mode-toggle{display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:32px;height:32px;margin:0;padding:7px;border:0;border-radius:5px;background:transparent;color:var(--brand,#0369a1);cursor:pointer}
.color-mode-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.color-mode-toggle:hover{background:var(--tint,#f0f9ff)}.color-mode-toggle .mode-sun{display:none}
[data-theme=dark] .color-mode-toggle .mode-moon{display:none}[data-theme=dark] .color-mode-toggle .mode-sun{display:block}
body>header>.color-mode-toggle{margin-left:auto}
html[data-theme=dark] button{color:#0b1220}html[data-theme=dark] button.secondary,html[data-theme=dark] .color-mode-toggle,html[data-theme=dark] .field-help,html[data-theme=dark] #discipline-toggle,html[data-theme=dark] #open-member{color:var(--brand)}
html[data-theme=dark] .danger-button{background:#b91c1c;color:#fff}html[data-theme=dark] .management-grid{background:var(--surface)}
html[data-theme=dark] .brand,html[data-theme=dark] header>a:has(img[alt="SAVA M&E"]){background:#fff;border-radius:5px;padding:6px 8px}
html[data-theme=dark] #result:empty{background:var(--surface)}
html[data-theme=dark] input:focus,html[data-theme=dark] select:focus{outline-color:var(--sky);box-shadow:0 0 0 3px #38bdf826}
html[data-theme=dark] .field-explanation[popover]{box-shadow:0 12px 32px #0008}
html[data-theme=dark] dialog::backdrop{background:#0009}
html[data-theme=dark] :focus-visible{outline-color:#7dd3fc}
@media(max-width:700px){.header-actions>.color-mode-toggle{width:29px;height:38px;padding:6px}header>.brand,header>.brand img{width:140px}.header-actions>#language-menu>summary,.header-actions>#project-menu>summary,.header-actions>#member-menu>summary{padding-left:7px;padding-right:7px}}
@media(max-width:360px){header>.brand,header>.brand img{width:116px}.header-actions>.color-mode-toggle{width:27px}.header-actions>#language-menu>summary,.header-actions>#project-menu>summary,.header-actions>#member-menu>summary{padding-left:5px;padding-right:5px}}
@media print{[data-color-mode]{display:none!important}}
html[data-theme=dark] input,html[data-theme=dark] select,html[data-theme=dark] textarea{background-color:var(--surface);color:var(--text);border-color:var(--input-line)}
html[data-theme=dark] [aria-invalid=true]{border-color:var(--danger)}
