/* ============================================================
   NESTFY — style.css
   Smart Finance Tracker Design System
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --bg:       #080b10;
  --bg2:      #0e1219;
  --card:     #111620;
  --card2:    #181e2c;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.12);

  --accent:   #00d4aa;
  --accent2:  #7c6aff;
  --accent3:  #ff6b6b;
  --gold:     #ffd166;

  --income:   #00d4aa;
  --expense:  #ff6b6b;
  --text:     #e2e8f0;
  --muted:    #64748b;
  --muted2:   #94a3b8;

  --ff:       'Outfit', sans-serif;
  --fm:       'JetBrains Mono', monospace;
  --r:        14px;
  --r2:       20px;
  --shadow:   0 8px 32px rgba(0,0,0,0.5);
}

/* ── Light Theme Variables ─────────────────────────────────── */
body.light {
  --bg:      #f1f5f9;
  --bg2:     #e2e8f0;
  --card:    #ffffff;
  --card2:   #f8fafc;
  --border:  rgba(0,0,0,.08);
  --border2: rgba(0,0,0,.14);
  --text:    #0f172a;
  --muted:   #64748b;
  --muted2:  #475569;
  --shadow:  0 8px 32px rgba(0,0,0,.1);
}

/* ── Light: scrollbar ── */
body.light ::-webkit-scrollbar-track { background: var(--bg2); }
body.light ::-webkit-scrollbar-thumb { background: #94a3b8; border-radius: 99px; }

/* ── Light: body & layout ── */
body.light { background: var(--bg); color: var(--text); }

/* ── Light: sidebar ── */
body.light .sidebar { background: var(--card); border-right: 1px solid var(--border2); }
body.light .sidebar-logo .logo-text { -webkit-text-fill-color: transparent; }
body.light .nav-section-label { color: var(--muted); }
body.light .nav-item { color: var(--muted2); }
body.light .nav-item:hover { background: var(--bg2); color: var(--text); }
body.light .nav-item.active {
  background: rgba(0,212,170,.1);
  color: #047857;
  border-color: rgba(0,212,170,.3);
}
body.light .nav-item.active i { color: var(--accent); }
body.light .nav-badge { background: var(--accent); color: #000; }
body.light .sidebar-footer { border-top: 1px solid var(--border2); }
body.light .sidebar-currency select {
  background: var(--bg2); color: var(--text); border-color: var(--border2);
}
body.light .sidebar-currency select option { background: var(--card); }

/* ── Light: topbar ── */
body.light .topbar { background: var(--card); border-bottom: 1px solid var(--border2); }
body.light .page-title { color: var(--text); }
body.light .mobile-toggle { background: var(--card); color: var(--text); border: 1px solid var(--border2); }

/* ── Light: stat cards ── */
body.light .stat-card { background: var(--card); border-color: var(--border2); }
body.light .stat-card::before { opacity: .08; }
body.light .stat-label { color: var(--muted); }
body.light .stat-val  { color: var(--text); }
body.light .stat-sub { color: var(--muted); }

/* ── Light: cards ── */
body.light .card { background: var(--card); border-color: var(--border2); }
body.light .card-title, body.light .card-title-lg { color: var(--text); }
body.light .divider { background: var(--border2); }

/* ── Light: insights ── */
body.light .insight {
  background: #ffffff;
  border-color: rgba(0,212,170,.2);
  box-shadow: 0 2px 12px rgba(0,0,0,.06);
}
body.light .insight h4 { color: #0f172a; font-weight: 700; }
body.light .insight p  { color: #475569; }
body.light .insight-icon { background: rgba(0,212,170,.12); color: #00a88a; }

/* ── Light: forms ── */
body.light .form-control {
  background: var(--bg2);
  color: var(--text);
  border-color: var(--border2);
}
body.light .form-control::placeholder { color: #94a3b8; }
body.light .form-control:focus {
  border-color: rgba(0,212,170,.5);
  box-shadow: 0 0 0 3px rgba(0,212,170,.1);
  background: var(--card);
}
body.light select.form-control option { background: var(--card); color: var(--text); }
body.light .form-label { color: var(--muted2); }
body.light .input-prefix { background: var(--bg2); border-color: var(--border2); color: var(--muted2); }

/* ── Light: buttons ── */
body.light .btn-ghost { color: var(--muted2); border-color: var(--border2); }
body.light .btn-ghost:hover { background: var(--bg2); color: var(--text); }
body.light .btn-add { background: var(--accent); color: #000; }

/* ── Light: type toggle ── */
body.light .type-toggle { background: var(--bg2); border-color: var(--border2); }
body.light .type-btn { color: var(--muted2); }
body.light .type-btn.active.exp { background: rgba(255,107,107,.15); color: #dc2626; }
body.light .type-btn.active.inc { background: rgba(0,212,170,.15); color: #047857; }

/* ── Light: table ── */
body.light table thead tr { background: var(--bg2); }
body.light table th { color: var(--muted2); }
body.light table td { color: var(--text); border-color: var(--border); }
body.light table tbody tr:hover { background: var(--bg2); }
body.light .amount-col.col-income  { color: #047857; }
body.light .amount-col.col-expense { color: #dc2626; }

/* ── Light: badges ── */
body.light .badge { opacity: .85; }
body.light .tag { background: rgba(0,212,170,.12); color: #047857; border-color: rgba(0,212,170,.2); }

/* ── Light: modal ── */
body.light .overlay { background: rgba(15,23,42,.5); }
body.light .modal { background: var(--card); border-color: var(--border2); }
body.light .modal-head { border-bottom: 1px solid var(--border2); }
body.light .modal-title { color: var(--text); }
body.light .modal-close { color: var(--muted); }
body.light .modal-close:hover { background: var(--bg2); color: var(--text); }
body.light .modal-footer { border-top: 1px solid var(--border2); }

/* ── Light: progress bars ── */
body.light .progress { background: var(--bg2); }

/* ── Light: budget rows ── */
body.light .budget-row { border-color: var(--border); }
body.light .budget-name { color: var(--text); }
body.light .budget-sub  { color: var(--muted); }

/* ── Light: goal cards ── */
body.light .goal-card { background: var(--card); border-color: var(--border2); }
body.light .goal-name { color: var(--text); }
body.light .goal-target { color: var(--muted); }

/* ── Light: recurring ── */
body.light .rec-item { border-color: var(--border); }
body.light .rec-name { color: var(--text); }
body.light .rec-detail { color: var(--muted); }
body.light .freq-pill { background: var(--bg2); color: var(--muted2); border-color: var(--border2); }

/* ── Light: filter bar ── */
body.light .filter-bar { background: var(--card); border-color: var(--border2); }

/* ── Light: empty state ── */
body.light .empty-state h3 { color: var(--muted2); }
body.light .empty-state p  { color: var(--muted); }
body.light .empty-icon { color: var(--muted); }

/* ── Light: analytics ── */
body.light .analytics-stat { border-color: var(--border); }
body.light .analytics-stat .label { color: var(--muted); }
body.light .analytics-stat .value { color: var(--text); }
body.light .legend-item { color: var(--text); }
body.light .legend-bar { background: var(--bg2); }
body.light .legend-pct { color: var(--muted); }
body.light .legend-amt { color: var(--text); }

/* ── Light: toast ── */
body.light .toast {
  background: var(--card);
  color: var(--text);
  border: 1px solid var(--border2);
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
}

/* ── Light: setting rows ── */
body.light .setting-row { border-color: var(--border); }
body.light .setting-info h4 { color: var(--text); }
body.light .setting-info p  { color: var(--muted); }

/* ── Light: user info ── */
body.light .user-info { background: var(--bg2); border-color: var(--border2); }
body.light .user-name  { color: var(--text); }
body.light .user-email { color: var(--muted); }
body.light .btn-logout { color: var(--muted); }
body.light .sync-row   { color: var(--muted); }

/* ── Light: auth screen ── */
body.light #auth-screen { background: #e2e8f0; }
body.light .auth-card {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.1) !important;
  box-shadow: 0 24px 64px rgba(0,0,0,.12) !important;
}
body.light .auth-logo-sub { color: #64748b; }
body.light .auth-tabs { background: #f1f5f9; border-color: rgba(0,0,0,.08); }
body.light .auth-tab { color: #64748b; }
body.light .auth-tab.active { background: #ffffff; color: #0f172a; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
body.light .btn-google {
  background: #f8fafc; border-color: rgba(0,0,0,.12);
  color: #0f172a;
}
body.light .btn-google:hover { background: #f1f5f9; }
body.light .auth-divider { color: #94a3b8; }
body.light .auth-divider::before, body.light .auth-divider::after { background: rgba(0,0,0,.1); }
body.light .pw-toggle { color: #94a3b8; }
body.light .pw-toggle:hover { color: #64748b; }
body.light .forgot-link { color: var(--accent); }
body.light .auth-footer { color: #64748b; }
body.light .remember-row span { color: #64748b; }

/* ── Light: PWA install banner ── */
body.light #pwa-install-banner {
  background: #ffffff;
  border-color: rgba(0,212,170,.3);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
}
body.light .pwa-install-text strong { color: #0f172a; }
body.light .pwa-install-text span   { color: #64748b; }
body.light #pwa-install-dismiss { color: #94a3b8; }

/* ─────────────────────────────────────────────────────────────
   THEME TOGGLE BUTTON
   ─────────────────────────────────────────────────────────── */
.theme-toggle {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; margin: 6px 10px 0;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); cursor: pointer;
  transition: background .2s, border-color .2s;
  user-select: none;
}
.theme-toggle:hover { border-color: var(--border2); background: var(--card2); }
.theme-toggle-label {
  display: flex; align-items: center; gap: 8px;
  font-size: .8rem; font-weight: 600; color: var(--muted2);
  pointer-events: none;
}
.theme-toggle-label i { font-size: .85rem; width: 16px; text-align: center; transition: color .2s; }

/* The pill */
.toggle-pill {
  width: 42px; height: 24px;
  background: var(--card2); border: 1.5px solid var(--border2);
  border-radius: 99px; position: relative; flex-shrink: 0;
  transition: background .3s, border-color .3s;
  pointer-events: none;
}
.toggle-pill::after {
  content: '';
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px; border-radius: 50%;
  background: var(--muted);
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .3s;
}
/* Light mode: pill turns accent, knob slides right */
body.light .toggle-pill {
  background: var(--accent);
  border-color: var(--accent);
}
body.light .toggle-pill::after {
  transform: translateX(18px);
  background: #ffffff;
}
/* Sun icon turns gold in light mode */
body.light .theme-toggle-label i { color: #f59e0b; }
body.light .theme-toggle { background: rgba(0,212,170,.05); border-color: rgba(0,212,170,.2); }
body.light .theme-toggle:hover { background: rgba(0,212,170,.1); }

/* ── No-flash theme init (applied before body renders) ─────── */
html.light-init body,
html.light-init {
  background: #f1f5f9 !important;
}

/* ── Smooth theme transition on all elements ────────────────── */
*, *::before, *::after {
  transition:
    background-color .25s ease,
    border-color     .25s ease,
    color            .2s  ease,
    box-shadow       .25s ease !important;
}
/* Exclude elements that should NOT have auto-transitions */
.spinner, .progress-fill, .pw-strength-fill,
canvas, .stat-card, .auth-card, .toast {
  transition: unset !important;
}
/* Toggle pill gets its own precise transitions */
.toggle-pill {
  transition: background .3s ease, border-color .3s ease !important;
}
.toggle-pill::after {
  transition: transform .3s cubic-bezier(.34,1.56,.64,1), background .3s ease !important;
}
.stat-card {
  transition: border-color .2s, transform .2s !important;
}
.auth-card {
  transition: none !important;
}

/* ── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 15px;
}
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--ff);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--card2); border-radius: 99px; }
a { color: inherit; text-decoration: none; }

/* ── Sidebar Nav ───────────────────────────────────────────── */
.sidebar {
  position: fixed;
  left: 0; top: 0; bottom: 0;
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: transform .3s;
}
.sidebar-logo {
  padding: 24px 22px 20px;
  border-bottom: 1px solid var(--border);
}
.logo-text {
  font-size: 1.35rem;
  font-weight: 900;
  letter-spacing: -0.8px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.1;
}
.logo-sub {
  font-size: .6rem;
  color: var(--muted);
  margin-top: 3px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.nav-section-label {
  font-size: .62rem;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 16px 22px 6px;
  font-weight: 600;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 18px;
  margin: 2px 10px;
  border-radius: var(--r);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 500;
  color: var(--muted2);
  transition: all .18s;
  border: 1px solid transparent;
  user-select: none;
}
.nav-item:hover { background: var(--card); color: var(--text); }
.nav-item.active {
  background: rgba(0,212,170,.08);
  color: var(--accent);
  border-color: rgba(0,212,170,.15);
}
.nav-item i { width: 18px; text-align: center; font-size: .9rem; }
.nav-badge {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  font-size: .62rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}
.sidebar-footer {
  margin-top: auto;
  padding: 16px 14px;
  border-top: 1px solid var(--border);
}
.sidebar-currency {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 8px 12px;
  width: 100%;
}
.sidebar-currency select {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--ff);
  font-size: .82rem;
  outline: none;
  cursor: pointer;
}
.sidebar-currency select option { background: var(--card2); }

/* ── Main Layout ───────────────────────────────────────────── */
.main {
  margin-left: 240px;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  min-height: 100vh;
}
.topbar {
  height: 62px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.page-title {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.3px;
  color: var(--text);
}
.topbar-right { display: flex; gap: 10px; align-items: center; }
.btn-add {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  background: linear-gradient(135deg, var(--accent), #00b894);
  color: #000;
  font-family: var(--ff);
  font-size: .82rem;
  font-weight: 700;
  border: none;
  border-radius: var(--r);
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  letter-spacing: .2px;
}
.btn-add:hover {
  opacity: .88;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,212,170,.3);
}
.content { padding: 28px; scroll-behavior: smooth; background: var(--bg); }

/* ── Pages ─────────────────────────────────────────────────── */
.page { display: none; animation: pageIn .3s ease; }
.page.active { display: block; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Stat Cards ────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 20px 22px;
  position: relative;
  overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.stat-card:hover { border-color: var(--border2); transform: translateY(-2px); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
}
.sc-green::before { background: linear-gradient(90deg, var(--income), #00b894); }
.sc-red::before   { background: linear-gradient(90deg, var(--expense), #ff8e53); }
.sc-blue::before  { background: linear-gradient(90deg, var(--accent2), #a78bfa); }
.sc-gold::before  { background: linear-gradient(90deg, var(--gold), #ff9f43); }
.stat-label {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  letter-spacing: .8px;
  text-transform: uppercase;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.stat-val {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -1px;
  line-height: 1;
  font-family: var(--ff);
  color: var(--text);
}
.stat-sub { font-size: .72rem; color: var(--muted); margin-top: 7px; }
.stat-icon {
  position: absolute;
  right: 18px; bottom: 16px;
  font-size: 2.2rem;
  opacity: .06;
}

/* ── Grid Layouts ──────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.g-left { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }

/* ── Cards ─────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 22px;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}
.card-title {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--muted);
}
.card-title-lg {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -.2px;
}

/* ── Forms ─────────────────────────────────────────────────── */
.form-group { margin-bottom: 15px; }
.form-label {
  display: block;
  font-size: .75rem;
  font-weight: 600;
  color: var(--muted2);
  margin-bottom: 6px;
  letter-spacing: .3px;
}
.form-control {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  color: var(--text);
  font-family: var(--ff);
  font-size: .88rem;
  padding: 10px 14px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0,212,170,.1);
}
.form-control::placeholder { color: var(--muted); }
select.form-control option { background: var(--card2); }
textarea.form-control { resize: vertical; min-height: 76px; }
.input-group { position: relative; }
.input-prefix {
  position: absolute;
  left: 13px; top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: .9rem;
  pointer-events: none;
  font-weight: 600;
}
.input-group .form-control { padding-left: 28px; }
.form-row  { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }

/* ── Type Toggle ───────────────────────────────────────────── */
.type-toggle {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 4px;
  margin-bottom: 18px;
  gap: 4px;
}
.type-btn {
  flex: 1;
  padding: 9px 12px;
  border-radius: calc(var(--r) - 2px);
  border: none;
  font-family: var(--ff);
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all .18s;
  background: transparent;
  color: var(--muted);
  letter-spacing: .3px;
}
.type-btn.exp.active  { background: var(--expense); color: #fff; box-shadow: 0 2px 12px rgba(255,107,107,.3); }
.type-btn.inc.active  { background: var(--income);  color: #000; box-shadow: 0 2px 12px rgba(0,212,170,.3); }
.type-btn:not(.active):hover { color: var(--text); background: var(--card2); }

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--r);
  font-family: var(--ff);
  font-size: .83rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .18s;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #000; }
.btn-primary:hover  { opacity: .88; transform: translateY(-1px); }
.btn-ghost { background: var(--card2); color: var(--text); border: 1px solid var(--border); }
.btn-ghost:hover    { background: var(--card); border-color: var(--border2); }
.btn-danger { background: rgba(255,107,107,.1); color: var(--expense); border: 1px solid rgba(255,107,107,.2); }
.btn-danger:hover   { background: rgba(255,107,107,.2); }
.btn-success { background: rgba(0,212,170,.1); color: var(--income); border: 1px solid rgba(0,212,170,.2); }
.btn-success:hover  { background: rgba(0,212,170,.2); }
.btn-icon { width: 34px; height: 34px; padding: 0; justify-content: center; border-radius: 10px; }
.btn-sm { padding: 6px 12px; font-size: .78rem; }

/* ── Badges / Tags ─────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .3px;
}
.badge-food          { background: rgba(255,209,102,.12); color: #ffd166; }
.badge-transport     { background: rgba(124,106,255,.12); color: #a78bfa; }
.badge-housing       { background: rgba(0,212,170,.12);   color: var(--accent); }
.badge-utilities     { background: rgba(45,212,191,.12);  color: #2dd4bf; }
.badge-health        { background: rgba(244,114,182,.12); color: #f472b6; }
.badge-entertainment { background: rgba(251,113,133,.12); color: #fb7185; }
.badge-education     { background: rgba(251,146,60,.12);  color: #fb923c; }
.badge-shopping      { background: rgba(52,211,153,.12);  color: #34d399; }
.badge-salary        { background: rgba(0,212,170,.12);   color: var(--income); }
.badge-freelance     { background: rgba(124,106,255,.12); color: var(--accent2); }
.badge-business      { background: rgba(45,212,191,.12);  color: #38d9a9; }
.badge-investment    { background: rgba(255,209,102,.12); color: var(--gold); }
.badge-gift          { background: rgba(244,114,182,.12); color: #f472b6; }
.badge-other         { background: rgba(100,116,139,.12); color: #94a3b8; }
.badge-income-type   { background: rgba(0,212,170,.1);    color: var(--income); }
.badge-expense-type  { background: rgba(255,107,107,.1);  color: var(--expense); }
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: .65rem;
  font-weight: 600;
  background: var(--card2);
  color: var(--muted2);
  border: 1px solid var(--border);
}

/* ── Table ─────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th {
  font-size: .67rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 700;
  padding: 10px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: .83rem;
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tbody tr:hover td { background: rgba(255,255,255,.02); }
.amount-col {
  font-family: var(--fm);
  font-weight: 600;
  font-size: .85rem;
}
.col-income  { color: var(--income); }
.col-expense { color: var(--expense); }

/* ── Filter Bar ────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 18px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--r2);
  padding: 16px 18px;
}
.filter-bar .form-group { margin-bottom: 0; }
.filter-bar .form-group.flex-grow { flex: 1; min-width: 180px; }

/* ── Empty State ───────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 56px 24px;
  color: var(--muted);
}
.empty-state .empty-icon {
  font-size: 3rem;
  margin-bottom: 14px;
  opacity: .25;
}
.empty-state h3 { font-size: .95rem; font-weight: 600; color: var(--muted2); margin-bottom: 6px; }
.empty-state p  { font-size: .8rem; }

/* ── Modal ─────────────────────────────────────────────────── */
.overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.overlay.open { display: flex; animation: fadeIn .2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: var(--r2);
  padding: 28px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: modalIn .22s ease;
  box-shadow: var(--shadow);
}
@keyframes modalIn {
  from { transform: scale(.95) translateY(10px); opacity: 0; }
  to   { transform: scale(1) translateY(0); opacity: 1; }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-size: 1.1rem; font-weight: 800; letter-spacing: -.3px; }
.modal-close {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--card2);
  border: 1px solid var(--border);
  color: var(--muted2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: all .18s;
}
.modal-close:hover { background: var(--expense); color: #fff; border-color: var(--expense); }
.modal-footer {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
}

/* ── Progress Bar ──────────────────────────────────────────── */
.progress {
  height: 6px;
  background: var(--bg);
  border-radius: 99px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  border-radius: 99px;
  transition: width .6s cubic-bezier(.4,0,.2,1);
}

/* ── Budget Items ──────────────────────────────────────────── */
.budget-row {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.budget-row:last-child { border-bottom: none; }
.budget-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 7px; }
.budget-name { font-size: .88rem; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.budget-pct  { font-size: .78rem; font-weight: 700; font-family: var(--fm); }
.budget-sub  { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); margin-top: 5px; }
.budget-alert {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,209,102,.06);
  border: 1px solid rgba(255,209,102,.2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: .75rem;
  color: var(--gold);
  margin-top: 8px;
}
.budget-over {
  background: rgba(255,107,107,.06);
  border-color: rgba(255,107,107,.2);
  color: var(--expense);
}

/* ── Goal Cards ────────────────────────────────────────────── */
.goal-card {
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 16px;
  margin-bottom: 12px;
  transition: border-color .2s;
}
.goal-card:hover { border-color: var(--border2); }
.goal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 6px; }
.goal-name { font-size: .9rem; font-weight: 700; }
.goal-target { font-size: .78rem; color: var(--muted); margin-bottom: 10px; }
.goal-pct-row { display: flex; justify-content: space-between; font-size: .72rem; margin-top: 6px; }

/* ── Recurring Items ───────────────────────────────────────── */
.rec-item {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.rec-item:last-child { border-bottom: none; }
.rec-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
  flex-shrink: 0;
}
.rec-info { flex: 1; }
.rec-name { font-size: .88rem; font-weight: 600; }
.rec-detail { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.rec-amount { font-family: var(--fm); font-weight: 700; font-size: .95rem; }
.freq-pill {
  font-size: .62rem; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
  background: var(--card2); color: var(--muted2);
  border: 1px solid var(--border);
  margin-left: 5px;
  text-transform: uppercase;
  letter-spacing: .5px;
}

/* ── Insight Cards ─────────────────────────────────────────── */
.insight {
  background: linear-gradient(135deg, rgba(0,212,170,.06), rgba(124,106,255,.04));
  border: 1px solid rgba(0,212,170,.12);
  border-radius: var(--r);
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.insight-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: rgba(0,212,170,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1rem;
  flex-shrink: 0;
}
.insight h4 { font-size: .85rem; font-weight: 700; margin-bottom: 3px; }
.insight p  { font-size: .75rem; color: var(--muted2); }

/* ── Chart Containers ──────────────────────────────────────── */
.chart-wrap { position: relative; }

/* ── Toast Notifications ───────────────────────────────────── */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  animation: toastSlide .3s cubic-bezier(.16,1,.3,1);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--r);
  font-size: .83rem;
  font-weight: 500;
  min-width: 240px;
  max-width: 340px;
  pointer-events: auto;
  animation: toastIn .3s ease;
  box-shadow: var(--shadow);
  border: 1px solid transparent;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}
.toast.success { background: #052e22; border-color: rgba(0,212,170,.3); color: #6ee7b7; }
.toast.error   { background: #2d0f0f; border-color: rgba(255,107,107,.3); color: #fca5a5; }
.toast.info    { background: #1e1b40; border-color: rgba(124,106,255,.3); color: #c4b5fd; }
.toast i { font-size: .95rem; }

/* ── Settings ──────────────────────────────────────────────── */
.setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: none; }
.setting-info h4 { font-size: .88rem; font-weight: 600; }
.setting-info p  { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.toggle-switch { position: relative; width: 42px; height: 23px; }
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: var(--card2);
  border: 1px solid var(--border);
  border-radius: 99px;
  transition: .25s;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 17px; height: 17px;
  left: 2px; bottom: 2px;
  background: var(--muted);
  border-radius: 50%;
  transition: .25s;
}
input:checked + .toggle-slider { background: var(--accent); border-color: var(--accent); }
input:checked + .toggle-slider::before { transform: translateX(19px); background: #000; }

/* ── Analytics ─────────────────────────────────────────────── */
.analytics-stat {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.analytics-stat:last-child { border-bottom: none; }
.analytics-stat .label { font-size: .8rem; color: var(--muted2); }
.analytics-stat .value { font-family: var(--fm); font-size: .85rem; font-weight: 700; }

/* ── Legend ────────────────────────────────────────────────── */
.legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: .8rem;
}
.legend-item:last-child { border-bottom: none; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }
.legend-bar-wrap { flex: 1; }
.legend-bar { height: 4px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.legend-fill { height: 100%; border-radius: 99px; }
.legend-pct { font-size: .7rem; color: var(--muted); min-width: 32px; text-align: right; }
.legend-amt { font-family: var(--fm); font-size: .78rem; font-weight: 600; min-width: 80px; text-align: right; }

/* ── Mobile Menu Toggle ────────────────────────────────────── */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 14px; left: 14px;
  z-index: 150;
  width: 38px; height: 38px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--text);
}

/* ── Transactions Page ─────────────────────────────────────── */
.transactions-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ── Category Dots ─────────────────────────────────────────── */
.cat-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}

/* ── Divider ───────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 18px 0; }

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 1200px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main { margin-left: 0; }
  .mobile-toggle { display: flex; }
  .g-left { grid-template-columns: 1fr; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .topbar { padding: 0 14px 0 60px; }
}
@media (max-width: 640px) {
  .stats-grid { grid-template-columns: 1fr; }
  .form-row, .form-row3 { grid-template-columns: 1fr; }
  .content { padding: 16px; }
}
/* ============================================================
   NESTFY ADVANCED FEATURES — Additional Styles
   ============================================================ */

/* ── Mobile Bottom Navigation ─────────────────────────────── */
.bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--card);
  border-top: 1px solid var(--border2);
  z-index: 1000;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-nav-items {
  display: flex; height: 64px; align-items: stretch;
}
.bottom-nav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-family: var(--ff);
  font-size: .58rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
  transition: color .18s;
  padding: 6px 4px;
  position: relative;
}
.bottom-nav-item i { font-size: 1.1rem; transition: transform .2s; }
.bottom-nav-item.active { color: var(--accent); }
.bottom-nav-item.active i { transform: translateY(-2px); }
.bottom-nav-item.active::before {
  content: '';
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 32px; height: 3px; border-radius: 0 0 4px 4px;
  background: var(--accent);
}
.bottom-nav-add {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 1.3rem; box-shadow: 0 4px 16px rgba(0,212,170,.4);
  margin-bottom: 2px; transition: transform .2s, box-shadow .2s;
}
.bottom-nav-item:active .bottom-nav-add {
  transform: scale(.92);
  box-shadow: 0 2px 8px rgba(0,212,170,.3);
}

body.light .bottom-nav { background: #ffffff; border-top-color: rgba(0,0,0,.1); }

/* ── Mobile layout (≤768px) — unified block ─────────────────
   All mobile overrides are here. The two other @media(max-width:768px)
   blocks later in the file are intentional no-ops kept for reference. */
@media (max-width: 768px) {
  /* Sidebar hidden by default, shown as overlay when .open */
  .sidebar {
    display: none;
    position: fixed; top: 0; left: 0; bottom: 0;
    width: 260px; z-index: 1000;
    box-shadow: 4px 0 24px rgba(0,0,0,.5);
  }
  .sidebar.open { display: flex; }

  /* Mobile toggle button visible */
  .mobile-toggle { display: flex !important; }

  /* Main content fills full width */
  .main { margin-left: 0; padding-bottom: calc(74px + env(safe-area-inset-bottom)); }

  /* Topbar indent for toggle button */
  .topbar { padding: 0 12px 0 56px; }

  /* Bottom nav visible */
  #bottom-nav { display: flex; }

  /* Single-column grids */
  .g-left { grid-template-columns: 1fr; }
  .g2, .g3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row, .form-row3 { grid-template-columns: 1fr; }
  .content { padding: 16px 14px; }

  /* Greeting row: stack on mobile */
  .greeting-row { flex-direction: column; align-items: flex-start; }

  /* Hide less important topbar elements */
  .topbar-search span, .topbar-search .shortcut-hint { display: none; }
  .topbar-search { padding: 7px 12px; }
}

/* ── Command Palette ──────────────────────────────────────── */
#cmd-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px;
}
#cmd-overlay.open { display: flex; animation: cmdFadeIn .15s ease; }
@keyframes cmdFadeIn { from { opacity: 0; } to { opacity: 1; } }

.cmd-box {
  width: 100%; max-width: 580px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  box-shadow: 0 32px 80px rgba(0,0,0,.8);
  overflow: hidden;
  animation: cmdSlide .2s cubic-bezier(.16,1,.3,1);
  margin: 0 16px;
}
@keyframes cmdSlide { from { transform: translateY(-20px) scale(.97); } to { transform: none; } }

.cmd-input-wrap {
  display: flex; align-items: center; gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}
.cmd-input-wrap i { color: var(--muted); font-size: 1rem; }
#cmd-input {
  flex: 1; background: none; border: none; outline: none;
  font-family: var(--ff); font-size: 1rem; color: var(--text);
}
#cmd-input::placeholder { color: var(--muted); }
.cmd-kbd {
  font-size: .68rem; color: var(--muted); background: var(--card2);
  border: 1px solid var(--border2); border-radius: 6px;
  padding: 3px 7px; font-family: var(--fm);
}
.cmd-results { max-height: 360px; overflow-y: auto; padding: 8px; }
.cmd-section-label {
  font-size: .65rem; font-weight: 700; color: var(--muted);
  text-transform: uppercase; letter-spacing: 1px;
  padding: 8px 12px 4px;
}
.cmd-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  transition: background .15s; color: var(--text);
}
.cmd-item:hover, .cmd-item.selected {
  background: var(--card2);
}
.cmd-item-icon {
  width: 32px; height: 32px; border-radius: 9px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: .85rem;
}
.cmd-item-text { flex: 1; }
.cmd-item-title { font-size: .88rem; font-weight: 600; }
.cmd-item-sub   { font-size: .72rem; color: var(--muted); margin-top: 1px; }
.cmd-item-badge {
  font-size: .65rem; padding: 2px 8px; border-radius: 99px;
  background: var(--card2); color: var(--muted); font-weight: 600;
}
.cmd-empty {
  text-align: center; padding: 32px;
  color: var(--muted); font-size: .88rem;
}
.cmd-footer {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 16px; border-top: 1px solid var(--border);
  font-size: .68rem; color: var(--muted);
}
.cmd-footer-hint { display: flex; align-items: center; gap: 5px; }

body.light .cmd-box { background: #ffffff; border-color: rgba(0,0,0,.12); }
body.light #cmd-input { color: #0f172a; }
body.light .cmd-item:hover, body.light .cmd-item.selected { background: #f1f5f9; }

/* ── Onboarding Modal ─────────────────────────────────────── */
#onboarding-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.85);
  backdrop-filter: blur(12px);
  z-index: 99998;
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
#onboarding-overlay.open { display: flex; }

.onboarding-card {
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 28px;
  width: 100%; max-width: 480px;
  padding: 40px;
  box-shadow: 0 32px 80px rgba(0,0,0,.8);
  animation: authIn .4s cubic-bezier(.16,1,.3,1);
  position: relative; overflow: hidden;
}
.onboarding-card::before {
  content: '';
  position: absolute; inset: 0; opacity: .04;
  background: radial-gradient(circle at 80% 20%, var(--accent2), transparent 60%),
              radial-gradient(circle at 20% 80%, var(--accent), transparent 60%);
  pointer-events: none;
}
.onboarding-steps {
  display: flex; gap: 6px; margin-bottom: 32px;
}
.onboarding-step-dot {
  height: 4px; border-radius: 99px;
  background: var(--border2); flex: 1;
  transition: background .3s, flex .3s;
}
.onboarding-step-dot.active { background: var(--accent); flex: 2; }
.onboarding-step-dot.done   { background: var(--accent); opacity: .4; }

.onboarding-icon {
  width: 72px; height: 72px; border-radius: 22px; margin-bottom: 24px;
  background: linear-gradient(135deg, rgba(0,212,170,.15), rgba(124,106,255,.15));
  border: 1px solid rgba(0,212,170,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem;
}
.onboarding-title { font-size: 1.4rem; font-weight: 900; letter-spacing: -.4px; margin-bottom: 8px; }
.onboarding-desc  { font-size: .88rem; color: var(--muted2); line-height: 1.6; margin-bottom: 28px; }

.onboarding-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.btn-onboard-skip {
  background: none; border: none; color: var(--muted);
  font-family: var(--ff); font-size: .82rem; cursor: pointer;
  padding: 10px; transition: color .18s;
}
.btn-onboard-skip:hover { color: var(--muted2); }
.btn-onboard-next {
  flex: 1; padding: 12px 24px;
  background: linear-gradient(135deg, var(--accent), #00b894);
  color: #000; font-family: var(--ff); font-size: .9rem; font-weight: 800;
  border: none; border-radius: 12px; cursor: pointer;
  transition: all .2s;
}
.btn-onboard-next:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(0,212,170,.35); }

body.light .onboarding-card { background: #ffffff; }

/* ── AI Insights Panel ────────────────────────────────────── */
.ai-insights-card {
  background: linear-gradient(135deg, rgba(124,106,255,.08), rgba(0,212,170,.05));
  border: 1px solid rgba(124,106,255,.2);
  border-radius: var(--r2);
  padding: 20px;
  margin-bottom: 20px;
  position: relative; overflow: hidden;
}
.ai-insights-card::before {
  content: '';
  position: absolute; top: -40px; right: -40px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(124,106,255,.15), transparent 70%);
  pointer-events: none;
}
.ai-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 14px;
}
.ai-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff; font-size: .7rem; font-weight: 800;
  padding: 3px 10px; border-radius: 99px; letter-spacing: .5px;
}
.ai-title { font-size: .95rem; font-weight: 700; flex: 1; }
.ai-refresh {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: .8rem; padding: 4px;
  transition: all .2s; border-radius: 6px;
}
.ai-refresh:hover { color: var(--accent); transform: rotate(180deg); }
.ai-insights-list { display: flex; flex-direction: column; gap: 10px; }
.ai-insight-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--card); border-radius: 12px;
  border: 1px solid var(--border);
  font-size: .82rem; color: var(--muted2); line-height: 1.5;
}
.ai-insight-item i { color: var(--accent2); flex-shrink: 0; margin-top: 2px; }
.ai-loading {
  display: flex; align-items: center; gap: 10px;
  color: var(--muted); font-size: .82rem; padding: 8px 0;
}
.ai-dots span {
  display: inline-block; width: 6px; height: 6px;
  border-radius: 50%; background: var(--accent2);
  animation: aiDot 1.2s infinite;
}
.ai-dots span:nth-child(2) { animation-delay: .2s; }
.ai-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes aiDot { 0%,80%,100%{transform:scale(0.6);opacity:.4} 40%{transform:scale(1);opacity:1} }

body.light .ai-insights-card { background: linear-gradient(135deg, rgba(124,106,255,.06), rgba(0,212,170,.04)); }
body.light .ai-insight-item  { background: #ffffff; border-color: rgba(0,0,0,.08); }

/* ── Notification Center ──────────────────────────────────── */
.notif-btn {
  position: relative;
  background: none; border: none; color: var(--muted2);
  font-size: 1rem; cursor: pointer; padding: 8px;
  border-radius: var(--r); transition: all .18s;
}
.notif-btn:hover { background: var(--card); color: var(--text); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--expense);
  border: 2px solid var(--bg2);
  display: none;
}
.notif-dot.show { display: block; }

#notif-panel {
  position: fixed; top: 60px; right: 16px;
  width: 340px; max-height: 480px;
  background: var(--card);
  border: 1px solid var(--border2);
  border-radius: 20px;
  box-shadow: 0 16px 48px rgba(0,0,0,.6);
  z-index: 5000;
  display: none; flex-direction: column;
  overflow: hidden;
  animation: notifIn .2s cubic-bezier(.16,1,.3,1);
}
#notif-panel.open { display: flex; }
@keyframes notifIn { from { opacity:0; transform: translateY(-8px) scale(.97); } to { opacity:1; transform:none; } }

.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--border);
}
.notif-header-title { font-size: .9rem; font-weight: 800; }
.notif-clear {
  font-size: .72rem; color: var(--accent); background: none;
  border: none; cursor: pointer; font-family: var(--ff); font-weight: 600;
}
.notif-list { overflow-y: auto; flex: 1; }
.notif-item {
  display: flex; gap: 12px; padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background .15s; cursor: pointer;
}
.notif-item:hover { background: var(--card2); }
.notif-item.unread { background: rgba(0,212,170,.03); }
.notif-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .9rem;
}
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: .82rem; font-weight: 700; margin-bottom: 2px; }
.notif-msg   { font-size: .75rem; color: var(--muted2); line-height: 1.4; }
.notif-time  { font-size: .65rem; color: var(--muted); margin-top: 3px; }
.notif-empty { text-align: center; padding: 32px; color: var(--muted); font-size: .85rem; }

body.light #notif-panel { background: #ffffff; box-shadow: 0 16px 48px rgba(0,0,0,.15); }
body.light .notif-item:hover { background: #f8fafc; }
body.light .notif-item.unread { background: rgba(0,212,170,.04); }

/* ── Bill Reminders ───────────────────────────────────────── */
.bill-reminder-card {
  background: rgba(255,193,7,.04);
  border: 1px solid rgba(255,193,7,.2);
  border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 12px; cursor: pointer;
  transition: all .18s;
}
.bill-reminder-card:hover { background: rgba(255,193,7,.08); border-color: rgba(255,193,7,.35); transform: translateX(3px); }
.bill-reminder-card.overdue { background: rgba(255,107,107,.04); border-color: rgba(255,107,107,.2); }
.bill-reminder-card.overdue:hover { background: rgba(255,107,107,.08); }
.bill-icon {
  width: 40px; height: 40px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,193,7,.12); color: var(--gold); font-size: .95rem;
}
.bill-icon.overdue { background: rgba(255,107,107,.12); color: var(--expense); }
.bill-info { flex: 1; min-width: 0; }
.bill-name   { font-size: .85rem; font-weight: 700; }
.bill-detail { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.bill-amount { font-family: var(--fm); font-weight: 700; font-size: .88rem; color: var(--gold); }
.bill-amount.overdue { color: var(--expense); }

/* ── Page transition animation ────────────────────────────── */
.page { animation: none; }
.page.page-enter {
  animation: pageEnter .25s cubic-bezier(.16,1,.3,1);
}
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Keyboard shortcut hints ──────────────────────────────── */
.shortcut-hint {
  display: inline-flex; gap: 3px; align-items: center;
  font-size: .65rem; color: var(--muted);
}
.shortcut-hint kbd {
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 5px; padding: 1px 5px;
  font-family: var(--fm); font-size: .65rem;
}

/* ── Topbar upgrade ───────────────────────────────────────── */
.topbar-right {
  display: flex; align-items: center; gap: 8px;
}

/* ── Search bar in topbar ─────────────────────────────────── */
.topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 12px;
  cursor: pointer; transition: all .18s;
  color: var(--muted); font-size: .82rem;
}
.topbar-search:hover { border-color: var(--border2); color: var(--muted2); }
@media (max-width: 600px) { .topbar-search span { display: none; } }

body.light .topbar-search { background: var(--bg2); border-color: var(--border2); }

/* ── Stat card upgrade — sparkline area ───────────────────── */
.stat-trend {
  display: flex; align-items: center; gap: 5px;
  font-size: .72rem; margin-top: 6px;
}
.stat-trend.up   { color: var(--income); }
.stat-trend.down { color: var(--expense); }
.stat-trend.flat { color: var(--muted); }

/* ── Financial health score ───────────────────────────────── */
.health-score-card {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: var(--r2); padding: 20px;
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 20px;
}
.health-score-ring {
  position: relative; width: 80px; height: 80px; flex-shrink: 0;
}
.health-score-ring svg { transform: rotate(-90deg); }
.health-score-ring circle {
  fill: none; stroke-width: 6;
  transition: stroke-dashoffset .6s cubic-bezier(.34,1.56,.64,1);
}
.health-score-ring .track  { stroke: var(--card2); }
.health-score-ring .fill   { stroke: var(--accent); stroke-linecap: round; }
.health-score-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; font-weight: 900; font-family: var(--fm);
}
.health-score-info { flex: 1; }
.health-score-title { font-size: .88rem; font-weight: 800; margin-bottom: 4px; }
.health-score-desc  { font-size: .78rem; color: var(--muted2); line-height: 1.5; }
.health-score-label {
  font-size: .7rem; font-weight: 700; padding: 2px 8px;
  border-radius: 99px; margin-bottom: 6px; display: inline-block;
}

body.light .health-score-card { background: #ffffff; }

/* ════════════════════════════════════════════════════════════
   ADVANCED FEATURES CSS
   ════════════════════════════════════════════════════════════ */

/* ── Bottom Navigation ── */
#bottom-nav {
  display: none;
  position: fixed; bottom: 0; left: 0; right: 0;
  height: 64px;
  background: var(--card);
  border-top: 1px solid var(--border2);
  z-index: 1000;
  padding: 0 8px;
  padding-bottom: env(safe-area-inset-bottom);
  align-items: center;
  justify-content: space-around;
  box-shadow: 0 -4px 24px rgba(0,0,0,.3);
}
/* ── Mobile overrides (see unified block above) ─────────────── */
@media (max-width: 768px) {
  #bottom-nav { display: flex; }
}
.bottom-nav-btn {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: none; border: none; color: var(--muted);
  font-family: var(--ff); font-size: .6rem; font-weight: 600;
  cursor: pointer; padding: 6px 12px; border-radius: 12px;
  transition: all .2s; flex: 1; text-transform: uppercase; letter-spacing: .3px;
}
.bottom-nav-btn i { font-size: 1.1rem; }
.bottom-nav-btn.active { color: var(--accent); }
.bottom-nav-btn.active i { transform: scale(1.15); }
.bottom-nav-add { flex: 0 0 auto !important; }
.bottom-nav-add-btn {
  width: 48px; height: 48px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 1.2rem;
  box-shadow: 0 4px 16px rgba(0,212,170,.4);
  transition: transform .2s, box-shadow .2s;
  margin-bottom: -8px;
}
.bottom-nav-add:active .bottom-nav-add-btn {
  transform: scale(.93);
  box-shadow: 0 2px 8px rgba(0,212,170,.3);
}
body.light #bottom-nav {
  background: #ffffff;
  border-top-color: rgba(0,0,0,.1);
  box-shadow: 0 -4px 24px rgba(0,0,0,.08);
}

/* ── Wallet Bar ── */
.wallet-bar {
  display: flex; gap: 10px; overflow-x: auto;
  padding-bottom: 6px; scrollbar-width: none;
}
.wallet-bar::-webkit-scrollbar { display: none; }
.wallet-card {
  display: flex; align-items: center; gap: 10px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 10px 14px;
  cursor: pointer; transition: all .2s; flex-shrink: 0;
  min-width: 140px;
}
.wallet-card:hover { border-color: var(--border2); transform: translateY(-1px); }
.wallet-card.active {
  border-color: var(--accent);
  background: rgba(0,212,170,.06);
  box-shadow: 0 0 0 1px var(--accent);
}
.wallet-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: .9rem; flex-shrink: 0;
}
.wallet-info { min-width: 0; }
.wallet-name { font-size: .75rem; font-weight: 600; color: var(--muted2); white-space: nowrap; }
.wallet-bal  { font-size: .85rem; font-weight: 800; font-family: var(--fm); white-space: nowrap; }
.wallet-add  { border-style: dashed !important; min-width: 100px; justify-content: center; }
body.light .wallet-card { background: #ffffff; border-color: rgba(0,0,0,.08); }
body.light .wallet-card.active { background: rgba(0,212,170,.06); }

/* ── AI Insights ── */
.ai-insight-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.ai-insight-card:last-child { border-bottom: none; padding-bottom: 0; }
.ai-insight-emoji { font-size: 1.4rem; flex-shrink: 0; line-height: 1; margin-top: 2px; }
.ai-insight-title { font-size: .85rem; font-weight: 700; margin-bottom: 3px; }
.ai-insight-text  { font-size: .78rem; color: var(--muted2); line-height: 1.5; }

/* ── Bill Reminders ── */
.bill-reminder {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 14px; border-radius: 12px; margin-bottom: 8px;
  animation: slideDown .3s ease;
}
@keyframes slideDown { from { opacity:0; transform:translateY(-10px); } to { opacity:1; transform:translateY(0); } }
.bill-reminder.overdue  { background: rgba(255,107,107,.08); border: 1px solid rgba(255,107,107,.2); }
.bill-reminder.due-soon { background: rgba(255,209,102,.08); border: 1px solid rgba(255,209,102,.2); }
.bill-reminder-icon {
  width: 32px; height: 32px; border-radius: 8px;
  background: rgba(255,107,107,.12); color: var(--expense);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.bill-reminder.due-soon .bill-reminder-icon { background: rgba(255,209,102,.12); color: var(--gold); }
.bill-reminder-info { flex: 1; }
.bill-reminder-info strong { font-size: .83rem; color: var(--text); }
.bill-reminder-info div   { font-size: .73rem; margin-top: 2px; }
.bill-reminder-dismiss {
  background: none; border: none; color: var(--muted); cursor: pointer;
  padding: 4px; border-radius: 6px; flex-shrink: 0;
}
.bill-reminder-dismiss:hover { color: var(--text); }

/* ── Heatmap ── */
.heatmap-grid {
  min-width: 620px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.heatmap-months {
  display: flex;
  padding-left: 32px;
  gap: 0;
  color: var(--muted);
  font-size: .65rem;
  margin-bottom: 2px;
  min-height: 16px;
}
.heatmap-months span { flex: 1; }
.heatmap-body {
  display: flex;
  gap: 6px;
}
.heatmap-days {
  display: flex;
  flex-direction: column;
  gap: 3px;
  color: var(--muted);
  font-size: .6rem;
  width: 28px;
  flex-shrink: 0;
}
.heatmap-days span {
  height: 13px;
  line-height: 13px;
  text-align: right;
  padding-right: 4px;
}
.heatmap-cells { display: flex; gap: 3px; }
.heatmap-week  { display: flex; flex-direction: column; gap: 3px; }
.heatmap-cell  {
  width: 13px; height: 13px; border-radius: 3px;
  cursor: pointer; transition: transform .1s, opacity .1s;
  flex-shrink: 0;
}
.heatmap-cell:hover { transform: scale(1.4); z-index: 1; position: relative; }
.heatmap-0 { background: var(--card2); }
.heatmap-1 { background: rgba(0,212,170,.25); }
.heatmap-2 { background: rgba(0,212,170,.5); }
.heatmap-3 { background: rgba(0,212,170,.75); }
.heatmap-4 { background: #00d4aa; }
.heatmap-future { background: transparent; cursor: default; }
.heatmap-today  { outline: 2px solid var(--accent2); outline-offset: 1px; }
.heatmap-legend {
  display: flex; align-items: center; gap: 4px;
  margin-top: 10px; justify-content: flex-end;
}
.heatmap-days {
  display: flex; flex-direction: column; gap: 3px;
  font-size: .6rem; color: var(--muted); margin-right: 4px;
  padding-top: 20px; /* space for month labels */
}
.heatmap-days span { height: 13px; display: flex; align-items: center; }
.heatmap-months {
  display: flex; font-size: .65rem; color: var(--muted);
  margin-bottom: 4px; margin-left: 0; gap: 0;
  padding-left: 0;
}
.heatmap-months span { flex: 1; }
body.light .heatmap-0 { background: #e2e8f0; }

/* ── Keyboard Shortcuts Panel ── */
#shortcuts-panel {
  position: fixed; top: 50%; left: 50%; transform: translate(-50%,-60%);
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 20px; padding: 24px; width: 340px; max-width: 90vw;
  z-index: 10001; opacity: 0; pointer-events: none;
  transition: all .25s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 24px 64px rgba(0,0,0,.5);
}
#shortcuts-panel.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%,-50%);
}
#shortcuts-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,.4);
  z-index: 10000; display: none;
}
#shortcuts-overlay.open { display: block; }
/* Simpler approach - use JS to toggle overlay */
.shortcuts-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.shortcuts-header h3 {
  font-size: 1rem; font-weight: 800; display: flex; align-items: center; gap: 8px;
}
.shortcuts-header button {
  background: none; border: none; color: var(--muted); cursor: pointer;
  font-size: 1rem; padding: 4px;
}
.shortcuts-grid { display: flex; flex-direction: column; gap: 10px; }
.shortcut-item {
  display: flex; align-items: center; gap: 10px;
  font-size: .85rem; color: var(--muted2);
}
.shortcut-item span { margin-left: auto; }
kbd {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 6px; padding: 2px 7px; font-family: var(--fm);
  font-size: .72rem; color: var(--text); box-shadow: 0 2px 0 var(--border2);
}
body.light #shortcuts-panel { background: #ffffff; border-color: rgba(0,0,0,.1); box-shadow: 0 24px 64px rgba(0,0,0,.12); }
body.light kbd { background: #f1f5f9; border-color: rgba(0,0,0,.12); box-shadow: 0 2px 0 rgba(0,0,0,.08); }
@media (min-width: 769px) {
  #shortcuts-btn { display: inline-flex !important; }
}

/* ════════════════════════════════════════════════════════════
   ADVANCED FEATURES CSS
   ════════════════════════════════════════════════════════════ */

/* ── Bottom Nav (Mobile) ────────────────────────────────────── */
/* bottom nav uses #bottom-nav below */
.bottom-nav-btn.active { color: var(--accent); }
.bottom-nav-btn i { font-size: 1.1rem; }
.bottom-nav-btn span { font-size: .6rem; font-weight: 600; }
.bottom-nav-add-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  color: #000; font-size: 1.1rem;
  box-shadow: 0 4px 16px rgba(0,212,170,.4);
  margin-top: -10px;
}
/* ── Mobile sidebar overlay behavior (see unified block above) ── */
@media (max-width: 768px) {
  .mobile-toggle { display: flex; }
}

/* ── AI Insights ─────────────────────────────────────────────── */
#ai-insights-card { border-color: rgba(124,106,255,.2); }
.ai-insight-card {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.ai-insight-card:last-child { border-bottom: none; padding-bottom: 0; }
.ai-insight-emoji { font-size: 1.4rem; flex-shrink: 0; margin-top: 2px; }
.ai-insight-title { font-size: .85rem; font-weight: 700; margin-bottom: 3px; }
.ai-insight-text  { font-size: .78rem; color: var(--muted); line-height: 1.5; }

/* ── Bill Reminders ──────────────────────────────────────────── */
.bill-reminder {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-radius: 14px; margin-bottom: 8px;
  background: rgba(255,193,7,.06); border: 1px solid rgba(255,193,7,.2);
  animation: slideIn .3s ease;
}
.bill-reminder.overdue {
  background: rgba(255,107,107,.06); border-color: rgba(255,107,107,.2);
}
@keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.bill-reminder-icon {
  width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: rgba(255,193,7,.12); color: #f59e0b;
  display: flex; align-items: center; justify-content: center;
}
.bill-reminder.overdue .bill-reminder-icon { background: rgba(255,107,107,.12); color: var(--expense); }
.bill-reminder-info { flex: 1; min-width: 0; }
.bill-reminder-info strong { font-size: .85rem; display: block; }
.bill-reminder-info div   { font-size: .75rem; margin-top: 2px; }
.bill-reminder-dismiss {
  background: none; border: none; color: var(--muted);
  cursor: pointer; padding: 4px; font-size: .8rem;
  border-radius: 6px; flex-shrink: 0; transition: color .18s;
}
.bill-reminder-dismiss:hover { color: var(--expense); }

/* ── Heatmap ─────────────────────────────────────────────────── */
.heatmap-grid { font-size: .7rem; }
.heatmap-cells { display: flex; gap: 3px; }
.heatmap-week  { display: flex; flex-direction: column; gap: 3px; }
.heatmap-cell  {
  width: 13px; height: 13px; border-radius: 3px;
  background: var(--card2); cursor: pointer;
  transition: transform .1s;
}
.heatmap-cell:hover { transform: scale(1.3); z-index: 1; }
.heatmap-0 { background: var(--card2); }
.heatmap-1 { background: rgba(0,212,170,.25); }
.heatmap-2 { background: rgba(0,212,170,.5); }
.heatmap-3 { background: rgba(0,212,170,.75); }
.heatmap-4 { background: #00d4aa; }
.heatmap-future { background: transparent; cursor: default; }
.heatmap-today  { outline: 2px solid var(--accent); outline-offset: 1px; }
.heatmap-legend {
  display: flex; align-items: center; gap: 4px;
  margin-top: 10px; justify-content: flex-end;
}
.heatmap-months {
  display: flex; gap: 0;
  margin-bottom: 4px; color: var(--muted);
  font-size: .65rem; padding-left: 28px;
}
.heatmap-months span { flex: 1; }
.heatmap-days {
  display: flex; flex-direction: column;
  gap: 3px; margin-right: 4px;
  color: var(--muted); font-size: .6rem;
}
.heatmap-days span { height: 13px; line-height: 13px; }

/* ── Financial Health Score ──────────────────────────────────── */
.health-score-card {
  background: linear-gradient(135deg, var(--card), var(--card2));
  border: 1px solid var(--border2);
  border-radius: var(--r2); padding: 20px 24px;
  display: flex; align-items: center; gap: 20px;
  margin-bottom: 20px; overflow: hidden; position: relative;
}
.health-score-card::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,212,170,.04), rgba(124,106,255,.04));
  pointer-events: none;
}
.health-score-ring {
  position: relative; width: 72px; height: 72px; flex-shrink: 0;
}
.health-score-ring svg { transform: rotate(-90deg); }
.health-score-ring circle {
  fill: none; stroke-width: 6;
  stroke-linecap: round; transition: stroke-dashoffset .8s ease;
}
.health-score-num {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 900; font-family: var(--fm);
}
.health-score-info { flex: 1; }
.health-score-label { font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .8px; margin-bottom: 4px; }
.health-score-title { font-size: 1.1rem; font-weight: 800; margin-bottom: 6px; }
.health-score-bars { display: flex; flex-direction: column; gap: 5px; }
.health-bar-row { display: flex; align-items: center; gap: 8px; font-size: .7rem; }
.health-bar-label { width: 90px; color: var(--muted); flex-shrink: 0; }
.health-bar-track { flex: 1; height: 5px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.health-bar-fill  { height: 100%; border-radius: 99px; transition: width .8s ease; }
.health-bar-val   { width: 30px; text-align: right; font-family: var(--fm); font-size: .68rem; color: var(--muted2); }

/* ── Shortcuts Panel ─────────────────────────────────────────── */
#shortcuts-panel {
  position: fixed; top: 50%; left: 50%;
  transform: translate(-50%, -50%) scale(.95);
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 20px; padding: 24px; width: 90%; max-width: 480px;
  z-index: 9999; opacity: 0; pointer-events: none;
  transition: all .2s cubic-bezier(.16,1,.3,1);
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
}
#shortcuts-panel.open {
  opacity: 1; pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}
.shortcuts-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.shortcuts-header h3 { font-size: 1rem; font-weight: 800; }
.shortcuts-close {
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: 1rem; padding: 4px;
  border-radius: 8px; transition: color .18s;
}
.shortcuts-close:hover { color: var(--text); }
.shortcuts-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
}
.shortcut-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; background: var(--card2);
  border-radius: 10px; font-size: .78rem; color: var(--muted2);
}
kbd {
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 6px; padding: 2px 7px;
  font-family: var(--fm); font-size: .72rem;
  color: var(--accent); font-weight: 700; flex-shrink: 0;
}

/* ── Quick Stats Row ─────────────────────────────────────────── */
.quick-stats {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-bottom: 20px;
}
.quick-stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px;
  text-align: center; transition: all .2s;
}
.quick-stat:hover { border-color: var(--border2); transform: translateY(-2px); }
.quick-stat-val  { font-size: 1.1rem; font-weight: 900; font-family: var(--fm); }
.quick-stat-label{ font-size: .65rem; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .5px; }

/* ── Search Command Bar ──────────────────────────────────────── */
#search-bar {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,.6); z-index: 9999;
  display: none; align-items: flex-start; justify-content: center;
  padding-top: 80px; backdrop-filter: blur(4px);
}
#search-bar.open { display: flex; }
.search-box {
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 16px; width: 90%; max-width: 560px;
  box-shadow: 0 24px 64px rgba(0,0,0,.6); overflow: hidden;
}
.search-input-wrap {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.search-input-wrap i { color: var(--muted); font-size: .9rem; }
#global-search-input {
  flex: 1; background: none; border: none; outline: none;
  color: var(--text); font-family: var(--ff); font-size: 1rem;
}
#global-search-input::placeholder { color: var(--muted); }
.search-results { max-height: 360px; overflow-y: auto; }
.search-result-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px; cursor: pointer; transition: background .15s;
}
.search-result-item:hover { background: var(--card2); }
.search-result-icon {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .82rem;
}
.search-result-main { flex: 1; min-width: 0; }
.search-result-title { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.search-result-sub   { font-size: .7rem; color: var(--muted); margin-top: 1px; }
.search-result-amt   { font-family: var(--fm); font-size: .82rem; font-weight: 700; flex-shrink: 0; }
.search-empty { padding: 24px; text-align: center; color: var(--muted); font-size: .85rem; }
.search-hint  { padding: 8px 16px; font-size: .68rem; color: var(--muted); border-top: 1px solid var(--border); display: flex; justify-content: space-between; }

/* ── Notification Bell ───────────────────────────────────────── */
.notif-btn {
  position: relative; background: none; border: none;
  color: var(--muted2); cursor: pointer; font-size: 1rem;
  padding: 8px; border-radius: 10px; transition: all .18s;
}
.notif-btn:hover { background: var(--card); color: var(--text); }
.notif-dot {
  position: absolute; top: 6px; right: 6px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--expense); border: 2px solid var(--bg2);
  display: none;
}
.notif-dot.show { display: block; }

/* ── Topbar search btn ───────────────────────────────────────── */
.topbar-search-btn {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 10px; padding: 7px 12px;
  display: flex; align-items: center; gap: 8px;
  color: var(--muted); cursor: pointer; font-size: .82rem;
  font-family: var(--ff); transition: all .18s; min-width: 160px;
}
.topbar-search-btn:hover { border-color: var(--border2); color: var(--muted2); }
.topbar-search-btn kbd { background: var(--bg); border: 1px solid var(--border2); border-radius: 4px; padding: 1px 5px; font-size: .68rem; }
@media (max-width: 600px) { .topbar-search-btn { min-width: auto; } .topbar-search-btn span { display: none; } }

/* ── Streak Banner ───────────────────────────────────────────── */
.streak-banner {
  background: linear-gradient(135deg, rgba(0,212,170,.08), rgba(124,106,255,.08));
  border: 1px solid rgba(0,212,170,.15); border-radius: 14px;
  padding: 12px 16px; margin-bottom: 20px;
  display: flex; align-items: center; gap: 12px;
}
.streak-fire { font-size: 1.6rem; }
.streak-info h4 { font-size: .88rem; font-weight: 800; }
.streak-info p  { font-size: .72rem; color: var(--muted); margin-top: 2px; }
.streak-count {
  margin-left: auto; font-size: 1.6rem; font-weight: 900;
  font-family: var(--fm); color: var(--accent);
}

/* Light theme overrides for new features */
body.light .wallet-card { background: var(--card); }
body.light .wallet-card.active { background: rgba(0,212,170,.08); }
body.light .health-score-card { background: var(--card); }
body.light .heatmap-cell.heatmap-0 { background: var(--bg2); }
body.light .shortcut-item { background: var(--bg2); }
body.light kbd { background: var(--card); }
body.light #shortcuts-panel { background: var(--card); }
body.light .search-box { background: var(--card); }
body.light .search-result-item:hover { background: var(--bg2); }
body.light .bill-reminder { background: rgba(245,158,11,.06); border-color: rgba(245,158,11,.2); }
body.light .bill-reminder.overdue { background: rgba(239,68,68,.06); border-color: rgba(239,68,68,.2); }
body.light .streak-banner { background: linear-gradient(135deg, rgba(0,212,170,.06), rgba(124,106,255,.06)); }
body.light .quick-stat { background: var(--card); }
body.light .topbar-search-btn { background: var(--bg2); }

/* ════════════════════════════════════════════════════════════
   NEW FEATURES CSS
   ════════════════════════════════════════════════════════════ */

/* ── Undo Toast ───────────────────────────────────────────── */
.undo-toast {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 18px;
  background: #1e293b; border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px; color: #e2e8f0; font-size: .85rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.5);
  animation: toastIn .3s cubic-bezier(.16,1,.3,1);
  margin-bottom: 8px;
}
.undo-toast button {
  background: var(--accent); color: #000; border: none;
  padding: 5px 12px; border-radius: 8px;
  font-family: var(--ff); font-weight: 800; font-size: .78rem;
  cursor: pointer; flex-shrink: 0; letter-spacing: .5px;
  transition: opacity .18s;
}
.undo-toast button:hover { opacity: .85; }

/* ── Pull to Refresh ──────────────────────────────────────── */
#pull-refresh-indicator {
  position: fixed; top: -60px; left: 50%; transform: translateX(-50%);
  background: var(--card); border: 1px solid var(--border2);
  border-radius: 99px; padding: 8px 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: var(--muted2); z-index: 9999;
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
  transition: top .3s cubic-bezier(.16,1,.3,1);
}
#pull-refresh-indicator.show { top: 16px; }
#pull-refresh-indicator i { transition: transform .3s; }
#pull-refresh-indicator.spinning i { animation: spin .6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Month Navigator ──────────────────────────────────────── */
.month-nav {
  display: flex; align-items: center; gap: 4px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; padding: 4px 6px; flex-shrink: 0;
}
.month-nav-btn {
  background: none; border: none; color: var(--muted);
  cursor: pointer; width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px; font-size: .78rem; transition: all .18s;
  flex-shrink: 0;
}
.month-nav-btn:hover { background: var(--card2); color: var(--text); }
.month-nav-center {
  display: flex; align-items: center; gap: 6px;
  min-width: 120px; justify-content: center;
}
.month-nav-center span { font-size: .8rem; font-weight: 700; color: var(--text); white-space: nowrap; }
#month-nav-reset {
  background: rgba(0,212,170,.1); border: 1px solid rgba(0,212,170,.2);
  color: var(--accent); font-family: var(--ff); font-size: .68rem;
  font-weight: 700; padding: 2px 8px; border-radius: 6px;
  cursor: pointer; transition: all .18s; white-space: nowrap;
}
#month-nav-reset:hover { background: rgba(0,212,170,.2); }
@media (max-width: 640px) {
  .month-nav-center { min-width: 90px; }
  .month-nav-center span { font-size: .72rem; }
}

/* ── Skeleton Loading ─────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--card2) 25%, var(--card) 50%, var(--card2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 8px;
}
.skeleton-text {
  height: 14px; border-radius: 4px; display: block;
  margin-bottom: 4px;
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Onboarding Banner ────────────────────────────────────── */
.onboarding-banner {
  display: flex; gap: 14px; align-items: flex-start;
  background: linear-gradient(135deg, rgba(0,212,170,.08), rgba(124,106,255,.08));
  border: 1px solid rgba(0,212,170,.2);
  border-radius: 18px; padding: 18px; margin-bottom: 16px;
  position: relative;
  animation: slideIn .4s cubic-bezier(.16,1,.3,1);
}
.onboarding-emoji { font-size: 2rem; flex-shrink: 0; margin-top: 2px; }
.onboarding-body { flex: 1; }
.onboarding-body h4 { font-size: 1rem; font-weight: 800; margin-bottom: 4px; }
.onboarding-body p  { font-size: .8rem; color: var(--muted); margin-bottom: 12px; }
.onboarding-banner .onboarding-steps { display: flex; flex-direction: column; gap: 7px; }
.onboarding-banner .onboarding-banner .onboarding-step {
  display: flex; align-items: center; gap: 10px;
  font-size: .8rem; color: var(--muted2);
}
.step-num {
  width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #000; font-size: .7rem; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.onboarding-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; color: var(--muted);
  cursor: pointer; font-size: .9rem; padding: 4px;
  border-radius: 6px; transition: color .18s;
}
.onboarding-close:hover { color: var(--text); }

/* ── Light Theme Overrides ────────────────────────────────── */
body.light .undo-toast { background: #ffffff; border-color: rgba(0,0,0,.1); color: #0f172a; box-shadow: 0 8px 32px rgba(0,0,0,.12); }
body.light #pull-refresh-indicator { background: #ffffff; border-color: rgba(0,0,0,.1); box-shadow: 0 4px 16px rgba(0,0,0,.08); }
body.light .month-nav { background: #ffffff; border-color: rgba(0,0,0,.1); }
body.light .month-nav-btn:hover { background: var(--bg2); }
body.light .skeleton { background: linear-gradient(90deg, #e2e8f0 25%, #f8fafc 50%, #e2e8f0 75%); background-size: 200% 100%; }
body.light .onboarding-banner { background: linear-gradient(135deg, rgba(0,212,170,.06), rgba(124,106,255,.06)); }

/* ── Toast animations ─────────────────────────────────────── */
@keyframes toastIn {
  from { opacity: 0; transform: translateY(12px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ════════════════════════════════════════════════════════════
   POLISH & MICRO-ANIMATIONS
   ════════════════════════════════════════════════════════════ */

/* Card hover lift */
.card {
  transition: border-color .2s ease, box-shadow .2s ease !important;
}
.card:hover {
  border-color: var(--border2) !important;
  box-shadow: 0 4px 20px rgba(0,0,0,.12) !important;
}
body.light .card:hover {
  box-shadow: 0 4px 20px rgba(0,0,0,.08) !important;
}

/* Toast slide-in from right */
@keyframes toastSlide {
  from { opacity: 0; transform: translateX(100%) scale(.92); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
.toast { animation: toastSlide .35s cubic-bezier(.16,1,.3,1) both; }

/* Goal card hover */
.goal-card {
  transition: border-color .2s, transform .2s, box-shadow .2s !important;
}
.goal-card:hover {
  border-color: rgba(0,212,170,.3) !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 6px 24px rgba(0,0,0,.12) !important;
}

/* Progress bar smooth fill */
.progress-fill {
  transition: width .6s cubic-bezier(.16,1,.3,1) !important;
}

/* Smooth content scroll */
/* Smooth scroll handled in .content above */

/* Nav item active indicator */
.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}
.nav-item { position: relative; }

/* Stat card subtle gradient glow on hover */
.sc-green:hover { box-shadow: 0 8px 32px rgba(0,212,170,.15), 0 2px 8px rgba(0,0,0,.2) !important; }
.sc-red:hover   { box-shadow: 0 8px 32px rgba(255,107,107,.15), 0 2px 8px rgba(0,0,0,.2) !important; }
.sc-blue:hover  { box-shadow: 0 8px 32px rgba(124,106,255,.15), 0 2px 8px rgba(0,0,0,.2) !important; }
.sc-gold:hover  { box-shadow: 0 8px 32px rgba(255,209,102,.15), 0 2px 8px rgba(0,0,0,.2) !important; }

/* Wallet card pop */
.wallet-card:hover {
  transform: translateY(-3px) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,.15) !important;
}

/* Budget row hover */
.budget-row {
  transition: background .15s;
  border-radius: var(--r);
  padding: 12px;
  margin-bottom: 4px;
}
.budget-row:hover { background: var(--card2); }

/* Recurring item hover */
.rec-item {
  transition: background .15s, transform .15s;
  border-radius: var(--r);
  padding: 12px;
  margin-bottom: 4px;
  cursor: default;
}
.rec-item:hover { background: var(--card2); }

/* Modal open animation */
.modal {
  animation: modalIn .3s cubic-bezier(.16,1,.3,1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Button press feedback */
.btn:active, .btn-add:active, .btn-auth:active {
  transform: scale(.97) !important;
}

/* Input focus glow */
.form-control:focus {
  box-shadow: 0 0 0 3px rgba(0,212,170,.12) !important;
}

/* Insight card hover */
.insight {
  transition: transform .2s, box-shadow .2s;
  cursor: default;
}
.insight:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,.1);
}

/* Notification panel slide in */
#notif-panel {
  animation: notifIn .25s cubic-bezier(.16,1,.3,1) both;
}
@keyframes notifIn {
  from { opacity: 0; transform: translateY(-8px) scale(.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* AI insight card stagger */
.ai-insight-item:nth-child(1) { animation-delay: .05s; }
.ai-insight-item:nth-child(2) { animation-delay: .10s; }
.ai-insight-item:nth-child(3) { animation-delay: .15s; }
.ai-insight-item:nth-child(4) { animation-delay: .20s; }
.ai-insight-item {
  animation: fadeUp .35s cubic-bezier(.16,1,.3,1) both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Mark highlight in search */
mark {
  background: rgba(0,212,170,.2) !important;
  color: var(--accent) !important;
  border-radius: 3px;
  padding: 0 2px;
  font-weight: 700;
}
body.light mark {
  background: rgba(0,212,170,.15) !important;
  color: #047857 !important;
}

/* Smooth sidebar footer */
.sidebar-footer { transition: background .2s; }

/* Topbar shadow on scroll */
.topbar {
  transition: box-shadow .2s;
}

/* Currency select focus */
.sidebar-currency select:focus {
  outline: none;
  border-color: rgba(0,212,170,.4);
}

/* Light mode card hover override */
body.light .card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.06) !important; }
body.light .goal-card:hover { box-shadow: 0 6px 24px rgba(0,0,0,.08) !important; }
body.light .sc-green:hover { box-shadow: 0 8px 32px rgba(0,212,170,.1) !important; }
body.light .sc-red:hover   { box-shadow: 0 8px 32px rgba(255,107,107,.1) !important; }
body.light .sc-blue:hover  { box-shadow: 0 8px 32px rgba(124,106,255,.1) !important; }
body.light .sc-gold:hover  { box-shadow: 0 8px 32px rgba(255,209,102,.1) !important; }
/* ════════════════════════════════════════════════════════════
   COMPACT TABLE VIEW
   ════════════════════════════════════════════════════════════ */
body.compact-view table td,
body.compact-view table th { padding: 6px 10px; font-size: .75rem; }
body.compact-view .tag      { padding: 1px 6px; font-size: .62rem; }
body.compact-view .badge    { padding: 2px 7px; font-size: .65rem; }

/* ── Pull to refresh ── */
#pull-refresh-indicator {
  position: fixed; top: -60px; left: 50%; transform: translateX(-50%);
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 99px; padding: 8px 18px;
  display: flex; align-items: center; gap: 8px;
  font-size: .78rem; color: var(--muted2);
  transition: top .3s cubic-bezier(.16,1,.3,1);
  z-index: 9999; box-shadow: 0 4px 16px rgba(0,0,0,.3);
}
#pull-refresh-indicator.show { top: 16px; }
#pull-refresh-indicator i { font-size: .85rem; color: var(--accent); }
#pull-refresh-indicator.spinning i { animation: spin .6s linear infinite; }

/* ════════════════════════════════════════════════════════════
   MOBILE FIXES — responsive chart heights, compact layout
   ════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  /* Charts shorter on mobile */
  .chart-wrap[style*="height:220px"],
  .chart-wrap[style*="height:240px"] { height: 180px !important; }
  .chart-wrap[style*="height:180px"] { height: 150px !important; }
  .chart-wrap[style*="height:200px"] { height: 160px !important; }

  /* Stat cards always 2 columns on mobile */
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
  .stat-card   { padding: 14px 16px; }
  .stat-val    { font-size: 1.3rem !important; }
  .stat-label  { font-size: .62rem; }

  /* Greeting area stack */
  .greeting-row { flex-direction: column; gap: 8px; }
  .greeting-row .month-nav { align-self: flex-start; }

  /* Wallet cards smaller on mobile */
  .wallet-card { min-width: 110px; padding: 8px 10px; }
  .wallet-icon { width: 28px; height: 28px; font-size: .75rem; }
  .wallet-name { font-size: .68rem; }
  .wallet-bal  { font-size: .75rem; }

  /* Topbar compact - hide text, keep icon */
  .btn-add .add-btn-text { display: none; }
  .btn-add { padding: 9px 14px; min-width: 40px; justify-content: center; }

  /* Analytics page on mobile */
  .analytics-stat { flex-direction: column; gap: 2px; }

  /* Filter bar wraps on mobile */
  .filter-bar { flex-direction: column; gap: 10px; }
  .filter-bar .form-group { width: 100%; }

  /* Reduce content padding more on very small screens */
  .content { padding: 14px 12px; }
}

@media (max-width: 420px) {
  .stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .stat-card   { padding: 12px; }
  .stat-val    { font-size: 1.1rem !important; }
}

/* ── Sidebar backdrop (mobile) ──────────────────────────── */
#sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(2px);
  z-index: 999;
}
@media (max-width: 768px) {
  #sidebar-backdrop.show { display: block; }
}

/* ════════════════════════════════════════════════════════════
   COMPLETE MOBILE FIX — topbar, panels, notif, charts
   ════════════════════════════════════════════════════════════ */

/* ── Notification panel: full-screen on mobile ──────────────── */
@media (max-width: 768px) {
  #notif-panel {
    top: 62px; left: 8px; right: 8px; width: auto;
    max-height: calc(100vh - 140px);
    border-radius: 16px;
  }
  /* Hide desktop-only search hint */
  .topbar-search .shortcut-hint { display: none !important; }
  .topbar-search span { display: none !important; }
  .topbar-search { padding: 8px 10px; min-width: 36px; }

  /* Topbar properly spaced with hamburger */
  .topbar { padding: 0 10px 0 54px; height: 58px; gap: 6px; }
  .page-title { font-size: .95rem; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .topbar-right { gap: 6px; flex-shrink: 0; }

  /* Shortcuts panel: hidden on mobile entirely */
  #shortcuts-panel { display: none !important; }
  #shortcuts-overlay { display: none !important; }

  /* Bottom nav: ensure solid background */
  #bottom-nav {
    background: var(--card) !important;
    border-top: 1px solid var(--border2) !important;
    box-shadow: 0 -2px 20px rgba(0,0,0,.4) !important;
  }
  .bottom-nav-btn { font-size: .55rem; padding: 4px 8px; }
  .bottom-nav-btn span { font-size: .55rem; }

  /* Charts: limit height on mobile */
  .chart-wrap { height: 160px !important; }

  /* Dashboard stats: 2 col */
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
  .stat-val { font-size: 1.25rem !important; }
  .stat-card { padding: 14px !important; }

  /* Wallet bar: horizontal scroll only */
  .wallet-bar { -webkit-overflow-scrolling: touch; }
  .wallet-card { min-width: 100px; padding: 8px 10px; }

  /* Onboarding: full screen on mobile */
  #onboarding-overlay { padding: 16px; }
  .onboarding-card { padding: 28px 20px; border-radius: 20px; }

  /* AI insights card: compact */
  .ai-insight-card { padding: 8px 0; gap: 8px; }
  .ai-insight-emoji { font-size: 1.1rem; }

  /* Month nav: compact */
  .month-nav { padding: 3px 4px; }
  .month-nav-center { min-width: 80px; }
  .month-nav-center span { font-size: .7rem; }
  .month-nav-btn { width: 24px; height: 24px; font-size: .7rem; }

  /* Content padding */
  .content { padding: 14px 12px 90px; }

  /* Analytics: cards full width */
  #analytics-content .g2 { grid-template-columns: 1fr !important; }

  /* Settings: single column */
  #settings-content .g2 { grid-template-columns: 1fr !important; }

  /* Goals & recurring: form above list */
  #page-goals .g-left,
  #page-recurring .g-left,
  #page-budgets .g-left { grid-template-columns: 1fr !important; }

  /* Tables: horizontal scroll */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table { min-width: 600px; }

  /* Filter bar: wrap */
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .filter-bar .form-group { flex: 1 1 140px; }

  /* Modal: full screen on mobile */
  .overlay { padding: 0; align-items: flex-end; }
  .modal { max-width: 100%; border-radius: 24px 24px 0 0; max-height: 92vh; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns: 1fr 1fr !important; gap: 8px !important; }
  .stat-card { padding: 12px 10px !important; }
  .stat-val { font-size: 1.05rem !important; }
  .topbar { padding: 0 8px 0 50px; }
  .bottom-nav-btn { padding: 4px 4px; }
}

/* ════════════════════════════════════════════════════════════
   PROFESSIONAL UPGRADE v2.0 — New Component Styles
   ════════════════════════════════════════════════════════════ */

/* ── Greeting ───────────────────────────────────────────────── */
.greeting-title {
  font-size: 1.6rem; font-weight: 900; letter-spacing: -.5px;
  margin: 0 0 4px; line-height: 1.1; color: var(--text);
}
.greeting-sub { font-size: .8rem; color: var(--muted); margin: 0; }
.greeting-row {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 20px;
}

/* ── Quick Pills ────────────────────────────────────────────── */
.quick-pills {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px;
}
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 99px; border: 1px solid var(--border2);
  background: var(--card); color: var(--muted2);
  font-family: var(--ff); font-size: .78rem; font-weight: 600;
  cursor: pointer; transition: all .18s; white-space: nowrap;
}
.pill:hover { border-color: var(--accent); color: var(--accent); background: rgba(0,212,170,.06); }
.pill-accent { background: var(--accent); color: #000; border-color: var(--accent); }
.pill-accent:hover { background: #00b894; color: #000; }
.pill-green { background: rgba(0,212,170,.12); color: var(--income); border-color: rgba(0,212,170,.3); }
.pill-green:hover { background: rgba(0,212,170,.2); }

/* ── Section Label Row ─────────────────────────────────────── */
.section-label-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.section-label-row span {
  font-size: .68rem; font-weight: 700; letter-spacing: .8px;
  text-transform: uppercase; color: var(--muted);
}

/* ── Dashboard Charts Grid ─────────────────────────────────── */
.dashboard-charts {
  display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start;
}
@media (max-width: 900px) { .dashboard-charts { grid-template-columns: 1fr; } }

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; margin-bottom: 22px;
}
.page-title-lg {
  font-size: 1.3rem; font-weight: 800; letter-spacing: -.3px; margin: 0 0 3px;
}
.page-subtitle { font-size: .78rem; color: var(--muted); margin: 0; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Category Quick Pills (Transactions) ───────────────────── */
.cat-pills {
  display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px;
}
.cat-pill {
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid var(--border); background: var(--card2);
  font-size: .72rem; font-weight: 600; cursor: pointer;
  transition: all .15s; color: var(--muted2);
  display: inline-flex; align-items: center; gap: 5px;
}
.cat-pill:hover { border-color: var(--border2); color: var(--text); }
.cat-pill.active { background: var(--accent); color: #000; border-color: var(--accent); }
.cat-pill .cat-pill-count {
  font-size: .62rem; background: rgba(0,0,0,.15); border-radius: 99px;
  padding: 1px 5px; font-weight: 700;
}

/* ── Filter Bar (Transactions) ─────────────────────────────── */
.filter-search {
  position: relative; display: flex; align-items: center;
}
.filter-search i {
  position: absolute; left: 12px; color: var(--muted); font-size: .82rem; pointer-events: none;
}
.filter-search input {
  padding-left: 36px !important; width: 100%;
}
.filter-controls {
  display: flex; gap: 8px; flex-wrap: wrap; align-items: center;
}
.filter-controls .form-control { min-width: 120px; max-width: 160px; }
@media (max-width: 768px) {
  .filter-search { width: 100%; }
  .filter-controls { width: 100%; }
  .filter-controls .form-control { flex: 1 1 100px; min-width: 100px; max-width: none; }
}

/* ── Analytics Summary ─────────────────────────────────────── */
.analytics-summary {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 20px;
}
.analytics-stat {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 16px;
  display: flex; flex-direction: column; gap: 4px;
}
.analytics-stat .label { font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; font-weight: 600; }
.analytics-stat .value { font-size: 1.15rem; font-weight: 800; font-family: var(--fm); }
@media (max-width: 600px) { .analytics-summary { grid-template-columns: 1fr 1fr; } }

/* ── Data Buttons (Settings) ────────────────────────────────── */
.data-btns { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }

/* ── Sidebar Nav ────────────────────────────────────────────── */
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-version {
  font-size: .65rem; color: var(--muted); text-align: center;
  margin-top: 10px; opacity: .6;
}

/* ── Logo Icon Wrap ─────────────────────────────────────────── */
.logo-icon-wrap {
  width: 38px; height: 38px; border-radius: 11px;
  background: #0d1117;
  border: 1px solid rgba(0,212,170,.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(0,212,170,.12);
}
.sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 20px 16px 16px;
}

/* ── AI Card ─────────────────────────────────────────────────── */
.ai-card { border-color: rgba(124,106,255,.25) !important; }
body.light .ai-card { border-color: rgba(124,106,255,.2) !important; }

/* ── FAB Button ─────────────────────────────────────────────── */
.fab {
  display: none;
  position: fixed; bottom: 84px; right: 18px;
  width: 52px; height: 52px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; color: #000; font-size: 1.3rem;
  box-shadow: 0 6px 24px rgba(0,212,170,.45);
  cursor: pointer; z-index: 900;
  align-items: center; justify-content: center;
  transition: transform .2s, box-shadow .2s;
}
.fab:active { transform: scale(.92); box-shadow: 0 3px 12px rgba(0,212,170,.3); }
/* Hide FAB when any modal/overlay is open */
body.modal-open .fab { display: none !important; }
@media (max-width: 768px) { .fab { display: flex; } }

/* ── Stat Card Icon ─────────────────────────────────────────── */
.stat-icon {
  position: absolute; right: 18px; bottom: 16px;
  font-size: 2rem; opacity: .08;
}
.stat-card { position: relative; overflow: hidden; cursor: pointer; }
.stat-card:hover { transform: translateY(-2px); }

/* ── Link Button ────────────────────────────────────────────── */
.link-btn {
  background: none; border: none; color: var(--accent);
  font-family: var(--ff); font-size: inherit; cursor: pointer;
  text-decoration: underline; padding: 0;
}

/* ── Divider ────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 16px 0; }

/* ── Analytics Stats Inner ──────────────────────────────────── */
#analytics-stats-inner {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px;
}
#analytics-stats-inner .analytics-stat { padding: 10px 12px; }
#analytics-stats-inner .analytics-stat .value { font-size: .95rem; }

/* ── TX Table Mobile Cards ──────────────────────────────────── */
.tx-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  cursor: pointer; transition: background .15s;
}
.tx-card:hover { background: var(--card2); }
.tx-card:last-child { border-bottom: none; }
.tx-card-icon {
  width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: .88rem;
}
.tx-card-info { flex: 1; min-width: 0; }
.tx-card-name { font-size: .85rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-card-meta { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.tx-card-amount { font-family: var(--fm); font-weight: 700; font-size: .9rem; text-align: right; flex-shrink: 0; }

/* ── Budget Ring ────────────────────────────────────────────── */
.budget-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.budget-item:last-child { border-bottom: none; }
.budget-ring-wrap { position: relative; width: 52px; height: 52px; flex-shrink: 0; }
.budget-ring-wrap svg { transform: rotate(-90deg); }
.budget-ring-wrap .ring-text {
  position: absolute; inset: 0; display: flex; align-items: center;
  justify-content: center; font-family: var(--fm); font-size: .58rem; font-weight: 700;
}
.budget-info { flex: 1; min-width: 0; }
.budget-cat { font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.budget-nums { font-size: .72rem; color: var(--muted); margin-top: 3px; }
.budget-bar-wrap { margin-top: 6px; height: 4px; background: var(--card2); border-radius: 99px; overflow: hidden; }
.budget-bar-fill { height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(.16,1,.3,1); }
.budget-delete { background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; font-size: .8rem; transition: color .15s; flex-shrink: 0; }
.budget-delete:hover { color: var(--expense); }

/* ── Goal Card Upgrade ──────────────────────────────────────── */
.goal-card { cursor: default; }
.goal-milestone {
  font-size: .65rem; padding: 2px 8px; border-radius: 99px;
  font-weight: 700; margin-left: 6px;
  background: rgba(255,209,102,.15); color: var(--gold);
  border: 1px solid rgba(255,209,102,.3);
}

/* ── Recurring Item Upgrade ─────────────────────────────────── */
.rec-item { transition: background .15s; border-radius: var(--r); padding: 12px; margin: 0 -12px; }
.rec-item:hover { background: var(--card2); }
.rec-due-badge {
  font-size: .62rem; padding: 2px 7px; border-radius: 99px;
  font-weight: 700; margin-left: 6px;
}
.rec-due-soon { background: rgba(255,209,102,.15); color: var(--gold); border: 1px solid rgba(255,209,102,.3); }
.rec-due-overdue { background: rgba(255,107,107,.15); color: var(--expense); border: 1px solid rgba(255,107,107,.3); }

/* ── Transaction Table Enhancements ─────────────────────────── */
.tx-table-card { padding: 0; overflow: hidden; }
tbody tr:hover { background: var(--card2) !important; }
.desc-cell { max-width: 180px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amount-cell { font-family: var(--fm); font-weight: 700; }

/* ── Empty State Upgrade ────────────────────────────────────── */
.empty-state { text-align: center; padding: 48px 20px; }
.empty-state h3 { font-size: .95rem; font-weight: 700; margin: 12px 0 6px; }
.empty-state p { font-size: .78rem; color: var(--muted); line-height: 1.6; }
.empty-icon {
  width: 64px; height: 64px; border-radius: 20px;
  background: var(--card2); display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: var(--muted); margin: 0 auto 4px;
}

/* ── Sidebar active state upgrade ──────────────────────────── */
.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 16px; margin: 1px 8px; border-radius: 10px;
  cursor: pointer; color: var(--muted2); font-size: .855rem; font-weight: 500;
  transition: all .15s; position: relative;
}
.nav-item:hover { background: var(--card2); color: var(--text); }
.nav-item.active { background: rgba(0,212,170,.1); color: var(--accent); }
.nav-item.active i { color: var(--accent); }
.nav-item i { width: 16px; text-align: center; font-size: .9rem; }
.nav-item span:first-of-type { flex: 1; }

/* ════════════════════════════════════════════════════════════
   DEVELOPER BUTTON + MODAL
   ════════════════════════════════════════════════════════════ */

/* ── Dev Button in Sidebar ──────────────────────────────────── */
.dev-btn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 10px 12px; margin-bottom: 10px;
  background: var(--card2); border: 1px solid var(--border2);
  border-radius: 14px; cursor: pointer;
  transition: all .2s; text-align: left;
  position: relative; overflow: hidden;
}
.dev-btn::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(0,212,170,.06), rgba(124,106,255,.06));
  opacity: 0; transition: opacity .2s;
}
.dev-btn:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,212,170,.15); }
.dev-btn:hover::before { opacity: 1; }
.dev-btn-avatar {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 800; color: #000; letter-spacing: .5px;
}
.dev-btn-info { flex: 1; min-width: 0; }
.dev-btn-name { display: block; font-size: .78rem; font-weight: 700; color: var(--text); }
.dev-btn-sub  { display: block; font-size: .65rem; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-btn-arrow { font-size: .65rem; color: var(--muted); flex-shrink: 0; }
body.light .dev-btn { background: #f8fafc; }

/* ── Dev Modal ──────────────────────────────────────────────── */
.dev-modal {
  max-width: 480px; padding: 0;
  border-radius: 24px; max-height: 92vh; overflow-y: auto;
  display: flex; flex-direction: column;
}
.dev-modal-header {
  position: relative; height: 140px; overflow: visible; flex-shrink: 0;
}
.dev-modal-cover {
  position: absolute; inset: 0; overflow: hidden; border-radius: 24px 24px 0 0;
  background: linear-gradient(135deg, #060d14 0%, #0b1628 45%, #100c22 100%);
}
.dev-modal-cover::after {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 100% 80% at 15% 60%, rgba(0,212,170,.3) 0%, transparent 55%),
    radial-gradient(ellipse 70% 90% at 85% 20%, rgba(124,106,255,.25) 0%, transparent 55%),
    radial-gradient(ellipse 50% 50% at 50% 100%, rgba(0,180,140,.1) 0%, transparent 50%);
}
/* Floating code symbols decoration */
.dev-modal-cover::before {
  content: '</> {} (); const ₹ => import export async';
  position: absolute; top: 18px; left: 18px; right: 18px;
  font-family: var(--fm); font-size: .58rem; color: rgba(255,255,255,.1);
  letter-spacing: 3px; white-space: nowrap; overflow: hidden;
  z-index: 1; pointer-events: none;
}
.dev-modal-avatar-wrap {
  position: absolute; bottom: -32px; left: 22px;
  z-index: 3;
}
.dev-modal-avatar {
  width: 68px; height: 68px; border-radius: 20px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem; font-weight: 900; color: #000; letter-spacing: 1px;
  border: 3px solid var(--bg2); box-shadow: 0 8px 28px rgba(0,0,0,.6);
}
.dev-modal-badge {
  position: absolute; bottom: -5px; right: -5px;
  width: 24px; height: 24px; border-radius: 50%;
  background: var(--accent2); border: 2px solid var(--bg2);
  display: flex; align-items: center; justify-content: center;
  font-size: .6rem; color: #fff; box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
.dev-modal-close {
  position: absolute; top: 12px; right: 12px; z-index: 10;
  background: rgba(0,0,0,.5) !important; border: 1px solid rgba(255,255,255,.15);
  border-radius: 10px; width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,.8); font-size: .8rem;
  transition: all .18s; backdrop-filter: blur(4px);
}
.dev-modal-close:hover { background: rgba(255,255,255,.15) !important; color: #fff; }

/* ── Dev Modal Body ─────────────────────────────────────────── */
.dev-modal-body { padding: 48px 24px 28px; }
.dev-name { font-size: 1.3rem; font-weight: 900; margin: 0 0 3px; letter-spacing: -.3px; }
.dev-title { font-size: .78rem; color: var(--accent); font-weight: 600; margin: 0 0 12px; }
.dev-bio { font-size: .82rem; color: var(--muted2); line-height: 1.65; margin: 0 0 16px; }

/* Social Links */
.dev-socials { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.dev-social-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: 99px;
  background: var(--card2); border: 1px solid var(--border2);
  color: var(--text); font-family: var(--ff); font-size: .78rem;
  font-weight: 600; text-decoration: none; cursor: pointer;
  transition: all .18s;
}
.dev-social-btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,212,170,.15); }
.dev-social-btn i { font-size: 1rem; flex-shrink: 0; }
.dev-social-btn span { color: var(--muted2); }
.dev-social-btn:hover span { color: var(--accent); }

/* Divider */
.dev-divider { height: 1px; background: var(--border); margin: 18px 0; }

/* App Stats Grid */
.dev-stats-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
}
.dev-stat {
  background: var(--card2); border: 1px solid var(--border);
  border-radius: 12px; padding: 12px 8px; text-align: center;
}
.dev-stat-val { display: block; font-family: var(--fm); font-size: 1.05rem; font-weight: 800; color: var(--accent); }
.dev-stat-label { display: block; font-size: .6rem; color: var(--muted); margin-top: 3px; text-transform: uppercase; letter-spacing: .5px; font-weight: 600; }

/* Section Title */
.dev-section-title { font-size: .82rem; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.dev-section-desc { font-size: .78rem; color: var(--muted2); line-height: 1.6; margin-bottom: 14px; }

/* Contribute Grid */
.dev-contribute-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 4px; }
.dev-contribute-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 14px; border-radius: 14px;
  background: var(--card2); border: 1px solid var(--border2);
  cursor: pointer; text-align: left; transition: all .18s; width: 100%;
  font-family: var(--ff);
}
.dev-contribute-btn:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.dev-contribute-btn i { font-size: 1.2rem; flex-shrink: 0; }
.dev-contribute-primary { border-color: rgba(0,212,170,.3); background: rgba(0,212,170,.06); }
.dev-contribute-primary i { color: var(--accent); }
.dev-contribute-primary:hover { border-color: var(--accent); background: rgba(0,212,170,.1); }
.dev-contribute-title { font-size: .8rem; font-weight: 700; color: var(--text); }
.dev-contribute-sub { font-size: .65rem; color: var(--muted); margin-top: 2px; }

/* Tech Chips */
.dev-tech-row { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 4px; }
.dev-tech-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 99px; font-size: .72rem; font-weight: 600;
  background: var(--card2); border: 1px solid var(--border); color: var(--muted2);
}

/* Footer Note */
.dev-footer-note {
  text-align: center; font-size: .7rem; color: var(--muted);
  margin-top: 18px; line-height: 1.8;
}

/* Contribute sub-modal body */
.contribute-modal { max-width: 380px; }
.contribute-option {
  display: flex; align-items: center; gap: 10px;
  padding: 14px; background: var(--card2); border: 1px solid var(--border2);
  border-radius: 14px; margin-bottom: 10px; overflow: hidden;
}
.contribute-option-icon {
  width: 46px; height: 46px; border-radius: 14px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.contribute-option-info { flex: 1; min-width: 0; overflow: hidden; }
.contribute-option-title { font-size: .85rem; font-weight: 700; margin-bottom: 3px; }
.contribute-option-val { font-family: var(--fm); font-size: .78rem; color: var(--accent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; }
.contribute-copy-btn {
  padding: 7px 12px; border-radius: 8px; background: var(--accent);
  border: none; color: #000; font-family: var(--ff); font-size: .72rem;
  font-weight: 700; cursor: pointer; transition: all .15s;
  flex-shrink: 0; white-space: nowrap;
}
.contribute-copy-btn:hover { background: #00b894; }

/* ── Light Mode ─────────────────────────────────────────────── */
body.light .logo-icon-wrap { background: #0d1117; border-color: rgba(0,212,170,.3); }
body.light .dev-btn { background: #f8fafc; border-color: rgba(0,0,0,.1); }
body.light .dev-btn:hover { border-color: var(--accent); }
body.light .dev-social-btn { background: #f1f5f9; border-color: rgba(0,0,0,.1); }
body.light .dev-stat { background: #f8fafc; border-color: rgba(0,0,0,.08); }
body.light .dev-contribute-btn { background: #f8fafc; border-color: rgba(0,0,0,.1); }
body.light .dev-tech-chip { background: #f1f5f9; border-color: rgba(0,0,0,.08); }
body.light .dev-modal-cover {
  background: linear-gradient(135deg, #e8f5e9 0%, #e3f2fd 50%, #ede7f6 100%);
}
body.light .dev-modal-cover::before { color: rgba(0,0,0,.05); }

/* ── Mobile responsive ──────────────────────────────────────── */
@media (max-width: 480px) {
  .dev-stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dev-contribute-grid { grid-template-columns: 1fr; }
  .dev-modal-body { padding: 44px 16px 20px; }
}

/* ════════════════════════════════════════════════════════════
   LOGOUT WARNING MODAL
   ════════════════════════════════════════════════════════════ */
.logout-modal { padding: 0; overflow: hidden; border-radius: 20px; }

.logout-modal-header {
  position: relative;
  background: linear-gradient(135deg, rgba(255,107,107,.12), rgba(255,107,107,.04));
  border-bottom: 1px solid rgba(255,107,107,.15);
  padding: 28px 24px 20px;
  display: flex; align-items: center;
}
.logout-modal-icon {
  width: 48px; height: 48px; border-radius: 14px;
  background: rgba(255,107,107,.12);
  border: 1px solid rgba(255,107,107,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem; color: var(--expense);
}
.logout-modal-header .modal-close {
  position: absolute; top: 14px; right: 14px;
}

.logout-modal-body { padding: 20px 24px 24px; }
.logout-modal-title {
  font-size: 1.1rem; font-weight: 800; color: var(--text);
  margin: 0 0 6px; letter-spacing: -.3px;
}
.logout-modal-sub {
  font-size: .82rem; color: var(--muted2); line-height: 1.55;
  margin: 0 0 16px;
}

.logout-data-warning {
  display: flex; gap: 12px; align-items: flex-start;
  background: rgba(255,209,102,.05);
  border: 1px solid rgba(255,209,102,.2);
  border-radius: 12px; padding: 13px 14px;
  margin-bottom: 14px;
}

.logout-download-row {
  display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 4px;
}
.logout-download-btn {
  flex: 1; justify-content: center; min-width: 120px;
  transition: all .18s;
}
.logout-download-btn i { margin-right: 6px; }

.logout-modal-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* Light mode */
body.light .logout-modal-header {
  background: linear-gradient(135deg, rgba(255,107,107,.06), rgba(255,107,107,.02));
}
body.light .logout-data-warning {
  background: rgba(255,209,102,.04);
}