/* ── AUTH SCREEN ──────────────────────────────────────────────────────────── */
#auth-screen {
  position: fixed; inset: 0;
  background: var(--bg);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.auth-wrap {
  width: 100%;
  max-width: 360px;
  padding: 0 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.auth-logo {
  font-size: 44px;
  color: var(--accent);
  margin-bottom: 10px;
}

.auth-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
}

.auth-subtitle {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
  text-align: center;
}

.auth-form { width: 100%; }

.auth-field { margin-bottom: 14px; }

.auth-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 6px;
}

.auth-input {
  width: 100%;
  padding: 14px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  transition: border-color .15s;
}
.auth-input:focus { border-color: var(--accent); }

.auth-error {
  font-size: 13px;
  color: var(--red);
  min-height: 20px;
  margin-bottom: 12px;
  text-align: center;
}

.auth-btn {
  width: 100%;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  font-size: 16px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: transform .1s, background .15s;
}
.auth-btn:active { transform: scale(.98); background: var(--accent-dk); }

/* ── RESET & BASE ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
button, a, [onclick] { touch-action: manipulation; }

/* ── DARK MODE (default) ──────────────────────────────────────────────────── */
:root {
  --bg:        #0f0f0f;
  --surface:   #1a1a1a;
  --surface2:  #242424;
  --surface3:  #2e2e2e;
  --border:    #333;
  --text:      #f0f0f0;
  --muted:     #888;
  --faint:     #555;
  --accent:    #c8f135;
  --accent-dk: #9dc420;
  --accent-text: #0f0f0f;
  --green:     #34c78a;
  --amber:     #e09010;
  --red:       #f05050;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --fab-h:     68px;
  --nav-h:     64px;
  font-family: 'DM Sans', sans-serif;
}

/* ── LIGHT MODE ───────────────────────────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg:          #f5f5f3;
    --surface:     #ffffff;
    --surface2:    #f0f0ee;
    --surface3:    #e8e8e5;
    --border:      #d8d8d4;
    --text:        #1a1a18;
    --muted:       #6b6b68;
    --faint:       #a8a8a4;
    --accent:      #5a8a00;
    --accent-dk:   #4a7200;
    --accent-text: #ffffff;
    --green:       #1a8a5a;
    --amber:       #c07800;
    --red:         #d03030;
  }
}

[data-theme="light"] {
  --bg:          #f5f5f3;
  --surface:     #ffffff;
  --surface2:    #f0f0ee;
  --surface3:    #e8e8e5;
  --border:      #d8d8d4;
  --text:        #1a1a18;
  --muted:       #6b6b68;
  --faint:       #a8a8a4;
  --accent:      #5a8a00;
  --accent-dk:   #4a7200;
  --accent-text: #ffffff;
  --green:       #1a8a5a;
  --amber:       #c07800;
  --red:         #d03030;
}

[data-theme="dark"] {
  --bg:          #0f0f0f;
  --surface:     #1a1a1a;
  --surface2:    #242424;
  --surface3:    #2e2e2e;
  --border:      #333;
  --text:        #f0f0f0;
  --muted:       #888;
  --faint:       #555;
  --accent:      #c8f135;
  --accent-dk:   #9dc420;
  --accent-text: #0f0f0f;
  --green:       #34c78a;
  --amber:       #e09010;
  --red:         #f05050;
}

html, body { height: 100%; overflow: hidden; background: var(--bg); color: var(--text); }

/* ── APP SHELL ────────────────────────────────────────────────────────────── */
#app { height: 100vh; height: 100dvh; position: relative; overflow: hidden; }

.view { display: none; flex-direction: column; height: 100%; position: absolute; inset: 0; background: var(--bg); }
.view.active { display: flex; }

.scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + var(--fab-h) + env(safe-area-inset-bottom) + 16px);
  scrollbar-width: none;
}
.scroll-area::-webkit-scrollbar { display: none; }

.content-pad { padding: 16px; }

/* ── TOP BAR ──────────────────────────────────────────────────────────────── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 52px 18px 12px;
  flex-shrink: 0;
}

.top-bar-left { display: flex; flex-direction: column; }
.period-label { font-size: 11px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.greeting { font-size: 20px; font-weight: 600; margin-top: 1px; }
.view-title { font-size: 18px; font-weight: 600; }

.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}

.back-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 16px; color: var(--text); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}

/* ── HERO CARD ────────────────────────────────────────────────────────────── */
.hero-card {
  margin: 0 16px 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
}

.hero-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }

.hero-amount {
  font-size: 40px; font-weight: 600; line-height: 1;
  font-family: 'DM Mono', monospace;
  color: var(--accent);
}

.hero-sub { font-size: 13px; color: var(--muted); margin-top: 6px; }

.budget-bar-wrap { margin-top: 14px; }
.budget-bar-bg {
  height: 8px;
  border-radius: 4px;
  background: var(--surface3);
  margin: 10px 0 4px;
  overflow: hidden;
  display: flex;
  gap: 2px;
}
.budget-bar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .6s ease; }
.budget-bar-fill.warn  { background: var(--amber); }
.budget-bar-fill.over  { background: var(--red); }

/* Three-zone bar segments */
.tzb-seg { height: 100%; transition: width .5s ease; }
.tzb-spent   { background: var(--amber); border-radius: 4px 0 0 4px; }
.tzb-savings { background: var(--green); }
.tzb-free    { background: var(--accent); border-radius: 0 4px 4px 0; flex: 1; min-width: 0; }

/* Legend dots */
.tzb-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; vertical-align: middle; margin-right: 3px; }
.tzb-dot-spent   { background: var(--amber); }
.tzb-dot-savings { background: var(--green); }
.budget-bar-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); margin-top: 5px; }

/* ── SECTION HEADER ──────────────────────────────────────────────────────── */
.section-header {
  font-size: 10px; font-weight: 600; color: var(--faint);
  text-transform: uppercase; letter-spacing: .08em;
  padding: 14px 18px 6px;
}

/* ── CATEGORY SCROLL ─────────────────────────────────────────────────────── */
.cat-scroll {
  display: flex;
  gap: 8px;
  padding: 4px 16px;
  overflow-x: auto;
  scrollbar-width: none;
}
.cat-scroll::-webkit-scrollbar { display: none; }

.cat-pill {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 12px;
  min-width: 76px;
  cursor: pointer;
  transition: border-color .15s;
}
.cat-pill:hover { border-color: var(--faint); }
.cat-pill.warn  { border-color: #f0a02066; }
.cat-pill.over  { border-color: #f0505066; }

.cat-pill-emoji { font-size: 18px; line-height: 1; }
.cat-pill-pct   { font-size: 12px; font-weight: 600; margin-top: 4px; font-family: 'DM Mono', monospace; }
.cat-pill-name  { font-size: 10px; color: var(--muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 68px; }
.cat-pill-bar-bg  { height: 3px; border-radius: 2px; background: var(--surface3); margin-top: 6px; overflow: hidden; }
.cat-pill-bar-fill { height: 100%; border-radius: 2px; transition: width .5s ease; }

/* ── METAS ────────────────────────────────────────────────────────────────── */
#metas-list { padding: 0 16px; display: grid; gap: 6px; }

.meta-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.meta-emoji { font-size: 20px; width: 32px; text-align: center; flex-shrink: 0; }
.meta-info { flex: 1; min-width: 0; }
.meta-name  { font-size: 13px; font-weight: 500; }
.meta-sub   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.meta-bar-bg   { height: 4px; border-radius: 2px; background: var(--surface3); margin-top: 7px; overflow: hidden; }
.meta-bar-fill { height: 100%; border-radius: 2px; transition: width .6s ease; }
.meta-pct   { font-size: 12px; font-weight: 600; color: var(--muted); min-width: 36px; text-align: right; font-family: 'DM Mono', monospace; }

/* ── RECENT TRANSACTIONS ──────────────────────────────────────────────────── */
#recent-list { padding: 0 16px; display: grid; gap: 6px; }

.txn-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 8px 10px 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.txn-icon  { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.txn-info  { flex: 1; min-width: 0; overflow: hidden; }
.txn-name  { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-sub   { font-size: 11px; color: var(--muted); margin-top: 1px; }
.txn-amount { font-size: 12px; font-weight: 600; color: var(--text); font-family: 'DM Mono', monospace; white-space: nowrap; flex-shrink: 0; max-width: 76px; overflow: hidden; text-overflow: ellipsis; }
.empty-state { text-align: center; padding: 24px; color: var(--faint); font-size: 13px; }

/* ── FAB ──────────────────────────────────────────────────────────────────── */
.fab-wrap {
  position: fixed;
  bottom: 0;
  left: 0; right: 0;
  z-index: 100;
  pointer-events: none;
  padding: 0 16px calc(var(--nav-h) + env(safe-area-inset-bottom) + 10px);
}

.fab-row {
  display: flex;
  gap: 8px;
  pointer-events: all;
}

.fab {
  height: var(--fab-h);
  border-radius: 20px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: transform .1s, background .15s;
  letter-spacing: -.01em;
}
.fab:active { transform: scale(.97); }
.fab-primary {
  flex: 2;
  background: var(--accent);
  color: var(--accent-text);
}
.fab-primary:active { background: var(--accent-dk); }
.fab-secondary {
  flex: 1;
  background: var(--surface2);
  color: var(--green);
  border: 1px solid var(--border);
  font-size: 13px;
}
.fab-secondary:active { background: var(--surface3); }
.fab-transfer {
  flex: 0 0 48px;
  background: var(--surface2);
  color: #185FA5;
  border: 1px solid var(--border);
  font-size: 18px;
  font-weight: 600;
}
.fab-transfer:active { background: var(--surface3); }
.fab-plus { font-size: 20px; font-weight: 400; }

/* ── BOTTOM NAV — global fixed ───────────────────────────────────────────── */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-around;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--border);
  z-index: 90;
  padding-bottom: env(safe-area-inset-bottom);
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  flex: 1;
  background: none;
  border: none;
  color: var(--faint);
  font-size: 10px;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  transition: color .15s;
}
.nav-item.active  { color: var(--accent); }
.nav-item:hover   { color: var(--muted); }
.nav-icon { font-size: 20px; line-height: 1; }

/* ── BOTTOM SHEET ─────────────────────────────────────────────────────────── */
.sheet-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  backdrop-filter: blur(4px);
}
.sheet-overlay.open { display: block; }

.bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  z-index: 201;
  padding: 0 20px 40px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
}
.bottom-sheet.open { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--surface3);
  border-radius: 2px;
  margin: 14px auto 20px;
}

/* ── SMART FORM ───────────────────────────────────────────────────────────── */
.smart-form {
  padding: 0;
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-top: env(safe-area-inset-top);
}
.smart-form .sheet-handle { flex-shrink: 0; }

.sheet-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
  flex-shrink: 0;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
}
.sheet-topbar-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}
.sheet-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: var(--surface2);
  color: var(--muted);
  font-size: 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.sheet-close-btn:active { opacity: 0.7; }

.sf-amount-row {
  padding: 0 18px 12px;
  flex-shrink: 0;
}
.sf-amount-display {
  font-size: 46px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  color: var(--accent);
  text-align: center;
  padding: 6px 0 12px;
  letter-spacing: -.02em;
}
.sf-amount-display.zero { color: var(--faint); }
.sf-amount-display.tappable {
  cursor: pointer;
  position: relative;
}
.sf-amount-display.tappable::after {
  content: '✎';
  font-size: 14px;
  color: var(--faint);
  margin-left: 8px;
  vertical-align: middle;
  opacity: .7;
}

.sf-numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  max-height: 300px;
  opacity: 1;
  overflow: hidden;
  transition: max-height .3s cubic-bezier(.4,0,.2,1), opacity .25s ease;
}
.sf-numpad button {
  height: 54px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 20px;
  font-family: 'DM Mono', monospace;
  font-weight: 500;
  cursor: pointer;
  transition: background .1s, transform .08s;
}
.sf-numpad button:active { background: var(--surface3); transform: scale(.94); }
.sf-numpad .sf-wide { font-size: 15px; }
.sf-numpad .sf-del  { font-size: 15px; }

/* Scrollable area for revealed sections */
.sf-scroll {
  flex: 1;
  overflow-y: auto;
  scrollbar-width: none;
  padding: 4px 18px 8px;
}
.sf-scroll::-webkit-scrollbar { display: none; }

.sf-section {
  margin-bottom: 16px;
  animation: sf-reveal .2s ease both;
}
@keyframes sf-reveal {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

.sf-section-label {
  font-size: 10px;
  font-weight: 600;
  color: var(--faint);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.sf-skip {
  font-size: 11px;
  color: var(--faint);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  cursor: pointer;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: color .15s;
}
.sf-skip:hover { color: var(--muted); }

.sf-cat-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}
.sf-cat-btn {
  padding: 11px 6px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1.5px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: all .15s;
}
.sf-cat-btn:hover { background: var(--surface3); }
.sf-cat-btn.sel   { border-color: var(--accent); background: #c8f13512; }
.sf-cat-btn .se   { font-size: 20px; line-height: 1; display: block; }
.sf-cat-btn .sn   { font-size: 10px; color: var(--muted); margin-top: 4px; line-height: 1.2; display: block; }
.sf-cat-btn.sel .sn { color: var(--accent); }

.sf-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.sf-chip {
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1.5px solid transparent;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  font-family: 'DM Sans', sans-serif;
}
.sf-chip:hover { color: var(--text); border-color: var(--border); }
.sf-chip.sel   { border-color: var(--accent); color: var(--accent); background: #c8f13512; }

.sf-payment-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 7px;
}
.sf-pay-btn {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1.5px solid transparent;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all .15s;
}
.sf-pay-btn:hover { background: var(--surface3); }
.sf-pay-btn.sel   { border-color: var(--accent); background: #c8f13512; }
.sf-pay-btn .pe   { font-size: 18px; }
.sf-pay-btn .pn   { font-size: 13px; font-weight: 500; color: var(--text); }

.sf-extras-row { display: flex; flex-direction: column; gap: 10px; }
.sf-extra-field { display: flex; flex-direction: column; flex: 1; }
.sf-date-input, .sf-note-input {
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  font-size: 16px;
  font-family: 'DM Sans', sans-serif;
  outline: none;
  width: 100%;
  transition: border-color .15s;
}
.sf-date-input:focus, .sf-note-input:focus { border-color: var(--faint); }
input[type="date"].sf-date-input::-webkit-calendar-picker-indicator { filter: invert(1) opacity(.4); }

.sf-save-wrap {
  padding: 10px 18px 20px;
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.sf-save-btn {
  width: 100%;
  padding: 16px 20px;
  border-radius: 16px;
  background: var(--accent);
  color: var(--accent-text);
  border: none;
  font-size: 15px;
  font-weight: 700;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: transform .1s, background .15s;
}
.sf-save-btn:active { transform: scale(.98); background: var(--accent-dk); }
.sf-save-amount {
  font-family: 'DM Mono', monospace;
  font-size: 16px;
  font-weight: 700;
  opacity: .8;
}

/* ── TOAST ────────────────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  top: 60px; left: 50%; transform: translateX(-50%) translateY(-20px);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 13px;
  color: var(--text);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  z-index: 999;
  white-space: nowrap;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.warn  { border-color: var(--amber); color: var(--amber); }
.toast.error { border-color: var(--red);   color: var(--red);   }
.toast.success { border-color: var(--green); color: var(--green); }

/* ── ACCOUNTS VIEW ────────────────────────────────────────────────────────── */
.account-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
}

.account-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.account-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.account-info { flex: 1; }
.account-name { font-size: 15px; font-weight: 600; }
.account-type { font-size: 11px; color: var(--muted); margin-top: 1px; }
.account-edit-btn {
  font-size: 11px; color: var(--faint);
  background: none; border: 1px solid var(--border);
  border-radius: 999px; padding: 3px 10px;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
  transition: color .15s;
}
.account-edit-btn:hover { color: var(--muted); }

.account-balance-display {
  font-size: 36px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
  letter-spacing: -.02em;
  line-height: 1;
  margin-bottom: 4px;
}

.account-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.account-metric {
  background: var(--surface2);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
}
.account-metric-label {
  font-size: 10px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}
.account-metric-val {
  font-size: 14px;
  font-weight: 600;
  font-family: 'DM Mono', monospace;
}

.account-bar-bg {
  height: 6px;
  border-radius: 3px;
  background: var(--surface3);
  overflow: hidden;
  margin: 12px 0 5px;
}
.account-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width .5s ease;
}
.account-bar-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--faint);
}

.account-setup-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 10px;
}
.account-setup-header {
  font-size: 14px;
  font-weight: 600;
}

/* ── ANALYSIS VIEW ────────────────────────────────────────────────────────── */
.analysis-cat-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  margin-bottom: 8px;
}
.analysis-cat-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.analysis-cat-name { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 6px; }
.analysis-cat-amounts { font-size: 12px; color: var(--muted); font-family: 'DM Mono', monospace; }
.analysis-bar-bg   { height: 5px; border-radius: 3px; background: var(--surface3); overflow: hidden; }
.analysis-bar-fill { height: 100%; border-radius: 3px; }
.analysis-budget-line { font-size: 11px; color: var(--faint); margin-top: 5px; }

/* ── GOALS VIEW ───────────────────────────────────────────────────────────── */
.goal-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px;
  margin-bottom: 10px;
}
.goal-header { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.goal-emoji  { font-size: 28px; }
.goal-name   { font-size: 16px; font-weight: 600; }
.goal-type   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.goal-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.goal-num-block { background: var(--surface2); border-radius: var(--radius-sm); padding: 10px 12px; }
.goal-num-label { font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.goal-num-val   { font-size: 16px; font-weight: 600; margin-top: 3px; font-family: 'DM Mono', monospace; color: var(--accent); }
.goal-bar-bg   { height: 7px; border-radius: 4px; background: var(--surface3); overflow: hidden; margin-bottom: 6px; }
.goal-bar-fill { height: 100%; border-radius: 4px; background: var(--accent); transition: width .6s ease; }
.goal-bar-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); }

.goal-select-row {
  background: var(--surface2);
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  padding: 12px 14px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: border-color .15s, background .15s;
}
.goal-select-row:hover { background: var(--surface3); }
.goal-select-row.sel   { border-color: var(--accent); background: #c8f13510; }

/* ── SERVICES PANEL ───────────────────────────────────────────────────────── */
.services-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px;
  margin-bottom: 8px;
}

.services-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.services-progress-wrap { flex: 1; }
.services-progress-bg {
  height: 5px;
  border-radius: 3px;
  background: var(--surface3);
  overflow: hidden;
}
.services-progress-fill {
  height: 100%;
  border-radius: 3px;
  background: var(--green);
  transition: width .5s ease;
}
.services-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  white-space: nowrap;
  font-family: 'DM Mono', monospace;
}

.services-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.service-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 10px;
  background: var(--surface2);
  border: 1px solid transparent;
  font-size: 12px;
}
.service-item.paid {
  border-color: #34c78a33;
  background: #34c78a0a;
}
.service-item.unpaid {
  opacity: .65;
}

.service-check {
  font-size: 13px;
  flex-shrink: 0;
  width: 16px;
  color: var(--green);
}
.service-item.unpaid .service-check { color: var(--faint); }

.service-name {
  flex: 1;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.service-item.unpaid .service-name { color: var(--muted); }

.service-amount {
  font-size: 11px;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  white-space: nowrap;
  flex-shrink: 0;
}

/* ── DELETE BUTTON ────────────────────────────────────────────────────────── */
.txn-delete-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.txn-delete-btn:active {
  background: #f0505022;
  color: var(--red);
}

/* ── CONFIRM SHEET ───────────────────────────────────────────────────────── */
.confirm-sheet {
  padding-bottom: 32px;
  max-height: 60vh;
}

.nomina-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-bottom: 10px;
}
.nomina-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.nomina-name   { font-size: 15px; font-weight: 600; }
.nomina-type   { font-size: 11px; color: var(--muted); margin-top: 2px; }
.nomina-badge  { font-size: 10px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); }
.nomina-bar-bg   { height: 5px; border-radius: 3px; background: var(--surface3); overflow: hidden; margin-bottom: 6px; }
.nomina-bar-fill { height: 100%; border-radius: 3px; background: var(--green); }
.nomina-meta   { display: flex; justify-content: space-between; font-size: 11px; color: var(--faint); font-family: 'DM Mono', monospace; }

/* ── SETTINGS VIEW ────────────────────────────────────────────────────────── */
.settings-row {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.settings-label { font-size: 13px; font-weight: 500; }
.settings-val   { font-size: 13px; color: var(--muted); }
.settings-section-title { font-size: 11px; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; margin: 18px 0 8px; }

/* ── EXTRAORDINARY TRANSACTIONS ─────────────────────────────────────────── */
.extraordinary-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.extraordinary-accent {
  width: 3px;
  height: 36px;
  border-radius: 2px;
  background: #EF9F27;
  flex-shrink: 0;
}
.txn-extraordinary {
  background: color-mix(in srgb, #EF9F27 6%, transparent);
}
.txn-ex-bar {
  width: 3px;
  height: 36px;
  border-radius: 2px;
  background: #EF9F27;
  flex-shrink: 0;
}
