/* ============================================================
   4A0-100 Exam Simulator — design tokens
   Theme: "label switched path" — dark navy, signal cyan, amber
   ============================================================ */

:root{
  --bg: #0A0F1E;
  --bg-grid: #0D1326;
  --surface: #121A30;
  --surface-2: #1A2440;
  --surface-3: #212D50;
  --border: #2A3660;
  --border-soft: #1E2846;
  --text: #E9EDF7;
  --text-muted: #8D97B8;
  --text-faint: #5D6690;

  --cyan: #37E6C4;
  --cyan-dim: #1F8A76;
  --amber: #F5A85B;
  --amber-dim: #8A5E2E;
  --success: #4ADE80;
  --success-dim: #1F5C3B;
  --danger: #F0576B;
  --danger-dim: #6B2530;

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 10px;
  --radius-lg: 16px;
}

*{ box-sizing: border-box; }

html, body{
  margin:0; padding:0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
}

body{
  background-image:
    linear-gradient(var(--bg-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--bg-grid) 1px, transparent 1px);
  background-size: 42px 42px;
  background-attachment: fixed;
  background-position: center;
}

h1,h2,h3{ font-family: var(--font-display); margin:0; letter-spacing:-0.01em; }
p{ margin:0; }
button{ font-family: var(--font-body); cursor:pointer; }
input[type="range"]{ accent-color: var(--cyan); }
::selection{ background: var(--cyan-dim); color:#fff; }

a, .link-btn{ color: var(--cyan); }

:focus-visible{
  outline: 2px solid var(--cyan);
  outline-offset: 2px;
}

#app{ min-height:100vh; display:flex; flex-direction:column; }

/* ============================ TOPBAR ============================ */
.topbar{
  position: sticky; top:0; z-index: 40;
  background: rgba(10,15,30,0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.topbar-inner{
  max-width: 1180px; margin: 0 auto;
  display:flex; align-items:center; justify-content:space-between;
  padding: 14px 24px;
}
.brand{ display:flex; align-items:center; gap:12px; }
.brand-mark{ display:flex; align-items:center; width:38px; }
.brand-mark .node{ width:9px; height:9px; border-radius:2px; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); flex:0 0 auto; }
.brand-mark .node.n2{ background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.brand-mark .hop{ height:1px; flex:1; background: linear-gradient(90deg, var(--cyan), var(--amber)); }
.brand-text{ display:flex; flex-direction:column; line-height:1.15; }
.brand-text strong{ font-family: var(--font-display); font-size:1.05rem; letter-spacing:0.02em; }
.brand-text span{ font-size:0.72rem; color: var(--text-muted); }
.topbar-right{ display:flex; align-items:center; gap:10px; font-family: var(--font-mono); font-size:0.8rem; color: var(--text-muted); }

/* ============================ LAYOUT ============================ */
main{ flex:1; }
.screen{ display:none; }
.screen.active{ display:block; animation: fadein .25s ease; }
@keyframes fadein{ from{opacity:0; transform: translateY(6px);} to{opacity:1; transform:none;} }

.app-footer{
  text-align:center; padding: 22px 16px 30px;
  color: var(--text-faint); font-size: 0.75rem; font-family: var(--font-mono);
}

/* ============================ BUTTONS ============================ */
.btn{
  border-radius: 999px;
  padding: 12px 22px;
  font-size: 0.92rem;
  font-weight: 600;
  border: 1px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease, border-color .15s ease;
}
.btn:active{ transform: scale(0.97); }
.btn-primary{
  background: linear-gradient(135deg, var(--cyan), #22b8a0);
  color: #06231D;
  box-shadow: 0 6px 20px -6px rgba(55,230,196,0.5);
}
.btn-primary:hover{ box-shadow: 0 8px 26px -6px rgba(55,230,196,0.65); }
.btn-ghost{
  background: transparent; border-color: var(--border); color: var(--text);
}
.btn-ghost:hover{ border-color: var(--cyan); color: var(--cyan); }
.btn-outline{
  background: var(--surface-2); border-color: var(--border); color: var(--text);
}
.btn-outline:hover{ border-color: var(--amber); }
.btn-block{ width:100%; }
.btn:disabled{ opacity:0.4; cursor:not-allowed; }

.link-btn{
  background:none; border:none; font-size:0.82rem; font-weight:600;
  text-decoration: underline; text-underline-offset:3px; padding:4px 0;
}

/* ============================ SETUP SCREEN ============================ */
.setup-wrap{ max-width: 1100px; margin: 0 auto; padding: 48px 24px 80px; }

.setup-hero{ max-width: 720px; margin-bottom: 40px; }
.eyebrow{
  font-family: var(--font-mono); color: var(--cyan); font-size: 0.78rem;
  letter-spacing: 0.08em; margin-bottom: 14px; text-transform: uppercase;
}
.setup-hero h1{ font-size: clamp(2rem, 4vw, 2.9rem); line-height:1.08; margin-bottom:16px; }
.hero-sub{ color: var(--text-muted); font-size: 1.02rem; line-height:1.6; }

.setup-grid{
  display:grid; grid-template-columns: 1fr 1fr; gap:18px;
}
.panel{
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 22px 24px 26px;
}
.panel-wide{ grid-column: 1 / -1; }
.panel h2{
  font-size: 1rem; display:flex; align-items:center; gap:10px; margin-bottom:18px;
  font-weight:600;
}
.panel-index{
  font-family: var(--font-mono); font-size:0.72rem; color: var(--bg);
  background: var(--cyan); border-radius:5px; padding:2px 6px;
}
.panel-hint{ font-family: var(--font-mono); font-weight:400; font-size:0.72rem; color: var(--text-faint); margin-left:auto; }

.preset-row{ display:flex; flex-wrap:wrap; gap:8px; margin-bottom:16px; }
.preset-btn{
  border:1px solid var(--border); background: var(--surface-2); color: var(--text);
  padding: 8px 14px; border-radius: 999px; font-size: 0.82rem; font-family: var(--font-mono);
  transition: all .12s ease;
}
.preset-btn:hover{ border-color: var(--cyan); }
.preset-btn.active{ background: var(--cyan); color:#06231D; border-color: var(--cyan); font-weight:600; }

.slider-row{ display:flex; align-items:center; gap:14px; }
.slider-row input[type=range]{ flex:1; }
.slider-value{ font-family: var(--font-mono); font-size:0.95rem; white-space:nowrap; min-width:110px; text-align:right; }
.slider-value small{ color: var(--text-faint); font-size:0.72rem; }

.time-custom-row{ display:flex; flex-direction:column; gap:12px; }
.toggle-line{ display:flex; align-items:center; gap:10px; font-size:0.88rem; color: var(--text-muted); margin-bottom:12px; cursor:pointer; }
.toggle-line input{ width:16px; height:16px; accent-color: var(--cyan); }
.toggle-line:last-child{ margin-bottom:0; }

.category-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(230px,1fr)); gap:10px;
  margin-bottom:14px;
}
.cat-chip{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  border:1px solid var(--border); background: var(--surface-2); color: var(--text);
  border-radius: 10px; padding:10px 14px; font-size:0.85rem; font-family: var(--font-body);
  transition: all .12s ease; text-align:left;
}
.cat-chip:hover{ border-color: var(--cyan); }
.cat-chip.active{ border-color: var(--cyan); background: rgba(55,230,196,0.08); color: var(--text); }
.cat-chip:not(.active){ color: var(--text-muted); background: var(--surface); opacity:0.7; }
.cat-chip:not(.active):hover{ opacity:1; }
.cat-chip .cnt{ font-family: var(--font-mono); color: var(--text-faint); font-size:0.76rem; }
.cat-chip.active .cnt{ color: var(--cyan); }
.category-actions{ display:flex; gap:16px; }

.setup-footer{
  margin-top: 30px; display:flex; align-items:center; justify-content:space-between;
  gap: 20px; flex-wrap:wrap;
  border-top: 1px solid var(--border-soft); padding-top: 24px;
}
.setup-summary{ font-family: var(--font-mono); font-size:0.85rem; color: var(--text-muted); }
.setup-summary strong{ color: var(--cyan); }
.btn-start{ font-size: 1rem; padding: 15px 30px; }

.history-panel{ margin-top: 36px; }
.history-panel h3{ font-size:0.95rem; color: var(--text-muted); margin-bottom:12px; font-weight:600; }
.history-row{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding: 10px 16px; border:1px solid var(--border-soft); border-radius:8px; margin-bottom:8px;
  font-family: var(--font-mono); font-size:0.8rem; color: var(--text-muted);
}
.history-row strong{ color: var(--text); }

/* ============================ EXAM SCREEN ============================ */
.exam-wrap{ max-width: 1180px; margin: 0 auto; padding: 20px 24px 60px; display:flex; flex-direction:column; gap:18px; }

.path-nav{
  display:flex; flex-wrap:wrap; gap:6px;
  background: var(--surface); border:1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 14px;
}
.path-node{
  width:30px; height:30px; border-radius:7px;
  display:flex; align-items:center; justify-content:center;
  font-family: var(--font-mono); font-size:0.68rem;
  background: var(--surface-2); color: var(--text-muted); border:1px solid var(--border);
  transition: all .12s ease; position:relative;
}
.path-node:hover{ border-color: var(--cyan); color: var(--text); }
.path-node.current{ border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(55,230,196,0.18); color:var(--text); }
.path-node.answered{ background: var(--surface-3); color: var(--text); }
.path-node.flagged::after{
  content:''; position:absolute; top:-3px; right:-3px; width:8px; height:8px; border-radius:50%;
  background: var(--amber); box-shadow: 0 0 4px var(--amber);
}

.exam-body{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 30px 32px 26px;
}
.exam-wrap{ display:grid; grid-template-columns: 1fr; }
.exam-wrap > .path-nav{ order:0; }
.exam-wrap{ display:flex; }
.exam-wrap{ flex-wrap: wrap; }
.exam-body{ flex: 1 1 640px; }
.exam-side{ flex: 0 0 220px; display:flex; flex-direction:column; gap:16px; }

.q-meta{ display:flex; align-items:center; gap:14px; margin-bottom:18px; flex-wrap:wrap; }
.q-count{ font-family: var(--font-mono); color: var(--text-muted); font-size:0.85rem; }
.q-count strong{ color: var(--cyan); }
.q-category{
  font-family: var(--font-mono); font-size:0.72rem; text-transform:uppercase; letter-spacing:0.04em;
  background: var(--surface-3); color: var(--amber); padding: 4px 10px; border-radius: 999px;
}
.flag-btn{
  margin-left:auto; display:flex; align-items:center; gap:6px;
  background:none; border:1px solid var(--border); color: var(--text-muted);
  padding: 6px 12px; border-radius: 999px; font-size:0.78rem; transition: all .12s ease;
}
.flag-btn:hover{ border-color: var(--amber); color: var(--amber); }
.flag-btn.active{ border-color: var(--amber); color: var(--amber); background: rgba(245,168,91,0.1); }

.q-text{ font-size: 1.3rem; line-height:1.45; margin-bottom:24px; font-weight:600; }

.q-options{ display:flex; flex-direction:column; gap:10px; }
.q-option{
  display:flex; align-items:flex-start; gap:12px; text-align:left;
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px; font-size:0.96rem; line-height:1.5;
  transition: all .12s ease; color: var(--text); width:100%;
}
.q-option:hover{ border-color: var(--cyan); }
.q-option .opt-letter{
  font-family: var(--font-mono); font-size:0.78rem; color: var(--text-faint);
  border:1px solid var(--border); width:24px; height:24px; border-radius:6px;
  display:flex; align-items:center; justify-content:center; flex:0 0 auto; margin-top:1px;
}
.q-option.selected{ border-color: var(--cyan); background: rgba(55,230,196,0.08); }
.q-option.locked{ cursor:not-allowed; opacity:0.85; }
.q-option.locked:hover{ border-color: var(--border-soft); }
.q-option.locked.selected{ border-color: var(--cyan); }
.q-locked-badge{
  font-family: var(--font-mono); font-size:0.7rem; color: var(--text-faint);
  display:inline-flex; align-items:center; gap:4px;
}
.q-locked-badge[hidden]{ display:none; }
.q-option.selected .opt-letter{ background: var(--cyan); color:#06231D; border-color: var(--cyan); }
.q-option.correct{ border-color: var(--success); background: rgba(74,222,128,0.1); }
.q-option.correct .opt-letter{ background: var(--success); color:#06231D; border-color: var(--success); }
.q-option.incorrect{ border-color: var(--danger); background: rgba(240,87,107,0.1); }
.q-option.incorrect .opt-letter{ background: var(--danger); color:#fff; border-color: var(--danger); }
.q-option:disabled{ cursor: default; }

.q-feedback{
  margin-top:16px; padding:14px 16px; border-radius:10px; font-size:0.88rem; line-height:1.55;
  border:1px solid var(--border-soft); background: var(--surface-2); color: var(--text-muted);
}
.q-feedback.ok{ border-color: var(--success-dim); color: var(--text); }
.q-feedback.bad{ border-color: var(--danger-dim); color: var(--text); }
.q-feedback strong{ font-family: var(--font-mono); font-size:0.78rem; text-transform:uppercase; display:block; margin-bottom:6px; letter-spacing:0.04em; }
.q-feedback.ok strong{ color: var(--success); }
.q-feedback.bad strong{ color: var(--danger); }

.exam-actions{ display:flex; gap:12px; margin-top:26px; flex-wrap:wrap; }
.exam-actions .btn-primary{ margin-left:auto; }

.timer-card{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 18px; text-align:center;
}
.timer-label{ display:block; font-family: var(--font-mono); font-size:0.68rem; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.06em; margin-bottom:6px; }
.timer-value{ font-family: var(--font-mono); font-size: 1.7rem; font-weight:600; color: var(--cyan); }
.timer-card.warn .timer-value{ color: var(--amber); }
.timer-card.danger .timer-value{ color: var(--danger); animation: pulse 1s infinite; }
@keyframes pulse{ 0%,100%{opacity:1;} 50%{opacity:.5;} }

.side-stats{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 16px; display:flex; justify-content:space-between; text-align:center;
}
.side-stats div{ display:flex; flex-direction:column; gap:2px; }
.side-stats strong{ font-family: var(--font-mono); font-size:1.15rem; color:var(--text); }
.side-stats span{ font-size:0.66rem; color: var(--text-faint); text-transform:uppercase; letter-spacing:0.03em; }

/* ============================ RESULTS SCREEN ============================ */
.results-wrap{ max-width: 880px; margin:0 auto; padding: 48px 24px 70px; display:flex; flex-direction:column; gap:24px; }
.score-hero{
  display:flex; align-items:center; gap:36px; flex-wrap:wrap;
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 32px;
}
.score-ring{ position:relative; flex:0 0 auto; }
.score-ring svg{ transform: rotate(-90deg); }
.ring-bg{ fill:none; stroke: var(--surface-3); stroke-width:12; }
.ring-fg{ fill:none; stroke: var(--cyan); stroke-width:12; stroke-linecap:round; stroke-dasharray: 440; stroke-dashoffset:440; transition: stroke-dashoffset 1s ease; }
.score-ring-text{
  position:absolute; inset:0; display:flex; flex-direction:column; align-items:center; justify-content:center;
}
.score-ring-text strong{ font-family: var(--font-display); font-size:1.7rem; }
.score-ring-text span{ font-family: var(--font-mono); font-size:0.78rem; color: var(--text-muted); }
.score-side{ flex:1 1 300px; }
.score-side h1{ font-size:1.5rem; margin-bottom:8px; }
.score-side p{ color: var(--text-muted); margin-bottom:16px; }
.score-tags{ display:flex; gap:8px; flex-wrap:wrap; }
.tag{
  font-family: var(--font-mono); font-size:0.78rem; padding:6px 12px; border-radius:999px;
  background: var(--surface-2); border:1px solid var(--border); color: var(--text-muted);
}

#categoryBars{ display:flex; flex-direction:column; gap:14px; margin-top:6px; }
.cat-bar-row{ display:flex; align-items:center; gap:14px; }
.cat-bar-label{ flex:0 0 190px; font-size:0.82rem; color: var(--text-muted); }
.cat-bar-track{ flex:1; height:8px; background: var(--surface-3); border-radius:999px; overflow:hidden; }
.cat-bar-fill{ height:100%; background: linear-gradient(90deg, var(--cyan), var(--amber)); border-radius:999px; }
.cat-bar-frac{ flex:0 0 56px; text-align:right; font-family: var(--font-mono); font-size:0.78rem; color: var(--text-faint); }

.results-actions{ display:flex; gap:12px; flex-wrap:wrap; }

/* ============================ REVIEW SCREEN ============================ */
.review-wrap{ max-width: 880px; margin:0 auto; padding: 40px 24px 70px; }
.review-header{ display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; margin-bottom:24px; }
.review-filters{ display:flex; gap:8px; }
.chip{
  font-family: var(--font-mono); font-size:0.78rem; padding: 7px 14px; border-radius:999px;
  border:1px solid var(--border); background: var(--surface-2); color: var(--text-muted);
}
.chip.active{ border-color: var(--cyan); color: var(--cyan); background: rgba(55,230,196,0.08); }

.review-item{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 22px 24px; margin-bottom:16px;
}
.review-item-head{ display:flex; align-items:center; gap:10px; margin-bottom:12px; flex-wrap:wrap; }
.review-badge{
  font-family: var(--font-mono); font-size:0.68rem; text-transform:uppercase; letter-spacing:0.04em;
  padding:4px 10px; border-radius:999px;
}
.review-badge.ok{ background: rgba(74,222,128,0.12); color: var(--success); }
.review-badge.bad{ background: rgba(240,87,107,0.12); color: var(--danger); }
.review-badge.blank{ background: var(--surface-3); color: var(--text-muted); }
.review-badge.flagged{ background: rgba(245,168,91,0.12); color: var(--amber); }
.review-item .q-category{ background: var(--surface-3); }
.review-item h3{ font-size: 1.05rem; font-weight:600; line-height:1.5; margin: 10px 0 14px; }
.review-opts{ display:flex; flex-direction:column; gap:8px; margin-bottom:14px; }
.review-opt{
  display:flex; gap:10px; padding:10px 14px; border-radius:8px; font-size:0.9rem;
  border:1px solid var(--border-soft); color: var(--text-muted);
}
.review-opt .opt-letter{
  font-family: var(--font-mono); font-size:0.72rem; color: var(--text-faint);
  border:1px solid var(--border); width:20px; height:20px; border-radius:5px;
  display:flex; align-items:center; justify-content:center; flex:0 0 auto;
}
.review-opt.is-correct{ border-color: var(--success-dim); background: rgba(74,222,128,0.06); color:var(--text); }
.review-opt.is-correct .opt-letter{ background: var(--success); color:#06231D; border-color:var(--success); }
.review-opt.is-user-wrong{ border-color: var(--danger-dim); background: rgba(240,87,107,0.06); color:var(--text); }
.review-opt.is-user-wrong .opt-letter{ background: var(--danger); color:#fff; border-color:var(--danger); }
.review-explain{
  font-size:0.9rem; line-height:1.6; color: var(--text-muted);
  background: var(--surface-2); border-left: 3px solid var(--cyan);
  padding: 12px 16px; border-radius: 6px;
}
.review-explain strong{ color: var(--cyan); font-family: var(--font-mono); font-size:0.72rem; text-transform:uppercase; display:block; margin-bottom:6px; letter-spacing:0.04em;}

.empty-state{ text-align:center; padding: 50px 20px; color: var(--text-faint); font-family: var(--font-mono); font-size:0.9rem; }

/* ============================ MODAL ============================ */
.modal-backdrop{
  position:fixed; inset:0; background: rgba(6,9,20,0.7); backdrop-filter: blur(4px);
  display:flex; align-items:center; justify-content:center; z-index:100; padding:20px;
}
.modal-backdrop[hidden]{ display:none; }
.modal{
  background: var(--surface); border:1px solid var(--border); border-radius: var(--radius-lg);
  padding: 26px 28px; max-width:420px; width:100%;
}
.modal h3{ margin-bottom:10px; font-size:1.1rem; }
.modal p{ color: var(--text-muted); font-size:0.9rem; line-height:1.5; margin-bottom:22px; }
.modal-actions{ display:flex; gap:10px; justify-content:flex-end; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 860px){
  .setup-grid{ grid-template-columns: 1fr; }
  .exam-wrap{ flex-direction:column; }
  .exam-side{ flex-direction:row; flex-wrap:wrap; }
  .timer-card, .side-stats{ flex:1 1 160px; }
  .exam-body{ padding: 22px 18px; }
  .cat-bar-label{ flex-basis:120px; font-size:0.76rem; }
  .score-hero{ padding:22px; }
}
@media (prefers-reduced-motion: reduce){
  *{ animation: none !important; transition: none !important; }
}

/* ============================ AUTH / LOGIN ============================ */
.auth-wrap{
  min-height:100vh; display:flex; align-items:center; justify-content:center; padding:24px;
}
.auth-card{
  width:100%; max-width:380px; background: var(--surface); border:1px solid var(--border-soft);
  border-radius: var(--radius-lg); padding: 34px 30px;
}
.auth-brand{ display:flex; align-items:center; gap:12px; margin-bottom:26px; }
.auth-title{ font-size:1.4rem; margin-bottom:6px; }
.auth-sub{ color: var(--text-muted); font-size:0.88rem; margin-bottom:26px; }
.field{ margin-bottom:16px; }
.field label{ display:block; font-size:0.78rem; color: var(--text-muted); margin-bottom:6px; font-family: var(--font-mono); }
.field input{
  width:100%; background: var(--surface-2); border:1px solid var(--border); color: var(--text);
  border-radius:8px; padding:11px 13px; font-size:0.95rem; font-family: var(--font-body);
}
.field input:focus{ border-color: var(--cyan); outline:none; }
.auth-error{
  background: rgba(240,87,107,0.1); border:1px solid var(--danger-dim); color: var(--danger);
  border-radius:8px; padding:10px 14px; font-size:0.84rem; margin-bottom:16px; display:none;
}
.auth-error.show{ display:block; }

/* ============================ HOME / VENDOR SELECTION ============================ */
.home-wrap{ max-width: 1100px; margin:0 auto; padding: 48px 24px 80px; }
.vendor-grid{
  display:grid; grid-template-columns: repeat(auto-fill, minmax(320px,1fr)); gap:18px; margin-top:30px;
}
.vendor-card{
  background: var(--surface); border:1px solid var(--border-soft); border-radius: var(--radius-lg);
  padding: 22px 24px; display:flex; flex-direction:column; gap:14px;
}
.vendor-card h2{ font-size:1.15rem; display:flex; align-items:center; gap:10px; }
.vendor-dot{ width:9px; height:9px; border-radius:50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); flex:0 0 auto; }
.exam-list{ display:flex; flex-direction:column; gap:8px; }
.exam-row{
  display:flex; align-items:center; justify-content:space-between; gap:10px;
  border:1px solid var(--border-soft); border-radius:10px; padding:12px 14px;
}
.exam-row-info strong{ display:block; font-size:0.92rem; }
.exam-row-info span{ font-size:0.76rem; color: var(--text-faint); font-family: var(--font-mono); }
.exam-row.disabled{ opacity:0.5; }
.badge-soon{
  font-family: var(--font-mono); font-size:0.66rem; text-transform:uppercase; letter-spacing:0.04em;
  background: var(--surface-3); color: var(--text-faint); padding:4px 8px; border-radius:999px;
}
.brand-logo{ border-radius:8px; flex:0 0 auto; display:block; }

/* ============================ CATEGORY BARS (resultado) ============================ */
.category-bar-row{ margin-bottom:16px; }
.category-bar-row:last-child{ margin-bottom:0; }
.category-bar-label{
  display:flex; justify-content:space-between; align-items:baseline; margin-bottom:6px;
  font-size:0.86rem;
}
.category-bar-label span:first-child{ color: var(--text); }
.category-bar-pct{ font-family: var(--font-mono); color: var(--text-muted); font-size:0.8rem; }
.category-bar-pct small{ color: var(--text-faint); }
.category-bar-track{
  height:10px; border-radius:999px; background: var(--surface-3); overflow:hidden;
}
.category-bar-fill{
  height:100%; border-radius:999px; transition: width .4s ease;
  background: var(--danger);
}
.category-bar-fill.mid{ background: var(--amber); }
.category-bar-fill.good{ background: var(--success); }

.cli-example{
  display:block; margin-top:14px; padding:14px 16px; border-radius:8px;
  background: #05070f; border:1px solid var(--border-soft);
  font-family: var(--font-mono); font-size:0.8rem; line-height:1.6; color: #7de89a;
  white-space: pre-wrap; word-break: break-word; overflow-x:auto;
}
.exam-row-editions{ flex-wrap:wrap; }
.edition-buttons{ display:flex; gap:8px; flex-wrap:wrap; }
.resume-banner{
  display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap;
  background: rgba(55,230,196,0.06); border:1px solid var(--cyan-dim, var(--border-soft));
  border-radius: var(--radius-lg); padding:18px 22px; margin-top:22px;
}
.resume-banner-info{ display:flex; flex-direction:column; gap:4px; }
.resume-banner-info span{ font-size:0.86rem; color: var(--text-muted); }
.resume-banner-actions{ display:flex; gap:8px; flex-wrap:wrap; }
.btn-sm{ padding:8px 16px; font-size:0.82rem; }

.topbar-user{ display:flex; align-items:center; gap:12px; }
.topbar-user span{ font-family: var(--font-mono); font-size:0.8rem; color: var(--text-muted); }
.topbar-user .role-badge{
  font-size:0.66rem; text-transform:uppercase; padding:3px 8px; border-radius:999px;
  background: var(--surface-3); color: var(--amber); font-family: var(--font-mono);
}

/* ============================ ADMIN ============================ */
.admin-wrap{ max-width: 980px; margin:0 auto; padding: 40px 24px 70px; }
.admin-tabs{ display:flex; gap:8px; margin: 24px 0; }
table.admin-table{ width:100%; border-collapse:collapse; font-size:0.88rem; }
table.admin-table th{
  text-align:left; font-family: var(--font-mono); font-size:0.7rem; text-transform:uppercase;
  color: var(--text-faint); padding:10px 12px; border-bottom:1px solid var(--border-soft);
}
table.admin-table td{ padding:10px 12px; border-bottom:1px solid var(--border-soft); }
table.admin-table tr:hover td{ background: var(--surface-2); }
.pill{
  font-family: var(--font-mono); font-size:0.68rem; padding:3px 9px; border-radius:999px;
  background: var(--surface-3); color: var(--text-muted);
}
.pill.admin{ color: var(--amber); }
.pill.active{ color: var(--success); }
.pill.inactive{ color: var(--danger); }
.admin-form{ display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-bottom:24px; }
.admin-form .field{ margin-bottom:0; min-width:160px; }
.icon-btn{
  background:none; border:1px solid var(--border); color: var(--text-muted); border-radius:7px;
  padding:6px 10px; font-size:0.76rem; font-family: var(--font-mono);
}
.icon-btn:hover{ border-color: var(--cyan); color: var(--cyan); }
.icon-btn.danger:hover{ border-color: var(--danger); color: var(--danger); }

/* ============================ MULTISELECT OPTIONS ============================ */
.q-option.multiselect .opt-letter{ border-radius:5px; }
.q-hint{ font-family: var(--font-mono); font-size:0.72rem; color: var(--amber); margin-bottom:14px; display:block; }
.q-hint[hidden]{ display:none; }
.q-diagram-note{
  font-size:0.82rem; color: var(--text-faint); background: var(--surface-2); border:1px dashed var(--border);
  border-radius:8px; padding:10px 14px; margin-bottom:16px;
}
.q-diagram-img{
  display:block; max-width:100%; height:auto; border-radius:10px; border:1px solid var(--border-soft);
  margin: 14px 0 20px; background:#fff;
}
.q-diagram-img[hidden]{ display:none; }
.review-diagram-img{
  display:block; max-width:100%; height:auto; border-radius:10px; border:1px solid var(--border-soft);
  margin: 12px 0; background:#fff;
}

