:root {
  --bg-0: #f7f2ea;
  --bg-1: #eef2ff;
  --ink: #111827;
  --ink-soft: #334155;
  --muted: #64748b;
  --card: rgba(255,255,255,.78);
  --card-solid: #ffffff;
  --line: rgba(15,23,42,.10);
  --accent: #111827;
  --accent-2: #7c3aed;
  --accent-3: #0f766e;
  --danger: #b91c1c;
  --danger-bg: #fee2e2;
  --good: #166534;
  --good-bg: #dcfce7;
  --warn: #9a3412;
  --warn-bg: #ffedd5;
  --shadow: 0 24px 80px rgba(15,23,42,.12);
  --shadow-soft: 0 18px 44px rgba(15,23,42,.08);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --max: 1180px;
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 5% 0%, rgba(124,58,237,.14), transparent 34%),
    radial-gradient(circle at 90% 6%, rgba(20,184,166,.13), transparent 30%),
    linear-gradient(135deg, var(--bg-1), var(--bg-0) 56%, #fff7ed);
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .58; cursor: not-allowed; }
a { color: inherit; }

.top-glow {
  position: fixed;
  inset: -160px -120px auto -120px;
  height: 340px;
  background: radial-gradient(circle, rgba(255,255,255,.78), transparent 70%);
  pointer-events: none;
  z-index: -1;
}

.app-shell {
  min-height: 100vh;
  padding: 22px;
}

.screen {
  width: min(var(--max), 100%);
  margin: 0 auto;
}

.layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 20px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 22px;
  border-radius: var(--radius-xl);
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
  padding: 16px;
}

.side-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.text-brand b {
  display: block;
  font-size: 18px;
  line-height: 1.05;
  letter-spacing: -.04em;
}
.text-brand span {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.user-badge {
  margin-top: 18px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.08);
  min-width: 0;
  display: grid;
  gap: 2px;
}
.user-badge b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-badge span { color: var(--muted); font-size: 12px; font-weight: 800; }

.nav { display: grid; gap: 8px; }
.nav-btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  background: transparent;
  font-weight: 900;
  text-align: left;
}
.nav-btn span { width: 22px; text-align: center; font-size: 18px; line-height: 1; }
.nav-btn.active {
  color: #fff;
  background: linear-gradient(135deg, #111827, #263244);
  box-shadow: 0 16px 28px rgba(17,24,39,.18);
}

.main { display: grid; gap: 16px; }

.app-header {
  border-radius: var(--radius-xl);
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.74);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}
.app-header h1 {
  margin: 0;
  font-size: clamp(26px, 3vw, 38px);
  letter-spacing: -.06em;
  line-height: 1;
}
.app-header p {
  margin: 8px 0 0;
  color: var(--muted);
  font-weight: 850;
}

.month-control {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.month-control input {
  min-height: 46px;
  border: 1px solid rgba(15,23,42,.10);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border-radius: 16px;
  padding: 11px 13px;
  outline: none;
  font-weight: 900;
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.stat-card, .card {
  background: var(--card);
  border: 1px solid rgba(255,255,255,.70);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(22px);
}
.stat-card {
  padding: 18px;
  display: grid;
  gap: 9px;
  min-height: 128px;
}
.stat-card span { color: var(--muted); font-size: 13px; font-weight: 900; }
.stat-card strong { font-size: clamp(24px, 3vw, 34px); letter-spacing: -.05em; }
.stat-card small { color: var(--muted); line-height: 1.4; font-weight: 780; }

.card { padding: 20px; }
.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 16px;
}
.card h2 { margin: 0; font-size: 22px; letter-spacing: -.04em; }
.card h3 { margin: 0; font-size: 19px; letter-spacing: -.03em; }
.muted { color: var(--muted); margin: 6px 0 0; line-height: 1.45; }
.settings-text { margin: 0 0 16px; }

.accent-card {
  background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,255,255,.64));
}
.accent-card.light { background: linear-gradient(135deg, rgba(236,253,245,.92), rgba(255,255,255,.72)); }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.overview-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; }
.transaction-grid { align-items: start; }
.goals-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }

.form-grid { display: grid; gap: 14px; }
.field { display: grid; gap: 8px; }
.field label { color: var(--ink-soft); font-size: 13px; font-weight: 850; }
.input, .select, .textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255,255,255,.92);
  color: var(--ink);
  border-radius: 18px;
  padding: 14px 15px;
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.textarea { min-height: 92px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(124,58,237,.48);
  box-shadow: 0 0 0 4px rgba(124,58,237,.10);
}

.password-wrap { position: relative; }
.password-wrap .input { padding-right: 54px; }
.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--ink);
  background: rgba(17,24,39,.06);
  box-shadow: none;
  font-size: 16px;
}

.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn {
  border: 0;
  border-radius: 18px;
  padding: 13px 17px;
  font-weight: 950;
  color: #fff;
  background: linear-gradient(135deg, #111827, #1f2937);
  box-shadow: 0 14px 28px rgba(17,24,39,.20);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
}
.btn.secondary {
  background: rgba(17,24,39,.07);
  color: var(--ink);
  box-shadow: none;
  border: 1px solid rgba(15,23,42,.10);
}
.btn.soft {
  color: var(--ink);
  background: #fff;
  border: 1px solid rgba(15,23,42,.10);
  box-shadow: 0 12px 28px rgba(15,23,42,.08);
}
.btn.danger {
  background: var(--danger-bg);
  color: var(--danger);
  box-shadow: none;
}
.btn.compact { min-height: 46px; padding: 11px 14px; }

.status-line { min-height: 22px; color: var(--muted); font-weight: 800; }
.status-line.error { color: var(--danger); }
.status-line.ok { color: var(--good); }

.entry-list { display: grid; gap: 10px; }
.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 13px;
  border-radius: 18px;
  background: rgba(255,255,255,.70);
  border: 1px solid rgba(15,23,42,.07);
}
.entry-main { min-width: 0; }
.entry-title { font-weight: 950; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.entry-meta { margin-top: 4px; color: var(--muted); font-size: 12px; font-weight: 800; }
.entry-side { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.entry-amount { text-align: right; font-weight: 950; font-size: 18px; white-space: nowrap; }
.amount-expense { color: var(--danger); }
.amount-income { color: var(--good); }

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.70);
  display: inline-grid;
  place-items: center;
  box-shadow: none;
  font-weight: 950;
}

.empty {
  padding: 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed rgba(15,23,42,.18);
  border-radius: 22px;
  background: rgba(255,255,255,.52);
  line-height: 1.55;
  font-weight: 750;
}
.small-empty { padding: 18px; }

.bar-list { display: grid; gap: 13px; }
.bar-row { display: grid; gap: 7px; }
.bar-label { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; font-weight: 900; }
.bar-track { height: 12px; background: rgba(15,23,42,.08); border-radius: 999px; overflow: hidden; }
.bar-fill { height: 100%; width: 0%; border-radius: 999px; background: linear-gradient(90deg, #111827, #7c3aed); }
.bar-fill.good { background: linear-gradient(90deg, #0f766e, #14b8a6); }
.bar-fill.warn { background: linear-gradient(90deg, #ea580c, #f97316); }
.bar-fill.danger { background: linear-gradient(90deg, #b91c1c, #ef4444); }
.big-progress { display: grid; gap: 9px; }
.summary-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 900; }
.summary-line b { color: var(--ink); }

.category-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.category-card {
  padding: 13px;
  border-radius: 18px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(15,23,42,.07);
  display: grid;
  gap: 10px;
}
.category-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.category-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.budget-input { padding: 10px 12px; border-radius: 14px; }

.months-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.month-tile {
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(255,255,255,.70);
  border-radius: 22px;
  padding: 16px;
  display: grid;
  gap: 12px;
}
.month-tile.active { outline: 3px solid rgba(124,58,237,.16); border-color: rgba(124,58,237,.35); }
.mini-stats { display: grid; gap: 7px; color: var(--muted); font-size: 13px; font-weight: 850; }
.mini-stats div { display: flex; justify-content: space-between; gap: 10px; }

.plan-card { background: linear-gradient(135deg, rgba(255,255,255,.88), rgba(255,255,255,.68)); }
.plan-open-row {
  display: grid;
  grid-template-columns: minmax(180px, 240px) auto auto;
  gap: 10px;
  align-items: end;
}

.goal-card { display: grid; gap: 14px; }
.goal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.goal-total { display: grid; gap: 3px; }
.goal-total strong { font-size: 26px; letter-spacing: -.04em; }
.goal-total.large strong { font-size: 34px; }
.goal-total span { color: var(--muted); font-weight: 850; }
.goal-note {
  margin: 0;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255,255,255,.58);
  color: var(--ink-soft);
  line-height: 1.45;
}
.compact-form { padding-top: 2px; }

.auth-wrap {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
}
.auth-card {
  width: min(980px, 100%);
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  overflow: hidden;
  border-radius: 34px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(255,255,255,.66);
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.auth-card.slim-auth { grid-template-columns: 1fr; max-width: 560px; }
.auth-visual {
  min-height: 540px;
  padding: 34px;
  color: #fff;
  background:
    linear-gradient(150deg, rgba(17,24,39,.98), rgba(17,24,39,.88)),
    radial-gradient(circle at 20% 12%, rgba(124,58,237,.45), transparent 28%),
    radial-gradient(circle at 80% 88%, rgba(20,184,166,.45), transparent 34%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-brand { font-weight: 950; letter-spacing: -.02em; }
.auth-title {
  margin: 0;
  font-size: clamp(38px, 6vw, 68px);
  line-height: .94;
  letter-spacing: -.07em;
  max-width: 520px;
}
.auth-lead {
  margin: 20px 0 0;
  max-width: 460px;
  color: rgba(255,255,255,.78);
  font-size: 16px;
  line-height: 1.6;
}
.visual-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-top: 30px;
}
.visual-pill {
  aspect-ratio: 1;
  border-radius: 22px;
  padding: 14px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.16);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.visual-pill b { font-size: 25px; }
.visual-pill span { color: rgba(255,255,255,.72); font-size: 12px; font-weight: 850; }
.auth-panel {
  padding: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  background: rgba(255,255,255,.86);
}
.panel-title { margin: 0; font-size: 30px; letter-spacing: -.04em; }
.panel-sub { margin: 0; color: var(--muted); line-height: 1.55; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; }

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(22px + var(--safe-bottom));
  transform: translateX(-50%) translateY(26px);
  opacity: 0;
  pointer-events: none;
  z-index: 50;
  max-width: min(520px, calc(100vw - 30px));
  border-radius: 20px;
  background: rgba(17,24,39,.96);
  color: #fff;
  padding: 13px 16px;
  box-shadow: var(--shadow);
  font-weight: 850;
  transition: .22s ease;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.loading-cover {
  position: fixed;
  inset: 0;
  display: none;
  place-items: center;
  z-index: 40;
  background: rgba(246,243,237,.62);
  backdrop-filter: blur(14px);
}
.loading-cover.show { display: grid; }
.loader-card {
  border-radius: 28px;
  padding: 22px 26px;
  background: #fff;
  box-shadow: var(--shadow);
  font-weight: 950;
  display: flex;
  gap: 12px;
  align-items: center;
}
.spinner {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 3px solid rgba(15,23,42,.15);
  border-top-color: #111827;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.mobile-nav {
  display: none;
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: calc(10px + var(--safe-bottom));
  z-index: 30;
  padding: 6px;
  border-radius: 24px;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: 0 22px 55px rgba(15,23,42,.18);
  backdrop-filter: blur(22px);
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
}
.mobile-nav button {
  border: 0;
  border-radius: 17px;
  padding: 8px 2px;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 950;
  display: grid;
  gap: 2px;
  place-items: center;
  line-height: 1.05;
}
.mobile-nav button b { font-size: 15px; line-height: 1; }
.mobile-nav button.active { background: #111827; color: #fff; }

@media (max-width: 1040px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .mobile-nav { display: grid; }
  .app-shell { padding: 14px 14px 94px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .months-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 780px) {
  .app-header { align-items: flex-start; flex-direction: column; padding: 18px; border-radius: 24px; }
  .app-header h1 { font-size: 27px; }
  .month-control { width: 100%; display: grid; grid-template-columns: 1fr auto; }
  .month-control input { width: 100%; }
  .overview-grid, .grid-2, .grid-3, .goals-grid { grid-template-columns: 1fr; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat-card { padding: 14px; min-height: 112px; border-radius: 22px; }
  .stat-card strong { font-size: 24px; }
  .stat-card small { font-size: 12px; }
  .card { padding: 16px; border-radius: 22px; }
  .card-head { flex-direction: column; gap: 10px; }
  .category-grid { grid-template-columns: 1fr; }
  .months-grid { grid-template-columns: 1fr; }
  .entry { grid-template-columns: 1fr; }
  .entry-side { justify-content: space-between; }
  .entry-amount { text-align: left; }
  .plan-open-row { grid-template-columns: 1fr; }
  .btn { width: 100%; }

  .auth-wrap { min-height: 100dvh; padding: 8px 10px; place-items: start center; }
  .auth-card { grid-template-columns: 1fr; border-radius: 28px; }
  .auth-visual { min-height: auto; padding: 20px 22px 18px; gap: 14px; justify-content: flex-start; }
  .auth-brand { font-size: 13px; }
  .auth-title { font-size: clamp(34px, 11vw, 46px); line-height: .92; }
  .auth-lead { margin-top: 12px; font-size: 14px; line-height: 1.45; }
  .visual-grid { grid-template-columns: repeat(3, 76px); justify-content: start; gap: 8px; margin-top: 16px; }
  .visual-pill { width: 76px; height: 76px; min-height: auto; border-radius: 16px; padding: 10px 8px; }
  .visual-pill b { font-size: 22px; line-height: 1; }
  .visual-pill span { font-size: 10px; line-height: 1.15; }
  .auth-panel { padding: 20px 22px 24px; gap: 14px; }
  .panel-title { font-size: 28px; }
  .form-grid { gap: 10px; }
  .field { gap: 6px; }
  .input, .select, .textarea { border-radius: 16px; padding: 13px 14px; }
  .password-wrap .input { padding-right: 52px; }
  .password-toggle { width: 38px; height: 38px; right: 7px; border-radius: 13px; }
  .auth-actions { grid-template-columns: 1fr 1fr; }
  .auth-actions .btn { width: 100%; min-height: 50px; padding-inline: 10px; }
}

@media (max-width: 430px) {
  .app-shell { padding: 10px 10px 92px; }
  .app-header h1 { font-size: 25px; }
  .app-header p { font-size: 13px; }
  .month-control { grid-template-columns: 1fr; }
  .cards { grid-template-columns: 1fr 1fr; }
  .stat-card { min-height: 100px; }
  .stat-card span { font-size: 12px; }
  .stat-card strong { font-size: 22px; }
  .stat-card small { font-size: 11.5px; }
  .mobile-nav { left: 7px; right: 7px; bottom: calc(8px + var(--safe-bottom)); border-radius: 22px; }
  .mobile-nav button { font-size: 8.5px; padding: 7px 1px; }
  .mobile-nav button b { font-size: 14px; }
}

@media (max-width: 380px) {
  .auth-title { font-size: 32px; }
  .auth-lead { font-size: 13px; }
  .visual-grid { grid-template-columns: repeat(3, 68px); }
  .visual-pill { width: 68px; height: 68px; }
  .visual-pill b { font-size: 19px; }
  .visual-pill span { font-size: 9px; }
  .auth-panel { padding: 18px 20px 22px; }
  .panel-title { font-size: 26px; }
  .auth-actions .btn { font-size: 13px; }
}

/* v8 refinements */
.side-stack { display: grid; gap: 16px; align-content: start; }
.compact-head { flex-direction: row; align-items: center; margin-bottom: 14px; }
.count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 62px;
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(15,23,42,.08);
  font-size: 13px;
  font-weight: 950;
}
.compact-summary { display: grid; gap: 12px; }
.summary-two-col {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  color: var(--muted);
  font-weight: 850;
}
.summary-two-col b {
  color: var(--ink);
  font-size: 18px;
  letter-spacing: -.02em;
  text-align: right;
}
.income-summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.income-summary-grid .source-card { grid-column: 1 / -1; }
.soft-stat, .source-card {
  padding: 15px;
  border-radius: 20px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(15,23,42,.07);
}
.soft-stat { display: grid; gap: 6px; }
.soft-stat span { color: var(--muted); font-size: 13px; font-weight: 900; }
.soft-stat b { font-size: 25px; letter-spacing: -.04em; }
.soft-stat small { color: var(--muted); font-weight: 760; }
.mini-stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.day-list { display: grid; gap: 10px; }
.day-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.07);
}
.day-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.day-row strong { white-space: nowrap; }
.accordion-card { padding: 0; overflow: hidden; }
.accordion-head {
  width: 100%;
  border: 0;
  background: transparent;
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 14px;
  align-items: center;
  text-align: left;
}
.accordion-head span { font-size: 22px; font-weight: 950; letter-spacing: -.04em; }
.accordion-head b { color: var(--ink); white-space: nowrap; }
.accordion-head i {
  font-style: normal;
  color: var(--muted);
  font-size: 12px;
  font-weight: 950;
  padding: 8px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.68);
  border: 1px solid rgba(15,23,42,.07);
}
.accordion-body { padding: 0 20px 20px; }
.plan-bars { display: grid; gap: 13px; }
.plan-bar-item {
  display: grid;
  gap: 9px;
  padding: 16px;
  border-radius: 22px;
  background: rgba(255,255,255,.64);
  border: 1px solid rgba(15,23,42,.07);
}
.plan-bar-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
}
.plan-bar-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-bar-top strong { white-space: nowrap; font-size: 18px; }
.plan-list { display: grid; gap: 9px; }
.plan-list-row {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 180px) auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.07);
}
.plan-list-row b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.plan-list-row .budget-input { min-height: 44px; }
.loading-cover { display: none !important; }

@media (max-width: 780px) {
  .side-stack { gap: 12px; }
  .income-summary-grid, .mini-stat-grid { grid-template-columns: 1fr; }
  .summary-two-col { grid-template-columns: 1fr auto; font-size: 14px; }
  .summary-two-col b { font-size: 16px; }
  .accordion-head { grid-template-columns: 1fr; gap: 8px; padding: 16px; }
  .accordion-head span { font-size: 20px; }
  .accordion-head i { justify-self: start; }
  .accordion-body { padding: 0 16px 16px; }
  .plan-list-row { grid-template-columns: 1fr; }
  .plan-list-row .icon-btn { justify-self: end; }
  .compact-head { flex-direction: row; }
}

/* v9 layout and planning refinements */
.dark-header {
  background: linear-gradient(135deg, #111827, #263244) !important;
  border-color: rgba(255,255,255,.12) !important;
  color: #fff;
  min-height: 112px;
  align-items: center;
}
.dark-header h1 {
  color: #fff;
  font-size: clamp(34px, 4.4vw, 58px);
  letter-spacing: -.07em;
}
.dark-header p,
.dark-header .month-control { display: none !important; }
.text-brand b { font-size: 24px; letter-spacing: -.05em; }
.text-brand span { display: none !important; }
.native-select,
select.select {
  -webkit-appearance: menulist;
  appearance: auto;
  padding-right: 46px !important;
  background-color: rgba(255,255,255,.96);
  min-height: 54px;
}
.plan-bottom {
  display: grid;
  gap: 12px;
}
.other-month-plan {
  display: grid;
  gap: 10px;
}
.compact-other-month {
  margin-top: 2px;
  display: grid;
  grid-template-columns: minmax(200px, 260px) auto;
  gap: 10px;
  align-items: center;
}
.compact-plan-list { gap: 6px; }
.plan-list-row.compact-row {
  grid-template-columns: minmax(130px, 1fr) minmax(110px, 150px) 46px;
  padding: 7px 9px;
  border-radius: 15px;
  min-height: 58px;
}
.plan-list-row.compact-row .budget-input {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 14px;
  font-weight: 850;
}
.plan-list-row.compact-row .budget-input[readonly] {
  background: rgba(255,255,255,.54);
  color: var(--ink-soft);
  cursor: default;
}
.edit-category-btn.active {
  background: rgba(22,101,52,.12);
  color: var(--good);
  border-color: rgba(22,101,52,.22);
}
.mobile-nav { grid-template-columns: repeat(5, 1fr); }

@media (max-width: 1040px) {
  .dark-header { min-height: auto; padding: 18px; }
}

@media (max-width: 780px) {
  .dark-header {
    border-radius: 24px;
    padding: 18px 18px 20px;
  }
  .dark-header h1 { font-size: 32px; line-height: .98; }
  .native-select,
  select.select {
    min-height: 56px;
    padding-right: 44px !important;
  }
  .compact-other-month { grid-template-columns: 1fr; }
  .plan-list-row.compact-row {
    grid-template-columns: 1fr minmax(100px, 130px) 42px;
    gap: 7px;
    min-height: 52px;
    padding: 7px;
  }
  .plan-list-row.compact-row b { font-size: 14px; }
  .plan-list-row.compact-row .budget-input { min-height: 38px; padding: 7px 10px; }
  .edit-category-btn { width: 38px; height: 38px; border-radius: 13px; }
}

@media (max-width: 430px) {
  .dark-header h1 { font-size: 29px; }
  .mobile-nav button { font-size: 8px; }
}

/* v10 brand, auth and icon refinements */
.svg-icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.password-toggle .svg-icon { width: 19px; height: 19px; }
.icon-btn .svg-icon, .account-btn .svg-icon { width: 21px; height: 21px; }

.auth-card-compact { grid-template-columns: .92fr 1fr; max-width: 900px; }
.auth-card-compact .auth-visual {
  min-height: 430px;
  padding: 36px;
  justify-content: flex-start;
  gap: 22px;
}
.auth-card-compact .auth-brand {
  font-size: 15px;
  color: rgba(255,255,255,.86);
}
.auth-card-compact .auth-title {
  font-size: clamp(34px, 4.6vw, 60px);
  max-width: 460px;
}
.auth-card-compact .auth-panel { padding: 36px; }

.brand-header {
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  padding: 24px 26px;
  min-height: 124px;
  background: linear-gradient(135deg, #111827, #263244);
  border: 1px solid rgba(255,255,255,.12);
  border-bottom: 1px solid rgba(255,255,255,.18);
  color: #fff;
  box-shadow: var(--shadow-soft);
  align-items: center;
}
.brand-header-text { min-width: 0; }
.brand-header-text span {
  display: block;
  margin-bottom: 8px;
  color: rgba(255,255,255,.72);
  font-size: 14px;
  font-weight: 900;
  letter-spacing: -.02em;
}
.brand-header h1 {
  color: #fff;
  font-size: clamp(28px, 3.1vw, 42px);
  letter-spacing: -.07em;
}
.account-btn {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  color: #fff;
  display: grid;
  place-items: center;
  box-shadow: none;
}
.account-btn:hover { background: rgba(255,255,255,.16); }
.edit-category-btn { color: var(--ink-soft); }
.edit-category-btn.active { color: var(--good); }

@media (max-width: 780px) {
  .brand-header {
    border-radius: 24px 24px 0 0;
    min-height: 104px;
    padding: 18px;
  }
  .brand-header-text span { font-size: 13px; margin-bottom: 6px; }
  .brand-header h1 { font-size: 30px; line-height: .98; }
  .account-btn { width: 46px; height: 46px; border-radius: 16px; }

  .auth-card-compact { grid-template-columns: 1fr; }
  .auth-card-compact .auth-visual {
    min-height: 172px;
    padding: 24px 22px;
    gap: 12px;
  }
  .auth-card-compact .auth-brand { font-size: 14px; }
  .auth-card-compact .auth-title { font-size: clamp(32px, 10vw, 42px); }
  .auth-card-compact .auth-panel { padding: 22px; }
}

@media (max-width: 430px) {
  .brand-header h1 { font-size: 28px; }
  .brand-header { min-height: 96px; }
}

/* v11 day totals and typography */
body,
button,
input,
select,
textarea {
  font-family: "Nunito Sans", ui-rounded, "Arial Rounded MT Bold", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

h1, h2, h3,
.auth-title,
.panel-title,
.brand-header h1,
.card h2,
.entry-title,
.day-row b,
.nav-btn,
.btn {
  font-family: "Nunito Sans", ui-rounded, "Arial Rounded MT Bold", "Segoe UI", system-ui, sans-serif;
  font-weight: 1000;
}

.day-total {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  margin-top: 8px;
  padding: 14px 16px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(17,24,39,.96), rgba(38,50,68,.96));
  color: #fff;
}
.day-total span {
  color: rgba(255,255,255,.72);
  font-weight: 900;
}
.day-total strong {
  white-space: nowrap;
  font-weight: 1000;
}

/* v12 mobile select and account diagnostics */
select.select,
.native-select {
  position: relative;
  z-index: 3;
  pointer-events: auto;
  touch-action: manipulation;
  user-select: auto;
  -webkit-user-select: auto;
}
.field { position: relative; }
.account-debug {
  display: grid;
  gap: 8px;
  margin: 14px 0 18px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,.62);
  border: 1px solid rgba(15,23,42,.08);
}
.account-debug div {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(0, 1.2fr);
  gap: 12px;
  align-items: start;
}
.account-debug span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}
.account-debug b {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}
.account-debug .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-weight: 800;
}
@media (max-width: 780px) {
  select.select,
  .native-select {
    cursor: pointer;
    -webkit-tap-highlight-color: rgba(124,58,237,.14);
  }
  .account-debug div {
    grid-template-columns: 1fr;
    gap: 2px;
  }
}

/* v13 mobile header, custom pickers and compact menu */
.select-button {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  text-align: left;
  min-height: 54px;
  cursor: pointer;
}
.select-button span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.select-chevron {
  width: 28px;
  height: 28px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: var(--ink-soft);
  background: rgba(15,23,42,.04);
  margin-left: 14px;
  font-weight: 1000;
}
.picker-sheet {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  align-items: end;
}
.picker-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15,23,42,.38);
  backdrop-filter: blur(5px);
}
.picker-panel {
  position: relative;
  width: min(560px, calc(100% - 20px));
  max-height: min(72vh, 640px);
  margin: 0 auto calc(10px + var(--safe-bottom));
  padding: 16px;
  border-radius: 26px;
  background: rgba(255,255,255,.98);
  box-shadow: 0 28px 90px rgba(15,23,42,.28);
  display: grid;
  gap: 12px;
  overflow: hidden;
}
.picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.picker-head h3 {
  margin: 0;
  font-size: 22px;
  letter-spacing: -.04em;
}
.picker-list {
  overflow: auto;
  display: grid;
  gap: 12px;
  padding-right: 2px;
}
.picker-group-title {
  color: var(--muted);
  font-weight: 950;
  font-size: 12px;
  margin: 0 0 7px 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.picker-option {
  width: 100%;
  border: 1px solid rgba(15,23,42,.08);
  background: rgba(248,250,252,.92);
  border-radius: 16px;
  padding: 12px 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  font-weight: 950;
  color: var(--ink);
  margin-bottom: 7px;
}
.picker-option.active {
  background: rgba(17,24,39,.96);
  color: #fff;
  border-color: rgba(17,24,39,.22);
}
.picker-option span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.brand-header-text {
  text-align: left;
  width: 100%;
}
@media (max-width: 780px) {
  .brand-header {
    min-height: 82px;
    padding: 16px 18px;
    border-radius: 22px 22px 0 0;
    justify-content: flex-start;
    align-items: flex-start;
  }
  .brand-header h1 {
    font-size: 26px;
    line-height: 1.02;
  }
  .brand-header-text span {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .brand-header .account-btn {
    display: none !important;
  }
  .mobile-nav button span {
    font-size: 8.5px;
  }
  .mobile-nav button:last-child span {
    font-size: 8.2px;
  }
  .picker-panel {
    max-height: 76vh;
    border-radius: 24px 24px 20px 20px;
  }
  .select-button {
    min-height: 56px;
    padding-right: 13px !important;
  }
}
@media (max-width: 430px) {
  .brand-header { min-height: 78px; padding: 15px 16px; }
  .brand-header h1 { font-size: 25px; }
}

/* v14: редактирование записей из списка за день */
.day-edit-card {
  display: grid;
  gap: 0;
  border-radius: 18px;
}
.day-edit-card .day-row {
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.day-edit-card.active .day-row {
  background: rgba(209, 250, 229, .72);
  border-color: rgba(22, 163, 74, .32);
  box-shadow: 0 12px 30px rgba(22, 163, 74, .10);
}
.day-edit-panel {
  margin-top: 8px;
  padding: 12px;
  border-radius: 18px;
  background: rgba(240, 253, 244, .76);
  border: 1px solid rgba(22, 163, 74, .22);
  display: grid;
  gap: 10px;
}
.day-edit-hint {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}
.day-edit-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(110px, .8fr) auto;
  gap: 10px;
  align-items: end;
}
.edit-field {
  display: grid;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 900;
}
.small-input {
  min-height: 46px;
  border-radius: 15px;
  padding: 10px 13px;
  font-size: 16px;
}
.mini-btn {
  min-height: 46px;
  padding: 0 16px;
  border-radius: 15px;
  font-size: 14px;
}

@media (max-width: 780px) {
  .day-edit-form {
    grid-template-columns: 1fr 1fr;
  }
  .day-edit-form .mini-btn {
    grid-column: 1 / -1;
    width: 100%;
  }
  .day-edit-panel {
    padding: 10px;
  }
}


/* v15 picker and plan ordering fixes */
.select-chevron {
  background: transparent;
  width: 34px;
  height: 34px;
  margin-left: 12px;
}
.select-chevron .svg-icon {
  width: 21px;
  height: 21px;
  stroke-width: 2.8;
}
.picker-panel {
  grid-template-rows: auto minmax(0, 1fr);
  max-height: min(78dvh, 680px);
}
.picker-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 8px;
  touch-action: pan-y;
}
.picker-group:last-child .picker-option:last-child { margin-bottom: 0; }
.plan-add-form {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(15,23,42,.08);
}
.compact-empty { margin-bottom: 0; }
@media (max-width: 780px) {
  .picker-sheet { align-items: end; }
  .picker-panel {
    width: calc(100% - 16px);
    max-height: min(82dvh, 680px);
    padding: 14px;
    border-radius: 24px 24px 18px 18px;
  }
  .picker-option {
    min-height: 54px;
    padding: 12px 14px;
    margin-bottom: 8px;
  }
}

/* v16 visual polish: softer brand panel, consistent typography */
:root {
  --font-main: "Nunito Sans", ui-rounded, "Arial Rounded MT Bold", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --weight-regular: 600;
  --weight-medium: 700;
  --weight-bold: 850;
  --weight-black: 950;
  --radius-xl: 28px;
  --radius-lg: 22px;
}

body,
button,
input,
select,
textarea {
  font-family: var(--font-main);
  font-weight: var(--weight-regular);
  line-height: 1.35;
}

h1, h2, h3,
.auth-title,
.panel-title,
.brand-header h1,
.card h2,
.card h3,
.entry-title,
.day-row b,
.nav-btn,
.btn,
.stat-card strong,
.day-total strong,
.accordion-head span {
  font-family: var(--font-main);
  font-weight: var(--weight-black);
  letter-spacing: -.045em;
}

/* Main brand stripe */
.brand-header {
  border-radius: 30px !important;
  min-height: 126px;
  padding: 26px 28px;
  background:
    radial-gradient(circle at 92% 18%, rgba(124,58,237,.40), transparent 30%),
    radial-gradient(circle at 2% 100%, rgba(167,139,250,.24), transparent 32%),
    linear-gradient(135deg, #111827 0%, #1f2937 54%, #273244 100%) !important;
  border: 1px solid rgba(255,255,255,.15) !important;
  box-shadow: 0 26px 70px rgba(17,24,39,.18);
  overflow: hidden;
}
.brand-header::after {
  content: "";
  position: absolute;
  inset: auto -12% -65% 52%;
  width: 58%;
  height: 110%;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(139,92,246,.24), transparent 68%);
  pointer-events: none;
}
.brand-header-text,
.brand-header .account-btn { position: relative; z-index: 1; }
.brand-header-text span {
  margin-bottom: 7px;
  color: rgba(255,255,255,.70);
  font-size: clamp(12px, 1vw, 14px);
  font-weight: var(--weight-bold);
  letter-spacing: -.015em;
}
.brand-header h1 {
  font-size: clamp(34px, 3.15vw, 48px);
  line-height: .96;
  color: #fff;
}
.account-btn {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.22);
}

/* Sidebar */
.sidebar {
  border-radius: 28px;
  padding: 18px;
}
.text-brand b {
  font-size: 24px;
  font-weight: var(--weight-black);
  letter-spacing: -.045em;
}
.nav { gap: 7px; }
.nav-btn {
  border-radius: 17px;
  padding: 12px 14px;
  font-size: 16px;
  font-weight: var(--weight-bold);
}
.nav-btn span { font-size: 17px; }
.user-badge b,
.user-badge span { font-weight: var(--weight-bold); }

/* Cards and blocks */
.card,
.stat-card {
  border-radius: 24px;
  border-color: rgba(15,23,42,.07);
}
.card { padding: 22px; }
.card h2 {
  font-size: clamp(24px, 2vw, 30px);
  line-height: 1.03;
}
.card h3 {
  font-size: clamp(19px, 1.5vw, 23px);
  line-height: 1.08;
}
.muted,
.panel-sub,
.auth-lead {
  font-weight: var(--weight-regular);
  color: var(--muted);
}
.field label,
.stat-card span,
.soft-stat span,
.summary-line,
.bar-label,
.mini-stats,
.entry-meta,
.goal-total span,
.count-pill {
  font-weight: var(--weight-bold);
}
.stat-card {
  padding: 18px 20px;
  min-height: 124px;
}
.stat-card strong {
  font-size: clamp(26px, 2.75vw, 40px);
  line-height: 1;
}
.stat-card small {
  font-size: 13px;
  font-weight: var(--weight-bold);
}

/* Forms */
.input,
.select,
.textarea,
.select-button {
  border-radius: 18px;
  font-weight: var(--weight-regular);
}
.input,
.select,
.select-button {
  min-height: 54px;
}
.textarea { min-height: 96px; }
.btn {
  border-radius: 18px;
  font-size: 16px;
  font-weight: var(--weight-black);
}
.btn.secondary,
.btn.soft { font-weight: var(--weight-bold); }
.select-chevron {
  width: 30px;
  height: 30px;
  border-radius: 12px;
  background: rgba(15,23,42,.045);
  color: var(--ink-soft);
}
.select-chevron svg,
.select-chevron .svg-icon {
  width: 18px;
  height: 18px;
}

/* Lists */
.day-row,
.entry,
.plan-list-row,
.category-card,
.plan-bar-item {
  border-radius: 18px;
  border-color: rgba(15,23,42,.075);
}
.day-row b,
.plan-list-row b,
.category-top b,
.entry-title {
  font-weight: var(--weight-black);
}
.day-row strong,
.entry-amount,
.summary-two-col b,
.plan-bar-top strong {
  font-weight: var(--weight-black);
}
.day-total {
  border-radius: 18px;
  background: linear-gradient(135deg, #111827, #253044);
}

/* Accordions and planning */
.accordion-head span {
  font-size: clamp(22px, 2vw, 30px);
  line-height: 1.05;
}
.accordion-head b {
  font-weight: var(--weight-black);
}
.accordion-head i,
.count-pill {
  font-size: 13px;
  font-weight: var(--weight-bold);
}
.plan-list-row.compact-row {
  min-height: 54px;
  padding: 8px 10px;
}
.plan-list-row.compact-row .budget-input {
  font-weight: var(--weight-bold);
}
.icon-btn {
  border-radius: 15px;
}

/* Auth screen */
.auth-card {
  border-radius: 30px;
}
.auth-card-compact .auth-visual {
  background:
    radial-gradient(circle at 92% 18%, rgba(124,58,237,.36), transparent 33%),
    linear-gradient(135deg, #111827, #263244);
}
.auth-brand {
  font-weight: var(--weight-bold);
}
.auth-title {
  font-size: clamp(38px, 4.9vw, 58px);
  line-height: .97;
}
.panel-title {
  font-size: clamp(26px, 2.4vw, 34px);
}
.auth-actions .btn { font-weight: var(--weight-black); }

/* Mobile polish */
@media (max-width: 1040px) {
  .brand-header {
    border-radius: 28px !important;
    min-height: 112px;
  }
}

@media (max-width: 780px) {
  .app-shell { padding: 10px 10px 92px; }
  .brand-header {
    border-radius: 24px !important;
    min-height: 88px;
    padding: 16px 18px;
  }
  .brand-header h1 {
    font-size: clamp(28px, 8.5vw, 36px);
    line-height: .98;
  }
  .brand-header-text span {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .card {
    padding: 17px;
    border-radius: 22px;
  }
  .card h2 { font-size: 28px; }
  .card h3 { font-size: 21px; }
  .muted { font-size: 16px; }
  .field label { font-size: 14px; }
  .input,
  .select,
  .select-button {
    min-height: 56px;
    padding: 14px 16px;
  }
  .textarea { min-height: 90px; }
  .btn { min-height: 52px; }
  .stat-card {
    min-height: 106px;
    padding: 15px;
  }
  .stat-card strong { font-size: 26px; }
  .accordion-head span { font-size: 24px; }
  .day-row { padding: 13px 14px; }
  .picker-head h3 { font-size: 25px; }
  .picker-option {
    min-height: 54px;
    padding: 13px 14px;
    font-size: 17px;
  }
  .mobile-nav button {
    font-weight: var(--weight-bold);
  }
}

@media (max-width: 430px) {
  .brand-header {
    min-height: 82px;
    padding: 15px 16px;
  }
  .brand-header h1 { font-size: 30px; }
  .brand-header-text span { font-size: 11.5px; }
  .card h2 { font-size: 25px; }
  .card h3 { font-size: 20px; }
  .stat-card strong { font-size: 23px; }
  .btn { font-size: 15px; }
  .day-row b { font-size: 16px; }
  .day-row strong { font-size: 16px; }
}
.brand-header { position: relative; }


/* v17 typography balance: меньше жирного, спокойнее и ровнее */
:root {
  --weight-regular: 500;
  --weight-medium: 600;
  --weight-bold: 650;
  --weight-black: 760;
}

body,
button,
input,
select,
textarea,
.muted,
.panel-sub,
.auth-lead {
  font-weight: 500;
}

/* Главные заголовки оставляем выразительными, но без сверхжирности */
h1,
h2,
h3,
.auth-title,
.panel-title,
.brand-header h1,
.card h2,
.card h3,
.accordion-head span,
.text-brand b {
  font-weight: 760 !important;
  letter-spacing: -.035em;
}

.brand-header h1 {
  font-weight: 780 !important;
}

.brand-header-text span,
.auth-brand,
.field label,
.stat-card span,
.soft-stat span,
.summary-line,
.bar-label,
.mini-stats,
.entry-meta,
.goal-total span,
.count-pill,
.user-badge b,
.user-badge span {
  font-weight: 620 !important;
}

/* Навигация и кнопки */
.nav-btn,
.mobile-nav button,
.btn,
.auth-actions .btn,
.icon-btn,
.password-toggle {
  font-weight: 700 !important;
}

/* Цифры и суммы: заметные, но не черные кирпичи */
.stat-card strong,
.soft-stat b,
.goal-total strong,
.goal-total.large strong,
.entry-amount,
.day-row strong,
.summary-two-col b,
.plan-bar-top strong,
.day-total strong,
.summary-line b,
.accordion-head b,
.plan-list-row .budget-input,
.budget-input {
  font-weight: 700 !important;
  letter-spacing: -.025em;
}

/* Названия категорий, источников, списки */
.entry-title,
.day-row b,
.plan-list-row b,
.category-top b,
.picker-option,
.month-tile b,
.goal-head b {
  font-weight: 680 !important;
  letter-spacing: -.018em;
}

/* Плашки сводной и карточки стали визуально спокойнее */
.card h2 {
  font-size: clamp(23px, 1.85vw, 28px);
}
.card h3 {
  font-size: clamp(18px, 1.35vw, 22px);
}
.stat-card strong {
  font-size: clamp(25px, 2.55vw, 36px);
}
.accordion-head span {
  font-size: clamp(21px, 1.85vw, 28px);
}

/* Формы и значения внутри полей */
.input,
.select,
.textarea,
.select-button {
  font-weight: 500 !important;
}
.select-button span:first-child {
  font-weight: 560 !important;
}

/* Мобильная версия: тоже без сверхжирных заголовков */
@media (max-width: 780px) {
  .brand-header h1 { font-weight: 760 !important; }
  .card h2 { font-size: 25px; font-weight: 740 !important; }
  .card h3 { font-size: 20px; font-weight: 700 !important; }
  .stat-card strong { font-size: 23px; font-weight: 700 !important; }
  .day-row b,
  .day-row strong { font-weight: 680 !important; }
  .picker-head h3 { font-weight: 740 !important; }
  .picker-option { font-weight: 650 !important; }
}

@media (max-width: 430px) {
  .brand-header h1 { font-size: 28px; }
  .card h2 { font-size: 24px; }
}
