/* =====================================================================
   Landing page warga - Panic Button (mobile first)
   ===================================================================== */
:root {
    --primary: #505b6b;
    --secondary: #202936;
    --ternary: #ffffff;
    --danger: #c62828;
    --font: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
    overflow-x: hidden;
    min-height: 100vh;
    font-family: var(--font);
    color: var(--ternary);
    background: radial-gradient(120% 80% at 50% 0%, var(--primary) 0%, var(--secondary) 60%, #10151c 100%) fixed;
    background-color: var(--secondary);
}
.hidden { display: none !important; }
.lp { max-width: 460px; margin: 0 auto; padding: max(18px, env(safe-area-inset-top)) 16px 28px; display: flex; flex-direction: column; min-height: 100vh; }
.lp-head { display: flex; align-items: center; gap: 12px; }
.lp-logo { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 0 0 2px rgba(255, 255, 255, .2); }
.lp-org { font-size: 12px; opacity: .75; letter-spacing: .04em; text-transform: uppercase; }
.lp-head h1 { margin: 2px 0 0; font-size: 21px; line-height: 1.2; }
.lp-msg { font-size: 14.5px; line-height: 1.55; opacity: .9; margin: 16px 0 0; }

.lp-stage { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 26px 0 18px; min-height: 380px; }
.lp-stage h2 { margin: 18px 0 6px; font-size: 22px; }
.lp-note { font-size: 13px; opacity: .8; margin: 14px 0 0; line-height: 1.5; max-width: 340px; }

/* ---------- Tombol panic ---------- */
.panic-btn { position: relative; width: min(72vw, 280px); height: min(72vw, 280px); border-radius: 50%; border: 0; padding: 0; cursor: pointer; background: transparent; outline: none; }
.panic-btn .core { position: absolute; inset: 14%; border-radius: 50%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
    background: radial-gradient(circle at 35% 30%, #e53935 0%, var(--danger) 55%, #7f1d1d 100%);
    border: 6px solid var(--ternary); box-shadow: 0 18px 40px rgba(0, 0, 0, .45), inset 0 -10px 24px rgba(0, 0, 0, .35); color: var(--ternary); transition: transform .12s; z-index: 2; }
.panic-btn:active .core { transform: scale(.94); }
.panic-btn .sos { font-size: clamp(40px, 13vw, 56px); font-weight: 900; letter-spacing: .08em; line-height: 1; text-shadow: 0 3px 10px rgba(0, 0, 0, .35); }
.panic-btn .tap { font-size: 11.5px; font-weight: 700; letter-spacing: .1em; opacity: .92; line-height: 1.35; }
.panic-btn .ring { position: absolute; inset: 14%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .55); animation: ring 2.4s ease-out infinite; z-index: 1; }
.panic-btn .r2 { animation-delay: .8s; }
.panic-btn .r3 { animation-delay: 1.6s; }
@keyframes ring { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(1.38); opacity: 0; } }
.panic-btn:focus-visible .core { box-shadow: 0 0 0 6px rgba(255, 255, 255, .45), 0 18px 40px rgba(0, 0, 0, .45); }

/* ---------- Proses / hasil ---------- */
.busy-circle { width: 120px; height: 120px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: rgba(255, 255, 255, .08); border: 2px solid rgba(255, 255, 255, .25); }
.spin { width: 54px; height: 54px; border-radius: 50%; border: 5px solid rgba(255, 255, 255, .25); border-top-color: var(--ternary); animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result-icon { width: 96px; height: 96px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 50px; font-weight: 900; border: 4px solid var(--ternary); }
.result-icon.ok { background: #1d7a3d; }
.result-icon.err { background: var(--danger); }
.status-card { width: 100%; background: rgba(255, 255, 255, .96); color: var(--secondary); border-radius: 14px; padding: 14px 16px; margin-top: 12px; text-align: left; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.status-card .row { display: flex; justify-content: space-between; gap: 10px; padding: 5px 0; border-bottom: 1px solid #e6eaef; font-size: 14px; }
.status-card .row span { color: #6b7380; }
.status-card p { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; }
.lp-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; justify-content: center; }
.btn-light, .btn-ghost { font: 700 14px var(--font); border-radius: 999px; padding: 11px 20px; cursor: pointer; }
.btn-light { background: var(--ternary); color: var(--primary); border: 0; }
.btn-ghost { background: transparent; color: var(--ternary); border: 1.5px solid rgba(255, 255, 255, .55); margin-top: 14px; }
.lp-actions .btn-ghost { margin-top: 0; }

/* ---------- Data pelapor ---------- */
.lp-info { background: rgba(0, 0, 0, .22); border: 1px solid rgba(255, 255, 255, .15); border-radius: 12px; padding: 0 14px; }
.lp-info summary { cursor: pointer; padding: 13px 0; font-weight: 600; font-size: 14px; list-style: none; }
.lp-info summary::-webkit-details-marker { display: none; }
.lp-info summary::after { content: "＋"; float: right; opacity: .7; }
.lp-info[open] summary::after { content: "－"; }
.lp-info .fields { display: flex; flex-direction: column; gap: 10px; padding-bottom: 14px; }
.lp-info label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; opacity: .95; }
.lp-info input { padding: 11px 12px; border-radius: 10px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .95); color: var(--secondary); font: 15px var(--font); }
.lp-info input:focus { outline: 2px solid var(--ternary); }
.lp-info small { opacity: .7; font-size: 11.5px; }

.hotline { display: block; text-align: center; margin-top: 14px; padding: 13px; border-radius: 12px; background: var(--ternary); color: var(--secondary); text-decoration: none; font-size: 14.5px; }
.lp-link { display: block; text-align: center; margin-top: 10px; padding: 12px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .25); background: rgba(0, 0, 0, .18); color: var(--ternary); text-decoration: none; font-size: 13.5px; }
.lp-link:hover, .lp-link:focus-visible { background: rgba(255, 255, 255, .1); }
.lp-foot { text-align: center; font-size: 11.5px; opacity: .6; margin-top: 18px; line-height: 1.5; }

/* ---------- Countdown jeda SOS (per perangkat) ---------- */
.panic-btn[disabled] { cursor: not-allowed; }
.panic-btn.is-cooling .core { background: radial-gradient(circle at 35% 30%, #8a95a5 0%, var(--primary) 55%, var(--secondary) 100%); border-color: rgba(255, 255, 255, .55); }
.panic-btn.is-cooling .ring { display: none; }
.panic-btn.is-cooling .sos { opacity: .55; font-size: clamp(32px, 10vw, 44px); }
.panic-btn.is-cooling .tap { font-size: 13px; }
.cooldown { width: 100%; max-width: 360px; margin-top: 16px; padding: 12px 14px; border-radius: 14px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .22);
    display: flex; flex-direction: column; gap: 4px; font-size: 14px; text-align: center; }
.cooldown .cd-title { font-weight: 700; }
.cooldown .cd-left { font: 800 22px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.cooldown small { font-size: 12px; opacity: .8; }
.btn-ghost[disabled] { opacity: .55; cursor: not-allowed; }
