/* ── Cosmic Web Portal — Main Stylesheet ─────────────────────────────────── */

:root {
  --bg-primary:   #07071a;
  --bg-secondary: #0e0e2e;
  --bg-card:      #12122e;
  --bg-hover:     #1a1a42;
  --bg-input:     #0a0a22;
  --border:       #252560;
  --border-glow:  #4444bb;

  --gold:         #FFD700;
  --gold-dim:     #b8960c;
  --orange:       #FF8C00;
  --purple:       #7B2FBE;
  --purple-light: #9B59E8;
  --blue:         #3B82F6;
  --blue-dim:     #2563EB;
  --cyan:         #06B6D4;

  --text-primary:   #E8E8FF;
  --text-secondary: #8888BB;
  --text-muted:     #555588;
  --text-gold:      #FFD700;

  --danger:   #EF4444;
  --success:  #10B981;
  --warning:  #F59E0B;
  --info:     #3B82F6;

  /* Job class colors */
  --job-beginner: #AAAAAA;
  --job-warrior:  #EF4444;
  --job-magician: #8B5CF6;
  --job-bowman:   #10B981;
  --job-thief:    #64748B;
  --job-pirate:   #F59E0B;
  --job-gm:       #FFD700;

  --font-main: 'Inter', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'Fira Code', 'Consolas', monospace;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 4px 24px rgba(0,0,80,.5);
  --shadow-lg: 0 8px 48px rgba(0,0,80,.7);
  --glow:      0 0 20px rgba(123,47,190,.4);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-main);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-dim); }

img { max-width: 100%; }

/* ── Scrollbar ───────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-glow); border-radius: 3px; }

/* ── Animated starfield background ──────────────────────────────────────── */
.stars-bg {
  position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none;
}
.stars-bg::before, .stars-bg::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 15%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 30% 60%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 50% 30%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 70% 80%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 85% 45%, rgba(255,255,255,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 20% 90%, rgba(255,255,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 60% 10%, rgba(255,255,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 90% 70%, rgba(255,255,255,.3) 0%, transparent 100%);
  animation: twinkle 8s ease-in-out infinite alternate;
}
.stars-bg::after {
  background-image:
    radial-gradient(1px 1px at 25% 40%, rgba(200,200,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 45% 75%, rgba(200,200,255,.3) 0%, transparent 100%),
    radial-gradient(1px 1px at 65% 20%, rgba(200,200,255,.5) 0%, transparent 100%),
    radial-gradient(1px 1px at 80% 55%, rgba(200,200,255,.4) 0%, transparent 100%),
    radial-gradient(1px 1px at 15% 65%, rgba(200,200,255,.3) 0%, transparent 100%);
  animation: twinkle 12s ease-in-out infinite alternate-reverse;
}
@keyframes twinkle { from { opacity: .5 } to { opacity: 1 } }

/* ── Layout wrapper ─────────────────────────────────────────────────────── */
.page-wrapper {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; min-height: 100vh;
}

.container {
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: 0 24px;
}

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(7,7,26,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 24px;
}
.navbar-inner {
  display: flex; align-items: center;
  max-width: 1200px; margin: 0 auto;
  height: 64px; gap: 24px;
}
.navbar-logo {
  font-size: 1.4rem; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -.5px;
  white-space: nowrap;
}
.navbar-logo span { color: var(--text-secondary); }
.navbar-links {
  display: flex; gap: 4px; flex: 1;
}
.nav-link {
  padding: 6px 14px; border-radius: var(--radius);
  color: var(--text-secondary); font-size: .9rem; font-weight: 500;
  transition: color .2s, background .2s;
}
.nav-link:hover, .nav-link.active {
  color: var(--text-primary); background: var(--bg-hover);
}
.navbar-user {
  display: flex; align-items: center; gap: 12px; margin-left: auto;
}
.btn-nav {
  padding: 7px 18px; border-radius: var(--radius);
  font-size: .85rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s;
}
.btn-nav-outline {
  background: transparent;
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
}
.btn-nav-outline:hover { background: var(--bg-hover); }
.btn-nav-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff;
}
.btn-nav-primary:hover { filter: brightness(1.15); }

/* ── Hero Section ────────────────────────────────────────────────────────── */
.hero {
  padding: 100px 24px 80px;
  text-align: center;
}
.hero-tag {
  display: inline-block;
  background: rgba(123,47,190,.2); border: 1px solid var(--purple);
  color: var(--purple-light); font-size: .8rem; font-weight: 600;
  padding: 4px 14px; border-radius: 20px; margin-bottom: 24px;
  letter-spacing: .5px; text-transform: uppercase;
}
.hero-title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900; line-height: 1.1;
  letter-spacing: -1.5px; margin-bottom: 24px;
}
.hero-title .highlight {
  background: linear-gradient(135deg, var(--gold), var(--orange), var(--purple-light));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-subtitle {
  font-size: 1.15rem; color: var(--text-secondary);
  max-width: 560px; margin: 0 auto 40px;
}
.hero-actions {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius);
  font-size: .95rem; font-weight: 600; cursor: pointer;
  border: none; transition: all .2s; text-decoration: none;
}
.btn-primary {
  background: linear-gradient(135deg, var(--purple), var(--blue));
  color: #fff; box-shadow: var(--glow);
}
.btn-primary:hover { filter: brightness(1.15); transform: translateY(-1px); color: #fff; }
.btn-secondary {
  background: transparent;
  border: 1px solid var(--border-glow);
  color: var(--text-primary);
}
.btn-secondary:hover { background: var(--bg-hover); }
.btn-danger {
  background: var(--danger); color: #fff;
}
.btn-danger:hover { filter: brightness(1.15); }
.btn-success {
  background: var(--success); color: #fff;
}
.btn-success:hover { filter: brightness(1.15); }
.btn-gold {
  background: linear-gradient(135deg, var(--gold-dim), var(--orange));
  color: #000; font-weight: 700;
}
.btn-gold:hover { filter: brightness(1.1); }
.btn-sm { padding: 6px 14px; font-size: .8rem; }
.btn-xs { padding: 4px 10px; font-size: .75rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; pointer-events: none; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}
.card-hover:hover {
  border-color: var(--border-glow);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  transition: all .3s;
}
.card-title {
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}
.card-title .icon { color: var(--gold); font-size: 1.2rem; }

/* ── Stat cards (dashboard) ──────────────────────────────────────────────── */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px; margin-bottom: 32px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
  position: relative; overflow: hidden;
  transition: border-color .2s;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
}
.stat-card.gold::before   { background: linear-gradient(90deg, var(--gold), var(--orange)); }
.stat-card.purple::before { background: linear-gradient(90deg, var(--purple), var(--purple-light)); }
.stat-card.blue::before   { background: linear-gradient(90deg, var(--blue), var(--cyan)); }
.stat-card.green::before  { background: linear-gradient(90deg, var(--success), var(--cyan)); }
.stat-card.red::before    { background: linear-gradient(90deg, var(--danger), var(--orange)); }
.stat-card:hover { border-color: var(--border-glow); }
.stat-label { font-size: .8rem; color: var(--text-secondary); font-weight: 500; text-transform: uppercase; letter-spacing: .5px; }
.stat-value { font-size: 2rem; font-weight: 800; margin: 4px 0 2px; color: var(--text-primary); }
.stat-sub   { font-size: .8rem; color: var(--text-muted); }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-size: .875rem; font-weight: 600;
  color: var(--text-secondary);
}
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 11px 16px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-size: .95rem; font-family: var(--font-main);
  transition: border-color .2s;
  outline: none;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(123,47,190,.2);
}
.form-input::placeholder { color: var(--text-muted); }
.form-select { cursor: pointer; }
.form-select option { background: var(--bg-card); }
.form-textarea { resize: vertical; min-height: 90px; }
.form-error { color: var(--danger); font-size: .8rem; margin-top: 4px; }
.form-hint  { color: var(--text-muted); font-size: .8rem; margin-top: 4px; }

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-wrapper {
  display: flex; align-items: center; justify-content: center;
  min-height: 100vh; padding: 24px;
}
.auth-card {
  width: 100%; max-width: 440px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px; box-shadow: var(--shadow-lg);
}
.auth-logo {
  text-align: center; margin-bottom: 32px;
}
.auth-logo .logo-text {
  font-size: 1.8rem; font-weight: 900;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.auth-title  { font-size: 1.5rem; font-weight: 700; margin-bottom: 8px; }
.auth-subtitle { color: var(--text-secondary); font-size: .9rem; margin-bottom: 32px; }
.auth-divider {
  text-align: center; margin: 20px 0;
  position: relative; color: var(--text-muted); font-size: .85rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; position: absolute; top: 50%;
  width: calc(50% - 30px); height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after  { right: 0; }
.auth-footer {
  text-align: center; margin-top: 24px;
  font-size: .875rem; color: var(--text-secondary);
}

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrapper {
  overflow-x: auto; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
table {
  width: 100%; border-collapse: collapse;
  font-size: .9rem;
}
th {
  padding: 12px 16px;
  background: var(--bg-secondary);
  color: var(--text-secondary); font-weight: 600;
  text-align: left; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .5px;
  white-space: nowrap;
}
td {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  color: var(--text-primary); vertical-align: middle;
}
tr:hover td { background: var(--bg-hover); }

/* ── Badges ──────────────────────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 3px 10px; border-radius: 20px;
  font-size: .75rem; font-weight: 600;
  white-space: nowrap;
}
.badge-gold    { background: rgba(255,215,0,.15);  color: var(--gold);    border: 1px solid rgba(255,215,0,.3); }
.badge-purple  { background: rgba(123,47,190,.2);  color: var(--purple-light); border: 1px solid rgba(123,47,190,.3); }
.badge-blue    { background: rgba(59,130,246,.15); color: var(--blue);    border: 1px solid rgba(59,130,246,.3); }
.badge-green   { background: rgba(16,185,129,.15); color: var(--success); border: 1px solid rgba(16,185,129,.3); }
.badge-red     { background: rgba(239,68,68,.15);  color: var(--danger);  border: 1px solid rgba(239,68,68,.3); }
.badge-gray    { background: rgba(100,100,150,.15);color: var(--text-secondary); border: 1px solid var(--border); }
.badge-orange  { background: rgba(255,140,0,.15);  color: var(--orange);  border: 1px solid rgba(255,140,0,.3); }

/* Job class badges */
.badge-warrior  { background: rgba(239,68,68,.15);  color: #EF4444; border: 1px solid rgba(239,68,68,.3); }
.badge-magician { background: rgba(139,92,246,.15); color: #8B5CF6; border: 1px solid rgba(139,92,246,.3); }
.badge-bowman   { background: rgba(16,185,129,.15); color: #10B981; border: 1px solid rgba(16,185,129,.3); }
.badge-thief    { background: rgba(100,116,139,.15);color: #94A3B8; border: 1px solid rgba(100,116,139,.3); }
.badge-pirate   { background: rgba(245,158,11,.15); color: #F59E0B; border: 1px solid rgba(245,158,11,.3); }
.badge-beginner { background: rgba(170,170,170,.1); color: #AAAAAA; border: 1px solid rgba(170,170,170,.2); }
.badge-gm       { background: rgba(255,215,0,.2);   color: var(--gold); border: 1px solid rgba(255,215,0,.4); }

/* ── Progress bars ───────────────────────────────────────────────────────── */
.progress {
  height: 8px; background: var(--bg-secondary);
  border-radius: 4px; overflow: hidden;
}
.progress-bar {
  height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--purple), var(--blue));
  transition: width .4s ease;
}
.progress-bar.gold   { background: linear-gradient(90deg, var(--gold-dim), var(--orange)); }
.progress-bar.green  { background: linear-gradient(90deg, #065f46, var(--success)); }
.progress-bar.blue   { background: linear-gradient(90deg, var(--blue-dim), var(--cyan)); }

/* ── Character card ──────────────────────────────────────────────────────── */
.char-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: all .3s;
  cursor: pointer;
}
.char-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}
.char-header {
  display: flex; align-items: center; gap: 16px; margin-bottom: 16px;
}
.char-avatar {
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--blue));
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: 800; color: #fff;
  flex-shrink: 0;
}
.char-name { font-size: 1.1rem; font-weight: 700; }
.char-meta { font-size: .8rem; color: var(--text-secondary); }
.char-stats-grid {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
  margin-top: 16px;
}
.char-stat {
  background: var(--bg-secondary);
  border-radius: var(--radius);
  padding: 8px 12px;
}
.char-stat-label { font-size: .7rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: .5px; }
.char-stat-value { font-size: .95rem; font-weight: 700; color: var(--text-primary); }

/* ── Rankings table specifics ────────────────────────────────────────────── */
.rank-num {
  font-size: 1.1rem; font-weight: 800; color: var(--text-muted);
  min-width: 40px; text-align: center;
}
.rank-1 { color: var(--gold); }
.rank-2 { color: #C0C0C0; }
.rank-3 { color: #CD7F32; }

/* ── Pagination ──────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; margin-top: 24px;
}
.page-btn {
  padding: 7px 14px; border-radius: var(--radius);
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text-primary); cursor: pointer; font-size: .875rem;
  transition: all .2s;
}
.page-btn:hover { border-color: var(--border-glow); background: var(--bg-hover); }
.page-btn.active { background: var(--purple); border-color: var(--purple); color: #fff; }
.page-btn:disabled { opacity: .4; cursor: not-allowed; }

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

#toast {
  position: fixed; bottom: 24px; right: 24px; z-index: 9999;
  display: flex; flex-direction: column; gap: 8px;
  pointer-events: none;
}
.toast-item {
  padding: 12px 20px; border-radius: var(--radius);
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow); pointer-events: all;
  animation: slideIn .3s ease;
  max-width: 320px;
}
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ── Admin sidebar layout ────────────────────────────────────────────────── */
.admin-layout {
  display: flex; min-height: 100vh;
}
.admin-sidebar {
  width: 240px; flex-shrink: 0;
  background: var(--bg-secondary);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.sidebar-logo {
  padding: 20px 20px 16px;
  border-bottom: 1px solid var(--border);
}
.sidebar-logo .logo-text {
  font-size: 1.1rem; font-weight: 800;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
}
.sidebar-tag {
  font-size: .7rem; color: var(--danger); font-weight: 700;
  text-transform: uppercase; letter-spacing: 1px;
}
.sidebar-nav { padding: 16px 12px; flex: 1; }
.sidebar-section-label {
  font-size: .7rem; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .8px;
  font-weight: 600; padding: 0 8px; margin: 16px 0 6px;
}
.sidebar-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: var(--radius);
  color: var(--text-secondary); font-size: .875rem;
  font-weight: 500; transition: all .2s; margin-bottom: 2px;
}
.sidebar-link:hover, .sidebar-link.active {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.sidebar-link.active { border-left: 2px solid var(--gold); padding-left: 10px; }
.sidebar-link .icon { width: 18px; text-align: center; }
.sidebar-footer {
  padding: 12px; border-top: 1px solid var(--border);
}
.admin-content {
  flex: 1; padding: 28px; overflow-x: hidden;
}
.admin-header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.admin-header h1 { font-size: 1.5rem; font-weight: 800; }
.admin-who { font-size: .8rem; color: var(--text-secondary); }

/* ── Modals ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 520px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  transform: scale(.95);
  transition: transform .2s;
}
.modal-overlay.open .modal { transform: scale(1); }
.modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }

/* ── Search bar ──────────────────────────────────────────────────────────── */
.search-bar {
  display: flex; gap: 12px; align-items: center;
  margin-bottom: 20px;
}
.search-bar .form-input { max-width: 360px; }

/* ── Feature cards (landing) ─────────────────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 24px; margin: 60px 0;
}
.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all .3s;
  text-align: center;
}
.feature-card:hover {
  border-color: var(--border-glow);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.feature-icon {
  font-size: 2.5rem; margin-bottom: 16px;
  display: block;
}
.feature-title { font-size: 1.1rem; font-weight: 700; margin-bottom: 8px; }
.feature-desc  { font-size: .9rem; color: var(--text-secondary); }

/* ── Section titles ──────────────────────────────────────────────────────── */
.section-title {
  font-size: 1.8rem; font-weight: 800;
  text-align: center; margin-bottom: 12px;
}
.section-sub {
  text-align: center; color: var(--text-secondary);
  margin-bottom: 48px; font-size: 1rem;
}

/* ── Footer ──────────────────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 32px 24px;
  text-align: center; color: var(--text-muted);
  font-size: .875rem;
}
.footer a { color: var(--text-secondary); }
.footer a:hover { color: var(--text-primary); }

/* ── Loading spinner ─────────────────────────────────────────────────────── */
.spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid var(--border); border-top-color: var(--purple);
  border-radius: 50%; animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-center {
  display: flex; align-items: center; justify-content: center;
  padding: 60px; gap: 12px; color: var(--text-secondary);
}

/* ── Misc utilities ──────────────────────────────────────────────────────── */
.text-gold    { color: var(--gold); }
.text-muted   { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-center  { text-align: center; }
.text-right   { text-align: right; }
.font-mono    { font-family: var(--font-mono); }
.font-bold    { font-weight: 700; }

.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-8        { gap: 8px; }
.gap-12       { gap: 12px; }
.gap-16       { gap: 16px; }
.mt-4         { margin-top: 4px; }
.mt-8         { margin-top: 8px; }
.mt-16        { margin-top: 16px; }
.mt-24        { margin-top: 24px; }
.mt-32        { margin-top: 32px; }
.mb-8         { margin-bottom: 8px; }
.mb-16        { margin-bottom: 16px; }
.mb-24        { margin-bottom: 24px; }
.mb-32        { margin-bottom: 32px; }
.w-full       { width: 100%; }
.hidden       { display: none !important; }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

@media (max-width: 768px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .navbar-links { display: none; }
  .admin-sidebar { display: none; }
  .admin-content { padding: 16px; }
  .hero { padding: 60px 24px 40px; }
  .auth-card { padding: 28px 20px; }
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}

/* ── Divider line ────────────────────────────────────────────────────────── */
.divider { height: 1px; background: var(--border); margin: 24px 0; }
