/* =========================================================
   Halaman Formulir Pendaftaran (SPMB) — memakai token dari style.css
   ========================================================= */
.hero--form { height: clamp(320px, 30vw, 400px); }
.hero--form .star { --t: clamp(130px, 17vw, 240px); }
.form-sec { padding-bottom: clamp(80px, 11vw, 140px); }

.reg { max-width: 920px; margin: clamp(48px, 7vw, 80px) auto 0; display: grid; gap: 28px; }
.fcard {
  margin: 0; min-width: 0; border: 1px solid #cfcfcf; background: var(--card);
  border-radius: var(--radius); padding: clamp(22px, 3.4vw, 40px);
}
.fcard__head { display: flex; align-items: center; gap: 16px; padding: 0; float: left; width: 100%; margin-bottom: 26px; }
.fcard__head + .fgrid { clear: both; }
.fcard__no {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--grad); color: #fff; font-weight: 600; font-size: 18px;
}
.fcard__title { display: block; font-size: clamp(20px, 2.2vw, 26px); font-weight: 500; letter-spacing: -.015em; line-height: 1.15; }
.fcard__sub { display: block; margin-top: 4px; font-size: 14px; color: var(--muted); }

.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field--full { grid-column: 1 / -1; }
.field label, .field .lbl { font-size: 14px; font-weight: 500; color: #222; }
.req { color: #c0392b; }
.opt { color: var(--muted); font-weight: 400; font-size: 12.5px; }
.field input[type="text"], .field input[type="number"], .field input[type="date"], .field input[type="tel"],
.field select, .field textarea {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink); background: #fff;
  border: 1.3px solid #cfcfcf; border-radius: 9px; padding: 0 16px; height: 52px;
  transition: border-color .25s, box-shadow .25s; appearance: none; -webkit-appearance: none; outline: 0;
}
.field textarea { height: auto; min-height: 96px; padding: 14px 16px; resize: vertical; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: #9a9a9a; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: #9fb9aa; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--g-600); box-shadow: 0 0 0 4px rgba(23,152,98,.16); }
.sel { position: relative; }
.sel::after {
  content: ""; position: absolute; right: 18px; top: 50%; width: 8px; height: 8px; margin-top: -6px;
  border-right: 2px solid #444; border-bottom: 2px solid #444; transform: rotate(45deg); pointer-events: none;
}
.field select { padding-right: 42px; cursor: pointer; }
.hint { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.err { display: none; font-size: 12.5px; color: #c0392b; font-weight: 500; }
.field.is-invalid .err { display: block; }
.field.is-invalid input:not([type="radio"]):not([type="checkbox"]), .field.is-invalid select, .field.is-invalid textarea { border-color: #c0392b; box-shadow: 0 0 0 4px rgba(192,57,43,.1); }

.chips { display: flex; gap: 12px; flex-wrap: wrap; }
.chip { position: relative; flex: 1 1 0; min-width: 120px; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 9px;
  border: 1.3px solid #cfcfcf; background: #fff; font-size: 15px; font-weight: 500; transition: .25s var(--ease);
}
.chip:hover span { border-color: #9fb9aa; }
.chip input:checked + span { background: var(--g-600); border-color: var(--g-600); color: #fff; }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(23,152,98,.2); }
.field.is-invalid .chip span { border-color: #c0392b; }

.docs { margin: 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; }
.docs li { position: relative; padding-left: 30px; font-size: 14.5px; line-height: 1.4; }
.docs li::before {
  content: ""; position: absolute; left: 0; top: 1px; width: 20px; height: 20px; border-radius: 50%; background: var(--g-600);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 100 24 12 12 0 000-24zm-1.6 17.4L5.6 12.6l1.7-1.7 3.1 3.1 6.3-6.3 1.7 1.7z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 0a12 12 0 100 24 12 12 0 000-24zm-1.6 17.4L5.6 12.6l1.7-1.7 3.1 3.1 6.3-6.3 1.7 1.7z'/%3E%3C/svg%3E") center / contain no-repeat;
}
.agree { display: flex; gap: 14px; align-items: flex-start; cursor: pointer; font-size: 14.5px !important; font-weight: 400 !important; line-height: 1.5; }
.agree input { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--g-600); cursor: pointer; }

.reg__submit { display: flex; flex-direction: column; align-items: center; gap: 18px; margin-top: 12px; text-align: center; }
.reg__note { font-size: 14px; color: var(--muted); max-width: 520px; line-height: 1.5; }
.reg__btn { width: min(360px, 100%); gap: 12px; color: #fff; cursor: pointer; }

.done { max-width: 620px; margin: clamp(48px, 7vw, 80px) auto 0; text-align: center; background: var(--card); border: 1px solid #cfcfcf; border-radius: var(--radius); padding: clamp(32px, 5vw, 56px) clamp(22px, 4vw, 48px); }
.done[hidden] { display: none; }
.done__icon { width: 72px; height: 72px; margin: 0 auto 22px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); color: #fff; box-shadow: 0 14px 28px -12px rgba(19,119,69,.6); }
.done__title { font-size: clamp(26px, 3vw, 34px); font-weight: 500; letter-spacing: -.02em; }
.done__text { margin-top: 14px; font-size: 15px; line-height: 1.55; color: #444; }
.done__btns { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 30px; }
.done__btns .btn--lg { color: #fff; }
.done__back { width: min(310px, 100%); }

/* honeypot anti-bot (disembunyikan dari manusia) */
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.reg__btn[disabled] { opacity: .75; cursor: progress; transform: none; }
.reg__btn.is-loading .reg__icon { animation: regSpin .9s linear infinite; }
@keyframes regSpin { to { transform: rotate(360deg); } }

.done__nomor {
  margin: 26px auto 0; padding: 20px 24px; max-width: 360px; border-radius: 16px;
  background: #fff; border: 1.5px dashed #9fc7b1; display: flex; flex-direction: column; gap: 6px;
}
.done__nomor span { font-size: 13px; color: var(--muted); }
.done__nomor strong { font-size: clamp(24px, 3vw, 30px); font-weight: 700; color: var(--g-800); letter-spacing: .02em; }
.done__nomor small { font-size: 13px; color: var(--muted); }
.done__text--sm { font-size: 14px; color: var(--muted); margin-top: 22px; }
.done__icon--warn { background: linear-gradient(160deg, #d9822b, #b8641a); box-shadow: 0 14px 28px -12px rgba(184,100,26,.6); }
.done__home { font-size: 14px; font-weight: 500; color: var(--g-text); text-decoration: underline; text-underline-offset: 4px; background: none; border: 0; cursor: pointer; padding: 6px; }
.done__btns .btn--lg { cursor: pointer; }

@media print {
  .header, .hero, .sec-head, .footer, .done__btns, .done__icon { display: none !important; }
  .form-sec { padding: 0 !important; }
  .done { border: 1.5px solid #137745; margin: 20px auto; box-shadow: none; }
  .done::before { content: "BUKTI PENDAFTARAN — MTs. Roudlotusy Syifa"; display: block; font-weight: 700; color: #137745; margin-bottom: 14px; }
  .done__nomor { border-color: #137745; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

@media (max-width: 820px) {
  .hero--form { height: auto; min-height: 340px; }
  .hero--form .star { left: 74%; top: 32%; --t: clamp(90px, 26vw, 140px); }
  .hero--form .hero__content { padding-bottom: 40px; }
  .reg { gap: 20px; }
  .fgrid { grid-template-columns: 1fr; gap: 18px; }
  .docs { grid-template-columns: 1fr; }
  .chip { min-width: 0; }
  .fcard__no { width: 40px; height: 40px; font-size: 16px; }
}
