html{color-scheme:light}
html[data-theme="night"]{color-scheme:dark;background:#0b1521;color:#e2edf6;--muted:#9db0c2;--line:#30495e;--blue:#89bdff;--danger:#ff9d9d;--amber:#f2c785;--navy:#102031}
.theme-controls{flex-shrink:0;margin:0 0 14px}
.theme-label{display:block;font-size:.76rem;color:#b9cddd;margin:0 2px 6px}
.theme-switch{display:grid;grid-template-columns:1fr 1fr;gap:5px}
.theme-switch button{display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:38px;padding:6px 7px;border:1px solid #55758d;border-radius:7px;background:transparent;color:#c7dbea;font-size:.79rem;white-space:nowrap}
.theme-switch button:hover{background:#24435c;color:#fff}
.theme-switch button[aria-pressed="true"]{background:#24435c;border-color:#71eed5;color:#fff}
.theme-switch button>span{font-size:1rem}
html[data-theme="night"] .sidebar{background:#0e1e2d}
html[data-theme="night"] :is(.card,.auth-card,.pocket-card,dialog){background:#142334;color:#e2edf6}
html[data-theme="night"] .available{background:#102b3a;border-color:#35566b}
html[data-theme="night"] :is(input,select,textarea,.secondary,.icon,.pill-row button){background:#172b3c;color:#e2edf6;border-color:#405b70}
html[data-theme="night"] :is(input,textarea)::placeholder{color:#9db0c2;opacity:1}
html[data-theme="night"] :is(option,optgroup){background:#172b3c;color:#e2edf6}
html[data-theme="night"] .secondary:hover{background:#233d52}
html[data-theme="night"] .primary:hover{background:#067666}
html[data-theme="night"] .danger{background:#3f2330;color:#ffb9bd;border-color:#7a4253}
html[data-theme="night"] .table th{background:#182c3d}
html[data-theme="night"] :is(.table td,.summary-line){border-bottom-color:#263e53}
html[data-theme="night"] .table tbody tr:hover{background:#1c3448}
html[data-theme="night"] .badge{background:#223549;color:#b9cad9}
html[data-theme="night"] .badge.fact{background:#153d35;color:#7ae2c4}
html[data-theme="night"] .badge.plan{background:#423421;color:#eecd88}
html[data-theme="night"] .badge.review{background:#463522;color:#ffd28e}
html[data-theme="night"] .notice{background:#332b1e;border-color:#665238}
html[data-theme="night"] .notice p{color:#e2c58e}
html[data-theme="night"] .notice.neutral{background:#183348;border-color:#335971}
html[data-theme="night"] .notice.neutral p{color:#bcdae9}
html[data-theme="night"] .preview-banner{background:#193349;color:#b7d7f2}
html[data-theme="night"] :is(.positive,.row-order-status,.tax-savings .fund-number){color:#70e5c5}
html[data-theme="night"] :is(.copy-text,.available .card-note){color:#b9ccdc}
html[data-theme="night"] .tax-method a{color:var(--blue)}
html[data-theme="night"] :is(.row-drag,.row-arrows button){color:#95b4c9}
html[data-theme="night"] :is(.row-drag:hover,.row-arrows button:hover:not(:disabled)){background:#1c423d;color:#8aeed4}
html[data-theme="night"] .row-order-controls button:focus-visible{outline-color:#76c2ff}
html[data-theme="night"] :is(.chart-track,.fundbar){background:#263f54}
html[data-theme="night"] .chart-value{background:#30b49d}
html[data-theme="night"] .chart-track.out .chart-value{background:#deb16b}
html[data-theme="night"] .pill-row button.selected{background:#2b5068;border-color:#557a98;color:#fff}
html[data-theme="night"] dialog::backdrop{background:#020b16c9}
html[data-theme="night"] .toast{background:#213e52;color:#fff;border:1px solid #425f74}
#op-expense{background-color:#fdf1f2}
#op-income{background-color:#edf7f2}
html[data-theme="night"] #op-expense{background-color:#352d35}
html[data-theme="night"] #op-income{background-color:#203a36}
@media(max-width:850px){.theme-controls{max-width:240px;margin-bottom:12px}.theme-switch button{font-size:.85rem;min-height:40px}}
