/* ============================================================
   ArivuPRO Hiring Assessment — Global Stylesheet
   styles.css
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── CSS Variables ── */
:root {
  --green: #2E8857;
  --green-h: #245a41;
  --green-l: #7AE582;
  --green-mint: #9FFFCB;
  --green-dim: #D7F4EA;
  --yellow: #FEDE6D;
  --yellow-dim: rgba(254,222,109,0.1);
  --red: #F95E64;
  --red-dim: rgba(249,94,100,0.06);
  --blue: #3578b5;
  --blue-dim: rgba(53,120,181,0.06);
  --gray-dark: #4C4C4C;
  --gray-mid: #B4B4B4;
  --gray-light: #EFEFEF;
  --bg: #f0f4f2;
  --surface: #FFFFFF;
  --border: #B4B4B4;
  --text1: #000000;
  --text2: #4C4C4C;
  --text3: #B4B4B4;
  --accent: #2E8857;
  --accent2: #1f7a40;
  --accent-dim: rgba(46,136,87,0.08);
  --accent-glow: rgba(46,136,87,0.15);
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,.08);
}

/* ── Shared body base ── */
body {
  background: var(--bg);
  color: var(--text1);
  font-family: 'Manrope', 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
}

/* ============================================================
   LANDING PAGE  (index.html)  body.page-landing
   ============================================================ */

body.page-landing {
  display: flex;
  flex-direction: column;
}

/* Navbar */
.navbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 18px 150px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}

.brand { display: flex; align-items: center; gap: 0.55rem; }
.brand img { height: 34px; width: auto; display: block; }

.role-tag {
  background: var(--green-dim);
  color: var(--green);
  font-size: 11px;
  font-weight: 700;
  padding: 5px 14px;
  border-radius: 20px;
  letter-spacing: 0.04em;
}

/* Hero */
.hero {
  flex: 1;
  padding: 100px 40px 100px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
  max-width: 1100px;
  width: 100%;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 14px;
}

.hero-title {
  font-family: 'ITC Brand font', 'Segoe UI', sans-serif;
  font-size: 44px;
  font-weight: 800;
  color: var(--text1);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}

.hero-desc {
  font-size: 14px;
  color: var(--text2);
  line-height: 1.75;
  margin-bottom: 30px;
}

.meta-row {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 28px;
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text3);
}

.meta-dot {
  width: 5px;
  height: 5px;
  background: var(--green);
  border-radius: 50%;
  flex-shrink: 0;
}

.cta-btn {
  background: var(--green);
  color: #fff;
  font-family: 'ITC Brand font', 'Segoe UI', sans-serif;
  font-size: 15px;
  font-weight: 500;
  padding: 13px 32px;
  border-radius: 11px;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-block;
}
.cta-btn:hover {
  background: var(--green-h);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(43,158,86,0.25);
}
.cta-btn:active { transform: translateY(0); }

/* Landing — exam card */
.exam-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.06);
}

.card-header-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}

.section-pills { display: flex; flex-direction: column; gap: 10px; }

/* Landing section-pill (scoped to avoid conflict with exam.html) */
body.page-landing .section-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 10px;
}

.pill-badge {
  width: 26px;
  height: 26px;
  background: var(--green-dim);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--green);
  flex-shrink: 0;
}

.pill-info { flex: 1; min-width: 0; }
.pill-name { font-size: 13px; font-weight: 700; color: var(--text1); }
.pill-sub { font-size: 11px; color: var(--text3); margin-top: 1px; }

.pill-marks {
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  background: var(--green-dim);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  margin-left: auto;
}

.total-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--green);
  border-radius: 10px;
  padding: 11px 14px;
  margin-top: 14px;
}

.total-left {
  font-size: 12px;
  color: #fff;
  font-weight: 500;
}

.total-right {
  font-family: 'ITC Brand font', 'Segoe UI', sans-serif;
  font-size: 13px;
  color: #fff;
  font-weight: 700;
}

/* Landing footer (scoped — registration has a different .footer) */
body.page-landing .footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 12px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 10;
}

body.page-landing .footer span {
  font-size: 12px;
  color: var(--text3);
}

/* Landing responsive */
@media (max-width: 768px) {
  .navbar { padding: 14px 24px; }
  .hero { padding: 32px 24px 100px; }
  .hero-grid { grid-template-columns: 1fr; gap: 28px; }
  .hero-title { font-size: 32px; }
  body.page-landing .footer {
    flex-direction: column;
    gap: 4px;
    text-align: center;
    padding: 12px 24px;
  }
}


/* ============================================================
   REGISTRATION PAGE  (registration.html)  body.page-reg
   ============================================================ */

body.page-reg {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

/* Main card */
.reg-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  width: 100%; max-width: 580px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.10);
  overflow: hidden;
}

/* Dark green header */
.reg-header {
  background: #2e8857;
  padding: 1.75rem 2rem 1.5rem;
}
.reg-header-title {
  font-family: 'ITC Brand font', 'Segoe UI', sans-serif;
  font-size: 1.3rem; font-weight: 800; color: #fff;
  line-height: 1.25; margin-bottom: 0.3rem;
}
.reg-header-sub {
  font-size: 0.82rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}
.reg-header-meta { display: flex; gap: 1.25rem; flex-wrap: wrap; }
.reg-header-meta span {
  display: flex; align-items: center; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 600;
  color: rgba(255,255,255,0.75);
}
.meta-dot-sm {
  width: 5px; height: 5px;
  background: var(--green-l);
  border-radius: 50%; flex-shrink: 0;
}

/* Form body */
.reg-form-body { padding: 1.75rem 2rem; }

/* Form elements */
.form-grid { display: flex; flex-direction: column; gap: 0.9rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.9rem; }
.form-group { display: flex; flex-direction: column; gap: 0.32rem; }
.form-group label { font-size: 0.79rem; font-weight: 700; color: var(--text1); }
.required { color: var(--red); margin-left: 2px; }

.form-group input,
.form-group select {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 0.62rem 0.85rem;
  color: var(--text1);
  font-family: 'Manrope', sans-serif;
  font-size: 0.9rem; font-weight: 500;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  -webkit-appearance: none; appearance: none;
}
.form-group select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%234a6357' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.9rem center;
  cursor: pointer; padding-right: 2.2rem;
}
.form-group input:focus, .form-group select:focus {
  border-color: var(--green); background: #fff;
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form-group input::placeholder { color: var(--text3); }

.notice {
  display: flex; gap: 0.5rem; align-items: flex-start;
  background: rgba(230,168,23,0.07);
  border: 1px solid rgba(230,168,23,0.22);
  border-radius: var(--radius);
  padding: 0.7rem 0.85rem;
  font-size: 0.79rem; color: #7a5800; line-height: 1.55; font-weight: 500;
}

.error-msg {
  background: rgba(220,53,69,0.06);
  border: 1px solid rgba(220,53,69,0.25);
  color: var(--red);
  padding: 0.62rem 0.85rem;
  border-radius: var(--radius);
  font-size: 0.84rem; font-weight: 600; display: none;
}
.error-msg.show { display: block; }

/* Submit button — outlined style */
.reg-submit-btn {
  width: 100%; padding: 0.82rem;
  background: transparent; color: var(--text1);
  border: 1.5px solid #c8c8c8;
  border-radius: var(--radius);
  font-family: 'Manrope', sans-serif;
  font-size: 0.92rem; font-weight: 600; cursor: pointer;
  transition: all 0.2s;
}
.reg-submit-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }
.reg-submit-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Registration footer (scoped) */
body.page-reg .footer { margin-top: 1.4rem; font-size: 0.73rem; color: var(--text3); text-align: center; }


/* ============================================================
   EXAM PAGE  (exam.html)  body.page-exam
   ============================================================ */

body.page-exam {
  user-select: none;
  -webkit-user-select: none;
}

.screen { display: none; min-height: 100vh; }
.screen.active { display: flex; }

/* Loading */
#loadingScreen { align-items: center; justify-content: center; flex-direction: column; gap: 1rem; }
.spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--border);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Error */
#errorScreen { align-items: center; justify-content: center; flex-direction: column; gap: 1rem; text-align: center; padding: 2rem; }
.error-icon { font-size: 2.5rem; margin-bottom: 0.5rem; }
.error-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--text1); }
.error-sub { color: var(--text2); font-size: 0.9rem; }

/* Welcome */
#welcomeScreen { align-items: center; justify-content: center; flex-direction: column; padding: 2rem; background: var(--bg); }

.welcome-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.25rem; max-width: 620px; width: 100%;
  box-shadow: var(--shadow);
}

.w-brand { display: flex; align-items: center; margin-bottom: 1.75rem; }
.w-brand img { height: 38px; width: auto; display: block; }

.w-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-size: 1.5rem; font-weight: 800; color: var(--text1); margin-bottom: 0.3rem; }
.w-sub { color: var(--text2); font-size: 0.87rem; margin-bottom: 1.5rem; }
.w-name { color: var(--green); }

.sections-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; margin-bottom: 1.4rem; }

/* Exam section-pill (scoped — landing page has a different .section-pill) */
body.page-exam .section-pill {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.85rem;
  border-left: 3px solid var(--green);
}
.sp-name { font-weight: 700; font-size: 0.87rem; margin-bottom: 0.2rem; color: var(--text1); display: flex; align-items: center; gap: 0.45rem; }
.sp-icon { font-size: 1rem; color: var(--green); line-height: 1; flex-shrink: 0; }
.sp-info { color: var(--text3); font-size: 0.76rem; }

.rules-box {
  background: rgba(230,168,23,0.07);
  border: 1px solid rgba(230,168,23,0.22);
  border-radius: var(--radius); padding: 0.9rem 1rem;
  font-size: 0.82rem; color: #7a5800; line-height: 1.75;
  margin-bottom: 1.5rem;
}
.rules-box strong { display: block; font-weight: 700; margin-bottom: 0.35rem; font-size: 0.84rem; }

.start-btn {
  width: 100%; padding: 0.85rem;
  background: var(--green); color: #fff;
  border: none; border-radius: var(--radius);
  font-family: "ITC Brand font", "Segoe UI", sans-serif;
  font-size: 1rem; font-weight: 800; cursor: pointer;
  transition: all 0.2s;
}
.start-btn:hover { background: var(--green-h); transform: translateY(-1px); box-shadow: 0 4px 16px var(--accent-glow); }

/* Exam Layout */
#examScreen { flex-direction: column; }

/* Top Bar */
.top-bar {
  background: var(--surface); border-bottom: 1px solid var(--border);
  padding: 0 1.25rem; height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 100; flex-shrink: 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.top-brand { display: flex; align-items: center; }
.top-brand img { height: 26px; width: auto; display: block; }

.section-tabs { display: flex; gap: 0.3rem; }
.section-tab {
  padding: 0.25rem 0.75rem; border-radius: 20px;
  font-size: 0.78rem; font-weight: 700;
  opacity: 0.35; transition: all 0.2s;
  font-family: 'Manrope', sans-serif; border: 1.5px solid transparent;
  color: var(--text1);
}
.section-tab.active { opacity: 1; background: var(--green-dim); border-color: rgba(43,158,86,0.3); color: var(--green); }
.section-tab.done { opacity: 0.55; text-decoration: line-through; }

.top-right { display: flex; align-items: center; gap: 0.75rem; }

.end-exam-btn {
  padding: 0.32rem 0.85rem;
  border: 1.5px solid rgba(249,94,100,0.4);
  background: rgba(249,94,100,0.06);
  color: var(--red);
  border-radius: var(--radius);
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: all 0.15s;
}
.end-exam-btn:hover { background: var(--red); color: #fff; border-color: var(--red); }

.timer-display {
  display: flex; align-items: center; gap: 0.4rem;
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.35rem 0.8rem;
  font-family: "ITC Brand font", "Segoe UI", sans-serif;
  font-weight: 800; font-size: 0.95rem; color: var(--text1);
  letter-spacing: 0.03em;
}
.timer-display.warning { border-color: var(--yellow); color: #7a5800; background: rgba(230,168,23,0.07); }
.timer-display.danger { border-color: var(--red); color: var(--red); background: var(--red-dim); animation: blink 1s ease infinite; }
@keyframes blink { 50% { opacity: 0.55; } }

.violation-chip {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 0.75rem; color: var(--red); font-weight: 700;
  background: var(--red-dim); border: 1px solid rgba(220,53,69,0.2);
  padding: 0.28rem 0.65rem; border-radius: 20px;
}

/* Exam Body */
.exam-body { display: flex; flex: 1; overflow: hidden; }

/* Exam sidebar (scoped — admin has a different .sidebar) */
body.page-exam .sidebar {
  width: 240px; background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 1rem; overflow-y: auto; flex-shrink: 0;
}
.sidebar-title {
  font-size: 0.72rem; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.07em; margin-bottom: 0.7rem;
}

.q-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
.q-btn {
  aspect-ratio: 1; border-radius: 7px;
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text3); font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: all 0.12s;
  display: flex; align-items: center; justify-content: center;
}
.q-btn:hover { border-color: var(--green); color: var(--green); }
.q-btn.answered { background: var(--green-dim); border-color: rgba(43,158,86,0.4); color: var(--green); }
.q-btn.current { background: var(--green); border-color: var(--green); color: #fff; }
.q-btn.written { background: rgba(230,168,23,0.1); border-color: rgba(230,168,23,0.4); color: #7a5800; }
.q-btn.unreachable { opacity: 0.38; cursor: not-allowed; pointer-events: none; }
.q-btn.locked { opacity: 0.25; cursor: not-allowed; pointer-events: none; background: var(--bg); border-style: dashed; }

.nav-section-group { margin-bottom: 0.85rem; }
.nav-section-label {
  font-size: 0.63rem; font-weight: 800; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 0.18rem 0.5rem; border-radius: 4px;
  display: inline-block; margin-bottom: 0.4rem;
}
.nav-section-label.lbl-A { background: rgba(53,120,181,0.12); color: #3578b5; }
.nav-section-label.lbl-B { background: rgba(43,158,86,0.12); color: #2B9E56; }
.nav-section-label.lbl-C { background: rgba(122,88,0,0.12); color: #7a5800; }
.nav-section-label.lbl-D { background: rgba(220,53,69,0.12); color: #dc3545; }

.legend { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.75rem; color: var(--text3); margin-bottom: 1rem; }
.legend-item { display: flex; align-items: center; gap: 0.45rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }

.progress-label { font-size: 0.75rem; color: var(--text3); display: flex; justify-content: space-between; margin-bottom: 0.35rem; font-weight: 600; }
.progress-bar { height: 5px; background: var(--border); border-radius: 10px; overflow: hidden; }
.progress-fill { height: 100%; background: var(--green); transition: width 0.3s; }

/* Question Area */
.question-area {
  flex: 1; overflow-y: auto; padding: 1.75rem 2rem;
  display: flex; flex-direction: column; gap: 1.4rem;
  background: var(--bg);
}

.q-header { display: flex; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.q-number {
  font-family: "ITC Brand font", "Segoe UI", sans-serif;
  font-weight: 800; font-size: 1.75rem; color: var(--border);
  line-height: 1; flex-shrink: 0; padding-top: 2px;
}
.q-meta { display: flex; flex-direction: column; gap: 0.2rem; }
.q-section-label {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; padding: 0.22rem 0.6rem;
  border-radius: 20px; width: fit-content;
}
.label-A { background: rgba(53,120,181,0.1); color: var(--blue); }
.label-B { background: rgba(43,158,86,0.1); color: var(--green); }
.label-C { background: rgba(230,168,23,0.1); color: #7a5800; }
.label-D { background: rgba(220,53,69,0.08); color: var(--red); }

.q-marks { font-size: 0.78rem; color: var(--text3); font-weight: 600; }
.q-topic { font-size: 0.78rem; color: var(--text3); }

.q-text {
  font-size: 1.02rem; line-height: 1.7; font-weight: 600;
  background: var(--green-dim); border: 1px solid rgba(46,136,87,0.18);
  border-radius: 12px; padding: 1.25rem 1.5rem; color: var(--text1);
  box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}

.q-desc-text { display: block; }

.q-code-block {
  margin-top: 0.85rem;
  background: #192820;
  color: #b8f0cc;
  font-family: 'Cascadia Code', 'Consolas', 'Fira Mono', 'JetBrains Mono', 'Courier New', monospace;
  font-size: 0.84rem;
  line-height: 1.75;
  padding: 1rem 1.15rem;
  border-radius: 9px;
  overflow-x: auto;
  white-space: pre;
  font-weight: 400;
  border: 1px solid rgba(90,180,120,0.18);
  box-shadow: inset 0 1px 6px rgba(0,0,0,0.35);
}
.q-code-block code { font-family: inherit; background: none; padding: 0; color: inherit; }

/* MCQ Options */
.options-grid { display: flex; flex-direction: column; gap: 0.6rem; }
.option-btn {
  display: flex; align-items: center; gap: 0.85rem;
  padding: 0.9rem 1.1rem;
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); cursor: pointer; text-align: left;
  color: var(--text1); font-size: 0.9rem; font-weight: 500;
  font-family: 'Manrope', sans-serif; transition: all 0.13s;
  box-shadow: var(--shadow); width: 100%;
}
.option-btn:hover { border-color: rgba(46,136,87,0.45); background: rgba(46,136,87,0.04); }
.option-btn.selected {
  border-color: var(--green);
  background: rgba(46,136,87,0.07);
  box-shadow: 0 0 0 1px var(--green), var(--shadow);
}
.option-text { flex: 1; line-height: 1.5; }
.option-key {
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--bg); border: 1.5px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-family: "ITC Brand font", "Segoe UI", sans-serif;
  font-weight: 800; font-size: 0.82rem;
  flex-shrink: 0; text-transform: uppercase; transition: all 0.13s;
  color: var(--text2);
}
.option-btn.selected .option-key { background: var(--green); border-color: var(--green); color: #fff; font-size: 0.9rem; }
.option-btn:hover:not(.selected) .option-key { border-color: rgba(46,136,87,0.5); color: var(--green); background: rgba(46,136,87,0.08); }
.option-btn.selected:hover .option-key { color: #fff; }

/* Subjective */
.subjective-area { display: flex; flex-direction: column; gap: 0.6rem; }
.subjective-area label { font-size: 0.8rem; font-weight: 700; color: var(--text2); }
.subjective-area textarea {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.9rem 1rem;
  color: var(--text1); font-family: 'Manrope', sans-serif;
  font-size: 0.9rem; line-height: 1.7; resize: vertical;
  min-height: 180px; outline: none; transition: border-color 0.2s;
  box-shadow: var(--shadow); font-weight: 500;
}
.subjective-area textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--accent-glow); }
.char-count { font-size: 0.75rem; color: var(--text3); text-align: right; font-weight: 600; }

/* Navigation */
.q-nav {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 1rem; border-top: 1px solid var(--border);
}
.nav-btn {
  padding: 0.6rem 1.4rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text2); font-family: 'Manrope', sans-serif;
  font-weight: 700; font-size: 0.87rem; cursor: pointer; transition: all 0.15s;
}
.nav-btn:hover:not(:disabled) { border-color: var(--green); color: var(--green); }
.nav-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.nav-btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.nav-btn.primary:hover { background: var(--green-h); color: #fff; border-color: var(--green-h); }
.nav-btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.nav-btn.danger:hover { background: #c53030; }

/* Modal */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.35);
  z-index: 1000; display: flex; align-items: center; justify-content: center;
  padding: 1rem; backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.modal-overlay.show { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2rem; max-width: 420px; width: 100%;
  text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}
.modal-icon { font-size: 2.2rem; margin-bottom: 0.9rem; }
.modal-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--text1); margin-bottom: 0.4rem; }
.modal-text { color: var(--text2); font-size: 0.87rem; line-height: 1.6; margin-bottom: 1.4rem; }
.modal-actions { display: flex; gap: 0.65rem; justify-content: center; }
.modal-btn {
  padding: 0.62rem 1.4rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text1); font-family: 'Manrope', sans-serif;
  font-weight: 700; font-size: 0.87rem; cursor: pointer; transition: all 0.15s;
}
.modal-btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.modal-btn.danger { background: var(--red); border-color: var(--red); color: #fff; }

/* Disqualification modal */
.dq-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 2.25rem 1.75rem 1.75rem;
  max-width: 360px; width: 90%; text-align: center;
  box-shadow: 0 8px 40px rgba(0,0,0,0.18);
}
.dq-x-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(220,53,69,0.1); border: 2px solid rgba(220,53,69,0.2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.dq-x-wrap svg { width: 28px; height: 28px; }
.dq-badge {
  display: inline-block;
  background: rgba(220,53,69,0.1); color: var(--red);
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.09em;
  text-transform: uppercase; padding: 0.25rem 0.85rem;
  border-radius: 20px; margin-bottom: 0.9rem;
}
.dq-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-size: 1.3rem; font-weight: 800; color: var(--text1); margin-bottom: 0.65rem; }
.dq-desc { color: var(--text2); font-size: 0.85rem; line-height: 1.65; margin-bottom: 1.25rem; }
.dq-ref {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.6rem 1rem;
  font-size: 0.82rem; color: var(--text3); font-weight: 600;
  font-family: 'Manrope', sans-serif; margin-bottom: 1.5rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dq-close-btn {
  width: 100%; padding: 0.78rem;
  background: var(--surface); color: var(--text1);
  border: 1.5px solid var(--border); border-radius: var(--radius);
  font-family: 'Manrope', sans-serif; font-size: 0.95rem; font-weight: 700;
  cursor: pointer; transition: all 0.2s;
}
.dq-close-btn:hover { background: var(--bg); }

/* Camera preview */
#cameraPreview {
  position: fixed; bottom: 1.5rem; left: 1rem;
  width: 140px; height: 105px; border-radius: 12px;
  border: 2px solid var(--green); overflow: hidden;
  z-index: 200; display: none;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
#cameraPreview video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); display: block; }
#cameraPreview .cam-label {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0,0,0,0.5); color: #fff;
  font-size: 9px; font-weight: 700; text-align: center;
  padding: 3px; letter-spacing: 0.05em; font-family: Manrope, sans-serif;
}
#cameraPreview .cam-dot {
  position: absolute; top: 7px; right: 7px;
  width: 8px; height: 8px; background: #dc3545;
  border-radius: 50%; animation: camBlink 1.5s ease infinite;
}
@keyframes camBlink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
#cameraPreview .cam-offline {
  width: 100%; height: 100%; background: #1a2e24;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 4px;
}
#cameraPreview .cam-offline-icon { font-size: 22px; }
#cameraPreview .cam-offline-text { font-size: 9px; color: #8a9e96; font-family: Manrope, sans-serif; }

/* Thank You */
#thankYouScreen { align-items: center; justify-content: center; flex-direction: column; padding: 2rem; background: var(--bg); }
.ty-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 20px; padding: 1.5rem 2rem 2.5rem; max-width: 380px; width: 100%;
  text-align: center; box-shadow: var(--shadow);
  display: flex; flex-direction: column; align-items: center; gap: 0;
}
.ty-logo {
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 2rem;
}
.ty-logo img { height: 36px; width: auto; display: block; }
.ty-check-wrap {
  width: 64px; height: 64px; border-radius: 50%;
  background: rgba(43,158,86,0.1); border: 2px solid rgba(43,158,86,0.2);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem;
}
.ty-check-wrap svg { width: 28px; height: 28px; }
.ty-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-size: 1.35rem; font-weight: 800; color: var(--text1); margin-bottom: 0.75rem; }
.ty-desc { color: var(--text2); font-size: 0.86rem; line-height: 1.65; margin-bottom: 1.1rem; }
.ty-follow { font-size: 0.86rem; color: var(--text2); line-height: 1.6; margin-bottom: 1.75rem; }
.ty-follow strong { color: var(--text1); }
.ty-email-note {
  width: 100%; padding: 0.7rem 1rem; border-radius: 10px;
  background: var(--bg); border: 1px solid var(--border);
  font-size: 0.83rem; color: var(--text3); font-weight: 600;
  text-align: center; margin-bottom: 0.75rem;
}

.answer-toast {
  position: fixed; bottom: 2rem; left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--red); color: #fff;
  padding: 0.7rem 1.4rem; border-radius: 10px;
  font-size: 0.88rem; font-weight: 700;
  box-shadow: 0 4px 20px rgba(220,53,69,0.35);
  transition: transform 0.3s cubic-bezier(.22,1,.36,1);
  z-index: 2000; pointer-events: none; white-space: nowrap;
}
.answer-toast.show { transform: translateX(-50%) translateY(0); }

@keyframes proceedPulse {
  0%, 100% { box-shadow: 0 4px 18px rgba(43,158,86,0.35); }
  50% { box-shadow: 0 4px 28px rgba(43,158,86,0.65); }
}
.proceed-btn {
  padding: 0.62rem 1.4rem;
  background: linear-gradient(135deg, #2B9E56, #1e7a40);
  color: #fff; border: none; border-radius: var(--radius);
  font-family: 'Manrope', sans-serif; font-size: 0.9rem; font-weight: 800;
  cursor: pointer; animation: proceedPulse 2s ease infinite;
  transition: transform 0.15s, opacity 0.15s;
}
.proceed-btn:hover { transform: translateY(-2px); opacity: 0.92; }

.phase-banner {
  display: flex; align-items: flex-start; gap: 0.6rem;
  background: rgba(43,158,86,0.07);
  border: 1.5px solid rgba(43,158,86,0.25);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  font-size: 0.83rem; color: var(--green-h); font-weight: 600; line-height: 1.55;
}
.phase-banner-icon { font-size: 1.1rem; flex-shrink: 0; margin-top: 1px; }


/* ============================================================
   ADMIN DASHBOARD  (admin.html)  body.page-admin
   ============================================================ */

/* Login */
#loginScreen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem;
  background: var(--bg);
}
.login-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 16px; padding: 2.25rem; width: 100%; max-width: 400px;
  box-shadow: var(--shadow);
}
.login-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 0.35rem; margin-bottom: 1.6rem; }
.login-brand img { height: 44px; width: auto; display: block; }
.login-brand-sub { font-size: 0.75rem; color: var(--text3); font-family: 'Manrope', sans-serif; font-weight: 500; }

.login-form { display: flex; flex-direction: column; gap: 0.85rem; }
.f-label { font-size: 0.78rem; font-weight: 700; color: var(--text1); margin-bottom: 0.3rem; display: block; }
.f-input {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.62rem 0.85rem;
  color: var(--text1); font-family: 'Manrope', sans-serif;
  font-size: 0.9rem; font-weight: 500; outline: none; width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.f-input:focus { border-color: var(--green); background: #fff; box-shadow: 0 0 0 3px var(--accent-glow); }
.login-btn {
  padding: 0.8rem; background: var(--green); color: #fff;
  border: none; border-radius: var(--radius);
  font-family: "ITC Brand font", "Segoe UI", sans-serif; font-size: 0.96rem; font-weight: 800;
  cursor: pointer; transition: all 0.2s; margin-top: 0.3rem;
}
.login-btn:hover { background: var(--green-h); transform: translateY(-1px); box-shadow: 0 4px 14px var(--accent-glow); }
.login-error {
  color: var(--red); font-size: 0.82rem; font-weight: 600;
  background: var(--red-dim); border: 1px solid rgba(220,53,69,0.2);
  border-radius: var(--radius); padding: 0.6rem 0.85rem; display: none;
}
.login-error.show { display: block; }

/* App */
#appScreen { display: none; min-height: 100vh; }
#appScreen.active { display: flex; }

/* Admin sidebar (scoped — exam has a different .sidebar) */
body.page-admin .sidebar {
  width: 220px; background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar-logo {
  padding: 1.25rem 1rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 0.55rem;
}
.s-logo-img { height: 30px; width: auto; display: block; }
.s-logo-sub { font-size: 0.68rem; color: var(--text3); font-family: 'Manrope', sans-serif; margin-top: 0.15rem; }

.nav-menu { padding: 0.85rem; display: flex; flex-direction: column; gap: 0.25rem; flex: 1; }
.nav-item {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.6rem 0.8rem; border-radius: var(--radius);
  cursor: pointer; font-size: 0.86rem; font-weight: 600;
  color: var(--text2); transition: all 0.13s;
  border: 1px solid transparent;
}
.nav-item:hover { background: var(--bg); color: var(--text1); }
.nav-item.active { background: var(--green-dim); color: var(--green); border-color: rgba(43,158,86,0.2); }
.nav-icon { font-size: 1rem; width: 20px; text-align: center; line-height: 1; }
.bi { line-height: 1; vertical-align: -0.125em; }

.sidebar-footer { padding: 0.85rem; border-top: 1px solid var(--border); }
.logout-btn {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.5rem 0.75rem; border-radius: var(--radius);
  cursor: pointer; color: var(--text3); transition: all 0.13s;
  font-size: 0.84rem; font-weight: 600; background: none; border: none; width: 100%; text-align: left;
  font-family: 'Manrope', sans-serif;
}
.logout-btn:hover { background: var(--red-dim); color: var(--red); }

/* Main */
.main-content { flex: 1; overflow-y: auto; }

.content-header {
  padding: 1.25rem 1.75rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  background: var(--surface); position: sticky; top: 0; z-index: 10;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
  flex-wrap: wrap; gap: 0.75rem;
}
.content-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 800; font-size: 1.1rem; color: var(--text1); }
.content-sub { font-size: 0.79rem; color: var(--text3); margin-top: 0.1rem; font-weight: 500; }

.header-actions { display: flex; gap: 0.6rem; }
.btn {
  padding: 0.48rem 0.9rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--surface);
  color: var(--text2); font-family: 'Manrope', sans-serif;
  font-size: 0.82rem; font-weight: 700; cursor: pointer; transition: all 0.13s;
  display: flex; align-items: center; gap: 0.35rem;
}
.btn:hover { border-color: var(--green); color: var(--green); }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-h); }

.page { display: none; padding: 1.75rem; }
.page.active { display: block; }

/* Stats */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.85rem; margin-bottom: 1.6rem; }
.stat-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 1.1rem;
  box-shadow: var(--shadow);
}
.stat-label { font-size: 0.72rem; color: var(--text3); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 0.45rem; font-weight: 700; }
.stat-val { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-size: 1.9rem; font-weight: 800; line-height: 1; color: var(--text1); }
.stat-sub { font-size: 0.75rem; color: var(--text3); margin-top: 0.35rem; font-weight: 500; }

/* Table */
.table-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.table-header {
  padding: 0.9rem 1.25rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; flex-wrap: wrap;
}
.table-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 700; font-size: 0.9rem; color: var(--text1); }

.search-wrap {
  position: relative; display: inline-flex; align-items: center;
}
.search-wrap .bi-search {
  position: absolute; left: 0.65rem;
  color: var(--text3); font-size: 0.82rem; pointer-events: none;
}
.search-input {
  background: var(--bg); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.42rem 0.85rem 0.42rem 2rem;
  color: var(--text1); font-size: 0.82rem; outline: none; width: 220px;
  font-family: 'Manrope', sans-serif; font-weight: 500;
}
.search-input:focus { border-color: var(--green); }
.search-input:focus + .bi-search, .search-wrap:focus-within .bi-search { color: var(--green); }

table { width: 100%; border-collapse: collapse; }
thead th {
  padding: 0.65rem 1rem; text-align: left;
  font-size: 0.71rem; font-weight: 700; color: var(--text3);
  text-transform: uppercase; letter-spacing: 0.05em;
  border-bottom: 1px solid var(--border); background: var(--bg);
  white-space: nowrap;
}
tbody tr { border-bottom: 1px solid var(--border); transition: background 0.1s; }
tbody tr:hover { background: var(--bg); }
tbody tr:last-child { border-bottom: none; }
td { padding: 0.75rem 1rem; font-size: 0.86rem; vertical-align: middle; }

.rank-badge {
  width: 26px; height: 26px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 800; font-size: 0.78rem;
}
.rank-1 { background: #ffd700; color: #a67c00; }
.rank-2 { background: #e2e8f0; color: #475569; }
.rank-3 { background: #f4c09a; color: #7c4a1e; }
.rank-n { background: var(--bg); color: var(--text3); border: 1px solid var(--border); }

.dec-badge { padding: 0.22rem 0.55rem; border-radius: 20px; font-size: 0.72rem; font-weight: 700; white-space: nowrap; }
.dec-strong_hire { background: var(--green-dim); color: var(--green); }
.dec-hire { background: var(--blue-dim); color: var(--blue); }
.dec-consider { background: var(--yellow-dim); color: #7a5800; }
.dec-reject { background: var(--red-dim); color: var(--red); }
.dec-pending { background: var(--bg); color: var(--text3); border: 1px solid var(--border); }

.score-chip { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 800; font-size: 1rem; }
.sc-high { color: var(--green); }
.sc-mid { color: var(--blue); }
.sc-low { color: #7a5800; }
.sc-fail { color: var(--red); }

.status-indicator { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.82rem; font-weight: 600; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-registered { background: var(--text3); }
.dot-started { background: var(--yellow); }
.dot-submitted { background: var(--green); }

.action-btn {
  padding: 0.28rem 0.65rem; border-radius: 6px; font-size: 0.77rem; font-weight: 700;
  cursor: pointer; border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text2); transition: all 0.13s; font-family: 'Manrope', sans-serif;
}
.action-btn:hover { border-color: var(--green); color: var(--green); background: var(--green-dim); }

.empty-state { text-align: center; padding: 2.5rem; color: var(--text3); }
.empty-state div { font-size: 1.75rem; margin-bottom: 0.6rem; }

/* Detail Panel */
.panel-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.25); z-index: 199; display: none; backdrop-filter: blur(2px); }
.panel-overlay.show { display: block; }
.detail-panel {
  position: fixed; top: 0; right: -920px; width: 920px; max-width: 95vw;
  height: 100vh; background: var(--surface); border-left: 1px solid var(--border);
  z-index: 200; transition: right 0.3s ease; overflow-y: auto;
  box-shadow: -4px 0 20px rgba(0,0,0,0.1);
}
.detail-panel.open { right: 0; }

.panel-header {
  padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; background: var(--surface); z-index: 10;
}
.panel-title { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 800; font-size: 1.05rem; color: var(--text1); }
.close-btn {
  padding: 0.38rem 0.75rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--bg);
  color: var(--text2); cursor: pointer; font-family: 'Manrope', sans-serif; font-size: 0.82rem; font-weight: 700;
}
.close-btn:hover { border-color: var(--red); color: var(--red); }

.panel-body { padding: 1.5rem; }
.panel-section { margin-bottom: 1.4rem; }
.panel-section-title {
  font-size: 0.7rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.07em; color: var(--text3); margin-bottom: 0.7rem;
  padding-bottom: 0.4rem; border-bottom: 1px solid var(--border);
}

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }

/* Admin info-item (scoped — registration has a different .info-item) */
body.page-admin .info-item {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.7rem;
}
.info-item-label { font-size: 0.7rem; color: var(--text3); margin-bottom: 0.2rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; }
.info-item-val { font-size: 0.88rem; font-weight: 600; color: var(--text1); }

.score-breakdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; }
.score-sec-card {
  background: var(--bg); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 0.7rem; text-align: center;
  border-top: 2px solid var(--green);
}
.score-sec-name { font-size: 0.68rem; color: var(--text3); margin-bottom: 0.25rem; font-weight: 700; text-transform: uppercase; }
.score-sec-val { font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--green); }
.score-sec-max { font-size: 0.68rem; color: var(--text3); }

.answer-list { display: flex; flex-direction: column; gap: 0.6rem; }
.answer-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.8rem; }
.answer-q { font-size: 0.8rem; color: var(--text2); margin-bottom: 0.4rem; line-height: 1.4; font-weight: 500; }
.answer-correct { color: var(--green); font-weight: 700; font-size: 0.85rem; }
.answer-wrong { color: var(--red); font-weight: 700; font-size: 0.85rem; }
.answer-written {
  color: var(--text1); background: var(--surface); border: 1px solid var(--border);
  border-radius: 7px; padding: 0.6rem 0.75rem; margin-top: 0.35rem;
  font-size: 0.84rem; line-height: 1.6; font-weight: 500;
}

.manual-score-box {
  background: var(--green-dim); border: 1px solid rgba(43,158,86,0.2);
  border-radius: 12px; padding: 1.1rem; display: flex; flex-direction: column; gap: 0.7rem;
}
.ms-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.ms-label { font-size: 0.8rem; font-weight: 700; color: var(--text1); }
.score-input {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.5rem 0.75rem;
  color: var(--text1); font-family: "ITC Brand font", "Segoe UI", sans-serif;
  font-weight: 800; font-size: 1rem; width: 90px; outline: none;
}
.score-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--accent-glow); }
.notes-textarea {
  background: var(--surface); border: 1.5px solid var(--border);
  border-radius: var(--radius); padding: 0.6rem 0.8rem;
  color: var(--text1); font-family: 'Manrope', sans-serif;
  font-size: 0.86rem; resize: vertical; min-height: 75px; outline: none; width: 100%; font-weight: 500;
}
.notes-textarea:focus { border-color: var(--green); }
.save-btn {
  padding: 0.65rem 1.4rem; background: var(--green); color: #fff;
  border: none; border-radius: var(--radius);
  font-family: "ITC Brand font", "Segoe UI", sans-serif; font-weight: 800; font-size: 0.9rem;
  cursor: pointer; transition: all 0.2s; align-self: flex-start;
}
.save-btn:hover { background: var(--green-h); transform: translateY(-1px); }

.loading-td { text-align: center; padding: 2rem; color: var(--text3); font-weight: 600; }

/* AI Scoring */
.ai-status-bar {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem;
  font-size: 0.78rem; font-weight: 600; color: var(--text2);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.55rem 0.8rem;
}
.ai-model-chip { padding: 0.18rem 0.55rem; border-radius: 20px; font-size: 0.69rem; font-weight: 800; letter-spacing: 0.03em; }
.chip-groq  { background: rgba(43,158,86,0.12); color: #2B9E56; border: 1px solid rgba(43,158,86,0.3); }
.chip-paid  { background: rgba(53,120,181,0.12); color: #3578b5; border: 1px solid rgba(53,120,181,0.3); }
.chip-active { box-shadow: 0 0 0 2px currentColor; }

.ai-score-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.6rem 1.2rem; background: #fff;
  border: 2px solid var(--green); border-radius: var(--radius);
  color: var(--green); font-family: 'Manrope', sans-serif;
  font-size: 0.88rem; font-weight: 800; cursor: pointer;
  transition: all 0.2s; align-self: flex-start;
}
.ai-score-btn:hover { background: var(--green); color: #fff; }
.ai-score-btn:disabled { opacity: 0.5; cursor: not-allowed; }

.ai-progress-wrap { display: flex; flex-direction: column; gap: 0.3rem; }
.ai-progress-bar { height: 6px; background: var(--border); border-radius: 10px; overflow: hidden; }
.ai-progress-fill { height: 100%; background: var(--green); border-radius: 10px; transition: width 0.3s; }
.ai-progress-text { font-size: 0.76rem; color: var(--text3); font-weight: 600; }

.ai-live-status { font-size: 0.79rem; color: var(--text2); font-weight: 600; display: flex; align-items: center; gap: 0.4rem; }
.progress-status { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; color: var(--text2); font-weight: 600; margin-bottom: 0.4rem; }
.ai-error { background: rgba(220,53,69,0.06); border: 1px solid rgba(220,53,69,0.2); color: var(--red); border-radius: 8px; padding: 0.6rem 0.85rem; font-size: 0.82rem; font-weight: 600; }
.ai-spinner { width: 12px; height: 12px; border: 2px solid var(--green-l); border-top-color: var(--green); border-radius: 50%; animation: spin 0.7s linear infinite; flex-shrink: 0; }

.ai-summary {
  display: flex; align-items: center; flex-wrap: wrap; gap: 0.6rem;
  background: rgba(43,158,86,0.06); border: 1px solid rgba(43,158,86,0.2);
  border-radius: 8px; padding: 0.65rem 0.85rem;
  font-size: 0.83rem; font-weight: 600; color: var(--text1);
}
.ai-accept-all-btn {
  margin-left: auto; padding: 0.38rem 0.9rem;
  background: var(--green); color: #fff; border: none;
  border-radius: 7px; font-family: 'Manrope', sans-serif;
  font-size: 0.78rem; font-weight: 800; cursor: pointer; transition: background 0.2s;
}
.ai-accept-all-btn:hover { background: var(--green-h); }

.ai-q-card { background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 0.75rem 0.9rem; display: flex; flex-direction: column; gap: 0.45rem; }
.ai-q-header { display: flex; align-items: start; gap: 0.75rem; flex-wrap: wrap; margin-bottom: 0.1rem; }
.ai-q-num { font-size: 0.72rem; font-weight: 800; color: var(--text3); flex-shrink: 0; padding-top: 0.15rem; }
.ai-q-text { font-size: 0.88rem; color: var(--text1); font-weight: 700; flex: 1; line-height: 1.5; }
.ai-grade-chip { padding: 0.12rem 0.5rem; border-radius: 20px; font-size: 0.67rem; font-weight: 800; text-transform: uppercase; flex-shrink: 0; }
.grade-excellent { background: var(--green-dim); color: var(--green); }
.grade-good      { background: var(--blue-dim);  color: var(--blue); }
.grade-average   { background: var(--yellow-dim); color: #7a5800; }
.grade-poor      { background: var(--red-dim);   color: var(--red); }

.ai-q-section { border-radius: 6px; padding: 0.45rem 0.65rem; }
.ai-q-section-label { font-size: 0.67rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text3); margin-bottom: 0.2rem; }
.ai-q-section-body { font-size: 0.84rem; line-height: 1.55; }
.ai-section-answer  { background: #f8f9fa; border-left: 3px solid #8a9e96; }
.ai-section-answer .ai-q-section-body  { color: var(--text1); }
.ai-section-answer .no-answer { color: var(--text3); font-style: italic; }
.ai-section-eval    { background: var(--green-dim); border-left: 3px solid var(--green); }
.ai-section-eval .ai-q-section-body    { color: var(--text1); }
.ai-section-model   { background: rgba(230,168,23,0.06); border-left: 3px solid #e6a817; }
.ai-section-model .ai-q-section-label { color: #7a5800; }
.ai-section-model .ai-q-section-body  { color: var(--text1); font-size: 0.83rem; line-height: 1.6; }

.ai-q-footer { display: flex; align-items: center; gap: 0.75rem; margin-top: 0.1rem; }
.ai-q-score { font-size: 0.9rem; font-weight: 800; color: var(--green); white-space: nowrap; }
.ai-accept-btn {
  margin-left: auto; padding: 0.25rem 0.65rem;
  background: var(--green-dim); color: var(--green);
  border: 1px solid rgba(43,158,86,0.3); border-radius: 6px;
  font-family: 'Manrope', sans-serif; font-size: 0.73rem; font-weight: 800;
  cursor: pointer; transition: all 0.15s; white-space: nowrap;
}
.ai-accept-btn:hover { background: var(--green); color: #fff; }
.ai-results-list { display: flex; flex-direction: column; gap: 0.6rem; }
.ai-divider { height: 1px; background: var(--border); margin: 0.4rem 0; }
.ai-rubric-note { font-size: 0.73rem; color: #52b788; font-weight: 600; margin-top: 0.2rem; }
.q-score-input {
  width: 52px; padding: 0.22rem 0.4rem; text-align: center;
  border: 1.5px solid var(--border); border-radius: 6px;
  font-family: 'Manrope', sans-serif; font-size: 0.9rem;
  font-weight: 800; color: var(--green); background: var(--bg); outline: none;
}
.q-score-input:focus { border-color: var(--green); background: #fff; }

/* Evidence / Snapshots */
.snapshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.snapshot-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.snapshot-card img { width: 100%; height: 140px; object-fit: cover; display: block; background: #1a2e24; cursor: pointer; }
.snapshot-card-info { padding: 0.75rem; }
.snapshot-card-name { font-size: 0.82rem; font-weight: 700; color: var(--text1); margin-bottom: 0.2rem; }
.snapshot-card-violation { font-size: 0.72rem; font-weight: 700; padding: 0.18rem 0.5rem; border-radius: 20px; background: var(--red-dim); color: var(--red); display: inline-block; margin-bottom: 0.3rem; }
.snapshot-card-time { font-size: 0.72rem; color: var(--text3); }
.snap-thumb { width: 56px; height: 42px; object-fit: cover; border-radius: 6px; border: 1px solid var(--border); cursor: pointer; }
.view-snap-btn { padding: 0.28rem 0.65rem; border-radius: 6px; font-size: 0.77rem; font-weight: 700; cursor: pointer; border: 1.5px solid var(--border); background: var(--bg); color: var(--text2); transition: all 0.13s; font-family: Manrope, sans-serif; }
.view-snap-btn:hover { border-color: var(--red); color: var(--red); }
.flagged-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-top: 0.25rem; }
.flagged-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 1.1rem 1.25rem; cursor: pointer; transition: all 0.18s;
  display: flex; align-items: center; gap: 1rem;
  box-shadow: var(--shadow);
}
.flagged-card:hover { border-color: var(--red); box-shadow: 0 4px 18px rgba(220,53,69,0.12); transform: translateY(-1px); }
.flagged-avatar {
  width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
  background: rgba(220,53,69,0.1); border: 2px solid rgba(220,53,69,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; font-weight: 800; color: var(--red);
  font-family: "ITC Brand font", sans-serif;
}
.flagged-info { flex: 1; min-width: 0; }
.flagged-name { font-weight: 700; font-size: 0.92rem; color: var(--text1); margin-bottom: 0.25rem; }
.flagged-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.flagged-badge { font-size: 0.7rem; font-weight: 700; padding: 0.15rem 0.5rem; border-radius: 20px; }
.badge-violations { background: var(--red-dim); color: var(--red); }
.badge-dq { background: rgba(220,53,69,0.15); color: var(--red); }
.badge-types { background: var(--bg); color: var(--text3); border: 1px solid var(--border); }
.flagged-arrow { color: var(--text3); font-size: 1.1rem; }
.evidence-back-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.45rem 0.9rem; border-radius: var(--radius);
  border: 1.5px solid var(--border); background: var(--surface);
  font-size: 0.82rem; font-weight: 700; color: var(--text2);
  cursor: pointer; font-family: Manrope, sans-serif; transition: all 0.15s;
  margin-bottom: 1.25rem;
}
.evidence-back-btn:hover { border-color: var(--green); color: var(--green); }
.lightbox-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.88); z-index: 1000; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 1rem; }
.lightbox-overlay.show { display: flex; }
.lightbox-overlay img { max-width: 90vw; max-height: 75vh; border-radius: 12px; border: 2px solid var(--border); }
.lightbox-info { color: #fff; text-align: center; font-size: 0.85rem; }
.lightbox-close { padding: 0.5rem 1.5rem; background: var(--red); color: #fff; border: none; border-radius: 8px; cursor: pointer; font-family: Manrope, sans-serif; font-weight: 700; }

.ai-scored-chip {
  display: inline-block; font-size: 0.67rem; font-weight: 800;
  background: rgba(43,158,86,0.1); color: var(--green);
  border: 1px solid rgba(43,158,86,0.22); border-radius: 4px;
  padding: 0.05rem 0.35rem; margin-left: 0.25rem; vertical-align: middle;
}

/* Bulk Scoring Panel */
#bulkPanel {
  position: fixed; bottom: 1.5rem; right: 1.5rem; width: 310px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.14);
  z-index: 1000; overflow: hidden; display: none;
}
#bulkPanel.show { display: block; }
.bulk-header {
  background: var(--green); color: #fff;
  padding: 0.6rem 1rem;
  display: flex; align-items: center; justify-content: space-between;
  font-weight: 800; font-size: 0.84rem; gap: 0.5rem;
}
.bulk-header-left { display: flex; align-items: center; gap: 0.5rem; }
.bulk-counter { background: rgba(255,255,255,0.25); border-radius: 20px; padding: 0.1rem 0.55rem; font-size: 0.78rem; font-weight: 800; }
.bulk-body { padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.55rem; }
.bulk-candidate-name { font-size: 0.84rem; font-weight: 700; color: var(--text1); }
.bulk-candidate-sub  { font-size: 0.73rem; color: var(--text3); margin-top: -0.3rem; }
.bulk-stop-btn {
  width: 100%; padding: 0.45rem; border-radius: 7px;
  font-family: 'Manrope', sans-serif; font-size: 0.8rem; font-weight: 800;
  cursor: pointer; transition: all 0.15s; border: 1px solid rgba(220,53,69,0.25);
  background: var(--red-dim); color: var(--red);
}
.bulk-stop-btn:hover:not(:disabled) { background: var(--red); color: #fff; }
.bulk-stop-btn:disabled { opacity: 0.55; cursor: default; }
.bulk-close-btn {
  width: 100%; padding: 0.45rem; border-radius: 7px;
  font-family: 'Manrope', sans-serif; font-size: 0.8rem; font-weight: 800;
  cursor: pointer; border: 1px solid var(--border);
  background: var(--bg); color: var(--text2); transition: all 0.15s;
}
.bulk-close-btn:hover { background: var(--surface); color: var(--text1); }
