:root {
  color-scheme: dark;
  --bg: #303039;
  --bg-grad-1: #363640;
  --bg-grad-2: #25262d;
  --surface-1: #1b1c21;
  --surface-2: #24252b;
  --surface-3: #2e3037;
  --surface-input: #191a1f;
  --border: rgba(255, 255, 255, 0.06);
  --border-strong: rgba(255, 255, 255, 0.12);
  --text: #f8f8f4;
  --text-2: #d7d8d2;
  --text-muted: #8f918c;
  --text-dim: #5d605b;
  --accent: #b9ff66;
  --accent-soft: rgba(185, 255, 102, 0.14);
  --accent-ink: #121412;
  --green: #7cff79;
  --green-soft: rgba(124, 255, 121, 0.13);
  --amber: #ffe66d;
  --amber-soft: rgba(255, 230, 109, 0.14);
  --coral: #ff8a6b;
  --coral-soft: rgba(255, 138, 107, 0.13);
  --violet: #9d57f4;
  --violet-soft: rgba(157, 87, 244, 0.14);
  --sky: #41b5ff;
  --sky-soft: rgba(65, 181, 255, 0.14);
  --shadow-card: 0 1px 0 rgba(255, 255, 255, 0.035) inset, 0 14px 34px rgba(0, 0, 0, 0.22);
  --shadow-pop: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 24px 60px rgba(0, 0, 0, 0.42);
  font-family: "Hanken Grotesk", "Segoe UI", Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    radial-gradient(900px 560px at 6% -10%, rgba(185, 255, 102, 0.08), transparent 62%),
    radial-gradient(820px 520px at 108% 0%, rgba(255, 230, 109, 0.08), transparent 54%),
    linear-gradient(180deg, var(--bg-grad-1), var(--bg) 40%, var(--bg-grad-2)),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 15px;
  line-height: 1.5;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

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

.layout {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
  max-width: 1500px;
  margin: 0 auto;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--border);
  background: rgba(27, 28, 33, 0.72);
  padding: 14px 32px;
  backdrop-filter: blur(12px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 22px;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--amber), var(--accent), var(--green));
  color: var(--accent-ink);
  font-size: 10px;
  font-weight: 800;
}

.brand h1 {
  margin: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 750;
}

.brand p {
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.month-control {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  font-size: 12px;
}

.month-control input,
.field input,
.field select,
.field textarea,
.file-input {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-input);
  color: var(--text);
  padding: 9px 11px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.save-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  padding: 6px 10px;
  font-size: 11.5px;
}

.save-pill::before,
.nav-note span {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--green);
}

.nav {
  position: sticky;
  top: 0;
  display: flex;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  border-right: 1px solid var(--border);
  background: rgba(27, 28, 33, 0.7);
  padding: 20px 14px;
}

.nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 38px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  padding: 8px 12px;
  text-align: left;
  transition: background 140ms, color 140ms;
}

.nav button::before {
  content: attr(data-icon);
  display: grid;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 7px;
  text-transform: uppercase;
}

.nav button:hover,
.nav button.active {
  background: #2a2c31;
  color: var(--text);
}

.nav button.active::after {
  display: none;
}

.nav button.active::before {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}

.nav-note {
  margin: auto 4px 12px;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-2);
  padding: 14px;
}

.nav-note span {
  display: inline-block;
  margin-right: 8px;
  vertical-align: middle;
}

.nav-note strong {
  font-size: 12px;
  font-weight: 650;
}

.nav-note p {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.content {
  display: grid;
  gap: 18px;
  max-width: 1220px;
  min-width: 0;
  margin: 0 auto;
  padding: 24px 32px 48px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.page-header h2 {
  margin: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 28px;
  font-weight: 800;
  line-height: 1.05;
}

.page-header p {
  margin: 8px 0 0;
  max-width: 700px;
  color: var(--text-muted);
  line-height: 1.5;
}

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

.summary-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.two-column {
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
}

.expense-workspace {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.expense-form-card {
  position: sticky;
  top: 86px;
}

.expense-main {
  min-width: 0;
}

.daily-hero {
  display: grid;
  grid-template-columns: minmax(320px, 1.45fr) minmax(180px, 0.75fr) minmax(180px, 0.75fr);
  gap: 14px;
}

.daily-hero > div {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface-2);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.daily-hero > div::after {
  display: none;
}

.daily-hero > div:nth-child(2)::after {
  display: none;
}

.daily-hero > div:nth-child(3)::after {
  display: none;
}

.daily-hero strong {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-family: "Hanken Grotesk", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 850;
  line-height: 1;
}

.daily-hero p {
  position: relative;
  z-index: 1;
  margin: 10px 0 0;
  color: var(--text-muted);
}

.balance-card {
  min-height: 172px;
  background:
    radial-gradient(220px 140px at 12% 0%, rgba(255, 255, 255, 0.28), transparent 55%),
    linear-gradient(115deg, var(--amber) 0%, #e9ff61 45%, var(--green) 100%) !important;
  color: var(--accent-ink);
}

.balance-card .eyebrow,
.balance-card p,
.balance-card strong {
  color: var(--accent-ink);
}

.balance-card .eyebrow {
  opacity: 0.72;
}

.mini-money-card {
  min-height: 172px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.money-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  margin-bottom: auto;
  background: var(--surface-3);
  color: var(--text);
  font-size: 22px;
}

.money-icon.plus {
  color: var(--accent);
}

.money-icon.minus {
  color: var(--text-muted);
}

.card,
.hero-card {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface-1);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card.soft {
  background: linear-gradient(135deg, var(--accent-soft), transparent 70%), var(--surface-1);
}

.card h3 {
  margin: 0 0 8px;
  color: var(--text);
  font-family: inherit;
  font-size: 17px;
  font-weight: 800;
}

.card p {
  color: var(--text-muted);
  line-height: 1.5;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 28px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(600px 320px at 0% 0%, var(--accent-soft), transparent 65%),
    radial-gradient(420px 260px at 100% 0%, var(--violet-soft), transparent 60%);
  opacity: 0.55;
  pointer-events: none;
}

.hero-card > * {
  position: relative;
}

.hero-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 26px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-copy {
  max-width: 820px;
  margin-bottom: 36px;
  color: var(--text);
  font-family: inherit;
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 850;
  line-height: 1.05;
}

.hero-copy em,
.hero-copy strong {
  color: var(--accent);
  font-style: normal;
  font-weight: 850;
}

.hero-figures {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding-bottom: 28px;
}

.eyebrow {
  display: block;
  margin-bottom: 14px;
  color: var(--text-muted);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

.hero-money {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
  font-size: clamp(54px, 8vw, 88px);
  font-weight: 400;
  line-height: 0.95;
}

.hero-money.positive {
  color: var(--green);
}

.hero-money.warning {
  color: var(--amber);
}

.hero-money.danger {
  color: var(--coral);
}

.hero-figures p {
  max-width: 520px;
  margin: 14px 0 0;
  color: var(--text-muted);
}

.score-ring {
  --ring-color: var(--accent);
  display: grid;
  width: 132px;
  height: 132px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--surface-1) 58%, transparent 59%),
    conic-gradient(var(--ring-color) calc(var(--score) * 1%), rgba(255,255,255,0.06) 0);
  color: var(--text);
  box-shadow: inset 0 0 0 1px var(--border), var(--shadow-card);
}

.score-ring span {
  margin-top: 18px;
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
  font-size: 36px;
  line-height: 1;
}

.score-ring small {
  margin-top: -48px;
  color: var(--text-muted);
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
  font-size: 10.5px;
}

.hero-bars {
  display: flex;
  align-items: end;
  gap: 3px;
  height: 64px;
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.day-bar {
  flex: 1;
  min-width: 2px;
  border-radius: 3px 3px 1px 1px;
  background: var(--accent);
  opacity: 0.72;
}

.day-bar.peak {
  background: var(--amber);
  opacity: 0.95;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 22px;
}

.inline-metric {
  border-left: 1px solid var(--border);
  padding: 0 22px;
}

.inline-metric:first-child {
  border-left: 0;
  padding-left: 0;
}

.inline-metric span,
.metric span {
  display: block;
  color: var(--text-muted);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.inline-metric strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
  font-size: 22px;
  font-weight: 500;
}

.inline-metric.warning strong,
.warning strong {
  color: var(--amber);
}

.positive strong {
  color: var(--green);
}

.danger strong {
  color: var(--coral);
}

.section-label {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 26px 0 0;
}

.section-label > span {
  color: var(--text-muted);
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
  font-size: 11px;
}

.section-label i {
  width: 28px;
  height: 1px;
  background: var(--border-strong);
}

.section-label h3 {
  margin: 0;
  color: var(--text);
  font-family: inherit;
  font-size: 20px;
  font-weight: 800;
}

.section-label p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 12.5px;
}

.metric {
  display: grid;
  gap: 12px;
  min-height: 134px;
  overflow: hidden;
}

.metric strong {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
  font-size: 28px;
  font-weight: 850;
  line-height: 1;
}

.metric p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.category-list {
  display: grid;
}

.category-row {
  display: grid;
  grid-template-columns: 40px minmax(120px, 180px) minmax(80px, 1fr) auto;
  align-items: center;
  gap: 18px;
  border-bottom: 1px solid var(--border);
  padding: 16px 22px;
}

.category-row:last-child {
  border-bottom: 0;
}

.category-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
}

.category-row strong {
  color: var(--text);
}

.segment-track {
  display: flex;
  min-width: 32px;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.segment-track .need {
  background: var(--accent);
}

.segment-track .worth_it {
  background: var(--green);
}

.segment-track .want {
  background: var(--violet);
}

.segment-track .regret {
  background: var(--amber);
}

.category-amount {
  min-width: 118px;
  text-align: right;
}

.category-amount span {
  display: inline-block;
  width: 42px;
  color: var(--text-muted);
  font-family: "SFMono-Regular", Consolas, ui-monospace, monospace;
  font-size: 11.5px;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 7px;
}

.field label,
.field > span {
  color: var(--text-2);
  font-size: 12px;
  font-weight: 650;
}

.field textarea {
  min-height: 86px;
  resize: vertical;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.btn {
  min-height: 38px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text);
  padding: 8px 14px;
  font-weight: 650;
}

.btn.primary {
  border-color: transparent;
  background: linear-gradient(135deg, var(--amber), var(--accent), var(--green));
  color: var(--accent-ink);
}

.btn.primary:hover {
  filter: brightness(1.08);
}

.btn.danger {
  border-color: var(--coral-soft);
  background: transparent;
  color: var(--coral);
}

.btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-2);
}

.btn.ghost:hover {
  background: var(--surface-2);
  color: var(--text);
}

.list {
  display: grid;
  gap: 8px;
}

.entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 22px;
  background: var(--surface-2);
  padding: 14px;
}

.entry h4 {
  margin: 0 0 4px;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 800;
}

.entry p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
}

.entry strong {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  text-align: right;
}

.transaction-row {
  grid-template-columns: 42px minmax(0, 1fr) auto;
  background: #222328;
}

.transaction-icon {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border-radius: 50%;
  background: #303137;
  color: var(--text-2);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.transaction-row strong {
  color: var(--text);
  font-size: 15px;
  white-space: nowrap;
}

.graph-hero {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.graph-spotlight {
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface-1);
  box-shadow: var(--shadow-card);
  padding: 20px;
}

.graph-spotlight:first-child {
  background:
    radial-gradient(180px 120px at 100% 0%, rgba(255, 255, 255, 0.22), transparent 55%),
    linear-gradient(115deg, var(--amber), #e9ff61 48%, var(--green));
  color: var(--accent-ink);
}

.graph-spotlight:first-child .eyebrow,
.graph-spotlight:first-child strong,
.graph-spotlight:first-child p {
  color: var(--accent-ink);
}

.graph-spotlight strong {
  display: block;
  margin-top: 10px;
  color: var(--text);
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 850;
  line-height: 1;
}

.graph-spotlight p {
  margin: 10px 0 0;
  color: var(--text-muted);
}

.graphs-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.graph-card.wide {
  grid-column: 1 / -1;
}

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

.graph-card-head p {
  margin: 0;
  max-width: 320px;
  text-align: right;
  font-size: 13px;
}

.compare-bars,
.graph-bars {
  display: grid;
  gap: 16px;
}

.compare-row {
  display: grid;
  gap: 9px;
}

.compare-label,
.graph-bar-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.compare-label span,
.graph-bar-label span {
  color: var(--text-2);
  font-weight: 750;
}

.compare-label strong,
.graph-bar-label strong {
  color: var(--text);
  font-weight: 850;
  white-space: nowrap;
}

.big-bar-track {
  height: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: #303137;
}

.big-bar-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--amber), var(--accent), var(--green));
  box-shadow: 0 0 18px rgba(185, 255, 102, 0.18);
}

.compare-row.expense .big-bar-fill,
.compare-row.over .big-bar-fill {
  background: linear-gradient(90deg, var(--coral), #ffb36b);
}

.compare-row.left .big-bar-fill {
  background: linear-gradient(90deg, var(--accent), var(--green));
}

.graph-bar-row {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.graph-rank {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: #303137;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 850;
}

.graph-bar-body {
  display: grid;
  gap: 7px;
}

.graph-bar-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
}

.graph-bars.category .graph-bar-row:nth-child(4n + 2) .big-bar-fill {
  background: linear-gradient(90deg, var(--sky), var(--accent));
}

.graph-bars.category .graph-bar-row:nth-child(4n + 3) .big-bar-fill {
  background: linear-gradient(90deg, var(--violet), #c084fc);
}

.graph-bars.category .graph-bar-row:nth-child(4n + 4) .big-bar-fill {
  background: linear-gradient(90deg, var(--coral), var(--amber));
}

.graph-bars.subscription .big-bar-fill {
  background: linear-gradient(90deg, var(--amber), var(--accent));
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-2);
  padding: 4px 9px;
  font-size: 12px;
}

.tag.accent {
  border-color: transparent;
  background: var(--accent-soft);
  color: var(--accent);
}

.tag.warning {
  border-color: rgba(217, 176, 122, 0.28);
  color: var(--amber);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
}

.empty {
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
  padding: 18px;
}

.error {
  color: var(--coral);
  font-weight: 700;
  margin: 0;
}

.notice {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
}

.bar-list {
  display: grid;
  gap: 12px;
}

.bar-item {
  display: grid;
  gap: 6px;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-muted);
  font-size: 13px;
}

.bar-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.placeholder-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 1040px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .nav {
    position: sticky;
    z-index: 20;
    top: 0;
    height: auto;
    flex-direction: row;
    align-items: center;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    padding: 10px 16px;
  }

  .brand {
    flex: 0 0 auto;
    padding: 0 8px 0 0;
  }

  .nav button {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .nav-note {
    display: none;
  }

  .topbar {
    top: 59px;
  }

  .summary-grid,
  .hero-stats,
  .daily-hero,
  .graph-hero,
  .graphs-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .two-column,
  .placeholder-grid,
  .expense-workspace {
    grid-template-columns: 1fr;
  }

  .expense-form-card {
    position: static;
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: stretch;
    flex-direction: column;
    padding: 12px 16px;
  }

  .top-actions {
    overflow-x: auto;
  }

  .content {
    padding: 18px 16px 36px;
  }

  .hero-card {
    padding: 22px;
  }

  .hero-figures,
  .category-row {
    grid-template-columns: 1fr;
  }

  .hero-stats,
  .summary-grid,
  .daily-hero,
  .graph-hero,
  .graphs-grid,
  .form-row,
  .entry {
    grid-template-columns: 1fr;
  }

  .graph-card.wide {
    grid-column: auto;
  }

  .graph-card-head {
    display: block;
  }

  .graph-card-head p {
    margin-top: 4px;
    text-align: left;
  }

  .inline-metric,
  .inline-metric:first-child {
    border-left: 0;
    border-top: 1px solid var(--border);
    padding: 14px 0 0;
  }

  .inline-metric:first-child {
    border-top: 0;
    padding-top: 0;
  }

  .category-amount,
  .entry strong {
    text-align: left;
  }
}
