/* ============================================================
   Design System — Portal Tes Rekrutmen
   Tampilan profesional, bersih, interaktif, mobile-first.
   ============================================================ */
:root {
  --bg: #eef1f6;
  --bg-2: #e7ebf3;
  --card: #ffffff;
  --ink: #17222e;
  --ink-soft: #46586b;
  --muted: #7a8aa0;
  --line: #e3e8f0;
  --line-strong: #d2dae6;

  --brand: #1f4e79;
  --brand-2: #2f6fb0;
  --brand-ink: #163a5c;
  --brand-soft: #eaf1fa;
  --brand-grad: linear-gradient(135deg, #245793 0%, #2f6fb0 100%);

  --ok: #0f7a4f;
  --ok-bg: #e3f6ec;
  --bad: #c0392b;
  --bad-bg: #fbe7e4;
  --warn: #b8860b;
  --warn-bg: #fff7e3;
  --warn-line: #ecc94b;

  --shadow-sm: 0 1px 2px rgba(20, 40, 70, .06), 0 1px 3px rgba(20, 40, 70, .05);
  --shadow: 0 4px 14px rgba(20, 40, 70, .08), 0 2px 6px rgba(20, 40, 70, .05);
  --shadow-lg: 0 18px 45px rgba(20, 40, 70, .14);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 760px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background:
    radial-gradient(1200px 480px at 50% -240px, #dbe6f5 0%, rgba(219,230,245,0) 70%),
    var(--bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 22px 18px 72px; }
.wrap-wide { max-width: 1200px; }

/* ---------- Header ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 22px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand .logo {
  width: 42px; height: 42px; border-radius: 12px; background: var(--brand-grad);
  display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 18px;
  box-shadow: var(--shadow-sm); flex: none;
}
.brand .name { font-weight: 800; font-size: 17px; letter-spacing: .2px; line-height: 1.15; color: var(--brand-ink); }
.brand .name small { font-weight: 600; font-size: 13px; color: var(--brand-2); letter-spacing: .2px; }

/* Footer */
.site-footer { margin-top: 30px; padding-top: 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); }
.site-footer a { color: var(--brand); text-decoration: none; font-weight: 600; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .dot { opacity: .5; }

/* ---------- Stepper ---------- */
.stepper { display: flex; align-items: center; gap: 6px; margin: 0 0 22px; overflow-x: auto; padding-bottom: 4px; }
.stepper .step { display: flex; align-items: center; gap: 8px; flex: none; }
.stepper .dot {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center;
  font-size: 12px; font-weight: 700; background: #fff; color: var(--muted);
  border: 2px solid var(--line-strong); flex: none; transition: .25s;
}
.stepper .label { font-size: 12.5px; color: var(--muted); font-weight: 600; white-space: nowrap; }
.stepper .bar { width: 22px; height: 2px; background: var(--line-strong); border-radius: 2px; flex: none; }
.stepper .step.done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.stepper .step.active .dot { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px var(--brand-soft); }
.stepper .step.active .label { color: var(--brand-ink); }
.stepper .step.done .label { color: var(--ink-soft); }

/* ---------- Cards & typography ---------- */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; margin-bottom: 18px;
  box-shadow: var(--shadow); animation: rise .4s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .card, .qcard { animation: none !important; } }

h1 { font-size: 26px; line-height: 1.25; margin: 0 0 8px; letter-spacing: -.01em; }
h2 { font-size: 18px; margin: 24px 0 12px; }
h3 { font-size: 15px; margin: 0 0 6px; }
p.lead { color: var(--ink-soft); margin-top: 0; font-size: 15.5px; }
.muted { color: var(--muted); }
.center { text-align: center; }

/* Hero */
.hero { text-align: center; padding: 8px 6px 4px; }
.hero .eyebrow {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .6px;
  text-transform: uppercase; color: var(--brand); background: var(--brand-soft);
  padding: 5px 12px; border-radius: 999px; margin-bottom: 14px;
}
.hero h1 { font-size: 30px; }
.hero p { color: var(--ink-soft); font-size: 16px; max-width: 560px; margin: 10px auto 0; }

/* Deadline notice */
.deadline { display: inline-flex; align-items: center; gap: 8px; margin-top: 16px; padding: 9px 16px; border-radius: 999px; font-size: 13.5px; font-weight: 600; background: var(--brand-soft); color: var(--brand-ink); border: 1px solid #d3e4f7; }
.deadline.closed { background: var(--bad-bg); color: #8f2c20; border-color: #f0b7af; }
.deadline .ic { font-size: 15px; }

/* Info tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 22px 0; }
.tile { background: var(--brand-soft); border: 1px solid #dbe8f6; border-radius: var(--radius-sm); padding: 16px; text-align: center; }
.tile .ic { font-size: 22px; }
.tile .big { font-size: 20px; font-weight: 800; color: var(--brand-ink); margin-top: 4px; }
.tile .cap { font-size: 12.5px; color: var(--ink-soft); }

/* Perks / kompensasi */
.perks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 6px 0 4px; }
.perk { display: flex; gap: 12px; align-items: flex-start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.perk .pic { font-size: 22px; flex: none; line-height: 1.2; }
.perk b { display: block; font-size: 14.5px; }
.perk span { font-size: 13px; color: var(--muted); }
@media (max-width: 620px) { .perks { grid-template-columns: 1fr; } }

/* Steps list */
.flow { list-style: none; margin: 8px 0; padding: 0; counter-reset: fl; }
.flow li { position: relative; padding: 12px 0 12px 46px; border-bottom: 1px dashed var(--line); }
.flow li:last-child { border-bottom: 0; }
.flow li::before {
  counter-increment: fl; content: counter(fl); position: absolute; left: 0; top: 10px;
  width: 30px; height: 30px; border-radius: 50%; background: var(--brand-grad); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 13px; box-shadow: var(--shadow-sm);
}
.flow li b { display: block; font-size: 14.5px; }
.flow li span { font-size: 13.5px; color: var(--muted); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--brand-grad); color: #fff; border: 0;
  padding: 13px 26px; border-radius: 12px; font-size: 15px; font-weight: 700;
  cursor: pointer; text-decoration: none; text-align: center; line-height: 1;
  box-shadow: var(--shadow-sm); transition: transform .12s ease, box-shadow .2s ease, filter .2s ease;
  font-family: inherit;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); filter: brightness(1.04); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; filter: none; }
.btn-block { display: flex; width: 100%; }
.btn-lg { padding: 16px 30px; font-size: 16px; border-radius: 14px; }
.btn-ghost { background: #fff; color: var(--brand); border: 1.5px solid var(--line-strong); box-shadow: none; }
.btn-ghost:hover { background: var(--brand-soft); border-color: var(--brand-2); filter: none; }
.btn-sm { padding: 8px 15px; font-size: 13px; border-radius: 9px; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }
.btn-row.between { justify-content: space-between; }

/* ---------- Position choice ---------- */
.choice { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 6px 0 4px; }
.choice a {
  display: block; text-decoration: none; color: inherit; background: #fff;
  border: 2px solid var(--line-strong); border-radius: var(--radius); padding: 22px;
  transition: .18s; position: relative; overflow: hidden;
}
.choice a::after { content: "Pilih →"; position: absolute; right: 18px; bottom: 16px; font-size: 13px; font-weight: 700; color: var(--brand); opacity: 0; transform: translateX(-6px); transition: .18s; }
.choice a:hover { border-color: var(--brand-2); box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.choice a:hover::after { opacity: 1; transform: none; }
.choice .pic { width: 52px; height: 52px; border-radius: 14px; background: var(--brand-soft); display: grid; place-items: center; font-size: 26px; margin-bottom: 14px; }
.choice h3 { font-size: 18px; margin-bottom: 6px; }
.choice p { font-size: 13.5px; color: var(--ink-soft); margin: 0 0 26px; }

/* ---------- Forms ---------- */
.field { margin-bottom: 16px; }
label { display: block; font-weight: 600; margin: 0 0 7px; font-size: 13.5px; color: var(--ink); }
label .req { color: var(--bad); }
label .opt { font-weight: 500; color: var(--muted); font-size: 12px; }
.hint { display: block; font-weight: 400; color: var(--muted); font-size: 12px; margin-top: 5px; }
input[type=text], input[type=number], input[type=tel], input[type=password], select {
  width: 100%; padding: 13px 14px; border: 1.5px solid var(--line-strong);
  border-radius: 11px; font-size: 15px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s; font-family: inherit;
}
input:focus, select:focus { outline: none; border-color: var(--brand-2); box-shadow: 0 0 0 4px var(--brand-soft); }
input.invalid { border-color: var(--bad); box-shadow: 0 0 0 4px var(--bad-bg); }
.field-msg { font-size: 12.5px; margin-top: 6px; min-height: 1px; }
.field-msg.err { color: var(--bad); }
.field-msg.ok { color: var(--ok); }
select { appearance: none; 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='%237a8aa0' d='M1 1l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 38px; }

.file-drop { border: 1.5px dashed var(--line-strong); border-radius: 11px; padding: 14px; background: #fbfcfe; transition: .15s; }
.file-drop:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.file-drop input[type=file] { width: 100%; font-size: 13.5px; }

.selected-chip { display: inline-flex; align-items: center; gap: 8px; background: var(--brand-soft); border: 1px solid #d3e4f7; color: var(--brand-ink); padding: 8px 14px; border-radius: 999px; font-weight: 700; font-size: 13.5px; }
.selected-chip a { color: var(--brand); font-size: 12.5px; text-decoration: none; font-weight: 600; }

/* ---------- Privacy / alerts ---------- */
.privasi { background: var(--warn-bg); border: 1px solid var(--warn-line); border-left: 5px solid var(--warn-line); border-radius: 12px; padding: 15px 17px; margin: 18px 0; font-size: 13.8px; color: #6b5410; display: flex; gap: 12px; }
.privasi .pic { font-size: 20px; flex: none; }
.privasi.small { padding: 12px 15px; font-size: 13px; }
.alert { display: flex; gap: 10px; align-items: flex-start; background: var(--bad-bg); border: 1px solid #f0b7af; color: #8f2c20; padding: 13px 15px; border-radius: 11px; margin-bottom: 18px; font-size: 14px; }
.alert.ok { background: var(--ok-bg); border-color: #b6e2c9; color: #0c5f3e; }

/* ---------- Badges ---------- */
.badge { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: .2px; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-arsitek { background: #e6eefb; color: #274b8a; }
.badge-admin { background: #efe8fa; color: #59389f; }

/* ============================================================
   TES — interaktif satu soal per layar
   ============================================================ */
.exam-top { position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.92); backdrop-filter: blur(8px); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.exam-top .row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.exam-top .who { font-size: 12.5px; color: var(--muted); }
.exam-top .who b { color: var(--ink); }
.timer { display: inline-flex; align-items: center; gap: 8px; font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--brand-ink); }
.timer .ic { font-size: 15px; }
.timer.warn { color: var(--warn); }
.timer.danger { color: var(--bad); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .55; } }
.progress { height: 7px; background: var(--line); border-radius: 999px; margin-top: 11px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--brand-grad); border-radius: 999px; transition: width .3s ease; }
.progress-cap { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }

.qcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); animation: rise .3s ease both; }
.qcard .qnum { font-size: 12.5px; font-weight: 700; color: var(--brand); letter-spacing: .3px; text-transform: uppercase; }
.qcard .qtext { font-size: 17px; line-height: 1.5; margin: 8px 0 20px; font-weight: 500; }
.opt {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px;
  border: 1.5px solid var(--line-strong); border-radius: 12px; margin-bottom: 11px;
  cursor: pointer; font-size: 15px; transition: .14s; background: #fff; user-select: none;
}
.opt:hover { border-color: var(--brand-2); background: var(--brand-soft); }
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .mark { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; display: grid; place-items: center; font-weight: 800; font-size: 12px; color: var(--muted); transition: .14s; margin-top: 1px; }
.opt.selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px var(--brand-soft); }
.opt.selected .mark { background: var(--brand); border-color: var(--brand); color: #fff; }
.opt .otext { flex: 1; }

.navigator { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.navigator button { width: 38px; height: 38px; border-radius: 10px; border: 1.5px solid var(--line-strong); background: #fff; font-weight: 700; font-size: 13px; color: var(--ink-soft); cursor: pointer; transition: .12s; font-family: inherit; }
.navigator button:hover { border-color: var(--brand-2); }
.navigator button.answered { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand-ink); }
.navigator button.current { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--brand-soft); }

/* ============================================================
   ADMIN
   ============================================================ */
.table-scroll { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 13.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { background: #f4f6fa; font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); white-space: nowrap; }
tbody tr:hover td { background: #f9fbfd; }
tbody tr:last-child td { border-bottom: 0; }
.thumb { width: 42px; height: 42px; border-radius: 9px; object-fit: cover; border: 1px solid var(--line); display: block; }
.thumb-lg { width: 128px; height: 128px; border-radius: 12px; object-fit: cover; border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.filterbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }

/* Admin stats */
.statgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; margin: 6px 0 4px; }
.stat { background: #f6f8fb; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 10px; text-align: center; }
.stat .num { font-size: 24px; font-weight: 800; color: var(--brand-ink); line-height: 1.1; }
.stat .lbl { font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.stat.ok { background: var(--ok-bg); } .stat.ok .num { color: var(--ok); }
.stat.bad { background: var(--bad-bg); } .stat.bad .num { color: var(--bad); }
.setbox { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; margin-top: 20px; padding: 16px; background: #f6f8fb; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.setform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.setform input[type=datetime-local] { padding: 9px 11px; border: 1.5px solid var(--line-strong); border-radius: 9px; font-size: 14px; font-family: inherit; }
@media (max-width: 900px) { .statgrid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .statgrid { grid-template-columns: repeat(2, 1fr); } }
.meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 26px; margin: 10px 0; }
.meta-grid div { font-size: 14px; }
.meta-grid b { color: var(--muted); font-weight: 600; }
.ans { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 11px; }
.ans.trap { border-color: var(--warn-line); background: #fffdf5; }
.ans .q { font-weight: 600; font-size: 14px; margin-bottom: 9px; }
.ans .opt2 { font-size: 13.5px; padding: 3px 0; }
.ans .opt2.correct { color: var(--ok); font-weight: 700; }
.ans .opt2.chosen-wrong { color: var(--bad); font-weight: 700; }
.tag { font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--warn-bg); color: #8a6d00; border: 1px solid var(--warn-line); margin-left: 6px; }
.kpi { display: inline-flex; align-items: baseline; gap: 3px; }
.kpi b { font-size: 15px; }

ul.rapi { padding-left: 20px; } ul.rapi li { margin: 7px 0; }

@media (max-width: 620px) {
  .tiles { grid-template-columns: 1fr 1fr; }
  .choice { grid-template-columns: 1fr; }
  .meta-grid { grid-template-columns: 1fr; }
  .card, .qcard { padding: 20px; }
  h1 { font-size: 23px; } .hero h1 { font-size: 26px; }
}
