/* =====================================================
   UKOM PERAWAT ONLINE - Stylesheet
   Tema: profesional medis (teal-biru), responsif
   ===================================================== */

:root {
  --primary: #0e7c86;
  --primary-dark: #0a5f66;
  --primary-light: #e6f4f5;
  --accent: #ff8a3d;
  --success: #22a06b;
  --danger: #d64545;
  --warning: #d99a2b;
  --dark: #14343b;
  --text: #33475b;
  --muted: #6b7f92;
  --bg: #f4f7f9;
  --card: #ffffff;
  --border: #dfe7ec;
  --radius: 12px;
  --shadow: 0 2px 10px rgba(20, 52, 59, .08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

.container { width: 100%; max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.main { flex: 1; padding-top: 24px; padding-bottom: 48px; }

/* ---------- Navbar ---------- */
.navbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 1px 4px rgba(20,52,59,.05);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-weight: 800; font-size: 1.15rem; color: var(--dark); display: flex; align-items: center; gap: 8px; }
.brand-icon {
  background: var(--primary); color: #fff; width: 30px; height: 30px;
  border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem;
}
.brand-logo { height: 40px; width: auto; display: block; }
.nav-links { display: flex; align-items: center; gap: 20px; }
.nav-links a { color: var(--text); font-weight: 600; font-size: .95rem; }
.nav-links a.active, .nav-links a:hover { color: var(--primary); }
.nav-toggle { display: none; background: none; border: 0; font-size: 1.5rem; color: var(--dark); cursor: pointer; }

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff;
    flex-direction: column; align-items: flex-start; padding: 16px 20px; gap: 14px;
    border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
  }
  .nav-links.open { display: flex; }
}

/* ---------- Hero ---------- */
/* Parallax ala davegamache.com/parallax/: gambar pola hexagon dipin lewat
   background-attachment:fixed, gradient brand di atasnya (translucent) supaya
   teks putih tetap kontras. Layout, tipografi, dan tombol di dalam .hero-wrap
   TIDAK disentuh -- hanya background section ini yang berubah. */
.hero {
  position: relative;
  background-image:
    linear-gradient(135deg, rgba(10,95,102,.92) 0%, rgba(14,124,134,.88) 55%, rgba(42,167,179,.82) 100%),
    url('../img/hero-bg.jpg');
  background-size: cover, cover;
  background-position: center, center;
  background-repeat: no-repeat, no-repeat;
  background-attachment: scroll, fixed;
  color: #fff;
  padding: 64px 0;
  border-radius: 0 0 28px 28px;
  overflow: hidden;
}
@media (max-width: 860px) {
  /* background-attachment: fixed kurang stabil di sebagian browser mobile */
  .hero { background-attachment: scroll, scroll; }
}
.hero-wrap { display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; }
.hero h1 { font-size: clamp(1.7rem, 4vw, 2.6rem); line-height: 1.25; margin-bottom: 16px; }
.hero p { font-size: 1.05rem; opacity: .92; margin-bottom: 28px; max-width: 540px; }
.hero .btn-white { background: #fff; color: var(--primary); }
.hero-stats { display: flex; gap: 28px; margin-top: 32px; }
.hero-stats .num { font-size: 1.7rem; font-weight: 800; }
.hero-stats .lbl { font-size: .85rem; opacity: .85; }

.hero-card {
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.25);
  border-radius: 16px; padding: 22px; backdrop-filter: blur(4px);
}
.hero-card h3 { margin-bottom: 10px; font-size: 1rem; }
.hero-card ul { list-style: none; }
.hero-card li { padding: 6px 0 6px 24px; position: relative; font-size: .95rem; }
.hero-card li::before { content: "✓"; position: absolute; left: 0; color: #a7f0d2; font-weight: 700; }

@media (max-width: 860px) {
  .hero-wrap { grid-template-columns: 1fr; }
  .hero-card { order: -1; }
}

/* ---------- Tombol ---------- */
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 10px; font-weight: 700;
  font-size: .95rem; border: 0; cursor: pointer; transition: .2s; text-align: center;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: #e67a26; color: #fff; }
.btn-outline { background: transparent; border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary-light); }
.btn-ghost { background: transparent; border: 2px solid rgba(255,255,255,.6); color: #fff; }
.btn-ghost:hover { background: rgba(255,255,255,.15); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { opacity: .9; color: #fff; }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 8px; }
.btn-lg { padding: 14px 32px; font-size: 1.05rem; }
.btn-block { display: block; width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* =====================================================
   IMMERSIVE THEME LAYER
   Hanya menambah pengalaman navigasi & animasi -- warna,
   tipografi, dan komponen yang sudah ada TIDAK diubah.
   Semua motion dinonaktifkan otomatis untuk pengguna yang
   mengaktifkan "prefers-reduced-motion" di sistemnya.
   Halaman ujian CBT (body.exam-body) sengaja dikecualikan
   dari semua elemen dekoratif ini -- fokus, stabil, cepat.
   ===================================================== */

:root {
  --ease-soft: cubic-bezier(.22, 1, .36, 1);
}

/* Scroll halus, kecuali user minta gerak minim ATAU sedang di halaman ujian CBT */
@media (prefers-reduced-motion: no-preference) {
  html:not(:has(body.exam-body)) { scroll-behavior: smooth; }
}

/* ---------- Background immersive (gambar kalem, bukan dekorasi ramai) ----------
   Dipasang sebagai layer tetap di belakang konten lewat pseudo-element body,
   supaya tidak perlu ubah markup di tiap halaman. Section yang sudah punya
   warna sendiri (hero, footer, dst) otomatis menutupinya -- gambar cuma
   terlihat samar di area kosong/putih, sesuai arahan "calm & minimalist". */
body:not(.exam-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background: url('../img/hero-bg.jpg') center / cover no-repeat fixed;
  opacity: .68;
}
body:not(.exam-body)::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(180deg, rgba(244,247,249,.5) 0%, rgba(244,247,249,.72) 100%);
}
@media (max-width: 760px) {
  /* background-attachment: fixed kurang stabil di sebagian browser mobile */
  body:not(.exam-body)::before { background-attachment: scroll; }
}

/* ---------- Reveal saat elemen masuk viewport ----------
   Class ini ditempel otomatis oleh app.js ke kartu/section yang sudah ada
   (tidak perlu ubah HTML tiap halaman). Hanya transform + opacity, ringan,
   dan otomatis nonaktif total kalau reduced-motion diaktifkan pengguna. */
@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .65s var(--ease-soft), transform .65s var(--ease-soft);
    will-change: opacity, transform;
  }
  .reveal.is-visible {
    opacity: 1;
    transform: none;
  }
}


.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px;
}
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Bagian ---------- */
.section { padding: 52px 0; }
.section-title { font-size: 1.6rem; color: var(--dark); margin-bottom: 8px; }
.section-sub { color: var(--muted); margin-bottom: 28px; }
.text-center { text-align: center; }

/* ---------- Fitur ---------- */
.feat { text-align: center; padding: 22px 14px; }
.feat .icon {
  width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 14px;
  background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.5rem; font-weight: 800;
}
.feat h3 { font-size: 1.02rem; color: var(--dark); margin-bottom: 6px; }
.feat p { font-size: .9rem; color: var(--muted); }

/* ---------- Kartu paket ---------- */
.paket-card { display: flex; flex-direction: column; }
.paket-card .harga { font-size: 1.6rem; font-weight: 800; color: var(--primary); margin: 6px 0 12px; }
.paket-card .harga small { font-size: .85rem; color: var(--muted); font-weight: 400; }
.paket-card .fitur-list { list-style: none; margin: 0 0 18px; flex: 1; }
.paket-card .fitur-list li { padding: 6px 0 6px 26px; position: relative; font-size: .92rem; }
.paket-card .fitur-list li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }
.paket-card.populer { border: 2px solid var(--primary); position: relative; }
.badge-populer {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: .75rem; font-weight: 700;
  padding: 4px 14px; border-radius: 20px; white-space: nowrap;
}
.paket-card .badge-status { margin-bottom: 10px; }

/* ---------- Badge ---------- */
.badge {
  display: inline-block; padding: 4px 12px; border-radius: 20px;
  font-size: .75rem; font-weight: 700;
}
.badge-green { background: #e3f7ee; color: var(--success); }
.badge-red { background: #fdecec; color: var(--danger); }
.badge-yellow { background: #fdf3e0; color: var(--warning); }
.badge-blue { background: var(--primary-light); color: var(--primary); }
.badge-gray { background: #eef1f4; color: var(--muted); }

/* ---------- Alert ---------- */
.alert { padding: 14px 18px; border-radius: 10px; margin-bottom: 18px; font-size: .95rem; }
.alert-success { background: #e3f7ee; color: var(--success); border: 1px solid #bfe9d4; }
.alert-danger { background: #fdecec; color: var(--danger); border: 1px solid #f5c6c6; }
.alert-info { background: var(--primary-light); color: var(--primary-dark); border: 1px solid #bfe3e7; }

/* ---------- Form ---------- */
.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; color: var(--dark); }
.form-control {
  width: 100%; padding: 11px 14px; border: 1.5px solid var(--border); border-radius: 10px;
  font-size: .95rem; background: #fff; color: var(--text); transition: border .2s;
}
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(14,124,134,.12); }
textarea.form-control { min-height: 110px; resize: vertical; }
.form-hint { font-size: .82rem; color: var(--muted); margin-top: 5px; }
.form-error { color: var(--danger); font-size: .85rem; margin-top: 4px; }

/* ---------- Tabel ---------- */
.table-wrap { overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table th { background: #f0f4f6; color: var(--dark); font-size: .85rem; text-transform: uppercase; letter-spacing: .4px; }
.table tr:hover td { background: #fafcfd; }

/* ---------- Statistik dashboard ---------- */
.stat { text-align: center; padding: 20px 12px; }
.stat .icon { font-size: 1.4rem; margin-bottom: 6px; }
.stat .num { font-size: 1.6rem; font-weight: 800; color: var(--dark); }
.stat .lbl { font-size: .85rem; color: var(--muted); }

/* ---------- Auth (login/daftar) ---------- */
.auth-wrap { max-width: 440px; margin: 40px auto; }
.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head .brand-icon { width: 44px; height: 44px; font-size: 1.6rem; margin-bottom: 10px; }
.auth-head .brand-logo { height: 56px; margin: 0 auto 14px; }

/* ---------- Ujian (CBT) ---------- */
.exam-body { background: #eef2f5; }
.exam-top {
  background: var(--dark); color: #fff; padding: 12px 0;
  position: sticky; top: 0; z-index: 40;
}
.exam-top .row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.exam-top .info { font-size: .9rem; opacity: .9; }
.timer {
  background: #fff; color: var(--danger); font-weight: 800; font-size: 1.1rem;
  padding: 6px 16px; border-radius: 8px; font-variant-numeric: tabular-nums;
}
.timer.low { animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }

.exam-layout { display: grid; grid-template-columns: 1fr 250px; gap: 20px; margin-top: 20px; align-items: start; }
@media (max-width: 800px) { .exam-layout { grid-template-columns: 1fr; } }

.soal-box { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 24px; box-shadow: var(--shadow); }
.soal-box .soal-nomor { color: var(--primary); font-weight: 800; font-size: .9rem; margin-bottom: 8px; }
.soal-box .soal-teks { font-size: 1.05rem; color: var(--dark); margin-bottom: 22px; }
.opsi { display: block; padding: 12px 14px; border: 1.5px solid var(--border); border-radius: 10px; margin-bottom: 10px; cursor: pointer; transition: .15s; font-size: .95rem; }
.opsi:hover { border-color: var(--primary); background: var(--primary-light); }
.opsi input { margin-right: 10px; accent-color: var(--primary); }

/* ---------- Gambar soal & opsi ---------- */
.soal-gambar { text-align: center; margin: 0 0 18px; }
.soal-gambar .gambar-wrap { display: inline-block; position: relative; }
.soal-gambar img {
    max-width: 100%; max-height: 300px; border-radius: 10px;
    border: 1px solid var(--border); cursor: zoom-in; transition: max-height .25s;
}
.soal-gambar img.kecil { max-height: 64px; }
.img-toggle {
    position: absolute; top: 8px; right: 8px; z-index: 2;
    background: rgba(20,52,59,.75); color: #fff; border: 0; cursor: pointer;
    font-size: .75rem; padding: 4px 10px; border-radius: 999px;
}
.img-toggle:hover { background: rgba(20,52,59,.95); }
.opsi-gambar {
    display: block; max-width: 160px; max-height: 120px; margin-top: 6px;
    border-radius: 8px; border: 1px solid var(--border); cursor: zoom-in;
}
.lightbox {
    position: fixed; inset: 0; background: rgba(0,0,0,.88); z-index: 9999;
    display: none; align-items: center; justify-content: center; cursor: zoom-out;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 94vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,.6); }
.lb-close {
    position: absolute; top: 14px; right: 22px; color: #fff; font-size: 2rem;
    line-height: 1; cursor: pointer; opacity: .9;
}
.lb-close:hover { opacity: 1; }
.opsi.dipilih { border-color: var(--primary); background: var(--primary-light); font-weight: 600; }

.palette { background: #fff; border-radius: var(--radius); border: 1px solid var(--border); padding: 16px; box-shadow: var(--shadow); }
.palette h4 { font-size: .9rem; color: var(--dark); margin-bottom: 10px; }
.palette .nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.palette .num-btn {
  height: 38px; border-radius: 8px; border: 1.5px solid var(--border); background: #fff;
  font-weight: 700; cursor: pointer; transition: .15s; font-size: .9rem; color: var(--text);
}
.palette .num-btn:hover { border-color: var(--primary); }
.palette .num-btn.dijawab { background: var(--success); border-color: var(--success); color: #fff; }
.palette .num-btn.ragu { background: var(--warning); border-color: var(--warning); color: #fff; }
.palette .num-btn.aktif { outline: 3px solid var(--primary); outline-offset: 1px; }
.legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; font-size: .78rem; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; border: 1px solid var(--border); }
.legend i.hijau { background: var(--success); border-color: var(--success); }
.legend i.kuning { background: var(--warning); border-color: var(--warning); }

.exam-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 20px; flex-wrap: wrap; }
.ragu-btn {
  border: 2px solid var(--warning); background: #fff; color: var(--warning); font-weight: 700;
  border-radius: 10px; padding: 11px 18px; cursor: pointer; font-size: .9rem;
}
.ragu-btn.on { background: var(--warning); color: #fff; }

/* ---------- Hasil ujian ---------- */
.hasil-banner { background: var(--dark); color: #fff; border-radius: var(--radius); padding: 28px; text-align: center; margin-bottom: 22px; }
.hasil-banner .nilai { font-size: 3rem; font-weight: 800; }
.hasil-banner .keterangan { margin-top: 6px; font-size: 1.05rem; }
.hasil-banner.lulus { background: linear-gradient(135deg, #158a5f, var(--success)); }
.hasil-banner.gagal { background: linear-gradient(135deg, #b33737, var(--danger)); }
.hasil-ringkas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
@media (max-width: 560px) { .hasil-ringkas { grid-template-columns: 1fr; } }
.hasil-ringkas .card { text-align: center; padding: 16px; }
.hasil-ringkas .num { font-size: 1.5rem; font-weight: 800; }
.hasil-ringkas .lbl { font-size: .85rem; color: var(--muted); }

.soal-review { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; margin-bottom: 16px; background: #fff; }
.soal-review.benar { border-left: 5px solid var(--success); }
.soal-review.salah { border-left: 5px solid var(--danger); }
.soal-review.kosong { border-left: 5px solid var(--warning); }
.jawab-opsi { padding: 8px 12px; border-radius: 8px; margin: 6px 0; font-size: .92rem; }
.jawab-opsi.kunci { background: #e3f7ee; color: var(--success); font-weight: 700; }
.jawab-opsi.salah { background: #fdecec; color: var(--danger); }
.pembahasan-box { background: var(--primary-light); border-radius: 10px; padding: 14px; margin-top: 12px; font-size: .92rem; color: var(--dark); }
.pembahasan-box b { color: var(--primary-dark); }

/* ---------- Cetak hasil ---------- */
@media print {
    body { background: #fff; }
    .navbar, .footer, .btn, .flex-between .flex, .exam-top { display: none !important; }
    .container, .main { max-width: 100%; padding: 0; margin: 0; }
    .card, .soal-review, .hasil-banner, .pembahasan-box { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
    .hasil-banner { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .jawab-opsi { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Berita ---------- */
.berita-section { background: var(--dark); border-top: 1px solid var(--border); }
.berita-section .section-title { color: #fff; }
.berita-section .btn-outline { border-color: #fff; color: #fff; }
.berita-section .btn-outline:hover { background: rgba(255,255,255,.12); color: #fff; }
.berita-section .berita-card { background: #fff; border: 1px solid transparent; }
.berita-section .berita-card h3 a { color: var(--dark); }
.berita-section .berita-card h3 a:hover { color: var(--primary); }
.berita-section .berita-card .tanggal { color: var(--muted); }
.berita-section .berita-card p { color: var(--text); opacity: .85; }
.berita-card { display: flex; flex-direction: column; }
.berita-card h3 { font-size: 1.05rem; margin-bottom: 6px; }
.berita-card .tanggal { font-size: .8rem; color: var(--muted); margin-bottom: 10px; }
.berita-card p { font-size: .9rem; color: var(--muted); flex: 1; }
.berita-full h2 { color: var(--dark); margin-bottom: 8px; }
.berita-full .tanggal { color: var(--muted); margin-bottom: 18px; }
.berita-full p { margin-bottom: 14px; }

/* ---------- Invoice ---------- */
.invoice-box { max-width: 620px; margin: 0 auto; }
.invoice-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px dashed var(--border); padding-bottom: 16px; margin-bottom: 18px; }
.invoice-nomor { font-size: 1.1rem; font-weight: 800; color: var(--dark); }
.invoice-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: .95rem; border-bottom: 1px solid #f0f3f5; }
.invoice-row .k { color: var(--muted); }
.invoice-row.total { font-weight: 800; font-size: 1.1rem; color: var(--dark); border-bottom: 0; }
.rekening { background: var(--primary-light); border-radius: 10px; padding: 14px; margin: 14px 0; }
.rekening p { font-size: .92rem; }

/* ---------- Footer ---------- */
.footer { background: var(--dark); color: #9db4c2; padding: 26px 0; text-align: center; font-size: .88rem; margin-top: auto; }

/* ---------- Misc ---------- */
.mt-2 { margin-top: 10px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 28px; }
.mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 10px; } .mb-3 { margin-bottom: 18px; } .mb-4 { margin-bottom: 28px; }
.muted { color: var(--muted); }
.flex { display: flex; gap: 10px; align-items: center; }
.flex-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.page-title { font-size: 1.5rem; color: var(--dark); margin-bottom: 6px; }
.page-sub { color: var(--muted); margin-bottom: 24px; }
.img-fit { max-width: 100%; border-radius: 10px; }
.divider { height: 1px; background: var(--border); margin: 18px 0; }
/* =====================================================
   FRONTEND DESIGN POLISH — v6
   UI/UX pass: hierarchy, readability, touch targets,
   responsive behavior, focus states, and exam clarity.
   ===================================================== */
:root {
  --primary: #0b7f83;
  --primary-dark: #075d61;
  --primary-light: #e8f7f6;
  --accent: #f28a45;
  --dark: #12343b;
  --text: #334b5c;
  --muted: #6b7f8c;
  --bg: #f5f8fa;
  --card: rgba(255,255,255,.96);
  --border: #dce7eb;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(18,52,59,.07);
  --shadow-hover: 0 16px 38px rgba(18,52,59,.12);
}

html { scroll-padding-top: 84px; }
body { background: var(--bg); color: var(--text); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid rgba(11,127,131,.28); outline-offset: 3px; }

.container { max-width: 1160px; }
.main { padding-top: 30px; }

.navbar { backdrop-filter: blur(14px); background: rgba(255,255,255,.94); }
.nav-wrap { min-height: 68px; height: auto; }
.brand-logo { height: 42px; }
.nav-links { gap: 8px; }
.nav-links > a:not(.btn) { padding: 9px 11px; border-radius: 9px; }
.nav-links > a:not(.btn):hover, .nav-links > a.active { background: var(--primary-light); }

.btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-shadow: 0 1px 1px rgba(0,0,0,.02); }
.btn-primary, .btn-accent, .btn-danger { box-shadow: 0 7px 18px rgba(11,127,131,.15); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-outline { border-width: 1.5px; }

.card { border-radius: 16px; box-shadow: var(--shadow); transition: box-shadow .2s ease, transform .2s ease, border-color .2s ease; }
.card:hover { box-shadow: var(--shadow-hover); }
.feat:hover, .paket-card:hover { transform: translateY(-3px); }
.section { padding: 64px 0; }
.section-title { letter-spacing: -.02em; }
.section-sub { max-width: 680px; margin-left: auto; margin-right: auto; }

.hero { padding: 78px 0 72px; border-radius: 0 0 34px 34px; }
.hero h1 { letter-spacing: -.035em; font-weight: 800; }
.hero p { line-height: 1.75; }
.hero-card { box-shadow: 0 18px 50px rgba(0,0,0,.12); backdrop-filter: blur(10px); }
.hero-stats { gap: 34px; }
.hero-stats > div { min-width: 78px; }

.form-control { min-height: 46px; border-radius: 12px; }
.form-control:focus { box-shadow: 0 0 0 4px rgba(11,127,131,.11); }

/* ---------- Dashboard / content hierarchy ---------- */
.page-title { letter-spacing: -.025em; font-size: clamp(1.55rem, 3vw, 2rem); }
.page-sub { color: var(--muted); margin-top: 4px; margin-bottom: 24px; }
.stat { min-height: 132px; display: flex; flex-direction: column; justify-content: center; }
.stat .num { letter-spacing: -.025em; }
.table-wrap { border-radius: 16px; }
.table th { position: sticky; top: 0; z-index: 1; }
.table td, .table th { padding: 13px 14px; }

/* ---------- Auth ---------- */
.auth-wrap { max-width: 460px; margin: 56px auto; }
.auth-wrap > .card { padding: 30px; }
.auth-head { margin-bottom: 28px; }

/* ---------- Exam: distraction-free CBT ---------- */
.exam-body { background: #eef3f5; }
.exam-top { background: rgba(18,52,59,.98); box-shadow: 0 5px 20px rgba(18,52,59,.15); }
.exam-top .container { max-width: 1240px; }
.exam-top .row { min-height: 48px; }
.exam-top .info { color: #cfe0e4; }
.timer { min-width: 94px; text-align: center; border: 2px solid rgba(255,255,255,.14); border-radius: 10px; }
.save-status { min-width: 78px; color: #d6e8eb; font-size: .72rem; text-align: center; white-space: nowrap; }
.opsi:focus-within { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,127,131,.12); }
.opsi.dipilih span { color: var(--dark); }
.num-btn:focus-visible, .btn:focus-visible, .ragu-btn:focus-visible, .opsi:focus-within { outline: 3px solid rgba(242,138,69,.45); outline-offset: 2px; }
.timer.low { background: #fff3f3; border-color: rgba(214,69,69,.35); }
.exam-layout { grid-template-columns: minmax(0, 1fr) 270px; gap: 24px; max-width: 1240px; margin-left: auto; margin-right: auto; }
.palette { position: sticky; top: 92px; }
.soal-box { padding: 30px; border-radius: 18px; box-shadow: 0 8px 28px rgba(18,52,59,.08); }
.soal-box .soal-nomor { display: inline-flex; align-items: center; min-height: 30px; padding: 4px 10px; border-radius: 8px; background: var(--primary-light); }
.soal-box .soal-teks { font-size: 1.08rem; line-height: 1.75; }
.opsi { position: relative; display: flex; align-items: flex-start; gap: 11px; min-height: 54px; padding: 15px 16px; border-radius: 12px; background: #fff; }
.opsi input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; }
.opsi.dipilih { border-color: var(--primary); background: #f0fbfa; box-shadow: 0 0 0 3px rgba(11,127,131,.08); }
.opsi:hover { transform: translateX(2px); }
.exam-nav { align-items: center; }
.ragu-btn { min-height: 44px; }
.palette { background: #fff; border: 1px solid var(--border); border-radius: 16px; padding: 18px; box-shadow: var(--shadow); }
.palette h4 { margin-bottom: 14px; color: var(--dark); }
.num-btn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: #fff; font-weight: 700; cursor: pointer; transition: .15s; }
.num-btn:hover { border-color: var(--primary); transform: translateY(-1px); }
.num-btn.aktif { box-shadow: 0 0 0 3px rgba(11,127,131,.12); border-color: var(--primary); }
.exam-summary { padding-bottom: 15px; margin-bottom: 15px; border-bottom: 1px solid var(--border); }
.exam-summary-title { color: var(--dark); font-size: .9rem; font-weight: 800; margin-bottom: 10px; }
.exam-summary-total, .exam-summary-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: .8rem; margin-top: 8px; }
.exam-summary-total { color: var(--muted); }
.exam-summary-total strong, .exam-summary-item strong { color: var(--dark); font-variant-numeric: tabular-nums; }
.exam-summary-item span { display: inline-flex; align-items: center; gap: 6px; }
.summary-dot { width: 10px; height: 10px; border-radius: 999px; display: inline-block; }
.summary-dot.answered { background: var(--success); }
.summary-dot.unanswered { background: #fff; border: 1px solid var(--border); }
.summary-dot.doubtful { background: var(--warning); }
.soal-box { position: relative; }
.exam-tool-panels { position: absolute; z-index: 30; left: 20px; bottom: 76px; width: min(340px, calc(100% - 40px)); }
.exam-tool-panel { overflow: hidden; border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: 0 14px 36px rgba(18,52,59,.22); }
.exam-tool-heading { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 8px 13px; background: var(--dark); color: #fff; }
.exam-tool-toggle { margin-left: auto; padding: 5px 10px; border: 1px solid rgba(255,255,255,.45); border-radius: 8px; background: transparent; color: #fff; cursor: pointer; font-size: .78rem; font-weight: 700; }
.exam-tool-toggle:hover { background: rgba(255,255,255,.12); }
.exam-tool-state { font-size: .76rem; font-weight: 600; }
.exam-tool-content { padding: 12px; }
.exam-tool-panel.is-minimized { display: none; }
.calculator-display { width: 100%; min-height: 48px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: #f7fafb; color: var(--dark); text-align: right; font-size: 1.25rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.calculator-keys { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin-top: 9px; }
.calculator-keys button { min-height: 40px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--dark); cursor: pointer; font-weight: 700; }
.calculator-keys button:hover { background: var(--primary-light); border-color: var(--primary); }
.calculator-keys .calculator-equals { background: var(--primary); border-color: var(--primary); color: #fff; }
.lab-note { margin: 0 0 9px; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.lab-table-wrap { max-height: 210px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; }
.lab-table { width: 100%; border-collapse: collapse; font-size: .72rem; }
.lab-table th, .lab-table td { padding: 7px 6px; border-bottom: 1px solid var(--border); text-align: left; white-space: nowrap; }
.lab-table th { position: sticky; top: 0; background: #edf7f7; color: var(--dark); }
.lab-table tr:last-child td { border-bottom: 0; }

/* Mobile exam: SOAL diprioritaskan penuh lebar, ringkasan di bawah kompak */
@media (max-width: 800px) {
  .exam-top { padding: 9px 0; }
  .exam-top .row { align-items: stretch; }
  .exam-top .row > div:first-child { flex: 1 1 100%; }
  .exam-top .row > .flex { width: 100%; justify-content: space-between; }
  .exam-layout { display: flex !important; flex-direction: column !important; grid-template-columns: 1fr !important; margin-top: 14px; gap: 16px; max-width: 100%; }
  .exam-layout > div:first-child { order: 1; width: 100%; max-width: 100%; }
  .soal-box { padding: 20px; width: 100%; order: 1; }
  .palette { position: static !important; order: 2; width: 100%; max-width: 100%; padding: 14px; display: block; }
  .exam-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-bottom: 10px; margin-bottom: 10px; }
  .exam-summary-title { grid-column: 1 / -1; margin-bottom: 2px; font-size: .85rem; }
  .exam-summary-total, .exam-summary-item { margin-top: 0; font-size: .75rem; flex-direction: column; align-items: flex-start; gap: 2px; }
  .palette h4 { font-size: .85rem; margin-bottom: 8px; }
  .palette .nums { grid-template-columns: repeat(6, minmax(0,1fr)); gap: 6px; }
  .palette .num-btn { height: 36px; font-size: .85rem; }
  .legend { font-size: .72rem; gap: 8px; }
}
@media (max-width: 560px) {
  .container { padding-left: 15px; padding-right: 15px; }
  .main { padding-top: 20px; }
  .section { padding: 46px 0; }
  .hero { padding: 48px 0; border-radius: 0 0 24px 24px; }
  .hero-stats { gap: 16px; flex-wrap: wrap; }
  .hero-stats > div { flex: 1 1 30%; }
  .hero-stats .num { font-size: 1.4rem; }
  .auth-wrap { margin: 28px auto; }
  .auth-wrap > .card { padding: 22px; }
  .soal-box { padding: 17px; }
  .soal-box .soal-teks { font-size: 1rem; }
  .opsi { padding: 13px 12px; }
  .exam-nav { gap: 8px; }
  .exam-nav .flex { width: 100%; gap: 6px; flex-wrap: nowrap; }
  .exam-nav .flex .btn { flex: 1 1 0; min-width: 0; padding: 10px 4px; font-size: .74rem; line-height: 1.25; white-space: normal; text-align: center; }
  .exam-nav .flex .btn.exam-nav-tool { padding: 10px 4px; }
  .exam-tool-panels { left: 12px; bottom: 118px; width: calc(100% - 24px); }
  .ragu-btn { width: 100%; }
  .nums { grid-template-columns: repeat(6, minmax(0,1fr)); }
  .num-btn { width: 100%; }
}

/* === Password eye toggle === */
.pw-wrap { position: relative; }
.pw-wrap .form-control { padding-right: 42px; }
.pw-toggle { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: none; border: 0; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--muted); width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 6px; }
.pw-toggle:hover { background: var(--primary-light); color: var(--primary); }

/* === FIX HP: Calculator & Hasil Lab tidak kacau === */
@media (max-width: 800px) {
  .exam-tool-panel { position: fixed; left: 12px; right: 12px; bottom: 12px; width: auto; max-height: 62vh; overflow-y: auto; }
  .lab-table th, .lab-table td { white-space: normal; word-break: break-word; }
}
@media (max-width: 560px) {
  .exam-tool-panel { position: fixed; left: 10px; right: 10px; bottom: 10px; width: auto; z-index: 45; }
  .exam-tool-content { max-height: 48vh; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .calculator-keys { gap: 6px; }
  .calculator-keys button { min-height: 42px; font-size: .95rem; }
  .calculator-display { font-size: 1.15rem; }
  .lab-table { font-size: .68rem; }
  .lab-table th, .lab-table td { padding: 6px 5px; white-space: normal; }
  .lab-table-wrap { max-height: 46vh; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
