/* ============================================================
   style.css — EduSpace : Thème sombre bleu marine / ardoise
   ============================================================ */

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

/* ─── Variables ─────────────────────────────────────────── */
:root {
  --bg-base:      #0d1117;
  --bg-surface:   #161b22;
  --bg-elevated:  #1c2333;
  --bg-hover:     #21262d;
  --border:       #30363d;
  --border-light: #21262d;

  --accent:       #3b82f6;
  --accent-dim:   #1d4ed8;
  --accent-glow:  rgba(59,130,246,.18);
  --accent2:      #8b5cf6;
  --success:      #10b981;
  --warning:      #f59e0b;
  --danger:       #ef4444;

  --text-primary:   #e6edf3;
  --text-secondary: #8b949e;
  --text-muted:     #484f58;

  --sidebar-w: 240px;
  --header-h:  60px;
  --radius:    10px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,0,.45);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.3);

  --font: 'Outfit', sans-serif;
  --mono: 'JetBrains Mono', monospace;
}

/* ─── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg-base);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { color: #60a5fa; }
img { max-width: 100%; }
button { cursor: pointer; font-family: var(--font); }

/* ─── Login Page ─────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-base);
  position: relative;
  overflow: hidden;
}
.login-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(59,130,246,.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139,92,246,.10) 0%, transparent 55%);
  pointer-events: none;
}
.login-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--border-light) 1px, transparent 1px),
    linear-gradient(90deg, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: .35;
  pointer-events: none;
}
.login-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2.5rem 2rem;
  width: 100%;
  max-width: 420px;
  box-shadow: var(--shadow), 0 0 0 1px rgba(59,130,246,.08);
  animation: slideUp .5s ease;
}
.login-logo {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 2rem;
}
.login-logo .logo-icon {
  width: 44px; height: 44px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
}
.login-logo .logo-text { font-size: 1.5rem; font-weight: 700; letter-spacing: -.5px; }
.login-logo .logo-text span { color: var(--accent); }
.login-subtitle { color: var(--text-secondary); font-size: .9rem; margin-bottom: 1.5rem; }
.demo-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  margin-bottom: 1.5rem;
  font-size: .82rem;
  color: var(--text-secondary);
}
.demo-box strong { color: var(--text-primary); }
.demo-box .demo-row { display: flex; justify-content: space-between; padding: .15rem 0; }

/* ─── Form Elements ──────────────────────────────────────── */
.form-group { margin-bottom: 1.1rem; }
.form-group label {
  display: block;
  font-size: .82rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: .45rem;
  text-transform: uppercase;
  letter-spacing: .5px;
}
.form-control {
  width: 100%;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .95rem;
  padding: .7rem 1rem;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.form-control:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { appearance: none; 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='%238b949e' d='M6 8L1 3h10z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 1rem center; }
textarea.form-control { resize: vertical; min-height: 100px; }

/* ─── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  border: none; border-radius: var(--radius);
  font-family: var(--font); font-size: .9rem; font-weight: 500;
  padding: .65rem 1.25rem;
  transition: all .2s;
  cursor: pointer; white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px rgba(59,130,246,.35);
}
.btn-primary:hover { background: #2563eb; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(59,130,246,.45); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-hover); border-color: var(--accent); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #dc2626; }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { background: #059669; }
.btn-sm { padding: .4rem .85rem; font-size: .82rem; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: .55rem; border-radius: 8px; }

/* ─── Alerts ─────────────────────────────────────────────── */
.alert {
  padding: .85rem 1rem;
  border-radius: var(--radius);
  font-size: .9rem;
  margin-bottom: 1rem;
  display: flex; align-items: center; gap: .6rem;
}
.alert-error   { background: rgba(239,68,68,.12);   border: 1px solid rgba(239,68,68,.3);   color: #fca5a5; }
.alert-success { background: rgba(16,185,129,.12);  border: 1px solid rgba(16,185,129,.3);  color: #6ee7b7; }
.alert-info    { background: rgba(59,130,246,.12);  border: 1px solid rgba(59,130,246,.3);  color: #93c5fd; }
.alert-warning { background: rgba(245,158,11,.12);  border: 1px solid rgba(245,158,11,.3);  color: #fcd34d; }

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

/* ─── Sidebar ────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-w);
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  position: fixed; top: 0; left: 0; bottom: 0;
  display: flex; flex-direction: column;
  z-index: 100;
  transition: transform .3s ease;
}
.sidebar-brand {
  display: flex; align-items: center; gap: .75rem;
  padding: 1.2rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.sidebar-brand .brand-icon {
  width: 36px; height: 36px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; flex-shrink: 0;
}
.sidebar-brand .brand-name { font-size: 1.1rem; font-weight: 700; letter-spacing: -.3px; }
.sidebar-brand .brand-name span { color: var(--accent); }

.sidebar-user {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: .75rem;
}
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-size: .8rem; font-weight: 700;
  color: #fff; flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.1rem; }
.user-info .user-name { font-size: .9rem; font-weight: 600; line-height: 1.2; }
.user-info .user-role {
  font-size: .73rem;
  color: var(--text-secondary);
  text-transform: capitalize;
}

.sidebar-nav { flex: 1; padding: .75rem 0; overflow-y: auto; }
.nav-section-label {
  padding: .5rem 1.25rem .25rem;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
  font-weight: 600;
}
.nav-item {
  display: flex; align-items: center; gap: .75rem;
  padding: .6rem 1.25rem;
  color: var(--text-secondary);
  font-size: .88rem; font-weight: 500;
  border-radius: 0;
  transition: all .15s;
  position: relative;
  cursor: pointer;
}
.nav-item:hover { background: var(--bg-hover); color: var(--text-primary); }
.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent);
}
.nav-item.active::before {
  content: '';
  position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.nav-item .nav-icon { width: 18px; text-align: center; font-size: 1rem; }
.nav-badge {
  margin-left: auto;
  background: var(--danger);
  color: #fff;
  font-size: .68rem; font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  min-width: 18px;
  text-align: center;
}

.sidebar-footer {
  padding: .75rem 1.25rem;
  border-top: 1px solid var(--border);
}

/* ─── Main Content ───────────────────────────────────────── */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

/* ─── Top Header ─────────────────────────────────────────── */
.top-header {
  height: var(--header-h);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 1.75rem;
  position: sticky; top: 0; z-index: 90;
}
.page-title { font-size: 1.05rem; font-weight: 600; }
.header-actions { display: flex; align-items: center; gap: .75rem; }
.notif-btn {
  position: relative;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  width: 36px; height: 36px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer;
  transition: all .2s;
}
.notif-btn:hover { border-color: var(--accent); color: var(--accent); }
.notif-dot {
  position: absolute; top: 4px; right: 4px;
  width: 8px; height: 8px;
  background: var(--danger);
  border-radius: 50%;
  border: 2px solid var(--bg-surface);
}

/* ─── Page Body ──────────────────────────────────────────── */
.page-body { padding: 1.75rem; flex: 1; }

/* ─── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.card-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.card-title { font-size: .95rem; font-weight: 600; display: flex; align-items: center; gap: .6rem; }
.card-body { padding: 1.5rem; }
.card-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* ─── Stat Cards ─────────────────────────────────────────── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.5rem;
  position: relative; overflow: hidden;
  transition: transform .2s, border-color .2s;
}
.stat-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--accent-color, var(--accent));
}
.stat-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.15rem;
  margin-bottom: .85rem;
  background: var(--accent-color-bg, var(--accent-glow));
  color: var(--accent-color, var(--accent));
}
.stat-value { font-size: 1.9rem; font-weight: 700; font-family: var(--mono); line-height: 1; }
.stat-label { font-size: .78rem; color: var(--text-secondary); margin-top: .3rem; text-transform: uppercase; letter-spacing: .5px; }
.stat-trend { font-size: .75rem; margin-top: .5rem; }
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

/* ─── Tables ─────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: .88rem;
}
thead th {
  padding: .75rem 1rem;
  text-align: left;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border);
}
tbody tr { border-bottom: 1px solid var(--border-light); transition: background .15s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: var(--bg-hover); }
td { padding: .75rem 1rem; vertical-align: middle; }

/* ─── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: .2rem .6rem;
  border-radius: 6px;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .3px;
}
.badge-blue    { background: rgba(59,130,246,.15);  color: #60a5fa; }
.badge-purple  { background: rgba(139,92,246,.15);  color: #a78bfa; }
.badge-green   { background: rgba(16,185,129,.15);  color: #34d399; }
.badge-yellow  { background: rgba(245,158,11,.15);  color: #fbbf24; }
.badge-red     { background: rgba(239,68,68,.15);   color: #f87171; }
.badge-gray    { background: rgba(107,114,128,.15); color: #9ca3af; }

/* ─── Grade Badge ────────────────────────────────────────── */
.grade-pill {
  display: inline-block;
  padding: .3rem .8rem;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .88rem; font-weight: 600;
}
.grade-good    { background: rgba(16,185,129,.15); color: #34d399; border: 1px solid rgba(16,185,129,.3); }
.grade-ok      { background: rgba(245,158,11,.15); color: #fbbf24; border: 1px solid rgba(245,158,11,.3); }
.grade-bad     { background: rgba(239,68,68,.15);  color: #f87171; border: 1px solid rgba(239,68,68,.3); }

/* ─── Timetable ──────────────────────────────────────────── */
.timetable-grid {
  display: grid;
  grid-template-columns: 60px repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: .8rem;
}
.tt-header {
  background: var(--bg-elevated);
  padding: .6rem .4rem;
  text-align: center;
  font-weight: 600;
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--text-secondary);
}
.tt-time {
  background: var(--bg-elevated);
  padding: .5rem .3rem;
  text-align: center;
  font-size: .7rem;
  color: var(--text-muted);
  font-family: var(--mono);
}
.tt-cell {
  background: var(--bg-surface);
  min-height: 52px;
  padding: .3rem .4rem;
}
.tt-course {
  height: 100%;
  border-radius: 6px;
  padding: .4rem .6rem;
  font-size: .75rem;
  line-height: 1.3;
  border-left: 3px solid var(--accent);
}
.tt-course-name { font-weight: 600; }
.tt-course-sub  { color: rgba(255,255,255,.6); font-size: .68rem; margin-top: .1rem; }

/* ─── Homework list ──────────────────────────────────────── */
.hw-item {
  display: flex; align-items: flex-start; gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-light);
}
.hw-item:last-child { border-bottom: none; }
.hw-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  margin-top: .45rem;
  flex-shrink: 0;
}
.hw-title { font-weight: 600; font-size: .92rem; margin-bottom: .2rem; }
.hw-desc  { font-size: .82rem; color: var(--text-secondary); }
.hw-meta  { display: flex; gap: .75rem; margin-top: .35rem; flex-wrap: wrap; }
.hw-date  { font-size: .75rem; display: flex; align-items: center; gap: .3rem; }
.hw-urgent { color: var(--danger); }
.hw-normal { color: var(--text-muted); }

/* ─── Announcements ──────────────────────────────────────── */
.annonce-item {
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--border-light);
}
.annonce-item:last-child { border-bottom: none; }
.annonce-header { display: flex; align-items: center; gap: .75rem; margin-bottom: .5rem; flex-wrap: wrap; }
.annonce-title  { font-weight: 600; font-size: .95rem; }
.annonce-body   { font-size: .86rem; color: var(--text-secondary); line-height: 1.6; }
.annonce-footer { display: flex; gap: .75rem; margin-top: .5rem; font-size: .75rem; color: var(--text-muted); flex-wrap: wrap; }

/* ─── Progress Bar ───────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--bg-elevated); border-radius: 999px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; transition: width .5s ease; }

/* ─── Section header ─────────────────────────────────────── */
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.section-title { font-size: 1.1rem; font-weight: 700; display: flex; align-items: center; gap: .5rem; }

/* ─── Dashboard grid ─────────────────────────────────────── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
.dash-grid .full-row { grid-column: 1 / -1; }

/* ─── Admin panel ────────────────────────────────────────── */
.admin-tabs { display: flex; gap: .5rem; margin-bottom: 1.5rem; flex-wrap: wrap; }
.tab-btn {
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: .86rem; font-weight: 500;
  cursor: pointer; transition: all .2s;
}
.tab-btn:hover, .tab-btn.active {
  background: var(--accent-glow);
  border-color: var(--accent);
  color: var(--accent);
}
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ─── Notif dropdown ─────────────────────────────────────── */
.notif-panel {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  z-index: 200;
  display: none;
}
.notif-panel.open { display: block; }
.notif-panel-header {
  padding: .85rem 1.1rem;
  border-bottom: 1px solid var(--border);
  font-size: .88rem; font-weight: 600;
  display: flex; align-items: center; justify-content: space-between;
}
.notif-item {
  padding: .8rem 1.1rem;
  border-bottom: 1px solid var(--border-light);
  font-size: .82rem;
  display: flex; align-items: flex-start; gap: .6rem;
  transition: background .15s; cursor: pointer;
}
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--bg-hover); }
.notif-item.unread { background: rgba(59,130,246,.05); }
.notif-item .notif-dot-sm {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0; margin-top: .35rem;
}
.notif-item .notif-dot-sm.read { background: transparent; }
.notif-time { font-size: .72rem; color: var(--text-muted); margin-top: .2rem; }

/* ─── Modals ─────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.6);
  backdrop-filter: blur(4px);
  z-index: 300;
  display: none; align-items: center; justify-content: center;
}
.modal-backdrop.open { display: flex; }
.modal {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 500px;
  max-height: 90vh; overflow-y: auto;
  box-shadow: var(--shadow);
  animation: slideUp .25s ease;
}
.modal-header {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: 1rem; font-weight: 600; }
.modal-close { background: none; border: none; color: var(--text-secondary); font-size: 1.1rem; cursor: pointer; padding: .2rem; }
.modal-close:hover { color: var(--text-primary); }
.modal-body { padding: 1.5rem; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; gap: .75rem; justify-content: flex-end; }

/* ─── Animations ─────────────────────────────────────────── */
@keyframes slideUp {
  from { transform: translateY(16px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.fade-in { animation: fadeIn .4s ease; }
.slide-up { animation: slideUp .4s ease; }

/* ─── Utilities ──────────────────────────────────────────── */
.text-muted    { color: var(--text-secondary); }
.text-small    { font-size: .82rem; }
.text-center   { text-align: center; }
.text-right    { text-align: right; }
.text-success  { color: var(--success); }
.text-danger   { color: var(--danger); }
.text-warning  { color: var(--warning); }
.text-accent   { color: var(--accent); }
.flex          { display: flex; }
.flex-center   { display: flex; align-items: center; justify-content: center; }
.flex-between  { display: flex; align-items: center; justify-content: space-between; }
.gap-1         { gap: .5rem; }
.gap-2         { gap: 1rem; }
.mt-1          { margin-top: .5rem; }
.mt-2          { margin-top: 1rem; }
.mt-3          { margin-top: 1.5rem; }
.mb-1          { margin-bottom: .5rem; }
.mb-2          { margin-bottom: 1rem; }
.mb-3          { margin-bottom: 1.5rem; }
.w-full        { width: 100%; }
.form-row      { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.divider       { height: 1px; background: var(--border); margin: 1rem 0; }

/* ─── Responsive ─────────────────────────────────────────── */
.burger { display: none; background: none; border: none; color: var(--text-primary); font-size: 1.2rem; cursor: pointer; }
.sidebar-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 99; }

@media (max-width: 900px) {
  .dash-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    z-index: 200;
  }
  .sidebar.open { transform: translateX(0); }
  .sidebar-overlay.open { display: block; }
  .main-content { margin-left: 0; }
  .burger { display: flex; align-items: center; }
  .page-body { padding: 1rem; }
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .admin-tabs { overflow-x: auto; flex-wrap: nowrap; padding-bottom: .5rem; }
}
@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr; }
  .login-card { margin: 1rem; }
}

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