:root {
  --bg: #eef4f5;
  --surface: #ffffff;
  --surface-soft: #f6f8f7;
  --ink: #111412;
  --muted: #78807b;
  --line: #e6ebe8;
  --lime: #b7ff37;
  --lime-soft: #efffd5;
  --blue: #93b8ff;
  --orange: #ffad78;
  --violet: #a997f8;
  --pink: #f2a6bf;
  --shadow: 0 18px 50px rgba(35, 55, 48, .07);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; }
button { color: inherit; }
button, select { cursor: pointer; }
.hidden { display: none !important; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3, strong, .brand { font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif; }
h1 { font-size: clamp(25px, 3vw, 34px); letter-spacing: -.04em; }
h2 { font-size: 20px; letter-spacing: -.025em; }
small, .label { color: var(--muted); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: 248px;
  padding: 30px 22px 24px;
  background: rgba(238, 244, 245, .92);
  display: flex;
  flex-direction: column;
  z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 21px; font-weight: 800; text-decoration: none; color: var(--ink); }
.brand-logo {
  width: 38px;
  height: 38px;
  object-fit: contain;
  display: block;
}
.brand-mark {
  width: 35px; height: 35px; border-radius: 12px 12px 12px 4px;
  display: grid; place-items: center; background: var(--lime); transform: rotate(-5deg);
}
.nav-list { display: grid; gap: 7px; margin-top: 52px; }
.nav-item {
  border: 0; background: transparent; border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; gap: 13px; color: #5e6661; text-align: left;
}
.nav-item:hover { background: rgba(255,255,255,.55); }
.nav-item.active { background: var(--ink); color: white; box-shadow: 0 10px 20px rgba(17,20,18,.12); }
.nav-icon, [data-icon] { display: inline-grid; place-items: center; }
.nav-icon svg, [data-icon] svg { width: 19px; height: 19px; }
.sidebar-bottom { margin-top: auto; display: grid; gap: 20px; }
.profile-mini { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding-top: 22px; border-top: 1px solid #dce4e0; }
.profile-mini strong { font-size: 13px; display: block; }
.profile-mini small { font-size: 11px; }
.avatar { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #ffd4bd; font: 700 12px "Manrope"; }

.main { grid-column: 2; padding: 30px 42px 60px; max-width: 1540px; width: 100%; margin: 0 auto; }
.topbar { display: flex; justify-content: space-between; align-items: center; min-height: 67px; margin-bottom: 30px; gap: 20px; }
.topbar-copy p { font-size: 12px; text-transform: uppercase; letter-spacing: .11em; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  border: 1px solid rgba(15,20,17,.09); background: rgba(255,255,255,.7);
}
.icon-btn:hover { background: white; }
.icon-btn.small { width: 29px; height: 29px; border: 0; background: transparent; }
.notification-btn { position: relative; }
.notification-btn i { position: absolute; width: 7px; height: 7px; border-radius: 50%; background: #ff705c; top: 8px; right: 7px; border: 2px solid white; }
.primary-btn, .lime-btn, .outline-btn {
  min-height: 46px; padding: 0 19px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 700; display: inline-flex; align-items: center; justify-content: center; gap: 9px;
}
.primary-btn, .lime-btn { background: var(--lime); color: #111; box-shadow: inset 0 0 0 1px rgba(255,255,255,.45); }
.primary-btn:hover, .lime-btn:hover { background: #a8f720; transform: translateY(-1px); }
.outline-btn { background: transparent; border-color: #dce4e0; }
.outline-btn:hover { background: var(--surface-soft); }
.outline-btn.compact { min-height: 42px; padding: 0 15px; }
.full { width: 100%; }
.menu-btn { display: none; }

.page { display: none; animation: fadeIn .28s ease; }
.page.active { display: block; }
@keyframes fadeIn { from { opacity: .4; transform: translateY(6px); } }
.card { background: var(--surface); border: 1px solid rgba(15,20,17,.055); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.hero-grid { display: grid; grid-template-columns: 1.18fr .82fr; gap: 20px; }
.balance-card {
  min-height: 288px; background: #111412; color: white; border-radius: 30px; padding: 28px 30px;
  position: relative; overflow: hidden; box-shadow: 0 24px 55px rgba(17,20,18,.18);
}
.balance-card::after {
  content: ""; position: absolute; width: 270px; height: 270px; border: 1px solid rgba(183,255,55,.18);
  border-radius: 45%; right: -83px; top: -83px; box-shadow: 0 0 0 50px rgba(183,255,55,.03), 0 0 0 100px rgba(183,255,55,.02);
}
.card-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.card-top > div { display: flex; align-items: center; gap: 8px; }
.balance-card .label { color: #9fa6a2; }
.ghost-icon { color: #9fa6a2; border: 0; background: transparent; padding: 3px; }
.ghost-icon svg { width: 16px; }
.account-pill { font-size: 12px; background: rgba(255,255,255,.1); padding: 8px 12px; border-radius: 99px; }
.balance-line { display: flex; align-items: flex-start; gap: 7px; margin: 24px 0 28px; position: relative; z-index: 1; }
.balance-line .currency { color: var(--lime); font-size: 29px; margin-top: 6px; font-weight: 600; }
.balance-line strong { font-size: clamp(42px, 5vw, 58px); line-height: 1; letter-spacing: -.055em; }
.balance-actions { display: flex; gap: 11px; position: relative; z-index: 1; }
.balance-actions .outline-btn { color: white; border-color: #3a403c; }
.balance-actions .outline-btn:hover { background: #202522; }
.round-icon { width: 25px; height: 25px; border: 1px solid currentColor; border-radius: 50%; }
.round-icon svg { width: 14px; }
.cashflow-card { display: flex; flex-direction: column; justify-content: space-between; }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; }
.card-heading .label { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; }
.card-heading h2 { margin-top: 4px; }
.text-btn { border: 0; background: transparent; color: #59615d; font-size: 12px; padding: 4px; white-space: nowrap; }
.text-btn span { margin-left: 4px; }
.flow-row { display: grid; grid-template-columns: 1fr 1fr; margin: 28px 0 20px; }
.flow-item { display: flex; align-items: center; gap: 12px; }
.flow-item + .flow-item { padding-left: 22px; border-left: 1px solid var(--line); }
.flow-icon { width: 38px; height: 38px; border-radius: 50%; }
.flow-icon.income { background: var(--lime-soft); color: #568207; }
.flow-icon.expense { background: #ffebe2; color: #d46b35; }
.flow-icon.savings { background: #e8e3ff; color: #6551ba; }
.flow-item small, .flow-item strong { display: block; }
.flow-item strong { font-size: 20px; margin-top: 2px; }
.flow-track { height: 12px; display: flex; border-radius: 99px; overflow: hidden; background: #edf1ef; gap: 3px; }
.flow-track span:first-child { background: var(--lime); }
.flow-track span:last-child { background: #202522; }
.flow-caption { font-size: 12px; color: var(--muted); margin-top: 10px; }

.dashboard-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 20px; margin-top: 20px; }
.spending-content { display: grid; grid-template-columns: 240px 1fr; align-items: center; gap: 24px; padding-top: 24px; }
.donut-wrap { display: grid; place-items: center; }
.donut { width: 190px; height: 190px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.donut::after { content: ""; position: absolute; inset: 22px; background: var(--surface); border-radius: 50%; }
.donut-center { position: relative; z-index: 1; text-align: center; }
.donut-center small, .donut-center strong { display: block; }
.donut-center strong { font-size: 24px; margin-top: 5px; }
.category-list { display: grid; gap: 12px; }
.category-row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.category-dot { width: 10px; height: 10px; border-radius: 50%; }
.category-row span { color: #505853; }
.category-row strong { font-size: 13px; }
.select-control { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 12px; padding: 9px 12px; color: #4f5752; font-size: 12px; outline: none; }
.mode-select { min-height: 44px; font-weight: 700; }
.wide-select { width: 100%; min-height: 46px; margin: 15px 0; }
.budget-preview { margin-top: 25px; display: grid; gap: 22px; }
.budget-item-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.budget-name { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.budget-name i { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-style: normal; }
.budget-item-top small b { color: var(--ink); }
.budget-actions, .row-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.entity-action {
  border: 0;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.entity-action.delete { background: #fff0ed; color: #a74d45; }
.entity-action.edit { background: #eef4ff; color: #3755b9; }
.progress { height: 8px; border-radius: 99px; background: #edf1ef; overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: inherit; background: var(--lime); }
.progress span.warning { background: #ffad78; }
.progress span.over { background: #ff705c; }
.lower-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 20px; margin-top: 20px; }
.transaction-list { margin-top: 16px; }
.transaction-row { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 13px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.transaction-row:last-child { border-bottom: 0; }
.transaction-symbol { width: 40px; height: 40px; border-radius: 13px; display: grid; place-items: center; font-weight: 800; font-size: 13px; }
.transaction-main strong, .transaction-main small { display: block; }
.transaction-main strong { font-size: 14px; }
.transaction-main small { font-size: 11px; margin-top: 2px; }
.transaction-date { font-size: 11px; color: var(--muted); }
.transaction-amount { min-width: 90px; text-align: right; font-size: 14px; }
.transaction-amount.income { color: #568207; }
.delete-transaction { width: 27px; height: 27px; display: none; border: 0; border-radius: 50%; color: #a74d45; background: #fff0ed; }
.full-list .transaction-row:hover .delete-transaction { display: grid; place-items: center; }
.goal-card { background: linear-gradient(145deg, #f9f8ff, #fff); }
.goal-visual { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 18px; }
.goal-orbit { width: 74px; height: 74px; border-radius: 24px; display: grid; place-items: center; background: #ded7ff; transform: rotate(-4deg); }
.goal-orbit span { transform: rotate(4deg); }
.goal-orbit svg { width: 31px; height: 31px; }
.goal-badge { background: #111412; color: white; padding: 8px 10px; border-radius: 99px; font: 700 11px "Manrope"; }
.goal-card h2 { margin: 5px 0 18px; }
.goal-value { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.goal-value strong { font-size: 21px; }
.goal-value span { color: var(--muted); font-size: 11px; }
.goal-card .progress span { background: var(--violet); }
.goal-card .outline-btn { margin-top: 20px; }

.section-heading { display: flex; align-items: flex-end; justify-content: space-between; margin: 8px 0 25px; gap: 20px; }
.section-heading .label { text-transform: uppercase; letter-spacing: .1em; font-size: 11px; font-weight: 700; }
.section-heading h2 { font-size: 30px; margin-top: 4px; }
.filter-bar { padding: 14px; display: flex; gap: 10px; margin-bottom: 16px; }
.search-field { flex: 1; min-width: 250px; display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; background: var(--surface-soft); }
.search-field input { width: 100%; border: 0; outline: 0; background: transparent; }
.table-card { padding: 10px 24px; }
.table-card .transaction-list { margin: 0; }
.table-card .transaction-row { grid-template-columns: auto 1fr 120px 110px 30px; padding: 15px 0; }
.empty-state { text-align: center; padding: 45px 20px; color: var(--muted); }
.empty-state strong { color: var(--ink); display: block; margin-bottom: 4px; }

.summary-strip { display: grid; grid-template-columns: repeat(4, 1fr); background: #111412; color: white; border-radius: 24px; padding: 24px 28px; margin-bottom: 20px; }
.summary-strip div + div { border-left: 1px solid #343936; padding-left: 28px; }
.summary-strip small, .summary-strip strong { display: block; }
.summary-strip small { color: #949b97; }
.summary-strip strong { font-size: 24px; margin-top: 5px; }
.budget-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.budget-tile { min-height: 210px; display: flex; flex-direction: column; }
.budget-tile .budget-name i { width: 44px; height: 44px; border-radius: 14px; }
.budget-tile .budget-values { margin-top: auto; padding-top: 25px; display: flex; justify-content: space-between; align-items: flex-end; }
.budget-tile .budget-values strong { display: block; font-size: 24px; }
.budget-tile .budget-values small { font-size: 11px; }
.budget-tile .progress { margin-top: 13px; height: 10px; }

.button-row { display: flex; gap: 10px; }
.report-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 20px; }
.mini-stat { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; }
.mini-stat .flow-icon { grid-row: 1 / 4; }
.mini-stat strong { font-size: 25px; line-height: 1.1; }
.mini-stat em { font-style: normal; font-size: 11px; color: var(--muted); margin-top: 5px; }
.reports-grid { display: grid; grid-template-columns: 1.5fr .5fr; gap: 20px; }
.chart-legend { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 5px; }
.chart-legend span { width: 8px; height: 8px; border-radius: 50%; display: inline-block; margin-left: 7px; }
.income-dot { background: var(--lime); }
.expense-dot { background: #1b211d; }
.line-chart { height: 315px; margin-top: 25px; position: relative; }
.line-chart svg { width: 100%; height: 100%; overflow: visible; }
.chart-grid { stroke: #e8ecea; stroke-width: 1; }
.chart-income { fill: none; stroke: var(--lime); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; }
.chart-expense { fill: none; stroke: #1b211d; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chart-label { font: 11px "DM Sans"; fill: #8c938f; }
.recurring-card { min-width: 260px; }
.recurring-row { padding: 16px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 10px; }
.recurring-row:last-child { border-bottom: 0; }
.recurring-row strong, .recurring-row small { display: block; }
.recurring-row strong { font-size: 13px; }
.recurring-row small { font-size: 10px; margin-top: 2px; }
.recurring-row > strong { white-space: nowrap; }

.goals-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.goal-tile { min-height: 260px; display: flex; flex-direction: column; position: relative; overflow: hidden; }
.goal-tile::after { content: ""; position: absolute; width: 150px; height: 150px; border-radius: 50%; right: -65px; top: -65px; background: var(--goal-color); opacity: .18; }
.goal-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--goal-color); margin-bottom: 25px; position: relative; z-index: 1; }
.goal-tile h3 { font-size: 19px; margin-bottom: 4px; }
.goal-tile .goal-date { color: var(--muted); font-size: 11px; }
.goal-tile .goal-value { margin-top: auto; }
.goal-tile .progress span { background: var(--goal-color); }
.goal-actions { display: flex; gap: 8px; margin-top: 14px; }

.mockup-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(210px, 1fr));
  gap: 22px;
  padding: 28px;
  border-radius: 34px;
  background:
    radial-gradient(circle at 14% 10%, rgba(183,255,55,.25), transparent 26%),
    radial-gradient(circle at 80% 18%, rgba(147,184,255,.18), transparent 25%),
    linear-gradient(135deg, #f7fbfa, #e8f1f2);
  box-shadow: var(--shadow);
  border: 1px solid rgba(15,20,17,.06);
}
.mockup-board.dark-preview {
  background:
    radial-gradient(circle at 18% 12%, rgba(183,255,55,.18), transparent 27%),
    radial-gradient(circle at 82% 16%, rgba(169,151,248,.2), transparent 28%),
    linear-gradient(135deg, #151b18, #101412);
}
.mock-theme.active { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.mock-phone {
  min-height: 390px;
  display: flex;
  flex-direction: column;
  gap: 13px;
  padding: 18px;
  border-radius: 34px;
  background: rgba(255,255,255,.92);
  border: 7px solid #fff;
  box-shadow: 0 24px 45px rgba(35,55,48,.14);
  overflow: hidden;
}
.dark-preview .mock-phone { background: #1b211e; border-color: #252c28; color: #f4f7f5; box-shadow: 0 24px 45px rgba(0,0,0,.25); }
.mock-top { display: flex; align-items: center; justify-content: space-between; font: 800 11px "Manrope"; }
.mock-dots { width: 32px; height: 12px; border-radius: 999px; background: linear-gradient(90deg, var(--ink) 0 22%, transparent 22% 39%, var(--ink) 39% 60%, transparent 60% 76%, var(--ink) 76%); opacity: .75; }
.dark-preview .mock-dots { background: linear-gradient(90deg, #f4f7f5 0 22%, transparent 22% 39%, #f4f7f5 39% 60%, transparent 60% 76%, #f4f7f5 76%); }
.mock-label { font: 800 18px/1.05 "Manrope"; letter-spacing: -.04em; }
.mock-balance-card, .mock-panel {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.dark-preview .mock-balance-card, .dark-preview .mock-panel { background: #242b27; border-color: #343d38; }
.mock-balance-card { background: #111412; color: white; min-height: 212px; position: relative; overflow: hidden; }
.mock-balance-card::after { content: ""; position: absolute; right: -38px; top: -38px; width: 130px; height: 130px; border-radius: 50%; border: 1px solid rgba(183,255,55,.22); box-shadow: 0 0 0 32px rgba(183,255,55,.05); }
.mock-balance-card span, .mock-balance-card em { color: #aeb6b1; font-style: normal; font-size: 11px; }
.mock-balance-card strong { font-size: 25px; letter-spacing: -.05em; position: relative; z-index: 1; }
.mock-inline { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 1; }
.mock-inline b { font-size: 12px; }
.mock-pie { width: 88px; height: 88px; border-radius: 50%; background: conic-gradient(var(--lime) 0 37%, var(--orange) 37% 58%, var(--violet) 58% 79%, var(--blue) 79% 100%); margin-top: auto; }
.mock-pie::after { content: ""; display: block; width: 48px; height: 48px; margin: 20px; border-radius: 50%; background: #111412; }
.mock-chip-row { display: flex; flex-wrap: wrap; gap: 7px; }
.mock-chip-row span {
  background: var(--lime-soft);
  border: 1px solid rgba(183,255,55,.5);
  color: #3f5f05;
  border-radius: 999px;
  padding: 7px 9px;
  font-size: 10px;
  font-weight: 800;
}
.dark-preview .mock-chip-row span { background: rgba(183,255,55,.13); color: #d7ff95; border-color: rgba(183,255,55,.25); }
.mock-chip-row.tight span { font-size: 9px; padding: 6px 8px; }
.mock-line { height: 84px; border-radius: 18px; background: linear-gradient(135deg, rgba(183,255,55,.9), rgba(183,255,55,.12)); position: relative; overflow: hidden; }
.mock-line::after { content: ""; position: absolute; inset: 18px 12px; border-radius: 18px; border: 3px solid rgba(17,20,18,.3); border-left: 0; border-bottom: 0; transform: skewX(-12deg); }
.mock-line.expense { background: linear-gradient(135deg, #ffad78, #ffeadf); }
.mock-line.trend { background: linear-gradient(135deg, #93b8ff, #e8e3ff); }
.dark-preview .mock-line { background: linear-gradient(135deg, rgba(183,255,55,.72), rgba(183,255,55,.08)); }
.mock-row, .mock-setting { display: flex; justify-content: space-between; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.dark-preview .mock-row, .dark-preview .mock-setting { border-color: #343d38; }
.mock-row:last-child, .mock-setting:last-child { border-bottom: 0; padding-bottom: 0; }
.mock-row span, .mock-setting span { color: var(--muted); font-size: 11px; }
.mock-row b, .mock-setting b { font-size: 11px; text-align: right; }
.mock-bars { height: 108px; display: flex; align-items: end; gap: 10px; margin-top: auto; }
.mock-bars span { flex: 1; border-radius: 999px 999px 12px 12px; background: var(--lime); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }

.business-grid, .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.lower-business { align-items: start; }
.business-list { display: grid; gap: 15px; margin-top: 22px; }
.business-row { display: grid; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.business-row:last-child { border-bottom: 0; padding-bottom: 0; }
.business-row > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.business-row > div:first-child > div:first-child { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex: 1; }
.business-row strong { font-size: 14px; }
.business-row small, .business-row > span { color: var(--muted); font-size: 12px; }
.business-row > span { display: block; }
.alert-list { display: grid; gap: 12px; margin-top: 22px; }
.alert-card { padding: 14px 15px; border-radius: 16px; background: var(--surface-soft); border: 1px solid var(--line); }
.alert-card strong, .alert-card small { display: block; }
.alert-card small { margin-top: 4px; color: var(--muted); }
.alert-card.warning { background: #fff7df; border-color: #ffe2a4; }
.alert-card.danger { background: #fff0ed; border-color: #ffd0c9; }
.alert-card.info { background: #eff7ff; border-color: #cfe7ff; }
.settings-card h2 { margin: 5px 0 15px; }
.profile-settings-card { grid-column: span 2; }
.profile-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.profile-form label { display: grid; gap: 6px; color: var(--muted); font-size: 12px; font-weight: 700; }
.profile-form input, .profile-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 11px 12px;
  outline: none;
  resize: vertical;
}
.profile-form .full-row, .profile-form .full { grid-column: 1 / -1; }
.segmented { display: grid; grid-template-columns: repeat(3, 1fr); background: var(--surface-soft); padding: 4px; border-radius: 15px; }
.segmented button { border: 0; background: transparent; border-radius: 12px; padding: 12px; font-weight: 800; color: var(--muted); }
.segmented button.active { background: var(--ink); color: var(--surface); }
.inline-form { display: grid; grid-template-columns: .8fr 1fr auto; gap: 9px; margin-top: 10px; }
.inline-form input {
  min-width: 0; border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink);
  border-radius: 12px; padding: 10px 12px; outline: none;
}
.hint { color: var(--muted); font-size: 12px; margin-top: 12px; }
.security-note { border: 1px solid var(--line); background: var(--surface-soft); border-radius: 18px; padding: 16px; }
.security-note strong, .security-note small { display: block; }
.security-note small { color: var(--muted); margin-top: 6px; }
.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(238, 244, 245, .94);
  backdrop-filter: blur(10px);
}
.auth-card {
  width: min(420px, 100%);
  padding: 28px;
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.auth-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.auth-brand .brand-logo { width: 48px; height: 48px; }
.auth-brand strong { display: block; font-size: 20px; }
.auth-brand small { color: var(--muted); }
.auth-tabs { grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.auth-tabs button { padding-block: 11px; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
.auth-form input {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--ink);
  border-radius: 12px;
  padding: 12px 14px;
  outline: none;
}
.auth-hint { color: var(--muted); font-size: 12px; margin-top: 14px; }
.app-shell.locked { filter: blur(2px); pointer-events: none; user-select: none; }
.release-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 10px;
  color: var(--muted);
}
.release-card { min-height: 100%; }
.managed-category-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.managed-category { display: inline-flex; align-items: center; gap: 7px; padding: 8px 10px; border-radius: 999px; background: var(--surface-soft); border: 1px solid var(--line); font-size: 12px; font-weight: 700; }
.managed-category button { border: 0; width: 20px; height: 20px; border-radius: 50%; background: #fff0ed; color: #a74d45; padding: 0; }
.profit-example { display: grid; gap: 12px; margin-top: 22px; padding: 22px; border-radius: 20px; background: linear-gradient(135deg, #ece8ff, #f6f4ff); }
.profit-example span { color: #6e6788; }
.profit-example strong { font-size: 25px; color: #4e3aa0; }
.live-profit { display: flex; align-items: center; justify-content: space-between; padding: 15px; border-radius: 15px; background: #ece8ff; color: #51466f; margin: 8px 0 14px; }
.live-profit strong { color: #4e3aa0; font-size: 18px; }
body[data-mode="affiliate"] .primary-btn,
body[data-mode="affiliate"] .lime-btn { background: #a997f8; color: #171225; }
body[data-mode="affiliate"] .summary-strip { background: linear-gradient(135deg, #4d3a9b, #201b3f); }
body[data-mode="affiliate"] .nav-item.active { background: #4d3a9b; }
body[data-mode="business"] .summary-strip { background: #111412; }
body.dark .profit-example, body.dark .live-profit { background: #2d2747; color: #c7bfff; }
body.dark .profit-example strong, body.dark .live-profit strong { color: #c8bcff; }

.modal {
  width: min(570px, calc(100vw - 28px)); border: 0; border-radius: 28px; padding: 0;
  background: var(--surface); color: var(--ink); box-shadow: 0 30px 100px rgba(0,0,0,.25);
}
.small-modal { width: min(450px, calc(100vw - 28px)); }
.modal::backdrop { background: rgba(16,23,19,.48); backdrop-filter: blur(5px); }
.modal form { padding: 28px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 22px; }
.modal-head h2 { font-size: 25px; margin-top: 3px; }
.type-switch { display: grid; grid-template-columns: 1fr 1fr; background: var(--surface-soft); padding: 4px; border-radius: 13px; margin-bottom: 22px; }
.type-switch button { border: 0; background: transparent; padding: 10px; border-radius: 10px; font-weight: 700; }
.type-switch button.active { background: var(--surface); box-shadow: 0 3px 10px rgba(0,0,0,.08); }
.amount-field { border-bottom: 1px solid var(--line); display: flex; align-items: center; margin-bottom: 22px; }
.amount-field span { font-size: 28px; color: var(--muted); }
.amount-field input { width: 100%; font: 700 44px "Manrope"; letter-spacing: -.04em; border: 0; outline: 0; background: transparent; padding: 8px; color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal label { display: block; margin-bottom: 14px; }
.modal label > span { display: block; color: #565e59; font-size: 12px; font-weight: 600; margin-bottom: 6px; }
.modal label em { color: var(--muted); font-weight: 400; font-style: normal; }
.modal input:not([type="checkbox"]), .modal select, .modal textarea {
  width: 100%; border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink);
  border-radius: 12px; padding: 11px 12px; outline: none; resize: vertical;
}
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: #9ed727; box-shadow: 0 0 0 3px rgba(183,255,55,.2); }
.checkbox-label { display: flex !important; align-items: center; gap: 8px; }
.checkbox-label span { margin: 0 !important; }
.submit-btn { margin-top: 8px; }
.toast { position: fixed; left: 50%; bottom: 30px; transform: translate(-50%, 25px); opacity: 0; pointer-events: none; background: #111412; color: white; padding: 12px 18px; border-radius: 12px; z-index: 300; transition: .25s ease; box-shadow: 0 12px 30px rgba(0,0,0,.2); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.mobile-nav { display: none; }

body.dark {
  --bg: #111512; --surface: #1a1f1c; --surface-soft: #222824; --ink: #f4f7f5;
  --muted: #9ca49f; --line: #303733; --shadow: 0 18px 50px rgba(0,0,0,.17);
}
body.dark .sidebar { background: rgba(17,21,18,.94); }
body.dark .balance-card { background: #d8ff8e; color: #101310; }
body.dark .balance-card .label, body.dark .balance-card .ghost-icon { color: #4f5c47; }
body.dark .balance-card .account-pill { background: rgba(0,0,0,.08); }
body.dark .balance-actions .outline-btn { color: #111; border-color: rgba(0,0,0,.18); }
body.dark .balance-actions .lime-btn { background: #111; color: white; }
body.dark .donut::after { background: var(--surface); }
body.dark .profile-mini { border-color: var(--line); }
body.dark .icon-btn { background: var(--surface); color: var(--ink); }
body.dark .outline-btn { color: var(--ink); border-color: var(--line); background: rgba(255,255,255,.03); }
body.dark .outline-btn:hover { background: var(--surface-soft); }
body.dark .primary-btn, body.dark .lime-btn { color: #111; }
body.dark .auth-overlay { background: rgba(17, 21, 18, .95); }
body.dark .summary-strip { background: #d8ff8e; color: #111; }
body.dark .summary-strip small { color: #536047; }
body.dark .summary-strip div + div { border-color: rgba(0,0,0,.15); }
body.dark .select-control { color: var(--ink); }
body.dark .alert-card.warning { background: #382d17; border-color: #5d481c; }
body.dark .alert-card.danger { background: #3a201d; border-color: #66352f; }
body.dark .alert-card.info { background: #1b2b35; border-color: #294659; }

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 90px 1fr; }
  .sidebar { width: 90px; padding-inline: 15px; align-items: center; }
  .brand span:last-child, .nav-item span:last-child, .profile-mini > div:not(.avatar), .profile-mini .icon-btn { display: none; }
  .nav-item { justify-content: center; width: 54px; height: 50px; padding: 0; }
  .profile-mini { display: block; }
  .main { grid-column: 2; padding-inline: 28px; }
  .dashboard-grid, .lower-grid { grid-template-columns: 1fr; }
  .budget-grid, .goals-grid, .business-grid, .settings-grid { grid-template-columns: repeat(2, 1fr); }
  .mockup-board { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .reports-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  body { background: #f1f6f6; padding-bottom: 84px; }
  .app-shell { display: block; }
  .sidebar { display: none; }
  .main { padding: 20px 15px 35px; }
  .topbar { margin-bottom: 22px; }
  .topbar-copy p { font-size: 10px; }
  .topbar-copy h1 { font-size: 23px; }
  .topbar-actions .primary-btn, .topbar-actions .icon-btn:first-child { display: none; }
  .mode-select { max-width: 112px; }
  .menu-btn { display: none; }
  .hero-grid, .dashboard-grid, .lower-grid, .reports-grid { display: block; }
  .hero-grid > *, .dashboard-grid > *, .lower-grid > *, .reports-grid > * { margin-bottom: 14px; }
  .balance-card { min-height: 255px; padding: 24px 22px; border-radius: 28px; }
  .balance-line { margin: 26px 0; }
  .balance-line strong { font-size: 44px; }
  .balance-actions > * { flex: 1; padding: 0 10px; }
  .cashflow-card { min-height: 240px; }
  .card { padding: 20px; border-radius: 22px; box-shadow: 0 14px 35px rgba(35,55,48,.06); }
  .spending-content { grid-template-columns: 1fr; }
  .category-list { width: 100%; }
  .goal-card { min-height: 340px; }
  .section-heading { align-items: flex-start; }
  .section-heading h2 { font-size: 25px; }
  .section-heading .primary-btn { min-height: 42px; padding: 0 13px; font-size: 12px; }
  .filter-bar { flex-wrap: wrap; }
  .search-field { flex-basis: 100%; min-height: 43px; min-width: 0; }
  .filter-bar .select-control { flex: 1; }
  .table-card { padding: 6px 16px; }
  .table-card .transaction-row, .transaction-row { grid-template-columns: auto 1fr auto; }
  .transaction-date { display: none; }
  .delete-transaction { display: grid; position: absolute; right: 12px; margin-top: 45px; }
  .full-list .transaction-row { position: relative; padding-right: 5px; }
  .summary-strip { grid-template-columns: 1fr 1fr; padding: 20px; gap: 22px 10px; }
  .summary-strip div + div { border: 0; padding: 0; }
  .summary-strip div:nth-child(even) { border-left: 1px solid #343936; padding-left: 20px; }
  .summary-strip strong { font-size: 20px; }
  .budget-grid, .goals-grid, .report-stats, .business-grid, .settings-grid { grid-template-columns: 1fr; }
  .profile-settings-card { grid-column: auto; }
  .profile-form { grid-template-columns: 1fr; }
  .inline-form { grid-template-columns: 1fr; }
  .button-row .primary-btn, .button-row .outline-btn { padding-inline: 12px; font-size: 11px; }
  .chart-legend { display: none; }
  .line-chart { height: 230px; }
  .form-grid { grid-template-columns: 1fr; gap: 0; }
  .modal form { padding: 22px; }
  .amount-field input { font-size: 38px; }
  .mockup-board { grid-template-columns: 1fr; padding: 16px; border-radius: 24px; }
  .mock-phone { min-height: 360px; border-width: 5px; border-radius: 28px; }
  .mobile-nav {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) 50px repeat(3, minmax(0, 1fr)); align-items: center;
    position: fixed; bottom: 10px; left: 12px; right: 12px; height: 66px; z-index: 30;
    background: #111412; color: #8f9692; border-radius: 22px; padding: 6px 8px; box-shadow: 0 18px 40px rgba(0,0,0,.23);
  }
  .mobile-nav button { border: 0; background: transparent; color: inherit; display: grid; justify-items: center; gap: 2px; }
  .mobile-nav button.active { color: white; }
  .mobile-nav small { font-size: 8.5px; }
  .mobile-nav .mobile-add { width: 46px; height: 46px; border-radius: 50%; background: var(--lime); color: #111; font-size: 27px; align-self: center; justify-self: center; display: grid; place-items: center; box-shadow: 0 0 0 5px #111412; }
  body.dark .mobile-nav { background: #0d100e; color: #aeb6b1; }
  body.dark .mobile-nav button.active { color: #fff; }
}

@media print {
  .sidebar, .topbar, .mobile-nav, .section-heading .button-row { display: none !important; }
  .app-shell, .main { display: block; padding: 0; }
  .page { display: none !important; }
  #reportsPage { display: block !important; }
  body { background: white; }
  .card { box-shadow: none; break-inside: avoid; }
}
