/* ═══════════════════════════════════
   CSS VARIABLES & THEME
═══════════════════════════════════ */
:root {
  --bg-primary: #0a0d14;
  --bg-secondary: #0f1520;
  --bg-card: #111827;
  --bg-card-hover: #161f2e;
  --sidebar-bg: #080b12;
  --border: rgba(255,255,255,0.06);
  --border-glow: rgba(0,212,172,0.3);
  --accent: #00d4ac;
  --accent-dim: rgba(0,212,172,0.12);
  --accent-2: #3b82f6;
  --accent-3: #f59e0b;
  --danger: #ef4444;
  --success: #22c55e;
  --warning: #f59e0b;
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #475569;
  --font-display: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
  --radius: 12px;
  --radius-lg: 20px;
  --shadow: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-glow: 0 0 30px rgba(0,212,172,0.15);
  --sidebar-width: 260px;
  --header-height: 68px;
  --transition: all 0.25s cubic-bezier(0.4,0,0.2,1);
}

[data-theme="light"] {
  --bg-primary: #f0f4f8;
  --bg-secondary: #e2e8f0;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --sidebar-bg: #0f172a;
  --border: rgba(0,0,0,0.08);
  --border-glow: rgba(0,212,172,0.4);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #94a3b8;
  --shadow: 0 4px 24px rgba(0,0,0,0.08);
}

/* ═══════════════════════════════════
   BASE
═══════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; overflow-x: auto !important; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  transition: background 0.3s, color 0.3s;
  overflow-x: auto !important;
}
a { text-decoration: none; color: inherit; }

/* ═══════════════════════════════════
   FONT AWESOME ICONS (Inline Text)
═══════════════════════════════════ */
/* Inline Font Awesome icons used as text replacements */
i.fas {
  display: inline-block;
  margin: 0 4px;
  vertical-align: middle;
  line-height: inherit;
}

/* For button text with icons */
button i.fas,
a i.fas,
span i.fas {
  margin-right: 6px;
  margin-left: 0;
}

/* For console/log display (don't show in render) */
.console-icon { font-size: 12px; opacity: 0.8; }

/* ═══════════════════════════════════
   LAYOUT
═══════════════════════════════════ */
.app-layout {
  display: flex;
  min-height: 100vh;
  width: 100%;
  
}

/* ═══════════════════════════════════
   SIDEBAR - PROFESSIONAL FINTECH DESIGN
═══════════════════════════════════ */
.sidebar {
  width: var(--sidebar-width);
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0; left: 0;
  height: 100vh;
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(0, 212, 255, 0.2); border-radius: 2px; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(0, 212, 255, 0.4); }

/* SIDEBAR HEADER */
.sidebar-header {
  flex-shrink: 0;
  padding: 0;
}

.sidebar-logo {
  padding: 20px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05) 0%, rgba(123, 94, 167, 0.05) 100%);
}

.logo-icon {
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, #00d4ff 0%, #7b5ea7 100%);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  color: white;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0, 212, 255, 0.2);
  transition: transform 0.3s ease;
}

.sidebar-logo:hover .logo-icon {
  transform: scale(1.05);
}

.logo-content {
  flex: 1;
  min-width: 0;
}

.logo-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.5px;
  color: #f1f5f9;
  line-height: 1.2;
}

.logo-accent {
  color: #00d4ff;
  font-weight: 700;
}

.logo-subtitle {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.8px;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: 2px;
}

.logo-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
}

/* SIDEBAR NAVIGATION */
.sidebar-nav {
  flex: 1;
  padding: 12px 6px;
  overflow-y: auto;
}

.nav-section {
  margin-bottom: 4px;
}

.nav-section-title {
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 1.2px;
  text-transform: uppercase;
  font-weight: 600;
  padding: 8px 10px 4px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-secondary);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  margin-bottom: 1px;
  position: relative;
  overflow: hidden;
  text-decoration: none;
  border: 1px solid transparent;
  background: none;
  border: none;
  font: inherit;
}

.nav-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0%;
  background: linear-gradient(180deg, #00d4ff 0%, #7b5ea7 100%);
  border-radius: 0 2px 2px 0;
  transition: height 0.2s ease;
}

.nav-item:hover {
  background: rgba(0, 212, 255, 0.08);
  color: var(--text-primary);
  border-color: rgba(0, 212, 255, 0.1);
}

.nav-item:hover::before {
  height: 100%;
}

.nav-item.active {
  background: rgba(0, 212, 255, 0.15);
  color: #00d4ff;
  font-weight: 600;
  border-color: rgba(0, 212, 255, 0.2);
}

.nav-item.active::before {
  height: 100%;
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-item:hover .nav-icon {
  transform: translateX(2px);
}

.nav-label {
  font-size: 9px;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* EXPANDABLE ITEMS */
.nav-item-toggle {
  position: relative;
}

.nav-toggle-icon {
  font-size: 12px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
  margin-left: auto;
  flex-shrink: 0;
}

.nav-item-toggle[aria-expanded="true"] .nav-toggle-icon {
  transform: rotate(90deg);
  color: #00d4ff;
}

.nav-section-content {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.3s ease, opacity 0.3s ease;
  padding: 0 4px;
}

.nav-section-content.open {
  max-height: 1000px;
  opacity: 1;
  pointer-events: auto;
}

.nav-item-sub {
  font-size: 11px;
  padding: 6px 10px;
  margin-left: 12px;
  color: var(--text-secondary);
}

.nav-item-sub:hover {
  color: #00d4ff;
  background: rgba(0, 212, 255, 0.08);
}

.nav-item-sub.active {
  background: rgba(0, 212, 255, 0.1);
  color: #00d4ff;
}

/* SIDEBAR FOOTER */
.sidebar-footer {
  padding: 10px 8px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sidebar-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
  margin: 2px 0;
}

.settings-item {
  color: var(--text-secondary);
}

.settings-item:hover {
  color: var(--text-primary);
  background: rgba(0, 212, 255, 0.08);
}

/* THEME CONTROL */
.theme-control {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.1);
  gap: 6px;
}

.theme-label {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}

.toggle-switch {
  width: 32px;
  height: 18px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 9px;
  cursor: pointer;
  position: relative;
  transition: all 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  flex-shrink: 0;
}

.toggle-switch:hover {
  background: rgba(0, 212, 255, 0.1);
}

.toggle-thumb {
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 7px;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] .toggle-thumb {
  left: 16px;
}

/* LOGOUT BUTTON */
.logout-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 8px 10px;
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.15), rgba(255, 71, 87, 0.05));
  color: #ff4757;
  border: 1px solid rgba(255, 71, 87, 0.2);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  font-family: inherit;
}

.logout-btn:hover {
  background: linear-gradient(135deg, rgba(255, 71, 87, 0.25), rgba(255, 71, 87, 0.1));
  border-color: rgba(255, 71, 87, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.15);
}

.logout-btn:active {
  transform: translateY(0);
}

.logout-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.theme-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px 4px;
}
.theme-label { font-size: 12px; color: var(--text-muted); font-weight: 400; }

/* Dark Mode Toggle */
.toggle-switch {
  width: 42px; height: 23px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  transition: var(--transition);
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--accent); border-color: var(--accent); }
.toggle-thumb {
  position: absolute;
  top: 3px; left: 3px;
  width: 15px; height: 15px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.22s cubic-bezier(0.4,0,0.2,1);
}
.toggle-switch.on .toggle-thumb { transform: translateX(19px); background: #000; }

/* ═══════════════════════════════════
   MAIN CONTENT
═══════════════════════════════════ */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  width: 100%;
 
}

/* TOP HEADER */
.top-header {
  height: var(--header-height);
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.sidebar-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 22px;
  cursor: pointer;
  padding: 5px;
  border-radius: 8px;
  transition: var(--transition);
  line-height: 1;
}
.breadcrumb { font-size: 13px; color: var(--text-muted); }
.breadcrumb .page-name {
  color: var(--text-primary);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 15px;
}

.header-right { display: flex; align-items: center; gap: 14px; }
.wallet-badge {
  display: flex;
  align-items: center;
  gap: 7px;
  background: var(--accent-dim);
  border: 1px solid var(--border-glow);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  white-space: nowrap;
}
.header-icon-btn {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 17px;
  color: var(--text-secondary);
  transition: var(--transition);
  position: relative;
}
.header-icon-btn:hover { border-color: var(--accent); color: var(--accent); }
.notif-dot {
  position: absolute; top: 7px; right: 7px;
  width: 6px; height: 6px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-secondary);
}
.user-info { text-align: right; }
.user-name-h { font-size: 14px; font-weight: 600; font-family: var(--font-display); line-height: 1.1; }
.user-role-h { font-size: 11px; color: var(--text-muted); }
.user-avatar {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), #3b82f6);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  color: #fff;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}
.user-avatar:hover { border-color: var(--accent); }

/* PAGE CONTENT */
.page-content {
  flex: 1;
  padding: 28px;
  animation: fadeUp 0.3s ease both;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.page-header { margin-bottom: 26px; }
.page-title {
  font-family: var(--font-display);
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.page-subtitle { color: var(--text-secondary); font-size: 14px; }

/* ═══════════════════════════════════
   CARDS
═══════════════════════════════════ */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: var(--transition);
  max-width: 100%;
  
}
.card-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 18px;
  display: flex; align-items: center; gap: 9px;
}

/* STAT CARDS */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 26px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.stat-card::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: var(--c, var(--accent));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-card:hover::after { transform: scaleX(1); }
.stat-card.c-green { --c: var(--accent); }
.stat-card.c-blue  { --c: var(--accent-2); }
.stat-card.c-amber { --c: var(--accent-3); }
.stat-card.c-red   { --c: var(--danger); }
.stat-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
  margin-bottom: 14px;
}
.c-green .stat-icon { background: rgba(0,212,172,0.1); }
.c-blue  .stat-icon { background: rgba(59,130,246,0.1); }
.c-amber .stat-icon { background: rgba(245,158,11,0.1); }
.c-red   .stat-icon { background: rgba(239,68,68,0.1); }
.stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -1px;
  line-height: 1;
  margin-bottom: 5px;
}
.stat-label { font-size: 13px; color: var(--text-muted); font-weight: 400; }
.stat-change {
  position: absolute; top: 18px; right: 18px;
  font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 999px;
}
.change-up   { background: rgba(34,197,94,0.1);  color: var(--success); }
.change-down { background: rgba(239,68,68,0.1);  color: var(--danger); }

/* ═══════════════════════════════════
   FORMS
═══════════════════════════════════ */
.form-group { margin-bottom: 17px; }
.form-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  letter-spacing: 0.2px;
}
.form-control {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 11px 15px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.form-control::placeholder { color: var(--text-muted); }
.form-control[readonly] { opacity: 0.6; cursor: default; }
select.form-control {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' fill='%2394a3b8' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14L2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
}
.input-wrap { position: relative; }
.input-wrap .input-icon { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 15px; }
.input-wrap .form-control { padding-left: 40px; }

/* ═══════════════════════════════════
   BUTTONS
═══════════════════════════════════ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  outline: none;
  transition: var(--transition);
  white-space: nowrap;
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 3px 12px rgba(0,212,172,0.28);
}
.btn-primary:hover:not(:disabled) { background: #00f0c4; transform: translateY(-1px); box-shadow: 0 5px 18px rgba(0,212,172,0.38); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
  background: var(--bg-secondary);
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-secondary:hover:not(:disabled) { border-color: var(--accent); background: var(--bg-card-hover); }
.btn-danger {
  background: rgba(239,68,68,0.12);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.25);
}
.btn-danger:hover:not(:disabled) { background: rgba(239,68,68,0.22); }
.btn-sm { padding: 7px 13px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn-loading .btn-text { opacity: 0; }
.btn-loading::after {
  content: '';
  position: absolute;
  width: 17px; height: 17px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ═══════════════════════════════════
   TABLES
═══════════════════════════════════ */
.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13.5px;
}
.data-table th {
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tbody tr { transition: var(--transition); }
.data-table tbody tr:hover td { background: var(--bg-card-hover); color: var(--text-primary); }

/* ═══════════════════════════════════
   BADGES
═══════════════════════════════════ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge-success { background: rgba(34,197,94,0.12);  color: var(--success); }
.badge-danger  { background: rgba(239,68,68,0.12);  color: var(--danger); }
.badge-warning { background: rgba(245,158,11,0.12); color: var(--warning); }
.badge-info    { background: rgba(59,130,246,0.12); color: var(--accent-2); }
.badge-accent  { background: var(--accent-dim);     color: var(--accent); }
.badge-muted   { background: rgba(100,116,139,0.1); color: var(--text-muted); }

/* ═══════════════════════════════════
   MODALS
═══════════════════════════════════ */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(7px);
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: overlayIn 0.2s ease;
}
.modal-overlay.open { display: flex; }
@keyframes overlayIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  width: 100%;
  max-width: 480px;
  position: relative;
  animation: modalIn 0.35s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes modalIn {
  from { opacity: 0; transform: scale(0.91) translateY(22px); }
  to   { opacity: 1; transform: scale(1)    translateY(0); }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.modal-title { font-family: var(--font-display); font-size: 19px; font-weight: 600; }
.modal-close {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 14px;
  color: var(--text-secondary);
  transition: var(--transition);
}
.modal-close:hover { background: var(--danger); color: #fff; border-color: var(--danger); }

/* ═══════════════════════════════════
   TOAST
═══════════════════════════════════ */
.toast-container {
  position: fixed;
  top: 20px; right: 20px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 9px;
  pointer-events: none;
}
.toast {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 13px 16px;
  min-width: 290px;
  max-width: 380px;
  display: flex;
  align-items: flex-start;
  gap: 11px;
  box-shadow: var(--shadow);
  pointer-events: all;
  animation: toastIn 0.38s cubic-bezier(0.16,1,0.3,1) both;
  position: relative;
  overflow: hidden;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateX(80px) scale(0.88); }
  to   { opacity: 1; transform: translateX(0)    scale(1); }
}
.toast.out { animation: toastOut 0.28s ease forwards; }
@keyframes toastOut {
  to { opacity: 0; transform: translateX(80px) scale(0.88); }
}
.toast::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  height: 2px;
  background: var(--tc, var(--accent));
  animation: toastBar 4s linear forwards;
}
@keyframes toastBar { from { width: 100%; } to { width: 0%; } }
.toast-success { --tc: var(--success); }
.toast-error   { --tc: var(--danger); }
.toast-warning { --tc: var(--warning); }
.toast-info    { --tc: var(--accent-2); }
.toast-icon  { font-size: 19px; flex-shrink: 0; margin-top: 1px; }
.toast-content { flex: 1; }
.toast-title { font-weight: 500; font-size: 13.5px; margin-bottom: 1px; }
.toast-msg   { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
.toast-close {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 16px;
  padding: 0;
  margin-left: 8px;
  transition: var(--transition);
  flex-shrink: 0;
}
.toast-close:hover { color: var(--text-primary); }
.toast-out { animation: toastOut 0.28s ease forwards; }

/* ═══════════════════════════════════
   LOADER OVERLAY
═══════════════════════════════════ */
.loader-overlay {
  position: fixed; inset: 0;
  background: rgba(10,13,20,0.82);
  backdrop-filter: blur(8px);
  z-index: 9998;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.loader-overlay.show { display: flex; }
.loader-spinner {
  width: 48px; height: 48px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loader-text { color: var(--text-secondary); font-size: 13.5px; font-weight: 500; }

/* ═══════════════════════════════════
   FILTER BAR
═══════════════════════════════════ */
.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
  flex-wrap: wrap;
}
.filter-chip {
  padding: 7px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  transition: var(--transition);
}
.filter-chip:hover { border-color: var(--accent); color: var(--accent); }
.filter-chip.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }

.search-bar {
  flex: 1;
  max-width: 280px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 13px;
  outline: none;
  transition: var(--transition);
}
.search-bar:focus { border-color: var(--accent); }
.search-bar::placeholder { color: var(--text-muted); }

/* ═══════════════════════════════════
   PAGINATION
═══════════════════════════════════ */
.pagination {
  display: flex; align-items: center;
  justify-content: center;
  gap: 5px; padding: 18px 0;
}
.page-btn {
  width: 34px; height: 34px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; font-size: 13px; font-weight: 500;
  transition: var(--transition);
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); border-color: var(--accent); color: #000; font-weight: 600; }
.page-btn:disabled { opacity: 0.35; cursor: not-allowed; }

/* ═══════════════════════════════════
   SIM CARDS
═══════════════════════════════════ */
.sim-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 18px;
}
.sim-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.sim-card::after {
  content: '';
  position: absolute; top: 0; right: 0;
  width: 100px; height: 100px;
  background: radial-gradient(circle at top right, rgba(0,212,172,0.05), transparent 70%);
  pointer-events: none;
}
.sim-card:hover { border-color: rgba(0,212,172,0.35); transform: translateY(-2px); }
.sim-number {
  font-family: var(--font-display);
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.2px;
}
.sim-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 16px; }
.sim-actions { display: flex; gap: 7px; }
.sim-bar-wrap { background: var(--bg-secondary); height: 5px; border-radius: 999px; overflow: hidden; margin: 9px 0 5px; }
.sim-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #00a8e8);
  border-radius: 999px;
  transition: width 1.1s ease;
}
.sim-bar-labels { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-muted); }
.sim-meta {
  display: flex; gap: 0;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--border);
}
.sim-meta-item { flex: 1; text-align: center; }
.sim-meta-val { font-size: 15px; font-weight: 700; color: var(--accent); font-family: var(--font-display); }
.sim-meta-lbl { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; }
.priority-pill {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 600;
  background: var(--accent-dim); color: var(--accent);
}

/* OTP */
.otp-row { display: flex; gap: 8px; justify-content: center; margin: 12px 0; }
.otp-box {
  width: 50px; height: 58px;
  text-align: center; font-size: 22px; font-weight: 700;
  font-family: var(--font-display);
  background: var(--bg-secondary);
  border: 2px solid var(--border);
  border-radius: 11px;
  color: var(--text-primary);
  outline: none; transition: var(--transition);
  caret-color: var(--accent);
}
.otp-box:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); }

/* Steps */
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 22px; }
.step-dot {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg-secondary); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-muted);
  transition: var(--transition); flex-shrink: 0;
}
.step-dot.active { background: var(--accent); border-color: var(--accent); color: #000; }
.step-dot.done   { background: var(--success); border-color: var(--success); color: #fff; }
.step-line { flex: 1; height: 2px; background: var(--border); border-radius: 1px; transition: background 0.3s; }
.step-line.done { background: var(--success); }

/* ═══════════════════════════════════
   PLANS GRID
═══════════════════════════════════ */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 15px;
}
.plan-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 19px;
  transition: var(--transition);
  cursor: pointer;
  position: relative;
}
.plan-card:hover  { border-color: rgba(0,212,172,0.4); transform: translateY(-2px); }
.plan-card.sel    { border-color: var(--accent); background: var(--accent-dim); }
.plan-card.sel::after {
  content: '✓';
  position: absolute; top: 10px; right: 10px;
  width: 20px; height: 20px;
  background: var(--accent); color: #000;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700;
}
.plan-size {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 700;
  color: var(--accent); letter-spacing: -1px; line-height: 1;
  margin-bottom: 3px;
}
.plan-name  { font-size: 12.5px; color: var(--text-secondary); margin-bottom: 10px; }
.plan-valid { font-size: 11.5px; color: var(--text-muted); margin-bottom: 10px; }
.plan-price-row {
  display: flex; align-items: baseline; gap: 8px;
  padding-top: 11px; border-top: 1px solid var(--border);
}
.plan-price    { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.plan-og-price { font-size: 12px; color: var(--text-muted); text-decoration: line-through; }
.plan-profit   { margin-left: auto; font-size: 11.5px; font-weight: 600; color: var(--success); background: rgba(34,197,94,0.1); padding: 2px 7px; border-radius: 999px; }

/* ═══════════════════════════════════
   CHARTS (CSS-only bar charts)
═══════════════════════════════════ */
.bar-chart {
  display: flex; align-items: flex-end; gap: 10px;
  height: 180px; padding-top: 16px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; }
.bar-fill {
  width: 100%; border-radius: 6px 6px 0 0;
  transition: height 1s cubic-bezier(0.4,0,0.2,1);
  cursor: pointer;
}
.bar-fill:hover { opacity: 0.75; }
.bar-lbl { font-size: 11px; color: var(--text-muted); font-weight: 400; }

/* ═══════════════════════════════════
   API DOCS
═══════════════════════════════════ */
.api-layout { display: grid; grid-template-columns: 220px 1fr; gap: 22px; }
.api-sidebar-nav { position: sticky; top: calc(var(--header-height) + 26px); height: fit-content; }
.api-nav-item {
  padding: 9px 13px; border-radius: 8px;
  font-size: 13px; cursor: pointer;
  color: var(--text-secondary); transition: var(--transition); margin-bottom: 2px;
}
.api-nav-item:hover, .api-nav-item.active { background: var(--accent-dim); color: var(--accent); font-weight: 600; }

.code-block {
  background: #070a11;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden; margin: 11px 0;
}
[data-theme="light"] .code-block { background: #0d1526; }
.code-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 15px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  background: rgba(255,255,255,0.02);
}
.code-lang { font-size: 10.5px; color: var(--text-muted); font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.copy-btn {
  background: none; border: 1px solid var(--border);
  color: var(--text-muted); padding: 3px 9px; border-radius: 6px;
  font-size: 11.5px; cursor: pointer; transition: var(--transition); font-family: var(--font-body);
}
.copy-btn:hover { border-color: var(--accent); color: var(--accent); }
pre { padding: 16px; overflow-x: auto; color: #86efac; font-family: 'Courier New', monospace; font-size: 12.5px; line-height: 1.75; }
.method-pill {
  padding: 3px 8px; border-radius: 5px;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.5px;
}
.m-get    { background: rgba(34,197,94,0.14);  color: var(--success); }
.m-post   { background: rgba(59,130,246,0.14); color: var(--accent-2); }
.m-delete { background: rgba(239,68,68,0.14);  color: var(--danger); }
.m-put    { background: rgba(245,158,11,0.14); color: var(--warning); }
.endpoint-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 14px; margin-bottom: 11px;
  font-family: 'Courier New', monospace; font-size: 13px;
}

/* ═══════════════════════════════════
   SETTINGS
═══════════════════════════════════ */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 20px;
}
.token-row {
  display: flex; align-items: center; gap: 9px;
  background: var(--bg-secondary); border: 1px solid var(--border);
  border-radius: 10px; padding: 11px 14px;
}
.token-val {
  flex: 1; font-family: 'Courier New', monospace;
  font-size: 12.5px; color: var(--text-secondary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ═══════════════════════════════════
   EMPTY STATE
═══════════════════════════════════ */
.empty-state { text-align: center; padding: 55px 20px; }
.empty-icon  { font-size: 44px; margin-bottom: 14px; opacity: 0.35; }
.empty-title { font-size: 15px; font-weight: 500; color: var(--text-secondary); margin-bottom: 5px; }
.empty-sub   { font-size: 13px; color: var(--text-muted); }

/* ═══════════════════════════════════
   QUICK ACTIONS
═══════════════════════════════════ */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.quick-btn {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: block;
}
.quick-btn:hover { border-color: var(--accent); background: var(--accent-dim); transform: translateY(-2px); }
.quick-icon { font-size: 26px; margin-bottom: 9px; display: block; }
.quick-lbl  { font-size: 12.5px; font-weight: 500; color: var(--text-secondary); }

/* ═══════════════════════════════════
   FOCUS & ACCESSIBILITY
═══════════════════════════════════ */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.btn:focus-visible {
  outline-offset: 4px;
}

/* ═══════════════════════════════════
   ANIMATIONS & TRANSITIONS
═══════════════════════════════════ */
@keyframes slideInOpen {
  from { opacity: 0; transform: translateX(-100%); }
  to   { opacity: 1; transform: translateX(0); }
}

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

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes glow {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent); }
  50%      { box-shadow: 0 0 0 10px rgba(0,212,172,0); }
}

.pulse {
  animation: glow 2s ease-out infinite;
}

/* ═══════════════════════════════════
   STATUS INDICATORS
═══════════════════════════════════ */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-transform: uppercase;
}

.badge-success {
  background: rgba(34,197,94,0.15);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.3);
}

.badge-danger {
  background: rgba(239,68,68,0.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.3);
}

.badge-warning {
  background: rgba(245,158,11,0.15);
  color: var(--warning);
  border: 1px solid rgba(245,158,11,0.3);
}

.badge-info {
  background: rgba(59,130,246,0.15);
  color: var(--accent-2);
  border: 1px solid rgba(59,130,246,0.3);
}

.badge-default {
  background: var(--bg-card-hover);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ═══════════════════════════════════
   LOADING STATES
═══════════════════════════════════ */
.spinner-mini {
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid var(--accent-dim);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

.skeleton {
  background: var(--bg-card-hover);
  border-radius: 8px;
  animation: shimmer 2s infinite;
}

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

/* ═══════════════════════════════════
   UTILS
═══════════════════════════════════ */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.flex   { display: flex; }
.flex-c { display: flex; align-items: center; }
.flex-b { display: flex; align-items: center; justify-content: space-between; }
.gap-8  { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.mt-8  { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.mt-20 { margin-top: 20px; }
.mb-8  { margin-bottom: 8px; }
.mb-14 { margin-bottom: 14px; }
.mb-20 { margin-bottom: 20px; }
.w-full { width: 100%; }
.hidden  { display: none !important; }
.text-sm { font-size: 13px; }
.text-xs { font-size: 11.5px; }
.text-accent  { color: var(--accent); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.fw-bold  { font-weight: 600; }
.fw-800   { font-weight: 700; }
.font-d   { font-family: var(--font-display); }
.divider  { height: 1px; background: var(--border); margin: 18px 0; }

/* Additional Utilities */
.p-8  { padding: 8px; }
.p-12 { padding: 12px; }
.p-16 { padding: 16px; }
.p-20 { padding: 20px; }
.pt-8  { padding-top: 8px; }
.pt-12 { padding-top: 12px; }
.pb-8  { padding-bottom: 8px; }
.pb-12 { padding-bottom: 12px; }
.px-8  { padding-left: 8px; padding-right: 8px; }
.px-12 { padding-left: 12px; padding-right: 12px; }
.py-8  { padding-top: 8px; padding-bottom: 8px; }
.py-12 { padding-top: 12px; padding-bottom: 12px; }

.rounded-sm { border-radius: 6px; }
.rounded    { border-radius: var(--radius); }
.rounded-lg { border-radius: var(--radius-lg); }
.rounded-full { border-radius: 999px; }

.shadow-sm   { box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.shadow      { box-shadow: var(--shadow); }
.shadow-lg   { box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.shadow-glow { box-shadow: var(--shadow-glow); }

.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }

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

.inline { display: inline; }
.inline-block { display: inline-block; }
.block { display: block; }

.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }

.border-none { border: none; }
.border      { border: 1px solid var(--border); }

.cursor-pointer { cursor: pointer; }
.cursor-default { cursor: default; }
.cursor-disabled { cursor: not-allowed; }

.transition-fast   { transition: all 0.15s cubic-bezier(0.4,0,0.2,1); }
.transition-normal { transition: var(--transition); }
.transition-slow   { transition: all 0.5s cubic-bezier(0.4,0,0.2,1); }

.no-select { user-select: none; }
.select-all { user-select: all; }

/* ═══════════════════════════════════
   SCROLLBAR
═══════════════════════════════════ */
::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ═══════════════════════════════════
   RESPONSIVE DESIGN
═══════════════════════════════════ */

/* Desktop */
@media (min-width: 1025px) {
  .sidebar {
    transform: translateX(0) !important;
  }
}

/* Tablet & Below */
@media (max-width: 1024px) {
  :root {
    --sidebar-width: 220px;
    --header-height: 64px;
  }
  
  .sidebar { width: var(--sidebar-width); }
  .main-content { margin-left: var(--sidebar-width); }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Small Tablet */
@media (max-width: 768px) {
  :root {
    --sidebar-width: 0;
    --header-height: 60px;
  }

  html, body {
    
    width: 100%;
  }

  .app-layout {
    width: 100%;
  
  }
  
  .sidebar {
    position: fixed;
    width: 260px;
    left: 0;
    transform: translateX(-100%);
    z-index: 200;
    box-shadow: 0 4px 24px rgba(0,0,0,0.4);
    transition: transform 0.3s cubic-bezier(0.4,0,0.2,1);
  }

  .sidebar.active {
    transform: translateX(0);
  }

  .sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
  }

  .sidebar.active + .sidebar-backdrop {
    display: block;
  }

  .main-content {
    margin-left: 0;
    width: 100%;
    
  }

  .sidebar-toggle {
    display: block;
  }

  .header-right {
    gap: 10px;
  }

  .user-info {
    display: none;
  }

  .breadcrumb {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .table-responsive {
    overflow-x: auto;
  }

  .page-content {
    padding: 16px;
    width: 100%;
    max-width: 100%;
    
  }

  .top-header {
    padding: 0 16px;
    width: 100%;
    overflow: hidden;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
    gap: 14px;
  }
}

/* Mobile */
@media (max-width: 480px) {
  :root {
    --header-height: 56px;
  }
  
  body, html {
   
    width: 100%;
  }
  
  .main-content {
    width: 100%;
    margin-left: 0;
    
  }
  
  .app-layout {
    width: 100%;
   
  }
  
  .top-header {
    padding: 0 12px;
    width: 100%;
    overflow: hidden;
  }

  .header-right {
    gap: 8px;
  }

  .wallet-badge {
    padding: 5px 10px;
    font-size: 12px;
  }

  .header-icon-btn {
    width: 34px;
    height: 34px;
    font-size: 16px;
  }

  .user-avatar {
    width: 34px !important;
    height: 34px !important;
    font-size: 12px !important;
  }

  .page-header {
    padding: 14px 12px;
  }

  .page-title {
    font-size: 22px !important;
  }

  .page-subtitle {
    font-size: 13px !important;
  }

  .stat-card {
    padding: 16px !important;
  }

  .stat-icon {
    font-size: 32px !important;
  }

  .stat-value {
    font-size: 18px !important;
  }

  .stat-label {
    font-size: 12px !important;
  }

  .form-control {
    padding: 10px 12px;
    font-size: 16px;
    max-width: 100%;
  }

  .btn {
    padding: 10px 16px;
    font-size: 13px;
    max-width: 100%;
  }

  .btn-sm {
    padding: 6px 10px;
    font-size: 11.5px;
  }

  .table {
    font-size: 12px;
  }

  .table th,
  .table td {
    padding: 10px 8px;
  }

  .modal-content {
    margin: 12px;
    max-width: calc(100% - 24px);
  }

  .toast {
    margin: 8px;
    width: calc(100% - 16px);
  }
  
  .card {
    max-width: 100%;
    
  }
  
  .page-content {
    padding: 12px;
    max-width: 100%;
    width: 100%;
  }
  
  .logo-txt {
    font-size: 20px !important;
  }
  
  .btn {
    padding: 9px 12px;
    font-size: 12px;
  }

  /* DATA TABLE MOBILE STYLES - Keep same as desktop */
  .data-table {
    font-size: 13.5px;
  }

  .data-table th {
    font-size: 10.5px;
    padding: 12px 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
  }

  .data-table td {
    padding: 13px 16px;
    font-size: 13.5px;
  }

  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Print Styles */
@media print {
  .sidebar,
  .top-header,
  .nav-item,
  .btn,
  .sidebar-toggle,
  header {
    display: none !important;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  body {
    background: white;
    color: black;
  }
  
  * {
    box-shadow: none !important;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode preferenceoverride */
@media (prefers-color-scheme: light) {
  :root {
    --bg-primary: #f0f4f8;
    --bg-secondary: #e2e8f0;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border: rgba(0,0,0,0.08);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
  }
}
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ═══════════════════════════════════
   RESPONSIVE
═══════════════════════════════════ */
@media (max-width: 1024px) {
  .api-layout { grid-template-columns: 1fr; }
  .api-sidebar-nav { position: static; }
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 6px 0 40px rgba(0,0,0,0.55);
  }
  .sidebar-backdrop {
    position: fixed; inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99; display: none;
  }
  .sidebar-backdrop.show { display: block; }
  .main-content { margin-left: 0; }
  .sidebar-toggle { display: block; }
  .page-content { padding: 16px;overflow-x: visible !important; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .stat-value { font-size: 22px; }
  .user-info { display: none; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .quick-grid { grid-template-columns: repeat(3, 1fr); }
  .wallet-badge span:last-child { display: none; }
  .toast { min-width: calc(100vw - 40px); }
}

/* =========================================
   🔥 FORCE TABLE TO STAY LIKE DESKTOP
========================================= */

/* Allow global horizontal scroll */
html, body {
  overflow-x: auto !important;
}

/* Remove all layout blocking */
.app-layout,
.main-content,
.page-content,
.card {
  overflow-x: visible !important;
}

/* Table wrapper scroll */
.table-wrap {
  width: 100%;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Force table width */
.data-table {
  min-width: 1200px !important;
  width: max-content !important;
}

/* Prevent table shrinking */
.data-table th,
.data-table td {
  white-space: nowrap;
}

/* Optional: smooth scroll feel */
.table-wrap::-webkit-scrollbar {
  height: 6px;
}

.table-wrap::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 10px;
}
