/* ============================================================
   admin.css — Master Stylesheet
   Place in: /admin/assets/css/admin.css
   Glassmorphism | Light/Dark Mode | Responsive
   ============================================================ */

/* ── Google Fonts loaded in header.php ─────────────────────── */

/* ── CSS Variables ──────────────────────────────────────────── */
:root {
  /* Light mode (default) */
  --bg-deep:         #f8faff;
  --bg-mid:          #ffffff;
  --sidebar-bg:      rgba(255, 255, 255, 0.85);
  --topbar-bg:       rgba(255, 255, 255, 0.75);
  --glass-bg:        rgba(255, 255, 255, 0.6);
  --glass-bg-hover:  rgba(255, 255, 255, 0.8);
  --glass-border:    rgba(0, 0, 0, 0.06);
  --glass-border-lg: rgba(0, 0, 0, 0.1);

  /* Accent palette */
  --accent:          #1A6FE8;
  --accent-2:        #4E96F4;
  --accent-3:        #38bdf8;
  --accent-glow:     rgba(26, 111, 232, 0.15);
  --pink:            #EC4899;
  --teal:            #2dd4bf;

  /* Status */
  --success:         #10B981;
  --success-bg:      rgba(16, 185, 129, 0.1);
  --success-border:  rgba(16, 185, 129, 0.2);
  --warning:         #F0A500;
  --warning-bg:      rgba(240, 165, 0, 0.1);
  --warning-border:  rgba(240, 165, 0, 0.2);
  --danger:          #EF4444;
  --danger-bg:       rgba(239, 68, 68, 0.1);
  --danger-border:   rgba(239, 68, 68, 0.2);
  --info:            #06B6D4;
  --info-bg:         rgba(6, 182, 212, 0.1);
  --info-border:     rgba(6, 182, 212, 0.2);

  /* Text */
  --text-primary:    #1e293b;
  --text-secondary:  #475569;
  --text-muted:      #64748b;

  /* Layout */
  --sidebar-width:   260px;
  --topbar-h:        68px;
  --radius-sm:       10px;
  --radius-md:       16px;
  --radius-lg:       22px;
  --radius-xl:       28px;

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

/* Dark mode */
@media (prefers-color-scheme: dark) {
  :root {
    --bg-deep:         #e0e1ec;
    --bg-mid:          #d7dae8;
    --sidebar-bg:      rgba(8, 10, 30, 0.85);
    --topbar-bg:       rgba(8, 10, 30, 0.75);
    --glass-bg:        rgba(255,255,255,0.05);
    --glass-bg-hover:  rgba(255,255,255,0.08);
    --glass-border:    rgba(255,255,255,0.1);
    --glass-border-lg: rgba(255,255,255,0.14);
    
    --text-primary:    #eeeeff;
    --text-secondary:  #8a8aab;
    --text-muted:      #55556a;
  }
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg-deep);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background-color 0.3s ease, color 0.2s ease;
}

a { text-decoration: none; color: inherit; }
img { max-width: 100%; display: block; }
button { cursor: pointer; background: none; border: none; }

/* ── Background Scene ───────────────────────────────────────── */
.bg-scene {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.22;
  animation: orbDrift 18s ease-in-out infinite alternate;
}

.orb-a {
  width: 700px; height: 700px;
  background: radial-gradient(circle, #1A6FE8, #4E96F4);
  top: -250px; left: -200px;
  animation-duration: 20s;
}

.orb-b {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #E8621A, #F48340);
  bottom: -180px; right: -150px;
  animation-duration: 16s;
  animation-delay: -8s;
}

@keyframes orbDrift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(50px, 40px) scale(1.07); }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(26,111,232,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(26,111,232,0.03) 1px, transparent 1px);
  background-size: 52px 52px;
}

/* ═══════════════════════════════════════════════════════════
   SIDEBAR
════════════════════════════════════════════════════════════ */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-width);
  z-index: 100;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--glass-border);
  backdrop-filter: blur(32px) saturate(160%);
  -webkit-backdrop-filter: blur(32px) saturate(160%);
  display: flex;
  flex-direction: column;
  transition: transform var(--transition);
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--accent) transparent;
}

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

.brand-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 16px;
  color: #fff;
  box-shadow: 0 0 20px var(--accent-glow);
  flex-shrink: 0;
}

.brand-text strong {
  display: block;
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.3px;
}

.brand-text span {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent-2);
}

.sidebar-close {
  display: none;
  margin-left: auto;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-secondary);
  width: 30px; height: 30px;
  font-size: 14px;
  transition: all var(--transition);
}
.sidebar-close:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger-border); }

/* Sidebar mini-profile */
.sidebar-profile {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.sp-avatar {
  position: relative;
  flex-shrink: 0;
}

.sp-avatar img {
  width: 38px; height: 38px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border-lg);
}

.sp-dot {
  position: absolute;
  bottom: 1px; right: 1px;
  width: 9px; height: 9px;
  background: var(--success);
  border-radius: 50%;
  border: 2px solid var(--bg-deep);
}

.sp-info strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

.sp-info span {
  font-size: 11px;
  color: var(--accent-2);
  font-weight: 500;
}

/* Navigation */
.sidebar-nav {
  flex: 1;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 14px 10px 6px;
}

.nav-section-label:first-child { padding-top: 0; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 13.5px;
  font-weight: 500;
  position: relative;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.nav-item:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border);
}

.nav-item.active {
  background: rgba(26, 111, 232, 0.1);
  color: var(--accent);
  border-color: rgba(26, 111, 232, 0.2);
}

.nav-icon {
  width: 32px; height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: var(--glass-bg);
  flex-shrink: 0;
  transition: all var(--transition);
}

.nav-item.active .nav-icon {
  background: rgba(26, 111, 232, 0.15);
  color: var(--accent);
}

.nav-label { flex: 1; }

.nav-badge {
  background: rgba(26, 111, 232, 0.1);
  color: var(--accent);
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  min-width: 22px;
  text-align: center;
}

.nav-active-pill {
  position: absolute;
  right: -1px;
  top: 50%; transform: translateY(-50%);
  width: 3px;
  height: 60%;
  background: linear-gradient(to bottom, var(--accent), var(--accent-2));
  border-radius: 10px 0 0 10px;
}

/* Sidebar footer */
.sidebar-footer {
  padding: 16px 12px 24px;
  border-top: 1px solid var(--glass-border);
  flex-shrink: 0;
}

.logout-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  color: var(--danger);
  font-size: 13.5px;
  font-weight: 500;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  transition: all var(--transition);
  width: 100%;
}

.logout-btn:hover {
  background: rgba(239, 68, 68, 0.15);
  transform: translateX(3px);
}

/* Overlay (mobile) */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 99;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity var(--transition);
}

.sidebar-overlay.show {
  opacity: 1;
}

/* ═══════════════════════════════════════════════════════════
   MAIN WRAPPER
════════════════════════════════════════════════════════════ */
.main-wrapper {
  margin-left: var(--sidebar-width);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

/* ═══════════════════════════════════════════════════════════
   TOPBAR
════════════════════════════════════════════════════════════ */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--topbar-h);
  background: var(--topbar-bg);
  border-bottom: 1px solid var(--glass-border);
  backdrop-filter: blur(24px) saturate(150%);
  -webkit-backdrop-filter: blur(24px) saturate(150%);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  gap: 16px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.menu-toggle {
  display: none;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  font-size: 14px;
  transition: all var(--transition);
}
.menu-toggle:hover { background: var(--glass-bg-hover); color: var(--text-primary); }

.topbar-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.bc-root { color: var(--accent); }
.bc-sep  { font-size: 9px; }
.bc-current { color: var(--text-primary); font-weight: 600; }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Search */
.topbar-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 0 14px;
  height: 36px;
  transition: all var(--transition);
}

.topbar-search:focus-within {
  border-color: var(--accent);
  background: rgba(26, 111, 232, 0.05);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.topbar-search i {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
}

.topbar-search input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  width: 180px;
}

.topbar-search input::placeholder { color: var(--text-muted); }

/* Icon buttons */
.topbar-btn {
  position: relative;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  font-size: 14px;
  display: grid;
  place-items: center;
  transition: all var(--transition);
}

.topbar-btn:hover { background: var(--glass-bg-hover); color: var(--text-primary); }

.topbar-btn-dot {
  position: absolute;
  top: 7px; right: 7px;
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  border: 1.5px solid var(--bg-deep);
}

/* Admin dropdown trigger */
.topbar-admin {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 12px 5px 5px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  cursor: pointer;
  position: relative;
  transition: all var(--transition);
  user-select: none;
}

.topbar-admin:hover { background: var(--glass-bg-hover); }

.topbar-avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--glass-border-lg);
}

.topbar-admin-info {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.topbar-admin-info strong {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}

.topbar-admin-info span {
  font-size: 10px;
  color: var(--accent);
  font-weight: 500;
}

.topbar-chevron {
  font-size: 10px;
  color: var(--text-secondary);
  transition: transform var(--transition);
}
.topbar-chevron.rotated { transform: rotate(180deg); }

/* Dropdown */
.admin-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 190px;
  background: var(--sidebar-bg);
  border: 1px solid var(--glass-border-lg);
  border-radius: var(--radius-md);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
  z-index: 200;
  animation: dropIn 0.2s ease;
}

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

.admin-dropdown.show { display: block; }

.admin-dropdown a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 16px;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.admin-dropdown a i { width: 16px; text-align: center; }
.admin-dropdown a:hover { background: var(--glass-bg); color: var(--text-primary); }

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

.dd-danger { color: var(--danger) !important; }
.dd-danger:hover { background: var(--danger-bg) !important; }

/* ═══════════════════════════════════════════════════════════
   PAGE CONTENT
════════════════════════════════════════════════════════════ */
.page-content {
  flex: 1;
  padding: 32px 28px;
  position: relative;
  z-index: 2;
}

/* ── Page Header ────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 32px;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.5s ease both;
}

.page-header-left h1 {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.page-header-left p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-top: 4px;
}

.page-header-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

/* ── Glass Card ─────────────────────────────────────────────── */
.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  padding: 28px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.05);
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
}

.glass-card:hover {
  box-shadow: 0 12px 48px rgba(0,0,0,0.08);
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
}

/* ── Stat Cards ─────────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px;
  margin-bottom: 28px;
}

.stat-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 22px 24px;
  display: flex;
  align-items: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  transition: all var(--transition);
  animation: fadeUp 0.5s ease both;
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: var(--glass-border-lg);
  box-shadow: 0 12px 40px rgba(0,0,0,0.06);
}

.stat-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), transparent);
  pointer-events: none;
}

.stat-icon {
  width: 52px; height: 52px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.stat-icon.purple  { background: rgba(26, 111, 232, 0.1); color: var(--accent); }
.stat-icon.teal    { background: rgba(45,212,191,0.1); color: var(--teal); }
.stat-icon.pink    { background: rgba(236,72,153,0.1); color: var(--pink); }
.stat-icon.amber   { background: rgba(240,165,0,0.1); color: var(--warning); }
.stat-icon.red     { background: rgba(239,68,68,0.1); color: var(--danger); }
.stat-icon.blue    { background: rgba(6,182,212,0.1); color: var(--info); }

.stat-body { flex: 1; position: relative; z-index: 1; }

.stat-value {
  font-family: 'Syne', sans-serif;
  font-size: 30px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -1px;
  line-height: 1;
}

.stat-label {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  font-weight: 500;
  letter-spacing: 0.2px;
}

.stat-delta {
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }
.stat-delta.neutral { color: var(--text-muted); }

/* ── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: var(--radius-sm);
  font-family: 'DM Sans', sans-serif;
  font-size: 13.5px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 20px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px var(--accent-glow);
}

.btn-glass {
  background: var(--glass-bg);
  border-color: var(--glass-border);
  color: var(--text-secondary);
}
.btn-glass:hover {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
  border-color: var(--glass-border-lg);
  transform: translateY(-2px);
}

.btn-danger {
  background: var(--danger-bg);
  border-color: var(--danger-border);
  color: var(--danger);
}
.btn-danger:hover {
  background: rgba(239,68,68,0.15);
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success-bg);
  border-color: var(--success-border);
  color: var(--success);
}
.btn-success:hover { 
  background: rgba(16,185,129,0.15); 
  transform: translateY(-1px);
}

.btn-sm { padding: 6px 12px; font-size: 12px; border-radius: 8px; }
.btn-lg { padding: 13px 26px; font-size: 15px; border-radius: 13px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; border-radius: 9px; }

/* ── Table ──────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--glass-border);
  background: var(--glass-bg);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.admin-table thead th {
  background: rgba(0, 0, 0, 0.02);
  padding: 13px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 1px solid var(--glass-border);
  white-space: nowrap;
}

.admin-table tbody td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--glass-border);
  color: var(--text-secondary);
  vertical-align: middle;
}

.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-table tbody tr {
  transition: background var(--transition);
  cursor: pointer;
}

.admin-table tbody tr:hover td {
  background: var(--glass-bg-hover);
  color: var(--text-primary);
}

/* ── Badges / Status Pills ──────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 30px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  border: 1px solid transparent;
}

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

.badge-active   { background: rgba(16,185,129,0.1);  border-color: rgba(16,185,129,0.2);  color: var(--success); }
.badge-inactive { background: rgba(100,116,139,0.1); border-color: rgba(100,116,139,0.2); color: var(--text-secondary); }
.badge-banned   { background: rgba(239,68,68,0.1);   border-color: rgba(239,68,68,0.2);   color: var(--danger); }
.badge-pending  { background: rgba(240,165,0,0.1);   border-color: rgba(240,165,0,0.2);   color: var(--warning); }
.badge-admin    { background: rgba(26,111,232,0.1);  border-color: rgba(26,111,232,0.2);  color: var(--accent); }
.badge-super    { background: rgba(236,72,153,0.1);  border-color: rgba(236,72,153,0.2);  color: var(--pink); }

/* ── Form Elements ──────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }

.form-label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  padding: 11px 14px;
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all var(--transition);
}

.form-control::placeholder { color: var(--text-muted); }

.form-control:focus {
  border-color: var(--accent);
  background: rgba(26,111,232,0.03);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

select.form-control {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 4l4 4 4-4' stroke='%2364748b' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 12px;
  padding-right: 36px;
  cursor: pointer;
}

select.form-control option {
  background: var(--bg-mid);
  color: var(--text-primary);
}

/* ── Flash Alerts ───────────────────────────────────────────── */
.flash-alert {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 13.5px;
  margin-bottom: 24px;
  animation: fadeUp 0.4s ease both;
  border: 1px solid transparent;
}

.flash-alert i { margin-top: 1px; flex-shrink: 0; font-size: 15px; }

.flash-success { background: rgba(16,185,129,0.1); border-color: rgba(16,185,129,0.2); color: var(--success); }
.flash-error   { background: rgba(239,68,68,0.1);  border-color: rgba(239,68,68,0.2);  color: var(--danger); }
.flash-warning { background: rgba(240,165,0,0.1);  border-color: rgba(240,165,0,0.2);  color: var(--warning); }
.flash-info    { background: rgba(6,182,212,0.1);  border-color: rgba(6,182,212,0.2);  color: var(--info); }

/* ── Avatar ─────────────────────────────────────────────────── */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--glass-border-lg);
  flex-shrink: 0;
}

.avatar-sm { width: 32px; height: 32px; }
.avatar-md { width: 44px; height: 44px; }
.avatar-lg { width: 64px; height: 64px; }
.avatar-xl { width: 88px; height: 88px; border-width: 3px; }

/* ── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.page-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  transition: all var(--transition);
  text-decoration: none;
}

.page-link:hover { 
  background: var(--glass-bg-hover); 
  color: var(--text-primary);
  transform: translateY(-2px);
}
.page-link.active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  font-weight: 700;
}

/* ── Animations ─────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.anim-delay-1 { animation-delay: 0.05s; }
.anim-delay-2 { animation-delay: 0.10s; }
.anim-delay-3 { animation-delay: 0.15s; }
.anim-delay-4 { animation-delay: 0.20s; }
.anim-delay-5 { animation-delay: 0.25s; }

/* ── Utility ────────────────────────────────────────────────── */
.text-muted    { color: var(--text-muted); }
.text-secondary{ color: var(--text-secondary); }
.text-primary  { color: var(--text-primary); }
.text-accent   { color: var(--accent); }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.fw-bold       { font-weight: 700; }
.fw-semi       { font-weight: 600; }
.font-display  { font-family: 'Syne', sans-serif; }
.d-flex        { display: flex; }
.align-center  { align-items: center; }
.gap-2         { gap: 8px; }
.gap-3         { gap: 12px; }
.mt-1          { margin-top: 6px; }
.mt-2          { margin-top: 12px; }
.mt-3          { margin-top: 24px; }
.mb-2          { margin-bottom: 12px; }
.mb-3          { margin-bottom: 24px; }
.m-0           { margin: 0; }
.p-0           { padding: 0; }

/* ── Section Divider ────────────────────────────────────────── */
.section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
  margin: 28px 0;
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  .topbar-search input { width: 140px; }
  .topbar-admin-info   { display: none; }
}

@media (max-width: 768px) {
  /* Sidebar becomes a slide-in drawer */
  .sidebar {
    transform: translateX(-100%);
    box-shadow: none;
  }
  .sidebar.open {
    transform: translateX(0);
    box-shadow: 8px 0 40px rgba(0,0,0,0.1);
  }
  .sidebar-close  { display: grid; }
  .sidebar-overlay { display: block; }

  .main-wrapper { margin-left: 0; }

  .menu-toggle { display: grid; }

  .topbar-search { display: none; }

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

  .page-header { flex-direction: column; }
  .page-header-right { width: 100%; }

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

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .topbar { padding: 0 16px; }
  
  .page-header-left h1 {
    font-size: 24px;
  }
  
  .btn-sm {
    padding: 4px 10px;
  }
}

/* Dark mode specific adjustments */
@media (prefers-color-scheme: dark) {
  .glass-card {
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
  }
  
  .glass-card:hover {
    box-shadow: 0 12px 48px rgba(0,0,0,0.4);
  }
  
  .stat-card::after {
    background: linear-gradient(135deg, rgba(255,255,255,0.03), transparent);
  }
  
  .badge::before {
    opacity: 0.8;
  }
  
  select.form-control option {
    background: #090d24;
  }
}