/* ============================================
   LUMORA - SHARED STYLESHEET
   This file is used on EVERY page of the site.
   It's organized into sections:
   1. Design tokens (colors, fonts, spacing)
   2. Reset / base styles
   3. Layout helpers
   4. Navbar
   5. Buttons
   6. Cards & components
   7. Footer
   8. Utilities
   ============================================ */

/* ---------- 1. DESIGN TOKENS ---------- */
/* We use CSS variables so every page shares the exact same colors/fonts.
   If you ever want to re-theme the whole site, you only change these. */
:root {
  /* Brand colors */
  --color-navy: #0f2b46;        /* primary brand color - headers, nav, footer */
  --color-navy-light: #16385c;  /* hover state for navy elements */
  --color-blue: #1c6dd0;        /* accent - buttons, links, highlights */
  --color-blue-light: #eef4fc;  /* light blue backgrounds (badges, tags) */
  --color-green: #16a34a;       /* positive amounts, "available" status */
  --color-red: #dc2626;         /* negative amounts, alerts, errors */
  --color-amber: #d97706;       /* pending / warning status */
  --color-gold: #b8923f;        /* premium card accent - chip, embossing */
  --color-gold-light: #e8d9b0;

  /* Neutrals */
  --color-bg: #f7f8fa;          /* page background - soft, near-white */
  --color-card: #ffffff;        /* card background */
  --color-border: #ebeef2;      /* subtle borders/dividers - lighter, quieter */
  --color-border-strong: #dbe1e8; /* for elements that need a touch more definition */
  --color-text: #172033;        /* main text color */
  --color-text-muted: #6b7787;  /* secondary/helper text */

  /* Typography */
  --font-main: 'Nunito Sans', sans-serif;

  /* Spacing scale (used for padding/margin consistency) - generous, airy */
  --space-xs: 0.65rem;
  --space-sm: 1.25rem;
  --space-md: 2rem;
  --space-lg: 3.25rem;
  --space-xl: 5.5rem;

  /* Rounded corners - softer, larger */
  --radius-sm: 12px;
  --radius-md: 20px;
  --radius-lg: 28px;
  --radius-full: 999px;

  /* Shadows - diffuse and quiet rather than heavy */
  --shadow-card: 0 1px 2px rgba(15, 43, 70, 0.03), 0 10px 28px rgba(15, 43, 70, 0.05);
  --shadow-card-hover: 0 4px 10px rgba(15, 43, 70, 0.05), 0 16px 40px rgba(15, 43, 70, 0.09);
}

/* ---------- 2. RESET / BASE STYLES ---------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-main);
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-weight: 800;
  line-height: 1.2;
  color: var(--color-navy);
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.4rem; }

p { color: var(--color-text); }

button {
  font-family: var(--font-main);
  cursor: pointer;
  border: none;
}

input, select, textarea {
  font-family: var(--font-main);
  font-size: 1rem;
}

/* Visible keyboard focus for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--color-blue);
  outline-offset: 2px;
}

/* ---------- 3. LAYOUT HELPERS ---------- */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section {
  padding: var(--space-xl) 0;
}

/* ---------- 4. NAVBAR (two-tier) ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
}

/* --- Top tier: logo, search, login --- */
.navbar-top {
  background: var(--color-navy);
  color: white;
}
.navbar-top-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  height: 64px;
}

.navbar-logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: white;
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}
.navbar-logo span {
  color: var(--color-blue);
}

.navbar-search {
  flex: 1;
  max-width: 420px;
  position: relative;
  display: flex;
  align-items: center;
}
.navbar-search .search-icon {
  position: absolute;
  left: 0.8rem;
  top: 50%;
  transform: translateY(-50%);
  width: 15px; height: 15px;
  color: rgba(255,255,255,0.65);
  pointer-events: none;
  transition: color 0.15s ease;
}
.navbar-search input {
  width: 100%;
  padding: 0.55rem 0.9rem 0.55rem 2.3rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.10);
  color: white;
  font-size: 0.85rem;
  font-family: var(--font-main);
}
.navbar-search input::placeholder { color: rgba(255,255,255,0.55); }
.navbar-search input:focus {
  background: white;
  color: var(--color-text);
  outline: none;
  border-color: var(--color-blue);
}
.navbar-search:focus-within .search-icon { color: var(--color-text-muted); }

@media (max-width: 700px) {
  .navbar-search { display: none; }
}

/* --- Bottom tier: nav links --- */
.navbar-bottom {
  background: var(--color-card);
  border-bottom: 1px solid var(--color-border);
}
.navbar-bottom-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 50px;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  list-style: none;
  height: 100%;
}

.navbar-links > li {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
}

.navbar-links > li > a,
.navbar-links > li > button.nav-toggle {
  color: var(--color-text-muted);
  font-weight: 700;
  font-size: 0.88rem;
  background: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  height: 100%;
}

.navbar-links > li:hover > a,
.navbar-links > li:hover > button.nav-toggle {
  color: var(--color-navy);
}

.navbar-cta {
  background: var(--color-blue);
  color: white !important;
  padding: 0.5rem 1.2rem !important;
  border-radius: var(--radius-sm);
  font-weight: 700 !important;
  font-size: 0.88rem !important;
  flex-shrink: 0;
}

.navbar-cta:hover {
  background: #1558ab;
}

/* Dropdown menus */
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: white;
  color: var(--color-text);
  min-width: 220px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-hover);
  padding: 0.5rem;
  margin-top: 0;
}

.navbar-links > li:hover .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--color-navy);
}

.dropdown a:hover {
  background: var(--color-blue-light);
  color: var(--color-blue);
}

.navbar-toggle-mobile {
  display: none;
  background: none;
  color: white;
  flex-shrink: 0;
}
.navbar-toggle-mobile .icon-svg svg { width: 22px; height: 22px; }

@media (max-width: 900px) {
  .navbar-bottom { display: none; }
  .navbar-bottom.mobile-open { display: block; }
  .navbar-bottom .navbar-bottom-inner { height: auto; padding: 0.5rem var(--space-md) 1rem; }
  .navbar-links { flex-direction: column; align-items: stretch; gap: 0; height: auto; }
  .navbar-links > li { height: auto; }
  .navbar-links > li > a, .navbar-links > li > button.nav-toggle { padding: 0.7rem 0; width: 100%; justify-content: space-between; }
  .dropdown { display: none !important; position: static; box-shadow: none; margin: 0 0 0.5rem 0.75rem; padding: 0; }
  .navbar-links > li.mobile-expanded .dropdown { display: block !important; }
  .navbar-toggle-mobile { display: block; }
}

/* ---------- 5. BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.65rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.94rem;
  transition: transform 0.05s ease, background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--color-blue);
  color: white;
  box-shadow: 0 6px 16px rgba(28, 109, 208, 0.25);
}
.btn-primary:hover { background: #1558ab; box-shadow: 0 8px 20px rgba(28, 109, 208, 0.3); }

.btn-secondary {
  background: white;
  color: var(--color-navy);
  border: 1.5px solid var(--color-border-strong);
}
.btn-secondary:hover { border-color: var(--color-navy); }

.btn-ghost {
  background: transparent;
  color: var(--color-blue);
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
}

.btn-block { width: 100%; }

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
}

/* ---------- 6. CARDS & COMPONENTS ---------- */
.card {
  background: var(--color-card);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  padding: var(--space-md);
  transition: box-shadow 0.2s ease;
}

.badge {
  display: inline-block;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.badge-green { background: #e7f8ed; color: var(--color-green); }
.badge-amber { background: #fdf1e0; color: var(--color-amber); }
.badge-red   { background: #fde8e8; color: var(--color-red); }

/* ---------- 7. FOOTER ---------- */
.footer {
  background: var(--color-navy);
  color: #cbd9e8;
  padding: var(--space-lg) 0 var(--space-md);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(4, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}

.footer-grid h4 {
  color: white;
  font-size: 0.95rem;
  margin-bottom: var(--space-xs);
}

.footer-grid a {
  display: block;
  font-size: 0.88rem;
  color: #b7c5d6;
  padding: 0.3rem 0;
}
.footer-grid a:hover { color: white; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.12);
  padding-top: var(--space-sm);
  font-size: 0.8rem;
  color: #93a5ba;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.5rem;
}

@media (max-width: 800px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

/* ---------- 8. UTILITIES ---------- */
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-green { color: var(--color-green); }
.text-red { color: var(--color-red); }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

@media (max-width: 800px) {
  .grid-2 { grid-template-columns: 1fr; }
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.6rem; }
}

/* ============================================
   9. APP SHELL (Dashboard & Admin pages)
   These styles are for the logged-in areas of the site,
   separate from the public marketing navbar.
   ============================================ */

.app-header {
  background: var(--color-navy);
  color: white;
  position: sticky;
  top: 0;
  z-index: 100;
}
.app-header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 var(--space-md);
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.app-greeting {
  font-weight: 700;
  font-size: 1.05rem;
}
.app-header-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}
.avatar-btn {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-blue);
  color: white;
  font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  background: none;
}
.profile-menu {
  display: none;
  position: absolute;
  top: 54px;
  right: 0;
  background: white;
  color: var(--color-text);
  min-width: 180px;
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card-hover);
  padding: 0.5rem;
}
.profile-menu.open { display: block; }
.profile-menu a, .profile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  padding: 0.6rem 0.75rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 600;
  background: none;
  color: var(--color-navy);
}
.profile-menu a:hover, .profile-menu button:hover {
  background: var(--color-bg);
}

/* Tab row (Accounts / Credit Cards / Banking / Loans / Invest) */
.tab-row {
  display: flex;
  gap: var(--space-md);
  border-bottom: 2px solid var(--color-border);
  overflow-x: auto;
  margin-bottom: var(--space-md);
}
.tab-row button {
  background: none;
  padding: 0.85rem 0.2rem;
  font-weight: 700;
  color: var(--color-text-muted);
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
}
.tab-row button.tab-active {
  color: var(--color-blue);
  border-bottom-color: var(--color-blue);
}

/* Collapsible section (Checking / Savings / Credit Cards groups) */
.collapse-section { margin-bottom: var(--space-md); }
.collapse-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  font-weight: 800;
  font-size: 1rem;
  color: var(--color-navy);
  padding: 0.5rem 0;
  width: 100%;
  text-align: left;
}
.collapse-header .chevron {
  transition: transform 0.15s ease;
  font-size: 0.8rem;
}
.collapse-header.collapsed .chevron { transform: rotate(-90deg); }
.collapse-body { display: flex; flex-direction: column; gap: 0.75rem; }
.collapse-body.collapsed { display: none; }

/* Account row card (icon + name + balance + status) */
.account-row {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  cursor: pointer;
}
.account-row .acc-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--color-blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.account-row .acc-info { flex: 1; min-width: 0; }
.account-row .acc-name { font-weight: 700; }
.account-row .acc-number { font-size: 0.82rem; color: var(--color-text-muted); }
.account-row .acc-amount { text-align: right; }
.account-row .acc-balance { font-weight: 800; font-size: 1.05rem; }
.account-row .acc-status { font-size: 0.78rem; color: var(--color-text-muted); }

/* Quick action pill row */
.quick-actions {
  display: flex;
  gap: 0.6rem;
  overflow-x: auto;
  padding: 0.25rem 0 var(--space-sm);
}
.quick-actions button {
  background: white;
  border: 2px solid var(--color-border);
  padding: 0.55rem 1rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  color: var(--color-navy);
}
.quick-actions button:hover { border-color: var(--color-blue); color: var(--color-blue); }

/* Transaction list rows */
.txn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
}
.txn-row:last-child { border-bottom: none; }
.txn-desc { font-weight: 700; }
.txn-date { font-size: 0.8rem; color: var(--color-text-muted); }
.txn-amount { font-weight: 800; }

/* Modal */
.modal-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(15,43,70,0.5);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: white;
  border-radius: var(--radius-md);
  padding: var(--space-md);
  width: 100%;
  max-width: 440px;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.modal-close {
  background: none;
  font-size: 1.4rem;
  color: var(--color-text-muted);
}

/* Bottom nav (mobile only) */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: white;
  border-top: 1px solid var(--color-border);
  z-index: 100;
}
.bottom-nav-inner {
  display: flex;
  justify-content: space-around;
}
.bottom-nav a, .bottom-nav button {
  background: none;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.6rem 0.2rem;
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
}
.bottom-nav a.active, .bottom-nav button.active { color: var(--color-blue); }
.bottom-nav .icon { font-size: 1.2rem; }

@media (max-width: 700px) {
  .bottom-nav { display: block; }
  .app-shell-content { padding-bottom: 80px; }
}

.dashboard-main { padding: var(--space-md) 0 var(--space-lg); }

.filter-row {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-sm);
}
.filter-row input, .filter-row select {
  padding: 0.5rem 0.8rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.filter-row input[type="text"] { flex: 1; min-width: 160px; }

/* ============================================
   10. SIGNATURE ELEMENT: THE BANK CARD
   A realistic card visual - gradient body, embossed chip,
   letter-spaced number, contactless mark. Used for credit
   cards in the Accounts overview and the Credit Cards tab.
   ============================================ */

.bank-card-flip-wrap {
  position: relative;
  width: 100%;
  max-width: 340px;
  aspect-ratio: 1.586 / 1;
  perspective: 1400px;
}
.bank-card-flip-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.55s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.bank-card-flip-wrap.is-flipped .bank-card-flip-inner { transform: rotateY(180deg); }

.bank-card {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  padding: 1.4rem 1.5rem;
  color: white;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: linear-gradient(135deg, #16385c 0%, #0a1f36 60%, #061424 100%);
  box-shadow: 0 12px 30px -8px rgba(8, 20, 36, 0.55);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.bank-card-flip-wrap:hover .bank-card-flip-inner {
  transform: translateY(-3px) rotateY(var(--flip-deg, 0deg));
}
.bank-card-flip-wrap.is-flipped:hover .bank-card-flip-inner { --flip-deg: 180deg; }
.bank-card-back { transform: rotateY(180deg); justify-content: flex-start; }

/* Color variants - debit cards read as a different "family" from credit,
   and each credit product gets its own identity, so a wallet full of
   Lumora cards is easy to tell apart at a glance. */
.bank-card--debit-checking { background: linear-gradient(135deg, #2f7de0 0%, #1c4f96 60%, #10315f 100%); }
.bank-card--debit-savings  { background: linear-gradient(135deg, #1f9d63 0%, #146b46 60%, #0b4530 100%); }
.bank-card--credit-rewards { background: linear-gradient(135deg, #7c4fd1 0%, #4d2e8f 60%, #2f1c5c 100%); }
.bank-card--credit-cashback { background: linear-gradient(135deg, #e0872f 0%, #a85a15 60%, #6e3a0c 100%); }
.bank-card--credit-travel  { background: linear-gradient(135deg, #0e9488 0%, #0a6b62 60%, #073f3a 100%); }
.bank-card--credit-default { background: linear-gradient(135deg, #16385c 0%, #0a1f36 60%, #061424 100%); }

.bank-card-kind-tag {
  position: absolute;
  top: 1.55rem; left: 4.6rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Layout for a row of cards at their natural width rather than stretched
   to fill the container - wraps to multiple columns on desktop, stacks
   on mobile. */
.bank-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 340px));
  gap: 1.5rem;
  margin-bottom: var(--space-md);
}
.bank-card-unit { display: flex; flex-direction: column; gap: 0.75rem; }
.bank-card-unit .card { flex: 1; }

/* faint diagonal sheen, purely decorative */
.bank-card::after {
  content: '';
  position: absolute;
  top: -60%; left: -20%;
  width: 60%; height: 220%;
  background: linear-gradient(120deg, rgba(255,255,255,0.10), rgba(255,255,255,0) 60%);
  transform: rotate(20deg);
  pointer-events: none;
}

.bank-card-decoration {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.bank-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.bank-card-chip {
  width: 38px; height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15);
}
.bank-card-chip::before, .bank-card-chip::after {
  content: '';
  position: absolute;
  left: 4px; right: 4px;
  height: 1px;
  background: rgba(0,0,0,0.25);
}
.bank-card-chip::before { top: 9px; }
.bank-card-chip::after { top: 19px; }

.bank-card-contactless {
  opacity: 0.85;
}

.bank-card-number {
  font-size: 1.05rem;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  margin-top: 0.6rem;
}

.bank-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}

.bank-card-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.65;
  margin-bottom: 0.15rem;
}

.bank-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.bank-card-balance {
  text-align: right;
}
.bank-card-balance .amount {
  font-size: 1.3rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.bank-card-wordmark {
  position: absolute;
  top: 1.4rem; right: 1.5rem;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}
.bank-card-wordmark span { color: var(--color-gold-light); }

.bank-card-frozen-overlay {
  position: absolute; inset: 0;
  background: rgba(10, 20, 34, 0.55);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.85rem;
  backdrop-filter: blur(1px);
  z-index: 2;
}

/* --- Reveal / flip controls --- */
.bank-card-controls {
  position: absolute;
  top: 3.4rem; right: 1.5rem;
  display: flex;
  gap: 0.4rem;
  z-index: 3;
}
.bank-card-icon-btn {
  min-width: 30px; height: 26px;
  padding: 0 0.6rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.25);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  backdrop-filter: blur(2px);
  transition: background 0.15s ease;
}
.bank-card-icon-btn:hover { background: rgba(255,255,255,0.28); }

.bank-card-expiry {
  font-size: 0.68rem;
  opacity: 0.75;
  margin-top: 0.35rem;
}

/* --- Back face --- */
.bank-card-magstripe {
  position: absolute;
  top: 1.1rem; left: 0; right: 0;
  height: 15%;
  background: #14181f;
}
.bank-card-sig-strip {
  margin-top: calc(15% + 1.6rem);
  background: repeating-linear-gradient(45deg, #e8e8e4, #e8e8e4 4px, #d9d9d3 4px, #d9d9d3 8px);
  height: 30px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.6rem;
}
.bank-card-cvv-box {
  background: white;
  color: #14181f;
  font-weight: 700;
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  padding: 0.2rem 0.55rem;
  border-radius: 3px;
  letter-spacing: 0.05em;
}
.bank-card-back-number {
  margin-top: 0.9rem;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  font-variant-numeric: tabular-nums;
  opacity: 0.85;
}
.bank-card-back-hint {
  position: absolute;
  bottom: 1.1rem; left: 1.5rem; right: 1.5rem;
  font-size: 0.68rem;
  opacity: 0.55;
}

/* ============================================
   11. REFINED ACCOUNT ROW (checking/savings)
   Quieter than the card - a left accent bar keeps the
   visual language connected without competing for attention.
   ============================================ */

.account-row-v2 {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  background: var(--color-card);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.account-row-v2::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 4px;
}
.account-row-v2.type-checking::before { background: var(--color-blue); }
.account-row-v2.type-savings::before { background: var(--color-green); }
.account-row-v2:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.account-row-v2:active { transform: translateY(0) scale(0.995); }

.account-row-v2 .acc-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--color-blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  flex-shrink: 0;
}
.account-row-v2 .acc-info { flex: 1; min-width: 0; }
.account-row-v2 .acc-name { font-weight: 700; }
.account-row-v2 .acc-number { font-size: 0.82rem; color: var(--color-text-muted); font-variant-numeric: tabular-nums; }
.account-row-v2 .acc-amount { text-align: right; }
.account-row-v2 .acc-balance { font-weight: 800; font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.account-row-v2 .acc-status { font-size: 0.78rem; color: var(--color-text-muted); }

/* ============================================
   12. BALANCE HERO (top of Accounts tab)
   ============================================ */

.balance-hero {
  background: var(--color-card);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.balance-hero-label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  font-weight: 700;
  letter-spacing: 0.02em;
}
.balance-hero-amount {
  font-size: 2.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  margin-top: 0.2rem;
}
.balance-hero-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-top: 0.3rem;
}

/* ============================================
   13. MOTION SYSTEM
   ============================================ */

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
.stagger-in {
  animation: fadeSlideUp 0.4s ease both;
}
.stagger-in:nth-child(1) { animation-delay: 0.02s; }
.stagger-in:nth-child(2) { animation-delay: 0.07s; }
.stagger-in:nth-child(3) { animation-delay: 0.12s; }
.stagger-in:nth-child(4) { animation-delay: 0.17s; }
.stagger-in:nth-child(5) { animation-delay: 0.22s; }

/* Smooth collapse/expand for collapsible sections */
.collapse-body {
  overflow: hidden;
  max-height: 2000px;
  opacity: 1;
  transition: max-height 0.28s ease, opacity 0.2s ease;
}
.collapse-body.collapsed { max-height: 0; opacity: 0; }

/* Modal enter/exit transition */
.modal-overlay {
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-box {
  transform: translateY(14px) scale(0.98);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.modal-overlay.open .modal-box {
  transform: translateY(0) scale(1);
}

/* Skeleton loading shimmer */
.skeleton {
  background: linear-gradient(90deg, #e9edf1 25%, #f4f6f8 37%, #e9edf1 63%);
  background-size: 400% 100%;
  animation: skeletonShimmer 1.4s ease infinite;
  border-radius: var(--radius-sm);
}
@keyframes skeletonShimmer {
  0% { background-position: 100% 50%; }
  100% { background-position: 0 50%; }
}
.skeleton-row { height: 68px; border-radius: var(--radius-md); margin-bottom: 0.75rem; }
.skeleton-card { height: 150px; border-radius: 18px; margin-bottom: 0.75rem; }
.skeleton-line { height: 14px; margin-bottom: 0.5rem; }

/* Count-up number (just a hook class, animation handled by JS updating textContent) */
.count-up { font-variant-numeric: tabular-nums; }

/* Receipt status icon - animated SVG */
.receipt-icon-circle {
  width: 76px; height: 76px;
  margin: 0 auto;
}
.receipt-icon-circle circle.ring {
  stroke-dasharray: 220;
  stroke-dashoffset: 220;
  animation: ringDraw 0.5s ease forwards;
}
.receipt-icon-circle path.check {
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: checkDraw 0.3s ease 0.4s forwards;
}
.receipt-icon-circle path.xmark {
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: checkDraw 0.25s ease 0.4s forwards;
}
.receipt-icon-circle circle.dot {
  animation: dotPulse 1.2s ease-in-out infinite;
}
@keyframes ringDraw { to { stroke-dashoffset: 0; } }
@keyframes checkDraw { to { stroke-dashoffset: 0; } }
@keyframes dotPulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 1; }
}

/* Respect reduced-motion preferences */
@media (prefers-reduced-motion: reduce) {
  .stagger-in, .skeleton, .receipt-icon-circle *, .bank-card, .account-row-v2, .modal-box, .modal-overlay {
    animation: none !important;
    transition: none !important;
  }
}

/* ============================================
   14. CRYPTO / MARKET UI
   ============================================ */

.coin-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.5s ease;
}
.coin-row:last-child { border-bottom: none; }
.coin-row:hover { background: var(--color-bg); }
.coin-row.flash-up { animation: flashGreen 0.6s ease; }
.coin-row.flash-down { animation: flashRed 0.6s ease; }
@keyframes flashGreen {
  0% { background: #d5f3e0; }
  100% { background: transparent; }
}
@keyframes flashRed {
  0% { background: #fbdcdc; }
  100% { background: transparent; }
}

.coin-icon {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-navy), var(--color-blue));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 800;
  flex-shrink: 0;
}

.coin-info { flex: 0 0 auto; width: 108px; }
.coin-name { font-weight: 700; font-size: 0.92rem; }
.coin-symbol { font-size: 0.78rem; color: var(--color-text-muted); }

.coin-sparkline { flex: 1; min-width: 60px; max-width: 120px; height: 32px; }
.coin-sparkline svg { width: 100%; height: 100%; display: block; }

.coin-price-block { flex: 0 0 auto; text-align: right; width: 92px; }
.coin-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.coin-change { font-size: 0.78rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.coin-change.up { color: var(--color-green); }
.coin-change.down { color: var(--color-red); }

.coin-row-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

/* Coin detail view (chart + trade) */
.coin-detail-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: var(--space-sm);
}
.coin-detail-price {
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.coin-chart-wrap {
  width: 100%;
  height: 160px;
  margin: var(--space-sm) 0;
}
.coin-chart-wrap svg { width: 100%; height: 100%; display: block; }

.segmented-control {
  display: flex;
  background: var(--color-bg);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: var(--space-sm);
}
.segmented-control button {
  flex: 1;
  background: none;
  padding: 0.55rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--color-text-muted);
  transition: background 0.15s ease, color 0.15s ease;
}
.segmented-control button.active {
  background: white;
  color: var(--color-navy);
  box-shadow: var(--shadow-card);
}
.segmented-control button.active.sell-active { color: var(--color-red); }

.quick-amount-row {
  display: flex;
  gap: 0.5rem;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}
.quick-amount-row button {
  flex: 1;
  min-width: 64px;
  background: var(--color-bg);
  border: 2px solid transparent;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--color-navy);
}
.quick-amount-row button:hover, .quick-amount-row button.selected {
  border-color: var(--color-blue);
  background: var(--color-blue-light);
  color: var(--color-blue);
}

.portfolio-holding-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
  margin-top: 0.3rem;
}
.portfolio-holding-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-navy));
  transition: width 0.5s ease;
}

/* ============================================
   15. SECTION HEADERS & LIVE CALCULATION PREVIEWS
   Used on the Banking and Loans tabs.
   ============================================ */

.section-header {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin-bottom: var(--space-md);
}
.section-header-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--color-navy), var(--color-blue));
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}
.section-header h3 { margin: 0; }

.calc-preview {
  background: var(--color-bg);
  border-radius: var(--radius-sm);
  padding: 0.9rem 1rem;
  margin-bottom: var(--space-sm);
  animation: fadeSlideUp 0.25s ease;
}
.calc-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 0.2rem 0;
  color: var(--color-text-muted);
}
.calc-row.calc-total {
  border-top: 1px solid var(--color-border);
  margin-top: 0.4rem;
  padding-top: 0.5rem;
  font-weight: 800;
  color: var(--color-navy);
  font-size: 0.95rem;
}

/* ============================================
   14. INVEST / CRYPTO DESIGN
   ============================================ */

.invest-hero {
  background: linear-gradient(135deg, #0f2b46 0%, #1c3f63 55%, #0a1f36 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
}
.invest-hero::after {
  content: '';
  position: absolute; top: -40%; right: -10%;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(184,146,63,0.25), transparent 70%);
}
.invest-hero-label { font-size: 0.8rem; opacity: 0.75; font-weight: 600; }
.invest-hero-amount { font-size: 2.2rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 0.2rem; }
.invest-hero-sub { font-size: 0.8rem; opacity: 0.7; margin-top: 0.3rem; }

.coin-badge {
  width: 38px; height: 38px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  color: white;
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.coin-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
  transition: background 0.15s ease;
}
.coin-row:last-child { border-bottom: none; }
.coin-row:hover { background: #fafbfc; }

.coin-info { flex: 0 0 auto; min-width: 110px; }
.coin-name { font-weight: 700; font-size: 0.92rem; }
.coin-symbol { font-size: 0.78rem; color: var(--color-text-muted); }

.coin-sparkline { flex: 1; min-width: 70px; max-width: 120px; }
.coin-sparkline svg { width: 100%; height: 32px; display: block; }

.coin-price-block { text-align: right; min-width: 90px; }
.coin-price { font-weight: 800; font-variant-numeric: tabular-nums; }
.coin-change { font-size: 0.78rem; font-weight: 700; }
.coin-change.up { color: var(--color-green); }
.coin-change.down { color: var(--color-red); }

.coin-actions { display: flex; gap: 0.4rem; flex-shrink: 0; }

@keyframes priceFlashGreen {
  0% { background: rgba(22,163,74,0.15); }
  100% { background: transparent; }
}
@keyframes priceFlashRed {
  0% { background: rgba(220,38,38,0.15); }
  100% { background: transparent; }
}
.flash-up { animation: priceFlashGreen 0.8s ease; }
.flash-down { animation: priceFlashRed 0.8s ease; }

.holding-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
}

/* ============================================
   15. LOAN CARD
   ============================================ */

.loan-card {
  background: linear-gradient(135deg, #1c3f63, #0f2b46);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.5rem;
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.loan-ring { flex-shrink: 0; }
.loan-ring svg { display: block; }
.loan-ring circle.track { stroke: rgba(255,255,255,0.18); }
.loan-ring circle.progress {
  stroke: var(--color-gold-light);
  stroke-linecap: round;
  transform: rotate(-90deg);
  transform-origin: center;
  transition: stroke-dashoffset 0.6s ease;
}
.loan-ring-label {
  font-size: 0.95rem;
  font-weight: 800;
  fill: white;
}
.loan-info { flex: 1; min-width: 180px; }
.loan-info h3 { color: white; }
.loan-info .text-muted { color: #b7c5d6; }
.loan-remaining { text-align: right; }
.loan-remaining .amount { font-size: 1.3rem; font-weight: 800; }
.loan-remaining .label { font-size: 0.78rem; color: #b7c5d6; }

/* ============================================
   16. QUICK ACTIONS - circular icon buttons
   ============================================ */

.quick-actions-v2 {
  display: flex;
  gap: 1.1rem;
  overflow-x: auto;
  padding: 0.5rem 0 var(--space-sm);
}
.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  background: none;
  flex-shrink: 0;
}
.quick-action-btn .qa-icon {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: white;
  box-shadow: var(--shadow-card);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.quick-action-btn:hover .qa-icon { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.quick-action-btn:active .qa-icon { transform: translateY(-1px) scale(0.95); }
.quick-action-btn .qa-label { font-size: 0.72rem; font-weight: 700; color: var(--color-navy); white-space: nowrap; }

/* ============================================
   17. ICON SIZING
   Every icon in the app is an inline SVG (see js/components.js
   Icon set) wrapped in a span with one of these size classes.
   ============================================ */

.icon-svg { display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.icon-svg svg { width: 1em; height: 1em; }
.icon-sm svg { width: 16px; height: 16px; }
.icon-md svg { width: 20px; height: 20px; }
.icon-lg svg { width: 28px; height: 28px; }
.icon-xl svg { width: 40px; height: 40px; }

/* Bank logo mark used on the receipt + card wordmark */
.receipt-logo {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--color-navy);
  color: white;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
}
.receipt-logo svg { width: 28px; height: 28px; }

.status-text-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.status-text-badge svg { width: 14px; height: 14px; }

/* Sizing for icons injected directly via data-icon (no icon-svg wrapper) */
.qa-icon svg { width: 22px; height: 22px; color: var(--color-navy); }
.product-icon svg { width: 22px; height: 22px; color: var(--color-blue); }
.section-header-icon svg { width: 20px; height: 20px; }

/* ============================================
   18. DASHBOARD OVERVIEW CHARTS
   ============================================ */

.overview-charts {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-md);
}
@media (max-width: 800px) {
  .overview-charts { grid-template-columns: 1fr; }
}

.chart-card-title {
  font-weight: 800;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}
.chart-card-sub {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.75rem;
}

.trend-chart-svg { width: 100%; height: 140px; display: block; }
.trend-chart-tooltip {
  position: absolute;
  background: var(--color-navy);
  color: white;
  padding: 0.35rem 0.6rem;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  pointer-events: none;
  transform: translate(-50%, -130%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.1s ease;
  z-index: 5;
}
.trend-chart-wrap { position: relative; }

.donut-wrap {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}
.donut-svg { flex-shrink: 0; }
.donut-legend { flex: 1; min-width: 0; }
.donut-legend-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0;
  font-size: 0.85rem;
}
.donut-legend-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-legend-label { flex: 1; color: var(--color-text); font-weight: 600; }
.donut-legend-amount { font-weight: 800; font-variant-numeric: tabular-nums; }
.donut-empty { text-align: center; color: var(--color-text-muted); font-size: 0.85rem; padding: 1.5rem 0; }

/* ============================================
   19. QUICK ACTIONS v3 - labeled feature cards
   ============================================ */

.quick-actions-v3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: var(--space-md);
}
@media (max-width: 700px) {
  .quick-actions-v3 { grid-template-columns: repeat(2, 1fr); }
}

.qa-card {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-align: left;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.qa-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-card-hover); }
.qa-card:active { transform: translateY(0) scale(0.98); }

.qa-card-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--color-blue-light);
  color: var(--color-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.qa-card-icon svg { width: 20px; height: 20px; }
.qa-card-title { font-weight: 700; font-size: 0.88rem; color: var(--color-navy); }
.qa-card-sub { font-size: 0.74rem; color: var(--color-text-muted); margin-top: 0.1rem; }

/* Simple info modal (FICO / Rewards "coming soon") */
.info-modal-icon {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--color-blue-light);
  color: var(--color-blue);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.75rem;
}
.info-modal-icon svg { width: 26px; height: 26px; }

/* ============================================
   20. CARD PRODUCTS (Apply for a New Card)
   ============================================ */

.card-product-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--color-border);
}
.card-product-row:last-child { border-bottom: none; }
.card-product-name { font-weight: 700; font-size: 0.92rem; }
.card-product-blurb { font-size: 0.8rem; color: var(--color-text-muted); margin-top: 0.15rem; }

/* ============================================
   20. ADMIN DASHBOARD DESIGN
   ============================================ */

.admin-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: var(--space-md);
}
@media (max-width: 900px) {
  .admin-stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-tile {
  background: white;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  padding: 1.1rem 1.2rem;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.stat-tile-icon {
  width: 42px; height: 42px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.stat-tile-icon svg { width: 20px; height: 20px; }
.stat-tile-value { font-weight: 800; font-size: 1.2rem; font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-tile-label { font-size: 0.74rem; color: var(--color-text-muted); }

.bg-blue { background: var(--color-blue-light); color: var(--color-blue); }
.bg-green { background: #e7f8ed; color: var(--color-green); }
.bg-gold { background: #f6efdd; color: var(--color-gold); }
.bg-amber { background: #fdf1e0; color: var(--color-amber); }

/* Consistent list row used across Users / Accounts / Pending / Loans */
.list-row-v2 {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
  transition: box-shadow 0.15s ease;
}
.list-row-v2:hover { box-shadow: var(--shadow-card-hover); }

.list-row-avatar {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--color-blue);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.list-row-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--color-blue-light);
  color: var(--color-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.list-row-icon svg { width: 19px; height: 19px; }

.list-row-info { flex: 1; min-width: 200px; }
.list-row-title { font-weight: 700; font-size: 0.94rem; }
.list-row-sub { font-size: 0.82rem; color: var(--color-text-muted); margin-top: 0.1rem; }

.list-row-amount { text-align: right; }
.list-row-amount .amount { font-weight: 800; font-variant-numeric: tabular-nums; }
.list-row-amount .label { font-size: 0.76rem; color: var(--color-text-muted); }

.list-row-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  width: 100%;
  margin-top: 0.4rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--color-border);
}

/* ============================================
   20. MARKETING PAGES (shared across public pages)
   ============================================ */

.hero {
  background: linear-gradient(135deg, var(--color-navy), #163f66);
  color: white;
  padding: var(--space-xl) 0;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.hero h1 { color: white; }
.hero p.lead {
  color: #cfe0f4;
  font-size: 1.15rem;
  margin: var(--space-sm) 0 var(--space-md);
  max-width: 480px;
}
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}
.hero-image img { width: 100%; height: 380px; object-fit: cover; }
.hero.hero-sm { padding: var(--space-lg) 0; }
.hero.hero-sm h1 { font-size: 2.2rem; }

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-image img { height: 240px; }
}

.product-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-sm);
}
.product-card {
  text-align: left;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.product-card:hover {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-3px);
}
.product-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: var(--color-blue-light);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
  margin-bottom: var(--space-xs);
}
@media (max-width: 900px) {
  .product-grid { grid-template-columns: 1fr 1fr; }
}

.split-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}
.split-section img {
  border-radius: var(--radius-lg);
  width: 100%;
  height: 320px;
  object-fit: cover;
}
@media (max-width: 900px) {
  .split-section { grid-template-columns: 1fr; }
}

.trust-bar {
  background: white;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  padding: var(--space-md) 0;
}
.trust-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  text-align: center;
}
.trust-grid .stat-number {
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-navy);
}
@media (max-width: 700px) {
  .trust-grid { grid-template-columns: 1fr; }
}

/* Feature list with icon (used on product pages) */
.feature-list { list-style: none; }
.feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.6rem 0;
}
.feature-list .feature-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--color-blue-light);
  color: var(--color-blue);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feature-list .feature-icon svg { width: 16px; height: 16px; }

/* Simple pricing/comparison table */
.compare-table { width: 100%; border-collapse: collapse; }
.compare-table th, .compare-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}
.compare-table th { color: var(--color-navy); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.03em; }
.compare-table tr:last-child td { border-bottom: none; }

/* FAQ accordion */
.faq-item {
  border-bottom: 1px solid var(--color-border);
}
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  padding: 1rem 0;
  font-weight: 700;
  color: var(--color-navy);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-question .chevron { transition: transform 0.2s ease; }
.faq-question.open .chevron { transform: rotate(180deg); }
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease, opacity 0.2s ease;
  opacity: 0;
  color: var(--color-text-muted);
  font-size: 0.92rem;
  padding-right: 2rem;
}
.faq-answer.open { max-height: 300px; opacity: 1; padding-bottom: 1rem; }

/* Simple step list (How It Works) */
.step-list { counter-reset: step; }
.step-item {
  display: flex;
  gap: 1rem;
  margin-bottom: var(--space-md);
}
.step-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--color-navy);
  color: white;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

/* Contact method cards (Support page) */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
@media (max-width: 800px) {
  .contact-grid { grid-template-columns: 1fr; }
}
.contact-card { text-align: center; }
.contact-card .product-icon { margin: 0 auto var(--space-xs); }

/* Blog/resource card grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}
@media (max-width: 900px) {
  .resource-grid { grid-template-columns: 1fr; }
}
.resource-card img { border-radius: var(--radius-md); width: 100%; height: 160px; object-fit: cover; margin-bottom: var(--space-xs); }

/* ============================================
   21. LOAN CERTIFICATE (distinct from the navy card language -
   a loan is an agreement, not a spending card, so it gets a
   warm, document-like treatment instead)
   ============================================ */

.loan-cert {
  background: linear-gradient(135deg, #fdf9ef 0%, #f6ecd2 100%);
  border: 1px solid #e2cd94;
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  margin-bottom: var(--space-md);
  position: relative;
  overflow: hidden;
  color: var(--color-navy);
}
.loan-cert::before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid rgba(184,146,63,0.35);
  border-radius: calc(var(--radius-lg) - 4px);
  pointer-events: none;
}
.loan-cert-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1rem;
}
.loan-cert-eyebrow {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-gold);
  font-weight: 800;
}
.loan-cert-title {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--color-navy);
  margin-top: 0.15rem;
}
.loan-cert-seal {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--color-gold-light), var(--color-gold));
  color: white;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px rgba(184,146,63,0.35);
  flex-shrink: 0;
}
.loan-cert-seal svg { width: 24px; height: 24px; }
.loan-cert-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 0.9rem;
  border-top: 1px dashed rgba(184,146,63,0.4);
}
@media (max-width: 700px) {
  .loan-cert-body { grid-template-columns: 1fr 1fr; }
}
.loan-cert-field .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: #8a7239; }
.loan-cert-field .value { font-weight: 800; font-size: 1.02rem; margin-top: 0.1rem; }
.loan-cert-progress-track {
  margin-top: 1.1rem;
  height: 8px;
  border-radius: 999px;
  background: rgba(184,146,63,0.2);
  overflow: hidden;
}
.loan-cert-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-gold), var(--color-gold-light));
  border-radius: 999px;
  transition: width 0.6s ease;
}

.payoff-chart-svg { width: 100%; height: 130px; display: block; }

/* ============================================
   22. WIRE FLOW DIAGRAM + LIMIT GAUGE
   (process visualization instead of another data chart)
   ============================================ */

.wire-flow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 1rem 0.5rem;
}
.wire-flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  flex: 1;
  min-width: 0;
}
.wire-flow-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--color-blue-light);
  color: var(--color-blue);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 0.4rem;
}
.wire-flow-icon svg { width: 20px; height: 20px; }
.wire-flow-label { font-size: 0.78rem; font-weight: 700; color: var(--color-navy); }
.wire-flow-sub { font-size: 0.7rem; color: var(--color-text-muted); margin-top: 0.1rem; }
.wire-flow-connector {
  flex: 0 0 auto;
  width: 40px;
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--color-border) 0 6px, transparent 6px 10px);
  margin: 0 0.25rem;
  align-self: center;
  margin-top: -1.6rem;
}
@media (max-width: 600px) {
  .wire-flow { flex-direction: column; }
  .wire-flow-connector { display: none; }
}

.limit-gauge-track {
  height: 10px;
  border-radius: 999px;
  background: var(--color-border);
  overflow: hidden;
  margin-top: 0.5rem;
}
.limit-gauge-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-blue), var(--color-navy));
  border-radius: 999px;
  transition: width 0.6s ease;
}

/* ============================================
   21. DEBT OVERVIEW HERO (Loans tab)
   Deliberately different palette from the balance hero -
   graphite + gold instead of navy + blue, so loans reads
   as its own "zone" rather than a copy of Accounts.
   ============================================ */

.debt-hero {
  background: linear-gradient(135deg, #2b2f38 0%, #1a1d24 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.75rem;
  margin-bottom: var(--space-md);
  border-bottom: 4px solid var(--color-gold);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
@media (max-width: 700px) {
  .debt-hero { grid-template-columns: 1fr; }
}
.debt-hero-stat-label { font-size: 0.78rem; opacity: 0.65; font-weight: 600; }
.debt-hero-stat-value { font-size: 1.6rem; font-weight: 800; margin-top: 0.2rem; font-variant-numeric: tabular-nums; }

/* Horizontal bar chart (Upcoming Payments) */
.bar-chart-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
}
.bar-chart-label {
  width: 78px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  flex-shrink: 0;
}
.bar-chart-track {
  flex: 1;
  background: var(--color-bg);
  border-radius: 6px;
  height: 26px;
  position: relative;
  overflow: hidden;
}
.bar-chart-fill {
  height: 100%;
  background: linear-gradient(90deg, #3a3f4a, var(--color-gold));
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 0.6rem;
  color: white;
  font-size: 0.76rem;
  font-weight: 700;
  white-space: nowrap;
  transition: width 0.5s ease;
}

/* ============================================
   23. ACTIVITY TIMELINE (Admin dashboard)
   ============================================ */

.activity-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.activity-item {
  position: relative;
  padding-left: 30px;
  padding-bottom: 1.1rem;
}
.activity-item::before {
  content: '';
  position: absolute;
  left: 5px; top: 3px;
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--color-blue);
  border: 2px solid white;
  box-shadow: 0 0 0 1px var(--color-border);
}
.activity-item::after {
  content: '';
  position: absolute;
  left: 10px; top: 16px; bottom: -2px;
  width: 2px;
  background: var(--color-border);
}
.activity-item:last-child::after { display: none; }
.activity-item.dot-green::before { background: var(--color-green); }
.activity-item.dot-amber::before { background: var(--color-amber); }
.activity-item.dot-red::before { background: var(--color-red); }
.activity-item.dot-gold::before { background: var(--color-gold); }
.activity-title { font-weight: 700; font-size: 0.88rem; }
.activity-meta { font-size: 0.76rem; color: var(--color-text-muted); margin-top: 0.15rem; }


/* ---------- Spending breakdown chart ---------- */
.spend-chart-layout { display: flex; flex-direction: column; gap: 1.25rem; margin-top: 0.75rem; }
.spend-donut-wrap { position: relative; width: 148px; height: 148px; margin: 0 auto; }
.spend-donut-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; pointer-events: none;
}
.spend-donut-total { font-size: 1.15rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.spend-donut-total-label { font-size: 0.7rem; color: var(--color-text-muted); font-weight: 700; }
.spend-bars { display: flex; flex-direction: column; gap: 0.85rem; }
.spend-bar-row-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.85rem; margin-bottom: 0.3rem; gap: 0.5rem; }
.spend-bar-name { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 700; }
.spend-bar-dot { width: 9px; height: 9px; border-radius: 999px; display: inline-block; }
.spend-bar-value { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.spend-bar-track { height: 8px; background: var(--color-bg); border-radius: 999px; overflow: hidden; }
.spend-bar-fill { height: 100%; border-radius: 999px; }


/* ---------- Crypto hero (Invest tab) ---------- */
.crypto-hero {
  background: linear-gradient(135deg, #f4f8fe 0%, #ffffff 65%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 1.9rem 2rem;
}
.crypto-hero-main { display: grid; grid-template-columns: 1.1fr 1fr; gap: 2.5rem; align-items: center; }
.crypto-hero-label { font-size: 0.8rem; font-weight: 700; color: var(--color-text-muted); letter-spacing: 0.02em; }
.crypto-hero-value { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 0.15rem; }
.crypto-hero-change { font-weight: 800; font-size: 0.95rem; margin-top: 0.15rem; }
.crypto-hero-change.up { color: var(--color-green); }
.crypto-hero-change.down { color: var(--color-red); }
.crypto-hero-sub { font-size: 0.85rem; color: var(--color-text-muted); margin-top: 0.4rem; line-height: 1.45; }
.crypto-hero-actions { display: flex; gap: 0.75rem; flex-wrap: wrap; margin-top: 1.4rem; }
.crypto-hero-alloc-title { font-size: 0.8rem; font-weight: 700; color: var(--color-text-muted); margin-bottom: 0.6rem; }
.crypto-alloc-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: var(--color-bg); gap: 2px; }
.crypto-alloc-seg { height: 100%; }
.crypto-alloc-list { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.9rem; }
.crypto-alloc-row { display: flex; justify-content: space-between; align-items: center; gap: 0.75rem; font-size: 0.86rem; }
.crypto-alloc-name { display: inline-flex; align-items: center; gap: 0.55rem; font-weight: 700; }
.crypto-alloc-value { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.coin-icon-sm { width: 26px; height: 26px; font-size: 0.55rem; }
@media (max-width: 800px) {
  .crypto-hero { padding: 1.4rem 1.25rem; }
  .crypto-hero-main { grid-template-columns: 1fr; gap: 1.5rem; }
  .crypto-hero-value { font-size: 2.1rem; }
}

/* ---------- Crypto widget (dashboard overview) ---------- */
.crypto-widget { margin-bottom: var(--space-md); }
.crypto-widget-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 0.9rem; }
.crypto-widget-total { font-size: 1.35rem; font-weight: 800; font-variant-numeric: tabular-nums; margin-top: 0.15rem; }
.crypto-widget-total .coin-change { font-size: 0.8rem; margin-left: 0.4rem; }
.crypto-widget-rows { display: flex; flex-direction: column; }
.crypto-widget-row {
  display: flex; align-items: center; gap: 0.9rem;
  padding: 0.7rem 0.4rem;
  border-top: 1px solid var(--color-border);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background 0.15s ease;
}
.crypto-widget-row:hover { background: var(--color-bg); }
.crypto-widget-name { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: 0.9rem; }
.crypto-widget-name .text-muted { font-size: 0.75rem; }
.crypto-widget-spark { width: 70px; height: 24px; flex-shrink: 0; }
.crypto-widget-spark svg { width: 100%; height: 100%; display: block; }
.crypto-widget-price { text-align: right; font-weight: 700; font-size: 0.9rem; font-variant-numeric: tabular-nums; min-width: 84px; }

/* Spread market rows across the full card width on desktop only */
@media (min-width: 801px) {
  .coin-row .coin-sparkline { max-width: 280px; margin: 0 1.5rem; }
  .coin-row .coin-price-block { margin-left: auto; min-width: 110px; text-align: right; }
}
