/* ── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --ro-blue: #002B7F;
  --ro-yellow: #FCD116;
  --ro-red: #CE1126;
  --primary: #002B7F;
  --primary-light: #1a46a0;
  --primary-dark: #001a5c;
  --accent: #FCD116;
  --danger: #CE1126;
  --success: #16a34a;
  --warning: #d97706;
  --bg: #f3f4f6;
  --card: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --border: #e5e7eb;
  --radius: 0.75rem;
  --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Bootswatch Lux overrides — keep dark blue as accent color everywhere
     Bootstrap components resolve `--bs-primary` (buttons, links, focus
     rings, badges). Lux's default is a near-black; we swap it for the
     SimulariExamen brand blue so the RO identity survives the theme. */
  --bs-primary: var(--primary);
  --bs-primary-rgb: 0, 43, 127;
  --bs-link-color: var(--primary);
  --bs-link-hover-color: var(--primary-dark);
}

/* ── Reset ─────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito Sans', 'Inter', system-ui, -apple-system, sans-serif; background: var(--bg); color: var(--text); line-height: 1.6; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
button { cursor: pointer; font-family: inherit; }
input, select, textarea { font-family: inherit; }

/* ── Typography ────────────────────────────────────────────────────────────── */
h1 { font-size: 2.25rem; font-weight: 800; line-height: 1.2; }
h2 { font-size: 1.75rem; font-weight: 700; line-height: 1.3; }
h3 { font-size: 1.25rem; font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-muted); }

/* ── Layout ────────────────────────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.page-wrapper { min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; padding: 2rem 0; }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.navbar {
  background: var(--primary);
  color: white;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
  box-shadow: var(--shadow-lg);
  position: sticky;
  top: 0;
  z-index: 100;
}
.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 1.25rem;
  font-weight: 800;
  color: white;
  text-decoration: none;
}
.flag-strip {
  display: flex;
  width: 8px;
  height: 32px;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.flag-strip span { flex: 1; }
.flag-strip .b { background: var(--ro-blue); }
.flag-strip .y { background: var(--ro-yellow); }
.flag-strip .r { background: var(--ro-red); }

/* Brand logo (graduation cap) */
.logo-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  display: block;
}
.logo-mark-lg { width: 72px; height: 72px; }
.logo-mark-sm { width: 36px; height: 36px; }
.navbar-nav { display: flex; align-items: center; gap: 1rem; }
.navbar-nav a { color: rgba(255,255,255,0.85); font-size: 0.95rem; padding: 0.35rem 0.75rem; border-radius: 0.375rem; transition: background 0.15s; }
.navbar-nav a:hover { background: rgba(255,255,255,0.1); color: white; }
.navbar-user { display: flex; align-items: center; gap: 0.5rem; color: rgba(255,255,255,0.9); font-size: 0.9rem; position: relative; padding: 0.35rem 0.5rem; border-radius: 0.375rem; transition: background 0.15s; }
.navbar-user.has-menu { cursor: pointer; }
.navbar-user.has-menu:hover { background: rgba(255,255,255,0.1); }
.navbar-user.has-menu::after { content: "▾"; font-size: 0.7rem; opacity: 0.7; margin-left: 0.15rem; }

/* Dropdown sits below the navbar item; pad-top bridges the gap so the
   menu doesn't collapse when the cursor crosses from the trigger. */
.navbar-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  min-width: 240px;
  padding-top: 0.4rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s ease;
  z-index: 1000;
}
.navbar-dropdown-inner {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  padding: 0.35rem 0;
  overflow: hidden;
}
.navbar-user.has-menu:hover .navbar-dropdown,
.navbar-user.has-menu:focus-within .navbar-dropdown {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.navbar-dropdown a {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.55rem 1rem;
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  background: transparent;
}
.navbar-dropdown a:hover {
  background: rgba(0,43,127,0.07);
  color: var(--primary);
}
.navbar-dropdown hr {
  margin: 0.3rem 0;
  border: none;
  border-top: 1px solid var(--border);
}
.navbar-dropdown .menu-header {
  padding: 0.4rem 1rem 0.5rem;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.35;
}
.navbar-dropdown .menu-header strong {
  display: block; color: var(--text); font-size: 0.92rem; margin-bottom: 0.1rem;
}

.btn-logout { background: rgba(255,255,255,0.15); border: none; color: white; padding: 0.35rem 0.75rem; border-radius: 0.375rem; font-size: 0.85rem; cursor: pointer; transition: background 0.15s; }
.btn-logout:hover { background: rgba(255,255,255,0.25); }

/* ── Hero ──────────────────────────────────────────────────────────────────── */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: white;
  padding: 5rem 1.5rem 4rem;
  text-align: center;
}
.hero h1 { font-size: clamp(2rem, 5vw, 3.5rem); color: white; margin-bottom: 1.25rem; }
.hero p { font-size: 1.2rem; color: rgba(255,255,255,0.8); max-width: 640px; margin: 0 auto 2.5rem; }
.hero-btns { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.hero-badge {
  display: inline-block;
  background: var(--ro-yellow);
  color: var(--primary-dark);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  border: 1px solid var(--border);
}
.card-header { margin-bottom: 1.25rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); }
.card-grid { display: grid; gap: 1.25rem; }
.card-grid-2 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card-grid-3 { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.card-grid-4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

.exam-card {
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
  border: 2px solid var(--border);
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.exam-card:hover { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.exam-card .badge { align-self: flex-start; }
.exam-card h3 { font-size: 1rem; font-weight: 700; color: var(--text); line-height: 1.4; }
.exam-card .meta { display: flex; gap: 0.75rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); }
.exam-card .meta span { display: flex; align-items: center; gap: 0.25rem; }

/* ── Stat cards ────────────────────────────────────────────────────────────── */
.stat-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-left: 4px solid var(--primary);
}
.stat-card.yellow { border-left-color: var(--ro-yellow); }
.stat-card.red    { border-left-color: var(--ro-red); }
.stat-card.green  { border-left-color: var(--success); }
.stat-card .stat-label { font-size: 0.82rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.stat-card .stat-value { font-size: 2.25rem; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card .stat-sub { font-size: 0.82rem; color: var(--text-muted); }

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.65rem 1.4rem;
  border-radius: 0.5rem;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  transition: all 0.15s;
  white-space: nowrap;
  text-decoration: none;
}
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover:not(:disabled) { background: var(--primary-light); }
.btn-secondary { background: white; color: var(--primary); border: 2px solid var(--primary); }
.btn-secondary:hover:not(:disabled) { background: var(--primary); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-danger:hover:not(:disabled) { background: #a80e1f; }
.btn-success { background: var(--success); color: white; }
.btn-success:hover:not(:disabled) { background: #15803d; }
.btn-ghost { background: transparent; color: var(--text-muted); border: 1px solid var(--border); }
.btn-ghost:hover { background: var(--bg); }
.btn-sm { padding: 0.4rem 0.85rem; font-size: 0.85rem; }
.btn-lg { padding: 0.85rem 2rem; font-size: 1.05rem; }
.btn-white { background: white; color: var(--primary); font-weight: 700; }
.btn-white:hover { background: var(--accent); }
/* Override navbar link color so the white button's text stays readable */
.navbar-nav .btn-white {
  background: rgba(255, 255, 255, 0.92);
  color: var(--primary);
}
.navbar-nav .btn-white:hover {
  background: var(--accent);
  color: var(--primary-dark);
}
.btn-outline-white { background: transparent; color: white; border: 2px solid white; }
.btn-outline-white:hover { background: white; color: var(--primary); }

/* ── Forms ─────────────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 0.35rem; margin-bottom: 1.25rem; }
.form-label { font-size: 0.9rem; font-weight: 600; color: var(--text); }
.form-control {
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 0.5rem;
  font-size: 0.95rem;
  transition: border-color 0.15s, box-shadow 0.15s;
  width: 100%;
  background: white;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,43,127,0.12); }
.form-control.is-invalid { border-color: var(--danger); }
.form-hint { font-size: 0.82rem; color: var(--text-muted); }
.form-error { font-size: 0.82rem; color: var(--danger); }
select.form-control { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%236b7280' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem; }

/* ── Auth pages ────────────────────────────────────────────────────────────── */
.auth-wrapper { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--primary-dark), var(--primary)); padding: 2rem 1rem; }
.auth-card { background: white; border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0,0,0,0.3); width: 100%; max-width: 460px; overflow: hidden; }
.auth-card-header { background: var(--primary); color: white; padding: 2rem 2rem 1.5rem; text-align: center; }
.auth-card-header h1 { font-size: 1.6rem; color: white; margin-bottom: 0.25rem; }
.auth-card-header p { color: rgba(255,255,255,0.75); font-size: 0.9rem; }
.auth-card-body { padding: 2rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; font-size: 0.9rem; color: var(--text-muted); }
.auth-footer a { color: var(--primary); font-weight: 600; }
.auth-logo { width: 48px; height: 48px; margin: 0 auto 1rem; }

/* ── Badges ────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; padding: 0.2rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.badge-blue   { background: #dbeafe; color: #1e40af; }
.badge-yellow { background: #fef9c3; color: #854d0e; }
.badge-green  { background: #dcfce7; color: #166534; }
.badge-red    { background: #fee2e2; color: #991b1b; }
.badge-gray   { background: #f3f4f6; color: #374151; }

/* ── Tables ────────────────────────────────────────────────────────────────── */
.table-wrapper { overflow-x: auto; border-radius: var(--radius); box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; background: white; font-size: 0.9rem; }
thead th { background: var(--primary); color: white; padding: 0.85rem 1rem; text-align: left; font-weight: 600; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; }
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: #f9fafb; }
tbody td { padding: 0.85rem 1rem; vertical-align: middle; }
.table-actions { display: flex; gap: 0.4rem; align-items: center; }

/* ── Exam interface ────────────────────────────────────────────────────────── */
.exam-layout { display: grid; grid-template-columns: 1fr 280px; gap: 1.5rem; align-items: start; }
.exam-header { background: var(--primary); color: white; padding: 1rem 1.5rem; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; }
.exam-header h2 { font-size: 1.1rem; color: white; }
.exam-timer { background: rgba(255,255,255,0.15); border-radius: 0.5rem; padding: 0.5rem 1.25rem; font-size: 1.4rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: 0.05em; }
.exam-timer.warning { background: rgba(206,17,38,0.7); animation: pulse 1s infinite; }
.question-card { background: white; border-radius: var(--radius); padding: 2rem; box-shadow: var(--shadow); }
.question-card .q-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.question-card .q-num { background: var(--primary); color: white; width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.9rem; flex-shrink: 0; }
.question-card .q-points { background: #fef9c3; color: #854d0e; font-size: 0.8rem; font-weight: 700; padding: 0.2rem 0.5rem; border-radius: 999px; margin-left: auto; }
.question-text { font-size: 1.05rem; color: var(--text); line-height: 1.7; margin-bottom: 1.75rem; font-weight: 500; }
.options-list { display: flex; flex-direction: column; gap: 0.75rem; }
.option-item { display: flex; align-items: flex-start; gap: 1rem; padding: 1rem 1.25rem; border: 2px solid var(--border); border-radius: 0.5rem; cursor: pointer; transition: all 0.15s; }
.option-item:hover { border-color: var(--primary); background: #eff6ff; }
.option-item.selected { border-color: var(--primary); background: #dbeafe; }
.option-item.correct { border-color: var(--success); background: #dcfce7; }
.option-item.incorrect { border-color: var(--danger); background: #fee2e2; }
.option-label { width: 28px; height: 28px; min-width: 28px; border-radius: 50%; border: 2px solid var(--border); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 0.85rem; color: var(--text-muted); transition: all 0.15s; }
.option-item.selected .option-label { background: var(--primary); border-color: var(--primary); color: white; }
.option-text { font-size: 0.95rem; color: var(--text); line-height: 1.5; }
.question-nav-panel { background: white; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1.25rem; position: sticky; top: 80px; }
.question-nav-panel h4 { margin-bottom: 1rem; color: var(--text); }
.q-nav-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.4rem; margin-bottom: 1rem; }
.q-nav-btn { width: 100%; aspect-ratio: 1; border: 2px solid var(--border); border-radius: 0.375rem; background: white; font-size: 0.82rem; font-weight: 600; color: var(--text-muted); cursor: pointer; transition: all 0.15s; }
.q-nav-btn:hover { border-color: var(--primary); color: var(--primary); }
.q-nav-btn.current { border-color: var(--primary); background: var(--primary); color: white; }
.q-nav-btn.answered { background: #dcfce7; border-color: var(--success); color: var(--success); }
.q-nav-legend { display: flex; flex-direction: column; gap: 0.4rem; font-size: 0.8rem; color: var(--text-muted); }
.q-nav-legend span { display: flex; align-items: center; gap: 0.5rem; }
.q-nav-legend .dot { width: 12px; height: 12px; border-radius: 3px; flex-shrink: 0; }
.exam-nav-btns { display: flex; justify-content: space-between; margin-top: 2rem; }
.open-ended-area { width: 100%; min-height: 150px; padding: 0.85rem; border: 1.5px solid var(--border); border-radius: 0.5rem; font-size: 0.95rem; resize: vertical; }
.open-ended-area:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0,43,127,0.12); }

/* ── Results ───────────────────────────────────────────────────────────────── */
.result-summary { text-align: center; padding: 2.5rem; }
.grade-circle { width: 120px; height: 120px; border-radius: 50%; border: 6px solid; display: flex; flex-direction: column; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.grade-circle.pass { border-color: var(--success); color: var(--success); }
.grade-circle.fail { border-color: var(--danger); color: var(--danger); }
.grade-circle .grade-value { font-size: 2.25rem; font-weight: 800; line-height: 1; }
.grade-circle .grade-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.answer-review { margin-top: 2rem; }
.answer-item { border: 1px solid var(--border); border-radius: 0.5rem; margin-bottom: 1rem; overflow: hidden; }
.answer-item-header { display: flex; align-items: center; gap: 1rem; padding: 0.85rem 1.25rem; background: #f9fafb; border-bottom: 1px solid var(--border); }
.answer-item-header.correct { background: #f0fdf4; }
.answer-item-header.incorrect { background: #fff1f2; }
.answer-item-body { padding: 1rem 1.25rem; }

/* ── Admin sidebar ─────────────────────────────────────────────────────────── */
.admin-layout { display: flex; min-height: calc(100vh - 64px); }
.admin-sidebar { width: 240px; background: var(--primary-dark); color: white; flex-shrink: 0; }
.admin-sidebar-header { padding: 1.5rem 1.25rem 1rem; border-bottom: 1px solid rgba(255,255,255,0.1); }
.admin-sidebar-header p { font-size: 0.8rem; color: rgba(255,255,255,0.5); margin-top: 0.2rem; }
.admin-nav { padding: 1rem 0; }
.admin-nav a { display: flex; align-items: center; gap: 0.75rem; padding: 0.65rem 1.25rem; color: rgba(255,255,255,0.7); font-size: 0.9rem; transition: all 0.15s; border-left: 3px solid transparent; }
.admin-nav a:hover { background: rgba(255,255,255,0.08); color: white; }
.admin-nav a.active { background: rgba(255,255,255,0.12); color: white; border-left-color: var(--ro-yellow); font-weight: 600; }
.admin-main { flex: 1; padding: 2rem; overflow-x: hidden; }
.admin-main > h2 { margin-bottom: 1.75rem; }

/* ── Modals ────────────────────────────────────────────────────────────────── */
/* Bootstrap 5 (Lux) declares `.modal { display: none; position: fixed; … }`
   for its JS-driven modal. Our overlay-based modals share the same class
   name but toggle visibility via `.hidden` on `.modal-overlay`. Scoped
   overrides below (`.modal-overlay .modal…`) win by specificity so our
   dialogs render regardless of Lux being loaded. */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 1rem; }
.modal-overlay .modal { position: static; display: block; background: white; border-radius: var(--radius); box-shadow: 0 25px 50px rgba(0,0,0,0.3); width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto; margin: 0; pointer-events: auto; }
.modal-overlay .modal-header { padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.modal-overlay .modal-header h3 { font-size: 1.1rem; margin: 0; }
.modal-overlay .modal-close { background: none; border: none; font-size: 1.5rem; color: var(--text-muted); cursor: pointer; line-height: 1; padding: 0.2rem; border-radius: 0.25rem; }
.modal-overlay .modal-close:hover { background: var(--bg); }
.modal-overlay .modal-body { padding: 1.5rem; }
.modal-overlay .modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert { padding: 0.85rem 1.25rem; border-radius: 0.5rem; font-size: 0.9rem; display: flex; align-items: flex-start; gap: 0.6rem; }
.alert-error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.alert-success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert-info { background: #dbeafe; color: #1e40af; border: 1px solid #93c5fd; }
.alert-warning { background: #fef9c3; color: #854d0e; border: 1px solid #fde047; }

/* ── Misc ──────────────────────────────────────────────────────────────────── */
.hidden { display: none !important; }
.text-center { text-align: center; }
.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-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-6 { margin-top: 1.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.spinner { border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; width: 28px; height: 28px; animation: spin 0.7s linear infinite; }
.loading-overlay { display: flex; align-items: center; justify-content: center; min-height: 200px; gap: 0.75rem; color: var(--text-muted); }
.section-title { font-size: 1.5rem; font-weight: 700; color: var(--text); margin-bottom: 0.5rem; }
.section-sub { color: var(--text-muted); margin-bottom: 2rem; }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.search-bar { display: flex; gap: 0.75rem; margin-bottom: 1.25rem; }
.search-bar .form-control { flex: 1; }
.divider { border: none; border-top: 1px solid var(--border); margin: 1.5rem 0; }
.tag { display: inline-flex; padding: 0.15rem 0.6rem; background: #f3f4f6; color: #374151; border-radius: 999px; font-size: 0.78rem; font-weight: 500; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.6; } }

/* ── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .exam-layout { grid-template-columns: 1fr; }
  .question-nav-panel { position: static; }
  .admin-layout { flex-direction: column; }
  .admin-sidebar { width: 100%; }
  h1 { font-size: 1.75rem; }
  .navbar-brand span { display: none; }
}
