/* ============================================================
   NexaBank — Global Stylesheet
   Premium Digital Banking Platform
   ============================================================ */

/* ── Google Fonts ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700&display=swap');

/* ── CSS Custom Properties ── */
:root {
  /* Brand Colors */
  --primary:        #2563EB;
  --primary-dark:   #1D4ED8;
  --primary-light:  #3B82F6;
  --accent:         #06B6D4;
  --accent-dark:    #0891B2;

  /* Semantic */
  --success:  #10B981;
  --warning:  #F59E0B;
  --danger:   #EF4444;
  --info:     #6366F1;

  /* Light Theme */
  --bg:           #F8FAFC;
  --bg-secondary: #F1F5F9;
  --surface:      #FFFFFF;
  --surface-2:    #F8FAFC;
  --border:       #E2E8F0;
  --border-2:     #CBD5E1;
  --text:         #0F172A;
  --text-2:       #475569;
  --text-3:       #94A3B8;

  /* Typography */
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-brand: 'Space Grotesk', sans-serif;

  /* Shadows */
  --shadow-xs: 0 1px 2px rgba(0,0,0,.05);
  --shadow-sm: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.1), 0 10px 10px rgba(0,0,0,.04);
  --shadow-glow: 0 0 40px rgba(37,99,235,.25);
  --shadow-glow-accent: 0 0 40px rgba(6,182,212,.25);

  /* Radius */
  --radius-sm:  6px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-full: 9999px;

  /* Transitions */
  --transition: 200ms cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 400ms cubic-bezier(0.4,0,0.2,1);
}

/* ── Dark Theme ── */
[data-theme="dark"] {
  --bg:           #0F172A;
  --bg-secondary: #1E293B;
  --surface:      #1E293B;
  --surface-2:    #334155;
  --border:       #334155;
  --border-2:     #475569;
  --text:         #F1F5F9;
  --text-2:       #94A3B8;
  --text-3:       #64748B;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md: 0 4px 6px rgba(0,0,0,.4), 0 2px 4px rgba(0,0,0,.3);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.5), 0 4px 6px rgba(0,0,0,.3);
  --shadow-xl: 0 20px 25px rgba(0,0,0,.5), 0 10px 10px rgba(0,0,0,.3);
}

/* ── Base Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  transition: background var(--transition-slow), color var(--transition-slow);
  min-height: 100vh;
  overflow-x: hidden;
}

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

/* ── Typography ── */
h1,h2,h3,h4,h5,h6 { font-family: var(--font-brand); font-weight: 700; line-height: 1.2; }
p { line-height: 1.7; color: var(--text-2); }
a { color: var(--primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--primary-dark); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition), border-color var(--transition);
}
.card:hover { box-shadow: var(--shadow-lg); }
.card-hover:hover { transform: translateY(-2px); }
.card-glass {
  background: rgba(255,255,255,.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255,255,255,.12);
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: .875rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  outline: none;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-primary {
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 15px rgba(37,99,235,.3);
}
.btn-primary:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 20px rgba(37,99,235,.4);
  transform: translateY(-1px);
}
.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 4px 15px rgba(6,182,212,.3);
}
.btn-accent:hover { background: var(--accent-dark); transform: translateY(-1px); }
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-2);
  color: var(--text);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(37,99,235,.06);
}
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-secondary); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-success { background: var(--success); color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .8125rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-xl { padding: 18px 36px; font-size: 1.0625rem; border-radius: var(--radius-xl); }
.btn-icon { padding: 10px; }

/* ── Badge ── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600; line-height: 1.4;
}
.badge-primary  { background: rgba(37,99,235,.12);  color: var(--primary); }
.badge-success  { background: rgba(16,185,129,.12); color: var(--success); }
.badge-warning  { background: rgba(245,158,11,.12); color: var(--warning); }
.badge-danger   { background: rgba(239,68,68,.12);  color: var(--danger); }
.badge-info     { background: rgba(99,102,241,.12); color: var(--info); }
.badge-neutral  { background: var(--bg-secondary);  color: var(--text-2); }

/* ── Form Controls ── */
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label { font-size: .875rem; font-weight: 500; color: var(--text); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 11px 16px;
  background: var(--bg-secondary);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: .9375rem;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  outline: none;
}
.form-input::placeholder { color: var(--text-3); }
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px rgba(37,99,235,.1);
}
.form-input-icon { position: relative; }
.form-input-icon .form-input { padding-left: 44px; }
.form-input-icon .input-icon {
  position: absolute; left: 14px; top: 50%;
  transform: translateY(-50%); color: var(--text-3);
  pointer-events: none; font-size: 1.1rem;
}
.form-hint { font-size: .8125rem; color: var(--text-3); }
.form-error { font-size: .8125rem; color: var(--danger); }

/* ── Toggle Switch ── */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
  position: absolute; inset: 0;
  background: var(--border-2);
  border-radius: var(--radius-full);
  transition: background var(--transition);
  cursor: pointer;
}
.toggle-slider::before {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  left: 3px; top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform var(--transition);
  box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* ── Navigation ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: 68px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  transition: background var(--transition-slow), border-color var(--transition-slow), box-shadow var(--transition);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.navbar.scrolled { box-shadow: var(--shadow-md); }
.navbar-brand {
  font-family: var(--font-brand);
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text);
  display: flex; align-items: center; gap: 10px;
}
.navbar-brand .logo-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 10px;
  display: grid; place-items: center;
  color: #fff; font-size: 1.1rem;
}

/* ── Sidebar (Dashboard/Admin) ── */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: 260px; z-index: 50;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  transition: transform var(--transition-slow), background var(--transition-slow);
  overflow-y: auto;
}
.sidebar-collapsed { transform: translateX(-260px); }
.sidebar-logo {
  height: 68px; display: flex; align-items: center;
  padding: 0 20px; border-bottom: 1px solid var(--border);
  font-family: var(--font-brand); font-size: 1.25rem; font-weight: 700;
  gap: 10px; flex-shrink: 0;
}
.sidebar-nav { flex: 1; padding: 16px 12px; overflow-y: auto; }
.nav-section { margin-bottom: 24px; }
.nav-section-label {
  font-size: .6875rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-3);
  padding: 0 8px; margin-bottom: 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-2); font-size: .9rem; font-weight: 500;
  cursor: pointer; transition: all var(--transition);
  text-decoration: none; position: relative;
}
.nav-item:hover { background: var(--bg-secondary); color: var(--text); }
.nav-item.active {
  background: rgba(37,99,235,.1);
  color: var(--primary);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 3px; height: 20px;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}
.nav-item .nav-icon { font-size: 1.2rem; flex-shrink: 0; }
.nav-badge {
  margin-left: auto;
  min-width: 20px; height: 20px; padding: 0 5px;
  background: var(--primary);
  color: #fff; font-size: .7rem; font-weight: 700;
  border-radius: var(--radius-full);
  display: grid; place-items: center;
}
.sidebar-footer { padding: 16px; border-top: 1px solid var(--border); }

/* ── Dashboard Layout ── */
.app-layout {
  display: flex; min-height: 100vh;
}
.app-main {
  flex: 1; margin-left: 260px;
  transition: margin var(--transition-slow);
  min-height: 100vh;
  display: flex; flex-direction: column;
}
.app-header {
  height: 68px; flex-shrink: 0;
  display: flex; align-items: center;
  padding: 0 28px; gap: 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 40;
}
.app-content { flex: 1; padding: 28px; overflow-x: hidden; }

/* ── Stat Cards ── */
.stat-card {
  padding: 16px;
  position: relative; overflow: hidden;
}
.stat-card .stat-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  font-size: 1.2rem; margin-bottom: 10px;
}
.stat-card .stat-value {
  font-family: var(--font-brand);
  font-size: 1.25rem; font-weight: 700;
  color: var(--text); line-height: 1;
  margin-bottom: 4px;
  word-break: break-all;
}
.stat-card .stat-label {
  font-size: .75rem; color: var(--text-2); font-weight: 500;
}
.stat-card .stat-change {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .75rem; font-weight: 600;
  margin-top: 6px;
}
.stat-card .stat-change.positive { color: var(--success); }
.stat-card .stat-change.negative { color: var(--danger); }
.stat-card .stat-bg {
  position: absolute; right: -20px; bottom: -20px;
  font-size: 5rem; opacity: .07;
  pointer-events: none;
}
@media (min-width: 640px) {
  .stat-card { padding: 24px; }
  .stat-card .stat-icon { width: 48px; height: 48px; font-size: 1.4rem; margin-bottom: 16px; }
  .stat-card .stat-value { font-size: 1.875rem; margin-bottom: 6px; word-break: normal; }
  .stat-card .stat-label { font-size: .875rem; }
  .stat-card .stat-change { font-size: .8125rem; margin-top: 8px; }
  .stat-card .stat-bg { font-size: 7rem; }
}

/* ── Debit Card ── */
.bank-card {
  width: 340px; max-width: 100%;
  aspect-ratio: 1.586/1;
  border-radius: 20px;
  padding: 28px;
  position: relative; overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, #1D4ED8 0%, #0891B2 50%, #0F172A 100%);
  box-shadow: 0 20px 60px rgba(29,78,216,.4);
  user-select: none;
}
.bank-card.card-dark {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 60%, #334155 100%);
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.bank-card.card-gold {
  background: linear-gradient(135deg, #78350F 0%, #D97706 50%, #FEF3C7 100%);
  box-shadow: 0 20px 60px rgba(217,119,6,.4);
}
.bank-card::before {
  content: '';
  position: absolute; top: -60px; right: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
}
.bank-card::after {
  content: '';
  position: absolute; bottom: -80px; left: -40px;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
}
.card-chip {
  width: 40px; height: 30px;
  background: linear-gradient(135deg, #FFD700, #FFA500);
  border-radius: 6px; margin-bottom: 20px;
  position: relative; z-index: 1;
}
.card-number {
  font-size: 1.125rem; letter-spacing: .15em;
  font-family: 'Space Grotesk', monospace;
  margin-bottom: 16px;
  position: relative; z-index: 1;
}
.card-footer {
  display: flex; justify-content: space-between; align-items: flex-end;
  position: relative; z-index: 1;
}
.card-label { font-size: .625rem; text-transform: uppercase; letter-spacing: .1em; opacity: .7; }
.card-value { font-size: .9375rem; font-weight: 600; }
.card-network {
  display: flex; gap: -4px; align-items: center;
  position: absolute; top: 24px; right: 24px; z-index: 1;
}
.card-network .circle {
  width: 32px; height: 32px;
  border-radius: 50%; opacity: .8;
}
.card-network .circle:first-child { background: #EB001B; margin-right: -10px; }
.card-network .circle:last-child  { background: #F79E1B; }

/* ── Transaction List ── */
.tx-item {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: grid; place-items: center;
  font-size: 1.2rem; flex-shrink: 0;
}
.tx-info { flex: 1; min-width: 0; }
.tx-name { font-size: .9375rem; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { font-size: .8125rem; color: var(--text-3); margin-top: 2px; }
.tx-amount { font-size: 1rem; font-weight: 700; white-space: nowrap; }
.tx-amount.credit { color: var(--success); }
.tx-amount.debit  { color: var(--text); }

/* ── Progress Bar ── */
.progress { height: 8px; background: var(--bg-secondary); border-radius: var(--radius-full); overflow: hidden; }
.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width .8s cubic-bezier(0.4,0,0.2,1);
}
.progress-bar.success { background: linear-gradient(90deg, var(--success), #34D399); }
.progress-bar.warning { background: linear-gradient(90deg, var(--warning), #FCD34D); }
.progress-bar.danger  { background: linear-gradient(90deg, var(--danger), #F87171); }

/* ── Notification Toast ── */
#toast-container {
  position: fixed; top: 80px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
  max-width: 380px; width: calc(100% - 40px);
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  animation: toastIn .3s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
}
.toast.removing { animation: toastOut .25s ease-in forwards; }
.toast-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 1px; }
.toast-body .toast-title { font-size: .9375rem; font-weight: 600; color: var(--text); }
.toast-body .toast-msg  { font-size: .8125rem; color: var(--text-2); margin-top: 2px; }
.toast-close {
  position: absolute; top: 12px; right: 12px;
  background: none; border: none; cursor: pointer;
  color: var(--text-3); font-size: 1rem;
  transition: color var(--transition); padding: 2px;
}
.toast-close:hover { color: var(--text); }
.toast-progress {
  position: absolute; bottom: 0; left: 0; height: 3px;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  animation: progressBar 4s linear forwards;
}
.toast-success { border-left: 3px solid var(--success); }
.toast-success .toast-icon { color: var(--success); }
.toast-success .toast-progress { background: var(--success); }
.toast-error   { border-left: 3px solid var(--danger); }
.toast-error .toast-icon { color: var(--danger); }
.toast-error .toast-progress { background: var(--danger); }
.toast-warning { border-left: 3px solid var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-warning .toast-progress { background: var(--warning); }
.toast-info    { border-left: 3px solid var(--primary); }
.toast-info .toast-icon { color: var(--primary); }
.toast-info .toast-progress { background: var(--primary); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(100%) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes toastOut {
  to { opacity: 0; transform: translateX(110%); max-height: 0; margin: 0; padding: 0; }
}
@keyframes progressBar {
  from { width: 100%; }
  to   { width: 0%; }
}

/* ── Skeleton Loader ── */
.skeleton {
  background: linear-gradient(90deg, var(--bg-secondary) 25%, var(--border) 50%, var(--bg-secondary) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-md);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── Modal ── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fadeIn .2s ease;
}
.modal-overlay.hidden { display: none; }
.modal-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 480px;
  max-height: 90vh; overflow-y: auto;
  animation: modalIn .3s cubic-bezier(0.34,1.2,0.64,1);
}
.modal-header {
  padding: 24px 24px 0;
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1.1875rem; font-weight: 700; color: var(--text); }
.modal-body  { padding: 20px 24px; }
.modal-footer { padding: 0 24px 24px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(20px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Table ── */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th {
  text-align: left; padding: 12px 16px;
  font-size: .8125rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 14px 16px;
  font-size: .9rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-2);
  transition: background var(--transition);
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover td { background: var(--bg-secondary); }
.data-table .col-primary { color: var(--text); font-weight: 600; }

/* ── Tabs ── */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); }
.tab-btn {
  padding: 12px 20px;
  font-size: .9rem; font-weight: 600;
  color: var(--text-3); background: none; border: none;
  cursor: pointer; transition: all var(--transition);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }
.tab-content { display: none; padding-top: 24px; }
.tab-content.active { display: block; }

/* ── Dropdown ── */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 200px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  padding: 6px;
  z-index: 100;
  animation: dropdownIn .2s cubic-bezier(0.34,1.2,0.64,1);
}
.dropdown-menu.hidden { display: none; }
.dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  font-size: .9rem; color: var(--text-2);
  cursor: pointer; transition: background var(--transition);
  text-decoration: none;
}
.dropdown-item:hover { background: var(--bg-secondary); color: var(--text); }
.dropdown-item.danger:hover { background: rgba(239,68,68,.08); color: var(--danger); }
.dropdown-divider { height: 1px; background: var(--border); margin: 6px 0; }
@keyframes dropdownIn {
  from { opacity: 0; transform: translateY(-6px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Hero Gradient Background ── */
.hero-bg {
  background: linear-gradient(135deg, #0F172A 0%, #1E293B 40%, #0C2461 100%);
  position: relative; overflow: hidden;
}
.hero-bg::before {
  content: '';
  position: absolute; top: -50%; right: -20%;
  width: 70%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(37,99,235,.3) 0%, transparent 70%);
  pointer-events: none;
}
.hero-bg::after {
  content: '';
  position: absolute; bottom: -30%; left: -10%;
  width: 50%; aspect-ratio: 1;
  background: radial-gradient(circle, rgba(6,182,212,.2) 0%, transparent 70%);
  pointer-events: none;
}

/* ── Gradient Text ── */
.gradient-text {
  background: linear-gradient(135deg, #60A5FA, #06B6D4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.gradient-text-gold {
  background: linear-gradient(135deg, #FBBF24, #F59E0B);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Animated Gradient Border ── */
.gradient-border {
  position: relative;
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.gradient-border::before {
  content: '';
  position: absolute; inset: -1px;
  border-radius: calc(var(--radius-lg) + 1px);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  z-index: -1;
}

/* ── Animated Counter ── */
.counter { font-variant-numeric: tabular-nums; }

/* ── Feature Icon ── */
.feature-icon {
  width: 56px; height: 56px;
  border-radius: var(--radius-lg);
  display: grid; place-items: center;
  font-size: 1.6rem; margin-bottom: 20px;
}

/* ── Section Header ── */
.section-tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 14px;
  background: rgba(37,99,235,.1);
  border: 1px solid rgba(37,99,235,.2);
  border-radius: var(--radius-full);
  font-size: .8125rem; font-weight: 600;
  color: var(--primary); margin-bottom: 16px;
}

/* ── Responsive Grid Helpers ── */
.grid-auto-fit  { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px,1fr)); gap: 24px; }
.grid-auto-fill { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px,1fr)); gap: 20px; }

/* ── Chart Container ── */
.chart-container { position: relative; width: 100%; }

/* ── Scrollable Table Wrapper ── */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* ── Pulse Animation ── */
.pulse { animation: pulse 2s infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .5; }
}

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

/* ── Fade-In On Scroll ── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left  { opacity: 0; transform: translateX(-30px); transition: opacity .6s ease, transform .6s ease; }
.reveal-right { opacity: 0; transform: translateX(30px); transition: opacity .6s ease, transform .6s ease; }
.reveal-left.visible,
.reveal-right.visible { opacity: 1; transform: translateX(0); }

/* ── Status Dots ── */
.status-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
}
.status-dot.online  { background: var(--success); box-shadow: 0 0 0 3px rgba(16,185,129,.2); }
.status-dot.offline { background: var(--text-3); }
.status-dot.warning { background: var(--warning); box-shadow: 0 0 0 3px rgba(245,158,11,.2); }
.status-dot.danger  { background: var(--danger);  box-shadow: 0 0 0 3px rgba(239,68,68,.2); }

/* ── Avatar ── */
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; font-size: .875rem;
  flex-shrink: 0; overflow: hidden;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.avatar-xl { width: 72px; height: 72px; font-size: 1.375rem; }

/* ── Page Header ── */
.page-header { margin-bottom: 28px; }
.page-title  { font-size: 1.75rem; font-weight: 800; color: var(--text); }
.page-subtitle { font-size: .9375rem; color: var(--text-2); margin-top: 4px; }

/* ── Empty State ── */
.empty-state {
  text-align: center; padding: 60px 24px;
}
.empty-state .empty-icon {
  font-size: 4rem; margin-bottom: 16px;
  opacity: .3;
}
.empty-state h3 { font-size: 1.125rem; font-weight: 600; color: var(--text); margin-bottom: 8px; }
.empty-state p  { font-size: .9rem; color: var(--text-3); max-width: 320px; margin: 0 auto; }

/* ── Public Footer ── */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

/* ── Utility ── */
.divider { height: 1px; background: var(--border); }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.no-select { user-select: none; }
.pointer { cursor: pointer; }

/* ── Nav Group / Collapsible Submenu ── */
.nav-group-toggle {
  background: none; border: none;
  font-family: var(--font-sans); font-size: .9rem; font-weight: 500;
  color: var(--text-2); cursor: pointer; width: 100%;
}
.nav-group-toggle:hover { background: var(--bg-secondary); color: var(--text); }
.nav-chevron { margin-left: auto; font-size: 1rem; transition: transform var(--transition); flex-shrink: 0; color: var(--text-3); }
.nav-sub { overflow: hidden; max-height: 0; transition: max-height .35s cubic-bezier(0.4,0,0.2,1); }
.nav-sub.open { max-height: 240px; }
.nav-sub-item { padding-left: 44px !important; font-size: .85rem !important; }
.nav-sub-item.active::before { display: block; }

/* ── Auth Layout ── */
.auth-wrap { min-height: 100vh; display: flex; }
.auth-brand-panel {
  width: 440px; flex-shrink: 0;
  background: linear-gradient(150deg, #0F172A 0%, #0C2461 50%, #1E293B 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column;
  padding: 48px 40px; color: #fff;
}
.auth-brand-panel::before {
  content: ''; position: absolute; top: -100px; right: -100px;
  width: 400px; height: 400px; border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.35) 0%, transparent 70%);
}
.auth-brand-panel::after {
  content: ''; position: absolute; bottom: -80px; left: -80px;
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(6,182,212,.2) 0%, transparent 70%);
}
.auth-form-panel {
  flex: 1; display: flex; align-items: center;
  justify-content: center; padding: 40px 24px;
  background: var(--bg);
}
.auth-card { width: 100%; max-width: 440px; }
@media (max-width: 900px) { .auth-brand-panel { display: none; } }

/* ── OTP Input ── */
.otp-input {
  width: 52px; height: 60px; text-align: center;
  font-size: 1.5rem; font-weight: 700;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--bg-secondary); color: var(--text);
  outline: none; transition: border-color var(--transition), box-shadow var(--transition);
  font-family: var(--font-brand);
}
.otp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.otp-input.filled { border-color: var(--primary); background: rgba(37,99,235,.05); }

/* ── Password Strength ── */
.pwd-strength { display: flex; gap: 4px; margin-top: 8px; }
.pwd-bar { flex: 1; height: 4px; border-radius: 2px; background: var(--border); transition: background .3s; }
.pwd-bar.weak   { background: var(--danger); }
.pwd-bar.fair   { background: var(--warning); }
.pwd-bar.good   { background: #3B82F6; }
.pwd-bar.strong { background: var(--success); }

/* ── Crypto / QR ── */
.crypto-address {
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: 12px 16px;
  font-family: 'Space Grotesk', monospace; font-size: .8125rem;
  word-break: break-all; color: var(--text); letter-spacing: .03em;
}
.qr-canvas-wrap {
  width: 160px; height: 160px; border-radius: var(--radius-md);
  border: 2px solid var(--border); overflow: hidden;
  background: #fff; flex-shrink: 0; display: grid; place-items: center;
}

/* ── Step Wizard (shared) ── */
.wizard-step { display: none; }
.wizard-step.active { display: block; }
.step-indicator {
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: .875rem; font-weight: 700;
  background: var(--bg-secondary); color: var(--text-3);
  border: 2px solid var(--border); flex-shrink: 0;
  transition: all var(--transition);
}
.step-indicator.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.step-indicator.done   { background: var(--success); color: #fff; border-color: var(--success); }
.step-line { flex: 1; height: 2px; background: var(--border); transition: background var(--transition); }
.step-line.done { background: var(--success); }

/* ── Deposit Method Card ── */
.method-card {
  border: 2px solid var(--border); border-radius: var(--radius-lg);
  padding: 16px; cursor: pointer; transition: all var(--transition);
  display: flex; align-items: center; gap: 14px; background: var(--surface);
}
.method-card:hover { border-color: var(--primary); background: rgba(37,99,235,.03); }
.method-card.selected { border-color: var(--primary); background: rgba(37,99,235,.06); }

/* ── Mobile Overlay ── */
.mobile-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 45;
}
.mobile-overlay.visible { display: block; }

/* ── Responsive ── */
@media (max-width: 1024px) {
  .app-main { margin-left: 0; }
  .sidebar  { transform: translateX(-260px); }
  .sidebar.open { transform: translateX(0); }
}
@media (max-width: 768px) {
  .app-content { padding: 16px; }
  .app-header  { padding: 0 16px; height: 56px; }
  .modal-overlay { padding: 12px; }
  .modal-box { margin: 0; border-radius: var(--radius-lg); max-width: calc(100vw - 24px); }
  .modal-header { padding: 16px 16px 0; }
  .modal-body  { padding: 16px; }
  .modal-footer { padding: 0 16px 16px; }
  .bank-card { width: 100%; }
  .sidebar-logo { height: 56px; padding: 0 16px; }
}
@media (max-width: 480px) {
  .btn-xl { padding: 14px 24px; font-size: .9375rem; }
  .page-title { font-size: 1.5rem; }
  .grid-auto-fit  { grid-template-columns: 1fr; }
  .grid-auto-fill { grid-template-columns: 1fr; }
  .otp-input { width: 44px; height: 50px; font-size: 1.25rem; }
  .navbar { height: 60px; }
  .navbar-brand { font-size: 1.125rem; }
  .navbar-brand .logo-icon { width: 30px; height: 30px; font-size: .9rem; }
  .site-footer { padding: 40px 0 24px; }
}
@media (max-width: 374px) {
  .btn { padding: 8px 14px; font-size: .8125rem; }
  .btn-sm { padding: 6px 10px; font-size: .75rem; }
  .btn-lg { padding: 10px 20px; font-size: .875rem; }
  .btn-xl { padding: 12px 20px; font-size: .875rem; }
  .app-content { padding: 12px; }
  .app-header  { padding: 0 12px; }
  .page-title { font-size: 1.25rem; }
  .modal-box { max-width: calc(100vw - 16px); }
  .modal-header { padding: 14px 14px 0; }
  .modal-body  { padding: 14px; }
  .modal-footer { padding: 0 14px 14px; }
  .otp-input { width: 38px; height: 44px; font-size: 1.125rem; }
  .navbar { height: 56px; }
  .navbar-brand { font-size: 1rem; gap: 6px; }
  .navbar-brand .logo-icon { width: 28px; height: 28px; border-radius: 7px; font-size: .8rem; }
  .bank-card { padding: 20px; border-radius: 14px; }
  .card-number { font-size: .9375rem; letter-spacing: .1em; }
}
