:root{
  --bg:#f4f7fb;
  --surface:#ffffff;
  --surface2:#f9fbff;
  --text:#0f172a;
  --muted:#64748b;
  --line:#e6eef7;

  --brand:#1d4ed8;
  --brand2:#2563eb;
  --accent:#0ea5e9;
  --danger:#dc2626;

  --shadow: 0 10px 30px rgba(15,23,42,.08);
  --radius:16px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial;
  background: linear-gradient(180deg,#eef5ff 0%,var(--bg) 40%,var(--bg) 100%);
  color:var(--text);
}

a{text-decoration:none;color:inherit}
.wrap{max-width:1100px;margin:0 auto;padding:18px}

/* =====================================================
   NAVBAR (CLEAN) - Desktop + Mobile details
   ===================================================== */

header.nav{
  position:sticky;
  top:0;
  z-index:9999;
  background:rgba(255,255,255,.92);
  backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line);
}

.nav-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* brand: cegah logo/teks bikin navbar melebar */
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  font-weight:800;
  min-width:0;
  flex:1 1 auto;
}

.logo-img{
  height:42px;
  width:42px;
  object-fit:contain;
  flex:0 0 auto;
}

.brand-text{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:2px;
}

.brand-title{
  font-weight:900;
  font-size:16px;
  line-height:1.15;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:520px;
}

.brand-text small{
  color:var(--muted);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  max-width:520px;
}

/* desktop nav */
.navlinks{
  display:flex;
  gap:6px;
  flex:0 0 auto;
}

.navlinks a{
  padding:9px 12px;
  border-radius:12px;
  font-size:14px;
  font-weight:700;
}

.navlinks a:hover{
  background:var(--surface2);
}

/* =====================================================
   BUTTON
   ===================================================== */

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  padding:11px 14px;
  border-radius:14px;
  border:1px solid var(--line);
  font-weight:800;
  cursor:pointer;
  transition:.15s ease;
}

.btn:hover{
  transform:translateY(-1px);
  box-shadow:0 10px 22px rgba(15,23,42,.08);
}

.btn-primary{
  border:0;
  color:#fff;
  background:linear-gradient(135deg,var(--brand),var(--accent));
}

.btn-danger{
  border:0;
  color:#fff;
  background:var(--danger);
}

.btn-ghost{
  background:#fff;
}

/* =====================================================
   CARD
   ===================================================== */

.card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:var(--radius);
  padding:18px;
  margin:14px 0;
  box-shadow:var(--shadow);
}

/* =====================================================
   FORM
   ===================================================== */

.form{display:grid;gap:12px}

label{
  font-size:13px;
  font-weight:800;
  color:rgba(15,23,42,.85);
}

input,select,textarea{
  width:100%;
  padding:12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
}

input:focus,select:focus,textarea:focus{
  border-color:rgba(29,78,216,.6);
  box-shadow:0 0 0 3px rgba(29,78,216,.12);
  outline:none;
}

/* =====================================================
   TABLE
   ===================================================== */

.table{
  width:100%;
  border-collapse:collapse;
  border:1px solid var(--line);
  border-radius:16px;
  overflow:hidden;
}

.table th,.table td{
  padding:10px 12px;
  border-bottom:1px solid var(--line);
  font-size:14px;
}

.table th{
  background:#f1f6ff;
  font-weight:900;
}

.table tr:hover td{
  background:#fbfdff;
}

/* =====================================================
   BADGE
   ===================================================== */

.badge{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 10px;
  border-radius:999px;
  background:#f1f6ff;
  font-weight:800;
  font-size:12px;
}

.badge-dot{
  width:8px;height:8px;
  border-radius:999px;
  background:var(--brand);
}

/* =====================================================
   MOBILE NAV via <details class="mnav">
   ===================================================== */

.mnav{ position: relative; flex:0 0 auto; }

.mnav > summary{
  list-style:none;
  cursor:pointer;
  user-select:none;
  width:42px;
  height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  border:1px solid var(--line);
  background:#fff;
  font-size:20px;
  font-weight:900;
}
.mnav > summary::-webkit-details-marker{ display:none; }

.mnav .mobile-nav{
  display:none;
  position:absolute;
  right:0;
  top:calc(100% + 10px);
  width:min(420px, calc(100vw - 32px));
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  box-shadow:0 12px 30px rgba(0,0,0,.12);
  padding:10px;
  z-index:9999;
}
.mnav[open] .mobile-nav{ display:block; }

.mnav .mobile-nav a{
  display:block;
  padding:10px 12px;
  border-radius:12px;
  text-decoration:none;
  color:inherit;
  font-weight:800;
}
.mnav .mobile-nav a:hover{ background: var(--surface2); }

/* responsif nav */
@media (max-width:900px){
  .desktop-nav{ display:none !important; }
  .mnav{ display:block; }
}
@media (min-width:901px){
  .mnav{ display:none; }
}

/* =====================================================
   MAPEL X - PILIHAN KOTAK (SINGLE VERSION)
   ===================================================== */

.pick-grid{
  display:grid;
  gap:12px;
}
@media(min-width:780px){
  .pick-grid{ grid-template-columns: repeat(2,1fr); }
}

.pick-option{
  display:block;
  cursor:pointer;
  position:relative;
}

/* RADIO BENAR-BENAR DIHILANGKAN */
.pick-radio{
  position:absolute !important;
  opacity:0 !important;
  width:1px !important;
  height:1px !important;
  margin:0 !important;
  padding:0 !important;
  pointer-events:none !important;
  appearance:none !important;
  -webkit-appearance:none !important;
  -moz-appearance:none !important;
}

/* KARTU */
.pick-card{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  border:1px solid var(--line);
  border-radius:16px;
  padding:14px;
  background:#fff;
  box-shadow:var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pick-card:hover{
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15,23,42,.10);
}

.pick-left{min-width:0}
.pick-title{font-weight:900;font-size:16px}
.pick-sub{margin-top:4px;font-size:13px;color:var(--muted)}
.pick-badge{
  font-weight:900;
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background:#f1f6ff;
  white-space:nowrap;
}

/* AKTIF */
.pick-radio:checked + .pick-card{
  border-color: rgba(29,78,216,.65);
  box-shadow: 0 0 0 4px rgba(29,78,216,.12), var(--shadow);
  background: linear-gradient(135deg, rgba(29,78,216,.06), rgba(14,165,233,.08)), #fff;
}

/* DISABLED */
.pick-radio:disabled + .pick-card{
  opacity:.55;
  cursor:not-allowed;
  transform:none;
  box-shadow:var(--shadow);
}

/* =====================================================
   PSIKOTES - PILIHAN KOTAK (NO BULAT RADIO)
   Berlaku untuk:
   - .opt (opsi TPA)
   - .psiko-options label (opsi lain)
   ===================================================== */

/* sembunyikan radio asli */
.opt input[type="radio"],
.psiko-options input[type="radio"]{
  position:absolute;
  opacity:0;
  width:1px;
  height:1px;
  pointer-events:none;
}

/* kotak opsi */
.opt,
.psiko-options label{
  position:relative;
  display:flex;
  align-items:flex-start;
  gap:12px;
  padding:14px 12px;
  border:1px solid var(--line);
  border-radius:14px;
  background:#fff;
  cursor:pointer;
  user-select:none;
  -webkit-tap-highlight-color: transparent;
}

/* indikator kotak kecil */
.opt::before,
.psiko-options label::before{
  content:"";
  width:18px;
  height:18px;
  border-radius:6px;
  border:2px solid rgba(15,23,42,.25);
  background:#fff;
  flex:0 0 auto;
  margin-top:2px;
}

/* highlight terpilih (modern browser) */
.opt:has(input:checked),
.psiko-options label:has(input:checked){
  border-color: rgba(29,78,216,.7);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
  background: linear-gradient(135deg,rgba(29,78,216,.06),rgba(14,165,233,.08));
}
.opt:has(input:checked)::before,
.psiko-options label:has(input:checked)::before{
  border-color: var(--brand);
  background: linear-gradient(135deg,var(--brand),var(--accent));
}

/* fallback jika :has() tidak support (pakai class .is-checked dari JS) */
.opt.is-checked,
.psiko-options label.is-checked{
  border-color: rgba(29,78,216,.7);
  box-shadow: 0 0 0 3px rgba(29,78,216,.12);
  background: linear-gradient(135deg,rgba(29,78,216,.06),rgba(14,165,233,.08));
}
.opt.is-checked::before,
.psiko-options label.is-checked::before{
  border-color: var(--brand);
  background: linear-gradient(135deg,var(--brand),var(--accent));
}

/* util psikotes */
.psiko-card{
  background:#fff;
  border:1px solid var(--line);
  border-radius:16px;
  padding:18px;
  margin-bottom:16px;
}
.psiko-question{font-weight:900;margin-bottom:12px}
.psiko-options{display:flex;flex-direction:column;gap:10px}

/* HP tweaks */
@media (max-width:600px){
  .wrap{padding:14px}
  .brand-title, .brand-text small{max-width:240px}

  .opt,
  .psiko-options label{
    padding:16px 14px;
  }
  .opt::before,
  .psiko-options label::before{
    width:20px;
    height:20px;
  }
}