/* ============================================================
   HACKVERSE TEST PORTAL — Styled to match Decagon 2026
   Fonts: Orbitron + Rajdhani + DM Sans + JetBrains Mono
   ============================================================ */

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

/* ── CSS VARIABLES ── */
:root {
  --bg-primary:   #03040a;
  --bg-secondary: #070b18;
  --bg-card:      rgba(255,255,255,0.035);
  --bg-card-hover:rgba(255,255,255,0.06);

  --purple:       #7c3aed;
  --purple-light: #a78bfa;
  --purple-glow:  rgba(124,58,237,0.4);
  --cyan:         #06b6d4;
  --cyan-light:   #67e8f9;
  --cyan-glow:    rgba(6,182,212,0.35);
  --pink:         #ec4899;
  --pink-glow:    rgba(236,72,153,0.3);

  --grad-primary: linear-gradient(135deg, var(--purple), var(--cyan));
  --grad-text:    linear-gradient(90deg, var(--purple-light), var(--cyan-light));

  --danger:    #f43f5e;
  --success:   #10b981;
  --warning:   #f59e0b;

  --text:          #f0f0ff;
  --text-primary:  #f0f0ff;
  --text2:         #94a3b8;
  --text-secondary:#94a3b8;
  --text3:         #4a5568;
  --text-muted:    #4a5568;

  --border:       rgba(255,255,255,0.07);
  --border2:      rgba(255,255,255,0.12);
  --glass:        rgba(255,255,255,0.04);
  --glass-border: rgba(255,255,255,0.08);

  --shadow-purple: 0 0 40px rgba(124,58,237,0.3);
  --shadow-card:   0 8px 32px rgba(0,0,0,0.4);

  --bg:       #03040a;
  --bg2:      #070b18;
  --bg3:      rgba(255,255,255,0.025);
  --accent:   #7c3aed;
  --accent2:  #06b6d4;
  --glow:     rgba(124,58,237,0.2);

  --font-ui:      'DM Sans', sans-serif;
  --font-display: 'Orbitron', sans-serif;
  --font-label:   'Rajdhani', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --radius:    12px;
  --radius-lg: 20px;
  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; overflow-x: hidden; }
body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-ui);
  min-height: 100vh;
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

.q-code-block {
  background: rgba(0,0,0,0.4);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin: 1rem 0;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.88rem;
  line-height: 1.7;
  overflow-x: auto;
  white-space: pre;
  color: #a5f3fc;
}
.q-code-inline {
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  padding: 0.1em 0.4em;
  font-family: var(--font-mono, monospace);
  font-size: 0.9em;
  color: #a5f3fc;
}

/* ── NOISE OVERLAY ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.4;
}

/* ── GRID BG ── */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(124,58,237,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,58,237,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

/* ── PAGE LAYOUT ── */
.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(124,58,237,0.18) 0%, transparent 65%);
}

/* ── GLASS CARD ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 2.75rem 3rem;
  width: 100%;
  max-width: 480px;
  box-shadow: var(--shadow-card), 0 0 0 1px rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad-primary);
  opacity: 0.6;
}

.card-wide { max-width: 860px; }

/* ── BRAND ── */
.brand {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 2.25rem;
}

.brand-icon {
  width: 40px; height: 40px;
  background: var(--grad-primary);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  color: white;
  box-shadow: 0 0 20px var(--purple-glow);
  flex-shrink: 0;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-tag {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--cyan-light);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 100px;
  padding: 2px 9px;
  margin-left: 0.25rem;
}

/* ── TYPOGRAPHY ── */
h1 {
  font-family: var(--font-display);
  font-size: 1.9rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.15;
  color: var(--text-primary);
}
h2 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
}
h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
p { color: var(--text-secondary); font-size: 0.93rem; line-height: 1.7; }

.mono  { font-family: var(--font-mono); }
.muted { color: var(--text-muted); }
.danger-text  { color: var(--danger); }
.success-text { color: var(--success); }
.accent-text  { color: var(--purple-light); }

/* ── FORM CONTROLS ── */
.form-group { margin-bottom: 1.35rem; }

label {
  display: block;
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
select,
textarea {
  width: 100%;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  color: var(--text-primary);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
  backdrop-filter: blur(8px);
}

input:focus, select:focus, textarea:focus {
  border-color: var(--purple);
  background: rgba(124,58,237,0.06);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12), 0 0 20px rgba(124,58,237,0.08);
}

input::placeholder { color: var(--text-muted); font-family: var(--font-mono); }
textarea { resize: vertical; min-height: 100px; line-height: 1.7; }
select option { background: var(--bg-secondary); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-family: var(--font-label);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  border: none;
  transition: all 0.3s ease;
  white-space: nowrap;
  position: relative;
  overflow: hidden;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0.1);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.btn:hover::before { opacity: 1; }

.btn-primary {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 0 24px var(--purple-glow), 0 4px 16px rgba(0,0,0,0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 0 40px var(--purple-glow), 0 8px 24px rgba(0,0,0,0.4);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: var(--glass);
  color: var(--text-secondary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px);
}
.btn-ghost:hover {
  border-color: rgba(124,58,237,0.4);
  color: var(--text-primary);
  box-shadow: 0 0 16px var(--purple-glow);
  transform: translateY(-1px);
}

.btn-danger {
  background: rgba(244,63,94,0.1);
  color: var(--danger);
  border: 1px solid rgba(244,63,94,0.25);
}
.btn-danger:hover { background: rgba(244,63,94,0.2); box-shadow: 0 0 16px rgba(244,63,94,0.2); }

.btn-success {
  background: rgba(16,185,129,0.1);
  color: var(--success);
  border: 1px solid rgba(16,185,129,0.25);
}
.btn-success:hover { background: rgba(16,185,129,0.2); box-shadow: 0 0 16px rgba(16,185,129,0.2); }

.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none !important; box-shadow: none !important; }
.btn-full { width: 100%; }
.btn-sm { padding: 0.45rem 1.1rem; font-size: 0.78rem; }

/* ── DIVIDER ── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.75rem 0;
}

/* ── ALERTS ── */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  font-size: 0.83rem;
  font-family: var(--font-mono);
  margin-bottom: 1.25rem;
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  animation: alertFadeIn 0.25s ease;
  line-height: 1.5;
  backdrop-filter: blur(8px);
}
@keyframes alertFadeIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.alert-error {
  background: rgba(244,63,94,0.08);
  border: 1px solid rgba(244,63,94,0.2);
  color: #fb7185;
  border-left: 2px solid var(--danger);
}
.alert-success {
  background: rgba(16,185,129,0.08);
  border: 1px solid rgba(16,185,129,0.2);
  color: #34d399;
  border-left: 2px solid var(--success);
}
.alert-info {
  background: rgba(124,58,237,0.08);
  border: 1px solid rgba(124,58,237,0.2);
  color: var(--purple-light);
  border-left: 2px solid var(--purple);
}

/* ── SPINNER ── */
.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(124,58,237,0.2);
  border-top-color: var(--purple-light);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
  flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── LOADING SCREEN ── */
#loading-screen {
  position: fixed; inset: 0; z-index: 1000;
  background: var(--bg-primary);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  transition: opacity 0.5s ease;
}
#loading-screen.hidden { opacity: 0; pointer-events: none; }

/* ── VIOLATION OVERLAY ── */
#violation-overlay {
  display: none;
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(3,4,10,0.97);
  backdrop-filter: blur(20px);
  flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center;
  padding: 2rem;
}
#violation-overlay::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(244,63,94,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244,63,94,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}
#violation-overlay.active { display: flex; animation: violationIn 0.3s ease; }
@keyframes violationIn { from { opacity: 0; } to { opacity: 1; } }

.violation-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  position: relative; z-index: 1;
  animation: dangerPulse 0.9s ease infinite alternate;
}
@keyframes dangerPulse {
  from { filter: drop-shadow(0 0 12px rgba(244,63,94,0.5)); }
  to   { filter: drop-shadow(0 0 36px rgba(244,63,94,1)); }
}

.violation-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--danger);
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
  text-shadow: 0 0 40px rgba(244,63,94,0.4);
  position: relative; z-index: 1;
}

.violation-sub {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 420px;
  margin-bottom: 2.5rem;
  position: relative; z-index: 1;
}

.violation-countdown {
  font-family: var(--font-display);
  font-size: 6rem;
  font-weight: 900;
  color: var(--danger);
  line-height: 1;
  text-shadow: 0 0 60px rgba(244,63,94,0.6);
  width: 160px; height: 160px;
  border: 1px solid rgba(244,63,94,0.3);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(244,63,94,0.04);
  box-shadow: 0 0 60px rgba(244,63,94,0.1) inset;
  position: relative; z-index: 1;
}

.violation-hint {
  margin-top: 1.75rem;
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative; z-index: 1;
}

/* ── TEST LAYOUT ── */
.test-shell {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
  position: relative;
  z-index: 1;
}

.test-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
  flex-wrap: wrap;
  position: sticky;
  top: 0;
  background: rgba(3,4,10,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 10;
}

.test-progress-wrap { flex: 1; min-width: 120px; }

.test-progress-label {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.progress-bar {
  height: 3px;
  background: var(--glass-border);
  border-radius: 2px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--grad-primary);
  border-radius: 2px;
  transition: width 0.5s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 10px var(--purple-glow);
}

.timer-box {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 0.45rem 1rem;
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.timer-box.warning {
  border-color: rgba(245,158,11,0.5);
  color: var(--warning);
  box-shadow: 0 0 16px rgba(245,158,11,0.15);
}
.timer-box.critical {
  border-color: rgba(244,63,94,0.5);
  color: var(--danger);
  box-shadow: 0 0 20px rgba(244,63,94,0.2);
  animation: timerBlink 1s ease infinite;
}
@keyframes timerBlink { 50% { opacity: 0.5; } }

.q-counter {
  font-family: var(--font-label);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ── QUESTION AREA ── */
.question-area { padding: 3rem 0 1.5rem; }

.q-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-light);
  background: rgba(6,182,212,0.1);
  border: 1px solid rgba(6,182,212,0.2);
  border-radius: 100px;
  padding: 3px 12px;
  margin-bottom: 1.25rem;
}

.q-tag.short {
  color: var(--purple-light);
  background: rgba(124,58,237,0.1);
  border-color: rgba(124,58,237,0.2);
}

.q-text {
  font-size: 1.3rem;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 2.25rem;
  line-height: 1.55;
  font-family: var(--font-ui);
}

/* ── MCQ OPTIONS ── */
.options-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}
@media (max-width: 600px) { .options-grid { grid-template-columns: 1fr; } }

.option-btn {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.1rem 1.2rem;
  cursor: pointer;
  text-align: left;
  color: var(--text-secondary);
  font-family: var(--font-ui);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  line-height: 1.45;
  backdrop-filter: blur(8px);
}

.option-btn:hover {
  border-color: rgba(124,58,237,0.35);
  color: var(--text-primary);
  background: var(--bg-card-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-purple);
}

.option-btn.selected {
  border-color: var(--purple);
  background: rgba(124,58,237,0.1);
  color: var(--text-primary);
  box-shadow: 0 0 24px var(--purple-glow), 0 0 0 1px rgba(124,58,237,0.2) inset;
}

.option-letter {
  display: flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; min-width: 24px;
  border-radius: 6px;
  font-size: 0.65rem;
  font-weight: 700;
  font-family: var(--font-label);
  letter-spacing: 0.05em;
  background: var(--glass-border);
  color: var(--text-muted);
  transition: all var(--transition);
  flex-shrink: 0;
}

.option-btn.selected .option-letter {
  background: var(--grad-primary);
  color: white;
  box-shadow: 0 0 12px var(--purple-glow);
}

/* ── SHORT ANSWER ── */
.short-answer-area textarea {
  font-size: 0.9rem;
  min-height: 150px;
  line-height: 1.75;
  padding: 1rem 1.1rem;
}

.char-count {
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-align: right;
  margin-top: 0.4rem;
}

/* ── TEST FOOTER ── */
.test-footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  position: sticky;
  bottom: 0;
  background: rgba(3,4,10,0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

/* ── QUESTION NAV DOTS ── */
.q-nav-dots {
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center;
}

.q-dot {
  width: 10px; height: 10px;
  border-radius: 3px;
  background: var(--glass-border);
  cursor: pointer;
  transition: all var(--transition);
  border: none;
}
.q-dot:hover { background: var(--text-muted); transform: scale(1.3); }
.q-dot.answered { background: rgba(124,58,237,0.6); }
.q-dot.current  {
  background: var(--purple-light);
  transform: scale(1.5);
  box-shadow: 0 0 8px var(--purple-glow);
}

/* ── RULES SCREEN ── */
.rules-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 1.5rem 0 2rem;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  backdrop-filter: blur(8px);
}

.rules-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  padding: 0.9rem 1.1rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.25s ease;
}
.rules-list li:last-child { border-bottom: none; }
.rules-list li:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.rule-icon { font-size: 0.95rem; flex-shrink: 0; margin-top: 2px; }

/* ── SAVE INDICATOR ── */
#save-indicator {
  font-family: var(--font-label);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.3s ease;
}
#save-indicator.saving { color: var(--warning); }
#save-indicator.saved  { color: var(--success); }

/* ── ADMIN LAYOUT ── */
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 220px 1fr;
  position: relative;
  z-index: 1;
}

.sidebar {
  background: rgba(7,11,24,0.95);
  border-right: 1px solid var(--border);
  padding: 1.5rem 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  backdrop-filter: blur(20px);
}

.sidebar-brand { margin-bottom: 2rem; padding: 0 0.4rem; }
.nav-logo {
  width: 50px; height: 50px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem;
  color: white;
  box-shadow: 0 0 12px var(--purple-glow);
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.6rem 0.9rem;
  border-radius: 10px;
  font-family: var(--font-label);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  transition: all 0.25s ease;
}

.nav-item:hover { color: var(--text-primary); background: var(--glass); }
.nav-item.active {
  color: var(--purple-light);
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.2);
}

.nav-icon { font-size: 0.95rem; width: 16px; text-align: center; flex-shrink: 0; }
.sidebar-bottom { margin-top: auto; }

.main-content { padding: 2.25rem 2.75rem; overflow-y: auto; }

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── TABLE ── */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  background: var(--bg-card);
  backdrop-filter: blur(12px);
}

table { width: 100%; border-collapse: collapse; font-size: 0.875rem; }

thead tr {
  background: rgba(124,58,237,0.06);
  border-bottom: 1px solid var(--border);
}

thead th {
  padding: 0.85rem 1.1rem;
  text-align: left;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-muted);
  white-space: nowrap;
}

tbody tr {
  border-bottom: 1px solid var(--border);
  transition: background 0.2s ease;
}
tbody tr:last-child { border-bottom: none; }
tbody tr:hover { background: rgba(124,58,237,0.04); }

td {
  padding: 0.85rem 1.1rem;
  color: var(--text-secondary);
  vertical-align: middle;
}
td .mono { font-size: 0.8rem; font-family: var(--font-mono); }
td strong { color: var(--text-primary); font-weight: 600; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
}
.badge-success { background: rgba(16,185,129,0.1); color: #34d399; border: 1px solid rgba(16,185,129,0.2); }
.badge-warning { background: rgba(245,158,11,0.1); color: #fbbf24; border: 1px solid rgba(245,158,11,0.2); }
.badge-info    { background: rgba(124,58,237,0.1); color: var(--purple-light); border: 1px solid rgba(124,58,237,0.2); }
.badge-danger  { background: rgba(244,63,94,0.1); color: #fb7185; border: 1px solid rgba(244,63,94,0.2); }

/* ── STATS CARDS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 1rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  backdrop-filter: blur(12px);
  transition: all 0.35s ease;
}
.stat-card:hover {
  border-color: rgba(124,58,237,0.35);
  transform: translateY(-4px);
  box-shadow: var(--shadow-purple);
}

.stat-label {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 900;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}

.stat-sub {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  font-family: var(--font-label);
  letter-spacing: 0.05em;
}

/* ── MODAL ── */
.modal-backdrop {
  display: none;
  position: fixed; inset: 0; z-index: 800;
  background: rgba(3,4,10,0.88);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  align-items: center; justify-content: center;
  padding: 1rem;
}
.modal-backdrop.open { display: flex; }

.modal {
  background: linear-gradient(135deg, rgba(15,10,30,0.97), rgba(7,11,24,0.97));
  border: 1px solid rgba(124,58,237,0.25);
  border-radius: var(--radius-lg);
  padding: 2.25rem 2.4rem;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 0 60px rgba(124,58,237,0.15), 0 32px 80px rgba(0,0,0,0.6);
  animation: modalIn 0.25s cubic-bezier(0.34,1.56,0.64,1);
  position: relative;
  overflow: hidden;
}

.modal::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--grad-primary);
  opacity: 0.5;
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.92) translateY(16px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.75rem;
}

.modal-close {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: 8px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.85rem;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.25s ease;
  line-height: 1;
}
.modal-close:hover {
  color: var(--text-primary);
  border-color: rgba(124,58,237,0.4);
  background: rgba(124,58,237,0.1);
}

/* ── CRED BOX ── */
.cred-box {
  background: rgba(124,58,237,0.06);
  border: 1px solid rgba(124,58,237,0.2);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  margin-top: 1.35rem;
}

.cred-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  gap: 0.5rem;
}
.cred-row:last-child { border-bottom: none; }

.cred-label {
  font-family: var(--font-label);
  font-size: 0.62rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-muted);
}

.cred-value {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  background: var(--grad-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  word-break: break-all;
  text-align: right;
}

/* ── TAB PANELS ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── FULLSCREEN ── */
:fullscreen body,
:-webkit-full-screen body,
:-moz-full-screen body { background: var(--bg-primary); }

:fullscreen #violation-overlay,
:-webkit-full-screen #violation-overlay,
:-moz-full-screen #violation-overlay { position: fixed; z-index: 99999; }

#fullscreen-warning {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 8000;
  background: linear-gradient(90deg, var(--danger), #e11d48);
  color: #fff;
  text-align: center;
  padding: 0.65rem 1rem;
  font-family: var(--font-label);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: pointer;
}
#fullscreen-warning.visible { display: block; }

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--purple); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--purple-light); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .admin-shell { grid-template-columns: 1fr; }
  .sidebar {
    height: auto;
    position: relative;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 1rem;
  }
  .sidebar-bottom { display: none; }
  .main-content { padding: 1.25rem; }
  .card { padding: 1.75rem 1.5rem; }
  .q-text { font-size: 1.1rem; }
  .test-shell { padding: 0 1rem; }
  .modal { padding: 1.75rem 1.5rem; }
}

/* ── UTILS ── */
.hidden { display: none !important; }
.flex   { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 0.5rem; }
.gap-md { gap: 1rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.text-right { text-align: right; }
.text-center { text-align: center; }
