/* ============================================================================
   Test Portal — "Test Lab" visual identity
   Display: Space Grotesk · Body: Plus Jakarta Sans · Data/eyebrows: JetBrains Mono
   Signature: the verdict spectrum (pass/fail/blocked/na as a stacked color strip)
   ========================================================================== */

/* Self-hosted fonts — no external (Google) dependency, so text always renders
   in the intended typefaces regardless of network/region. */
@font-face { font-family:'Space Grotesk'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/space-grotesk-v22-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'Space Grotesk'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/space-grotesk-v22-latin-500.woff2') format('woff2'); }
@font-face { font-family:'Space Grotesk'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/space-grotesk-v22-latin-600.woff2') format('woff2'); }
@font-face { font-family:'Space Grotesk'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/space-grotesk-v22-latin-700.woff2') format('woff2'); }
@font-face { font-family:'Plus Jakarta Sans'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/plus-jakarta-sans-v12-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'Plus Jakarta Sans'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/plus-jakarta-sans-v12-latin-500.woff2') format('woff2'); }
@font-face { font-family:'Plus Jakarta Sans'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/plus-jakarta-sans-v12-latin-600.woff2') format('woff2'); }
@font-face { font-family:'Plus Jakarta Sans'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/plus-jakarta-sans-v12-latin-700.woff2') format('woff2'); }
@font-face { font-family:'Plus Jakarta Sans'; font-style:normal; font-weight:800; font-display:swap; src:url('/assets/fonts/plus-jakarta-sans-v12-latin-800.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:400; font-display:swap; src:url('/assets/fonts/jetbrains-mono-v24-latin-regular.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:500; font-display:swap; src:url('/assets/fonts/jetbrains-mono-v24-latin-500.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:600; font-display:swap; src:url('/assets/fonts/jetbrains-mono-v24-latin-600.woff2') format('woff2'); }
@font-face { font-family:'JetBrains Mono'; font-style:normal; font-weight:700; font-display:swap; src:url('/assets/fonts/jetbrains-mono-v24-latin-700.woff2') format('woff2'); }

:root {
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --bg: #f1f2fb;
  --surface: #ffffff;
  --surface-2: #f8f8fe;
  --border: #e7e7f4;
  --border-strong: #d7d8ec;

  --ink: #191630;
  --ink-soft: #6a6886;
  --ink-faint: #9c9bb4;

  --primary: #5b3df5;
  --primary-700: #4a2be0;
  --primary-100: #ece8fe;
  --primary-50: #f4f1ff;
  --accent: #00bfa6;
  --accent-100: #d3f6f0;

  --pass: #0fae74;   --pass-bg: #d6f5e8;
  --fail: #f43f5e;   --fail-bg: #fee0e6;
  --blocked: #ef9606; --blocked-bg: #fcedcf;
  --na: #8c98ab;     --na-bg: #e7ebf1;

  --radius: 14px;
  --radius-sm: 10px;
  --radius-lg: 20px;
  --shadow-sm: 0 1px 2px rgba(25, 22, 48, 0.06);
  --shadow: 0 4px 18px -6px rgba(25, 22, 48, 0.13), 0 2px 6px -3px rgba(25, 22, 48, 0.08);
  --shadow-lg: 0 24px 50px -16px rgba(50, 26, 150, 0.32);
  --sidebar-grad: linear-gradient(190deg, #211a52 0%, #3a22a4 58%, #5b3df5 135%);
  --hero-grad: linear-gradient(155deg, #2a1e63 0%, #4226ad 55%, #6d4aff 120%);
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.55;
  background: var(--bg);
}
/* The decorative gradient lives on its own viewport-fixed layer (behind everything).
   This avoids `background-attachment: fixed` on <body>, which makes Chrome rasterize
   the whole scrolling page and pixelate text when zoomed. Text stays vector-crisp. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(1100px 560px at -5% -10%, rgba(91, 61, 245, 0.10), transparent 60%),
    radial-gradient(900px 560px at 105% 0%, rgba(0, 191, 166, 0.10), transparent 55%),
    var(--bg);
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--font-display); letter-spacing: -0.01em; }

/* Utility ---------------------------------------------------------------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: var(--ink-faint);
}
.subtle { color: var(--ink-soft); }
.muted-sm { font-size: 12px; color: var(--ink-soft); }
.mono { font-family: var(--font-mono); }

/* Layout ----------------------------------------------------------------- */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  width: 244px;
  flex-shrink: 0;
  background: var(--sidebar-grad);
  color: rgba(255, 255, 255, 0.72);
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: hidden;
}
/* subtle grain of light in the sidebar */
.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at 80% -5%, rgba(255, 255, 255, 0.16), transparent 70%);
  pointer-events: none;
}
.sidebar > * { position: relative; }

.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand-mark {
  width: 38px; height: 38px;
  border-radius: 11px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  font-size: 19px;
}
.brand-name { color: #fff; font-family: var(--font-display); font-weight: 700; font-size: 17px; line-height: 1.1; }
.brand-tag { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.55); }

.nav-eyebrow {
  font-family: var(--font-mono);
  font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
  padding: 14px 12px 6px;
}
.sidebar a.navlink {
  color: rgba(255, 255, 255, 0.74);
  padding: 10px 13px;
  border-radius: 10px;
  display: flex; align-items: center; gap: 10px;
  font-weight: 500;
  transition: background 0.15s, color 0.15s, transform 0.15s;
}
.sidebar a.navlink::before {
  content: '';
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; opacity: 0.4;
  transition: opacity 0.15s, box-shadow 0.15s;
}
.sidebar a.navlink:hover { background: rgba(255, 255, 255, 0.10); color: #fff; text-decoration: none; }
.sidebar a.navlink.active {
  background: #fff; color: var(--primary-700); font-weight: 700;
  box-shadow: 0 6px 16px -6px rgba(0, 0, 0, 0.45);
}
.sidebar a.navlink.active::before { opacity: 1; background: var(--accent); box-shadow: 0 0 0 3px rgba(0, 191, 166, 0.2); }

.spacer { flex: 1; }

.userbox {
  display: flex; align-items: center; gap: 10px;
  padding: 12px; margin-top: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
}
.avatar {
  width: 36px; height: 36px; flex-shrink: 0;
  border-radius: 10px;
  display: grid; place-items: center;
  font-family: var(--font-display); font-weight: 700; font-size: 14px; color: #fff;
  background: linear-gradient(135deg, var(--accent), #19d3bd);
}
.userbox .who { min-width: 0; flex: 1; }
.userbox .who b { color: #fff; font-size: 13px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.userbox .who span { font-size: 11px; color: rgba(255, 255, 255, 0.55); }
.signout {
  background: rgba(255, 255, 255, 0.12); border: none; color: #fff;
  width: 30px; height: 30px; border-radius: 8px; padding: 0; flex-shrink: 0;
  display: grid; place-items: center; cursor: pointer;
}
.signout:hover { background: rgba(255, 255, 255, 0.24); }

.main {
  flex: 1;
  padding: 30px 40px 60px;
  max-width: 1180px;
  animation: rise 0.4s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.page-title { font-size: 27px; font-weight: 700; margin: 2px 0 0; letter-spacing: -0.02em; }

/* Cards ------------------------------------------------------------------ */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 16px;
}
a.card { display: block; color: inherit; transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s; }
a.card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* Buttons ---------------------------------------------------------------- */
button, .btn {
  font: inherit; font-weight: 600;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 0.14s, border-color 0.14s, transform 0.06s, box-shadow 0.14s;
}
button:hover { background: var(--surface-2); border-color: var(--ink-faint); }
button:active { transform: translateY(1px); }
button.primary, .btn.primary {
  background: linear-gradient(135deg, #6d4aff, #5b3df5);
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 18px -8px rgba(91, 61, 245, 0.7);
}
button.primary:hover { background: linear-gradient(135deg, #5f3cf6, #4a2be0); }
button.danger { color: var(--fail); border-color: #f6cdd5; background: #fff; }
button.danger:hover { background: #fef2f4; border-color: var(--fail); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
button.sm { padding: 5px 11px; font-size: 12.5px; border-radius: 8px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Forms ------------------------------------------------------------------ */
label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 13px; color: var(--ink); }
input, textarea, select {
  width: 100%; font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: #fff; color: var(--ink);
  transition: border-color 0.14s, box-shadow 0.14s;
}
input::placeholder, textarea::placeholder { color: var(--ink-faint); }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91, 61, 245, 0.16);
}
textarea { resize: vertical; min-height: 76px; }
.field { margin-bottom: 15px; }
.inline-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
input[type='file'] { padding: 8px; background: var(--surface-2); cursor: pointer; }
input[type='file']::file-selector-button {
  font: inherit; font-weight: 600; margin-right: 10px;
  border: 1px solid var(--border-strong); background: #fff; color: var(--primary);
  padding: 6px 12px; border-radius: 8px; cursor: pointer;
}

/* Tables ----------------------------------------------------------------- */
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border); }
th {
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-faint);
}
tbody tr { transition: background 0.12s; }
tbody tr:hover { background: var(--primary-50); }
tbody tr:last-child td { border-bottom: none; }

/* Badges / verdict chips ------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px;
  font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
  border: 1px solid transparent;
}
.badge.pass { background: var(--pass-bg); color: var(--pass); }
.badge.fail { background: var(--fail-bg); color: var(--fail); }
.badge.blocked { background: var(--blocked-bg); color: #b6740a; }
.badge.na { background: var(--na-bg); color: #5f6b7d; }
.badge.observation { background: var(--primary-100); color: var(--primary-700); }
.badge.change { background: #fdeccd; color: #ad6c00; }
.badge.requirement { background: #e7e1ff; color: #6429d6; }
.badge.pending { background: #fdeccd; color: #ad6c00; }
.badge.accepted { background: var(--pass-bg); color: var(--pass); }
.badge.expired { background: var(--na-bg); color: #5f6b7d; }
.badge.mine { background: var(--accent-100); color: #00876f; }

/* Verdict spectrum (signature) ------------------------------------------- */
.spectrum {
  display: flex; height: 11px; width: 100%;
  border-radius: 999px; overflow: hidden;
  background: var(--na-bg);
  box-shadow: inset 0 0 0 1px rgba(25, 22, 48, 0.04);
}
.spectrum .seg { min-width: 3px; transition: flex-grow 0.4s ease; }
.spectrum .seg.pass { background: var(--pass); }
.spectrum .seg.fail { background: var(--fail); }
.spectrum .seg.blocked { background: var(--blocked); }
.spectrum .seg.na { background: var(--na); }
.spectrum.is-empty { background: repeating-linear-gradient(135deg, var(--na-bg), var(--na-bg) 6px, #eef0f5 6px, #eef0f5 12px); }

/* Verdict buttons (the "stamp a result" interaction) --------------------- */
.verdict-btn {
  flex: 1; min-width: 84px;
  font-family: var(--font-mono); font-size: 12.5px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.05em;
  border-width: 1.5px; background: #fff;
}
.verdict-btn.pass { color: var(--pass); border-color: #b6e6d2; }
.verdict-btn.fail { color: var(--fail); border-color: #f6c4cd; }
.verdict-btn.blocked { color: #b6740a; border-color: #f3d99b; }
.verdict-btn.na { color: #5f6b7d; border-color: var(--border-strong); }
.verdict-btn:hover { background: var(--surface-2); }
.verdict-btn.on.pass { background: var(--pass); color: #fff; border-color: var(--pass); box-shadow: 0 8px 16px -8px rgba(15, 174, 116, 0.7); }
.verdict-btn.on.fail { background: var(--fail); color: #fff; border-color: var(--fail); box-shadow: 0 8px 16px -8px rgba(244, 63, 94, 0.7); }
.verdict-btn.on.blocked { background: var(--blocked); color: #fff; border-color: var(--blocked); box-shadow: 0 8px 16px -8px rgba(239, 150, 6, 0.7); }
.verdict-btn.on.na { background: var(--na); color: #fff; border-color: var(--na); }

/* Stat cards ------------------------------------------------------------- */
.stat-card { position: relative; overflow: hidden; }
.stat-card .stat { font-family: var(--font-display); font-size: 32px; font-weight: 700; line-height: 1; letter-spacing: -0.02em; }
.stat-card .stat-label { font-family: var(--font-mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--ink-soft); margin-top: 8px; }
.stat-card .stat-dot { position: absolute; top: 18px; right: 18px; width: 10px; height: 10px; border-radius: 50%; }

/* Tabs ------------------------------------------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 20px; flex-wrap: wrap; }
.tabs button {
  border: none; background: none; border-radius: 0;
  border-bottom: 2.5px solid transparent;
  padding: 11px 15px; margin-bottom: -1px;
  color: var(--ink-soft); font-weight: 600;
}
.tabs button:hover { background: none; color: var(--ink); border-color: var(--border-strong); }
.tabs button.active { color: var(--primary-700); border-bottom-color: var(--primary); }

/* Auth ------------------------------------------------------------------- */
.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-hero {
  position: relative; overflow: hidden;
  background: var(--hero-grad); color: #fff;
  padding: 56px 56px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.auth-hero::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(560px 300px at 85% 8%, rgba(0, 191, 166, 0.32), transparent 60%);
  pointer-events: none;
}
.auth-hero > * { position: relative; z-index: 1; }
.auth-hero .brand-name { font-size: 19px; }
.hero-eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); }
.hero-headline { font-family: var(--font-display); font-weight: 700; font-size: 40px; line-height: 1.08; letter-spacing: -0.025em; margin: 16px 0 14px; max-width: 12ch; }
.hero-sub { color: rgba(255, 255, 255, 0.78); max-width: 38ch; font-size: 15px; }
.specimen {
  margin-top: 30px; background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 16px;
  padding: 18px; max-width: 360px; backdrop-filter: blur(6px);
}
.specimen .sp-title { font-family: var(--font-display); font-weight: 600; font-size: 15px; }
.specimen .sp-row { display: flex; align-items: center; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.hero-foot { font-family: var(--font-mono); font-size: 11px; color: rgba(255, 255, 255, 0.5); letter-spacing: 0.06em; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 32px; }
.auth-card { width: 100%; max-width: 384px; border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-card h1 { font-size: 25px; margin: 0 0 4px; letter-spacing: -0.02em; }
.auth-wrap { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }

/* Misc ------------------------------------------------------------------- */
.error { color: var(--fail); font-size: 13px; margin: 8px 0; font-weight: 500; }
.success { color: var(--pass); font-size: 13px; margin: 8px 0; font-weight: 500; }
.empty {
  color: var(--ink-soft); padding: 40px 24px; text-align: center;
  border: 1.5px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2);
}
.stat { font-size: 28px; font-weight: 700; }
.stat-label { color: var(--ink-soft); font-size: 12px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.pill-row { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.attach-list { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.attach-list a {
  font-family: var(--font-mono); font-size: 11.5px;
  background: var(--primary-50); color: var(--primary-700);
  border: 1px solid var(--primary-100);
  padding: 4px 10px; border-radius: 8px;
}
.attach-list a::before { content: '📎 '; }
hr { border: none; border-top: 1px solid var(--border); margin: 16px 0; }

/* Phase assignment rows */
.assign-row {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 10px; cursor: pointer; background: var(--surface-2);
  font-weight: 400; margin: 0;
  transition: border-color 0.14s, background 0.14s;
}
.assign-row:hover { border-color: var(--primary); background: var(--primary-50); }
.assign-row input { width: auto; margin: 3px 0 0; accent-color: var(--primary); cursor: pointer; }
.assign-row b { font-size: 13px; }

/* Achievements: badges, certificate, celebration */
.badge-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 18px; text-align: center;
  position: relative; overflow: hidden;
}
.badge-card.earned {
  border-color: transparent;
  background:
    radial-gradient(120px 80px at 50% -10%, rgba(244, 196, 48, 0.18), transparent 70%),
    linear-gradient(160deg, #fff 0%, #f4f1ff 100%);
  box-shadow: 0 12px 30px -14px rgba(91, 61, 245, 0.5);
}
.badge-card.earned::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius);
  border: 1.5px solid rgba(217, 164, 37, 0.5); pointer-events: none;
}
.badge-card .badge-medal {
  font-size: 40px; line-height: 1; filter: grayscale(1) opacity(0.4);
  transition: filter 0.2s;
}
.badge-card.earned .badge-medal { filter: drop-shadow(0 4px 8px rgba(217, 164, 37, 0.4)); animation: pop 0.4s ease both; }
.badge-card .badge-name { font-family: var(--font-display); font-weight: 600; font-size: 15px; margin-top: 10px; }
.badge-card .badge-sub { font-size: 11px; color: var(--ink-soft); margin-top: 3px; }
@keyframes pop { 0% { transform: scale(0.4); opacity: 0; } 70% { transform: scale(1.15); } 100% { transform: scale(1); opacity: 1; } }

.cert-card { display: flex; align-items: center; gap: 18px; }
.cert-card.earned { background: linear-gradient(120deg, #f4f1ff, #d3f6f0); border-color: transparent; }
.cert-emoji { font-size: 40px; }
.cert-card:not(.earned) .cert-emoji { filter: grayscale(1) opacity(0.5); }

.celebrate {
  position: fixed; top: 20px; right: 20px; z-index: 50; max-width: 380px;
  background: #fff; border: 1px solid var(--border); border-left: 5px solid var(--accent);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 16px 38px 16px 16px;
  animation: slidein 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3) both;
}
.celebrate-row { display: flex; gap: 10px; align-items: flex-start; }
.celebrate-row + .celebrate-row { margin-top: 8px; }
.celebrate-emoji { font-size: 24px; animation: pop 0.5s ease both; }
.celebrate-x { position: absolute; top: 8px; right: 8px; border: none; background: none; font-size: 18px; line-height: 1; padding: 4px 8px; color: var(--ink-faint); }
.celebrate-x:hover { background: none; color: var(--ink); }
@keyframes slidein { from { transform: translateX(120%); opacity: 0; } to { transform: none; opacity: 1; } }

/* Activity timeline */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid;
  grid-template-columns: 84px 1fr auto;
  gap: 12px; align-items: baseline;
  padding: 11px 4px; border-bottom: 1px solid var(--border);
}
.timeline li:last-child { border-bottom: none; }
.tl-type {
  font-family: var(--font-mono); font-size: 10px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  text-align: center; padding: 3px 6px; border-radius: 6px;
  background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--border);
}
.tl-verdict { background: var(--fail-bg); color: var(--fail); border-color: transparent; }
.tl-note { background: var(--primary-100); color: var(--primary-700); border-color: transparent; }
.tl-task { background: var(--accent-100); color: #00876f; border-color: transparent; }
.tl-document { background: var(--blocked-bg); color: #b6740a; border-color: transparent; }
.tl-member { background: var(--pass-bg); color: var(--pass); border-color: transparent; }
.tl-phase { background: #e7e1ff; color: #6429d6; border-color: transparent; }
.tl-desc { color: var(--ink); }
.tl-meta { white-space: nowrap; }

@media (max-width: 720px) {
  .timeline li { grid-template-columns: 70px 1fr; }
  .tl-meta { grid-column: 2; }
}

/* Phase header chip inside the tester task view */
.phase-head {
  display: flex; align-items: center; gap: 10px;
  margin: 22px 2px 12px;
}
.phase-head .bar { width: 4px; height: 18px; border-radius: 3px; background: var(--primary); }
.phase-head .name { font-family: var(--font-display); font-weight: 600; font-size: 16px; }

/* Accessibility & responsive -------------------------------------------- */
:focus-visible { outline: 2.5px solid var(--primary); outline-offset: 2px; border-radius: 6px; }

@media (max-width: 900px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
}
@media (max-width: 820px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; height: auto; position: static;
    flex-direction: row; align-items: center; gap: 4px;
    padding: 10px 12px; overflow-x: auto;
  }
  .sidebar .brand { padding: 4px 10px 4px 4px; }
  .brand-tag, .nav-eyebrow, .spacer, .userbox .who, .userbox { display: none; }
  .sidebar a.navlink { white-space: nowrap; padding: 8px 12px; }
  .main { padding: 22px 18px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; }
}

/* Server-rendered tab links (mirror .tabs button) */
.tabs a {
  border: none; background: none; border-bottom: 2.5px solid transparent;
  padding: 11px 15px; margin-bottom: -1px; color: var(--ink-soft);
  font-weight: 600; text-decoration: none; display: inline-block;
}
.tabs a:hover { color: var(--ink); }
.tabs a.active { color: var(--primary-700); border-bottom-color: var(--primary); }
/* certificate + assignment helpers reused from the React build already present above */

/* Verdict radio chips (tester result entry) */
.verdict-row { display: flex; gap: 8px; flex-wrap: wrap; }
.verdict { position: relative; cursor: pointer; border: 1.5px solid var(--border, #e6e3f4);
  border-radius: 10px; padding: 8px 16px; font-weight: 600; font-size: 13px;
  color: var(--ink-soft); user-select: none; transition: all .12s; }
.verdict:hover { border-color: var(--ink-faint); }
.verdict input { position: absolute; opacity: 0; inset: 0; cursor: pointer; margin: 0; }
.verdict.is-on.pass,    .verdict:has(input:checked).pass    { background: var(--pass-bg);    border-color: var(--pass);    color: var(--pass); }
.verdict.is-on.fail,    .verdict:has(input:checked).fail    { background: var(--fail-bg);    border-color: var(--fail);    color: var(--fail); }
.verdict.is-on.blocked, .verdict:has(input:checked).blocked { background: var(--blocked-bg); border-color: var(--blocked); color: #b6740a; }
.verdict.is-on.na,      .verdict:has(input:checked).na      { background: var(--na-bg);      border-color: var(--na);      color: #5f6b7d; }
.attach-list { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-list a { font-size: 12px; background: var(--primary-50); padding: 4px 10px; border-radius: 8px; }

.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.pbar { height: 10px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.pbar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); }
@media (max-width: 820px) { .grid.cols-4 { grid-template-columns: repeat(2, 1fr); } }

/* Print (reports → PDF) */
@media print {
  .sidebar, .no-print, .tabs.no-print { display: none !important; }
  .app-shell { display: block; }
  .main { padding: 0; }
  .card { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
