/* =============================================================
 *  Advance Bank Dashboard — Front-end Styles v2.0
 *  All rules scoped to .abd-wrap for theme isolation.
 * ============================================================= */

/* ---------- Theme Isolation ---------------------------------- */
.abd-wrap, .abd-wrap * { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
.abd-wrap {
  position: relative;
  display: block;
  width: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
  isolation: isolate;
}
.abd-wrap::before {
  content: '';
  position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(1200px 700px at -5% -10%, rgba(124,92,255,.12), transparent 60%),
    radial-gradient(900px 600px at 105% -5%, rgba(0,229,168,.08), transparent 55%),
    radial-gradient(900px 900px at 50% 120%, rgba(255,107,125,.06), transparent 60%);
}
body.light .abd-wrap::before {
  background:
    radial-gradient(1200px 700px at -5% -10%, rgba(124,92,255,.14), transparent 60%),
    radial-gradient(900px 600px at 105% -5%, rgba(0,229,168,.12), transparent 55%);
}
.abd-wrap a, .abd-wrap a:hover, .abd-wrap a:focus, .abd-wrap a:visited { text-decoration: none; box-shadow: none; outline: none; border: none; }
.abd-wrap button, .abd-wrap input, .abd-wrap select, .abd-wrap textarea { font-family: inherit; }
.abd-wrap button { border: 0; background: none; padding: 0; margin: 0; line-height: inherit; color: inherit; cursor: pointer; }
.abd-wrap input, .abd-wrap select, .abd-wrap textarea { max-width: 100%; }
.abd-wrap ul, .abd-wrap ol { list-style: none; margin: 0; padding: 0; }
.abd-wrap h1, .abd-wrap h2, .abd-wrap h3, .abd-wrap h4, .abd-wrap h5, .abd-wrap h6 { margin: 0; padding: 0; font-weight: 700; line-height: 1.2; color: inherit; }
.abd-wrap p { margin: 0; padding: 0; }
.abd-wrap table { border-collapse: collapse; border-spacing: 0; }
.abd-wrap svg { display: inline-block; max-width: none; height: auto; vertical-align: middle; }
.abd-wrap ::selection { background: rgba(124,92,255,.35); color: var(--text); }
.abd-wrap ::-webkit-scrollbar { width: 8px; height: 8px; }
.abd-wrap ::-webkit-scrollbar-track { background: transparent; }
.abd-wrap ::-webkit-scrollbar-thumb { background: rgba(140,150,175,.25); border-radius: 8px; }
.abd-wrap ::-webkit-scrollbar-thumb:hover { background: rgba(140,150,175,.45); }

/* ---------- Design Tokens ------------------------------------ */
:root {
  --bg:#0a0b10; --bg-2:#0f1118;
  --surface:#14161f; --surface-2:#1a1d28; --surface-3:#222633;
  --border:rgba(255,255,255,.06); --border-2:rgba(255,255,255,.1); --border-3:rgba(255,255,255,.16);
  --text:#f5f7fa; --text-2:#a8afbe; --text-3:#6d7489;
  --accent:#7c5cff; --accent-2:#a78bfa; --mint:#00e5a8; --mint-2:#5cf0c5;
  --coral:#ff6b7d; --amber:#ffb547; --sky:#38bdf8;
  --radius:20px; --radius-sm:14px; --radius-xs:10px;
  --shadow-sm:0 2px 8px rgba(0,0,0,.3);
  --shadow:0 20px 40px -20px rgba(0,0,0,.6);
  --shadow-lg:0 40px 80px -30px rgba(0,0,0,.8);
  --sidebar-w:260px; --nav-h:70px; --mob-nav-h:68px;
  --grad-accent:linear-gradient(135deg,#7c5cff 0%,#a78bfa 100%);
  --grad-mint:linear-gradient(135deg,#00e5a8 0%,#5cf0c5 100%);
  --grad-coral:linear-gradient(135deg,#ff6b7d 0%,#ff9ba8 100%);
  --grad-sky:linear-gradient(135deg,#38bdf8 0%,#7dd3fc 100%);
  --grad-amber:linear-gradient(135deg,#ffb547 0%,#ffd08a 100%);
  --grad-warm:linear-gradient(135deg,#ff9a52 0%,#ff7a3d 45%,#ff5a2d 100%);
  --grad-card-1:linear-gradient(135deg,#1a1d3a 0%,#2d2350 45%,#4a2d6b 100%);
  --grad-card-2:linear-gradient(135deg,#0a2540 0%,#0f4c5c 60%,#1a6b6b 100%);
  --grad-card-3:linear-gradient(135deg,#2b1a3d 0%,#4a1f5c 55%,#6b2d7d 100%);
}
body.light {
  --bg:#f3f5fa; --bg-2:#eef1f8;
  --surface:#ffffff; --surface-2:#f8f9fd; --surface-3:#eef1f8;
  --border:rgba(15,25,60,.07); --border-2:rgba(15,25,60,.12); --border-3:rgba(15,25,60,.2);
  --text:#0d1225; --text-2:#5a637a; --text-3:#8e97ad;
  --shadow-sm:0 2px 8px rgba(20,30,60,.06);
  --shadow:0 20px 40px -20px rgba(20,30,60,.18);
  --shadow-lg:0 40px 80px -30px rgba(20,30,60,.25);
  --grad-card-1:linear-gradient(135deg,#5b4ef0 0%,#7c5cff 45%,#a78bfa 100%);
  --grad-card-2:linear-gradient(135deg,#0a6e6e 0%,#0ea5a5 60%,#5cf0c5 100%);
  --grad-card-3:linear-gradient(135deg,#8b3d9e 0%,#b04fc7 55%,#e879f9 100%);
}

.mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-variant-numeric: tabular-nums; }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- App Shell --------------------------------------- */
.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }

/* SIDEBAR */
.sidebar {
  width: var(--sidebar-w); flex-shrink: 0; padding: 22px 14px;
  border-right: 1px solid var(--border); display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; overflow-x: hidden;
  background: var(--surface); z-index: 100; scrollbar-width: thin;
  transition: background .3s ease, transform .35s cubic-bezier(.22,.85,.25,1);
}
body:not(.light) .sidebar { background: rgba(20,22,31,.7); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); }
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 10px 20px; flex-shrink: 0; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; background: var(--grad-accent);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px;
  box-shadow: 0 10px 24px -8px rgba(124,92,255,.8); flex-shrink: 0; position: relative; overflow: hidden;
}
.brand-mark::after { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.4), transparent 60%); }
.brand-name { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
.brand-name span { color: var(--accent-2); }
.drawer-close {
  display: none; position: absolute; top: 20px; right: 14px;
  width: 36px; height: 36px; border-radius: 10px;
  border: 1px solid var(--border); background: rgba(140,150,175,.08); color: var(--text-2);
  cursor: pointer; place-items: center; transition: .2s;
}
.drawer-close:hover { color: var(--text); background: rgba(140,150,175,.16); }
.drawer-close svg { width: 16px; height: 16px; stroke-width: 2; }

.nav { display: flex; flex-direction: column; gap: 2px; flex-shrink: 0; }
.nav-label { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .12em; color: var(--text-3); padding: 14px 12px 6px; }
.nav-item {
  display: flex; align-items: center; gap: 13px; padding: 10px 12px; border-radius: 12px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px; cursor: pointer;
  position: relative; transition: color .18s, background .18s;
  border: none; background: none; font-family: inherit; width: 100%; text-align: left; white-space: nowrap;
}
.nav-item svg { width: 19px; height: 19px; flex-shrink: 0; stroke-width: 1.75; }
.nav-item:hover { color: var(--text); background: rgba(140,150,175,.08); }
.nav-item.active { color: var(--text); background: linear-gradient(90deg, rgba(124,92,255,.18), rgba(124,92,255,.02)); }
body.light .nav-item.active { color: var(--accent); }
.nav-item.active::before {
  content: ''; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 4px 4px 0;
  background: var(--grad-accent); box-shadow: 0 0 16px rgba(124,92,255,.9);
}
.nav-item .badge { margin-left: auto; font-size: 10px; font-weight: 700; background: rgba(124,92,255,.22); color: #c4b5fd; padding: 2px 8px; border-radius: 20px; }
.nav-item .badge.red { background: rgba(255,107,125,.2); color: #ff9ba8; }
.nav-item .badge.mint { background: rgba(0,229,168,.2); color: #5cf0c5; }
.nav-item .caret { margin-left: auto; width: 14px; height: 14px; transition: transform .22s; }
.nav-item.open .caret { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 1px; padding: 2px 0 4px 12px; margin-left: 14px; border-left: 2px solid var(--border-2); }
.nav-sub.open { display: flex; }
.nav-sub .nav-item { font-size: 13px; padding: 8px 12px; }

.sidebar-foot { margin-top: auto; padding-top: 18px; flex-shrink: 0; }
.help-card {
  border-radius: 16px; padding: 16px;
  background: linear-gradient(145deg, rgba(124,92,255,.18), rgba(167,139,250,.06));
  border: 1px solid rgba(124,92,255,.24); position: relative; overflow: hidden;
}
.help-card::after {
  content: ''; position: absolute; width: 130px; height: 130px; border-radius: 50%;
  background: radial-gradient(circle, rgba(167,139,250,.4), transparent 70%); top: -50px; right: -40px;
}
.help-card h4 { font-size: 13.5px; font-weight: 700; margin-bottom: 5px; position: relative; }
.help-card p { font-size: 11.5px; color: var(--text-2); line-height: 1.5; margin-bottom: 12px; position: relative; }
.help-card button {
  width: 100%; padding: 9px; border-radius: 10px; border: none; cursor: pointer;
  background: #fff; color: #0b0c10; font-weight: 700; font-size: 12px; transition: .2s; position: relative;
}
.help-card button:hover { transform: translateY(-1px); }

/* MAIN */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 28px;
  border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50;
  background: var(--surface); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  transition: background .3s;
}
body:not(.light) .topbar { background: rgba(10,11,16,.78); }
.menu-btn { display: none; }
.search {
  display: flex; align-items: center; gap: 10px; background: rgba(140,150,175,.08);
  border: 1px solid var(--border); border-radius: 12px; padding: 0 14px; height: 42px;
  flex: 1; max-width: 420px; min-width: 0; position: relative; transition: .2s;
}
.search:focus-within { border-color: rgba(124,92,255,.5); background: rgba(124,92,255,.06); }
.search svg { width: 17px; height: 17px; color: var(--text-3); flex-shrink: 0; stroke-width: 2; }
.search input { background: none; border: none; outline: none; color: var(--text); font-size: 14px; width: 100%; min-width: 0; }
.search input::placeholder { color: var(--text-3); }
.search kbd { font-size: 10.5px; color: var(--text-3); border: 1px solid var(--border-2); border-radius: 6px; padding: 2px 6px; font-weight: 600; flex-shrink: 0; }

.search-results { position: absolute; top: calc(100% + 8px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--border-2); border-radius: 14px; box-shadow: var(--shadow-lg); overflow: hidden; z-index: 300; max-height: 340px; overflow-y: auto; }
.search-result { display: flex; align-items: center; gap: 12px; padding: 12px 16px; cursor: pointer; transition: background .15s; border: none; background: none; width: 100%; text-align: left; font-family: inherit; color: var(--text); }
.search-result:hover { background: rgba(140,150,175,.1); }
.search-result .sr-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; font-weight: 700; font-size: 15px; }
.search-result .sr-info { flex: 1; min-width: 0; }
.search-result .sr-name { font-size: 13px; font-weight: 600; }
.search-result .sr-sub { font-size: 11px; color: var(--text-3); }
.search-result .sr-amt { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.icon-btn { width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border); background: rgba(140,150,175,.06); color: var(--text-2); cursor: pointer; display: grid; place-items: center; transition: .2s; position: relative; flex-shrink: 0; }
.icon-btn svg { width: 18px; height: 18px; stroke-width: 1.8; }
.icon-btn:hover { color: var(--text); background: rgba(140,150,175,.14); border-color: var(--border-2); }
.icon-btn .dot { position: absolute; top: 10px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--coral); box-shadow: 0 0 0 2.5px var(--surface), 0 0 12px var(--coral); }
.user-chip { display: flex; align-items: center; gap: 11px; padding: 5px 14px 5px 5px; border-radius: 14px; border: 1px solid var(--border); background: rgba(140,150,175,.06); cursor: pointer; transition: .2s; flex-shrink: 0; }
.user-chip:hover { background: rgba(140,150,175,.14); border-color: var(--border-2); }
.avatar { width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, #7c5cff, #00e5a8); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: #fff; flex-shrink: 0; }
.user-meta { line-height: 1.25; min-width: 0; }
.user-name { font-size: 13px; font-weight: 600; white-space: nowrap; }
.user-role { font-size: 11px; color: var(--text-3); white-space: nowrap; }

.content { padding: 24px 28px 80px; max-width: 1600px; width: 100%; margin: 0 auto; flex: 1; min-width: 0; }

/* ---------- Pages ------------------------------------------- */
.page { display: none !important; }
.page.active { display: block !important; animation: pageIn .4s cubic-bezier(.22,.85,.25,1); }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.04em; line-height: 1.2; }
.page-head p { font-size: 13.5px; color: var(--text-2); margin-top: 4px; }
.page-head .ph-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------- Cards ------------------------------------------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); position: relative; min-width: 0; animation: fadeUp .55s cubic-bezier(.22,.85,.25,1) backwards; transition: background .3s, border-color .3s; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 20px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: start; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ---------- Dashboard Hero Row ------------------------------ */
.dashboard-hero-row { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(280px, 300px); gap: 20px; align-items: stretch; margin-bottom: 20px; }
.dashboard-hero-row .hero { height: 100%; display: flex; flex-direction: column; }
.dashboard-hero-row .hero-accounts { margin-top: auto; }
.spending-mini-card { padding: 20px; display: flex; flex-direction: column; min-width: 0; }
.spending-mini-card .chart-wrap { flex: 1; min-height: 180px; margin: 0; padding: 0; }
.spending-mini-card .chart-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 10px; flex-wrap: wrap; }
.spending-mini-card .chart-head h2 { font-size: 15px; font-weight: 700; }
.platinum-slot { display: flex; min-width: 0; }

/* ---------- Stat Cards -------------------------------------- */
.stat-card { padding: 20px 22px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); position: relative; overflow: hidden; min-width: 0; animation: fadeUp .55s cubic-bezier(.22,.85,.25,1) backwards; transition: transform .25s, border-color .2s; }
.stat-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.stat-card .sc-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.stat-card .sc-label { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.stat-card .sc-icon { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; flex-shrink: 0; }
.stat-card .sc-icon svg { width: 17px; height: 17px; stroke-width: 2; }
.stat-card .sc-value { font-size: 24px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .sc-sub { font-size: 12px; color: var(--text-2); margin-top: 8px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.stat-card .sc-delta { font-size: 11.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; padding: 2px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.sc-delta.up { color: var(--mint); background: rgba(0,229,168,.1); }
.sc-delta.down { color: var(--coral); background: rgba(255,107,125,.1); }
.stat-spark { display: flex; align-items: center; gap: 8px; }
.stat-spark .spark { width: 64px; height: 26px; flex: 0 0 64px; }

/* ---------- Hero -------------------------------------------- */
.hero { padding: 26px 28px; border-radius: var(--radius); position: relative; overflow: hidden; background: var(--grad-card-1); color: #fff; animation: fadeUp .55s cubic-bezier(.22,.85,.25,1) backwards; border: 1px solid rgba(255,255,255,.08); }
.hero::before { content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 68%); top: -140px; right: -100px; pointer-events: none; }
.hero::after { content: ''; position: absolute; width: 260px; height: 260px; border-radius: 50%; background: radial-gradient(circle, rgba(0,229,168,.3), transparent 70%); bottom: -130px; left: -80px; pointer-events: none; }
.hero-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; position: relative; z-index: 2; flex-wrap: wrap; margin-bottom: 20px; }
.hero-label { font-size: 12px; font-weight: 600; opacity: .75; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.hero-label button { background: rgba(255,255,255,.14); border: none; color: #fff; width: 24px; height: 24px; border-radius: 7px; cursor: pointer; display: grid; place-items: center; transition: .2s; }
.hero-label button:hover { background: rgba(255,255,255,.24); }
.hero-label svg { width: 13px; height: 13px; stroke-width: 2.2; }
.hero-amount { font-size: 42px; font-weight: 800; letter-spacing: -.045em; line-height: 1.05; font-variant-numeric: tabular-nums; word-break: break-word; }
.hero-meta { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; align-items: center; }
.hero-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 5px 12px; border-radius: 9px; background: rgba(255,255,255,.16); backdrop-filter: blur(6px); font-variant-numeric: tabular-nums; }
.hero-pill svg { width: 12px; height: 12px; stroke-width: 2.6; }
.hero-pill.up { background: rgba(0,229,168,.22); }
.hero-accounts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; position: relative; z-index: 2; margin-top: 20px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); }
.hero-acc { min-width: 0; }
.hero-acc .ha-label { font-size: 11px; font-weight: 600; opacity: .72; margin-bottom: 4px; }
.hero-acc .ha-value { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Card Head --------------------------------------- */
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 16px; gap: 12px; flex-wrap: wrap; }
.card-head h2 { font-size: 15px; font-weight: 700; letter-spacing: -.02em; }
.card-head .sub { font-size: 12px; color: var(--text-3); font-weight: 500; margin-top: 3px; }
.ghost-btn { border: 1px solid var(--border); background: rgba(140,150,175,.06); color: var(--text-2); font-family: inherit; font-size: 12px; font-weight: 600; padding: 7px 14px; border-radius: 10px; cursor: pointer; transition: .2s; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; flex-shrink: 0; text-decoration: none; }
.ghost-btn:hover { color: var(--text); background: rgba(140,150,175,.14); border-color: var(--border-2); }
.ghost-btn svg { width: 14px; height: 14px; stroke-width: 2; }

/* ---------- Chart ------------------------------------------- */
.chart-wrap { position: relative; height: 260px; padding: 0 8px 8px; }
.chart-wrap svg { display: block; width: 100%; height: 100%; }
.chart-tip { position: absolute; pointer-events: none; background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 11px; padding: 9px 13px; font-size: 12.5px; font-weight: 700; white-space: nowrap; opacity: 0; transition: opacity .15s; transform: translate(-50%,-135%); box-shadow: var(--shadow-lg); z-index: 10; }
body:not(.light) .chart-tip { background: rgba(26,29,40,.98); }
.chart-tip .tip-date { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 500; margin-top: 2px; }
.range-tabs { display: flex; gap: 2px; padding: 3px; background: rgba(140,150,175,.1); border: 1px solid var(--border); border-radius: 11px; overflow-x: auto; scrollbar-width: none; flex-shrink: 0; }
.range-tabs::-webkit-scrollbar { display: none; }
.range-tabs button { border: none; background: none; cursor: pointer; font-size: 11.5px; font-weight: 600; color: var(--text-2); padding: 6px 11px; border-radius: 8px; transition: .18s; white-space: nowrap; flex-shrink: 0; }
.range-tabs button:hover { color: var(--text); }
.range-tabs button.active { background: var(--accent); color: #fff; box-shadow: 0 6px 16px -6px rgba(124,92,255,.9); }

/* ---------- Accounts Grid ----------------------------------- */
.accounts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.account-card { padding: 18px; border-radius: var(--radius); position: relative; overflow: hidden; color: #fff; cursor: pointer; min-height: 160px; display: flex; flex-direction: column; justify-content: space-between; transition: transform .28s, box-shadow .3s; border: 1px solid rgba(255,255,255,.08); animation: fadeUp .55s cubic-bezier(.22,.85,.25,1) backwards; }
.account-card:hover { transform: translateY(-4px); box-shadow: 0 30px 60px -20px rgba(0,0,0,.5); }
.account-card::before { content: ''; position: absolute; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 68%); top: -100px; right: -70px; pointer-events: none; }
.ac-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 2; gap: 12px; }
.ac-type { font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; opacity: .8; }
.ac-name { font-size: 13.5px; font-weight: 700; margin-top: 5px; }
.ac-icon { width: 34px; height: 34px; border-radius: 11px; background: rgba(255,255,255,.18); display: grid; place-items: center; backdrop-filter: blur(6px); flex-shrink: 0; }
.ac-icon svg { width: 17px; height: 17px; stroke-width: 2; }
.ac-bottom { position: relative; z-index: 2; }
.ac-balance { font-size: 22px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.ac-number { font-size: 11.5px; opacity: .72; margin-top: 6px; font-family: 'JetBrains Mono', monospace; letter-spacing: .04em; }
.ac-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 11px; opacity: .82; }

/* ---------- Transactions List ------------------------------- */
.tx-list { list-style: none; }
.tx { display: flex; align-items: center; gap: 12px; padding: 13px 20px; transition: background .16s; cursor: pointer; border-top: 1px solid var(--border); min-width: 0; }
.tx:first-child { border-top: none; }
.tx:hover { background: rgba(140,150,175,.06); }
.tx-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; background: rgba(140,150,175,.1); }
.tx-icon svg { width: 17px; height: 17px; stroke-width: 2; }
.tx-icon.income { background: rgba(0,229,168,.12); color: var(--mint); }
.tx-icon.expense { background: rgba(255,107,125,.12); color: var(--coral); }
.tx-icon.transfer { background: rgba(124,92,255,.14); color: var(--accent-2); }
.tx-icon.bill { background: rgba(255,181,71,.12); color: var(--amber); }
.tx-icon.card { background: rgba(56,189,248,.12); color: var(--sky); }
.tx-icon.invest { background: rgba(0,229,168,.12); color: var(--mint); }
.tx-icon.loan { background: rgba(124,92,255,.14); color: var(--accent-2); }
.tx-icon.reward { background: rgba(255,181,71,.12); color: var(--amber); }
.tx-body { min-width: 0; flex: 1; }
.tx-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; display: flex; gap: 6px; flex-wrap: wrap; }
.tx-cat { display: inline-flex; align-items: center; gap: 4px; padding: 1px 7px; border-radius: 6px; background: rgba(140,150,175,.1); font-weight: 500; }
.tx-amount { text-align: right; flex-shrink: 0; }
.tx-amount .amt { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount .amt.income { color: var(--mint); }
.tx-amount .bal { font-size: 11px; color: var(--text-3); margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Quick Actions ----------------------------------- */
.qa-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.quick-action { display: flex; flex-direction: column; align-items: center; gap: 9px; padding: 16px 8px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); cursor: pointer; color: var(--text-2); font-size: 12px; font-weight: 600; transition: .2s; min-width: 0; text-decoration: none; }
.quick-action:hover { transform: translateY(-4px); color: var(--text); border-color: rgba(124,92,255,.4); }
.quick-action .qa-icon { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; background: rgba(124,92,255,.13); border: 1px solid rgba(124,92,255,.2); color: var(--accent-2); flex-shrink: 0; transition: .22s; }
.quick-action:hover .qa-icon { background: rgba(124,92,255,.22); transform: scale(1.05); }
.quick-action .qa-icon svg { width: 19px; height: 19px; stroke-width: 1.9; }

/* ---------- Forms ------------------------------------------- */
.form-row { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.form-row label { font-size: 12.5px; font-weight: 600; color: var(--text-2); }
.form-input, .form-select, .form-textarea { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; background: rgba(140,150,175,.07); border: 1px solid var(--border-2); color: var(--text); font-size: 14px; outline: none; transition: .2s; }
.form-textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 80px; line-height: 1.55; }
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: rgba(124,92,255,.6); background: rgba(124,92,255,.06); box-shadow: 0 0 0 3px rgba(124,92,255,.12); }
.form-input::placeholder, .form-textarea::placeholder { color: var(--text-3); }
.form-select { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23a8afbe' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='M6 9l6 6 6-6'/></svg>"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }
.form-select option { background: var(--surface); color: var(--text); }
.input-prefix { position: relative; }
.input-prefix .prefix { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 15px; font-weight: 600; pointer-events: none; }
.input-prefix .form-input { padding-left: 32px; }
.input-suffix { position: relative; }
.input-suffix .suffix { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 11.5px; font-weight: 700; color: var(--accent-2); background: rgba(124,92,255,.14); border: none; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.input-suffix .suffix:hover { background: rgba(124,92,255,.24); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.notice { grid-column: 1/-1; display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; }
.notice.info { background: rgba(56,189,248,.1); color: #7dd3fc; border: 1px solid rgba(56,189,248,.25); }
.notice.warn { background: rgba(255,181,71,.1); color: #ffd08a; border: 1px solid rgba(255,181,71,.28); }
.notice.bad { background: rgba(255,107,125,.1); color: #ff9ba8; border: 1px solid rgba(255,107,125,.28); }
.form-actions { grid-column: 1/-1; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }

/* ---------- Buttons ----------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; border: none; cursor: pointer; font-size: 13.5px; font-weight: 700; transition: .15s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--grad-accent); color: #fff; box-shadow: 0 12px 28px -12px rgba(124,92,255,1); }
.btn-primary:hover:not(:disabled) { transform: translateY(-1px); }
.btn-secondary { background: rgba(140,150,175,.1); color: var(--text); border: 1px solid var(--border-2); }
.btn-secondary:hover:not(:disabled) { background: rgba(140,150,175,.2); }
.btn-mint { background: var(--grad-mint); color: #062b22; }
.btn-mint:hover:not(:disabled) { transform: translateY(-1px); }
.btn-danger { background: rgba(255,107,125,.14); color: var(--coral); border: 1px solid rgba(255,107,125,.3); }
.btn-danger:hover:not(:disabled) { background: rgba(255,107,125,.22); }
.btn-warm { background: var(--grad-warm); color: #fff; }
.btn-warm:hover:not(:disabled) { transform: translateY(-1px); }
.btn-block { width: 100%; }
.btn-sm { height: 38px; padding: 0 14px; font-size: 12.5px; border-radius: 10px; }
.btn-xs { height: 32px; padding: 0 12px; font-size: 11.5px; border-radius: 9px; }
.btn svg { width: 16px; height: 16px; stroke-width: 2; }

.dash-actions-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.dash-actions-bar .btn { height: 44px; padding: 0 18px; font-size: 13.5px; border-radius: 12px; }
.dash-actions-bar .btn-outline { background: #fff; color: #0d1225; border: 1.5px solid rgba(15,25,60,.1); box-shadow: 0 2px 6px rgba(20,30,60,.06); }
body:not(.light) .dash-actions-bar .btn-outline { background: rgba(255,255,255,.05); color: var(--text); border: 1.5px solid var(--border-2); }
.dash-actions-bar .btn-outline:hover:not(:disabled) { border-color: rgba(255,107,61,.5); color: #ff7a3d; background: #fff8f4; }
body:not(.light) .dash-actions-bar .btn-outline:hover:not(:disabled) { background: rgba(255,107,61,.1); color: #ff9a52; }
.dash-actions-bar .btn svg { width: 17px; height: 17px; stroke-width: 2.4; }

/* ---------- Toggles ----------------------------------------- */
.toggle { position: relative; width: 44px; height: 26px; flex-shrink: 0; display: inline-block; }
.toggle input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 2; }
.toggle .track { position: absolute; inset: 0; border-radius: 20px; background: rgba(140,150,175,.24); border: 1px solid var(--border-2); transition: .22s; }
.toggle .thumb { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #9aa2b8; transition: .22s; }
.toggle input:checked ~ .track { background: rgba(124,92,255,.4); border-color: rgba(124,92,255,.7); }
.toggle input:checked ~ .thumb { transform: translateX(18px); background: var(--accent-2); }
.setting-row { display: flex; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.setting-row:last-child { border-bottom: none; }
.setting-row .sr-text { min-width: 0; flex: 1; }
.setting-row .sr-title { font-size: 13px; font-weight: 600; }
.setting-row .sr-desc { font-size: 11.5px; color: var(--text-3); margin-top: 3px; line-height: 1.5; }

/* ---------- Tables ------------------------------------------ */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.abd-wrap table { width: 100%; border-collapse: collapse; min-width: 640px; }
.abd-wrap thead th { font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--text-3); padding: 12px 20px; text-align: left; white-space: nowrap; }
.abd-wrap thead th.ta-r { text-align: right; }
.abd-wrap thead th.sortable { cursor: pointer; user-select: none; transition: color .15s; }
.abd-wrap thead th.sortable:hover { color: var(--text-2); }
.abd-wrap thead th .sort-ind { display: inline-block; margin-left: 4px; opacity: .5; font-size: 9px; }
.abd-wrap tbody tr { transition: background .15s; cursor: pointer; border-top: 1px solid var(--border); }
.abd-wrap tbody tr:hover { background: rgba(140,150,175,.05); }
.abd-wrap tbody td { padding: 14px 20px; vertical-align: middle; font-size: 13px; }
.abd-wrap tbody td.ta-r { text-align: right; }

/* ---------- Pills / Tabs / Budget --------------------------- */
.pill { display: inline-block; font-size: 10.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; }
.pill-ok { background: rgba(0,229,168,.14); color: var(--mint); }
.pill-warn { background: rgba(255,181,71,.14); color: var(--amber); }
.pill-info { background: rgba(56,189,248,.14); color: var(--sky); }
.pill-bad { background: rgba(255,107,125,.14); color: var(--coral); }
.tabs { display: flex; gap: 2px; padding: 3px; background: rgba(140,150,175,.1); border: 1px solid var(--border); border-radius: 11px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { border: none; background: none; cursor: pointer; font-size: 12px; font-weight: 600; color: var(--text-2); padding: 7px 14px; border-radius: 8px; transition: .18s; white-space: nowrap; flex-shrink: 0; }
.tabs button:hover { color: var(--text); }
.tabs button.active { background: var(--accent); color: #fff; }
.budget-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.budget-item { padding: 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); animation: fadeUp .55s cubic-bezier(.22,.85,.25,1) backwards; transition: transform .22s, border-color .2s; }
.budget-item:hover { transform: translateY(-2px); border-color: var(--border-2); }
.bi-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.bi-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.bi-icon svg { width: 19px; height: 19px; stroke-width: 1.9; }
.bi-info { flex: 1; min-width: 0; }
.bi-name { font-size: 13.5px; font-weight: 700; }
.bi-sub { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }
.bi-amount { font-size: 20px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-bottom: 6px; }
.bi-amount small { font-size: 12px; font-weight: 600; color: var(--text-3); }
.bi-bar { height: 8px; border-radius: 8px; background: rgba(140,150,175,.16); overflow: hidden; margin-top: 10px; }
.bi-bar > span { display: block; height: 100%; border-radius: 8px; transition: width 1s cubic-bezier(.22,.85,.25,1); }
.bi-meta { display: flex; justify-content: space-between; margin-top: 10px; font-size: 11.5px; color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Modal ------------------------------------------- */
.modal-root { position: fixed; inset: 0; z-index: 500; display: none; }
.modal-root.open { display: block; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.72); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); animation: modalBg .25s; overflow-y: auto; }
@keyframes modalBg { from { opacity: 0; } to { opacity: 1; } }
.modal { position: relative; top: 50%; left: 50%; transform: translate(-50%,-50%); width: min(540px, calc(100vw - 32px)); max-height: calc(100vh - 40px); background: var(--surface); border: 1px solid var(--border-2); border-radius: 20px; display: flex; flex-direction: column; overflow: hidden; box-shadow: var(--shadow-lg); animation: modalIn .35s cubic-bezier(.22,.85,.25,1); margin: 20px 0; }
@keyframes modalIn { from { opacity: 0; transform: translate(-50%,-46%) scale(.95); } to { opacity: 1; transform: translate(-50%,-50%) scale(1); } }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 22px 16px; border-bottom: 1px solid var(--border); flex-shrink: 0; }
.modal-head h3 { font-size: 16.5px; font-weight: 700; letter-spacing: -.025em; }
.modal-head .mh-sub { font-size: 12px; color: var(--text-2); margin-top: 4px; font-weight: 500; }
.modal-close { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--border); background: rgba(140,150,175,.08); color: var(--text-2); cursor: pointer; display: grid; place-items: center; transition: .2s; flex-shrink: 0; }
.modal-close:hover { color: var(--text); background: rgba(140,150,175,.18); }
.modal-close svg { width: 16px; height: 16px; stroke-width: 2.2; }
.modal-body { padding: 20px 22px; overflow-y: auto; flex: 1; }
.modal-foot { display: flex; gap: 10px; padding: 16px 22px; border-top: 1px solid var(--border); background: rgba(140,150,175,.03); flex-shrink: 0; }
.modal-foot .btn { flex: 1; }

/* ---------- Toast ------------------------------------------- */
.toast-container { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 600; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; width: max-content; max-width: 92vw; }
.toast { background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 14px; padding: 12px 18px; font-size: 13px; font-weight: 600; display: flex; align-items: center; gap: 10px; box-shadow: var(--shadow-lg); backdrop-filter: blur(16px); animation: toastIn .3s cubic-bezier(.22,.85,.25,1); white-space: nowrap; max-width: 92vw; overflow: hidden; text-overflow: ellipsis; }
body:not(.light) .toast { background: rgba(34,38,51,.98); }
.toast svg { width: 17px; height: 17px; stroke-width: 2.4; flex-shrink: 0; }
.toast.success svg { color: var(--mint); }
.toast.error svg { color: var(--coral); }
.toast.info svg { color: var(--accent-2); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* ---------- Detail rows ------------------------------------- */
.detail-box { padding: 16px; border-radius: 14px; background: rgba(124,92,255,.06); border: 1px solid rgba(124,92,255,.2); margin-bottom: 16px; }
.detail-row { display: flex; justify-content: space-between; gap: 14px; padding: 8px 0; font-size: 13px; }
.detail-row .dr-k { color: var(--text-2); font-weight: 500; flex-shrink: 0; }
.detail-row .dr-v { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; word-break: break-word; min-width: 0; }
.detail-row.total { border-top: 1px dashed var(--border-3); margin-top: 6px; padding-top: 12px; }
.detail-row.total .dr-v { color: var(--accent-2); font-size: 15px; }
.detail-row .dr-v.mono-v { font-family: 'JetBrains Mono', monospace; font-size: 12px; }

/* ---------- Debit / Credit card 3D -------------------------- */
.debit-wrap { perspective: 1200px; width: 100%; max-width: 380px; margin: 0 auto; }
.debit-card { position: relative; width: 100%; aspect-ratio: 1.586; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.4,.2,.2,1); cursor: pointer; }
.debit-card.flipped { transform: rotateY(180deg); }
.dc-face { position: absolute; inset: 0; border-radius: 20px; padding: 22px; backface-visibility: hidden; -webkit-backface-visibility: hidden; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 30px 60px -30px rgba(0,0,0,.85); overflow: hidden; color: #fff; }
.dc-front::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.22), transparent 68%); top: -140px; right: -110px; pointer-events: none; }
.dc-back { transform: rotateY(180deg); background: linear-gradient(135deg, #2a2d3a, #16181f); border: 1px solid rgba(255,255,255,.08); }
.dc-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 2; }
.dc-brand { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.dc-chip { width: 42px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #f9d976, #c19d2b); position: relative; }
.dc-chip::after { content: ''; position: absolute; inset: 7px 9px; border-radius: 3px; border: 1px solid rgba(0,0,0,.2); }
.dc-number { font-size: 19px; font-weight: 600; letter-spacing: .13em; font-variant-numeric: tabular-nums; position: relative; z-index: 2; font-family: 'JetBrains Mono', monospace; word-spacing: .14em; }
.dc-bottom { display: flex; justify-content: space-between; align-items: flex-end; position: relative; z-index: 2; gap: 12px; }
.dc-field .cf-label { font-size: 9px; font-weight: 700; letter-spacing: .14em; opacity: .7; text-transform: uppercase; }
.dc-field .cf-val { font-size: 12.5px; font-weight: 600; margin-top: 3px; }
.dc-network { display: flex; align-items: center; }
.dc-network .n-circle { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: rgba(255,255,255,.9); color: #1a1c24; }
.dc-network .n-circle + .n-circle { margin-left: -14px; background: rgba(255,255,255,.35); color: #fff; }
.dc-back .magnetic { height: 42px; background: rgba(0,0,0,.5); border-radius: 6px; margin: 6px 0 16px; }
.dc-back .cvv-row { display: flex; align-items: center; gap: 12px; }
.dc-back .cvv-box { flex: 1; height: 36px; border-radius: 8px; background: rgba(255,255,255,.94); color: #16181f; display: flex; align-items: center; justify-content: flex-end; padding: 0 14px; font-weight: 700; letter-spacing: .14em; font-size: 13px; font-family: 'JetBrains Mono', monospace; }
.dc-back .cvv-hint { font-size: 10.5px; color: rgba(255,255,255,.55); margin-top: 14px; line-height: 1.5; }
.frozen-overlay { position: absolute; inset: 0; border-radius: 20px; background: rgba(10,15,30,.75); backdrop-filter: blur(8px); display: grid; place-items: center; color: #fff; z-index: 10; font-weight: 800; letter-spacing: .28em; font-size: 14px; }

/* ---------- Empty state ------------------------------------- */
.empty { text-align: center; padding: 48px 20px; color: var(--text-3); }
.empty svg { width: 44px; height: 44px; stroke-width: 1.4; margin-bottom: 14px; opacity: .5; }
.empty h3 { font-size: 14px; font-weight: 700; color: var(--text-2); margin-bottom: 6px; }
.empty p { font-size: 12.5px; }

body.hide-values .sensitive { filter: blur(9px); user-select: none; transition: filter .3s; }

/* ---------- Bottom nav -------------------------------------- */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; right: 0; height: calc(var(--mob-nav-h) + env(safe-area-inset-bottom, 0)); padding-bottom: env(safe-area-inset-bottom, 0); background: var(--surface); backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); border-top: 1px solid var(--border); z-index: 90; }
body:not(.light) .bottom-nav { background: rgba(20,22,31,.95); }
.bn-inner { display: grid; grid-template-columns: repeat(5, 1fr); height: var(--mob-nav-h); max-width: 640px; margin: 0 auto; padding: 0 6px; }
.bn-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; background: none; border: none; color: var(--text-3); font-size: 9.5px; font-weight: 600; cursor: pointer; transition: color .18s; position: relative; padding: 0; min-width: 0; text-decoration: none; }
.bn-item svg { width: 20px; height: 20px; stroke-width: 1.9; }
.bn-item:hover { color: var(--text-2); }
.bn-item.active { color: var(--accent-2); }
.bn-item.active::before { content: ''; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 26px; height: 3px; border-radius: 0 0 5px 5px; background: var(--grad-accent); }
.bn-item.center .bn-icon { width: 44px; height: 44px; border-radius: 14px; background: var(--grad-accent); display: grid; place-items: center; margin-top: -22px; border: 3px solid var(--bg); box-shadow: 0 12px 26px -8px rgba(124,92,255,.95); }
.bn-item.center .bn-icon svg { width: 22px; height: 22px; color: #fff; stroke-width: 2.2; }
.bn-item.center.active::before { display: none; }

.backdrop { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.65); backdrop-filter: blur(4px); z-index: 99; opacity: 0; transition: opacity .3s; pointer-events: none; }
.backdrop.show { opacity: 1; pointer-events: auto; }

.notif-panel { position: fixed; top: 70px; right: 20px; width: min(360px, calc(100vw - 32px)); background: var(--surface); border: 1px solid var(--border-2); border-radius: 18px; box-shadow: var(--shadow-lg); z-index: 200; max-height: 520px; overflow-y: auto; animation: notifIn .28s cubic-bezier(.22,.85,.25,1); }
@keyframes notifIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.notif-head { padding: 16px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.notif-head h3 { font-size: 14px; font-weight: 700; }
.notif-head button { background: none; border: none; font-size: 11.5px; color: var(--accent-2); cursor: pointer; font-weight: 600; }
.notif-item { padding: 12px 18px; display: flex; gap: 12px; cursor: pointer; transition: background .15s; border-bottom: 1px solid var(--border); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: rgba(140,150,175,.06); }
.notif-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; }
.notif-icon svg { width: 15px; height: 15px; stroke-width: 2.1; }
.notif-content { flex: 1; min-width: 0; }
.notif-title { font-size: 12.5px; font-weight: 600; line-height: 1.4; }
.notif-time { font-size: 11px; color: var(--text-3); margin-top: 3px; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex-shrink: 0; margin-top: 6px; }

/* ---------- Holdings / Loans / Rewards ---------------------- */
.holding-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--border); transition: background .16s; cursor: pointer; min-width: 0; }
.holding-row:first-child { border-top: none; }
.holding-row:hover { background: rgba(140,150,175,.06); }
.holding-symbol { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 15px; color: #fff; flex-shrink: 0; }
.holding-body { flex: 1; min-width: 0; }
.holding-name { font-size: 13px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.holding-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.holding-values { text-align: right; flex-shrink: 0; }
.holding-value { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.holding-change { font-size: 11.5px; margin-top: 2px; font-weight: 600; }
.holding-change.up { color: var(--mint); }
.holding-change.down { color: var(--coral); }

.loan-card { padding: 20px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); animation: fadeUp .55s cubic-bezier(.22,.85,.25,1) backwards; transition: .22s; margin-bottom: 16px; }
.loan-card:hover { transform: translateY(-2px); border-color: var(--border-2); }
.loan-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-bottom: 14px; flex-wrap: wrap; }
.loan-title { font-size: 14.5px; font-weight: 700; }
.loan-meta { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.loan-rate { font-size: 20px; font-weight: 800; letter-spacing: -.03em; color: var(--accent-2); }
.loan-amount { font-size: 19px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-bottom: 4px; }
.loan-bar { height: 8px; border-radius: 8px; background: rgba(140,150,175,.16); overflow: hidden; margin-top: 12px; }
.loan-bar > span { display: block; height: 100%; border-radius: 8px; background: var(--grad-accent); }
.loan-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.loan-stat .ls-l { font-size: 10.5px; color: var(--text-3); font-weight: 600; }
.loan-stat .ls-v { font-size: 13.5px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.rewards-hero { padding: 26px 28px; border-radius: var(--radius); color: #fff; position: relative; overflow: hidden; background: linear-gradient(135deg, #ffb547 0%, #ff6b7d 55%, #a855f7 100%); }
.rewards-hero::before { content: ''; position: absolute; width: 340px; height: 340px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.25), transparent 68%); top: -140px; right: -100px; }
.rewards-balance { font-size: 42px; font-weight: 800; letter-spacing: -.045em; line-height: 1.05; position: relative; z-index: 2; word-break: break-word; }
.rewards-label { font-size: 12px; font-weight: 600; opacity: .85; margin-bottom: 8px; position: relative; z-index: 2; }
.rewards-tier { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 6px 14px; border-radius: 9px; background: rgba(255,255,255,.2); backdrop-filter: blur(6px); position: relative; z-index: 2; margin-top: 14px; }
.reward-item { padding: 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); display: flex; gap: 12px; align-items: center; transition: transform .2s; }
.reward-item:hover { transform: translateY(-2px); }
.reward-icon { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; flex-shrink: 0; font-size: 22px; }
.reward-info { flex: 1; min-width: 0; }
.reward-name { font-size: 13.5px; font-weight: 700; }
.reward-desc { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }
.reward-cost { font-size: 12px; font-weight: 700; color: var(--accent-2); margin-top: 5px; }

/* ---------- Exchange --------------------------------------- */
.exchange-box { padding: 22px; }
.exchange-panel { border: 1px solid var(--border); border-radius: 16px; padding: 16px; background: rgba(140,150,175,.04); transition: .2s; }
.exchange-panel:focus-within { border-color: rgba(124,92,255,.4); }
.ep-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.ep-label { font-size: 12px; font-weight: 600; color: var(--text-3); }
.ep-balance { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; cursor: pointer; }
.ep-balance:hover { color: var(--accent-2); }
.ep-body { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ep-input { flex: 1; min-width: 120px; background: none; border: none; outline: none; color: var(--text); font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.ep-input::placeholder { color: var(--text-3); }
.ep-usd { font-size: 12px; color: var(--text-3); margin-top: 6px; font-variant-numeric: tabular-nums; }
.currency-btn { display: flex; align-items: center; gap: 8px; padding: 7px 12px 7px 7px; border-radius: 12px; border: 1px solid var(--border-2); background: rgba(140,150,175,.1); color: var(--text); font-size: 12.5px; font-weight: 700; cursor: pointer; transition: .2s; flex-shrink: 0; }
.currency-btn:hover { background: rgba(140,150,175,.2); }
.currency-flag { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; background: rgba(140,150,175,.2); }
.exchange-flip { display: grid; place-items: center; margin: -8px 0; position: relative; z-index: 2; }
.exchange-flip button { width: 40px; height: 40px; border-radius: 13px; cursor: pointer; border: 1px solid var(--border-2); background: var(--surface-2); color: var(--accent-2); display: grid; place-items: center; transition: .2s; }
.exchange-flip button:hover { background: rgba(124,92,255,.2); transform: rotate(180deg); }
.insight-bar { display: flex; flex-direction: column; gap: 10px; }
.insight-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); min-width: 0; }
.insight-item:last-child { border-bottom: none; }
.insight-icon { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; font-size: 15px; font-weight: 800; color: #fff; }
.insight-body { flex: 1; min-width: 0; }
.insight-name { font-size: 12.5px; font-weight: 700; }
.insight-cat { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.insight-value { text-align: right; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; flex-shrink: 0; }

/* ---------- Support / FAQ ---------------------------------- */
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: none; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 22px; cursor: pointer; font-size: 13.5px; font-weight: 600; transition: background .15s; }
.faq-q:hover { background: rgba(140,150,175,.05); }
.faq-q svg { width: 17px; height: 17px; stroke-width: 2.2; color: var(--text-3); transition: transform .25s; flex-shrink: 0; }
.faq-item.open .faq-q svg { transform: rotate(180deg); color: var(--accent-2); }
.faq-a { padding: 0 22px 18px; font-size: 12.5px; color: var(--text-2); line-height: 1.65; display: none; }
.faq-item.open .faq-a { display: block; }
.ticket-row { display: flex; gap: 12px; padding: 14px 22px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.ticket-row:last-child { border-bottom: none; }
.ticket-status { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 6px; flex-shrink: 0; margin-top: 2px; }
.ticket-status.open { background: rgba(56,189,248,.15); color: var(--sky); }
.ticket-status.pending { background: rgba(255,181,71,.15); color: var(--amber); }
.ticket-status.resolved { background: rgba(0,229,168,.15); color: var(--mint); }

/* ---------- Dashboard special blocks ----------------------- */
.top-cards-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.balance-card { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; transition: .25s; }
.balance-card:hover { transform: translateY(-3px); border-color: var(--border-2); }
.balance-card .bc-label { font-size: 12px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.balance-card .bc-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.balance-card .bc-value { font-size: 22px; font-weight: 800; letter-spacing: -.035em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.balance-card .bc-spark { flex-shrink: 0; width: 80px; height: 36px; opacity: .95; }
.balance-card .bc-spark svg { width: 100%; height: 100%; display: block; }
.balance-card .bc-pill { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.balance-card .bc-pill.up { color: var(--mint); background: rgba(0,229,168,.12); border: 1px solid rgba(0,229,168,.22); }
.balance-card .bc-pill.down { color: var(--coral); background: rgba(255,107,125,.12); border: 1px solid rgba(255,107,125,.22); }
.balance-card .bc-pill svg { width: 10px; height: 10px; stroke-width: 2.8; }
.balance-card .bc-foot { font-size: 11px; color: var(--text-3); margin-top: 8px; }

.platinum-card { padding: 22px; border-radius: var(--radius); background: linear-gradient(135deg, #ff8a3d 0%, #ff6b3d 50%, #ff4d6d 100%); color: #fff; min-height: 100%; display: flex; flex-direction: column; justify-content: space-between; box-shadow: 0 24px 50px -24px rgba(255,107,61,.6); border: 1px solid rgba(255,255,255,.12); position: relative; overflow: hidden; }
.platinum-card::before { content: ''; position: absolute; width: 280px; height: 280px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.28), transparent 65%); top: -130px; right: -90px; }
.platinum-card::after { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(0,0,0,.18), transparent 70%); bottom: -110px; left: -60px; }
.platinum-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 2; gap: 12px; }
.platinum-brand { font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 7px; }
.platinum-brand .pm-dot { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(135deg, #fff, #ffd6b8); display: grid; place-items: center; color: #ff4d3d; font-weight: 800; font-size: 11px; }
.platinum-chip { width: 36px; height: 26px; border-radius: 6px; background: linear-gradient(135deg, #f9d976, #c19d2b); position: relative; }
.platinum-chip::after { content: ''; position: absolute; inset: 5px 7px; border-radius: 2px; border: 1px solid rgba(0,0,0,.2); }
.platinum-amount { font-size: 24px; font-weight: 800; letter-spacing: -.03em; position: relative; z-index: 2; margin-top: 16px; font-variant-numeric: tabular-nums; }
.platinum-sub { font-size: 11px; opacity: .8; font-weight: 600; position: relative; z-index: 2; margin-bottom: 12px; }
.platinum-number { font-size: 13px; font-weight: 600; letter-spacing: .11em; font-family: 'JetBrains Mono', monospace; position: relative; z-index: 2; opacity: .95; margin-bottom: 14px; }
.platinum-bottom { position: relative; z-index: 2; margin-top: auto; }
.platinum-total-label { font-size: 10.5px; opacity: .78; font-weight: 600; margin-bottom: 2px; }
.platinum-total { font-size: 19px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; margin-bottom: 10px; }
.platinum-usage { display: flex; justify-content: space-between; font-size: 10.5px; font-weight: 600; opacity: .9; margin-bottom: 6px; }
.platinum-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.25); overflow: hidden; }
.platinum-bar > span { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #fff, #ffe9d6); }
.platinum-legend { display: flex; justify-content: space-between; margin-top: 8px; font-size: 10px; opacity: .82; font-weight: 600; }
.platinum-legend .pl-item { display: inline-flex; align-items: center; gap: 5px; }
.platinum-legend .pl-dot { width: 6px; height: 6px; border-radius: 2px; background: #fff; opacity: .9; }

.expense-card { padding: 20px 22px; }
.expense-body { display: grid; grid-template-columns: minmax(140px, 190px) 1fr; gap: 18px; align-items: center; }
.expense-donut-wrap { position: relative; width: 100%; max-width: 190px; margin: 0 auto; aspect-ratio: 1/1; }
.expense-donut { width: 100%; height: 100%; display: block; }
.expense-donut circle { transition: stroke-dasharray 1s cubic-bezier(.22,.85,.25,1), stroke-dashoffset 1s; }
.expense-total { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); text-align: center; pointer-events: none; width: 60%; }
.expense-total .et-label { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--coral); }
.expense-total .et-val { font-size: 18px; font-weight: 800; letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.expense-legend { display: flex; flex-direction: column; gap: 6px; }
.expense-leg-row { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 10px; font-size: 12.5px; }
.expense-leg-dot { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.expense-leg-name { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.expense-leg-amt { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap; font-size: 12px; }

.goal-card { padding: 20px 22px; }
.goal-gauge-wrap { display: flex; justify-content: center; position: relative; margin: 4px 0 12px; }
.goal-gauge { width: 100%; max-width: 280px; display: block; }
.goal-gauge .gg-track { fill: none; stroke: rgba(140,150,175,.15); stroke-width: 16; stroke-linecap: round; }
.goal-gauge .gg-fill { fill: none; stroke: url(#goalGrad); stroke-width: 16; stroke-linecap: round; transition: stroke-dashoffset 1.2s cubic-bezier(.22,.85,.25,1); }
.goal-gauge-wrap .gg-center { position: absolute; top: 60%; left: 50%; transform: translate(-50%,-50%); text-align: center; pointer-events: none; }
.goal-gauge-wrap .gg-center .gg-pct { font-size: 26px; font-weight: 800; letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.goal-gauge-wrap .gg-center .gg-sub { font-size: 10.5px; color: var(--text-3); font-weight: 600; margin-top: 2px; }
.goal-numbers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.goal-num { text-align: center; padding: 10px 6px; border-radius: 12px; background: rgba(140,150,175,.05); border: 1px solid var(--border); min-width: 0; }
.goal-num .gn-l { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 5px; }
.goal-num .gn-v { font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.goal-num.accent .gn-v { color: var(--accent-2); }
.goal-num.mint .gn-v { color: var(--mint); }
.goal-num.amber .gn-v { color: var(--amber); }
.goal-quote { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(124,92,255,.06); border-left: 3px solid var(--accent); font-size: 12px; line-height: 1.55; color: var(--text-2); font-style: italic; }

.cashflow-card { padding: 20px 22px 22px; }
.cashflow-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.cashflow-legend { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.cashflow-legend .cl-item { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.cashflow-legend .cl-dot { width: 9px; height: 9px; border-radius: 3px; }
.cashflow-bars { display: flex; align-items: flex-end; justify-content: space-between; gap: 6px; height: 200px; padding: 0 2px; position: relative; }
.cashflow-bars::before { content: ''; position: absolute; inset: 0 0 30px 0; background-image: linear-gradient(to top, var(--border) 1px, transparent 1px); background-size: 100% 25%; pointer-events: none; }
.cf-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; position: relative; min-width: 0; }
.cf-bars { display: flex; align-items: flex-end; gap: 3px; flex: 1; width: 100%; justify-content: center; padding-bottom: 6px; }
.cf-bar { width: 12px; border-radius: 6px 6px 3px 3px; transition: height 1s cubic-bezier(.22,.85,.25,1); position: relative; min-height: 3px; }
.cf-bar.income { background: var(--grad-mint); }
.cf-bar.expense { background: var(--grad-coral); }
.cf-bar:hover::after { content: attr(data-v); position: absolute; bottom: 100%; left: 50%; transform: translate(-50%,-6px); background: var(--surface-3); border: 1px solid var(--border-2); border-radius: 8px; padding: 4px 8px; font-size: 10.5px; font-weight: 700; white-space: nowrap; z-index: 5; color: var(--text); }
.cf-label { font-size: 10.5px; font-weight: 600; color: var(--text-3); }
.cf-col.today .cf-label { color: var(--accent-2); font-weight: 700; }
.cashflow-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); flex-wrap: wrap; gap: 12px; }
.cashflow-summary { display: flex; gap: 20px; flex-wrap: wrap; }
.cf-sum { display: flex; flex-direction: column; gap: 2px; }
.cf-sum .cs-l { font-size: 10.5px; font-weight: 600; color: var(--text-3); }
.cf-sum .cs-v { font-size: 15px; font-weight: 800; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.cf-sum.income .cs-v { color: var(--mint); }
.cf-sum.expense .cs-v { color: var(--coral); }
.cf-sum .cs-date { font-size: 10.5px; color: var(--text-3); font-weight: 500; }

.contacts-scroll { display: flex; gap: 12px; overflow-x: auto; padding: 4px 20px 20px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.contacts-scroll::-webkit-scrollbar { display: none; }
.contact-item { flex-shrink: 0; display: flex; flex-direction: column; align-items: center; gap: 7px; min-width: 60px; cursor: pointer; padding: 6px 4px; border-radius: 12px; transition: .18s; }
.contact-item:hover { background: rgba(140,150,175,.08); transform: translateY(-2px); }
.contact-avatar { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 16px; color: #fff; position: relative; box-shadow: 0 6px 14px -6px rgba(0,0,0,.4); border: 2px solid var(--surface); }
.contact-avatar.online::after { content: ''; position: absolute; bottom: 0; right: 0; width: 12px; height: 12px; border-radius: 50%; background: var(--mint); border: 2.5px solid var(--surface); }
.contact-name { font-size: 10.5px; font-weight: 600; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60px; text-align: center; }
.contact-item.add-new .contact-avatar { background: rgba(124,92,255,.13); border: 1.5px dashed rgba(124,92,255,.4); color: var(--accent-2); box-shadow: none; }
.contact-item.add-new .contact-avatar svg { width: 20px; height: 20px; stroke-width: 2.2; }

.upcoming-list { list-style: none; }
.upcoming-row { display: flex; align-items: center; gap: 12px; padding: 13px 20px; border-top: 1px solid var(--border); transition: background .16s; cursor: pointer; }
.upcoming-row:first-child { border-top: none; }
.upcoming-row:hover { background: rgba(140,150,175,.05); }
.upcoming-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 17px; flex-shrink: 0; }
.upcoming-body { min-width: 0; flex: 1; }
.upcoming-title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.upcoming-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.upcoming-amt { text-align: right; flex-shrink: 0; }
.upcoming-amt .ua-v { font-size: 13.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.upcoming-amt .ua-b { font-size: 10.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- Chat ------------------------------------------- */
.chat { display: flex; flex-direction: column; height: min(620px, 74vh); padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); background: var(--surface-2); flex-shrink: 0; }
.chat-head .avatar { width: 40px; height: 40px; flex: 0 0 40px; font-size: 12px; border-radius: 12px; }
.chat-head .who strong { display: block; font-size: 14.5px; font-weight: 800; }
.chat-head .who span { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 6px; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 99px; background: var(--mint); box-shadow: 0 0 0 3px rgba(0,229,168,.18); display: inline-block; }
.chat-log { flex: 1; overflow-y: auto; padding: 18px; display: flex; flex-direction: column; gap: 14px; background: var(--surface-2); }
.msg { display: flex; gap: 10px; max-width: min(84%, 640px); }
.msg.user { align-self: flex-end; flex-direction: row-reverse; }
.bubble { padding: 11px 15px; border-radius: 16px; font-size: 13.8px; line-height: 1.6; background: var(--surface); border: 1px solid var(--border); color: var(--text); white-space: pre-line; }
.msg.user .bubble { background: var(--grad-accent); color: #fff; border-color: transparent; }
.msg.bot .bubble { border-bottom-left-radius: 5px; }
.msg.user .bubble { border-bottom-right-radius: 5px; }
.avatar-sm { width: 30px; height: 30px; flex: 0 0 30px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #fff; background: var(--grad-accent); }
.txcard { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; padding: 12px 14px; border-bottom-left-radius: 5px; min-width: min(340px, 80vw); }
.txcard .tx-body { flex: 1; min-width: 0; }
.txcard .tx-body strong { display: block; font-size: 13.3px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txcard .tx-body span { display: block; font-size: 11px; color: var(--text-3); }
.chat-input { display: flex; gap: 10px; padding: 13px 16px; border-top: 1px solid var(--border); background: var(--surface); flex-shrink: 0; }
.chat-input input { flex: 1; border-radius: 99px; padding: 11px 17px; background: rgba(140,150,175,.07); border: 1px solid var(--border-2); color: var(--text); font-size: 14px; outline: none; }
.chat-input input:focus { border-color: rgba(124,92,255,.5); }
.chat-input button { width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; border: 0; cursor: pointer; background: var(--grad-accent); color: #fff; display: grid; place-items: center; transition: .18s; }
.chat-input button:hover { transform: scale(1.05); }
.chat-input button svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 13px; background: var(--surface); }
.chip { border: 1px solid var(--border-2); background: rgba(140,150,175,.06); border-radius: 99px; padding: 7px 13px; font-size: 12.3px; font-weight: 700; color: var(--text-2); cursor: pointer; transition: .16s; font-family: inherit; }
.chip:hover { border-color: rgba(124,92,255,.4); color: var(--accent-2); background: rgba(124,92,255,.1); }

/* ---------- Timeline --------------------------------------- */
.tl { position: relative; padding-left: 26px; }
.tl::before { content: ""; position: absolute; left: 8px; top: 6px; bottom: 6px; width: 2px; background: var(--border-2); border-radius: 2px; }
.tl-item { position: relative; padding: 0 0 18px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--surface); border: 2.5px solid var(--accent); }
.tl-item.ok::before { border-color: var(--mint); }
.tl-item.out::before { border-color: var(--coral); }
.tl-time { font-size: 11px; color: var(--text-3); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tl-item strong { display: block; font-size: 13.5px; font-weight: 700; margin-top: 3px; color: var(--text); }
.tl-item p { font-size: 12.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- Promos ---------------------------------------- */
.promo { border-radius: 18px; padding: 20px; color: #fff; position: relative; overflow: hidden; min-height: 170px; display: flex; flex-direction: column; justify-content: space-between; }
.promo::after { content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%; right: -80px; bottom: -110px; background: rgba(255,255,255,.16); }
.promo h4 { font-size: 17px; font-weight: 800; letter-spacing: -.5px; position: relative; z-index: 1; }
.promo p { font-size: 12.5px; opacity: .92; margin-top: 6px; position: relative; z-index: 1; line-height: 1.5; }
.promo .p-btn { align-self: flex-start; margin-top: 14px; background: rgba(255,255,255,.95); color: #111827; border: 0; border-radius: 10px; padding: 9px 16px; font-size: 12.5px; font-weight: 800; cursor: pointer; position: relative; z-index: 1; transition: .16s; font-family: inherit; }
.promo .p-btn:hover { transform: translateY(-1px); }
.promo .code { display: inline-block; margin-top: 10px; border: 1px dashed rgba(255,255,255,.6); border-radius: 8px; padding: 5px 11px; font-size: 11.5px; font-weight: 800; letter-spacing: 1px; position: relative; z-index: 1; }

/* ---------- Wallet acct card ------------------------------- */
.acct { border-radius: 18px; padding: 18px; color: #fff; position: relative; overflow: hidden; min-height: 164px; display: flex; flex-direction: column; }
.acct::after { content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%; right: -70px; bottom: -90px; background: rgba(255,255,255,.14); }
.acct.checking { background: linear-gradient(135deg, #7c5cff, #a78bfa); }
.acct.savings { background: linear-gradient(135deg, #0e7490, #06b6d4); }
.acct.credit { background: linear-gradient(135deg, #8b3d9e, #e879f9); }
.acct.fixed_deposit { background: linear-gradient(135deg, #b45309, #f59e0b); }
.acct-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .7px; text-transform: uppercase; font-weight: 800; position: relative; z-index: 1; }
.acct-top .type { background: rgba(255,255,255,.24); padding: 3px 9px; border-radius: 99px; font-size: 10px; }
.acct-top .no { opacity: .85; font-variant-numeric: tabular-nums; }
.acct-name { margin-top: 15px; font-size: 13px; opacity: .92; position: relative; z-index: 1; font-weight: 600; }
.acct-bal { font-size: clamp(22px, 3.2vw, 26px); font-weight: 800; letter-spacing: -1px; margin-top: 2px; position: relative; z-index: 1; }
.acct-meta { margin-top: auto; padding-top: 12px; font-size: 11.5px; opacity: .9; position: relative; z-index: 1; line-height: 1.45; }
.acct-actions { display: flex; gap: 7px; margin-top: 10px; position: relative; z-index: 1; }
.acct-actions button { flex: 1; border: 1px solid rgba(255,255,255,.34); background: rgba(255,255,255,.16); color: #fff; border-radius: 9px; padding: 7px; font-size: 11.5px; font-weight: 800; cursor: pointer; transition: .16s; }
.acct-actions button:hover { background: rgba(255,255,255,.3); }

/* ---------- Responsive ------------------------------------- */
@media (max-width: 1440px) { .dashboard-hero-row { grid-template-columns: minmax(0,1.2fr) minmax(0,1fr) minmax(260px,280px); } }
@media (max-width: 1280px) {
  .grid { grid-template-columns: 1fr; }
  .col-side { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
  .dashboard-hero-row { grid-template-columns: 1fr 1fr; }
  .dashboard-hero-row .platinum-slot { grid-column: span 2; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .expense-body { grid-template-columns: 1fr; }
  .expense-donut-wrap { max-width: 220px; }
  .expense-legend { flex-direction: row; flex-wrap: wrap; gap: 4px 12px; }
  .expense-leg-row { flex: 1 1 45%; min-width: 140px; }
}
@media (max-width: 980px) {
  :root { --sidebar-w: 280px; }
  .sidebar { position: fixed !important; left: 0; top: 0; bottom: 0; height: 100vh; transform: translateX(-100%); transition: transform .34s cubic-bezier(.22,.85,.25,1); box-shadow: 0 0 80px rgba(0,0,0,.6); z-index: 1000; padding-top: 22px; }
  body:not(.light) .sidebar { background: #14161f; }
  .sidebar.open { transform: none; }
  .backdrop { display: block; }
  .menu-btn { display: grid; }
  .drawer-close { display: grid; }
  .content { padding: 20px 18px calc(var(--mob-nav-h) + 40px); }
  .topbar { padding: 12px 16px; gap: 10px; }
  .bottom-nav { display: block; }
  .toast-container { bottom: calc(var(--mob-nav-h) + 16px); }
  .notif-panel { top: 62px; right: 12px; left: 12px; width: auto; }
  .page-head h1 { font-size: 22px; }
  .hero-amount { font-size: 38px; }
}
@media (max-width: 820px) {
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .col-side { grid-template-columns: 1fr; }
  .top-cards-row { grid-template-columns: 1fr 1fr; }
  .dashboard-hero-row { grid-template-columns: 1fr; }
  .dashboard-hero-row .platinum-slot { grid-column: span 1; }
  .rewards-balance { font-size: 36px; }
  .cashflow-bars { height: 180px; }
  .cf-bar { width: 10px; }
}
@media (max-width: 760px) {
  .user-meta { display: none; }
  .user-chip { padding: 5px; }
  .page-head h1 { font-size: 20px; }
  .page-head p { font-size: 12.5px; }
  .hero { padding: 22px 20px; }
  .hero-amount { font-size: 32px; }
  .qa-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-wrap { height: 200px; }
  .abd-wrap thead th, .abd-wrap tbody td { padding-left: 16px; padding-right: 16px; }
  .search { max-width: none; }
  .search kbd { display: none; }
  .cashflow-bars { height: 160px; }
  .cf-bar { width: 9px; }
  .cf-label { font-size: 9.5px; }
  .stat-card { padding: 16px 18px; }
  .stat-card .sc-value { font-size: 20px; }
  .dash-actions-bar { width: 100%; }
  .dash-actions-bar .btn { flex: 1 1 calc(50% - 5px); justify-content: center; }
}
@media (max-width: 520px) {
  .content { padding: 16px 14px calc(var(--mob-nav-h) + 34px); }
  .topbar { padding: 11px 12px; gap: 8px; }
  .icon-btn { width: 38px; height: 38px; border-radius: 10px; }
  .avatar { width: 30px; height: 30px; font-size: 11px; }
  .search { height: 38px; padding: 0 12px; }
  .page-head h1 { font-size: 18px; }
  .hero { padding: 20px 18px; }
  .hero-amount { font-size: 28px; }
  .hero-accounts { grid-template-columns: 1fr 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .top-cards-row { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .modal { width: calc(100vw - 16px); border-radius: 16px; max-height: calc(100vh - 24px); margin: 12px 0; }
  .bottom-nav { --mob-nav-h: 64px; }
  .dash-actions-bar .btn { flex: 1 1 100%; justify-content: center; }
}
@media (max-width: 400px) {
  .hero-amount { font-size: 25px; }
  .qa-grid { gap: 6px; }
  .quick-action { padding: 12px 4px; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .abd-wrap *, .abd-wrap *::before, .abd-wrap *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
@media print {
  .abd-wrap .sidebar, .abd-wrap .topbar, .abd-wrap .bottom-nav, .abd-wrap .backdrop, .abd-wrap .modal-root, .abd-wrap .toast-container, .abd-wrap .notif-panel { display: none !important; }
  .abd-wrap .content { padding: 0; max-width: none; }
}

/* ---------- v2.0 additions -------------------------------- */
.abd-message-bubble { padding: 11px 15px; border-radius: 16px; font-size: 13.5px; line-height: 1.55; max-width: 84%; margin-bottom: 8px; white-space: pre-line; }
.abd-message-bubble.customer { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; align-self: flex-start; }
.abd-message-bubble.admin { background: var(--grad-accent); color: #fff; border-bottom-right-radius: 5px; margin-left: auto; }
.abd-message-meta { font-size: 11px; color: var(--text-3); margin-top: 3px; }

.abd-dl-card { width: 100%; max-width: 420px; aspect-ratio: 1.586; background: linear-gradient(135deg, #1e293b, #0f172a); border-radius: 18px; padding: 22px; color: #fff; display: flex; flex-direction: column; box-shadow: 0 20px 40px -20px rgba(0,0,0,.5); }
.abd-dl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.abd-dl-brand { font-size: 11px; font-weight: 800; letter-spacing: .18em; opacity: .8; }
.abd-dl-flag { font-size: 10px; font-weight: 800; background: var(--grad-accent); padding: 3px 8px; border-radius: 6px; letter-spacing: .1em; }
.abd-dl-body { display: flex; gap: 14px; align-items: flex-start; flex: 1; }
.abd-dl-photo { width: 72px; height: 92px; border-radius: 10px; background: linear-gradient(135deg, #4b5563, #1f2937); display: grid; place-items: center; font-size: 24px; font-weight: 800; }
.abd-dl-info { flex: 1; min-width: 0; }
.abd-dl-label { font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; opacity: .7; margin-bottom: 2px; }
.abd-dl-value { font-size: 13px; font-weight: 700; margin-bottom: 8px; word-break: break-word; }