:root {
  --red: #D03027;
  --navy: #0D2137;
  --blue: #0A6E9E;
  --green: #1D7A4E;
  --amber: #B45309;
  --ink: #15202B;
  --muted: #57687A;
  --line: #D9E3EC;
  --wash: #F4F6F9;
  --paper: #FFFFFF;
  --radius: 4px;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background: var(--wash);
}

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

h1, h2, h3, p { margin-top: 0; }

/* --- Banking Header --- */
.banking-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.banking-header-top {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 0 clamp(16px, 4vw, 48px);
  height: 60px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: linear-gradient(135deg, var(--navy), var(--red));
  font-weight: 900;
  font-size: 13px;
}

.banking-header nav {
  display: flex;
  justify-content: center;
  gap: clamp(10px, 2.5vw, 28px);
}

.banking-header nav a {
  display: flex;
  align-items: center;
  height: 60px;
  padding: 0 4px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

.banking-header nav a:hover,
.banking-header nav a.active {
  color: var(--red);
  border-bottom-color: var(--red);
}

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

.notif-btn {
  position: relative;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  cursor: pointer;
  color: var(--muted);
  transition: background 0.15s;
}

.notif-btn:hover { background: var(--wash); }

.notif-btn svg { width: 18px; height: 18px; }

.notif-badge {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--red);
  color: white;
  font-size: 9px;
  font-weight: 800;
  display: grid;
  place-items: center;
}

.avatar-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  font-weight: 800;
  font-size: 14px;
  display: grid;
  place-items: center;
  cursor: pointer;
  border: 0;
  font-family: inherit;
}

.signout-btn {
  min-height: 36px;
  padding: 0 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--paper);
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.signout-btn:hover { border-color: var(--red); color: var(--red); }

/* --- Last Login Bar --- */
.last-login-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px clamp(16px, 4vw, 48px);
  background: var(--wash);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
}

.last-login-bar svg { width: 13px; height: 13px; flex-shrink: 0; }
.last-login-bar strong { color: var(--ink); font-weight: 600; }

/* --- Main layout --- */
.banking-main {
  display: grid;
  gap: 20px;
  padding: clamp(18px, 4vw, 36px) clamp(16px, 4vw, 48px);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* --- Welcome Band --- */
.welcome-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 24px;
  align-items: center;
  padding: clamp(20px, 3vw, 32px) clamp(22px, 3vw, 36px);
  border-radius: 10px;
  color: white;
  background: linear-gradient(135deg, var(--navy) 0%, #124060 60%, #c02028 100%);
}

.welcome-greeting h1 {
  margin-bottom: 6px;
  font-size: clamp(26px, 4vw, 42px);
  font-weight: 800;
}

.welcome-greeting p {
  color: rgba(255,255,255,0.78);
  font-size: 14px;
  margin: 0;
}

.eyebrow {
  margin: 0 0 6px;
  color: #f9b3ae;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.net-balance-card {
  padding: 18px 22px;
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: 8px;
  background: rgba(255,255,255,0.1);
  min-width: 200px;
  text-align: right;
}

.net-balance-card span {
  display: block;
  color: rgba(255,255,255,0.72);
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 6px;
}

.net-balance-card strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
}

/* --- Quick Actions Bar --- */
.quick-actions-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 0 8px;
  scrollbar-width: none;
}

.quick-actions-bar::-webkit-scrollbar { display: none; }

.quick-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  min-width: 80px;
  padding: 14px 10px 12px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  flex-shrink: 0;
}

.quick-btn:hover {
  border-color: var(--blue);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.quick-btn-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wash);
  display: grid;
  place-items: center;
  color: var(--navy);
}

.quick-btn-icon svg { width: 18px; height: 18px; }

.quick-btn span {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  text-align: center;
  line-height: 1.3;
}

/* --- Account Cards --- */
.account-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.account-card {
  padding: 22px;
  border: 1.5px solid var(--line);
  border-left: 4px solid var(--red);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: box-shadow 0.2s, transform 0.2s;
}

.account-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.account-card.checking { border-left-color: var(--red); }
.account-card.savings  { border-left-color: var(--blue); }
.account-card.credit   { border-left-color: var(--amber); }

.account-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 14px;
}

.account-card-header .acct-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--muted);
}

.account-badge {
  font-size: 11px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e6f4ec;
  color: var(--green);
}

.account-badge.locked-badge { background: #fde8e8; color: var(--red); }

.account-masked {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.account-balance {
  font-size: 30px;
  font-weight: 800;
  color: var(--navy);
  margin: 6px 0 16px;
}

.account-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.account-manage-link {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}

.account-manage-link:hover { text-decoration: underline; }

.lock-card-btn {
  font-size: 12px;
  font-weight: 700;
  padding: 5px 10px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  cursor: pointer;
  font-family: inherit;
  color: var(--muted);
  transition: border-color 0.15s, color 0.15s;
}

.lock-card-btn:hover { border-color: var(--red); color: var(--red); }
.lock-card-btn.locked { border-color: var(--red); color: var(--red); background: #fde8e8; }

/* --- Dashboard Grid --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr;
  gap: 18px;
}

.panel {
  padding: 22px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.panel-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
}

.panel-title h2 { margin: 0; font-size: 18px; font-weight: 700; }

.panel-title a {
  font-size: 13px;
  font-weight: 700;
  color: var(--red);
}

.panel-title a:hover { text-decoration: underline; }

/* --- Transactions --- */
.txn-list { display: grid; gap: 2px; }

.txn-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 6px;
  transition: background 0.1s;
}

.txn-row:hover { background: var(--wash); }

.txn-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 17px;
}

.txn-icon.cat-food      { background: #fff3e0; }
.txn-icon.cat-shopping  { background: #e8f0fe; }
.txn-icon.cat-entertain { background: #fce4ec; }
.txn-icon.cat-gas       { background: #fff8e1; }
.txn-icon.cat-utilities { background: #e8f5e9; }
.txn-icon.cat-transport { background: #e3f2fd; }
.txn-icon.cat-health    { background: #fde8e8; }
.txn-icon.cat-travel    { background: #e8eaf6; }
.txn-icon.cat-payroll   { background: #e6f4ec; }
.txn-icon.cat-savings   { background: #e0f7fa; }
.txn-icon.cat-transfer  { background: #f3e5f5; }
.txn-icon.cat-rewards   { background: #fff9e6; }
.txn-icon.cat-other     { background: var(--wash); }

.txn-info { flex: 1; min-width: 0; }

.txn-merchant {
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.txn-meta {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.txn-amount {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
  flex-shrink: 0;
}

.txn-amount.positive { color: var(--green); }
.txn-amount.negative { color: var(--ink); }

/* --- Lower Grid --- */
.lower-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 18px;
}

/* --- Spending Bars --- */
.spend-list { display: grid; gap: 14px; }

.spend-item-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 5px;
  font-size: 13px;
}

.spend-item-label span { font-weight: 700; color: var(--ink); }
.spend-item-label small { color: var(--muted); }

.spend-track {
  height: 8px;
  border-radius: 999px;
  background: var(--wash);
  overflow: hidden;
}

.spend-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--blue);
  transition: width 0.6s ease;
}

.spend-fill.over-budget { background: var(--red); }
.spend-fill.near-budget { background: var(--amber); }

/* --- Rewards & Alerts --- */
.rewards-block {
  padding: 18px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, var(--navy), #1a4a6e);
  color: white;
  margin-bottom: 16px;
}

.rewards-block p { color: rgba(255,255,255,0.78); font-size: 13px; margin: 4px 0 14px; }

.rewards-pts {
  font-size: 36px;
  font-weight: 800;
  display: block;
  margin-bottom: 4px;
}

.rewards-label {
  font-size: 12px;
  color: rgba(255,255,255,0.72);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.redeem-btn {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: rgba(255,255,255,0.2);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,0.3);
  margin-top: 12px;
  transition: background 0.15s;
}

.redeem-btn:hover { background: rgba(255,255,255,0.3); }

.alerts-block { display: grid; gap: 10px; }

.alert-chip {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border-radius: 6px;
  background: var(--wash);
  border: 1.5px solid var(--line);
  position: relative;
}

.alert-chip.alert-warn { border-color: #fde68a; background: #fffbeb; }
.alert-chip.alert-info { border-color: #bfdbfe; background: #eff6ff; }

.alert-chip-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 14px;
}

.alert-chip.alert-warn .alert-chip-icon { background: #fde68a; }
.alert-chip.alert-info .alert-chip-icon { background: #bfdbfe; }

.alert-chip-body { flex: 1; min-width: 0; }

.alert-chip-body strong { font-size: 13px; font-weight: 700; display: block; }
.alert-chip-body span { font-size: 12px; color: var(--muted); }

.alert-dismiss {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  padding: 0;
}

.alert-dismiss:hover { color: var(--red); }

/* --- Credit Score Widget --- */
.score-widget {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 20px;
  align-items: center;
  padding: 22px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.score-arc-wrap { position: relative; width: 120px; height: 70px; }

.score-arc-wrap svg { width: 120px; }

.score-number {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  font-size: 26px;
  font-weight: 800;
  color: var(--navy);
}

.score-info h3 { font-size: 16px; margin-bottom: 4px; }

.score-rating {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #e6f4ec;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 8px;
}

.score-info p { font-size: 13px; color: var(--muted); margin: 0; }

/* --- Security Center --- */
.security-center {
  padding: 22px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  box-shadow: var(--shadow-sm);
}

.security-center h2 { font-size: 18px; margin-bottom: 18px; }

.security-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.security-item {
  padding: 16px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  background: var(--wash);
}

.security-item strong { display: block; font-size: 14px; margin-bottom: 4px; }
.security-item span { font-size: 13px; color: var(--muted); }

.security-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 8px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.security-badge.enabled { background: #e6f4ec; color: var(--green); }
.security-badge.disabled { background: var(--wash); color: var(--muted); }

.kyc-upload-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.kyc-upload-form .field-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
}

.kyc-upload-form label {
  display: grid;
  gap: 6px;
  color: #33475e;
  font-size: 13px;
  font-weight: 700;
}

.kyc-upload-form select,
.kyc-upload-form input {
  min-height: 42px;
  padding: 8px 10px;
  border: 1.5px solid var(--line);
  border-radius: 4px;
  font: inherit;
  background: var(--paper);
}

.device-list, .login-history { display: grid; gap: 10px; margin-top: 10px; }

.device-row, .login-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  font-size: 13px;
  background: var(--wash);
}

.device-row strong, .login-row strong { font-weight: 700; color: var(--ink); }
.device-row span, .login-row span { color: var(--muted); font-size: 12px; }

/* --- Session Timeout Banner --- */
.timeout-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px);
  background: #fffbeb;
  border-top: 3px solid #fbbf24;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.12);
  animation: slide-up 0.3s ease;
}

@keyframes slide-up {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

.timeout-banner p { margin: 0; font-size: 14px; font-weight: 700; color: var(--ink); }
.timeout-banner span { color: var(--amber); }

.timeout-stay-btn {
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: var(--navy);
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.timeout-stay-btn:hover { opacity: 0.85; }

/* ========================================
   TRANSACTION DETAIL MODAL
======================================== */
.txn-row { cursor: pointer; }

.txn-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,15,30,0.7);
  display: grid;
  place-items: center;
  z-index: 800;
  padding: 20px;
  backdrop-filter: blur(4px);
  animation: fade-in 0.15s ease;
}

@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.txn-modal {
  width: min(100%, 420px);
  background: var(--paper);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.35);
  animation: slide-up-modal 0.2s ease;
}

@keyframes slide-up-modal { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

.txn-modal-top {
  padding: 22px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
}

.txn-modal-icon-lg {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}

.txn-modal-title { flex: 1; min-width: 0; }
.txn-modal-title h3 { margin: 0 0 4px; font-size: 18px; }
.txn-modal-title span { font-size: 13px; color: var(--muted); }

.txn-modal-amount {
  font-size: 26px;
  font-weight: 800;
  flex-shrink: 0;
}

.txn-modal-amount.positive { color: var(--green); }
.txn-modal-amount.negative { color: var(--ink); }

.txn-modal-rows { padding: 6px 0; }

.txn-modal-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 13px 22px;
  border-bottom: 1px solid var(--wash);
  font-size: 14px;
}

.txn-modal-row:last-child { border-bottom: 0; }
.txn-modal-row span:first-child { color: var(--muted); font-weight: 600; }
.txn-modal-row span:last-child  { font-weight: 700; color: var(--ink); text-align: right; }

.txn-modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  padding: 16px 22px;
  border-top: 1px solid var(--line);
  background: var(--wash);
}

.txn-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 8px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  cursor: pointer;
  font-family: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
  transition: border-color 0.15s, background 0.15s;
}

.txn-action-btn:hover { border-color: var(--blue); background: #f0f7fc; }
.txn-action-btn svg { width: 20px; height: 20px; color: var(--blue); }

.txn-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 0;
  background: var(--wash);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: inherit;
  line-height: 1;
}

.txn-modal-close:hover { background: var(--line); color: var(--ink); }

/* ========================================
   NOTIFICATIONS DRAWER
======================================== */
.notif-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(100vw, 380px);
  background: var(--paper);
  box-shadow: -8px 0 40px rgba(0,0,0,0.18);
  z-index: 600;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.28s cubic-bezier(0.4,0,0.2,1);
}

.notif-drawer.open { transform: translateX(0); }

.notif-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5,15,30,0.45);
  z-index: 599;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s;
}

.notif-drawer-backdrop.open { opacity: 1; pointer-events: all; }

.notif-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.notif-drawer-header h2 { margin: 0; font-size: 18px; }

.notif-header-actions { display: flex; gap: 10px; align-items: center; }

.notif-mark-all {
  font-size: 12px;
  font-weight: 700;
  color: var(--blue);
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}

.notif-close-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-family: inherit;
  line-height: 1;
}

.notif-list { flex: 1; overflow-y: auto; padding: 8px 0; }

.notif-item {
  display: flex;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--wash);
  transition: background 0.1s;
  position: relative;
}

.notif-item.unread { background: #f0f7fc; }
.notif-item:hover  { background: var(--wash); }

.notif-item-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.notif-item-icon.txn   { background: #e6f4ec; }
.notif-item-icon.alert { background: #fde8e8; }
.notif-item-icon.info  { background: #e0f0f8; }
.notif-item-icon.promo { background: #fff3e0; }

.notif-item-body { flex: 1; min-width: 0; }
.notif-item-body strong { display: block; font-size: 13px; font-weight: 700; margin-bottom: 3px; }
.notif-item-body p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.5; }
.notif-item-time { font-size: 11px; color: var(--muted); flex-shrink: 0; margin-top: 2px; }

.notif-unread-dot {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.notif-empty { padding: 48px 24px; text-align: center; color: var(--muted); }
.notif-empty svg { width: 48px; height: 48px; margin-bottom: 12px; opacity: 0.4; }

/* ========================================
   CHATBOT
======================================== */
.chat-fab {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  border: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 6px 24px rgba(10,110,158,0.4);
  z-index: 500;
  transition: transform 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

.chat-fab:hover { transform: scale(1.08); box-shadow: 0 10px 32px rgba(10,110,158,0.5); }
.chat-fab svg { width: 26px; height: 26px; color: white; }

.chat-fab-label {
  position: absolute;
  bottom: 60px;
  right: 0;
  background: var(--navy);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 12px;
  border-radius: 6px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}

.chat-fab:hover .chat-fab-label { opacity: 1; transform: translateY(0); }

.chat-window {
  position: fixed;
  bottom: 96px;
  right: 28px;
  width: min(100vw - 40px, 360px);
  height: min(100vh - 120px, 520px);
  background: var(--paper);
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  z-index: 500;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1.5px solid var(--line);
  transform-origin: bottom right;
  transform: scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.22s cubic-bezier(0.34,1.56,0.64,1), opacity 0.18s ease;
}

.chat-window.open {
  transform: scale(1);
  opacity: 1;
  pointer-events: all;
}

.chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--navy), var(--blue));
  color: white;
  flex-shrink: 0;
}

.chat-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255,255,255,0.2);
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.chat-header-info strong { display: block; font-size: 14px; font-weight: 700; }
.chat-header-info span { font-size: 11px; color: rgba(255,255,255,0.7); }

.chat-close {
  margin-left: auto;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 0;
  background: rgba(255,255,255,0.15);
  color: white;
  font-size: 16px;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-family: inherit;
  line-height: 1;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  display: flex;
  gap: 8px;
  max-width: 90%;
  animation: msg-in 0.18s ease;
}

@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.chat-msg.user { align-self: flex-end; flex-direction: row-reverse; }

.chat-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

.chat-msg.bot .chat-msg-avatar  { background: linear-gradient(135deg, var(--navy), var(--blue)); }
.chat-msg.user .chat-msg-avatar { background: var(--wash); border: 1.5px solid var(--line); font-size: 12px; font-weight: 800; color: var(--muted); }

.chat-bubble {
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.55;
}

.chat-msg.bot  .chat-bubble { background: var(--wash); color: var(--ink); border-radius: 4px 12px 12px 12px; }
.chat-msg.user .chat-bubble { background: var(--blue); color: white; border-radius: 12px 4px 12px 12px; }

.chat-bubble strong { font-weight: 700; display: block; margin-bottom: 4px; }

.chat-quick-replies {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0 16px 12px;
}

.chat-qr-btn {
  padding: 6px 12px;
  border: 1.5px solid var(--blue);
  border-radius: 999px;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.chat-qr-btn:hover { background: var(--blue); color: white; }

.chat-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 10px 13px;
  background: var(--wash);
  border-radius: 4px 12px 12px 12px;
}

.chat-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--muted);
  animation: typing-dot 1.2s ease-in-out infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing-dot { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-5px); } }

.chat-input-row {
  display: flex;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.chat-input {
  flex: 1;
  height: 38px;
  padding: 0 12px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  color: var(--ink);
  background: var(--paper);
}

.chat-input:focus { outline: none; border-color: var(--blue); }

.chat-send-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 0;
  background: var(--blue);
  color: white;
  cursor: pointer;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: opacity 0.15s;
}

.chat-send-btn:hover { opacity: 0.85; }
.chat-send-btn svg { width: 16px; height: 16px; }

/* --- Responsive --- */
@media (max-width: 900px) {
  .banking-header-top { grid-template-columns: 1fr auto; }
  .banking-header nav { display: none; }

  .welcome-band { grid-template-columns: 1fr; }

  .account-grid { grid-template-columns: repeat(2, 1fr); }

  .dashboard-grid,
  .lower-grid { grid-template-columns: 1fr; }

  .security-grid { grid-template-columns: 1fr; }
  .kyc-upload-form .field-row { grid-template-columns: 1fr; }

  .score-widget { grid-template-columns: 1fr; text-align: center; }
  .score-arc-wrap { margin: 0 auto; }
}

@media (max-width: 540px) {
  .account-grid { grid-template-columns: 1fr; }
  .net-balance-card { min-width: unset; text-align: left; }
  .timeout-banner { flex-direction: column; align-items: flex-start; }
}

/* --- Credit score: not connected state --- */
.score-not-connected {
  padding: 2rem;
  text-align: center;
}

.score-not-connected-icon {
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.score-not-connected-title {
  margin: 0 0 0.35rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.score-not-connected-body {
  color: var(--muted);
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.55;
}

/* --- Notifications: empty state --- */
.no-notifs {
  padding: 1.5rem;
  text-align: center;
  color: var(--muted);
  margin: 0;
}

/* ========================================
   KYC STATUS PANEL
======================================== */

/* -- Overall status banner -- */
.kyc-status-banner {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 8px;
  margin-bottom: 18px;
  border-left: 4px solid currentColor;
}

.kyc-status-icon {
  font-size: 20px;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 1px;
}

.kyc-status-text strong {
  display: block;
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 3px;
}

.kyc-status-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
  opacity: 0.85;
}

.kyc-banner-verified  { background: #e6f4ec; color: var(--green); }
.kyc-banner-pending   { background: #fff8e1; color: #92690a; }
.kyc-banner-resubmit  { background: #fff3e0; color: var(--amber); }
.kyc-banner-rejected  { background: #fde8e8; color: var(--red); }

/* -- Compliance badges row -- */
.kyc-comp-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.kyc-comp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1.5px solid transparent;
}

.kyc-comp-badge.pass { background: #e6f4ec; color: var(--green); border-color: #b6dfc8; }
.kyc-comp-badge.wait { background: var(--wash); color: var(--muted); border-color: var(--line); }

/* -- Documents section -- */
.kyc-docs-section { margin-top: 4px; }

.kyc-docs-heading {
  font-size: 13px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
}

.kyc-doc-list {
  display: grid;
  gap: 10px;
}

/* -- Individual document card -- */
.kyc-doc-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 16px;
  background: var(--wash);
  border: 1.5px solid var(--line);
  border-radius: 8px;
  transition: box-shadow 0.15s;
}

.kyc-doc-card:hover { box-shadow: var(--shadow-sm); }

.kyc-doc-icon-wrap {
  font-size: 22px;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: white;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  flex-shrink: 0;
}

.kyc-doc-body {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.kyc-doc-type {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.kyc-doc-name {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kyc-doc-date {
  font-size: 11px;
  color: var(--muted);
}

.kyc-doc-notes {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--amber);
  font-style: italic;
  line-height: 1.4;
}

.kyc-doc-status-wrap { flex-shrink: 0; padding-top: 2px; }

.kyc-doc-status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.kyc-doc-approved   { background: #e6f4ec; color: var(--green); }
.kyc-doc-received   { background: #fff8e1; color: #92690a; }
.kyc-doc-resubmit   { background: #fff3e0; color: var(--amber); }
.kyc-doc-rejected   { background: #fde8e8; color: var(--red); }
.kyc-doc-superseded { background: var(--wash); color: var(--muted); }

/* -- No documents placeholder -- */
.kyc-no-docs {
  padding: 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  margin: 0;
}

/* -- Previous (superseded) docs collapsible -- */
.kyc-old-docs {
  margin-top: 10px;
}

.kyc-old-docs summary {
  font-size: 12px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  padding: 6px 0;
}

.kyc-doc-list-old {
  margin-top: 8px;
  opacity: 0.65;
}

/* -- What is still needed checklist -- */
.kyc-checklist {
  margin-top: 14px;
  padding: 12px 14px;
  background: #fff8e1;
  border: 1.5px solid #f0d980;
  border-radius: 8px;
}

.kyc-checklist strong {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #92690a;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kyc-checklist ul {
  margin: 0;
  padding: 0 0 0 16px;
}

.kyc-checklist li {
  font-size: 13px;
  color: var(--amber);
  font-weight: 600;
  line-height: 1.8;
}

/* -- KYC upload form feedback -- */
.form-message.success { color: var(--green); }
.form-message.error   { color: var(--red); }

/* -- KYC upload section -- */
.kyc-upload-section {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1.5px solid var(--line);
}

.kyc-upload-hint {
  font-size: 12px;
  color: var(--muted);
  margin: -8px 0 16px;
}

/* -- KYC pending notice (replaces payment form for unverified users) -- */
.kyc-pending-notice {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px;
  background: var(--wash);
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  margin-top: 12px;
}

.kyc-pending-icon {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
}

.kyc-pending-text strong {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 4px;
}

.kyc-pending-text p {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.kyc-pending-text a {
  color: var(--blue);
  text-decoration: none;
  font-weight: 600;
}

.kyc-pending-text a:hover { text-decoration: underline; }

/* -- KYC inline notice below card buttons -- */
.card-kyc-msg {
  font-size: 11px;
  color: var(--amber);
  font-weight: 600;
  margin: 6px 0 0;
  line-height: 1.4;
}

/* -- Disabled lock button style when KYC pending -- */
.lock-card-btn.kyc-locked-btn {
  opacity: 0.45;
  cursor: not-allowed;
}
