/* Siaga Bencana — layar General Alarm (di atas semua halaman). */
.sg-alarm{position:fixed;inset:0;z-index:2147483000;display:flex;align-items:flex-start;justify-content:center;overflow:auto;color:#fff;font:16px/1.45 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;padding:24px 16px}
.sg-alarm[hidden],.sg-bar[hidden]{display:none!important}
.sg-alarm.sg-darurat{background:#b91c1c;animation:sg-flash 1s linear infinite}
.sg-alarm.sg-latihan{background:repeating-linear-gradient(135deg,#c2410c 0 26px,#9a3412 26px 52px);animation:sg-flash-l 1.2s linear infinite}
@keyframes sg-flash{0%,48%{background:#b91c1c}50%,98%{background:#5f1010}}
@keyframes sg-flash-l{0%,48%{filter:none}50%,98%{filter:brightness(.78)}}
@media (prefers-reduced-motion:reduce){.sg-alarm{animation:none!important}}
.sg-in{width:min(760px,100%);background:rgba(0,0,0,.35);border:2px solid rgba(255,255,255,.55);border-radius:20px;padding:22px 22px 18px;box-shadow:0 20px 60px rgba(0,0,0,.35)}
.sg-head{display:flex;gap:14px;align-items:center}
.sg-head h1{margin:0;font-size:clamp(26px,5vw,44px);line-height:1.1;letter-spacing:.02em;font-weight:900;color:#fff}
.sg-sub{margin:4px 0 0;font-size:15px;opacity:.95}
.sg-ic{flex:none;width:58px;height:58px;border-radius:50%;background:#fff center/34px no-repeat;box-shadow:0 0 0 6px rgba(255,255,255,.25)}
.sg-j-kebakaran .sg-ic,.sg-bar.sg-j-kebakaran .sg-ic{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23dc2626'%3E%3Cpath d='M12 22c4 0 7-2.7 7-7 0-3.5-2.4-6.2-4-8 0 2.5-1.3 4-3 4.5C12.5 8 11 5 8 3c.4 3-3 6-3 11 0 4.3 3 8 7 8z'/%3E%3C/svg%3E")}
.sg-j-gempa .sg-ic{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h3l2-5 3 10 3-8 2 3h5M4 21h16'/%3E%3C/svg%3E")}
.sg-j-evakuasi .sg-ic{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2316a34a' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='14' cy='4' r='2'/%3E%3Cpath d='M9 21l3-6-3-3 2-5 4 3 3 1M7 12l2-5'/%3E%3C/svg%3E")}
.sg-msg{margin:14px 0 0;padding:10px 14px;background:rgba(255,255,255,.14);border-radius:12px;font-weight:600}
.sg-steps{margin:16px 0 0;padding:0;list-style:none;counter-reset:s;display:grid;gap:10px}
.sg-steps li{counter-increment:s;display:flex;gap:12px;align-items:flex-start;font-size:clamp(16px,2.4vw,20px);font-weight:600}
.sg-steps li::before{content:counter(s);flex:none;width:32px;height:32px;border-radius:50%;background:#fff;color:#111;display:grid;place-items:center;font-weight:900}
.sg-titik{margin:16px 0 0;display:flex;flex-direction:column;background:#166534;border:2px solid #86efac;border-radius:14px;padding:10px 14px}
.sg-titik small{text-transform:uppercase;letter-spacing:.08em;font-size:12px;opacity:.9}.sg-titik b{font-size:22px}
.sg-btns{display:grid;grid-template-columns:2fr 1fr;gap:10px;margin-top:16px}
.sg-b{border:0;border-radius:14px;padding:16px 12px;font-size:18px;font-weight:800;cursor:pointer}
.sg-ok{background:#16a34a;color:#fff;box-shadow:0 0 0 3px #fff inset}.sg-sos{background:#fff;color:#b91c1c}
.sg-done{margin:14px 0 0;padding:12px 14px;border-radius:12px;background:#166534;font-weight:700}.sg-done.sg-help{background:#fff;color:#b91c1c}
.sg-tools{display:flex;flex-wrap:wrap;gap:8px;margin-top:14px}
.sg-l{background:rgba(0,0,0,.25);border:1px solid rgba(255,255,255,.6);color:#fff;border-radius:999px;padding:8px 14px;font-size:14px;cursor:pointer;text-decoration:none}
.sg-tap{display:block;width:100%;margin-top:14px;padding:16px;border-radius:14px;border:3px dashed #fff;background:#111;color:#fff;font-size:18px;font-weight:800;cursor:pointer;animation:sg-pulse 1s ease-in-out infinite}
@keyframes sg-pulse{50%{transform:scale(1.02)}}
.sg-bar{position:fixed;left:0;right:0;top:0;z-index:2147483000;display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:8px 14px;color:#fff;font:600 14px/1.3 system-ui,sans-serif;box-shadow:0 4px 16px rgba(0,0,0,.3)}
.sg-bar.sg-darurat{background:#b91c1c}.sg-bar.sg-latihan{background:#c2410c}
.sg-bar .sg-ic{width:26px;height:26px;background-size:16px;box-shadow:none}
.sg-bar button{margin-left:auto;background:#fff;color:#111;border:0;border-radius:999px;padding:6px 12px;font-weight:700;cursor:pointer}
.sg-bt{opacity:.9;font-weight:500}
html.sg-on body{overflow:hidden}
html.sg-barred body{padding-top:44px}html.sg-barred .appbar,html.sg-barred .pt-top{top:44px}
.sg-toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:2147483000;background:#166534;color:#fff;padding:12px 18px;border-radius:12px;font:600 15px system-ui,sans-serif;box-shadow:0 10px 30px rgba(0,0,0,.3);max-width:92vw}
@media (max-width:560px){.sg-btns{grid-template-columns:1fr}.sg-in{padding:16px}.sg-ic{width:46px;height:46px;background-size:26px}}
/* 1.0.13 — WARNING backup AJ-Corp di komputer (terus berkedip selama alarm) & terminal terkunci */
.sg-alarm h1,.sg-alarm b,.sg-alarm p,.sg-alarm li{font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.sg-bk{display:flex;flex-direction:column;gap:2px;margin:0 0 16px;padding:12px 16px;border-radius:14px;background:#facc15;color:#111;border:4px solid #111;font-weight:700;animation:sg-bk 1s linear infinite;filter:none}
.sg-bk b{font-size:clamp(20px,2.8vw,28px);letter-spacing:.05em;font-weight:900;color:inherit}.sg-bk span{font-size:16px;color:inherit}
.sg-bk-gagal{animation-name:sg-bk-x}@keyframes sg-bk-x{0%,48%{background:#fff;color:#b91c1c;border-color:#b91c1c}50%,98%{background:#b91c1c;color:#fff;border-color:#fff}}
@keyframes sg-bk{0%,48%{background:#facc15;color:#111;border-color:#111}50%,98%{background:#111;color:#facc15;border-color:#facc15}}
.sg-bk-bar{display:inline-flex;flex-direction:row;margin:0;padding:3px 10px;border-width:2px;border-radius:999px;font-size:13px}
.sg-lock{margin:14px 0 0;padding:12px 14px;border-radius:12px;background:#111;color:#fff;font-weight:700;border:2px solid #fff}
@media (prefers-reduced-motion:reduce){.sg-alarm .sg-bk{animation-duration:2s!important}}
.sg-peran{margin:14px 0 0;display:flex;flex-direction:column;padding:8px 14px;border-radius:12px;background:#fff;color:#111}.sg-peran small{text-transform:uppercase;letter-spacing:.08em;font-size:11px;color:#b91c1c;font-weight:800}.sg-peran b{font-size:18px}

/* 1.0.17 — Protokol Darurat: animasi mengemas & menyimpan data (60 dtk, sekali per alarm) */
.sg-ep{margin:0 0 16px;padding:14px 16px 12px;border-radius:16px;background:#0b1220;color:#e2e8f0;border:2px solid #facc15;box-shadow:0 0 0 4px rgba(250,204,21,.18),0 12px 30px rgba(0,0,0,.35);font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.sg-ep-txt{display:flex;flex-direction:column;gap:2px}
.sg-ep-h{font-size:clamp(18px,2.6vw,26px);font-weight:900;letter-spacing:.08em;color:#facc15;animation:sg-ep-blink 1s linear infinite}
.sg-ep-s{font-size:15px;font-weight:600;color:#e2e8f0}
@keyframes sg-ep-blink{0%,55%{opacity:1}60%,95%{opacity:.35}}
.sg-ep-stage{position:relative;height:74px;margin:12px 0 8px;border-radius:12px;background:linear-gradient(90deg,rgba(250,204,21,.06),rgba(250,204,21,.16));overflow:hidden}
.sg-ep-files{position:absolute;inset:0}
.sg-ep-f{position:absolute;left:-40px;top:50%;width:34px;height:34px;margin-top:-17px;color:#facc15;animation:sg-ep-fly 3s cubic-bezier(.45,.05,.55,.95) infinite;animation-delay:var(--d)}
.sg-ep-f svg,.sg-ep-vault svg,.sg-ep-shield svg{width:100%;height:100%}
@keyframes sg-ep-fly{0%{transform:translate(0,0) scale(.9) rotate(-8deg);opacity:0}12%{opacity:1}60%{transform:translate(calc(var(--w,520px) * .55),-14px) scale(1) rotate(4deg);opacity:1}88%{transform:translate(calc(var(--w,520px) * .86),0) scale(.45);opacity:.9}100%{transform:translate(calc(var(--w,520px) * .9),0) scale(.2);opacity:0}}
.sg-ep-stage{--w:min(700px,82vw)}
.sg-ep-vault{position:absolute;right:16px;top:50%;width:46px;height:46px;margin-top:-23px;color:#facc15;animation:sg-ep-pulse 1.2s ease-in-out infinite}
@keyframes sg-ep-pulse{50%{transform:scale(1.08);filter:drop-shadow(0 0 8px #facc15)}}
.sg-ep-shield{position:absolute;left:50%;top:50%;width:54px;height:54px;margin:-27px 0 0 -27px;color:#22c55e;opacity:0;transform:scale(.6);transition:opacity .5s,transform .5s}
.sg-ep-meter{display:flex;align-items:center;gap:10px}
.sg-ep-bar{flex:1;height:12px;border-radius:999px;background:rgba(255,255,255,.12);overflow:hidden}
.sg-ep-bar i{display:block;height:100%;width:10%;border-radius:999px;background:repeating-linear-gradient(45deg,#facc15 0 10px,#eab308 10px 20px);background-size:28px 28px;animation:sg-ep-stripe .8s linear infinite;transition:width .9s ease}
@keyframes sg-ep-stripe{to{background-position:28px 0}}
.sg-ep-pct{min-width:52px;text-align:right;font-size:20px;font-weight:900;color:#facc15;font-variant-numeric:tabular-nums}
.sg-ep-file{display:block;margin-top:6px;font-size:13px;color:#94a3b8;min-height:1.2em}
/* selesai: animasi berhenti & tidak diputar ulang */
.sg-ep[data-st=ok]{border-color:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.2),0 12px 30px rgba(0,0,0,.35)}
.sg-ep[data-st=ok] .sg-ep-h{color:#22c55e;animation:none}
.sg-ep[data-st=ok] .sg-ep-f,.sg-ep[data-st=ok] .sg-ep-vault,.sg-ep[data-st=gagal] .sg-ep-f,.sg-ep[data-st=final] .sg-ep-f{animation:none;opacity:0}
.sg-ep[data-st=ok] .sg-ep-shield{opacity:1;transform:scale(1)}
.sg-ep[data-st=ok] .sg-ep-bar i{background:#22c55e;animation:none}
.sg-ep[data-st=ok] .sg-ep-pct{color:#22c55e}
.sg-ep[data-st=gagal]{border-color:#ef4444}.sg-ep[data-st=gagal] .sg-ep-bar i{background:#ef4444;animation:none}.sg-ep[data-st=gagal] .sg-ep-h{color:#ef4444}
.sg-bk-bar[data-st=ok]{animation:none;background:#166534;color:#fff;border-color:#86efac}
@media (prefers-reduced-motion:reduce){.sg-ep-f{animation-duration:6s}.sg-ep-h{animation:none}}
/* Alarm selalu paling atas di semua tampilan HP (Android & iPhone): bilah alarm mendorong layar obrolan / presentasi ke bawah */
.sg-alarm{padding-top:max(24px,env(safe-area-inset-top));padding-bottom:max(24px,env(safe-area-inset-bottom));-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
.sg-bar{padding-top:max(8px,env(safe-area-inset-top))}
html.sg-barred .ch-app{top:calc(44px + env(safe-area-inset-top))}
html.sg-barred .lx-top,html.sg-barred .pt-nav-top{top:44px}
.sg-ep-shieldln{display:flex;align-items:center;gap:10px;margin:10px 0 0;padding:8px 12px;border-radius:12px;background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.45);color:#86efac}
.sg-ep-shieldln svg{flex:none;width:26px;height:26px;color:#22c55e}
.sg-ep-shieldln span{display:flex;flex-direction:column;gap:1px}.sg-ep-shieldln b{font-size:13.5px;letter-spacing:.1em;font-weight:900;color:#4ade80}.sg-ep-shieldln small{font-size:12.5px;color:#bbf7d0}

/* EDI di layar Emergency Protocol (teks saja) */
.sg-edi{display:flex;gap:14px;align-items:flex-start;margin:12px 0 0}
.sg-edi-face{flex:none;position:relative;width:74px;height:74px;border-radius:50%;overflow:hidden;border:2px solid #c9a961;box-shadow:0 0 0 4px rgba(201,169,97,.18),0 0 26px rgba(250,204,21,.25);animation:sg-edi-glow 2.4s ease-in-out infinite}
.sg-edi-face img{display:block;width:100%;height:100%;object-fit:cover}
@keyframes sg-edi-glow{50%{box-shadow:0 0 0 6px rgba(201,169,97,.1),0 0 34px rgba(250,204,21,.4)}}
.sg-edi-talk{flex:1;min-width:0;padding:10px 14px;border-radius:4px 16px 16px 16px;background:rgba(15,23,42,.92);border:1px solid rgba(201,169,97,.4)}
.sg-edi-talk b{display:flex;align-items:baseline;gap:8px;font-size:14px;letter-spacing:.16em;color:#e8d5a8;font-weight:800}
.sg-edi-talk b small{font-size:11px;letter-spacing:.04em;font-weight:500;color:#94a3b8}
.sg-edi-talk p{margin:4px 0 0;min-height:2.9em;font-size:15px;line-height:1.45;color:#f1f5f9;font-weight:500}
.sg-edi-talk p[data-done="0"]::after{content:"▍";color:#facc15;animation:sg-ep-blink .8s linear infinite;margin-left:1px}
.sg-ep[data-st=ok] .sg-edi-face{border-color:#22c55e;animation:none;box-shadow:0 0 0 4px rgba(34,197,94,.2)}
.sg-toast-edi{display:flex;gap:12px;align-items:center;max-width:min(560px,92vw);background:#0b1220;border:1px solid #c9a961;text-align:left}
.sg-toast-edi img{width:52px;height:52px;border-radius:50%;border:2px solid #22c55e;object-fit:cover;flex:none}
.sg-toast-edi b{display:block;color:#e8d5a8;letter-spacing:.14em;font-size:13px}
@media (max-width:640px){.sg-edi-face{width:56px;height:56px}.sg-edi-talk p{font-size:14px}}

/* Kill switch HP — Chief & Wakil H.S.E (tekan & tahan 3 detik) */
.sg-kill-box{margin:16px 0 0;display:flex;flex-direction:column;gap:6px}
.sg-kill-box small{font-size:12.5px;opacity:.9;text-align:center}
.sg-kill{position:relative;overflow:hidden;width:100%;min-height:64px;border:3px solid #fff;border-radius:16px;background:#111;color:#fff;cursor:pointer;padding:10px 14px;
  -webkit-user-select:none;user-select:none;-webkit-touch-callout:none;touch-action:none;font:inherit;text-align:center}
.sg-kill-fill{position:absolute;left:0;top:0;bottom:0;width:0;background:linear-gradient(90deg,#dc2626,#f97316);transition:none}
.sg-kill.hold .sg-kill-fill{width:100%;transition:width 3s linear}
.sg-kill.sending .sg-kill-fill{width:100%;background:#16a34a}
.sg-kill-t{position:relative;display:flex;flex-direction:column;gap:2px}
.sg-kill-t b{font-size:17px;letter-spacing:.04em;font-weight:900}
.sg-kill-t small{font-size:13px;opacity:.9}
.sg-kill:focus-visible{outline:3px solid #facc15;outline-offset:2px}
.sg-kill[disabled]{cursor:default}
.sg-kill-card{border-left:4px solid #dc2626}
.sg-kill-card .sg-kill{background:#111827}
.sg-kill-ready{display:flex;gap:10px;align-items:center;font-size:13.5px}

/* EDI setelah General Alarm diakhiri (komputer) */
.sg-post{position:fixed;inset:0;z-index:2147482990;display:grid;place-items:center;padding:20px;background:rgba(3,7,18,.55);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);animation:sg-post-in .35s ease;font-family:system-ui,-apple-system,"Segoe UI",Roboto,sans-serif}
.sg-post.bye{animation:sg-post-out .6s ease forwards}
@keyframes sg-post-in{from{opacity:0}to{opacity:1}}@keyframes sg-post-out{to{opacity:0;transform:scale(.98)}}
.sg-post-in{width:min(620px,100%);max-height:88vh;overflow:auto;background:#0b1220;color:#e2e8f0;border:1px solid rgba(201,169,97,.55);border-radius:22px;box-shadow:0 30px 80px rgba(0,0,0,.55),0 0 0 4px rgba(34,197,94,.12);padding:18px 20px 20px}
.sg-post-in header{display:flex;align-items:center;gap:14px;margin-bottom:10px}
.sg-post-in header b{display:block;color:#e8d5a8;letter-spacing:.18em;font-size:16px}
.sg-post-in header small{color:#94a3b8;font-size:12.5px}
.sg-post-in header > div{flex:1}
.sg-post .sg-edi-face{width:64px;height:64px;border-color:#22c55e;box-shadow:0 0 0 4px rgba(34,197,94,.18)}
.sg-post-x{background:none;border:0;color:#94a3b8;font-size:26px;cursor:pointer;line-height:1}
.sg-post-body p{margin:10px 0 0;font-size:15.5px;line-height:1.5;color:#f1f5f9}
.sg-post-body p[data-k=bye]{color:#86efac;font-weight:600}
.sg-post-checks{list-style:none;margin:10px 0 0;padding:10px 12px;border-radius:12px;background:rgba(34,197,94,.08);border:1px solid rgba(34,197,94,.3);display:grid;gap:4px;font-size:14px}
.sg-post-checks li.ok{color:#86efac}.sg-post-checks li.no{color:#fca5a5}
.sg-post-btns{display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 2px}
.sg-post-b{border:0;border-radius:12px;padding:11px 16px;font:700 14px system-ui,sans-serif;cursor:pointer}
.sg-post-b.yes{background:#c9a961;color:#0b1220}.sg-post-b.no{background:#1f2937;color:#fff;border:1px solid #475569}.sg-post-b.later{background:none;color:#94a3b8;text-decoration:underline}
.sg-post-b:disabled{opacity:.5}
/* Konfirmasi keputusan cadangan darurat (unduh ZIP dengan password / hancurkan permanen) */
.sg-post-cf{margin:12px 0 2px;padding:12px 14px;border-radius:14px;background:rgba(201,169,97,.08);border:1px solid rgba(201,169,97,.45)}
.sg-post-cf.del{background:rgba(220,38,38,.1);border-color:rgba(248,113,113,.55)}
.sg-post-cf p{margin:0 0 10px!important;font-size:14.5px!important}
.sg-post-cf label{display:grid;gap:4px;margin:0 0 8px;font-size:13px;color:#cbd5e1}
.sg-post-cf input{width:100%;box-sizing:border-box;padding:10px 12px;border-radius:10px;border:1px solid #475569;background:#0f172a;color:#f8fafc;font:15px system-ui,sans-serif}
.sg-post-cf input:focus{outline:2px solid #c9a961;outline-offset:1px}
.sg-post-cf .sg-post-btns{margin:4px 0 0}
.sg-post-b.danger{background:#dc2626;color:#fff}
.sg-post-err{color:#fca5a5!important;font-weight:600;font-size:13.5px!important;margin:0 0 8px!important}
.sg-post-b:disabled{cursor:progress}
