/* Dark Premium: all rules are theme-scoped; light theme remains untouched. */
:root[data-theme="dark"]{
 --brand-navy:#061B25;--brand-deep:#004B3B;--brand-secondary:#006B4D;--brand-primary:#10B96A;--brand-mid:#30D982;--brand-light:#45E28E;
 --background:#091820;--surface:#152630;--surface-secondary:#1d333e;--surface-raised:#203c48;--header-surface:#0e222d;--input-bg:#0c202a;
 --border:#37515e;--line-2:#29424f;--text-primary:#edf5f8;--text-secondary:#b1c4ce;
 --accent:var(--brand-mid);--success:var(--brand-light);--danger:#ffaaa4;--warning:#f4d28b;
 --green-950:var(--brand-navy);--green-900:var(--brand-deep);--green-850:var(--brand-secondary);--green-800:var(--brand-light);--green-700:var(--brand-mid);--green-600:var(--brand-primary);--green-500:var(--brand-mid);--green-400:var(--brand-light);--green-300:#286956;--green-100:#164637;--green-50:#143a32;
 --blue:#9bceff;--blue-soft:#193b53;--purple:#d0b8ff;--red:var(--danger);--red-soft:#452b31;--amber:var(--warning);--amber-soft:#3a3325;
 --on-accent:#06251b;--disabled-bg:#263944;--disabled-fg:#a9bcc6;--focus-ring:var(--brand-light);
 --hero-gradient:linear-gradient(120deg,var(--header-surface),var(--surface-raised));
 --shadow:0 14px 38px #0004;--shadow-sm:0 5px 16px #0003;--card-shadow:0 8px 28px #0003;
}
html[data-theme="dark"] .topbar,html[data-theme="dark"] .mobile-bottom-nav{background:var(--header-surface);border-color:var(--border)}
html[data-theme="dark"] .sidebar{background:linear-gradient(165deg,var(--brand-navy),var(--brand-deep))}
html[data-theme="dark"] .sidebar :is(button,.period-picker){background:var(--header-surface);color:var(--text-primary);border-color:var(--border)}
html[data-theme="dark"] :is(.tone-income,.tone-positive){--tone:var(--success)}
html[data-theme="dark"] :is(.tone-expense,.tone-danger,.tone-negative){--tone:var(--danger)}
html[data-theme="dark"] .tone-info{--tone:var(--blue)}
html[data-theme="dark"] .tone-wealth{--tone:var(--purple)}
html[data-theme="dark"] .metric-icon{background:color-mix(in srgb,var(--tone,var(--accent)) 13%,var(--surface));color:var(--tone,var(--accent))}
html[data-theme="dark"] .metric:after{opacity:.4}
html[data-theme="dark"] .home-hero:before,html[data-theme="dark"] .home-hero:after{opacity:.25}
html[data-theme="dark"] :is(button.primary,.file-button.primary,.auth-card button.primary){background:var(--brand-primary);border-color:var(--brand-primary);color:var(--on-accent);box-shadow:0 6px 18px #0002}
html[data-theme="dark"] :is(button.primary,.file-button.primary,.auth-card button.primary):hover:not(:disabled){background:var(--brand-mid);border-color:var(--brand-mid);color:var(--on-accent)}
html[data-theme="dark"] :is(button,.file-button):not(.bank-card-face):not(.card-detail-open):not(.primary):not(.badge):hover:not(:disabled){background:var(--surface-raised);color:var(--text-primary);border-color:var(--border)}
html[data-theme="dark"] :is(button,a,input,select,textarea):focus-visible{outline:2px solid var(--focus-ring);outline-offset:3px}
html[data-theme="dark"] :is(button.primary,.auth-card button.primary,button):disabled{background:var(--disabled-bg);color:var(--disabled-fg);border-color:var(--border);opacity:1;cursor:not-allowed;transform:none;box-shadow:none}
html[data-theme="dark"] :is(input,select,textarea):disabled{background:var(--disabled-bg);color:var(--disabled-fg);opacity:1}
html[data-theme="dark"] input::placeholder,html[data-theme="dark"] textarea::placeholder{color:var(--text-secondary);opacity:1}
html[data-theme="dark"] body.expenses-desktop .ledger-panel .actions .entry-action:hover{background:var(--surface-raised);color:var(--accent)!important;outline-color:var(--accent)}
html[data-theme="dark"] body.expenses-desktop .ledger-panel .actions .entry-action.danger:hover{background:var(--red-soft);color:var(--danger)!important;outline-color:var(--danger)}
html[data-theme="dark"] .home-hero :is(.home-income,.income-value),html[data-theme="dark"] .amount.positive{color:var(--success)}
html[data-theme="dark"] .amount:not(.positive){color:var(--danger)}
html[data-theme="dark"] body.expenses-desktop .ledger-panel .badge.pending{background:var(--amber-soft);color:var(--warning)}
html[data-theme="dark"] body.expenses-desktop .ledger-panel .badge.overdue{background:var(--red-soft);color:var(--danger)}
