/* DARK */
body.dark{
  --bg:#18181b;--card:#1f1f23;--text:#f0f0ee;--text2:#aaa;--text3:#666;
  --border:rgba(255,255,255,0.08);--shadow:0 2px 16px rgba(0,0,0,0.35);
  --green-card:#1a2e22;--yellow-card:#16263a;
}
body.dark .stat-card.green .stat-lbl,body.dark .stat-card.green .stat-val,body.dark .stat-card.green .stat-sub{color:#aed67a}
body.dark .stat-card.yellow .stat-lbl,body.dark .stat-card.yellow .stat-val,body.dark .stat-card.yellow .stat-sub{color:#7ab8e8}
body.dark input[type=range]{background:#333}
body.dark input[type=range]::-webkit-slider-thumb{background:#f0f0ee}
body.dark .tog.on{background:#f0f0ee;color:#1c1c1e}
body.dark .mf-tog.on{background:var(--mf);color:#fff}
body.dark .ai-row button{background:#f0f0ee;color:#1c1c1e}
body.dark .chip:hover{background:#f0f0ee;color:#1c1c1e}
body.dark .savings-bar{background:#0d2b1e;border-color:#2d6a4f}
body.dark .savings-bar h4,.dark .srow{color:#7ecfaa}
body.dark .sip-bar{background:rgba(124,92,191,0.15);border-color:var(--mf)}
body.dark .sip-row{color:#c4aef0}
body.dark .num-input{background:#2a2a2e;border-color:rgba(255,255,255,0.12);color:var(--text)}
body.dark .num-input:focus{border-color:#f0f0ee}
body.dark .mf-result{background:rgba(124,92,191,0.2)}
body.dark .mf-result-row{color:#c4aef0}
body.dark .sip-bar h4{color:#c4aef0}
body.dark .stat-card.neutral .stat-lbl,body.dark .stat-card.neutral .stat-val,body.dark .stat-card.neutral .stat-sub{color:#f0f0ee}
/* Fix invisible gradient stat cards in dark mode */
body.dark .stat-card[style*="linear-gradient(135deg,#e8f4ec"]{background:#162a1e !important}
body.dark .stat-card[style*="linear-gradient(135deg,#ede9f8"]{background:#221a33 !important}
body.dark .stat-card[style*="linear-gradient(135deg,#e8f4ec"] .stat-lbl,
body.dark .stat-card[style*="linear-gradient(135deg,#e8f4ec"] .stat-sub{color:rgba(174,214,122,0.75) !important}
body.dark .stat-card[style*="linear-gradient(135deg,#ede9f8"] .stat-lbl,
body.dark .stat-card[style*="linear-gradient(135deg,#ede9f8"] .stat-sub{color:rgba(196,174,240,0.75) !important}

/* SCROLLBARS — light mode */
.table-scroll::-webkit-scrollbar{width:6px;height:6px}
.table-scroll::-webkit-scrollbar-track{background:transparent;border-radius:4px}
.table-scroll::-webkit-scrollbar-thumb{background:rgba(0,0,0,0.18);border-radius:4px}
.table-scroll::-webkit-scrollbar-thumb:hover{background:rgba(0,0,0,0.30)}
.table-scroll::-webkit-scrollbar-corner{background:transparent}
/* Firefox */
.table-scroll{scrollbar-width:thin;scrollbar-color:rgba(0,0,0,0.18) transparent}

/* SCROLLBARS — dark mode */
body.dark .table-scroll::-webkit-scrollbar-track{background:rgba(255,255,255,0.04)}
body.dark .table-scroll::-webkit-scrollbar-thumb{background:rgba(255,255,255,0.18);border-radius:4px}
body.dark .table-scroll::-webkit-scrollbar-thumb:hover{background:rgba(255,255,255,0.32)}
body.dark .table-scroll::-webkit-scrollbar-corner{background:transparent}
body.dark .table-scroll{scrollbar-color:rgba(255,255,255,0.18) rgba(255,255,255,0.04)}

