/* ==========================================================================
   Midwest Prime Finance — Premium Design System v2
   Palette, spacing (8px grid), radii, shadows per enterprise banking spec.
   All class names used by existing pages are preserved and enhanced here —
   this file only changes presentation, never markup/behavior.
   ========================================================================== */

:root {
  --navy: #0F172A;
  --navy-mid: #1E293B;
  --navy-light: #334155;
  --accent: #2563EB;
  --accent-light: #60a5fa;
  --accent-dark: #1D4ED8;
  --success: #10B981;
  --success-dark: #059669;
  --warning: #F59E0B;
  --danger: #EF4444;
  --bg: #F8FAFC;
  --surface: #FFFFFF;
  --muted: #64748B;
  --muted-light: #94A3B8;
  --border: #E5E7EB;

  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(15,23,42,.04), 0 1px 3px rgba(15,23,42,.06);
  --shadow-md: 0 4px 14px rgba(15,23,42,.07);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.10);
  --shadow-glow: 0 8px 24px rgba(37,99,235,.22);

  --sp-1: 8px; --sp-2: 16px; --sp-3: 24px; --sp-4: 32px; --sp-5: 40px; --sp-6: 48px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color:var(--ink);
  margin: 0;
  -webkit-font-smoothing: antialiased;
  transition: background-color .35s ease, color .35s ease;
}

/* Smooth theme-toggle crossfade across the main surfaces (kept narrow/targeted
   so it doesn't fight hover/active micro-transitions elsewhere). */
.card, .widget-card, .stat-card, .table-wrap, table.table, .table-wrap table,
.sidebar, .topbar-app, .modal-box, .avatar-menu-panel, .f-input,
.quick-action, .primary-card-widget, .vault-card, .ie-card, .chat-app,
.chat-app-header, .chat-app-messages, .chat-app-input, .bottom-nav {
  transition: background-color .3s ease, border-color .3s ease, color .3s ease, box-shadow .3s ease;
  -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes pop { from { transform: scale(.94); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rippleFx { to { transform: scale(3); opacity: 0; } }

.fade-in { animation: fadeIn .5s ease both; }
.slide-up { animation: slideUp .5s cubic-bezier(.16,1,.3,1) both; }
.slide-up-1 { animation-delay: .05s; } .slide-up-2 { animation-delay: .1s; }
.slide-up-3 { animation-delay: .15s; } .slide-up-4 { animation-delay: .2s; }
.slide-up-5 { animation-delay: .25s; } .slide-up-6 { animation-delay: .3s; }

.skeleton { background: linear-gradient(90deg, #eef1f6 25%, #f7f9fc 37%, #eef1f6 63%); background-size: 800px 100%; animation: shimmer 1.4s linear infinite; border-radius: var(--r-sm); }

#topbar { background: linear-gradient(90deg, var(--navy), #142a4d 55%, var(--navy)); color: rgba(255,255,255,.78); font-size: .8rem; padding: 9px 0; position: relative; }
#topbar::after { content:''; position:absolute; inset:0; background: linear-gradient(90deg, transparent, rgba(96,165,250,.12), transparent); pointer-events:none; }
#topbar .container { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; position: relative; z-index: 1; }
#topbar a { color: rgba(255,255,255,.78); margin-right: 14px; transition: color .15s; }
#topbar a:hover { color: #fff; }

.navbar {
  background: rgba(255,255,255,.72);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 1px 0 rgba(15,23,42,.06);
  position: sticky; top: 0; z-index: 100;
  transition: box-shadow .25s ease, background .25s ease;
}
.navbar.scrolled { background: rgba(255,255,255,.92); box-shadow: 0 8px 28px -12px rgba(15,23,42,.14), 0 1px 0 rgba(15,23,42,.06); }
.navbar .container { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.2rem; color:var(--ink); letter-spacing: -.01em; transition: opacity .15s; }
.brand:hover { opacity: .85; }
.brand-logo-img { height: 38px; width: auto; display: block; }
.brand .logo-mark { width: 38px; height: 38px; border-radius: var(--r-sm); background: linear-gradient(150deg, var(--navy), var(--accent)); display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 4px 10px -3px rgba(15,23,42,.4); }
.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a:not(.btn) {
  color: var(--navy-mid); font-weight: 500; font-size: .89rem; padding: 9px 14px; border-radius: var(--r-pill);
  transition: background .18s ease, color .18s ease, transform .12s ease; display: inline-flex; align-items: center; gap: 6px;
  position: relative;
}
.nav-links a:not(.btn):hover { color: var(--accent); background: rgba(37,99,235,.07); }
.nav-links a:not(.btn):active { transform: scale(.96); }
.nav-links a.active:not(.btn) { color: var(--accent); background: rgba(37,99,235,.09); font-weight: 600; }
.nav-cta { display: flex; gap: 10px; align-items: center; }
.nav-toggle { display: none; background: none; border: none; font-size: 1.6rem; color:var(--ink); cursor: pointer; width: 40px; height: 40px; border-radius: 10px; transition: background .15s; }
.nav-toggle:hover { background: rgba(15,23,42,.06); }
.nav-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--border); background: #fff;
  display: inline-flex; align-items: center; justify-content: center; color: var(--muted); cursor: pointer;
  transition: all .18s ease; position: relative; text-decoration: none; box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.nav-icon-btn:hover { border-color: var(--accent); color: var(--accent); background: rgba(37,99,235,.06); transform: translateY(-1px); box-shadow: 0 4px 10px -4px rgba(37,99,235,.3); }
.nav-icon-btn:active { transform: translateY(0) scale(.94); }

@media (max-width: 900px) {
  .nav-links { position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 16px 20px; gap: 4px; box-shadow: 0 16px 32px -8px rgba(15,23,42,.14); display: block; max-height: 0; overflow: hidden; opacity: 0; transform: translateY(-8px); transition: max-height .3s ease, opacity .25s ease, transform .25s ease; pointer-events: none; }
  .nav-links.open { max-height: 480px; opacity: 1; transform: translateY(0); pointer-events: auto; }
  .nav-toggle { display: flex; align-items: center; justify-content: center; }
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: .7rem 1.5rem; border-radius: var(--r-pill); font-weight: 600; font-size: .89rem;
  border: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background .15s ease, opacity .15s ease;
  position: relative; overflow: hidden; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.97); }
.btn-navy { background: linear-gradient(135deg, var(--navy), var(--navy-mid)); color: #fff; box-shadow: var(--shadow-md); }
.btn-navy:hover { box-shadow: var(--shadow-lg); transform: translateY(-1px); color: #fff; }
.btn-accent { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; box-shadow: var(--shadow-glow); }
.btn-accent:hover { transform: translateY(-1px); color: #fff; filter: brightness(1.04); }
.btn-outline { background: transparent; border: 2px solid var(--navy); color:var(--ink); }
.btn-outline:hover { background: var(--navy); color: #fff; }
.btn-outline-white { background: transparent; border: 2px solid rgba(255,255,255,.6); color: #fff; }
.btn-outline-white:hover { background: #fff; color:var(--ink); }
.btn-success { background: linear-gradient(135deg, var(--success), var(--success-dark)); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-sm { padding: .45rem 1rem; font-size: .8rem; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none !important; }
.btn:focus-visible { outline-offset: 3px; }

.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255,255,255,.55); transform: scale(0); pointer-events: none; animation: rippleFx .55s ease-out; }

.btn.is-loading { color: transparent !important; pointer-events: none; }
.btn.is-loading::after {
  content: ''; position: absolute; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.4); border-top-color: #fff; animation: spin .6s linear infinite;
}
.btn-outline.is-loading::after { border-color: rgba(15,23,42,.25); border-top-color: var(--navy); }

.hero { background: radial-gradient(120% 140% at 15% -10%, #1e3a5f 0%, var(--navy) 55%, #060b16 100%); color: #fff; padding: 100px 0 80px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(37,99,235,.25), transparent 70%); top: -220px; right: -160px; }
.hero::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(16,185,129,.13), transparent 70%); bottom: -180px; left: -120px; }
.hero h1 { font-size: 2.75rem; font-weight: 800; line-height: 1.12; margin-bottom: 18px; letter-spacing: -.02em; }
.hero h1 span { color: var(--accent-light); }
.hero p.lead { color: rgba(255,255,255,.78); font-size: 1.1rem; max-width: 520px; line-height: 1.6; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; position: relative; z-index: 1; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; } .hero h1 { font-size: 2.1rem; } }
.badge-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; padding: .4rem 1rem; background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.18); border-radius: var(--r-pill); margin-bottom: 18px; backdrop-filter: blur(6px); }
.stat-row { display: flex; gap: 36px; margin-top: 30px; flex-wrap: wrap; }
.stat-row strong { font-size: 1.5rem; display: block; font-variant-numeric: tabular-nums; }
.stat-row small { color: rgba(255,255,255,.6); }
.hero-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hero-card { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14); border-radius: var(--r-md); padding: 20px; backdrop-filter: blur(10px); transition: transform .2s, background .2s; }
.hero-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.09); }
.hero-card i { font-size: 1.6rem; margin-bottom: 8px; display: block; color: var(--accent-light); }

.hero-mock {
  background: linear-gradient(165deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.14); border-radius: 20px; padding: 0; backdrop-filter: blur(18px);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.06) inset; overflow: hidden;
}
.hero-mock .mock-titlebar { display: flex; align-items: center; gap: 6px; padding: 13px 16px; background: rgba(255,255,255,.04); border-bottom: 1px solid rgba(255,255,255,.08); }
.hero-mock .mock-titlebar span { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.hero-mock .mock-titlebar span:nth-child(1) { background: #ef4444; }
.hero-mock .mock-titlebar span:nth-child(2) { background: #f59e0b; }
.hero-mock .mock-titlebar span:nth-child(3) { background: #10b981; }
.hero-mock .mock-titlebar small { margin-left: 10px; color: rgba(255,255,255,.35); font-size: .72rem; letter-spacing: .03em; }
.hero-mock .mock-body { padding: 22px; }
.hero-mock .mock-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.hero-mock .mock-pill { font-size: .72rem; padding: 3px 10px; border-radius: var(--r-pill); background: rgba(16,185,129,.18); color: #6ee7b7; font-weight: 700; box-shadow: inset 0 0 0 1px rgba(110,231,183,.25); }
.hero-mock .mock-line { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 8px; box-shadow: inset 0 1px 2px rgba(0,0,0,.3); }
.hero-mock .mock-line > span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-light), var(--success)); border-radius: 6px; box-shadow: 0 0 12px rgba(96,165,250,.5); }
.mock-tx { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); font-size: .82rem; }
.mock-tx:last-child { border-bottom: none; }
.mock-tx .dot { width: 32px; height: 32px; border-radius: 10px; display: flex; align-items: center; justify-content: center; margin-right: 10px; flex-shrink: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14), 0 2px 6px rgba(0,0,0,.25); }

.section { padding: 80px 0; }
.section-title { text-align: center; margin-bottom: 48px; }
.section-title .eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--accent); font-weight: 700; }
.section-title h2 { font-weight: 800; color:var(--ink); font-size: 2.1rem; margin: 10px 0 0; letter-spacing: -.02em; }
.divider { width: 56px; height: 4px; background: linear-gradient(90deg, var(--navy), var(--accent)); border-radius: 4px; margin: 16px auto 0; }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
@media (max-width: 900px) { .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; } }

/* ==========================================================================
   Layout utility classes — replace one-off inline grid-template-columns
   declarations used across dashboard pages. Keeping the column ratio in a
   class (instead of an inline style) means the mobile breakpoint below can
   actually win the cascade instead of losing to inline-style specificity.
   ========================================================================== */
.grid-side-lg { display: grid; grid-template-columns: 380px 1fr; gap: 32px; align-items: start; }
.grid-side-md { display: grid; grid-template-columns: 340px 1fr; gap: 32px; align-items: start; }
.grid-wide { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: start; }
.grid-even { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; align-items: start; }
.quick-actions-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.filter-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 12px; align-items: end; }

@media (max-width: 900px) {
  .grid-side-lg, .grid-side-md, .grid-wide, .grid-even { grid-template-columns: 1fr; }
  .filter-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .filter-grid { grid-template-columns: 1fr; }
}


.card {
  background: var(--surface); border-radius: var(--r-md); padding: 26px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--border);
  transition: box-shadow .2s ease, transform .2s ease;
}
a.card:hover, .card.hoverable:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.icon-box {
  width: 54px; height: 54px; border-radius: 16px; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, var(--navy) 0%, var(--accent) 130%); color: #fff; font-size: 1.5rem; margin-bottom: 16px;
  box-shadow: 0 10px 22px -8px rgba(15,23,42,.45), inset 0 1px 0 rgba(255,255,255,.25), inset 0 0 0 1px rgba(255,255,255,.08);
  position: relative;
}
.icon-box::after { content:''; position:absolute; inset:0; border-radius:inherit; background: linear-gradient(150deg, rgba(255,255,255,.22), transparent 55%); pointer-events:none; }
.card h5 { font-weight: 700; color:var(--ink); margin: 0 0 8px; letter-spacing: -.01em; }
.card p { color: var(--muted); font-size: .92rem; margin: 0; line-height: 1.6; }

.cta-strip { background: linear-gradient(135deg, var(--navy), #061223); border-radius: var(--r-lg); padding: 56px; color: #fff; text-align: center; position: relative; overflow: hidden; }
.cta-strip::after { content:''; position:absolute; width:400px; height:400px; background:radial-gradient(circle, rgba(37,99,235,.25), transparent 70%); top:-150px; right:-100px; }
.cta-strip h3 { font-size: 1.8rem; font-weight: 800; margin-bottom: 10px; position: relative; }
.cta-strip p, .cta-strip a { position: relative; }

/* ==========================================================================
   Realistic phone device frame — used to showcase the mobile dashboard on
   the marketing site so it visually matches the real product.
   ========================================================================== */
.phone-frame {
  width: 290px; background: linear-gradient(160deg, #1a2438, #0a0f1e); border-radius: 44px; padding: 14px;
  box-shadow: 0 40px 80px -24px rgba(0,0,0,.5), inset 0 0 0 2px rgba(255,255,255,.06), inset 0 0 0 8px #05080f;
  position: relative;
}
.phone-frame::before { content:''; position:absolute; left:50%; top:26px; transform:translateX(-50%); width:70px; height:20px; background:#05080f; border-radius:12px; z-index:3; }
.phone-frame .phone-screen { background: var(--bg-light, #f1f5f9); border-radius: 32px; overflow: hidden; position: relative; box-shadow: inset 0 0 0 1px rgba(0,0,0,.08); }
.phone-frame .phone-side-btn { position: absolute; right: -3px; top: 130px; width: 3px; height: 60px; background: #05080f; border-radius: 2px 0 0 2px; }

/* Floating badge overlay for image sections */
.img-frame { position: relative; }
.img-frame img { display: block; box-shadow: 0 30px 60px -20px rgba(15,23,42,.35); }
.floating-badge {
  position: absolute; display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px;
  padding: 12px 16px; box-shadow: 0 20px 40px -12px rgba(15,23,42,.28), 0 0 0 1px rgba(15,23,42,.04);
}
.floating-badge .fb-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.15rem; flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.3); }
.floating-badge strong { display: block; font-size: .95rem; color: var(--ink); line-height: 1.2; }
.floating-badge small { color: var(--muted); font-size: .75rem; }

/* Partner / trust badge chips (text wordmarks, styled as premium badges — no external logo assets needed) */
.partner-badges { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; }
.partner-badge {
  display: flex; align-items: center; gap: 9px; background: #fff; border: 1px solid var(--border); border-radius: 14px;
  padding: 14px 22px; box-shadow: 0 6px 18px -8px rgba(15,23,42,.12); min-width: 150px; justify-content: center;
}
.partner-badge i { font-size: 1.3rem; color: var(--accent); }
.partner-badge span { font-weight: 800; color: var(--ink); font-size: 1.02rem; letter-spacing: -.01em; }
.partner-badge small { display: block; color: var(--muted); font-size: .68rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

footer { background: var(--navy); color: rgba(255,255,255,.7); padding: 56px 0 24px; margin-top: 40px; }
footer h6 { color: #fff; font-weight: 700; margin-bottom: 16px; letter-spacing: -.01em; }
footer a { color: rgba(255,255,255,.62); display: block; margin-bottom: 9px; font-size: .89rem; transition: color .15s; }
footer a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 32px; padding-top: 22px; text-align: center; font-size: .82rem; }

.f-group { margin-bottom: 18px; position: relative; }
.f-label { display: block; font-weight: 600; font-size: .84rem; margin-bottom: 6px; color: var(--navy-mid); }
.f-input, select.f-input, textarea.f-input {
  width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--border); border-radius: var(--r-sm);
  font-family: inherit; font-size: .92rem; color:var(--ink); outline: none; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.f-input:hover { border-color: #cbd5e1; }
.f-input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(37,99,235,.10); }
.f-hint { font-size: .78rem; color: var(--muted); margin-top: 5px; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 700px) { .f-row { grid-template-columns: 1fr; } }

.f-pw-wrap { position: relative; }
.f-pw-wrap .f-input { padding-right: 2.6rem; }
.pw-strength-track { height: 5px; border-radius: 4px; background: #E5E7EB; margin-top: 8px; overflow: hidden; }
.pw-strength-track span { display: block; height: 100%; width: 0; border-radius: 4px; transition: width .2s ease, background .2s ease; }

.otp-card { text-align: center; }
.otp-card-icon { width: 56px; height: 56px; border-radius: 16px; background: linear-gradient(150deg,var(--navy),var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; margin: 0 auto 16px; box-shadow: 0 10px 22px -8px rgba(15,23,42,.4), inset 0 1px 0 rgba(255,255,255,.25); }
.otp-code-input { text-align: center; font-size: 1.6rem; font-weight: 800; letter-spacing: 10px; padding: 14px !important; font-family: 'SFMono-Regular', Consolas, monospace; }

/* ---- PIN pad modal (numeric keypad instead of a plain password field) ---- */
.pinpad-box { max-width: 340px; }
.pinpad-dots { display: flex; justify-content: center; gap: 16px; margin: 6px 0 14px; }
.pinpad-dots.shake { animation: pinShake .4s ease; }
.pinpad-dot { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--border); background: transparent; transition: background .15s, border-color .15s, transform .15s; }
.pinpad-dot.filled { background: var(--accent); border-color: var(--accent); transform: scale(1.1); }
@keyframes pinShake { 0%,100% { transform: translateX(0); } 20%,60% { transform: translateX(-8px); } 40%,80% { transform: translateX(8px); } }
.pinpad-keys { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 8px; }
.pinpad-keys button {
  height: 58px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface);
  font-size: 1.3rem; font-weight: 700; color: var(--ink); cursor: pointer; transition: all .12s ease;
}
.pinpad-keys button:hover { border-color: var(--accent); background: rgba(37,99,235,.06); }
.pinpad-keys button:active { transform: scale(.92); background: rgba(37,99,235,.12); }
.f-pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; padding: 4px; }
.f-pw-toggle:hover { color:var(--ink); }

.alert { padding: 14px 18px; border-radius: var(--r-sm); margin-bottom: 18px; font-size: .89rem; border: 1px solid transparent; border-left-width: 4px; display: flex; align-items: flex-start; gap: 10px; }
.alert-success { background: #ecfdf5; color: #047857; border-color: #a7f3d0; border-left-color: var(--success); }
.alert-danger { background: #fef2f2; color: #b91c1c; border-color: #fecaca; border-left-color: var(--danger); }
.alert-info { background: #eff6ff; color: #1e40af; border-color: #bfdbfe; border-left-color: var(--accent); }
.alert-warning { background: #fffbeb; color: #b45309; border-color: #fde68a; border-left-color: var(--warning); }

.auth-wrap { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .auth-wrap { grid-template-columns: 1fr; } }
.auth-side { background: radial-gradient(120% 140% at 20% 0%, #1e3a5f 0%, var(--navy) 55%, #050a14 100%); color: #fff; padding: 54px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.auth-side::after { content:''; position:absolute; width:400px; height:400px; border-radius:50%; background:radial-gradient(circle, rgba(37,99,235,.18), transparent 70%); bottom:-160px; left:-110px; }
.auth-form-wrap { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 440px; }
.auth-box h2 { font-weight: 800; color:var(--ink); margin-bottom: 6px; letter-spacing: -.02em; }
.auth-box p.sub { color: var(--muted); margin-bottom: 28px; font-size: .92rem; }

.app-shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; background: linear-gradient(180deg, var(--navy) 0%, #060b16 100%); color: rgba(255,255,255,.8);
  flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; transition: width .2s ease, transform .3s cubic-bezier(.2,.9,.3,1); z-index: 200;
  box-shadow: 4px 0 24px -8px rgba(0,0,0,.25);
}
.sidebar .brand { color: #fff; padding: 22px 20px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; align-items: center; gap: 10px; font-weight: 800; }
.sidebar .brand img { height: 30px; width: auto; filter: brightness(0) invert(1); }
.footer-brand-img { height: 34px; width: auto; filter: brightness(0) invert(1); margin-bottom: 14px; display: block; }
.sidebar nav { padding: 16px 12px; }
.sidebar .nav-section-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.35); font-weight: 700; padding: 14px 14px 6px; }
.sidebar nav a {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 12px;
  color: rgba(255,255,255,.72); font-size: .89rem; font-weight: 500; margin-bottom: 2px; position: relative;
  transition: background .18s ease, color .18s ease, transform .12s ease;
}
.sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; transform: translateX(2px); }
.sidebar nav a:active { transform: scale(.98); }
.sidebar nav a.active { background: linear-gradient(135deg, rgba(37,99,235,.9), rgba(29,78,216,.65)); color: #fff; box-shadow: 0 6px 18px -6px rgba(37,99,235,.55), inset 0 1px 0 rgba(255,255,255,.15); }
.sidebar nav a i { width: 18px; text-align: center; flex-shrink: 0; }
.sidebar nav a svg { width: 18px; height: 18px; flex-shrink: 0; }

.main { flex: 1; min-width: 0; }
.topbar-app {
  background: rgba(255,255,255,.78); backdrop-filter: saturate(180%) blur(16px); -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 14px 28px; display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 90;
  flex-wrap: wrap; row-gap: 10px; transition: box-shadow .25s ease, background .25s ease;
}
.topbar-app.scrolled { box-shadow: 0 8px 24px -14px rgba(15,23,42,.25); }
.content { padding: 28px; }
.sidebar-toggle { display: none; background: none; border: none; font-size: 1.5rem; color:var(--ink); cursor: pointer; width: 38px; height: 38px; border-radius: 10px; transition: background .15s; }
.sidebar-toggle:hover { background: rgba(15,23,42,.06); }

.topbar-search { position: relative; display: none; }
.topbar-search input {
  width: 220px; padding: 8px 14px 8px 36px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: #f1f5f9; font-size: .85rem; outline: none; transition: all .2s ease;
}
.topbar-search input:focus { background: #fff; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(37,99,235,.1); width: 260px; }
.topbar-search .search-ic { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted-light); pointer-events: none; }
@media (min-width: 700px) { .topbar-search { display: block; } }

.avatar-menu { position: relative; }
.avatar-menu-panel {
  position: absolute; right: 0; top: calc(100% + 12px); background: #fff; border: 1px solid var(--border);
  border-radius: 16px; box-shadow: 0 20px 45px -12px rgba(15,23,42,.22), 0 0 0 1px rgba(15,23,42,.03); min-width: 230px; padding: 8px; display: none; z-index: 300;
  transform-origin: top right;
}
.avatar-menu-panel.open { display: block; animation: pop .18s cubic-bezier(.2,1.4,.4,1) both; }
.avatar-menu-panel a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--ink); font-size: .87rem; font-weight: 500; transition: background .15s; }
.avatar-menu-panel a:hover { background: #f1f5f9; }
.avatar-menu-panel .divider-line { height: 1px; background: var(--border); margin: 6px 4px; }

@media (max-width: 960px) {
  .sidebar { position: fixed; left: 0; transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .sidebar-toggle { display: block; }
  .content { padding: 18px; }
  .sidebar-close-btn { display: inline-flex !important; }
}
.sidebar-close-btn {
  display: none; margin-left: auto; background: none; border: none; color: #fff; font-size: 1.3rem;
  cursor: pointer; padding: 4px; opacity: .8;
}
.sidebar-close-btn:hover { opacity: 1; }
.sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(6,11,22,.55); z-index: 150;
  backdrop-filter: blur(1px);
}
.sidebar-backdrop.open { display: block; }

.balance-card { background: linear-gradient(135deg, var(--navy) 0%, #16305c 60%, var(--accent-dark) 130%); border-radius: var(--r-lg); padding: 30px; color: #fff; position: relative; overflow: hidden; box-shadow: var(--shadow-lg); }
.balance-card::after { content:''; position:absolute; width:240px; height:240px; border-radius:50%; background:radial-gradient(circle, rgba(255,255,255,.09), transparent 70%); top:-100px; right:-70px; }
.balance-card .amt { font-size: 2.2rem; font-weight: 800; margin: 6px 0 20px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.balance-card .acct { font-family: 'SFMono-Regular', Consolas, monospace; letter-spacing: 1px; opacity: .85; font-size: .85rem; }

.stat-card { background: var(--surface); border-radius: var(--r-md); padding: 22px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s; position: relative; overflow: hidden; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.stat-card .lbl { color: var(--muted); font-size: .76rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; display: flex; align-items: center; gap: 6px; max-width: calc(100% - 48px); }
.stat-card .val { font-size: 1.55rem; font-weight: 800; color:var(--ink); margin-top: 6px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.stat-card .trend { display: inline-flex; align-items: center; gap: 3px; font-size: .76rem; font-weight: 700; margin-top: 8px; padding: 2px 8px; border-radius: var(--r-pill); }
.stat-card .trend.up { color: var(--success-dark); background: #ecfdf5; }
.stat-card .trend.down { color: #b91c1c; background: #fef2f2; }
.stat-card .stat-icon { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; opacity: .9; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.stat-card .mini-chart { margin-top: 12px; height: 32px; }

.widget-card { background: var(--surface); border-radius: var(--r-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); overflow: hidden; }
.widget-card .widget-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--border); flex-wrap: wrap; gap: 8px 14px; }
.widget-card .widget-head h6 { margin: 0; font-weight: 700; color:var(--ink); font-size: .95rem; display: flex; align-items: center; gap: 8px; min-width: 0; }
.widget-card .widget-body { padding: 20px; }
.widget-link { font-size: .78rem; font-weight: 600; color: var(--accent); }
.widget-link:hover { text-decoration: underline; }

.quick-action { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 16px 10px; border-radius: var(--r-sm); border: 1px solid var(--border); background: #fff; text-align: center; transition: all .18s; }
.quick-action:hover { border-color: var(--accent); background: rgba(37,99,235,.05); transform: translateY(-2px); }
.quick-action .qa-ic { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.14); }
.quick-action span { font-size: .78rem; font-weight: 600; color: var(--navy-mid); }

.progress-track { height: 8px; border-radius: var(--r-pill); background: #eef1f6; overflow: hidden; }
.progress-track > span { display: block; height: 100%; border-radius: var(--r-pill); background: linear-gradient(90deg, var(--accent), var(--success)); }

.beneficiary-chip { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: var(--r-sm); transition: background .15s; }
.beneficiary-chip:hover { background: #f8fafc; }

table.table { width: 100%; border-collapse: collapse; background: #fff; }
table.table th { text-align: left; font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 13px 16px; border-bottom: 2px solid var(--border); background: #fafbfd; position: sticky; top: 0; z-index: 1; }
table.table td { padding: 14px 16px; border-bottom: 1px solid var(--border); font-size: .88rem; }
table.table tr { transition: background .12s; }
table.table tr:hover td { background: #f8fafc; }
table.table tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; background: #fff; border-radius: var(--r-md); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.table-scroll-area { max-height: 560px; overflow-y: auto; }

/* Below 700px, tables reflow from a horizontally-scrolling grid into stacked
   cards — one per row, each cell labeled — so nothing sits hidden off-screen
   to the right where a thumb wouldn't think to swipe. */
@media (max-width: 700px) {
  table.table.responsive-stack thead { display: none; }
  table.table.responsive-stack, table.table.responsive-stack tbody,
  table.table.responsive-stack tr, table.table.responsive-stack td { display: block; width: 100%; }
  table.table.responsive-stack { border-spacing: 0; }
  table.table.responsive-stack tbody tr {
    border: 1px solid var(--border); border-radius: var(--r-sm); margin: 12px; width: calc(100% - 24px); box-shadow: var(--shadow-sm);
  }
  table.table.responsive-stack td {
    padding: 8px 14px; border-bottom: 1px dashed var(--border); font-size: .85rem;
  }
  table.table.responsive-stack td:last-child { border-bottom: none; }
  table.table.responsive-stack td::before {
    content: attr(data-label); display: block; font-weight: 600; color: var(--muted);
    font-size: .68rem; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px;
  }
  table.table.responsive-stack td.stack-full { text-align: center; padding: 26px 14px; }
  table.table.responsive-stack td.stack-full::before { content: none; }
}

.merchant-ic { width: 34px; height: 34px; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #fff; }

.pagination-bar { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); flex-wrap: wrap; gap: 10px; }
.pagination-bar .pg-btns { display: flex; gap: 6px; }
.pg-btn { width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--border); background: #fff; color: var(--navy-mid); font-size: .82rem; font-weight: 600; cursor: pointer; }
.pg-btn:hover { border-color: var(--accent); color: var(--accent); }
.pg-btn.active { background: var(--navy); border-color: var(--navy); color: #fff; }

.pill { display: inline-flex; align-items: center; gap: 5px; padding: 4px 12px; border-radius: var(--r-pill); font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; }
.pill-success { background: #ecfdf5; color: #047857; }
.pill-pending { background: #fffbeb; color: #b45309; }
.pill-reversed { background: #fef2f2; color: #b91c1c; }
.pill-active { background: #ecfdf5; color: #047857; }
.pill-inactive { background: #fef2f2; color: #b91c1c; }
.pill-dormant { background: #fffbeb; color: #b45309; }
.pill-banned { background: #fef2f2; color: #7f1d1d; font-weight: 800; }
/* ==========================================================================
   Responsive fixes — dashboard/admin app screens
   Several pages set an inline grid-template-columns (e.g. "380px 1fr") for
   nice fixed-width sidebars on desktop. Inline styles beat external media
   queries by specificity, so without this override those layouts stayed
   two-column and overflowed horizontally on phones/tablets. This block
   forces sane stacking at common breakpoints regardless of inline styles.
   ========================================================================== */
@media (max-width: 900px) {
  .grid-2[style*="grid-template-columns"],
  .grid-3[style*="grid-template-columns"],
  .grid-4[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
  form[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
  }
}
@media (max-width: 560px) {
  .widget-body[style*="grid-template-columns:1fr 1fr"],
  .widget-body[style*="grid-template-columns: 1fr 1fr"] {
    grid-template-columns: 1fr 1fr !important;
  }
}

@media (max-width: 700px) {
  .topbar-app { padding: 12px 16px; }
  .topbar-title { font-size: .92rem; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .content { padding: 14px; }
  .balance-card { padding: 22px; }
  .balance-card .amt { font-size: 1.7rem; }
  .card { padding: 18px; }
  .widget-card .widget-head { padding: 14px 16px; }
  .widget-card .widget-body { padding: 14px; }
  table.table th, table.table td { padding: 10px 12px; font-size: .82rem; }
  .stat-card .val { font-size: 1.3rem; }
}

/* kv-list rows can carry long monospace values (IBAN, card numbers, refs) —
   let them wrap onto a second line instead of forcing the row wider than
   the viewport. */
.kv-list li { flex-wrap: wrap; gap: 6px 12px; }
.kv-list li span:last-child { word-break: break-word; text-align: right; max-width: 65%; }
@media (max-width: 480px) {
  .kv-list li span:last-child { max-width: 100%; text-align: left; flex-basis: 100%; }
}

/* Buttons/forms rendered in a row should always be free to wrap on narrow
   screens rather than squeezing or overflowing. */
.card form, .widget-card form { max-width: 100%; }
@media (max-width: 480px) {
  .btn-block, .card > form > .btn { width: 100%; }
}

.pill-credit { background: #ecfdf5; color: #047857; }
.pill-debit { background: #fef2f2; color: #b91c1c; }

.avatar-circle { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(150deg,var(--navy),var(--accent)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: .95rem; flex-shrink: 0; box-shadow: inset 0 1px 0 rgba(255,255,255,.3), 0 4px 10px -3px rgba(15,23,42,.4); }

.modal-backdrop-c { position: fixed; inset: 0; background: rgba(15,23,42,.55); backdrop-filter: blur(2px); display: none; align-items: center; justify-content: center; z-index: 999; padding: 16px; }
.modal-backdrop-c.show { display: flex; }
.modal-box { background: #fff; border-radius: var(--r-md); max-width: 460px; width: 100%; padding: 28px; position: relative; animation: pop .22s cubic-bezier(.16,1,.3,1); box-shadow: var(--shadow-lg); }
.modal-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 1.3rem; color: var(--muted); cursor: pointer; }

.notif-popup .modal-box { border-top: 6px solid var(--accent); }
.notif-popup.type-success .modal-box { border-top-color: var(--success); }
.notif-popup.type-warning .modal-box { border-top-color: var(--warning); }
.notif-popup.type-danger .modal-box { border-top-color: var(--danger); }

/* ==========================================================================
   Chat app — WhatsApp/Telegram style fixed layout (stationary, no page zoom)
   ========================================================================== */
.chat-app {
  display: flex; flex-direction: column;
  height: calc(100dvh - 190px);
  min-height: 420px; max-height: 760px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 18px;
  overflow: hidden; box-shadow: var(--shadow-sm);
}
.chat-app-header {
  flex: 0 0 auto; display: flex; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--border); background: var(--surface); z-index: 2;
}
.chat-app-header .status-line { display: flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--muted); }
.chat-app-header .status-line .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); flex-shrink: 0; }

.chat-app-messages {
  flex: 1 1 auto; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain;
  padding: 16px; display: flex; flex-direction: column; gap: 2px;
  background:
    radial-gradient(circle at 20% 10%, rgba(37,99,235,.035) 0%, transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(37,99,235,.035) 0%, transparent 40%),
    var(--bg);
}
.chat-day-sep { text-align: center; margin: 14px 0 10px; }
.chat-day-sep span { background: var(--surface); border: 1px solid var(--border); color: var(--muted); font-size: .7rem; font-weight: 700; padding: 4px 12px; border-radius: var(--r-pill); }
.chat-bubble-row { display: flex; margin-bottom: 3px; }
.chat-bubble-row.me { justify-content: flex-end; }
.chat-bubble-row.them { justify-content: flex-start; }
.chat-bubble {
  max-width: 76%; padding: 9px 13px 7px; border-radius: 16px; font-size: .89rem; line-height: 1.45;
  box-shadow: 0 1px 1px rgba(15,23,42,.05); word-break: break-word; position: relative;
}
.chat-bubble-row.me .chat-bubble { background: linear-gradient(135deg, var(--accent), var(--accent-dark)); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble-row.them .chat-bubble { background: var(--surface); border: 1px solid var(--border); color: var(--ink); border-bottom-left-radius: 4px; }
.chat-bubble .meta { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 3px; font-size: .65rem; opacity: .7; }
.chat-bubble-row.me .chat-bubble .meta { color: rgba(255,255,255,.85); }
.chat-bubble-row.them .chat-bubble .meta { color: var(--muted); }
.chat-bubble .meta .mdi-check-all { font-size: .85rem; }

.chat-app-input {
  flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 10px 12px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border); background: var(--surface); z-index: 2;
}
.chat-app-input input[type="text"] {
  flex: 1; border: 1.5px solid var(--border); border-radius: var(--r-pill); padding: 11px 16px;
  font-size: 16px; font-family: inherit; color: var(--ink); background: var(--bg); outline: none;
  transition: border-color .15s;
}
.chat-app-input input[type="text"]:focus { border-color: var(--accent); }
.chat-app-input button {
  width: 42px; height: 42px; border-radius: 50%; border: none; background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; cursor: pointer; flex-shrink: 0;
  transition: transform .1s;
}
.chat-app-input button:active { transform: scale(.92); }

.chat-conv-list { width: 300px; flex-shrink: 0; border-right: 1px solid var(--border); overflow-y: auto; background: var(--surface); }
.chat-conv-item { display: block; padding: 13px 16px; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.chat-conv-item.active { background: rgba(37,99,235,.08); }
.chat-conv-item strong { font-size: .88rem; color: var(--ink); }
.chat-conv-item p { font-size: .8rem; color: var(--muted); margin: 3px 0 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 700px) {
  .chat-app { height: calc(100dvh - 150px); border-radius: 12px; }
  .chat-app > div[style*="display:flex"] { flex-direction: column; }
  .chat-conv-list { width: 100%; max-height: 140px; border-right: none; border-bottom: 1px solid var(--border); flex-shrink: 0; }
}

/* ==========================================================================
   Homepage — editorial layout components (distinct from generic template)
   ========================================================================== */
.hero-centered { max-width: 760px; margin: 0 auto; text-align: center; position: relative; z-index: 1; }
.hero-centered .lead { max-width: 620px; margin: 0 auto; }
.hero-centered .stat-row { justify-content: center; }
.hero-cta-row { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 26px; }

.stat-band { background: #fff; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.stat-band .stat-band-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat-band .stat-band-item { padding: 38px 20px; text-align: center; border-left: 1px solid var(--border); }
.stat-band .stat-band-item:first-child { border-left: none; }
.stat-band .stat-band-item .num { font-size: 2.1rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.stat-band .stat-band-item .lbl { color: var(--muted); font-size: .82rem; margin-top: 8px; display: block; }
@media (max-width: 800px) { .stat-band .stat-band-grid { grid-template-columns: repeat(2, 1fr); } .stat-band .stat-band-item:nth-child(2) { border-left: 1px solid var(--border); } .stat-band .stat-band-item:nth-child(odd) { border-left: none; } }

.feature-row { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; padding: 70px 0; }
.feature-row:not(:last-child) { border-bottom: 1px solid var(--border); }
.feature-row.reverse .feature-copy { order: 2; }
.feature-row.reverse .feature-visual { order: 1; }
.feature-row .feature-num { font-size: .82rem; font-weight: 800; color: var(--accent); letter-spacing: .08em; margin-bottom: 14px; display: block; }
.feature-row h3 { font-size: 1.6rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em; margin: 0 0 14px; line-height: 1.25; }
.feature-row p { color: var(--muted); line-height: 1.75; font-size: .96rem; margin-bottom: 20px; }
.feature-visual-panel { background: var(--bg); border: 1px solid var(--border); border-radius: 20px; padding: 28px; box-shadow: 0 20px 50px -24px rgba(15,23,42,.18); }
@media (max-width: 860px) { .feature-row { grid-template-columns: 1fr; gap: 32px; padding: 44px 0; } .feature-row.reverse .feature-copy, .feature-row.reverse .feature-visual { order: initial; } }

.wallet-visual { display: flex; flex-direction: column; gap: 10px; }
.wallet-visual .wv-row { display: flex; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.wallet-visual .wv-row .wv-flag { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: .74rem; color: #fff; flex-shrink: 0; }
.wallet-visual .wv-amt { font-weight: 800; color: var(--ink); font-variant-numeric: tabular-nums; }

.transfer-visual { display: flex; flex-direction: column; align-items: center; gap: 0; }
.transfer-visual .tv-node { width: 100%; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; display: flex; align-items: center; gap: 12px; }
.transfer-visual .tv-node .tv-av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; flex-shrink: 0; }
.transfer-visual .tv-arrow { padding: 10px 0; color: var(--accent); display: flex; flex-direction: column; align-items: center; }
.transfer-visual .tv-arrow small { background: rgba(37,99,235,.1); color: var(--accent); font-weight: 700; padding: 3px 10px; border-radius: var(--r-pill); font-size: .68rem; margin-top: 4px; }

.compliance-list { display: flex; flex-direction: column; }
.compliance-row { display: flex; align-items: flex-start; gap: 18px; padding: 22px 0; border-bottom: 1px solid rgba(255,255,255,.1); }
.compliance-row:last-child { border-bottom: none; }
.compliance-row .cr-ic { width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; flex-shrink: 0; }
.compliance-row h5 { color: #fff; font-size: .98rem; margin: 0 0 4px; }
.compliance-row p { color: rgba(255,255,255,.55); font-size: .86rem; margin: 0; line-height: 1.6; }

.quote-feature { max-width: 740px; margin: 0 auto; text-align: center; }
.quote-feature .qf-mark { font-size: 3.5rem; line-height: 1; color: var(--accent); opacity: .25; font-family: Georgia, serif; margin-bottom: 6px; }
.quote-feature p { font-size: 1.35rem; line-height: 1.55; color: var(--ink); font-weight: 500; letter-spacing: -.01em; }
.quote-feature .qf-person { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 28px; }
.quote-feature .qf-person strong { color: var(--ink); font-size: .92rem; display: block; }
.quote-feature .qf-person small { color: var(--muted); }
.quote-dots { display: flex; justify-content: center; gap: 8px; margin-top: 30px; }
.quote-dots span { width: 7px; height: 7px; border-radius: 50%; background: var(--border); }
.quote-dots span.active { background: var(--accent); width: 20px; border-radius: 4px; }

.cta-band { background: var(--ink); border-radius: 24px; padding: 56px 60px; display: flex; align-items: center; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.cta-band h3 { color: #fff; font-size: 1.5rem; font-weight: 800; margin: 0 0 8px; letter-spacing: -.02em; }
.cta-band p { color: rgba(255,255,255,.6); margin: 0; font-size: .92rem; }
@media (max-width: 700px) { .cta-band { padding: 36px 28px; text-align: center; justify-content: center; } }

/* ---- Chat attachments: images, files, attach button, preview, lightbox ---- */
.chat-bubble.has-media { padding: 5px; }
.chat-bubble .chat-img {
  max-width: 240px; max-height: 280px; width: 100%; height: auto; display: block; border-radius: 12px;
  cursor: pointer; object-fit: cover; transition: opacity .15s;
}
.chat-bubble .chat-img:hover { opacity: .92; }
.chat-bubble.has-media .bubble-caption { padding: 7px 6px 2px; }
.chat-bubble.has-media .meta { padding: 0 6px 3px; }
.chat-file-chip {
  display: flex; align-items: center; gap: 10px; border-radius: 12px; padding: 10px 12px; margin-bottom: 2px;
  text-decoration: none; color: inherit; background: rgba(0,0,0,.05);
}
.chat-bubble-row.me .chat-file-chip { background: rgba(255,255,255,.15); }
.chat-file-chip .cf-ic { width: 34px; height: 34px; border-radius: 9px; background: rgba(37,99,235,.85); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; flex-shrink: 0; }
.chat-file-chip .cf-name { font-size: .82rem; font-weight: 600; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-file-chip .cf-sub { font-size: .68rem; opacity: .7; }

.chat-attach-btn {
  width: 40px; height: 40px; border-radius: 50%; border: none; background: transparent; color: var(--muted);
  display: flex; align-items: center; justify-content: center; font-size: 1.25rem; cursor: pointer; flex-shrink: 0; transition: background .15s, color .15s;
}
.chat-attach-btn:hover { background: rgba(37,99,235,.08); color: var(--accent); }

.chat-preview-strip {
  display: none; align-items: center; gap: 10px; padding: 10px 14px; border-top: 1px solid var(--border);
  background: var(--bg); flex: 0 0 auto;
}
.chat-preview-strip.show { display: flex; }
.chat-preview-strip .cps-thumb { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; background: var(--surface); border: 1px solid var(--border); flex-shrink: 0; }
.chat-preview-strip .cps-file-ic { width: 44px; height: 44px; border-radius: 10px; background: rgba(37,99,235,.12); color: var(--accent); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; flex-shrink: 0; }
.chat-preview-strip .cps-info { flex: 1; min-width: 0; font-size: .8rem; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-preview-strip .cps-remove { width: 30px; height: 30px; border-radius: 50%; border: none; background: rgba(239,68,68,.1); color: var(--danger); display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }

.chat-lightbox {
  display: none; position: fixed; inset: 0; background: rgba(0,0,0,.9); z-index: 2000;
  align-items: center; justify-content: center; padding: 30px;
}
.chat-lightbox.show { display: flex; animation: fadeIn .2s ease both; }
.chat-lightbox img { max-width: 100%; max-height: 90vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.chat-lightbox .cl-close { position: absolute; top: 20px; right: 24px; width: 44px; height: 44px; border-radius: 50%; background: rgba(255,255,255,.12); border: none; color: #fff; font-size: 1.4rem; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.chat-lightbox .cl-close:hover { background: rgba(255,255,255,.22); }

/* ---- Admin conversation list polish ---- */
.chat-conv-item { position: relative; }
.chat-conv-item .cci-row { display: flex; align-items: center; gap: 10px; }
.chat-conv-item .avatar-fallback { width: 38px; height: 38px; font-size: .85rem; flex-shrink: 0; }
.chat-conv-item:hover { background: var(--bg); }
.chat-conv-item.active { border-left: 3px solid var(--accent); }

.badge-dot { position: relative; }
.badge-dot::after { content: attr(data-count); position: absolute; top: -6px; right: -8px; background: var(--danger); color: #fff; font-size: .65rem; font-weight: 700; padding: 1px 6px; border-radius: var(--r-pill); display: none; }
.badge-dot[data-count]:not([data-count="0"])::after { display: inline-block; }

.kv-list { list-style: none; margin: 0; padding: 0; }
.kv-list li { display: flex; justify-content: space-between; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: .89rem; }
.kv-list li:last-child { border-bottom: none; }
.kv-list li span:first-child { color: var(--muted); }
.kv-list li span:last-child { font-weight: 600; }

.text-muted { color: var(--muted); }
.text-center { text-align: center; }
.mt-4 { margin-top: 24px; }
.mb-4 { margin-bottom: 24px; }

.reveal { opacity: 0; }
.reveal.in-view { animation: slideUp .6s cubic-bezier(.16,1,.3,1) both; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ==========================================================================
   Theme system — light/dark mode
   `--ink` is the semantic "primary text" colour (defaults to --navy so every
   existing rule that already reads var(--ink) behaves exactly as before in
   light mode). Dark mode flips the surface/background/text variables only;
   brand-navy elements (sidebar, balance gradients, buttons) intentionally
   keep using literal var(--navy) so they still read as the brand colour.
   ========================================================================== */
:root {
  --ink: var(--navy);
  --tint-success-bg: #ecfdf5; --tint-success-fg: #047857;
  --tint-danger-bg: #fef2f2;  --tint-danger-fg: #b91c1c;
  --tint-warning-bg: #fffbeb; --tint-warning-fg: #b45309;
  --tint-info-bg: #eff6ff;    --tint-info-fg: #1e40af;
  --table-head-bg: #fafbfd;
  --row-hover: #f8fafc;
  --input-bg: #ffffff;
  --scrollbar-thumb: #cbd5e1; --scrollbar-thumb-hover: #94a3b8;
  --overlay: rgba(15,23,42,.55);
  --vault-1: #cbd5e1; --vault-2: #94a3b8; --vault-3: #f1f5f9;
  color-scheme: light;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0A1120;
  --surface: #101A30;
  --ink: #EEF2F9;
  --muted: #93A2BE;
  --muted-light: #6B7A97;
  --border: #22304C;
  --input-bg: #0D1729;
  --table-head-bg: #0D1729;
  --row-hover: #14203A;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.35), 0 1px 3px rgba(0,0,0,.3);
  --shadow-md: 0 4px 18px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 40px rgba(0,0,0,.5);
  --shadow-glow: 0 8px 26px rgba(37,99,235,.35);
  --tint-success-bg: rgba(16,185,129,.14); --tint-success-fg: #34D399;
  --tint-danger-bg: rgba(239,68,68,.14);   --tint-danger-fg: #F87171;
  --tint-warning-bg: rgba(245,158,11,.14); --tint-warning-fg: #FBBF24;
  --tint-info-bg: rgba(37,99,235,.16);     --tint-info-fg: #93C5FD;
  --scrollbar-thumb: #263457; --scrollbar-thumb-hover: #34456e;
  --overlay: rgba(0,0,0,.65);
  --vault-1: #1c2942; --vault-2: #0a1120; --vault-3: #3a4d76;
}

html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* Retint every hardcoded light-mode chip/badge/surface color for dark mode */
html[data-theme="dark"] .pill-success,
html[data-theme="dark"] .pill-active   { background: var(--tint-success-bg); color: var(--tint-success-fg); }
html[data-theme="dark"] .pill-reversed,
html[data-theme="dark"] .pill-inactive,
html[data-theme="dark"] .pill-banned  { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
html[data-theme="dark"] .pill-pending,
html[data-theme="dark"] .pill-dormant { background: var(--tint-warning-bg); color: var(--tint-warning-fg); }
html[data-theme="dark"] .pill-credit   { background: var(--tint-success-bg); color: var(--tint-success-fg); }
html[data-theme="dark"] .pill-debit    { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
html[data-theme="dark"] .stat-card .trend.up   { background: var(--tint-success-bg); color: var(--tint-success-fg); }
html[data-theme="dark"] .stat-card .trend.down { background: var(--tint-danger-bg); color: var(--tint-danger-fg); }
html[data-theme="dark"] .alert-success { background: var(--tint-success-bg); color: var(--tint-success-fg); border-color: rgba(16,185,129,.3); }
html[data-theme="dark"] .alert-danger  { background: var(--tint-danger-bg);  color: var(--tint-danger-fg);  border-color: rgba(239,68,68,.3); }
html[data-theme="dark"] .alert-info    { background: var(--tint-info-bg);    color: var(--tint-info-fg);    border-color: rgba(37,99,235,.3); }
html[data-theme="dark"] .alert-warning { background: var(--tint-warning-bg); color: var(--tint-warning-fg); border-color: rgba(245,158,11,.3); }
html[data-theme="dark"] table.table,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .modal-box,
html[data-theme="dark"] .avatar-menu-panel,
html[data-theme="dark"] .pg-btn { background: var(--surface); }
html[data-theme="dark"] table.table th { background: var(--table-head-bg); color: var(--muted); }
html[data-theme="dark"] table.table tr:hover td,
html[data-theme="dark"] .beneficiary-chip:hover { background: var(--row-hover); }
html[data-theme="dark"] .quick-action { background: var(--surface); }
html[data-theme="dark"] .quick-action:hover { background: rgba(37,99,235,.14); }
html[data-theme="dark"] .f-input, html[data-theme="dark"] select.f-input, html[data-theme="dark"] textarea.f-input { background: var(--input-bg); color: var(--ink); border-color: var(--border); }
html[data-theme="dark"] .topbar-app { background: rgba(16,24,45,.82); border-color: var(--border); }
html[data-theme="dark"] .progress-track { background: #1a2740; }
html[data-theme="dark"] .skeleton { background: linear-gradient(90deg, #16233d 25%, #1c2c4c 37%, #16233d 63%); background-size: 800px 100%; }
html[data-theme="dark"] .modal-backdrop-c { background: var(--overlay); }
html[data-theme="dark"] .divider-line { background: var(--border); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); }
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover { background: var(--scrollbar-thumb-hover); }
html[data-theme="dark"] .avatar-menu-panel a:hover { background: var(--row-hover); }
html[data-theme="dark"] .widget-link { color: #60A5FA; }
html[data-theme="dark"] .quick-action span { color: var(--ink); }
html[data-theme="dark"] .quick-action .qa-ic { box-shadow: inset 0 0 0 1px rgba(255,255,255,.22), 0 2px 10px rgba(0,0,0,.35); }
html[data-theme="dark"] .quick-action:hover { border-color: var(--accent); }
html[data-theme="dark"] .beneficiary-chip strong,
html[data-theme="dark"] .kv-list li span:last-child,
html[data-theme="dark"] .stat-row strong { color: var(--ink); }
html[data-theme="dark"] .avatar-menu-panel a,
html[data-theme="dark"] .f-label,
html[data-theme="dark"] .pg-btn { color: var(--ink); }
html[data-theme="dark"] .pg-btn { border-color: var(--border); background: var(--surface); }

/* ==========================================================================
   Mobile-app style dashboard header (bank name, live clock, theme switch)
   ========================================================================== */
.appbar-brand { display: flex; flex-direction: column; line-height: 1.15; }
.appbar-brand strong { font-size: 1.02rem; font-weight: 800; color: var(--ink); letter-spacing: -.01em; }
.appbar-brand small { font-size: .62rem; font-weight: 700; letter-spacing: .12em; color: var(--muted); text-transform: uppercase; }

.clock-pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 13px; border-radius: var(--r-pill);
  background: var(--surface); border: 1px solid var(--border); font-size: .8rem; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums; box-shadow: var(--shadow-sm);
}
.clock-pill .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,.22); }

.theme-switch {
  position: relative; width: 52px; height: 30px; border-radius: var(--r-pill); border: 1px solid var(--border);
  background: var(--surface); cursor: pointer; padding: 0; flex-shrink: 0; box-shadow: var(--shadow-sm); transition: background .2s;
}
.theme-switch .knob {
  position: absolute; top: 2px; left: 2px; width: 24px; height: 24px; border-radius: 50%;
  background: linear-gradient(135deg,#FDE68A,#F59E0B); color: #92400E; display: flex; align-items: center; justify-content: center;
  font-size: .82rem; transition: transform .25s cubic-bezier(.4,1.6,.4,1), background .25s; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
html[data-theme="dark"] .theme-switch .knob { transform: translateX(22px); background: linear-gradient(135deg,#93C5FD,#2563EB); color: #EFF6FF; }

/* ==========================================================================
   Welcome row
   ========================================================================== */
.welcome-row { display: flex; align-items: center; gap: 12px; margin: 4px 0 18px; }
.welcome-row .avatar-photo {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid var(--surface); box-shadow: 0 0 0 2px var(--border);
}
.welcome-row .avatar-fallback {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg,var(--navy),var(--accent)); color: #fff; font-weight: 800; font-size: 1.1rem;
  box-shadow: 0 0 0 2px var(--border);
}
.welcome-row .greet-lbl { color: var(--accent); font-size: .84rem; font-weight: 600; display: block; }
.welcome-row .greet-name { color: var(--ink); font-size: 1.15rem; font-weight: 800; letter-spacing: -.01em; display: block; }
html[data-theme="dark"] .welcome-row .greet-lbl { color: #60A5FA; }

/* ==========================================================================
   Total-balance hero card w/ vault graphic
   ========================================================================== */
.vault-card {
  background: linear-gradient(150deg, var(--navy) 0%, #16305c 55%, var(--accent-dark) 140%);
  border-radius: 24px; padding: 26px 26px 28px; color: #fff; position: relative; overflow: hidden;
  box-shadow: var(--shadow-lg); border: 1px solid rgba(255,255,255,.08);
}
html[data-theme="dark"] .vault-card { box-shadow: var(--shadow-lg), 0 0 0 1px rgba(96,165,250,.12); }
.vault-card::after { content:''; position:absolute; width:280px; height:280px; border-radius:50%; background:radial-gradient(circle, rgba(96,165,250,.20), transparent 70%); top:-120px; right:-90px; pointer-events:none; }
.vault-card .vc-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; position: relative; z-index: 1; }
.vault-card .vc-label { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; opacity: .68; font-weight: 700; }
.vault-card .vc-eye {
  width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18);
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; transition: background .15s;
}
.vault-card .vc-eye:hover { background: rgba(255,255,255,.2); }
.vault-card .vc-amount { font-size: 2.15rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0 18px; font-variant-numeric: tabular-nums; position: relative; z-index: 1; }
.vault-card .vc-chips { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }
.vault-card .vc-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: var(--r-pill);
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); font-size: .78rem; font-weight: 600;
  backdrop-filter: blur(4px);
}
.vault-card .vc-chip.acct-chip { margin-top: 8px; font-family: 'SFMono-Regular', Consolas, monospace; letter-spacing: .5px; cursor: pointer; }
.vault-card .vc-chip .chip-ic { width: 16px; height: 16px; display: inline-flex; align-items: center; justify-content: center; }
.vault-graphic { position: absolute; right: -6px; bottom: -14px; width: 132px; height: 132px; opacity: .95; z-index: 0; pointer-events: none; }
@media (max-width: 480px) { .vault-graphic { width: 96px; height: 96px; right: -10px; bottom: -8px; } .vault-card .vc-amount { font-size: 1.7rem; } }

/* ==========================================================================
   Income / Expense summary cards
   ========================================================================== */
.ie-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 480px) { .ie-grid { gap: 10px; } }
.ie-card {
  border-radius: 20px; padding: 18px 20px 16px; position: relative; overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
}
.ie-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.ie-card.income { background: linear-gradient(160deg, rgba(16,185,129,.12), rgba(16,185,129,.03)); }
.ie-card.expense { background: linear-gradient(160deg, rgba(239,68,68,.11), rgba(239,68,68,.03)); }
html[data-theme="dark"] .ie-card.income { background: linear-gradient(160deg, rgba(16,185,129,.20), rgba(16,185,129,.04)); }
html[data-theme="dark"] .ie-card.expense { background: linear-gradient(160deg, rgba(239,68,68,.20), rgba(239,68,68,.04)); }
.ie-card .ie-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 14px; }
.ie-card .ie-ic { width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.05rem; }
.ie-card.income .ie-ic { background: linear-gradient(135deg,#34D399,#059669); }
.ie-card.expense .ie-ic { background: linear-gradient(135deg,#F87171,#DC2626); }
.ie-card .ie-tag { font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.ie-card.income .ie-tag { color: #059669; }
.ie-card.expense .ie-tag { color: #DC2626; }
html[data-theme="dark"] .ie-card.income .ie-tag { color: #34D399; }
html[data-theme="dark"] .ie-card.expense .ie-tag { color: #F87171; }
.ie-card .ie-lbl { font-size: .78rem; color: var(--muted); font-weight: 500; }
.ie-card .ie-amt { font-size: 1.4rem; font-weight: 800; color: var(--ink); margin: 3px 0 12px; letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.ie-card .ie-foot { display: flex; align-items: center; gap: 5px; font-size: .76rem; font-weight: 700; }
.ie-card.income .ie-foot { color: #059669; }
.ie-card.expense .ie-foot { color: #DC2626; }
html[data-theme="dark"] .ie-card.income .ie-foot { color: #34D399; }
html[data-theme="dark"] .ie-card.expense .ie-foot { color: #F87171; }
.ie-card .ie-spark { position: absolute; right: 0; bottom: 0; width: 58%; height: 46px; opacity: .9; }
@media (max-width: 480px) { .ie-card .ie-amt { font-size: 1.15rem; } .ie-card { padding: 14px 14px 12px; } }

/* ==========================================================================
   Primary bank card widget (flip)
   ========================================================================== */
.primary-card-widget { background: var(--surface); border-radius: 22px; border: 1px solid var(--border); box-shadow: var(--shadow-sm); padding: 20px; }
.pcw-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 16px; }
.pcw-head h6 { margin: 0 0 3px; font-weight: 800; font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.pcw-head small { color: var(--muted); font-size: .78rem; }
.pcw-currency-chip { display: inline-flex; align-items: center; gap: 5px; padding: 6px 12px; border-radius: var(--r-pill); background: var(--bg); border: 1px solid var(--border); font-size: .76rem; font-weight: 700; color: var(--ink); }

.card-flip-scene { perspective: 1400px; }
.card-flip-inner {
  position: relative; width: 100%; aspect-ratio: 1.586/1; max-height: 210px; transform-style: preserve-3d;
  transition: transform .6s cubic-bezier(.4,.2,.2,1); cursor: pointer;
}
.card-flip-scene.flipped .card-flip-inner { transform: rotateY(180deg); }
.bank-card-face {
  position: absolute; inset: 0; border-radius: 18px; backface-visibility: hidden; overflow: hidden;
  color: #fff; padding: 20px 22px; display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: 0 14px 34px rgba(15,23,42,.28);
}
.bank-card-face.front {
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255,255,255,.14), transparent 55%),
    linear-gradient(135deg, var(--navy) 0%, #1c3763 55%, var(--accent-dark) 130%);
}
.bank-card-face.back { background: linear-gradient(135deg, var(--navy) 0%, #16305c 60%, var(--accent-dark) 130%); transform: rotateY(180deg); justify-content: flex-start; padding: 0; }
.bank-card-face .wave-pattern { position: absolute; inset: 0; opacity: .5; mix-blend-mode: overlay; pointer-events: none; }
.bcf-top { display: flex; justify-content: space-between; align-items: flex-start; position: relative; z-index: 1; }
.bcf-top .chip-ic { width: 42px; height: 32px; }
.bcf-top .contactless-ic { width: 22px; height: 22px; opacity: .9; }
.bcf-number { font-size: 1.22rem; letter-spacing: 2.5px; font-weight: 600; font-family: 'SFMono-Regular', Consolas, monospace; position: relative; z-index: 1; }
.bcf-bottom { display: flex; justify-content: space-between; align-items: flex-end; position: relative; z-index: 1; }
.bcf-bottom .lbl { font-size: .58rem; opacity: .65; letter-spacing: .06em; text-transform: uppercase; display: block; margin-bottom: 3px; }
.bcf-bottom .val { font-size: .84rem; font-weight: 700; letter-spacing: .3px; }
.bcf-brand { font-size: 1.15rem; font-weight: 800; font-style: italic; letter-spacing: -.02em; }
.bank-card-face.back .magstripe { width: 100%; height: 40px; background: #111; margin-top: 22px; }
.bank-card-face.back .cvv-strip { margin: 20px 22px 0; background: rgba(255,255,255,.92); border-radius: 6px; padding: 8px 12px; display: flex; justify-content: flex-end; }
.bank-card-face.back .cvv-strip span { color: #0F172A; font-family: 'SFMono-Regular', Consolas, monospace; font-weight: 700; letter-spacing: 2px; font-size: .9rem; }
.bank-card-face.back .back-note { margin: 16px 22px 0; font-size: .68rem; opacity: .65; line-height: 1.5; }

.card-empty-cta {
  border: 1.5px dashed var(--border); border-radius: 18px; aspect-ratio: 1.586/1; max-height: 210px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center;
  color: var(--muted); background: var(--bg); transition: border-color .15s, background .15s;
}
.card-empty-cta:hover { border-color: var(--accent); background: rgba(37,99,235,.05); color: var(--accent); }
.card-empty-cta i { font-size: 1.6rem; }
.card-empty-cta span { font-size: .84rem; font-weight: 600; }

/* ==========================================================================
   Mobile bottom navigation (app-style)
   ========================================================================== */
.bottom-nav {
  display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 250;
  background: rgba(255,255,255,.92); backdrop-filter: blur(16px) saturate(180%); border-top: 1px solid var(--border);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  box-shadow: 0 -6px 20px rgba(15,23,42,.06);
}
html[data-theme="dark"] .bottom-nav { background: rgba(16,24,45,.92); box-shadow: 0 -6px 20px rgba(0,0,0,.4); }
.bottom-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: space-around; }
.bottom-nav a {
  display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: .64rem;
  font-weight: 600; padding: 4px 8px; border-radius: 10px; min-width: 52px;
}
.bottom-nav a i { font-size: 1.3rem; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav .bn-fab {
  width: 50px; height: 50px; border-radius: 50%; background: linear-gradient(135deg,var(--accent),var(--accent-dark));
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.35rem; margin-top: -26px;
  box-shadow: 0 8px 20px rgba(37,99,235,.4); border: 4px solid var(--bg);
}
@media (max-width: 700px) {
  .bottom-nav { display: block; }
  .content { padding-bottom: 88px; }
}

/* Hide the sidebar's own toggle text redundancy on very small phones + tidy topbar spacing */
@media (max-width: 480px) {
  .clock-pill { display: none; }
  .appbar-brand small { display: none; }
}
