:root {
  --bg: #f3efe8;
  --panel: rgba(255, 248, 242, 0.74);
  --line: rgba(137, 122, 110, 0.16);
  --text: #2a241f;
  --muted: #80746b;
  --accent: #6a7f76;
  --accent-strong: #53675f;
  --positive: #2f8f57;
  --negative: #c84b4b;
  --radius: 18px;
  --shadow: 0 20px 45px rgba(72, 48, 32, 0.08);
}

body[data-theme="mint"] {
  --bg: #edf4ef;
  --panel: rgba(246, 252, 248, 0.78);
  --line: rgba(108, 132, 118, 0.16);
  --text: #243129;
  --muted: #708278;
  --accent: #648779;
  --accent-strong: #4f6d61;
  --positive: #2f8f57;
  --negative: #c84b4b;
  --shadow: 0 20px 45px rgba(53, 77, 64, 0.08);
}

body[data-theme="sky"] {
  --bg: #eef3f7;
  --panel: rgba(248, 251, 255, 0.8);
  --line: rgba(118, 138, 158, 0.16);
  --text: #24303c;
  --muted: #728293;
  --accent: #6d879d;
  --accent-strong: #586f84;
  --positive: #2f8f57;
  --negative: #c84b4b;
  --shadow: 0 20px 45px rgba(60, 83, 104, 0.08);
}

body[data-theme="rose"] {
  --bg: #f5eeee;
  --panel: rgba(255, 248, 249, 0.78);
  --line: rgba(155, 125, 128, 0.16);
  --text: #342627;
  --muted: #8a7274;
  --accent: #9a7c80;
  --accent-strong: #7f6468;
  --positive: #2f8f57;
  --negative: #c84b4b;
  --shadow: 0 20px 45px rgba(99, 67, 70, 0.08);
}

body[data-theme="forest"] {
  --bg: #edf2ea;
  --panel: rgba(247, 250, 244, 0.78);
  --line: rgba(109, 128, 103, 0.16);
  --text: #283026;
  --muted: #74806f;
  --accent: #5f765b;
  --accent-strong: #4b6050;
  --positive: #2f8f57;
  --negative: #c84b4b;
  --shadow: 0 20px 45px rgba(66, 82, 58, 0.08);
}

body[data-theme="pearl"] {
  --bg: #f3f2ef;
  --panel: rgba(255, 255, 252, 0.78);
  --line: rgba(136, 136, 140, 0.14);
  --text: #2d2f33;
  --muted: #7d7f85;
  --accent: #8b8f97;
  --accent-strong: #6d727a;
  --positive: #2f8f57;
  --negative: #c84b4b;
  --shadow: 0 20px 45px rgba(92, 92, 96, 0.08);
}

body[data-theme="slate"] {
  --bg: #edf0f4;
  --panel: rgba(248, 250, 253, 0.8);
  --line: rgba(120, 132, 148, 0.16);
  --text: #27313d;
  --muted: #738191;
  --accent: #6d7d90;
  --accent-strong: #576677;
  --positive: #2f8f57;
  --negative: #c84b4b;
  --shadow: 0 20px 45px rgba(72, 88, 106, 0.08);
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: "Manrope", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(244, 196, 48, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(122, 188, 216, 0.14), transparent 22%),
    radial-gradient(circle at bottom left, rgba(153, 206, 177, 0.16), transparent 22%),
    radial-gradient(circle at bottom right, rgba(230, 184, 163, 0.14), transparent 20%),
    linear-gradient(135deg, #f5efe7 0%, #efe9e4 46%, #e8ece7 100%);
  color: var(--text);
}

body[data-theme="mint"] {
  background:
    radial-gradient(circle at top left, rgba(169, 214, 189, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(171, 214, 224, 0.14), transparent 22%),
    radial-gradient(circle at bottom left, rgba(189, 223, 203, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(210, 232, 217, 0.16), transparent 20%),
    linear-gradient(135deg, #eff5f0 0%, #ebf2ed 46%, #e5eee8 100%);
}

body[data-theme="sky"] {
  background:
    radial-gradient(circle at top left, rgba(165, 199, 232, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(197, 221, 244, 0.18), transparent 22%),
    radial-gradient(circle at bottom left, rgba(185, 214, 232, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(218, 229, 243, 0.16), transparent 20%),
    linear-gradient(135deg, #eef4f8 0%, #ebf1f6 46%, #e7edf2 100%);
}

body[data-theme="rose"] {
  background:
    radial-gradient(circle at top left, rgba(235, 196, 200, 0.17), transparent 24%),
    radial-gradient(circle at top right, rgba(242, 214, 219, 0.16), transparent 22%),
    radial-gradient(circle at bottom left, rgba(230, 205, 207, 0.16), transparent 22%),
    radial-gradient(circle at bottom right, rgba(238, 220, 220, 0.14), transparent 20%),
    linear-gradient(135deg, #f5efef 0%, #f1ebeb 46%, #ece7e8 100%);
}

body[data-theme="forest"] {
  background:
    radial-gradient(circle at top left, rgba(170, 199, 162, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(197, 215, 187, 0.14), transparent 22%),
    radial-gradient(circle at bottom left, rgba(185, 208, 175, 0.18), transparent 22%),
    radial-gradient(circle at bottom right, rgba(215, 228, 205, 0.16), transparent 20%),
    linear-gradient(135deg, #eef3eb 0%, #e9efe6 46%, #e4ebe0 100%);
}

body[data-theme="pearl"] {
  background:
    radial-gradient(circle at top left, rgba(214, 214, 209, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(229, 230, 225, 0.14), transparent 22%),
    radial-gradient(circle at bottom left, rgba(218, 219, 214, 0.16), transparent 22%),
    radial-gradient(circle at bottom right, rgba(235, 235, 230, 0.14), transparent 20%),
    linear-gradient(135deg, #f4f3f0 0%, #f0efec 46%, #ecebe8 100%);
}

body[data-theme="slate"] {
  background:
    radial-gradient(circle at top left, rgba(176, 192, 210, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(199, 211, 226, 0.14), transparent 22%),
    radial-gradient(circle at bottom left, rgba(188, 200, 214, 0.16), transparent 22%),
    radial-gradient(circle at bottom right, rgba(222, 229, 238, 0.14), transparent 20%),
    linear-gradient(135deg, #eef1f4 0%, #e9edf1 46%, #e4e8ed 100%);
}

button, input, select { font: inherit; }
.hidden { display: none !important; }

button,
input,
select,
summary,
label,
a {
  -webkit-tap-highlight-color: transparent;
}

.button,
.collapsible-summary,
.meta-chip {
  -webkit-user-select: none;
  user-select: none;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 18%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.16), transparent 36%);
}

.app {
  max-width: 1440px;
  margin: 0 auto;
  padding: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
}

.topbar, .today-widget, .section-head, .inline-actions, .list-row, .transaction-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.topbar, .today-widget, .toolbar, .card, .lock-card, .modal-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.topbar, .today-widget, .toolbar, .card { padding: 20px; }
.topbar { position: sticky; top: 14px; z-index: 5; }

.topbar h1, .today-widget h2, .section-head h2, .stat h3, .lock-card h1 {
  margin: 4px 0 0;
}

.label {
  margin: 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.muted {
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

.button {
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.82);
  color: var(--text);
  border-radius: 12px;
  padding: 11px 14px;
  cursor: pointer;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  min-height: 46px;
  touch-action: manipulation;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(24, 24, 27, 0.08);
}

.button:active {
  transform: translateY(1px) scale(0.985);
  box-shadow: 0 4px 10px rgba(24, 24, 27, 0.08);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  transform: none;
  box-shadow: none;
}

.button-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  color: #fff;
}

.button-compact {
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 12px;
}

.inline-actions-compact {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.mobile-tabs {
  display: none;
}

.mobile-tab {
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.82);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 14px;
  min-height: 42px;
  white-space: nowrap;
}

.mobile-tab.is-active {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-strong) 100%);
  border-color: var(--accent-strong);
  color: #fff;
  box-shadow: 0 10px 24px rgba(83, 103, 95, 0.22);
}

.quick-actions {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quick-action {
  min-height: 54px;
  font-weight: 700;
  border-radius: 18px;
}

.quick-action-income {
  background: linear-gradient(135deg, rgba(233, 246, 237, 0.95), rgba(214, 235, 222, 0.92));
  color: #2d6f4b;
}

.quick-action-expense {
  background: linear-gradient(135deg, rgba(251, 236, 236, 0.96), rgba(244, 221, 221, 0.92));
  color: #b14848;
}

.quick-action-transfer {
  background: linear-gradient(135deg, rgba(238, 243, 248, 0.96), rgba(226, 234, 242, 0.92));
  color: #44657a;
}

.mobile-panel-hidden {
  display: none !important;
}

.danger { color: var(--negative); }
.hidden-action { display: none; }
.hidden-action.visible { display: inline-flex; }

.topbar-actions, .toolbar-actions, .toolbar-group, .quick-form, .stack-form, .backup-block, .list, .grid, .mini-form {
  display: grid;
  gap: 14px;
}

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

.theme-option {
  border: 1px solid var(--line);
  background: rgba(255, 252, 248, 0.82);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 10px;
  text-align: left;
  color: var(--text);
}

.theme-option.is-active {
  border-color: rgba(106, 127, 118, 0.38);
  box-shadow: 0 14px 28px rgba(24, 24, 27, 0.08);
  transform: translateY(-1px);
}

.theme-swatches {
  display: flex;
  gap: 8px;
}

.theme-swatches span {
  width: 100%;
  height: 22px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
}

.theme-name {
  font-weight: 700;
}

.notice-bar {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: linear-gradient(135deg, rgba(255, 252, 248, 0.84), rgba(244, 240, 234, 0.72));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.notice-bar .button {
  min-width: 220px;
}

.reminder-settings {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  align-items: end;
}

.reminder-settings label {
  display: grid;
  gap: 6px;
}

.reminder-settings label span {
  font-size: 0.88rem;
  color: var(--muted);
}

.reminder-settings .button {
  min-height: 48px;
}

.today-widget {
  background:
    linear-gradient(135deg, rgba(255, 250, 245, 0.88), rgba(249, 241, 232, 0.78)),
    radial-gradient(circle at right top, rgba(244, 196, 48, 0.14), transparent 30%);
}

.today-widget h2 {
  font-size: clamp(1.55rem, 2.6vw, 2.4rem);
  line-height: 1.05;
}

.quick-form {
  grid-template-columns: 150px 1fr 150px 140px;
  width: min(100%, 760px);
}

.toolbar {
  display: grid;
  grid-template-columns: 0.85fr 1fr auto;
  align-items: end;
  gap: 14px;
  background: linear-gradient(135deg, rgba(255, 249, 244, 0.8), rgba(239, 244, 242, 0.76));
}

.overview-action-bar {
  grid-template-columns: 1fr;
  background: transparent;
  border: 0;
  box-shadow: none;
  backdrop-filter: none;
  padding: 8px 0 2px;
}

.toolbar-group { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.toolbar-group.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.preset-group { display: flex; flex-wrap: wrap; gap: 8px; }
.toolbar-actions {
  align-content: start;
}
.toolbar-actions .button,
.toolbar-actions .file-button {
  width: 100%;
}

.overview-action-bar .toolbar-actions {
  gap: 0;
}

.overview-action-bar .button {
  min-height: 54px;
  border-radius: 18px;
  font-weight: 700;
}
.preset-button.active {
  border-color: rgba(106, 127, 118, 0.4);
  background: rgba(106, 127, 118, 0.12);
}

.quick-form input,
.quick-form select,
.stack-form input,
.toolbar input,
.toolbar select,
.form-grid input,
.form-grid select,
.mini-form input,
.mini-form select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.82);
}

.toolbar label, .form-grid label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
}

.stats-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.main-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: 8px;
  grid-auto-flow: dense;
}
.span-2 { grid-column: span 2; }

.stat {
  position: relative;
  overflow: hidden;
  min-height: 106px;
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #8e9f95, #82a89a, #d8b38a);
}

.stat:nth-child(1) { background: linear-gradient(135deg, rgba(255,250,245,0.86), rgba(239,228,210,0.74)); }
.stat:nth-child(2) { background: linear-gradient(135deg, rgba(255,250,245,0.86), rgba(229,238,230,0.74)); }
.stat:nth-child(3) { background: linear-gradient(135deg, rgba(255,250,245,0.86), rgba(228,236,238,0.74)); }
.stat:nth-child(4) { background: linear-gradient(135deg, rgba(255,250,245,0.86), rgba(236,232,236,0.72)); }
.stat:nth-child(5) { background: linear-gradient(135deg, rgba(255,250,245,0.86), rgba(231,239,235,0.74)); }
.stat:nth-child(6) { background: linear-gradient(135deg, rgba(255,250,245,0.86), rgba(241,231,227,0.74)); }
.stat h3 { font-size: 1.5rem; }

.card {
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  overflow: hidden;
  align-self: start;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 24px 48px rgba(36, 28, 21, 0.1);
}

.section-head h2 { font-size: 1.22rem; }
.section-meta { display: flex; gap: 8px; flex-wrap: wrap; }
.inner-section-head { margin-top: 22px; }
.section-divider {
  height: 1px;
  margin-top: 22px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
}

.collapsible-section {
  margin-top: 0;
  width: 100%;
}

.collapsible-summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0;
}

.collapsible-summary::-webkit-details-marker {
  display: none;
}

.collapsible-summary h2 {
  margin: 4px 0 0;
}

.nested-collapsible {
  margin-top: 10px;
}

.card.is-collapsed {
  padding-top: 16px;
  padding-bottom: 16px;
}

.card.is-collapsed .collapsible-summary {
  min-height: 52px;
  align-items: center;
}

.meta-chip {
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.2;
  background: rgba(252, 247, 241, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.collapse-chip {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  padding: 0;
  font-size: 1.05rem;
  line-height: 1;
}

[data-collapsible]:not([open]) > .collapsible-summary .collapse-chip {
  transform: rotate(-90deg);
}

.list { margin-top: 12px; }

.list-row {
  align-items: flex-start;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.list-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.row-title { margin: 0; font-weight: 700; }
.row-subtitle { margin: 4px 0 0; color: var(--muted); font-size: 0.92rem; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.account-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}
.category-row {
  align-items: center;
}
.account-actions { gap: 6px; align-items: center; }
.icon-action {
  min-width: 36px;
  width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}

.icon-svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.icon-action .icon-svg {
  width: 17px;
  height: 17px;
}

.icon-action-danger {
  color: var(--negative);
}

.amount {
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.income { color: var(--positive); }
.expense, .liability, .error-text { color: var(--negative); }

.progress {
  height: 8px;
  margin-top: 10px;
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.08);
  overflow: hidden;
}

.progress > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #9aa99f, #6f8b7f);
}

.mini-form {
  margin-top: 18px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.mini-form button { min-height: 46px; }
.account-inline-form {
  grid-template-columns: 1.8fr 1fr;
}

.wallet-inline-form {
  grid-template-columns: 0.9fr 0.95fr 0.95fr 0.9fr 1fr 1.1fr;
}

.account-inline-form input,
.account-inline-form select,
.wallet-inline-form input,
.wallet-inline-form select {
  min-width: 0;
}

.wallet-inline-form .hidden {
  display: none !important;
}
.backup-block { padding-top: 4px; }
.apk-note { display: grid; gap: 8px; }
.info-block {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 252, 248, 0.68);
}
.info-actions {
  justify-content: flex-start;
  gap: 10px;
}
.apk-note p:last-child { display: none; }

.file-button {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }

.modal {
  width: min(720px, calc(100vw - 24px));
  border: 0;
  background: transparent;
  padding: 0;
}

.modal::backdrop, .lock-screen { background: rgba(17, 17, 17, 0.45); }

.modal-card, .lock-card {
  padding: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(250, 247, 242, 0.9));
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin: 18px 0;
}

.compact-form-grid {
  grid-template-columns: 1fr;
}

.form-grid .full { grid-column: 1 / -1; }
.icon-button { width: 42px; height: 42px; padding: 0; }
.inline-actions.end { justify-content: flex-end; }

.lock-screen {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  z-index: 10;
  backdrop-filter: blur(10px);
}

.lock-card { width: min(420px, calc(100vw - 24px)); }
.error-text { min-height: 20px; }

@media (max-width: 1100px) {
  .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .toolbar,
  .toolbar-group,
  .toolbar-group.compact,
  .quick-form,
  .mini-form,
  .toolbar-actions {
    grid-template-columns: 1fr;
  }
  .toolbar-actions { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .main-grid {
    gap: 16px;
    grid-auto-rows: auto;
  }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-2 { grid-column: auto; }
  .topbar {
    top: 8px;
    border-radius: 20px;
  }
  .collapsible-summary {
    align-items: flex-start;
  }
  .section-meta {
    width: 100%;
  }
}

@media (max-width: 760px) {
  .app {
    padding: 10px;
    padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  }
  .mobile-tabs {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    z-index: 4;
    margin: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: rgba(255, 248, 242, 0.88);
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 40px rgba(60, 41, 30, 0.14);
    scrollbar-width: none;
  }
  .mobile-tabs::-webkit-scrollbar {
    display: none;
  }
  .mobile-tab {
    flex: 1 0 auto;
    min-width: max-content;
  }
  .topbar {
    position: relative;
    top: 0;
    padding: 14px 14px 12px;
    border-radius: 24px;
  }
  .topbar, .today-widget, .section-head, .inline-actions, .list-row, .transaction-meta {
    flex-direction: column;
    align-items: stretch;
  }
  .topbar h1 {
    font-size: 2.05rem;
    line-height: 0.98;
    letter-spacing: -0.04em;
  }
  .topbar .label {
    font-size: 0.92rem;
    letter-spacing: 0.02em;
    text-transform: none;
  }
  .topbar-actions {
    grid-template-columns: 1fr;
    width: 100%;
    gap: 10px;
  }
  .topbar-actions .button {
    width: 100%;
    min-height: 50px;
    border-radius: 16px;
  }
  .today-widget,
  .toolbar,
  .card,
  .modal-card,
  .lock-card {
    border-radius: 24px;
    padding: 16px 14px;
  }
  .today-widget {
    margin-top: 10px;
    padding: 18px 16px;
  }
  .today-widget .label {
    font-size: 0.76rem;
  }
  .today-widget h2 {
    font-size: 1.95rem;
  }
  .today-widget .muted {
    font-size: 1rem;
  }
  .toolbar {
    gap: 12px;
    padding-top: 14px;
  }
  .overview-action-bar {
    padding: 2px 0 0;
    gap: 0;
  }
  .toolbar-group,
  .toolbar-group.compact,
  .toolbar-actions {
    gap: 10px;
  }
  .toolbar label {
    gap: 6px;
  }
  .toolbar-group label,
  .form-grid label {
    font-size: 0.88rem;
  }
  .preset-group {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .preset-group::-webkit-scrollbar {
    display: none;
  }
  .preset-group .button {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .notice-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border-radius: 18px;
  }
  .notice-bar .button {
    min-width: 0;
    width: 100%;
  }
  .reminder-settings {
    grid-template-columns: 1fr;
  }
  .collapse-chip {
    text-align: center;
    min-height: 44px;
    display: grid;
    place-items: center;
  }
  .row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }
  .account-head {
    align-items: flex-start;
  }
  .category-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
  .row-actions .button {
    width: 100%;
  }
  .account-actions {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    gap: 6px;
    align-self: flex-start;
  }
  .account-actions .icon-action {
    width: 36px;
    min-width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
  }
  .transaction-meta {
    gap: 10px;
  }
  .mini-form,
  .account-inline-form,
  .wallet-inline-form,
  .toolbar-group,
  .toolbar-group.compact {
    grid-template-columns: 1fr;
  }
  .toolbar-actions {
    grid-template-columns: 1fr;
  }
  .list-row {
    padding: 14px 0;
  }
  .row-title {
    font-size: 1.02rem;
  }
  .row-subtitle {
    font-size: 0.95rem;
    line-height: 1.45;
  }
  .form-grid { grid-template-columns: 1fr; }
  .modal {
    width: calc(100vw - 16px);
  }
  .stats-grid {
    gap: 12px;
  }
  .overview-stats-grid {
    margin-top: 2px;
  }
  .mobile-panel {
    margin-bottom: 12px;
  }
  .quick-actions {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .stat {
    border-radius: 22px;
    padding: 14px 13px;
    min-height: 94px;
  }
  .stat .label {
    font-size: 0.72rem;
    letter-spacing: 0.05em;
  }
  .stat h3 {
    font-size: 1.28rem;
    line-height: 1.08;
  }
}

@media (max-width: 560px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-stats-grid .stat:last-child {
    grid-column: span 2;
  }
  .topbar-actions {
    grid-template-columns: 1fr;
  }
  .quick-actions {
    grid-template-columns: 1fr;
  }
  .row-actions {
    grid-template-columns: 1fr;
  }
  .account-actions {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
    grid-template-columns: none;
  }
  .account-actions .icon-action {
    width: 34px;
    min-width: 34px;
    height: 34px;
    min-height: 34px;
  }
  .toolbar,
  .today-widget,
  .card {
    padding: 14px 13px;
  }
  .overview-action-bar {
    padding: 0;
  }
  .toolbar input,
  .toolbar select,
  .mini-form input,
  .mini-form select,
  .button {
    min-height: 48px;
    border-radius: 15px;
  }
  .section-head h2,
  .collapsible-summary h2 {
    font-size: 1.1rem;
  }
  .stat h3 {
    font-size: 1.18rem;
  }
  .collapsible-summary {
    gap: 10px;
  }
  .collapsible-summary > span:first-child {
    min-width: 0;
  }
  .collapsible-summary .collapse-chip {
    width: 42px;
  }
  .backup-block,
  .stack-form,
  .mini-form {
    gap: 12px;
  }
}
