/* ============================================================
   Prometric · Dental Hygiene — Luxury Liquid-Glass UI
   ============================================================ */

:root {
  --bg:        #08090d;
  --bg-2:      #0e0f16;
  --ink:       #f5f2ea;
  --ink-soft:  #c9c6bd;
  --ink-mut:   #8f8c84;
  --ink-faint: #6a6862;

  --gold-1:    #f6e3b4;
  --gold-2:    #e4c079;
  --gold-3:    #bd914f;
  --gold-line: rgba(230, 199, 137, 0.55);

  --mint:      #7fe6d2;
  --mint-deep: #3fb8a6;

  --ok:        #7ee6a8;
  --ok-deep:   #34c07a;
  --bad:       #ff8a8a;
  --bad-deep:  #e55d5d;

  --glass:      rgba(255, 255, 255, 0.055);
  --glass-2:    rgba(255, 255, 255, 0.085);
  --glass-strong: rgba(255, 255, 255, 0.11);
  --border:     rgba(255, 255, 255, 0.13);
  --border-soft:rgba(255, 255, 255, 0.08);

  --r-lg: 28px;
  --r-md: 20px;
  --r-sm: 14px;
  --r-pill: 999px;

  --shadow-1: 0 10px 30px rgba(0,0,0,0.35);
  --shadow-2: 0 24px 60px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 0 1px rgba(230,199,137,0.14), 0 20px 55px rgba(0,0,0,0.55);

  --blur: 22px;
  --maxw: 1120px;

  --ff-display: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --ff-ui: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--ff-ui);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  letter-spacing: 0.01em;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ---------- Background layers ---------- */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; background: var(--bg); }
.bg-grad {
  position: absolute; inset: -20%;
  background:
    radial-gradient(60% 50% at 15% 10%, rgba(60, 52, 30, 0.55), transparent 60%),
    radial-gradient(55% 55% at 85% 15%, rgba(28, 58, 55, 0.5), transparent 62%),
    radial-gradient(70% 60% at 50% 110%, rgba(40, 32, 60, 0.45), transparent 60%),
    linear-gradient(160deg, #090a0f 0%, #0c0d13 45%, #080810 100%);
}
.blob {
  position: absolute; border-radius: 50%; filter: blur(70px);
  opacity: 0.5; mix-blend-mode: screen; will-change: transform;
}
.blob-1 { width: 46vw; height: 46vw; left: -8vw; top: -8vw;
  background: radial-gradient(circle at 40% 40%, rgba(233,193,120,0.55), rgba(233,193,120,0) 70%);
  animation: drift1 26s ease-in-out infinite; }
.blob-2 { width: 42vw; height: 42vw; right: -10vw; top: 5vh;
  background: radial-gradient(circle at 50% 50%, rgba(63,184,166,0.5), rgba(63,184,166,0) 70%);
  animation: drift2 32s ease-in-out infinite; }
.blob-3 { width: 50vw; height: 50vw; left: 20vw; bottom: -20vh;
  background: radial-gradient(circle at 50% 50%, rgba(120,90,180,0.4), rgba(120,90,180,0) 70%);
  animation: drift3 38s ease-in-out infinite; }
@keyframes drift1 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(6vw,4vh) scale(1.12)} }
@keyframes drift2 { 0%,100%{transform:translate(0,0) scale(1.05)} 50%{transform:translate(-5vw,6vh) scale(0.9)} }
@keyframes drift3 { 0%,100%{transform:translate(0,0) scale(1)} 50%{transform:translate(4vw,-6vh) scale(1.1)} }
.bg-noise {
  position: absolute; inset: 0; opacity: 0.04; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.bg-vignette {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 0%, transparent 55%, rgba(0,0,0,0.55) 100%);
}
@media (prefers-reduced-motion: reduce) { .blob { animation: none; } }

/* ---------- Layout ---------- */
.app { position: relative; z-index: 1; }
.wrap {
  width: 100%; max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(20px, 4vw, 56px) clamp(18px, 4vw, 40px) 80px;
}
.center-screen {
  min-height: 100dvh; display: flex; align-items: center; justify-content: center;
  padding: 24px 18px;
}

/* ---------- Glass primitive ---------- */
.glass {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  backdrop-filter: blur(var(--blur)) saturate(150%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(150%);
  box-shadow: var(--shadow-1), inset 0 1px 0 rgba(255,255,255,0.09);
  overflow: hidden;
}
.glass::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
  opacity: 0.7;
}

/* ---------- Type ---------- */
.eyebrow {
  font-size: 0.72rem; letter-spacing: 0.34em; text-transform: uppercase;
  color: var(--gold-2); font-weight: 600;
}
.display {
  font-family: var(--ff-display); font-weight: 600; line-height: 1.02;
  letter-spacing: -0.01em;
}
h1.display { font-size: clamp(2.5rem, 7vw, 4.6rem); }
.display .it { font-style: italic; font-weight: 500; color: var(--gold-1); }
.lede { color: var(--ink-soft); font-size: clamp(1rem, 2.4vw, 1.18rem); font-weight: 300; }
.gold-text {
  background: linear-gradient(100deg, var(--gold-1), var(--gold-2) 55%, var(--gold-3));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}

/* ---------- Buttons ---------- */
.btn {
  --bg-btn: var(--glass-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--ff-ui); font-weight: 600; font-size: 0.98rem;
  letter-spacing: 0.02em; color: var(--ink);
  padding: 15px 26px; border-radius: var(--r-pill);
  border: 1px solid var(--border); background: var(--bg-btn);
  cursor: pointer; position: relative; overflow: hidden;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s, background .3s;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-tap-highlight-color: transparent; user-select: none;
  min-height: 50px;
}
.btn:hover { transform: translateY(-2px); border-color: var(--gold-line); }
.btn:active { transform: translateY(0) scale(.99); }
.btn::after {
  content: ""; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: skewX(-18deg); transition: left .6s ease;
}
.btn:hover::after { left: 130%; }
.btn-gold {
  color: #241d0e; border: none;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-2) 52%, var(--gold-3));
  box-shadow: 0 10px 26px rgba(190,145,79,0.35), inset 0 1px 0 rgba(255,255,255,0.5);
  font-weight: 700;
}
.btn-gold:hover { box-shadow: 0 16px 40px rgba(190,145,79,0.5), inset 0 1px 0 rgba(255,255,255,0.6); }
.btn-ghost { background: transparent; }
.btn-block { width: 100%; }
.btn-lg { padding: 18px 34px; font-size: 1.05rem; min-height: 58px; }
.btn-sm { padding: 10px 18px; font-size: 0.85rem; min-height: 40px; }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-danger:hover { border-color: var(--bad); color: var(--bad); }

/* icon-only round button */
.icon-btn {
  width: 46px; height: 46px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; padding: 0; font-size: 1.2rem;
  background: var(--glass-2); border: 1px solid var(--border); color: var(--ink);
  cursor: pointer; transition: .25s; backdrop-filter: blur(10px);
}
.icon-btn:hover { border-color: var(--gold-line); transform: translateY(-2px); }

/* ---------- Top bar ---------- */
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-bottom: clamp(24px, 5vw, 48px);
}
.brand { display: flex; align-items: center; gap: 13px; cursor: pointer; }
.brand-mark {
  width: 44px; height: 44px; border-radius: 13px; flex: 0 0 auto;
  display: grid; place-items: center; font-family: var(--ff-display);
  font-weight: 700; font-size: 1.4rem; color: #241d0e;
  background: linear-gradient(135deg, var(--gold-1), var(--gold-3));
  box-shadow: 0 8px 22px rgba(190,145,79,0.4), inset 0 1px 0 rgba(255,255,255,0.6);
}
.brand-name { font-family: var(--ff-display); font-size: 1.35rem; font-weight: 600; line-height: 1; }
.brand-sub { font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase; color: var(--ink-mut); }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 9px; padding: 8px 8px 8px 16px;
  border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--border);
  font-size: 0.85rem; color: var(--ink-soft); max-width: 62vw;
}
.user-chip .email { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-chip .avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: 0 0 auto; display: grid;
  place-items: center; font-weight: 700; font-size: 0.8rem; color: #241d0e;
  background: linear-gradient(135deg, var(--mint), var(--mint-deep));
}

/* ---------- Auth screen ---------- */
.auth-card { width: 100%; max-width: 460px; padding: clamp(30px, 6vw, 48px); border-radius: var(--r-lg); }
.auth-card .brand-mark { width: 58px; height: 58px; font-size: 1.9rem; border-radius: 17px; margin-bottom: 26px; }
.auth-card h1 { font-family: var(--ff-display); font-size: 2.4rem; font-weight: 600; margin-bottom: 8px; }
.auth-card p.sub { color: var(--ink-mut); margin-bottom: 28px; font-weight: 300; }
.field { margin-bottom: 16px; }
.field label { display:block; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mut); margin-bottom: 9px; }
.input {
  width: 100%; padding: 16px 18px; font-size: 1rem; font-family: var(--ff-ui); color: var(--ink);
  background: rgba(0,0,0,0.28); border: 1px solid var(--border); border-radius: var(--r-sm);
  transition: border-color .25s, box-shadow .25s; outline: none;
}
.input::placeholder { color: var(--ink-faint); }
.input:focus { border-color: var(--gold-line); box-shadow: 0 0 0 3px rgba(230,199,137,0.14); }
.auth-note { font-size: 0.82rem; color: var(--ink-faint); margin-top: 18px; text-align: center; line-height: 1.6; }
.err-text { color: var(--bad); font-size: 0.85rem; margin-top: 8px; min-height: 1em; }

/* ---------- Hero (home) ---------- */
.hero { text-align: center; margin: clamp(8px,3vw,26px) auto clamp(34px,6vw,60px); max-width: 760px; }
.hero .eyebrow { margin-bottom: 20px; display: inline-block; }
.hero h1 { margin-bottom: 20px; }
.hero .lede { max-width: 620px; margin: 0 auto; }
.stat-row { display: flex; gap: 30px; justify-content: center; flex-wrap: wrap; margin-top: 30px; }
.stat { text-align: center; }
.stat .num { font-family: var(--ff-display); font-size: 2.1rem; font-weight: 600; color: var(--gold-1); line-height: 1; }
.stat .lbl { font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-mut); margin-top: 6px; }

/* ---------- Module cards ---------- */
.modules { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px,2.2vw,24px); }
.mod-card {
  padding: clamp(24px, 3vw, 34px); border-radius: var(--r-lg); cursor: pointer;
  display: flex; flex-direction: column; min-height: 260px;
  transition: transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .4s, border-color .4s;
}
.mod-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-glow); border-color: var(--gold-line); }
.mod-ic {
  width: 60px; height: 60px; border-radius: 18px; display: grid; place-items: center;
  font-size: 1.7rem; margin-bottom: 22px; background: var(--glass-strong);
  border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,0.14);
}
.mod-card h3 { font-family: var(--ff-display); font-size: 1.8rem; font-weight: 600; margin-bottom: 8px; }
.mod-card p { color: var(--ink-mut); font-size: 0.92rem; font-weight: 300; flex: 1; }
.mod-card .go {
  margin-top: 20px; display: inline-flex; align-items: center; gap: 8px;
  color: var(--gold-2); font-weight: 600; font-size: 0.9rem; letter-spacing: 0.02em;
}
.mod-card .go .arw { transition: transform .3s; }
.mod-card:hover .go .arw { transform: translateX(5px); }
.mod-badge {
  position: absolute; top: 20px; right: 20px; font-size: 0.68rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--mint); padding: 5px 11px; border-radius: var(--r-pill);
  background: rgba(63,184,166,0.12); border: 1px solid rgba(127,230,210,0.28);
}

/* ---------- Values strip ---------- */
.values { display: grid; grid-template-columns: repeat(3,1fr); gap: 18px; margin-top: clamp(30px,5vw,54px); }
.value { padding: 22px 24px; border-radius: var(--r-md); }
.value .t { font-family: var(--ff-display); font-size: 1.25rem; color: var(--gold-1); margin-bottom: 6px; }
.value .d { font-size: 0.86rem; color: var(--ink-mut); font-weight: 300; }

/* ---------- Section header ---------- */
.sec-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.sec-head h2 { font-family: var(--ff-display); font-size: clamp(2rem,5vw,2.9rem); font-weight: 600; }
.sec-head .eyebrow { margin-bottom: 8px; }
.back-link {
  display: inline-flex; align-items: center; gap: 8px; color: var(--ink-mut);
  font-size: 0.88rem; cursor: pointer; transition: color .25s; background: none; border: none; font-family: var(--ff-ui);
}
.back-link:hover { color: var(--gold-2); }

/* ---------- Prep choose ---------- */
.two-col { display: grid; grid-template-columns: repeat(2,1fr); gap: clamp(16px,2.4vw,26px); }

/* ---------- Question card ---------- */
.q-stage { max-width: 780px; margin: 0 auto; }
.q-meta { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; flex-wrap: wrap; }
.q-counter { font-size: 0.9rem; color: var(--ink-mut); font-weight: 500; }
.q-counter b { color: var(--ink); font-weight: 700; }
.q-topic {
  font-size: 0.7rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold-2);
  padding: 5px 12px; border-radius: var(--r-pill); background: rgba(230,199,137,0.1);
  border: 1px solid rgba(230,199,137,0.24);
}
.q-source { font-size: 0.72rem; color: var(--ink-faint); letter-spacing: .04em; }
.progress { height: 5px; border-radius: 999px; background: rgba(255,255,255,0.09); overflow: hidden; margin-bottom: 22px; }
.progress > span { display:block; height:100%; border-radius:999px; background: linear-gradient(90deg,var(--gold-3),var(--gold-1)); transition: width .4s ease; }

.q-card { padding: clamp(24px, 3.4vw, 40px); border-radius: var(--r-lg); }
.q-text {
  font-family: var(--ff-display); font-size: clamp(1.35rem, 3.2vw, 1.9rem); font-weight: 600;
  line-height: 1.28; margin-bottom: 26px; color: var(--ink);
}
.opts { display: flex; flex-direction: column; gap: 12px; }
.opt {
  display: flex; align-items: flex-start; gap: 15px; width: 100%; text-align: left;
  padding: 16px 18px; border-radius: var(--r-sm); cursor: pointer; font-family: var(--ff-ui);
  font-size: 1rem; color: var(--ink-soft); background: rgba(255,255,255,0.035);
  border: 1px solid var(--border-soft); transition: .22s; line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}
.opt:hover:not(.locked) { border-color: var(--gold-line); background: rgba(255,255,255,0.06); color: var(--ink); transform: translateX(3px); }
.opt .key {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  font-weight: 700; font-size: 0.9rem; background: var(--glass-strong); border: 1px solid var(--border);
  color: var(--ink); transition: .22s;
}
.opt .txt { padding-top: 3px; }
.opt.selected { border-color: var(--gold-line); background: rgba(230,199,137,0.1); color: var(--ink); }
.opt.selected .key { background: linear-gradient(135deg,var(--gold-1),var(--gold-3)); color: #241d0e; }
.opt.correct { border-color: rgba(126,230,168,0.6); background: rgba(52,192,122,0.14); color: #eafff2; }
.opt.correct .key { background: linear-gradient(135deg,var(--ok),var(--ok-deep)); color: #06301c; }
.opt.wrong { border-color: rgba(255,138,138,0.55); background: rgba(229,93,93,0.14); color: #ffecec; }
.opt.wrong .key { background: linear-gradient(135deg,var(--bad),var(--bad-deep)); color: #3a0d0d; }
.opt.locked { cursor: default; }
.opt .mark { margin-left: auto; font-size: 1.1rem; opacity: 0; transition: opacity .2s; align-self: center; }
.opt.correct .mark, .opt.wrong .mark { opacity: 1; }

/* explanation */
.explain {
  margin-top: 20px; padding: 18px 20px; border-radius: var(--r-sm);
  background: rgba(255,255,255,0.045); border: 1px solid var(--border-soft);
  border-left: 3px solid var(--gold-2); animation: fadeUp .4s ease;
}
.explain .head { display:flex; align-items:center; gap: 9px; margin-bottom: 8px; }
.explain .verdict { font-weight: 700; font-size: 0.95rem; }
.explain .verdict.ok { color: var(--ok); }
.explain .verdict.bad { color: var(--bad); }
.explain .body { color: var(--ink-soft); font-size: 0.95rem; line-height: 1.55; }
.explain .ans { color: var(--ink-mut); font-size: 0.86rem; margin-top: 8px; }
.explain .ans b { color: var(--ok); }

.q-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.q-actions .spacer { flex: 1; }

/* ---------- Exam navigator ---------- */
.exam-top { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 20px; flex-wrap: wrap; }
.timer-chip { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink-soft); font-size: 0.95rem;
  padding: 8px 16px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--border); }
.navigator { display: grid; grid-template-columns: repeat(auto-fill, minmax(38px, 1fr)); gap: 8px; margin-top: 4px; }
.nav-cell {
  aspect-ratio: 1; border-radius: 10px; border: 1px solid var(--border-soft);
  background: rgba(255,255,255,0.03); color: var(--ink-mut); font-size: 0.82rem; font-weight: 600;
  cursor: pointer; display: grid; place-items: center; transition: .18s; font-variant-numeric: tabular-nums;
}
.nav-cell:hover { border-color: var(--gold-line); color: var(--ink); }
.nav-cell.answered { background: rgba(230,199,137,0.16); border-color: var(--gold-line); color: var(--gold-1); }
.nav-cell.current { outline: 2px solid var(--gold-2); outline-offset: 1px; color: var(--ink); }
.nav-legend { display:flex; gap:18px; margin-top:14px; font-size:0.78rem; color:var(--ink-mut); flex-wrap:wrap; }
.nav-legend span { display:inline-flex; align-items:center; gap:7px; }
.dot { width:11px; height:11px; border-radius:4px; display:inline-block; }
.dot.a { background: rgba(230,199,137,0.6); }
.dot.u { background: rgba(255,255,255,0.12); }

/* ---------- Result ---------- */
.result-hero { text-align:center; padding: clamp(28px,5vw,46px); border-radius: var(--r-lg); margin-bottom: 26px; }
.ring-wrap { position: relative; width: 190px; height: 190px; margin: 0 auto 22px; }
.ring-wrap svg { transform: rotate(-90deg); width: 100%; height: 100%; }
.ring-bg { fill: none; stroke: rgba(255,255,255,0.09); stroke-width: 12; }
.ring-fg { fill: none; stroke: url(#grg); stroke-width: 12; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1); }
.ring-center { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; }
.ring-center .pct { font-family: var(--ff-display); font-size: 3rem; font-weight: 700; line-height: 1; }
.ring-center .cap { font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-mut); margin-top: 4px; }
.result-verdict { font-family: var(--ff-display); font-size: 1.9rem; margin-bottom: 6px; }
.result-sub { color: var(--ink-mut); }
.result-stats { display:flex; gap: 14px; justify-content:center; margin-top: 22px; flex-wrap: wrap; }
.rs {
  padding: 14px 22px; border-radius: var(--r-md); background: var(--glass); border: 1px solid var(--border);
  min-width: 110px;
}
.rs .v { font-family: var(--ff-display); font-size: 1.7rem; font-weight: 600; }
.rs .v.ok { color: var(--ok); } .rs .v.bad { color: var(--bad); }
.rs .l { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-mut); }

.review-item { padding: 20px 22px; border-radius: var(--r-md); margin-bottom: 14px; }
.review-item .rq { font-family: var(--ff-display); font-size: 1.2rem; font-weight: 600; margin-bottom: 12px; line-height: 1.3; }
.review-row { display:flex; gap: 10px; align-items:flex-start; font-size: 0.92rem; margin-bottom: 6px; }
.review-row .rk { flex:0 0 auto; width: 22px; height: 22px; border-radius: 7px; display:grid; place-items:center; font-size:0.72rem; font-weight:700; }
.rk.ok { background: linear-gradient(135deg,var(--ok),var(--ok-deep)); color:#06301c; }
.rk.bad { background: linear-gradient(135deg,var(--bad),var(--bad-deep)); color:#3a0d0d; }
.rk.n { background: var(--glass-strong); color: var(--ink-mut); border:1px solid var(--border); }
.review-row .rt { color: var(--ink-soft); }
.review-exp { margin-top: 10px; font-size: 0.88rem; color: var(--ink-mut); line-height: 1.5; padding-top: 10px; border-top: 1px solid var(--border-soft); }

/* ---------- History ---------- */
.tabs { display: inline-flex; gap: 6px; padding: 6px; border-radius: var(--r-pill); background: var(--glass); border: 1px solid var(--border); margin-bottom: 26px; }
.tab {
  padding: 10px 22px; border-radius: var(--r-pill); border: none; background: transparent; cursor: pointer;
  color: var(--ink-mut); font-family: var(--ff-ui); font-weight: 600; font-size: 0.9rem; transition: .25s;
}
.tab.active { background: linear-gradient(135deg,var(--gold-1),var(--gold-3)); color: #241d0e; box-shadow: 0 6px 18px rgba(190,145,79,0.35); }
.hist-summary { display:grid; grid-template-columns: repeat(auto-fit,minmax(150px,1fr)); gap: 14px; margin-bottom: 26px; }
.hist-stat { padding: 20px 22px; border-radius: var(--r-md); }
.hist-stat .v { font-family: var(--ff-display); font-size: 2rem; font-weight: 600; color: var(--gold-1); line-height:1; }
.hist-stat .l { font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mut); margin-top: 8px; }

.hist-row {
  display:flex; align-items:center; gap: 16px; padding: 16px 20px; border-radius: var(--r-md);
  margin-bottom: 10px; cursor: pointer; transition: .25s;
}
.hist-row:hover { border-color: var(--gold-line); transform: translateX(3px); }
.hist-badge {
  flex:0 0 auto; width: 52px; height: 52px; border-radius: 15px; display:grid; place-items:center;
  font-family: var(--ff-display); font-weight: 700; font-size: 1.2rem;
}
.hist-badge.pass { background: rgba(52,192,122,0.16); color: var(--ok); border: 1px solid rgba(126,230,168,0.35); }
.hist-badge.fail { background: rgba(229,93,93,0.14); color: var(--bad); border: 1px solid rgba(255,138,138,0.3); }
.hist-info { flex: 1; min-width: 0; }
.hist-info .ht { font-weight: 600; color: var(--ink); }
.hist-info .hd { font-size: 0.82rem; color: var(--ink-mut); }
.hist-arrow { color: var(--ink-faint); font-size: 1.1rem; }

.prep-log-row { display:flex; align-items:center; gap:14px; padding: 13px 18px; border-radius: var(--r-sm); margin-bottom: 8px; background: rgba(255,255,255,0.03); border:1px solid var(--border-soft); }
.prep-log-row .pm { flex:0 0 auto; width: 26px; height:26px; border-radius:8px; display:grid; place-items:center; font-size:0.8rem; }
.prep-log-row .pq { flex:1; min-width:0; font-size:0.9rem; color: var(--ink-soft); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.prep-log-row .pd { font-size: 0.74rem; color: var(--ink-faint); white-space:nowrap; }

/* ---------- Empty state ---------- */
.empty { text-align: center; padding: 60px 24px; }
.empty .ic { font-size: 3rem; margin-bottom: 16px; opacity: 0.7; }
.empty h3 { font-family: var(--ff-display); font-size: 1.6rem; margin-bottom: 8px; }
.empty p { color: var(--ink-mut); margin-bottom: 22px; }

/* ---------- Loader ---------- */
.loader { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height: 60vh; gap: 20px; }
.spinner { width: 46px; height: 46px; border-radius: 50%; border: 3px solid rgba(255,255,255,0.12); border-top-color: var(--gold-1); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loader p { color: var(--ink-mut); font-size: 0.92rem; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 30px);
  padding: 13px 22px; border-radius: var(--r-pill); background: rgba(20,20,26,0.9);
  border: 1px solid var(--border); color: var(--ink); font-size: 0.9rem; font-weight: 500;
  box-shadow: var(--shadow-2); backdrop-filter: blur(14px); z-index: 100;
  opacity: 0; pointer-events: none; transition: .35s cubic-bezier(.2,.8,.2,1); max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(126,230,168,0.5); }
.toast.bad { border-color: rgba(255,138,138,0.5); }

/* ---------- Modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,0.6); backdrop-filter: blur(6px); z-index: 200;
  display: grid; place-items: center; padding: 20px; animation: fade .25s ease; }
.modal { width: 100%; max-width: 400px; padding: 30px; border-radius: var(--r-lg); text-align: center; }
.modal h3 { font-family: var(--ff-display); font-size: 1.6rem; margin-bottom: 10px; }
.modal p { color: var(--ink-mut); margin-bottom: 24px; }
.modal-actions { display:flex; gap: 12px; }
.modal-actions .btn { flex: 1; }

/* ---------- Animations ---------- */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.view-enter > * { animation: fadeUp .5s cubic-bezier(.2,.8,.2,1) both; }
.view-enter > *:nth-child(2) { animation-delay: .06s; }
.view-enter > *:nth-child(3) { animation-delay: .12s; }
.view-enter > *:nth-child(4) { animation-delay: .18s; }
.stagger > * { animation: fadeUp .5s cubic-bezier(.2,.8,.2,1) both; }
.stagger > *:nth-child(1){animation-delay:.04s}
.stagger > *:nth-child(2){animation-delay:.10s}
.stagger > *:nth-child(3){animation-delay:.16s}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .modules { grid-template-columns: 1fr; }
  .values { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .mod-card { min-height: auto; }
}
@media (max-width: 560px) {
  .wrap { padding-left: 16px; padding-right: 16px; }
  .brand-sub { display: none; }
  .stat-row { gap: 20px; }
  .navigator { grid-template-columns: repeat(auto-fill, minmax(34px, 1fr)); gap: 6px; }
  .q-actions { flex-direction: column; }
  .q-actions .btn { width: 100%; }
  .q-actions .spacer { display: none; }
  .result-stats { gap: 10px; }
  .hist-summary { grid-template-columns: repeat(2,1fr); }
  .user-chip .email { max-width: 120px; }
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .btn, .user-chip, .timer-chip, .tabs { background: rgba(20,21,28,0.92); }
}
