/* =========================================================
   FOLA+ — Section Pendaftaran (#daftar)
   ========================================================= */
.reg{
  --r-purple:#5f2de3;
  --r-purple-soft:rgba(95,45,227,.14);
  --r-ink:#1d1a3b;
  --r-text:#222128;
  --r-muted:#6b6880;
  --r-line:#dcdce2;
  --r-ph:#a3a2ae;
  --r-soft:#ecebf6;
  --r-btn:#2b2b2b;
  --r-err:#d4314a;
  --r-ok:#1f9d55;

  position:relative;
  background:#e7e7ea;
  color:var(--r-text);
  font-family:"Inter",system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;
  padding:12px 14px;
  scroll-margin-top:0;
}
.reg *,.reg *::before,.reg *::after{box-sizing:border-box}
.reg input,.reg select,.reg textarea{font-family:inherit;color:var(--r-text)}
.reg button{font-family:inherit}

/* ---------- Card ---------- */
.reg-card{max-width:1312px;margin:0 auto;background:#fff;border-radius:12px;overflow:hidden;
  box-shadow:0 1px 2px rgba(20,16,56,.04)}
.reg-head{height:108px;display:flex;align-items:center;padding:0 48px;background:var(--r-purple)}
.reg-logo{display:block;height:52px;aspect-ratio:720/331;background:#fff;
  -webkit-mask:var(--logo) left center/contain no-repeat;
          mask:var(--logo) left center/contain no-repeat}

.reg-body{display:grid;grid-template-columns:1fr 1fr;gap:40px;padding:66px 58px 70px}

/* ---------- Intro (kiri) ---------- */
.reg-intro{max-width:420px}
.reg-kicker{font-size:11px;font-weight:700;letter-spacing:.02em;color:var(--r-purple);margin-bottom:20px}
.reg-title{font-size:40px;line-height:1.13;font-weight:600;letter-spacing:-.01em;color:var(--r-ink);margin-bottom:24px}
.reg-desc{font-size:15px;line-height:1.55;color:#5c596f;margin-bottom:20px}
.reg-benefits{background:var(--r-soft);border-radius:10px;padding:28px 16px 26px}
.reg-benefits h3{font-size:13px;font-weight:600;color:var(--r-ink);margin-bottom:10px}
.reg-benefits ul{list-style:none;display:grid;gap:8px}
.reg-benefits li{position:relative;padding-left:17px;font-size:12px;line-height:1.35;color:var(--r-muted)}
.reg-benefits li::before{content:"";position:absolute;left:0;top:.2em;width:11px;height:11px;background:currentColor;
  -webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%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' fill='none' stroke='%23000' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center/contain no-repeat}

/* ---------- Form (kanan) ---------- */
.reg-main{width:100%;max-width:548px}
.reg-form-title{font-size:18px;font-weight:600;color:var(--r-ink);margin:2px 0 14px}
.reg-form-sub{font-size:12.5px;color:var(--r-muted);margin-bottom:10px}

.f{margin-bottom:12px;border:0;min-width:0}
.f > label,.f > legend{display:block;font-size:14.5px;font-weight:400;color:var(--r-text);margin-bottom:8px;padding:0}
.f-help{font-size:14px;color:var(--r-muted);margin:-2px 0 10px}
.f-hint{font-size:12px;color:var(--r-muted);margin-top:6px}

.reg input[type=text],.reg input[type=tel],.reg input[type=email],.reg select,.reg textarea{
  display:block;width:100%;height:38px;padding:0 14px;
  font-size:14.5px;line-height:1.4;color:var(--r-text);
  background:#fff;border:1px solid var(--r-line);border-radius:6px;outline:none;
  transition:border-color .15s, box-shadow .15s, background-color .15s;
  -webkit-appearance:none;appearance:none}
.reg textarea{resize:none;min-height:38px;padding:8px 14px;overflow:hidden}
.reg textarea.f-tall{height:auto;min-height:84px;line-height:1.5}
.reg ::placeholder{color:var(--r-ph);opacity:1}
.reg input:focus,.reg select:focus,.reg textarea:focus{border-color:var(--r-purple);box-shadow:0 0 0 3px var(--r-purple-soft)}

.reg select{padding-right:36px;cursor:pointer;text-overflow:ellipsis;
  background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239a99a6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") right 12px center/16px no-repeat}
.reg select.is-empty{color:var(--r-ph)}
.reg select option{color:var(--r-text)}
.reg select:disabled{cursor:not-allowed;background-color:#f7f7f9}
.f-sub.is-loading select{background-image:none}
.f-sub.is-loading::after{content:"";position:absolute;right:13px;top:12px;width:14px;height:14px;border-radius:50%;
  border:2px solid var(--r-line);border-top-color:var(--r-purple);animation:regSpin .7s linear infinite}

.f-grid{display:grid;grid-template-columns:1fr 1fr;gap:8px 6px}
.f-sub{position:relative;min-width:0}

/* Error */
.f-err{display:none;font-size:12px;line-height:1.4;color:var(--r-err);margin-top:6px}
.has-err > .f-err{display:block}
.has-err > input,.has-err > select,.has-err > textarea{border-color:var(--r-err)}
.has-err > input:focus,.has-err > select:focus,.has-err > textarea:focus{box-shadow:0 0 0 3px rgba(212,49,74,.14)}
.f-err .f-retry{margin-left:6px;padding:0;border:0;background:none;color:var(--r-purple);font-size:inherit;font-weight:600;text-decoration:underline;cursor:pointer}

/* Upload KTP */
.f-upload{margin:18px 0 14px}
.f > .upload-btn{display:inline-flex;margin:0;align-items:center;gap:8px;font-size:15px;font-weight:500;color:var(--r-text);cursor:pointer;
  padding:2px 4px 2px 0;border-radius:6px;transition:color .15s}
.upload-btn svg{width:24px;height:24px;fill:none;stroke:currentColor;stroke-width:2.4;stroke-linecap:round;stroke-linejoin:round}
.upload-btn:hover{color:var(--r-purple)}
#f-ktp:focus-visible + .upload-btn{outline:2px solid var(--r-purple);outline-offset:3px}
.has-err > .upload-btn{color:var(--r-err)}
.upload-file{display:flex;align-items:center;gap:12px;margin-top:10px;padding:8px 8px 8px 8px;border:1px solid var(--r-line);border-radius:8px;background:#fafafc}
.upload-file[hidden]{display:none}
.upload-thumb{flex:none;width:52px;height:36px;border-radius:5px;overflow:hidden;background:var(--r-soft);display:grid;place-items:center;
  font-size:10px;font-weight:700;color:var(--r-purple)}
.upload-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.upload-meta{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.upload-meta b{font-size:13px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.upload-meta small{font-size:11.5px;color:var(--r-muted)}
.upload-remove{flex:none;width:30px;height:30px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;cursor:pointer;color:var(--r-muted)}
.upload-remove:hover{background:#eeeef2;color:var(--r-err)}
.upload-remove svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}

/* Hasil OCR KTP (penanda saja, tidak menolak pendaftaran) */
.ocr-note{display:flex;align-items:flex-start;gap:7px;margin-top:8px;font-size:12.5px;line-height:1.45;color:var(--r-muted)}
.ocr-note[hidden],.f-note[hidden]{display:none}
.ocr-note::before{content:"";flex:none;width:12px;height:12px;margin-top:2px;border-radius:50%}
.ocr-note.is-busy::before{border:2px solid var(--r-line);border-top-color:var(--r-purple);animation:regSpin .7s linear infinite}
.ocr-note.is-ok{color:var(--r-ok)}
.ocr-note.is-ok::before{background:var(--r-ok);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%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' fill='none' stroke='%23000' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E") center/contain no-repeat}
.ocr-note.is-warn,.f-note{color:#a15c00}
.ocr-note.is-warn::before{background:#e39b1b}
.f-note{font-size:12.5px;line-height:1.45;margin-top:6px}
.f-note b{font-weight:600;letter-spacing:.02em}

/* Checkbox */
.f-agree{margin:2px 0 14px}
.f > .f-check{display:flex;margin:0;align-items:flex-start;gap:6px;font-size:14.5px;line-height:1.35;color:var(--r-text);cursor:pointer}
.f-check input{flex:none;width:14px;height:14px;margin:2px 0 0;accent-color:var(--r-purple);cursor:pointer}
.has-err .f-check input{outline:1.5px solid var(--r-err);outline-offset:1px}
.reg-link{color:var(--r-purple);text-decoration:none}
.reg-link:hover{text-decoration:underline}

/* Honeypot */
.hp{position:absolute!important;left:-9999px;width:1px;height:1px;overflow:hidden}

/* Alert & submit */
.reg-alert{margin:0 0 12px;padding:10px 12px;border-radius:6px;font-size:13px;line-height:1.45;
  color:#8f1d2f;background:#fdecef;border:1px solid #f6c8d0}
.reg-alert[hidden]{display:none}
.reg-submit{position:relative;display:flex;align-items:center;justify-content:center;gap:10px;width:100%;height:50px;
  border:0;border-radius:6px;background:var(--r-btn);color:#fff;font-size:14.5px;font-weight:500;cursor:pointer;
  transition:background-color .15s, transform .15s}
.reg-submit:hover{background:#151515}
.reg-submit:active{transform:translateY(1px)}
.reg-submit:focus-visible{outline:2px solid var(--r-purple);outline-offset:3px}
.reg-submit:disabled{cursor:progress;background:#4a4a4a}
.reg-spinner{display:none;width:16px;height:16px;border-radius:50%;border:2px solid rgba(255,255,255,.35);border-top-color:#fff;animation:regSpin .7s linear infinite}
.reg-submit.is-busy .reg-spinner{display:block}
@keyframes regSpin{to{transform:rotate(360deg)}}
.reg-note{margin-top:12px;font-size:11px;line-height:1.6;text-align:center;color:var(--r-muted)}

/* Sukses */
.reg-success{text-align:center;padding:48px 8px;outline:none}
.reg-success[hidden]{display:none}
.reg-success-ic{width:64px;height:64px;margin:0 auto 18px;border-radius:50%;display:grid;place-items:center;
  background:rgba(31,157,85,.12);color:var(--r-ok);animation:regPop .5s cubic-bezier(.2,.8,.2,1)}
.reg-success-ic svg{width:30px;height:30px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round}
.reg-success h3{font-size:22px;font-weight:600;color:var(--r-ink);margin-bottom:10px}
.reg-success p{font-size:14.5px;line-height:1.6;color:#5c596f;max-width:42ch;margin:0 auto}
.reg-success-id{margin-top:16px!important;display:inline-block;padding:8px 14px;border-radius:999px;background:var(--r-soft);font-size:13px!important;color:var(--r-ink)!important}
@keyframes regPop{from{transform:scale(.6);opacity:0}to{transform:none;opacity:1}}

/* Dialog syarat & ketentuan */
.reg-dialog{width:min(560px,calc(100vw - 32px));max-height:min(80vh,640px);margin:auto;padding:0;border:0;border-radius:12px;
  color:var(--r-text);background:#fff;box-shadow:0 30px 80px rgba(10,8,40,.35);font-family:"Inter",system-ui,sans-serif}
.reg-dialog[open]{display:flex;flex-direction:column}
.reg-dialog::backdrop{background:rgba(10,8,30,.55);backdrop-filter:blur(2px)}
.reg-dialog-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 20px;border-bottom:1px solid #eee}
.reg-dialog-head h3{font-size:17px;font-weight:600;color:var(--r-ink)}
.reg-dialog-close{width:32px;height:32px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;cursor:pointer;color:var(--r-muted)}
.reg-dialog-close:hover{background:#f1f1f4}
.reg-dialog-close svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round}
.reg-dialog-body{padding:16px 20px;overflow:auto}
.reg-dialog-body ol{padding-left:20px;display:grid;gap:10px;font-size:14px;line-height:1.55;color:#4a4859}
.reg-dialog-foot{padding:14px 20px 18px;border-top:1px solid #eee}
.reg-dialog-foot .reg-submit{height:44px}

/* ---------- Responsive ---------- */
@media (max-width:960px){
  .reg-body{grid-template-columns:1fr;gap:28px;padding:44px 32px 52px}
  .reg-intro,.reg-main{max-width:560px;margin:0 auto}
}
@media (max-width:640px){
  .reg{padding:10px}
  .reg-card{border-radius:10px}
  .reg-head{height:52px;justify-content:center;padding:0 16px}
  .reg-logo{height:30px;-webkit-mask-position:center;mask-position:center}
  .reg-body{gap:22px;padding:20px 18px 22px}
  .reg-kicker{font-size:10px;margin-bottom:12px}
  .reg-title{font-size:27px;line-height:1.15;margin-bottom:12px}
  .reg-desc{font-size:14px;margin-bottom:14px}
  .reg-benefits{padding:16px 14px}
  .reg-benefits h3{font-size:12.5px}
  .reg-form-title{font-size:17px;margin:0 0 12px}
  .f-grid{grid-template-columns:1fr;gap:10px}
  .reg textarea{min-height:64px}
  .reg input[type=text],.reg input[type=tel],.reg input[type=email],.reg select,.reg textarea{font-size:16px} /* cegah auto-zoom iOS */
  .f > .f-check{font-size:14px}
  .reg-note{font-size:10.5px}
}

@media (prefers-reduced-motion:reduce){
  .reg *,.reg *::before,.reg *::after{animation-duration:.001ms!important;transition-duration:.001ms!important}
}
