/* ============================================================
   VOTER API PORTAL — Global Design System
   Modern Dark Dashboard (Razorpay/Stripe inspired)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ─── CSS Variables ──────────────────────────────────────────── */
:root {
  --primary:        #4F6EF7;
  --primary-dark:   #3B58E8;
  --primary-light:  #6B85FF;
  --primary-glow:   rgba(79,110,247,0.25);

  --accent:         #00D4AA;
  --accent-dark:    #00B890;

  --danger:         #FF4D6A;
  --danger-light:   rgba(255,77,106,0.15);
  --warning:        #FFB800;
  --warning-light:  rgba(255,184,0,0.15);
  --success:        #00C48C;
  --success-light:  rgba(0,196,140,0.15);
  --info:           #4F6EF7;
  --info-light:     rgba(79,110,247,0.15);

  /* Sidebar */
  --sidebar-bg:      #0D0F1A;
  --sidebar-border:  rgba(255,255,255,0.06);
  --sidebar-text:    #8B92A9;
  --sidebar-hover:   rgba(79,110,247,0.12);
  --sidebar-active:  rgba(79,110,247,0.18);
  --sidebar-width:   260px;

  /* Background */
  --bg-main:         #0F1117;
  --bg-card:         #181B27;
  --bg-card-hover:   #1E2235;
  --bg-input:        #1A1D2E;
  --bg-modal:        #181B27;

  /* Text */
  --text-primary:    #E8ECFF;
  --text-secondary:  #8B92A9;
  --text-muted:      #5B6382;

  /* Borders */
  --border:          rgba(255,255,255,0.07);
  --border-focus:    rgba(79,110,247,0.5);

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  24px;

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0,0,0,0.3);
  --shadow-md:  0 8px 24px rgba(0,0,0,0.4);
  --shadow-lg:  0 16px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 24px var(--primary-glow);

  /* Transitions */
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ─── Reset & Base ────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 14px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

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

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

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

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

.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: var(--transition);
}

/* ─── Sidebar Logo ────────────────────────────────────────────── */
.sidebar-logo {
  padding: 24px 20px;
  border-bottom: 1px solid var(--sidebar-border);
  display: flex;
  align-items: center;
  gap: 12px;
}
.sidebar-logo .logo-icon {
  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;
  font-size: 18px; color: #fff;
  box-shadow: var(--shadow-glow);
}
.sidebar-logo .logo-text {
  font-size: 15px; font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}
.sidebar-logo .logo-sub {
  font-size: 11px; color: var(--text-muted); font-weight: 400;
}

/* ─── Sidebar Navigation ──────────────────────────────────────── */
.sidebar-nav { padding: 16px 12px; flex: 1; }
.nav-section-label {
  font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1.2px;
  color: var(--text-muted); padding: 8px 8px 6px;
  margin-top: 8px;
}
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: var(--sidebar-text);
  font-size: 13.5px; font-weight: 500;
  cursor: pointer; transition: var(--transition);
  position: relative;
}
.nav-item i { width: 18px; text-align: center; font-size: 15px; }
.nav-item:hover {
  background: var(--sidebar-hover);
  color: var(--text-primary);
}
.nav-item.active {
  background: var(--sidebar-active);
  color: var(--primary-light);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  transform: translateY(-50%);
  width: 3px; height: 60%;
  background: var(--primary);
  border-radius: 0 4px 4px 0;
}
.nav-item .nav-badge {
  margin-left: auto;
  background: var(--primary);
  color: #fff; font-size: 10px; font-weight: 700;
  padding: 2px 7px; border-radius: 99px;
}
.nav-item .nav-badge.danger { background: var(--danger); }

/* ─── Sidebar Footer ──────────────────────────────────────────── */
.sidebar-footer {
  padding: 16px;
  border-top: 1px solid var(--sidebar-border);
}
.sidebar-user {
  display: flex; align-items: center; gap: 10px;
  padding: 10px; border-radius: var(--radius-sm);
  cursor: pointer; transition: var(--transition);
}
.sidebar-user:hover { background: var(--sidebar-hover); }
.sidebar-user .avatar {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
  flex-shrink: 0;
}
.sidebar-user .user-info { flex: 1; min-width: 0; }
.sidebar-user .user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user .user-role { font-size: 11px; color: var(--text-muted); }

/* ─── Topbar ─────────────────────────────────────────────────── */
.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: 900;
}
.topbar-left { display: flex; align-items: center; gap: 12px; }
.topbar-title { font-size: 18px; font-weight: 700; color: var(--text-primary); }
.topbar-breadcrumb { font-size: 12px; color: var(--text-muted); }
.topbar-right { display: flex; align-items: center; gap: 16px; }

/* Hamburger (mobile) */
.hamburger-btn {
  display: none;
  background: none; border: none;
  color: var(--text-secondary); font-size: 20px;
  cursor: pointer; padding: 4px;
}

/* ─── Page Content ────────────────────────────────────────────── */
.page-content { padding: 28px; flex: 1; }
.page-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap; gap: 12px;
}
.page-title { font-size: 22px; font-weight: 700; color: var(--text-primary); }
.page-subtitle { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.card:hover { border-color: rgba(255,255,255,0.12); }

.card-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 20px;
}
.card-title { font-size: 15px; font-weight: 600; color: var(--text-primary); }
.card-subtitle { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ─── Stat Cards ─────────────────────────────────────────────── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  cursor: default;
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--stat-color, var(--primary));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255,255,255,0.12);
}

.stat-card .stat-icon {
  width: 48px; height: 48px;
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  background: var(--stat-icon-bg, var(--info-light));
  color: var(--stat-color, var(--primary));
  margin-bottom: 16px;
}
.stat-card .stat-value {
  font-size: 28px; font-weight: 800;
  color: var(--text-primary); line-height: 1;
  margin-bottom: 6px;
}
.stat-card .stat-label {
  font-size: 12.5px; color: var(--text-secondary); font-weight: 500;
}
.stat-card .stat-change {
  margin-top: 10px; font-size: 12px; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
}
.stat-change.up { color: var(--success); }
.stat-change.down { color: var(--danger); }

/* Stat color themes */
.stat-primary { --stat-color: var(--primary); --stat-icon-bg: var(--info-light); }
.stat-success { --stat-color: var(--success); --stat-icon-bg: var(--success-light); }
.stat-warning { --stat-color: var(--warning); --stat-icon-bg: var(--warning-light); }
.stat-danger  { --stat-color: var(--danger);  --stat-icon-bg: var(--danger-light); }
.stat-accent  { --stat-color: var(--accent);  --stat-icon-bg: rgba(0,212,170,0.12); }

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 20px; border-radius: var(--radius-sm);
  font-size: 13.5px; font-weight: 600; font-family: 'Inter', sans-serif;
  border: 1px solid transparent; cursor: pointer;
  transition: var(--transition); outline: none;
  white-space: nowrap;
}
.btn:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.btn-sm { padding: 6px 14px; font-size: 12.5px; }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-md); }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff; border-color: transparent;
  box-shadow: 0 4px 14px rgba(79,110,247,0.35);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  box-shadow: 0 6px 20px rgba(79,110,247,0.5);
  transform: translateY(-1px);
  color: #fff;
}

.btn-success {
  background: linear-gradient(135deg, var(--success), var(--accent));
  color: #fff; box-shadow: 0 4px 14px rgba(0,196,140,0.3);
}
.btn-success:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,196,140,0.45); color: #fff;
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #FF6B85);
  color: #fff; box-shadow: 0 4px 14px rgba(255,77,106,0.3);
}
.btn-danger:hover { transform: translateY(-1px); color: #fff; }

.btn-warning {
  background: linear-gradient(135deg, var(--warning), #FFCA28);
  color: #0D0F1A;
}
.btn-warning:hover { transform: translateY(-1px); color: #0D0F1A; }

.btn-outline {
  background: transparent;
  border-color: var(--border);
  color: var(--text-secondary);
}
.btn-outline:hover {
  border-color: var(--primary); color: var(--primary);
  background: var(--primary-glow);
}

.btn-ghost { background: transparent; border: none; color: var(--text-secondary); }
.btn-ghost:hover { color: var(--text-primary); background: var(--sidebar-hover); }

.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn .spinner { animation: spin 0.8s linear infinite; }

/* ─── Forms ──────────────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label {
  display: block; font-size: 12.5px; font-weight: 600;
  color: var(--text-secondary); margin-bottom: 6px;
  text-transform: uppercase; letter-spacing: 0.5px;
}
.form-control, .form-select {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  padding: 10px 14px;
  font-size: 14px; font-family: 'Inter', sans-serif;
  transition: var(--transition);
  outline: none;
  appearance: none;
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background: var(--bg-card);
}
.form-control::placeholder { color: var(--text-muted); }
.form-select option { background: var(--bg-card); }

.input-group {
  display: flex; align-items: stretch;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  overflow: hidden; transition: var(--transition);
}
.input-group:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-glow); }
.input-group .form-control { border: none; border-radius: 0; }
.input-group .input-group-text {
  background: var(--bg-input); border: none;
  padding: 0 14px; color: var(--text-muted); font-size: 14px;
  display: flex; align-items: center;
}
.input-group .input-btn {
  background: none; border: none; border-left: 1px solid var(--border);
  padding: 0 14px; color: var(--text-muted); cursor: pointer;
  transition: var(--transition);
}
.input-group .input-btn:hover { color: var(--primary); background: var(--primary-glow); }

.form-text { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.form-error { font-size: 11.5px; color: var(--danger); margin-top: 4px; }

/* ─── Tables ─────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto;
  border-radius: var(--radius-md);
}
.data-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
}
.data-table thead th {
  background: var(--bg-main);
  color: var(--text-muted);
  font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table tbody tr {
  transition: var(--transition);
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr:hover { background: var(--bg-card-hover); }
.data-table tbody td {
  padding: 14px 16px; font-size: 13.5px;
  color: var(--text-primary); vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }

/* ─── Badges & Status ────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 99px;
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.5px;
}
.badge::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; display: block;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-pending { background: var(--warning-light); color: var(--warning); }
.badge-processing { background: var(--info-light);  color: var(--primary-light); }
.badge-rejected, .badge-danger { background: var(--danger-light);  color: var(--danger); }
.badge-inactive { background: rgba(91,99,130,0.2); color: var(--text-muted); }
.badge-active { background: var(--success-light); color: var(--success); }
.badge-suspended { background: var(--danger-light); color: var(--danger); }
.badge-credit { background: var(--success-light); color: var(--success); }
.badge-debit { background: var(--danger-light); color: var(--danger); }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination-wrapper { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; flex-wrap: wrap; gap: 8px; }
.pagination-info { font-size: 12.5px; color: var(--text-muted); }
.pagination { display: flex; gap: 4px; list-style: none; }
.page-link {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); color: var(--text-secondary);
  font-size: 13px; font-weight: 500; cursor: pointer;
  transition: var(--transition);
}
.page-link:hover { border-color: var(--primary); color: var(--primary); background: var(--primary-glow); }
.page-link.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.page-link.disabled { opacity: 0.4; cursor: not-allowed; pointer-events: none; }

/* ─── Modals ─────────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.7); backdrop-filter: blur(4px);
  z-index: 2000; align-items: center; justify-content: center;
  padding: 20px;
}
.modal-overlay.open { display: flex; animation: fadeIn 0.2s ease; }
.modal-box {
  background: var(--bg-modal);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s cubic-bezier(0.34,1.56,0.64,1);
}
.modal-box.modal-lg { max-width: 720px; }
.modal-box.modal-xl { max-width: 900px; }
.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; color: var(--text-primary); }
.modal-body { padding: 24px; }
.modal-footer {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px;
  padding: 16px 24px; border-top: 1px solid var(--border);
}
.modal-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; font-size: 18px; padding: 4px;
  transition: var(--transition); border-radius: var(--radius-sm);
}
.modal-close:hover { color: var(--text-primary); background: var(--sidebar-hover); }

/* ─── Toast Notifications ────────────────────────────────────── */
.toast-container {
  position: fixed; bottom: 24px; right: 24px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: 9999; max-width: 360px;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex; align-items: flex-start; gap: 12px;
  box-shadow: var(--shadow-lg);
  animation: slideInRight 0.3s cubic-bezier(0.34,1.56,0.64,1);
  min-width: 280px;
}
.toast.hiding { animation: slideOutRight 0.25s ease forwards; }
.toast-icon { font-size: 18px; margin-top: 1px; }
.toast-success .toast-icon { color: var(--success); }
.toast-error   .toast-icon { color: var(--danger); }
.toast-warning .toast-icon { color: var(--warning); }
.toast-info    .toast-icon { color: var(--primary); }
.toast-body { flex: 1; }
.toast-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.toast-msg   { font-size: 12.5px; color: var(--text-secondary); margin-top: 2px; }
.toast-close {
  background: none; border: none; color: var(--text-muted);
  cursor: pointer; padding: 2px; font-size: 14px;
  transition: var(--transition); align-self: flex-start;
}
.toast-close:hover { color: var(--text-primary); }

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

.page-loader {
  position: fixed; inset: 0;
  background: var(--bg-main);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999; flex-direction: column; gap: 16px;
}
.page-loader.hidden { animation: fadeOut 0.3s ease forwards; pointer-events: none; }
.loader-ring {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* ─── Notification Bell ──────────────────────────────────────── */
.notif-bell {
  position: relative; cursor: pointer;
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius-sm); width: 38px; height: 38px;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); font-size: 16px;
  transition: var(--transition);
}
.notif-bell:hover { border-color: var(--primary); color: var(--primary); }
.notif-badge {
  position: absolute; top: -4px; right: -4px;
  background: var(--danger); color: #fff;
  font-size: 9px; font-weight: 800;
  min-width: 16px; height: 16px;
  border-radius: 99px; display: flex;
  align-items: center; justify-content: center;
  padding: 0 4px;
}

/* ─── Code Blocks (API Docs) ─────────────────────────────────── */
.code-block {
  background: #0A0C15;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  font-family: 'Courier New', monospace;
  font-size: 13px; line-height: 1.7;
  color: #A8C4F0; overflow-x: auto;
  position: relative;
}
.code-block .copy-btn {
  position: absolute; top: 12px; right: 12px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--radius-sm);
  padding: 4px 10px; font-size: 11px; cursor: pointer;
  transition: var(--transition);
}
.code-block .copy-btn:hover { border-color: var(--primary); color: var(--primary); }

.code-keyword { color: #C792EA; }
.code-string  { color: #C3E88D; }
.code-number  { color: #F78C6C; }
.code-comment { color: #546E7A; font-style: italic; }
.code-key     { color: #80CBC4; }

/* ─── API Doc Endpoint ────────────────────────────────────────── */
.endpoint-badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--radius-sm);
  font-family: monospace; font-size: 13px; font-weight: 700;
  margin-bottom: 8px;
}
.method-post { background: rgba(0,196,140,0.15); color: var(--success); }
.method-get  { background: var(--info-light); color: var(--primary-light); }

/* ─── Tabs ────────────────────────────────────────────────────── */
.tab-nav {
  display: flex; gap: 4px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 24px;
  overflow-x: auto;
}
.tab-btn {
  padding: 10px 18px; background: none; border: none;
  color: var(--text-muted); font-size: 13.5px; font-weight: 500;
  cursor: pointer; border-bottom: 2px solid transparent;
  margin-bottom: -1px; transition: var(--transition);
  white-space: nowrap; font-family: 'Inter', sans-serif;
}
.tab-btn:hover { color: var(--text-primary); }
.tab-btn.active { color: var(--primary-light); border-bottom-color: var(--primary); }

/* ─── Wallet Card ─────────────────────────────────────────────── */
.wallet-card {
  background: linear-gradient(135deg, #1a1f3a, #141728);
  border: 1px solid rgba(79,110,247,0.3);
  border-radius: var(--radius-xl);
  padding: 32px;
  position: relative; overflow: hidden;
}
.wallet-card::before {
  content: '';
  position: absolute; top: -50%; right: -50%;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(79,110,247,0.2) 0%, transparent 70%);
  border-radius: 50%;
}
.wallet-card .wallet-label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }
.wallet-card .wallet-amount { font-size: 42px; font-weight: 800; color: var(--text-primary); margin: 8px 0; letter-spacing: -1px; }
.wallet-card .wallet-amount span { font-size: 24px; color: var(--primary-light); }

/* ─── Key Card ───────────────────────────────────────────────── */
.key-item {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  margin-bottom: 12px; transition: var(--transition);
}
.key-item:hover { border-color: var(--primary-glow); }
.key-item .key-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 4px; }
.key-item .key-value { font-family: 'Courier New', monospace; font-size: 14px; color: var(--text-primary); word-break: break-all; }
.key-item .key-actions { margin-left: auto; display: flex; gap: 8px; }

/* ─── Alert Boxes ─────────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--radius-md);
  border: 1px solid transparent; margin-bottom: 16px;
}
.alert-success { background: var(--success-light); border-color: rgba(0,196,140,0.2); color: var(--success); }
.alert-danger   { background: var(--danger-light);  border-color: rgba(255,77,106,0.2); color: var(--danger); }
.alert-warning  { background: var(--warning-light); border-color: rgba(255,184,0,0.2);  color: var(--warning); }
.alert-info     { background: var(--info-light);    border-color: rgba(79,110,247,0.2); color: var(--primary-light); }
.alert i { font-size: 16px; margin-top: 1px; }
.alert-body { font-size: 13.5px; line-height: 1.5; }

/* ─── Login Page ─────────────────────────────────────────────── */
.auth-wrapper {
  min-height: 100vh;
  background: var(--bg-main);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(79,110,247,0.12) 0%, transparent 50%),
    radial-gradient(circle at 80% 80%, rgba(0,212,170,0.08) 0%, transparent 50%);
}
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 40px;
  width: 100%; max-width: 420px;
  box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center; margin-bottom: 32px;
}
.auth-logo .logo-circle {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center;
  font-size: 24px; color: #fff; margin: 0 auto 12px;
  box-shadow: var(--shadow-glow);
}
.auth-logo h1 { font-size: 20px; font-weight: 800; color: var(--text-primary); }
.auth-logo p  { font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.auth-divider {
  display: flex; align-items: center; gap: 12px; margin: 20px 0;
  color: var(--text-muted); font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

/* ─── Charts ─────────────────────────────────────────────────── */
.chart-container {
  position: relative; width: 100%; min-height: 200px;
}

/* ─── Animations ─────────────────────────────────────────────── */
@keyframes fadeIn    { from { opacity: 0 } to { opacity: 1 } }
@keyframes fadeOut   { from { opacity: 1 } to { opacity: 0 } }
@keyframes slideUp   { from { opacity: 0; transform: translateY(20px) } to { opacity: 1; transform: none } }
@keyframes spin      { to { transform: rotate(360deg) } }
@keyframes shimmer   { from { background-position: 200% 0 } to { background-position: -200% 0 } }
@keyframes slideInRight  { from { opacity: 0; transform: translateX(20px) } to { opacity: 1; transform: none } }
@keyframes slideOutRight { to   { opacity: 0; transform: translateX(20px) } }
@keyframes pulse { 0%,100% { opacity: 1 } 50% { opacity: 0.5 } }

.animate-fade { animation: fadeIn 0.3s ease; }
.animate-slide { animation: slideUp 0.3s ease; }

/* ─── Utility Classes ────────────────────────────────────────── */
.text-primary-color { color: var(--primary-light); }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger)  !important; }
.text-warning { color: var(--warning) !important; }
.text-muted   { color: var(--text-muted) !important; }
.text-sm      { font-size: 12.5px; }
.text-xs      { font-size: 11px; }
.fw-600       { font-weight: 600; }
.fw-700       { font-weight: 700; }
.fw-800       { font-weight: 800; }
.gap-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.d-flex       { display: flex; }
.align-center { align-items: center; }
.justify-between { justify-content: space-between; }
.mono         { font-family: 'Courier New', monospace; }
.truncate     { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── Search & Filter Bar ─────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 20px; flex-wrap: wrap;
}
.filter-bar .form-control,
.filter-bar .form-select {
  max-width: 200px; min-width: 140px;
}
.filter-bar .search-input {
  max-width: 280px; flex: 1;
}
.filter-bar .input-group { min-width: 220px; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 1100;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .hamburger-btn { display: flex; }
  .sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.6); z-index: 1050;
  }
  .sidebar-overlay.show { display: block; }
}
@media (max-width: 768px) {
  .page-content { padding: 16px; }
  .topbar { padding: 0 16px; }
  .stat-grid { grid-template-columns: repeat(2, 1fr) !important; }
  .auth-card { padding: 28px 20px; }
  .filter-bar .form-control,
  .filter-bar .form-select { max-width: 100%; }
  .data-table { min-width: 700px; }
  .wallet-card { padding: 24px; }
  .wallet-card .wallet-amount { font-size: 32px; }
}
@media (max-width: 480px) {
  .stat-grid { grid-template-columns: 1fr !important; }
  .modal-box { margin: 10px; }
  .toast-container { left: 16px; right: 16px; }
}

/* ─── Stat Grid ──────────────────────────────────────────────── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}
.stat-grid-4 { grid-template-columns: repeat(4, 1fr); }
.stat-grid-6 { grid-template-columns: repeat(6, 1fr); }

/* ─── Empty State ────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 60px 20px;
}
.empty-state .empty-icon {
  font-size: 48px; color: var(--text-muted);
  margin-bottom: 16px;
}
.empty-state .empty-title { font-size: 16px; font-weight: 600; color: var(--text-secondary); margin-bottom: 8px; }
.empty-state .empty-desc  { font-size: 13.5px; color: var(--text-muted); }
