/* Demo Bank — shared stylesheet
   Palette from the Anctrust appearance editor (see reference §12).
   Tokens kept generic so the demo can be re-themed quickly. */

:root {
  --primary: #14202e;
  --primary-dark: #114a43;
  --primary-light: #d8e28c;
  --secondary: #FFC107;
  --secondary-dark: #CC9000;
  --secondary-light: #FFECB3;
  --text: #2b3340;
  --text-muted: #828282;
  --bg: #f9fafb;
  --card-bg: #ffffff;
  --surface: #F4F5F7;
  --sidebar-bg: #F4F5F7;
  --sidebar-text: #0047AB;
  --border: #e4e7ec;
  --success: #16a34a;
  --success-bg: #dcfce7;
  --danger: #dc2626;
  --danger-bg: #fee2e2;
  --warning: #d97706;
  --warning-bg: #fef3c7;
  --info: #2563eb;
  --info-bg: #dbeafe;
  --purple: #7c3aed;
  --purple-bg: #ede9fe;
  --radius: 10px;
  --radius-sm: 6px;
  --shadow-sm: 0 1px 2px rgba(15,23,42,.05);
  --shadow: 0 4px 12px rgba(15,23,42,.06);
  --shadow-lg: 0 10px 30px rgba(15,23,42,.10);
  --transition: 160ms ease;
}

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

html, body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }

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

button { font: inherit; cursor: pointer; }

/* ---------- DEMO banner (always visible to make this unambiguous) ---------- */
.demo-banner {
  background: var(--secondary);
  color: var(--primary);
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  letter-spacing: .04em;
}
.demo-banner a { color: var(--primary); text-decoration: underline; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  font-size: 14px;
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
  text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn:active { transform: translateY(1px); }

.btn-primary   { background: var(--primary); color: #fff; }
.btn-primary:hover { background: #1d2f44; }
.btn-secondary { background: var(--secondary); color: var(--primary); }
.btn-secondary:hover { background: var(--secondary-dark); color: #fff; }
.btn-success   { background: var(--success); color: #fff; }
.btn-danger    { background: var(--danger); color: #fff; }
.btn-info      { background: var(--info); color: #fff; }
.btn-purple    { background: var(--purple); color: #fff; }
.btn-ghost     { background: transparent; border-color: var(--border); }
.btn-link      { background: transparent; color: var(--info); padding: 0; }
.btn-sm { padding: 6px 10px; font-size: 12px; }
.btn-lg { padding: 14px 22px; font-size: 15px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.required::after { content: " *"; color: var(--danger); }

.input, select.input, textarea.input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font: inherit;
  color: var(--text);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.input:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px var(--info-bg);
}
textarea.input { min-height: 90px; resize: vertical; }

.input-icon {
  position: relative;
}
.input-icon .input { padding-left: 38px; }
.input-icon .icon-left {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.input-icon .icon-right {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: var(--text-muted);
  padding: 4px;
  border-radius: 4px;
}
.input-icon .icon-right:hover { color: var(--text); background: var(--surface); }

.field-help { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--danger); margin-top: 4px; min-height: 16px; }

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-size: 13px;
}

/* ---------- Cards ---------- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.card-body { padding: 20px; }
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.card-title { margin: 0; font-size: 16px; font-weight: 700; }

/* ---------- Badges / pills ---------- */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-muted   { background: var(--surface);    color: var(--text-muted); }

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
table.data {
  width: 100%;
  border-collapse: collapse;
}
table.data th,
table.data td {
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
table.data thead th {
  background: var(--surface);
  font-weight: 700;
  color: var(--text);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
table.data tbody tr:hover { background: #fafbfd; }
table.data tbody tr:last-child td { border-bottom: 0; }
.table-empty {
  padding: 40px 16px;
  text-align: center;
  color: var(--text-muted);
}

.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 12px;
  margin-right: 8px;
  vertical-align: middle;
}
.avatar-lg { width: 64px; height: 64px; font-size: 22px; }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,.55);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 60px 16px 16px;
  z-index: 100;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  width: 100%;
  max-width: 520px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: modalIn 180ms ease;
}
.modal-lg { max-width: 720px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}
.modal-title { margin: 0; font-size: 16px; font-weight: 700; }
.modal-body { padding: 18px; max-height: 70vh; overflow: auto; }
.modal-footer {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.modal-close {
  background: transparent;
  border: 0;
  font-size: 20px;
  color: var(--text-muted);
  line-height: 1;
  padding: 4px 8px;
  cursor: pointer;
}
@keyframes modalIn {
  /* Slide-in only — keep modal fully opaque from frame 0 so headless screenshot
     tools (CDP/Cowork/etc.) that snapshot immediately after openModal don't
     catch a 0-opacity frame and report the modal as "invisible / width:0". */
  from { transform: translateY(-8px); }
  to   { transform: translateY(0); }
}

/* ---------- Auth split layout ---------- */
.auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--bg);
}
@media (max-width: 880px) {
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
}
.auth-side {
  background: linear-gradient(160deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.auth-side::before {
  content: "";
  position: absolute;
  top: -80px;
  right: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(255,193,7,.10);
  pointer-events: none;
}
.auth-side::after {
  content: "";
  position: absolute;
  bottom: -120px;
  left: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(216,226,140,.08);
  pointer-events: none;
}
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: 18px;
  letter-spacing: .02em;
  position: relative;
  z-index: 1;
}
.auth-brand-logo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--secondary);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.auth-headline {
  position: relative;
  z-index: 1;
}
.auth-headline h1 {
  font-size: 34px;
  margin: 0 0 16px;
  line-height: 1.15;
}
.auth-headline p {
  font-size: 15px;
  opacity: .85;
  max-width: 420px;
}
.feature-pills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 28px;
  max-width: 460px;
}
.feature-pill {
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}
.feature-pill svg { flex-shrink: 0; color: var(--secondary); }

.auth-footer-side {
  position: relative;
  z-index: 1;
  font-size: 12px;
  opacity: .7;
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.auth-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px;
}
.auth-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}
.auth-card .auth-sub {
  color: var(--text-muted);
  margin: 0 0 24px;
  font-size: 14px;
}
.auth-footer {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

/* ---------- Password strength ---------- */
.strength-bar {
  height: 6px;
  background: var(--border);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}
.strength-fill {
  height: 100%;
  width: 0;
  background: var(--danger);
  transition: width var(--transition), background var(--transition);
}
.strength-label {
  font-size: 12px;
  margin-top: 6px;
  color: var(--text-muted);
}
.strength-checks {
  margin-top: 8px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  font-size: 12px;
}
.strength-checks li {
  list-style: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}
.strength-checks li.ok { color: var(--success); }
.strength-checks li::before {
  content: "○";
  font-size: 14px;
}
.strength-checks li.ok::before {
  content: "✓";
}

/* ---------- Wizard ---------- */
.wizard-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 28px;
}
.wizard-step {
  text-align: center;
  position: relative;
}
.wizard-step .step-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  margin-bottom: 6px;
  border: 2px solid var(--border);
}
.wizard-step.active .step-num {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.wizard-step.done .step-num {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.wizard-step .step-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
  letter-spacing: .03em;
  text-transform: uppercase;
}
.wizard-step.active .step-label { color: var(--primary); }
.wizard-progress {
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin-bottom: 24px;
  overflow: hidden;
}
.wizard-progress-bar {
  height: 100%;
  background: var(--primary);
  width: 25%;
  transition: width 240ms ease;
}
.wizard-pane { display: none; }
.wizard-pane.active { display: block; animation: paneIn 200ms ease; }
@keyframes paneIn {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}
.wizard-nav {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 20px;
}

/* Radio cards for account type */
.radio-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.radio-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.radio-card input { margin-top: 3px; }
.radio-card:hover { border-color: var(--primary); }
.radio-card.selected {
  border-color: var(--primary);
  background: rgba(20,32,46,.04);
}
.radio-card-title { font-weight: 700; font-size: 13px; }
.radio-card-desc  { font-size: 12px; color: var(--text-muted); }

.pin-grid {
  display: grid;
  grid-template-columns: repeat(4, 56px);
  gap: 10px;
  margin: 8px 0 4px;
}
.pin-input {
  height: 56px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
}
.pin-input:focus {
  outline: none;
  border-color: var(--info);
  box-shadow: 0 0 0 3px var(--info-bg);
}

/* ---------- Admin frame ---------- */
.admin {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  overflow-y: auto;
}
.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 6px 18px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}
.sidebar-brand-logo {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--primary);
  color: var(--secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}
.sidebar-brand-name { font-weight: 800; font-size: 15px; }
.sidebar-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 14px;
}
.sidebar-chip .avatar { margin-right: 0; background: var(--purple); }
.sidebar-chip-name { font-weight: 700; font-size: 13px; }
.sidebar-chip-role { font-size: 11px; color: var(--text-muted); }
.sidebar-section {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-muted);
  padding: 10px 8px 6px;
}
.sidebar-nav { list-style: none; padding: 0; margin: 0; }
.sidebar-nav li > a,
.sidebar-nav li > button {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-weight: 600;
  font-size: 13px;
  border: 0;
  background: transparent;
  width: 100%;
  text-align: left;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.sidebar-nav li > a:hover,
.sidebar-nav li > button:hover {
  background: rgba(0,71,171,.08);
  text-decoration: none;
}
.sidebar-nav li > a.active {
  background: var(--primary);
  color: #fff;
}
.sidebar-nav .sub { padding-left: 20px; }
.sidebar-nav .group > button::after {
  content: "▾";
  margin-left: auto;
  font-size: 10px;
  transition: transform var(--transition);
}
.sidebar-nav .group.open > button::after { transform: rotate(180deg); }
.sidebar-nav .group .sub { display: none; }
.sidebar-nav .group.open .sub { display: block; }

.admin-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.topbar {
  background: var(--primary);
  color: #fff;
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.topbar-brand {
  font-weight: 800;
  font-size: 15px;
}
.topbar-search {
  flex: 1;
  max-width: 380px;
  position: relative;
}
.topbar-search .input {
  background: rgba(255,255,255,.10);
  border-color: rgba(255,255,255,.15);
  color: #fff;
  padding-left: 38px;
}
.topbar-search .input::placeholder { color: rgba(255,255,255,.6); }
.topbar-search .icon-left { color: rgba(255,255,255,.7); }
.topbar-spacer { flex: 1; }
.topbar-icon-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,.10);
  border: 0;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.topbar-icon-btn:hover { background: rgba(255,255,255,.18); }

.page {
  padding: 24px;
  flex: 1;
}
.page-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.page-header h1 {
  margin: 0;
  font-size: 22px;
}
.page-header .subtitle {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 1100px) { .stats-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .stats-grid { grid-template-columns: 1fr; } }
.stat-tile {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  box-shadow: var(--shadow-sm);
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-icon.blue   { background: var(--info-bg);    color: var(--info); }
.stat-icon.amber  { background: var(--warning-bg); color: var(--warning); }
.stat-icon.red    { background: var(--danger-bg);  color: var(--danger); }
.stat-icon.purple { background: var(--purple-bg);  color: var(--purple); }
.stat-icon.dark   { background: var(--surface);    color: var(--primary); }
.stat-label { font-size: 12px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.stat-value { font-size: 24px; font-weight: 800; margin-top: 4px; }

.admin-footer {
  background: var(--primary);
  color: rgba(255,255,255,.7);
  text-align: center;
  padding: 14px;
  font-size: 12px;
}

/* ---------- Customer dashboard ---------- */
.cust-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 20px;
}
@media (max-width: 980px) { .cust-grid { grid-template-columns: 1fr; } }
.balance-card {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.balance-card::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 180px;
  height: 180px;
  background: rgba(255,193,7,.10);
  border-radius: 50%;
}
.balance-label { font-size: 12px; opacity: .8; text-transform: uppercase; letter-spacing: .06em; }
.balance-amount { font-size: 36px; font-weight: 800; margin-top: 4px; }
.balance-meta { display: flex; gap: 24px; margin-top: 16px; }
.balance-meta div { font-size: 12px; opacity: .85; }
.balance-meta strong { display: block; font-size: 16px; opacity: 1; margin-top: 2px; }
.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 18px;
}
@media (max-width: 560px) { .quick-actions { grid-template-columns: repeat(2, 1fr); } }
.quick-action {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}
.quick-action:hover { background: rgba(255,255,255,.18); text-decoration: none; color: #fff; }

/* Activity list */
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.activity-item:last-child { border-bottom: 0; }
.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.activity-icon.credit { background: var(--success-bg); color: var(--success); }
.activity-icon.debit  { background: var(--danger-bg);  color: var(--danger); }
.activity-meta { flex: 1; min-width: 0; }
.activity-title { font-weight: 600; font-size: 13px; }
.activity-sub   { font-size: 12px; color: var(--text-muted); }
.activity-amount { font-weight: 700; font-size: 14px; white-space: nowrap; }
.amt-credit { color: var(--success); }
.amt-debit  { color: var(--danger); }

/* ---------- User-details specific ---------- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.profile-name { font-size: 20px; font-weight: 700; }
.profile-meta { font-size: 13px; color: var(--text-muted); }
.profile-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
@media (max-width: 760px) { .profile-stats { grid-template-columns: repeat(2, 1fr); } }
.kv {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 10px 18px;
  font-size: 13px;
}
@media (max-width: 640px) { .kv { grid-template-columns: 1fr; } }
.kv dt { color: var(--text-muted); font-weight: 600; }
.kv dd { margin: 0; font-weight: 600; }

.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  min-width: 240px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  padding: 6px;
  display: none;
  z-index: 30;
}
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu button {
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}
.dropdown-menu button:hover { background: var(--surface); }
.dropdown-menu button.danger { color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 4px 0; }

/* ---------- Toast ---------- */
.toast-host {
  position: fixed;
  bottom: 16px;
  right: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 200;
}
.toast {
  background: var(--primary);
  color: #fff;
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  min-width: 240px;
  max-width: 360px;
  animation: toastIn 180ms ease;
}
.toast.success { background: var(--success); }
.toast.danger  { background: var(--danger); }
.toast.warning { background: var(--warning); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Misc utilities ---------- */
.muted { color: var(--text-muted); }
.text-right { text-align: right; }
.text-center { text-align: center; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 24px; }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }

/* ============================================================
   PREMIUM / 3D UPGRADE LAYER
   Glassmorphism · soft neumorphic · depth shadows · animations
   ============================================================ */

:root {
  --grad-primary: linear-gradient(135deg, #1d2f44 0%, #14202e 50%, #0c1622 100%);
  --grad-gold:    linear-gradient(135deg, #FFD86F 0%, #FCB045 100%);
  --grad-ocean:   linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --grad-violet:  linear-gradient(135deg, #7c3aed 0%, #ec4899 100%);
  --grad-emerald: linear-gradient(135deg, #16a34a 0%, #22d3ee 100%);
  --grad-sunset:  linear-gradient(135deg, #f97316 0%, #ef4444 100%);
  --shadow-soft:  0 1px 2px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.06);
  --shadow-deep:  0 4px 8px rgba(15,23,42,.05), 0 24px 48px rgba(15,23,42,.10);
  --shadow-3d:    0 1px 0 rgba(255,255,255,.7) inset, 0 -1px 0 rgba(15,23,42,.04) inset, 0 12px 28px rgba(15,23,42,.10);
}

/* Smooth scroll + better default focus ring */
html { scroll-behavior: smooth; }
*:focus-visible { outline: 2px solid var(--info); outline-offset: 2px; border-radius: 4px; }

/* Premium customer topbar (overrides admin topbar look on customer pages) */
.cust-topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.78);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(15,23,42,.06);
  padding: 12px 24px;
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
}
.cust-topbar .brand {
  display: flex; align-items: center; gap: 10px;
  font-weight: 800; font-size: 16px; text-decoration: none; color: var(--text);
}
.cust-topbar .brand .lg {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad-primary);
  color: var(--secondary);
  display:inline-flex; align-items:center; justify-content:center;
  font-weight: 900; font-size: 13px;
  box-shadow: var(--shadow-3d);
}
.cust-topbar .nav { display: flex; gap: 4px; margin-left: 12px; }
.cust-topbar .nav a {
  color: var(--text-muted);
  font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 8px;
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.cust-topbar .nav a:hover { background: rgba(15,23,42,.04); color: var(--text); }
.cust-topbar .nav a.active { color: var(--text); background: rgba(15,23,42,.06); }
.cust-topbar .spacer { flex: 1; }
.cust-topbar .iconbtn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(15,23,42,.04);
  border: 0; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  position: relative;
  transition: background var(--transition), transform var(--transition);
}
.cust-topbar .iconbtn:hover { background: rgba(15,23,42,.08); transform: translateY(-1px); }
.cust-topbar .iconbtn .dot {
  position: absolute; top: 6px; right: 6px;
  width: 14px; height: 14px;
  background: var(--danger); color: #fff;
  border-radius: 50%;
  font-size: 9px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid #fff;
}
.cust-topbar .avatar-btn {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: var(--grad-violet);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px;
  cursor: pointer;
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(15,23,42,.15);
  overflow: hidden;
}
.cust-topbar .avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* Premium 3D hero balance card */
.hero-balance {
  position: relative;
  border-radius: 22px;
  padding: 30px 28px;
  color: #fff;
  background: var(--grad-primary);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  transform: translateZ(0);
}
.hero-balance::before {
  content: "";
  position: absolute;
  top: -120px; right: -120px;
  width: 320px; height: 320px;
  background: radial-gradient(circle at center, rgba(255,193,7,.32) 0%, rgba(255,193,7,0) 60%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-balance::after {
  content: "";
  position: absolute;
  bottom: -160px; left: -80px;
  width: 360px; height: 360px;
  background: radial-gradient(circle at center, rgba(216,226,140,.18) 0%, rgba(216,226,140,0) 65%);
  border-radius: 50%;
  pointer-events: none;
}
.hero-balance .label {
  font-size: 12px; opacity: .75; text-transform: uppercase; letter-spacing: .14em;
  display: flex; align-items: center; gap: 8px;
}
.hero-balance .amount {
  font-size: 44px; font-weight: 800; letter-spacing: -0.02em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
  display: flex; align-items: baseline; gap: 8px;
}
.hero-balance .amount .cents { font-size: 24px; opacity: .75; }
.hero-balance .meta {
  display: flex; gap: 28px; margin-top: 18px;
  flex-wrap: wrap;
}
.hero-balance .meta div {
  font-size: 11px; opacity: .65;
  text-transform: uppercase; letter-spacing: .08em;
}
.hero-balance .meta strong {
  display: block; font-size: 15px; opacity: 1;
  font-weight: 600; margin-top: 3px; letter-spacing: 0;
}
.eye-toggle {
  position: absolute; top: 24px; right: 24px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  width: 38px; height: 38px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

/* Premium quick action pills */
.quick-pills {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  margin-top: 22px;
  position: relative;
  z-index: 1;
}
@media (max-width: 720px) { .quick-pills { grid-template-columns: repeat(3, 1fr); } }
.qp {
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff;
  border-radius: 14px;
  padding: 14px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: transform var(--transition), background var(--transition);
  backdrop-filter: blur(6px);
}
.qp:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-2px);
  text-decoration: none;
  color: #fff;
}
.qp .ico {
  width: 36px; height: 36px;
  background: rgba(255,255,255,.14);
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
}

/* Glass card */
.glass {
  background: rgba(255,255,255,.78);
  backdrop-filter: blur(16px) saturate(160%);
  border: 1px solid rgba(15,23,42,.06);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
  padding: 22px;
}

/* Hoverable cards with lift */
.lift {
  transition: transform var(--transition), box-shadow var(--transition);
}
.lift:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-deep);
}

/* Section title (premium) */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 28px 0 14px;
}
.section-title h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.section-title .link {
  font-size: 13px;
  color: var(--info);
  font-weight: 600;
  text-decoration: none;
}
.section-title .link:hover { text-decoration: underline; }

/* Progress ring (SVG) used in goals */
.ring {
  width: 64px; height: 64px;
  position: relative;
  flex-shrink: 0;
}
.ring svg { transform: rotate(-90deg); }
.ring .pct {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 12px;
}

/* Goal tile */
.goal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.goal-tile {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  display: flex;
  gap: 14px;
  align-items: center;
  box-shadow: var(--shadow-soft);
  transition: transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
}
.goal-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow-deep); }
.goal-tile .emoji {
  width: 48px; height: 48px;
  border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface);
  font-size: 24px;
}
.goal-tile .name { font-weight: 700; font-size: 14px; }
.goal-tile .meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.goal-tile .progress-bar {
  height: 6px; background: var(--border); border-radius: 3px; margin-top: 8px; overflow: hidden;
}
.goal-tile .progress-fill { height: 100%; border-radius: 3px; }

/* Spend insights bars */
.spend-chart { display: flex; flex-direction: column; gap: 10px; }
.spend-row {
  display: grid;
  grid-template-columns: 110px 1fr 90px;
  gap: 12px;
  align-items: center;
  font-size: 13px;
}
.spend-row .cat { font-weight: 600; }
.spend-row .bar {
  height: 10px; background: var(--border); border-radius: 999px; overflow: hidden;
  position: relative;
}
.spend-row .bar > div {
  height: 100%;
  border-radius: 999px;
  background: var(--grad-ocean);
  transition: width 320ms ease;
}
.spend-row.cat-Income      .bar > div { background: var(--grad-emerald); }
.spend-row.cat-Housing     .bar > div { background: var(--grad-violet); }
.spend-row.cat-Software    .bar > div { background: var(--grad-ocean); }
.spend-row.cat-Groceries   .bar > div { background: var(--grad-emerald); }
.spend-row.cat-Entertainment .bar > div { background: var(--grad-violet); }
.spend-row.cat-Dining      .bar > div { background: var(--grad-sunset); }
.spend-row.cat-Transport   .bar > div { background: var(--grad-ocean); }
.spend-row.cat-Shopping    .bar > div { background: var(--grad-gold); }
.spend-row.cat-Utilities   .bar > div { background: var(--grad-violet); }
.spend-row.cat-Refunds     .bar > div { background: var(--grad-emerald); }
.spend-row .amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }

/* Beneficiary chip row */
.bene-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 4px 2px 8px;
  scrollbar-width: thin;
}
.bene-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 76px;
  text-align: center;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
}
.bene-chip .av {
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--grad-ocean);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(15,23,42,.10);
  transition: transform var(--transition);
}
.bene-chip:hover .av { transform: scale(1.05); }
.bene-chip.add .av { background: var(--surface); color: var(--text-muted); border: 2px dashed var(--border); }
.bene-chip .nm { font-size: 12px; font-weight: 600; max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Notification dropdown */
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-width: calc(100vw - 24px);
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--border);
  padding: 8px;
  z-index: 60;
  max-height: 480px;
  overflow: auto;
  display: none;
  animation: dropIn 180ms ease;
}
.notif-dropdown.open { display: block; }
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.notif-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.notif-header h4 { margin: 0; font-size: 14px; font-weight: 700; }
.notif-header button { background: none; border: 0; font-size: 12px; color: var(--info); font-weight: 600; cursor: pointer; }
.notif-item {
  display: flex; gap: 10px;
  padding: 10px;
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  text-decoration: none;
  color: inherit;
}
.notif-item:hover { background: var(--surface); }
.notif-item .ico {
  width: 36px; height: 36px;
  border-radius: 10px;
  flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
}
.notif-item.credit  .ico { background: var(--success-bg); color: var(--success); }
.notif-item.security .ico { background: var(--info-bg);    color: var(--info); }
.notif-item.warning .ico { background: var(--warning-bg); color: var(--warning); }
.notif-item.info    .ico { background: var(--purple-bg);  color: var(--purple); }
.notif-item .body { flex: 1; min-width: 0; }
.notif-item .t  { font-weight: 700; font-size: 13px; }
.notif-item .b  { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notif-item .ts { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.notif-item.unread { background: rgba(37,99,235,.04); }
.notif-item.unread::before {
  content: "";
  position: absolute;
  top: 50%; right: 10px; transform: translateY(-50%);
  width: 8px; height: 8px;
  background: var(--info);
  border-radius: 50%;
}

/* Avatar dropdown */
.avatar-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 240px;
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--border);
  padding: 6px;
  z-index: 60;
  display: none;
  animation: dropIn 180ms ease;
}
.avatar-dropdown.open { display: block; }
.avatar-dropdown .who {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 6px;
}
.avatar-dropdown .who .n  { font-weight: 700; font-size: 13px; }
.avatar-dropdown .who .e  { font-size: 11px; color: var(--text-muted); }
.avatar-dropdown a, .avatar-dropdown button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
  background: transparent; border: 0;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
}
.avatar-dropdown a:hover, .avatar-dropdown button:hover { background: var(--surface); }

/* Profile picture editor */
.pic-edit {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 18px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
}
.pic-edit .preview {
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--grad-violet);
  color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 26px;
  overflow: hidden;
  border: 3px solid #fff;
  box-shadow: var(--shadow-soft);
  flex-shrink: 0;
}
.pic-edit .preview img { width: 100%; height: 100%; object-fit: cover; }
.pic-edit .controls { flex: 1; }
.pic-edit .controls .h { font-weight: 700; font-size: 14px; }
.pic-edit .controls .sub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Empty state illustration */
.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
}
.empty .ic {
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--surface);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px;
}

/* Animated number counter */
.count-up {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* Mobile responsive customer pages */
@media (max-width: 720px) {
  .hero-balance .amount { font-size: 34px; }
  .hero-balance .amount .cents { font-size: 18px; }
  .cust-topbar .nav { display: none; }
  .cust-topbar { padding: 10px 14px; }
}

/* ============================================================
   A++ UPGRADE LAYER — dark mode, mobile, accessibility, motion
   ============================================================ */

/* --- Dark mode tokens (toggleable via [data-theme="dark"] on html) --- */
[data-theme="dark"] {
  --primary: #f9fafb;
  --primary-dark: #e5e7eb;
  --primary-light: #d1d5db;
  --secondary: #FFC107;
  --secondary-dark: #D97706;
  --text: #f3f4f6;
  --text-muted: #9ca3af;
  --bg: #0b1220;
  --card-bg: #111827;
  --surface: #1f2937;
  --sidebar-bg: #111827;
  --sidebar-text: #93c5fd;
  --border: #1f2937;
  --success-bg: #052e1a;
  --danger-bg: #3b0a0a;
  --warning-bg: #3b2a0a;
  --info-bg: #0a1f3b;
  --purple-bg: #1a0b3b;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.40);
  --shadow:    0 4px 12px rgba(0,0,0,.40);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.60);
}
[data-theme="dark"] body { background: var(--bg); color: var(--text); }
[data-theme="dark"] .card,
[data-theme="dark"] .glass,
[data-theme="dark"] .stat-tile { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] .table-wrap,
[data-theme="dark"] table.data thead th { background: var(--card-bg); }
[data-theme="dark"] table.data tbody tr:hover { background: var(--surface); }
[data-theme="dark"] .input,
[data-theme="dark"] select.input,
[data-theme="dark"] textarea.input { background: var(--surface); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .input::placeholder { color: var(--text-muted); }
[data-theme="dark"] .cust-topbar { background: rgba(11,18,32,.78); border-bottom-color: rgba(255,255,255,.06); }
[data-theme="dark"] .cust-topbar .brand { color: var(--text); }
[data-theme="dark"] .cust-topbar .nav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
[data-theme="dark"] .cust-topbar .nav a.active { background: rgba(255,255,255,.06); color: var(--text); }
[data-theme="dark"] .cust-topbar .iconbtn { background: rgba(255,255,255,.06); color: var(--text); }
[data-theme="dark"] .cust-topbar .iconbtn:hover { background: rgba(255,255,255,.10); }
[data-theme="dark"] .auth-card { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] .modal { background: var(--card-bg); }
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .notif-dropdown,
[data-theme="dark"] .avatar-dropdown { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] .btn-ghost { color: var(--text); border-color: var(--border); }
[data-theme="dark"] .btn-ghost:hover { background: var(--surface); }
[data-theme="dark"] .demo-banner { background: var(--secondary-dark); color: var(--text); }
[data-theme="dark"] .sidebar { background: var(--sidebar-bg); border-right-color: var(--border); }
[data-theme="dark"] .sidebar-chip { background: var(--surface); border-color: var(--border); }
[data-theme="dark"] .topbar { background: var(--primary-dark); color: var(--primary); }
[data-theme="dark"] .pdp-engineer,
[data-theme="dark"] .pic-edit { background: var(--surface); border-color: var(--border); }

/* --- Theme toggle button (placed in cust-topbar + admin topbar) --- */
.theme-toggle {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: rgba(15,23,42,.04);
  border: 0; color: var(--text);
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.theme-toggle:hover { background: rgba(15,23,42,.08); }
[data-theme="dark"] .theme-toggle { background: rgba(255,255,255,.08); }
[data-theme="dark"] .theme-toggle:hover { background: rgba(255,255,255,.14); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .sun { display: none; }
.theme-toggle .moon { display: inline; }
[data-theme="dark"] .theme-toggle .sun { display: inline; }
[data-theme="dark"] .theme-toggle .moon { display: none; }

/* --- Skip-to-content link (a11y) --- */
.skip-link {
  position: absolute;
  left: -1000px;
  top: 0;
  padding: 10px 16px;
  background: var(--primary);
  color: #fff;
  z-index: 9999;
  font-weight: 700;
  border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; outline: 3px solid var(--secondary); }

/* --- Sharper focus rings for keyboard users --- */
a:focus-visible,
button:focus-visible,
.input:focus-visible,
[role="button"]:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--secondary);
  outline-offset: 2px;
  border-radius: 4px;
}

/* --- Mobile responsive admin sidebar (was previously visible on small screens) --- */
@media (max-width: 880px) {
  .admin { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed;
    inset: 0 30% 0 0;
    z-index: 200;
    transform: translateX(-100%);
    transition: transform 200ms ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .admin-sidebar-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border: 0; background: rgba(255,255,255,.10);
    color: #fff; border-radius: 8px; margin-right: 10px;
  }
  .topbar { gap: 8px; padding: 12px 16px; }
  .topbar-brand { font-size: 13px; }
  .topbar-search { display: none; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .cust-grid { grid-template-columns: 1fr; }
  .stat-strip-grid { grid-template-columns: 1fr 1fr; padding: var(--s-5); }
  .page-header { flex-direction: column; align-items: flex-start; }
  .page-actions { width: 100%; }
  .page-actions .btn { flex: 1; }
  table.data { font-size: 12px; }
  table.data th, table.data td { padding: 8px 10px; }
  .modal { width: calc(100% - 24px) !important; max-width: 100%; }
  .modal-lg { max-width: 100%; }
  /* Tables become scrollable horizontally on narrow */
  .table-wrap { overflow-x: auto; }
  .quick-pills { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .quick-pills { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: 20px; }
  .balance-amount, .hero-balance .amount { font-size: 28px; }
  .sidebar { inset: 0 15% 0 0; }
}

/* Default to system dark mode if user hasn't set a preference */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) {
    /* Apply dark tokens via the same selectors */
  }
}

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

/* --- Visually hidden helper for ARIA labels --- */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

/* ============================================================
   2026 SKIN REFRESH — Fintech Modern
   Indigo · Violet · Lime · Pill buttons · Mesh gradient hero
   Layered AT THE BOTTOM so it overrides earlier tokens.
   ============================================================ */

:root {
  /* Brand palette — swap from petrol-blue to indigo-violet */
  --primary:        #4f46e5;     /* indigo-600 */
  --primary-dark:   #4338ca;     /* indigo-700 */
  --primary-light:  #7c3aed;     /* violet-600 */
  --secondary:      #84cc16;     /* lime-500 */
  --secondary-dark: #65a30d;     /* lime-600 */

  --text:           #0f172a;     /* slate-900 */
  --text-muted:     #64748b;     /* slate-500 */
  --bg:             #fafaf9;     /* stone-50 — warmer than pure white */
  --card-bg:        #ffffff;
  --surface:        #f5f5f4;     /* stone-100 */
  --border:         #e7e5e4;     /* stone-200 */
  --sidebar-bg:     #ffffff;
  --sidebar-text:   #4f46e5;

  --success:        #10b981;
  --success-bg:     #d1fae5;
  --danger:         #ef4444;
  --danger-bg:      #fee2e2;
  --info:           #6366f1;
  --info-bg:        #e0e7ff;
  --warning:        #f59e0b;
  --warning-bg:     #fef3c7;
  --purple:         #8b5cf6;
  --purple-bg:      #ede9fe;

  /* Rounder, modern */
  --radius:    16px;
  --radius-sm: 10px;
  --radius-lg: 22px;

  /* Softer, deeper shadows */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow:    0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 20px 50px rgba(15, 23, 42, 0.12);
}

/* Mesh gradient utility — used on hero */
.mesh-bg {
  background:
    radial-gradient(at 0% 0%,   hsla(258, 90%, 65%, 0.7) 0%, transparent 40%),
    radial-gradient(at 100% 0%, hsla(212, 90%, 62%, 0.55) 0%, transparent 40%),
    radial-gradient(at 100% 100%, hsla(85, 80%, 60%, 0.40) 0%, transparent 40%),
    radial-gradient(at 0% 100%, hsla(290, 80%, 65%, 0.45) 0%, transparent 40%),
    linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
}

/* Hero balance — Northbridge: navy + brass eyebrow, no purple mesh */
.hero-balance,
.balance-card {
  border-radius: 8px !important;
  padding: 36px 40px 32px !important;
  background: linear-gradient(180deg, #0B1E33 0%, #061121 100%) !important;
  position: relative;
  overflow: hidden;
  color: #fff;
}
.hero-balance::before,
.balance-card::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 320px; height: 320px;
  background: radial-gradient(circle at 70% 20%, rgba(198, 162, 102, 0.14) 0%, transparent 60%);
  pointer-events: none;
  inset: auto;
  background-image: none;
  opacity: 1;
}
.hero-balance .amount,
.balance-card .amount,
.balance-amount {
  font-family: 'Fraunces', 'New York', Georgia, serif !important;
  font-size: clamp(40px, 6vw, 64px) !important;
  font-weight: 500 !important;
  letter-spacing: -0.02em !important;
  color: #fff !important;
  background: none !important;
  -webkit-text-fill-color: #fff !important;
}

/* Buttons — pill shape, refined hover, soft shadows */
.btn {
  border-radius: 999px;
  font-weight: 600;
  padding: 10px 20px;
  letter-spacing: -0.01em;
  transition: transform 180ms cubic-bezier(.16,1,.3,1), background 160ms ease, box-shadow 200ms ease, color 160ms ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(79, 70, 229, 0.30);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.40);
  transform: translateY(-1px);
}
.btn-secondary {
  background: var(--secondary);
  color: #1a2e05;
  box-shadow: 0 4px 14px rgba(132, 204, 22, 0.30);
}
.btn-secondary:hover {
  background: var(--secondary-dark);
  color: #fff;
}
.btn-success {
  background: var(--success);
  color: #fff;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.30);
}
.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.25);
}
.btn-ghost {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--surface);
  border-color: var(--text-muted);
  transform: translateY(-1px);
}
.btn-info {
  background: var(--info);
  color: #fff;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.30);
}
.btn-purple {
  background: linear-gradient(135deg, var(--purple) 0%, #c084fc 100%);
  color: #fff;
}
.btn-lg { padding: 14px 24px; font-size: 15px; }
.btn-xl { padding: 16px 32px; font-size: 16px; }
.btn-sm { padding: 6px 14px; font-size: 12px; }

/* Cards — rounder + softer shadows */
.card, .glass {
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 220ms ease, transform 220ms cubic-bezier(.16,1,.3,1);
}
.card:hover, .glass:hover { box-shadow: var(--shadow); }
.card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}
.card-body { padding: 20px 24px; }
.card-title { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }

/* Stat tiles — softer, more breathing room */
.stat-tile {
  border-radius: var(--radius);
  padding: 20px;
  gap: 14px;
}
.stat-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat-icon {
  width: 48px; height: 48px;
  border-radius: 14px;
}
.stat-value {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Cust topbar — keep glass but cleaner padding */
.cust-topbar {
  padding: 14px 24px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
}
.cust-topbar .brand .lg {
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  box-shadow: 0 3px 10px rgba(79, 70, 229, 0.30);
}
.cust-topbar .nav a {
  border-radius: 999px;
  padding: 8px 14px;
}
.cust-topbar .nav a.active {
  background: var(--info-bg);
  color: var(--primary);
}

/* Avatar button & icon button — softer */
.cust-topbar .avatar-btn {
  background: linear-gradient(135deg, var(--primary) 0%, var(--purple) 100%);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.30);
}
.cust-topbar .iconbtn { border-radius: 14px; }

/* Quick action pills on hero balance */
.quick-action,
.qp {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.10) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  backdrop-filter: blur(8px);
  transition: transform 180ms cubic-bezier(.16,1,.3,1), background 160ms ease;
}
.quick-action:hover,
.qp:hover {
  background: rgba(255, 255, 255, 0.20) !important;
  transform: translateY(-2px);
}

/* Inputs — bigger, more breathing room */
.input, select.input, textarea.input {
  padding: 12px 14px;
  border-radius: 12px;
  border-color: var(--border);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.input:focus, select.input:focus, textarea.input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

/* Badges — pill, lighter */
.badge {
  padding: 4px 10px;
  font-weight: 700;
  font-size: 10.5px;
  border-radius: 999px;
}

/* Tables — cleaner separation */
table.data thead th {
  background: var(--surface);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
  font-weight: 700;
  padding: 12px 18px;
}
table.data tbody td { padding: 14px 18px; }
table.data tbody tr:hover { background: rgba(99, 102, 241, 0.03); }

/* Typography — tighter on display sizes */
h1 { font-size: clamp(1.5rem, 3vw, 1.875rem); letter-spacing: -0.025em; font-weight: 800; }
h2 { letter-spacing: -0.02em; font-weight: 800; }
h3 { letter-spacing: -0.015em; }
.page-header h1 { font-size: clamp(1.5rem, 3.5vw, 2rem); }

/* Auth pages — refresh the side panel with mesh gradient */
.auth-side {
  background:
    radial-gradient(at 12% 8%, hsla(258, 95%, 65%, 0.50) 0%, transparent 45%),
    radial-gradient(at 90% 90%, hsla(280, 85%, 60%, 0.45) 0%, transparent 50%),
    radial-gradient(at 100% 12%, hsla(85, 70%, 55%, 0.25) 0%, transparent 40%),
    linear-gradient(135deg, #312e81 0%, #581c87 100%);
}
.auth-side::before { display: none; }
.auth-side::after { display: none; }
.auth-brand-logo {
  background: var(--secondary);
  color: #1a2e05;
  border-radius: 10px;
  box-shadow: 0 3px 8px rgba(132, 204, 22, 0.40);
}

/* Activity items — refined */
.activity-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
}
.activity-item {
  padding: 14px 0;
  gap: 14px;
}

/* Wizard steps — refined */
.wizard-step .step-num {
  width: 36px; height: 36px;
  font-weight: 800;
}

/* Goal tile refresh */
.goal-tile {
  border-radius: var(--radius);
  padding: 18px;
}

/* Demo banner — pill it */
.demo-banner {
  background: linear-gradient(90deg, var(--primary) 0%, var(--purple) 100%);
  color: #fff;
}

/* Dark mode tweaks for the new palette */
[data-theme="dark"] {
  --primary:        #818cf8;     /* indigo-400 */
  --primary-dark:   #6366f1;
  --primary-light:  #a78bfa;
  --text:           #f4f4f5;
  --text-muted:     #a1a1aa;
  --bg:             #09090b;     /* zinc-950 */
  --card-bg:        #18181b;     /* zinc-900 */
  --surface:        #27272a;     /* zinc-800 */
  --border:         #27272a;
  --sidebar-bg:     #18181b;
  --sidebar-text:   #a78bfa;
  --info-bg:        #1e1b4b;
  --success-bg:     #022c22;
  --danger-bg:      #450a0a;
  --warning-bg:     #422006;
  --purple-bg:      #2e1065;
}
[data-theme="dark"] .cust-topbar {
  background: rgba(9, 9, 11, 0.78);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
[data-theme="dark"] table.data thead th { background: var(--surface); color: var(--text-muted); }
[data-theme="dark"] .input { background: var(--surface); }

/* Reduce motion on the new translateY hovers when user wants */
@media (prefers-reduced-motion: reduce) {
  .btn, .stat-tile, .card, .goal-tile, .qp, .quick-action { transform: none !important; }
}

/* ============================================================
   Mega-menu (the "More" dropdown in the customer top nav)
   Self-contained — independent of .avatar-dropdown.
   ============================================================ */
.mega-menu-wrap {
  position: relative;
  display: inline-block;
}
.cust-topbar .nav .nav-more-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background var(--transition), color var(--transition);
}
.cust-topbar .nav .nav-more-btn:hover { background: rgba(15,23,42,.04); color: var(--text); }
.cust-topbar .nav .nav-more-btn[aria-expanded="true"] {
  background: rgba(15,23,42,.06);
  color: var(--text);
}
.nav-more-btn .caret {
  display: inline-block;
  font-size: 10px;
  transition: transform var(--transition);
}
.nav-more-btn[aria-expanded="true"] .caret { transform: rotate(180deg); }

.mega-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  min-width: 560px;
  max-width: 90vw;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-deep);
  padding: 16px;
  z-index: 80;
  /* Closed by default — hidden via opacity/visibility (better than display:none for transitions) */
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 160ms;
  display: grid !important;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px 14px;
}
.mega-menu.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
  transition: opacity 160ms ease, transform 160ms ease, visibility 0s linear 0s;
}
.mega-col {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.mega-heading {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 6px 10px 6px;
  margin-bottom: 2px;
}
.mega-menu .mega-link {
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background var(--transition), color var(--transition);
}
.mega-menu .mega-link:hover {
  background: var(--surface);
  color: var(--primary);
}

/* Smart positioning when the More button is near the right edge —
   the JS bumps a data-align attribute. */
.mega-menu[data-align="right"] {
  left: auto;
  right: 0;
  transform: translateX(0) translateY(-6px);
}
.mega-menu[data-align="right"].open {
  transform: translateX(0) translateY(0);
}
.mega-menu[data-align="left"] {
  left: 0;
  right: auto;
  transform: translateX(0) translateY(-6px);
}
.mega-menu[data-align="left"].open {
  transform: translateX(0) translateY(0);
}

/* Dark mode */
[data-theme="dark"] .mega-menu { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] .mega-menu .mega-link { color: var(--text); }
[data-theme="dark"] .mega-menu .mega-link:hover { background: var(--surface); }

/* Mobile — switch to a single-column drawer */
@media (max-width: 720px) {
  .mega-menu {
    grid-template-columns: 1fr;
    min-width: min(92vw, 320px);
    max-width: 92vw;
    left: 0;
    right: auto;
    transform: translateX(0) translateY(-6px);
    max-height: 70vh;
    overflow-y: auto;
  }
  .mega-menu.open { transform: translateX(0) translateY(0); }
}

/* ============================================================
   NORTHBRIDGE — PRIVATE BANKING REFINEMENT LAYER
   Last layer. Overrides all earlier "demo/AI-looking" treatments.
   Design principles:
     • Type-led, not gradient-led
     • Warm paper > sterile white
     • Brass accent only, used sparingly
     • Squared corners, sharp edges (max 8px radius on cards)
     • Density over emptiness
     • Real shadows (1 layer, low blur) — not stacked AI puff
     • Mono numerals everywhere financial
   ============================================================ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap");

:root {
  /* Brand palette — overrides earlier indigo-violet */
  --primary:        #0B1E33;
  --primary-deep:   #061121;
  --primary-2:      #14365A;
  --primary-3:      #1F4C7A;
  --accent:         #C6A266;
  --accent-dark:    #A3854E;
  --accent-soft:    rgba(198, 162, 102, 0.12);
  --paper:          #F7F5F0;
  --paper-2:        #EFEBE2;
  --paper-3:        #E5DFD2;

  /* Type tokens */
  --font-display: 'Fraunces', 'New York', 'Georgia', serif;
  --font-sans:    'Inter', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:    'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* Override the older softer text tokens — WCAG AA targets (4.5:1 body, 3:1 large). */
  --text:        #0B1E33;
  --text-muted:  #4A5868;  /* darker — was #5B6B7E, now ~7.6:1 on paper */
  --text-faint:  #6B7785;  /* darker — was #97A1AE which was <3:1, now ~4.6:1 on paper */
  --border:      #DDD6C7;
  --border-soft: #ECE7DC;
  --surface:     #F2EEE5;
  --surface-2:   #ECE7DC;
  --card-bg:     #FFFFFF;
  --bg:          #F7F5F0;

  /* Refined shadows — flat, one layer */
  --shadow-sm:   0 1px 0 rgba(11, 30, 51, 0.05), 0 1px 2px rgba(11, 30, 51, 0.04);
  --shadow-md:   0 1px 2px rgba(11, 30, 51, 0.06), 0 6px 14px rgba(11, 30, 51, 0.06);
  --shadow-deep: 0 2px 6px rgba(11, 30, 51, 0.08), 0 16px 32px rgba(11, 30, 51, 0.10);

  /* Tighter radii — premium feel */
  --r-xs:  3px;
  --r-sm:  6px;
  --r-md:  8px;
  --r-lg:  10px;
  --r-xl:  14px;

  /* Status colors — muted, sophisticated */
  --success:     #2D6A4F;
  --success-bg:  rgba(45, 106, 79, 0.08);
  --warning:     #B5651D;
  --warning-bg:  rgba(181, 101, 29, 0.10);
  --danger:      #9B2C2C;
  --danger-bg:   rgba(155, 44, 44, 0.08);
  --info:        #1F4C7A;
  --info-bg:     rgba(31, 76, 122, 0.08);
}

/* Base */
html, body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  font-feature-settings: "ss01" 1, "cv11" 1, "tnum" 0;
}

/* Display type — serif, restrained */
h1, h2, h3, .display, .pdp-title, .balance-amount {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.015em;
}
h1 { font-size: clamp(28px, 3.4vw, 40px); line-height: 1.1; }
h2 { font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; }
h3 { font-size: clamp(17px, 1.6vw, 20px); line-height: 1.3; font-weight: 600; }

/* Mono everywhere money appears */
.mono, .amt-credit, .amt-debit, .balance-amount, .stat-value,
.kpi-value, td.mono, .pdp-stat .val {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1, "zero" 1;
}

/* Subtitle */
.subtitle, p.subtitle {
  color: var(--text-muted);
  font-size: 14.5px;
  line-height: 1.5;
  max-width: 64ch;
}

/* Page padding */
.page { padding: 28px 24px 80px; }
@media (max-width: 720px) { .page { padding: 18px 16px 60px; } }

/* Customer topbar — refined */
.cust-topbar {
  background: rgba(247, 245, 240, 0.86);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
  box-shadow: none;
  padding: 14px 24px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.cust-topbar .brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
  color: var(--primary);
  display: flex; align-items: center; gap: 10px;
}
.cust-topbar .brand .lg {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--primary);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0;
  border-radius: 2px;
  /* Brass-and-ink monogram block — bank-seal feel */
  box-shadow: inset 0 0 0 1px var(--accent), 0 1px 2px rgba(11, 30, 51, 0.08);
}
.cust-topbar .nav a {
  font-weight: 500;
  font-size: 14px;
  color: var(--text-muted);
  padding: 8px 12px;
  border-radius: 6px;
  letter-spacing: 0.005em;
  position: relative;
}
.cust-topbar .nav a:hover { color: var(--primary); background: transparent; }
.cust-topbar .nav a.active {
  color: var(--primary);
  background: transparent;
}
.cust-topbar .nav a.active::after {
  content: "";
  position: absolute;
  left: 12px; right: 12px;
  bottom: -2px;
  height: 2px;
  background: var(--accent);
}

/* Mega menu — paper background */
.mega-menu {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-deep);
  padding: 20px;
  gap: 14px 32px;
}
.mega-heading {
  color: var(--accent-dark);
  font-family: var(--font-sans);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.mega-menu .mega-link {
  font-size: 13.5px;
  padding: 7px 10px;
  border-radius: 4px;
  font-weight: 500;
}
.mega-menu .mega-link:hover {
  background: var(--accent-soft);
  color: var(--primary);
}

/* Buttons — refined, less rounded, accent reserved for primary action */
.btn {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 14px;
  border-radius: 6px;
  padding: 9px 18px;
  letter-spacing: 0.005em;
  transition: background 140ms ease, transform 80ms ease, box-shadow 140ms ease;
  border: 1px solid transparent;
}
.btn-lg { padding: 12px 26px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12.5px; border-radius: 5px; }
.btn-primary {
  background: var(--primary);
  color: #fff;
}
.btn-primary:hover { background: var(--primary-deep); }
.btn-accent {
  background: var(--accent);
  color: var(--primary);
}
.btn-accent:hover { background: var(--accent-dark); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--primary);
  border-color: var(--border);
}
.btn-ghost:hover { background: var(--paper-2); border-color: var(--text-muted); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #1F4D38; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #7A1E1E; }
.btn-warning { background: var(--warning); color: #fff; }

/* Cards — sharp edges, low shadow */
.card, .glass {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  box-shadow: var(--shadow-sm);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-soft);
}
.card-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  letter-spacing: -0.005em;
  margin: 0;
}
.card-body { padding: 18px 20px; }
.glass { padding: 22px; }

/* KPI tiles — quieter, more typographic */
.kpi {
  background: var(--card-bg);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  left: 0; top: 18px; bottom: 18px;
  width: 2px;
  background: var(--accent);
  opacity: .9;
}
.kpi-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}
.kpi-value {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: -0.01em;
}

/* Form inputs — bigger, calmer */
.input {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 14.5px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 140ms, box-shadow 140ms;
}
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
label { font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; display: block; letter-spacing: 0.005em; }
label.required::after { content: " *"; color: var(--danger); font-weight: 700; }

/* Tables — denser, banking-style */
table.data {
  border-collapse: collapse;
  width: 100%;
  background: var(--card-bg);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-soft);
}
table.data thead th {
  background: var(--paper-2);
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
table.data tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-soft);
  font-size: 14px;
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--paper-2); }

/* Badges — minimal */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-info    { background: var(--info-bg);    color: var(--info); }
.badge-danger  { background: var(--danger-bg);  color: var(--danger); }
.badge-muted   { background: var(--paper-2);    color: var(--text-muted); }

/* Dashboard hero — the signature page redesign */
.hero-balance {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  border-radius: 8px;
  padding: 36px 40px 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
}
.hero-balance::before {
  content: "";
  position: absolute;
  top: 0; right: 0;
  width: 320px; height: 320px;
  background: radial-gradient(circle at 70% 20%, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.hero-balance .eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: flex; align-items: center; gap: 8px;
}
.hero-balance .eyebrow::before {
  content: "";
  display: inline-block;
  width: 18px; height: 1px;
  background: var(--accent);
}
.hero-balance .balance-amount {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 64px);
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #fff;
  margin: 0;
  font-variant-numeric: tabular-nums;
  line-height: 1.05;
}
.hero-balance .balance-meta {
  display: flex; gap: 32px; margin-top: 28px;
  font-size: 13px;
  flex-wrap: wrap;
}
.hero-balance .balance-meta > div {
  display: flex; flex-direction: column; gap: 4px;
  opacity: 1;                  /* override legacy `.balance-meta div { opacity: .85 }` at line 849 */
}
.hero-balance .balance-meta .label {
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #C6A266;            /* full-alpha brass — ~6.2:1 on the navy hero (was 0.85α + 0.75 opacity ≈ 3.3:1) */
  font-weight: 600;
  opacity: 1;                /* override .hero-balance .label opacity .75 inherited from line 1133 */
}
.hero-balance .balance-meta .val {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 500;
  color: #FFFFFF;            /* full white — was 0.94α */
  opacity: 1;
}

/* Quick-actions row */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 28px;
}
.quick-action {
  background: var(--card-bg);
  padding: 18px 16px;
  text-align: center;
  text-decoration: none;
  color: var(--primary);
  font-size: 13px;
  font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  transition: background 140ms;
}
.quick-action:hover { background: var(--paper-2); }
.quick-action .ico {
  width: 38px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 6px;
}
.quick-action .ico svg { width: 18px; height: 18px; }

/* Page header — restrained, asymmetric */
.page-header {
  margin-bottom: 28px;
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  border-bottom: 1px solid var(--border-soft);
  padding-bottom: 18px;
}
.page-header h1 {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-weight: 600;
}
.page-header .subtitle { margin: 0; }
.page-actions { display: flex; gap: 10px; align-items: center; }

/* Sidebar (admin) — refined navy + brass */
.sidebar {
  background: var(--primary);
  color: rgba(255, 255, 255, 0.85);
  border-right: 1px solid var(--primary-deep);
  padding: 22px 14px;
}
.sidebar-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  margin-bottom: 16px;
}
.sidebar-brand-logo {
  width: 34px; height: 34px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent);
  color: var(--primary);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  border-radius: 2px;
}
.sidebar-brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 17px;
  color: #fff;
  letter-spacing: -0.005em;
}
.sidebar-chip {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 10px;
}
.sidebar-chip .avatar {
  width: 30px; height: 30px;
  background: var(--accent);
  color: var(--primary);
}
.sidebar-chip-name { font-size: 13px; font-weight: 600; color: #fff; }
.sidebar-chip-role { font-size: 11px; color: var(--accent); letter-spacing: 0.06em; text-transform: uppercase; }
.sidebar-section {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 14px 8px 6px;
  opacity: 0.8;
}
.sidebar-nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px;
  border-radius: 4px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  transition: background 140ms, color 140ms;
}
.sidebar-nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: #fff;
}
.sidebar-nav a.active {
  background: rgba(198, 162, 102, 0.12);
  color: var(--accent);
  border-left: 2px solid var(--accent);
  padding-left: 8px;
}
.sidebar-nav a svg { width: 16px; height: 16px; flex-shrink: 0; opacity: 0.7; }
.sidebar-nav a.active svg { opacity: 1; }

/* Admin topbar — paper, not navy */
.topbar {
  background: var(--card-bg);
  color: var(--primary);
  border-bottom: 1px solid var(--border-soft);
  padding: 12px 24px;
}
.topbar-brand {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--primary);
}
.topbar-search .input { background: var(--paper-2); border-color: var(--border-soft); }

/* Admin footer */
.admin-footer {
  background: var(--paper);
  border-top: 1px solid var(--border-soft);
  padding: 18px 24px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: right;
}

/* Modal — sharper */
.modal {
  border-radius: 8px;
  box-shadow: var(--shadow-deep);
}
.modal-header { padding: 18px 22px; border-bottom: 1px solid var(--border-soft); }
.modal-title { font-family: var(--font-display); font-size: 18px; font-weight: 600; }
.modal-footer { padding: 14px 22px; border-top: 1px solid var(--border-soft); background: var(--paper); }

/* Avatar — bank-seal style */
.avatar {
  background: var(--primary);
  color: var(--accent);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0;
}

/* Notif dropdown */
.notif-dropdown { background: #fff; border-color: var(--border); border-radius: 6px; }

/* Subtle paper texture on body — gives the page a tactile feel without being noisy */
body::before {
  content: "";
  position: fixed; inset: 0;
  background-image:
    radial-gradient(circle at 18% 28%, rgba(198, 162, 102, 0.04) 0%, transparent 22%),
    radial-gradient(circle at 82% 72%, rgba(11, 30, 51, 0.03) 0%, transparent 28%);
  pointer-events: none;
  z-index: -1;
}

/* Kill aggressive gradients on legacy elements */
.gradient, .hero-pattern, .stat-tile {
  background: var(--card-bg) !important;
}
.stat-tile {
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 18px 20px;
  display: flex; align-items: center; gap: 14px;
}
.stat-tile .stat-icon {
  width: 40px; height: 40px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--accent-soft);
  color: var(--accent-dark);
}
.stat-tile .stat-icon.green  { background: var(--success-bg); color: var(--success); }
.stat-tile .stat-icon.blue   { background: var(--info-bg);    color: var(--info); }
.stat-tile .stat-icon.amber  { background: var(--warning-bg); color: var(--warning); }
.stat-tile .stat-icon.purple { background: var(--accent-soft); color: var(--accent-dark); }
.stat-tile .stat-icon.red    { background: var(--danger-bg);  color: var(--danger); }
.stat-tile .stat-label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 2px; }
.stat-tile .stat-value { font-family: var(--font-mono); font-size: 22px; font-weight: 600; color: var(--primary); }

/* Type-tabs — refined */
.type-tabs {
  background: var(--paper-2);
  border-radius: 8px;
  padding: 4px;
  border: 1px solid var(--border-soft);
}
.type-tab {
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.005em;
  border-radius: 5px;
}
.type-tab.active {
  background: var(--card-bg);
  color: var(--primary);
  box-shadow: 0 1px 2px rgba(11, 30, 51, 0.08);
}
.type-tab small { font-weight: 500; font-size: 10.5px; }

/* Dropdowns */
.dropdown-menu { border-color: var(--border); border-radius: 6px; box-shadow: var(--shadow-deep); }

/* Toast */
.toast {
  border-radius: 6px;
  font-weight: 500;
  font-size: 13.5px;
  box-shadow: var(--shadow-deep);
  border: 1px solid var(--border-soft);
}

/* Dark mode toggle — keep but recolor */
.theme-toggle { background: var(--paper-2); border: 1px solid var(--border-soft); }
.theme-toggle:hover { background: var(--paper-3); }

/* Dark theme overrides — WCAG AA contrast tokens. */
[data-theme="dark"] {
  --bg:        #0A1726;
  --paper:     #0A1726;
  --paper-2:   #11243A;
  --paper-3:   #16314F;
  --card-bg:   #11243A;
  --surface:   #0F1F33;
  --text:      #F4EFE2;  /* slightly brighter for >12:1 contrast */
  --text-muted: #B5C0CE; /* was #97A4B6; bumped to ~7.2:1 on bg */
  --text-faint: #97A4B6; /* re-purposed: now light-gray ~6:1, was unset so it inherited 6B7785 (too dark on dark) */
  --border:    #1F3855;
  --border-soft: #182B44;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .cust-topbar {
  background: rgba(10, 23, 38, 0.78);
  border-bottom-color: var(--border);
}
[data-theme="dark"] .cust-topbar .brand { color: #fff; }
[data-theme="dark"] .card, [data-theme="dark"] .glass {
  background: var(--card-bg);
  border-color: var(--border);
}
[data-theme="dark"] .kpi { background: var(--card-bg); border-color: var(--border); }
[data-theme="dark"] table.data thead th { background: var(--paper-2); color: var(--accent); }
[data-theme="dark"] table.data { border-color: var(--border); background: var(--card-bg); }
[data-theme="dark"] .btn-ghost { color: var(--text); border-color: var(--border); }
[data-theme="dark"] .topbar { background: var(--card-bg); color: var(--text); }
[data-theme="dark"] .topbar-search .input { background: var(--paper-2); border-color: var(--border); color: var(--text); }
[data-theme="dark"] .admin-footer { background: var(--paper); border-color: var(--border); }
[data-theme="dark"] .input { background: var(--paper-2); border-color: var(--border); color: var(--text); }

/* Login page — refined "welcome" */
.login-shell { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
@media (max-width: 880px) { .login-shell { grid-template-columns: 1fr; } }
.login-aside {
  background: linear-gradient(180deg, var(--primary) 0%, var(--primary-deep) 100%);
  color: #fff;
  padding: 60px 56px;
  display: flex; flex-direction: column;
  position: relative;
  overflow: hidden;
}
.login-aside::before {
  content: "";
  position: absolute;
  bottom: -120px; right: -120px;
  width: 460px; height: 460px;
  border-radius: 50%;
  background: radial-gradient(circle at center, var(--accent-soft) 0%, transparent 60%);
  pointer-events: none;
}
.login-aside .brand-wrap { display: flex; align-items: center; gap: 12px; }
.login-aside .brand-mark {
  width: 42px; height: 42px;
  background: var(--accent);
  color: var(--primary);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  border-radius: 2px;
}
.login-aside .brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.005em;
}
.login-aside h2 {
  font-family: var(--font-display);
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-top: auto;
  margin-bottom: 18px;
  color: #fff;
}
.login-aside p { font-size: 16px; line-height: 1.55; color: rgba(255, 255, 255, 0.82); max-width: 46ch; }
.login-form {
  background: var(--bg);
  padding: 56px;
  display: flex; flex-direction: column; justify-content: center;
}
.login-form .form-inner {
  max-width: 380px;
  width: 100%;
  margin: 0 auto;
}

/* Skin-refresh emoji-heavy treatments — hide where possible */
.cust-topbar .brand .lg::after { content: ""; }
@media (max-width: 640px) {
  .hero-balance { padding: 28px 24px; }
}

/* ============================================================
   NORTHBRIDGE — Final overrides (kill old rainbow colors)
   ============================================================ */

/* Spending bars — all navy, with brass for the top spend row */
.spend-row .bar > div,
.spend-row.cat-Income      .bar > div,
.spend-row.cat-Housing     .bar > div,
.spend-row.cat-Software    .bar > div,
.spend-row.cat-Groceries   .bar > div,
.spend-row.cat-Entertainment .bar > div,
.spend-row.cat-Dining      .bar > div,
.spend-row.cat-Transport   .bar > div,
.spend-row.cat-Shopping    .bar > div,
.spend-row.cat-Utilities   .bar > div,
.spend-row.cat-Refunds     .bar > div,
.spend-row.cat-Business    .bar > div,
.spend-row.cat-Family      .bar > div,
.spend-row.cat-Health      .bar > div,
.spend-row.cat-Education   .bar > div,
.spend-row.cat-Other       .bar > div {
  background: linear-gradient(90deg, #1F4C7A 0%, #0B1E33 100%) !important;
}
.spend-row:first-child .bar > div {
  background: linear-gradient(90deg, #C6A266 0%, #A3854E 100%) !important;
}
.spend-row .bar {
  background: var(--paper-2) !important;
  border-radius: 2px;
  height: 6px;
}
.spend-row { padding: 8px 0; }
.spend-row .cat { font-size: 13px; font-weight: 500; color: var(--primary); }
.spend-row .amt { font-family: var(--font-mono); font-size: 13px; font-weight: 600; color: var(--primary); }

/* Goal tiles — restrained palette, no rainbow */
.goal-tile .emoji,
.goal-tile .ring-pct,
.goal-tile .ring {
  background: var(--accent-soft) !important;
  color: var(--accent-dark) !important;
}
.goal-tile {
  background: var(--card-bg) !important;
  border: 1px solid var(--border-soft) !important;
  border-radius: 8px !important;
}
.goal-tile .name { font-weight: 600; color: var(--primary); font-family: var(--font-sans); }
.goal-tile .meta { font-family: var(--font-mono); color: var(--text-muted); font-size: 12.5px; }

/* Beneficiary chips on dashboard — quieter */
.bene-chip .av {
  border-radius: 50% !important;
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--accent);
  width: 48px; height: 48px;
  border: 1px solid rgba(255,255,255,.06);
}
.bene-chip .nm { color: var(--primary); font-size: 12px; font-weight: 500; }
.bene-chip.add .av { background: var(--paper-2) !important; color: var(--primary); border: 1px dashed var(--border); }

/* Section title — use serif, refined hierarchy */
.section-title {
  display: flex; justify-content: space-between; align-items: baseline;
  margin: 28px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border-soft);
}
.section-title h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0;
  color: var(--primary);
  letter-spacing: -0.005em;
}
.section-title .link {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-dark);
  text-decoration: none;
}
.section-title .link:hover { color: var(--accent); }

/* Activity list — newspaper-feel rows */
.activity-list { list-style: none; padding: 0; margin: 0; }
.activity-list li {
  display: flex; gap: 14px;
  padding: 14px 4px;
  border-bottom: 1px solid var(--border-soft);
}
.activity-list li:last-child { border-bottom: 0; }
.activity-list .ico {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--paper-2);
  color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.activity-list .ico.credit, .activity-list .ico.green { background: var(--success-bg); color: var(--success); }
.activity-list .ico.debit, .activity-list .ico.danger, .activity-list .ico.red { background: var(--danger-bg); color: var(--danger); }
.activity-list .ico.warning, .activity-list .ico.amber { background: var(--warning-bg); color: var(--warning); }
.activity-list .ico.info, .activity-list .ico.blue { background: var(--info-bg); color: var(--info); }
.activity-list .body { flex: 1; min-width: 0; }
.activity-list .t { font-weight: 600; color: var(--primary); font-size: 14px; }
.activity-list .b { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; }
.activity-list .right { text-align: right; flex-shrink: 0; }
.activity-list .amt { font-family: var(--font-mono); font-weight: 600; font-size: 14px; }
.activity-list .ts { font-size: 11px; color: var(--text-faint); margin-top: 2px; letter-spacing: .04em; }
.amt-credit { color: var(--success) !important; }
.amt-debit  { color: var(--danger) !important; }

/* Notif dropdown */
.notif-dropdown {
  background: var(--card-bg) !important;
  border: 1px solid var(--border) !important;
  border-radius: 6px !important;
  box-shadow: var(--shadow-deep);
}
.notif-item { padding: 12px 14px; }
.notif-item .t { font-weight: 600; color: var(--primary); font-size: 13.5px; }
.notif-item .b { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.notif-item.unread { background: var(--accent-soft); }
.notif-header h4 { font-family: var(--font-display); font-weight: 600; font-size: 14px; margin: 0; }
.notif-header { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); display: flex; justify-content: space-between; align-items: center; }
.notif-header button { background: transparent; border: 0; color: var(--accent-dark); font-size: 11px; font-weight: 600; cursor: pointer; }

/* Avatar dropdown (account menu) */
.avatar-dropdown {
  background: var(--card-bg) !important;
  border-color: var(--border) !important;
  border-radius: 6px !important;
}
.avatar-dropdown .who { padding: 12px 14px; border-bottom: 1px solid var(--border-soft); }
.avatar-dropdown .who .n { font-family: var(--font-display); font-weight: 600; }
.avatar-btn {
  background: var(--paper-2);
  border: 1px solid var(--border-soft);
  color: var(--primary);
  font-family: var(--font-sans);
  font-weight: 600;
  font-size: 13px;
}
.iconbtn {
  background: var(--paper-2);
  color: var(--primary);
  border: 1px solid var(--border-soft);
}
.iconbtn:hover { background: var(--paper-3); }
.iconbtn .dot {
  background: var(--accent);
  color: var(--primary);
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
}

/* Page heading h1 inside the standard page-header — use serif */
.page-header h1 { font-family: var(--font-display); font-weight: 600; }

/* Kill the heavy purple/violet hover transforms on cards */
.card:hover, .glass:hover { transform: none !important; }

/* Override old "skin-refresh" mesh gradient backgrounds anywhere they remain */
.mesh-bg, .gradient-mesh, .glass-mesh {
  background: var(--card-bg) !important;
}

/* ==================================================================
   Step-up OTP modal (DemoBank.requireOtp)
   ================================================================== */
.nb-otp-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 30, 51, 0.55);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  z-index: 1000;
  /* No opacity animation — opacity propagates to children, so animating it on the
     backdrop briefly hides the modal card and breaks tools (Cowork, CDP screenshot
     scripts) that snapshot immediately after opening.  Background appears instantly. */
}
.nb-otp-backdrop.open { display: flex; }
@keyframes nbFade { from { opacity: 0; } to { opacity: 1; } }

.nb-otp-card {
  background: var(--card-bg, #fff);
  color: var(--text, #0B1E33);
  border: 1px solid var(--border, #DDD6C7);
  border-radius: 14px;
  width: min(440px, calc(100vw - 32px));
  padding: 28px;
  box-shadow: 0 24px 60px rgba(11, 30, 51, 0.30);
}
.nb-otp-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.nb-otp-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--accent-dark, #A3854E);
  margin-bottom: 6px;
}
.nb-otp-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 20px; font-weight: 600; line-height: 1.2;
  margin: 0 0 6px;
}
.nb-otp-sub { font-size: 13px; color: var(--text-muted, #4A5868); margin: 0; line-height: 1.5; }
.nb-otp-contact { font-weight: 600; color: var(--text, #0B1E33); }
.nb-otp-x {
  background: transparent; border: 0; font-size: 24px; line-height: 1;
  color: var(--text-muted, #4A5868); cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
}
.nb-otp-x:hover { background: var(--surface, #F2EEE5); color: var(--text); }

.nb-otp-inputs {
  display: flex; gap: 10px; justify-content: center;
  margin: 12px 0 16px;
}
.nb-otp-d {
  width: 48px; height: 56px;
  border: 1px solid var(--border, #DDD6C7);
  border-radius: 8px;
  background: var(--surface, #F7F5F0);
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 22px; font-weight: 600;
  text-align: center;
  color: var(--text, #0B1E33);
  caret-color: var(--accent, #C6A266);
  outline: none;
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.nb-otp-d:focus {
  border-color: var(--accent, #C6A266);
  box-shadow: 0 0 0 3px rgba(198, 162, 102, 0.18);
}
.nb-otp-d:not(:placeholder-shown) { background: #fff; border-color: var(--accent-dark, #A3854E); }

.nb-otp-err {
  min-height: 18px;
  font-size: 12.5px;
  color: var(--danger, #9B2C2C);
  margin-bottom: 14px;
  text-align: center;
}
.nb-otp-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.nb-otp-actions .btn-ghost:disabled { opacity: 0.55; cursor: not-allowed; }

[data-theme="dark"] .nb-otp-card {
  background: var(--card-bg, #11243A);
  border-color: var(--border, #1F3855);
  color: var(--text, #F4EFE2);
}
[data-theme="dark"] .nb-otp-d {
  background: var(--paper-2, #11243A);
  border-color: var(--border, #1F3855);
  color: var(--text, #F4EFE2);
}

/* ==================================================================
   Shared confirm() / prompt() replacement dialog (DemoBank.confirm/prompt)
   ================================================================== */
.nb-dlg-backdrop {
  position: fixed; inset: 0;
  background: rgba(11, 30, 51, 0.55);
  backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center;
  z-index: 1001;
  /* No opacity animation — opacity propagates to children, so animating it on the
     backdrop briefly hides the modal card and breaks tools (Cowork, CDP screenshot
     scripts) that snapshot immediately after opening.  Background appears instantly. */
}
.nb-dlg-backdrop.open { display: flex; }
.nb-dlg-card {
  background: var(--card-bg, #fff);
  color: var(--text, #0B1E33);
  border: 1px solid var(--border, #DDD6C7);
  border-radius: 14px;
  width: min(440px, calc(100vw - 32px));
  padding: 26px;
  box-shadow: 0 24px 60px rgba(11, 30, 51, 0.28);
}
.nb-dlg-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 16px; }
.nb-dlg-title {
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: 20px; font-weight: 600; line-height: 1.2;
  margin: 0;
}
.nb-dlg-x {
  background: transparent; border: 0; font-size: 24px; line-height: 1;
  color: var(--text-muted, #4A5868); cursor: pointer; padding: 4px 8px;
  border-radius: 6px;
}
.nb-dlg-x:hover { background: var(--surface, #F2EEE5); color: var(--text); }
.nb-dlg-body { margin-bottom: 8px; }
.nb-dlg-msg {
  font-size: 14px; line-height: 1.5; color: var(--text-muted, #4A5868);
  white-space: pre-wrap;
  margin: 0 0 12px;
}
.nb-dlg-err {
  min-height: 18px; font-size: 12.5px; color: var(--danger, #9B2C2C);
  margin-bottom: 10px;
}
.nb-dlg-actions { display: flex; justify-content: flex-end; gap: 10px; }

[data-theme="dark"] .nb-dlg-card {
  background: var(--card-bg, #11243A);
  border-color: var(--border, #1F3855);
  color: var(--text, #F4EFE2);
}
