/* ==========================================================================
   TOKEN WARNA
   --------------------------------------------------------------------------
   Dua lapis:

   1. Palet mentah (--navy-*, --gold-*) — tangga warna merek dari poster.
   2. Token semantik (--page-bg, --surface, --ink, --heading, ...) — dipakai
      di seluruh stylesheet.

   Dark mode bekerja dengan menulis ulang KEDUA lapis di blok
   :root[data-theme='dark'] di bawah. Aturan mainnya:

   - Tangga --gold-* dibalik PERANNYA, bukan namanya. Di light, gold-600 =
     emas paling gelap (teks di atas latar terang). Di dark, gold-600 = emas
     paling terang (teks di atas latar gelap). Karena setiap pemakaian sudah
     memilih nomor sesuai perannya, tak ada satu pun pemakaian emas yang perlu
     diubah.
   - Tangga --navy-* TIDAK bisa dibalik: navy dipakai sekaligus sebagai warna
     teks judul dan sebagai latar elemen terisi (.day-header, .num-badge).
     Karena itu semua pemakaian navy sebagai TEKS dipindah ke --heading /
     --heading-2, dan --navy-* disisakan murni untuk isian. Di dark, navy
     dinaikkan sedikit luminansnya supaya isian tetap terbaca di atas kartu
     gelap, teks putih di atasnya tetap >= 9:1.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Palet mentah — tangga merek dari poster */
  --navy-950: #0a1b2d;
  --navy-900: #0e2a47;
  --navy-800: #133357;
  --navy-700: #1b4573;
  --navy-100: #e8f0f8;
  --navy-50:  #f2f6fa;

  --gold-600: #b07d2c;
  --gold-500: #c9933e;
  --gold-400: #dfa84a;
  --gold-300: #ebc47a;
  --gold-200: #f4dcab;
  --gold-100: #faf3e5;
  --gold-50:  #fdfbf7;

  /* Permukaan */
  --page-bg:       #f8f6f0;
  --header-bg:     #fdfbf7;
  --surface:       #ffffff;
  --surface-sunk:  #f8fafc;
  --surface-hover: #f1f5f9;
  --banner-bg:     #f4ede2;

  /* Teks */
  --ink:       #122030;
  --ink-soft:  #334455;
  --muted:     #556877;
  --heading:   var(--navy-900);
  --heading-2: var(--navy-800);

  /* Garis */
  --border:        #e2dcd2;
  --border-subtle: #eee9df;
  --border-strong: #cbd5e1;

  /* Kontrol isian */
  --input-bg:       #fafaf8;
  --input-bg-focus: #ffffff;
  --placeholder:    #93a3b0;
  --control-accent: var(--navy-900);
  --badge-ring:     #ffffff;
  --focus-border:   var(--navy-800);
  /* Teks di atas bidang emas penuh (.btn-share, .btn-copy:hover). Di dark
     emas jadi terang, jadi teksnya harus gelap — putih akan hilang. */
  --on-gold:        #ffffff;

  /* Aksen & status */
  --olive:     #44674e;
  --olive-100: #ebf2ed;

  --link:     #0284c7;
  --wa:       #25d366;
  --wa-hover: #1eb956;
  --wa-soft:  #e9fbf0;
  --error:    #c0392b;
  --error-bg: #fdf3f2;

  --ikhwan-bg:     #e0f2fe;
  --ikhwan-fg:     #0369a1;
  --ikhwan-border: #bae6fd;
  --akhwat-bg:     #fdf2f8;
  --akhwat-fg:     #be185d;
  --akhwat-border: #fbcfe8;

  --closed-border: #e6c9a8;
  --closed-bg-1:   #fdf6ec;
  --closed-bg-2:   #fbf1e2;

  --toast-bg: rgba(10, 27, 45, 0.95);

  /* Bidang QR: SELALU putih di kedua tema. QR code digambar hitam di atas
     putih oleh app.js; membalik platnya akan membuat tiket gagal dipindai. */
  --qr-plate:        #ffffff;
  --qr-plate-border: #cbd5e1;

  --font-sans:   'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif:  'Cinzel', Georgia, serif;
  --font-script: 'Alex Brush', cursive;

  --radius-lg: 20px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 2px 8px rgba(14, 42, 71, 0.05);
  --shadow-md: 0 10px 30px rgba(14, 42, 71, 0.08);
  --shadow-lg: 0 18px 45px rgba(14, 42, 71, 0.12);
}

/* --------------------------------------------------------------------------
   DARK MODE
   Atribut data-theme selalu ditulis eksplisit oleh /theme.js (light | dark),
   jadi cukup satu blok ini — tak perlu menduplikasi ke @media
   prefers-color-scheme. Preferensi "ikuti sistem" diterjemahkan di JS.
   -------------------------------------------------------------------------- */

:root[data-theme='dark'] {
  color-scheme: dark;

  /* Navy dinaikkan luminansnya: ini latar elemen terisi, bukan teks.
     Teks putih di atas --navy-900 baru = 9.4:1. */
  --navy-950: #16304c;
  --navy-900: #1b3a5c;
  --navy-800: #22486e;
  --navy-700: #2d5a85;
  --navy-100: #24374b;
  --navy-50:  #1a2836;

  /* Tangga emas dibalik perannya: 600 kini emas paling terang (teks),
     50/100/200 jadi lapisan transparan supaya menyatu dengan kartu gelap. */
  --gold-600: #f2c882;
  --gold-500: #e8b96b;
  --gold-400: #dfa84a;
  /* gold-300 selalu tampil DI ATAS isian navy (.num-badge, .ticket-brand),
     bukan di atas kartu, jadi di dark ia justru harus lebih terang — bukan
     ikut turun mengikuti pola tangga yang lain. */
  --gold-300: #e3bd7f;
  --gold-200: rgba(223, 168, 74, 0.32);
  --gold-100: rgba(223, 168, 74, 0.16);
  --gold-50:  rgba(223, 168, 74, 0.08);

  --page-bg:       #0e1620;
  --header-bg:     #121c27;
  --surface:       #182533;
  --surface-sunk:  #121c27;
  --surface-hover: #1e2c3c;
  --banner-bg:     #1d2634;

  --ink:       #e8eef6;
  --ink-soft:  #b6c6d6;
  --muted:     #94a7ba;
  --heading:   #f0f5fb;
  --heading-2: #cfe0f0;

  --border:        #2b3949;
  --border-subtle: #222f3d;
  --border-strong: #3a4a5d;

  --input-bg:       #101a25;
  --input-bg-focus: #16222f;
  --placeholder:    #74869a;
  --control-accent: #6f9fd0;
  --badge-ring:     rgba(255, 255, 255, 0.28);
  --focus-border:   var(--gold-400);
  --on-gold:        #1a1206;

  --olive:     #8fc2a1;
  --olive-100: #1b2b21;

  --link:     #5ab0e8;
  --wa-soft:  rgba(37, 211, 102, 0.14);
  --error:    #ff8f80;
  --error-bg: rgba(192, 57, 43, 0.18);

  --ikhwan-bg:     rgba(56, 165, 232, 0.16);
  --ikhwan-fg:     #7cc6f5;
  --ikhwan-border: rgba(56, 165, 232, 0.35);
  --akhwat-bg:     rgba(236, 72, 153, 0.16);
  --akhwat-fg:     #f7a1c9;
  --akhwat-border: rgba(236, 72, 153, 0.35);

  --closed-border: rgba(223, 168, 74, 0.32);
  --closed-bg-1:   #221c12;
  --closed-bg-2:   #1c1811;

  --toast-bg: rgba(40, 54, 72, 0.96);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.38);
  --shadow-lg: 0 18px 45px rgba(0, 0, 0, 0.48);
}


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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--page-bg);
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: 620px;
  margin: 0 auto;
  padding: 0 16px;
}

/* ==========================================================================
   SITE HEADER (Poster Thematic)
   ========================================================================== */
.site-header {
  position: relative;
  background: var(--header-bg);
  overflow: hidden;
  padding-top: 24px;
  border-bottom: 1px solid var(--border-subtle);
}

/* Background Mashrabiya / Lattice Pattern */
.header-pattern {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0.04;
  pointer-events: none;
  background-image: radial-gradient(var(--navy-900) 1.5px, transparent 1.5px),
                    radial-gradient(var(--gold-500) 1.5px, transparent 1.5px);
  background-size: 28px 28px;
  background-position: 0 0, 14px 14px;
}

.header-content {
  position: relative;
  z-index: 2;
  text-align: center;
}

/* Top bar: Mandatory badge */
.header-top-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

/* Gold Badge (Terbuka Untuk Umum Ikhwan dan Akhwat) */
.mandatory-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #c9933e 0%, #f4cb76 50%, #c1882c 100%);
  color: #0c233c;
  padding: 8px 18px;
  border-radius: 999px;
  box-shadow: 0 4px 16px rgba(201, 147, 62, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  border: 1.5px solid var(--badge-ring);
  text-align: center;
  font-size: 12.5px;
  font-weight: 800;
  letter-spacing: 0.3px;
  max-width: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mandatory-badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(201, 147, 62, 0.5);
}

/* Hero Typography: Daurah (Script) + JANAIZ (Serif) */
.hero-brand {
  margin: 12px 0 28px;
}

.brand-script {
  display: block;
  font-family: var(--font-script);
  font-size: 64px;
  line-height: 0.95;
  color: var(--gold-500);
  margin-bottom: -6px;
  text-shadow: 0 2px 10px rgba(201, 147, 62, 0.15);
}

.brand-serif {
  font-family: var(--font-serif);
  font-size: 46px;
  font-weight: 900;
  letter-spacing: 5px;
  color: var(--heading);
  line-height: 1;
  margin-bottom: 12px;
}

.brand-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--heading-2);
}

.ornament-line {
  width: 28px;
  height: 1.5px;
  background: linear-gradient(90deg, transparent, var(--gold-400), transparent);
}

/* Baqi Banner Card (Gambar 1 & 2) */
.baqi-banner-card {
  width: 100%;
  max-width: 100%;
  margin: 12px 0 16px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 6px 22px rgba(14, 42, 71, 0.1);
  border: 1.5px solid rgba(223, 168, 74, 0.35);
  background: var(--banner-bg);
}

.baqi-banner-img {
  display: block;
  width: 100%;
  height: 210px;
  max-height: 230px;
  object-fit: cover;
  object-position: center 38%;
}

@media (max-width: 480px) {
  .baqi-banner-img {
    height: 160px;
  }
}

/* Info Pills Grid */
.hero-pills {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 14px;
}

.info-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.info-pill svg {
  color: var(--gold-500);
  flex-shrink: 0;
}

.info-pill strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--heading);
  line-height: 1.25;
}

.info-pill span, .info-pill small {
  display: block;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.2;
}

.info-pill-wide {
  grid-column: span 2;
}

.info-pill-link {
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.info-pill-link:hover {
  background: var(--surface-hover);
  border-color: var(--gold-500);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(223, 168, 74, 0.16);
}

.info-pill-link-content {
  flex: 1;
}

.link-maps-cta {
  display: inline-block;
  margin-top: 3px;
  font-size: 11px;
  font-weight: 700;
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.info-pill-link:hover .link-maps-cta {
  color: var(--gold-600);
}

/* Dynamic Wave Divider */
.wave-divider {
  width: 100%;
  line-height: 0;
  overflow: hidden;
  margin-bottom: -1px;
}

.wave-divider svg {
  width: 100%;
  height: 48px;
  display: block;
}

/* ==========================================================================
   MAIN CONTENT & CARDS
   ========================================================================== */
main {
  position: relative;
  z-index: 10;
  margin-top: 14px;
  padding-bottom: 40px;
}

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  padding: 26px 22px;
  margin-bottom: 20px;
  position: relative;
}

.section-title {
  font-family: var(--font-sans);
  font-size: 20px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: -0.3px;
  line-height: 1.3;
}

.section-desc {
  font-size: 13.5px;
  color: var(--muted);
  margin: 4px 0 18px;
  line-height: 1.5;
}

/* Schedule Card (Rangkaian Acara) */
.schedule-card {
  border-top: 4px solid var(--navy-800);
}

.days-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-bottom: 20px;
}

.day-box {
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px 16px;
}

.day-header {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--navy-900);
  color: #fff;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.day-header svg {
  color: var(--gold-400);
  flex-shrink: 0;
}

.day-header h3 {
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.session-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.session-list li {
  font-size: 13px;
  line-height: 1.45;
  padding-left: 14px;
  position: relative;
  color: var(--ink);
}

.session-list li::before {
  content: "•";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--gold-500);
  font-size: 18px;
  line-height: 1;
}

.session-list li strong {
  display: inline-block;
  color: var(--heading);
  font-weight: 700;
  margin-right: 4px;
}

.session-list li span {
  display: block;
  color: var(--ink-soft);
}

/* Facilities */
.facilities-wrap {
  border-top: 1px dashed var(--border);
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.facilities-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--heading);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.facilities-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.f-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--heading);
  background: var(--gold-50);
  border: 1px solid var(--gold-200);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
}

.f-badge svg {
  color: var(--gold-600);
}

.f-badge-link {
  text-decoration: none;
  background: var(--navy-50);
  border-color: var(--navy-100);
  color: var(--heading-2);
  transition: all 0.15s ease;
  margin-left: auto;
}

.f-badge-link:hover {
  background: var(--navy-100);
  color: var(--heading);
}

@media (max-width: 480px) {
  /* Grid rapi di layar sempit: chip fasilitas sejajar 2 kolom, link poster
     jadi satu baris penuh di bawahnya (bukan mengambang sendiri di kanan). */
  .facilities-badges {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }

  .f-badge {
    justify-content: center;
  }

  .f-badge-link {
    grid-column: 1 / -1;
    justify-content: center;
    margin-left: 0;
  }
}

/* ==========================================================================
   REGISTRATION FORM CARD
   ========================================================================== */
.form-card {
  border-top: 4px solid var(--gold-500);
}

.form-card-header {
  margin-bottom: 22px;
}

.form-kicker {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-600);
  text-transform: uppercase;
  margin-bottom: 4px;
}

/* Fields & Labels */
.field {
  margin-bottom: 20px;
  border: 0;
}

label, legend {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--heading);
  margin-bottom: 8px;
}

legend {
  padding: 0;
}

.num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--navy-900);
  color: var(--gold-300);
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}

.req {
  color: var(--error);
  font-weight: 800;
}

.input-hint {
  font-size: 12px;
  color: var(--muted);
  margin: -4px 0 8px 30px;
}

/* Input & Textarea Elements */
input[type="text"],
input[type="tel"],
input[type="number"],
textarea {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px; /* prevent iOS auto zoom */
  color: var(--ink);
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  outline: none;
  transition: all 0.18s ease;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--placeholder);
  font-size: 14px;
}

input:focus,
textarea:focus {
  border-color: var(--focus-border);
  background: var(--input-bg-focus);
  box-shadow: 0 0 0 3px rgba(201, 147, 62, 0.25);
}

textarea {
  resize: vertical;
  min-height: 80px;
}

/* Error states */
.field.invalid input,
.field.invalid textarea {
  border-color: var(--error);
  background: var(--error-bg);
}

.error {
  display: none;
  color: var(--error);
  font-size: 12.5px;
  font-weight: 600;
  margin-top: 6px;
  padding-left: 4px;
}

.field.invalid .error {
  display: block;
}

/* Radio Cards (Pernah Daurah, Status, Gender) */
.radio-cards {
  display: grid;
  gap: 10px;
}

.radio-cards-2 {
  grid-template-columns: 1fr 1fr;
}

.radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 13px 14px;
  cursor: pointer;
  background: var(--input-bg);
  transition: all 0.18s ease;
  position: relative;
}

.radio-card:hover {
  border-color: var(--gold-400);
  background: var(--gold-50);
}

.radio-card input[type="radio"] {
  accent-color: var(--control-accent);
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  cursor: pointer;
}

.radio-card:has(input:checked) {
  border-color: var(--navy-800);
  background: var(--gold-100);
  box-shadow: 0 0 0 1px var(--navy-800) inset;
}

.radio-label strong {
  display: block;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--heading);
}

.radio-label small {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  line-height: 1.3;
}

/* Form Alert Banner */
.form-alert {
  background: var(--error-bg);
  color: var(--error);
  border: 1px solid rgba(192, 57, 43, 0.25);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  font-size: 13.5px;
  font-weight: 600;
  margin-bottom: 18px;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #ffffff;
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  border: 1px solid var(--navy-700);
  border-radius: var(--radius-md);
  padding: 15px 20px;
  cursor: pointer;
  text-decoration: none;
  box-shadow: 0 4px 15px rgba(14, 42, 71, 0.25);
  transition: all 0.2s ease;
}

.btn:hover {
  background: linear-gradient(135deg, var(--navy-900), var(--navy-700));
  box-shadow: 0 6px 20px rgba(14, 42, 71, 0.35);
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(14, 42, 71, 0.2);
}

.btn[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-primary svg {
  color: var(--gold-400);
  transition: transform 0.2s ease;
}

.btn-primary:hover svg {
  transform: translateX(3px);
}

.btn-wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #1fa854, var(--wa));
  color: #ffffff;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-weight: 800;
  font-size: 13.5px;
  letter-spacing: 0.5px;
  text-decoration: none;
  white-space: nowrap;
  min-height: 48px;
  height: 48px;
  box-sizing: border-box;
  border: none;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-wa:hover {
  background: linear-gradient(135deg, #198844, #21bf5c);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   SECTION 2: SUCCESS, INFAK & WHATSAPP
   ========================================================================== */
.hidden {
  display: none !important;
}

.success-card {
  text-align: center;
  border-top: 4px solid var(--gold-500);
  padding: 36px 20px 30px;
}

.success-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--gold-100);
  color: var(--gold-600);
  border: 2px solid var(--gold-300);
  box-shadow: 0 4px 16px rgba(201, 147, 62, 0.2);
}

.success-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  color: var(--gold-600);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.success-card h2 {
  font-family: var(--font-serif);
  font-size: 24px;
  color: var(--heading);
  margin-bottom: 10px;
}

.success-note {
  font-size: 14.5px;
  color: var(--muted);
  max-width: 440px;
  margin: 0 auto;
}

.success-note strong {
  color: var(--heading);
}

/* WA Group Card */
.group-card {
  text-align: center;
  border-top: 4px solid var(--wa);
}

.group-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.wa-badge-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--wa-soft);
  color: var(--wa);
  display: flex;
  align-items: center;
  justify-content: center;
}

.group-card h2 {
  font-size: 18px;
  color: var(--heading);
  font-weight: 800;
}

.group-note {
  font-size: 13.5px;
  color: var(--muted);
  margin-bottom: 18px;
  line-height: 1.5;
}

/* ==========================================================================
   HEADER LOGOS & THEME
   ========================================================================== */
.header-logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}

.header-logo {
  display: block;
  height: auto;
  object-fit: contain;
}

.logo-komite {
  max-height: 56px;
  max-width: 56px;
  border-radius: 50%;
  object-fit: cover;
}

.logo-ibnuabbas {
  max-height: 56px;
  max-width: 56px;
  object-fit: contain;
}

.logo-divider {
  width: 1px;
  height: 38px;
  background: var(--border);
}

.brand-theme {
  display: inline-block;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--heading);
  background: rgba(223, 168, 74, 0.12);
  border: 1px solid rgba(201, 147, 62, 0.35);
  padding: 8px 18px;
  border-radius: 999px;
  margin-top: 10px;
  line-height: 1.4;
  max-width: 90%;
}

.theme-ornament {
  color: var(--gold-600);
  font-weight: 800;
}

/* ==========================================================================
   INFAK TRANSFER (HALAMAN 1)
   ========================================================================== */
.infak-section-box {
  margin: 30px 0 24px;
  padding: 24px 20px;
  background: var(--gold-50);
  border: 1.5px dashed var(--gold-300);
  border-radius: var(--radius-lg);
  text-align: center;
}

.infak-gold-badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 2px;
  background: var(--gold-100);
  color: var(--gold-600);
  border: 1px solid var(--gold-200);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 8px;
}

.infak-title {
  font-size: 18px;
  color: var(--heading);
  font-weight: 800;
  margin-bottom: 6px;
}

.infak-quote {
  font-size: 13px;
  color: var(--heading-2);
  font-style: italic;
  margin-bottom: 18px;
  line-height: 1.5;
}

.bank-info-box {
  background: var(--surface);
  border: 1px solid var(--gold-200);
  border-radius: var(--radius-md);
  padding: 16px;
  box-shadow: 0 4px 14px rgba(14, 42, 71, 0.05);
  margin-bottom: 18px;
  text-align: left;
}

.bank-info-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--heading-2);
  margin-bottom: 8px;
}

.bank-name-badge {
  background: #00a39d;
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

.bank-account-num {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 22px;
  font-weight: 800;
  color: var(--heading);
  font-family: monospace, var(--font-sans);
  letter-spacing: 1.5px;
  background: var(--surface-sunk);
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--navy-900);
  color: #ffffff;
  border: none;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-copy:hover {
  background: var(--gold-500);
  color: var(--on-gold);
}

.bank-account-name {
  font-size: 13px;
  color: var(--muted);
  margin-top: 8px;
  margin-bottom: 0;
}

.bank-account-name strong {
  color: var(--heading);
}

.currency-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 6px;
}

.currency-prefix {
  position: absolute;
  left: 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--heading-2);
  pointer-events: none;
}

.currency-input-wrap input {
  padding-left: 44px;
  font-size: 16px;
  font-weight: 700;
  color: var(--heading);
}

.nominal-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--heading-2);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.chip-btn:hover, .chip-btn.active {
  background: var(--gold-100);
  border-color: var(--gold-400);
  color: var(--gold-600);
}

/* ==========================================================================
   TICKET & QR CODE CEK-IN
   ========================================================================== */
.ticket-card {
  background: var(--surface);
  border: 2px solid var(--gold-400);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 24px;
  text-align: left;
}

.ticket-header {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #ffffff;
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ticket-brand {
  font-family: var(--font-serif);
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--gold-300);
  display: block;
}

.ticket-title {
  font-size: 16px;
  font-weight: 800;
  color: #ffffff;
  margin: 0;
}

.ticket-badge {
  background: var(--wa);
  color: #ffffff;
  font-size: 11px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ticket-body {
  padding: 24px 20px;
  text-align: center;
  background: var(--surface);
}

.ticket-code-wrap {
  margin-bottom: 12px;
}

.ticket-code-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: var(--muted);
  text-transform: uppercase;
}

.ticket-code-value {
  display: inline-block;
  font-family: monospace, var(--font-sans);
  font-size: 24px;
  font-weight: 800;
  color: var(--heading);
  letter-spacing: 2px;
  margin-top: 2px;
}

.ticket-name-wrap strong {
  display: block;
  font-size: 18px;
  color: var(--ink);
  font-weight: 800;
  margin-bottom: 4px;
}

.ticket-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
}

.badge-gender {
  font-weight: 700;
  font-size: 12px;
  padding: 3px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

.badge-gender.pill-ikhwan {
  background: var(--ikhwan-bg);
  color: var(--ikhwan-fg);
  border: 1px solid var(--ikhwan-border);
}

.badge-gender.pill-akhwat {
  background: var(--akhwat-bg);
  color: var(--akhwat-fg);
  border: 1px solid var(--akhwat-border);
}

.meta-dot {
  color: var(--gold-500);
}

.qr-canvas-container {
  margin: 18px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: var(--qr-plate);
  border: 2px dashed var(--qr-plate-border);
  border-radius: 16px;
  width: fit-content;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
}

#ticket-qr-canvas {
  display: block;
  border-radius: 8px;
}

.ticket-hint {
  font-size: 12.5px;
  color: var(--muted);
  line-height: 1.4;
  max-width: 380px;
  margin: 0 auto;
}

.ticket-actions {
  padding: 16px 20px 20px;
  background: var(--surface-sunk);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-share {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: var(--on-gold);
  box-shadow: 0 4px 12px rgba(176, 125, 44, 0.25);
}

.btn-share:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  transform: translateY(-1px);
}

.btn-download-qr {
  background: var(--surface);
  color: var(--heading-2);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.btn-download-qr:hover {
  background: var(--navy-50);
  border-color: var(--navy-800);
}

.btn-register-new {
  background: var(--surface-sunk);
  color: var(--heading-2);
  border: 1.5px solid var(--border-strong);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-register-new:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--heading);
  transform: translateY(-1px);
}

.ticket-actions .btn {
  font-size: 13px;
  padding: 13px 8px;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

/* ==========================================================================
   SIMPAN TIKET KE GALERI (overlay "tekan-tahan utk simpan")
   ========================================================================== */
body.no-scroll {
  overflow: hidden;
}

.save-ticket-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 27, 45, 0.94);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: 24px 20px;
}

.save-ticket-overlay__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.save-ticket-overlay__hint {
  color: #ffffff;
  text-align: center;
  font-size: 14px;
  line-height: 1.5;
  max-width: 320px;
  margin: 0;
}

.save-ticket-overlay__hint strong {
  color: var(--gold-300);
}

.save-ticket-overlay__img {
  max-width: 88vw;
  max-height: 55vh;
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.save-ticket-overlay__fallback {
  background: transparent;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  color: #ffffff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
}

.save-ticket-overlay__fallback:hover {
  background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   WAG & CONTACTS
   ========================================================================== */
.wag-container {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.wag-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px;
  text-align: left;
  position: relative;
  transition: all 0.2s ease;
}

.wag-item.active-recommended {
  border-color: var(--wa);
  background: var(--wa-soft);
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.12);
}

.wag-item-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.wag-gender-pill {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 1px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #ffffff;
}

.wag-gender-pill.pill-ikhwan { background: #0284c7; }
.wag-gender-pill.pill-akhwat { background: #db2777; }

.wag-recommended {
  font-size: 11px;
  font-weight: 800;
  color: var(--wa);
}

.wag-item strong {
  display: block;
  font-size: 15px;
  color: var(--heading);
  margin-bottom: 2px;
}

.wag-subtext {
  font-size: 12.5px;
  color: var(--muted);
  margin-bottom: 12px;
}

.btn-wag {
  padding: 10px 16px;
  font-size: 13.5px;
  border-radius: 8px;
  width: 100%;
}

.contact-card {
  margin-top: 20px;
  text-align: left;
}

.contact-card-form {
  margin-top: 24px;
  margin-bottom: 24px;
  padding: 18px 20px;
  background: var(--gold-50);
  border: 1.5px dashed rgba(223, 168, 74, 0.45);
  border-radius: var(--radius-md);
}

.contact-card-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--heading);
  margin-bottom: 4px;
}

.contact-card-desc {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 16px;
}

.contacts-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.contact-person-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-sunk);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
}

.contact-person-card:hover {
  border-color: var(--wa);
  background: var(--wa-soft);
  transform: translateY(-1px);
}

.contact-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--wa-soft);
  color: var(--wa);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-role {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.contact-name {
  display: block;
  font-size: 14px;
  font-weight: 800;
  color: var(--heading);
}

.contact-phone {
  font-size: 12px;
  color: var(--wa);
  font-weight: 700;
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--toast-bg);
  backdrop-filter: blur(8px);
  color: #ffffff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(223, 168, 74, 0.4);
  z-index: 9999;
  display: none;
  animation: fadeInToast 0.25s ease-out;
}

@keyframes fadeInToast {
  from { opacity: 0; transform: translate(-50%, 10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* ==========================================================================
   SITE FOOTER (Powered by QUMATIC)
   ========================================================================== */
.site-footer {
  background: transparent;
  padding: 24px 0 36px;
  margin-top: 12px;
}

.footer-content {
  text-align: center;
}

.footer-qumatic {
  display: flex;
  justify-content: center;
  align-items: center;
}

.footer-qumatic a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.3px;
  transition: color 0.2s ease, transform 0.2s ease;
}

.footer-qumatic a:hover {
  color: var(--heading);
}

.qumatic-logo {
  height: 20px;
  width: auto;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.2s ease;
}

.footer-qumatic a:hover .qumatic-logo {
  transform: scale(1.05);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 440px) {
  .header-top-bar {
    justify-content: center;
  }

  .mandatory-badge {
    width: 100%;
    justify-content: center;
  }

  .brand-script {
    font-size: 52px;
  }

  .brand-serif {
    font-size: 38px;
    letter-spacing: 3px;
  }

  .hero-pills {
    grid-template-columns: 1fr;
  }

  .info-pill-wide {
    grid-column: span 1;
  }

  .radio-cards-2 {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 20px 16px;
  }
}

@media (min-width: 640px) {
  .site-header {
    padding-top: 32px;
  }

  .brand-script {
    font-size: 76px;
  }

  .brand-serif {
    font-size: 56px;
    letter-spacing: 6px;
  }

  .days-grid {
    grid-template-columns: 1fr 1fr;
  }

  .card {
    padding: 32px 30px;
  }

  .wag-container {
    grid-template-columns: 1fr 1fr;
  }

  .contacts-grid {
    grid-template-columns: 1fr 1fr;
  }

  .ticket-actions {
    flex-direction: row;
  }

  .ticket-actions .btn {
    flex: 1;
  }
}

/* ==========================================================================
   PENDAFTARAN DITUTUP (dikendalikan admin dari portal)
   ========================================================================== */
.registration-closed {
  border: 1px solid var(--closed-border);
  background: linear-gradient(180deg, var(--closed-bg-1), var(--closed-bg-2));
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 20px;
  text-align: center;
}
.registration-closed strong {
  display: block;
  font-family: var(--font-serif);
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  color: var(--gold-600);
  margin-bottom: 6px;
}
.registration-closed p {
  font-size: 0.92rem;
  color: var(--muted);
  line-height: 1.6;
}

/* ==========================================================================
   KUOTA PESERTA PER JENIS KELAMIN
   Pilihan yang kuotanya habis dikunci di form; popup-nya memakai token yang
   sama dengan blok "pendaftaran ditutup" supaya keduanya terbaca senada.
   ========================================================================== */
.quota-note {
  display: block;
  margin-top: 3px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--olive);
}
.quota-note-full {
  color: var(--error);
}

.radio-card.quota-full {
  opacity: 0.55;
  background: var(--surface-sunk);
  border-style: dashed;
  cursor: not-allowed;
}
.radio-card.quota-full:hover {
  border-color: var(--border);
  background: var(--surface-sunk);
}
.radio-card.quota-full input[type="radio"] {
  cursor: not-allowed;
}

/* Popup pemberitahuan kuota ------------------------------------------------ */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 22, 32, 0.62);
  backdrop-filter: blur(2px);
  animation: modal-fade 0.18s ease-out;
}
.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 26px 22px 22px;
  text-align: center;
  animation: modal-rise 0.22s ease-out;
}

.modal-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  margin-bottom: 14px;
  border-radius: 50%;
  background: var(--closed-bg-1);
  border: 1px solid var(--closed-border);
  color: var(--gold-600);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.12rem;
  letter-spacing: 0.03em;
  color: var(--heading);
  margin-bottom: 8px;
}

.modal-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--ink-soft);
}

.quota-list {
  list-style: none;
  margin: 16px 0 4px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}
.quota-list:empty {
  display: none;
}
.quota-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 14px;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface-sunk);
}
.quota-list li + li {
  border-top: 1px solid var(--border-subtle);
}
.quota-state {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.quota-state-full {
  color: var(--error);
  background: var(--error-bg);
}
.quota-state-open {
  color: var(--olive);
  background: var(--olive-100);
}

.modal-btn {
  width: 100%;
  margin-top: 18px;
}

@keyframes modal-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-rise {
  from { opacity: 0; transform: translateY(12px) scale(0.98); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal-backdrop,
  .modal-card {
    animation: none;
  }
}

/* ==========================================================================
   PENYESUAIAN DARK MODE
   Hal-hal yang tidak cukup diselesaikan dengan menukar nilai token.
   ========================================================================== */

/* Gelombang pemisah header digambar inline di index.html. Path bawahnya
   mengisi celah antara header dan konten, jadi warnanya WAJIB mengikuti latar
   halaman — kalau dibiarkan #f9f8f5, akan muncul pita terang melintang di
   bawah header saat dark mode. Rule CSS menang atas atribut fill di SVG. */
.wave-divider svg path:last-child {
  fill: var(--page-bg);
}

/* Pola mashrabiya pada opacity 0.04 praktis tak terlihat di latar gelap. */
:root[data-theme='dark'] .header-pattern {
  opacity: 0.08;
}

/* Logo Komite PKBM An-Nash memakai teks hitam di atas latar transparan, jadi
   lenyap di atas header gelap. Kedua logo penyelenggara diberi plat putih
   supaya tetap terbaca dan tampak disengaja, bukan tambalan. */
:root[data-theme='dark'] .header-logo {
  background: #ffffff;
  border-radius: 50%;
  padding: 3px;
}

/* Foto berlatar terang menyilaukan di tengah halaman gelap. */
:root[data-theme='dark'] .baqi-banner-img {
  filter: brightness(0.88) saturate(0.96);
}

/* ==========================================================================
   DUDUKAN TOMBOL TEMA
   Widget-nya sendiri dirender dan diberi gaya oleh /theme.js supaya satu
   komponen dipakai bersama halaman peserta dan portal.
   ========================================================================== */
.theme-slot {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
}

@media (max-width: 440px) {
  .theme-slot {
    top: 10px;
    right: 10px;
  }
}

/* ============================================
   AJAKAN AMBIL SERTIFIKAT (layar tiket)
   Muncul hanya setelah panitia merilis sertifikat.
   ============================================ */
.certificate-cta {
  text-align: center;
  background: linear-gradient(135deg, var(--gold-50), var(--surface) 65%);
  border-color: var(--gold-200);
}

.certificate-cta-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.certificate-cta-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-100);
  border: 1px solid var(--gold-200);
  color: var(--gold-600);
}

.certificate-cta-header h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 800;
  color: var(--heading);
  line-height: 1.3;
}

.certificate-cta-note {
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 18px;
}

.btn-certificate {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border-color: var(--gold-600);
  color: var(--on-gold);
  box-shadow: 0 4px 12px rgba(176, 125, 44, 0.25);
}

.btn-certificate:hover {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
}
