/* ═══════════════════════════════════════════════════════════════════
   MoneyTrack · v5 Complete Stylesheet
   Matches reference: Image 1 (lighter blue, card-based layout)
   Bottom nav: Image 3 (pill bar + animated bubble indicator)
   ═══════════════════════════════════════════════════════════════════ */

/* ── Tokens ──────────────────────────────────────────────────────── */
:root {
  /* Page */
  --page-bg:   #e8f0fc;

  /* Header: medium blue (Image 1 shows ~#5b7fd4 gradient) */
  --hdr-top:   #4a6fd4;
  --hdr-bot:   #5b8dee;

  /* Wallet card inside header: slightly darker */
  --card-bg:   #3a5dc0;
  --card-bg2:  #2e4eb0;

  /* Stat cards: solid blue gradient */
  --stat-bg:   #3d6de0;
  --stat-bg2:  #3060cc;

  /* Transaction rows: lighter blue gradient cards */
  --tx-bg:     #5b87e8;
  --tx-bg2:    #4a78dc;

  /* Bottom nav */
  --nav-bg:    #3d6de0;
  --nav-h:     68px;
  --bubble:    #2a52c8;

  /* Content surfaces */
  --surf:      #ffffff;
  --surf2:     #f4f7ff;
  --border:    #dce8fa;

  /* Text */
  --txt:       #1a2e5c;
  --txt2:      #3a5080;
  --txt3:      #7a90b8;
  --txt-red:   #e53e3e;
  --txt-red2:  #ff6b7a; /* on blue bg */

  /* Status */
  --green:     #10b981;
  --red:       #ef4444;
  --amber:     #f59e0b;
  --red-bg:    #fef2f2;
  --red-bdr:   #fecaca;
  --green-bg:  #ecfdf5;

  /* Shadows */
  --shadow:    0 2px 12px rgba(30,60,140,.10);
  --shadow-m:  0 4px 20px rgba(30,60,140,.16);
  --shadow-l:  0 8px 32px rgba(30,60,140,.22);

  /* Radius */
  --r:    18px;
  --r-sm: 11px;
  --r-xs: 7px;
}

[data-theme="dark"] {
  --page-bg:  #0a1628;
  --hdr-top:  #0f2460;
  --hdr-bot:  #1a3a8a;
  --card-bg:  #0d1e4a;
  --card-bg2: #0a1838;
  --stat-bg:  #0e2880;
  --stat-bg2: #0a1e6e;
  --tx-bg:    #1a3480;
  --tx-bg2:   #162e70;
  --nav-bg:   #0e2880;
  --bubble:   #1a40b0;
  --surf:     #111827;
  --surf2:    #1e293b;
  --border:   #1e293b;
  --txt:      #e2eaf8;
  --txt2:     #8eaacc;
  --txt3:     #4a6080;
  --shadow:   0 2px 12px rgba(0,0,0,.4);
  --shadow-m: 0 4px 20px rgba(0,0,0,.5);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; -webkit-tap-highlight-color:transparent; }
html { -webkit-text-size-adjust:100%; text-size-adjust:100%; }
body {
  font-family: 'Plus Jakarta Sans', system-ui, sans-serif;
  background: var(--page-bg);
  color: var(--txt);
  min-height: 100vh;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
input,button,select,textarea { font-family: inherit; }
button { cursor: pointer; -webkit-appearance: none; border: none; background: none; }
input[type=number]::-webkit-inner-spin-button { -webkit-appearance:none; }
input[type=number] { -moz-appearance: textfield; }
::-webkit-scrollbar { width: 3px; }
::-webkit-scrollbar-thumb { background: rgba(60,110,220,.25); border-radius: 99px; }

/* ═══════════════════════════════════════════════════════════════════
   APP SHELL
   ═══════════════════════════════════════════════════════════════════ */
.app-body  { background: var(--page-bg); }
.app-shell {
  max-width: 480px; margin: 0 auto;
  min-height: 100vh;
  display: flex; flex-direction: column;
  background: var(--page-bg);
  position: relative;
}

/* ═══════════════════════════════════════════════════════════════════
   HEADER — medium blue gradient, greeting + wallet card + 4 actions
   ═══════════════════════════════════════════════════════════════════ */
.dash-header {
  background: linear-gradient(175deg, var(--hdr-top) 0%, var(--hdr-bot) 100%);
  padding: 0 0 0;
  padding-top: env(safe-area-inset-top);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
}

/* Greeting row */
.dash-greeting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 10px;
}
.dash-greet-sub  { font-size: 12px; color: rgba(255,255,255,.7); font-weight: 500; }
.dash-greet-name { font-size: 20px; font-weight: 800; color: #fff; letter-spacing: -.2px; margin-top: 1px; }
.dash-header-actions { display: flex; gap: 8px; }
.dash-icon-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
}
.dash-icon-btn:hover { background: rgba(255,255,255,.28); }

/* Wallet card inside header (darker blue card, rounded) */
.dash-wallet-card {
  margin: 4px 14px 14px;
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--card-bg2) 100%);
  border-radius: 22px;
  padding: 18px 20px 20px;
  box-shadow: 0 8px 24px rgba(16,36,100,.3);
  position: relative;
  overflow: hidden;
}
.dash-wallet-card::before {
  content: '';
  position: absolute; top: -50px; right: -30px;
  width: 160px; height: 160px; border-radius: 50%;
  background: rgba(255,255,255,.05);
  pointer-events: none;
}
.dash-nw-row {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: rgba(255,255,255,.7); font-weight: 600;
  margin-bottom: 4px;
}
.dash-nw-label { }
.dash-nw-amount {
  font-size: 38px; font-weight: 800; color: #fff;
  letter-spacing: -1.5px; margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
  line-height: 1.05; position: relative; z-index: 1;
}
.dash-eye {
  width: 30px; height: 30px; border-radius: 50%;
  background: rgba(255,255,255,.15); color: rgba(255,255,255,.85);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: background .15s;
}
.dash-eye:hover { background: rgba(255,255,255,.25); }

/* 4 quick action buttons */
.dash-actions {
  display: flex; gap: 0; justify-content: space-between;
  position: relative; z-index: 1;
}
.dash-action-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 7px;
  background: transparent; color: rgba(255,255,255,.9);
  font-family: inherit; font-size: 11px; font-weight: 600;
  letter-spacing: .1px; padding: 2px 0;
  transition: opacity .15s;
}
.dash-action-btn:active { opacity: .6; }
.dash-action-ico {
  width: 48px; height: 48px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  transition: background .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.dash-action-btn:hover .dash-action-ico { background: rgba(255,255,255,.28); }

/* ═══════════════════════════════════════════════════════════════════
   CONTENT AREA
   ═══════════════════════════════════════════════════════════════════ */
.app-content {
  flex: 1;
  padding: 14px 14px calc(var(--nav-h) + 32px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  background: var(--page-bg);
}

/* ═══════════════════════════════════════════════════════════════════
   STAT GRID — 4 blue cards (Image 1)
   ═══════════════════════════════════════════════════════════════════ */
.stat-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.stat-card-blue {
  background: linear-gradient(145deg, var(--stat-bg) 0%, var(--stat-bg2) 100%);
  border-radius: var(--r);
  padding: 14px 15px 15px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(30,70,200,.22);
}
.scb-label {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .7px; opacity: .8; margin-bottom: 10px;
}
.scb-value { font-size: 22px; font-weight: 800; letter-spacing: -.5px; line-height: 1.1; }

/* Section header */
.sec-head  { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.sec-title { font-size: 16px; font-weight: 800; color: var(--txt); }
.sec-link  { font-size: 13px; font-weight: 600; color: var(--stat-bg); background: none; border: none; cursor: pointer; font-family: inherit; }

/* ═══════════════════════════════════════════════════════════════════
   TRANSACTION ROWS — blue gradient cards (Image 1)
   ═══════════════════════════════════════════════════════════════════ */
.tx-card { border-radius: var(--r); overflow: hidden; margin-bottom: 0; box-shadow: var(--shadow); }
.txr {
  background: linear-gradient(135deg, var(--tx-bg) 0%, var(--tx-bg2) 100%);
  display: flex; align-items: center; gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid rgba(255,255,255,.12);
  transition: filter .12s;
}
.txr:last-child { border-bottom: none; }
.txr:hover { filter: brightness(1.06); }
.txr-ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
}
.txr-info  { flex: 1; min-width: 0; }
.txr-name  { font-size: 14px; font-weight: 700; color: #fff; }
.txr-sub   { font-size: 12px; color: rgba(255,255,255,.65); margin-top: 2px; }
.txr-right { text-align: right; flex-shrink: 0; }
.txr-amt   { font-size: 14px; font-weight: 800; color: #ffb3bb; }
.txr-date  { font-size: 11px; color: rgba(255,255,255,.55); margin-top: 2px; }
.txr-btns  { display: flex; gap: 3px; justify-content: flex-end; margin-top: 5px; }
/* Action buttons inside blue rows — override to white-on-transparent */
.txr .act-btn {
  background: rgba(255,255,255,.2);
  border-color: rgba(255,255,255,.25);
  color: #fff;
}
.txr .act-btn:hover  { background: rgba(255,255,255,.35); border-color: rgba(255,255,255,.4); }
.txr .act-del:hover  { background: rgba(239,68,68,.35); border-color: rgba(239,68,68,.5); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   BOTTOM NAV — pill bar + animated floating bubble (Image 3)
   ═══════════════════════════════════════════════════════════════════ */
.bottom-nav {
  position: fixed;
  bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  background: linear-gradient(135deg, #3a68e0 0%, #2c54c8 100%);
  border-radius: 24px 24px 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-around;
  padding: 0 0 calc(10px + env(safe-area-inset-bottom));
  z-index: 100;
  box-shadow: 0 -4px 30px rgba(30,60,180,.22);
  overflow: visible; /* bubble pops above the bar */
}

/* The sliding circular bubble — positioned by JS */
.bn-indicator {
  position: absolute;
  top: -26px;
  left: 0; /* set by JS */
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(145deg, #5a85f5 0%, #3060d8 100%);
  border: 4px solid var(--page-bg);
  box-shadow: 0 4px 18px rgba(30,60,200,.35);
  transition: left .38s cubic-bezier(.34,1.56,.64,1);
  pointer-events: none;
  z-index: 2;
}
/* Concave cutout on left of bubble */
.bn-indicator::before {
  content: '';
  position: absolute;
  bottom: -4px; left: -20px;
  width: 20px; height: 20px;
  background: transparent;
  border-bottom-right-radius: 20px;
  box-shadow: 6px 6px 0 0 var(--page-bg);
}
/* Concave cutout on right of bubble */
.bn-indicator::after {
  content: '';
  position: absolute;
  bottom: -4px; right: -20px;
  width: 20px; height: 20px;
  background: transparent;
  border-bottom-left-radius: 20px;
  box-shadow: -6px 6px 0 0 var(--page-bg);
}

/* Nav items */
.bn-item {
  flex: 1;
  display: flex; flex-direction: column; align-items: center;
  gap: 3px;
  padding: 6px 0 2px;
  color: rgba(255,255,255,.5);
  font-size: 10px; font-weight: 600; font-family: inherit;
  letter-spacing: .2px;
  transition: color .2s;
  position: relative;
  z-index: 3;
  -webkit-user-select: none; user-select: none;
}
.bn-item.active { color: rgba(255,255,255,.95); }
.bn-label { }

.bn-icon-wrap {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  transition: transform .35s cubic-bezier(.34,1.56,.64,1), color .2s;
  color: rgba(255,255,255,.5);
  will-change: transform;
}
.bn-item.active .bn-icon-wrap {
  transform: translateY(-30px);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════
   DAY GROUPS (expense list)
   ═══════════════════════════════════════════════════════════════════ */
.day-group {
  margin-bottom: 14px;
  background: var(--surf);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.day-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px 10px;
  background: var(--surf2);
  border-bottom: 1px solid var(--border);
}
.day-group-label{ display: flex; flex-direction: column; gap: 1px; }
.day-name       { font-size: 13px; font-weight: 800; color: var(--txt); display: flex; align-items: center; gap: 7px; }
.day-date       { font-size: 11px; color: var(--txt3); font-weight: 500; }
.day-total      { font-size: 14px; font-weight: 800; color: var(--txt); }
.today-badge    { display: inline-flex; align-items: center; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--stat-bg); color: #fff; letter-spacing: .3px; text-transform: uppercase; }

/* ═══════════════════════════════════════════════════════════════════
   GENERIC CARDS & COMPONENTS
   ═══════════════════════════════════════════════════════════════════ */
.card { background: var(--surf); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.card-head { padding: 12px 15px; border-bottom: 1px solid var(--border); background: var(--surf2); display: flex; justify-content: space-between; align-items: center; }
.card-head-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--txt2); }
.card-body { padding: 14px 15px; }
.section-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--txt2); margin-bottom: 11px; }

/* Chips */
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 6px 13px; border-radius: 999px; border: 1.5px solid var(--border); background: var(--surf); font-size: 12px; font-weight: 600; color: var(--txt2); font-family: inherit; transition: all .15s; }
.chip.active { background: var(--stat-bg); border-color: var(--stat-bg); color: #fff; }
.chip:hover:not(.active) { border-color: var(--stat-bg); color: var(--stat-bg); }

/* Mini stat row */
.mini-row  { display: flex; gap: 10px; margin-bottom: 12px; }
.mini-card { flex: 1; background: var(--surf); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 12px 14px; box-shadow: var(--shadow); }
.mini-lbl  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--txt2); margin-bottom: 3px; }
.mini-val  { font-size: 18px; font-weight: 800; color: var(--txt); }

/* Analytics */
.triple-row  { display: flex; gap: 8px; margin-bottom: 12px; }
.triple-card { flex: 1; background: var(--surf); border-radius: var(--r-sm); padding: 11px 8px; text-align: center; box-shadow: var(--shadow); }
.triple-lbl  { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--txt2); margin-bottom: 3px; }
.triple-val  { font-size: 14px; font-weight: 800; color: var(--txt); }
.bar-track { height: 6px; border-radius: 99px; background: var(--surf2); overflow: hidden; }
.bar-fill  { height: 100%; border-radius: 99px; transition: width .5s cubic-bezier(.4,0,.2,1); }
.bar-row  { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.bar-ico  { width: 28px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: var(--txt2); }
.bar-body { flex: 1; }
.bar-meta { display: flex; justify-content: space-between; margin-bottom: 4px; }
.bar-name { font-size: 13px; font-weight: 600; color: var(--txt); }
.bar-val  { font-size: 12px; color: var(--txt2); font-weight: 600; }
.cmp-row  { margin-bottom: 11px; }
.cmp-meta { display: flex; justify-content: space-between; margin-bottom: 4px; }
.cmp-lbl  { font-size: 13px; font-weight: 600; color: var(--txt2); }
.cmp-val  { font-size: 13px; font-weight: 800; color: var(--txt); }
.seg-bar  { display: flex; height: 12px; border-radius: 7px; overflow: hidden; gap: 1px; margin-bottom: 12px; }
.emptyState-ico { width: 52px; height: 52px; border-radius: 14px; background: var(--surf2); display: flex; align-items: center; justify-content: center; color: var(--txt3); margin: 0 auto 12px; }

/* Empty state */
.empty { text-align: center; padding: 36px 20px; }
.empty h3  { font-size: 15px; font-weight: 700; color: var(--txt); margin-bottom: 4px; }
.empty p   { font-size: 13px; color: var(--txt3); }

/* ═══════════════════════════════════════════════════════════════════
   BUTTONS
   ═══════════════════════════════════════════════════════════════════ */
.btn-full {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 13px 0; border-radius: var(--r-sm);
  font-family: inherit; font-size: 15px; font-weight: 700;
  background: var(--stat-bg); color: #fff;
  transition: filter .15s; cursor: pointer;
}
.btn-full:hover    { filter: brightness(1.08); }
.btn-full:active   { filter: brightness(.94); }
.btn-full:disabled { opacity: .45; cursor: not-allowed; }
.accent-btn { background: var(--green); }
.btn-ghost  { flex: 1; padding: 11px 0; border: 1.5px solid var(--border); border-radius: var(--r-sm); background: var(--surf2); color: var(--txt2); font-family: inherit; font-size: 14px; font-weight: 600; transition: background .15s; cursor: pointer; }
.btn-ghost:hover { background: var(--border); }
.btn-danger { flex: 1; padding: 11px 0; border-radius: var(--r-sm); background: var(--red); color: #fff; font-family: inherit; font-size: 14px; font-weight: 700; transition: filter .15s; cursor: pointer; }
.btn-danger:hover { filter: brightness(1.08); }
.act-btn { width: 30px; height: 30px; border: 1px solid var(--border); border-radius: 7px; background: var(--surf2); color: var(--txt2); display: flex; align-items: center; justify-content: center; transition: all .12s; cursor: pointer; }
.act-btn:hover  { background: var(--border); color: var(--txt); }
.act-del:hover  { background: var(--red-bg); border-color: var(--red-bdr); color: var(--red); }

/* ═══════════════════════════════════════════════════════════════════
   FORMS
   ═══════════════════════════════════════════════════════════════════ */
.field       { margin-bottom: 13px; }
.field label { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .6px; color: var(--txt3); margin-bottom: 5px; }
.field label small { text-transform: none; font-weight: 500; font-size: 10px; letter-spacing: 0; }
.field-row   { display: flex; gap: 10px; }
.field-row .field { flex: 1; }
.inp {
  display: block; width: 100%;
  background: var(--surf2); border: 1.5px solid var(--border); border-radius: var(--r-sm);
  padding: 11px 13px; font-size: 16px; font-family: inherit; color: var(--txt); outline: none;
  -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s;
}
.inp:focus { border-color: var(--stat-bg); box-shadow: 0 0 0 3px rgba(61,109,224,.12); }
.inp::placeholder { color: var(--txt3); }
select.inp { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }

/* Dropdown */
.select-box   { position: relative; }
.select-shown { display: flex; align-items: center; justify-content: space-between; background: var(--surf2); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 11px 13px; font-size: 16px; color: var(--txt3); cursor: pointer; font-family: inherit; -webkit-appearance: none; appearance: none; transition: border-color .15s; user-select: none; }
.select-shown.picked { color: var(--txt); }
.select-shown:hover  { border-color: var(--stat-bg); }
.select-drop  { display: none; position: absolute; z-index: 500; top: calc(100% + 5px); left: 0; right: 0; background: var(--surf); border: 1.5px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-l); max-height: 220px; overflow-y: auto; }
.select-drop.open { display: block; }
.dd-grp  { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--txt3); padding: 9px 13px 3px; }
.dd-opt  { display: flex; align-items: center; justify-content: space-between; padding: 10px 13px; font-size: 14px; color: var(--txt); background: transparent; border: none; width: 100%; text-align: left; font-family: inherit; cursor: pointer; transition: background .1s; }
.dd-opt:hover { background: var(--surf2); }
.dd-badge { font-size: 12px; color: var(--txt3); background: var(--surf2); border-radius: 5px; padding: 2px 7px; font-weight: 600; }
.dd-custom-row     { display: flex; align-items: center; }
.dd-opt-custom     { flex: 1; border-radius: 0; }
.dd-custom-actions { display: flex; gap: 3px; padding-right: 10px; flex-shrink: 0; }
.dd-act-btn        { width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 6px; background: var(--surf2); color: var(--txt3); display: flex; align-items: center; justify-content: center; transition: all .12s; flex-shrink: 0; }
.dd-act-btn:hover  { background: var(--border); color: var(--txt); }
.dd-act-del:hover  { background: var(--red-bg); border-color: var(--red-bdr); color: var(--red); }
.dd-divider  { height: 1px; background: var(--border); margin: 4px 0; }
.dd-new-row  { padding: 9px 13px 11px; }
.dd-new-lbl  { display: block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .7px; color: var(--txt3); margin-bottom: 6px; }
.dd-new-fields { display: flex; align-items: center; gap: 6px; }
.dd-new-inp  { flex: 1; background: var(--surf2); border: 1.5px solid var(--border); border-radius: 7px; padding: 7px 10px; font-size: 13px; font-family: inherit; color: var(--txt); outline: none; -webkit-appearance: none; appearance: none; transition: border-color .15s; }
.dd-new-inp:focus { border-color: var(--stat-bg); }
.dd-new-inp::placeholder { color: var(--txt3); }
.dd-new-btn  { width: 32px; height: 32px; border-radius: 7px; flex-shrink: 0; background: var(--stat-bg); color: #fff; display: flex; align-items: center; justify-content: center; transition: filter .15s; }
.dd-new-btn:hover { filter: brightness(1.1); }
.dd-new-btn:disabled { opacity: .5; cursor: not-allowed; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.inp-shake { animation: shake .35s ease; border-color: var(--red) !important; }

/* ═══════════════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════════════ */
.modal-backdrop { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 800; background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); align-items: flex-end; justify-content: center; }
.modal-backdrop.open { display: flex; }
.modal-sheet { background: var(--surf); width: 100%; max-width: 480px; border-radius: 20px 20px 0 0; padding: 18px 18px 32px; padding-bottom: max(32px, calc(32px + env(safe-area-inset-bottom))); max-height: 90vh; overflow-y: auto; animation: slideUp .25s ease; }
.modal-compact { max-width: 380px; padding-top: 24px; text-align: center; }
.modal-drag    { width: 36px; height: 4px; background: var(--border); border-radius: 99px; margin: 0 auto 18px; }
.modal-head    { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.modal-title   { font-size: 17px; font-weight: 800; color: var(--txt); letter-spacing: -.3px; }
.modal-close   { width: 32px; height: 32px; border: 1px solid var(--border); border-radius: 7px; background: var(--surf2); color: var(--txt2); display: flex; align-items: center; justify-content: center; transition: all .15s; cursor: pointer; }
.modal-close:hover { background: var(--border); color: var(--txt); }
.modal-note    { font-size: 13px; color: var(--txt3); margin-bottom: 18px; }
.confirm-icon  { width: 60px; height: 60px; border-radius: 16px; background: var(--red-bg); border: 1.5px solid var(--red-bdr); color: var(--red); display: flex; align-items: center; justify-content: center; margin: 0 auto 14px; }
.confirm-title { font-size: 20px; font-weight: 800; color: var(--txt); margin-bottom: 8px; }
.confirm-sub   { font-size: 13px; color: var(--txt3); margin-bottom: 22px; }
.confirm-btns  { display: flex; gap: 10px; }

/* ═══════════════════════════════════════════════════════════════════
   TOASTS & LOADER
   ═══════════════════════════════════════════════════════════════════ */
.toast-stack { position: fixed; top: 16px; right: 12px; left: 12px; z-index: 1000; display: flex; flex-direction: column; gap: 7px; pointer-events: none; max-width: 400px; margin: 0 auto; }
.toast       { background: var(--surf); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; box-shadow: var(--shadow-m); font-size: 13px; font-weight: 600; color: var(--txt); display: flex; align-items: center; gap: 8px; animation: fadeIn .22s ease; pointer-events: auto; }
.toast-ok    { border-left: 3px solid var(--green); }
.toast-err   { border-left: 3px solid var(--red); }
.toast-ico   { flex-shrink: 0; }
.toast-ok  .toast-ico { color: var(--green); }
.toast-err .toast-ico { color: var(--red); }

.loader-screen { position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 2000; background: var(--hdr-top); display: flex; align-items: center; justify-content: center; }
.loader-screen.hidden { display: none; }
.loader-inner  { text-align: center; }
.loader-ring   { width: 40px; height: 40px; margin: 0 auto 12px; border: 3px solid rgba(255,255,255,.2); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
.loader-brand  { font-size: 20px; font-weight: 800; color: #fff; }
.spin          { display: inline-block; width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════ */
@keyframes slideUp { from { transform: translateY(18px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
@keyframes fadeIn  { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin    { to { transform: rotate(360deg); } }
@keyframes wnCardIn{ from { transform: scale(.88) translateY(16px); opacity: 0; } to { transform: scale(1) translateY(0); opacity: 1; } }
.ani { animation: fadeIn .28s ease both; }
.d1  { animation-delay: .05s; }
.d2  { animation-delay: .10s; }
.d3  { animation-delay: .15s; }
.d4  { animation-delay: .20s; }

/* ═══════════════════════════════════════════════════════════════════
   AUTH PAGES
   ═══════════════════════════════════════════════════════════════════ */
.auth-page { background: var(--page-bg); }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; background: linear-gradient(160deg, var(--hdr-top) 0%, var(--hdr-bot) 45%, var(--page-bg) 100%); }
.auth-card { width: 100%; max-width: 420px; background: var(--surf); border: 1px solid var(--border); border-radius: 20px; padding: 32px 24px 28px; box-shadow: var(--shadow-l); animation: fadeIn .3s ease; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 24px; font-size: 18px; font-weight: 800; color: var(--txt); }
.auth-card h1 { font-size: 22px; font-weight: 800; color: var(--txt); text-align: center; letter-spacing: -.5px; margin-bottom: 5px; }
.auth-sub     { font-size: 14px; color: var(--txt3); text-align: center; margin-bottom: 24px; }
.auth-footer  { text-align: center; font-size: 13px; color: var(--txt3); margin-top: 20px; }
.auth-footer a{ color: var(--stat-bg); font-weight: 700; text-decoration: none; }
.auth-footer a:hover { text-decoration: underline; }
.alert        { padding: 10px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; margin-bottom: 16px; }
.alert.error  { background: var(--red-bg); border: 1px solid var(--red-bdr); color: var(--red); }
.alert.success{ background: var(--green-bg); border: 1px solid #a7f3d0; color: #059669; }
.brand-icon   { width: 38px; height: 38px; border-radius: 10px; background: var(--stat-bg); display: flex; align-items: center; justify-content: center; color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   WALLETS TAB
   ═══════════════════════════════════════════════════════════════════ */
.nw-hero { background: linear-gradient(145deg, var(--card-bg) 0%, var(--card-bg2) 100%); border-radius: var(--r); padding: 20px; color: #fff; box-shadow: var(--shadow-m); margin-bottom: 14px; position: relative; overflow: hidden; }
.nw-hero::before { content: ''; position: absolute; top: -60px; right: -40px; width: 180px; height: 180px; border-radius: 50%; background: rgba(255,255,255,.05); pointer-events: none; }
.nw-hero-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.2px; opacity: .65; margin-bottom: 4px; }
.nw-hero-amount{ font-size: 32px; font-weight: 800; letter-spacing: -1.2px; margin-bottom: 14px; position: relative; z-index: 1; }
.nw-hero-row   { display: flex; gap: 0; margin-bottom: 16px; position: relative; z-index: 1; }
.nw-hero-item  { flex: 1; }
.nw-hero-divider { width: 1px; background: rgba(255,255,255,.2); margin: 0 14px; }
.nw-hero-sub   { font-size: 11px; opacity: .65; display: block; margin-bottom: 2px; }
.nw-hero-val   { font-size: 16px; font-weight: 800; }
.nw-hero-actions { display: flex; gap: 8px; position: relative; z-index: 1; }
.hero-btn       { flex: 1; padding: 9px 0; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; gap: 5px; border: none; transition: filter .15s; font-family: inherit; cursor: pointer; }
.hero-btn-outline{ background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.25) !important; }
.hero-btn-solid  { background: #fff; color: var(--stat-bg); }
.wallet-card     { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 14px 15px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; box-shadow: var(--shadow); }
.wallet-main     { border-left: 3px solid var(--stat-bg); }
.wallet-card-left{ display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.wallet-ico      { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.wallet-name     { font-size: 15px; font-weight: 700; color: var(--txt); }
.wallet-label    { font-size: 11px; color: var(--txt3); margin-top: 1px; }
.wallet-balance  { font-size: 16px; font-weight: 800; color: var(--txt); letter-spacing: -.3px; flex-shrink: 0; }
.btn-add-wallet  { font-size: 13px; font-weight: 700; color: var(--stat-bg); background: transparent; border: none; cursor: pointer; font-family: inherit; padding: 4px 0; }

/* Color & icon pickers */
.color-picker { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.color-swatch { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent; cursor: pointer; transition: transform .15s, border-color .15s; flex-shrink: 0; }
.color-swatch:hover  { transform: scale(1.12); }
.color-swatch.active { border-color: var(--txt); transform: scale(1.12); }
.icon-picker  { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.icon-swatch  { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--border); background: var(--surf2); color: var(--txt2); cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all .15s; }
.icon-swatch:hover  { border-color: var(--stat-bg); color: var(--stat-bg); }
.icon-swatch.active { border-color: var(--stat-bg); background: var(--stat-bg); color: #fff; }

/* ═══════════════════════════════════════════════════════════════════
   BUDGET TAB
   ═══════════════════════════════════════════════════════════════════ */
.budget-hero       { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 20px; text-align: center; margin-bottom: 14px; box-shadow: var(--shadow); }
.budget-hero-label { font-size: 16px; font-weight: 800; color: var(--txt); margin-bottom: 4px; }
.budget-hero-sub   { font-size: 13px; color: var(--txt3); margin-bottom: 14px; }
.budget-inp-row    { display: flex; align-items: center; justify-content: center; gap: 6px; background: var(--surf2); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 8px 14px; max-width: 260px; margin: 0 auto; transition: border-color .15s; }
.budget-inp-row:focus-within { border-color: var(--stat-bg); }
.budget-peso       { font-size: 18px; font-weight: 800; color: var(--txt2); }
.budget-income-inp { flex: 1; border: none; background: transparent; font-size: 22px; font-weight: 800; color: var(--txt); font-family: inherit; outline: none; text-align: center; -webkit-appearance: none; appearance: none; }
.budget-income-inp::placeholder { color: var(--txt3); }
.budget-donut-wrap { display: flex; align-items: center; gap: 20px; background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 16px 18px; margin-bottom: 14px; box-shadow: var(--shadow); }
.budget-donut      { width: 120px; height: 120px; flex-shrink: 0; }
.budget-legend     { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.budget-legend-item{ display: flex; align-items: center; gap: 7px; }
.budget-legend-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.budget-legend-name{ font-size: 13px; color: var(--txt2); font-weight: 600; flex: 1; }
.budget-legend-pct { font-size: 12px; font-weight: 700; color: var(--txt); }
.budget-warning    { background: var(--red-bg); border: 1px solid var(--red-bdr); color: var(--red); border-radius: 9px; padding: 10px 13px; font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.budget-card       { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); padding: 13px 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 9px; box-shadow: var(--shadow); border-left: 3px solid var(--bcolor); }
.budget-card-left  { display: flex; align-items: center; gap: 11px; flex: 1; min-width: 0; }
.budget-card-dot   { width: 12px; height: 12px; border-radius: 4px; flex-shrink: 0; }
.budget-card-name  { font-size: 14px; font-weight: 700; color: var(--txt); cursor: pointer; }
.budget-card-name:hover { text-decoration: underline; }
.budget-card-desc  { font-size: 12px; color: var(--txt3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 200px; }
.budget-pct-badge  { font-size: 13px; font-weight: 800; padding: 3px 9px; border-radius: 99px; flex-shrink: 0; }
.budget-calc-amt   { font-size: 13px; font-weight: 700; color: var(--green); background: #ecfdf5; border-radius: 6px; padding: 3px 8px; flex-shrink: 0; }
[data-theme="dark"] .budget-calc-amt { background: #052e16; }
.btn-add-budget    { display: flex; align-items: center; justify-content: center; width: 100%; padding: 12px 0; border: 1.5px dashed var(--border); border-radius: var(--r); background: transparent; font-size: 14px; font-weight: 600; color: var(--txt2); cursor: pointer; font-family: inherit; transition: all .15s; margin-top: 4px; }
.btn-add-budget:hover { border-color: var(--stat-bg); color: var(--stat-bg); background: var(--surf2); }

/* ═══════════════════════════════════════════════════════════════════
   HISTORY TAB
   ═══════════════════════════════════════════════════════════════════ */
.hist-section { margin-bottom: 22px; }
.hist-row     { display: flex; align-items: center; gap: 12px; padding: 12px 15px; border-bottom: 1px solid var(--border); }
.hist-row:last-child { border-bottom: none; }
.hist-ico     { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; background: #ecfdf5; border: 1px solid #a7f3d0; color: #059669; }
.hist-info    { flex: 1; min-width: 0; }
.hist-note    { font-size: 14px; font-weight: 600; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hist-date    { font-size: 11px; color: var(--txt3); margin-top: 1px; }
.hist-right   { text-align: right; flex-shrink: 0; }
.hist-amt     { font-size: 14px; font-weight: 800; color: var(--green); letter-spacing: -.3px; }
.hist-tag     { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; background: #eff6ff; color: #1d4ed8; margin-top: 3px; }
.month-block   { background: var(--surf); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; }
.month-head    { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 13px 15px; gap: 12px; background: transparent; border: none; font-family: inherit; cursor: pointer; transition: background .12s; text-align: left; }
.month-head:hover { background: var(--surf2); }
.month-head-left { display: flex; align-items: center; gap: 11px; }
.month-ico     { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; background: var(--surf2); border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--txt2); }
.month-ico-cur { background: #eff6ff; border-color: #bfdbfe; color: var(--stat-bg); }
.month-name    { font-size: 14px; font-weight: 700; color: var(--txt); display: flex; align-items: center; flex-wrap: wrap; gap: 5px; }
.month-sub     { font-size: 11px; color: var(--txt3); margin-top: 1px; }
.month-head-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.month-total   { font-size: 14px; font-weight: 800; color: var(--txt); letter-spacing: -.3px; }
.month-chevron { color: var(--txt3); display: flex; align-items: center; transition: transform .22s ease; }
.month-chevron.open { transform: rotate(180deg); }
.month-detail  { border-top: 1px solid var(--border); }
.month-loading { display: flex; align-items: center; justify-content: center; padding: 24px; color: var(--txt3); }
.month-empty   { padding: 18px 15px; font-size: 13px; color: var(--txt3); text-align: center; }
.month-day-group { border-bottom: 1px solid var(--border); }
.month-day-group:last-child { border-bottom: none; }
.month-day-head  { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px 4px; background: var(--surf2); }
.month-day-name  { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--txt3); }
.month-day-total { font-size: 12px; font-weight: 700; color: var(--txt2); }

/* ═══════════════════════════════════════════════════════════════════
   AI PANEL
   ═══════════════════════════════════════════════════════════════════ */
.ai-panel { background: linear-gradient(135deg, var(--card-bg) 0%, var(--stat-bg) 100%); border-radius: var(--r); padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 4px 16px rgba(37,99,235,.2); }
.ai-panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.ai-panel-label { display: flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .7px; color: rgba(255,255,255,.8); }
.ai-refresh { width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,.15); color: rgba(255,255,255,.8); display: flex; align-items: center; justify-content: center; transition: background .15s; cursor: pointer; }
.ai-refresh:hover { background: rgba(255,255,255,.25); }
.ai-loading { display: flex; align-items: center; min-height: 36px; }
.ai-insight { font-size: 13px; font-weight: 500; color: rgba(255,255,255,.92); line-height: 1.55; padding: 5px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.ai-insight:last-child { border-bottom: none; padding-bottom: 0; }
.ai-empty { font-size: 13px; color: rgba(255,255,255,.65); font-style: italic; }

/* ═══════════════════════════════════════════════════════════════════
   WHAT'S NEW SLIDESHOW
   ═══════════════════════════════════════════════════════════════════ */
.wn-backdrop { display: none; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: 900; background: rgba(0,0,0,.6); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); align-items: center; justify-content: center; padding: 20px 16px; transition: opacity .28s ease; }
.wn-card     { background: var(--surf); width: 100%; max-width: 400px; border-radius: 22px; overflow: hidden; box-shadow: 0 24px 60px rgba(0,0,0,.3); animation: wnCardIn .32s cubic-bezier(.34,1.56,.64,1); }
.wn-topbar   { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 0; }
.wn-version-badge { font-size: 10px; font-weight: 800; letter-spacing: 1px; color: var(--stat-bg); background: var(--surf2); border: 1.5px solid var(--border); padding: 3px 10px; border-radius: 99px; }
.wn-skip     { font-size: 13px; font-weight: 600; color: var(--txt3); background: transparent; border: none; padding: 4px 8px; border-radius: 6px; transition: color .15s, background .15s; font-family: inherit; }
.wn-skip:hover { color: var(--txt); background: var(--surf2); }
.wn-viewport { overflow: hidden; }
.wn-track    { display: flex; transition: transform .38s cubic-bezier(.4,0,.2,1); will-change: transform; }
.wn-slide    { min-width: 100%; padding: 28px 28px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; }
.wn-slide-icon { width: 72px; height: 72px; border-radius: 20px; display: flex; align-items: center; justify-content: center; margin-bottom: 20px; flex-shrink: 0; }
.wn-icon-blue   { background: #eff6ff; color: #2563eb; }
.wn-icon-green  { background: #f0fdf4; color: #16a34a; }
.wn-icon-purple { background: #faf5ff; color: #7c3aed; }
.wn-icon-amber  { background: #fffbeb; color: #d97706; }
.wn-icon-red    { background: #fef2f2; color: #ef4444; }
.wn-icon-accent { background: #ecfdf5; color: #059669; }
.wn-slide-title { font-size: 20px; font-weight: 800; color: var(--txt); letter-spacing: -.4px; margin-bottom: 10px; }
.wn-slide-desc  { font-size: 14px; color: var(--txt2); line-height: 1.6; margin-bottom: 16px; max-width: 300px; }
.wn-slide-tags  { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 26px; }
.wn-tag         { display: inline-flex; align-items: center; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 99px; background: var(--surf2); border: 1.5px solid var(--border); color: var(--txt2); }
.wn-tag-green   { background: #ecfdf5; border-color: #a7f3d0; color: #059669; }
.wn-dots  { display: flex; justify-content: center; gap: 6px; padding: 14px 0 10px; }
.wn-dot   { width: 7px; height: 7px; border-radius: 99px; background: var(--border); transition: width .25s ease, background .25s ease; flex-shrink: 0; }
.wn-dot.active { width: 22px; background: var(--stat-bg); }
.wn-nav   { display: flex; justify-content: space-between; align-items: center; padding: 8px 18px 20px; gap: 10px; }
.wn-btn-prev { display: flex; align-items: center; gap: 5px; font-size: 13px; font-weight: 600; color: var(--txt2); background: var(--surf2); border: 1.5px solid var(--border); border-radius: 10px; padding: 9px 16px; font-family: inherit; transition: background .15s; min-width: 90px; justify-content: center; }
.wn-btn-next { display: flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 700; color: #fff; background: var(--stat-bg); border: none; border-radius: 10px; padding: 10px 20px; font-family: inherit; transition: filter .15s; min-width: 100px; justify-content: center; flex: 1; }
.wn-btn-next:hover { filter: brightness(1.08); }
.wn-btn-done      { background: var(--green); }

@media (max-width: 360px) {
  .dash-nw-amount { font-size: 30px; }
  .scb-value      { font-size: 18px; }
  .budget-donut-wrap { flex-direction: column; }
}

/* ── Password field with inline eye toggle ─────────────────────────────────── */
.pw-field {
  position: relative;
}
.pw-field .inp {
  padding-right: 46px;
}
.pw-eye {
  position: absolute;
  right: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--txt3);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  transition: color .15s;
  cursor: pointer;
}
.pw-eye:hover { color: var(--txt); }

/* ── Input with leading icon ───────────────────────────────────────────────── */
.inp-icon-wrap {
  position: relative;
}
.inp-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt3);
  display: flex;
  align-items: center;
  pointer-events: none;
}
.inp-has-icon {
  padding-left: 38px;
}

/* ── View toggle (Daily / Weekly) ─────────────────────────────────────────── */
.view-toggle {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 4px;
  box-shadow: var(--shadow);
}
.vt-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 7px 10px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--txt2);
  background: transparent;
  border: none;
  cursor: pointer;
  font-family: inherit;
  transition: all .18s;
}
.vt-btn:hover { background: var(--surf2); }
.vt-btn.active {
  background: var(--stat-bg);
  color: #fff;
  box-shadow: 0 2px 8px rgba(61,109,224,.3);
}

/* ── Week group (weekly view) ──────────────────────────────────────────────── */
.week-group {
  margin-bottom: 14px;
  background: var(--surf);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.week-group-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--surf2);
  border-bottom: 1px solid var(--border);
}
.week-group-lbl   { font-size: 12px; font-weight: 700; color: var(--txt2); }
.week-group-total { font-size: 14px; font-weight: 800; color: var(--txt); letter-spacing: -.3px; }

/* ── Lock icon inside password field ──────────────────────────────────────── */
.pw-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--txt3);
  display: flex;
  align-items: center;
  pointer-events: none;
}
/* Input with BOTH left icon AND right eye button */
.inp-has-eye {
  padding-right: 46px;
}

/* ── Portfolio Coming Soon nav item ────────────────────────────────────────── */
.bn-coming-soon {
  opacity: .45;
  cursor: not-allowed;
  position: relative;
}
.bn-coming-soon:active { opacity: .45; }
.bn-soon-badge {
  position: absolute;
  top: 4px;
  right: 50%;
  transform: translateX(14px);
  font-size: 8px;
  font-weight: 800;
  background: #f59e0b;
  color: #fff;
  padding: 1px 5px;
  border-radius: 99px;
  letter-spacing: .3px;
  text-transform: uppercase;
  line-height: 1.4;
}

/* ── Stat card percentage badge ────────────────────────────────────────────── */
.scb-pct {
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
  opacity: .85;
}
.scb-pct.up   { color: #ffb3bb; }
.scb-pct.down { color: #a3f0d4; }

/* ── Mini card percentage sub-line ─────────────────────────────────────────── */
.mini-pct {
  font-size: 11px;
  font-weight: 700;
  margin-top: 2px;
}

/* ── FAB (floating action button, separate from nav) ────────────────────────── */
.fab-btn {
  position: fixed;
  right: calc(50% - 226px);
  bottom: calc(var(--nav-h) + 14px + env(safe-area-inset-bottom));
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--stat-bg);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 18px rgba(61,109,224,.4);
  border: none;
  cursor: pointer;
  z-index: 90;
  transition: filter .15s, transform .15s;
}
.fab-btn:hover  { filter: brightness(1.1); transform: scale(1.06); }
.fab-btn:active { transform: scale(.94); }
@media (max-width: 480px) {
  .fab-btn { right: 16px; }
}

/* ═══════════════════════════════════════════════════════════════════
   WALLET TAB — Reference design (accounts grid + debts)
   ═══════════════════════════════════════════════════════════════════ */

/* Accounts / Debts pill switcher */
.wallet-tab-switch {
  display: flex;
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: 99px;
  padding: 3px;
  margin: 12px 0 16px;
  box-shadow: var(--shadow);
}
.wts-btn {
  flex: 1; padding: 9px 0;
  border-radius: 99px;
  font-size: 14px; font-weight: 700;
  font-family: inherit; border: none; cursor: pointer;
  color: var(--txt2); background: transparent;
  transition: all .2s;
}
.wts-btn.active {
  background: var(--stat-bg);
  color: #fff;
  box-shadow: 0 2px 10px rgba(61,109,224,.35);
}

/* Cash section header */
.cash-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.cash-section-lbl { font-size: 14px; font-weight: 700; color: var(--txt); }
.cash-section-tag { font-size: 12px; color: var(--txt3); font-weight: 500; }

/* Cash main wallet card */
.cash-card {
  background: var(--surf);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px 18px 14px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.cash-card-bal {
  font-size: 28px; font-weight: 800;
  color: var(--txt); letter-spacing: -1px;
}
.cash-card-btns { display: flex; gap: 8px; }
.cash-card-btn {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--stat-bg); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer;
  transition: filter .15s;
}
.cash-card-btn:hover { filter: brightness(1.1); }

/* Account section sub-header */
.acct-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; margin-top: 4px;
}
.acct-section-lbl { font-size: 14px; font-weight: 700; color: var(--txt); }

/* Account grid — 2 columns */
.acct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.acct-card {
  border-radius: 16px;
  padding: 14px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  position: relative;
  min-height: 100px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.acct-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
.acct-card-ico {
  width: 28px; height: 28px;
  background: rgba(255,255,255,.25);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.acct-card-name {
  font-size: 13px; font-weight: 700;
  color: #fff; opacity: .92;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acct-card-bal {
  font-size: 18px; font-weight: 800;
  letter-spacing: -.5px;
}
.acct-card-btns {
  display: flex; gap: 5px; margin-top: 8px;
}
.acct-card-btn {
  width: 26px; height: 26px; border-radius: 7px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.25);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.acct-card-btn:hover { background: rgba(255,255,255,.35); }
.acct-del-btn:hover  { background: rgba(239,68,68,.4); border-color: rgba(239,68,68,.5); }

/* Debt rows */
.debt-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 14px 15px;
  margin-bottom: 9px; box-shadow: var(--shadow);
}
.debt-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: #fff3cd; border: 1px solid #fde68a; color: #d97706;
  display: flex; align-items: center; justify-content: center;
}
.debt-info  { flex: 1; min-width: 0; }
.debt-name  { font-size: 14px; font-weight: 700; color: var(--txt); }
.debt-note  { font-size: 12px; color: var(--txt3); margin-top: 2px; }
.debt-right { text-align: right; flex-shrink: 0; }
.debt-amt   { font-size: 14px; font-weight: 800; color: var(--red); }
.debt-date  { font-size: 11px; color: var(--txt3); margin-top: 2px; }
.debt-btns  { display: flex; gap: 3px; justify-content: flex-end; margin-top: 5px; }

/* ── Improved nav animation ─────────────────────────────────────────────────── */
.bn-indicator {
  transition: left .4s cubic-bezier(.68,-0.55,.27,1.55) !important;
}
.bn-icon-wrap {
  transition: transform .4s cubic-bezier(.34,1.56,.64,1), color .2s !important;
}

/* ── Debt rows (enhanced) ───────────────────────────────────────────────────── */
.debt-settled {
  opacity: .55;
}
.debt-settled-badge {
  display: inline-flex; align-items: center;
  font-size: 10px; font-weight: 700; padding: 2px 7px;
  border-radius: 99px; background: var(--green); color: #fff;
  margin-left: 7px; letter-spacing: .3px; text-transform: uppercase;
}
.debt-progress-wrap {
  display: flex; align-items: center; gap: 7px; margin-top: 6px;
}
.debt-progress-bar {
  flex: 1; height: 4px; background: var(--border);
  border-radius: 99px; overflow: hidden;
}
.debt-progress-fill {
  height: 100%; background: var(--green);
  border-radius: 99px; transition: width .4s ease;
}
.debt-progress-lbl { font-size: 10px; color: var(--txt3); font-weight: 600; flex-shrink: 0; }

/* Settle button */
.debt-settle-btn {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700; padding: 4px 9px;
  border-radius: 99px; background: var(--green); color: #fff;
  border: none; cursor: pointer; font-family: inherit;
  transition: filter .15s;
}
.debt-settle-btn:hover { filter: brightness(1.1); }

/* ═══════════════════════════════════════════════════════════════════
   WALLET PAGE — Full-page design matching reference image
   ═══════════════════════════════════════════════════════════════════ */

/* Wallet page root — fills the content area, no extra top padding */
.wallet-page {
  margin: -14px -14px 0;  /* bleed to edges, undo app-content padding */
  min-height: 100%;
}

/* ── Wallet page header ────────────────────────────────────────────────────── */
.wallet-page-header {
  background: var(--hdr-top);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 18px 0;
}
.wallet-page-title {
  font-size: 16px;
  font-weight: 800;
  color: rgba(255,255,255,.85);
  letter-spacing: 1px;
  text-transform: uppercase;
}
.wallet-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.wallet-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.9);
  color: var(--stat-bg);
  font-size: 14px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.wallet-page-icon-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.18); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; transition: background .15s;
}
.wallet-page-icon-btn:hover { background: rgba(255,255,255,.28); }

/* ── Wallet hero card ──────────────────────────────────────────────────────── */
.wlt-hero {
  /* Same blue gradient background as the home header */
  background: linear-gradient(175deg, var(--hdr-top) 0%, var(--hdr-bot) 100%);
  padding: 4px 14px 14px;
}
/* Dark blue rounded card — mirrors dash-wallet-card exactly */
.wlt-hero-card {
  background: linear-gradient(145deg, var(--card-bg) 0%, var(--card-bg2) 100%);
  border-radius: 22px;
  padding: 18px 20px 20px;
  box-shadow: 0 8px 28px rgba(16,36,90,.35);
  position: relative;
  overflow: hidden;
}
.wlt-hero-card::before {
  content: '';
  position: absolute; top: -40px; right: -30px;
  width: 140px; height: 140px; border-radius: 50%;
  background: rgba(255,255,255,.06);
  pointer-events: none;
}
.wlt-hero-label {
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; color: rgba(255,255,255,.72);
  font-weight: 600; margin-bottom: 4px;
}
.wlt-hero-amount {
  font-size: 38px; font-weight: 800; color: #fff;
  letter-spacing: -1.5px; margin-bottom: 20px;
  line-height: 1.05; position: relative; z-index: 1;
}

/* Wallet action buttons (same style as dash-actions but inside wlt-hero) */
.wlt-actions {
  display: flex; justify-content: space-between; position: relative; z-index: 1;
}
.wlt-action-btn {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 6px;
  background: transparent; color: rgba(255,255,255,.9);
  font-family: inherit; font-size: 11px; font-weight: 600;
  letter-spacing: .1px; padding: 0; border: none; cursor: pointer;
  transition: opacity .15s;
}
.wlt-action-btn:active { opacity: .6; }
.wlt-action-ico {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
.wlt-action-btn:hover .wlt-action-ico { background: rgba(255,255,255,.28); }

/* ── Account cards — 2-column grid with brand initial ──────────────────────── */
.acct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 18px;
}
.acct-card {
  border-radius: 16px;
  padding: 13px 13px 10px;
  color: #fff;
  box-shadow: 0 4px 14px rgba(0,0,0,.18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 110px;
}
.acct-card-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
}
/* Brand initial circle (letter logo) */
.acct-card-logo {
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(255,255,255,.28);
  font-size: 13px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.acct-card-name {
  font-size: 12px; font-weight: 700;
  color: rgba(255,255,255,.92);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acct-card-bal {
  font-size: 17px; font-weight: 800;
  letter-spacing: -.4px;
  margin-bottom: 6px;
}
.acct-card-btns {
  display: flex; gap: 5px;
}
.acct-card-btn {
  width: 24px; height: 24px; border-radius: 6px;
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.2);
  color: rgba(255,255,255,.9);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: background .15s;
}
.acct-card-btn:hover { background: rgba(255,255,255,.35); }
.acct-del-btn:hover  { background: rgba(239,68,68,.4); border-color: rgba(239,68,68,.5); }

/* ── Debt rows — reference style ───────────────────────────────────────────── */
.debt-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 13px 14px;
  margin-bottom: 9px; box-shadow: var(--shadow);
}
.debt-row.debt-settled { opacity: .5; }
.debt-ico {
  width: 38px; height: 38px; border-radius: 10px; flex-shrink: 0;
  background: #fff3cd; border: 1px solid #fde68a; color: #d97706;
  display: flex; align-items: center; justify-content: center;
}
.debt-info   { flex: 1; min-width: 0; }
.debt-name   { font-size: 14px; font-weight: 700; color: var(--txt); margin-bottom: 2px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.debt-note   { font-size: 12px; color: var(--txt3); }
.debt-due-date { font-size: 11px; color: var(--red); font-weight: 600; margin-left: 4px; }
.debt-right  { text-align: right; flex-shrink: 0; min-width: 90px; }
.debt-meta-row { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-bottom: 3px; }
.debt-amt    { font-size: 14px; font-weight: 800; color: var(--txt); }
.debt-date-row { font-size: 11px; color: var(--txt3); text-align: right; }
.debt-btns   { display: flex; gap: 3px; align-items: center; }
.debt-settled-badge { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 99px; background: var(--green); color: #fff; }
.debt-progress-wrap  { display: flex; align-items: center; gap: 7px; margin-top: 5px; }
.debt-progress-bar   { flex: 1; height: 4px; background: var(--border); border-radius: 99px; overflow: hidden; }
.debt-progress-fill  { height: 100%; background: var(--green); border-radius: 99px; }
.debt-progress-lbl   { font-size: 10px; color: var(--txt3); font-weight: 600; flex-shrink: 0; }
.debt-settle-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px;
  border-radius: 50%; background: var(--green); color: #fff;
  border: none; cursor: pointer;
  transition: filter .15s;
}
.debt-settle-btn:hover { filter: brightness(1.1); }

/* Wallet content area — white bg below hero, curved top */
.wallet-content-area {
  background: var(--page-bg);
  padding: 14px 14px calc(var(--nav-h) + 24px);
  border-radius: 20px 20px 0 0;
  margin-top: -12px;
  position: relative;
  z-index: 2;
}

/* Section headers inside wallet content */
.acct-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; margin-top: 4px;
}
.acct-section-lbl { font-size: 14px; font-weight: 700; color: var(--txt); }
.cash-section-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
}
.cash-section-lbl { font-size: 14px; font-weight: 700; color: var(--txt); }
.cash-section-tag { font-size: 12px; color: var(--txt3); font-weight: 500; }
.cash-card {
  background: var(--surf); border: 1px solid var(--border);
  border-radius: var(--r); padding: 16px 18px;
  box-shadow: var(--shadow); margin-bottom: 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.cash-card-bal { font-size: 26px; font-weight: 800; color: var(--txt); letter-spacing: -.8px; }
.cash-card-btns { display: flex; gap: 8px; }
.cash-card-btn {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--stat-bg); color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: none; cursor: pointer; transition: filter .15s;
}
.cash-card-btn:hover { filter: brightness(1.1); }
