:root {
  color-scheme: light;
  --bg: #f2f5fa;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --text: #10213a;
  --muted: #66758b;
  --border: #dfe5ef;
  --primary: #991b2f;
  --primary-dark: #721224;
  --primary-soft: #f9e8ec;
  --income: #169447;
  --income-soft: #e9f8ef;
  --expense: #df3f45;
  --expense-soft: #fff0f1;
  --warning: #b97300;
  --warning-soft: #fff6df;
  --shadow: 0 10px 28px rgba(16, 33, 58, 0.08);
  --radius: 20px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #151316;
  --surface-soft: #1d191c;
  --text: #f8f4f5;
  --muted: #aaa0a4;
  --border: #352b30;
  --primary: #c62f48;
  --primary-dark: #a82138;
  --primary-soft: #3b1822;
  --income: #42c979;
  --income-soft: #143424;
  --expense: #ff7378;
  --expense-soft: #421f25;
  --warning: #f0b74e;
  --warning-soft: #3c2d12;
  --shadow: 0 10px 28px rgba(0, 0, 0, 0.3);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

button {
  -webkit-tap-highlight-color: transparent;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: min(100%, 540px);
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 82px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 18px 14px;
  background: rgba(242, 245, 250, 0.94);
  border-bottom: 1px solid rgba(223, 229, 239, 0.8);
  backdrop-filter: blur(14px);
}

:root[data-theme="dark"] .topbar {
  background: rgba(9, 9, 11, 0.96);
  border-bottom-color: var(--border);
}

.topbar h1 {
  margin: 1px 0 0;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.topbar-kicker {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

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

.month-control {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.month-control input {
  width: 118px;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.member-pill {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  font-size: 14px;
  font-weight: 800;
  box-shadow: 0 5px 14px rgba(21, 87, 213, 0.25);
}

.view {
  padding: 16px 16px calc(112px + var(--safe-bottom));
}

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

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card-pad {
  padding: 18px;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.card-title-row h2,
.section-title {
  margin: 0;
  font-size: 16px;
  letter-spacing: -0.01em;
}

.section-link,
.text-button {
  border: 0;
  padding: 5px 0;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  font-weight: 750;
}

.balance-card {
  position: relative;
  overflow: hidden;
  padding: 22px;
  background:
    radial-gradient(circle at 92% 0%, rgba(255, 255, 255, 0.22), transparent 34%),
    linear-gradient(145deg, #741327, #bd2b45);
  color: white;
  border: 0;
}

.balance-card::after {
  content: "";
  position: absolute;
  right: -48px;
  bottom: -64px;
  width: 170px;
  height: 170px;
  border: 28px solid rgba(255, 255, 255, 0.08);
  border-radius: 50%;
}

.balance-label {
  position: relative;
  z-index: 1;
  margin: 0 0 7px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 650;
}

.balance-value {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(34px, 10vw, 43px);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.balance-subtitle {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, 0.76);
  font-size: 13px;
}

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

.summary-card {
  padding: 16px;
  box-shadow: none;
}

.summary-card.income {
  background: var(--income-soft);
  border-color: #ccebd8;
}

.summary-card.expense {
  background: var(--expense-soft);
  border-color: #f4d0d2;
}

.summary-label {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.summary-value {
  margin: 0;
  font-size: 19px;
  font-weight: 850;
  letter-spacing: -0.025em;
}

.income .summary-value,
.money-income {
  color: var(--income);
}

.expense .summary-value,
.money-expense {
  color: var(--expense);
}

.quick-launch {
  width: 100%;
  min-height: 58px;
  border: 0;
  border-radius: 18px;
  background: var(--primary);
  color: white;
  font-weight: 850;
  font-size: 16px;
  box-shadow: 0 10px 24px rgba(153, 27, 47, 0.28);
}

.shopping-home {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 16px 18px;
  color: var(--text);
  text-align: left;
}
.shopping-home > span:first-child { font-size: 25px; }
.shopping-home strong, .shopping-home small { display: block; }
.shopping-home small { margin-top: 3px; color: var(--muted); }
.shopping-home b { color: var(--primary); font-size: 24px; }

.quick-launch:active,
.primary-button:active,
.nav-primary:active {
  transform: translateY(1px);
}

.transaction-list {
  display: grid;
  gap: 2px;
}

.transaction-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  gap: 11px;
  align-items: center;
  width: 100%;
  min-height: 67px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #edf0f5;
  background: transparent;
  color: inherit;
  text-align: left;
}

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

.transaction-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: var(--surface-soft);
  font-size: 20px;
}

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

.transaction-description {
  display: block;
  overflow: hidden;
  margin: 0 0 3px;
  font-size: 14px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-meta {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 11.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.transaction-amount {
  min-width: 86px;
  font-size: 13px;
  font-weight: 850;
  text-align: right;
}

.category-bars {
  display: grid;
  gap: 12px;
}

.category-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  font-size: 12px;
}

.category-bar-head strong {
  font-weight: 750;
}

.progress-track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf4;
}

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

.empty-state {
  padding: 26px 14px;
  color: var(--muted);
  text-align: center;
}

.empty-state-icon {
  display: block;
  margin-bottom: 8px;
  font-size: 30px;
}

.form-card {
  padding: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 4px;
  border-radius: 16px;
  background: #eef2f8;
}

.segmented button {
  min-height: 46px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active-income {
  background: var(--income-soft);
  color: var(--income);
  box-shadow: 0 2px 8px rgba(22, 148, 71, 0.12);
}

.segmented button.active-expense {
  background: var(--expense-soft);
  color: var(--expense);
  box-shadow: 0 2px 8px rgba(223, 63, 69, 0.12);
}

.amount-wrap {
  padding: 24px 0 20px;
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.amount-input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: clamp(42px, 13vw, 57px);
  font-weight: 850;
  letter-spacing: -0.055em;
}

.amount-input::placeholder {
  color: #b5bfce;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.category-chip {
  min-height: 77px;
  padding: 9px 5px;
  border: 1px solid var(--border);
  border-radius: 15px;
  background: var(--surface);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
}

.category-chip .category-emoji {
  display: block;
  margin-bottom: 5px;
  color: var(--text);
  font-size: 21px;
}

.category-chip.selected {
  border-color: var(--primary);
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.form-group {
  margin-top: 18px;
}

.input,
.select,
.textarea,
.search-input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 14px;
  outline: none;
  background: var(--surface);
  color: var(--text);
  padding: 0 13px;
}

.textarea {
  min-height: 76px;
  padding-top: 12px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus,
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.compact-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 10px;
}

.auto-member {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 16px 0;
  padding: 10px 12px;
  border-radius: 13px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
}

.primary-button,
.secondary-button,
.danger-button {
  width: 100%;
  min-height: 52px;
  border-radius: 15px;
  font-weight: 850;
}

.primary-button {
  border: 0;
  background: var(--primary);
  color: white;
  box-shadow: 0 8px 20px rgba(21, 87, 213, 0.24);
}

.secondary-button {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.danger-button {
  border: 1px solid #f1c3c5;
  background: var(--expense-soft);
  color: var(--expense);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.filter-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 12px;
}

.filter-count {
  display: grid;
  place-items: center;
  min-width: 46px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-card {
  padding: 22px;
  border: 1.5px dashed #b7c5da;
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}

.upload-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin: 0 auto 12px;
  border-radius: 18px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 27px;
}

.upload-card h2 {
  margin: 0 0 7px;
  font-size: 18px;
}

.upload-card p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.upload-controls {
  display: grid;
  gap: 10px;
}

.document-list {
  display: grid;
  gap: 10px;
}

.document-card {
  padding: 15px;
}

.document-head {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.document-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 20px;
}

.document-name {
  overflow: hidden;
  font-size: 13px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
}

.status-badge,
.source-badge {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 9px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

.status-review {
  background: var(--warning-soft);
  color: var(--warning);
}

.status-imported {
  background: var(--income-soft);
  color: var(--income);
}

.status-error {
  background: var(--expense-soft);
  color: var(--expense);
}

.document-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.small-button {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text);
  font-size: 11px;
  font-weight: 800;
}

.small-button.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.review-list {
  display: grid;
  gap: 10px;
}

.candidate-card {
  padding: 14px;
}

.candidate-card.imported {
  opacity: 0.65;
}

.candidate-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}

.candidate-check {
  width: 21px;
  height: 21px;
  accent-color: var(--primary);
}

.candidate-amount {
  font-size: 14px;
  font-weight: 850;
}

.candidate-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.candidate-grid .full {
  grid-column: 1 / -1;
}

.candidate-grid input,
.candidate-grid select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  padding: 0 10px;
  color: var(--text);
  font-size: 12px;
}

.review-footer {
  position: sticky;
  bottom: calc(82px + var(--safe-bottom));
  z-index: 8;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
}

.info-list {
  display: grid;
  gap: 10px;
}

.info-item {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 11px;
  align-items: center;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--surface);
}

.info-item-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  background: var(--primary-soft);
  font-size: 20px;
}

.info-item strong {
  display: block;
  margin-bottom: 3px;
  font-size: 13px;
}

.info-item span {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.35;
}

.mini-list {
  display: grid;
  gap: 1px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--border);
}

.mini-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 54px;
  padding: 10px 12px;
  background: var(--surface);
  text-align: left;
}

.mini-row span,
.mini-row strong,
.mini-row small {
  display: block;
}

.mini-row strong,
.mini-row b {
  font-size: 12px;
}

.mini-row small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10.5px;
}

.mini-button {
  width: 100%;
  border: 0;
  color: var(--text);
  font: inherit;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  width: min(100%, 540px);
  min-height: calc(76px + var(--safe-bottom));
  padding: 7px 7px var(--safe-bottom);
  transform: translateX(-50%);
  border-top: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -10px 30px rgba(16, 33, 58, 0.08);
  backdrop-filter: blur(16px);
}

:root[data-theme="dark"] .bottom-nav,
:root[data-theme="dark"] .review-footer {
  background: rgba(15, 13, 15, 0.98);
}

:root[data-theme="dark"] .bottom-nav button {
  color: var(--muted);
}

:root[data-theme="dark"] .summary-card.income { border-color: #28513a; }
:root[data-theme="dark"] .summary-card.expense { border-color: #63303a; }
:root[data-theme="dark"] .transaction-row { border-bottom-color: var(--border); }
:root[data-theme="dark"] input,
:root[data-theme="dark"] select,
:root[data-theme="dark"] textarea { background: var(--surface-soft); color: var(--text); }

.shopping-entry {
  display: flex;
  align-items: center;
  gap: 13px;
  width: 100%;
  padding: 16px;
  color: var(--text);
  text-align: left;
}

.shopping-entry-icon { font-size: 28px; }
.shopping-entry span:nth-child(2) { flex: 1; }
.shopping-entry strong, .shopping-entry small { display: block; }
.shopping-entry small { margin-top: 3px; color: var(--muted); }
.shopping-entry b { color: var(--primary); font-size: 24px; }
.shopping-add-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; margin-top: 10px; }
.shopping-add-row .primary-button { width: auto; margin: 0; }
.shopping-list { display: grid; gap: 8px; }
.shopping-row { display: flex; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--border); border-radius: 14px; background: var(--surface-soft); }
.shopping-check { width: 30px; height: 30px; flex: 0 0 30px; border: 2px solid var(--primary); border-radius: 9px; background: transparent; color: white; font-weight: 900; }
.shopping-row.is-checked .shopping-check { background: var(--primary); }
.shopping-row.is-checked .shopping-text strong { text-decoration: line-through; color: var(--muted); }
.shopping-text { min-width: 0; flex: 1; }
.shopping-text strong, .shopping-text span, .shopping-text small { display: block; }
.shopping-text span { margin-top: 2px; color: var(--primary); font-size: 12px; font-weight: 700; }
.shopping-text small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.shopping-delete { width: 32px; height: 32px; border: 0; background: transparent; color: var(--muted); font-size: 24px; }

.bottom-nav button {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-width: 0;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: #7a879a;
  font-size: 9.5px;
  font-weight: 750;
}

.bottom-nav button.active {
  color: var(--primary);
  background: var(--primary-soft);
}

.nav-icon {
  font-size: 22px;
  line-height: 1;
  font-weight: 500;
}

.bottom-nav .nav-primary {
  align-self: start;
  height: 66px;
  margin-top: -19px;
  border-radius: 22px;
  background: var(--primary);
  color: white;
  box-shadow: 0 9px 20px rgba(21, 87, 213, 0.29);
}

.bottom-nav .nav-primary.active {
  background: var(--primary-dark);
  color: white;
}

.nav-plus {
  font-size: 28px;
  line-height: 0.85;
}

.activation-screen {
  display: grid;
  place-items: center;
  min-height: 100dvh;
  padding: calc(24px + env(safe-area-inset-top, 0px)) 20px calc(24px + var(--safe-bottom));
  background:
    radial-gradient(circle at 15% 0%, rgba(21, 87, 213, 0.16), transparent 38%),
    var(--bg);
}

.activation-card {
  width: min(100%, 430px);
  padding: 28px 22px;
  border: 1px solid var(--border);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.activation-logo {
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-bottom: 20px;
  border-radius: 22px;
  background: var(--primary);
  color: white;
  font-size: 31px;
  box-shadow: 0 10px 24px rgba(21, 87, 213, 0.25);
}

.activation-card h1 {
  margin: 0 0 8px;
  font-size: 27px;
  letter-spacing: -0.035em;
}

.activation-card p {
  margin: 0 0 22px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

.activation-note {
  margin-top: 15px !important;
  font-size: 11.5px !important;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(94px + var(--safe-bottom));
  z-index: 80;
  width: min(calc(100% - 32px), 470px);
  padding: 13px 16px;
  transform: translateX(-50%);
  border-radius: 14px;
  background: #10213a;
  color: white;
  box-shadow: 0 12px 28px rgba(16, 33, 58, 0.24);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.toast-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.toast-action button {
  border: 0;
  background: transparent;
  color: #9ec1ff;
  font-weight: 850;
}

.loading-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(16, 33, 58, 0.34);
  backdrop-filter: blur(4px);
}

.loading-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.loading-card p {
  margin: 0;
  font-size: 13px;
  font-weight: 750;
}

.spinner {
  width: 25px;
  height: 25px;
  border: 3px solid #d8e2f1;
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.transaction-dialog {
  width: min(calc(100% - 24px), 500px);
  max-height: 88dvh;
  padding: 0;
  border: 0;
  border-radius: 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 22px 60px rgba(16, 33, 58, 0.25);
}

.transaction-dialog::backdrop {
  background: rgba(16, 33, 58, 0.42);
  backdrop-filter: blur(3px);
}

.dialog-content {
  padding: 20px;
}

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.dialog-head h2 {
  margin: 0;
  font-size: 18px;
}

.dialog-close {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 20px;
}

@media (min-width: 541px) {
  body {
    padding: 18px 0;
  }

  .app-shell {
    min-height: calc(100dvh - 36px);
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 30px;
    box-shadow: 0 24px 70px rgba(16, 33, 58, 0.12);
  }

  .topbar {
    border-radius: 30px 30px 0 0;
  }

  .bottom-nav {
    bottom: 18px;
    border: 1px solid var(--border);
    border-radius: 0 0 30px 30px;
  }
}

@media (max-width: 370px) {
  .category-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .month-control input {
    width: 105px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

.pending-card {
  width: 100%;
  border: 1px solid #f2c46d;
  border-radius: 14px;
  background: #fff8e8;
  color: #704700;
  font: inherit;
  font-weight: 750;
  line-height: 1.35;
  padding: 13px 15px;
  text-align: left;
  cursor: pointer;
}

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