/* ==========================================================================
   Pendaftaran Peserta Pembinaan Pengimbasan Kurikulum ISMUBA
   style.css — dasar, halaman publik, kartu peserta, tampilan TV
   Palet: hijau Muhammadiyah, terang & bersih.
   ========================================================================== */

@font-face {
  font-family: 'InterVar';
  src: url('fonts/inter-var.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #0B7A5E;
  --brand-2: #0E9F7C;
  --brand-dark: #075A45;
  --brand-soft: #E9F6F1;
  --brand-line: #C9E6DC;
  --gold: #C9A227;
  --bg: #F5F7F6;
  --bg-2: #EDF2F0;
  --surface: #FFFFFF;
  --line: #E2E6EB;
  --ink: #16232E;
  --ink-2: #3E4C59;
  --muted: #6B7A88;
  --danger: #C0392B;
  --danger-soft: #FDECEA;
  --warn: #B7791F;
  --warn-soft: #FEF6E4;
  --ok: #0B7A5E;
  --ok-soft: #E9F6F1;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(16, 40, 34, .08);
  --shadow-sm: 0 2px 10px rgba(16, 40, 34, .06);
  --font: 'InterVar', Inter, system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
img { max-width: 100%; height: auto; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 10px; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.4rem); }
h2 { font-size: clamp(1.35rem, 1.1rem + 1vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 14px; }
small, .tiny { font-size: .82rem; }
.muted { color: var(--muted); }
.wrap { width: min(1160px, 92vw); margin: 0 auto; }
section { padding: 56px 0; }
section.tight { padding: 32px 0; }
.center { text-align: center; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.hide-sm { display: inline; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px; border: 1px solid transparent; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: .95rem; cursor: pointer;
  background: var(--surface); color: var(--ink); text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 20px rgba(11, 122, 94, .22); }
.btn-primary:hover { color: #fff; box-shadow: 0 10px 24px rgba(11, 122, 94, .3); }
.btn-outline { border-color: var(--brand-line); background: var(--surface); color: var(--brand-dark); }
.btn-outline:hover { background: var(--brand-soft); }
.btn-gold { background: linear-gradient(135deg, #E0C158, var(--gold)); color: #2C2200; }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: #F3C9C4; }
.btn-sm { padding: 8px 14px; font-size: .86rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- kartu ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); padding: 22px;
}
.card + .card { margin-top: 20px; }
.grid { display: grid; gap: 20px; }
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-2b { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }

/* ---------- label & badge ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px;
  border-radius: 999px; font-size: .76rem; font-weight: 600; background: var(--bg-2); color: var(--ink-2);
}
.badge-ok { background: var(--ok-soft); color: var(--brand-dark); }
.badge-warn { background: var(--warn-soft); color: var(--warn); }
.badge-danger { background: var(--danger-soft); color: var(--danger); }
.badge-pdm { background: #EEF3FF; color: #274B9F; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--brand-soft); color: var(--brand-dark); font-size: .8rem; font-weight: 600; }

/* ---------- formulir (floating label) ---------- */
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .penuh { grid-column: 1 / -1; }
.fl-wrap { position: relative; }
.fl-wrap .fl-input,
.fl-wrap select.fl-input,
.fl-wrap textarea.fl-input {
  width: 100%; padding: 16px 14px 8px; font: inherit; color: var(--ink);
  background: #FBFCFC; border: 1px solid var(--line); border-radius: var(--radius-sm);
  appearance: none; transition: border-color .15s ease, background .15s ease;
}
.fl-wrap textarea.fl-input { min-height: 96px; resize: vertical; }
.fl-wrap select.fl-input { padding-right: 38px; background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7A88' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; }
.fl-wrap .fl-input:focus { outline: none; border-color: var(--brand-2); background: #fff; box-shadow: 0 0 0 4px rgba(14, 159, 124, .12); }
.fl-label {
  position: absolute; left: 14px; top: 13px; font-size: .95rem; color: var(--muted);
  pointer-events: none; transition: all .15s ease; background: transparent;
}
.fl-wrap .fl-input:focus + .fl-label,
.fl-wrap .fl-input:not(:placeholder-shown) + .fl-label,
.fl-wrap .has-value + .fl-label,
.fl-wrap select.fl-input + .fl-label,
.fl-wrap input[type="date"] + .fl-label,
.fl-wrap input[type="file"] + .fl-label {
  top: 4px; font-size: .72rem; color: var(--brand); font-weight: 600;
}
.fl-hint { margin: 6px 2px 0; font-size: .78rem; color: var(--muted); }
.fl-error { margin: 6px 2px 0; font-size: .78rem; color: var(--danger); display: none; }
.fl-wrap.salah .fl-input { border-color: var(--danger); background: #FFF9F8; }
.fl-wrap.salah .fl-error { display: block; }
.wajib { color: var(--danger); }
.honeypot { position: absolute !important; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

.file-box { position: relative; border: 1px dashed var(--brand-line); border-radius: var(--radius-sm); padding: 16px; background: #FBFCFC; text-align: center; cursor: pointer; }
.file-box:hover { background: var(--brand-soft); }
.file-box input[type="file"] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.file-box .fb-judul { font-weight: 600; color: var(--brand-dark); }
.file-box .fb-nama { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.foto-preview { margin-top: 10px; }
.foto-preview img { width: 84px; height: 84px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); }

/* ---------- foto peserta: unggah berkas atau ambil selfie ---------- */
.foto-field { display: grid; gap: 10px; }
.foto-field .ff-judul { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.ff-tabs { display: inline-flex; gap: 6px; padding: 4px; background: var(--bg-2); border-radius: 999px; }
.ff-tab {
  border: 0; background: transparent; font: inherit; font-size: .84rem; font-weight: 600;
  color: var(--ink-2); padding: 7px 14px; border-radius: 999px; cursor: pointer;
}
.ff-tab:hover { color: var(--brand-dark); }
.ff-tab.aktif { background: var(--surface); color: var(--brand-dark); box-shadow: var(--shadow-sm); }
.ff-panel { display: grid; gap: 8px; }
.ff-panel[hidden] { display: none; }
.selfie-jendela {
  position: relative; width: 100%; aspect-ratio: 4 / 3; background: #101B18;
  border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden;
}
.selfie-jendela video, .selfie-jendela img.selfie-hasil, .selfie-jendela canvas {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.selfie-jendela video { transform: scaleX(-1); }   /* cermin, seperti mode selfie */
.selfie-jendela video[hidden], .selfie-jendela img.selfie-hasil[hidden] { display: none; }
.selfie-pesan {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  padding: 18px; color: rgba(255, 255, 255, .9); font-size: .86rem; line-height: 1.5;
}
.selfie-pesan.ok { color: #9FEBCF; }
.selfie-pesan.gagal { color: #FFC9C2; }

/* ---------- flash ---------- */
.flash-stack { display: grid; gap: 10px; margin-bottom: 18px; }
.flash { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius-sm); font-size: .92rem; border: 1px solid var(--line); background: var(--surface); }
.flash-success { background: var(--ok-soft); border-color: var(--brand-line); }
.flash-error { background: var(--danger-soft); border-color: #F3C9C4; }
.flash-info { background: #EEF3FF; border-color: #D6E0FA; }
.flash span { flex: 1; }
.flash-close { border: 0; background: transparent; font-size: 1.2rem; line-height: 1; cursor: pointer; color: inherit; }

/* ---------- navbar publik ---------- */
.nav-publik { position: sticky; top: 0; z-index: 40; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav-publik .nav-inner { display: flex; align-items: center; gap: 16px; padding: 12px 0; }
.nav-brand { display: flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.nav-brand img { width: 42px; height: 42px; object-fit: contain; background: #fff; border-radius: 10px; flex: 0 0 auto; }
.nav-brand .brand-teks { display: block; min-width: 0; }
.nav-brand strong { display: block; font-size: 1.1rem; letter-spacing: -.01em; }
.nav-brand small { display: block; color: var(--muted); font-size: .76rem; line-height: 1.3; }
.nav-links { margin-left: auto; display: flex; align-items: center; gap: 18px; font-size: .92rem; font-weight: 500; }
.nav-links a { color: var(--ink-2); }
.nav-links a:hover { color: var(--brand); }

/* ---------- hero landing ---------- */
.hero { background: linear-gradient(160deg, #0B7A5E 0%, #0E9F7C 55%, #12B58C 100%); color: #fff; padding: 56px 0 48px; position: relative; overflow: hidden; }
.hero::after { content: ''; position: absolute; inset: auto -10% -60% 40%; height: 320px; background: radial-gradient(closest-side, rgba(255, 255, 255, .18), transparent); }
.hero .hero-inner { position: relative; display: grid; gap: 28px; grid-template-columns: minmax(0, 1.35fr) minmax(0, .95fr); align-items: center; }
.hero h1 { color: #fff; }
.hero .lead { font-size: 1.05rem; color: rgba(255, 255, 255, .92); max-width: 60ch; }
.hero .badge-hero { display: inline-flex; align-items: center; gap: 8px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); color: #fff; padding: 6px 14px; border-radius: 999px; font-size: .82rem; font-weight: 600; margin-bottom: 16px; }
.hero-meta { display: grid; gap: 12px; margin-top: 22px; }
/* penyelenggara di hero: logo sekolah ditampilkan proporsional (tidak mendominasi) */
.hero-penyelenggara { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
.hero-penyelenggara .hp-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: rgba(255, 255, 255, .78);
}
.hero-penyelenggara .hp-sekolah {
  display: inline-flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .3);
  border-radius: 999px; padding: 5px 16px 5px 6px;
}
.hero-penyelenggara .hp-sekolah img {
  width: clamp(32px, 3vw, 40px); height: clamp(32px, 3vw, 40px);
  object-fit: contain; background: #fff; border-radius: 50%; padding: 3px; flex: 0 0 auto;
}
.hero-penyelenggara .hp-teks strong { display: block; color: #fff; font-size: .88rem; line-height: 1.2; }
.hero-penyelenggara .hp-teks small { display: block; color: rgba(255, 255, 255, .85); font-size: .72rem; }
.hero-meta div { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: rgba(255, 255, 255, .95); }
.hero-kartu { background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius); padding: 22px; backdrop-filter: blur(6px); }
.hero-kartu h3 { color: #fff; margin-bottom: 6px; }
.hero-kartu ol { margin: 0; padding-left: 20px; font-size: .92rem; color: rgba(255, 255, 255, .95); }
.hero-kartu li { margin-bottom: 8px; }
.btn-light { background: #fff; color: var(--brand-dark); }
.stat-row { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 30px; }
.stat { background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); border-radius: var(--radius); padding: 14px 16px; }
.stat b { display: block; font-size: 1.6rem; line-height: 1.2; }
.stat span { font-size: .8rem; color: rgba(255, 255, 255, .88); }

/* ---------- blok konten landing ---------- */
.kartu-ikon { display: grid; gap: 6px; }
.kartu-ikon .ki { font-size: 1.6rem; }
.pill-list { display: flex; flex-wrap: wrap; gap: 10px; }
.pill-list .chip { background: #fff; border: 1px solid var(--brand-line); }
.langkah { display: grid; gap: 20px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.langkah .item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.langkah .no { width: 34px; height: 34px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-dark); display: grid; place-items: center; font-weight: 700; margin-bottom: 10px; }
details.faq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; margin-bottom: 12px; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq[open] summary { color: var(--brand); }
details.faq p { margin: 10px 0 0; color: var(--ink-2); font-size: .94rem; }
/* logo sekolah di kartu Penyelenggara (halaman landing) */
.penyelenggara-sekolah { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.penyelenggara-sekolah img { width: clamp(52px, 5vw, 64px); height: clamp(52px, 5vw, 64px); object-fit: contain; flex: 0 0 auto; }
.penyelenggara-sekolah strong { display: block; font-size: .95rem; line-height: 1.25; }
.penyelenggara-sekolah small { display: block; font-size: .74rem; font-weight: 700; color: var(--brand-dark); letter-spacing: .05em; text-transform: uppercase; }

.footer-publik { background: #0C2A22; color: rgba(255, 255, 255, .82); padding: 40px 0 26px; margin-top: 20px; }
.footer-publik a { color: #fff; }
.footer-publik .foot-grid { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.footer-publik h4 { color: #fff; font-size: .95rem; }
.footer-publik .foot-bawah { border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 26px; padding-top: 16px; font-size: .82rem; color: rgba(255, 255, 255, .68); }

/* ---------- kredit pembuat aplikasi ---------- */
.kredit-app {
  display: flex; align-items: center; gap: 14px; margin-top: 24px;
  background: var(--surface); border: 1px dashed var(--brand-line); border-radius: var(--radius);
  padding: 14px 18px;
}
.kredit-app .kredit-ikon { font-size: 1.4rem; line-height: 1; }
.kredit-app p { margin: 0; font-size: .88rem; color: var(--ink-2); }
.kredit-app b { color: var(--brand-dark); }

/* ---------- halaman pendaftaran ---------- */
.halaman-sempit { width: min(880px, 92vw); margin: 0 auto; }
.bagian-judul { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; font-weight: 700; color: var(--brand-dark); }
.bagian-judul .garis { flex: 1; height: 1px; background: var(--line); }
.kotak-sukses { text-align: center; }
.kotak-sukses .kode-besar { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.1rem); font-weight: 800; color: var(--brand-dark); letter-spacing: .04em; }
.barcode-holder { display: flex; justify-content: center; padding: 18px 10px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); overflow-x: auto; }

/* ---------- kartu peserta (HTML/cetak) ---------- */
.kartu-peserta {
  /* Ukuran asli kartu 105 mm. Di layar sempit (HP) kartu mengecil agar tidak
     membuat halaman meluber ke samping; saat dicetak tetap 105 mm. */
  width: min(105mm, 100%); min-height: 74mm; margin: 0 auto; background: #fff; color: #16232E;
  border: 1px solid var(--line); border-radius: 8px; overflow: hidden; position: relative;
  box-shadow: var(--shadow);
}
.kartu-peserta .kp-band { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; padding: 8px 12px; display: flex; align-items: center; gap: 10px; }
.kartu-peserta .kp-band img { width: 30px; height: 30px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.kartu-peserta .kp-band strong { font-size: .92rem; display: block; letter-spacing: .02em; }
.kartu-peserta .kp-band small { font-size: .66rem; color: rgba(255, 255, 255, .9); display: block; }
.kartu-peserta .kp-isi { display: grid; grid-template-columns: 26mm 1fr; gap: 10px; padding: 12px; }
.kartu-peserta .kp-foto { width: 26mm; height: 32mm; border: 1px solid var(--line); border-radius: 6px; background: var(--bg-2); overflow: hidden; display: grid; place-items: center; }
.kartu-peserta .kp-foto img { width: 100%; height: 100%; object-fit: cover; }
.kartu-peserta .kp-foto span { font-size: .6rem; color: var(--muted); text-align: center; padding: 4px; }
.kartu-peserta .kp-data { display: grid; gap: 7px; }
.kartu-peserta .kp-label { font-size: .58rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kartu-peserta .kp-nilai { font-size: .84rem; font-weight: 700; line-height: 1.25; word-break: break-word; }
.kartu-peserta .kp-kode { font-size: 1.05rem; font-weight: 800; color: var(--brand-dark); letter-spacing: .06em; }
/* padding samping dibuat tipis: barcode perlu lebar maksimum agar modulnya besar
   (kode peserta ± 244 modul — makin sempit, makin sulit dipindai kamera HP) */
.kartu-peserta .kp-barcode { border-top: 1px solid var(--line); padding: 8px 5px 10px; text-align: center; }
.kartu-peserta .kp-barcode svg { width: 100%; height: auto; max-height: 52px; }
.kartu-peserta .kp-catatan { font-size: .68rem; color: var(--muted); margin-top: 4px; }
.kartu-peserta .kp-kaki { border-top: 1px dashed var(--line); padding: 6px 12px; font-size: .68rem; color: var(--muted); text-align: center; }

@media print {
  .kartu-peserta { width: 105mm; }
}
@media (max-width: 460px) {
  .kartu-peserta .kp-isi { grid-template-columns: 21mm 1fr; gap: 8px; padding: 10px; }
  .kartu-peserta .kp-foto { width: 21mm; height: 27mm; }
  .kartu-peserta .kp-nilai { font-size: .78rem; }
  .kartu-peserta .kp-kode { font-size: .95rem; }
}

/* ---------- tampilan TV / monitor ---------- */
body.tampilan-tv { background: #F2F6F4; overflow: hidden; }
.tv-shell { display: grid; grid-template-rows: auto 1fr auto; height: 100vh; }
.tv-head { background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: #fff; padding: 14px 28px; display: flex; align-items: center; gap: 18px; }
.tv-head img { width: 52px; height: 52px; object-fit: contain; background: #fff; border-radius: 12px; padding: 4px; }
.tv-head h1 { font-size: clamp(1.1rem, 1rem + .8vw, 1.7rem); margin: 0; color: #fff; }
.tv-head p { margin: 2px 0 0; font-size: clamp(.75rem, .7rem + .3vw, .95rem); color: rgba(255, 255, 255, .9); }
.tv-head .tv-jam { margin-left: auto; text-align: right; }
.tv-head .tv-jam b { font-size: clamp(1.2rem, 1rem + 1vw, 2rem); display: block; line-height: 1; }
.tv-head .tv-jam span { font-size: .8rem; color: rgba(255, 255, 255, .85); }
.tv-head .tv-jam .tv-zona { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: rgba(255, 255, 255, .18); font-size: .72rem; font-weight: 700; letter-spacing: .06em; }
.tv-body { position: relative; padding: 20px 28px; overflow: hidden; }
.tv-anggota { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); align-content: start; height: 100%; }
.tv-kartu { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 14px; display: grid; grid-template-columns: 74px 1fr; gap: 12px; align-items: center; box-shadow: var(--shadow-sm); animation: tvMuncul .45s ease both; }
.tv-kartu .tv-foto { width: 74px; height: 88px; border-radius: 12px; background: var(--bg-2); overflow: hidden; display: grid; place-items: center; font-weight: 700; color: var(--brand-dark); font-size: 1.3rem; }
.tv-kartu .tv-foto img { width: 100%; height: 100%; object-fit: cover; }
.tv-kartu b { display: block; font-size: clamp(.9rem, .8rem + .35vw, 1.15rem); line-height: 1.25; }
.tv-kartu span { display: block; font-size: clamp(.72rem, .66rem + .25vw, .88rem); color: var(--muted); }
.tv-kartu .tv-jam-hadir { margin-top: 6px; font-size: .74rem; font-weight: 700; color: var(--brand-dark); }
.tv-kartu.baru { border-color: var(--brand-2); box-shadow: 0 0 0 3px rgba(14, 159, 124, .18), var(--shadow); }
@keyframes tvMuncul { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tv-kosong { display: grid; place-items: center; height: 100%; text-align: center; color: var(--muted); }
.tv-kosong .ikon { font-size: 3rem; }
.tv-welcome { position: absolute; inset: 18px 28px; background: linear-gradient(135deg, #0B7A5E, #12B58C); color: #fff; border-radius: 22px; display: grid; grid-template-columns: 300px 1fr; gap: 30px; align-items: center; padding: 30px 40px; animation: tvSambut .5s ease both; }
.tv-welcome .tvw-foto { width: 300px; height: 340px; border-radius: 20px; background: rgba(255, 255, 255, .18); overflow: hidden; display: grid; place-items: center; font-size: 4rem; font-weight: 800; }
.tv-welcome .tvw-foto img { width: 100%; height: 100%; object-fit: cover; }
.tv-welcome .tvw-teks h2 { font-size: clamp(1.2rem, 1rem + 1.4vw, 2.2rem); color: #fff; margin: 0 0 8px; }
.tv-welcome .tvw-teks .tvw-nama { font-size: clamp(1.8rem, 1.2rem + 3vw, 3.6rem); font-weight: 800; line-height: 1.1; margin: 0 0 14px; }
.tv-welcome .tvw-teks p { font-size: clamp(.95rem, .85rem + .6vw, 1.5rem); color: rgba(255, 255, 255, .95); margin: 0 0 4px; }
.tv-welcome[hidden] { display: none; }
.tv-welcome .tvw-badge { display: inline-block; background: rgba(255, 255, 255, .2); border: 1px solid rgba(255, 255, 255, .35); padding: 6px 16px; border-radius: 999px; font-weight: 700; margin-bottom: 12px; }
@keyframes tvSambut { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.tv-kaki { background: #fff; border-top: 1px solid var(--line); padding: 12px 28px; display: grid; gap: 18px; grid-template-columns: 220px 1fr auto; align-items: center; }

/* identitas penyelenggara & sekolah di sudut kanan bawah layar TV.
   Dibuat ramping (ukuran ikut lebar layar) supaya tetap elegan di monitor besar. */
.tv-sekolah { display: flex; align-items: center; gap: 12px; padding-left: 16px; border-left: 1px solid var(--line); }
.tv-logo-pasangan { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.tv-logo-pasangan img {
  width: clamp(30px, 2.3vw, 40px);
  height: clamp(30px, 2.3vw, 40px);
  object-fit: contain;
}
.tv-logo-garis { width: 1px; height: 24px; align-self: center; background: var(--line); }
.tv-sekolah-teks strong { display: block; font-size: .84rem; line-height: 1.25; color: var(--ink); font-weight: 700; }
.tv-sekolah-teks small { display: block; font-size: .66rem; font-weight: 700; color: var(--brand-dark); letter-spacing: .07em; text-transform: uppercase; }
.tv-angka { display: flex; gap: 22px; }
.tv-angka div b { display: block; font-size: clamp(1.2rem, 1rem + 1vw, 2rem); color: var(--brand-dark); line-height: 1.1; }
.tv-angka div span { font-size: .78rem; color: var(--muted); }
.tv-bar { display: grid; gap: 8px; }
.tv-bar .baris { display: grid; grid-template-columns: 132px 1fr 74px; gap: 10px; align-items: center; font-size: .8rem; }
.tv-bar .track { background: var(--bg-2); border-radius: 999px; height: 12px; overflow: hidden; }
.tv-bar .isi { height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); border-radius: 999px; transition: width .5s ease; }
.tv-bar .isi.gold { background: linear-gradient(90deg, #E0C158, var(--gold)); }
.tv-penanda { position: fixed; right: 14px; bottom: 12px; font-size: .7rem; color: var(--muted); }

/* ---------- halaman error ---------- */
.halaman-error { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.kartu-error { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; max-width: 620px; text-align: center; box-shadow: var(--shadow); }

/* ---------- cetak ---------- */
@media print {
  .no-print, .nav-publik, .footer-publik, .tv-head .tv-jam { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
  .kartu-peserta { box-shadow: none; border: 1px solid #999; }
}

/* ---------- responsif ---------- */
@media (max-width: 1080px) {
  .hero .hero-inner { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-anggota { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tv-welcome { grid-template-columns: 220px 1fr; padding: 24px; }
  .tv-welcome .tvw-foto { width: 220px; height: 260px; }
}
@media (max-width: 900px) {
  .grid-3, .grid-4, .grid-2b { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .langkah { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-publik .foot-grid { grid-template-columns: 1fr; }
  .nav-links { display: none; }
}
@media (max-width: 640px) {
  section { padding: 40px 0; }
  .grid-2, .grid-3, .grid-4, .grid-2b, .form-grid, .langkah { grid-template-columns: 1fr; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .hide-sm { display: none; }
  .tv-anggota { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tv-welcome { grid-template-columns: 1fr; }
  .tv-kaki { grid-template-columns: 1fr; }
  .tv-sekolah { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); padding-top: 10px; }
  .tv-logo-pasangan img { width: 30px; height: 30px; }
  .tv-logo-garis { height: 20px; }
  .tv-sekolah-teks strong { font-size: .8rem; }
  .tv-sekolah-teks small { font-size: .64rem; }
}
