/* ============================================================
   styles.css — SmartLedger  (Image 1 Design)
   ============================================================ */

:root {
  --bg:       #0b1210;
  --surface:  #111a16;
  --surface2: #172019;
  --surface3: #1e2a22;
  --border:   rgba(255,255,255,0.07);
  --border2:  rgba(255,255,255,0.12);
  --text:     #e8edf5;
  --text2:    #8896a8;
  --text3:    #4a5a6e;
  --accent:   #C19984;
  --accent2:  #9a7a68;
  --green:    #3A5F4F;
  --green2:   #4a7a63;
  --red:      #e8536a;
  --yellow:   #C19984;
  --purple:   #8B6F5E;
  --nav-h:    68px;
  --top-h:    60px;
  --radius:   20px;
  --radius-sm:14px;
}

*, *::before, *::after {
  margin: 0; padding: 0; box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html { font-size: 16px; }

body {
  font-family: 'Playfair Display', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---- Ambient glows ---- */
.glow-1 {
  position: fixed; top: -20vh; left: -10vw;
  width: 60vw; height: 60vh;
  background: radial-gradient(ellipse, rgba(58,95,79,0.06) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}
.glow-2 {
  position: fixed; bottom: 5vh; right: -10vw;
  width: 50vw; height: 50vh;
  background: radial-gradient(ellipse, rgba(193,153,132,0.03) 0%, transparent 65%);
  pointer-events: none; z-index: 0;
}

/* ---- App shell ---- */
.app {
  position: relative; z-index: 1;
  max-width: 480px; margin: 0 auto;
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}

/* ---- Top bar ---- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--top-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 18px;
  background: rgba(11,18,16,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}
.topbar-logo { display: flex; align-items: center; gap: 8px; }
.topbar-icon {
  width: 30px; height: 30px;
  background: linear-gradient(135deg, var(--green), #1e3d2f);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; border: 1px solid rgba(58,95,79,0.4);
}
.topbar-title { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.topbar-right  { display: flex; align-items: center; gap: 10px; }

/* Avatar — Image 1 style: circular photo */
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #5a8a6a, #3A5F4F);
  border: 2px solid rgba(58,95,79,0.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800; color: #fff;
  overflow: hidden;
}

/* Notification bell — Image 1 style */
.notif-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; cursor: pointer; position: relative;
}
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg);
  font-size: 7px; display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-family: 'IBM Plex Mono', monospace;
  min-width: 8px;
}
/* When notif-dot has content (badge number) */
.notif-dot:not(:empty) {
  width: auto; min-width: 16px; height: 16px;
  border-radius: 8px; padding: 0 3px;
  top: -2px; right: -2px;
}

/* Change password topbar button */
.change-pass-topbar-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border2);
  border-radius: 8px;
  padding: 5px 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s;
}
.change-pass-topbar-btn:active { background: rgba(58,95,79,0.2); }

/* ---- Scroll area ---- */
.scroll-area {
  flex: 1; overflow-y: auto;
  padding: 18px 16px calc(var(--nav-h) + 20px);
  -webkit-overflow-scrolling: touch;
}
.scroll-area::-webkit-scrollbar { display: none; }

/* ---- Pages ---- */
.page { display: none; }
.page.active { display: block; animation: fadeUp 0.25s ease; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Bottom nav — Image 1: 5 items, icon + label, green active ---- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: var(--nav-h);
  background: rgba(11,18,16,0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-top: 1px solid var(--border);
  display: flex; align-items: flex-start;
  padding-top: 10px; z-index: 50;
}
.nav-tab {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; padding: 2px 0;
  color: var(--text3); transition: color 0.2s;
  position: relative;
}
.nav-tab.active { color: var(--green2); }
.nav-tab-icon  { font-size: 22px; line-height: 1; }
.nav-tab-label { font-size: 10px; font-weight: 600; letter-spacing: 0.2px; font-family: 'IBM Plex Mono', monospace; }
.nav-tab-badge {
  position: absolute; top: -2px; right: calc(50% - 18px);
  background: var(--red); color: #fff;
  font-size: 9px; font-weight: 700;
  min-width: 16px; height: 16px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--bg);
  font-family: 'IBM Plex Mono', monospace;
}
.nav-tab.active .nav-tab-label { color: var(--green2); }

/* Active indicator dot under icon */
.nav-tab.active::after {
  content: '';
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--green2);
}

/* ---- FAB (hidden — we use quick actions instead, but keep for fallback) ---- */
.fab {
  position: fixed; bottom: calc(var(--nav-h) + 14px); right: 18px;
  width: 50px; height: 50px; border-radius: 14px;
  background: linear-gradient(135deg, var(--green), #1e3d2f);
  border: 1px solid rgba(58,95,79,0.5);
  box-shadow: 0 4px 20px rgba(58,95,79,0.35);
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 300; color: #fff;
  cursor: pointer; z-index: 49;
  transition: transform 0.15s, box-shadow 0.15s;
  border: none; line-height: 1;
}
.fab:active { transform: scale(0.92); }

/* ---- Cards ---- */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  position: relative; overflow: hidden;
  margin-bottom: 14px;
}
.card-sm { padding: 14px; border-radius: var(--radius-sm); }

/* ============================================================
   BALANCE HERO — Image 1 style
   Dark card, green tint, eye icon, GHS pill, USD sub
   ============================================================ */
.balance-hero {
  background: linear-gradient(160deg, #0f1f18 0%, #0c1912 55%, #091410 100%);
  border: 1px solid rgba(58,95,79,0.2);
  border-radius: 22px; padding: 20px 18px 16px;
  margin-bottom: 14px; position: relative; overflow: hidden;
}
.balance-hero::before {
  content: '';
  position: absolute; top: -40px; right: -20px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(58,95,79,0.12) 0%, transparent 65%);
  pointer-events: none;
}

/* Top row: label + eye + GHS pill */
.balance-top-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.balance-label-group { display: flex; align-items: center; gap: 8px; }
.balance-lbl {
  font-size: 12px; letter-spacing: 0.5px; color: var(--text2);
  font-family: 'IBM Plex Mono', monospace; font-weight: 500;
}
.balance-eye-btn {
  background: none; border: none; cursor: pointer;
  color: var(--text3); font-size: 14px; padding: 0;
  transition: color 0.15s;
}
.balance-eye-btn:active { color: var(--green2); }

.balance-cur-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.07);
  border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 10px;
  font-size: 11px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer; color: var(--text2);
  transition: all 0.15s;
}
.balance-cur-pill:active { background: rgba(58,95,79,0.15); color: var(--green2); }
.balance-cur-pill .pill-arrow { font-size: 8px; opacity: 0.6; }

/* Main number */
.balance-num {
  font-size: 38px; font-weight: 800; letter-spacing: -2px;
  line-height: 1.05; color: #fff;
  font-variant-numeric: tabular-nums;
  margin-bottom: 4px;
}
.balance-num .sym { color: var(--green2); font-size: 26px; font-weight: 700; margin-right: 2px; }

/* USD sub-line */
.balance-usd {
  font-size: 12px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 16px;
}

/* Stats row: Income | Expenses */
.balance-stats {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 0; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.bs-item { padding: 0 4px; }
.bs-item + .bs-item { border-left: 1px solid rgba(255,255,255,0.06); padding-left: 16px; }
.bs-indicator {
  display: flex; align-items: center; gap: 6px;
  margin-bottom: 4px;
}
.bs-arrow {
  width: 20px; height: 20px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
}
.bs-arrow.income-arrow { background: rgba(58,95,79,0.2); color: var(--green2); }
.bs-arrow.expense-arrow { background: rgba(232,83,106,0.15); color: var(--red); }
.bs-lbl { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.bs-val { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; font-family: 'IBM Plex Mono', monospace; }
.bs-val.g { color: var(--green2); }
.bs-val.r { color: var(--red); }
.bs-val.a { color: var(--accent); }

/* Live pip */
.live-pip {
  width: 7px; height: 7px; border-radius: 50%; background: var(--green2);
  animation: pip 2.2s infinite; display: inline-block;
}
@keyframes pip {
  0%,100% { opacity:1; box-shadow: 0 0 0 0 rgba(58,95,79,0.5); }
  50%      { opacity:0.7; box-shadow: 0 0 0 5px rgba(58,95,79,0); }
}

/* Legacy balance elements (keep for JS compatibility) */
.balance-trend { font-size: 12px; color: var(--green2); font-family: 'IBM Plex Mono', monospace; margin-top: 4px; }
.balance-trend.neg { color: var(--red); }

/* ============================================================
   QUICK ACTIONS — Image 1: 5 items in row, dark rounded cards
   ============================================================ */
.quick-actions {
  display: grid; grid-template-columns: repeat(5, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.qa-btn {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 12px 6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer; transition: all 0.15s;
}
.qa-btn:active { transform: scale(0.93); background: var(--surface2); }
.qa-icon  {
  width: 38px; height: 38px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
}
.qa-icon.qi-income     { background: rgba(58,95,79,0.2); color: var(--green2); }
.qa-icon.qi-expense    { background: rgba(193,153,132,0.15); color: var(--accent); }
.qa-icon.qi-transfer   { background: rgba(100,149,255,0.18); color: #6495ff; }
.qa-icon.qi-budget     { background: rgba(255,140,0,0.15); color: #ffab40; }
.qa-icon.qi-more       { background: rgba(139,100,200,0.18); color: #9b72cf; font-size: 20px; }
.qa-label { font-size: 9px; color: var(--text2); font-weight: 600; font-family: 'IBM Plex Mono', monospace; text-align: center; letter-spacing: 0.2px; }

/* ============================================================
   THIS MONTH OVERVIEW — Image 1: 3 cards with sparklines
   ============================================================ */
.month-overview-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}
.month-overview-title { font-size: 14px; font-weight: 800; }
.month-overview-period {
  font-size: 11px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
}
.month-overview-cards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin-bottom: 16px;
}
.mo-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px; padding: 12px 10px 8px;
  overflow: hidden;
}
.mo-card-label {
  font-size: 9px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.8px;
  margin-bottom: 5px;
}
.mo-card-value {
  font-size: 13px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  margin-bottom: 6px; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.mo-card-value.income-val { color: var(--green2); }
.mo-card-value.expense-val { color: var(--red); }
.mo-card-value.savings-val { color: var(--accent); }
.mo-spark {
  width: 100%; height: 32px; display: block;
}

/* ---- Section header ---- */
.sec-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.sec-title  { font-size: 14px; font-weight: 800; }
.sec-link   { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; cursor: pointer; padding: 4px 0; }

/* ---- Stat pills (used in home page stat scroll) ---- */
.stat-scroll {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 4px;
  margin-bottom: 16px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stat-scroll::-webkit-scrollbar { display: none; }
.stat-pill {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 16px;
  min-width: 140px;
  position: relative; overflow: hidden;
}
.stat-pill::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
}
.sp-income::before  { background: linear-gradient(90deg, transparent, var(--green2), transparent); }
.sp-expense::before { background: linear-gradient(90deg, transparent, var(--red), transparent); }
.sp-save::before    { background: linear-gradient(90deg, transparent, var(--accent), transparent); }
.sp-icon  { font-size: 20px; margin-bottom: 10px; }
.sp-lbl   { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 1.5px; font-family: 'IBM Plex Mono', monospace; }
.sp-val   { font-size: 20px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.sp-val.g { color: var(--green2); }
.sp-val.r { color: var(--red); }
.sp-val.a { color: var(--accent); }
.sp-trend { font-size: 10px; color: var(--text3); margin-top: 4px; font-family: 'IBM Plex Mono', monospace; }

/* ---- Transactions ---- */
.txn-list { display: flex; flex-direction: column; gap: 6px; }
.txn-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px; border-radius: 16px;
  border: 1px solid var(--border);
  cursor: pointer; transition: all 0.15s;
  position: relative; overflow: hidden;
  background: var(--surface);
}
.txn-row::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 3px;
}
.txn-row:active { transform: scale(0.98); }
.txn-icon-wrap {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 19px; flex-shrink: 0;
}
.txn-info    { flex: 1; min-width: 0; }
.txn-name    { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-meta    { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 2px; }
.txn-right   { text-align: right; flex-shrink: 0; }
.txn-amt     { font-size: 14px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.txn-date    { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 2px; }
.txn-del {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: rgba(255,77,109,0.12); color: var(--red);
  border: none; border-radius: 8px; padding: 4px 8px;
  font-size: 11px; cursor: pointer; font-family: 'IBM Plex Mono', monospace;
  display: none;
}
.txn-row:hover .txn-del { display: block; }

/* Category theming */
.c-food          { background: rgba(58,95,79,0.05); }
.c-food          .txn-icon-wrap { background: rgba(58,95,79,0.12); }
.c-food::before  { background: var(--green2); }
.c-transport     { background: rgba(100,149,255,0.05); }
.c-transport     .txn-icon-wrap { background: rgba(100,149,255,0.1); }
.c-transport::before { background: #6495ff; }
.c-shopping      { background: rgba(139,111,94,0.06); }
.c-shopping      .txn-icon-wrap { background: rgba(139,111,94,0.12); }
.c-shopping::before { background: var(--accent); }
.c-health        { background: rgba(58,95,79,0.05); }
.c-health        .txn-icon-wrap { background: rgba(58,95,79,0.1); }
.c-health::before { background: var(--green2); }
.c-entertainment { background: rgba(255,77,109,0.05); }
.c-entertainment .txn-icon-wrap { background: rgba(255,77,109,0.1); }
.c-entertainment::before { background: var(--red); }
.c-utilities     { background: rgba(100,149,255,0.05); }
.c-utilities     .txn-icon-wrap { background: rgba(100,149,255,0.1); }
.c-utilities::before { background: #6495ff; }
.c-housing       { background: rgba(120,90,160,0.05); }
.c-housing       .txn-icon-wrap { background: rgba(120,90,160,0.1); }
.c-housing::before { background: #785aa0; }
.c-subscriptions { background: rgba(255,140,0,0.05); }
.c-subscriptions .txn-icon-wrap { background: rgba(255,140,0,0.1); }
.c-subscriptions::before { background: #ff8c00; }
.c-savings       { background: rgba(46,204,113,0.05); }
.c-savings       .txn-icon-wrap { background: rgba(46,204,113,0.1); }
.c-savings::before { background: #2ecc71; }
.c-income        { background: rgba(58,95,79,0.05); }
.c-income        .txn-icon-wrap { background: rgba(58,95,79,0.1); }
.c-income::before { background: var(--green2); }
.c-invest        { background: rgba(52,152,219,0.05); }
.c-invest        .txn-icon-wrap { background: rgba(52,152,219,0.1); }
.c-invest::before { background: #3498db; }

.amt-in  { color: var(--green2); }
.amt-out { color: var(--red); }

/* Date divider */
.date-divider {
  font-size: 10px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin: 14px 0 6px;
}
.date-divider:first-child { margin-top: 0; }

/* ---- Empty state ---- */
.empty { text-align: center; padding: 40px 20px; }
.empty-icon { font-size: 36px; margin-bottom: 12px; }
.empty-text { font-size: 13px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }

/* ---- Modals ---- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,0.7);
  display: flex; align-items: flex-end;
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
 
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal-sheet {
  width: 100%; max-width: 480px; margin: 0 auto;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: 28px 28px 0 0;
  padding: 20px 20px 36px;
  transform: translateY(30px);
  transition: transform 0.3s ease;
}
.modal-overlay.open .modal-sheet { transform: translateY(0); }
.sheet-handle {
  width: 36px; height: 4px; border-radius: 2px;
  background: var(--border2); margin: 0 auto 20px;
}
.sheet-title { font-size: 18px; font-weight: 800; margin-bottom: 20px; }
.form-group  { margin-bottom: 14px; }
.form-label  {
  font-size: 10px; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1.5px;
  font-family: 'IBM Plex Mono', monospace; margin-bottom: 7px; display: block;
}
.form-input {
  width: 100%; padding: 13px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border2); border-radius: 13px;
  color: var(--text); font-family: 'Playfair Display', Georgia, serif; font-size: 14px;
  outline: none; transition: border-color 0.2s;
  -webkit-appearance: none;
}
.form-input:focus    { border-color: var(--green2); }
.form-input::placeholder { color: var(--text3); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sheet-actions { display: flex; gap: 10px; margin-top: 20px; }
.btn { flex: 1; padding: 15px; border-radius: 14px; font-family: 'Playfair Display', Georgia, serif; font-size: 14px; font-weight: 700; cursor: pointer; border: none; transition: all 0.15s; }
.btn:active { transform: scale(0.97); }
.btn-ghost   { background: var(--surface3); color: var(--text2); border: 1px solid var(--border2); }
.btn-primary { background: linear-gradient(135deg, var(--green), #1e3d2f); color: #fff; box-shadow: 0 4px 16px rgba(58,95,79,0.3); }

/* ---- Budgets ---- */
.budget-list { display: flex; flex-direction: column; gap: 12px; }
.budget-row  { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; }
.budget-row-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.budget-name-row { display: flex; align-items: center; gap: 8px; }
.b-dot  { width: 8px; height: 8px; border-radius: 50%; }
.b-name { font-size: 14px; font-weight: 700; }
.b-pct  { font-size: 13px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }
.budget-bar { height: 6px; background: var(--surface3); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.budget-bar-fill { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.budget-row-bottom { display: flex; justify-content: space-between; }
.b-spent { font-size: 12px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }
.b-limit { font-size: 12px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }

/* ---- Goals ---- */
.goals-grid { display: grid; grid-template-columns: repeat(2,1fr); gap: 12px; }
.goal-card  { background: var(--surface); border: 1px solid var(--border); border-radius: 20px; padding: 20px 14px; text-align: center; }
.ring-wrap  { position: relative; width: 80px; height: 80px; margin: 0 auto 12px; }
.ring-svg   { width: 80px; height: 80px; transform: rotate(-90deg); }
.ring-bg    { fill: none; stroke: rgba(255,255,255,0.06); stroke-width: 8; }
.ring-fill  { fill: none; stroke-width: 8; stroke-linecap: round; transition: stroke-dashoffset 0.8s ease; }
.ring-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.ring-pct   { font-size: 15px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-done  { font-size: 8px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.g-name     { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.g-target   { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.g-saved    { font-size: 14px; font-weight: 700; margin-top: 4px; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }

/* ---- Analytics / Sparklines ---- */
.sparkline-card { padding-bottom: 10px; }
.spark-wrap { height: 80px; margin-top: 12px; }
.spark      { width: 100%; height: 80px; display: block; }
.donut-wrap { display: flex; align-items: center; gap: 20px; }
.donut-canvas-wrap { position: relative; width: 110px; height: 110px; flex-shrink: 0; }
.donut-center     { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center-val { font-size: 16px; font-weight: 800; font-variant-numeric: tabular-nums; }
.donut-center-lbl { font-size: 9px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.donut-legend     { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.legend-row  { display: flex; align-items: center; gap: 8px; }
.legend-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.legend-name { font-size: 12px; font-weight: 600; flex: 1; }
.legend-val  { font-size: 12px; font-family: 'IBM Plex Mono', monospace; color: var(--text2); font-variant-numeric: tabular-nums; }

/* ---- Toast ---- */
.toast {
  position: fixed; bottom: calc(var(--nav-h) + 20px); left: 50%; transform: translateX(-50%) translateY(20px);
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--text); font-size: 13px; font-family: 'IBM Plex Mono', monospace;
  padding: 10px 18px; border-radius: 24px;
  z-index: 300; opacity: 0; transition: all 0.3s;
  white-space: nowrap; pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---- Toast undo button ---- */
.toast-undo-btn {
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; font-weight: 700;
  padding: 3px 10px; border-radius: 6px;
  cursor: pointer; margin-left: 10px;
  vertical-align: middle;
}
.toast-undo-btn:active { background: rgba(255,255,255,0.25); }

/* ---- Currency / FX page ---- */
.fx-hero {
  background: linear-gradient(150deg, #0e1a2e 0%, #091525 60%, #060f1e 100%);
  border: 1px solid rgba(193,153,132,0.14);
  border-radius: 24px; padding: 22px 20px 18px;
  margin-bottom: 16px; position: relative; overflow: hidden;
}
.fx-hero::before {
  content: ''; position: absolute; top: -40px; right: -30px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, rgba(193,153,132,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.fx-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.fx-lbl { font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.fx-rate-badge {
  display: flex; align-items: center; gap: 6px;
  background: rgba(193,153,132,0.1); border: 1px solid rgba(193,153,132,0.2);
  border-radius: 20px; padding: 4px 10px;
  font-size: 11px; font-family: 'IBM Plex Mono', monospace; color: var(--accent);
}
.fx-rate-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); animation: pip 2s infinite; }
.fx-inputs { display: flex; align-items: center; gap: 10px; }
.fx-input-wrap { flex: 1; }
.fx-currency-sel {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  color: var(--text); font-family: 'IBM Plex Mono', monospace; font-size: 13px; font-weight: 600;
  padding: 11px 14px; margin-bottom: 8px;
  -webkit-appearance: none; appearance: none; outline: none; cursor: pointer;
}
.fx-amount-field {
  width: 100%; background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1); border-radius: 14px;
  color: #fff; font-family: 'IBM Plex Mono', monospace; font-size: 22px; font-weight: 800;
  padding: 11px 14px; outline: none;
  -webkit-appearance: none; appearance: none;
  font-variant-numeric: tabular-nums;
}
.fx-amount-field:focus { border-color: var(--green2); }
.fx-amount-field.result-field { color: var(--green2); background: rgba(58,95,79,0.06); border-color: rgba(58,95,79,0.2); }
.fx-swap-btn {
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(58,95,79,0.12); border: 1px solid rgba(58,95,79,0.25);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 18px; transition: all 0.15s; flex-shrink: 0;
  color: var(--green2); align-self: flex-end;
}
.fx-swap-btn:active { transform: rotate(180deg) scale(0.9); }
.fx-rate-display {
  text-align: center; margin-top: 14px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 13px; color: var(--text2); font-family: 'IBM Plex Mono', monospace;
}
.fx-rate-display strong   { color: var(--green2); }
.fx-rate-display .fx-updated { font-size: 10px; color: var(--text3); margin-top: 4px; }

.cur-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.cur-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 15px 14px;
  cursor: pointer; transition: all 0.15s; position: relative; overflow: hidden;
}
.cur-card:active { transform: scale(0.97); }
.cur-card.selected { border-color: var(--green2); background: rgba(58,95,79,0.05); }
.cur-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; }
.cur-card.selected::before { background: linear-gradient(90deg, transparent, var(--green2), transparent); }
.cur-flag   { font-size: 22px; margin-bottom: 8px; }
.cur-code   { font-size: 14px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; }
.cur-name   { font-size: 10px; color: var(--text3); margin-top: 2px; }
.cur-rate   { font-size: 13px; font-weight: 700; margin-top: 8px; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.cur-change { font-size: 10px; font-family: 'IBM Plex Mono', monospace; margin-top: 2px; }
.cur-change.up { color: var(--green2); }
.cur-change.dn { color: var(--red); }

.base-row { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 16px; scrollbar-width: none; }
.base-row::-webkit-scrollbar { display: none; }
.base-chip {
  flex-shrink: 0; padding: 7px 14px; border-radius: 20px;
  background: var(--surface2); border: 1px solid var(--border);
  font-size: 12px; font-weight: 700; font-family: 'IBM Plex Mono', monospace;
  cursor: pointer; transition: all 0.15s; color: var(--text2); white-space: nowrap;
}
.base-chip.active { background: rgba(58,95,79,0.12); border-color: rgba(58,95,79,0.35); color: var(--green2); }
.base-chip:active { transform: scale(0.95); }

.fx-skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%; animation: shimmer 1.4s infinite;
  border-radius: 8px; height: 16px; margin: 4px 0;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

.fx-loading-overlay {
  position: absolute; inset: 0; border-radius: 24px;
  background: rgba(7,9,15,0.6); display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(2px); z-index: 5; transition: opacity 0.3s;
}
.fx-spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid rgba(58,95,79,0.2);
  border-top-color: var(--green2);
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Currency banner on home */
.cur-banner {
  background: rgba(58,95,79,0.06); border: 1px solid rgba(58,95,79,0.15);
  border-radius: 14px; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px; cursor: pointer;
}
.cur-banner-left  { display: flex; align-items: center; gap: 10px; }
.cur-banner-flag  { font-size: 20px; }
.cur-banner-label { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.cur-banner-val   { font-size: 14px; font-weight: 700; color: var(--green2); font-family: 'IBM Plex Mono', monospace; }
.cur-banner-arrow { color: var(--text3); font-size: 13px; }

.apply-cur-btn {
  width: 100%; padding: 15px; border-radius: 16px;
  background: linear-gradient(135deg, rgba(58,95,79,0.15), rgba(58,95,79,0.08));
  border: 1px solid rgba(58,95,79,0.25);
  color: var(--green2); font-family: 'Playfair Display', Georgia, serif; font-size: 14px; font-weight: 700;
  cursor: pointer; transition: all 0.15s; margin-top: 4px;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
.apply-cur-btn:active { transform: scale(0.98); }
.apply-cur-btn.applied { background: linear-gradient(135deg, rgba(58,95,79,0.2), rgba(58,95,79,0.08)); border-color: rgba(58,95,79,0.4); }

/* ---- Transaction modal ---- */
.txn-amt-row {
  display: flex; align-items: center; gap: 0;
  background: var(--surface2); border: 1px solid var(--border2);
  border-radius: 14px; overflow: hidden; transition: border-color .2s;
}
.txn-amt-row:focus-within { border-color: var(--green2); }
.txn-cur-prefix {
  padding: 0 14px; font-size: 16px; font-weight: 700;
  color: var(--green2); background: rgba(58,95,79,0.08);
  border-right: 1px solid var(--border2); height: 100%;
  display: flex; align-items: center; white-space: nowrap;
  min-width: 36px; justify-content: center;
  font-family: 'IBM Plex Mono', monospace; user-select: none;
}
.txn-amt-input  { flex: 1; border: none !important; border-radius: 0 !important; background: transparent !important; outline: none; min-width: 0; }
.txn-cur-select {
  border: none !important; border-left: 1px solid var(--border2) !important;
  border-radius: 0 !important; background: rgba(58,95,79,0.06) !important;
  color: var(--green2) !important; font-family: 'IBM Plex Mono', monospace !important;
  font-size: 12px !important; font-weight: 700 !important;
  letter-spacing: 0.5px; padding: 0 10px !important;
  min-width: 80px; max-width: 100px; cursor: pointer; outline: none;
}
.txn-preview {
  margin-top: 8px; padding: 7px 13px;
  background: rgba(58,95,79,0.07); border: 1px solid rgba(58,95,79,0.18);
  border-radius: 10px; font-family: 'IBM Plex Mono', monospace; font-size: 12px;
  color: var(--green2); display: flex; align-items: center; gap: 8px; line-height: 1.4;
}
.txn-preview .prev-eq   { opacity: 0.5; font-size: 11px; }
.txn-preview .prev-val  { font-weight: 700; font-size: 13px; }
.txn-preview .prev-note { opacity: 0.55; font-size: 10px; margin-left: auto; }

.txn-orig-cur {
  font-size: 10px; font-family: 'IBM Plex Mono', monospace;
  font-weight: 600; color: var(--green2);
  background: rgba(58,95,79,0.1); border-radius: 5px;
  padding: 1px 5px; margin-left: 5px;
  vertical-align: middle; letter-spacing: 0.5px;
}
.txn-display-amt {
  font-size: 10px; color: var(--text2);
  font-family: 'IBM Plex Mono', monospace; margin-top: 2px;
}

/* ---- Amount calculator ---- */
.txn-amt-line {
  display: flex; align-items: stretch; gap: 8px;
}
.txn-amt-line .txn-amt-row { flex: 1; min-width: 0; }
.txn-calc-btn {
  border: 1px solid var(--border2);
  border-radius: 14px;
  background: rgba(193,153,132,0.08);
  color: var(--accent);
  width: 46px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; cursor: pointer;
  transition: background .15s;
}
.txn-calc-btn:active { background: rgba(193,153,132,0.2); }

.calc-sheet { padding-bottom: 24px; }
.calc-header {
  display: flex; align-items: flex-start; justify-content: space-between;
  margin-bottom: 16px;
}
.calc-cur-tag {
  display: inline-block; font-size: 10px; font-weight: 700;
  color: var(--accent); background: rgba(193,153,132,0.12);
  border-radius: 5px; padding: 2px 7px; margin-bottom: 6px;
  font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.5px;
}
.calc-close {
  width: 32px; height: 32px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--border2);
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; color: var(--text2); cursor: pointer; flex-shrink: 0;
}
.calc-display {
  background: var(--bg); border: 1px solid var(--border2);
  border-radius: 16px; padding: 20px 18px;
  margin-bottom: 16px; text-align: right;
}
.calc-expr {
  font-size: 13px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  min-height: 16px; margin-bottom: 6px; word-break: break-all;
}
.calc-result {
  font-size: 32px; font-weight: 800; color: var(--text);
  font-family: 'IBM Plex Mono', monospace; line-height: 1;
}
.calc-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.calc-key {
  border: none; border-radius: 13px;
  background: rgba(255,255,255,0.04);
  color: var(--text); font-size: 17px; font-weight: 600;
  font-family: 'Playfair Display', Georgia, serif;
  padding: 15px 0; cursor: pointer;
  transition: background .15s, transform .1s;
}
.calc-key:active { transform: scale(0.96); }
.calc-key-clear { background: rgba(232,83,106,0.1); color: var(--red); }
.calc-key-op {
  background: rgba(58,95,79,0.14); color: var(--green2);
  font-family: 'IBM Plex Mono', monospace;
}
.calc-key-eq {
  background: linear-gradient(135deg, var(--green), #1e3d2f);
  color: #fff; font-family: 'IBM Plex Mono', monospace;
}
.calc-key-use {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  color: #1a140f; font-size: 13px; font-weight: 800;
  letter-spacing: 0.5px;
}

/* ---- Auth screen ---- */
#authScreen {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  font-family: 'Playfair Display', Georgia, serif;
}
#authScreen.hidden { display: none; }
.auth-card {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid rgba(58,95,79,0.2);
  border-radius: 28px; padding: 36px 32px;
  position: relative; overflow: hidden;
}
.auth-card::before {
  content: ''; position: absolute; top: -60px; right: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(58,95,79,0.1) 0%, transparent 65%);
  pointer-events: none;
}
.auth-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.auth-logo-icon {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--green), #1e3d2f);
  border: 1px solid rgba(58,95,79,0.4);
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.auth-logo-name { font-size: 18px; font-weight: 800; color: #e8edf5; letter-spacing: -0.3px; }
.auth-logo-tag  { font-size: 10px; color: rgba(58,95,79,0.8); font-family: 'IBM Plex Mono', monospace; letter-spacing: 1.5px; text-transform: uppercase; margin-top: 1px; }
.auth-title { font-size: 22px; font-weight: 800; color: #e8edf5; margin-bottom: 6px; letter-spacing: -0.3px; position: relative; z-index: 1; }
.auth-sub   { font-size: 13px; color: rgba(232,237,245,0.45); font-family: 'IBM Plex Mono', monospace; margin-bottom: 28px; position: relative; z-index: 1; }
.auth-tabs  { display: flex; background: rgba(255,255,255,0.04); border-radius: 12px; padding: 4px; margin-bottom: 24px; position: relative; z-index: 1; }
.auth-tab   { flex: 1; padding: 9px; border-radius: 9px; text-align: center; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.2s; color: rgba(232,237,245,0.45); letter-spacing: 0.2px; }
.auth-tab.active { background: rgba(58,95,79,0.2); color: var(--green2); }
.auth-form  { position: relative; z-index: 1; }
.auth-form .form-group { margin-bottom: 14px; }
.auth-form .form-label { font-size: 10px; color: rgba(58,95,79,0.8); text-transform: uppercase; letter-spacing: 1.5px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 7px; display: block; }
.auth-form .form-input { width: 100%; padding: 13px 16px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.09); border-radius: 13px; color: #e8edf5; font-family: 'Playfair Display', Georgia, serif; font-size: 14px; outline: none; transition: border-color 0.2s; -webkit-appearance: none; }
.auth-form .form-input:focus { border-color: var(--green2); }
.auth-form .form-input::placeholder { color: rgba(232,237,245,0.25); }
.auth-btn  { width: 100%; padding: 15px; border-radius: 14px; background: linear-gradient(135deg, var(--green), #1e3d2f); color: #fff; font-family: 'Playfair Display', Georgia, serif; font-size: 15px; font-weight: 700; letter-spacing: 0.2px; border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(58,95,79,0.3); transition: all 0.15s; margin-top: 6px; }
.auth-btn:active { transform: scale(0.98); }
.auth-divider { text-align: center; margin: 16px 0; font-size: 11px; color: rgba(232,237,245,0.2); font-family: 'IBM Plex Mono', monospace; position: relative; }
.auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: 38%; height: 1px; background: rgba(255,255,255,0.07); }
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-demo-btn { width: 100%; padding: 13px; border-radius: 13px; background: transparent; border: 1px solid rgba(58,95,79,0.4); color: var(--green2); font-family: 'Playfair Display', Georgia, serif; font-size: 13px; font-weight: 700; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 8px; }
.auth-demo-btn:hover { border-color: var(--green2); background: rgba(58,95,79,0.08); }
.auth-error { background: rgba(232,83,106,0.1); border: 1px solid rgba(232,83,106,0.25); border-radius: 10px; padding: 10px 14px; font-size: 12px; color: #e8536a; font-family: 'IBM Plex Mono', monospace; margin-bottom: 14px; display: none; }
.auth-error.show { display: block; }
.auth-footer { text-align: center; margin-top: 20px; font-size: 11px; color: rgba(232,237,245,0.2); font-family: 'IBM Plex Mono', monospace; position: relative; z-index: 1; }

/* Topbar user elements */
.topbar-username { font-size: 12px; font-weight: 700; color: rgba(232,237,245,0.7); font-family: 'IBM Plex Mono', monospace; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn { font-size: 10px; color: rgba(58,95,79,0.7); font-family: 'IBM Plex Mono', monospace; cursor: pointer; padding: 3px 8px; border: 1px solid rgba(58,95,79,0.2); border-radius: 6px; transition: all 0.15s; background: transparent; }
.logout-btn:hover { color: var(--green2); border-color: rgba(58,95,79,0.4); }

/* ---- Desktop sidebar ---- */
@media (min-width: 600px) {
  .app { max-width: 100%; flex-direction: row; }
  .scroll-area { padding-bottom: 24px; }
  .bottom-nav {
    position: sticky; top: 0;
    width: 220px; height: 100vh;
    flex-direction: column; align-items: stretch;
    padding: 28px 12px 20px;
    border-top: none; border-right: 1px solid var(--border);
    transform: none; left: 0; gap: 0;
  }
  .nav-tab { flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; padding: 11px 12px; border-radius: 12px; flex: unset; width: 100%; }
  .nav-tab-label { font-size: 13px; letter-spacing: 0; }
  .nav-tab-icon  { font-size: 17px; }
  .nav-tab.active { background: rgba(58,95,79,0.1); border-radius: 12px; }
  .nav-tab.active::after { display: none; }
  .nav-tab-badge  { position: static; margin-left: auto; }
  .fab { bottom: 20px; right: 24px; width: 54px; height: 54px; }
  .topbar { display: none; }
  .app { padding-top: 0; }
  .desktop-logo { display: flex; align-items: center; gap: 10px; padding: 0 4px 28px; border-bottom: 1px solid var(--border); margin-bottom: 16px; }
  .desktop-logo-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--green), #1e3d2f); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 15px; border: 1px solid rgba(58,95,79,0.4); }
  .desktop-logo-text { font-size: 16px; font-weight: 800; }
  .content-area { flex: 1; overflow-y: auto; padding: 28px 28px 24px; }
  .modal-sheet  { border-radius: 24px; margin: auto; max-width: 440px; transform: scale(0.95); }
  .modal-overlay { align-items: center; }
  .modal-overlay.open .modal-sheet { transform: scale(1); }
  .goals-grid { grid-template-columns: repeat(3,1fr); }
}

/* ---- Accounts ---- */
.acc-sort-select {
  background: var(--surface); border: 1px solid var(--border); color: var(--text2);
  font-size: 10px; font-weight: 700; font-family: 'IBM Plex Mono', monospace;
  padding: 6px 10px; border-radius: 8px; cursor: pointer;
  -webkit-appearance: none; appearance: none; max-width: 128px;
}
.acc-sort-select:focus { outline: none; border-color: var(--green); }
.acc-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
.acc-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 16px 14px;
  position: relative; transition: all 0.15s; cursor: pointer;
  min-width: 0; /* let the card shrink below its content's natural width instead of blowing out the grid */
}
.acc-card:active { transform: scale(0.97); }
.acc-card-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 10px; }
.acc-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.acc-del { background: rgba(232,83,106,0.1); color: var(--red); border: none; border-radius: 8px; padding: 4px 7px; font-size: 10px; cursor: pointer; }
.acc-name { font-size: 14px; font-weight: 800; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-type { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px; }
.acc-bal { font-size: 18px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.acc-txn-count { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.acc-type-preview { font-size: 13px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; margin-top: 8px; padding: 8px 12px; background: rgba(255,255,255,0.04); border-radius: 10px; display: inline-block; }
.txn-acc-tag { display: inline-block; font-size: 9px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; padding: 2px 6px; border-radius: 6px; margin-top: 3px; letter-spacing: 0.3px; }
#txnAccountWrap { margin-bottom: 14px; }

/* ---- Confirm dialog ---- */
.confirm-sheet { padding-bottom: 24px; }
.confirm-title { font-size: 17px; font-weight: 800; margin-bottom: 8px; padding: 0 4px; }
.confirm-body { font-size: 13px; color: var(--text2); font-family: 'IBM Plex Mono', monospace; line-height: 1.5; margin-bottom: 24px; padding: 0 4px; }
.btn-danger { background: var(--red); color: #fff; border: none; border-radius: 14px; padding: 13px 24px; font-size: 14px; font-weight: 700; font-family: 'Playfair Display', Georgia, serif; cursor: pointer; transition: all 0.15s; }
.btn-danger:active { transform: scale(0.97); }

/* Txn pending delete */
.txn-row--deleting { opacity: 0.4; pointer-events: none; background: rgba(232,83,106,0.05); border-radius: 14px; }

/* ---- Transfer rows ---- */
.transfer-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); }
.transfer-row:last-child { border-bottom: none; }
.transfer-icon { width: 38px; height: 38px; border-radius: 11px; background: rgba(100,149,255,0.1); display: flex; align-items: center; justify-content: center; font-size: 16px; color: #6495ff; flex-shrink: 0; }
.transfer-info { flex: 1; min-width: 0; }
.transfer-accounts { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transfer-arrow { color: var(--text3); margin: 0 4px; }
.transfer-acc   { font-weight: 800; }
.transfer-meta  { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 3px; }
.transfer-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.transfer-amt   { font-size: 14px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; color: #6495ff; }

/* ---- Recurring rows ---- */
.rec-info-banner { display: flex; align-items: flex-start; gap: 10px; background: rgba(58,95,79,0.07); border: 1px solid rgba(58,95,79,0.15); border-radius: 14px; padding: 12px 14px; font-size: 12px; color: var(--text2); font-family: 'IBM Plex Mono', monospace; line-height: 1.5; margin-bottom: 16px; }
.rec-info-icon { font-size: 18px; flex-shrink: 0; margin-top: 1px; }
.rec-row { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); transition: opacity 0.2s; }
.rec-row:last-child { border-bottom: none; }
.rec-row.rec-paused { opacity: 0.45; }
.rec-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.rec-actions { display: flex; gap: 5px; align-items: center; }
.rec-toggle-btn, .rec-edit-btn { background: rgba(255,255,255,0.05); border: 1px solid var(--border2); color: var(--text2); border-radius: 7px; padding: 3px 7px; font-size: 12px; cursor: pointer; transition: all 0.15s; }
.rec-toggle-btn:active, .rec-edit-btn:active { background: rgba(58,95,79,0.12); color: var(--green2); }

/* ---- Goal card actions ---- */
.goal-card { position: relative; }
.goal-card-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transition: opacity 0.15s; }
.goal-card:hover .goal-card-actions, .goal-card:active .goal-card-actions { opacity: 1; }
@media (hover: none) { .goal-card-actions { opacity: 1; } }

/* ---- Forgot / Change Password ---- */
.forgot-link { font-size: 12px; color: var(--green2); font-family: 'IBM Plex Mono', monospace; cursor: pointer; opacity: 0.8; }
.forgot-link:hover { opacity: 1; text-decoration: underline; }
.forgot-back { font-size: 12px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; cursor: pointer; margin-bottom: 18px; }
.forgot-back:hover { color: var(--green2); }
.forgot-note { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; line-height: 1.6; margin-top: 14px; text-align: center; padding: 0 4px; }
.change-pass-note { background: rgba(58,95,79,0.08); border: 1px solid rgba(58,95,79,0.2); border-radius: 10px; padding: 10px 14px; font-size: 12px; color: var(--green2); font-family: 'IBM Plex Mono', monospace; line-height: 1.5; margin-bottom: 16px; }

/* ---- Terms checkbox ---- */
.terms-checkbox-row { display: flex; align-items: flex-start; gap: 10px; margin: 4px 0 16px; cursor: pointer; }
.terms-checkbox { width: 16px; height: 16px; margin-top: 2px; accent-color: var(--green2); flex-shrink: 0; cursor: pointer; }
.terms-checkbox-label { font-size: 11px; color: var(--text2); font-family: 'IBM Plex Mono', monospace; line-height: 1.6; }
.terms-link { color: var(--green2); text-decoration: underline; }
.terms-link:hover { color: #5a8a6a; }

/* ---- Goal add savings button ---- */
.g-add-btn { margin-top: 10px; width: 100%; padding: 7px 0; border-radius: 10px; border: 1px solid; background: transparent; font-family: 'IBM Plex Mono', monospace; font-size: 11px; font-weight: 700; cursor: pointer; transition: all 0.15s; letter-spacing: 0.3px; }
.g-add-btn:active { opacity: 0.7; transform: scale(0.97); }

/* ---- Account Drawer ---- */
.acc-drawer-sheet { max-height: 85vh; overflow-y: auto; }
.acc-drawer-header { display: flex; align-items: center; gap: 12px; padding: 4px 0 16px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.acc-drawer-icon { width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.acc-drawer-info { flex: 1; min-width: 0; }
.acc-drawer-name { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.acc-drawer-type { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 1px; margin-top: 2px; }
.acc-drawer-bal { font-size: 18px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; flex-shrink: 0; }
.acc-drawer-stats { display: flex; gap: 0; background: var(--surface2); border-radius: 14px; margin-bottom: 16px; overflow: hidden; }
.acc-drawer-stat { flex: 1; padding: 12px 14px; text-align: center; border-right: 1px solid var(--border); }
.acc-drawer-stat:last-child { border-right: none; }
.acc-drawer-stat-val { font-size: 15px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; margin-bottom: 3px; }
.acc-drawer-stat-lbl { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-family: 'IBM Plex Mono', monospace; }
.acc-drawer-txn-list { padding-bottom: 4px; }

/* ---- Month Filter & Summary ---- */
.month-tab-scroll { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.month-tab-scroll::-webkit-scrollbar { display: none; }
.month-chip { flex-shrink: 0; padding: 7px 14px; border-radius: 20px; background: var(--surface2); border: 1px solid var(--border); font-size: 12px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; cursor: pointer; transition: all 0.15s; color: var(--text2); white-space: nowrap; user-select: none; }
.month-chip:active  { transform: scale(0.95); }
.month-chip.active  { background: rgba(58,95,79,0.14); border-color: rgba(58,95,79,0.4); color: var(--green2); }
.month-summary-bar { display: flex; gap: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 12px; overflow: hidden; }
.month-sum-item { flex: 1; padding: 12px 10px; text-align: center; }
.month-sum-item + .month-sum-item { border-left: 1px solid var(--border); }
.month-sum-lbl { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 1.4px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 5px; }
.month-sum-val { font-size: 14px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.month-sum-val.g { color: var(--green2); }
.month-sum-val.r { color: var(--red); }
#monthCatBreakdown { margin-bottom: 12px; }
.cat-breakdown-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.cat-breakdown-row:last-child { border-bottom: none; }
.cat-breakdown-icon { font-size: 18px; width: 32px; text-align: center; flex-shrink: 0; }
.cat-breakdown-info { flex: 1; min-width: 0; }
.cat-breakdown-name { font-size: 13px; font-weight: 700; margin-bottom: 5px; }
.cat-breakdown-bar-wrap { height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; }
.cat-breakdown-bar { height: 100%; background: var(--green2); border-radius: 2px; transition: width 0.5s ease; }
.cat-breakdown-amt { font-size: 13px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; text-align: right; flex-shrink: 0; }
.cat-breakdown-pct { display: block; font-size: 10px; color: var(--text3); font-weight: 400; margin-top: 2px; }

/* ---- Net Worth ---- */
.nw-hero { background: linear-gradient(150deg, #0d1a12 0%, #091510 55%, #060e0a 100%); border: 1px solid rgba(58,95,79,0.25); border-radius: 24px; padding: 24px 22px 20px; margin-bottom: 16px; position: relative; overflow: hidden; }
.nw-hero::before { content: ''; position: absolute; top: -40px; right: -30px; width: 160px; height: 160px; background: radial-gradient(circle, rgba(58,95,79,0.18) 0%, transparent 65%); pointer-events: none; }
.nw-hero-label { font-size: 10px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-bottom: 8px; }
.nw-total { font-size: 40px; font-weight: 800; letter-spacing: -2px; line-height: 1; color: var(--green2); font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.nw-trend { font-size: 12px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 18px; }
.nw-stats-row { display: grid; grid-template-columns: 1fr auto 1fr; gap: 0; padding-top: 16px; border-top: 1px solid rgba(255,255,255,0.06); align-items: center; }
.nw-stat { text-align: center; }
.nw-stat-divider { width: 1px; height: 36px; background: rgba(255,255,255,0.06); }
.nw-stat-lbl { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 1.5px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 5px; }
.nw-stat-val { font-size: 15px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.nw-stat-val.g { color: var(--green2); }
.nw-stat-val.r { color: var(--red); }
.nw-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 8px; }
.nw-row { display: flex; align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; }
.nw-row-icon { width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0; }
.nw-row-info { flex: 1; min-width: 0; }
.nw-row-name { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.nw-row-bar-wrap { height: 4px; background: var(--surface3); border-radius: 2px; overflow: hidden; }
.nw-row-bar { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.nw-row-val { font-size: 14px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; flex-shrink: 0; text-align: right; }
.nw-type-preview { font-size: 13px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; margin-top: 8px; padding: 8px 12px; background: rgba(255,255,255,0.04); border-radius: 10px; display: inline-block; letter-spacing: 0.3px; }
.nw-modal-tip { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; padding: 10px 14px; background: rgba(255,255,255,0.03); border-radius: 10px; margin-bottom: 14px; line-height: 1.5; }
.nw-row-sub { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-bottom: 5px; letter-spacing: 0.2px; }
.nw-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; }
.nw-del-btn { background: rgba(232,83,106,0.1); color: var(--red); border: none; border-radius: 6px; padding: 3px 7px; font-size: 10px; cursor: pointer; font-family: 'IBM Plex Mono', monospace; transition: background 0.15s; }
.nw-del-btn:active { background: rgba(232,83,106,0.25); }
.nw-empty { padding: 16px 14px; font-size: 12px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-align: center; background: var(--surface); border: 1px dashed var(--border); border-radius: 14px; line-height: 1.5; }
.nw-payoff-tag { display: inline-block; font-size: 9px; font-family: 'IBM Plex Mono', monospace; color: #ff8c00; background: rgba(255,140,0,0.1); border-radius: 5px; padding: 2px 6px; margin-top: 2px; }
.nw-formula-strip { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 14px; background: rgba(255,255,255,0.03); border-radius: 12px; margin-bottom: 16px; font-family: 'IBM Plex Mono', monospace; font-size: 12px; color: var(--text3); }
.nw-formula-strip strong { color: var(--green2); }

/* ---- Insights ---- */
.insight-section { margin-bottom: 28px; }
.insight-section-header { margin-bottom: 12px; }
.insight-section-title { font-size: 16px; font-weight: 800; letter-spacing: -0.3px; }
.insight-section-sub { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 2px; }
.insight-empty { font-size: 12px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; background: var(--surface2); border-radius: 12px; padding: 16px; line-height: 1.6; }
.insight-note { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 10px; line-height: 1.5; }
.fhs-card { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 20px; display: flex; gap: 20px; align-items: flex-start; }
.fhs-score-wrap { position: relative; flex-shrink: 0; width: 140px; height: 140px; }
.fhs-score-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.fhs-score { font-size: 32px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; letter-spacing: -2px; }
.fhs-grade { font-size: 11px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.5px; }
.fhs-factors { flex: 1; min-width: 0; }
.fhs-factor { margin-bottom: 12px; }
.fhs-factor:last-child { margin-bottom: 0; }
.fhs-factor-top { display: flex; justify-content: space-between; font-size: 11px; margin-bottom: 4px; }
.fhs-factor-label { color: var(--text2); font-family: 'IBM Plex Mono', monospace; }
.fhs-factor-score { color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.fhs-factor-bar-wrap { height: 4px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; margin-bottom: 3px; }
.fhs-factor-bar { height: 100%; border-radius: 2px; transition: width 0.6s ease; }
.fhs-factor-detail { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
@media(max-width:400px){ .fhs-card { flex-direction: column; align-items: center; } }
.forecast-months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.forecast-month-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 12px; }
.forecast-month-name { font-size: 11px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; color: var(--text3); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.5px; }
.forecast-row { display: flex; justify-content: space-between; font-size: 11px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 5px; color: var(--text2); }
.forecast-divider { border-top: 1px solid var(--border); margin: 7px 0; }
.forecast-net { font-weight: 800; }
.forecast-net.pos span:last-child { color: var(--green2); }
.forecast-net.neg span:last-child { color: var(--red); }
.pattern-alert { background: var(--surface2); border: 1px solid var(--border2); border-radius: 10px; padding: 11px 14px; font-size: 12px; font-family: 'IBM Plex Mono', monospace; color: var(--text); margin-bottom: 14px; line-height: 1.5; }
.pattern-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 10px; }
.pattern-cat-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.pattern-cat-row:last-of-type { border-bottom: none; }
.pattern-cat-icon { font-size: 18px; flex-shrink: 0; }
.pattern-cat-info { flex: 1; min-width: 0; }
.pattern-cat-name { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.pattern-bar-wrap { height: 3px; background: rgba(255,255,255,0.06); border-radius: 2px; overflow: hidden; }
.pattern-bar { height: 100%; background: var(--green2); border-radius: 2px; transition: width 0.5s ease; }
.pattern-cat-right { text-align: right; flex-shrink: 0; }
.pattern-cat-amt { font-size: 12px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; }
.pattern-cat-pct { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.traj-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.traj-card:last-child { margin-bottom: 0; }
.traj-header { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.traj-icon { font-size: 18px; flex-shrink: 0; }
.traj-name { font-size: 13px; font-weight: 700; flex: 1; }
.traj-status { font-size: 10px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }
.traj-status.on-track  { background: rgba(58,95,79,0.2); color: #7ec8a0; }
.traj-status.slow      { background: rgba(255,140,0,0.15); color: #ff8c00; }
.traj-status.at-risk   { background: rgba(232,83,106,0.15); color: var(--red); }
.traj-status.complete  { background: rgba(58,95,79,0.2); color: #7ec8a0; }
.traj-status.neutral   { background: rgba(255,255,255,0.06); color: var(--text3); }
.traj-progress-wrap { height: 5px; background: rgba(255,255,255,0.06); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.traj-progress-bar { height: 100%; border-radius: 3px; transition: width 0.6s ease; }
.traj-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.traj-meta strong { color: var(--text2); }
.proj-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.proj-card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 12px; text-align: center; }
.proj-period { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.proj-val { font-size: 14px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; margin-bottom: 4px; letter-spacing: -0.5px; }
.proj-delta { font-size: 11px; font-family: 'IBM Plex Mono', monospace; }
.anomaly-row { display: flex; align-items: flex-start; gap: 10px; background: var(--surface); border: 1px solid; border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.anomaly-row:last-child { margin-bottom: 0; }
.anomaly-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }
.anomaly-msg { font-size: 12px; font-family: 'IBM Plex Mono', monospace; color: var(--text2); line-height: 1.5; }
.insight-badge { background: #ff8c00 !important; }

/* ---- Import ---- */
.import-info { font-size: 12px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; background: var(--surface2); border-radius: 10px; padding: 11px 14px; margin-bottom: 16px; line-height: 1.6; }
.import-drop-zone { border: 2px dashed rgba(58,95,79,0.3); border-radius: 16px; padding: 32px 20px; text-align: center; cursor: pointer; transition: all 0.15s; margin-bottom: 4px; background: rgba(58,95,79,0.03); }
.import-drop-zone:active, .import-drop-zone:hover { border-color: var(--green2); background: rgba(58,95,79,0.07); }
.import-drop-icon { font-size: 32px; margin-bottom: 10px; }
.import-drop-label { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.import-drop-sub { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.import-preview-stats { display: flex; gap: 0; background: var(--surface2); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.import-stat { flex: 1; padding: 12px 10px; text-align: center; border-right: 1px solid var(--border); }
.import-stat:last-child { border-right: none; }
.import-stat-val { font-size: 20px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; margin-bottom: 3px; color: var(--text); }
.import-stat-new .import-stat-val { color: #7ec8a0; }
.import-stat-lbl { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.8px; font-family: 'IBM Plex Mono', monospace; }
.import-preview-list { max-height: 260px; overflow-y: auto; border: 1px solid var(--border); border-radius: 12px; padding: 4px 0; }
.import-preview-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--border); }
.import-preview-row:last-child { border-bottom: none; }
.import-all-dupes { padding: 20px; text-align: center; font-size: 12px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.import-more { padding: 10px 12px; text-align: center; font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.g-orig-cur { font-size: 9px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-left: 4px; }

/* ---- Subscriptions ---- */
.subs-overview-card { display: flex; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px 0; margin-bottom: 20px; }
.subs-ov-item { flex: 1; text-align: center; padding: 0 12px; }
.subs-ov-val { font-size: 20px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; letter-spacing: -0.5px; margin-bottom: 4px; }
.subs-ov-lbl { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-family: 'IBM Plex Mono', monospace; }
.subs-ov-divider { width: 1px; height: 36px; background: var(--border); flex-shrink: 0; }
.subs-section-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 10px; }
.subs-due-scroll { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 4px; scrollbar-width: none; }
.subs-due-scroll::-webkit-scrollbar { display: none; }
.subs-due-chip { flex-shrink: 0; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 80px; text-align: center; transition: border-color 0.15s; }
.subs-due-chip.subs-due-urgent { border-color: rgba(232,83,106,0.35); background: rgba(232,83,106,0.05); }
.subs-due-icon { font-size: 20px; }
.subs-due-name { font-size: 10px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 70px; }
.subs-due-amt { font-size: 11px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; }
.subs-due-days { font-size: 10px; font-family: 'IBM Plex Mono', monospace; }
.subs-group-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-family: 'IBM Plex Mono', monospace; margin: 16px 0 8px; }
.sub-card { display: flex; align-items: center; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--border); transition: opacity 0.2s; }
.sub-card:last-child { border-bottom: none; }
.sub-card.sub-paused { opacity: 0.45; }
.sub-card-left { flex-shrink: 0; }
.sub-icon-wrap { width: 42px; height: 42px; border-radius: 12px; border: 1px solid; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.sub-info { flex: 1; min-width: 0; }
.sub-name { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.sub-meta { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.sub-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.sub-amt { font-size: 15px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; letter-spacing: -0.3px; }
.sub-cycle-lbl { font-size: 9px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.8px; }
.sub-actions { display: flex; gap: 4px; margin-top: 2px; }
.sub-presets-label { font-size: 10px; color: var(--text3); text-transform: uppercase; letter-spacing: 1px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 8px; }
.sub-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.sub-preset-chip { background: var(--surface2); border: 1px solid var(--border2); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; transition: all 0.12s; white-space: nowrap; }
.sub-preset-chip:active { background: rgba(58,95,79,0.15); border-color: var(--green2); }
.subs-insights-row { display: flex; flex-direction: column; gap: 8px; }
.subs-insight-chip { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; }
.subs-insight-icon { font-size: 20px; flex-shrink: 0; }
.subs-insight-label { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 3px; }
.subs-insight-val { font-size: 13px; font-weight: 700; }

/* ---- Calendar ---- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-nav-btn { background: var(--surface2); border: 1px solid var(--border2); color: var(--text); border-radius: 10px; width: 36px; height: 36px; font-size: 18px; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.15s; }
.cal-nav-btn:active { background: rgba(58,95,79,0.15); color: var(--green2); }
.cal-month-label { font-size: 17px; font-weight: 800; letter-spacing: -0.3px; }
.cal-dow-row { display: grid; grid-template-columns: repeat(7,1fr); margin-bottom: 4px; }
.cal-dow { text-align: center; font-size: 10px; font-weight: 700; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.5px; padding: 4px 0; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 3px; margin-bottom: 16px; }
.cal-cell { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; cursor: pointer; transition: background 0.12s; padding: 2px; min-height: 42px; }
.cal-cell:active { background: rgba(58,95,79,0.1); }
.cal-cell-empty { cursor: default; }
.cal-today { background: rgba(58,95,79,0.12); border: 1.5px solid var(--green2); }
.cal-past { opacity: 0.45; }
.cal-day-num { font-size: 13px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; line-height: 1; }
.cal-dots { display: flex; gap: 2px; margin-top: 3px; min-height: 6px; }
.cal-dot { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.cal-legend-item { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.cal-legend .cal-dot { width: 7px; height: 7px; }
.cal-event-group { margin-bottom: 16px; }
.cal-event-group.cal-event-past { opacity: 0.5; }
.cal-event-date-label { font-size: 11px; font-weight: 700; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.cal-event-row { display: flex; align-items: center; gap: 10px; background: var(--surface); border: 1px solid; border-radius: 12px; padding: 11px 13px; margin-bottom: 6px; }
.cal-event-row:last-child { margin-bottom: 0; }
.cal-event-icon { width: 34px; height: 34px; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.cal-event-info { flex: 1; min-width: 0; }
.cal-event-title { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-event-type { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; margin-top: 2px; }
.cal-event-amt { font-size: 13px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; flex-shrink: 0; }
.cal-day-totals { display: flex; gap: 10px; margin-bottom: 14px; }
.cal-day-total { flex: 1; text-align: center; padding: 10px; border-radius: 10px; font-size: 15px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; }
.cal-day-total.inc { background: rgba(58,95,79,0.12); color: #7ec8a0; }
.cal-day-total.out { background: rgba(232,83,106,0.08); color: var(--red); }

/* Settings section (keep for any dynamic settings) */
.settings-section { margin-bottom: 20px; }
.settings-title { font-size: 11px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 10px; }
.settings-row { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 6px; cursor: pointer; }
.settings-row-left { display: flex; align-items: center; gap: 12px; }
.settings-icon    { font-size: 18px; }
.settings-label   { font-size: 14px; font-weight: 600; }
.settings-chevron { color: var(--text3); font-size: 12px; }

/* ============================================================
   DEBTS PAGE
   ============================================================ */

/* Summary strip */
.debt-summary-strip {
  display: flex; align-items: center;
  background: linear-gradient(160deg, #1a0e10 0%, #130a0c 100%);
  border: 1px solid rgba(232,83,106,0.18);
  border-radius: 20px; padding: 18px 0; margin-bottom: 16px;
  position: relative; overflow: hidden;
}
.debt-summary-strip::before {
  content: ''; position: absolute; top: -30px; right: -20px;
  width: 120px; height: 120px;
  background: radial-gradient(circle, rgba(232,83,106,0.08) 0%, transparent 65%);
  pointer-events: none;
}
.debt-sum-item { flex: 1; text-align: center; padding: 0 8px; }
.debt-sum-divider { width: 1px; height: 38px; background: rgba(232,83,106,0.15); flex-shrink: 0; }
.debt-sum-lbl {
  font-size: 9px; color: var(--text3); text-transform: uppercase;
  letter-spacing: 1.4px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 6px;
}
.debt-sum-val {
  font-size: 17px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  letter-spacing: -0.5px;
}
.debt-sum-val.r { color: var(--red); }

/* Debt card */
.debt-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 16px 16px 14px;
  margin-bottom: 12px; position: relative; overflow: hidden;
  transition: border-color 0.2s;
}
.debt-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px; border-radius: 3px 0 0 3px;
  background: var(--red);
}
.debt-card.debt-paid { opacity: 0.55; }
.debt-card.debt-paid::before { background: var(--green2); }

.debt-card-top {
  display: flex; align-items: flex-start;
  justify-content: space-between; margin-bottom: 12px;
}
.debt-card-left { display: flex; align-items: flex-start; gap: 12px; flex: 1; min-width: 0; }
.debt-card-icon {
  width: 42px; height: 42px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
  background: rgba(232,83,106,0.1);
}
.debt-card.debt-paid .debt-card-icon { background: rgba(58,95,79,0.1); }
.debt-card-info { flex: 1; min-width: 0; }
.debt-card-name {
  font-size: 15px; font-weight: 800; letter-spacing: -0.3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  margin-bottom: 2px;
}
.debt-card-lender {
  font-size: 11px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
}
.debt-card-paid-badge {
  font-size: 12px; margin-left: 6px; vertical-align: middle;
}

.debt-card-actions { display: flex; gap: 6px; flex-shrink: 0; }
.debt-action-btn {
  background: rgba(255,255,255,0.05); border: 1px solid var(--border2);
  border-radius: 9px; padding: 5px 9px; font-size: 13px;
  cursor: pointer; transition: all 0.15s; color: var(--text2);
}
.debt-action-btn:active { background: rgba(58,95,79,0.15); color: var(--green2); }
.debt-action-btn.pay-btn {
  background: rgba(232,83,106,0.08); border-color: rgba(232,83,106,0.25);
  color: var(--red); font-size: 11px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.3px;
}
.debt-action-btn.pay-btn:active { background: rgba(232,83,106,0.18); }

/* Progress bar */
.debt-progress-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.debt-pct-lbl {
  font-size: 11px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
}
.debt-pct-val {
  font-size: 11px; font-weight: 700; color: var(--red);
  font-family: 'IBM Plex Mono', monospace;
}
.debt-card.debt-paid .debt-pct-val { color: var(--green2); }
.debt-bar {
  height: 6px; background: var(--surface3);
  border-radius: 3px; overflow: hidden; margin-bottom: 14px;
}
.debt-bar-fill {
  height: 100%; border-radius: 3px;
  background: linear-gradient(90deg, var(--red), #ff6b6b);
  transition: width 0.7s ease;
}
.debt-card.debt-paid .debt-bar-fill {
  background: linear-gradient(90deg, var(--green2), #7ec8a0);
}

/* Details grid */
.debt-details-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px 0;
  padding-top: 12px; border-top: 1px solid rgba(255,255,255,0.05);
}
.debt-detail { text-align: center; padding: 0 4px; }
.debt-detail + .debt-detail { border-left: 1px solid rgba(255,255,255,0.05); }
.debt-detail-lbl {
  font-size: 9px; color: var(--text3); text-transform: uppercase;
  letter-spacing: 1px; font-family: 'IBM Plex Mono', monospace; margin-bottom: 4px;
}
.debt-detail-val {
  font-size: 13px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
}
.debt-detail-sub {
  font-size: 9px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace; margin-top: 2px;
}

/* Balance row with dual currency */
.debt-balance-row {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 10px;
}
.debt-balance-main {
  font-size: 24px; font-weight: 800; color: var(--red);
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
}
.debt-card.debt-paid .debt-balance-main { color: var(--green2); }
.debt-balance-orig {
  font-size: 12px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
}

/* Empty state */
.debt-empty {
  text-align: center; padding: 48px 20px;
  background: var(--surface); border: 1px dashed var(--border);
  border-radius: 20px;
}
.debt-empty-icon { font-size: 40px; margin-bottom: 12px; }
.debt-empty-title { font-size: 16px; font-weight: 800; margin-bottom: 6px; }
.debt-empty-sub {
  font-size: 12px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace; line-height: 1.6;
}

/* Payoff strategies */
.debt-strategies-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
@media (max-width: 360px) {
  .debt-strategies-grid { grid-template-columns: 1fr; }
}
.debt-strategy-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 14px 12px;
}
.debt-strategy-header {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.debt-strategy-icon {
  width: 36px; height: 36px; border-radius: 11px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}
.debt-strategy-name { font-size: 13px; font-weight: 800; }
.debt-strategy-sub {
  font-size: 10px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace; margin-top: 1px;
}
.debt-strategy-badge {
  font-size: 10px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace; letter-spacing: 0.3px;
  padding: 5px 10px; border-radius: 20px;
  margin-bottom: 12px; display: inline-block;
}
.debt-strategy-row {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 0; border-bottom: 1px solid rgba(255,255,255,0.04);
}
.debt-strategy-row:last-child { border-bottom: none; }
.debt-strategy-rank {
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace; flex-shrink: 0;
}
.debt-strategy-row-info { flex: 1; min-width: 0; }
.debt-strategy-row-name {
  font-size: 11px; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.debt-strategy-row-rate {
  font-size: 10px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace; margin-top: 1px;
}
.debt-strategy-row-bal {
  font-size: 11px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums;
  flex-shrink: 0; text-align: right;
}

/* ============================================================
   HOME PAGE REDESIGN — matches Image 1 (mobile) + Image 2 (desktop)
   ============================================================ */

/* ── Layout wrapper ── */
.home-layout {
  display: flex; flex-direction: column;
}

/* ── Balance Hero — two-column ── */
.balance-hero {
  display: flex !important;
  gap: 0;
  padding: 0 !important;
  overflow: hidden;
  background: linear-gradient(160deg, #0f1f18 0%, #0c1912 55%, #091410 100%) !important;
  border: 1px solid rgba(58,95,79,0.2) !important;
  border-radius: 22px !important;
  margin-bottom: 14px;
}
.hero-left {
  flex: 1; min-width: 0;
  padding: 18px 16px 16px;
  display: flex; flex-direction: column;
  border-right: 1px solid rgba(255,255,255,0.05);
}
.hero-right {
  display: flex; flex-direction: column;
  align-items: center; justify-content: space-between;
  padding: 14px 12px 14px;
  width: 44%;
  flex-shrink: 0;
}

/* Trend pill (replaces plain balance-usd) */
.balance-trend-pill {
  display: flex; align-items: center; gap: 5px;
  margin: 4px 0 10px;
  font-size: 11px; font-family: 'IBM Plex Mono', monospace;
}
.btp-arrow { font-size: 9px; }
.btp-label { color: var(--text3); }

/* Hero sparkline */
.hero-sparkline {
  width: 100%; height: 40px;
  display: block; margin-top: auto;
}

/* Net worth block */
.hero-nw-section { width: 100%; }
.hero-nw-label {
  font-size: 9px; letter-spacing: 0.8px;
  color: var(--text3); font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 3px;
}
.hero-nw-val {
  font-size: 16px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
  letter-spacing: -0.5px; margin-bottom: 2px;
}
.hero-nw-change {
  font-size: 10px; font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 2px;
}
.hero-monthly-change {
  font-size: 11px; font-family: 'IBM Plex Mono', monospace;
  font-weight: 600;
}

/* Savings ring in hero */
.hero-ring-wrap {
  position: relative; width: 72px; height: 72px;
  margin-top: 10px;
}
.hero-ring { width: 100%; height: 100%; }
.hero-ring-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.hero-ring-pct {
  font-size: 14px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1;
}
.hero-ring-sub {
  font-size: 7px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  text-align: center; line-height: 1.3;
  margin-top: 2px;
}

/* ── Stat cards — 2×2 grid ── */
.stat-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px; margin-bottom: 16px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 14px 12px 10px;
  position: relative; overflow: hidden;
}
.sc-top {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.sc-icon-wrap {
  width: 32px; height: 32px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; flex-shrink: 0;
}
.sc-icon-income  { background: rgba(58,95,79,0.2); color: var(--green2); }
.sc-icon-expense { background: rgba(232,83,106,0.15); color: var(--red); }
.sc-icon-savings { background: rgba(193,153,132,0.15); color: var(--accent); }
.sc-icon-budget  { background: rgba(100,149,255,0.12); color: #6495ff; }
.sc-label {
  font-size: 9px; font-weight: 700; letter-spacing: 0.8px;
  color: var(--text2); font-family: 'IBM Plex Mono', monospace;
}
.sc-value {
  font-size: 15px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
  font-variant-numeric: tabular-nums;
  margin-bottom: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sc-change {
  font-size: 10px; font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 6px;
}
.sc-up   { color: var(--green2); }
.sc-down { color: var(--red); }
.sc-spark { width: 100%; height: 28px; display: block; }
.sc-budget-sub {
  font-size: 9px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  margin-bottom: 8px;
}
.sc-budget-bar-wrap {
  background: rgba(255,255,255,0.06);
  border-radius: 3px; height: 4px; overflow: hidden;
}
.sc-budget-bar {
  height: 100%; background: #6495ff;
  border-radius: 3px; transition: width 0.6s ease;
}

/* ── This Month chart card ── */
.home-chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px 14px;
  margin-bottom: 16px;
  display: flex; gap: 12px;
  align-items: flex-start;
}
.home-chart-left { flex: 1; min-width: 0; }
.home-chart-legend {
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 12px;
}
.hcl-item { display: flex; align-items: center; gap: 8px; }
.hcl-dot  { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hcl-label {
  font-size: 9px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace; text-transform: uppercase;
}
.hcl-val {
  font-size: 12px; font-weight: 700;
  font-family: 'IBM Plex Mono', monospace;
}
.home-month-canvas { width: 100%; height: 90px; display: block; }

/* Chart ring column */
.home-chart-ring-col {
  display: flex; flex-direction: column;
  align-items: center; flex-shrink: 0;
  width: 90px;
}
.home-savings-ring-wrap {
  position: relative; width: 82px; height: 82px;
}
.home-savings-ring { width: 100%; height: 100%; }
.home-savings-ring-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.hsr-pct {
  font-size: 18px; font-weight: 800;
  font-family: 'IBM Plex Mono', monospace;
  line-height: 1;
}
.hsr-label {
  font-size: 8px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  text-align: center; line-height: 1.3;
  margin-top: 3px;
}
.hsr-quality {
  font-size: 10px; color: var(--green2);
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700; margin-top: 6px;
  text-align: center;
}
.hsr-link {
  font-size: 9px; color: var(--green2);
  font-family: 'IBM Plex Mono', monospace;
  margin-top: 6px; cursor: pointer; text-align: center;
  white-space: nowrap;
}
.hsr-link:hover { text-decoration: underline; }

/* ── ASIDE (desktop right panel) ── */
.home-aside { display: none; }

.aside-date-header {
  font-size: 11px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  text-align: right; margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}
.aside-section { margin-bottom: 20px; }
.aside-empty {
  font-size: 11px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  padding: 8px 0;
}
.aside-see-all {
  width: 100%; padding: 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 11px; font-weight: 600;
  color: var(--text2);
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer; transition: all 0.15s;
  text-align: center; margin-top: 8px;
}
.aside-see-all:hover { color: var(--green2); border-color: rgba(58,95,79,0.3); }

/* Aside bill row */
.aside-bill-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}
.aside-bill-row:last-child { border-bottom: none; }
.aside-bill-left { display: flex; align-items: center; gap: 10px; }
.aside-bill-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; flex-shrink: 0;
}
.aside-bill-name { font-size: 12px; font-weight: 600; }
.aside-bill-date { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.aside-bill-amt  { font-size: 12px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; color: var(--red); }

/* Aside budget row */
.aside-budget-row { padding: 8px 0; border-bottom: 1px solid var(--border); }
.aside-budget-row:last-child { border-bottom: none; }
.aside-budget-top {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
}
.aside-budget-name { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; }
.aside-budget-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.aside-budget-vals { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.aside-budget-bar-wrap {
  background: rgba(255,255,255,0.05);
  border-radius: 3px; height: 4px;
}
.aside-budget-bar { height: 100%; border-radius: 3px; transition: width 0.5s ease; }

/* Aside account row */
.aside-acc-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.aside-acc-row:last-child { border-bottom: none; }
.aside-acc-left { display: flex; align-items: center; gap: 10px; }
.aside-acc-icon {
  width: 28px; height: 28px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.aside-acc-name { font-size: 12px; font-weight: 600; }
.aside-acc-type { font-size: 10px; color: var(--text3); font-family: 'IBM Plex Mono', monospace; }
.aside-acc-bal  { font-size: 12px; font-weight: 700; font-family: 'IBM Plex Mono', monospace; }
.aside-total-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 0 0;
  border-top: 1px solid var(--border);
  margin-top: 4px;
}
.aside-total-lbl { font-size: 11px; color: var(--text2); font-family: 'IBM Plex Mono', monospace; font-weight: 600; }
.aside-total-val { font-size: 14px; font-weight: 800; font-family: 'IBM Plex Mono', monospace; }

/* ── DESKTOP overrides ── */
@media (min-width: 600px) {
  .home-layout {
    flex-direction: row;
    gap: 24px;
    align-items: flex-start;
  }
  .home-main { flex: 1; min-width: 0; }
  .home-aside {
    display: block;
    width: 280px; flex-shrink: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    position: sticky; top: 16px;
  }
  .stat-cards-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .sc-value { font-size: 13px !important; }
  .home-month-canvas { height: 110px; }

  /* ── Desktop shell: expand app, turn bottom-nav into left sidebar ── */
  .app {
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: 200px 1fr;
    grid-template-rows: var(--top-h) 1fr;
    height: 100vh; height: 100dvh;
    overflow: hidden;
  }

  /* Topbar spans full width (both columns) */
  .app > .topbar {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  /* Left sidebar nav — second row, first column */
  .bottom-nav {
    grid-column: 1;
    grid-row: 2;
    position: relative !important;
    bottom: auto !important; left: auto !important;
    transform: none !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    min-height: 100% !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    padding: 12px 8px !important;
    border-top: none !important;
    border-right: 1px solid var(--border) !important;
    background: rgba(11,18,16,0.98) !important;
    overflow-y: auto !important;
    flex-shrink: 0 !important;
    gap: 2px !important;
  }

  /* Desktop logo in sidebar */
  .desktop-logo {
    display: flex !important;
    align-items: center; gap: 8px;
    padding: 4px 8px 14px;
    width: 100%;
    border-bottom: 1px solid var(--border);
    margin-bottom: 8px;
  }
  .desktop-logo-icon {
    width: 26px; height: 26px;
    background: linear-gradient(135deg, var(--green), #1e3d2f);
    border-radius: 7px;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px;
  }
  .desktop-logo-text { font-size: 13px; font-weight: 800; }

  /* Nav tabs in sidebar: full-width rows */
  .nav-tab {
    flex: none !important;
    width: 100% !important;
    flex-direction: row !important;
    justify-content: flex-start !important;
    gap: 10px !important;
    padding: 9px 12px !important;
    border-radius: 11px !important;
    min-width: 0 !important;
  }
  .nav-tab:hover { background: rgba(255,255,255,0.05); }
  .nav-tab.active { background: rgba(58,95,79,0.15) !important; }
  .nav-tab-icon { font-size: 17px !important; }
  .nav-tab-label { font-size: 12px !important; letter-spacing: 0 !important; }
  .nav-tab.active::after { display: none !important; }

  /* Scroll + content area — second row, second column */
  .scroll-area {
    grid-column: 2;
    grid-row: 2;
    flex: none !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding-bottom: 20px !important;
  }

  /* Glows don't need to be full-width constrained */
  .glow-1, .glow-2 { display: none; }

@media (min-width: 900px) {
  .home-aside { width: 300px; }
  .app { grid-template-columns: 220px 1fr; }
}

} /* end @media 600px desktop overrides */

/* ============================================================
   TOPBAR REDESIGN — Image 1 (mobile) + Image 2 (desktop)
   ============================================================ */

/* Topbar layout: logo | centre | right */
.topbar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* Centre block (mobile: online pill + sign out only) */
.topbar-centre {
  display: flex; align-items: center; gap: 8px;
  flex: 1; justify-content: flex-start;
}

/* Online pill */
.topbar-online-pill {
  display: flex; align-items: center; gap: 5px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px; font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text2);
}
.top-online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: #4caf82;
  animation: pip 2.2s infinite;
}
.topbar-online-pill.offline .top-online-dot { background: var(--red); animation: none; }
.topbar-online-pill.offline { color: var(--red); }

/* Sign out button */
.topbar-signout-btn {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px; font-weight: 600;
  color: var(--text2);
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer; transition: all 0.15s;
}
.topbar-signout-btn:hover { color: var(--text); border-color: var(--border2); }

/* Greeting block — hidden on mobile */
.topbar-greeting-block { display: none; }

/* User name block — hidden on mobile */
.topbar-user-name-block { display: none; }

/* ── Desktop overrides ── */
@media (min-width: 600px) {
  .topbar-centre {
    justify-content: center;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
  }
  /* Show only greeting on desktop centre, hide pill+signout there */
  .topbar-online-pill { display: none; }
  .topbar-signout-btn { display: none; }
  .topbar-greeting-block { display: block; }
  .topbar-greeting-name {
    font-size: 14px; font-weight: 800;
    letter-spacing: -0.2px;
  }
  .topbar-greeting-sub {
    font-size: 11px; color: var(--text3);
    font-family: 'IBM Plex Mono', monospace;
  }

  /* Right side: show user name block on desktop */
  .topbar-user-name-block {
    display: flex; align-items: center; gap: 4px;
    cursor: pointer;
  }
  .topbar-username { font-size: 12px; color: var(--text2); font-family: 'IBM Plex Mono', monospace; font-weight: 600; }
  .topbar-user-caret { font-size: 10px; color: var(--text3); }

  /* On desktop, add online + sign out to the LEFT of the logo area (inside sidebar) */
  /* Actually desktop shows online pill in topbar alongside logo */
  .topbar-online-pill-desk {
    display: flex; align-items: center; gap: 5px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 20px;
    padding: 4px 10px;
    font-size: 11px; font-weight: 600;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text2);
    margin-left: 12px;
  }
}

/* ============================================================
   NAV + TOPBAR FIXES — match Image 1 exactly
   ============================================================ */

/* Stat cards: 2×2 on mobile (matches Image 1), 4-in-a-row on desktop */
.stat-cards-grid {
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 10px !important;
}
.stat-card {
  padding: 14px 12px 10px !important;
}
.sc-value {
  font-size: 14px !important;
}
.sc-top { gap: 8px !important; margin-bottom: 8px !important; }
.sc-icon-wrap { width: 30px !important; height: 30px !important; font-size: 14px !important; }
.sc-label { font-size: 9px !important; }
.sc-change { font-size: 10px !important; }

/* Topbar: flex row, single line, no wrapping */
.topbar {
  flex-wrap: nowrap !important;
  padding: 0 12px !important;
  gap: 8px !important;
}

/* Centre: pill + signout + greeting in a row on mobile */
.topbar-centre {
  flex-direction: row !important;
  align-items: center !important;
  gap: 6px !important;
  flex: 1 !important;
  justify-content: flex-start !important;
  overflow: hidden !important;
  min-width: 0 !important;
}

/* Greeting in centre: show inline on mobile */
.topbar-greeting-block {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0 !important;
  flex: 1 !important;
}
.topbar-greeting-name {
  font-size: 12px !important;
  font-weight: 700 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
.topbar-greeting-sub {
  font-size: 10px !important;
  color: var(--text3) !important;
  font-family: 'IBM Plex Mono', monospace !important;
  white-space: nowrap !important;
}

/* Sign out button — visible on mobile, hidden on desktop (JS injects its own) */
.topbar-signout-btn {
  display: flex !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  font-size: 10px !important;
  padding: 4px 8px !important;
}

/* JS-injected logout-btn: hidden on mobile (we have topbar-signout-btn), shown on desktop */
.logout-btn {
  display: none;
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 11px; font-weight: 600;
  color: var(--text2);
  font-family: 'IBM Plex Mono', monospace;
  cursor: pointer;
}

/* Right side: no username block or logout-btn on mobile */
.topbar-user-name-block { display: none !important; }

/* Desktop overrides */
@media (min-width: 600px) {
  /* Centre becomes greeting only on desktop */
  .topbar-centre {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 1px !important;
    justify-content: center !important;
  }
  /* Hide pill and HTML sign-out from centre on desktop */
  .topbar-online-pill { display: none !important; }
  .topbar-signout-btn { display: none !important; }
  /* Show greeting block */
  .topbar-greeting-block { display: flex !important; }
  .topbar-greeting-name { font-size: 14px !important; }
  .topbar-greeting-sub  { font-size: 11px !important; }
  /* Show JS-injected logout-btn on desktop right side */
  .logout-btn { display: flex !important; align-items: center; }
  /* Show username block on desktop */
  .topbar-user-name-block { display: flex !important; align-items: center; gap: 4px; cursor: pointer; }
  /* Stat cards 4-in-a-row on desktop */
  .stat-cards-grid { grid-template-columns: repeat(4, 1fr) !important; }
  .sc-value { font-size: 13px !important; }
}

/* Nav tab: 6 tabs need to fit — shrink text */
.nav-tab { flex: 1 !important; min-width: 0 !important; }
.nav-tab-label { font-size: 9px !important; letter-spacing: 0 !important; }
.nav-tab-icon { font-size: 18px !important; }

/* Menu tab */
.nav-tab[data-page="menu"] { cursor: pointer !important; }

/* Online bar — hidden (removed from HTML) */
.online-bar { display: none !important; }

/* Sync indicator (Saved label) */
.sync-indicator {
  display: flex; align-items: center; gap: 5px;
  font-size: 11px; font-weight: 600;
  font-family: 'IBM Plex Mono', monospace;
  color: var(--text2);
  flex-shrink: 0;
}
.sync-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green2);
  flex-shrink: 0;
}

/* Quick action Utilities icon */
.qi-more { font-size: 20px !important; letter-spacing: 0 !important; }


/* ============================================================
   IMAGE-MATCH FIXES — mobile (Image 1) + desktop (Image 2)
   ============================================================ */

/* ── Savings stat card: warm amber icon matching Image 1/2 ── */
.sc-icon-savings {
  background: rgba(255,160,50,0.15) !important;
  color: #ffab40 !important;
}

/* ── Desktop sidebar bottom panel: hidden on mobile ── */
.sidebar-bottom { display: none; }

@media (min-width: 600px) {
  .bottom-nav {
    overflow-y: auto !important;
  }
  .sidebar-bottom {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: auto;
    padding: 12px 8px 8px;
    border-top: 1px solid var(--border);
    width: 100%;
    flex-shrink: 0;
  }

  /* Go Premium card */
  .sidebar-premium-card {
    background: linear-gradient(160deg, rgba(58,95,79,0.18) 0%, rgba(30,60,40,0.25) 100%);
    border: 1px solid rgba(58,95,79,0.35);
    border-radius: 14px;
    padding: 12px 12px 10px;
    cursor: pointer;
    transition: border-color 0.15s;
  }
  .sidebar-premium-card:hover { border-color: var(--green2); }
  .sidebar-premium-crown { font-size: 16px; margin-bottom: 4px; }
  .sidebar-premium-title {
    font-size: 13px; font-weight: 800;
    color: #f0c040;
    margin-bottom: 3px;
  }
  .sidebar-premium-sub {
    font-size: 10px; color: var(--text3);
    font-family: 'IBM Plex Mono', monospace;
    line-height: 1.4; margin-bottom: 8px;
  }
  .sidebar-premium-btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--green), #1e3d2f);
    color: #fff;
    font-size: 10px; font-weight: 700;
    font-family: 'IBM Plex Mono', monospace;
    padding: 5px 10px; border-radius: 8px;
    cursor: pointer;
  }

  /* Backup status row */
  .sidebar-status-row {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 2px;
  }
  .sidebar-status-icon { font-size: 14px; flex-shrink: 0; }
  .sidebar-status-info { flex: 1; min-width: 0; }
  .sidebar-status-label {
    font-size: 10px; color: var(--text3);
    font-family: 'IBM Plex Mono', monospace;
    text-transform: uppercase; letter-spacing: 0.5px;
  }
  .sidebar-status-val {
    font-size: 11px; font-weight: 600;
    font-family: 'IBM Plex Mono', monospace;
  }
  .sidebar-status-ok { color: var(--green2); }

  /* Storage bar */
  .sidebar-storage-row { padding: 4px 2px; }
  .sidebar-storage-header {
    display: flex; justify-content: space-between;
    margin-bottom: 5px;
  }
  .sidebar-storage-pct {
    font-size: 10px; font-weight: 600;
    font-family: 'IBM Plex Mono', monospace;
    color: var(--text2);
  }
  .sidebar-storage-bar-wrap {
    background: rgba(255,255,255,0.06);
    border-radius: 3px; height: 5px; overflow: hidden;
  }
  .sidebar-storage-bar {
    height: 100%; border-radius: 3px;
    background: linear-gradient(90deg, var(--green), var(--green2));
    transition: width 0.5s ease;
  }

  /* ── Desktop aside: wider right panel ── */
  .home-aside { width: 300px !important; }

  /* ── Quick actions: label font slightly larger on desktop ── */
  .qa-label { font-size: 10px !important; }

  /* ── Home month chart: taller on desktop ── */
  .home-month-canvas { height: 130px !important; }

  /* ── Stat card values: readable on desktop ── */
  .sc-value { font-size: 14px !important; }

  /* ── Aside date header: flex row with icon ── */
  .aside-date-header {
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    font-weight: 600;
  }
}

@media (min-width: 900px) {
  .home-aside { width: 320px !important; }
}

/* ── Mobile FAB: circular green + button from Image 1 ── */
.fab {
  display: flex;
  background: var(--green2) !important;
  border-radius: 50% !important;
  width: 52px !important; height: 52px !important;
  box-shadow: 0 4px 20px rgba(74,122,99,0.45) !important;
  font-size: 28px !important;
  font-weight: 300 !important;
  color: #fff !important;
  border: none !important;
}
@media (min-width: 600px) {
  .fab { display: none !important; }
}

/* ── Month overview period selector: dropdown pill style ── */
.month-overview-period {
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 4px 10px;
  cursor: pointer;
}

/* ── "View insights" link: subtle button style ── */
.hsr-link {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 5px 10px;
}

/* ── Sidebar copyright line (desktop only) ── */
.sidebar-copyright {
  display: none;
  font-size: 9px; color: var(--text3);
  font-family: 'IBM Plex Mono', monospace;
  text-align: center; padding: 4px 2px 0;
}
@media (min-width: 600px) {
  .sidebar-copyright { display: block; }
}
