/* ==========================================================================
   Credimity Bank — Design System v3 ("Corporate Blue")
   An original design inspired by the clean, conservative, blue-forward
   conventions of major retail-bank digital platforms — no copied logos,
   wordmarks, or trade dress from any specific institution.
   ========================================================================== */

:root {
  /* ---- Spacing scale — use these instead of ad hoc pixel values ---- */
  --cb-space-1: 4px;
  --cb-space-2: 8px;
  --cb-space-3: 12px;
  --cb-space-4: 16px;
  --cb-space-5: 24px;
  --cb-space-6: 32px;
  --cb-space-7: 48px;
  --cb-space-8: 64px;

  /* ---- Semantic state colors ---- */
  --cb-success: #067647;
  --cb-warning: #b54708;
  --cb-error: #b42318;
  --cb-focus: var(--cb-accent);

  /* ---- Deep Midnight Navy — the primary dark tone ---- */
  --cb-emerald-950: #050f1f;
  --cb-emerald-900: #071a33;
  --cb-emerald-800: #0d2a52;
  --cb-emerald-700: #123a6e;
  --cb-navy: #071a33;     /* legacy alias */
  --cb-navy-2: #123a6e;   /* legacy alias */

  /* ---- Professional Banking Blue — the primary accent ---- */
  --cb-accent: #1456d9;
  --cb-accent-2: #2f6fe0;
  --cb-accent-dark: #0f3fa8;

  /* ---- Secondary accents ---- */
  --cb-teal: #0f9d8c;
  --cb-gold: #2f6fe0;

  /* ---- Modern Finance Gray surfaces ---- */
  --cb-bg: #f8fafc;
  --cb-surface: #ffffff;
  --cb-border: #e4e7ec;
  --cb-text: #101828;
  --cb-text-muted: #667085;

  /* ---- Shape — moderate radii, conservative institutional feel ---- */
  --cb-radius-sm: 10px;
  --cb-radius: 16px;
  --cb-radius-lg: 22px;
  --cb-radius-pill: 999px;

  /* ---- Elevation — subdued, no colored glow ---- */
  --cb-shadow-sm: 0 1px 3px rgba(7, 26, 51, 0.06), 0 1px 2px rgba(7, 26, 51, 0.04);
  --cb-shadow: 0 8px 24px rgba(7, 26, 51, 0.10), 0 2px 6px rgba(7, 26, 51, 0.06);
  --cb-shadow-lg: 0 24px 56px rgba(7, 26, 51, 0.18), 0 8px 20px rgba(7, 26, 51, 0.08);

  --cb-gradient-navy: linear-gradient(160deg, var(--cb-emerald-950) 0%, var(--cb-emerald-800) 60%, var(--cb-emerald-700) 100%);
  --cb-gradient-accent: linear-gradient(120deg, var(--cb-accent) 0%, var(--cb-accent-2) 100%);
  --cb-gradient-card: linear-gradient(150deg, #071a33 0%, #0d2a52 55%, #123a6e 100%);
}

* { box-sizing: border-box; }

html, body { max-width: 100%; overflow-x: hidden; }
img, svg { max-width: 100%; height: auto; }

body {
  background: var(--cb-bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--cb-text);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Inter", sans-serif; font-weight: 700; letter-spacing: -0.02em; }

a { text-decoration: none; }
::selection { background: var(--cb-accent); color: #fff; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible,
[tabindex]:focus-visible, [role="button"]:focus-visible {
  outline: 2px solid var(--cb-accent);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Scroll reveal + utility animations ---------- */
.cb-reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.22,1,.36,1); }
.cb-reveal.is-visible { opacity: 1; transform: translateY(0); }
.cb-reveal-delay-1 { transition-delay: .07s; }
.cb-reveal-delay-2 { transition-delay: .14s; }
.cb-reveal-delay-3 { transition-delay: .21s; }
.cb-reveal-delay-4 { transition-delay: .28s; }

@keyframes cbShimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }
@keyframes cbPulseRing { 0% { box-shadow: 0 0 0 0 rgba(20,86,217,0.4); } 100% { box-shadow: 0 0 0 14px rgba(20,86,217,0); } }

.cb-skeleton {
  background: linear-gradient(90deg, #eef1f6 25%, #f8f9fc 37%, #eef1f6 63%);
  background-size: 400px 100%;
  animation: cbShimmer 1.4s ease infinite;
  border-radius: 6px;
}

/* ---------- Buttons — solid, rectangular, institutional ---------- */
.cb-btn-accent {
  background: var(--cb-gradient-accent);
  border: none;
  color: #fff;
  font-weight: 700;
  border-radius: var(--cb-radius-sm);
  box-shadow: var(--cb-shadow-sm);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}
.cb-btn-accent:hover { transform: translateY(-1px); box-shadow: var(--cb-shadow); color: #fff; filter: brightness(1.05); }
.cb-btn-accent:active { transform: translateY(0); }

.cb-btn-ghost-light {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.35);
  color: #fff;
  font-weight: 600;
  border-radius: var(--cb-radius-sm);
  transition: background .15s ease;
}
.cb-btn-ghost-light:hover { background: rgba(255,255,255,0.16); color: #fff; }

.btn { border-radius: var(--cb-radius-sm); }

/* ---------- Public navbar ---------- */
.cb-navbar {
  background: var(--cb-emerald-950);
  position: sticky; top: 0; z-index: 1030;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.cb-navbar .navbar-brand {
  color: #fff; font-weight: 800; letter-spacing: 0;
  display: flex; align-items: center; gap: 9px;
}
.cb-navbar .navbar-brand .brand-mark {
  width: 32px; height: 32px; border-radius: 6px;
  background: var(--cb-gradient-accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; color: #fff;
}
.cb-navbar .nav-link { color: rgba(255,255,255,0.8) !important; font-weight: 600; font-size: 0.93rem; }
.cb-navbar .nav-link:hover { color: #fff !important; }
.cb-navbar .dropdown-menu {
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow-lg);
  padding: 18px; margin-top: 8px !important;
}
.cb-mega-col h6 { font-size: 0.7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--cb-text-muted); font-weight: 700; margin-bottom: 10px; }
.cb-mega-col a { display: block; color: var(--cb-text); font-weight: 600; font-size: 0.92rem; padding: 6px 0; }
.cb-mega-col a:hover { color: var(--cb-accent); }

/* ---------- Quick nav bar (secondary product links under the main nav) ---------- */
.cb-quicknav { background: #fff; border-bottom: 1px solid var(--cb-border); }
.cb-quicknav-inner {
  display: flex; flex-wrap: wrap; gap: 6px; padding: 14px 0;
}
.cb-quicknav-inner a {
  color: var(--cb-emerald-900); font-weight: 700; font-size: 0.92rem;
  padding: 8px 16px; border-radius: var(--cb-radius-sm); transition: background .15s ease;
}
.cb-quicknav-inner a:hover { background: var(--cb-bg); color: var(--cb-accent-dark); }
.cb-quicknav-inner a:first-child { background: var(--cb-bg); }

/* ---------- Hero — solid institutional navy, restrained ---------- */
.cb-hero {
  position: relative;
  background: var(--cb-gradient-navy);
  color: #fff;
  padding: 100px 0 150px;
  overflow: hidden;
}
.cb-hero.cb-hero-split { padding: 0; }
.cb-hero-left {
  position: relative; overflow: hidden;
  padding: 90px 6vw 70px clamp(20px, 6vw, 96px);
  display: flex; align-items: center;
}
.cb-hero-left-inner { position: relative; z-index: 1; max-width: 560px; }
.cb-hero-right { padding: 0; min-height: 480px; position: relative; background: var(--cb-emerald-950); }
.cb-hero-image { width: 100%; height: 100%; object-fit: cover; display: block; min-height: 480px; }
.cb-hero-callout {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--cb-radius-lg); padding: 26px 30px; margin-top: 46px;
  backdrop-filter: blur(6px); max-width: 480px;
}
.cb-hero-callout-link { color: #e6c869; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; }
.cb-hero-callout-link:hover { color: #f2d980; }

.cb-hero::before {
  content: ""; position: absolute; width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,86,217,0.25), transparent 70%);
  top: -160px; right: -110px; z-index: -1;
}
.cb-hero .cb-grid-texture {
  position: absolute; inset: 0; z-index: -1;
  background-image:
    linear-gradient(rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 65%);
}

.cb-hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.1);
  border: 1px solid rgba(255,255,255,0.2);
  padding: 6px 14px; border-radius: var(--cb-radius-pill);
  font-size: 0.8rem; font-weight: 700; letter-spacing: .02em;
  margin-bottom: 20px;
}
.cb-hero .eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--cb-gold); animation: cbPulseRing 2s infinite; }

.cb-hero h1 { font-weight: 800; font-size: clamp(1.85rem, 1.3rem + 3vw, 3rem); line-height: 1.16; }
.cb-hero h1 .gradient-text { color: var(--cb-gold); }
.cb-hero p.lead-text { color: rgba(255,255,255,0.8); font-size: 1.14rem; max-width: 520px; }

.cb-hero-stats { display: flex; gap: 34px; margin-top: 44px; flex-wrap: wrap; }
.cb-hero-stats .stat-num { font-size: 1.7rem; font-weight: 800; }
.cb-hero-stats .stat-label { font-size: 0.8rem; color: rgba(255,255,255,0.65); text-transform: uppercase; letter-spacing: .04em; }

.cb-hero-visual { position: relative; height: 460px; }
.cb-mock-dashboard {
  position: absolute; top: 10px; right: 0; width: 100%; max-width: 420px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--cb-radius-lg);
  backdrop-filter: blur(14px);
  padding: 22px;
  box-shadow: var(--cb-shadow-lg);
}
.cb-mock-dashboard .mock-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.cb-mock-dashboard .mock-balance { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; font-size: 2.1rem; font-weight: 700; color: #fff; }
.cb-mock-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,0.12); overflow: hidden; margin-top: 4px; }
.cb-mock-bar span { display: block; height: 100%; background: var(--cb-gradient-accent); border-radius: 6px; }

.cb-mock-card {
  position: absolute; left: -10px; bottom: 30px; width: 270px;
  border-radius: var(--cb-radius-lg); padding: 20px; color: #fff;
  background: var(--cb-gradient-card);
  box-shadow: var(--cb-shadow-lg);
  border: 1px solid rgba(255,255,255,0.12);
}
.cb-mock-card .chip { width: 38px; height: 28px; border-radius: 5px; background: linear-gradient(135deg,#e8d48a,#c8a24a); margin-bottom: 26px; }
.cb-mock-card .num { font-family: 'JetBrains Mono', monospace; letter-spacing: 2px; font-size: 1.05rem; }

.cb-toast-float {
  position: absolute; background: #fff; color: var(--cb-text);
  border-radius: var(--cb-radius); padding: 12px 16px; box-shadow: var(--cb-shadow-lg);
  display: flex; align-items: center; gap: 10px; font-size: 0.85rem; font-weight: 700;
  border: 1px solid var(--cb-border);
}
.cb-toast-float .icon-wrap { width: 32px; height: 32px; border-radius: 8px; background: #e5f7f3; color: var(--cb-teal); display:flex; align-items:center; justify-content:center; }
.cb-toast-float.t1 { top: 20px; left: 10px; }
.cb-toast-float.t2 { bottom: -10px; right: 10px; }

/* ---------- Security strip ---------- */
.cb-security-strip { background: #fff; border-bottom: 1px solid var(--cb-border); padding: 20px 0; }
.cb-security-strip .item { display: flex; align-items: center; gap: 10px; color: var(--cb-text-muted); font-weight: 700; font-size: 0.85rem; }
.cb-security-strip .item i { color: var(--cb-accent); font-size: 1.1rem; }

/* ---------- Section headings ---------- */
.cb-eyebrow-label {
  color: var(--cb-accent-dark); text-transform: uppercase; letter-spacing: .07em;
  font-size: 0.76rem; font-weight: 800; margin-bottom: 10px; display: inline-block;
}
.cb-section-title { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); font-weight: 800; }
.cb-section-sub { color: var(--cb-text-muted); font-size: 1.03rem; max-width: 620px; }

/* ---------- Feature / service cards ---------- */
.cb-numbered-feature {
  display: flex; gap: 18px; align-items: flex-start;
  padding: 22px 0; border-bottom: 1px solid var(--cb-border);
  height: 100%;
}
.cb-numbered-feature .num {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; font-size: 1.6rem; font-weight: 700;
  color: var(--cb-border); flex-shrink: 0; line-height: 1; min-width: 42px;
}

/* ---------- Shared surface base — every bordered "panel" component
   (feature cards, service tiles, testimonials, stat tiles) shares this
   instead of each repeating the same border/radius/background. ---------- */
.cb-panel {
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius);
  background: var(--cb-surface);
}

.cb-feature-card {
  padding: 26px;
  height: 100%;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.cb-feature-card:hover { transform: translateY(-4px); box-shadow: var(--cb-shadow-lg); border-color: transparent; }
.cb-feature-card .icon {
  width: 46px; height: 46px; border-radius: 10px;
  background: rgba(20,86,217,0.12);
  color: var(--cb-accent-dark);
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; margin-bottom: 15px;
}

.cb-service-tile {
  padding: 22px;
  transition: box-shadow .2s ease, transform .2s ease;
  height: 100%;
}
.cb-service-tile:hover { box-shadow: var(--cb-shadow); transform: translateY(-3px); }
.cb-service-tile .icon { font-size: 1.4rem; color: var(--cb-accent); margin-bottom: 10px; }

/* ---------- Stats counters ---------- */
.cb-stats-band { background: var(--cb-gradient-navy); color: #fff; padding: 60px 0; }
.cb-stat-card .num { font-size: 2.3rem; font-weight: 800; }
.cb-stat-card .label { color: rgba(255,255,255,0.7); font-weight: 600; }

/* ---------- Testimonials ---------- */
.cb-testimonial-card {
  padding: 24px;
  height: 100%;
}
.cb-testimonial-card .stars { color: var(--cb-gold); letter-spacing: 2px; margin-bottom: 10px; }
.cb-avatar-circle {
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--cb-gradient-accent);
  color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800;
}

/* ---------- FAQ accordion ---------- */
/* ---------- Product category pills ---------- */
.nav-pills .nav-link {
  color: var(--cb-text-muted); font-weight: 700; font-size: 0.9rem;
  border-radius: var(--cb-radius-pill); padding: 9px 20px; margin: 0 4px;
  border: 1px solid var(--cb-border); transition: all .18s ease;
}
.nav-pills .nav-link:hover { border-color: var(--cb-accent); color: var(--cb-accent-dark); }
.nav-pills .nav-link.active {
  background: var(--cb-gradient-accent); color: #fff; border-color: transparent;
  box-shadow: 0 6px 16px rgba(20,86,217,0.3);
}

.cb-accordion .accordion-item { border: 1px solid var(--cb-border); border-radius: var(--cb-radius-sm) !important; margin-bottom: 10px; overflow: hidden; }
.cb-accordion .accordion-button { font-weight: 700; }
.cb-accordion .accordion-button:not(.collapsed) { background: rgba(20,86,217,0.08); color: var(--cb-emerald-900); box-shadow: none; }
.cb-accordion .accordion-button:focus { box-shadow: none; }
.cb-accordion .accordion-button:focus-visible { outline: 2px solid var(--cb-accent); outline-offset: -2px; }

/* ---------- App download ---------- */
.cb-app-download { background: var(--cb-emerald-950); color: #fff; border-radius: var(--cb-radius-lg); padding: 56px; position: relative; overflow: hidden; }
.cb-store-badge { display: inline-flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.2); padding: 10px 18px; border-radius: var(--cb-radius-sm); color: #fff; font-weight: 700; }
.cb-store-badge:hover { background: rgba(255,255,255,0.16); color: #fff; }

/* ---------- Footer ---------- */
.cb-footer { background: var(--cb-emerald-950); color: rgba(255,255,255,0.68); padding: 64px 0 28px; }
.cb-footer h6 { color: #fff; font-weight: 800; font-size: 0.83rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 16px; }
.cb-footer a { color: rgba(255,255,255,0.63); font-size: 0.92rem; }
.cb-footer a:hover { color: #fff; }
.cb-footer .social-icon {
  width: 35px; height: 35px; border-radius: 7px; background: rgba(255,255,255,0.06);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.cb-footer .social-icon:hover { background: var(--cb-gradient-accent); }

/* ---------- App header (dashboard + admin) — top nav, no sidebar ---------- */
/* ---------- Impersonation banner — deliberately loud, never blends in ---------- */
.cb-account-view-banner {
  background: #b8720b;
  color: #fff;
  padding: 10px 0;
  font-size: 0.88rem;
  font-weight: 600;
  position: sticky;
  top: 0;
  z-index: 1040;
}
.cb-account-view-banner .btn-light { color: #b8720b; }

.cb-app-header {
  background: var(--cb-gradient-navy);
  padding: 10px 0;
  position: sticky; top: 0; z-index: 1030;
  box-shadow: var(--cb-shadow);
}
.cb-app-header .navbar-brand {
  color: #fff; font-weight: 800; font-size: 1.08rem;
  display: flex; align-items: center; gap: 9px;
}
.cb-app-header .navbar-brand .brand-mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--cb-gradient-accent);
  display: flex; align-items: center; justify-content: center; font-size: 13px; color: #fff;
}
.cb-app-header .navbar-toggler { border-color: rgba(255,255,255,0.3); }
.cb-app-header .nav-link {
  color: rgba(255,255,255,0.82) !important; font-weight: 600; font-size: 0.92rem;
  padding: 10px 14px !important; border-radius: 8px; transition: background .15s ease, color .15s ease;
}
.cb-app-header .nav-link:hover { background: rgba(255,255,255,0.08); color: #fff !important; }
.cb-app-header .nav-link.active { background: var(--cb-accent); color: #fff !important; }
.cb-app-header .dropdown-menu {
  border: 1px solid var(--cb-border); border-radius: var(--cb-radius);
  box-shadow: var(--cb-shadow-lg); padding: 8px; margin-top: 8px !important;
}
.cb-app-header .dropdown-item { border-radius: 8px; padding: 9px 12px; font-size: 0.9rem; }
.cb-app-header .dropdown-item.active { background: rgba(20,86,217,0.1); color: var(--cb-accent-dark); font-weight: 600; }
.cb-header-dot {
  position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cb-gold); border: 2px solid var(--cb-emerald-900);
}
.cb-header-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--cb-gradient-accent); color: #fff; font-weight: 800;
  display: flex; align-items: center; justify-content: center; font-size: 0.82rem;
}

.cb-main { padding: 28px 34px 60px; max-width: 1320px; margin: 0 auto; }

.cb-topbar-wrap {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--cb-surface); border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius); padding: 14px 20px; margin-bottom: 22px;
  box-shadow: var(--cb-shadow-sm);
}
.cb-topbar-search {
  display: flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.08); border-radius: var(--cb-radius-sm); padding: 8px 14px;
  color: rgba(255,255,255,0.7); font-size: 0.88rem; min-width: 200px;
}
.cb-topbar-search input { border: none; background: transparent; outline: none; width: 100%; font-size: 0.88rem; color: #fff; }
.cb-topbar-search input::placeholder { color: rgba(255,255,255,0.5); }
.cb-icon-btn {
  width: 40px; height: 40px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: var(--cb-bg); color: var(--cb-text); position: relative;
  border: 1px solid var(--cb-border); transition: background .15s ease;
}
.cb-icon-btn:hover { background: #eef1f8; }

.cb-topbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; flex-wrap: wrap; gap: 12px; }

/* ---------- Cards ---------- */
.cb-card {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg);
  padding: 28px;
  margin-bottom: 20px;
  box-shadow: var(--cb-shadow-sm);
  transition: box-shadow .2s ease, transform .2s ease;
}
.cb-card:hover { box-shadow: var(--cb-shadow); }
.cb-card h6.cb-label {
  color: var(--cb-text-muted); text-transform: uppercase; font-size: 0.71rem;
  letter-spacing: 0.05em; font-weight: 800; margin-bottom: 8px;
}

.cb-stat-tile {
  padding: 22px; box-shadow: var(--cb-shadow-sm);
  transition: transform .18s ease, box-shadow .18s ease;
}
.cb-stat-tile:hover { transform: translateY(-2px); box-shadow: var(--cb-shadow); }
.cb-stat-tile .icon { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.05rem; margin-bottom: 12px; }
.cb-icon-tile-accent { background: rgba(20,86,217,0.12); color: var(--cb-accent-dark); }
.cb-icon-tile-success { background: rgba(15,163,135,0.12); color: #0fa387; }
.cb-icon-tile-gold { background: rgba(212,175,55,0.16); color: #b8860b; }
.cb-icon-tile-danger { background: rgba(197,48,48,0.1); color: #c53030; }

.cb-topbar-search-light {
  background: var(--cb-bg) !important;
  color: var(--cb-text-muted) !important;
  min-width: 220px;
}
.cb-topbar-search-light input { color: var(--cb-text) !important; }
.cb-stat-tile .trend { font-size: 0.78rem; font-weight: 700; }
.cb-stat-tile .trend.up { color: var(--cb-teal); }
.cb-stat-tile .trend.down { color: #b3261e; }

/* ---------- Account / bank card visuals ---------- */
/* ---------- Account filter pills (Chase-style: click an account to filter activity) ---------- */
.cb-account-filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.cb-account-filter-pill {
  border: 1px solid var(--cb-border); background: var(--cb-surface); color: var(--cb-text-muted);
  border-radius: var(--cb-radius-pill); padding: 7px 16px; font-size: 0.85rem; font-weight: 600;
  transition: all .15s ease;
}
.cb-account-filter-pill:hover { border-color: var(--cb-accent); color: var(--cb-accent-dark); }
.cb-account-filter-pill.is-active { background: var(--cb-gradient-accent); color: #fff; border-color: transparent; }

.cb-account-card.is-clickable { cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.cb-account-card.is-clickable:hover { box-shadow: var(--cb-shadow-lg); transform: translateY(-2px); }

.cb-account-card {
  border-radius: var(--cb-radius-lg); padding: 24px; color: #fff;
  background: var(--cb-gradient-card);
  margin-bottom: 18px; position: relative; overflow: hidden;
  box-shadow: var(--cb-shadow);
}
.cb-account-card::after {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(20,86,217,0.25), transparent 70%);
  top: -100px; right: -80px;
}
.cb-account-card .balance { font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", sans-serif; font-size: 2.1rem; font-weight: 700; font-variant-numeric: tabular-nums lining-nums; }
.cb-account-card .acc-number { letter-spacing: 1.5px; font-family: 'JetBrains Mono', monospace; opacity: 0.85; font-size: 0.85rem; }

.cb-bank-card-scene { perspective: 1400px; cursor: pointer; }
.cb-bank-card-flip {
  position: relative; width: 100%; min-height: 195px;
  transition: transform .6s cubic-bezier(.22,1,.36,1);
  transform-style: preserve-3d;
}
.cb-bank-card-scene.is-flipped .cb-bank-card-flip { transform: rotateY(180deg); }
.cb-bank-card-face {
  position: absolute; inset: 0; backface-visibility: hidden;
  border-radius: var(--cb-radius-lg);
}
.cb-bank-card-face.back { transform: rotateY(180deg); }
.cb-bank-card-back {
  border-radius: var(--cb-radius-lg); padding: 0; color: #fff;
  background: var(--cb-gradient-card);
  min-height: 195px; position: relative; overflow: hidden;
  box-shadow: var(--cb-shadow);
}
.cb-bank-card-back .magstripe { background: #14100a; height: 38px; margin-top: 20px; }
.cb-bank-card-back .signature-strip {
  background: repeating-linear-gradient(135deg, #fff, #fff 4px, #f2f0ea 4px, #f2f0ea 8px);
  height: 34px; margin: 18px 20px 0; border-radius: 4px;
  display: flex; align-items: center; justify-content: flex-end; padding-right: 12px;
}
.cb-bank-card-back .cvv-box {
  background: #fff; color: #14100a; font-family: 'JetBrains Mono', monospace; font-weight: 700;
  font-size: 0.85rem; padding: 6px 10px; border-radius: 4px; letter-spacing: 2px;
}
.cb-bank-card-back .back-footer { padding: 16px 20px; font-size: 0.7rem; opacity: .7; }
.cb-flip-hint {
  text-align: center; font-size: 0.7rem; color: var(--cb-text-muted); margin-top: 6px;
}
.cb-bank-card {
  border-radius: var(--cb-radius-lg); padding: 24px; color: #fff;
  background: var(--cb-gradient-card);
  min-height: 195px; display: flex; flex-direction: column; justify-content: space-between;
  margin-bottom: 14px; position: relative; overflow: hidden;
  box-shadow: var(--cb-shadow);
  transition: transform .35s cubic-bezier(.22,1,.36,1), box-shadow .35s ease;
  transform-style: preserve-3d;
}
.cb-bank-card:hover { transform: rotateY(5deg) rotateX(4deg) translateY(-4px); box-shadow: var(--cb-shadow-lg); }
.cb-bank-card::after {
  content: ""; position: absolute; width: 200px; height: 200px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.06), transparent 70%);
  bottom: -100px; right: -60px;
}
/* Shimmer sweep on hover — a subtle diagonal light pass, like foil catching light */
.cb-bank-card::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.14) 50%, transparent 60%);
  background-size: 250% 250%; background-position: 120% 0;
  transition: background-position .8s ease;
}
.cb-bank-card:hover::before { background-position: -20% 100%; }

.cb-bank-card.locked { background: linear-gradient(135deg, #565f70 0%, #33394a 100%); }
/* Virtual card: matte graphite + gold foil accent — a distinct "premium metal" treatment */
.cb-bank-card.virtual {
  background: linear-gradient(155deg, #1c1c1e 0%, #2c2c2e 55%, #3a2f1a 100%);
  border: 1px solid rgba(212,175,55,0.25);
}
.cb-bank-card.virtual .chip { background: linear-gradient(135deg,#f2e2a8,#d4af37); }
.cb-bank-card.virtual .network { color: #e8d48a; }
.cb-bank-card .chip { width: 42px; height: 32px; border-radius: 7px; background: linear-gradient(135deg,#e8d48a,#c8a24a); margin-bottom: 8px; box-shadow: inset 0 0 0 1px rgba(0,0,0,0.15); }
.cb-bank-card .num { font-family: 'JetBrains Mono', monospace; letter-spacing: 2.4px; font-size: 1.15rem; position: relative; z-index: 2; }
.cb-bank-card .network { font-weight: 800; font-style: italic; letter-spacing: 0.4px; font-size: 1.04rem; position: relative; z-index: 2; }
.cb-bank-card .contactless { font-size: 1.15rem; opacity: 0.85; transform: rotate(90deg); }
.cb-virtual-tag {
  position: absolute; top: 14px; left: 14px; font-size: 0.62rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: .07em; background: rgba(212,175,55,0.22); color: #f2e2a8;
  border: 1px solid rgba(212,175,55,0.4); padding: 3px 9px; border-radius: var(--cb-radius-pill); z-index: 2;
}

/* ---------- Badges ---------- */
.cb-badge-active, .cb-badge-approved, .cb-badge-paid_off, .cb-badge-verified, .cb-badge-completed { background: #e2f5f1; color: var(--cb-success); }
.cb-badge-frozen, .cb-badge-locked { background: #fdf1de; color: var(--cb-warning); }
.cb-badge-closed, .cb-badge-suspended, .cb-badge-cancelled, .cb-badge-rejected, .cb-badge-failed { background: #fbe6e5; color: var(--cb-error); }
.cb-badge-pending, .cb-badge-pending_approval, .cb-badge-pending_verification, .cb-badge-processing { background: #e7f0fc; color: #0052a5; }
.cb-badge-not_started { background: #f0f2f7; color: #4a5568; }
.cb-badge {
  font-size: 0.74rem; font-weight: 700; padding: 4px 12px; border-radius: var(--cb-radius-pill);
  background: #edf1f7; color: #4a5568;
}

/* ---------- Tables ---------- */
.cb-card .table { margin-bottom: 0; font-variant-numeric: tabular-nums; }
.cb-card .table thead th { border-bottom: 1px solid var(--cb-border); padding-top: 0; }
.cb-card .table td { border-color: #f0f2f7; vertical-align: middle; }
.cb-card .table tbody tr { transition: background .15s ease; }
.cb-card .table tbody tr:hover { background: #f7f9fc; }

/* ---------- Empty states ---------- */
.cb-empty-state { text-align: center; padding: 48px 20px; color: var(--cb-text-muted); }
.cb-empty-state .icon { font-size: 2.5rem; color: var(--cb-border); margin-bottom: 13px; }

/* ---------- Auth pages ("Sign On") ---------- */
.cb-auth-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: var(--cb-gradient-navy); padding: 40px 16px; position: relative; overflow: hidden;
}
.cb-auth-wrap::before { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: radial-gradient(circle, rgba(20,86,217,0.28), transparent 70%); top: -150px; right: -110px; }
.cb-auth-logo { display: inline-flex; vertical-align: -3px; }

.cb-auth-card {
  background: var(--cb-surface); border-radius: var(--cb-radius-lg); padding: 38px;
  width: 100%; max-width: 430px; box-shadow: var(--cb-shadow-lg); position: relative; z-index: 1;
}
.cb-auth-card .form-control, .cb-auth-card .form-select { border-radius: var(--cb-radius-sm); padding: 10px 14px; }

.form-control, .form-select { border-radius: var(--cb-radius-sm); border-color: var(--cb-border); }
.form-control:focus, .form-select:focus { border-color: var(--cb-accent); box-shadow: 0 0 0 3px rgba(20,86,217,0.16); }

@media (max-width: 991px) {
  .cb-app-header .navbar-nav { padding-top: 10px; }
  .cb-app-header .dropdown-menu { background: var(--cb-emerald-900); border-color: rgba(255,255,255,0.15); }
  .cb-app-header .dropdown-item { color: rgba(255,255,255,0.85); }
  .cb-app-header .dropdown-item:hover { background: rgba(255,255,255,0.08); color: #fff; }
  .cb-app-header .dropdown-item.active { background: var(--cb-accent); color: #fff; }
}

@media (max-width: 900px) {
  .cb-main { padding: 18px; }
  .cb-hero:not(.cb-hero-split) { padding: 70px 0 110px; }
  .cb-hero-visual { height: auto; margin-top: 40px; }
  .cb-mock-dashboard { position: relative; max-width: 100%; }
  .cb-mock-card { position: relative; left: 0; bottom: 0; margin-top: 20px; width: 100%; }
  .cb-toast-float { display: none; }
  .cb-hero-left { padding: 56px 24px 40px; }
  .cb-hero-right, .cb-hero-image { min-height: 260px; }
  .cb-quicknav-inner { padding: 10px 0; overflow-x: auto; flex-wrap: nowrap; }
  .cb-quicknav-inner a { flex-shrink: 0; }
}

@media (max-width: 640px) {
  .cb-main { padding: 14px; }
  .cb-card { padding: 18px; }
  .cb-topbar { flex-direction: column; align-items: stretch; }
  .cb-account-card, .cb-bank-card, .cb-bank-card-flat { padding: 18px; }
  .cb-bank-card-flat { min-height: 150px; }
  .cb-hero-stats { gap: 20px; }
  .cb-app-download { padding: 32px 20px; }
  .cb-main:has(.cb-chat-shell) { padding: 0; }
  .cb-chat-shell { height: calc(100vh - 130px); border-radius: 0; border-left: none; border-right: none; }
  .cb-chat-messages { padding: 14px; }
  .cb-chat-bubble { max-width: 84%; }
}

@media (max-width: 374px) {
  /* Below this width the fixed-size sparkline canvas would crowd the
     balance figure onto an awkward line-wrap — drop it rather than
     squeeze it. Nothing else about the card changes, the number and
     label stay full-size and fully legible. */
  .cb-sparkline { display: none; }
}

/* ---------- Live chat — premium, elegant treatment ---------- */
.cb-chat-shell {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg);
  box-shadow: var(--cb-shadow);
  display: flex;
  flex-direction: column;
  height: min(720px, calc(100vh - 200px));
  overflow: hidden;
}
.cb-chat-header {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  background: var(--cb-gradient-navy);
  color: #fff;
  flex-shrink: 0;
}
.cb-chat-header .text-muted { color: rgba(255,255,255,0.65) !important; }
.cb-chat-avatar {
  width: 42px; height: 42px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25);
}
.cb-chat-avatar-fallback {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.12); font-size: 1.1rem; color: #fff;
}
.cb-chat-messages {
  flex: 1; overflow-y: auto; padding: 22px;
  background:
    radial-gradient(circle at 10% 20%, rgba(20,86,217,0.04), transparent 40%),
    var(--cb-bg);
  display: flex; flex-direction: column; gap: 4px;
}
.cb-chat-empty { text-align: center; color: var(--cb-text-muted); padding: 40px 20px; }
.cb-chat-empty i { font-size: 2.4rem; color: var(--cb-border); }

.cb-chat-bubble-row.is-self { justify-content: flex-end; }
.cb-chat-bubble-row.is-other { justify-content: flex-start; }
.cb-chat-bubble-row { display: flex; margin-bottom: 10px; animation: cbMessageIn .25s ease; }
@keyframes cbMessageIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.cb-chat-bubble {
  max-width: min(72%, 480px);
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.5;
  box-shadow: 0 1px 2px rgba(7,26,51,0.05);
}
.is-self .cb-chat-bubble {
  background: var(--cb-gradient-accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.is-other .cb-chat-bubble {
  background: var(--cb-surface);
  border: 1px solid var(--cb-border);
  color: var(--cb-text);
  border-bottom-left-radius: 4px;
}
.cb-chat-timestamp { font-size: 0.68rem; opacity: 0.65; margin-top: 4px; }
.cb-chat-attachment-img { max-width: 220px; border-radius: 10px; display: block; margin-top: 6px; }
.cb-chat-file-link { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 0.85rem; text-decoration: underline; }
.is-self .cb-chat-file-link { color: #fff; }

.cb-chat-input-row {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 18px;
  border-top: 1px solid var(--cb-border);
  background: var(--cb-surface);
  flex-shrink: 0;
}
.cb-chat-input-row .form-control { border-radius: var(--cb-radius-pill); padding: 10px 18px; }
.cb-chat-attach-btn {
  width: 44px; height: 44px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--cb-bg); color: var(--cb-text-muted);
  cursor: pointer; flex-shrink: 0; transition: background .15s ease;
}
.cb-chat-attach-btn:hover { background: var(--cb-border); }
.cb-chat-send-btn {
  width: 44px; height: 44px; border-radius: 50%; border: none;
  background: var(--cb-gradient-accent); color: #fff; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; box-shadow: 0 4px 10px rgba(20,86,217,0.3);
  transition: transform .15s ease;
}
.cb-chat-send-btn:hover { transform: scale(1.06); }

/* Admin two-pane inbox */
.cb-chat-admin-shell {
  display: grid; grid-template-columns: 280px 1fr; gap: 20px;
  height: min(720px, calc(100vh - 220px));
}
@media (min-width: 1200px) {
  .cb-chat-admin-shell { grid-template-columns: 280px 1fr 280px; }
}
.cb-chat-admin-info {
  background: var(--cb-surface); border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg); overflow-y: auto; box-shadow: var(--cb-shadow-sm);
  padding: 20px;
}
.cb-chat-info-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--cb-gradient-accent); color: #fff; font-weight: 800; font-size: 1.3rem;
  display: flex; align-items: center; justify-content: center;
}
.cb-chat-info-row {
  display: flex; justify-content: space-between; padding: 5px 0; font-size: 0.83rem;
}
.cb-chat-info-row span:first-child { color: var(--cb-text-muted); }
.cb-chat-info-row span:last-child { font-weight: 600; text-align: right; }
.cb-chat-note {
  background: var(--cb-bg); border-radius: var(--cb-radius-sm); padding: 8px 10px; margin-bottom: 6px;
}
.cb-chat-status-select { font-weight: 600; font-size: 0.82rem; }
.cb-chat-admin-list {
  background: var(--cb-surface); border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg); overflow-y: auto; box-shadow: var(--cb-shadow-sm);
}
.cb-chat-list-item {
  padding: 14px 16px; border-bottom: 1px solid var(--cb-border);
  cursor: pointer; transition: background .15s ease;
}
.cb-chat-list-item:hover { background: var(--cb-bg); }
.cb-chat-list-item.is-active { background: rgba(20,86,217,0.08); border-left: 3px solid var(--cb-accent); }
.cb-chat-online-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #c9c4b4; flex-shrink: 0; margin-top: 4px;
}
.cb-chat-online-dot.is-online { background: var(--cb-success); box-shadow: 0 0 0 3px rgba(15,122,108,0.15); }
.cb-chat-admin-panel {
  background: var(--cb-surface); border: 1px solid var(--cb-border);
  border-radius: var(--cb-radius-lg); overflow: hidden;
  display: flex; flex-direction: column; box-shadow: var(--cb-shadow-sm);
}
.cb-chat-admin-panel .cb-chat-messages { flex: 1; }

@media (max-width: 900px) {
  .cb-chat-admin-shell { grid-template-columns: 1fr; grid-template-rows: 200px 1fr; height: auto; }
  .cb-chat-bubble { max-width: 85%; }
}

/* ---------- Transfer step indicator ---------- */
.cb-transfer-steps { display: flex; gap: 18px; font-size: 0.82rem; font-weight: 600; }
.cb-transfer-steps span { color: var(--cb-text-muted); }
.cb-transfer-steps span.is-active { color: var(--cb-accent); }
.cb-transfer-steps span.is-done { color: var(--cb-success); }
@media (max-width: 640px) { .cb-transfer-steps { display: none; } }

/* ---------- Receipt ---------- */
.cb-receipt-check {
  width: 60px; height: 60px; border-radius: 50%; margin: 0 auto;
  background: rgba(6,118,71,0.1); color: var(--cb-success);
  display: flex; align-items: center; justify-content: center; font-size: 1.8rem;
}

/* ---------- Chat: typing indicator, read receipts, drag-and-drop ---------- */
.cb-chat-typing { display: flex; gap: 4px; padding: 4px 2px; align-items: center; }
.cb-chat-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: var(--cb-text-muted);
  animation: cbTypingBounce 1.2s infinite ease-in-out;
}
.cb-chat-typing span:nth-child(2) { animation-delay: 0.15s; }
.cb-chat-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes cbTypingBounce {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-4px); opacity: 1; }
}

.cb-chat-seen { font-size: 0.7rem; color: var(--cb-text-muted); margin-top: 2px; padding-right: 4px; min-height: 14px; }

.cb-chat-messages.is-drag-over {
  background: rgba(20,86,217,0.06);
  outline: 2px dashed var(--cb-accent);
  outline-offset: -8px;
}

/* ---------- Real month-over-month trend badge on stat tiles ---------- */
.cb-trend-badge {
  font-size: 0.72rem; font-weight: 700; padding: 3px 8px; border-radius: var(--cb-radius-pill);
  display: inline-flex; align-items: center; gap: 1px;
}
.cb-trend-badge.is-up { background: rgba(6,118,71,0.1); color: var(--cb-success); }
.cb-trend-badge.is-down { background: rgba(180,35,24,0.1); color: var(--cb-error); }

/* ---------- Chat: internal notes, canned replies, composer tabs ---------- */
.cb-chat-note-bubble { background: #fdf6e3 !important; border: 1px solid #f0dfa8 !important; color: var(--cb-text) !important; }
.cb-chat-note-label { font-size: 0.7rem; font-weight: 700; color: #9a7b1f; text-transform: uppercase; letter-spacing: .03em; margin-bottom: 4px; }

.cb-chat-canned-row { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 14px 0; }
.cb-chat-canned-pill {
  border: 1px solid var(--cb-border); background: var(--cb-surface); color: var(--cb-text-muted);
  border-radius: var(--cb-radius-pill); padding: 4px 12px; font-size: 0.76rem; font-weight: 600;
  transition: all .15s ease;
}
.cb-chat-canned-pill:hover { border-color: var(--cb-accent); color: var(--cb-accent-dark); background: rgba(20,86,217,0.05); }

.cb-chat-composer-tabs { display: flex; gap: 4px; padding: 10px 14px 0; }
.cb-chat-composer-tab {
  border: none; background: transparent; color: var(--cb-text-muted); font-size: 0.8rem; font-weight: 600;
  padding: 6px 10px; border-radius: var(--cb-radius-sm) var(--cb-radius-sm) 0 0; border-bottom: 2px solid transparent;
}
.cb-chat-composer-tab.is-active { color: var(--cb-accent); border-bottom-color: var(--cb-accent); }
.cb-chat-send-btn.is-note-mode { background: #b8860b; box-shadow: 0 4px 10px rgba(184,134,11,0.3); }

/* ---------- Overview redesign: flat minimal stat tiles, loan progress rings ---------- */
.cb-flat-tile {
  background: var(--cb-bg);
  border-radius: var(--cb-radius);
  padding: 18px 20px;
  height: 100%;
}
.cb-flat-tile-label { font-size: 0.78rem; color: var(--cb-text-muted); font-weight: 600; margin-bottom: 6px; }
.cb-flat-tile-value { font-size: 1.55rem; font-weight: 800; color: var(--cb-text); }
.cb-flat-tile-foot { font-size: 0.74rem; color: var(--cb-text-muted); margin-top: 10px; }

.cb-loan-ring {
  display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -4px; margin-right: 6px;
  background: conic-gradient(var(--ring-color) calc(var(--ring-pct) * 1%), var(--cb-border) 0);
  position: relative;
}
.cb-loan-ring::after {
  content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--cb-surface);
}
.cb-loan-progress-bar { width: 100%; max-width: 160px; height: 5px; border-radius: var(--cb-radius-pill); background: var(--cb-border); overflow: hidden; }
.cb-loan-progress-bar .fill { height: 100%; border-radius: var(--cb-radius-pill); }

/* ---------- Frozen account banner ---------- */
.cb-frozen-banner {
  background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--cb-radius);
  padding: 16px 20px; color: #7f1d1d;
}
.cb-frozen-banner i { color: var(--cb-error); }

/* ---------- Sitewide unread-chat badge ---------- */
.cb-unread-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px;
  background: var(--cb-error); color: #fff; font-size: 0.68rem; font-weight: 700;
  border-radius: var(--cb-radius-pill); vertical-align: 2px;
}

/* ---------- Sidebar layout shell (reverted from top-nav to sidebar) ---------- */
.cb-app-shell { display: flex; min-height: 100vh; background: var(--cb-bg); }

.cb-sidebar {
  width: 264px; flex-shrink: 0;
  background: var(--cb-surface);
  border-right: 1px solid var(--cb-border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  z-index: 1045;
}
.cb-sidebar-brand {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 22px; border-bottom: 1px solid var(--cb-border); flex-shrink: 0;
}
.cb-sidebar-brand .brand-mark { color: var(--cb-accent); display: inline-flex; }
.cb-sidebar-close { background: none; border: none; color: var(--cb-text-muted); font-size: 1.1rem; padding: 4px; }

.cb-sidebar-nav { flex: 1; padding: 14px 12px; overflow-y: auto; }
.cb-sidebar-group-label {
  font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--cb-text-muted); padding: 16px 12px 6px;
}
.cb-sidebar-link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--cb-radius-sm);
  color: var(--cb-text); text-decoration: none; font-size: 0.88rem; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.cb-sidebar-link i { font-size: 1.05rem; color: var(--cb-text-muted); width: 20px; text-align: center; flex-shrink: 0; }
.cb-sidebar-link:hover { background: var(--cb-bg); color: var(--cb-text); }
.cb-sidebar-link.is-active {
  background: rgba(20,86,217,0.08); color: var(--cb-accent-dark); font-weight: 700;
  position: relative;
}
.cb-sidebar-link.is-active i { color: var(--cb-accent); }
.cb-sidebar-link.is-active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  background: var(--cb-accent); border-radius: 0 3px 3px 0;
}

.cb-sidebar-bottom { padding: 12px; border-top: 1px solid var(--cb-border); flex-shrink: 0; }

.cb-sidebar-backdrop {
  display: none; position: fixed; inset: 0; background: rgba(7,26,51,0.5); z-index: 1044;
}

.cb-app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.cb-topbar-bar {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 24px; background: var(--cb-surface); border-bottom: 1px solid var(--cb-border);
  position: sticky; top: 0; z-index: 1030;
}
.cb-sidebar-toggle {
  width: 44px; height: 44px; border-radius: var(--cb-radius-sm); border: 1px solid var(--cb-border);
  background: var(--cb-surface); color: var(--cb-text); font-size: 1.1rem; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.cb-topbar-icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  color: var(--cb-text-muted); text-decoration: none; transition: background .15s ease;
}
.cb-topbar-icon-btn:hover { background: var(--cb-bg); }
.cb-header-dot { position: absolute; top: 8px; right: 8px; width: 8px; height: 8px; border-radius: 50%; background: var(--cb-error); border: 2px solid var(--cb-surface); }

/* Mobile: sidebar becomes a slide-out drawer */
@media (max-width: 991.98px) {
  .cb-sidebar {
    position: fixed; left: 0; top: 0; height: 100vh;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: var(--cb-shadow-lg);
  }
  .cb-sidebar.is-open { transform: translateX(0); }
  .cb-sidebar-backdrop.is-open { display: block; }
}

/* ---------- Flat dashboard account cards (Overview) ---------- */
.cb-bank-card-flat {
  border-radius: var(--cb-radius-lg);
  padding: 24px;
  color: #fff;
  height: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--cb-shadow);
}
.cb-bank-card-flat.is-dark { background: linear-gradient(135deg, #101828 0%, #1d2939 100%); }
.cb-bank-card-flat.is-accent { background: linear-gradient(135deg, var(--cb-accent) 0%, var(--cb-accent-2) 100%); }
.cb-bank-card-flat.is-empty {
  background: var(--cb-bg);
  border: 1px dashed var(--cb-border);
  color: var(--cb-text-muted);
  box-shadow: none;
}
