/* =====================================================
   TeliFort Smart School — Design System
   Mobile-first | Vibrant | Clean | Fast
   ===================================================== */

/* --- CSS Variables --- */
:root {
  /* Brand palette */
  --violet:    #7c3aed;
  --violet-lt: #ede9fe;
  --violet-dk: #5b21b6;
  --teal:      #0891b2;
  --teal-lt:   #cffafe;
  --emerald:   #059669;
  --emerald-lt:#d1fae5;
  --amber:     #d97706;
  --amber-lt:  #fef3c7;
  --rose:      #e11d48;
  --rose-lt:   #ffe4e6;

  /* Level colours */
  --primary-color:  #f97316;  /* orange — Primary school */
  --jss-color:      #0891b2;  /* teal — JSS */
  --sss-color:      #7c3aed;  /* violet — SSS */

  /* Neutrals */
  --white:   #ffffff;
  --gray-50: #f9fafb;
  --gray-100:#f3f4f6;
  --gray-200:#e5e7eb;
  --gray-300:#d1d5db;
  --gray-400:#9ca3af;
  --gray-500:#6b7280;
  --gray-600:#4b5563;
  --gray-700:#374151;
  --gray-800:#1f2937;
  --gray-900:#111827;

  /* Semantic */
  --bg:         var(--white);
  --bg-subtle:  var(--gray-50);
  --bg-card:    var(--white);
  --border:     var(--gray-200);
  --text:       var(--gray-900);
  --text-muted: var(--gray-500);
  --accent:     var(--violet);
  --accent-lt:  var(--violet-lt);

  /* XP / Gamification */
  --xp-gold:   #f59e0b;
  --xp-silver: #94a3b8;
  --xp-bronze: #b45309;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;

  /* Border radius */
  --radius-sm: 0.5rem;
  --radius:    0.75rem;
  --radius-lg: 1rem;
  --radius-xl: 1.5rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.06);
  --shadow:    0 4px 12px rgba(0,0,0,.08), 0 2px 4px rgba(0,0,0,.04);
  --shadow-lg: 0 10px 30px rgba(0,0,0,.1), 0 4px 8px rgba(0,0,0,.06);
  --shadow-xl: 0 20px 50px rgba(0,0,0,.12);

  /* Transitions */
  --ease: 0.2s cubic-bezier(0.4,0,0.2,1);
  --ease-spring: 0.3s cubic-bezier(0.34,1.56,0.64,1);

  /* Typography */
  --font: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
}

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }
input, select, textarea { font: inherit; }
ul, ol { list-style: none; }

/* --- Typography --- */
h1 { font-size: clamp(1.75rem, 5vw, 3rem); font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.375rem, 3.5vw, 2.25rem); font-weight: 700; line-height: 1.25; }
h3 { font-size: clamp(1.125rem, 2.5vw, 1.5rem); font-weight: 600; line-height: 1.35; }
h4 { font-size: 1.125rem; font-weight: 600; }
h5 { font-size: 1rem; font-weight: 600; }
p  { line-height: 1.7; }
small { font-size: 0.8125rem; }

.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-center { text-align: center; }

/* --- Layout --- */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-4);
}
@media (min-width: 768px) { .container { padding: 0 var(--space-6); } }

.grid-2 { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.grid-3 { display: grid; grid-template-columns: 1fr; gap: var(--space-4); }
.grid-4 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-4); }

@media (min-width: 640px)  { .grid-2 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 768px)  { .grid-3 { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3,1fr); } .grid-4 { grid-template-columns: repeat(4,1fr); } }

.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }

/* --- Cards --- */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--ease), transform var(--ease);
}
.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card-flat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0.625rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--ease);
  white-space: nowrap;
  min-height: 44px;  /* touch target */
}
.btn-primary {
  background: linear-gradient(135deg, #fbbf24, #f59e0b);
  color: #1c1917;
  font-weight: 800;
  box-shadow: 0 4px 16px rgba(245,158,11,.4);
  position: relative;
  overflow: hidden;
  letter-spacing: .01em;
}
.btn-primary::after {
  content: '';
  position: absolute; top: 0; bottom: 0; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.3), transparent);
  left: -100%;
  transition: left .55s ease;
}
.btn-primary:hover {
  background: linear-gradient(135deg, #fcd34d, #fbbf24);
  box-shadow: 0 8px 28px rgba(245,158,11,.55);
  transform: translateY(-2px);
}
.btn-primary:hover::after { left: 150%; }
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
}
.btn-secondary:hover { background: var(--accent-lt); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  padding: 0.5rem 1rem;
}
.btn-ghost:hover { background: var(--gray-100); }

.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8125rem; min-height: 36px; }
.btn-lg { padding: 0.875rem 2rem; font-size: 1.0625rem; }

.btn-teal    { background: var(--teal);    color: #fff; box-shadow: 0 4px 14px rgba(8,145,178,.3); }
.btn-emerald { background: var(--emerald); color: #fff; box-shadow: 0 4px 14px rgba(5,150,105,.3); }
.btn-amber   { background: var(--amber);   color: #fff; box-shadow: 0 4px 14px rgba(217,119,6,.3); }
.btn-rose    { background: var(--rose);    color: #fff; }

/* --- Badges --- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0.2em 0.65em;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.badge-violet  { background: var(--violet-lt);  color: var(--violet-dk); }
.badge-teal    { background: var(--teal-lt);    color: var(--teal); }
.badge-emerald { background: var(--emerald-lt); color: var(--emerald); }
.badge-amber   { background: var(--amber-lt);   color: var(--amber); }
.badge-rose    { background: var(--rose-lt);    color: var(--rose); }
.badge-gray    { background: var(--gray-100);   color: var(--gray-600); }

/* --- Forms --- */
.form-group { display: flex; flex-direction: column; gap: .375rem; }
.form-label { font-size: .8125rem; font-weight: 700; color: #374151; letter-spacing: .01em; text-transform: uppercase; }
.form-input {
  padding: .75rem 1rem;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  color: #111827;
  font-size: .9375rem;
  font-weight: 500;
  transition: border-color .18s, box-shadow .18s;
  min-height: 48px;
}
.form-input:hover { border-color: #c4b5fd; }
.form-input:focus {
  outline: none;
  border-color: #7c3aed;
  box-shadow: 0 0 0 4px rgba(124,58,237,.1);
}
.form-input::placeholder { color: #9ca3af; font-weight: 400; }
.form-select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M6 8L0 0h12z' fill='%236b7280'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.875rem center; padding-right: 2.5rem; }

/* --- Navigation (Topbar) --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  height: 64px;
  display: flex;
  align-items: center;
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0 var(--space-4);
  gap: var(--space-3);
}
.topbar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 800;
  font-size: 1.125rem;
  color: var(--accent);
}
.topbar-logo span { color: var(--gray-800); }
.topbar-nav { display: none; align-items: center; gap: var(--space-1); }
@media (min-width: 768px) { .topbar-nav { display: flex; } }
.topbar-nav a {
  padding: 0.4rem 0.875rem;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--ease);
}
.topbar-nav a:hover, .topbar-nav a.active { background: var(--accent-lt); color: var(--accent); }

/* --- Sidebar Shell --- */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 64px 1fr;
  min-height: 100vh;
}
@media (min-width: 1024px) {
  .shell {
    grid-template-columns: 240px 1fr;
    grid-template-rows: 1fr;
  }
  .shell-topbar { grid-column: 1 / -1; }
}

.sidebar {
  background: var(--white);
  border-right: 1px solid var(--border);
  display: none;
  flex-direction: column;
  padding: var(--space-4) 0;
  overflow-y: auto;
  position: sticky;
  top: 0;
  height: 100vh;
}
@media (min-width: 1024px) { .sidebar { display: flex; } }

.sidebar-logo {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 0 var(--space-5) var(--space-5);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--space-3);
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--accent);
}
.sidebar-logo span { color: var(--gray-800); }

.sidebar-section { padding: var(--space-2) var(--space-3); }
.sidebar-section-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-400);
  padding: 0 var(--space-2) var(--space-1);
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 0.6rem var(--space-3);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-600);
  transition: all var(--ease);
  position: relative;
}
.sidebar-link:hover { background: var(--gray-50); color: var(--accent); }
.sidebar-link.active {
  background: var(--accent-lt);
  color: var(--accent);
  font-weight: 600;
}
.sidebar-link .nav-icon { width: 20px; height: 20px; flex-shrink: 0; opacity: 0.7; }
.sidebar-link.active .nav-icon { opacity: 1; }
.sidebar-count {
  margin-left: auto;
  background: var(--rose);
  color: white;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1em 0.45em;
  border-radius: var(--radius-full);
  min-width: 18px;
  text-align: center;
}

.main-content { padding: var(--space-6) var(--space-4); width: 100%; min-width: 0; }
@media (min-width: 768px) { .main-content { padding: var(--space-6) var(--space-8); } }

/* --- XP Bar --- */
.xp-bar-wrap {
  background: var(--gray-100);
  border-radius: var(--radius-full);
  height: 8px;
  overflow: hidden;
}
.xp-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  background: linear-gradient(90deg, var(--xp-gold), var(--amber));
  transition: width 0.8s cubic-bezier(0.4,0,0.2,1);
}

/* --- XP Pill (topbar) --- */
.xp-pill {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  background: var(--amber-lt);
  color: var(--amber);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
}

/* --- Streak Badge --- */
.streak-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #fff3cd;
  color: #d97706;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 0.875rem;
}

/* --- KPI Cards --- */
.kpi-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(2, 1fr); }
@media (min-width: 768px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }

.kpi-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.kpi-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
}
.kpi-value { font-size: 1.875rem; font-weight: 800; line-height: 1; }
.kpi-label { font-size: 0.8125rem; color: var(--text-muted); font-weight: 500; }

/* --- Tables --- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-lg); border: 1px solid var(--border); }
.tss-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.tss-table th {
  background: var(--gray-50);
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid var(--border);
}
.tss-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--gray-100);
  vertical-align: middle;
}
.tss-table tr:last-child td { border-bottom: none; }
.tss-table tr:hover td { background: var(--gray-50); }

/* --- Subject Card --- */
.subject-card {
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  color: white;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  position: relative;
  overflow: hidden;
  min-height: 140px;
  transition: transform var(--ease), box-shadow var(--ease);
}
.subject-card::before {
  content: '';
  position: absolute;
  right: -20px;
  bottom: -20px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}
.subject-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

/* --- Progress Ring --- */
.progress-ring { position: relative; display: inline-flex; }
.progress-ring svg { transform: rotate(-90deg); }
.progress-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.875rem;
}

/* --- Avatar --- */
.avatar {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.avatar-placeholder {
  border-radius: 50%;
  background: var(--accent-lt);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-sm  { width: 32px;  height: 32px;  font-size: 0.8rem; }
.avatar-md  { width: 40px;  height: 40px;  font-size: 0.9rem; }
.avatar-lg  { width: 56px;  height: 56px;  font-size: 1.1rem; }
.avatar-xl  { width: 80px;  height: 80px;  font-size: 1.5rem; }

/* --- Toast / Alerts --- */
.messages-wrap { position: fixed; top: 80px; right: 1rem; z-index: 1000; display: flex; flex-direction: column; gap: 0.5rem; }
.toast {
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  font-weight: 500;
  max-width: 360px;
  box-shadow: var(--shadow-lg);
  animation: slideIn 0.3s var(--ease);
}
.toast-success { background: var(--emerald); color: white; }
.toast-error   { background: var(--rose);    color: white; }
.toast-info    { background: var(--violet);  color: white; }
.toast-warning { background: var(--amber);   color: white; }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* --- Section Headers --- */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--space-5);
  flex-wrap: wrap;
  gap: var(--space-3);
}
.section-title { font-size: 1.125rem; font-weight: 700; color: var(--text); }

/* --- Empty States --- */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  color: var(--text-muted);
}
.empty-state svg { opacity: 0.35; margin: 0 auto var(--space-4); }
.empty-state h3 { font-size: 1rem; color: var(--gray-700); margin-bottom: var(--space-2); }

/* --- Dividers --- */
.divider { height: 1px; background: var(--border); margin: var(--space-5) 0; }

/* --- Mobile Bottom Nav --- */
.bottom-nav {
  display: flex;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  padding: 0.5rem 0 calc(0.5rem + env(safe-area-inset-bottom));
}
@media (min-width: 1024px) { .bottom-nav { display: none; } }
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--gray-500);
  font-size: 0.6875rem;
  font-weight: 500;
  transition: color var(--ease);
  padding: 0.25rem 0;
}
.bottom-nav-item svg { width: 22px; height: 22px; }
.bottom-nav-item.active { color: var(--accent); }

/* =====================================================
   PUBLIC / LANDING PAGE
   ===================================================== */

/* Hero */
.hero {
  min-height: 100svh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, #1e0a4d 0%, #3730a3 50%, #0f766e 100%);
}
.hero-bg-blobs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: float 8s ease-in-out infinite;
}
.hero-blob:nth-child(1) { width: 600px; height: 600px; background: rgba(124,58,237,.6); top: -150px; right: -120px; }
.hero-blob:nth-child(2) { width: 420px; height: 420px; background: rgba(6,182,212,.35); bottom: -100px; left: 0; animation-delay: -3s; }
.hero-blob:nth-child(3) { width: 320px; height: 320px; background: rgba(249,115,22,.28); top: 38%; left: 38%; animation-delay: -6s; }
@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%       { transform: translateY(-30px) scale(1.05); }
}

.hero-content {
  position: relative;
  z-index: 1;
  color: white;
  padding: var(--space-16) var(--space-4);
  max-width: 720px;
}
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.25);
  backdrop-filter: blur(8px);
  border-radius: var(--radius-full);
  padding: 0.35rem 1rem;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: var(--space-5);
}
.hero h1 { color: white; margin-bottom: var(--space-5); }
.hero h1 em { font-style: normal; color: #fbbf24; }
.hero-lead {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  color: rgba(255,255,255,.82);
  margin-bottom: var(--space-8);
  max-width: 540px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); }
.btn-hero-primary {
  background: white;
  color: var(--violet-dk);
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 700;
  font-size: 1rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  transition: all var(--ease);
}
.btn-hero-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(0,0,0,.3); }
.btn-hero-outline {
  border: 2px solid rgba(255,255,255,.5);
  color: white;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 1rem;
  backdrop-filter: blur(8px);
  transition: all var(--ease);
}
.btn-hero-outline:hover { border-color: white; background: rgba(255,255,255,.1); }

/* Stats bar */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: var(--space-6) 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-6);
  text-align: center;
}
@media (min-width: 640px) { .stats-grid { grid-template-columns: repeat(4, 1fr); } }
.stat-number { font-size: 2rem; font-weight: 800; color: var(--accent); line-height: 1; }
.stat-label  { font-size: 0.8125rem; color: var(--text-muted); margin-top: var(--space-1); }

/* Features section */
.features-section { padding: var(--space-16) 0; background: var(--bg-subtle); }
.bento-grid {
  display: grid;
  gap: var(--space-4);
  grid-template-columns: 1fr;
}
@media (min-width: 640px)  { .bento-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3,1fr);
    grid-template-rows: auto;
  }
  .bento-wide { grid-column: span 2; }
}
.bento-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  transition: all var(--ease);
}
.bento-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.bento-icon {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-size: 1.5rem;
}
.bento-card h3 { font-size: 1.125rem; }
.bento-card p  { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; }

/* Level cards */
.levels-section { padding: var(--space-16) 0; }
.level-card {
  border-radius: var(--radius-xl);
  padding: var(--space-8);
  color: white;
  position: relative;
  overflow: hidden;
  transition: transform var(--ease), box-shadow var(--ease);
}
.level-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-xl); }
.level-card-primary { background: linear-gradient(135deg, #f97316, #fb923c); }
.level-card-jss     { background: linear-gradient(135deg, #0891b2, #22d3ee); }
.level-card-sss     { background: linear-gradient(135deg, #7c3aed, #a78bfa); }
.level-card h3 { color: white; font-size: 1.375rem; }
.level-card p  { color: rgba(255,255,255,.85); margin-top: var(--space-2); }
.level-card::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -30px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
}

/* Testimonials */
.testimonials-section { padding: var(--space-16) 0; background: var(--bg-subtle); }
.testimonial-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  border: 1px solid var(--border);
}
.testimonial-text { font-size: 1rem; color: var(--gray-700); font-style: italic; line-height: 1.7; }
.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-top: var(--space-4);
}
.testimonial-name { font-weight: 600; font-size: 0.9rem; }
.testimonial-role { font-size: 0.8rem; color: var(--text-muted); }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--violet-dk), var(--violet));
  color: white;
  padding: var(--space-16) 0;
  text-align: center;
}
.cta-band h2 { color: white; margin-bottom: var(--space-4); }
.cta-band p  { color: rgba(255,255,255,.8); margin-bottom: var(--space-8); font-size: 1.1rem; }

/* Footer */
.site-footer {
  background: var(--gray-900);
  color: var(--gray-400);
  padding: var(--space-12) 0 var(--space-8);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-10);
}
@media (min-width: 640px) { .footer-grid { grid-template-columns: repeat(2,1fr); } }
@media (min-width: 1024px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.footer-brand { font-weight: 800; font-size: 1.25rem; color: white; margin-bottom: var(--space-3); }
.footer-links { display: flex; flex-direction: column; gap: var(--space-2); }
.footer-links a { font-size: 0.875rem; transition: color var(--ease); }
.footer-links a:hover { color: white; }
.footer-col-title { font-size: 0.8125rem; font-weight: 700; color: white; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: var(--space-3); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding-top: var(--space-6); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: var(--space-3); font-size: 0.8125rem; }

/* =====================================================
   AUTH PAGES
   ===================================================== */
.auth-page {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1fr;
  background: var(--bg-subtle);
}
@media (min-width: 1024px) { .auth-page { grid-template-columns: 1fr 1fr; } }

.auth-panel-left {
  display: none;
  background: linear-gradient(150deg, #5b21b6 0%, #7c3aed 40%, #4f46e5 75%, #0891b2 100%);
  padding: 3rem 3.5rem;
  flex-direction: column;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
/* Bright decorative circles */
.auth-panel-left::before {
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  top: -200px; right: -180px;
  pointer-events: none;
}
.auth-panel-left::after {
  content: '';
  position: absolute;
  width: 400px; height: 400px;
  border-radius: 50%;
  background: rgba(255,255,255,.06);
  bottom: -150px; left: -100px;
  pointer-events: none;
}
@media (min-width: 1024px) { .auth-panel-left { display: flex; position: sticky; top: 0; height: 100vh; } }
.auth-panel-left h2 {
  color: #fff;
  font-size: 2.5rem;
  font-weight: 900;
  letter-spacing: -.04em;
  line-height: 1.1;
  text-shadow: 0 2px 20px rgba(0,0,0,.15);
}
.auth-panel-left p  {
  color: rgba(255,255,255,.82);
  margin-top: .875rem;
  font-size: .9375rem;
  line-height: 1.7;
  font-weight: 500;
}

.auth-feature-list { margin-top: 2rem; display: flex; flex-direction: column; gap: .625rem; }
.auth-feature-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  padding: .75rem 1rem;
  border-radius: 14px;
  background: rgba(255,255,255,.14);
  border: 1.5px solid rgba(255,255,255,.2);
  transition: background .2s, transform .15s;
}
.auth-feature-item:hover { background: rgba(255,255,255,.22); transform: translateX(4px); }
.auth-feature-icon {
  width: 40px; height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 1.15rem;
  background: rgba(255,255,255,.25);
  box-shadow: 0 2px 8px rgba(0,0,0,.15);
}

/* Bright distinct icon colours */
.auth-feature-item:nth-child(1) .auth-feature-icon { background: #ef4444; }
.auth-feature-item:nth-child(2) .auth-feature-icon { background: #10b981; }
.auth-feature-item:nth-child(3) .auth-feature-icon { background: #f59e0b; }
.auth-feature-item:nth-child(4) .auth-feature-icon { background: #8b5cf6; }
.auth-feature-item:nth-child(5) .auth-feature-icon { background: #06b6d4; }
.auth-feature-item:nth-child(6) .auth-feature-icon { background: #ec4899; }

.auth-panel-right {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: var(--space-6) var(--space-3);
  min-height: 100svh;
  background: #f8f7ff;
}
@media (min-width: 480px)  { .auth-panel-right { padding: var(--space-8) var(--space-4); } }
@media (min-width: 1024px) { .auth-panel-right { align-items: center; padding: var(--space-8) var(--space-6); } }

.auth-card {
  background: #fff;
  border: 1.5px solid #e9e4fd;
  border-radius: 20px;
  padding: 2rem 1.5rem;
  width: 100%;
  max-width: 440px;
  box-shadow: 0 4px 6px rgba(0,0,0,.04), 0 12px 40px rgba(109,40,217,.1);
  margin: auto 0;
}
@media (min-width: 480px) { .auth-card { padding: 2.25rem 2rem; } }
@media (min-width: 1024px) { .auth-card { padding: 2.75rem 2.5rem; margin: 0; } }

.auth-logo {
  font-weight: 900;
  font-size: 1.5rem;
  letter-spacing: -.03em;
  margin-bottom: .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.auth-logo img { width: 36px; height: 36px; border-radius: 10px; }
.auth-logo span { color: #111827; }
.auth-subtitle { color: #6b7280; font-size: .875rem; margin-bottom: 1.75rem; text-align: center; font-weight: 500; }
.auth-form { display: flex; flex-direction: column; gap: 1.125rem; }
.auth-switch { text-align: center; font-size: .875rem; color: #6b7280; margin-top: 1.25rem; }
.auth-switch a { color: #7c3aed; font-weight: 700; text-decoration: none; }
.auth-switch a:hover { color: #5b21b6; text-decoration: underline; }

/* First + Last name row: stacks on mobile, side-by-side ≥ 480 px */
.auth-name-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
}
@media (min-width: 480px) { .auth-name-row { grid-template-columns: 1fr 1fr; } }

/* Password toggle — proper 44 × 44 touch target */
.pwd-toggle {
  position: absolute;
  right: .5rem;
  top: 50%;
  transform: translateY(-50%);
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--gray-400);
  transition: color var(--ease), background var(--ease);
}
.pwd-toggle:hover { color: var(--accent); background: var(--accent-lt); }

/* ── Auth mobile top-nav (hidden on desktop — left panel handles branding) ── */
.auth-mobile-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.125rem;
  height: 56px;
  background: #7c3aed;
  box-shadow: 0 2px 12px rgba(124,58,237,.35);
  position: sticky;
  top: 0;
  z-index: 200;
}
@media (min-width: 1024px) { .auth-mobile-nav { display: none; } }
.auth-mobile-logo {
  display: flex;
  align-items: center;
  gap: .5rem;
  text-decoration: none;
  font-weight: 900;
  font-size: .9375rem;
  color: #fff;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.auth-mobile-back {
  font-size: .8rem;
  color: rgba(255,255,255,.85);
  font-weight: 700;
  text-decoration: none;
  padding: .375rem .875rem;
  border-radius: 99px;
  border: 1.5px solid rgba(255,255,255,.35);
  background: rgba(255,255,255,.15);
  white-space: nowrap;
  flex-shrink: 0;
  transition: all .2s;
}
.auth-mobile-back:hover { background: rgba(255,255,255,.28); color: #fff; }

/* --- Utilities --- */
.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-3 { margin-top: var(--space-3); }
.mt-4 { margin-top: var(--space-4); }
.mt-6 { margin-top: var(--space-6); }
.mt-8 { margin-top: var(--space-8); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-6 { margin-bottom: var(--space-6); }
.mb-8 { margin-bottom: var(--space-8); }
.w-full { width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; }

/* Gradient text */
.grad-text {
  background: linear-gradient(135deg, var(--violet), var(--teal));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
