/* NexaBank — Main Stylesheet */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=DM+Sans:wght@300;400;500;600;700&display=swap');

:root {
  --navy:       #0A1628;
  --navy-light: #162844;
  --navy-mid:   #1E3A5F;
  --gold:       #C9A84C;
  --gold-light: #E8C96A;
  --gold-pale:  #FDF3DC;
  --slate:      #64748B;
  --slate-light:#94A3B8;
  --bg:         #F0F4F8;
  --bg-card:    #FFFFFF;
  --border:     #E2E8F0;
  --success:    #10B981;
  --danger:     #EF4444;
  --warning:    #F59E0B;
  --info:       #3B82F6;
  --text:       #1E293B;
  --text-light: #64748B;
  --sidebar-w:  260px;
  --radius:     12px;
  --shadow:     0 4px 20px rgba(0,0,0,.06);
  --shadow-lg:  0 10px 40px rgba(0,0,0,.12);
}

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

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
}

a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-light); }

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

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

/* ─── Sidebar ────────────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--navy);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
  overflow-y: auto;
}
.sidebar::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(201,168,76,.3), transparent);
}
.sidebar-brand {
  padding: 28px 24px 20px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-brand .brand-name {
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--gold);
  letter-spacing: 1px;
}
.sidebar-brand .brand-sub {
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
}
.sidebar-user {
  padding: 16px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-user .avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--navy); font-size: 13px;
  flex-shrink: 0;
}
.sidebar-user .user-info .name {
  font-size: 13px; font-weight: 600; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 150px;
}
.sidebar-user .user-info .acct {
  font-size: 11px; color: rgba(255,255,255,.4);
}
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-label {
  font-size: 10px; font-weight: 600;
  letter-spacing: 2px; text-transform: uppercase;
  color: rgba(255,255,255,.3);
  padding: 12px 12px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,.6);
  font-size: 14px; font-weight: 500;
  transition: all .2s;
  margin-bottom: 2px;
  cursor: pointer;
}
.nav-item:hover, .nav-item.active {
  background: rgba(201,168,76,.1);
  color: var(--gold);
}
.nav-item.active { background: rgba(201,168,76,.15); }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; }
.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid rgba(255,255,255,.06);
}

/* ─── Main Content ───────────────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
.topbar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  padding: 0 28px;
  height: 64px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 1px 0 var(--border);
}
.topbar-left { display: flex; align-items: center; gap: 16px; }
.page-title { font-size: 18px; font-weight: 700; color: var(--navy); }
.page-subtitle { font-size: 12px; color: var(--text-light); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.burger-btn {
  display: none;
  background: none; border: none;
  cursor: pointer; padding: 8px;
  color: var(--navy);
}
.page-body { padding: 28px; flex: 1; }

/* ─── Cards ──────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.card-header {
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: 15px; font-weight: 700; color: var(--navy); }
.card-body { padding: 22px; }

/* ─── Stat Cards ─────────────────────────────────────────────────── */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 18px; }
.stat-card {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 20px;
  display: flex; flex-direction: column; gap: 10px;
  position: relative; overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.stat-card.featured {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
  border-color: transparent;
}
.stat-card.featured .stat-label { color: rgba(255,255,255,.6); }
.stat-card.featured .stat-value { color: var(--gold); }
.stat-card.featured .stat-sub { color: rgba(255,255,255,.4); }
.stat-card::before {
  content: '';
  position: absolute;
  top: -20px; right: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: rgba(201,168,76,.06);
}
.stat-label { font-size: 12px; font-weight: 500; color: var(--text-light); text-transform: uppercase; letter-spacing: .8px; }
.stat-value { font-family: 'Playfair Display', serif; font-size: 26px; font-weight: 700; color: var(--navy); line-height: 1; }
.stat-sub { font-size: 12px; color: var(--text-light); }
.stat-icon {
  position: absolute; right: 18px; top: 18px;
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}
.stat-icon.gold { background: var(--gold-pale); color: var(--gold); }
.stat-icon.green { background: #D1FAE5; color: var(--success); }
.stat-icon.red { background: #FEE2E2; color: var(--danger); }
.stat-icon.blue { background: #EFF6FF; color: var(--info); }

/* ─── Balance Card (hero) ────────────────────────────────────────── */
.balance-card {
  background: linear-gradient(135deg, #0A1628 0%, #1E3A5F 50%, #0A1628 100%);
  border-radius: 20px;
  padding: 28px;
  color: #fff;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(201,168,76,.2);
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.15) 0%, transparent 70%);
}
.balance-card::after {
  content: '';
  position: absolute;
  bottom: -40px; left: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
}
.balance-label { font-size: 12px; letter-spacing: 2px; text-transform: uppercase; color: rgba(255,255,255,.5); margin-bottom: 8px; }
.balance-amount { font-family: 'Playfair Display', serif; font-size: 36px; font-weight: 700; color: var(--gold); margin-bottom: 4px; }
.balance-acct { font-size: 13px; color: rgba(255,255,255,.5); letter-spacing: 1px; }
.card-chip {
  width: 40px; height: 30px;
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  border-radius: 5px;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
}

/* ─── Transaction List ───────────────────────────────────────────── */
.txn-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.txn-item:last-child { border-bottom: none; }
.txn-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.txn-icon.credit { background: #D1FAE5; color: var(--success); }
.txn-icon.debit  { background: #FEE2E2; color: var(--danger); }
.txn-desc { flex: 1; min-width: 0; }
.txn-name { font-size: 14px; font-weight: 600; color: var(--navy); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-ref  { font-size: 12px; color: var(--text-light); }
.txn-amount { text-align: right; }
.txn-amount .amount { font-size: 14px; font-weight: 700; }
.txn-amount .date   { font-size: 11px; color: var(--text-light); }
.amount.credit { color: var(--success); }
.amount.debit  { color: var(--danger); }

/* ─── Forms ──────────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 13px; font-weight: 600; color: var(--navy); margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-left: 3px; }
.form-control {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.12); }
.form-control.error { border-color: var(--danger); }
.form-hint { font-size: 12px; color: var(--text-light); margin-top: 4px; }
.form-error { font-size: 12px; color: var(--danger); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
select.form-control { cursor: pointer; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ─── Buttons ────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: 8px;
  font-size: 14px; font-weight: 600;
  font-family: inherit;
  border: none; cursor: pointer;
  transition: all .2s;
  text-decoration: none;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-light));
  color: var(--navy);
}
.btn-primary:hover { filter: brightness(1.05); box-shadow: 0 4px 16px rgba(201,168,76,.4); color: var(--navy); }
.btn-navy {
  background: var(--navy);
  color: var(--gold);
  border: 1px solid rgba(201,168,76,.2);
}
.btn-navy:hover { background: var(--navy-light); color: var(--gold); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--text);
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 28px; font-size: 16px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { padding: 8px; border-radius: 8px; }

/* ─── Badges ─────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px;
  border-radius: 50px;
  font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .5px;
}
.badge-success { background: #D1FAE5; color: #065F46; }
.badge-danger  { background: #FEE2E2; color: #991B1B; }
.badge-warning { background: #FEF3C7; color: #92400E; }
.badge-info    { background: #EFF6FF; color: #1D4ED8; }
.badge-secondary { background: #F1F5F9; color: #475569; }

/* ─── Tables ─────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; }
.data-table thead tr { background: #F8FAFC; }
.data-table th {
  padding: 11px 14px; text-align: left;
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .8px;
  color: var(--text-light);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 14px;
  font-size: 13.5px;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: #FAFBFC; }

/* ─── Alert / Flash ──────────────────────────────────────────────── */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 18px;
}
.alert-success { background: #D1FAE5; color: #065F46; border: 1px solid #A7F3D0; }
.alert-danger  { background: #FEE2E2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FEF3C7; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1D4ED8; border: 1px solid #BFDBFE; }

/* ─── Modal ──────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(10,22,40,.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: #fff;
  border-radius: 16px;
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
  transform: scale(.95) translateY(10px);
  transition: transform .25s;
}
.modal-overlay.open .modal { transform: scale(1) translateY(0); }
.modal-header {
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 17px; font-weight: 700; color: var(--navy); }
.modal-close { background: none; border: none; cursor: pointer; color: var(--text-light); font-size: 22px; line-height: 1; }
.modal-body { padding: 22px 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 10px; justify-content: flex-end; }

/* ─── PIN Input ──────────────────────────────────────────────────── */
.pin-inputs { display: flex; gap: 10px; justify-content: center; }
.pin-input {
  width: 48px; height: 56px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 22px; font-weight: 700;
  text-align: center;
  outline: none;
  transition: border-color .2s;
}
.pin-input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,.15); }

/* ─── Auth Pages ─────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
}
.auth-left {
  width: 45%;
  background: linear-gradient(135deg, #0A1628 0%, #1E3A5F 100%);
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 60px 50px;
  position: relative; overflow: hidden;
}
.auth-left::before {
  content: '';
  position: absolute;
  top: -100px; right: -100px;
  width: 350px; height: 350px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.12) 0%, transparent 70%);
}
.auth-left::after {
  content: '';
  position: absolute; bottom: -60px; left: -60px;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,.08) 0%, transparent 70%);
}
.auth-right {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 40px;
  background: var(--bg);
}
.auth-box {
  background: #fff;
  border-radius: 20px;
  padding: 40px;
  width: 100%; max-width: 440px;
  box-shadow: var(--shadow-lg);
}
.auth-brand { font-family: 'Playfair Display', serif; font-size: 36px; color: var(--gold); letter-spacing: 2px; }
.auth-tagline { color: rgba(255,255,255,.5); font-size: 14px; margin-top: 6px; }
.auth-features { margin-top: 48px; }
.auth-feature {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px;
  color: rgba(255,255,255,.7);
  font-size: 14px;
}
.auth-feature-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: rgba(201,168,76,.1);
  border: 1px solid rgba(201,168,76,.2);
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; flex-shrink: 0;
}

/* ─── Quick Actions ──────────────────────────────────────────────── */
.quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quick-action {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 10px;
  border-radius: var(--radius);
  border: 1.5px solid var(--border);
  background: #fff;
  cursor: pointer;
  transition: all .2s;
  text-align: center;
}
.quick-action:hover {
  border-color: var(--gold);
  background: var(--gold-pale);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(201,168,76,.2);
}
.quick-action-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gold-pale);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  transition: background .2s;
}
.quick-action:hover .quick-action-icon { background: var(--gold); }
.quick-action-label { font-size: 12px; font-weight: 600; color: var(--text); }

/* ─── Notification bell ──────────────────────────────────────────── */
.notif-btn {
  position: relative;
  background: none; border: none;
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text);
  transition: background .2s;
}
.notif-btn:hover { background: var(--bg); }
.notif-badge {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #fff;
}

/* ─── Progress bar ───────────────────────────────────────────────── */
.progress { height: 6px; background: var(--border); border-radius: 3px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--gold-light)); transition: width .5s ease; }

/* ─── Tabs ───────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.tab-btn {
  padding: 10px 18px;
  font-size: 14px; font-weight: 500;
  color: var(--text-light);
  background: none; border: none;
  border-bottom: 2px solid transparent;
  cursor: pointer;
  transition: all .2s;
  font-family: inherit;
  margin-bottom: -1px;
}
.tab-btn:hover { color: var(--navy); }
.tab-btn.active { color: var(--gold); border-bottom-color: var(--gold); font-weight: 700; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ─── Pagination ─────────────────────────────────────────────────── */
.pagination { display: flex; gap: 6px; align-items: center; justify-content: center; padding: 16px 0; }
.page-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
  border: 1.5px solid var(--border);
  background: #fff; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: all .2s;
}
.page-btn:hover, .page-btn.active {
  background: var(--gold); color: var(--navy); border-color: var(--gold);
}

/* ─── Empty state ────────────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--text-light);
}
.empty-state .empty-icon { font-size: 48px; margin-bottom: 14px; }
.empty-state h3 { font-size: 16px; color: var(--navy); margin-bottom: 6px; }
.empty-state p { font-size: 14px; }

/* ─── Loading ────────────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(10,22,40,.15);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin .6s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .form-row-3 { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .burger-btn { display: flex; }
  .auth-left { display: none; }
  .auth-right { padding: 20px; }
  .auth-box { padding: 28px 22px; }
  .form-row { grid-template-columns: 1fr; }
  .form-row-3 { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .page-body { padding: 18px; }
  .balance-amount { font-size: 28px; }
  .quick-actions { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .quick-action { padding: 12px 6px; }
  .quick-action-icon { width: 36px; height: 36px; font-size: 18px; }
  .quick-action-label { font-size: 11px; }
  .modal { max-width: 100%; }
  .overlay-sidebar {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
    display: none;
  }
  .overlay-sidebar.show { display: block; }
}

@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  .data-table td, .data-table th { padding: 10px 10px; font-size: 12px; }
}
