/* ======================================================
   JBSSM BANK PORTAL — Premium Banking Theme
   Shree Jay Bhojalram Sharafi Sahakari Mandali Ltd.
   Palette: Deep Navy · Warm Gold · Crisp White
   ====================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  /* Core palette */
  --navy:       #0B1E3E;
  --navy-mid:   #112347;
  --navy-light: #1A3360;
  --gold:       #C9982A;
  --gold-light: #E8B94A;
  --gold-pale:  #FBF3DC;
  --white:      #FFFFFF;
  --off-white:  #F7F8FC;
  --silver:     #E8ECF4;
  --text:       #1A2340;
  --muted:      #5E6A84;
  --light-muted:#9AA3B8;

  /* Status */
  --success:    #1A7C52;
  --success-bg: #E6F5EE;
  --danger:     #B3261E;
  --danger-bg:  #FDECEB;
  --warn:       #92600E;
  --warn-bg:    #FEF6E8;
  --blue:       #1A4EA6;
  --blue-bg:    #EAF0FA;

  /* UI */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  18px;
  --shadow-card: 0 2px 12px rgba(11,30,62,0.08), 0 1px 3px rgba(11,30,62,0.05);
  --shadow-lg:   0 20px 60px rgba(11,30,62,0.18);
  --border:      #DDE3EF;
  --surface:     var(--white);
  --heading:     var(--navy);
}

/* ── DARK MODE ───────────────────────────────────────── */
:root[data-theme="dark"] {
  --navy-mid:   #0D1B33;
  --navy-light: #1E3A6B;
  --surface:    #16213E;
  --heading:    #E7EAF3;
  --off-white:  #111A30;
  --silver:     #25315294;
  --text:       #E7EAF3;
  --muted:      #9AA6C4;
  --light-muted:#74809E;
  --border:      #2A3655;
  --success-bg: rgba(26,124,82,0.22);
  --danger-bg:  rgba(179,38,30,0.22);
  --warn-bg:    rgba(146,96,14,0.25);
  --blue-bg:    rgba(26,78,166,0.22);
  --shadow-card: 0 2px 14px rgba(0,0,0,0.45), 0 1px 3px rgba(0,0,0,0.3);
  --shadow-lg:   0 20px 60px rgba(0,0,0,0.55);
}
:root[data-theme="dark"] body { background: #0A1224; }
:root[data-theme="dark"] .acc-meta-value.mono,
:root[data-theme="dark"] code,
:root[data-theme="dark"] .mono { color: var(--text); }
:root[data-theme="dark"] img.logo-flatten-on-dark { background: #fff; border-radius: 50%; }

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  background: var(--off-white);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── TYPOGRAPHY ─────────────────────────────────────── */
.serif { font-family: 'Playfair Display', Georgia, serif; }

/* ── SCROLLBAR ──────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--silver); border-radius: 3px; }

/* ── BANK HEADER ────────────────────────────────────── */
.bank-header {
  background: var(--navy);
  border-bottom: 2px solid var(--gold);
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.bank-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
}

.bank-header-right {
  flex-shrink: 0;
}

.bank-logo-mark {
  width: 44px; height: 44px;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 16px; font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.5px;
  flex-shrink: 0;
  overflow: hidden;
  padding: 2px;
}
.bank-logo-mark img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.bank-logo-text {
  display: flex; flex-direction: column; line-height: 1;
  min-width: 0;
}

.bank-logo-name {
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bank-logo-sub {
  color: var(--gold);
  font-size: 9px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  margin-top: 3px;
  opacity: 0.85;
}

.bank-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 30px;
  padding: 5px 14px 5px 6px;
}

.user-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.user-name {
  color: rgba(255,255,255,0.9);
  font-size: 12px;
  font-weight: 500;
  max-width: 160px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.hdr-action {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  color: rgba(255,255,255,0.85);
  font-size: 12px;
  font-weight: 500;
  padding: 7px 14px;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.18s;
  white-space: nowrap;
}

.hdr-action:hover {
  background: rgba(201,152,42,0.2);
  border-color: var(--gold);
  color: var(--gold-light);
}

.hdr-action svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── SECURITY BAR ───────────────────────────────────── */
.security-bar {
  background: var(--navy-mid);
  padding: 6px 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  letter-spacing: 0.3px;
}
.security-bar svg { width: 12px; height: 12px; stroke: var(--gold); fill: none; stroke-width: 2; flex-shrink: 0; }
.security-bar .sep { margin: 0 12px; opacity: 0.3; }
.security-bar-item { display: flex; align-items: center; gap: 8px; }

.theme-toggle-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.85); flex-shrink: 0;
}
.theme-toggle-btn:hover { background: rgba(255,255,255,0.15); }
.theme-toggle-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.mobile-theme-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px; margin-bottom: 12px; border-radius: 10px; background: var(--off-white);
}
.mobile-theme-row span { font-size: 13px; font-weight: 600; color: var(--heading); }
.mobile-theme-row .theme-toggle-btn { background: var(--surface); border-color: var(--border); color: var(--heading); }

.push-toggle-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  width: 34px; height: 34px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.85); flex-shrink: 0; position: relative;
}
.push-toggle-btn:hover { background: rgba(255,255,255,0.15); }
.push-toggle-btn svg { width: 17px; height: 17px; stroke: currentColor; fill: none; stroke-width: 2; }
.push-toggle-btn.push-on { color: var(--gold); }
.push-toggle-btn.push-on::after {
  content: ''; position: absolute; top: 5px; right: 5px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--success); border: 1.5px solid var(--navy);
}
.mobile-theme-row .push-toggle-btn { background: var(--surface); border-color: var(--border); color: var(--heading); }
.mobile-theme-row .push-toggle-btn.push-on { color: var(--gold); }
.mobile-push-row {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 10px; margin-bottom: 12px; border-radius: 10px; background: var(--off-white);
}
.mobile-push-row span { font-size: 13px; font-weight: 600; color: var(--heading); }

/* ── MOBILE HEADER / NAV PANEL ──────────────────────── */
.mobile-header-right { display: none; align-items: center; gap: 10px; flex-shrink: 0; }
.mobile-avatar { width: 32px; height: 32px; font-size: 12px; }
.mobile-menu-btn {
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.15);
  width: 38px; height: 38px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: rgba(255,255,255,0.9); flex-shrink: 0; text-decoration: none;
}
.mobile-menu-btn svg { width: 19px; height: 19px; stroke: currentColor; fill: none; stroke-width: 2; }

.mobile-nav-overlay {
  display: none; position: fixed; inset: 0; background: rgba(11,30,62,0.5);
  z-index: 199; opacity: 0; transition: opacity 0.2s;
}
.mobile-nav-overlay.open { display: block; opacity: 1; }

.mobile-nav-panel {
  display: none; position: fixed; top: 0; right: 0; bottom: 0; width: 84%; max-width: 340px;
  background: var(--surface); z-index: 200; flex-direction: column;
  padding: 18px 16px; box-shadow: -8px 0 30px rgba(0,0,0,0.25);
  transform: translateX(100%); transition: transform 0.25s ease;
  overflow-y: auto;
}
.mobile-nav-panel.open { display: flex; transform: translateX(0); }

.mobile-nav-user {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 6px 18px; border-bottom: 1px solid var(--border); margin-bottom: 14px;
}
.mobile-nav-user .user-avatar { width: 42px; height: 42px; font-size: 14px; flex-shrink: 0; }
.mobile-nav-username { font-size: 14px; font-weight: 700; color: var(--heading); }
.mobile-nav-usermno { font-size: 11px; color: var(--muted); font-family: monospace; margin-top: 2px; }

.mobile-lang-toggle { display: flex; gap: 6px; margin-bottom: 16px; }
.mobile-lang-toggle a {
  flex: 1; text-align: center; padding: 9px; border-radius: 8px; font-size: 13px; font-weight: 700;
  background: var(--off-white); color: var(--muted); text-decoration: none; border: 1px solid var(--border);
}
.mobile-lang-toggle a.active { background: var(--navy); color: #fff; border-color: var(--navy); }

.mobile-nav-link {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 10px; border-radius: 10px; color: var(--heading); text-decoration: none;
  font-size: 14px; font-weight: 600; border-bottom: 1px solid var(--off-white);
}
.mobile-nav-link svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; }
.mobile-nav-link .chev { width: 14px; height: 14px; margin-left: auto; opacity: 0.35; }
.mobile-nav-link:active { background: var(--off-white); }
.mobile-nav-logout { color: var(--danger); margin-top: 10px; }

/* ── PAGE LAYOUT ────────────────────────────────────── */
.page-main {
  max-width: 1080px;
  margin: 0 auto;
  padding: 28px 24px 72px;
}

/* ── WELCOME BANNER ─────────────────────────────────── */
.welcome-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(201,152,42,0.2);
  position: relative;
  overflow: hidden;
}

.welcome-banner::before {
  content: '';
  position: absolute;
  top: -30px; right: -30px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(201,152,42,0.06);
}

.welcome-banner::after {
  content: '';
  position: absolute;
  bottom: -50px; right: 60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(201,152,42,0.04);
}

.welcome-left { position: relative; z-index: 1; }
.welcome-greeting { font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: 4px; }
.welcome-name { font-family: 'Playfair Display', serif; font-size: 24px; font-weight: 700; color: var(--white); line-height: 1.2; }
.welcome-meta { display: flex; gap: 20px; margin-top: 10px; flex-wrap: wrap; }
.welcome-meta-item { display: flex; align-items: center; gap: 5px; color: rgba(255,255,255,0.55); font-size: 12px; }
.welcome-meta-item svg { width: 13px; height: 13px; stroke: var(--gold); fill: none; stroke-width: 2; }
.welcome-meta-item strong { color: rgba(255,255,255,0.8); }

.welcome-badge {
  position: relative; z-index: 1;
  display: flex; align-items: center; gap: 8px;
  background: rgba(201,152,42,0.15);
  border: 1px solid rgba(201,152,42,0.3);
  border-radius: 10px;
  padding: 10px 16px;
  color: var(--gold-light);
  font-size: 12px;
  font-weight: 500;
}
.welcome-badge svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── SECTION LABEL ──────────────────────────────────── */
.section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
  margin-top: 4px;
}
.section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* ── ACCOUNT CARDS ──────────────────────────────────── */
.acc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.acc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 0;
  cursor: pointer;
  transition: all 0.2s;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  position: relative;
}

.acc-card:hover {
  border-color: var(--navy-light);
  box-shadow: 0 8px 28px rgba(11,30,62,0.14);
  transform: translateY(-3px);
}

.acc-card-top {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--silver);
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-light) 100%);
  position: relative;
  overflow: hidden;
}

.acc-card-top::before {
  content: '';
  position: absolute;
  right: -20px; top: -20px;
  width: 100px; height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,0.04);
}

.acc-type-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.pill-save { background: rgba(201,152,42,0.2); color: var(--gold-light); border: 1px solid rgba(201,152,42,0.3); }
.pill-loan { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.7); border: 1px solid rgba(255,255,255,0.15); }

.acc-card-top svg { width: 11px; height: 11px; stroke: currentColor; fill: none; stroke-width: 2; }

.acc-name { font-size: 14px; font-weight: 600; color: var(--white); margin-bottom: 3px; }
.acc-number { font-size: 12px; color: rgba(255,255,255,0.5); font-family: 'Courier New', monospace; letter-spacing: 1px; }

.emi-overdue-banner {
  display: flex; align-items: flex-start; gap: 8px;
  background: var(--danger-bg); color: var(--danger);
  padding: 10px 16px; font-size: 12px; line-height: 1.4;
  border-bottom: 1px solid #F5C2BF;
}
.emi-overdue-banner svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 1px; }
.emi-overdue-banner strong { font-weight: 700; }

.acc-card-bot {
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.acc-detail { font-size: 12px; color: var(--muted); }
.acc-status-pill {
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
}
.status-active { background: var(--success-bg); color: var(--success); }
.status-closed { background: var(--danger-bg); color: var(--danger); }

.acc-card-arrow {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--off-white);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  transition: all 0.2s;
}

.acc-card:hover .acc-card-arrow {
  background: var(--navy);
  border-color: var(--navy);
}

.acc-card:hover .acc-card-arrow svg { stroke: var(--white); }
.acc-card-arrow svg { width: 13px; height: 13px; stroke: var(--navy); fill: none; stroke-width: 2.5; }

/* ── STATEMENT TOPBAR ───────────────────────────────── */
.stmt-topbar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-card);
}

.stmt-topbar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 18px;
  gap: 16px;
}

.stmt-acc-name { font-family: 'Playfair Display', serif; font-size: 18px; font-weight: 700; color: var(--heading); }
.stmt-acc-num { font-size: 12px; color: var(--muted); font-family: monospace; margin-top: 3px; }

.back-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  flex-shrink: 0;
}
.back-btn:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }
.back-btn svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── FILTER ROW ─────────────────────────────────────── */
.filter-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid var(--silver);
}

.filter-group { display: flex; flex-direction: column; gap: 5px; }
.filter-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
}

.filter-input, .filter-select {
  padding: 9px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.15s;
}
.filter-input:focus, .filter-select:focus { border-color: var(--navy); }

.btn-primary {
  display: flex; align-items: center; gap: 7px;
  background: var(--navy);
  color: var(--white);
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
  white-space: nowrap;
}
.btn-primary:hover { background: var(--navy-light); box-shadow: 0 4px 14px rgba(11,30,62,0.3); }
.btn-primary svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2.5; }

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border: 1.5px solid var(--border);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  display: flex; align-items: center; gap: 6px;
}
.btn-secondary:hover { border-color: var(--heading); color: var(--heading); }
.btn-secondary svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

.btn-gold {
  display: flex; align-items: center; gap: 6px;
  background: transparent;
  color: var(--gold);
  border: 1.5px solid var(--gold);
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s;
}
.btn-gold:hover { background: var(--gold); color: var(--navy); }
.btn-gold svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── SUMMARY CARDS ──────────────────────────────────── */
.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

@media(max-width:640px){ .summary-grid { grid-template-columns: repeat(2,1fr); } }

.sum-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  position: relative;
  overflow: hidden;
}

.sum-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  border-radius: 2px 0 0 2px;
}

.sum-card.opening::before  { background: var(--muted); }
.sum-card.debit::before    { background: var(--danger); }
.sum-card.credit::before   { background: var(--success); }
.sum-card.closing::before  { background: var(--blue); }

.sum-icon {
  width: 32px; height: 32px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 10px;
}
.sum-card.opening .sum-icon { background: #F1F3F8; }
.sum-card.debit   .sum-icon { background: var(--danger-bg); }
.sum-card.credit  .sum-icon { background: var(--success-bg); }
.sum-card.closing .sum-icon { background: var(--blue-bg); }

.sum-icon svg { width: 15px; height: 15px; fill: none; stroke-width: 2; }
.sum-card.opening .sum-icon svg { stroke: var(--muted); }
.sum-card.debit   .sum-icon svg { stroke: var(--danger); }
.sum-card.credit  .sum-icon svg { stroke: var(--success); }
.sum-card.closing .sum-icon svg { stroke: var(--blue); }

.sum-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--light-muted);
  margin-bottom: 6px;
}

.sum-value {
  font-size: 19px;
  font-weight: 700;
  line-height: 1;
}

.sum-card.opening .sum-value  { color: var(--text); }
.sum-card.debit   .sum-value  { color: var(--danger); }
.sum-card.credit  .sum-value  { color: var(--success); }
.sum-card.closing .sum-value  { color: var(--blue); }
.sum-count { font-size: 11px; color: var(--light-muted); margin-top: 4px; }

/* ── TRANSACTIONS TABLE ─────────────────────────────── */
.tbl-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}

.tbl-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--silver);
  background: var(--surface);
  flex-wrap: wrap;
}

.tbl-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tbl-title svg { width: 16px; height: 16px; stroke: var(--gold); fill: none; stroke-width: 2; }

.tbl-search-wrap {
  position: relative;
  flex: 1 1 220px;
  max-width: 320px;
  display: flex;
  align-items: center;
}
.tbl-search-wrap svg {
  position: absolute; left: 11px; width: 14px; height: 14px;
  stroke: var(--muted); fill: none; stroke-width: 2; pointer-events: none;
}
.tbl-search-input {
  width: 100%;
  padding: 8px 32px 8px 32px;
  border: 1.5px solid var(--border);
  border-radius: 20px;
  font-size: 12.5px;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s;
  background: var(--off-white);
}
.tbl-search-input:focus { border-color: var(--navy); background: var(--surface); }
.tbl-search-clear {
  position: absolute; right: 6px; background: none; border: none; cursor: pointer;
  color: var(--muted); padding: 4px; border-radius: 50%; display: flex;
}
.tbl-search-clear svg { position: static; width: 12px; height: 12px; stroke: currentColor; }
.tbl-search-clear:hover { background: var(--border); color: var(--heading); }

.tbl-count-badge {
  background: var(--off-white);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  display: none;
  flex-shrink: 0;
}

.tbl-scroll { overflow-x: auto; }

table { width: 100%; border-collapse: collapse; }

thead tr { background: var(--off-white); }

th {
  text-align: left;
  padding: 11px 18px;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  color: var(--light-muted);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}

th.right { text-align: right; }

td {
  padding: 13px 18px;
  font-size: 13px;
  border-bottom: 1px solid var(--silver);
  vertical-align: middle;
}

tr:last-child td { border-bottom: none; }

tbody tr:hover td { background: #FAFBFD; }

.td-sno { color: var(--light-muted); font-size: 11px; width: 36px; }
.td-date { color: var(--muted); font-size: 12px; white-space: nowrap; }
.td-narr { color: var(--text); max-width: 280px; }
.td-dr { color: var(--danger); font-weight: 600; text-align: right; white-space: nowrap; }
.td-cr { color: var(--success); font-weight: 600; text-align: right; white-space: nowrap; }
.td-bal { font-weight: 700; text-align: right; white-space: nowrap; }
.td-bal.pos { color: var(--blue); }
.td-bal.neg { color: var(--danger); }

/* ── STATES ─────────────────────────────────────────── */
.state-empty {
  padding: 48px 24px;
  text-align: center;
  color: var(--light-muted);
}
.state-empty svg { width: 40px; height: 40px; stroke: #D1D5E0; fill: none; stroke-width: 1.5; display: block; margin: 0 auto 12px; }
.state-empty p { font-size: 14px; margin-bottom: 4px; color: var(--muted); font-weight: 500; }
.state-empty small { font-size: 12px; }

.loading-spinner {
  width: 24px; height: 24px;
  border: 2.5px solid var(--silver);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
  margin: 36px auto;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── TOAST ──────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 28px; right: 28px;
  background: var(--navy);
  color: var(--white);
  padding: 13px 20px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  border-left: 3px solid var(--gold);
  z-index: 999;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.3s;
  pointer-events: none;
  box-shadow: var(--shadow-lg);
}
.toast.show { transform: translateY(0); opacity: 1; }

/* ── LOGIN PAGE ─────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  background: var(--navy);
}

.login-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 64px;
  background: linear-gradient(145deg, #0A1A35 0%, var(--navy) 40%, #112951 100%);
  position: relative;
  overflow: hidden;
}

.login-left::before {
  content: '';
  position: absolute;
  bottom: -80px; left: -80px;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,152,42,0.08) 0%, transparent 70%);
}

.login-left::after {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 300px; height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,152,42,0.05) 0%, transparent 70%);
}

@media(max-width:800px){ .login-left { display: none; } }

.login-left-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 52px;
  position: relative; z-index: 1;
}

.login-left-logo {
  width: 56px; height: 56px;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 18px; font-weight: 700;
  color: var(--navy);
  overflow: hidden;
  padding: 2px;
  flex-shrink: 0;
}
.login-left-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.login-left-brand-text { line-height: 1.2; }
.login-left-brand-name { color: var(--white); font-size: 14px; font-weight: 700; letter-spacing: 0.4px; text-transform: uppercase; line-height: 1.3; max-width: 280px; }
.login-left-brand-sub  { color: var(--gold); font-size: 10px; letter-spacing: 0.8px; text-transform: uppercase; opacity: 0.8; margin-top: 2px; }

.login-left-headline {
  position: relative; z-index: 1;
}
.login-left-eyebrow {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 12px;
}
.login-left-title {
  font-family: 'Playfair Display', serif;
  font-size: 38px; font-weight: 700; line-height: 1.2;
  color: var(--white); margin-bottom: 20px;
}
.login-left-title span { color: var(--gold-light); }
.login-left-desc {
  font-size: 14px; line-height: 1.75;
  color: rgba(255,255,255,0.55);
  max-width: 380px;
  margin-bottom: 44px;
}

.feature-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative; z-index: 1;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}

.feat-bullet {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(201,152,42,0.12);
  border: 1px solid rgba(201,152,42,0.2);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.feat-bullet svg { width: 16px; height: 16px; stroke: var(--gold); fill: none; stroke-width: 2; }

/* ── LOGIN RIGHT PANEL ──────────────────────────────── */
.login-right {
  width: 460px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--off-white);
  padding: 40px 48px;
}

@media(max-width:800px){ .login-right { width: 100%; padding: 30px 20px; } }

.login-card {
  width: 100%;
  max-width: 360px;
}

.login-card-header {
  margin-bottom: 28px;
  text-align: center;
}

.login-card-logo {
  width: 72px; height: 72px;
  background: var(--white);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 16px;
  font-family: 'Playfair Display', serif;
  font-size: 20px; font-weight: 700;
  color: var(--gold);
  box-shadow: 0 8px 24px rgba(11,30,62,0.2);
  overflow: hidden;
  padding: 3px;
}
.login-card-logo img {
  width: 100%; height: 100%;
  object-fit: contain;
}

.login-card-title { font-family: 'Playfair Display', serif; font-size: 22px; font-weight: 700; color: var(--heading); margin-bottom: 4px; }
.login-card-sub { font-size: 13px; color: var(--muted); }

/* ── STEP INDICATOR ─────────────────────────────────── */
.step-bar {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  gap: 0;
}
.step-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700;
  flex-shrink: 0;
  transition: all 0.25s;
}
.step-dot.active { background: var(--navy); color: var(--white); box-shadow: 0 4px 12px rgba(11,30,62,0.25); }
.step-dot.done   { background: var(--success); color: var(--white); }
.step-dot.idle   { background: var(--silver); color: var(--light-muted); }
.step-connector  { flex: 1; height: 2px; background: var(--silver); transition: background 0.25s; }
.step-connector.done { background: var(--success); }

/* ── FORM ELEMENTS ──────────────────────────────────── */
.field-group { margin-bottom: 18px; }
.field-label {
  display: block;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
}

.field-input-wrap { position: relative; }
.field-input-wrap svg {
  position: absolute; left: 13px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  stroke: var(--light-muted); fill: none; stroke-width: 2;
  pointer-events: none;
}

.field-input {
  width: 100%;
  padding: 12px 14px 12px 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: all 0.18s;
}

.field-input:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11,30,62,0.08);
}

.field-input::placeholder { color: var(--silver); }

.btn-login {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  letter-spacing: 0.3px;
  margin-top: 4px;
  box-shadow: 0 4px 16px rgba(11,30,62,0.2);
}

.btn-login:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(11,30,62,0.3); }
.btn-login:active { transform: translateY(0); }
.btn-login:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── ALERT ──────────────────────────────────────────── */
.alert {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}
.alert-error   { background: var(--danger-bg); color: var(--danger); border: 1px solid #F5C2BF; display: flex; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #B9E3CC; display: flex; }

/* ── OTP DOTS ───────────────────────────────────────── */
.otp-dots { display: flex; gap: 7px; margin-top: 10px; }
.otp-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--silver); transition: all 0.2s; }
.otp-dot.filled { background: var(--navy); transform: scale(1.1); }

/* ── RESEND / LINKS ─────────────────────────────────── */
.resend-row {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 14px;
}
.resend-timer { font-size: 12px; color: var(--muted); }
.resend-btn {
  background: none; border: none;
  color: var(--heading); font-size: 12px; font-weight: 700;
  cursor: pointer; padding: 0; text-decoration: underline;
  text-decoration-color: transparent;
  transition: text-decoration-color 0.15s;
}
.resend-btn:hover { text-decoration-color: var(--navy); }
.change-link {
  display: block; text-align: center;
  margin-top: 12px; font-size: 12px; color: var(--light-muted);
  cursor: pointer; background: none; border: none;
  width: 100%;
  transition: color 0.15s;
}
.change-link:hover { color: var(--heading); }

/* ── SELECT MEMBER PAGE ─────────────────────────────── */
.select-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #0A1A35 0%, var(--navy) 50%, #112951 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.select-wrap { width: 100%; max-width: 520px; }

.select-brand { text-align: center; margin-bottom: 32px; }
.select-brand-icon {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--white);
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: 'Playfair Display', serif;
  font-size: 26px; font-weight: 700;
  color: var(--navy);
  box-shadow: 0 8px 28px rgba(201,152,42,0.3);
  overflow: hidden;
  padding: 3px;
}
.select-brand-icon img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.select-brand h1 { color: var(--white); font-size: 16px; font-weight: 700; letter-spacing: 0.3px; margin-bottom: 4px; max-width: 420px; margin-left: auto; margin-right: auto; line-height: 1.3; }
.select-brand p  { color: rgba(255,255,255,0.5); font-size: 12px; }

.select-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(201,152,42,0.15);
}

.select-card-head {
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  padding: 22px 26px;
  border-bottom: 2px solid var(--gold);
}
.select-card-head h2 { color: var(--white); font-size: 16px; font-weight: 700; margin-bottom: 10px; }

.verified-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(26,124,82,0.2);
  border: 1px solid rgba(26,124,82,0.3);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 11px; font-weight: 600;
  color: #6EE7B7;
  margin-right: 8px;
}
.verified-chip svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2.5; }
.verified-mobile { color: rgba(255,255,255,0.7); font-size: 12px; font-family: monospace; letter-spacing: 1px; }

.select-card-body { padding: 22px 24px; }

.member-btn {
  width: 100%;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: all 0.18s;
  margin-bottom: 10px;
  overflow: hidden;
  display: block;
}

.member-btn:hover { border-color: var(--navy); box-shadow: 0 4px 16px rgba(11,30,62,0.1); transform: translateY(-1px); }
.member-btn:active { transform: translateY(0); }
.member-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
.member-btn.loading { border-color: var(--gold); background: #FFFBF0; }

.member-btn-inner { display: flex; align-items: center; gap: 14px; padding: 14px 18px; }

.member-av {
  width: 46px; height: 46px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
  flex-shrink: 0;
}
.av-navy   { background: var(--blue-bg); color: var(--blue); }
.av-gold   { background: var(--warn-bg); color: var(--warn); }
.av-green  { background: var(--success-bg); color: var(--success); }
.av-purple { background: #EDE9FE; color: #5B21B6; }
.av-pink   { background: #FCE7F3; color: #9D174D; }

.member-info { flex: 1; min-width: 0; }
.member-name { font-size: 14px; font-weight: 700; color: var(--heading); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.member-meta { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.member-id   { font-size: 11px; color: var(--muted); font-family: monospace; }
.member-tag  { font-size: 10px; padding: 2px 8px; border-radius: 10px; font-weight: 600; }
.tag-primary { background: var(--blue-bg); color: var(--blue); }
.tag-current { background: var(--success-bg); color: var(--success); }

.member-btn.current { opacity: 1; cursor: default; border-color: var(--success); background: var(--success-bg); }
.member-btn.current:hover { transform: none; box-shadow: none; }

.member-arrow { flex-shrink: 0; }
.member-arrow svg { width: 18px; height: 18px; stroke: var(--silver); fill: none; stroke-width: 2; }
.member-btn:hover .member-arrow svg { stroke: var(--navy); }

.spinner-sm {
  display: none;
  width: 18px; height: 18px;
  border: 2.5px solid var(--silver);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.member-btn.loading .spinner-sm { display: block; }
.member-btn.loading .member-arrow svg { display: none; }

.select-footer { text-align: center; margin-top: 20px; }
.select-footer a {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.45);
  font-size: 12px; text-decoration: none;
  transition: color 0.15s;
}
.select-footer a:hover { color: rgba(255,255,255,0.8); }
.select-footer a svg { width: 13px; height: 13px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── COUNT BADGE ────────────────────────────────────── */
.count-badge {
  background: var(--gold);
  color: var(--navy);
  font-size: 10px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 20px;
  margin-left: 8px;
  letter-spacing: 0.3px;
}

/* ── DIVIDER ────────────────────────────────────────── */
.divider { height: 1px; background: var(--silver); margin: 16px 0; }
.help-text { font-size: 11px; color: var(--light-muted); text-align: center; display: flex; align-items: center; justify-content: center; gap: 5px; }
.help-text svg { width: 12px; height: 12px; stroke: currentColor; fill: none; stroke-width: 2; }

/* ── RESPONSIVE ─────────────────────────────────────── */
@media(max-width:768px){
  .bank-header { padding: 0 16px; }
  .bank-logo-name { max-width: 200px; font-size: 12px; }
  .page-main { padding: 16px 14px 60px; }
  .welcome-banner { padding: 20px; }
  .welcome-name { font-size: 20px; }
  .welcome-badge { display: none; }
  .stmt-topbar { padding: 16px 18px; }
  .filter-row { gap: 8px; }
  th, td { padding: 10px 12px; }

  /* Swap full desktop nav row for the hamburger + avatar */
  #desktopNavRow { display: none !important; }
  .mobile-header-right { display: flex !important; }

  /* Security bar: stack into two compact lines instead of wrapping mid-word */
  .security-bar {
    flex-direction: column; align-items: flex-start; gap: 4px;
    padding: 8px 16px;
  }
  .security-bar .sep { display: none; }
}

@media(max-width:480px){
  .bank-logo-name { max-width: 130px; font-size: 11px; }
  .bank-logo-sub { font-size: 8px; }
}


/* ── BACKWARD COMPAT (switch_member legacy classes) ─ */
.auth-body {
  min-height: 100vh;
  background: linear-gradient(145deg, #0A1A35 0%, var(--navy) 50%, #112951 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.auth-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 32px 28px;
  width: 100%;
  max-width: 420px;
  border: 1px solid rgba(201,152,42,0.15);
}

.auth-card--wide { max-width: 520px; }

.auth-logo {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 1px;
  margin-bottom: 6px;
}
.auth-logo img {
  height: 56px;
  width: auto;
  display: block;
  margin: 0 auto 6px;
}

.auth-card h1 { font-size: 20px; font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.auth-card h2 { font-size: 17px; font-weight: 700; color: var(--heading); margin-bottom: 14px; }
.auth-card p  { font-size: 13px; color: var(--muted); margin-bottom: 20px; }

.auth-card .field { margin-bottom: 16px; }
.auth-card label  { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.auth-card input[type=tel],
.auth-card input[type=text] {
  width: 100%;
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.18s;
}
.auth-card input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,30,62,0.08); }

.auth-card .btn,
.auth-card button[type=submit] {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--navy), var(--navy-light));
  color: var(--white);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(11,30,62,0.2);
  margin-top: 4px;
}

.auth-card .btn:hover,
.auth-card button[type=submit]:hover { box-shadow: 0 8px 24px rgba(11,30,62,0.3); }

.auth-card .alert { padding: 11px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 14px; }
.auth-card .alert-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #F5C2BF; }
.auth-card .alert-success { background: var(--success-bg); color: var(--success); border: 1px solid #B9E3CC; }

/* ── SITE FOOTER ─────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  margin-top: 40px;
}
.site-footer-bottom {
  padding: 16px 28px;
  text-align: center;
  font-size: 11.5px;
  color: rgba(255,255,255,0.45);
}
