/* =========================================================
   e-Himung · Kiosk Self-Service
   Tema gelap elegan (teal + amber), dioptimalkan untuk layar 1080p
   ========================================================= */
:root {
  --teal: #14b8a6; --teal-d: #0f766e; --teal-dd: #0b3f3b;
  --amber: #fbbf24; --ink: #0f172a; --muted: #64748b;
  --glass: rgba(255,255,255,.07); --glass-b: rgba(255,255,255,.12);
}
* { -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body { margin: 0; overflow: hidden; color: #fff; background: #041a18; font-family: "Plus Jakarta Sans", system-ui, sans-serif; user-select: none; }
input, textarea { user-select: text; }

/* ---------- Latar ---------- */
.k-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: radial-gradient(120% 90% at 20% 0%, #0d4a45 0%, #072e2b 45%, #031513 100%); }
.blob { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .55; animation: drift 22s ease-in-out infinite alternate; }
.b1 { width: 46vw; height: 46vw; background: #0f9488; left: -10vw; top: -14vw; }
.b2 { width: 34vw; height: 34vw; background: #b45309; right: -8vw; bottom: -12vw; opacity: .35; animation-duration: 28s; }
.b3 { width: 26vw; height: 26vw; background: #2dd4bf; right: 22vw; top: 18vh; opacity: .18; animation-duration: 18s; }
@keyframes drift { to { transform: translate(6vw, 4vh) scale(1.12); } }
.k-grid { position: absolute; inset: 0; opacity: .05; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 48px 48px; mask-image: radial-gradient(60% 60% at 60% 45%, #000, transparent); }

.glass { background: var(--glass); border: 1px solid var(--glass-b); border-radius: 32px; backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.grad-text { background: linear-gradient(90deg, #5eead4, #fde68a); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Bar atas ---------- */
.k-top { position: fixed; top: 0; left: 0; right: 0; z-index: 20; display: flex; justify-content: space-between; align-items: center; padding: 22px 48px; }
.k-logo { width: 54px; height: 54px; border-radius: 16px; background: #fff; padding: 4px; object-fit: contain; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.k-brand { font-weight: 800; font-size: 1.25rem; letter-spacing: -.2px; }
.k-sub { font-size: .85rem; color: rgba(255,255,255,.6); }
.k-clock { font-weight: 800; font-size: 2.2rem; line-height: 1; font-variant-numeric: tabular-nums; letter-spacing: -1px; }
.k-date { font-size: .85rem; color: rgba(255,255,255,.65); margin-top: 4px; }
.k-iconbtn { width: 44px; height: 44px; border-radius: 14px; border: 1px solid var(--glass-b); background: var(--glass); color: #fff; }

/* ---------- Layar ---------- */
.k-screen { position: fixed; inset: 0; z-index: 10; display: flex; flex-direction: column; opacity: 0; visibility: hidden; transform: scale(1.015); transition: opacity .45s ease, transform .45s ease, visibility 0s .45s; }
.k-screen.active { opacity: 1; visibility: visible; transform: none; transition: opacity .45s ease, transform .45s ease; }

/* ---------- 1. Siaga ---------- */
.idle-wrap { flex: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 4vw; align-items: center; padding: 120px 6vw 90px; }
.k-kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .85rem; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; color: var(--amber); }
.k-kicker .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 0 rgba(251,191,36,.6); animation: ping 1.8s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 12px rgba(251,191,36,0); } 100% { box-shadow: 0 0 0 0 rgba(251,191,36,0); } }
.idle-title { color: #fff; font-size: clamp(2.6rem, 4.4vw, 5rem); font-weight: 800; line-height: 1.04; letter-spacing: -2px; margin: 18px 0 18px; }
.idle-lead { font-size: clamp(1rem, 1.25vw, 1.35rem); color: rgba(255,255,255,.72); max-width: 640px; line-height: 1.6; }
.steps3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 34px; max-width: 760px; }
.steps3 .st { position: relative; padding: 22px 20px; border-radius: 22px; background: var(--glass); border: 1px solid var(--glass-b); }
.steps3 .st.on { background: linear-gradient(160deg, rgba(20,184,166,.35), rgba(15,118,110,.15)); border-color: rgba(94,234,212,.45); }
.steps3 .n { position: absolute; top: 16px; right: 18px; font-weight: 800; font-size: 1.6rem; color: rgba(255,255,255,.15); }
.steps3 i { font-size: 1.8rem; color: #5eead4; display: block; margin-bottom: 10px; }
.steps3 b { display: block; font-size: 1.05rem; }
.steps3 span { font-size: .85rem; color: rgba(255,255,255,.6); line-height: 1.45; display: block; margin-top: 4px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 40px; background: var(--glass); border: 1px solid var(--glass-b); font-size: .95rem; color: rgba(255,255,255,.85); }
.pill b { color: #fff; }
.pill-out { border-color: rgba(251,191,36,.35); color: #fde68a; }

.idle-right { display: flex; flex-direction: column; align-items: center; }
.scan-visual { position: relative; width: min(34vw, 460px); aspect-ratio: 1; display: flex; align-items: center; justify-content: center; }
.ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(94,234,212,.35); animation: ripple 3.6s ease-out infinite; }
.ring.r2 { animation-delay: 1.2s; } .ring.r3 { animation-delay: 2.4s; }
@keyframes ripple { from { transform: scale(.55); opacity: .9; } to { transform: scale(1.05); opacity: 0; } }
.vcard { position: relative; width: 52%; aspect-ratio: 54/85.6; border-radius: 22px; background: #fff; color: var(--ink); overflow: hidden; box-shadow: 0 40px 80px rgba(0,0,0,.5); animation: floaty 4.5s ease-in-out infinite; display: flex; flex-direction: column; align-items: center; }
@keyframes floaty { 50% { transform: translateY(-14px) rotate(-2deg); } }
.vc-top { width: 100%; background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; display: flex; align-items: center; gap: 8px; padding: 14px; font-weight: 800; letter-spacing: 1.5px; font-size: .8rem; }
.vc-top img { width: 26px; height: 26px; background: #fff; border-radius: 7px; padding: 2px; }
.vc-qr { margin-top: 18%; width: 64%; aspect-ratio: 1; padding: 6px; background: #fff; border-radius: 10px; }
.vc-qr img, .vc-qr canvas { width: 100% !important; height: auto !important; }
.vc-code { font-weight: 800; letter-spacing: 3px; margin-top: 10px; font-size: .9rem; }
.vc-foot { margin-top: auto; width: 100%; background: #fef3c7; color: #92400e; font-size: .62rem; font-weight: 700; text-align: center; padding: 9px 6px; letter-spacing: .3px; }
.beam { position: absolute; left: 8%; right: 8%; height: 3px; background: #22d3ee; box-shadow: 0 0 20px 6px rgba(34,211,238,.6); border-radius: 3px; animation: beam 2.2s ease-in-out infinite; }
@keyframes beam { 0%,100% { top: 34%; } 50% { top: 72%; } }
.scan-cta { text-align: center; margin-top: 18px; }
.scan-cta .arrow { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%; background: var(--amber); color: #78350f; display: flex; align-items: center; justify-content: center; font-size: 1.5rem; animation: bob 1.4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(8px); } }
.scan-cta .t { font-size: clamp(1.4rem, 2vw, 2.1rem); font-weight: 800; }
.scan-cta .s { color: rgba(255,255,255,.6); }

.ticker { position: absolute; bottom: 0; left: 0; right: 0; height: 52px; overflow: hidden; background: rgba(0,0,0,.25); border-top: 1px solid rgba(255,255,255,.06); display: flex; align-items: center; }
.ticker-in { display: inline-flex; gap: 70px; white-space: nowrap; padding-left: 100%; animation: tick 40s linear infinite; color: rgba(255,255,255,.75); font-size: .95rem; }
.ticker-in i { color: var(--amber); margin-right: 6px; }
@keyframes tick { to { transform: translateX(-100%); } }

/* ---------- 2. Formulir ---------- */
.form-shell { flex: 1; display: grid; grid-template-columns: 320px 1fr; gap: 28px; padding: 112px 48px 40px; min-height: 0; }
.form-side { display: flex; flex-direction: column; padding: 28px; border-radius: 30px; background: rgba(0,0,0,.22); border: 1px solid var(--glass-b); }
.card-chip { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 20px; background: linear-gradient(135deg, rgba(251,191,36,.25), rgba(251,191,36,.08)); border: 1px solid rgba(251,191,36,.4); }
.card-chip i { font-size: 2rem; color: var(--amber); }
.card-chip small { display: block; color: rgba(255,255,255,.6); font-size: .78rem; }
.card-chip b { font-size: 1.35rem; letter-spacing: 1.5px; }
.wsteps { list-style: none; padding: 0; margin: 34px 0; }
.wsteps li { display: flex; gap: 14px; align-items: center; padding: 14px 0; color: rgba(255,255,255,.45); position: relative; }
.wsteps li:not(:last-child)::after { content: ""; position: absolute; left: 21px; top: 60px; height: 22px; width: 2px; background: rgba(255,255,255,.12); }
.wsteps .b { width: 44px; height: 44px; border-radius: 50%; border: 2px solid rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; transition: .3s; }
.wsteps b { display: block; font-size: 1rem; } .wsteps small { font-size: .8rem; }
.wsteps li.on { color: #fff; } .wsteps li.on .b { background: var(--amber); border-color: var(--amber); color: #78350f; box-shadow: 0 0 0 6px rgba(251,191,36,.18); }
.wsteps li.done { color: rgba(255,255,255,.8); } .wsteps li.done .b { background: var(--teal); border-color: var(--teal); color: #fff; font-size: 0; }
.wsteps li.done .b::before { content: "\F26E"; font-family: "bootstrap-icons"; font-size: 1.3rem; }
.idle-meter { height: 6px; border-radius: 6px; background: rgba(255,255,255,.1); overflow: hidden; margin-bottom: 8px; }
.idle-meter div { height: 100%; width: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); transition: width 1s linear; }

.form-main { position: relative; display: flex; flex-direction: column; min-height: 0; background: #f8fafc; color: var(--ink); border-radius: 30px; padding: 34px 40px 0; box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.wstep { display: none; flex: 1; overflow-y: auto; padding-bottom: 20px; animation: stepIn .4s ease; }
.wstep.on { display: block; }
@keyframes stepIn { from { opacity: 0; transform: translateX(30px); } to { opacity: 1; transform: none; } }
.ft { color: var(--ink); font-weight: 800; font-size: 2rem; letter-spacing: -.8px; margin-bottom: 24px; display: flex; align-items: baseline; gap: 14px; }
.ft span { font-size: .9rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.kl { font-weight: 700; font-size: .95rem; margin-bottom: 8px; display: block; color: #334155; }
.kl em { color: #e11d48; font-style: normal; }
.kinput { display: flex; align-items: center; gap: 12px; height: 64px; padding: 0 20px; border-radius: 18px; background: #fff; border: 2px solid #e2e8f0; transition: .2s; }
.kinput i { font-size: 1.3rem; color: var(--teal-d); }
.kinput input { flex: 1; border: 0; outline: 0; font-size: 1.2rem; font-weight: 600; background: transparent; color: var(--ink); min-width: 0; }
.kinput input::placeholder, .ktext::placeholder { color: #a8b3c2; font-weight: 500; }
.kinput:focus-within, .ktext:focus { border-color: var(--teal); box-shadow: 0 0 0 5px rgba(20,184,166,.15); }
.kinput.bad, .tiles.bad, .peg-grid.bad, .ktext.bad, .sig.bad, .consent.bad { border-color: #f43f5e !important; animation: shake .4s; }
@keyframes shake { 25%,75% { transform: translateX(-6px); } 50% { transform: translateX(6px); } }
.ktext { width: 100%; border-radius: 18px; border: 2px solid #e2e8f0; padding: 14px 18px; font-size: 1.1rem; font-weight: 500; outline: 0; resize: none; }
.welcome-back { margin-top: 10px; font-size: .95rem; color: #047857; font-weight: 600; display: none; }
.welcome-back.on { display: block; animation: stepIn .4s; }

.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; border: 2px solid transparent; border-radius: 20px; }
.tile { display: flex; align-items: center; gap: 12px; min-height: 70px; padding: 12px 16px; border-radius: 18px; border: 2px solid #e2e8f0; background: #fff; font-weight: 700; font-size: .95rem; text-align: left; color: #334155; transition: .15s; }
.tile i { font-size: 1.5rem; color: var(--teal-d); width: 44px; height: 44px; border-radius: 12px; background: #ecfdf9; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.tile:hover { border-color: #99f6e4; }
.tile.on { border-color: var(--teal); background: #f0fdfa; box-shadow: 0 8px 22px rgba(20,184,166,.18); color: var(--teal-d); }
.tile.on i { background: var(--teal); color: #fff; }

.peg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; max-height: 34vh; overflow-y: auto; padding: 4px; border: 2px solid transparent; border-radius: 20px; }
.peg { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; border: 2px solid #e2e8f0; background: #fff; text-align: left; transition: .15s; }
.peg .av { width: 46px; height: 46px; border-radius: 14px; background: linear-gradient(135deg, #ccfbf1, #99f6e4); color: var(--teal-d); font-weight: 800; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.peg b { display: block; font-size: .95rem; line-height: 1.25; color: var(--ink); }
.peg small { display: block; font-size: .78rem; color: var(--muted); line-height: 1.3; margin-top: 2px; }
.peg.on { border-color: var(--teal); background: #f0fdfa; box-shadow: 0 8px 22px rgba(20,184,166,.18); }
.peg.on .av { background: var(--teal); color: #fff; }
.peg.lain .av { background: #fef3c7; color: #b45309; }

.stepper { display: flex; height: 64px; border-radius: 18px; border: 2px solid #e2e8f0; background: #fff; overflow: hidden; }
.stepper button { width: 64px; border: 0; background: #f1f5f9; font-size: 1.3rem; color: var(--teal-d); }
.stepper input { flex: 1; width: 40px; border: 0; text-align: center; font-size: 1.5rem; font-weight: 800; outline: 0; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1.5px solid #cbd5e1; background: #fff; border-radius: 30px; padding: 8px 16px; font-weight: 600; font-size: .9rem; color: #475569; transition: .15s; }
.chip:hover, .chip.on { border-color: var(--teal); color: var(--teal-d); background: #f0fdfa; }

.summary { border-radius: 24px; background: #fff; border: 1px solid #e2e8f0; padding: 8px 24px; }
.summary .r { display: flex; gap: 16px; padding: 13px 0; border-bottom: 1px dashed #e2e8f0; }
.summary .r:last-child { border: 0; }
.summary .r span { width: 150px; color: var(--muted); font-size: .9rem; flex-shrink: 0; }
.summary .r b { font-size: 1rem; word-break: break-word; }
.summary .edit { margin-left: auto; color: var(--teal-d); font-size: .85rem; font-weight: 700; cursor: pointer; white-space: nowrap; }
.cam-box { position: relative; aspect-ratio: 4/3; border-radius: 20px; overflow: hidden; background: #0f172a; }
.cam-box video, .cam-box img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.cam-box img { display: none; transform: none; }
.cam-empty { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; color: #94a3b8; gap: 6px; }
.cam-empty i { font-size: 2rem; }
.sig { width: 100%; height: 220px; border-radius: 20px; border: 2px dashed #cbd5e1; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='400' height='220'%3E%3Cline x1='30' y1='170' x2='370' y2='170' stroke='%23e2e8f0' stroke-width='2'/%3E%3C/svg%3E") center/100% 100% no-repeat; touch-action: none; cursor: crosshair; }
.consent { display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 18px; background: #f0fdfa; border: 2px solid #ccfbf1; cursor: pointer; font-size: .95rem; color: #134e4a; }
.consent input { width: 26px; height: 26px; accent-color: var(--teal-d); flex-shrink: 0; margin-top: 1px; }

.form-nav { display: flex; align-items: center; gap: 16px; padding: 20px 0 28px; border-top: 1px solid #e2e8f0; }
.form-err { flex: 1; color: #e11d48; font-weight: 600; font-size: .95rem; text-align: center; }
.btn-k { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 64px; padding: 0 34px; border-radius: 20px; border: 0; font-weight: 800; font-size: 1.15rem; transition: .15s; }
.btn-k:active { transform: scale(.97); }
.btn-k.sm { height: 52px; padding: 0 26px; font-size: 1rem; border-radius: 16px; }
.btn-k.primary { background: linear-gradient(135deg, #14b8a6, #0f766e); color: #fff; box-shadow: 0 12px 28px rgba(15,118,110,.35); }
.btn-k.success { background: linear-gradient(135deg, #f59e0b, #d97706); color: #fff; box-shadow: 0 12px 28px rgba(217,119,6,.35); padding: 0 40px; }
.btn-k.ghost { background: transparent; color: #475569; border: 2px solid #e2e8f0; }
.btn-k.ghost.dark { color: #334155; }
.k-screen > .auto-back .btn-k.ghost { color: #fff; border-color: rgba(255,255,255,.25); }

/* Kotak konfirmasi (tanpa foto & tanda tangan) */
.confirm-box { height: 100%; border-radius: 24px; background: linear-gradient(160deg, #f0fdfa, #fff); border: 1px solid #ccfbf1; padding: 28px; display: flex; flex-direction: column; gap: 14px; }
.confirm-box .cb-ic { width: 64px; height: 64px; border-radius: 20px; background: var(--teal); color: #fff; font-size: 1.9rem; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 24px rgba(20,184,166,.3); }
.confirm-box h4 { color: var(--ink); font-weight: 800; margin: 4px 0 0; }
.confirm-box p { color: var(--muted); margin: 0; font-size: 1rem; line-height: 1.55; }
.confirm-box .consent { background: #fff; }
.confirm-box .cb-note { margin-top: auto; padding: 14px 16px; border-radius: 16px; background: #fef3c7; color: #92400e; font-weight: 600; font-size: .95rem; }
.confirm-box .cb-note i { margin-right: 6px; }

/* ---------- 3 & 4. Hasil ---------- */
.result-wrap { flex: 1; display: flex; align-items: center; justify-content: center; gap: 32px; padding: 110px 48px 100px; }
.result { max-width: 900px; width: 100%; padding: 48px 56px; text-align: center; }
.res-title { color: #fff; font-size: clamp(2.2rem, 3.6vw, 3.8rem); font-weight: 800; letter-spacing: -1.5px; margin: 10px 0 4px; }
.res-lead { font-size: 1.2rem; color: rgba(255,255,255,.75); }
.notice { display: flex; gap: 14px; align-items: flex-start; text-align: left; padding: 18px 22px; border-radius: 20px; background: rgba(251,191,36,.12); border: 1px solid rgba(251,191,36,.35); color: #fef3c7; font-size: 1.02rem; margin-top: 10px; }
.notice i { font-size: 1.4rem; color: var(--amber); }
.check-anim svg { width: 128px; height: 128px; }
.check-anim circle { fill: rgba(16,185,129,.18); stroke: #34d399; stroke-width: 5; stroke-dasharray: 330; stroke-dashoffset: 330; }
.check-anim path { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 80; stroke-dashoffset: 80; }
.k-screen.active .check-anim circle { animation: draw .7s ease forwards; }
.k-screen.active .check-anim path { animation: draw .45s .55s ease forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.pass-qr { width: 280px; padding: 28px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pass-qr #passQr { background: #fff; padding: 12px; border-radius: 18px; margin-bottom: 10px; }
.pass-qr #passQr img, .pass-qr #passQr canvas { width: 180px !important; height: 180px !important; }
.pass-qr span { font-size: .85rem; color: rgba(255,255,255,.6); }
.wave { font-size: 5rem; display: inline-block; animation: wave 1.6s ease-in-out 2; transform-origin: 70% 70%; }
@keyframes wave { 15%,45% { transform: rotate(14deg); } 30%,60% { transform: rotate(-8deg); } 75% { transform: none; } }
.timeline { display: flex; align-items: center; gap: 18px; justify-content: center; margin: 22px 0 28px; }
.timeline > div:not(.line) { text-align: center; }
.timeline small { display: block; color: rgba(255,255,255,.55); font-size: .85rem; }
.timeline b { font-size: 2rem; font-variant-numeric: tabular-nums; }
.timeline .line { width: 220px; height: 2px; background: linear-gradient(90deg, #5eead4, #fde68a); position: relative; }
.timeline .line span { position: absolute; left: 50%; top: -18px; transform: translateX(-50%); background: #0b3f3b; border: 1px solid var(--glass-b); padding: 6px 14px; border-radius: 20px; font-weight: 700; white-space: nowrap; font-size: .9rem; }
.rates { display: flex; gap: 14px; justify-content: center; }
.rates button { width: 120px; padding: 16px 8px; border-radius: 22px; background: var(--glass); border: 2px solid var(--glass-b); color: #fff; transition: .15s; }
.rates button span { font-size: 2.8rem; display: block; line-height: 1.2; }
.rates button small { font-size: .85rem; color: rgba(255,255,255,.7); font-weight: 600; }
.rates button:hover, .rates button.on { border-color: var(--amber); background: rgba(251,191,36,.15); transform: translateY(-4px); }
.auto-back { position: absolute; bottom: 36px; left: 50%; transform: translateX(-50%); display: flex; align-items: center; gap: 18px; }
.auto-back .bar { width: 260px; height: 6px; border-radius: 6px; background: rgba(255,255,255,.12); overflow: hidden; position: relative; }
.auto-back .bar::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--teal), var(--amber)); transform-origin: left; transform: scaleX(var(--p, 1)); }

/* ---------- Modal & loading ---------- */
.k-modal { position: fixed; inset: 0; z-index: 50; display: none; align-items: center; justify-content: center; background: rgba(2,12,11,.6); backdrop-filter: blur(8px); }
.k-modal.on { display: flex; animation: fadeIn .25s; }
@keyframes fadeIn { from { opacity: 0; } }
.k-modal-box { width: min(520px, 90vw); background: #fff; color: var(--ink); border-radius: 30px; padding: 40px; text-align: center; box-shadow: 0 40px 100px rgba(0,0,0,.5); animation: popIn .35s cubic-bezier(.2,1.4,.4,1); }
.k-modal-box.wide { width: min(640px, 92vw); }
@keyframes popIn { from { transform: scale(.85); opacity: 0; } }
.k-modal-box h3 { color: var(--ink); font-weight: 800; margin: 16px 0 8px; }
.k-modal-box p { color: #475569; font-size: 1.05rem; margin-bottom: 24px; }
.m-ic { width: 84px; height: 84px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; font-size: 2.6rem; background: #ffe4e6; color: #e11d48; }
.m-ic.warn { background: #fef3c7; color: #d97706; }
.m-ic.ok { background: #d1fae5; color: #059669; }
#camReader { border-radius: 18px; overflow: hidden; }
.k-loading { position: fixed; inset: 0; z-index: 60; display: none; align-items: center; justify-content: center; background: rgba(2,12,11,.35); }
.k-loading.on { display: flex; }
.spin { width: 64px; height: 64px; border-radius: 50%; border: 6px solid rgba(255,255,255,.2); border-top-color: var(--amber); animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------- Terkunci ---------- */
.k-locked { position: relative; z-index: 5; height: 100%; display: flex; align-items: center; justify-content: center; padding: 20px; }
.lock-ic { width: 96px; height: 96px; margin: 0 auto; border-radius: 28px; background: rgba(251,191,36,.15); color: var(--amber); font-size: 3rem; display: flex; align-items: center; justify-content: center; }

/* ---------- Responsif (layar kecil / potret) ---------- */
@media (max-width: 1280px) {
  .form-shell { grid-template-columns: 250px 1fr; padding: 100px 24px 24px; gap: 18px; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 992px), (orientation: portrait) {
  body { overflow: auto; }
  .k-top { padding: 16px 20px; }
  .idle-wrap { grid-template-columns: 1fr; padding: 110px 24px 90px; text-align: center; }
  .idle-lead { margin: 0 auto; }
  .steps3 { margin: 26px auto 0; }
  .idle-left .d-flex { justify-content: center; }
  .scan-visual { width: min(70vw, 420px); }
  .form-shell { grid-template-columns: 1fr; }
  .form-side { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 12px; padding: 16px; }
  .wsteps, .form-side .mt-auto .idle-meter, .form-side .mt-auto .small { display: none; }
  .form-side .mt-auto { margin-left: auto !important; }
  .form-main { padding: 24px 20px 0; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .result-wrap { flex-direction: column; }
  .rates button { width: 84px; }
}
