/* Mawzena — Dark mode. Activated by <html class="mw-dark">. Broad, safe surface overrides. */
html.mw-dark{color-scheme:dark}
html.mw-dark body,
html.mw-dark .app-body,
html.mw-dark .app-layout,
html.mw-dark .main-content,
html.mw-dark .dashboard-body{background:#0f172a !important;color:#e2e8f0 !important}

/* white surfaces → dark cards (broad catch for all *-card / *-panel / *-section classes) */
html.mw-dark .panel,
html.mw-dark .card,
html.mw-dark .stat-card,
html.mw-dark .topbar,
html.mw-dark .empty-box,
html.mw-dark .empty-state,
html.mw-dark table,
html.mw-dark .data-table,
html.mw-dark .category-card,
html.mw-dark .rec-month-amount,
html.mw-dark [class*="-card"],
html.mw-dark [class*="-panel"],
html.mw-dark [class*="-section"],
html.mw-dark [class*="-cards"] > *,
html.mw-dark .mw-modal-box,
html.mw-dark .modal-box{background:#1e293b !important;border-color:#334155 !important;color:#e2e8f0 !important;box-shadow:0 6px 20px rgba(0,0,0,.35) !important}

/* nested lighter blocks (inner tiles) */
html.mw-dark .dp-sim-item,
html.mw-dark .dp-ef-card,
html.mw-dark .bud-alloc-item,
html.mw-dark .an-hl,
html.mw-dark .dash-bud-top-item,
html.mw-dark .bud-add,
html.mw-dark .bud-panel-head,
html.mw-dark .dp-panel-head{background:#243244 !important;border-color:#3b4a5e !important;color:#e2e8f0 !important}

/* headings & default text → light (only where color isn't an accent) */
html.mw-dark h1, html.mw-dark h2, html.mw-dark h3, html.mw-dark h4{color:#f1f5f9 !important}
html.mw-dark p, html.mw-dark span, html.mw-dark td, html.mw-dark th, html.mw-dark li, html.mw-dark label, html.mw-dark small{color:#cbd5e1}
html.mw-dark strong, html.mw-dark b{color:#f1f5f9}

/* keep semantic accent colors visible on dark (override the light->dark text we just set) */
html.mw-dark [style*="color:#0f766e"], html.mw-dark [style*="color:#0b5e57"]{color:#2dd4bf !important}
html.mw-dark [style*="color:#b91c1c"], html.mw-dark [style*="color:#b45309"], html.mw-dark [style*="color:#d97706"]{color:#fca5a5 !important}
html.mw-dark .amount-income{color:#34d399 !important}
html.mw-dark .amount-expense{color:#f87171 !important}

/* inputs / selects / textareas */
html.mw-dark input, html.mw-dark select, html.mw-dark textarea{background:#0f172a !important;color:#e2e8f0 !important;border-color:#3b4a5e !important}
html.mw-dark input::placeholder{color:#64748b}

/* borders / dividers */
html.mw-dark .bud-row, html.mw-dark .dp-item, html.mw-dark .an-cat-row, html.mw-dark tr, html.mw-dark td, html.mw-dark th{border-color:#334155 !important}

/* progress track backgrounds */
html.mw-dark .bud-bar, html.mw-dark .an-cat-bar, html.mw-dark .dp-bar, html.mw-dark .bud-alloc-bar, html.mw-dark .budget-bar{background:#334155 !important}

/* muted helper text */
html.mw-dark .sub, html.mw-dark .bud-note, html.mw-dark .dp-item-meta, html.mw-dark .cc-badge{color:#94a3b8 !important}

/* the top help card / gradients stay readable */
html.mw-dark .mw-dashboard-help-card{background:#1e293b !important}

/* floating theme toggle */
.mw-theme-toggle{position:fixed;bottom:18px;inset-inline-start:18px;z-index:9998;width:46px;height:46px;border-radius:50%;border:0;background:#0f766e;color:#fff;font-size:20px;cursor:pointer;box-shadow:0 8px 22px rgba(15,118,110,.4);display:flex;align-items:center;justify-content:center}
html.mw-dark .mw-theme-toggle{background:#f59e0b}

/* ===== dark mode targeted contrast fixes ===== */
html.mw-dark .topbar h1, html.mw-dark .monthly-topbar h1, html.mw-dark h1{color:#f1f5f9 !important;-webkit-text-fill-color:#f1f5f9 !important}
html.mw-dark .topbar p{color:#94a3b8 !important}
/* month switcher bar */
html.mw-dark .mw-month-bar, html.mw-dark .month-switcher, html.mw-dark .month-current{background:#243244 !important;border-color:#3b4a5e !important;color:#e2e8f0 !important}
html.mw-dark .month-current strong, html.mw-dark .mw-month-center strong{color:#f1f5f9 !important}
/* smart alerts */
html.mw-dark .smart-alerts-head h2{color:#f1f5f9 !important}
html.mw-dark .smart-alerts-head p{color:#94a3b8 !important}
html.mw-dark .smart-alert-item{background:#243244 !important;border-color:#3b4a5e !important}
html.mw-dark .smart-alert-item.warning{background:#3a2f1a !important}
html.mw-dark .smart-alert-item.danger{background:#3a1d1d !important}
html.mw-dark .smart-alert-title{color:#f1f5f9 !important}
html.mw-dark .smart-alert-message{color:#cbd5e1 !important}
html.mw-dark .mini-btn, html.mw-dark .mini-btn-light{background:#1e293b !important;color:#e2e8f0 !important;border-color:#3b4a5e !important}
/* activity items + misc rows */
html.mw-dark .dashboard-activity-item, html.mw-dark .top-expense-item, html.mw-dark .budget-item, html.mw-dark .goal-saving-metric{background:#243244 !important;border-color:#3b4a5e !important}
/* forecast / health cards inner */
html.mw-dark .month-forecast-metric, html.mw-dark .financial-health-details{background:#243244 !important}
/* section headings that use dark teal text */
html.mw-dark [style*="color:#0f172a"], html.mw-dark [style*="color:#334155"], html.mw-dark [style*="color:#1e293b"]{color:#e2e8f0 !important}
