/* ── TrustVault — Midnight & Emerald Theme ────────────────────────────────── */
:root {
  --bg:          #080d0a;
  --bg2:         #0c1410;
  --surface:     #111916;
  --surface2:    #172118;
  --surface3:    #1c2a20;
  --border:      #1e2d24;
  --border2:     #243929;

  --emerald:     #10b981;
  --emerald-dk:  #059669;
  --emerald-lt:  #34d399;
  --emerald-xs:  rgba(16,185,129,.08);
  --emerald-glow:rgba(16,185,129,.18);

  --text:        #e8fdf0;
  --text2:       #a3c9b0;
  --text3:       #5a7a65;
  --text-inv:    #080d0a;

  --red:         #ef4444;
  --red-xs:      rgba(239,68,68,.1);
  --amber:       #f59e0b;
  --amber-xs:    rgba(245,158,11,.1);
  --blue:        #3b82f6;
  --blue-xs:     rgba(59,130,246,.1);

  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   18px;
  --radius-xl:   24px;

  --sidebar-w:   260px;
  --topbar-h:    64px;
  --shadow:      0 4px 24px rgba(0,0,0,.45);
  --shadow-sm:   0 2px 8px rgba(0,0,0,.3);
  --transition:  .18s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--emerald); text-decoration: none; }
a:hover { color: var(--emerald-lt); }
svg { flex-shrink: 0; }

/* ── Scrollbar ──────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text3); }

/* ── Layout ─────────────────────────────────────────────────────────────────── */
.app-layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  overflow-y: auto;
  transition: transform var(--transition);
}
.sidebar-logo {
  padding: 22px 20px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--emerald), var(--emerald-dk));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 12px var(--emerald-glow);
}
.sidebar-logo-icon svg { color: #fff; }
.sidebar-brand { font-size: 18px; font-weight: 700; letter-spacing: -.3px; }
.sidebar-brand span { color: var(--emerald); }
.sidebar-role {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 1px;
}
.sidebar-nav { flex: 1; padding: 10px 12px; overflow-y: auto; }
.sidebar-section-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 14px 8px 6px;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 14px;
  font-weight: 500;
  transition: all var(--transition);
  margin-bottom: 2px;
  cursor: pointer;
  text-decoration: none;
}
.sidebar-link svg { opacity: .7; transition: opacity var(--transition); }
.sidebar-link:hover { background: var(--surface2); color: var(--text); }
.sidebar-link:hover svg { opacity: 1; }
.sidebar-link.active {
  background: var(--emerald-xs);
  color: var(--emerald-lt);
  border: 1px solid rgba(16,185,129,.15);
}
.sidebar-link.active svg { opacity: 1; color: var(--emerald); }
.sidebar-badge {
  margin-left: auto;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 10px;
  min-width: 18px;
  text-align: center;
}
.sidebar-footer {
  padding: 12px;
  border-top: 1px solid var(--border);
}
.sidebar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
}
.sidebar-user-name { font-size: 13px; font-weight: 600; line-height: 1.3; }
.sidebar-user-role { font-size: 11px; color: var(--text3); text-transform: capitalize; }

/* Main content */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Topbar */
.topbar {
  height: var(--topbar-h);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.topbar-title { font-size: 17px; font-weight: 700; flex: 1; }
.topbar-subtitle { font-size: 12px; color: var(--text3); font-weight: 400; margin-top: 1px; }

/* Page content */
.page { padding: 28px 24px; max-width: 1280px; width: 100%; }

/* ── Avatar ─────────────────────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--emerald-dk), var(--emerald));
  color: #fff;
  text-transform: uppercase;
}
.avatar-sm { width: 32px; height: 32px; font-size: 12px; }
.avatar-md { width: 40px; height: 40px; }
.avatar-lg { width: 52px; height: 52px; font-size: 18px; }
.avatar-xl { width: 72px; height: 72px; font-size: 24px; }

/* ── Stat Cards ──────────────────────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 28px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}
.stat-card:hover { border-color: var(--border2); }
.stat-card::before {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 80px; height: 80px;
  border-radius: 0 0 0 80px;
  opacity: .06;
}
.stat-card.green::before { background: var(--emerald); }
.stat-card.red::before { background: var(--red); }
.stat-card.amber::before { background: var(--amber); }
.stat-card.blue::before { background: var(--blue); }
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.stat-icon.green { background: var(--emerald-xs); color: var(--emerald); }
.stat-icon.red   { background: var(--red-xs);    color: var(--red); }
.stat-icon.amber { background: var(--amber-xs);  color: var(--amber); }
.stat-icon.blue  { background: var(--blue-xs);   color: var(--blue); }
.stat-value { font-size: 26px; font-weight: 800; letter-spacing: -.5px; line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text3); font-weight: 500; letter-spacing: .3px; text-transform: uppercase; }
.stat-delta { font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-delta.up   { color: var(--emerald); }
.stat-delta.down { color: var(--red); }

/* ── Cards / Panels ─────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.card-header {
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.card-header-title { font-size: 15px; font-weight: 700; flex: 1; }
.card-header-sub { font-size: 12px; color: var(--text3); margin-top: 2px; }
.card-body { padding: 20px; }

/* Grid layouts */
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; }
.flex-row { display: flex; gap: 20px; }
.flex-row > * { flex: 1; }

/* ── Bank Card Visual ───────────────────────────────────────────────────────── */
.bank-card {
  width: 340px;
  height: 210px;
  border-radius: 18px;
  padding: 24px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  user-select: none;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.bank-card.visa-green {
  background: linear-gradient(135deg, #0a2a1a 0%, #0d4a28 40%, #10b981 100%);
}
.bank-card.visa-dark {
  background: linear-gradient(135deg, #0a0a14 0%, #1a1a3a 60%, #2d3a6a 100%);
}
.bank-card.mastercard {
  background: linear-gradient(135deg, #1a0a0a 0%, #3a1010 60%, #8b1a1a 100%);
}
.bank-card.verve {
  background: linear-gradient(135deg, #0a1a0a 0%, #1a3a1a 60%, #2d6a2d 100%);
}
.bank-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.bank-card::after {
  content: '';
  position: absolute;
  bottom: -80px; left: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,.03);
}
.bank-card-top { display: flex; align-items: center; justify-content: space-between; position: relative; z-index: 1; }
.bank-card-chip {
  width: 36px; height: 28px;
  background: linear-gradient(135deg, #d4a017, #f5c842, #b8860b);
  border-radius: 5px;
  position: relative;
  overflow: hidden;
}
.bank-card-chip::before {
  content: '';
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px; background: rgba(0,0,0,.3);
  transform: translateY(-50%);
}
.bank-card-chip::after {
  content: '';
  position: absolute;
  left: 50%; top: 0; bottom: 0;
  width: 1px; background: rgba(0,0,0,.3);
  transform: translateX(-50%);
}
.bank-card-nfc {
  color: rgba(255,255,255,.6);
}
.bank-card-middle { position: relative; z-index: 1; }
.bank-card-number {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: 3px;
  color: rgba(255,255,255,.92);
  font-family: 'Courier New', monospace;
}
.bank-card-bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.bank-card-label { font-size: 9px; color: rgba(255,255,255,.5); letter-spacing: .8px; text-transform: uppercase; margin-bottom: 2px; }
.bank-card-holder { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); letter-spacing: .5px; text-transform: uppercase; }
.bank-card-expiry { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); }
.bank-card-network { height: 36px; }
.bank-card-frozen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  gap: 8px;
  color: var(--text2);
  font-size: 14px;
  font-weight: 600;
  backdrop-filter: blur(2px);
}
.bank-card-sm { width: 100%; max-width: 280px; height: 170px; padding: 18px; }
.bank-card-sm .bank-card-number { font-size: 14px; letter-spacing: 2px; }
.bank-card-sm .bank-card-holder { font-size: 11px; }
.bank-card-sm .bank-card-network { height: 26px; }

/* ── Tables ──────────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  background: var(--surface2);
  padding: 11px 14px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .6px;
  text-transform: uppercase;
  color: var(--text3);
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  color: var(--text2);
}
tbody tr:last-child td { border-bottom: none; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--surface2); }
tbody tr:hover td { color: var(--text); }
.td-primary { color: var(--text) !important; font-weight: 600; }
.td-mono { font-family: 'Courier New', monospace; font-size: 12px; color: var(--text3); }

/* ── Badges / Pills ──────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .3px;
  white-space: nowrap;
}
.badge-green  { background: var(--emerald-xs);  color: var(--emerald-lt); border: 1px solid rgba(16,185,129,.2); }
.badge-red    { background: var(--red-xs);       color: #fca5a5;           border: 1px solid rgba(239,68,68,.2); }
.badge-amber  { background: var(--amber-xs);     color: #fcd34d;           border: 1px solid rgba(245,158,11,.2); }
.badge-blue   { background: var(--blue-xs);      color: #93c5fd;           border: 1px solid rgba(59,130,246,.2); }
.badge-grey   { background: rgba(90,122,101,.12); color: var(--text3);     border: 1px solid rgba(90,122,101,.2); }
.badge-dot::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
}

/* ── Buttons ─────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all var(--transition);
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: var(--emerald);
  color: var(--text-inv);
}
.btn-primary:hover:not(:disabled) { background: var(--emerald-lt); color: var(--text-inv); box-shadow: 0 0 16px var(--emerald-glow); }
.btn-secondary {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface3); color: var(--text); }
.btn-danger {
  background: var(--red-xs);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.2);
}
.btn-danger:hover:not(:disabled) { background: var(--red); color: #fff; }
.btn-ghost { background: transparent; color: var(--text2); }
.btn-ghost:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  aspect-ratio: 1;
}

/* ── Forms ───────────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text2);
  margin-bottom: 6px;
  letter-spacing: .3px;
  text-transform: uppercase;
}
.form-control {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
  font-family: inherit;
}
.form-control::placeholder { color: var(--text3); }
.form-control:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.form-control:disabled { opacity: .5; cursor: not-allowed; }
select.form-control { appearance: none; cursor: pointer; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 5px; }
.form-error { font-size: 11px; color: var(--red); margin-top: 5px; }
.form-row { display: grid; grid-template-columns: repeat(2,1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 16px; }

/* ── Input with icon ─────────────────────────────────────────────────────────── */
.input-group { position: relative; }
.input-group .form-control { padding-left: 40px; }
.input-group-icon {
  position: absolute;
  left: 12px; top: 50%;
  transform: translateY(-50%);
  color: var(--text3);
  pointer-events: none;
}
.input-group-right { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); }

/* ── Modals ──────────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  backdrop-filter: blur(4px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition);
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  transform: scale(.95) translateY(10px);
  transition: transform var(--transition);
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-lg { max-width: 720px; }
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
}
.modal-title { font-size: 16px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* ── Alert / Toast ───────────────────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.alert-success { background: var(--emerald-xs); color: var(--emerald-lt); border: 1px solid rgba(16,185,129,.2); }
.alert-error   { background: var(--red-xs);     color: #fca5a5;           border: 1px solid rgba(239,68,68,.2); }
.alert-info    { background: var(--blue-xs);    color: #93c5fd;           border: 1px solid rgba(59,130,246,.2); }
.alert-warning { background: var(--amber-xs);   color: #fcd34d;           border: 1px solid rgba(245,158,11,.2); }
.alert:empty, .alert[style*="display:none"], .alert:not([class*="-"]) { display: none; }

/* Toast container */
#toast-container {
  position: fixed;
  bottom: 24px; right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}
.toast {
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13.5px;
  min-width: 260px;
  max-width: 360px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 10px;
  animation: toast-in .25s ease;
  pointer-events: all;
}
.toast.success { border-left: 3px solid var(--emerald); }
.toast.error   { border-left: 3px solid var(--red); }
.toast.info    { border-left: 3px solid var(--blue); }
@keyframes toast-in { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ── Pagination ──────────────────────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
  padding: 16px;
}
.pagination-btn {
  width: 34px; height: 34px;
  border-radius: var(--radius-sm);
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--text2);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  transition: all var(--transition);
}
.pagination-btn:hover { background: var(--surface3); color: var(--text); }
.pagination-btn.active { background: var(--emerald); color: var(--text-inv); border-color: var(--emerald); }
.pagination-btn:disabled { opacity: .35; cursor: not-allowed; }
.pagination-info { font-size: 12px; color: var(--text3); }

/* ── Transaction Items ───────────────────────────────────────────────────────── */
.txn-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.txn-icon.credit { background: var(--emerald-xs); color: var(--emerald); }
.txn-icon.debit  { background: var(--red-xs);     color: var(--red); }
.txn-icon.transfer { background: var(--blue-xs);  color: var(--blue); }
.txn-icon.fee    { background: var(--amber-xs);   color: var(--amber); }
.txn-desc { flex: 1; }
.txn-title { font-size: 13.5px; font-weight: 600; }
.txn-sub   { font-size: 11px; color: var(--text3); margin-top: 2px; }
.txn-amount { text-align: right; }
.txn-amount .credit-amt { color: var(--emerald-lt); font-weight: 700; font-size: 14px; }
.txn-amount .debit-amt  { color: #fca5a5; font-weight: 700; font-size: 14px; }
.txn-ref { font-size: 10px; color: var(--text3); margin-top: 2px; font-family: monospace; }

/* ── Notification Item ───────────────────────────────────────────────────────── */
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
  cursor: pointer;
}
.notif-item:hover { background: var(--surface2); }
.notif-item.unread { background: var(--emerald-xs); }
.notif-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  flex-shrink: 0;
  margin-top: 6px;
}
.notif-dot.read { background: transparent; border: 1px solid var(--border2); }
.notif-title { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.notif-msg { font-size: 12px; color: var(--text3); line-height: 1.4; }
.notif-time { font-size: 10px; color: var(--text3); margin-top: 4px; }

/* ── Search & Filter Bar ─────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.filter-bar .form-control { max-width: 220px; padding: 8px 12px; font-size: 13px; }
.filter-bar select.form-control { max-width: 140px; }

/* ── Empty state ─────────────────────────────────────────────────────────────── */
.empty-state {
  padding: 60px 20px;
  text-align: center;
  color: var(--text3);
}
.empty-state svg { opacity: .3; margin-bottom: 16px; }
.empty-state h3 { font-size: 16px; color: var(--text2); margin-bottom: 6px; }
.empty-state p { font-size: 13px; }

/* ── Loading skeleton ────────────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface2) 25%, var(--surface3) 50%, var(--surface2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s infinite;
  border-radius: 6px;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skeleton-row { height: 48px; margin-bottom: 4px; }

/* ── Login page ──────────────────────────────────────────────────────────────── */
.login-bg {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(ellipse at 20% 50%, rgba(16,185,129,.07) 0%, transparent 60%),
    radial-gradient(ellipse at 80% 20%, rgba(16,185,129,.05) 0%, transparent 50%),
    var(--bg);
  padding: 24px;
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center;
  margin-bottom: 32px;
}
.login-logo-icon {
  width: 56px; height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--emerald-dk), var(--emerald));
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  box-shadow: 0 0 24px var(--emerald-glow);
}
.login-brand { font-size: 26px; font-weight: 800; letter-spacing: -.5px; }
.login-brand span { color: var(--emerald); }
.login-tagline { font-size: 13px; color: var(--text3); margin-top: 4px; }
.login-error {
  background: var(--red-xs);
  border: 1px solid rgba(239,68,68,.2);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  margin-bottom: 16px;
  display: none;
}
.login-divider {
  text-align: center;
  color: var(--text3);
  font-size: 12px;
  margin: 8px 0;
}

/* ── Topbar notification bell ────────────────────────────────────────────────── */
.notif-bell {
  position: relative;
  cursor: pointer;
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--text2);
  transition: background var(--transition);
}
.notif-bell:hover { background: var(--surface2); color: var(--text); }
.notif-count {
  position: absolute;
  top: 4px; right: 4px;
  width: 16px; height: 16px;
  background: var(--red);
  border-radius: 50%;
  font-size: 9px;
  font-weight: 700;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  border: 2px solid var(--surface);
}

/* ── Balance visibility toggle ───────────────────────────────────────────────── */
.balance-hidden { filter: blur(8px); user-select: none; }

/* ── Progress / meter bar ────────────────────────────────────────────────────── */
.meter-bar {
  height: 6px;
  background: var(--surface3);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 8px;
}
.meter-fill {
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--emerald-dk), var(--emerald-lt));
  transition: width .5s ease;
}

/* ── Tier badge ──────────────────────────────────────────────────────────────── */
.tier-bronze  { color: #cd7f32; background: rgba(205,127,50,.12); border: 1px solid rgba(205,127,50,.25); }
.tier-silver  { color: #c0c0c0; background: rgba(192,192,192,.1); border: 1px solid rgba(192,192,192,.2); }
.tier-gold    { color: #ffd700; background: rgba(255,215,0,.1);   border: 1px solid rgba(255,215,0,.25); }
.tier-platinum{ color: #e5e4e2; background: rgba(229,228,226,.08);border: 1px solid rgba(229,228,226,.2); }

/* ── Quick action buttons ────────────────────────────────────────────────────── */
.quick-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.quick-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 80px;
  max-width: 120px;
  padding: 16px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
  text-decoration: none;
}
.quick-action:hover {
  border-color: var(--emerald);
  background: var(--emerald-xs);
  color: var(--emerald-lt);
}
.quick-action-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--emerald-xs);
  display: flex; align-items: center; justify-content: center;
  color: var(--emerald);
}
.quick-action span { font-size: 11px; font-weight: 600; color: var(--text2); }
.quick-action:hover span { color: var(--emerald-lt); }
.quick-action:hover .quick-action-icon { background: rgba(16,185,129,.2); }

/* ── Utilities ───────────────────────────────────────────────────────────────── */
.text-emerald { color: var(--emerald); }
.text-red     { color: var(--red); }
.text-amber   { color: var(--amber); }
.text-muted   { color: var(--text3); }
.text-sm      { font-size: 12px; }
.text-xs      { font-size: 11px; }
.text-lg      { font-size: 16px; }
.text-xl      { font-size: 20px; }
.font-bold    { font-weight: 700; }
.font-medium  { font-weight: 500; }
.mt-4         { margin-top: 4px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.mb-4         { margin-bottom: 4px; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.flex         { display: flex; }
.flex-col     { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.justify-end  { justify-content: flex-end; }
.flex-1       { flex: 1; }
.w-full       { width: 100%; }
.d-none       { display: none !important; }

/* ── Responsive ──────────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); width: 260px; }
  .main-content { margin-left: 0; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .form-row, .form-row-3 { grid-template-columns: 1fr; }
  .menu-toggle { display: flex !important; }
  .bank-card { width: 100%; max-width: 320px; }
}
.menu-toggle {
  display: none;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: none;
  border: none;
  color: var(--text2);
  cursor: pointer;
  margin-right: 8px;
}
.menu-toggle:hover { background: var(--surface2); color: var(--text); }

/* ── Spin animation ─────────────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .7s linear infinite; }

/* ── Chart container ─────────────────────────────────────────────────────────── */
.chart-wrap { position: relative; height: 220px; }
.chart-wrap-lg { height: 300px; }
