:root {
  /* Catppuccin Latte (Default) */
  --bg: #eff1f5;
  --sidebar-bg: #e6e9ef;
  --surface: #ffffff;
  --surface-subtle: #f4f6fa;
  --hover: #eaeef6;
  --selected: #dce2f0;
  --border: #d7dce8;
  --border-subtle: #e7eaf2;
  --text: #4c4f69;
  --text-muted: #6c6f85;
  --text-faint: #8c8fa1;
  --accent: #1e66f5;
  --accent-soft: rgba(30, 102, 245, 0.12);
  --green: #40a02b;
  --green-soft: rgba(64, 160, 43, 0.13);
  --amber: #df8e1d;
  --amber-soft: rgba(223, 142, 29, 0.14);
  --red: #d20f39;
  --red-soft: rgba(210, 15, 57, 0.13);
  --teal: #179299;
  --shadow-sm: 0 1px 3px rgba(76, 79, 105, 0.05);
  --shadow-md: 0 6px 20px rgba(76, 79, 105, 0.08);
  --shadow-lg: 0 16px 40px rgba(76, 79, 105, 0.16);
}

[data-theme="frappe"] {
  /* Catppuccin Frappé (lighter muted slate) */
  --bg: #363a4f;
  --sidebar-bg: #2e3244;
  --surface: #414559;
  --surface-subtle: #494d64;
  --hover: #51576d;
  --selected: #5b6078;
  --border: #50546b;
  --border-subtle: #454960;
  --text: #cad3f5;
  --text-muted: #a5adcb;
  --text-faint: #838ba7;
  --accent: #8caaee;
  --accent-soft: rgba(140, 170, 238, 0.16);
  --green: #8ebd82;
  --green-soft: rgba(142, 189, 130, 0.16);
  --amber: #e5c890;
  --amber-soft: rgba(229, 200, 144, 0.16);
  --red: #e78284;
  --red-soft: rgba(231, 130, 132, 0.16);
  --teal: #81c8be;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.4);
}

[data-theme="macchiato"] {
  /* Catppuccin Macchiato */
  --bg: #24273a;
  --sidebar-bg: #1e2030;
  --surface: #2d3147;
  --surface-subtle: #363a4f;
  --hover: #3b3f56;
  --selected: #494d64;
  --border: #3d4159;
  --border-subtle: #32364c;
  --text: #cad3f5;
  --text-muted: #a5adcb;
  --text-faint: #8087a2;
  --accent: #8aadf4;
  --accent-soft: rgba(138, 173, 244, 0.16);
  --green: #a6da95;
  --green-soft: rgba(166, 218, 149, 0.16);
  --amber: #eed49f;
  --amber-soft: rgba(238, 212, 159, 0.16);
  --red: #ed8796;
  --red-soft: rgba(237, 135, 150, 0.16);
  --teal: #8bd5ca;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.48);
}

[data-theme="mocha"] {
  /* Catppuccin Mocha */
  --bg: #1e1e2e;
  --sidebar-bg: #181825;
  --surface: #252637;
  --surface-subtle: #2b2c40;
  --hover: #313244;
  --selected: #3b3d54;
  --border: #36384d;
  --border-subtle: #2e3044;
  --text: #cdd6f4;
  --text-muted: #a6adc8;
  --text-faint: #7f849c;
  --accent: #89b4fa;
  --accent-soft: rgba(137, 180, 250, 0.16);
  --green: #90c98e;
  --green-soft: rgba(144, 201, 142, 0.15);
  --amber: #f9e2af;
  --amber-soft: rgba(249, 226, 175, 0.16);
  --red: #f38ba8;
  --red-soft: rgba(243, 139, 168, 0.16);
  --teal: #94e2d5;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.24);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);
}

[data-theme="minimal"] {
  /* Minimal White / Gray (Dime-inspired) */
  --bg: #f4f4f6;
  --sidebar-bg: #ececef;
  --surface: #ffffff;
  --surface-subtle: #ededf0;
  --hover: #e4e4e8;
  --selected: #dcdce2;
  --border: #e2e2e7;
  --border-subtle: #ececf0;
  --text: #18181b;
  --text-muted: #52525b;
  --text-faint: #71717a;
  --accent: #18181b;
  --accent-soft: rgba(24, 24, 27, 0.08);
  --green: #16a34a;
  --green-soft: rgba(22, 163, 74, 0.12);
  --amber: #d97706;
  --amber-soft: rgba(217, 119, 6, 0.13);
  --red: #dc2626;
  --red-soft: rgba(220, 38, 38, 0.12);
  --teal: #0d9488;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="noir"] {
  /* Minimal Dark Gray / Charcoal */
  --bg: #111113;
  --sidebar-bg: #0c0c0e;
  --surface: #1c1c20;
  --surface-subtle: #242429;
  --hover: #2c2c32;
  --selected: #34343c;
  --border: #2c2c34;
  --border-subtle: #232329;
  --text: #f4f4f5;
  --text-muted: #a1a1aa;
  --text-faint: #71717a;
  --accent: #f4f4f5;
  --accent-soft: rgba(244, 244, 245, 0.14);
  --green: #4ade80;
  --green-soft: rgba(74, 222, 128, 0.14);
  --amber: #fbbf24;
  --amber-soft: rgba(251, 191, 36, 0.14);
  --red: #f87171;
  --red-soft: rgba(248, 113, 113, 0.14);
  --teal: #2dd4bf;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.28);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.36);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
}

[data-theme="frappe"] .primary-btn,
[data-theme="frappe"] .mb-fab,
[data-theme="frappe"] .tx-cat-pill.active,
[data-theme="frappe"] .account-nav-item.active {
  color: #232634;
}

[data-theme="mocha"] .primary-btn,
[data-theme="mocha"] .mb-fab,
[data-theme="mocha"] .tx-cat-pill.active,
[data-theme="mocha"] .account-nav-item.active,
[data-theme="noir"] .primary-btn,
[data-theme="noir"] .mb-fab,
[data-theme="noir"] .tx-cat-pill.active,
[data-theme="noir"] .account-nav-item.active {
  color: #181825;
}

.theme-picker {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-subtle);
  padding: 3px;
  border-radius: 10px;
}

.theme-chip {
  border: none;
  background: transparent;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  font-size: 13px;
  line-height: 1;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.12s, background 0.12s, transform 0.08s;
}

.theme-chip:hover {
  opacity: 0.95;
  background: var(--hover);
}

.theme-chip.active {
  opacity: 1;
  background: var(--surface);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 13.5px;
  line-height: 1.45;
  letter-spacing: -0.008em;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

.app-shell {
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 256px;
  flex-shrink: 0;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 14px 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  transition: transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 10px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-logo {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  object-fit: cover;
  display: block;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.1;
}

.brand-sub {
  font-size: 10.5px;
  color: var(--text-faint);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 8px 10px;
  border-radius: 9px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  transition: background 0.12s, color 0.12s;
}

.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--selected); color: var(--text); font-weight: 600; }
.nav-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  font-size: 15px;
  line-height: 1;
  opacity: 0.85;
}

.nav-badge {
  margin-left: auto;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 99px;
}

.sidebar-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 8px 2px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}

.accounts-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.account-nav-row {
  display: flex;
  align-items: center;
  gap: 2px;
}

.account-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 7px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  text-align: left;
}

.account-nav-item:hover { background: var(--hover); color: var(--text); }
.account-nav-item.active { background: var(--selected); color: var(--text); font-weight: 600; }

.account-nav-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-nav-bal {
  font-size: 12px;
  font-weight: 600;
  flex-shrink: 0;
}

.account-nav-bal.neg { color: var(--red); }
.account-nav-bal.pos { color: var(--green); }

.account-rename-btn {
  opacity: 0;
  transition: opacity 0.12s;
  flex-shrink: 0;
}
.account-nav-row:hover .account-rename-btn { opacity: 1; }

.sidebar-footer {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

/* Main Area */
.main-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.month-switcher {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--surface-subtle);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 3px 6px;
}

.month-label {
  font-weight: 700;
  font-size: 14px;
  min-width: 82px;
  text-align: center;
}

.view-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.view-pane {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  padding: 20px 24px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  max-width: none;
  width: 100%;
}

.ptr-indicator {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--surface-subtle);
  opacity: 0;
  flex-shrink: 0;
  transition: height 0.18s ease, opacity 0.18s ease;
}

.ptr-indicator.visible {
  opacity: 1;
}

/* Hero Ready-to-Assign Card */
.hero-card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-subtle) 100%);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.hero-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.hero-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-faint);
}

.hero-amount {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-top: 4px;
  color: var(--green);
}

.hero-amount.warn { color: var(--amber); }
.hero-amount.neg { color: var(--red); }

.hero-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 4px;
}

.hero-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.seg-tabs.compact {
  display: inline-grid;
  grid-template-columns: 1fr 1fr;
  width: 170px;
}

.rta-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 99px;
  border: 1px solid var(--border);
  cursor: pointer;
  background: var(--surface-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  transition: transform 0.1s;
}

.rta-pill:hover { transform: translateY(-1px); }
.rta-pill.rta-pos { background: var(--green-soft); border-color: rgba(64, 160, 43, 0.3); color: var(--green); }
.rta-pill.rta-neg { background: var(--red-soft); border-color: rgba(210, 15, 57, 0.3); color: var(--red); }

.hero-progress-track {
  height: 10px;
  border-radius: 99px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.hero-progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--green);
  transition: width 0.25s ease;
}
.hero-progress-fill.warn { background: var(--amber); }
.hero-progress-fill.neg { background: var(--red); }

.hero-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  padding-top: 4px;
}

.hero-metric {
  background: var(--surface-subtle);
  border-radius: 10px;
  padding: 9px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.hero-metric span {
  font-size: 11px;
  color: var(--text-faint);
  font-weight: 600;
}

.hero-metric strong {
  font-size: 14.5px;
  font-weight: 700;
}

/* Section Bar & Category Cards */
.section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.account-hero-strip {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.account-hero-strip .toolbar-stats,
.account-hero-strip .toolbar-actions {
  width: 100%;
}

.section-heading {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.toolbar-stats,
.toolbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 5px 11px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.stat-chip strong { color: var(--text); margin-left: 3px; }

.acc-balance-card {
  background: linear-gradient(145deg, var(--surface) 0%, var(--surface-subtle) 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.acc-balance-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-faint);
}
.acc-balance-val {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--green);
  line-height: 1.15;
}
.acc-balance-val.neg { color: var(--red); }
.acc-balance-sub { font-size: 11.5px; color: var(--text-muted); }

.groups-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.group-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.group-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px;
}

.group-left {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 13.5px;
  color: var(--text-muted);
}

.group-actions {
  display: inline-flex;
  gap: 4px;
  opacity: 0;
  transition: opacity 0.12s;
}
.group-header-bar:hover .group-actions { opacity: 1; }

.group-summary-text {
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 600;
}

.cat-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
}

.cat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 13px 15px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
}

.cat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.cat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.cat-card-name {
  font-weight: 600;
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.avail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 99px;
  font-weight: 700;
  font-size: 12.5px;
  border: none;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}

.avail-pill.pos { background: var(--green-soft); color: var(--green); }
.avail-pill.under { background: var(--amber-soft); color: var(--amber); }
.avail-pill.neg { background: var(--red-soft); color: var(--red); }
.avail-pill.zero { background: var(--surface-subtle); color: var(--text-faint); }

.progress-track {
  height: 5px;
  width: 100%;
  background: var(--surface-subtle);
  border-radius: 99px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--green);
  transition: width 0.2s;
}
.progress-fill.under { background: var(--amber); }
.progress-fill.over { background: var(--red); }

.cat-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-faint);
}

.inline-assign-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.assigned-input {
  width: 68px;
  text-align: right;
  background: var(--surface-subtle);
  color: var(--text);
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 2px 6px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 600;
}
.assigned-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg);
}

/* Day-Grouped Activity Feed */
.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.day-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.day-header {
  display: flex;
  justify-content: space-between;
  padding: 2px 6px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tx-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.tx-card:hover { border-color: var(--border); background: var(--surface-subtle); }

.tx-card-left {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.tx-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.tx-payee {
  font-weight: 600;
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.tx-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
}

.tx-card-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.tx-amount {
  font-weight: 700;
  font-size: 14px;
}
.tx-amount.neg { color: var(--red); }
.tx-amount.pos { color: var(--green); }

.cleared-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--text-faint);
  background: transparent;
  color: transparent;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
}
.cleared-dot.cleared { background: var(--green); border-color: var(--green); color: #fff; }
.cleared-dot.reconciled { background: var(--accent); border-color: var(--accent); color: #fff; }
[data-theme="mocha"] .cleared-dot.cleared,
[data-theme="mocha"] .cleared-dot.reconciled { color: #181825; }

.cat-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 6px;
  font-size: 11.5px;
  background: var(--surface-subtle);
  border: 1px solid var(--border-subtle);
}
.cat-badge.rta { background: var(--green-soft); color: var(--green); border-color: transparent; font-weight: 600; }
.cat-badge.transfer { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }

/* Cards List (Scheduled & Rules) */
.cards-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

/* Drawer & Modal */
.drawer {
  width: 340px;
  flex-shrink: 0;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}

.drawer-header,
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.drawer-header h2,
.modal-header h2 { margin: 0; font-size: 15px; font-weight: 700; }

.drawer-body,
.modal-body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.drawer-actions {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.drawer-section-title {
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 12px;
  letter-spacing: 0.04em;
}

.drawer-tx-list { display: flex; flex-direction: column; gap: 6px; }
.drawer-tx-item {
  display: flex;
  justify-content: space-between;
  padding: 7px 10px;
  background: var(--surface-subtle);
  border-radius: 8px;
  font-size: 12.5px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 27, 0.45);
  display: grid;
  place-items: center;
  z-index: 50;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

/* Controls */
.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: 2px;
}

.text-input,
.search-input,
.textarea-input {
  width: 100%;
  padding: 8px 10px;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-family: inherit;
  font-size: 13.5px;
}

.search-input { width: 210px; padding: 6px 10px; }
.textarea-input { min-height: 120px; font-family: monospace; font-size: 12px; resize: vertical; }

.text-input:focus,
.search-input:focus,
.textarea-input:focus { outline: none; border-color: var(--accent); }

.inline-row { display: flex; gap: 8px; align-items: center; }

.seg-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 4px;
  background: var(--bg);
  padding: 3px;
  border-radius: 9px;
  border: 1px solid var(--border);
}

.seg-tab {
  border: none;
  background: transparent;
  color: var(--text-muted);
  padding: 5px 8px;
  border-radius: 7px;
  font-weight: 600;
  font-size: 12.5px;
  cursor: pointer;
}

.seg-tab.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.primary-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 9px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}
[data-theme="mocha"] .primary-btn { color: #181825; }
.primary-btn:hover { filter: brightness(1.06); }

.ghost-btn {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 7px 12px;
  font-weight: 500;
  font-size: 13px;
  cursor: pointer;
}
.ghost-btn:hover { background: var(--hover); }
.ghost-btn.small { padding: 5px 9px; font-size: 12px; }
.full-width { width: 100%; }

.danger-btn {
  background: var(--red-soft);
  color: var(--red);
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 8px 14px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.icon-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 7px;
  cursor: pointer;
  display: inline-grid;
  place-items: center;
  font-size: 14px;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
.icon-btn.small { width: 22px; height: 22px; font-size: 12px; }

#mobile-menu-btn {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
}

.mobile-only { display: none; }

.mobile-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  min-height: 64px;
  height: auto;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: none;
  align-items: center;
  justify-content: space-around;
  padding: 8px 8px calc(10px + env(safe-area-inset-bottom, 12px));
  z-index: 32;
}

.mb-nav-item {
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10.5px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.mb-nav-item.active {
  color: var(--accent);
}

.mb-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1;
}

.mb-fab {
  width: 100%;
  height: 44px;
  border-radius: 14px;
  border: none;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 12px;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

[data-theme="mocha"] .mb-fab {
  color: #181825;
}

.empty-hint {
  padding: 28px;
  text-align: center;
  color: var(--text-faint);
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: 12px;
}

@media (max-width: 860px) {
  .mobile-only { display: inline-grid; }
  .mobile-bottom-nav.mobile-only {
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 8px;
  }
  .sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    z-index: 40;
    transform: translateX(-100%);
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 17, 27, 0.45);
    z-index: 35;
  }
  .drawer {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: 100%;
    height: 82vh;
    border-left: none;
    border-top: 1px solid var(--border);
    border-radius: 20px 20px 0 0;
    z-index: 45;
    box-shadow: var(--shadow-lg);
  }
  .topbar {
    padding: calc(10px + env(safe-area-inset-top, 0px)) 14px 10px;
  }
  .view-pane { padding: 14px 14px calc(88px + env(safe-area-inset-bottom, 0px)); }
  .hero-card { padding: 18px; border-radius: 18px; }
  .hero-amount { font-size: 32px; }
  .hero-controls { width: 100%; align-items: stretch; }
  .hero-metrics { grid-template-columns: repeat(2, 1fr); }
  .cat-cards-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  #view-budget .hero-card,
  #view-budget .section-bar {
    display: none;
  }
  .cat-card {
    width: 100%;
    padding: 12px 14px;
    gap: 7px;
    border-radius: 16px;
  }
  .cat-card .avail-pill,
  .cat-card-foot {
    display: none;
  }
  .dime-cat-spent.mobile-only {
    display: inline-block;
    flex-shrink: 0;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: var(--green);
  }
  .dime-cat-spent.under { color: var(--amber); }
  .dime-cat-spent.neg { color: var(--red); }
  .dime-cat-body.mobile-only {
    display: flex;
    align-items: baseline;
    gap: 6px;
  }
  .dime-cat-avail {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
    line-height: 1.15;
    color: var(--text);
  }
  .dime-cat-avail.neg { color: var(--red); }
  .dime-cat-sub {
    font-size: 12px;
    color: var(--text-faint);
  }
  .cat-card .progress-track {
    height: 8px;
  }
  .search-input { width: 100%; }
  .tx-card { padding: 11px 12px; }
  .tx-payee { overflow-wrap: anywhere; }
  .item-card { flex-direction: column; align-items: stretch; }
  .item-card .tx-card-right { justify-content: flex-end; }
}

/* Dime-style Semi-Circular Budget Consumption Gauge */
.budget-gauge-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 18px 20px 14px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.budget-gauge-head {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.budget-gauge-scope {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
}

.gauge-cat-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 55vh;
  overflow-y: auto;
}

.gauge-cat-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  background: var(--surface-subtle);
  cursor: pointer;
  font-weight: 600;
}

.budget-gauge-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-faint);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.budget-gauge-wrap {
  position: relative;
  width: 240px;
  max-width: 100%;
  display: flex;
  justify-content: center;
}

.budget-gauge-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.budget-gauge-track {
  fill: none;
  stroke: var(--surface-subtle);
  stroke-width: 18;
  stroke-linecap: round;
}

.budget-gauge-fill {
  fill: none;
  stroke: var(--text);
  stroke-width: 18;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.35s ease, stroke 0.2s ease;
}

.budget-gauge-fill.warn { stroke: var(--amber); }
.budget-gauge-fill.neg { stroke: var(--red); }

.budget-gauge-center {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  text-align: center;
  pointer-events: none;
}

.budget-gauge-left {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.budget-gauge-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  margin-top: 2px;
}

.budget-gauge-endpoints {
  width: 224px;
  max-width: 100%;
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
  margin-top: 4px;
}

.account-chart-card {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px 14px 10px;
  box-shadow: var(--shadow-sm);
}

.account-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.account-chart-title {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-faint);
}

.account-chart-val {
  font-size: 16px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.account-chart-val.neg { color: var(--red); }

.account-chart-svg {
  width: 100%;
  height: 112px;
  display: block;
}

.account-chart-foot {
  display: flex;
  justify-content: space-between;
  font-size: 10.5px;
  color: var(--text-faint);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

.sidebar-section-btn {
  border: none;
  background: transparent;
  padding: 2px 4px;
  border-radius: 6px;
  font: inherit;
  letter-spacing: inherit;
  color: inherit;
  cursor: pointer;
}

.sidebar-section-btn:hover {
  color: var(--text);
  background: var(--hover);
}

.sidebar-section-btn.active {
  color: var(--accent);
}

.rules-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
}

.rules-toolbar .search-input {
  flex: 1;
  width: auto;
  min-width: 0;
}

.rules-toolbar #btn-run-rules {
  flex-shrink: 0;
}

/* Dime-style Insights View */
.insights-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  flex-shrink: 0;
  width: 100%;
}

.insights-tabs {
  max-width: 280px;
}

.insights-acc-select {
  flex: 0 0 auto;
  max-width: 220px;
  margin-left: auto;
}

.insights-card {
  background: var(--surface);
  border-radius: 22px;
  padding: 20px 22px;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}

.insights-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.insights-card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}

.insights-change {
  font-size: 12.5px;
  font-weight: 600;
}

.insights-change.down { color: var(--green); }
.insights-change.up { color: var(--red); }

.insights-hero-amt {
  font-size: clamp(24px, 7vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
  margin: 4px 0 12px;
}

.insights-amt-sym {
  color: var(--text-faint);
  margin-right: 2px;
}

.insights-amt-num {
  color: var(--text);
}

.insights-bars-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.insights-avg-line {
  position: absolute;
  left: 0;
  right: 0;
  border-top: 1.5px dashed var(--text-faint);
  opacity: 0.45;
  pointer-events: none;
}

.insights-card-foot {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-faint);
  font-weight: 500;
}

.insights-cashflow-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.insights-cf-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.insights-cf-amt {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.insights-cf-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insights-cf-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.insights-cf-lbl {
  width: 24px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
}

.insights-cf-track {
  flex: 1;
  height: 10px;
  border-radius: 99px;
  background: var(--surface-subtle);
  overflow: hidden;
}

.insights-cf-fill {
  height: 100%;
  border-radius: 99px;
}

.insights-cf-fill.pos { background: var(--green); }
.insights-cf-fill.neg { background: var(--red); }

.insights-share-bar {
  display: flex;
  gap: 3px;
  height: 12px;
  width: 100%;
  border-radius: 99px;
  overflow: hidden;
}

.insights-share-seg {
  height: 100%;
  border-radius: 4px;
}

.insights-largest-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.insights-largest-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--surface-subtle);
  cursor: pointer;
}

.insights-largest-row:hover {
  background: var(--hover);
}

.insights-largest-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.insights-largest-payee {
  font-weight: 600;
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insights-largest-sub {
  font-size: 11px;
  color: var(--text-faint);
}

.insights-largest-amt {
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.insights-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
  flex-shrink: 0;
  width: 100%;
}

.insights-side-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
  height: 100%;
}

#insights-largest {
  flex: 1;
}

.insights-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.insights-legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.insights-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.insights-leg-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.insights-leg-pct {
  font-size: 11.5px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

.insights-leg-amt {
  font-variant-numeric: tabular-nums;
}

.insights-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 150px;
}

.insights-bar-col {
  flex: 1 0 22px;
  max-width: 56px;
  min-width: 22px;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.insights-bar-track {
  flex: 1;
  width: 100%;
  max-width: 28px;
  background: var(--surface-subtle);
  border-radius: 8px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.insights-bar-fill {
  width: 100%;
  background: var(--accent);
  border-radius: 8px;
  transition: height 0.25s ease;
}

.insights-bar-lbl {
  font-size: 10px;
  color: var(--text-faint);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 860px) {
  .insights-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .insights-controls {
    gap: 8px;
  }
  .insights-tabs {
    max-width: 100%;
  }
  .insights-acc-select {
    margin-left: 0;
    max-width: 100%;
    min-width: 0;
  }
  .insights-card {
    padding: 16px 18px;
  }
}

/* Dime Flat Borderless Polish */
.ghost-btn,
.primary-btn,
.month-switcher,
#mobile-menu-btn,
.cat-card,
.budget-gauge-card,
.account-chart-card,
.tx-card,
.item-card,
.hero-card,
.tx-cat-pill,
.tx-meta-chip,
.tx-key,
.mb-fab,
.search-input,
.text-input,
.textarea-input,
.seg-tabs {
  border: none;
  box-shadow: none;
}

.ghost-btn,
.month-switcher,
#mobile-menu-btn,
.tx-cat-pill,
.tx-meta-chip,
.tx-key,
.search-input,
.text-input,
.textarea-input {
  background: var(--surface-subtle);
}

.ghost-btn:hover {
  background: var(--hover);
}

.cat-card,
.budget-gauge-card,
.account-chart-card,
.tx-card,
.item-card {
  background: var(--surface);
  border-radius: 18px;
}

.cat-card:hover {
  transform: none;
  box-shadow: none;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent) 12%);
}

.mb-fab {
  border-radius: 14px;
}

@media (max-width: 860px) {
  .topbar {
    border-bottom: none;
    background: transparent;
  }
  .mobile-bottom-nav {
    border-top: none;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
  }
  .cat-card .progress-track {
    height: 10px;
  }
  #btn-sync-bank,
  #btn-edit-account,
  #btn-add-tx-desktop,
  #view-rules .toolbar-stats,
  .rule-cond-desc,
  #view-scheduled .toolbar-stats,
  .sched-extra-meta {
    display: none;
  }
  .rule-card {
    cursor: pointer;
  }
}

/* Dime-style Full-Page Sub-views */
body.subpage-open .mobile-bottom-nav {
  display: none !important;
}

@media (max-width: 860px) {
  body.subpage-open .topbar {
    display: none;
  }
  body.subpage-open #view-transaction,
  body.subpage-open #view-category,
  body.subpage-open #view-subpage {
    padding: calc(14px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
    min-height: 100dvh;
  }
}

.tx-page-shell {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cat-edit-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.tx-desktop-amt-wrap {
  display: none;
}

@media (min-width: 861px) {
  .tx-page-shell {
    max-width: 780px;
    background: var(--surface);
    border-radius: 20px;
    padding: 24px 28px;
    gap: 12px;
  }
  .cat-edit-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 24px;
    align-items: start;
  }
  .tx-amount-hero,
  .tx-keypad {
    display: none;
  }
  .tx-desktop-amt-wrap {
    display: block;
  }
  .tx-desktop-amt-input {
    font-size: 20px;
    font-weight: 700;
    padding: 10px 14px;
    font-variant-numeric: tabular-nums;
  }
  .tx-cat-pills {
    flex-wrap: wrap;
    overflow-x: visible;
  }
}

.tx-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.tx-page-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.tx-page-spacer {
  width: 64px;
}

.tx-save-btn {
  margin-top: 8px;
  height: 46px;
  font-size: 15px;
  border-radius: 13px;
}

.tx-amount-hero {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 6px;
  padding: 14px 12px 10px;
  font-variant-numeric: tabular-nums;
}

.tx-currency {
  font-size: 24px;
  font-weight: 700;
  color: var(--text-muted);
}

.tx-amount-val {
  font-size: 44px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
  color: var(--text);
}

.tx-amount-val.is-empty {
  color: var(--text-faint);
}

.tx-cat-pills {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.tx-cat-pills::-webkit-scrollbar {
  display: none;
}

.tx-cat-pill {
  flex-shrink: 0;
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}

.tx-cat-pill.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

[data-theme="mocha"] .tx-cat-pill.active {
  color: #181825;
}

.tx-inputs-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 6px;
}

.tx-meta-row {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.tx-meta-chip {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 600;
}

.tx-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.tx-key {
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 20px;
  font-weight: 700;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s, background 0.1s;
}

.tx-key:active {
  transform: scale(0.96);
  background: var(--border);
}

.rules-area { margin-bottom: 24px; }
.rules-area-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 8px;
}
.rules-area-title { margin: 0; font-size: 1rem; }
