:root {
  --bg: #090c11;
  --panel: rgba(21, 26, 32, .68);
  --panel-2: rgba(29, 35, 43, .78);
  --glass: rgba(255, 255, 255, .075);
  --glass-strong: rgba(255, 255, 255, .12);
  --glass-edge: rgba(255, 255, 255, .18);
  --text: #f7fafc;
  --muted: #9ca8b6;
  --line: rgba(255, 255, 255, .08);
  --accent: #7ee33f;
  --accent-2: #18b26b;
  --danger: #ff3f5f;
  --blue: #60a5fa;
  --amber: #fbbf24;
  --purple: #8b5cf6;
  --shadow: 0 24px 70px rgba(0, 0, 0, .35);
  --glass-shadow: 0 28px 90px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .12);
}

[data-theme="light"] {
  --bg: #f6f8fb;
  --panel: rgba(255, 255, 255, .68);
  --panel-2: rgba(255, 255, 255, .78);
  --glass: rgba(255, 255, 255, .58);
  --glass-strong: rgba(255, 255, 255, .76);
  --glass-edge: rgba(255, 255, 255, .92);
  --text: #10151d;
  --muted: #667085;
  --line: rgba(16, 21, 29, .09);
  --shadow: 0 18px 50px rgba(15, 23, 42, .08);
  --glass-shadow: 0 24px 70px rgba(15, 23, 42, .12), inset 0 1px 0 rgba(255, 255, 255, .86);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .035), transparent 26%),
    radial-gradient(circle at 12% 8%, rgba(126, 227, 63, .18), transparent 25rem),
    radial-gradient(circle at 86% 12%, rgba(96, 165, 250, .18), transparent 26rem),
    radial-gradient(circle at 70% 88%, rgba(255, 63, 95, .10), transparent 24rem),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }
.app-shell { display: grid; grid-template-columns: 260px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  border-right: 1px solid var(--glass-edge);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .075), rgba(255, 255, 255, .025)),
    rgba(10, 13, 18, .58);
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .04);
  backdrop-filter: blur(26px) saturate(145%);
  -webkit-backdrop-filter: blur(26px) saturate(145%);
}
[data-theme="light"] .sidebar {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(255, 255, 255, .52)),
    rgba(255, 255, 255, .76);
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; font-size: 20px; }
.brand span, .brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #08100a;
  font-weight: 900;
  box-shadow: 0 14px 34px rgba(126, 227, 63, .22), inset 0 1px 0 rgba(255, 255, 255, .42);
}
.menu-close,
.topbar-menu,
.mobile-menu-overlay,
.mobile-action-bar {
  display: none;
}
.sidebar nav { display: grid; gap: 6px; }
.sidebar nav a, .logout, .menu-settings, .menu-option {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  color: var(--muted);
  border-radius: 8px;
  border: 1px solid transparent;
  background: transparent;
  transition: .18s ease;
}
.sidebar nav a i,
.logout i,
.menu-settings i,
.menu-option i {
  width: 18px;
  text-align: center;
}
.sidebar nav a.active, .sidebar nav a:hover, .logout:hover, .menu-settings.active, .menu-settings:hover, .menu-option:hover {
  color: var(--text);
  border-color: var(--glass-edge);
  background:
    linear-gradient(135deg, rgba(126, 227, 63, .14), rgba(255, 255, 255, .04)),
    var(--glass);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .10);
}
.menu-footer {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 20px;
  display: grid;
  gap: 7px;
}
.menu-settings,
.menu-option {
  display: none;
}
.main-content { padding: 28px; overflow: hidden; }
.topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; }
.eyebrow { color: var(--muted); font-size: 13px; }
h1, h2, h3 { margin: 0; letter-spacing: 0; }
h1 { font-size: clamp(26px, 4vw, 38px); }
h2 { font-size: 18px; }
h3 { font-size: 15px; }
.top-actions, .button-row { display: flex; gap: 10px; align-items: center; }
.icon-btn {
  border: 1px solid var(--glass-edge);
  background: var(--glass);
  color: var(--text);
  border-radius: 8px;
  width: 42px;
  height: 42px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.icon-btn:hover { transform: translateY(-1px); background: var(--glass-strong); }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}
.metric-card, .panel {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035)),
    var(--panel);
  border: 1px solid var(--glass-edge);
  border-radius: 8px;
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(24px) saturate(155%);
  -webkit-backdrop-filter: blur(24px) saturate(155%);
}
.metric-card::before, .panel::before, .auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .18), transparent 34%),
    linear-gradient(315deg, rgba(126, 227, 63, .08), transparent 42%);
  opacity: .82;
}
.metric-card > *, .panel > *, .auth-card > * { position: relative; z-index: 1; }
.metric-card {
  padding: 18px;
  min-height: 118px;
  display: grid;
  align-content: space-between;
  transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.metric-card:hover, .panel:hover {
  border-color: rgba(126, 227, 63, .34);
  box-shadow: 0 30px 95px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.metric-card:hover { transform: translateY(-2px); }
.metric-card span { color: var(--muted); font-size: 13px; }
.metric-card strong { font-size: clamp(21px, 2.5vw, 30px); font-weight: 800; }
.metric-card.green strong { color: #22c55e; }
.metric-card.red strong { color: var(--danger); }
.metric-card.blue strong { color: var(--blue); }
.metric-card.amber strong { color: var(--amber); }
.metric-card.purple strong { color: var(--purple); }

.content-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.content-grid.compact { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 18px; }
.split-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr); gap: 18px; align-items: start; }
.mobile-finance-app { display: none; }
.panel { padding: 18px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.panel-head a { color: var(--accent); font-size: 13px; }
.chart-panel { min-height: 360px; }
.chart-panel canvas, #annualChart { min-height: 280px; }

.list-stack { display: grid; gap: 10px; }
.list-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, .11);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .035)),
    rgba(255, 255, 255, .025);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}
.list-row:hover {
  transform: translateY(-1px);
  border-color: rgba(126, 227, 63, .28);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .055)),
    rgba(255, 255, 255, .04);
}
[data-theme="light"] .list-row {
  border-color: rgba(255, 255, 255, .86);
  background: rgba(255, 255, 255, .58);
}
.list-row small, .goal-meta, .empty-state { color: var(--muted); }
.list-row div { min-width: 0; }
.list-row strong, .list-row small { display: block; overflow-wrap: anywhere; }
.badge-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  color: #08100a;
  background: linear-gradient(135deg, var(--accent), #43d486);
  font-weight: 600;
  box-shadow: 0 12px 24px rgba(67, 212, 134, .22), inset 0 1px 0 rgba(255, 255, 255, .42);
}

.form-control, .form-select {
  min-height: 48px;
  background-color: rgba(255, 255, 255, .055);
  border: 1px solid rgba(255, 255, 255, .13);
  color: var(--text);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
}
.form-control:focus, .form-select:focus {
  background-color: rgba(255, 255, 255, .085);
  color: var(--text);
  border-color: var(--accent);
  box-shadow: 0 0 0 .2rem rgba(126, 227, 63, .15), inset 0 1px 0 rgba(255, 255, 255, .10);
}
[data-theme="light"] .form-control, [data-theme="light"] .form-select {
  background-color: rgba(255, 255, 255, .68);
  border-color: rgba(16, 21, 29, .08);
}
.form-field span { display: block; color: var(--muted); margin-bottom: 6px; font-size: 13px; }
.import-check {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}
.import-check .form-check-input {
  margin: 0;
  background-color: rgba(255, 255, 255, .08);
  border-color: rgba(255, 255, 255, .22);
}
.import-check .form-check-input:checked {
  background-color: #0b0b0c;
  border-color: #0b0b0c;
}
.btn-accent {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  background: #0b0b0c;
  color: #fff;
  font-weight: 500;
  box-shadow: 0 18px 36px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .12);
  transition: transform .18s ease, box-shadow .18s ease;
}
.btn-accent:hover {
  color: #fff;
  transform: translateY(-1px);
  background: #171719;
  box-shadow: 0 22px 44px rgba(0, 0, 0, .30), inset 0 1px 0 rgba(255, 255, 255, .16);
}
[data-theme="dark"] .btn-accent {
  background: #fff;
  color: #0b0b0c;
  box-shadow: 0 18px 36px rgba(255, 255, 255, .12), inset 0 1px 0 rgba(255, 255, 255, .86);
}
[data-theme="dark"] .btn-accent:hover {
  background: #f1f3f5;
  color: #0b0b0c;
  box-shadow: 0 22px 44px rgba(255, 255, 255, .16), inset 0 1px 0 rgba(255, 255, 255, .92);
}
.btn-outline-accent {
  min-height: 42px;
  border-radius: 8px;
  border: 1px solid var(--accent);
  color: var(--accent);
  background: rgba(126, 227, 63, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.btn-outline-accent:hover { background: var(--accent); color: #08100a; }
.mini-danger {
  border: 0;
  color: var(--danger);
  background: transparent;
  font-size: 12px;
}
.filter-bar { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(140px, .5fr)); gap: 10px; margin-bottom: 14px; }
.ledger-table { color: var(--text); margin: 0; }
.ledger-table th, .ledger-table td { border-color: var(--line); vertical-align: middle; }
.type-pill {
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(255, 255, 255, .10);
  background: rgba(255, 255, 255, .06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.type-pill.income { color: #22c55e; }
.type-pill.expense { color: var(--danger); }
.type-pill.transfer { color: var(--blue); }
.type-pill.savings { color: var(--purple); }
.type-pill.lending { color: var(--amber); }
.type-pill.borrowing { color: var(--danger); }

.goal-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .025)),
    rgba(255, 255, 255, .03);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}
.goal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(126, 227, 63, .10), transparent 38%);
}
.goal-card > * { position: relative; z-index: 1; }
.progress {
  height: 10px;
  background: rgba(255, 255, 255, .08);
  border-radius: 999px;
  overflow: hidden;
  margin: 12px 0;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .18);
}
.progress-bar { background: linear-gradient(90deg, var(--accent), var(--accent-2)); }
.goal-meta { display: flex; flex-wrap: wrap; gap: 12px; font-size: 13px; }
.inline-pay { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 12px; }
.inline-pay input {
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .13);
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  padding: 0 10px;
}

.modal-content, .offcanvas {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .13), rgba(255, 255, 255, .035)),
    var(--panel);
  color: var(--text);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(155%);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
}
.btn-close { filter: invert(1); }
[data-theme="light"] .btn-close { filter: none; }
.toast-pop {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 2000;
  max-width: calc(100vw - 40px);
  padding: 12px 14px;
  border-radius: 8px;
  background: var(--accent);
  color: #08100a;
  font-weight: 800;
  box-shadow: var(--glass-shadow);
  border: 1px solid rgba(255, 255, 255, .20);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.toast-pop.danger { background: var(--danger); color: #fff; }

.auth-screen {
  display: grid;
  place-items: center;
  padding: 20px;
}
.auth-card {
  position: relative;
  overflow: hidden;
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .035)),
    var(--panel);
  border: 1px solid var(--glass-edge);
  box-shadow: var(--glass-shadow);
  backdrop-filter: blur(26px) saturate(155%);
  -webkit-backdrop-filter: blur(26px) saturate(155%);
}
.auth-card h1 { margin-top: 18px; }
.auth-card p { color: var(--muted); }
.setup-card {
  width: min(760px, 100%);
}
.setup-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, .035);
}
.setup-section h2 {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .metric-grid, .content-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split-layout, .content-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body {
    background:
      radial-gradient(circle at 50% -6%, rgba(232, 244, 138, .24), transparent 15rem),
      radial-gradient(circle at 100% 10%, rgba(203, 215, 246, .16), transparent 14rem),
      linear-gradient(180deg, #101112 0%, #171719 48%, #0e0e10 100%);
  }
  [data-theme="light"] body {
    background:
      radial-gradient(circle at 50% -6%, rgba(232, 244, 138, .46), transparent 15rem),
      radial-gradient(circle at 100% 10%, rgba(203, 215, 246, .42), transparent 14rem),
      linear-gradient(180deg, #f4f6ee 0%, #e7ebf4 46%, #f6f7f5 100%);
  }
  .app-shell { display: block; padding-bottom: 96px; }
  body.mobile-menu-open { overflow: hidden; }
  .mobile-menu-overlay {
    position: fixed;
    inset: 0;
    z-index: 998;
    display: block;
    pointer-events: none;
    background: rgba(0, 0, 0, .44);
    opacity: 0;
    transition: opacity .2s ease;
  }
  body.mobile-menu-open .mobile-menu-overlay {
    pointer-events: auto;
    opacity: 1;
  }
  .sidebar {
    position: fixed;
    z-index: 999;
    top: 0;
    left: 0;
    right: auto;
    bottom: auto;
    width: min(316px, calc(100vw - 42px));
    height: 100dvh;
    padding: 22px 16px calc(18px + env(safe-area-inset-bottom));
    border-right: 1px solid rgba(255, 255, 255, .13);
    border-top: 0;
    background:
      linear-gradient(180deg, rgba(32, 33, 35, .96), rgba(13, 13, 15, .94)),
      rgba(0, 0, 0, .86);
    border-radius: 0 24px 24px 0;
    transform: translateX(-104%);
    transition: transform .24s ease;
    box-shadow: 22px 0 60px rgba(0, 0, 0, .36), inset -1px 0 0 rgba(255, 255, 255, .04);
    overflow-y: auto;
  }
  body.mobile-menu-open .sidebar { transform: translateX(0); }
  [data-theme="light"] .sidebar {
    background:
      linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(245, 247, 250, .91)),
      rgba(255, 255, 255, .88);
  }
  .sidebar-head {
    margin-bottom: 24px;
  }
  .brand {
    margin-bottom: 0;
  }
  .menu-close {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, .055);
  }
  .sidebar nav {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    padding-bottom: 176px;
    overflow: visible;
  }
  .sidebar nav a {
    min-height: 48px;
    font-size: 14px;
    padding: 12px 13px;
    white-space: nowrap;
    background: rgba(255, 255, 255, .045);
    border-color: rgba(255, 255, 255, .08);
  }
  .sidebar nav a[data-menu-key="settings"] { display: none; }
  .sidebar nav a.active {
    color: #101112;
    background: linear-gradient(135deg, #eef59b, #cfd8f6);
    box-shadow: 0 12px 30px rgba(232, 244, 138, .22);
  }
  .menu-footer {
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: calc(16px + env(safe-area-inset-bottom));
    display: grid;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, .10);
  }
  .menu-settings,
  .menu-option,
  .logout {
    display: flex;
    min-height: 46px;
    border-color: rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .045);
    font-size: 14px;
    width: 100%;
  }
  .menu-option {
    cursor: pointer;
  }
  .main-content { padding: 14px 14px 92px; }
  .setup-section { grid-template-columns: 1fr; }
  .metric-grid { grid-template-columns: 1fr; }
  .filter-bar { grid-template-columns: 1fr; }
  .list-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .list-row .mini-danger { grid-column: 2 / -1; justify-self: start; }
  .panel { padding: 14px; }
  .topbar { align-items: flex-start; gap: 12px; }
  .topbar-menu {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 44px;
    height: 44px;
    border: 1px solid var(--glass-edge);
    border-radius: 50%;
    color: var(--text);
    background: rgba(255, 255, 255, .07);
    box-shadow: var(--glass-shadow);
  }

  body[data-page="dashboard"] .topbar,
  body[data-page="dashboard"] > .app-shell .metric-grid,
  body[data-page="dashboard"] > .app-shell .content-grid {
    display: none;
  }

  .mobile-finance-app {
    display: grid;
    gap: 22px;
    max-width: 430px;
    margin: 0 auto;
  }

  .mobile-hero {
    position: relative;
    overflow: hidden;
    min-height: 390px;
    padding: 28px 24px 24px;
    border-radius: 0 0 30px 30px;
    background:
      radial-gradient(circle at 82% 12%, rgba(232, 244, 138, .74), transparent 8rem),
      radial-gradient(circle at 52% 62%, rgba(207, 216, 246, .78), transparent 13rem),
      linear-gradient(135deg, rgba(244, 247, 221, .92), rgba(205, 215, 245, .86));
    color: #202124;
    box-shadow: 0 26px 70px rgba(0, 0, 0, .38), inset 0 1px 0 rgba(255, 255, 255, .80);
  }
  [data-theme="dark"] .mobile-hero::after {
    content: "";
    position: absolute;
    inset: auto -24px -70px -24px;
    height: 160px;
    background: linear-gradient(180deg, transparent, rgba(14, 14, 16, .84) 62%);
    pointer-events: none;
  }
  .mobile-hero-nav {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 34px;
  }
  .mobile-pill {
    display: grid;
    place-items: center;
    min-width: 62px;
    height: 48px;
    padding: 0 18px;
    border: 0;
    border-radius: 999px;
    background: rgba(29, 29, 30, .94);
    color: #f6f7f8;
    font-size: 22px;
    box-shadow: 0 16px 38px rgba(0, 0, 0, .25), inset 0 1px 0 rgba(255, 255, 255, .10);
  }
  .mobile-pill i {
    font-size: 19px;
  }
  .mobile-greeting {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 2px;
    margin-bottom: 32px;
    font-size: 37px;
    line-height: 1.05;
    letter-spacing: 0;
  }
  .mobile-greeting span { font-weight: 300; }
  .mobile-greeting strong { font-weight: 850; }
  .mobile-balance-card {
    position: relative;
    z-index: 1;
    display: grid;
    gap: 10px;
    padding: 24px;
    min-height: 126px;
    border-radius: 22px;
    background: rgba(26, 26, 28, .96);
    color: #f7f7f8;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .32), inset 0 1px 0 rgba(255, 255, 255, .08);
  }
  .mobile-balance-card span { color: rgba(255, 255, 255, .68); }
  .mobile-balance-card strong {
    justify-self: end;
    font-size: 31px;
    font-weight: 760;
  }

  .mobile-mini-ledger,
  .mobile-report-card,
  .mobile-goals-card {
    position: relative;
    overflow: hidden;
    padding: 20px;
    border-radius: 22px;
    border: 1px solid rgba(255, 255, 255, .10);
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025)),
      rgba(20, 18, 21, .88);
    box-shadow: 0 24px 58px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .07);
    backdrop-filter: blur(22px) saturate(145%);
    -webkit-backdrop-filter: blur(22px) saturate(145%);
  }
  [data-theme="light"] .mobile-mini-ledger,
  [data-theme="light"] .mobile-report-card,
  [data-theme="light"] .mobile-goals-card {
    background:
      linear-gradient(145deg, rgba(255, 255, 255, .70), rgba(255, 255, 255, .36)),
      rgba(255, 255, 255, .74);
  }
  .mobile-mini-ledger {
    gap: 12px;
    margin-top: -70px;
    z-index: 2;
  }
  .mobile-mini-ledger div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 5px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
  }
  .mobile-mini-ledger div:last-child { border-bottom: 0; }
  .mobile-mini-ledger span { color: var(--muted); }
  .mobile-mini-ledger strong { font-size: 16px; }

  .mobile-action-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
  }
  .mobile-action-card {
    display: grid;
    align-content: space-between;
    min-height: 128px;
    padding: 18px 12px 16px;
    border: 1px solid rgba(255, 255, 255, .08);
    border-radius: 18px;
    background: rgba(18, 15, 18, .94);
    color: var(--text);
    box-shadow: 0 18px 42px rgba(0, 0, 0, .24), inset 0 1px 0 rgba(255, 255, 255, .06);
  }
  .mobile-action-card span {
    justify-self: end;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border: 2px solid #dfe8de;
    border-radius: 50%;
    color: #eef59b;
    font-weight: 800;
  }
  .mobile-action-card.income span { border-color: #eef59b; }
  .mobile-action-card small {
    align-self: end;
    color: rgba(255, 255, 255, .62);
    font-size: 13px;
  }
  .mobile-action-card strong {
    display: block;
    font-size: 18px;
    line-height: 1;
  }

  .mobile-report-card .panel-head,
  .mobile-goals-card .panel-head {
    margin-bottom: 18px;
  }
  .mobile-report-card h2,
  .mobile-goals-card h2 {
    font-size: 23px;
  }
  .mobile-bar-chart {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: end;
    gap: 10px;
    min-height: 150px;
    margin-bottom: 18px;
  }
  .mobile-bar-item {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
    height: 150px;
    color: rgba(255, 255, 255, .72);
    font-size: 13px;
  }
  .mobile-bar-item i {
    align-self: end;
    display: block;
    min-height: 8px;
    border-radius: 14px 14px 0 0;
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--bar-color) 72%, white), var(--bar-color)),
      var(--bar-color);
    box-shadow: 0 12px 28px color-mix(in srgb, var(--bar-color) 26%, transparent);
  }
  .mobile-chart-legend {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 14px;
  }
  .mobile-chart-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: rgba(255, 255, 255, .72);
    font-size: 12px;
  }
  [data-theme="light"] .mobile-chart-legend span,
  [data-theme="light"] .mobile-bar-item {
    color: rgba(16, 21, 29, .66);
  }
  .mobile-chart-legend i {
    flex: 0 0 auto;
    width: 12px;
    height: 12px;
    border-radius: 3px;
  }

  .mobile-new-goal {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    min-height: 106px;
    padding: 22px;
    margin-bottom: 16px;
    border-radius: 22px;
    color: #202124;
    background:
      radial-gradient(circle at 88% 14%, rgba(232, 244, 138, .88), transparent 5rem),
      linear-gradient(135deg, rgba(244, 247, 221, .94), rgba(205, 215, 245, .90));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .80);
  }
  .mobile-new-goal span,
  .mobile-new-goal strong {
    grid-column: 1;
    display: block;
  }
  .mobile-new-goal span { color: rgba(32, 33, 36, .62); }
  .mobile-new-goal strong { font-size: 24px; line-height: 1; }
  .mobile-new-goal b {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 2px solid rgba(32, 33, 36, .70);
    border-radius: 50%;
    font-size: 22px;
    line-height: 1;
  }
  .mobile-goal-list {
    display: grid;
    gap: 14px;
  }
  .mobile-goal-row {
    padding: 17px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    border: 1px solid rgba(255, 255, 255, .08);
  }
  .mobile-goal-row .panel-head { margin-bottom: 10px; }
  .mobile-goal-row h3 { font-size: 16px; }
  .mobile-goal-row small { color: var(--muted); }
  .mobile-goal-scale {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 12px;
  }
  .mobile-goal-row .progress {
    height: 18px;
    margin: 8px 0 14px;
    background: rgba(0, 0, 0, .34);
  }
  .mobile-goal-row .progress-bar {
    background: linear-gradient(90deg, #eef59b, #dbe4f8);
    border-right: 2px solid rgba(255, 255, 255, .86);
  }

  .mobile-action-bar {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom));
    z-index: 997;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    align-items: center;
    min-height: 74px;
    padding: 10px 8px;
    border: 1px solid rgba(255, 255, 255, .10);
    border-radius: 28px;
    background:
      linear-gradient(180deg, rgba(38, 38, 39, .96), rgba(20, 20, 21, .97)),
      #181819;
    box-shadow: 0 -12px 46px rgba(0, 0, 0, .34), inset 0 1px 0 rgba(255, 255, 255, .08);
    backdrop-filter: blur(20px) saturate(145%);
    -webkit-backdrop-filter: blur(20px) saturate(145%);
  }
  .mobile-action-bar a,
  .mobile-action-bar button {
    position: relative;
    display: grid;
    place-items: center;
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 0;
    border-radius: 16px;
    background: transparent;
    color: rgba(255, 255, 255, .78);
    font-size: 20px;
    transition: color .18s ease, background .18s ease, transform .18s ease;
  }
  .mobile-action-bar a:not(:first-child)::before,
  .mobile-action-bar button::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    bottom: 11px;
    width: 1px;
    background: rgba(255, 255, 255, .10);
    transform: translateX(-50%);
  }
  .mobile-action-bar a.active,
  .mobile-action-bar a:hover,
  .mobile-action-bar button:hover {
    color: #f8fafc;
    background: rgba(255, 255, 255, .055);
  }
  .mobile-action-bar button:active,
  .mobile-action-bar a:active {
    transform: translateY(1px);
  }
}
