/* =========================================================
   TAX RISK SCORE — Navy & Emas
   Responsif: desktop, tablet, mobile (iOS/Android)
   ========================================================= */

:root {
  color-scheme: light dark;

  /* Warna merek — tetap sama di kedua mode (panel gelap + teks emas/putih) */
  --navy: #0d2137;
  --navy-2: #14304e;
  --navy-3: #1d4266;
  --gold: #c9a24b;
  --gold-2: #e3c987;

  /* Permukaan & teks — nilainya diganti otomatis saat mode gelap aktif */
  --gold-soft: #f6efdd;
  --gold-soft-line: #eaddba;
  --on-gold-soft: #0d2137;
  --ink: #22303e;
  --muted: #5a6b7d;
  --heading: #0d2137;
  --line: #e3e8ee;
  --bg: #f4f6f9;
  --card: #ffffff;
  --surface-1: #fbfcfe;
  --surface-2: #eef1f5;
  --surface-3: #e8ecf1;
  --track: #e6eaef;
  --hover-warm: #fffdf6;
  --btn-navy-bg: #0d2137;
  --btn-navy-hover: #1d4266;
  --fade-from: rgba(255, 255, 255, 0);
  --fade-to: #ffffff;
  --overlay: rgba(13, 33, 55, .55);

  /* Status */
  --green: #1e8e5a;
  --yellow: #c9930a;
  --red: #c0392b;
  --darkred: #7a1f14;

  --radius: 16px;
  --shadow: 0 8px 28px rgba(13, 33, 55, 0.10);
  --font: 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
}

/* =========================================================
   MODE GELAP — mengikuti setelan perangkat (Android/iOS/desktop).
   Hanya nilai warna yang diganti, struktur halaman tetap sama.
   ========================================================= */
@media (prefers-color-scheme: dark) {
  :root {
    --gold-soft: #2b2415;
    --gold-soft-line: #4a3d21;
    --on-gold-soft: #f0dca8;
    --ink: #e6edf5;
    --muted: #a8b8c9;
    --heading: #f0f5fa;
    --line: #27405a;
    --bg: #0a121c;
    --card: #121f2f;
    --surface-1: #16263a;
    --surface-2: #1b2e45;
    --surface-3: #21374f;
    --track: #26405a;
    --hover-warm: #1a2c40;
    --btn-navy-bg: #24507d;
    --btn-navy-hover: #2f639a;
    --fade-from: rgba(18, 31, 47, 0);
    --fade-to: #121f2f;
    --overlay: rgba(3, 8, 14, .72);
    --shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  }
  /* Bidang gambar laporan tetap "kertas putih" agar grafik terbaca */
  .paper { background: #ffffff; border-radius: 12px; padding: 12px; }
}

* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  min-height: 100vh;
  min-height: 100dvh;
}

.wrap { max-width: 760px; margin: 0 auto; padding: 0 20px 60px; }
.wrap-lg { max-width: 1180px; margin: 0 auto; padding: 0 20px 60px; }

/* ---------- Header ---------- */
.topbar {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 50;
  box-shadow: 0 2px 12px rgba(13,33,55,.25);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: .4px; }
.brand .logo {
  width: 36px; height: 36px; border-radius: 9px;
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: var(--navy); display: grid; place-items: center;
  font-weight: 800; font-size: 15px; flex: none;
}
.brand small { display: block; font-weight: 400; font-size: 11px; opacity: .75; letter-spacing: 1.2px; }
.topbar .right { font-size: 12px; opacity: .8; }

/* ---------- Hero / landing ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(900px 460px at 85% -10%, rgba(201,162,75,.28), transparent 60%),
    radial-gradient(700px 380px at 8% 110%, rgba(61,110,165,.35), transparent 60%),
    radial-gradient(520px 300px at 50% 118%, rgba(201,162,75,.14), transparent 65%),
    linear-gradient(155deg, #081525 0%, var(--navy) 38%, var(--navy-2) 68%, var(--navy-3) 100%);
  color: #fff;
  padding: 64px 20px 84px;
  text-align: center;
}
/* Pola garis halus + cincin emas dekoratif */
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,.028) 0 1px, transparent 1px 90px),
    repeating-linear-gradient(-25deg, rgba(201,162,75,.03) 0 1px, transparent 1px 130px);
}
.hero::after {
  content: ""; position: absolute; pointer-events: none;
  width: 620px; height: 620px; right: -180px; top: -260px;
  border: 1.5px solid rgba(201,162,75,.28); border-radius: 50%;
  box-shadow: 0 0 0 60px rgba(201,162,75,.05), 0 0 0 130px rgba(201,162,75,.03), 0 0 120px rgba(201,162,75,.15) inset;
  animation: heroFloat 9s ease-in-out infinite alternate;
}
@keyframes heroFloat { from { transform: translateY(0) } to { transform: translateY(22px) } }
.hero > * { position: relative; z-index: 1; }
/* Judul memakai warna solid (bukan gradasi pada huruf), karena
   mesin mode-gelap otomatis di Chrome Android membalik warna
   gradasi sehingga tulisannya menjadi gelap dan sulit dibaca. */
.hero .hero-title {
  font-size: clamp(42px, 7.5vw, 66px); font-weight: 900; letter-spacing: -1px;
  line-height: 1.05; margin-bottom: 14px;
  color: #f4e4bb;
  text-shadow: 0 3px 18px rgba(0,0,0,.45);
}
.hero .eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 3px; font-weight: 700;
  color: var(--gold-2); text-transform: uppercase; margin-bottom: 22px;
  border: 1px solid rgba(201,162,75,.5); padding: 7px 18px; border-radius: 100px;
  background: rgba(201,162,75,.08); backdrop-filter: blur(4px);
}
.hero .hero-tagline {
  font-size: clamp(24px, 3.8vw, 38px); line-height: 1.22; margin-bottom: 18px;
  font-weight: 800; letter-spacing: -.4px; color: #fff;
  text-shadow: 0 3px 26px rgba(0,0,0,.35);
}
.hero .hero-tagline .em { color: #efd79f; }
.hero p.lead { max-width: 640px; margin: 0 auto 30px; font-size: clamp(15px, 2.2vw, 17.5px); opacity: .93; line-height: 1.75; }
.hero .meta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 34px; font-size: 14.5px; }
.hero .meta span {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  padding: 9px 16px; border-radius: 100px; backdrop-filter: blur(6px);
}

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font); font-size: 16px; font-weight: 700;
  padding: 15px 32px; border-radius: 100px; border: none; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background .15s;
  text-decoration: none; min-height: 52px;
}
.btn-gold {
  background: linear-gradient(135deg, var(--gold) 0%, var(--gold-2) 100%);
  color: var(--navy); box-shadow: 0 6px 22px rgba(201,162,75,.4);
}
.btn-gold:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(201,162,75,.5); }
.btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.45); }
.btn-outline:hover { border-color: var(--gold-2); color: var(--gold-2); }
.btn-navy { background: var(--btn-navy-bg); color: #fff; }
.btn-navy:hover { background: var(--btn-navy-hover); }
.btn-ghost { background: var(--surface-2); color: var(--heading); }
.btn-sm { font-size: 13px; padding: 9px 16px; min-height: 38px; border-radius: 9px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.btn-wa { background: #1fa855; color: #fff; }
.btn-email { background: var(--navy-3); color: #fff; }

/* ---------- Kartu penjelasan ---------- */
.section { padding: 44px 0 0; }
.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 36px; }
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 24px; border: 1px solid var(--line);
}
.card .ic {
  width: 44px; height: 44px; border-radius: 12px; background: var(--gold-soft);
  display: grid; place-items: center; font-size: 21px; margin-bottom: 14px;
}
.card h3 { font-size: 16px; color: var(--heading); margin-bottom: 8px; }
.card p { font-size: 15.5px; color: var(--muted); }

.explain { margin-top: 40px; }
.explain h2, .h2 { font-size: clamp(21px, 3vw, 27px); color: var(--heading); margin-bottom: 14px; font-weight: 800; }
.explain p { margin-bottom: 13px; font-size: 15.5px; }
.explain .quote {
  border-left: 4px solid var(--gold); background: var(--gold-soft);
  padding: 16px 20px; border-radius: 0 12px 12px 0; margin: 18px 0; font-size: 15.5px;
}

/* ---------- Form identitas ---------- */
.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  border: 1px solid var(--line); padding: 32px 28px; margin-top: 28px;
}
.panel h2 { color: var(--heading); font-size: 22px; margin-bottom: 6px; }
.panel .sub { color: var(--muted); font-size: 15px; margin-bottom: 22px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 700; color: var(--heading); margin-bottom: 7px; }
.field label .req { color: var(--red); }
.field input {
  width: 100%; font-family: var(--font); font-size: 16px;
  padding: 14px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--surface-1); color: var(--ink); transition: border .15s, box-shadow .15s;
  min-height: 52px;
}
.field input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 4px rgba(201,162,75,.15); }
.field .hint { font-size: 13.5px; color: var(--muted); margin-top: 5px; }
.field.error input { border-color: var(--red); }
.field .err-msg { display: none; color: var(--red); font-size: 13.5px; margin-top: 5px; }
.field.error .err-msg { display: block; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--muted); margin: 18px 0 22px; }
.consent input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--gold); }

/* ---------- Kuis ---------- */
.quiz-shell { max-width: 680px; margin: 0 auto; padding: 26px 20px 80px; }
.progress-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; font-size: 14px; color: var(--muted); font-weight: 600; }
.progress-row .step { color: var(--heading); }
.pbar { height: 8px; background: var(--track); border-radius: 100px; overflow: hidden; margin-bottom: 30px; }
.pbar > div {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-2) 100%);
  border-radius: 100px; transition: width .4s cubic-bezier(.4,0,.2,1);
}
.q-bagian {
  display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--gold); background: var(--gold-soft);
  padding: 5px 12px; border-radius: 100px; margin-bottom: 14px;
}
.q-teks { font-size: clamp(19px, 3vw, 24px); font-weight: 800; color: var(--heading); line-height: 1.4; margin-bottom: 8px; }
.q-catatan { font-size: 14.5px; color: var(--muted); margin-bottom: 20px; font-style: italic; }
.opsi-list { display: grid; gap: 12px; margin-top: 20px; }
.opsi {
  display: flex; align-items: center; gap: 14px; text-align: left; width: 100%;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 14px;
  padding: 17px 18px; font-family: var(--font); font-size: 15.5px; color: var(--ink);
  cursor: pointer; transition: border .12s, background .12s, transform .12s;
  min-height: 60px;
}
.opsi:hover { border-color: var(--gold); background: var(--hover-warm); }
.opsi:active { transform: scale(.985); }
.opsi .huruf {
  width: 32px; height: 32px; flex: none; border-radius: 9px;
  border: 1.5px solid var(--line); display: grid; place-items: center;
  font-weight: 800; font-size: 14px; color: var(--muted);
  transition: all .12s;
}
.opsi:hover .huruf { border-color: var(--gold); color: var(--on-gold-soft); background: var(--gold-soft); }
.opsi.dipilih { border-color: var(--gold); background: var(--gold-soft); }
.opsi.dipilih .huruf { background: var(--gold); border-color: var(--gold); color: #fff; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 26px; }
.link-btn { background: none; border: none; color: var(--muted); font-size: 14px; font-weight: 600; cursor: pointer; font-family: var(--font); padding: 8px 4px; }
.link-btn:hover { color: var(--heading); }

.fade-in { animation: fadeUp .35s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.slide-in { animation: slideIn .38s cubic-bezier(.22,.9,.3,1) both; }
@keyframes slideIn { from { opacity: 0; transform: translateX(46px); } to { opacity: 1; transform: none; } }
.slide-back { animation: slideBack .38s cubic-bezier(.22,.9,.3,1) both; }
@keyframes slideBack { from { opacity: 0; transform: translateX(-46px); } to { opacity: 1; transform: none; } }

/* ---------- Pilihan tipe WP ---------- */
.tipe-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tipe-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center;
  background: var(--card); border: 2px solid var(--line); border-radius: 20px;
  padding: 32px 22px 26px; cursor: pointer; font-family: var(--font);
  transition: border .15s, transform .18s, box-shadow .18s;
  box-shadow: var(--shadow);
}
.tipe-card:hover { border-color: var(--gold); transform: translateY(-4px); box-shadow: 0 14px 34px rgba(13,33,55,.16); }
.tipe-card:active { transform: translateY(-1px) scale(.99); }
.tipe-card .t-ikon { font-size: 42px; line-height: 1; }
.tipe-card .t-nama { font-size: 19px; font-weight: 800; color: var(--heading); }
.tipe-card .t-ket { font-size: 14.5px; color: var(--muted); line-height: 1.55; min-height: 3.2em; }
.tipe-card .t-go {
  margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--on-gold-soft);
  background: var(--gold-soft); border: 1px solid var(--gold-soft-line);
  padding: 8px 22px; border-radius: 100px; transition: background .15s, color .15s;
}
.tipe-card:hover .t-go { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ---------- Pratinjau laporan (hasil user) ---------- */
.preview-report { position: relative; margin: 6px -28px 0; padding: 0 28px; }
.prev-sec { margin-bottom: 16px; }
.prev-sec h4 {
  color: var(--heading); font-size: 15px; margin-bottom: 8px;
  display: flex; align-items: center; gap: 6px;
}
.blurred {
  filter: blur(7px);
  user-select: none; -webkit-user-select: none; pointer-events: none;
  opacity: .85;
}
.prev-fade {
  position: absolute; left: 0; right: 0; bottom: 0; height: 220px;
  background: linear-gradient(180deg, var(--fade-from) 0%, var(--fade-to) 78%);
  pointer-events: none;
}
.prev-lock {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  background: var(--navy); color: var(--gold-2); font-weight: 700; font-size: 14px;
  padding: 11px 22px; border-radius: 100px; white-space: nowrap;
  box-shadow: 0 10px 26px rgba(13,33,55,.3);
}

/* ---------- Tabel admin: sort, filter, pagination ---------- */
th.sortable { cursor: pointer; user-select: none; }
th.sortable:hover { color: var(--heading); }
th.sortable .arah { font-size: 10px; margin-left: 4px; color: var(--gold); }
tr.filter-row th { padding: 8px 10px; background: var(--surface-2); }
tr.filter-row input, tr.filter-row select {
  width: 100%; font-family: var(--font); font-size: 12.5px;
  padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
  color: var(--ink);
}
.pagi {
  display: flex; gap: 10px; align-items: center; justify-content: space-between;
  flex-wrap: wrap; padding: 13px 16px; border-top: 1px solid var(--line);
  font-size: 13px; color: var(--muted);
}
.pagi select {
  font-family: var(--font); font-size: 13px; padding: 6px 10px;
  border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink);
}
.pagi .nav { display: flex; gap: 6px; }
.pagi .nav button {
  font-family: var(--font); font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line); background: var(--card); color: var(--heading);
  padding: 6px 13px; border-radius: 8px; min-width: 36px;
}
.pagi .nav button.aktif { background: var(--btn-navy-bg); color: #fff; border-color: var(--btn-navy-bg); }
.pagi .nav button:disabled { opacity: .4; cursor: default; }

/* Kolom jebakan anti-bot: disingkirkan dari pandangan & tab-order */
.hp-wrap { position: absolute !important; left: -6000px; top: -6000px; height: 1px; width: 1px; overflow: hidden; opacity: 0; }

/* Aksesibilitas & gerak */
:focus-visible { outline: 3px solid rgba(201,162,75,.6); outline-offset: 2px; border-radius: 8px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Hasil ---------- */
.zona-banner {
  border-radius: var(--radius); padding: 28px 26px; color: #fff; margin: 26px 0 20px;
  box-shadow: var(--shadow);
}
.zona-banner .z-label { font-size: 12px; letter-spacing: 2px; font-weight: 700; text-transform: uppercase; opacity: .85; margin-bottom: 6px; }
.zona-banner h2 { font-size: clamp(20px, 3.4vw, 27px); margin-bottom: 10px; }
.zona-banner p { font-size: 16px; opacity: .96; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.skorbar { margin-bottom: 14px; }
.skorbar .top { display: flex; justify-content: space-between; font-size: 13.5px; font-weight: 700; color: var(--heading); margin-bottom: 6px; }
.skorbar .track { height: 10px; background: var(--track); border-radius: 100px; overflow: hidden; }
.skorbar .fill { height: 100%; border-radius: 100px; transition: width .8s ease; }
.reko { display: grid; gap: 12px; margin-top: 8px; }
.reko .item {
  display: flex; gap: 13px; background: var(--surface-1); border: 1px solid var(--line);
  border-radius: 12px; padding: 15px 16px; font-size: 15.5px;
}
.reko .num {
  width: 27px; height: 27px; flex: none; border-radius: 50%;
  background: var(--navy); color: var(--gold-2); font-weight: 800; font-size: 13px;
  display: grid; place-items: center; margin-top: 1px;
}
.disclaimer {
  font-size: 13.5px; color: var(--muted); background: var(--surface-2);
  border-radius: 12px; padding: 16px 18px; margin-top: 26px; line-height: 1.65;
}
.cta-box {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-3) 100%);
  color: #fff; border-radius: var(--radius); padding: 30px 28px; margin-top: 26px; text-align: center;
}
.cta-box h3 { font-size: 21px; margin-bottom: 8px; }
.cta-box p { font-size: 15.5px; opacity: .93; max-width: 520px; margin: 0 auto 20px; }
.cta-box .btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.kirim-info {
  display: flex; gap: 12px; align-items: flex-start; background: var(--gold-soft);
  border: 1px solid var(--gold-soft-line); border-radius: 12px; padding: 15px 17px; margin-top: 18px; font-size: 15px;
}

/* ---------- Admin ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 24px 0; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px 20px; box-shadow: var(--shadow); }
.stat .n { font-size: 28px; font-weight: 800; color: var(--heading); }
.stat .l { font-size: 13.5px; color: var(--muted); font-weight: 600; }
.stat .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }

.tablewrap { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); overflow: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 780px; }
table.data th {
  text-align: left; font-size: 11.5px; letter-spacing: 1px; text-transform: uppercase;
  color: var(--muted); padding: 14px 16px; border-bottom: 1.5px solid var(--line);
  background: var(--surface-1); position: sticky; top: 0;
}
table.data td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data tr:hover td { background: var(--hover-warm); }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 100px; color: #fff; white-space: nowrap; }
.toolrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; margin: 20px 0 14px; }
.toolrow input[type="search"] {
  font-family: var(--font); font-size: 14px; padding: 10px 14px; min-width: 240px;
  border: 1.5px solid var(--line); border-radius: 10px; background: var(--card); color: var(--ink);
}
.detail-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 20px; margin-top: 20px; }
.jwb-tabel { width: 100%; border-collapse: collapse; font-size: 14px; }
.jwb-tabel th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); padding: 9px 10px; border-bottom: 1.5px solid var(--line); }
.jwb-tabel td { padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.skor-chip { display: inline-block; min-width: 26px; text-align: center; font-weight: 800; font-size: 12px; border-radius: 7px; padding: 3px 7px; }
.narasi-blok p { font-size: 15.5px; margin-bottom: 14px; }
.narasi-blok h4 { color: var(--heading); font-size: 14px; margin: 18px 0 6px; }

.modal-back {
  position: fixed; inset: 0; background: var(--overlay); z-index: 100;
  display: none; align-items: flex-start; justify-content: center; padding: 30px 16px; overflow: auto;
}
.modal-back.open { display: flex; }
.modal {
  background: var(--bg); border-radius: 18px; max-width: 1000px; width: 100%;
  padding: 28px; position: relative; animation: fadeUp .25s ease;
}
.modal .close-x {
  position: absolute; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 10px;
  border: none; background: var(--surface-3); color: var(--heading); font-size: 17px; cursor: pointer; font-weight: 700;
}
.empty {
  text-align: center; color: var(--muted); padding: 60px 20px; font-size: 15px;
}

/* ---------- Login admin ---------- */
.login-box { max-width: 420px; margin: 80px auto; }

/* ---------- Cetak / PDF ---------- */
.print-only { display: none; }
@media print {
  /* Cetakan SELALU bertema terang, walau perangkat memakai mode gelap,
     agar hasil PDF tetap hemat tinta dan terbaca di atas kertas. */
  :root {
    --gold-soft: #f6efdd; --gold-soft-line: #eaddba; --on-gold-soft: #0d2137;
    --ink: #22303e; --muted: #5a6b7d; --heading: #0d2137; --line: #e3e8ee;
    --bg: #ffffff; --card: #ffffff; --surface-1: #fbfcfe; --surface-2: #eef1f5;
    --surface-3: #e8ecf1; --track: #e6eaef; --hover-warm: #ffffff;
    --btn-navy-bg: #0d2137; --fade-from: rgba(255,255,255,0); --fade-to: #ffffff;
    --shadow: none;
  }
  /* Paksa browser mencetak semua warna, latar, dan aksen persis
     seperti di layar (bawaan browser membuang background saat cetak) */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  body { background: #fff; }
  .paper { background: #fff !important; padding: 0 !important; }
  .no-print, .topbar, .toolrow, .modal-back .close-x { display: none !important; }
  /* Jangan biarkan elemen kunci terpotong pindah halaman. Sengaja TIDAK
     memakai selector polos ".panel"/"table" di sini — panel yang
     panjangnya tergantung data (tabel Detail Jawaban, Catatan analisis,
     Rekomendasi) sudah tidak diberi class "avoid-break" (lihat js/admin.js
     & js/report.js): kalau dipaksa utuh di sini, panel itu malah bisa
     terdorong sendirian ke halaman baru dan meninggalkan ruang kosong
     besar di halaman sebelumnya. Untuk panel-panel itu, yang dikunci
     adalah unit terkecilnya saja (baris tabel / satu blok catatan / satu
     item rekomendasi), supaya isinya tetap boleh mengalir wajar ke
     halaman berikutnya. */
  .avoid-break, .zona-banner, .cta-box, .disclaimer, canvas { page-break-inside: avoid; break-inside: avoid; }
  .tabel-detail tbody tr, .narasi-item, .reko .item { page-break-inside: avoid; break-inside: avoid; }
  .narasi-blok p { orphans: 3; widows: 3; }
  canvas, img { max-width: 100% !important; }
  /* Saat modal laporan terbuka, sembunyikan seluruh dashboard di belakangnya
     agar PDF hanya berisi laporan responden yang sedang dipilih */
  body.modal-terbuka #admin-dash, body.modal-terbuka #admin-login { display: none !important; }
  .print-only { display: block; }
  .print-area { box-shadow: none !important; border: none !important; }
  .page-break { break-before: page; page-break-before: always; }
  .modal-back.open { position: static; padding: 0; background: #fff; display: block; }
  .modal { max-width: none; padding: 0; background: #fff; }
  @page { margin: 16mm 14mm; }
}

/* ---------- Responsif ---------- */
@media (max-width: 860px) {
  .cards3 { grid-template-columns: 1fr; margin-top: 28px; }
  .grid2, .detail-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .tipe-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .hero { padding: 42px 18px 60px; }
  .panel { padding: 24px 18px; }
  .btn { width: 100%; }
  .cta-box .btns .btn { width: 100%; }
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat .n { font-size: 22px; }
  .toolrow input[type="search"] { min-width: 0; width: 100%; }
}
