/* ============================================================
   login.css — SIDIA BERKAH Login Page
   Frosted glass satu lapis • token warna = pegawai-v4.css (navy + teal)
   Mobile-First • Zero External Fonts
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  /* Sama dengan --navy / --teal di pegawai-v4.css supaya login dan beranda satu wajah */
  --brand:       #1E3A5F;
  --brand-deep:  #152C4A;
  --accent:      #0F766E;
  --brand-soft:  rgba(30,58,95,.10);
  --brand-glow:  rgba(30,58,95,.18);
  --ok:          #15803D;
  --text-1:      #1C1C1E;
  --text-2:      #3A3A3C;
  --text-3:      #48484A;
  --border:      rgba(30,58,95,.16);
  --bad:         #D70015;
  --bad-bg:      rgba(215,0,21,.08);
  --card-glass:  rgba(255,255,255,.78);
  --card-border: rgba(255,255,255,.9);
  --input-bg:    #FFFFFF;
  --surface-elevated: #FFFFFF;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px;
  --sp-4: 16px; --sp-5: 20px; --sp-6: 24px;
  --r-sm: 10px; --r-md: 12px; --r-lg: 20px;
}

/* ── Reset minimal ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
               "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── Utilities ─────────────────────────────────────────────── */
.is-hidden { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Skip Link ─────────────────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--brand);
  color: #fff;
  padding: 8px 16px;
  text-decoration: none;
  font-size: .875rem;
  font-weight: 600;
  border-radius: 0 0 8px 0;
  z-index: 10000;
  transition: top .2s ease;
}
.skip-link:focus {
  top: 0;
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

/* ── Splash Screen ─────────────────────────────────────────── */
.splash {
  position: fixed; inset: 0; z-index: 9999;
  background: linear-gradient(135deg, #1a3354 0%, #1E3A5F 45%, #0e6b63 100%);
  display: flex; align-items: center; justify-content: center;
  opacity: 1; transition: opacity .35s ease;
}
.splash--hide { opacity: 0; pointer-events: none; }

.splash__content {
  display: flex; flex-direction: column;
  align-items: center; gap: 16px;
  text-align: center; padding: 32px 24px;
}
.splash__logo {
  width: 80px; height: auto;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,.20));
  animation: splashPop .5s cubic-bezier(.34,1.56,.64,1) forwards;
}
.splash__text  { display: flex; flex-direction: column; gap: 4px; }
.splash__brand {
  font-size: 1.375rem; font-weight: 800; color: #fff;
  letter-spacing: .10em;
  animation: fadeUp .4s .15s ease both;
}
.splash__sub {
  font-size: .8125rem; font-weight: 500;
  color: rgba(255,255,255,.88);
  animation: fadeUp .4s .25s ease both;
}
.splash__org {
  font-size: .6875rem; font-weight: 500;
  color: rgba(255,255,255,.72); margin-top: 2px;
  animation: fadeUp .4s .35s ease both;
}

@keyframes splashPop {
  from { opacity: 0; transform: scale(.8); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Page Background ───────────────────────────────────────────
   Dua bercak radial statis (tanpa filter:blur, tanpa elemen tambahan)
   memberi sesuatu untuk "dibekukan" kaca kartu. Murah di HP kentang. */
.login-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0));
  position: relative;
  /* Garis kotak 28px navy tipis: sama dengan login admin & portal. Hanya gradien CSS, tanpa blur. */
  background:
    radial-gradient(circle at 12% 8%, rgba(13,148,136,.18), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(30,58,95,.16), transparent 48%),
    linear-gradient(to right, rgba(30,58,95,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(to bottom, rgba(30,58,95,.06) 1px, transparent 1px) 0 0 / 28px 28px,
    linear-gradient(160deg, #F0F9FF 0%, #EAF4FB 55%, #E6F4F1 100%);
}

/* ── Card Glass (satu-satunya elemen ber-backdrop-filter) ──── */
.login-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 440px;
  background: var(--card-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--card-border);
  border-radius: var(--r-lg);
  box-shadow:
    0 12px 32px rgba(30,58,95,.12),
    0 4px 12px rgba(30,58,95,.06),
    inset 0 1px 0 rgba(255,255,255,.9);
  padding: 28px 22px 22px;
  animation: cardIn .6s .05s cubic-bezier(.32,.72,0,1) both;
}

@keyframes cardIn {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.96);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* ── Header dalam card ─────────────────────────────────────── */
.login-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}

.login-logo {
  width: 88px; height: 88px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid rgba(255,255,255,.8);
  box-shadow:
    0 10px 24px rgba(30,58,95,.18),
    0 3px 8px rgba(30,58,95,.10);
  display: flex; align-items: center; justify-content: center;
  padding: 8px;
  position: relative;
}
.login-logo img { width: 52px; height: 62px; object-fit: contain; }

.login-brand {
  /* h1 halaman: nama resmi aplikasi. Dua warna brand (navy + teal) sama dengan
     gradasi topbar beranda, jadi judul terbaca sebagai identitas, bukan teks biasa. */
  margin: 6px 0 0;
  font-size: 1.625rem; font-weight: 800;
  letter-spacing: .03em; line-height: 1.15;
  color: var(--brand);
}
.login-brand__b { color: var(--accent); }
/* Garis aksen pendek di bawah judul: penanda identitas yang diulang dari gradasi tombol Masuk */
.login-brand::after {
  content: '';
  display: block;
  width: 36px; height: 3px;
  margin: 8px auto 0;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand), var(--accent));
}
/* Label halaman sebagai chip subtil (tint + border + teks senada) */
.login-sub {
  margin: 2px 0 0;
  padding: 4px 12px;
  font-size: .8125rem; font-weight: 600;
  letter-spacing: .01em;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(30,58,95,.18);
  border-radius: 999px;
}
.login-tagline {
  font-size: .9375rem; font-weight: 700;
  color: var(--text-1); letter-spacing: -.01em;
  margin-top: -4px;
}

/* ── Form title ────────────────────────────────────────────── */
.login-title {
  margin: 0 0 4px;
  font-size: 1.75rem; font-weight: 700;
  color: var(--text-1); letter-spacing: -.035em;
}
.login-subtitle {
  margin: 0 0 20px;
  font-size: .9375rem; color: var(--text-2);
  line-height: 1.5;
}

/* ── Form ──────────────────────────────────────────────────── */
.login-form {
  display: flex; flex-direction: column; gap: 14px;
}

.form-field {
  display: flex; flex-direction: column; gap: 5px;
}

.form-label {
  font-size: .875rem; font-weight: 600;
  color: var(--text-2);
}

.input-group {
  position: relative; display: flex; align-items: center;
}

.input-icon {
  position: absolute; left: 14px; z-index: 1;
  display: flex; align-items: center;
  color: var(--text-3); pointer-events: none;
  width: 18px; height: 18px;
  transition: color .15s ease;
}
.input-icon svg { width: 100%; height: 100%; }

.input {
  width: 100%;
  padding: 16px 50px 16px 48px;
  font-size: 1rem; font-family: inherit; font-weight: 400;
  color: var(--text-1);
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  -webkit-appearance: none; appearance: none;
  transition: all .25s cubic-bezier(.4,0,.2,1);
  min-height: 56px;
}
.input::placeholder { color: var(--text-3); font-weight: 400; }
.input:focus {
  outline: none;
  border-color: var(--brand);
  background: #fff;
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.input:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}
.input-group:focus-within .input-icon { color: var(--brand); }
.input--with-action { padding-right: 50px; }

.input-action {
  position: absolute; right: 6px;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  background: transparent; border: none;
  color: var(--text-3); cursor: pointer;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
  transition: all .2s cubic-bezier(.4,0,.2,1);
}
.input-action:hover { color: var(--brand); background: var(--brand-soft); }
.input-action:active { transform: scale(.92); }
.input-action:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.input-action svg { width: 18px; height: 18px; pointer-events: none; }
.input-action[data-state="hidden"]  .icon-eye-off { display: none; }
.input-action[data-state="visible"] .icon-eye     { display: none; }

.form-hint {
  font-size: .75rem; color: var(--text-3);
  margin: 0; line-height: 1.4;
}

.form-hint--gate {
  margin-top: 10px;
  text-align: center;
  font-weight: 600;
  color: #B45309;
}

/* ── Alert error ───────────────────────────────────────────── */
.alert {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 11px 13px; border-radius: var(--r-sm);
  font-size: .8125rem; line-height: 1.45;
}
.alert--error {
  background: var(--bad-bg);
  color: var(--bad);
  border: 1px solid rgba(215,0,21,.18);
}
/* Varian pemberitahuan: dipakai saat sekolah belum masuk uji coba.
   Nada tenang (bukan merah) supaya guru tidak mengira akunnya bermasalah. */
.alert--info {
  background: rgba(4,92,138,.07);
  color: #045C8A;
  border: 1px solid rgba(4,92,138,.2);
}
.alert__title {
  display: block;
  font-weight: 700;
  margin-bottom: 2px;
}
.icon--sm { flex-shrink: 0; margin-top: 1px; }
.icon--sm svg { width: 15px; height: 15px; }

/* ── Submit button ─────────────────────────────────────────── */
.btn--primary {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; width: 100%; min-height: 56px;
  padding: 16px 20px;
  /* Arah gradasi sama dengan topbar beranda (navy ke teal) */
  background: linear-gradient(135deg, #1E3A5F 0%, #0F766E 100%);
  color: #fff; border: none; border-radius: var(--r-md);
  font-size: 1rem; font-weight: 600; font-family: inherit;
  cursor: pointer; letter-spacing: .01em;
  -webkit-tap-highlight-color: transparent;
  box-shadow: 0 8px 20px rgba(30,58,95,.25), inset 0 1px 0 rgba(255,255,255,.18);
  transition: all .3s cubic-bezier(.4,0,.2,1);
  margin-top: 4px;
  position: relative;
  overflow: hidden;
}
.btn--primary::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,.12) 0%, transparent 100%);
}
.btn--primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(30,58,95,.30), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn--primary:active {
  transform: translateY(0) scale(.97);
  box-shadow: 0 2px 6px rgba(30,58,95,.25);
}
.btn--primary:disabled { opacity: .55; cursor: not-allowed; box-shadow: none; }
.btn--primary:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* Loading spinner */
.btn--primary[data-loading="true"] {
  position: relative; pointer-events: none;
}
.btn--primary[data-loading="true"] .button-label { opacity: 0; }
.btn--primary[data-loading="true"]::after {
  content: '';
  position: absolute;
  width: 22px; height: 22px;
  border: 2.5px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .75s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── NIP Validation ────────────────────────────────────────── */
.flex-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.nip-counter {
  font-size: .75rem;
  font-weight: 600;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
  transition: color .2s ease;
}
.nip-counter.is-valid { color: var(--accent); }
.nip-counter.is-invalid { color: var(--bad); }

.input-status-icon {
  position: absolute;
  right: 14px;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ok);
  pointer-events: none;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .2s ease, transform .2s cubic-bezier(.34,1.56,.64,1);
}
.input-status-icon.is-visible {
  opacity: 1;
  transform: scale(1);
}
.input-status-icon svg { width: 100%; height: 100%; }

.form-hint--error {
  color: var(--bad);
  font-weight: 500;
}

/* ── Login Options (Remember Me + Help) ────────────────────── */
.login-options {
  display: flex;
  align-items: center;
  min-height: 44px;
}

.remember-me-container {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

.checkbox-custom {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-radius: 6px;
  background: var(--input-bg);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  flex-shrink: 0;
}
.checkbox-custom::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 12px;
}
.checkbox-custom:checked {
  background: var(--brand);
  border-color: var(--brand);
  box-shadow: 0 2px 6px rgba(30,58,95,.25);
}
.checkbox-custom:checked::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.checkbox-custom:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.remember-me-label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-2);
}

/* ── Aksi bantuan (Lupa Password + Bantuan Login) ──────────────
   Dua tombol sekunder sejajar di bawah tombol Masuk. Bentuk tombol jelas
   (border + latar putih + ikon) supaya tidak dikira teks biasa, tapi bobotnya
   di bawah tombol Masuk sehingga fokus utama tetap satu. */
.login-aux {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.btn-aux {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 46px;
  padding: 0 10px;
  font-size: .8125rem;
  font-weight: 600;
  font-family: inherit;
  line-height: 1.2;
  color: var(--brand);
  text-decoration: none;
  white-space: nowrap;
  background: #fff;
  border: 1.5px solid rgba(30,58,95,.22);
  border-radius: var(--r-md);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}
.btn-aux svg { flex-shrink: 0; }
.btn-aux:hover {
  color: var(--accent);
  border-color: rgba(15,118,110,.5);
  background: rgba(15,118,110,.05);
}
.btn-aux:active { transform: scale(.98); }
.btn-aux:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* HP sangat sempit (<340px): tumpuk supaya label tidak terpotong */
@media (max-width: 339px) {
  .login-aux { grid-template-columns: 1fr; }
}

/* ── Modal Bantuan ─────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .3s ease, visibility .3s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
  /* visibility langsung (0s) saat membuka: selama transisi visibility berjalan,
     Chrome menolak focus() ke isi modal. Fade-out saat menutup tetap jalan
     karena transisi .3s di aturan dasar dipakai untuk arah sebaliknya. */
  transition: opacity .3s ease, visibility 0s;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, .5);
}

.modal-container {
  position: relative;
  width: 100%;
  max-width: 400px;
  max-height: 85vh;
  max-height: 85dvh;
  background: var(--surface-elevated);
  border-radius: var(--r-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, .2), 0 8px 24px rgba(0, 0, 0, .1);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: translateY(20px) scale(.96);
  transition: transform .3s cubic-bezier(.32,.72,0,1);
}
.modal-overlay.is-open .modal-container {
  transform: translateY(0) scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
  background: #F0F9FF;
}

.modal-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}
.modal-icon svg {
  width: 22px;
  height: 22px;
}

.modal-title {
  flex: 1;
  margin: 0;
  font-size: 1.125rem;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -.01em;
}

.modal-close {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  border: none;
  background: rgba(0, 0, 0, .04);
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s ease;
  flex-shrink: 0;
}
.modal-close:hover {
  background: rgba(0, 0, 0, .08);
  color: var(--text-1);
}
.modal-close:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.modal-close:active {
  transform: scale(.94);
}
.modal-close svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.help-section {
  margin-bottom: 24px;
}
.help-section:last-child {
  margin-bottom: 0;
}

.help-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-size: .9375rem;
  font-weight: 700;
  color: var(--text-1);
}
.help-section-title svg {
  width: 18px;
  height: 18px;
  color: var(--brand);
  flex-shrink: 0;
}

.help-list {
  margin: 0;
  padding-left: 20px;
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.6;
}
.help-list li {
  margin-bottom: 6px;
}
.help-list li:last-child {
  margin-bottom: 0;
}
.help-list strong {
  color: var(--text-1);
  font-weight: 600;
}

.help-text {
  margin: 0 0 14px;
  font-size: .875rem;
  color: var(--text-2);
  line-height: 1.6;
}
.help-text strong {
  color: var(--text-1);
  font-weight: 600;
}

.btn-pengaduan {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  min-height: 44px;
  /* #15803D → #166534: teks putih 5,0 s.d. 7,1 (sebelumnya #10B981 hanya 2,5) */
  background: linear-gradient(135deg, #15803D 0%, #166534 100%);
  color: #fff;
  font-size: .875rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(21, 128, 61, .25);
  transition: all .25s cubic-bezier(.4,0,.2,1);
  -webkit-tap-highlight-color: transparent;
}
.btn-pengaduan:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(21, 128, 61, .32);
  filter: brightness(1.05);
}
.btn-pengaduan:active {
  transform: translateY(0) scale(.98);
}
.btn-pengaduan svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.modal-footer {
  padding: 16px 20px 20px;
  border-top: 1px solid rgba(0, 0, 0, .06);
}

.btn-modal-close {
  width: 100%;
  padding: 14px 20px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: var(--r-md);
  font-size: .9375rem;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-modal-close:hover {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand);
}
.btn-modal-close:active {
  transform: scale(.98);
}

/* Tombol utama modal (Izinkan Sekarang) */
.btn-modal-primary {
  width: 100%;
  padding: 15px 20px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--accent) 100%);
  border: none;
  border-radius: var(--r-md);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(30,58,95,.22);
  transition: all .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn-modal-primary:hover {
  box-shadow: 0 10px 24px rgba(30,58,95,.30);
}
.btn-modal-primary[disabled],
.btn-modal-primary[data-loading="true"] {
  opacity: .65;
  pointer-events: none;
  cursor: not-allowed;
}

/* Panduan izin (GPS + Kamera) */
.guide-intro {
  margin: 0 0 14px;
  font-size: .95rem;
  color: var(--text-2);
}
.guide-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.guide-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: rgba(30,58,95,.05);
  border-radius: 12px;
  border: 1px solid transparent;
  transition: background-color .25s ease, border-color .25s ease;
}
.guide-icon {
  width: 36px; height: 36px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  color: var(--brand);
  background: #fff;
  border: 1px solid var(--border);
}
.guide-icon svg { width: 20px; height: 20px; }
.guide-item__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.guide-item__text strong { font-size: .95rem; color: var(--text-1); }
.guide-item__text span { font-size: .8rem; color: var(--text-3); }
.guide-status {
  margin-left: auto;
  flex-shrink: 0;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  white-space: nowrap;
  color: var(--text-3);
  background: rgba(72,72,74,.08);
  border: 1px solid rgba(72,72,74,.16);
}
.guide-item[data-state="pending"] .guide-status {
  color: var(--brand);
  background: var(--brand-soft);
  border-color: rgba(30,58,95,.28);
}
.guide-item[data-state="weak"] .guide-status {
  color: #92400E;
  background: rgba(217,119,6,.12);
  border-color: rgba(217,119,6,.30);
}
.guide-item[data-state="ok"] {
  background: rgba(22,163,74,.07);
  border-color: rgba(22,163,74,.22);
}
.guide-item[data-state="ok"] .guide-status {
  color: #15803D;
  background: rgba(22,163,74,.12);
  border-color: rgba(22,163,74,.30);
}
.guide-item[data-state="error"] {
  background: var(--bad-bg);
  border-color: rgba(215,0,21,.25);
}
.guide-item[data-state="error"] .guide-status {
  color: var(--bad);
  background: rgba(215,0,21,.10);
  border-color: rgba(215,0,21,.28);
}

/* Langkah yang sedang diminta — satu baris saja pada satu waktu. */
.guide-item[data-aktif] {
  background: rgba(15,118,110,.08);
  border-color: rgba(15,118,110,.40);
}
.guide-item[data-aktif] .guide-item__text strong { color: var(--accent); }
/* Langkah yang belum giliran diredam lewat latar & ikon, BUKAN opacity
   (opacity .55 membuat teksnya turun ke kontras 2,7). */
.guide-item:not([data-aktif]):not([data-state="ok"]):not([data-state="error"]) {
  background: rgba(72,72,74,.04);
}
.guide-item:not([data-aktif]):not([data-state="ok"]):not([data-state="error"]) .guide-icon {
  color: var(--text-3);
}
@media (prefers-reduced-motion: reduce) {
  .guide-item { transition: none; }
}
.guide-note {
  margin: 0;
  font-size: .82rem;
  line-height: 1.55;
  color: var(--text-3);
}
.guide-error {
  margin: 12px 0 0;
  padding: 10px 12px;
  font-size: .82rem;
  line-height: 1.45;
  color: #B91C1C;
  background: rgba(220,38,38,.10);
  border-radius: 10px;
}

/* Mobile optimizations */
@media (max-width: 480px) {
  .modal-overlay {
    padding: 16px;
    align-items: flex-end;
  }
  .modal-container {
    max-width: 100%;
    max-height: 90vh;
    max-height: 90dvh;
    border-radius: 20px 20px 0 0;
    margin-bottom: 0;
  }
  .modal-overlay.is-open .modal-container {
    animation: slideUp .35s cubic-bezier(.32,.72,0,1);
  }
  @keyframes slideUp {
    from {
      transform: translateY(100%);
      opacity: 0;
    }
    to {
      transform: translateY(0);
      opacity: 1;
    }
  }
  .modal-header {
    padding: 18px 16px 14px;
  }
  .modal-body {
    padding: 16px;
  }
  .modal-footer {
    padding: 14px 16px 18px;
  }
}

/* Safe area for notched phones */
@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .modal-container {
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── Footer ────────────────────────────────────────────────── */
.login-footer {
  margin-top: 16px; padding-top: 12px;
  border-top: 1px solid rgba(148,163,184,.18);
  text-align: center;
  font-size: .75rem; color: var(--text-3);
}
.login-footer p { margin: 2px 0; }

/* ── Kesiapan Perangkat (GPS + Kamera) — baris ikon horizontal ── */
.device-readiness {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  background: rgba(30,58,95,.04);
  border-radius: var(--r-md);
}

.readiness-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.readiness-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.readiness-icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--text-3);
  background: var(--brand-soft);
  transition: all .25s cubic-bezier(.4,0,.2,1);
}
.readiness-icon svg { width: 16px; height: 16px; }

.readiness-label {
  font-size: .72rem;
  font-weight: 600;
  line-height: 1;
  color: var(--text-3);
  white-space: nowrap;
}

/* States — merah kalau ditolak, hijau kalau OK, netral/biru lembut kalau pending/warn */
.readiness-item[data-state="ok"] .readiness-icon {
  color: var(--ok); background: rgba(22,163,74,.14);
}
.readiness-item[data-state="error"] .readiness-icon {
  color: #DC2626; background: rgba(220,38,38,.12);
}
.readiness-item[data-state="pending"] .readiness-icon,
.readiness-item[data-state="warn"] .readiness-icon,
.readiness-item[data-state="idle"] .readiness-icon {
  color: var(--brand); background: var(--brand-soft);
}

/* ── Pembatasan perangkat (blokir desktop/laptop/PC) ────────── */
.device-block {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(circle at 20% 10%, rgba(13,148,136,.16), transparent 40%),
    radial-gradient(circle at 80% 90%, rgba(30,58,95,.14), transparent 45%),
    #F0F9FF;
}
.device-block.is-hidden { display: none; }

.device-block__card {
  max-width: 380px;
  width: 100%;
  text-align: center;
  padding: 32px 24px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(30,58,95,.12);
}

.device-block__icon {
  width: 64px; height: 64px;
  margin: 0 auto 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
}
.device-block__icon svg { width: 30px; height: 30px; }

.device-block__title {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-1);
}

.device-block__text {
  margin: 0;
  font-size: .9rem;
  line-height: 1.6;
  color: var(--text-2);
}

/* ── Responsive — layar besar (tablet/desktop) ─────────────── */
@media (min-width: 480px) {
  .login-card { padding: 40px 36px; }
  .login-logo { width: 96px; height: 96px; }
  .login-logo img { width: 56px; height: 66px; }
  .login-title { font-size: 1.875rem; }
}

/* ── Reduced motion ────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .splash__logo, .splash__brand, .splash__sub, .splash__org,
  .login-card { animation: none; }
  .btn--primary[data-loading="true"]::after { animation: none; }
  .input, .btn--primary, .input-action { transition: none; }
  .modal-overlay, .modal-container { transition: none; }
  .checkbox-custom, .btn-aux, .btn-modal-close { transition: none; }
  .btn-pengaduan { transition: none; }
  .skip-link { transition: none; }
}
