/* ==========================================================================
   Halaman sebelum login: masuk, daftar lembaga, cek status, verifikasi kartu.
   Dimuat SESUDAH app.css; semua aturan di bawah body.pre agar halaman admin tidak ikut berubah.
   Font: Plus Jakarta Sans. Ilustrasi kelas ada di app/views/auth/_scene.php.
   ========================================================================== */

body.pre {
  --ink: #14233B;
  --mute: #566883;
  --faint: #8493AB;
  --line: #D9E1EC;
  --line-2: #BFCBDC;
  --wall: #EAF2FB;
  --blue: #2563EB;
  --blue-d: #1D4ED8;
  --blue-l: #E3ECFF;
  --amber: #F2B544;
  --f-p: 'Plus Jakarta Sans', 'IBM Plex Sans', 'Segoe UI', system-ui, sans-serif;
  background: #fff;
  color: var(--ink);
  font: 400 15.5px/1.6 var(--f-p);
}
body.pre h1, body.pre h2, body.pre h3 { font-family: var(--f-p); }
body.pre a { color: var(--blue); }
body.pre :focus-visible { outline: 3px solid rgba(37, 99, 235, .4); outline-offset: 2px; }

/* ---------- Kerangka dua kolom ---------- */
.pre .auth {
  min-height: 100vh; min-height: 100dvh;
  display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  background: #fff;
}
.pre .auth-art {
  position: relative; display: flex; flex-direction: column;
  padding: 0; background: var(--wall); overflow: hidden;
}
.pre .art-top { position: relative; z-index: 2; padding: 34px clamp(28px, 4.5vw, 64px) 0; }
.pre .brand { display: inline-flex; align-items: center; gap: 12px; padding: 0; color: var(--ink); text-decoration: none; }
.pre .brand:hover { text-decoration: none; }
.pre .brand-mark i { border-color: var(--blue); }
.pre .brand-mark i:nth-child(2) { background: conic-gradient(from 180deg, var(--blue) 0 50%, transparent 0); }
.pre .brand-mark i:nth-child(3) { background: var(--blue); }
.pre .brand b { display: block; font: 800 17px/1.1 var(--f-p); letter-spacing: -.01em; color: var(--ink); }
.pre .brand small { display: block; font: 500 12.5px/1.3 var(--f-p); color: var(--mute); margin-top: 2px; }

.pre .art-copy { margin-top: clamp(22px, 4.2vh, 46px); }
.pre .art-copy h2 {
  font: 800 clamp(28px, 3.1vw, 44px)/1.08 var(--f-p); letter-spacing: -.025em;
  color: var(--ink); max-width: 17ch; text-wrap: balance;
}
.pre .art-copy p { margin-top: 14px; color: var(--mute); max-width: 42ch; font-size: 16.5px; line-height: 1.55; }

.pre .scene-wrap { position: relative; flex: 1; min-height: 300px; margin-top: 8px; }
.pre .scene-wrap::before { /* sambungan halus antara teks dan dinding ilustrasi */
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 56px; z-index: 1; pointer-events: none;
  background: linear-gradient(var(--wall), rgba(234, 242, 251, 0));
}
.pre .scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* ---------- Animasi ilustrasi ---------- */
.scene .fore { transform-origin: 0 0; }
.scene .scribble { animation: sc-scribble 4.4s ease-in-out infinite; animation-delay: var(--d, 0s); }
.scene .tap { animation: sc-tap 3.2s ease-in-out infinite; animation-delay: var(--d, 0s); }
.scene .nod { animation: sc-nod 3.4s ease-in-out infinite alternate; }
.scene .head { transform-origin: 0 292px; animation: sc-bob 3.8s ease-in-out infinite; animation-delay: var(--d, 0s); }
.scene .is-think .head { animation-name: sc-tilt; animation-duration: 5s; }
.scene .eye { transform-origin: 0 0; animation: sc-blink 5.2s infinite; animation-delay: calc(var(--d, 0s) * 1.7); }
.scene .sec { transform-origin: 0 0; animation: sc-spin 12s linear infinite; }
.scene .cloud { animation: sc-drift 42s linear infinite; }
.scene .cloud.c2 { animation-duration: 64s; animation-delay: -26s; }
.scene .fillb { opacity: 0; transform-box: fill-box; transform-origin: center; animation-duration: 9s; animation-iteration-count: infinite; animation-delay: var(--d, 0s); }
.scene .fillb.r0 { animation-name: sc-fill0; }
.scene .fillb.r1 { animation-name: sc-fill1; }
.scene .fillb.r2 { animation-name: sc-fill2; }
.scene .think { transform-origin: -26px 46px; opacity: 0; animation: sc-think 9s infinite; animation-delay: 1.3s; }
.scene .think .q { animation: sc-q 9s infinite; animation-delay: 1.3s; }
.scene .think .ok { opacity: 0; animation: sc-ok 9s infinite; animation-delay: 1.3s; }
.is-sending .scene .scribble { animation-duration: 1.5s; }

@keyframes sc-scribble {
  0%, 46%, 100% { transform: rotate(0); }
  5% { transform: rotate(-3.5deg); } 10% { transform: rotate(2.5deg); } 15% { transform: rotate(-3deg); }
  20% { transform: rotate(3deg); } 25% { transform: rotate(-3.5deg); } 30% { transform: rotate(2deg); }
  35% { transform: rotate(-2.5deg); } 40% { transform: rotate(1.5deg); }
}
@keyframes sc-tap { 0%, 70%, 100% { transform: rotate(0); } 76% { transform: rotate(-7deg); } 82% { transform: rotate(0); } 88% { transform: rotate(-7deg); } 94% { transform: rotate(0); } }
@keyframes sc-nod { from { transform: rotate(-1.6deg); } to { transform: rotate(1.6deg); } }
@keyframes sc-bob { 0%, 100% { transform: rotate(0) translateY(0); } 50% { transform: rotate(-2deg) translateY(1.6px); } }
@keyframes sc-tilt { 0%, 100% { transform: rotate(3deg); } 50% { transform: rotate(-2deg) translateY(-1px); } }
@keyframes sc-blink { 0%, 93%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.08); } }
@keyframes sc-spin { to { transform: rotate(360deg); } }
@keyframes sc-drift { to { transform: translateX(240px); } }
@keyframes sc-fill0 { 0%, 8% { opacity: 0; transform: scale(.2); } 11% { opacity: 1; transform: scale(1.2); } 13%, 88% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(1); } }
@keyframes sc-fill1 { 0%, 30% { opacity: 0; transform: scale(.2); } 33% { opacity: 1; transform: scale(1.2); } 35%, 88% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(1); } }
@keyframes sc-fill2 { 0%, 52% { opacity: 0; transform: scale(.2); } 55% { opacity: 1; transform: scale(1.2); } 57%, 88% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(1); } }
@keyframes sc-think { 0% { opacity: 0; transform: scale(.5); } 6% { opacity: 1; transform: scale(1.06); } 9%, 88% { opacity: 1; transform: scale(1); } 94%, 100% { opacity: 0; transform: scale(.9); } }
@keyframes sc-q { 0%, 4% { opacity: 0; } 8%, 42% { opacity: 1; } 47%, 100% { opacity: 0; } }
@keyframes sc-ok { 0%, 46% { opacity: 0; transform: scale(.5); } 52%, 100% { opacity: 1; transform: scale(1); } }
.scene .think .ok { transform-box: fill-box; transform-origin: center; }

/* ---------- Kolom form ---------- */
.pre .auth-form-wrap { display: grid; place-items: center; padding: 40px clamp(22px, 4vw, 64px); background: #fff; }
.pre .auth-form { width: min(420px, 100%); display: grid; gap: 20px; }
.pre .auth-form.shake { animation: a-shake .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes a-shake { 20% { transform: translateX(-9px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.pre .auth-form .brand-mini { display: none; }
.pre .auth-form h1 { font: 800 clamp(30px, 3.4vw, 38px)/1.1 var(--f-p); letter-spacing: -.025em; color: var(--ink); }
.pre .auth-form > p, .pre .lead { color: var(--mute); margin: -8px 0 0; font-size: 15.5px; }
.pre .auth-form > p b { color: var(--ink); }

.pre .f { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.pre .f > span:first-child, .pre .f > legend { font: 700 14px/1.3 var(--f-p); color: var(--ink); }
.pre .f em { font-style: normal; font-weight: 500; color: var(--faint); }
.pre .f small { color: var(--mute); font-size: 13px; line-height: 1.45; }
.pre input[type=text], .pre input[type=password], .pre input[type=email], .pre input[type=tel], .pre input:not([type]), .pre select, .pre textarea {
  width: 100%; min-height: 50px; padding: 12px 15px; font: 500 16px/1.4 var(--f-p); color: var(--ink);
  background: #F8FAFD; border: 1.5px solid var(--line); border-radius: 14px;
  transition: border-color .18s, box-shadow .18s, background-color .18s;
}
.pre input:hover, .pre select:hover, .pre textarea:hover { border-color: var(--line-2); }
.pre input:focus, .pre select:focus, .pre textarea:focus { outline: none; background: #fff; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .15); }
.pre input::placeholder, .pre textarea::placeholder { color: #9AA8BD; font-weight: 400; }
.pre input:user-invalid, .pre select:user-invalid { border-color: #E5484D; background: #FFF8F8; }

.pre .inp { position: relative; display: block; }
.pre .inp > .ic { position: absolute; left: 15px; top: 50%; width: 19px; height: 19px; margin-top: -9.5px; color: var(--faint); pointer-events: none; transition: color .18s; }
.pre .inp input { padding-left: 46px; }
.pre .inp:focus-within > .ic { color: var(--blue); }
.pre .pw { position: relative; display: block; }
.pre .pw input { padding-right: 52px; }
.pre .pw [data-pw] {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px;
  border: 0; background: transparent; border-radius: 10px; color: var(--faint); display: grid; place-items: center; cursor: pointer;
}
.pre .pw [data-pw]:hover { color: var(--blue); background: var(--blue-l); }
.pre .pw [data-pw] .ic { position: static; width: 20px; height: 20px; margin: 0; }
.pre .pw [data-pw] .off, .pre .pw [data-pw][aria-pressed=true] .on { display: none; }
.pre .pw [data-pw][aria-pressed=true] .off { display: block; }
.pre .caps { display: none; align-items: center; gap: 6px; font: 600 13px/1.3 var(--f-p); color: #9A5B00; }
.pre .caps.on { display: flex; }
.pre .caps .ic { width: 16px; height: 16px; }

.pre .btn {
  min-height: 54px; padding: 0 22px; border: 0; border-radius: 14px; font: 700 16px/1 var(--f-p);
  background: var(--blue); color: #fff; box-shadow: 0 10px 24px -10px rgba(37, 99, 235, .7);
  transition: background-color .15s, transform .12s, box-shadow .2s;
}
.pre .btn:hover { background: var(--blue-d); color: #fff; box-shadow: 0 14px 28px -10px rgba(37, 99, 235, .75); }
.pre .btn:active { transform: scale(.985); }
.pre .btn.ghost { background: #fff; color: var(--ink); border: 1.5px solid var(--line); box-shadow: none; min-height: 48px; font-size: 15px; }
.pre .btn.ghost:hover { background: var(--blue-l); border-color: #B7CBFA; color: var(--blue-d); }
.pre .btn .ic { width: 19px; height: 19px; }

.pre .note { display: flex; gap: 10px; padding: 13px 15px; border-radius: 14px; background: #FDECEC; color: #A3262B; border: 1px solid #F6C9CB; font-size: 14.5px; line-height: 1.5; }
.pre .note.info { background: var(--blue-l); color: #1B3FA8; border-color: #C5D6FB; }
.pre .note .ic { margin-top: 2px; }
.pre .note a { color: inherit; font-weight: 700; }

.pre .auth-alt { display: grid; gap: 12px; margin: 4px 0 0; padding: 18px; border: 1.5px dashed var(--line-2); border-radius: 16px; background: #F6F9FE; font-size: 14.5px; }
.pre .auth-alt b { font: 700 15px/1.3 var(--f-p); color: var(--ink); }
.pre .auth-alt span { color: var(--mute); line-height: 1.5; }
.pre .auth-alt > a:last-child { text-align: center; font-weight: 600; text-decoration: none; }
.pre .auth-alt > a:last-child:hover { text-decoration: underline; }
.pre .foot-help { margin: 0; color: var(--faint); font-size: 13px; line-height: 1.5; text-align: center; }

/* ---------- Pendaftaran lembaga ---------- */
.pre .auth.reg .auth-form-wrap { place-items: start center; }
.pre .auth-form.wide { width: min(660px, 100%); padding: 6px 0 28px; }
.pre .reg .auth-art { position: relative; }
@media (min-width: 901px) { .pre .auth.reg .auth-art { position: sticky; top: 0; height: 100vh; height: 100dvh; align-self: start; } }
.pre .reg-steps { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 4px; max-width: 420px; }
.pre .reg-steps li { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 0 0 18px; }
.pre .reg-steps li:last-child { padding-bottom: 0; }
.pre .reg-steps li:not(:last-child)::before { content: ''; position: absolute; left: 7px; top: 22px; bottom: 2px; width: 2px; background: #BCD0EA; border-radius: 2px; }
.pre .reg-steps .st { margin-top: 3px; background: none; width: auto; height: auto; padding: 0; position: relative; z-index: 1; }
.pre .reg-steps .st .bub { width: 16px; height: 16px; background-color: var(--wall); }
.pre .reg-steps b { display: block; font: 700 15px/1.3 var(--f-p); color: var(--ink); }
.pre .reg-steps small { display: block; color: var(--mute); font-size: 13.5px; line-height: 1.45; margin-top: 2px; }
.pre .legend { margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 13.5px; color: var(--mute); }
.pre .legend span { display: inline-flex; align-items: center; gap: 8px; background: none; color: var(--mute); }

.pre .fs { border: 1.5px solid var(--line); border-radius: 18px; padding: 8px 20px 20px; margin: 0; min-width: 0; background: #fff; }
.pre .fs legend { padding: 0 8px; font: 800 15px/1.3 var(--f-p); color: var(--ink); }
.pre .fs legend em { font-style: normal; font-weight: 500; color: var(--faint); font-size: 13.5px; }
.pre .fs-p { color: var(--mute); font-size: 14px; margin: 4px 0 14px; }
.pre .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 16px; }
.pre .grid2 .span2, .pre .span2 { grid-column: 1 / -1; }
.pre .f input[type=file] { padding: 10px 12px; background: #fff; border: 1.5px dashed var(--line-2); border-radius: 14px; font-size: 14px; min-height: 0; }
.pre .drop { display: flex; gap: 14px; align-items: center; padding: 12px; border: 1.5px dashed var(--line-2); border-radius: 14px; background: #F8FAFD; cursor: pointer; position: relative; transition: border-color .18s, background-color .18s; }
.pre .drop:hover, .pre .drop.over { border-color: var(--blue); background: var(--blue-l); }
.pre .drop.picked { border-style: solid; border-color: var(--blue); background: var(--blue-l); }
.pre .drop b { display: block; font-weight: 700; }
.pre .drop small { color: var(--mute); }
.pre .drop-pv { border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--faint); }
.pre .drop-pv.logo { width: 68px; height: 68px; }

.pre .kode-box { display: grid; gap: 6px; justify-items: center; text-align: center; padding: 24px 16px; border-radius: 18px; background: var(--blue-l); border: 1.5px solid #C5D6FB; }
.pre .kode-box b { font: 800 clamp(30px, 8vw, 42px)/1.1 var(--f-p); letter-spacing: .2em; color: #1B3FA8; user-select: all; text-indent: .2em; }
.pre .kode-box small { color: var(--mute); }
.pre .kode-box .btn { min-height: 40px; padding: 0 16px; font-size: 14px; margin-top: 6px; box-shadow: none; }

.pre .hasil { display: grid; gap: 16px; padding: 20px; border: 1.5px solid var(--line); border-radius: 18px; background: #fff; }
.pre .hasil-h { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: flex-start; justify-content: space-between; }
.pre .hasil-h b { font-size: 17px; }
.pre .hasil-h small { display: block; color: var(--mute); margin-top: 3px; font-size: 13.5px; }
.pre .pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px 5px 10px; border-radius: 999px; font-weight: 700; font-size: 13px; white-space: nowrap; }
.pre .trk li > i { width: 16px; height: 16px; margin-top: 3px; }
.pre .trk li::before { left: 7px; top: 19px; }
.pre .trk li b { font-weight: 700; }
.pre .trk li.done > i { background: var(--blue); border-color: var(--blue); }
.pre .trk li.done::before { background: var(--blue); }
.pre .trk li.now > i { border-color: var(--amber); }

/* ---------- Verifikasi kartu ---------- */
.pre .vf { max-width: 520px; margin: 0 auto; min-height: 100vh; min-height: 100dvh; background: #fff; display: flex; flex-direction: column; box-shadow: 0 0 0 1px var(--line); }
.pre .vf-art { position: relative; background: var(--wall); overflow: hidden; flex: none; padding-top: 16px; }
.pre .vf-art .brand { position: relative; z-index: 3; margin-left: 18px; }
.pre .vf-art .scene-wrap { flex: none; height: 176px; min-height: 0; margin-top: 4px; }
.pre .vf-art::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40px; z-index: 2; background: linear-gradient(rgba(255, 255, 255, 0), #fff); }
.pre .vf-body { padding: 0 18px 36px; margin-top: -8px; position: relative; z-index: 3; display: grid; gap: 14px; }
.pre .vf-body .kicker { text-align: center; font: 600 13.5px/1.3 var(--f-p); color: var(--mute); }
.pre .vf .stat { background: var(--cb); border: 1.5px solid var(--c); border-radius: 20px; padding: 22px 18px; text-align: center; box-shadow: none; display: block; }
.pre .vf .stat .ic { width: 60px; height: 60px; border-radius: 50%; background: var(--c); color: #fff; display: grid; place-items: center; margin: 0 auto 12px; }
.pre .vf .stat .ic svg { width: 32px; height: 32px; }
.pre .vf .stat h1 { margin: 0; font: 800 26px/1.15 var(--f-p); letter-spacing: -.02em; color: var(--c); }
.pre .vf .stat p { margin: 8px 0 0; color: var(--ink); font-size: 15px; line-height: 1.5; }
.pre .vf .card { background: #fff; border: 1.5px solid var(--line); border-radius: 18px; padding: 18px; }
.pre .vf .card h2 { margin: 0 0 12px; font: 700 14px/1.3 var(--f-p); color: var(--mute); }
.pre .vf .who { display: flex; gap: 14px; align-items: flex-start; }
.pre .vf .foto { width: 86px; height: 114px; flex: none; border-radius: 12px; object-fit: cover; background: #E6ECF4; border: 1px solid var(--line); display: grid; place-items: center; font-weight: 800; color: var(--mute); font-size: 24px; }
.pre .vf .nama { font: 800 20px/1.2 var(--f-p); overflow-wrap: anywhere; }
.pre .vf .nomor { font: 800 20px/1.2 var(--f-p); font-variant-numeric: tabular-nums; color: var(--c); margin-top: 6px; letter-spacing: .03em; }
.pre .vf .sub { color: var(--mute); font-size: 14.5px; margin-top: 6px; overflow-wrap: anywhere; }
.pre .vf .pim { font: 800 20px/1.25 var(--f-p); overflow-wrap: anywhere; }
.pre .vf .pim-lbl { margin-top: 4px; color: var(--mute); font-size: 14.5px; }
.pre .vf .warn { margin: 0; padding: 11px 13px; background: #FFF4DC; border: 1px solid #ECD48A; border-radius: 12px; font-size: 14.5px; }
.pre .vf .alur { margin: 14px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--mute); display: grid; gap: 5px; }
.pre .vf .alur b { color: var(--ink); font-weight: 700; }
.pre .vf .foot { text-align: center; color: var(--faint); font-size: 12.5px; margin-top: 4px; }

/* ---------- Ponsel & tablet ---------- */
@media (max-width: 900px) {
  .pre .auth { grid-template-columns: 1fr; }
  .pre .auth-art, .pre .auth.reg .auth-art { position: relative; height: auto; }
  .pre .art-top { padding: 16px 20px 0; }
  .pre .brand small { display: none; }
  .pre .art-copy p, .pre .reg-steps, .pre .art-copy .legend { display: none; }
  .pre .art-copy { margin-top: 0; }
  .pre .art-copy h2 { display: none; }
  .pre .scene-wrap { flex: none; height: 214px; min-height: 0; margin-top: 4px; }
  .pre .scene-wrap::before { height: 36px; }
  .pre .brand b { font-size: 16px; }
  .pre .reg .scene-wrap { height: 170px; }
  .pre .auth-form-wrap, .pre .auth.reg .auth-form-wrap {
    place-items: start center; position: relative; z-index: 4; margin-top: -26px; background: #fff;
    border-radius: 26px 26px 0 0; padding: 30px 20px 40px; box-shadow: 0 -10px 30px -18px rgba(20, 35, 59, .35);
  }
  .pre .auth-form { width: min(520px, 100%); }
  .pre .auth-form.wide { padding-bottom: 6px; }
}
@media (max-width: 560px) {
  .pre .grid2 { grid-template-columns: 1fr; }
  .pre .fs { padding: 6px 15px 16px; }
  .pre .btn.span2 { width: 100%; }
  .pre .hasil { padding: 16px; }
}
@media (min-width: 901px) { .pre .reg .scene-wrap::before { height: 18px; } }
@media (max-height: 740px) and (min-width: 901px) {
  .pre .reg .scene-wrap { display: none; }
}

/* ---------- Gerak dikurangi ---------- */
@media (prefers-reduced-motion: reduce) {
  .scene *, .pre .auth-form.shake { animation: none !important; }
  .scene .fillb, .scene .think, .scene .think .q { opacity: 1; }
  .scene .think .ok { opacity: 0; }
}
