/* Pilot Recruitment Platform — base styles (no build step needed) */
:root {
  --navy: #0b2545;
  --navy-2: #13315c;
  --ink: #1b2533;
  --muted: #5d6b7e;
  --line: #dfe5ee;
  --bg: #f4f6fa;
  --card: #ffffff;
  --accent: #e8a33d;
  --info: #2f6fb3;
  --success: #1f8a5b;
  --warning: #b7791f;
  --danger: #c0392b;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 37, 69, .06), 0 4px 16px rgba(11, 37, 69, .05);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 15px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--info); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--navy); line-height: 1.25; margin: 0 0 .5em; }
h1 { font-size: 1.6rem; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
code { background: #eef2f7; padding: 1px 5px; border-radius: 4px; font-size: .92em; }

/* ---------- Layout ---------- */
.topbar { background: var(--navy); color: #fff; }
.topbar .inner { max-width: 1180px; margin: 0 auto; padding: 0 20px; display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; letter-spacing: .2px; display: flex; align-items: center; gap: 10px; }
.brand:hover { text-decoration: none; }
.brand .mark { width: 30px; height: 30px; border-radius: 8px; background: var(--accent); color: var(--navy); display: grid; place-items: center; font-size: 16px; }
.nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.nav a { color: #c9d6ea; padding: 8px 12px; border-radius: 8px; }
.nav a:hover, .nav a.active { color: #fff; background: var(--navy-2); text-decoration: none; }
.whoami { display: flex; align-items: center; gap: 12px; color: #c9d6ea; font-size: .9rem; }
.whoami form { margin: 0; }
.whoami button { background: transparent; border: 1px solid #3c5a85; color: #fff; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.container { max-width: 1180px; margin: 0 auto; padding: 28px 20px 60px; }
.container.narrow { max-width: 760px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-head h1 { margin: 0; }
.grid { display: grid; gap: 20px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: 2fr 1fr; }
@media (max-width: 900px) { .grid.cols-3 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 20px; }

/* ---------- Cards ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); color: inherit; }
.stat:hover { text-decoration: none; border-color: #b9c6d8; }
.stat .num { font-size: 1.8rem; font-weight: 700; color: var(--navy); line-height: 1.1; }
.stat .lbl { color: var(--muted); font-size: .85rem; }

/* ---------- Auth pages ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, #1d4e89 100%); }
.auth-card { width: 100%; max-width: 440px; background: #fff; border-radius: 14px; padding: 32px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.auth-card .brand { color: var(--navy); margin-bottom: 18px; }
.auth-card h1 { font-size: 1.35rem; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
.field label, .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .92rem; }
.field .hint { color: var(--muted); font-size: .84rem; margin-top: 4px; }
.req { color: var(--danger); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 10px 12px; border: 1px solid #c8d2df; border-radius: 8px; font: inherit; color: var(--ink); background: #fff;
}
input[type=file] { font: inherit; }
textarea { min-height: 96px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid rgba(47,111,179,.35); border-color: var(--info); }
.is-invalid { border-color: var(--danger) !important; }
.error { color: var(--danger); font-size: .85rem; margin-top: 4px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.check input { margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 16px; }
fieldset { border: 0; padding: 0; margin: 0 0 8px; }
legend { font-weight: 700; color: var(--navy); margin-bottom: 12px; font-size: 1.02rem; }
fieldset[disabled] { opacity: .75; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 8px; border: 1px solid transparent; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn-primary { background: var(--navy); color: #fff; }
.btn-accent { background: var(--accent); color: var(--navy); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: #fff; color: var(--danger); border-color: #e7b7b1; }
.btn-ghost { background: #fff; color: var(--navy); border-color: #c8d2df; }
.btn-sm { padding: 6px 10px; font-size: .86rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.inline { display: inline; margin: 0; }

/* ---------- Alerts & badges ---------- */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 18px; border: 1px solid; }
.alert-success { background: #eaf7f0; border-color: #b6e2c9; color: #155c3d; }
.alert-danger { background: #fdeeec; border-color: #f2c3bd; color: #8e2a1f; }
.alert-warning { background: #fff6e6; border-color: #f3d7a6; color: #7a5212; }
.alert-info { background: #ebf3fb; border-color: #bcd5ee; color: #1f4f80; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; border: 1px solid; }
.badge-muted { background: #f0f2f5; color: #55606e; border-color: #dde2e8; }
.badge-info { background: #ebf3fb; color: #1f4f80; border-color: #bcd5ee; }
.badge-success { background: #eaf7f0; color: #155c3d; border-color: #b6e2c9; }
.badge-warning { background: #fff6e6; color: #7a5212; border-color: #f3d7a6; }
.badge-danger { background: #fdeeec; color: #8e2a1f; border-color: #f2c3bd; }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 600; background: #f8fafc; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbfd; }
.empty { text-align: center; color: var(--muted); padding: 30px; }

/* ---------- Definition lists ---------- */
.dl { display: grid; grid-template-columns: 190px 1fr; gap: 8px 16px; margin: 0; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }
@media (max-width: 600px) { .dl { grid-template-columns: 1fr; } .dl dd { margin-bottom: 8px; } }

/* ---------- Candidate steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; gap: 16px; align-items: flex-start; padding: 18px 0; border-bottom: 1px solid var(--line); }
.step:last-child { border-bottom: 0; }
.step .dot { flex: 0 0 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #eef2f7; color: var(--muted); }
.step.done .dot { background: var(--success); color: #fff; }
.step.current .dot { background: var(--accent); color: var(--navy); }
.step .body { flex: 1; }
.step .body h3 { margin-bottom: 4px; }
.step .body p { margin: 0 0 8px; color: var(--muted); }

/* ---------- Documents ---------- */
.doc-list { list-style: none; margin: 0; padding: 0; }
.doc { display: flex; gap: 12px; align-items: center; justify-content: space-between; padding: 12px 0; border-top: 1px solid var(--line); flex-wrap: wrap; }
.doc:first-child { border-top: 0; }
.doc .meta { color: var(--muted); font-size: .85rem; }
.doc-type { padding: 16px 0; border-bottom: 1px solid var(--line); }
.doc-type:last-child { border-bottom: 0; }
.review-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; width: 100%; margin-top: 8px; }
.review-form input[type=text] { flex: 1; min-width: 180px; }
.expiry-soon { color: var(--warning); font-weight: 600; }
.expired { color: var(--danger); font-weight: 600; }

/* ---------- Invite box ---------- */
.invite-box { background: #fffaf0; border: 1px dashed var(--accent); border-radius: var(--radius); padding: 18px; margin-bottom: 20px; }
.copy-row { display: flex; gap: 8px; margin: 10px 0; }
.copy-row input { font-family: Consolas, monospace; font-size: .85rem; }

/* ---------- Activity ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.timeline li:last-child { border-bottom: 0; }
.timeline .when { color: var(--muted); font-size: .8rem; display: block; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.filters input[type=search] { max-width: 280px; }
.filters select { max-width: 220px; }
.pagination { display: flex; gap: 6px; list-style: none; padding: 0; margin: 16px 0 0; flex-wrap: wrap; }
.pagination a, .pagination span { padding: 6px 11px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
nav[role=navigation] svg { width: 16px; height: 16px; }
.footer { text-align: center; color: var(--muted); font-size: .82rem; padding: 24px; }
.hidden { display: none !important; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt { margin-top: 16px; }
.text-right { text-align: right; }
.narrow-box { max-width: 760px; }

/* ---------- Type ratings multi-select ---------- */
.rating-groups { border: 1px solid #c8d2df; border-radius: 8px; margin-top: 8px; background: #fff; }
.rating-group + .rating-group { border-top: 1px solid var(--line); }
.rating-group summary { cursor: pointer; padding: 10px 14px; font-weight: 600; color: var(--navy); display: flex; gap: 10px; align-items: center; }
.rating-group summary::-webkit-details-marker { color: var(--muted); }
.checks-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 16px; padding: 4px 14px 14px; }
.checks-grid .check { font-weight: 400; font-size: .93rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- Interview (admin) ---------- */
.mb-section { margin-bottom: 20px; }
.answers { display: grid; gap: 14px; }
.answer { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; background: #fbfcfe; }
.answer-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.answer-body { display: grid; grid-template-columns: minmax(260px, 1.3fr) 1fr; gap: 18px; margin-top: 12px; }
@media (max-width: 800px) { .answer-body { grid-template-columns: 1fr; } }
.answer-video { width: 100%; border-radius: 8px; background: #000; max-height: 340px; }
.score-row { display: flex; gap: 6px; margin: 8px 0; }
.score-pill input { position: absolute; opacity: 0; pointer-events: none; }
.score-pill span { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid #c8d2df; cursor: pointer; font-weight: 700; color: var(--navy); background: #fff; }
.score-pill input:checked + span { background: var(--navy); color: #fff; border-color: var(--navy); }
.score-pill input:focus-visible + span { outline: 2px solid var(--info); }
.random-pick { margin-left: auto; font-weight: 400; font-size: .85rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.random-pick input { width: 64px; padding: 4px 6px; }
.question-picks { display: grid; gap: 8px; padding: 4px 14px 14px; }
.question-picks .check { font-weight: 400; }

/* ---------- Interview (pilot) ---------- */
.iv-stage { display: grid; gap: 18px; }
.iv-video-wrap { position: relative; background: #0b1524; border-radius: 12px; overflow: hidden; aspect-ratio: 16 / 9; }
.iv-video-wrap video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.iv-video-wrap video.playback { transform: none; object-fit: contain; }
.iv-rec { position: absolute; top: 12px; left: 12px; background: rgba(192, 57, 43, .92); color: #fff; padding: 4px 10px; border-radius: 999px; font-weight: 700; font-size: .85rem; display: flex; align-items: center; gap: 6px; }
.iv-rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #fff; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.iv-timer { font-size: 2.6rem; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; line-height: 1; }
.iv-timer.warn { color: var(--danger); }
.iv-question { font-size: 1.25rem; font-weight: 600; color: var(--navy); line-height: 1.45; }
.iv-progress { height: 8px; background: #e6ebf2; border-radius: 999px; overflow: hidden; }
.iv-progress > div { height: 100%; width: 0; background: var(--accent); transition: width .3s; }
.iv-meter { height: 8px; background: #e6ebf2; border-radius: 999px; overflow: hidden; }
.iv-meter > div { height: 100%; width: 0; background: var(--success); transition: width .08s; }
.iv-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.iv-checklist { margin: 0 0 16px 18px; padding: 0; }
.iv-checklist li { margin-bottom: 6px; }

/* ---------- CRM scenarios ---------- */
.option-rows { display: grid; gap: 8px; margin-top: 8px; }
.option-row { display: grid; grid-template-columns: 28px 1fr 70px 24px; gap: 8px; align-items: center; }
.option-row textarea { min-height: 44px; }
.option-key { width: 28px; height: 28px; border-radius: 50%; background: #eef2f7; color: var(--navy); display: grid; place-items: center; font-weight: 700; }
.sc-options { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.sc-options li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: #fff; font-size: .92rem; }
.sc-options li.chosen { border-color: var(--info); background: #ebf3fb; }
.sc-options li.best { box-shadow: inset 4px 0 0 var(--success); }
.sc-options .pts { margin-left: auto; white-space: nowrap; color: var(--muted); font-weight: 600; }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 220px 1fr 70px; gap: 10px; align-items: center; font-size: .9rem; }
@media (max-width: 600px) { .bar-row { grid-template-columns: 1fr 70px; } .bar-row .bar { grid-column: 1 / -1; } }
.bar { height: 10px; background: #e6ebf2; border-radius: 999px; overflow: hidden; }
.bar > div { height: 100%; background: var(--navy); }
.bar.w-0 > div { width: 0; }
.big-score { font-size: 2.2rem; font-weight: 800; color: var(--navy); line-height: 1; }
/* pilot runner */
.ans-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.ans-list label { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border: 1px solid #c8d2df; border-radius: 10px; cursor: pointer; background: #fff; font-size: 1rem; }
.ans-list label:hover { border-color: var(--info); }
.ans-list input { margin-top: 4px; }
.ans-list input:checked + span { font-weight: 600; color: var(--navy); }
.ans-key { font-weight: 800; color: var(--navy); min-width: 20px; }
.bar-meter { width: 100%; height: 12px; }
.inline-form { display: flex; gap: 6px; align-items: center; } .inline-form select { width: auto; padding: 5px 8px; }
.stage-list { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 12px; } .stage-list li { border-left: 3px solid var(--line); padding-left: 12px; } .mt-s { margin-top: 6px; }
.stage-track { margin: 0; padding-left: 20px; display: grid; gap: 8px; } .stage-track li { line-height: 1.6; }
.bank-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.option-row-correct { grid-template-columns: 28px 1fr 100px; }
.stage-unused { opacity: .7; } .group-picks { padding: 6px 0 0; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }

/* Recorded-answer playback stays inside the card */
video.playback { display: block; width: 100%; max-width: 100%; max-height: 60vh; aspect-ratio: 16 / 9; background: #0b1524; border-radius: 12px; object-fit: contain; }
.iv-stage, .iv-stage > div, .card { min-width: 0; }
.iv-video-wrap { max-height: 60vh; }

/* Tests: discourage copying questions */
[data-no-copy] { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
@media print { [data-no-copy] { display: none !important; } }
