/* ============================================================
   Bulks Hub — Premium Fintech SaaS Stylesheet
   ============================================================ */

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

/* ============================================================
   1. CSS CUSTOM PROPERTIES
   ============================================================ */
:root {
  /* Brand */
  --primary:        #6366f1;
  --primary-dark:   #4f46e5;
  --primary-light:  #818cf8;
  --secondary:      #0ea5e9;
  --success:        #22c55e;
  --warning:        #f59e0b;
  --danger:         #ef4444;
  --info:           #06b6d4;

  /* Neutrals */
  --dark:           #0f172a;
  --gray-50:        #f8fafc;
  --gray-100:       #f1f5f9;
  --gray-200:       #e2e8f0;
  --gray-300:       #cbd5e1;
  --gray-400:       #94a3b8;
  --gray-500:       #64748b;
  --gray-600:       #475569;
  --gray-700:       #334155;
  --gray-800:       #1e293b;
  --gray-900:       #0f172a;

  /* Semantic */
  --bg-primary:     #ffffff;
  --bg-secondary:   #f8fafc;
  --bg-tertiary:    #f1f5f9;
  --text-primary:   #0f172a;
  --text-secondary: #475569;
  --text-muted:     #94a3b8;
  --border-color:   #e2e8f0;

  /* Shape */
  --radius-sm:      0.375rem;
  --radius:         0.75rem;
  --radius-lg:      1rem;
  --radius-xl:      1.5rem;
  --radius-full:    9999px;

  /* Shadows */
  --shadow-sm:      0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md:      0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
  --shadow-lg:      0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.05);
  --shadow-xl:      0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);

  /* Transitions */
  --transition:     150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-md:  250ms cubic-bezier(0.4, 0, 0.2, 1);

  /* Layout */
  --sidebar-width:  260px;
  --navbar-height:  64px;
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
}

body {
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-secondary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

img, svg { display: block; max-width: 100%; }

ul, ol { list-style: none; }

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

button { cursor: pointer; border: none; background: none; }

h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

p { color: var(--text-secondary); }

hr {
  border: none;
  border-top: 1px solid var(--border-color);
  margin: 1.5rem 0;
}

/* ============================================================
   3. LAYOUT
   ============================================================ */
.container {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.page-wrapper {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Auth layout — centered card */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  background: linear-gradient(135deg, var(--gray-50) 0%, #eef2ff 100%);
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  padding: 2.5rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 2rem;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 0.375rem;
}

.auth-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 2rem;
}

/* ============================================================
   4. NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--navbar-height);
  z-index: 100;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-primary);
  text-decoration: none;
  flex-shrink: 0;
}

.navbar-brand img,
.navbar-brand svg {
  width: 32px;
  height: 32px;
}

.navbar-nav {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  margin-left: auto;
}

.navbar-nav a {
  display: flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.5rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.navbar-nav a:hover,
.navbar-nav a.active {
  color: var(--primary);
  background: #eef2ff;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-left: auto;
}

.navbar-avatar {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

/* Mobile hamburger */
.navbar-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 36px;
  height: 36px;
  padding: 6px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.navbar-toggle:hover { background: var(--gray-100); }

.navbar-toggle span {
  display: block;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-md);
}

.navbar-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.navbar-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.navbar-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   5. SIDEBAR
   ============================================================ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background: var(--dark);
  z-index: 200;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform var(--transition-md);
  scrollbar-width: thin;
  scrollbar-color: var(--gray-700) transparent;
}

.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--gray-700); border-radius: 4px; }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1.25rem 1.25rem 1rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-logo-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.sidebar-logo-text {
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.sidebar-logo-sub {
  font-size: 0.6875rem;
  color: var(--gray-500);
  font-weight: 400;
}

.sidebar-nav {
  flex: 1;
  padding: 1rem 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
}

.sidebar-section-title {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--gray-600);
  padding: 1rem 0.625rem 0.375rem;
  margin-top: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--gray-400);
  text-decoration: none;
  transition: all var(--transition);
  position: relative;
}

.sidebar-link svg,
.sidebar-link .sidebar-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  opacity: 0.7;
  transition: opacity var(--transition);
}

.sidebar-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.06);
}

.sidebar-link:hover svg,
.sidebar-link:hover .sidebar-icon { opacity: 1; }

.sidebar-link.active {
  color: #fff;
  background: rgba(99, 102, 241, 0.2);
}

.sidebar-link.active svg,
.sidebar-link.active .sidebar-icon {
  opacity: 1;
  color: var(--primary-light);
}

.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: var(--primary);
  border-radius: 0 3px 3px 0;
}

.sidebar-badge {
  margin-left: auto;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.125rem 0.5rem;
  border-radius: var(--radius-full);
  background: var(--primary);
  color: #fff;
  line-height: 1.4;
}

.sidebar-badge.badge-danger { background: var(--danger); }
.sidebar-badge.badge-success { background: var(--success); }
.sidebar-badge.badge-warning { background: var(--warning); color: var(--dark); }

.sidebar-footer {
  padding: 1rem 0.75rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-shrink: 0;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.875rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition);
}

.sidebar-user:hover { background: rgba(255,255,255,0.06); }

.sidebar-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  flex-shrink: 0;
}

.sidebar-user-name {
  font-size: 0.8125rem;
  font-weight: 600;
  color: #fff;
  line-height: 1.2;
}

.sidebar-user-role {
  font-size: 0.6875rem;
  color: var(--gray-500);
}

/* ============================================================
   6. MAIN CONTENT
   ============================================================ */
.main-content {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: margin-left var(--transition-md);
}

.main-inner {
  flex: 1;
  padding: 2rem;
}

/* Overlay for mobile sidebar */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 150;
  backdrop-filter: blur(2px);
}

.sidebar-overlay.active { display: block; }

/* ============================================================
   7. CARDS
   ============================================================ */
.card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  gap: 1rem;
}

.card-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.card-subtitle {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

/* Card variants */
.card-flat {
  box-shadow: none;
  border: 1px solid var(--border-color);
}

.card-elevated {
  box-shadow: var(--shadow-lg);
  border: none;
}

/* ============================================================
   8. STAT CARDS
   ============================================================ */
.stat-card {
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-md), transform var(--transition-md);
}

.stat-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.stat-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon-primary  { background: #eef2ff; color: var(--primary); }
.stat-icon-success  { background: #dcfce7; color: var(--success); }
.stat-icon-warning  { background: #fef3c7; color: var(--warning); }
.stat-icon-danger   { background: #fee2e2; color: var(--danger); }
.stat-icon-info     { background: #cffafe; color: var(--info); }
.stat-icon-secondary{ background: #e0f2fe; color: var(--secondary); }

.stat-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.stat-value {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.stat-change {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-full);
}

.stat-change.up   { color: var(--success); background: #dcfce7; }
.stat-change.down { color: var(--danger);  background: #fee2e2; }

.stat-change-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* Gradient stat card variants */
.stat-card-gradient-primary {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  border: none;
  color: #fff;
}

.stat-card-gradient-primary .stat-label,
.stat-card-gradient-primary .stat-value,
.stat-card-gradient-primary .stat-change-label { color: rgba(255,255,255,0.85); }

.stat-card-gradient-success {
  background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
  border: none;
}

.stat-card-gradient-info {
  background: linear-gradient(135deg, var(--secondary) 0%, #0284c7 100%);
  border: none;
}

.stat-card-gradient-warning {
  background: linear-gradient(135deg, var(--warning) 0%, #d97706 100%);
  border: none;
}

/* ============================================================
   9. BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.5625rem 1.125rem;
  border-radius: var(--radius);
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all var(--transition);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.btn:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.btn:disabled,
.btn.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* Variants */
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(99,102,241,0.35);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); box-shadow: none; }

.btn-secondary {
  background: var(--secondary);
  color: #fff;
  border-color: var(--secondary);
}
.btn-secondary:hover {
  background: #0284c7;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(14,165,233,0.35);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success);
  color: #fff;
  border-color: var(--success);
}
.btn-success:hover {
  background: #16a34a;
  border-color: #16a34a;
  box-shadow: 0 4px 12px rgba(34,197,94,0.35);
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}
.btn-danger:hover {
  background: #dc2626;
  border-color: #dc2626;
  box-shadow: 0 4px 12px rgba(239,68,68,0.35);
  transform: translateY(-1px);
}

.btn-warning {
  background: var(--warning);
  color: var(--dark);
  border-color: var(--warning);
}
.btn-warning:hover {
  background: #d97706;
  border-color: #d97706;
  transform: translateY(-1px);
}

.btn-dark {
  background: var(--dark);
  color: #fff;
  border-color: var(--dark);
}
.btn-dark:hover {
  background: var(--gray-800);
  transform: translateY(-1px);
}

/* Outline variants */
.btn-outline {
  background: transparent;
  color: var(--primary);
  border-color: var(--primary);
}
.btn-outline:hover {
  background: #eef2ff;
}

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

/* Ghost */
.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

/* Sizes */
.btn-sm {
  padding: 0.375rem 0.75rem;
  font-size: 0.8125rem;
  border-radius: var(--radius-sm);
}

.btn-lg {
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  border-radius: var(--radius);
}

.btn-xl {
  padding: 0.9375rem 2rem;
  font-size: 1.0625rem;
  border-radius: var(--radius-lg);
}

.btn-block {
  width: 100%;
  display: flex;
}

/* Icon-only button */
.btn-icon {
  padding: 0.5rem;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
}

.btn-icon.btn-sm { width: 30px; height: 30px; padding: 0.375rem; }
.btn-icon.btn-lg { width: 44px; height: 44px; padding: 0.625rem; }

/* Loading state */
.btn.loading {
  color: transparent !important;
  pointer-events: none;
}

.btn.loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.btn-outline.loading::after,
.btn-ghost.loading::after {
  border-color: rgba(99,102,241,0.3);
  border-top-color: var(--primary);
}

/* ============================================================
   10. FORMS
   ============================================================ */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 1.25rem;
}

.form-group:last-child { margin-bottom: 0; }

.form-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
}

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

.form-control {
  width: 100%;
  padding: 0.625rem 0.875rem;
  font-size: 0.9375rem;
  color: var(--text-primary);
  background: var(--bg-primary);
  border: 1.5px solid var(--border-color);
  border-radius: var(--radius);
  transition: border-color var(--transition), box-shadow var(--transition);
  appearance: none;
  -webkit-appearance: none;
  line-height: 1.5;
}

.form-control::placeholder { color: var(--gray-400); }

.form-control:hover { border-color: var(--gray-300); }

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99,102,241,0.12);
}

.form-control:disabled,
.form-control[readonly] {
  background: var(--gray-50);
  color: var(--text-muted);
  cursor: not-allowed;
}

.form-control.is-error {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(239,68,68,0.1);
}

.form-control.is-success {
  border-color: var(--success);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.1);
}

textarea.form-control {
  resize: vertical;
  min-height: 100px;
}

select.form-control {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.875rem center;
  padding-right: 2.5rem;
  cursor: pointer;
}

.form-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-error {
  font-size: 0.8125rem;
  color: var(--danger);
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

/* Input group */
.input-group {
  position: relative;
  display: flex;
  align-items: stretch;
}

.input-group .form-control {
  flex: 1;
}

.input-group-prefix,
.input-group-suffix {
  display: flex;
  align-items: center;
  padding: 0 0.875rem;
  background: var(--gray-50);
  border: 1.5px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.875rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.input-group-prefix {
  border-right: none;
  border-radius: var(--radius) 0 0 var(--radius);
}

.input-group-suffix {
  border-left: none;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.input-group .form-control:not(:first-child) {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

.input-group .form-control:not(:last-child) {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

/* Input with icon */
.input-icon-wrap {
  position: relative;
}

.input-icon-wrap .form-control {
  padding-left: 2.5rem;
}

.input-icon-wrap .input-icon {
  position: absolute;
  left: 0.875rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--gray-400);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

/* Checkbox & Radio */
.form-check {
  display: flex;
  align-items: flex-start;
  gap: 0.625rem;
  cursor: pointer;
}

.form-check input[type="checkbox"],
.form-check input[type="radio"] {
  width: 16px;
  height: 16px;
  margin-top: 0.125rem;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.form-check-label {
  font-size: 0.875rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ============================================================
   11. TABLES
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.875rem;
}

thead {
  background: var(--gray-50);
  border-bottom: 1px solid var(--border-color);
}

thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border-color);
  transition: background var(--transition);
}

tbody tr:last-child { border-bottom: none; }

tbody tr:hover { background: var(--gray-50); }

tbody td {
  padding: 0.875rem 1rem;
  color: var(--text-secondary);
  vertical-align: middle;
}

tbody td strong,
tbody td .td-primary {
  color: var(--text-primary);
  font-weight: 500;
}

.td-mono {
  font-family: 'SF Mono', 'Fira Code', monospace;
  font-size: 0.8125rem;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

/* Sortable header */
th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable:hover { color: var(--text-primary); }

/* ============================================================
   12. BADGES
   ============================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.2rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.badge-dot::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.badge-success  { background: #dcfce7; color: #15803d; }
.badge-warning  { background: #fef3c7; color: #b45309; }
.badge-danger   { background: #fee2e2; color: #b91c1c; }
.badge-info     { background: #cffafe; color: #0e7490; }
.badge-primary  { background: #eef2ff; color: #4338ca; }
.badge-gray     { background: var(--gray-100); color: var(--gray-600); }
.badge-dark     { background: var(--gray-800); color: var(--gray-200); }

/* Solid badges */
.badge-solid-success  { background: var(--success); color: #fff; }
.badge-solid-warning  { background: var(--warning); color: var(--dark); }
.badge-solid-danger   { background: var(--danger);  color: #fff; }
.badge-solid-primary  { background: var(--primary); color: #fff; }
.badge-solid-info     { background: var(--info);    color: #fff; }

/* Network-specific badges */
.badge-mtn    { background: #fef3c7; color: #92400e; }
.badge-airtel { background: #fee2e2; color: #991b1b; }
.badge-glo    { background: #dcfce7; color: #166534; }
.badge-9mobile{ background: #d1fae5; color: #065f46; }

/* ============================================================
   13. ALERTS
   ============================================================ */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  font-size: 0.875rem;
  line-height: 1.5;
}

.alert-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
}

.alert-content { flex: 1; }

.alert-title {
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.alert-success {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #15803d;
}

.alert-warning {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.alert-danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b91c1c;
}

.alert-info {
  background: #f0f9ff;
  border-color: #bae6fd;
  color: #0369a1;
}

.alert-primary {
  background: #eef2ff;
  border-color: #c7d2fe;
  color: #4338ca;
}

.alert-dismissible {
  position: relative;
  padding-right: 3rem;
}

.alert-close {
  position: absolute;
  top: 0.875rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--transition);
  padding: 0;
  line-height: 1;
}

.alert-close:hover { opacity: 1; }

/* ============================================================
   14. MODAL
   ============================================================ */
.modal-overlay {
  display: none; /* hidden by default */
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.open {
  display: flex;
  animation: fadeIn 0.15s ease;
}

.modal {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-xl);
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  animation: slideUp 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.modal-sm { max-width: 380px; }
.modal-lg { max-width: 720px; }
.modal-xl { max-width: 960px; }

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  flex-shrink: 0;
  gap: 1rem;
}

.modal-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--transition);
  flex-shrink: 0;
  background: none;
  border: none;
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
  background: var(--bg-secondary);
}

/* ============================================================
   15. TOAST NOTIFICATIONS
   ============================================================ */
.toast-container {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
  pointer-events: none;
  max-width: 360px;
  width: calc(100vw - 3rem);
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.875rem 1rem;
  background: var(--gray-900);
  color: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-xl);
  pointer-events: all;
  animation: slideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  border-left: 3px solid var(--gray-600);
}

.toast-icon {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 0.1rem;
}

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

.toast-title {
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.3;
}

.toast-message {
  font-size: 0.8125rem;
  color: var(--gray-400);
  margin-top: 0.125rem;
  line-height: 1.4;
}

.toast-close {
  flex-shrink: 0;
  color: var(--gray-500);
  cursor: pointer;
  transition: color var(--transition);
  background: none;
  border: none;
  padding: 0;
  line-height: 1;
}

.toast-close:hover { color: #fff; }

.toast-success { border-left-color: var(--success); }
.toast-success .toast-icon { color: var(--success); }

.toast-error { border-left-color: var(--danger); }
.toast-error .toast-icon { color: var(--danger); }

.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-icon { color: var(--warning); }

.toast-info { border-left-color: var(--info); }
.toast-info .toast-icon { color: var(--info); }

/* Progress bar */
.toast-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  background: currentColor;
  opacity: 0.4;
  border-radius: 0 0 var(--radius) var(--radius);
  animation: toastProgress linear forwards;
}

/* ============================================================
   16. TABS
   ============================================================ */
.tabs {
  display: flex;
  flex-direction: column;
}

.tab-list {
  display: flex;
  align-items: center;
  gap: 0.125rem;
  border-bottom: 2px solid var(--border-color);
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.tab-list::-webkit-scrollbar { display: none; }

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  border: none;
  background: none;
  cursor: pointer;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all var(--transition);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}

.tab-btn:hover {
  color: var(--text-primary);
  background: var(--gray-50);
}

.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  font-weight: 600;
}

.tab-btn .tab-count {
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.1rem 0.4rem;
  border-radius: var(--radius-full);
  background: var(--gray-100);
  color: var(--text-muted);
}

.tab-btn.active .tab-count {
  background: #eef2ff;
  color: var(--primary);
}

.tab-panel {
  display: none;
  padding-top: 1.5rem;
  animation: fadeIn 0.2s ease;
}

.tab-panel.active { display: block; }

/* Pill tabs variant */
.tab-list-pills {
  border-bottom: none;
  background: var(--gray-100);
  padding: 0.25rem;
  border-radius: var(--radius);
  gap: 0.25rem;
  display: inline-flex;
}

.tab-list-pills .tab-btn {
  border-bottom: none;
  margin-bottom: 0;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem;
}

.tab-list-pills .tab-btn.active {
  background: var(--bg-primary);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* ============================================================
   17. GRID UTILITIES
   ============================================================ */
.grid {
  display: grid;
  gap: 1.5rem;
}

.cols-1 { grid-template-columns: repeat(1, 1fr); }
.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-5 { grid-template-columns: repeat(5, 1fr); }
.cols-6 { grid-template-columns: repeat(6, 1fr); }

.col-span-2 { grid-column: span 2; }
.col-span-3 { grid-column: span 3; }
.col-span-4 { grid-column: span 4; }
.col-full   { grid-column: 1 / -1; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* ============================================================
   18. SPACING UTILITIES
   ============================================================ */
.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 0.75rem; }
.mt-4 { margin-top: 1rem; }
.mt-5 { margin-top: 1.25rem; }
.mt-6 { margin-top: 1.5rem; }
.mt-8 { margin-top: 2rem; }
.mt-10{ margin-top: 2.5rem; }
.mt-12{ margin-top: 3rem; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-5 { margin-bottom: 1.25rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mb-8 { margin-bottom: 2rem; }

.ml-auto { margin-left: auto; }
.mr-auto { margin-right: auto; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0  { padding: 0; }
.p-1  { padding: 0.25rem; }
.p-2  { padding: 0.5rem; }
.p-3  { padding: 0.75rem; }
.p-4  { padding: 1rem; }
.p-5  { padding: 1.25rem; }
.p-6  { padding: 1.5rem; }
.p-8  { padding: 2rem; }

.px-2 { padding-left: 0.5rem;  padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem;    padding-right: 1rem; }
.px-6 { padding-left: 1.5rem;  padding-right: 1.5rem; }
.px-8 { padding-left: 2rem;    padding-right: 2rem; }

.py-2 { padding-top: 0.5rem;  padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem;    padding-bottom: 1rem; }
.py-6 { padding-top: 1.5rem;  padding-bottom: 1.5rem; }
.py-8 { padding-top: 2rem;    padding-bottom: 2rem; }

/* ============================================================
   19. TEXT UTILITIES
   ============================================================ */
.text-xs   { font-size: 0.75rem; }
.text-sm   { font-size: 0.875rem; }
.text-base { font-size: 1rem; }
.text-lg   { font-size: 1.125rem; }
.text-xl   { font-size: 1.25rem; }
.text-2xl  { font-size: 1.5rem; }
.text-3xl  { font-size: 1.875rem; }
.text-4xl  { font-size: 2.25rem; }

.font-normal   { font-weight: 400; }
.font-medium   { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold     { font-weight: 700; }
.font-extrabold{ font-weight: 800; }

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

.text-primary   { color: var(--primary) !important; }
.text-secondary { color: var(--secondary) !important; }
.text-success   { color: var(--success) !important; }
.text-warning   { color: var(--warning) !important; }
.text-danger    { color: var(--danger) !important; }
.text-info      { color: var(--info) !important; }
.text-muted     { color: var(--text-muted) !important; }
.text-dark      { color: var(--text-primary) !important; }
.text-white     { color: #fff !important; }

.leading-tight  { line-height: 1.25; }
.leading-snug   { line-height: 1.375; }
.leading-normal { line-height: 1.5; }
.leading-relaxed{ line-height: 1.625; }

.tracking-tight { letter-spacing: -0.025em; }
.tracking-wide  { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

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

.uppercase { text-transform: uppercase; }
.lowercase  { text-transform: lowercase; }
.capitalize { text-transform: capitalize; }

/* ============================================================
   20. FLEX UTILITIES
   ============================================================ */
.flex         { display: flex; }
.inline-flex  { display: inline-flex; }
.flex-col     { flex-direction: column; }
.flex-row     { flex-direction: row; }
.flex-wrap    { flex-wrap: wrap; }
.flex-nowrap  { flex-wrap: nowrap; }
.flex-1       { flex: 1; }
.flex-shrink-0{ flex-shrink: 0; }

.items-start    { align-items: flex-start; }
.items-center   { align-items: center; }
.items-end      { align-items: flex-end; }
.items-stretch  { align-items: stretch; }

.justify-start   { justify-content: flex-start; }
.justify-center  { justify-content: center; }
.justify-end     { justify-content: flex-end; }
.justify-between { justify-content: space-between; }
.justify-around  { justify-content: space-around; }

.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-6 { gap: 1.5rem; }
.gap-8 { gap: 2rem; }

/* Display */
.block        { display: block; }
.inline-block { display: inline-block; }
.hidden       { display: none !important; }

/* Width / Height */
.w-full  { width: 100%; }
.h-full  { height: 100%; }
.w-auto  { width: auto; }
.min-w-0 { min-width: 0; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto   { overflow: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed    { position: fixed; }

/* Border radius */
.rounded-sm   { border-radius: var(--radius-sm); }
.rounded      { border-radius: var(--radius); }
.rounded-lg   { border-radius: var(--radius-lg); }
.rounded-xl   { border-radius: var(--radius-xl); }
.rounded-full { border-radius: var(--radius-full); }

/* ============================================================
   21. STORE / STOREFRONT
   ============================================================ */

/* Hero banner */
.store-hero {
  position: relative;
  min-height: 320px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: var(--radius-xl);
  background: linear-gradient(135deg, var(--dark) 0%, var(--gray-800) 100%);
}

.store-hero-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 0.35;
}

.store-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(99,102,241,0.7) 0%, rgba(15,23,42,0.85) 100%);
}

.store-hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 3rem 2rem;
  color: #fff;
}

.store-hero-title {
  font-size: 2.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
  color: #fff;
}

.store-hero-subtitle {
  font-size: 1.0625rem;
  color: rgba(255,255,255,0.75);
  max-width: 520px;
  margin: 0 auto 1.5rem;
}

/* Store header */
.store-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: var(--bg-primary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-color);
  margin-bottom: 2rem;
}

.store-logo {
  width: 72px;
  height: 72px;
  border-radius: var(--radius);
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid var(--border-color);
}

.store-info-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-primary);
}

.store-info-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

/* Bundle grid */
.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}

/* Bundle card */
.bundle-card {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-md);
  cursor: pointer;
  display: flex;
  flex-direction: column;
}

.bundle-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
  border-color: var(--primary);
}

.bundle-card-header {
  padding: 1.25rem 1.25rem 0.75rem;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
}

.bundle-card-body {
  padding: 0 1.25rem 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.bundle-card-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--border-color);
  background: var(--gray-50);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.bundle-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
}

.bundle-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.bundle-price {
  font-size: 1.375rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.bundle-price-original {
  font-size: 0.875rem;
  color: var(--text-muted);
  text-decoration: line-through;
  font-weight: 400;
}

.bundle-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
}

/* Network color badges */
.bundle-badge-mtn     { background: #fef3c7; color: #92400e; }
.bundle-badge-airtel  { background: #fee2e2; color: #991b1b; }
.bundle-badge-glo     { background: #dcfce7; color: #166534; }
.bundle-badge-9mobile { background: #d1fae5; color: #065f46; }
.bundle-badge-data    { background: #eef2ff; color: #4338ca; }
.bundle-badge-sms     { background: #fdf4ff; color: #7e22ce; }
.bundle-badge-airtime { background: #fff7ed; color: #c2410c; }

/* Checkout form */
.checkout-form {
  background: var(--bg-primary);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border-color);
  overflow: hidden;
}

.checkout-form-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
  background: var(--gray-50);
}

.checkout-form-body {
  padding: 1.5rem;
}

.checkout-summary {
  background: var(--gray-50);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.5rem;
}

.checkout-summary-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  padding: 0.375rem 0;
}

.checkout-summary-row.total {
  border-top: 1px solid var(--border-color);
  margin-top: 0.5rem;
  padding-top: 0.75rem;
  font-weight: 700;
  font-size: 1rem;
  color: var(--text-primary);
}

/* ============================================================
   22. DASHBOARD SPECIFIC
   ============================================================ */

/* Dashboard header */
.dash-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.dash-header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: -0.02em;
}

.dash-header-subtitle {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.dash-header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  flex-shrink: 0;
}

/* Quick actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.875rem;
}

.quick-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
  padding: 1.25rem 1rem;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--transition-md);
  text-decoration: none;
  text-align: center;
}

.quick-action-btn:hover {
  border-color: var(--primary);
  background: #eef2ff;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.quick-action-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gray-100);
  color: var(--text-secondary);
  transition: all var(--transition);
}

.quick-action-btn:hover .quick-action-icon {
  background: var(--primary);
  color: #fff;
}

.quick-action-label {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Activity feed */
.activity-feed {
  display: flex;
  flex-direction: column;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
}

.activity-item:last-child { border-bottom: none; }

.activity-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.875rem;
}

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

.activity-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}

.activity-desc {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-top: 0.125rem;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
}

.activity-amount {
  font-size: 0.875rem;
  font-weight: 600;
  flex-shrink: 0;
}

.activity-amount.credit { color: var(--success); }
.activity-amount.debit  { color: var(--danger); }

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  text-align: center;
  gap: 1rem;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-xl);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}

.empty-state-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.empty-state-desc {
  font-size: 0.875rem;
  color: var(--text-muted);
  max-width: 320px;
}

/* Progress bar */
.progress {
  height: 8px;
  background: var(--gray-100);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  border-radius: var(--radius-full);
  background: var(--primary);
  transition: width 0.5s ease;
}

.progress-bar-success { background: var(--success); }
.progress-bar-warning { background: var(--warning); }
.progress-bar-danger  { background: var(--danger); }
.progress-bar-info    { background: var(--info); }

/* Divider */
.divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--text-muted);
  font-size: 0.8125rem;
}

.divider::before,
.divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border-color);
}

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

.skeleton-text  { height: 0.875rem; border-radius: var(--radius-sm); }
.skeleton-title { height: 1.25rem; border-radius: var(--radius-sm); }
.skeleton-avatar{ border-radius: var(--radius-full); }

/* ============================================================
   23. DARK MODE
   ============================================================ */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-primary:     #1e293b;
    --bg-secondary:   #0f172a;
    --bg-tertiary:    #1e293b;
    --text-primary:   #f1f5f9;
    --text-secondary: #94a3b8;
    --text-muted:     #64748b;
    --border-color:   #334155;
  }

  body { background-color: var(--bg-secondary); }

  .card,
  .auth-card,
  .bundle-card,
  .checkout-form,
  .store-header,
  .quick-action-btn {
    background: var(--bg-primary);
    border-color: var(--border-color);
  }

  .card-footer,
  .modal-footer,
  .bundle-card-footer,
  .checkout-form-header,
  .checkout-summary {
    background: var(--bg-secondary);
  }

  .navbar {
    background: rgba(15, 23, 42, 0.9);
    border-bottom-color: var(--border-color);
  }

  .form-control {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-primary);
  }

  .form-control:focus {
    border-color: var(--primary);
    background: var(--bg-primary);
  }

  select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748b' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  }

  .input-group-prefix,
  .input-group-suffix {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
  }

  thead { background: var(--bg-secondary); }
  tbody tr:hover { background: rgba(255,255,255,0.03); }

  .tab-btn:hover { background: rgba(255,255,255,0.05); }

  .tab-list-pills { background: var(--bg-secondary); }
  .tab-list-pills .tab-btn.active { background: var(--bg-primary); }

  .modal { background: var(--bg-primary); }
  .modal-header { border-bottom-color: var(--border-color); }
  .modal-footer { background: var(--bg-secondary); border-top-color: var(--border-color); }

  .quick-action-icon { background: var(--bg-secondary); }
  .quick-action-btn:hover { background: rgba(99,102,241,0.1); }

  .stat-card { background: var(--bg-primary); border-color: var(--border-color); }

  .skeleton {
    background: linear-gradient(90deg, var(--gray-800) 25%, var(--gray-700) 50%, var(--gray-800) 75%);
    background-size: 200% 100%;
  }

  .auth-wrapper {
    background: linear-gradient(135deg, var(--bg-secondary) 0%, #1a1f35 100%);
  }

  .badge-success  { background: rgba(34,197,94,0.15);  color: #4ade80; }
  .badge-warning  { background: rgba(245,158,11,0.15); color: #fbbf24; }
  .badge-danger   { background: rgba(239,68,68,0.15);  color: #f87171; }
  .badge-info     { background: rgba(6,182,212,0.15);  color: #22d3ee; }
  .badge-primary  { background: rgba(99,102,241,0.15); color: #818cf8; }
  .badge-gray     { background: var(--gray-800); color: var(--gray-400); }

  .alert-success { background: rgba(34,197,94,0.1);  border-color: rgba(34,197,94,0.25);  color: #4ade80; }
  .alert-warning { background: rgba(245,158,11,0.1); border-color: rgba(245,158,11,0.25); color: #fbbf24; }
  .alert-danger  { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.25);  color: #f87171; }
  .alert-info    { background: rgba(6,182,212,0.1);  border-color: rgba(6,182,212,0.25);  color: #22d3ee; }
  .alert-primary { background: rgba(99,102,241,0.1); border-color: rgba(99,102,241,0.25); color: #818cf8; }

  .stat-icon-primary   { background: rgba(99,102,241,0.15); }
  .stat-icon-success   { background: rgba(34,197,94,0.15); }
  .stat-icon-warning   { background: rgba(245,158,11,0.15); }
  .stat-icon-danger    { background: rgba(239,68,68,0.15); }
  .stat-icon-info      { background: rgba(6,182,212,0.15); }
  .stat-icon-secondary { background: rgba(14,165,233,0.15); }

  .progress { background: var(--gray-800); }

  .empty-state-icon { background: var(--bg-secondary); }
}

/* ============================================================
   24. RESPONSIVE — MOBILE
   ============================================================ */
@media (max-width: 1024px) {
  .cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cols-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  /* Sidebar collapses off-screen */
  .sidebar {
    transform: translateX(-100%);
    z-index: 300;
  }

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

  /* Main content takes full width */
  .main-content {
    margin-left: 0;
  }

  /* Navbar shows toggle */
  .navbar-toggle {
    display: flex;
  }

  .navbar-nav {
    display: none;
  }

  /* Grids stack */
  .cols-2,
  .cols-3,
  .cols-4,
  .cols-5,
  .cols-6 {
    grid-template-columns: 1fr;
  }

  .col-span-2,
  .col-span-3,
  .col-span-4 {
    grid-column: span 1;
  }

  /* Main inner padding */
  .main-inner {
    padding: 1.25rem 1rem;
  }

  /* Dash header stacks */
  .dash-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dash-header-title { font-size: 1.25rem; }

  /* Stat cards */
  .stat-value { font-size: 1.5rem; }

  /* Auth card */
  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  /* Modal */
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-width: 100%;
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    max-height: 92vh;
    animation: slideUp 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  /* Toast */
  .toast-container {
    bottom: 0;
    right: 0;
    left: 0;
    max-width: 100%;
    width: 100%;
    padding: 0 0 env(safe-area-inset-bottom);
    border-radius: 0;
  }

  .toast {
    border-radius: 0;
  }

  /* Store hero */
  .store-hero-title { font-size: 1.5rem; }

  /* Bundle grid */
  .bundle-grid {
    grid-template-columns: 1fr;
  }

  /* Quick actions */
  .quick-actions {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Table */
  .table-wrap { border-radius: var(--radius); }

  /* Tabs scroll */
  .tab-list { flex-wrap: nowrap; }

  /* Store header */
  .store-header {
    flex-direction: column;
    align-items: flex-start;
  }

  /* Checkout */
  .checkout-form-body { padding: 1.25rem; }

  /* Buttons */
  .btn-lg { padding: 0.6875rem 1.25rem; font-size: 0.9375rem; }
}

@media (max-width: 480px) {
  .quick-actions {
    grid-template-columns: repeat(2, 1fr);
  }

  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .card-body { padding: 1.25rem; }
  .card-header { padding: 1rem 1.25rem; }
}

/* ============================================================
   25. ANIMATIONS & KEYFRAMES
   ============================================================ */
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeOut {
  from { opacity: 1; }
  to   { opacity: 0; }
}

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

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

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

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

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.5; }
}

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

@keyframes toastProgress {
  from { width: 100%; }
  to   { width: 0%; }
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Animation utility classes */
.animate-fade-in    { animation: fadeIn 0.2s ease; }
.animate-slide-up   { animation: slideUp 0.25s ease; }
.animate-slide-down { animation: slideDown 0.2s ease; }
.animate-spin       { animation: spin 1s linear infinite; }
.animate-pulse      { animation: pulse 2s ease-in-out infinite; }
.animate-bounce     { animation: bounce 1s ease-in-out infinite; }
.animate-shimmer    { animation: shimmer 1.5s infinite; }

/* Loading spinner standalone */
.spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-color);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

.spinner-sm { width: 14px; height: 14px; border-width: 2px; }
.spinner-lg { width: 32px; height: 32px; border-width: 3px; }
.spinner-white {
  border-color: rgba(255,255,255,0.3);
  border-top-color: #fff;
}

/* Page loading overlay */
.page-loader {
  position: fixed;
  inset: 0;
  background: var(--bg-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeOut 0.3s ease 0.5s forwards;
}

/* ============================================================
   26. MISCELLANEOUS COMPONENTS
   ============================================================ */

/* Dropdown */
.dropdown {
  position: relative;
  display: inline-flex;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  right: 0;
  min-width: 200px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  z-index: 500;
  padding: 0.375rem;
  animation: slideDown 0.15s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
}

.dropdown-item:hover {
  background: var(--gray-50);
  color: var(--text-primary);
}

.dropdown-item.danger:hover {
  background: #fef2f2;
  color: var(--danger);
}

.dropdown-divider {
  height: 1px;
  background: var(--border-color);
  margin: 0.375rem 0;
}

/* Tooltip */
[data-tooltip] {
  position: relative;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--gray-900);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.3rem 0.625rem;
  border-radius: var(--radius-sm);
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--transition);
  z-index: 1000;
}

[data-tooltip]:hover::after { opacity: 1; }

/* Copy button */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.25rem 0.625rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--gray-100);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition);
}

.copy-btn:hover {
  background: var(--gray-200);
  color: var(--text-primary);
}

.copy-btn.copied {
  color: var(--success);
  background: #dcfce7;
  border-color: #bbf7d0;
}

/* Code block */
.code-block {
  background: var(--gray-900);
  color: var(--gray-100);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
  font-size: 0.8125rem;
  line-height: 1.6;
  overflow-x: auto;
}

/* Avatar group */
.avatar-group {
  display: flex;
  align-items: center;
}

.avatar-group .avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid var(--bg-primary);
  margin-left: -8px;
  background: var(--gray-200);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  overflow: hidden;
  flex-shrink: 0;
}

.avatar-group .avatar:first-child { margin-left: 0; }

/* Step indicator */
.steps {
  display: flex;
  align-items: center;
  gap: 0;
}

.step {
  display: flex;
  align-items: center;
  flex: 1;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  border: 2px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-primary);
  flex-shrink: 0;
  transition: all var(--transition-md);
}

.step.active .step-circle {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.step.done .step-circle {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.step-line {
  flex: 1;
  height: 2px;
  background: var(--border-color);
  transition: background var(--transition-md);
}

.step.done .step-line { background: var(--success); }

.step-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.375rem;
  text-align: center;
}

.step.active .step-label { color: var(--primary); }
.step.done .step-label   { color: var(--success); }

/* KYC / Upload zone */
.upload-zone {
  border: 2px dashed var(--border-color);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  text-align: center;
  cursor: pointer;
  transition: all var(--transition-md);
  background: var(--bg-secondary);
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--primary);
  background: #eef2ff;
}

.upload-zone-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  background: var(--gray-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--text-muted);
}

.upload-zone-title {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.upload-zone-hint {
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.page-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  background: var(--bg-primary);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}

.page-btn:hover {
  background: var(--gray-50);
  color: var(--text-primary);
}

.page-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.page-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   END OF STYLESHEET
   ============================================================ */
