/* ============================================================
   EduPay CRM — FinTech Design System
   Font: DM Sans (body) + Cabinet Grotesk (display)
   Theme: Premium White FinTech
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,400&display=swap');

/* ——— CSS Variables ——— */
:root {
  --primary:       #0F4C81;
  --primary-light: #1A6BB5;
  --primary-ultra: #E8F1FA;
  --accent:        #00C896;
  --accent-light:  #D4F5ED;
  --danger:        #E53935;
  --danger-light:  #FDECEA;
  --warning:       #F59E0B;
  --warning-light: #FEF3C7;
  --purple:        #7C3AED;
  --purple-light:  #EDE9FE;

  --white:    #FFFFFF;
  --bg:       #F5F7FA;
  --bg-2:     #EEF1F7;
  --surface:  #FFFFFF;
  --border:   #E2E8F0;
  --border-2: #CBD5E1;

  --text-1:   #0F172A;
  --text-2:   #475569;
  --text-3:   #94A3B8;
  --text-inv: #FFFFFF;

  --shadow-sm:  0 1px 3px rgba(15,76,129,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 16px rgba(15,76,129,0.10), 0 1px 4px rgba(0,0,0,0.06);
  --shadow-lg:  0 8px 32px rgba(15,76,129,0.14), 0 2px 8px rgba(0,0,0,0.08);
  --shadow-xl:  0 20px 60px rgba(15,76,129,0.18), 0 4px 16px rgba(0,0,0,0.10);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;
  --radius-2xl: 32px;

  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --transition: all 0.22s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-spring: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ——— Reset ——— */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-1);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ——— Scrollbar ——— */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-2); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--primary-light); }

/* ============================================================
   LAYOUT
   ============================================================ */

.layout { display: flex; min-height: 100vh; }

/* Sidebar */
.sidebar {
  width: 260px;
  min-height: 100vh;
  background: var(--white);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0; bottom: 0;
  z-index: 100;
  transition: var(--transition);
  overflow-y: auto;
}

.sidebar-brand {
  padding: 24px 20px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 12px;
}

.sidebar-logo {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  color: white; font-weight: 700; font-size: 18px;
  box-shadow: 0 4px 12px rgba(15,76,129,0.35);
}

.sidebar-brand-text { flex: 1; }
.sidebar-brand-name { font-size: 15px; font-weight: 700; color: var(--text-1); line-height: 1.2; }
.sidebar-brand-sub { font-size: 11px; color: var(--text-3); font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; }

.sidebar-nav { flex: 1; padding: 16px 12px; }

.nav-section-label {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-3); padding: 12px 8px 6px; margin-top: 8px;
}

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-md);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  transition: var(--transition);
  position: relative;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: var(--primary-ultra);
  color: var(--primary);
}

.nav-item.active {
  background: var(--primary);
  color: var(--white);
  box-shadow: 0 4px 12px rgba(15,76,129,0.3);
}

.nav-item .nav-icon {
  width: 20px; height: 20px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: white;
  font-size: 10px; font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  min-width: 20px;
  text-align: center;
}

.nav-item.active .nav-badge { background: rgba(255,255,255,0.25); }

.sidebar-footer {
  padding: 16px 12px;
  border-top: 1px solid var(--border);
}

/* Main content */
.main-content {
  margin-left: 260px;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Top bar */
.topbar {
  height: 64px;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 28px;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

.topbar-title { font-size: 18px; font-weight: 700; color: var(--text-1); flex: 1; }
.topbar-sub { font-size: 13px; color: var(--text-3); font-weight: 400; display: block; }

.page-content { padding: 28px; flex: 1; }

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover { box-shadow: var(--shadow-md); }

.card-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}

.card-title { font-size: 15px; font-weight: 700; color: var(--text-1); }
.card-sub { font-size: 12px; color: var(--text-3); margin-top: 1px; }

.card-body { padding: 24px; }
.card-footer { padding: 16px 24px; border-top: 1px solid var(--border); background: var(--bg); }

/* Stat Cards */
.stat-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-spring);
  cursor: default;
  position: relative;
  overflow: hidden;
}

.stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  opacity: 0;
  transition: var(--transition);
}

.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat-card:hover::before { opacity: 1; }

.stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; margin-bottom: 14px;
}

.stat-icon.blue   { background: var(--primary-ultra); color: var(--primary); }
.stat-icon.green  { background: var(--accent-light); color: var(--accent); }
.stat-icon.amber  { background: var(--warning-light); color: var(--warning); }
.stat-icon.red    { background: var(--danger-light); color: var(--danger); }
.stat-icon.purple { background: var(--purple-light); color: var(--purple); }

.stat-value { font-size: 26px; font-weight: 700; color: var(--text-1); line-height: 1; margin-bottom: 4px; }
.stat-label { font-size: 12px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }

.stat-trend {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600;
  margin-top: 10px;
}
.stat-trend.up { color: var(--accent); }
.stat-trend.down { color: var(--danger); }

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  cursor: pointer; border: none;
  text-decoration: none;
  transition: var(--transition);
  position: relative; overflow: hidden;
  white-space: nowrap;
}

.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.2) 0%, transparent 70%);
  opacity: 0;
  transition: var(--transition);
}

.btn:active::after { opacity: 1; transform: scale(1.5); }
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(15,76,129,0.35);
}
.btn-primary:hover {
  background: var(--primary-light);
  box-shadow: 0 6px 20px rgba(15,76,129,0.45);
  transform: translateY(-1px);
}

.btn-accent {
  background: var(--accent);
  color: white;
  box-shadow: 0 4px 14px rgba(0,200,150,0.35);
}
.btn-accent:hover {
  background: #00b085;
  box-shadow: 0 6px 20px rgba(0,200,150,0.45);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: white;
  box-shadow: 0 4px 14px rgba(229,57,53,0.3);
}
.btn-danger:hover { background: #c62828; transform: translateY(-1px); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--border-2);
  color: var(--text-2);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-ultra); }

.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { background: var(--bg-2); color: var(--text-1); }

.btn-sm { padding: 7px 14px; font-size: 13px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 16px; border-radius: var(--radius-lg); }
.btn-block { width: 100%; }

.btn:disabled, .btn.loading {
  opacity: 0.65; pointer-events: none;
}

/* Loading spinner on button */
.btn.loading::before {
  content: '';
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ============================================================
   FORM ELEMENTS
   ============================================================ */

.form-group { margin-bottom: 20px; }
.form-row { display: grid; gap: 16px; }
.form-row-2 { grid-template-columns: 1fr 1fr; }
.form-row-3 { grid-template-columns: 1fr 1fr 1fr; }

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

.form-label .required { color: var(--danger); margin-left: 3px; }

.form-control {
  width: 100%; padding: 10px 14px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body); font-size: 14px; color: var(--text-1);
  transition: var(--transition);
  outline: none;
}

.form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(15,76,129,0.12);
}

.form-control::placeholder { color: var(--text-3); }
.form-control.is-error { border-color: var(--danger); }
.form-control.is-error:focus { box-shadow: 0 0 0 3px rgba(229,57,53,0.12); }

.form-error { font-size: 12px; color: var(--danger); margin-top: 5px; display: flex; align-items: center; gap: 4px; }
.form-hint { font-size: 12px; color: var(--text-3); margin-top: 5px; }

/* Floating label variant */
.form-float { position: relative; }
.form-float .form-control { padding-top: 22px; padding-bottom: 8px; }
.form-float .form-label {
  position: absolute; top: 50%; left: 14px; transform: translateY(-50%);
  pointer-events: none; transition: var(--transition);
  font-size: 14px; font-weight: 400; color: var(--text-3); margin-bottom: 0;
}
.form-float .form-control:focus ~ .form-label,
.form-float .form-control:not(:placeholder-shown) ~ .form-label {
  top: 10px; transform: none; font-size: 11px; font-weight: 600; color: var(--primary);
}

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

/* ============================================================
   TABLES
   ============================================================ */

.table-wrapper { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border); }

table.data-table {
  width: 100%; border-collapse: collapse;
  font-size: 14px;
}

.data-table thead tr {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.data-table th {
  padding: 12px 16px;
  text-align: left;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--text-3);
  white-space: nowrap;
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-1);
  vertical-align: middle;
}

.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover { background: var(--primary-ultra); }
.data-table tbody tr:last-child td { border-bottom: none; }

.data-table .td-label { font-weight: 600; }
.data-table .td-muted { color: var(--text-3); font-size: 12px; }

/* ============================================================
   BADGES & PILLS
   ============================================================ */

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px;
  border-radius: 99px;
  font-size: 11px; font-weight: 700;
  letter-spacing: 0.03em;
}

.badge-success { background: var(--accent-light); color: #059669; }
.badge-danger  { background: var(--danger-light); color: var(--danger); }
.badge-warning { background: var(--warning-light); color: #D97706; }
.badge-info    { background: var(--primary-ultra); color: var(--primary); }
.badge-purple  { background: var(--purple-light); color: var(--purple); }
.badge-neutral { background: var(--bg-2); color: var(--text-2); }

.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ============================================================
   STATS GRID
   ============================================================ */

.stats-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* ============================================================
   TRANSACTION RECEIPT CARD
   ============================================================ */

.receipt-card {
  max-width: 420px; margin: 0 auto;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.receipt-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 28px 28px 40px;
  text-align: center; color: white; position: relative;
}

.receipt-header::after {
  content: '';
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 30px;
  background: var(--white);
  clip-path: ellipse(55% 100% at 50% 100%);
}

.receipt-amount { font-size: 40px; font-weight: 800; letter-spacing: -1px; }
.receipt-status { font-size: 13px; font-weight: 600; opacity: 0.85; margin-top: 4px; }

.receipt-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.3);
  padding: 4px 14px;
  border-radius: 99px;
  font-size: 12px; font-weight: 600;
  margin-top: 12px;
}

.receipt-body { padding: 28px 28px 20px; }

.receipt-row {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.receipt-row:last-child { border-bottom: none; }
.receipt-row-label { font-size: 12px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.04em; }
.receipt-row-value { font-size: 14px; font-weight: 600; color: var(--text-1); }

.receipt-footer {
  padding: 16px 28px 28px;
  text-align: center;
}

.receipt-qr {
  width: 80px; height: 80px; margin: 0 auto 12px;
  background: var(--bg);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 12px;
}

/* ============================================================
   OTP INPUT
   ============================================================ */

.otp-inputs { display: flex; gap: 10px; justify-content: center; }
.otp-input {
  width: 50px; height: 56px;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  text-align: center; font-size: 22px; font-weight: 700;
  color: var(--text-1); background: var(--white);
  outline: none; transition: var(--transition);
}
.otp-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,76,129,0.15); }
.otp-input.filled { border-color: var(--accent); background: var(--accent-light); }

/* ============================================================
   PAYMENT METHOD CARDS
   ============================================================ */

.payment-method-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.payment-method-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer;
  transition: var(--transition-spring);
  text-align: center;
}

.payment-method-card:hover { border-color: var(--primary); background: var(--primary-ultra); }
.payment-method-card.selected { border-color: var(--primary); background: var(--primary-ultra); box-shadow: 0 0 0 3px rgba(15,76,129,0.15); }

.payment-method-icon { font-size: 28px; margin-bottom: 8px; }
.payment-method-name { font-size: 13px; font-weight: 700; color: var(--text-1); }
.payment-method-desc { font-size: 11px; color: var(--text-3); margin-top: 3px; }

/* ============================================================
   VBAN / VPA DISPLAY
   ============================================================ */

.vban-card {
  background: linear-gradient(135deg, var(--primary) 0%, #1B5E9E 100%);
  border-radius: var(--radius-xl);
  padding: 24px;
  color: white;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.vban-card::after {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  border-radius: 50%;
  background: rgba(255,255,255,0.07);
}

.vban-type-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; opacity: 0.7; }
.vban-number { font-size: 20px; font-weight: 700; letter-spacing: 0.08em; margin: 6px 0 2px; font-family: 'Courier New', monospace; }
.vban-sub { font-size: 12px; opacity: 0.7; }

.copy-btn {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: var(--radius-sm);
  color: white; font-size: 11px; font-weight: 600;
  padding: 5px 10px; cursor: pointer;
  transition: var(--transition);
}
.copy-btn:hover { background: rgba(255,255,255,0.35); }

/* ============================================================
   LEDGER TIMELINE
   ============================================================ */

.ledger-timeline { display: flex; flex-direction: column; }

.ledger-item {
  display: flex; gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.ledger-item:hover { background: var(--primary-ultra); margin: 0 -24px; padding: 16px 24px; border-radius: var(--radius-md); }

.ledger-dot {
  width: 40px; height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
}

.ledger-dot.credit { background: var(--accent-light); }
.ledger-dot.debit { background: var(--danger-light); }

.ledger-info { flex: 1; }
.ledger-desc { font-size: 14px; font-weight: 600; color: var(--text-1); }
.ledger-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.ledger-balance { font-size: 12px; color: var(--text-3); font-family: monospace; }

.ledger-amount { text-align: right; }
.ledger-amount .amount-value { font-size: 15px; font-weight: 700; }
.ledger-amount .amount-value.credit { color: var(--accent); }
.ledger-amount .amount-value.debit { color: var(--danger); }
.ledger-amount .amount-bal { font-size: 11px; color: var(--text-3); margin-top: 2px; }

/* ============================================================
   ALERTS & TOASTS
   ============================================================ */

.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  display: flex; align-items: flex-start; gap: 10px;
  margin-bottom: 16px;
}

.alert-success { background: var(--accent-light); color: #065f46; border: 1px solid #6ee7b7; }
.alert-danger  { background: var(--danger-light); color: #991b1b; border: 1px solid #fca5a5; }
.alert-warning { background: var(--warning-light); color: #92400e; border: 1px solid #fcd34d; }
.alert-info    { background: var(--primary-ultra); color: var(--primary); border: 1px solid #93c5fd; }

/* Toast */
#toast-container {
  position: fixed; top: 20px; right: 20px;
  z-index: 9999;
  display: flex; flex-direction: column; gap: 10px;
}

.toast {
  background: var(--text-1);
  color: white;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  font-size: 14px; font-weight: 500;
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: 10px;
  min-width: 280px;
  animation: slideInRight 0.3s ease, fadeOut 0.3s ease 2.7s forwards;
}

.toast.success { background: var(--accent); }
.toast.danger  { background: var(--danger); }
.toast.warning { background: var(--warning); color: var(--text-1); }

/* ============================================================
   MOBILE STUDENT PANEL
   ============================================================ */

.mobile-app {
  max-width: 430px; margin: 0 auto;
  background: var(--white);
  min-height: 100vh;
  position: relative;
}

.mobile-header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  padding: 20px 20px 60px;
  color: white;
  position: relative;
}

.mobile-header-curve {
  position: absolute; bottom: -1px; left: 0; right: 0;
  height: 40px;
  background: var(--bg);
  clip-path: ellipse(60% 100% at 50% 100%);
}

.mobile-greeting { font-size: 13px; opacity: 0.8; }
.mobile-name { font-size: 22px; font-weight: 800; margin-top: 2px; }
.mobile-uid { font-size: 11px; opacity: 0.65; font-family: monospace; margin-top: 2px; }

.mobile-balance-pill {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 8px 16px;
  border-radius: 99px;
  margin-top: 14px;
}

.mobile-content { padding: 20px 16px; }

.mobile-fee-card {
  background: linear-gradient(135deg, #1A237E, #1565C0);
  color: white;
  border-radius: var(--radius-xl);
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 8px 32px rgba(26,35,126,0.35);
  position: relative; overflow: hidden;
}

.mobile-fee-card::before {
  content: '';
  position: absolute; top: -30px; right: -30px;
  width: 130px; height: 130px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
}

.mobile-action-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px;
  margin: 16px 0;
}

.mobile-action-btn {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 8px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition-spring);
}

.mobile-action-btn:hover, .mobile-action-btn:active {
  background: var(--primary-ultra);
  border-color: var(--primary);
  transform: scale(0.96);
}

.mobile-action-icon { font-size: 26px; margin-bottom: 6px; }
.mobile-action-label { font-size: 11px; font-weight: 700; color: var(--text-2); line-height: 1.2; }

.mobile-txn-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: var(--transition);
}

.mobile-txn-item:active { background: var(--bg-2); margin: 0 -16px; padding: 14px 16px; border-radius: var(--radius-md); }

.mobile-txn-icon {
  width: 44px; height: 44px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0;
}

.mobile-nav-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 430px;
  background: var(--white);
  border-top: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 8px 16px 12px;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.08);
  z-index: 100;
}

.mobile-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px; cursor: pointer;
  color: var(--text-3); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  border-radius: var(--radius-md);
  transition: var(--transition);
  text-decoration: none;
}

.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-item.active { color: var(--primary); background: var(--primary-ultra); }

/* ============================================================
   SEARCH & FILTER BAR
   ============================================================ */

.filter-bar {
  display: flex; align-items: center; gap: 12px;
  margin-bottom: 20px; flex-wrap: wrap;
}

.search-input-wrapper {
  flex: 1; min-width: 220px;
  position: relative;
}

.search-input-wrapper svg {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-3);
}

.search-input {
  width: 100%; padding: 10px 14px 10px 40px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 14px; color: var(--text-1); background: var(--white);
  outline: none; transition: var(--transition);
}

.search-input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(15,76,129,0.1); }

/* ============================================================
   MODAL
   ============================================================ */

.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(15,23,42,0.6);
  backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.show { opacity: 1; pointer-events: all; }

.modal {
  background: var(--white);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%; max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  transform: scale(0.95) translateY(20px);
  transition: var(--transition);
}

.modal-overlay.show .modal { transform: scale(1) translateY(0); }

.modal-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 12px;
}

.modal-title { font-size: 16px; font-weight: 700; flex: 1; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); border: none; cursor: pointer;
  color: var(--text-2); font-size: 18px;
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger-light); color: var(--danger); }

.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; }

/* ============================================================
   ANALYTICS CHART CONTAINER
   ============================================================ */

.chart-container { position: relative; height: 280px; }

/* ============================================================
   SKELETON LOADING
   ============================================================ */

.skeleton {
  background: linear-gradient(90deg, var(--bg) 25%, var(--border) 50%, var(--bg) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--radius-sm);
}

/* ============================================================
   ANIMATIONS
   ============================================================ */

@keyframes spin {
  to { transform: rotate(360deg); }
}

@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@keyframes slideInRight {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeOut {
  to { opacity: 0; transform: translateX(100%); }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
  0% { transform: scale(0.85); opacity: 0; }
  70% { transform: scale(1.04); }
  100% { transform: scale(1); opacity: 1; }
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(0,200,150,0.5); }
  100% { box-shadow: 0 0 0 14px rgba(0,200,150,0); }
}

.animate-fade { animation: fadeIn 0.4s ease both; }
.animate-pop  { animation: popIn 0.4s cubic-bezier(0.34,1.56,0.64,1) both; }

/* Staggered children */
.stagger > * { animation: fadeIn 0.4s ease both; }
.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.10s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.20s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.30s; }

/* ============================================================
   TABS
   ============================================================ */

.tabs { display: flex; gap: 4px; background: var(--bg); padding: 4px; border-radius: var(--radius-md); width: fit-content; margin-bottom: 20px; }

.tab-item {
  padding: 8px 18px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--text-3); transition: var(--transition);
  white-space: nowrap;
}

.tab-item:hover { color: var(--text-1); }
.tab-item.active { background: var(--white); color: var(--primary); box-shadow: var(--shadow-sm); }

/* ============================================================
   PROGRESS BAR
   ============================================================ */

.progress-bar {
  height: 8px; background: var(--bg-2); border-radius: 99px; overflow: hidden;
}

.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
  position: relative;
}

.progress-fill::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 1.8s infinite;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  text-align: center; padding: 48px 24px;
}

.empty-state-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.5; }
.empty-state-title { font-size: 16px; font-weight: 700; color: var(--text-1); }
.empty-state-desc { font-size: 14px; color: var(--text-3); margin-top: 6px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1024px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .form-row-3 { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  .page-content { padding: 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-row-2, .form-row-3 { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .tabs { overflow-x: auto; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .payment-method-grid { grid-template-columns: 1fr; }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.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; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.gap-20 { gap: 20px; }

.text-right { text-align: right; }
.text-center { text-align: center; }

.font-bold { font-weight: 700; }
.font-mono { font-family: 'Courier New', monospace; }

.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 14px; }
.text-lg   { font-size: 16px; }
.text-xl   { font-size: 20px; }
.text-2xl  { font-size: 24px; }

.text-muted   { color: var(--text-3); }
.text-primary { color: var(--primary); }
.text-accent  { color: var(--accent); }
.text-danger  { color: var(--danger); }

.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-20 { margin-top: 20px; }
.mt-24 { margin-top: 24px; }
.mb-4  { margin-bottom: 4px; }
.mb-8  { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.mb-20 { margin-bottom: 20px; }
.mb-24 { margin-bottom: 24px; }

.p-0  { padding: 0; }
.p-16 { padding: 16px; }
.p-24 { padding: 24px; }

.w-full { width: 100%; }
.hidden { display: none !important; }

.divider { height: 1px; background: var(--border); margin: 20px 0; }

.cursor-pointer { cursor: pointer; }

.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
