/* Absensi HUT Ke-11 AKP2I — tema emerald, mobile-first, rasa app native */

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
/* Bebas Neue (display/condensed). Google Fonts hanya menyediakan weight 400;
   tampilannya sudah tebal-condensed, dan tombol "Tebal" di aplikasi memakai
   penebalan sintetis browser. */
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/bebas-neue-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
    U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bebas Neue";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/bebas-neue-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Plus Jakarta Sans";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/plus-jakarta-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304,
    U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}



:root {
  --brand: #059669;
  --brand-2: #10B981;
  --brand-deep: #047857;
  --brand-soft: #6EE7B7;
  --ink: #102A21;
  --muted: #5B6F68;
  --line: rgba(255, 255, 255, 0.62);
  --glass: rgba(255, 255, 255, 0.62);
  --glass-solid: rgba(255, 255, 255, 0.88);
  --ok: #059669;
  --ok-bg: #DCFCE7;
  --warn: #B45309;
  --warn-bg: #FEF3C7;
  --bad: #B91C1C;
  --bad-bg: #FEE2E2;
  --radius: 18px;
  --shadow: 0 12px 30px -12px rgba(6, 44, 33, 0.28);
  --shadow-sm: 0 6px 16px -10px rgba(6, 44, 33, 0.4);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --tabbar-h: 66px;
  --appbar-h: 60px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: #EDFBF3;
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(38rem 30rem at 12% -6%, rgba(5, 150, 105, 0.34), transparent 62%),
    radial-gradient(34rem 26rem at 96% 8%, rgba(20, 184, 166, 0.24), transparent 60%),
    radial-gradient(40rem 32rem at 50% 106%, rgba(163, 230, 53, 0.22), transparent 62%),
    linear-gradient(180deg, #F0FDF6 0%, #E7FAF0 55%, #F4FDF8 100%);
  z-index: -1;
}

button, input, select, textarea { font: inherit; color: inherit; }

/* Ukuran dasar semua ikon SVG. Tanpa ini SVG tanpa atribut width/height
   membesar memenuhi wadahnya dan melebarkan seluruh tata letak. */
svg { width: 1.35em; height: 1.35em; flex: 0 0 auto; }
img, video { max-width: 100%; }
button { cursor: pointer; border: 0; background: none; }
a { color: var(--brand); }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
ul { margin: 0; padding: 0; list-style: none; }

/* ------------------------------------------------------------------ frame */

#shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 620px) and (min-height: 720px) {
  body { padding: 22px; }
  #shell {
    height: calc(100vh - 44px);
    border-radius: 30px;
    box-shadow: 0 40px 80px -30px rgba(6, 44, 33, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.6);
    outline: 8px solid rgba(255, 255, 255, 0.35);
    background: rgba(255, 255, 255, 0.35);
  }
}

/* ----------------------------------------------------------------- splash */

#splash {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 18px;
  background: linear-gradient(155deg, #059669 0%, #047857 55%, #065F46 100%);
  color: #fff;
  transition: opacity 420ms ease, visibility 420ms ease;
}
#splash.sembunyi { opacity: 0; visibility: hidden; }
#splash img { width: 96px; height: 96px; border-radius: 26px; box-shadow: 0 18px 40px -14px rgba(0, 0, 0, 0.5); }
#splash .nama { font-size: 20px; font-weight: 700; letter-spacing: 0.2px; }
#splash .sub { font-size: 13px; opacity: 0.85; }
.spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  animation: muter 800ms linear infinite;
}
@keyframes muter { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ login */

#layarLogin {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: calc(22px + var(--safe-t)) 22px calc(22px + var(--safe-b));
  background: linear-gradient(165deg, #059669 0%, #047857 48%, #065F46 100%);
  color: #fff;
  overflow-y: auto;
}
#layarLogin.tersembunyi { display: none; }
.login-logo { width: 78px; height: 78px; border-radius: 22px; box-shadow: 0 16px 34px -14px rgba(0, 0, 0, 0.55); margin-top: auto; }
.login-judul { font-size: 22px; font-weight: 750; margin-top: 16px; text-align: center; }
.login-sub { font-size: 13.5px; opacity: 0.86; text-align: center; margin-top: 6px; }
.pin-titik { display: flex; gap: 12px; margin: 26px 0 8px; }
.pin-titik i {
  width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.6);
  transition: transform 140ms ease, background 140ms ease;
}
.pin-titik i.isi { background: #fff; border-color: #fff; transform: scale(1.12); }
.pin-pesan { min-height: 20px; font-size: 13px; color: #FDE68A; font-weight: 600; }
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 68px);
  gap: 14px;
  justify-content: center;
  margin: 12px 0 auto;
}
.keypad button {
  height: 68px;
  border-radius: 50%;
  font-size: 25px;
  font-weight: 600;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
  transition: transform 90ms ease, background 140ms ease;
}
.keypad button:active { transform: scale(0.93); background: rgba(255, 255, 255, 0.32); }
.keypad button.aksi { font-size: 15px; font-weight: 700; letter-spacing: 0.4px; }
.pintasan-peserta {
  margin-top: 8px;
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ----------------------------------------------------------------- appbar */

#appbar {
  position: relative;
  z-index: 20;
  height: calc(var(--appbar-h) + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255, 255, 255, 0.66);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.7);
}
#appbar .bar-judul { flex: 1; min-width: 0; }
#appbar .bar-judul strong { display: block; font-size: 16px; font-weight: 700; }
#appbar .bar-judul span { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ikon-tombol {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-sm);
  color: var(--ink);
}
.ikon-tombol:active { transform: scale(0.94); }
.ikon-tombol svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------- screens */

#layarSkrol {
  position: relative;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}
.screen { display: none; padding: 18px 16px 26px; }
.screen.aktif { display: block; animation: masuk 240ms cubic-bezier(0.2, 0.7, 0.3, 1); }
@keyframes masuk { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.screen.tanpa-pad { padding: 0 0 8px; }

.jarak-atas { margin-top: 18px; }
.seksi-judul {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin: 26px 2px 12px;
}
.seksi-judul:first-child { margin-top: 0; }
.seksi-judul h2 { font-size: 15px; font-weight: 700; letter-spacing: 0.1px; }
.seksi-judul .tautan { font-size: 13px; font-weight: 600; color: var(--brand); }

/* ---------------------------------------------------------------- kartu */

.kartu {
  background: var(--glass);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.kartu.padat { padding: 14px; }
.tumpuk { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.tumpuk > * { min-width: 0; }
.tumpuk.lega { gap: 20px; }

.kartu-hero {
  background: linear-gradient(140deg, rgba(5, 150, 105, 0.94), rgba(139, 92, 246, 0.92));
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.34);
}
.kartu-hero .label { font-size: 11.5px; letter-spacing: 1.1px; text-transform: uppercase; opacity: 0.85; }
.kartu-hero .judul { font-size: 21px; font-weight: 750; margin-top: 6px; }
.kartu-hero .meta { font-size: 13px; opacity: 0.92; margin-top: 6px; }

.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat {
  background: var(--glass-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 12px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 22px; font-weight: 750; }
.stat span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* --------------------------------------------------------------- tombol */

.tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px;
  min-width: 0; max-width: 100%;
  padding: 0 18px;
  text-align: center;
  border-radius: 14px;
  font-weight: 650;
  font-size: 14.5px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 12px 24px -12px rgba(5, 150, 105, 0.85);
  transition: transform 90ms ease, opacity 140ms ease;
}
.tombol:active { transform: scale(0.97); }
.tombol svg { width: 18px; height: 18px; }
.tombol.penuh { width: 100%; }
.tombol.sekunder { background: rgba(255, 255, 255, 0.85); color: var(--brand); border: 1px solid rgba(5, 150, 105, 0.24); box-shadow: var(--shadow-sm); }
.tombol.halus { background: rgba(255, 255, 255, 0.55); color: var(--ink); border: 1px solid var(--line); box-shadow: none; }
.tombol.bahaya { background: linear-gradient(135deg, #EF4444, #DC2626); box-shadow: 0 12px 24px -14px rgba(220, 38, 38, 0.9); }
.tombol[disabled] { opacity: 0.55; pointer-events: none; }
.tombol.kecil { min-height: 38px; padding: 0 13px; font-size: 13px; border-radius: 12px; }
.baris-tombol {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 10px;
}
.baris-tombol > .tombol.penuh { grid-column: 1 / -1; }
.baris-tombol .tombol { padding: 0 12px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  font-size: 13px; font-weight: 600; color: var(--muted);
  white-space: nowrap; flex: 0 0 auto;
}
.chip.aktif { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: var(--shadow-sm); }
.chip b { font-weight: 700; }
.chip-scroll { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
.chip-scroll::-webkit-scrollbar { display: none; }

/* --------------------------------------------------------------- list */

.list-item {
  display: flex; align-items: center; gap: 13px;
  background: var(--glass-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: var(--shadow-sm);
}
.list-item .avatar {
  flex: 0 0 auto;
  width: 42px; height: 42px;
  border-radius: 13px;
  display: grid; place-items: center;
  font-weight: 700; font-size: 15px; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.list-item .teks { flex: 1; min-width: 0; }
.list-item .teks > strong { display: block; font-size: 14.5px; font-weight: 650; word-break: break-word; }
.list-item .teks > span { display: block; font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.list-item .aksi { display: flex; gap: 8px; flex: 0 0 auto; }
.list-item .aksi button {
  width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center;
  background: rgba(5, 150, 105, 0.1);
  color: var(--brand);
}
.list-item .aksi button.bahaya { background: rgba(239, 68, 68, 0.1); color: #DC2626; }
.list-item .aksi svg { width: 17px; height: 17px; }
.list-item .avatar svg { width: 20px; height: 20px; }
.list-item.hadir { border-color: rgba(5, 150, 105, 0.32); background: rgba(236, 253, 245, 0.86); }
.list-item.belum { opacity: 0.94; }
.kode-pill {
  display: inline-flex; align-items: center; gap: 5px;
  width: fit-content;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  font-size: 11.5px; font-weight: 600;
  padding: 3px 8px; border-radius: 8px;
  background: rgba(5, 150, 105, 0.1); color: var(--brand);
}
button.kode-pill {
  min-height: 34px; padding: 0 10px;
  border: 1px solid rgba(5, 150, 105, 0.22);
  background: rgba(255, 255, 255, 0.85);
}
.kode-pill svg { width: 16px; height: 16px; }

.kosong {
  text-align: center;
  padding: 30px 20px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.5);
  border: 1px dashed rgba(99, 95, 130, 0.28);
  border-radius: var(--radius);
  font-size: 13.5px;
}
.kosong strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 6px; }
.kosong svg { width: 34px; height: 34px; opacity: 0.5; margin-bottom: 8px; }

/* progress sesi */
.sesi-baris { display: grid; gap: 10px; }
.progress {
  height: 8px; border-radius: 999px;
  background: rgba(99, 95, 130, 0.16);
  overflow: hidden;
}
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 320ms ease; }
.sesi-kepala { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.sesi-kepala strong { font-size: 14.5px; }
.sesi-kepala span { font-size: 12.5px; color: var(--muted); }

/* --------------------------------------------------------------- scan */

.scan-wrap { padding: 0 16px; }
.kamera {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  max-height: 60vh;
  border-radius: 24px;
  overflow: hidden;
  background: #05261D;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.kamera video { width: 100%; height: 100%; object-fit: cover; display: block; }
.kamera .lapis {
  position: absolute; inset: 0;
  background: radial-gradient(60% 45% at 50% 50%, transparent 42%, rgba(2, 22, 16, 0.6) 100%);
  pointer-events: none;
}
.bingkai {
  position: absolute; top: 50%; left: 50%;
  width: min(74%, 300px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 22px;
  pointer-events: none;
}
.bingkai span { position: absolute; width: 34px; height: 34px; border: 4px solid rgba(255, 255, 255, 0.92); }
.bingkai span:nth-child(1) { top: 0; left: 0; border-right: 0; border-bottom: 0; border-radius: 20px 0 0 0; }
.bingkai span:nth-child(2) { top: 0; right: 0; border-left: 0; border-bottom: 0; border-radius: 0 20px 0 0; }
.bingkai span:nth-child(3) { bottom: 0; left: 0; border-right: 0; border-top: 0; border-radius: 0 0 0 20px; }
.bingkai span:nth-child(4) { bottom: 0; right: 0; border-left: 0; border-top: 0; border-radius: 0 0 20px 0; }
.bingkai i {
  position: absolute; left: 6%; right: 6%; height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, transparent, #A7F3D0, #34D399, #A7F3D0, transparent);
  box-shadow: 0 0 16px rgba(52, 211, 153, 0.9);
  animation: laser 2.4s ease-in-out infinite;
}
@keyframes laser { 0%, 100% { top: 8%; } 50% { top: 90%; } }
.kamera .info-kamera {
  position: absolute; bottom: 12px; left: 0; right: 0;
  text-align: center; color: rgba(255, 255, 255, 0.9); font-size: 12.5px;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}
.kamera .alat { position: absolute; top: 12px; right: 12px; display: flex; gap: 8px; }
.kamera .alat button {
  width: 40px; height: 40px; border-radius: 13px;
  background: rgba(2, 22, 16, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.28);
  color: #fff;
  display: grid; place-items: center;
}
.kamera .alat svg { width: 19px; height: 19px; }
.kamera.mati { display: grid; place-items: center; padding: 26px; text-align: center; color: rgba(255, 255, 255, 0.82); font-size: 13.5px; }

.hasil {
  display: grid; gap: 4px;
  border-radius: var(--radius);
  padding: 15px 16px;
  border: 1px solid transparent;
  box-shadow: var(--shadow);
  animation: masuk 200ms ease;
}
.hasil strong { font-size: 16.5px; }
.hasil .tag-status {
  font-size: 10.5px; font-weight: 750; letter-spacing: 1.1px;
  text-transform: uppercase; opacity: 0.82;
}
.hasil .baris { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hasil .jam { font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-variant-numeric: tabular-nums; font-size: 12.5px; opacity: 0.8; }
.hasil.ok { background: var(--ok-bg); border-color: rgba(5, 150, 105, 0.35); color: #065F46; }
.hasil.duplikat { background: var(--warn-bg); border-color: rgba(180, 83, 9, 0.32); color: #7C2D12; }
.hasil.tidak_dikenal, .hasil.tidak_aktif { background: var(--bad-bg); border-color: rgba(185, 28, 28, 0.3); color: #7F1D1D; }
.hasil.tunggu { background: rgba(255, 255, 255, 0.8); border-color: var(--line); color: var(--ink); }

.pencatat {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 12px;
}
.pencatat svg { width: 18px; height: 18px; color: var(--muted); }
.pencatat input {
  flex: 1; min-width: 0; border: 0; background: none; outline: none;
  font-size: 15px; text-transform: uppercase; letter-spacing: 0.4px;
}

.badge-antre {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 650;
  color: var(--warn); background: var(--warn-bg);
  border-radius: 999px; padding: 5px 11px;
}

/* --------------------------------------------------------------- form */

.medan { display: grid; gap: 6px; margin-bottom: 14px; }
.medan label { font-size: 12.5px; font-weight: 650; color: var(--muted); }
.medan input, .medan select, .medan textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border-radius: 13px;
  border: 1px solid rgba(99, 95, 130, 0.2);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
  font-size: 15px;
}
.medan textarea { min-height: 120px; resize: vertical; font-size: 13.5px; line-height: 1.5; }
.medan input:focus, .medan textarea:focus, .medan select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.13);
}
.medan .bantuan { font-size: 11.5px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

/* --------------------------------------------------------------- sheet */

#backdrop {
  position: fixed; inset: 0;
  background: rgba(20, 16, 40, 0.42);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity 220ms ease, visibility 220ms ease;
  z-index: 100;
}
#backdrop.tampil { opacity: 1; visibility: visible; }
#sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: 100%;
  max-width: 520px;
  transform: translate(-50%, 100%);
  background: linear-gradient(180deg, rgba(252, 251, 255, 0.97), rgba(244, 241, 254, 0.98));
  border-radius: 26px 26px 0 0;
  box-shadow: 0 -20px 50px -20px rgba(6, 44, 33, 0.5);
  z-index: 110;
  /* PENTING: dialog tertutup WAJIB visibility:hidden. Di HP ia memang
     tergeser ke bawah layar, tetapi di desktop ia dipusatkan di tengah
     (lihat @media min-width:1000px) sehingga tanpa ini dialog kosong
     "Judul" menutupi layar masuk dan mencuri klik. Transisi visibility
     ditunda supaya animasi keluar tetap terlihat. */
  visibility: hidden;
  transition: transform 280ms cubic-bezier(0.2, 0.75, 0.3, 1), visibility 0s linear 280ms;
  max-height: 92%;
  display: flex;
  flex-direction: column;
}
#sheet.tampil {
  transform: translate(-50%, 0);
  visibility: visible;
  transition: transform 280ms cubic-bezier(0.2, 0.75, 0.3, 1), visibility 0s linear 0s;
}
.sheet-gagang { width: 44px; height: 5px; border-radius: 99px; background: rgba(99, 95, 130, 0.28); margin: 10px auto 4px; }
.sheet-kepala { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 20px 10px; }
.sheet-kepala h3 { font-size: 17px; }
.sheet-isi { overflow-y: auto; padding: 4px 20px calc(24px + var(--safe-b)); }

/* --------------------------------------------------------------- tabbar */

#tabbar {
  position: relative;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 6px 6px calc(4px + var(--safe-b));
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(180%);
  border-top: 1px solid rgba(255, 255, 255, 0.75);
}
#tabbar button {
  display: grid; justify-items: center; gap: 3px;
  padding: 7px 2px 5px;
  border-radius: 14px;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  transition: color 160ms ease, background 160ms ease;
}
#tabbar button svg { width: 22px; height: 22px; }
#tabbar button.aktif { color: var(--brand); background: rgba(5, 150, 105, 0.1); }
#tabbar button.aktif span { color: var(--brand); }

/* --------------------------------------------------------------- toast */

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 22px + var(--safe-b));
  transform: translate(-50%, 20px);
  z-index: 120;
  max-width: 90%;
  padding: 12px 18px;
  border-radius: 14px;
  background: rgba(6, 44, 33, 0.94);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 16px 34px -16px rgba(0, 0, 0, 0.7);
  opacity: 0; visibility: hidden;
  transition: opacity 200ms ease, transform 200ms ease, visibility 200ms ease;
  text-align: center;
}
#toast.tampil { opacity: 1; visibility: visible; transform: translate(-50%, 0); }

/* ---------------------------------------------------- kartu peserta QR */

/* Tata letak kartu memakai posisi absolut dalam satuan mm/px yang dikirim
   inline dari mesin tata letak (lihat tataLetakKartu di app.js), sehingga
   pratinjau, hasil cetak, dan PNG yang diunduh selalu sama persis. */
.kartu-peserta {
  position: relative;
  overflow: hidden;
  background: #ffffff;
  color: #102A21;
  box-shadow: 0 10px 26px -14px rgba(6, 44, 33, 0.45);
  border: 1px solid rgba(16, 42, 33, 0.08);
  box-sizing: border-box;
  flex: 0 0 auto;
  line-height: 1;
}
.kartu-peserta.teks-terang { color: #ffffff; }
.kp-latar {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
}
.kp-kabut { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; }
.kp-elem { position: absolute; box-sizing: border-box; }

/* Jenis huruf kartu (dipilih pengguna): "Plus Jakarta Sans" atau "Bebas Neue". */
.kartu-peserta.font-bebas { font-family: "Bebas Neue", "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: 0.02em; }
/* bobot huruf diatur inline per elemen (lihat bobotTeks() di app.js) */


/* pemilih sesi di halaman scan */
.pilih-sesi-kartu {
  display: flex; align-items: center; gap: 12px;
  background: var(--glass-solid);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.pilih-sesi-kartu > svg { width: 20px; height: 20px; color: var(--brand); flex: 0 0 auto; }
.pilih-sesi-kartu .kendali-sesi { flex: 1; min-width: 0; display: grid; gap: 2px; }
.pilih-sesi-kartu .kendali-sesi span { font-size: 11.5px; font-weight: 650; color: var(--muted); }
.pilih-sesi-kartu select {
  width: 100%; min-width: 0;
  border: 0; background: none; outline: none;
  font-size: 15px; font-weight: 650; color: var(--ink);
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--brand) 50%), linear-gradient(135deg, var(--brand) 50%, transparent 50%);
  background-position: calc(100% - 14px) 52%, calc(100% - 9px) 52%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 26px;
  text-overflow: ellipsis;
}

/* centang inline pada formulir */
label.cek-inline { display: flex; align-items: center; gap: 10px; font-weight: 550; }
label.cek-inline input { width: 20px; height: 20px; accent-color: var(--brand); }


.kp-qr { display: block; background: #fff; }
.kp-nama {
  line-height: 1.16;
  /* selalu satu baris & terkunci di tengah kartu (hanya bisa digeser naik-turun) */
  white-space: nowrap;
  overflow: visible;
  word-break: keep-all;
}
.kp-custom { line-height: 1.3; word-break: break-word; }
.kp-meta { opacity: 0.85; line-height: 1.26; word-break: break-word; }
.kp-kode { font-weight: 700; letter-spacing: 0.06em; font-variant-numeric: tabular-nums; line-height: 1.3; }
.kp-kode > span { display: inline-block; color: var(--brand-deep); background: rgba(5, 150, 105, 0.12); }
.kartu-peserta.teks-terang .kp-kode > span { color: #ffffff; background: rgba(255, 255, 255, 0.24); }

.panggung {
  display: grid;
  place-items: center;
  padding: 20px 18px;
  border-radius: 20px;
  background:
    linear-gradient(45deg, rgba(91, 111, 104, 0.06) 25%, transparent 25%, transparent 75%, rgba(91, 111, 104, 0.06) 75%) 0 0 / 22px 22px,
    linear-gradient(45deg, rgba(91, 111, 104, 0.06) 25%, transparent 25%, transparent 75%, rgba(91, 111, 104, 0.06) 75%) 11px 11px / 22px 22px,
    rgba(255, 255, 255, 0.6);
  border: 1px dashed rgba(91, 111, 104, 0.3);
  overflow: hidden;
}

/* --- elemen yang bisa digeser di pratinjau --- */
#panggungDesain { touch-action: pan-y; }
body.menyeret-kartu { user-select: none; }
#panggungDesain .kp-elem[data-elem] {
  cursor: grab;
  touch-action: none;
  outline: 1px dashed rgba(5, 150, 105, 0.4);
  outline-offset: 2px;
  border-radius: 3px;
  transition: outline-color 160ms ease, box-shadow 160ms ease;
}
#panggungDesain .kp-elem[data-elem]:hover { outline-color: rgba(5, 150, 105, 0.85); }
#panggungDesain .kp-elem.diseret {
  cursor: grabbing;
  outline: 1.5px solid var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.18);
}
.daftar-posisi { display: grid; gap: 8px; margin-top: 14px; }
.posisi-baris {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.66);
  border: 1px solid var(--line);
  font-size: 12.5px;
}
.posisi-baris span { color: var(--muted); }
.posisi-baris b { font-weight: 650; font-variant-numeric: tabular-nums; }
.posisi-baris i { font-weight: 500; font-style: normal; color: var(--muted); opacity: 0.85; }

/* baris pengaturan teks tambahan */
.teks-baris {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  border-radius: 14px;
  padding: 12px;
  margin-bottom: 10px;
}
.teks-baris:last-child { margin-bottom: 0; }
.teks-baris .atas { display: flex; align-items: center; gap: 8px; }
.teks-baris .in-teks {
  flex: 1; min-width: 0;
  min-height: 42px; padding: 9px 12px;
  border-radius: 11px;
  border: 1px solid rgba(91, 111, 104, 0.22);
  background: #fff; font-size: 14.5px; outline: none;
}
.teks-baris .in-teks:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.13); }
.teks-baris .hapus {
  width: 40px; height: 40px; flex: 0 0 auto;
  border-radius: 11px; display: grid; place-items: center;
  background: rgba(239, 68, 68, 0.1); color: #DC2626;
}
.teks-baris .hapus svg { width: 17px; height: 17px; }
.teks-baris .baris-atur { margin-bottom: 0; align-items: center; }
.teks-baris .kendali { flex: 1 1 60%; min-width: 0; }
.teks-baris .kendali input[type="range"] { flex: 1; }
.cek-mini { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.cek-mini input { width: 18px; height: 18px; accent-color: var(--brand); }

/* data peserta lengkap pada hasil scan */
.data-peserta {
  display: grid; gap: 6px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(16, 42, 33, 0.12);
}
.data-baris { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; }
.data-baris span { opacity: 0.72; white-space: nowrap; }
.data-baris b { font-weight: 650; text-align: right; word-break: break-word; }

/* pratinjau ikon aplikasi */
.ikon-pratinjau {
  display: flex; align-items: center; gap: 14px;
  margin-top: 14px; padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}
.ikon-pratinjau img {
  width: 54px; height: 54px; border-radius: 14px; object-fit: cover;
  background: rgba(91, 111, 104, 0.1); flex: 0 0 auto;
}
.ikon-pratinjau b { display: block; font-size: 13.5px; }
.ikon-pratinjau span { display: block; font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------- modul desain kartu */

.baris-atur { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.baris-atur:last-child { margin-bottom: 0; }
.baris-atur .label-atur { font-size: 13px; font-weight: 600; }
.baris-atur .nilai-atur { font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.baris-atur .kendali { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 26px; background: none; margin: 0;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 999px;
  background: linear-gradient(90deg, var(--brand), var(--brand-2));
  opacity: 0.85;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -7px;
  border-radius: 50%; background: #fff;
  border: 2px solid var(--brand);
  box-shadow: 0 3px 8px -3px rgba(6, 44, 33, 0.6);
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
input[type="range"]::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 2px solid var(--brand); }
input[type="number"].kecil {
  width: 74px; min-height: 40px; padding: 8px 10px; text-align: center;
  border-radius: 11px; border: 1px solid rgba(91, 111, 104, 0.24);
  background: rgba(255, 255, 255, 0.92); font-size: 14px;
  font-variant-numeric: tabular-nums;
}
.segmen { display: flex; gap: 6px; background: rgba(91, 111, 104, 0.1); border-radius: 12px; padding: 4px; }
.segmen button {
  padding: 7px 13px; border-radius: 9px;
  font-size: 13px; font-weight: 650; color: var(--muted);
  transition: background 140ms ease, color 140ms ease;
}
.segmen button.aktif { background: #fff; color: var(--brand-deep); box-shadow: 0 3px 8px -5px rgba(6, 44, 33, 0.5); }
.pilih-cepat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pilih-cepat button {
  text-align: left; padding: 12px 13px; border-radius: 14px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.pilih-cepat button b { display: block; font-size: 13.5px; font-weight: 650; }
.pilih-cepat button span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.pilih-cepat button.aktif { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.16); }
.cek-baris { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 550; padding: 9px 0; }
.cek-baris input { width: 20px; height: 20px; accent-color: var(--brand); }
.cek-baris.nonaktif { opacity: 0.55; }
.cek-baris input[disabled] { cursor: not-allowed; }
.cek-baris .catatan { font-size: 11.5px; font-weight: 500; color: var(--muted); }
.info-cetak {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.info-cetak.peringatan { color: #7C2D12; background: var(--warn-bg); border-color: rgba(180, 83, 9, 0.3); }
.info-cetak svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.status-simpan { font-size: 12px; font-weight: 600; color: var(--brand-deep); opacity: 0; transition: opacity 200ms ease; }
.status-simpan.tampil { opacity: 1; }

/* ------------------------------------------------------------ cetak */

#printArea { display: none; }

@media print {
  @page { size: A4; margin: 10mm; }
  body::before, #shell, #splash, #layarLogin, #backdrop, #sheet, #toast { display: none !important; }
  body { background: #fff !important; padding: 0 !important; }
  #printArea { display: block !important; background: #fff; padding: 0; }
  #printArea .lembar {
    display: grid;
    grid-template-columns: repeat(2, 85mm);
    gap: 5mm;
    justify-content: center;
    align-content: start;
  }
  #printArea .kartu-peserta {
    box-shadow: none;
    border: 1px dashed #cbd5e1;
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

@media (max-width: 380px) {
  .keypad { grid-template-columns: repeat(3, 60px); gap: 12px; }
  .keypad button { height: 60px; font-size: 22px; }
  .stat b { font-size: 19px; }
}

/* ======================================================================
   Aplikasi Ujian CBT — komponen khas
   (blok dasar di atas diwarisi dari aplikasi AKP2I: bingkai HP, kartu,
   form, sheet, tab bar, toast)
   ====================================================================== */

:root {
  --kontrol-h: 46px;
  --kontrol-r: 13px;
  --kontrol-fs: 14.5px;
}

/* Ukuran kontrol formulir seragam (jangan menambah padding inline). */
.medan input, .medan select, .medan textarea,
.kendali-baris input, .kendali-baris select,
.kontrol {
  width: 100%;
  min-width: 0;
  min-height: var(--kontrol-h);
  padding: 11px 13px;
  border-radius: var(--kontrol-r);
  border: 1px solid rgba(99, 95, 130, 0.2);
  background: rgba(255, 255, 255, 0.9);
  outline: none;
  font-size: var(--kontrol-fs);
}
.medan textarea { min-height: 110px; line-height: 1.55; }
.medan input:focus, .medan select:focus, .medan textarea:focus,
.kendali-baris input:focus, .kendali-baris select:focus, .kontrol:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.13);
}
.medan { display: grid; gap: 6px; align-content: start; margin-bottom: 14px; }
.medan label { font-size: 12.5px; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medan .bantuan { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; align-items: start; }
.grid-2 > .medan { margin-bottom: 0; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; align-items: start; }
.grid-3 > .medan { margin-bottom: 0; }
@media (max-width: 359px) { .grid-2, .grid-3 { grid-template-columns: minmax(0, 1fr); } }

.kartu-hero {
  background:
    radial-gradient(24rem 18rem at 100% 0%, rgba(163, 230, 53, 0.24), transparent 62%),
    linear-gradient(140deg, rgba(4, 120, 87, 0.97), rgba(5, 150, 105, 0.92));
}

/* --------------------------------------------------------------- masuk */

#layarLogin { justify-content: center; }
#layarLogin .login-logo { margin-top: 0; }
.login-bungkus {
  width: 100%;
  max-width: 400px;
  margin: auto;
  padding: 28px 22px 24px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 30px 70px -30px rgba(2, 44, 30, 0.75);
  color: var(--ink);
  display: grid;
  justify-items: center;
}
.login-bungkus .login-logo { box-shadow: 0 14px 30px -16px rgba(2, 44, 30, 0.8); }
.login-bungkus .login-judul { color: var(--ink); }
.login-bungkus .login-sub { color: var(--muted); }
.login-form { width: 100%; margin-top: 22px; }
.login-form .medan { text-align: left; }
.login-pesan { min-height: 20px; font-size: 12.5px; font-weight: 650; color: #B91C1C; margin: -2px 0 10px; }
.sandi-bungkus { position: relative; display: flex; }
.sandi-bungkus input { padding-right: 46px; }
.lihat-sandi {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 10px;
  display: grid; place-items: center; color: var(--muted);
}
.lihat-sandi:hover { background: rgba(5, 150, 105, 0.1); color: var(--brand-deep); }
.login-status {
  margin-top: 16px; font-size: 11.5px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px;
  text-align: center; flex-wrap: wrap;
}
.login-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #10B981; }
.login-status.browser .dot { background: #F59E0B; }
.login-status svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------- komponen umum */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
  background: rgba(91, 111, 104, 0.12); color: var(--muted);
  white-space: nowrap;
}
.pill.aktif, .pill.lunas, .pill.benar { background: var(--ok-bg); color: #065F46; }
.pill.draf, .pill.belum, .pill.menunggu { background: var(--warn-bg); color: #92400E; }
.pill.selesai, .pill.info { background: rgba(14, 165, 233, 0.14); color: #075985; }
.pill.bahaya, .pill.salah { background: var(--bad-bg); color: #991B1B; }
.pill svg { width: 13px; height: 13px; }

.ringkas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ringkas .kotak {
  border-radius: 16px; padding: 14px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.ringkas .kotak .label { font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: 0.3px; }
.ringkas .kotak b { display: block; font-size: 22px; font-weight: 750; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ringkas .kotak span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ringkas .kotak.hijau { background: linear-gradient(135deg, rgba(5, 150, 105, 0.14), rgba(16, 185, 129, 0.05)); }
.ringkas .kotak.emas { background: linear-gradient(135deg, rgba(217, 119, 6, 0.13), rgba(245, 158, 11, 0.04)); }
.ringkas .kotak.merah { background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.03)); }
.ringkas .kotak.biru { background: linear-gradient(135deg, rgba(14, 165, 233, 0.13), rgba(14, 165, 233, 0.03)); }

.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.menu-kotak {
  display: grid; gap: 2px; justify-items: start; text-align: left;
  padding: 16px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.menu-kotak svg { width: 26px; height: 26px; color: var(--brand); margin-bottom: 6px; }
.menu-kotak b { font-size: 14.5px; font-weight: 700; }
.menu-kotak span { font-size: 11.5px; color: var(--muted); }
.menu-kotak:active { transform: scale(0.98); }

.baris-data { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 13px; padding: 6px 0; }
.baris-data + .baris-data { border-top: 1px dashed rgba(91, 111, 104, 0.2); }
.baris-data span { color: var(--muted); }
.baris-data b { font-weight: 650; text-align: right; word-break: break-word; }

.tabel-bungkus { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -4px; padding: 0 4px; }
table.tabel { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tabel th, table.tabel td { padding: 8px 9px; text-align: left; border-bottom: 1px solid rgba(91, 111, 104, 0.16); vertical-align: top; }
table.tabel th { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.4px; white-space: nowrap; }
table.tabel td.num, table.tabel th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }

.mini-tombol {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  min-height: 32px; padding: 0 11px;
  border-radius: 10px; font-size: 12.5px; font-weight: 650;
  background: rgba(5, 150, 105, 0.1); color: var(--brand-deep);
}
.mini-tombol.bahaya { color: #DC2626; background: rgba(239, 68, 68, 0.09); }
.mini-tombol.halus { color: var(--muted); background: rgba(91, 111, 104, 0.1); }
.mini-tombol svg { width: 15px; height: 15px; }

.kendali-baris { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.kendali-baris input, .kendali-baris select { flex: 1 1 160px; }
.kendali-baris input[type="search"] { flex: 1 1 100%; }

.info-cetak {
  display: flex; gap: 10px; align-items: flex-start;
  font-size: 12.5px; color: var(--muted);
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
  line-height: 1.5;
}
.info-cetak.peringatan { color: #7C2D12; background: var(--warn-bg); border-color: rgba(180, 83, 9, 0.3); }
.info-cetak svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.info-cetak b { font-weight: 700; }

.progress { height: 8px; border-radius: 999px; background: rgba(91, 111, 104, 0.16); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.progress.besar { height: 10px; }

.kosong {
  display: grid; justify-items: center; text-align: center; gap: 4px;
  padding: 30px 20px; border-radius: 16px;
  border: 1px dashed rgba(91, 111, 104, 0.3);
  color: var(--muted); font-size: 12.5px;
  background: rgba(255, 255, 255, 0.5);
}
.kosong strong { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }
.kosong svg { width: 34px; height: 34px; opacity: 0.5; margin-bottom: 8px; }

/* Popup (semua peringatan aplikasi; confirm() bawaan tidak dipakai). */
#popupLapis {
  position: fixed; inset: 0; z-index: 140;
  display: grid; place-items: center;
  padding: 22px;
  background: rgba(13, 32, 26, 0.48);
  backdrop-filter: blur(3px);
  opacity: 0; visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}
#popupLapis.tampil { opacity: 1; visibility: visible; }
#popupKotak {
  width: 100%; max-width: 400px;
  background: #fff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 34px 70px -30px rgba(2, 32, 22, 0.7);
  transform: scale(0.96);
  transition: transform 180ms ease;
  text-align: center;
}
#popupLapis.tampil #popupKotak { transform: scale(1); }
#popupIkon { display: grid; place-items: center; margin-bottom: 8px; }
#popupIkon .bulat {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(5, 150, 105, 0.12); color: var(--brand-deep);
}
#popupIkon .bulat.bahaya { background: var(--bad-bg); color: #B91C1C; }
#popupIkon .bulat.tanya { background: rgba(217, 119, 6, 0.13); color: #B45309; }
#popupIkon svg { width: 26px; height: 26px; }
#popupJudul { font-size: 17px; font-weight: 750; margin-bottom: 6px; }
#popupPesan { font-size: 13.5px; color: var(--muted); line-height: 1.55; white-space: pre-line; margin: 0 0 18px; }
#popupAksi { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
#popupAksi .tombol { min-height: 44px; }
#popupAksi.baru { display: grid; }

/* ------------------------------------------------------------- daftar ujian */

.ujian-baris {
  display: grid; gap: 10px;
  padding: 15px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.ujian-baris .atas { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.ujian-baris .atas strong { font-size: 15px; font-weight: 700; line-height: 1.35; word-break: break-word; }
.ujian-baris .meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.ujian-baris .meta span { display: inline-flex; align-items: center; gap: 5px; }
.ujian-baris .meta svg { width: 14px; height: 14px; }
.ujian-baris .aksi { display: flex; flex-wrap: wrap; gap: 8px; }
.ujian-baris .aksi .tombol { min-height: 38px; font-size: 13px; padding: 0 13px; border-radius: 11px; }
.ujian-baris.klik { cursor: pointer; transition: transform 120ms ease, box-shadow 160ms ease; }
.ujian-baris.klik:active { transform: scale(0.995); }

/* ------------------------------------------------------- halaman ujian (SEB) */

#layarUjian {
  position: fixed; inset: 0; z-index: 80;
  display: none;
  flex-direction: column;
  background: #F1FAF5;
  color: var(--ink);
  overscroll-behavior: contain;
}
#layarUjian.tampil { display: flex; }
#ujBar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(8px + var(--safe-t)) 12px 8px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(5, 150, 105, 0.14);
  box-shadow: 0 10px 24px -22px rgba(6, 44, 33, 0.7);
}
.uj-judul { flex: 1; min-width: 0; }
.uj-judul strong { display: block; font-size: 14px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uj-judul span { display: block; font-size: 11.5px; color: var(--muted); }
.uj-timer {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 999px;
  background: #ECFDF5; color: var(--brand-deep);
  border: 1px solid rgba(5, 150, 105, 0.2);
  font-size: 13.5px; font-variant-numeric: tabular-nums;
  flex: 0 0 auto;
}
.uj-timer b { font-weight: 750; letter-spacing: 0.3px; }
.uj-timer svg { width: 15px; height: 15px; }
.uj-timer.hampir { background: var(--bad-bg); color: #B91C1C; border-color: rgba(185, 28, 28, 0.25); animation: denyut 1.6s ease-in-out infinite; }
@keyframes denyut { 50% { transform: scale(1.04); } }
#ujBar .ikon-tombol { background: rgba(5, 150, 105, 0.08); color: var(--brand-deep); width: 40px; height: 40px; border-radius: 12px; }
#ujBar .ikon-tombol svg { width: 19px; height: 19px; }
.uj-progres { height: 4px; background: rgba(5, 150, 105, 0.12); }
.uj-progres i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 260ms ease; }
.uj-isi { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 18px 16px 26px; }
.uj-bungkus { max-width: 820px; margin: 0 auto; display: grid; gap: 16px; }
.soal-kartu {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 20px;
  padding: 20px 18px;
  box-shadow: 0 18px 40px -30px rgba(6, 44, 33, 0.6);
}
.soal-nomor {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11.5px; font-weight: 750; letter-spacing: 0.6px; text-transform: uppercase;
  color: var(--brand-deep);
  background: rgba(5, 150, 105, 0.1);
  padding: 5px 11px; border-radius: 999px;
  margin-bottom: 12px;
}
.soal-nomor svg { width: 14px; height: 14px; }
.soal-teks { font-size: 16.5px; font-weight: 600; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.opsi-daftar { display: grid; gap: 10px; margin-top: 18px; }
.opsi {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px;
  border-radius: 14px;
  border: 1px solid rgba(99, 95, 130, 0.18);
  background: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
  position: relative;
}
.opsi:hover { border-color: rgba(5, 150, 105, 0.35); }
.opsi input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opsi .huruf {
  width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; flex: 0 0 auto;
  font-size: 13px; font-weight: 750;
  background: rgba(5, 150, 105, 0.1); color: var(--brand-deep);
}
.opsi .teks { font-size: 14.5px; line-height: 1.5; padding-top: 3px; word-break: break-word; }
.opsi.aktif {
  border-color: var(--brand);
  background: rgba(236, 253, 245, 0.96);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.13);
}
.opsi.aktif .huruf { background: var(--brand); color: #fff; }
.jawab-esai {
  width: 100%; min-height: 200px; margin-top: 18px;
  padding: 14px; border-radius: 14px;
  border: 1px solid rgba(99, 95, 130, 0.2);
  background: rgba(255, 255, 255, 0.95);
  font-size: 14.5px; line-height: 1.6; resize: vertical;
}
.jawab-esai:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.13); outline: none; }
.jawab-info { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
#ujKaki {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 10px;
  padding: 11px 14px calc(11px + var(--safe-b));
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid rgba(5, 150, 105, 0.14);
}
#ujKaki .tombol { min-height: 46px; padding: 0 12px; font-size: 13.5px; }
#ujKaki #ujRagu { min-width: 52px; display: inline-flex; gap: 6px; }
#ujKaki #ujRagu span { display: none; }
#ujKaki #ujRagu.aktif { background: var(--warn-bg); color: #92400E; border-color: rgba(180, 83, 9, 0.3); }
#ujKaki .tombol span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ujKaki .tombol[disabled] { opacity: 0.4; pointer-events: none; }
.uj-simpan {
  position: fixed; right: 14px; bottom: calc(78px + var(--safe-b));
  z-index: 82;
  padding: 7px 13px; border-radius: 999px;
  background: rgba(6, 44, 33, 0.9); color: #fff;
  font-size: 11.5px; font-weight: 650;
  opacity: 0; visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.uj-simpan.tampil { opacity: 1; visibility: visible; }
.uj-simpan.gagal { background: #B91C1C; }

/* navigasi nomor soal (di dalam sheet) */
.nav-soal { display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 8px; }
.nav-soal button {
  height: 46px; border-radius: 12px;
  border: 1px solid rgba(91, 111, 104, 0.22);
  background: rgba(255, 255, 255, 0.85);
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  display: grid; place-items: center; position: relative;
}
.nav-soal button.dijawab { background: var(--ok-bg); border-color: rgba(5, 150, 105, 0.35); color: #065F46; }
.nav-soal button.ragu { background: var(--warn-bg); border-color: rgba(180, 83, 9, 0.3); color: #92400E; }
.nav-soal button.sekarang { box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.28); border-color: var(--brand); }
.nav-legenda { display: flex; flex-wrap: wrap; gap: 12px; font-size: 11.5px; color: var(--muted); margin: 14px 0 4px; }
.nav-legenda span { display: inline-flex; align-items: center; gap: 6px; }
.nav-legenda i { width: 13px; height: 13px; border-radius: 4px; background: #fff; border: 1px solid rgba(91, 111, 104, 0.3); }
.nav-legenda i.dijawab { background: var(--ok-bg); border-color: rgba(5, 150, 105, 0.4); }
.nav-legenda i.ragu { background: var(--warn-bg); border-color: rgba(180, 83, 9, 0.4); }

/* ------------------------------------------------------------ hasil ujian */

.nilai-kartu {
  display: grid; justify-items: center; gap: 4px;
  padding: 24px 18px;
  border-radius: 20px;
  text-align: center;
  background:
    radial-gradient(22rem 16rem at 50% -20%, rgba(163, 230, 53, 0.3), transparent 62%),
    linear-gradient(150deg, #047857, #059669 55%, #10B981);
  color: #fff;
  box-shadow: 0 22px 44px -26px rgba(4, 120, 87, 0.9);
}
.nilai-kartu .label { font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; opacity: 0.82; }
.nilai-angka { font-size: 54px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.nilai-angka small { font-size: 16px; font-weight: 600; opacity: 0.7; margin-left: 2px; }
.nilai-kartu .sub { font-size: 12.5px; opacity: 0.92; }
.nilai-badge {
  margin-top: 6px; padding: 5px 13px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.4);
  font-size: 12px; font-weight: 700;
}
.nilai-badge.tunggu { background: rgba(255, 237, 213, 0.28); border-color: rgba(255, 255, 255, 0.42); }

.review {
  border-radius: 16px; padding: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  display: grid; gap: 10px;
  min-width: 0;
}
.review.benar { border-left: 4px solid #10B981; }
.review.salah { border-left: 4px solid #EF4444; }
.review.esai { border-left: 4px solid #F59E0B; }
.review.kosong { border-left: 4px solid #94A3B8; display: grid; justify-items: stretch; text-align: left; padding: 16px; }
.review .r-kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review .r-nomor { font-size: 11.5px; font-weight: 750; letter-spacing: 0.5px; color: var(--muted); text-transform: uppercase; }
.review .r-teks { font-size: 14px; font-weight: 600; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.jw-baris {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.5;
  background: rgba(241, 245, 249, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.jw-baris b { flex: 0 0 auto; font-size: 11px; font-weight: 750; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.jw-baris span { word-break: break-word; white-space: pre-wrap; }
.jw-baris.benar { background: rgba(220, 252, 231, 0.75); border-color: rgba(5, 150, 105, 0.28); }
.jw-baris.salah { background: rgba(254, 226, 226, 0.72); border-color: rgba(185, 28, 28, 0.22); }
.jw-baris.esai { background: rgba(254, 243, 199, 0.7); border-color: rgba(180, 83, 9, 0.22); }
.pembahasan {
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
  border-left: 3px solid rgba(5, 150, 105, 0.35);
  padding: 2px 0 2px 10px;
  white-space: pre-wrap;
}
.pembahasan b { color: var(--ink); }
.skor-mini { font-size: 12px; font-weight: 700; color: var(--brand-deep); white-space: nowrap; }

.atur-nilai { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: start; }
.atur-nilai input { width: 100%; }
@media (max-width: 430px) { .atur-nilai { grid-template-columns: minmax(0, 1fr); } }

/* -------------------------------------------------------------- soal admin */

.soal-admin {
  display: grid; gap: 8px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  min-width: 0;
}
.soal-admin .kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.soal-admin .no { font-size: 11.5px; font-weight: 750; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; }
.soal-admin .isi { font-size: 13.5px; line-height: 1.5; font-weight: 600; white-space: pre-wrap; word-break: break-word; }
.soal-admin .opsi-mini { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.soal-admin .opsi-mini span.benar { color: #065F46; font-weight: 700; }
.soal-admin .aksi { display: flex; gap: 8px; flex-wrap: wrap; }

.opsi-edit { display: grid; gap: 8px; }
.opsi-edit .baris {
  display: grid; grid-template-columns: 28px minmax(0, 1fr) 34px; gap: 8px; align-items: center;
}
.opsi-edit .baris .huruf {
  width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(5, 150, 105, 0.1); color: var(--brand-deep);
  font-size: 12px; font-weight: 750;
}
.opsi-edit .baris input[type="radio"] { width: 22px; height: 22px; accent-color: var(--brand); justify-self: center; }
.opsi-edit .baris input[type="text"] { min-height: 42px; }
.tombol-tambah {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 650; color: var(--brand-deep);
  padding: 8px 10px; border-radius: 10px; background: rgba(5, 150, 105, 0.08);
}
.tombol-tambah svg { width: 15px; height: 15px; }

/* ------------------------------------------------------------- SEB status */

.seb-kartu {
  display: grid; gap: 10px;
  padding: 15px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}
.seb-kartu .kepala { display: flex; align-items: center; gap: 10px; }
.seb-kartu .kepala .ikon {
  width: 38px; height: 38px; border-radius: 12px;
  display: grid; place-items: center; flex: 0 0 auto;
  background: rgba(5, 150, 105, 0.12); color: var(--brand-deep);
}
.seb-kartu .kepala .ikon svg { width: 21px; height: 21px; }
.seb-kartu .kepala strong { display: block; font-size: 13.5px; }
.seb-kartu .kepala span { display: block; font-size: 11.5px; color: var(--muted); }
.segmen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; background: rgba(91, 111, 104, 0.1); border-radius: 13px; padding: 4px; }
.segmen button {
  min-height: 40px; padding: 4px 6px; border-radius: 10px;
  font-size: 12px; font-weight: 650; color: var(--muted);
}
.segmen button.aktif { background: #fff; color: var(--brand-deep); box-shadow: 0 3px 8px -5px rgba(6, 44, 33, 0.5); }
.salin-baris { display: flex; gap: 8px; }
.salin-baris input { flex: 1; min-width: 0; font-size: 12.5px; }
.salin-baris .tombol { min-height: var(--kontrol-h); padding: 0 12px; flex: 0 0 auto; }

.akses-baris {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  padding: 9px 0; font-size: 12.5px;
}
.akses-baris + .akses-baris { border-top: 1px dashed rgba(91, 111, 104, 0.18); }
.akses-baris .kiri { min-width: 0; }
.akses-baris .kiri b { display: block; font-weight: 650; }
.akses-baris .kiri span { display: block; color: var(--muted); font-size: 11.5px; word-break: break-word; }

/* -------------------------------------------------------------- cetak hasil */

#cetakHasil { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body::before, #shell, #layarLogin, #layarUjian, #splash, #backdrop, #sheet, #toast, #popupLapis { display: none !important; }
  body { background: #fff !important; }
  #cetakHasil { display: block !important; color: #111; font-size: 12px; }
  #cetakHasil h1 { font-size: 18px; margin-bottom: 4px; }
  #cetakHasil .sub { color: #555; margin-bottom: 14px; }
  #cetakHasil table { width: 100%; border-collapse: collapse; }
  #cetakHasil th, #cetakHasil td { border: 1px solid #cbd5e1; padding: 5px 7px; text-align: left; font-size: 11px; }
  .review, .nilai-kartu, .kartu, .ujian-baris { break-inside: avoid; }
}

/* Menu khusus desktop disembunyikan di HP. (Harus memakai #tabbar agar tidak
   kalah oleh #tabbar button { display: grid } di atas.) */
#tabbar .hanya-desktop { display: none; }
#tabbar button.sembunyi-desktop { display: grid; }

/* ======================================================================
   Desktop / laptop (>= 1000px). Tampilan HP di bawah 1000px TIDAK berubah.
   ====================================================================== */

@media (min-width: 1000px) {
  :root { --tabbar-h: 10px; --appbar-h: 66px; }
  body { padding: 0; }

  #shell {
    max-width: none;
    height: 100vh;
    height: 100dvh;
    border-radius: 0;
    outline: 0;
    box-shadow: none;
    background: transparent;
    display: grid;
    grid-template-columns: 268px minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
  }

  #tabbar {
    grid-column: 1;
    grid-row: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 20px 16px;
    overflow-y: auto;
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(20px) saturate(180%);
    border-top: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 10px 0 34px -26px rgba(6, 44, 33, 0.55);
  }
  #tabbar button.hanya-desktop { display: grid; }
  #tabbar button.sembunyi-desktop { display: none; }
  #tabbar button {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    align-items: center;
    justify-items: start;
    gap: 12px;
    width: 100%;
    min-height: 46px;
    padding: 0 14px;
    border-radius: 13px;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
  }
  #tabbar button svg { width: 20px; height: 20px; }
  #tabbar button span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #tabbar button:hover { background: rgba(5, 150, 105, 0.08); color: var(--brand-deep); }
  #tabbar button.aktif {
    background: linear-gradient(135deg, rgba(5, 150, 105, 0.17), rgba(16, 185, 129, 0.08));
    box-shadow: inset 0 0 0 1px rgba(5, 150, 105, 0.22);
  }
  #tabbar .sidebar-kepala {
    display: flex; align-items: center; gap: 12px;
    padding: 2px 8px 16px; margin-bottom: 8px;
    border-bottom: 1px solid rgba(91, 111, 104, 0.16);
  }
  #tabbar .sidebar-kepala img { width: 42px; height: 42px; border-radius: 13px; box-shadow: var(--shadow-sm); }
  #tabbar .sidebar-kepala strong { display: block; font-size: 15px; font-weight: 700; word-break: break-word; }
  #tabbar .sidebar-kepala span { display: block; font-size: 11.5px; color: var(--muted); }
  #tabbar .sidebar-pemisah { display: block; height: 1px; margin: 12px 8px; background: rgba(91, 111, 104, 0.16); }
  #tabbar .sidebar-keluar { display: grid; margin-top: auto; color: #B91C1C; }
  #tabbar .sidebar-keluar:hover { background: rgba(239, 68, 68, 0.1); color: #B91C1C; }

  #appbar { grid-column: 2; grid-row: 1; height: 66px; padding: 0 32px; border-bottom: 1px solid rgba(255, 255, 255, 0.7); }
  #appbar .bar-judul strong { font-size: 19px; }
  #appbar .bar-judul span { font-size: 12.5px; }
  #btnKembali, #btnPengaturan { display: none !important; }
  #btnTambah { width: 44px; height: 44px; }

  #layarSkrol { grid-column: 2; grid-row: 2; }
  .screen { padding: 26px 32px 48px; }
  .screen > .tumpuk, .screen > .isi-lebar { max-width: 1180px; margin: 0 auto; }

  .kartu { padding: 20px; }
  .kartu-hero { padding: 26px 28px; }
  .kartu-hero .judul { font-size: 28px; }
  .ringkas { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
  .ringkas .kotak b { font-size: 24px; }
  .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }

  /* daftar ujian & soal jadi dua kolom supaya tidak memanjang */
  #daftarUjian, #daftarSoal, #daftarHasil, #daftarPeserta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
  #daftarSoal .soal-admin { height: 100%; }

  #sheet {
    top: 50%;
    bottom: auto;
    max-width: 780px;
    border-radius: 22px;
    transform: translate(-50%, -50%) scale(0.96);
    box-shadow: 0 44px 90px -34px rgba(6, 44, 33, 0.6);
    max-height: 88vh;
  }
  #sheet.tampil { transform: translate(-50%, -50%) scale(1); }
  .sheet-isi { padding: 4px 26px 30px; }
  #sheet .baris-tombol { grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }

  #layarLogin { justify-content: center; padding: 40px; }
  .login-bungkus { padding: 34px 30px 28px; }
  .login-bungkus .login-judul { font-size: 26px; }

  #toast { bottom: 30px; font-size: 14px; padding: 13px 20px; }

  /* Halaman ujian di desktop: kolom tengah yang lapang. */
  #ujBar { padding: 12px 32px; }
  .uj-judul strong { font-size: 16px; }
  .uj-isi { padding: 26px 32px 34px; }
  .soal-kartu { padding: 26px 28px; }
  .soal-teks { font-size: 18px; }
  .jawab-esai { min-height: 240px; }
  #ujKaki { padding: 12px 32px calc(12px + var(--safe-b)); }
  #ujKaki #ujRagu span { display: inline; }
  #ujKaki #ujRagu { padding: 0 16px; }
  .uj-simpan { bottom: 96px; }
}

@media (min-width: 1000px) and (max-height: 700px) {
  #appbar { height: 58px; }
  .screen { padding: 20px 28px 36px; }
  .kartu-hero { padding: 22px 24px; }
}

/* Tautan teks di dalam kartu/petunjuk. */
.tautan {
  display: inline-flex; align-items: center; min-height: 30px;
  color: var(--brand-deep); font-weight: 650; font-size: 13px;
  background: none; padding: 4px 2px;
}
.tautan:hover { text-decoration: underline; }

/* Baris kata sandi keluar SEB: kolom isian + tombol putar + salin. */
.sandi-seb-baris { display: flex; gap: 8px; align-items: stretch; }
.sandi-seb-baris input { flex: 1 1 auto; min-width: 0; font-family: "Plus Jakarta Sans", system-ui, sans-serif; letter-spacing: 0.3px; }
.sandi-seb-baris .tombol { flex: 0 0 auto; min-height: var(--kontrol-h); padding: 0 14px; }
.sandi-seb-baris .tombol svg { width: 17px; height: 17px; }
@media (max-width: 359px) {
  .sandi-seb-baris { flex-wrap: wrap; }
  .sandi-seb-baris input { flex: 1 1 100%; }
  .sandi-seb-baris .tombol { flex: 1 1 auto; }
}

/* ======================================================================
   AKP2I CBT v2 — halaman publik, alur peserta, panel admin
   (blok dasar di atas diwarisi dari aplikasi AKP2I: bingkai HP, kartu,
   form, sheet, tab bar, toast)
   ====================================================================== */

:root {
  --kontrol-h: 46px;
  --kontrol-r: 13px;
  --kontrol-fs: 14.5px;
  --biru: #2563EB;
  --biru-tua: #1D4ED8;
}

/* ------------------------------------------------------ kontrol formulir */

.medan input, .medan select, .medan textarea,
.kendali-baris input, .kendali-baris select,
.kontrol {
  width: 100%; min-width: 0; min-height: var(--kontrol-h);
  padding: 11px 13px; border-radius: var(--kontrol-r);
  border: 1px solid rgba(99, 95, 130, 0.2);
  background: rgba(255, 255, 255, 0.92);
  outline: none; font-size: var(--kontrol-fs);
}
.medan textarea { min-height: 110px; line-height: 1.55; }
.medan input:focus, .medan select:focus, .medan textarea:focus,
.kendali-baris input:focus, .kendali-baris select:focus, .kontrol:focus {
  border-color: var(--brand); box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.13);
}
.medan { display: grid; gap: 6px; align-content: start; margin-bottom: 14px; }
.medan label { font-size: 12.5px; font-weight: 650; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.medan .bantuan { font-size: 11.5px; color: var(--muted); line-height: 1.45; white-space: normal; }
.bantuan-inline { font-weight: 500; font-size: 11px; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; align-items: start; }
.grid-2 > .medan { margin-bottom: 0; }
@media (max-width: 359px) { .grid-2 { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------- publik */

#publik { min-height: 100%; display: flex; flex-direction: column; }
.pub-bar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(18px) saturate(180%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 8px 24px -22px rgba(6, 44, 33, 0.8);
}
.pub-merek { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; color: var(--ink); flex: 0 0 auto; }
.pub-merek img { width: 32px; height: 32px; border-radius: 9px; }
.pub-merek strong { font-size: 14.5px; font-weight: 750; letter-spacing: -0.2px; }
.pub-nav { display: none; gap: 4px; flex: 1; justify-content: center; }
.pub-nav button {
  padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted);
}
.pub-nav button.aktif { background: rgba(5, 150, 105, 0.1); color: var(--brand-deep); }
.pub-nav button:hover { color: var(--brand-deep); }
#pubMasuk { margin-left: auto; }
#pubIsi { flex: 1; width: 100%; }
.pub-muat { display: grid; place-items: center; padding: 80px 20px; }
.pub-wadah { width: 100%; max-width: 1120px; margin: 0 auto; padding: 26px 16px 40px; }
.pub-kaki {
  display: flex; flex-direction: column; gap: 4px; align-items: center;
  padding: 18px 16px calc(18px + var(--safe-b));
  border-top: 1px solid rgba(255, 255, 255, 0.7);
  font-size: 11.5px; color: var(--muted); text-align: center;
}
.pub-kaki span:first-child { font-weight: 700; color: var(--ink); }

.pub-hero {
  display: grid; gap: 22px;
  padding: 26px 16px 34px;
  max-width: 1120px; margin: 0 auto; width: 100%;
}
.pub-hero-teks { align-self: center; }
.pub-label {
  display: inline-block; font-size: 11px; font-weight: 750; letter-spacing: 1.4px;
  text-transform: uppercase; color: var(--brand-deep);
  background: rgba(5, 150, 105, 0.1); padding: 5px 11px; border-radius: 999px;
}
.pub-hero-teks h1 {
  font-size: 30px; line-height: 1.16; margin: 14px 0 10px; letter-spacing: -0.8px;
  color: #0B2B22;
}
.pub-hero-teks p { font-size: 14.5px; line-height: 1.6; color: var(--muted); margin: 0 0 18px; max-width: 46ch; }
.pub-notif {
  display: flex; gap: 9px; align-items: flex-start;
  background: var(--warn-bg); border: 1px solid rgba(180, 83, 9, 0.25);
  color: #7C2D12; border-radius: 12px; padding: 10px 12px; font-size: 12.5px; margin-bottom: 16px;
}
.pub-notif svg { width: 17px; height: 17px; flex: 0 0 auto; margin-top: 1px; }
.pub-aksi { display: flex; flex-wrap: wrap; gap: 10px; }
.tombol.besar { min-height: 52px; padding: 0 22px; font-size: 15px; border-radius: 15px; }
.pub-hero-kartu {
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line); border-radius: 22px;
  padding: 20px; box-shadow: var(--shadow);
  backdrop-filter: blur(20px) saturate(170%);
}
.pub-hero-atas { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.pub-hero-atas svg { width: 20px; height: 20px; color: var(--brand-deep); }
.pub-hero-atas strong { font-size: 14.5px; }
.pub-info-baris {
  display: flex; justify-content: space-between; gap: 12px;
  font-size: 12.5px; padding: 8px 0; border-bottom: 1px dashed rgba(91, 111, 104, 0.18);
}
.pub-info-baris span { color: var(--muted); }
.pub-info-baris b { font-weight: 650; text-align: right; }
.pub-daftar { display: grid; gap: 6px; margin-top: 14px; }
.pub-daftar-baris {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 12px;
  background: rgba(240, 253, 246, 0.9); border: 1px solid rgba(5, 150, 105, 0.16);
  font-size: 12.5px; font-weight: 600; color: var(--brand-deep); text-align: left;
}
.pub-daftar-baris span { display: inline-flex; align-items: center; gap: 8px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pub-daftar-baris svg { width: 16px; height: 16px; flex: 0 0 auto; }
.pub-kosong-kecil { font-size: 12px; color: var(--muted); padding: 8px 0; }

.pub-langkah { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.pub-langkah-kotak {
  background: rgba(255, 255, 255, 0.72); border: 1px solid var(--line);
  border-radius: 16px; padding: 15px; box-shadow: var(--shadow-sm);
}
.pub-langkah-kotak .no {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(5, 150, 105, 0.12); color: var(--brand-deep); font-size: 12px; font-weight: 750;
  margin-bottom: 8px;
}
.pub-langkah-kotak b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.pub-langkah-kotak span:last-child { font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.pub-ujian-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.pub-ujian {
  background: rgba(255, 255, 255, 0.78); border: 1px solid var(--line); border-radius: 18px;
  padding: 16px; box-shadow: var(--shadow-sm);
}
.pub-ujian-atas { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pub-ujian-atas strong { font-size: 14.5px; line-height: 1.35; }
.pub-ujian p { font-size: 12.5px; color: var(--muted); line-height: 1.5; margin: 8px 0; }
.pub-ujian-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 11.5px; color: var(--muted); }
.pub-ujian-meta span { display: inline-flex; gap: 5px; align-items: center; }
.pub-ujian-meta svg { width: 14px; height: 14px; }
.pub-daftar-angka { margin: 0; padding-left: 20px; font-size: 13.5px; line-height: 1.7; color: #243B33; }
.pub-daftar-angka li { margin-bottom: 6px; }
.faq-item summary { cursor: pointer; font-size: 14px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 10px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 18px; color: var(--brand); line-height: 1; }
.faq-item[open] summary::after { content: '–'; }
.faq-item p { font-size: 13px; color: var(--muted); line-height: 1.6; margin: 10px 0 0; }

/* -------------------------------------------------------------- login */

#layarLogin {
  background: linear-gradient(165deg, #047857 0%, #059669 45%, #0F766E 100%);
  overflow-y: auto;
  padding: calc(20px + var(--safe-t)) 16px calc(24px + var(--safe-b));
  justify-content: center;
}
.login-bungkus {
  width: 100%; max-width: 420px; margin: auto;
  background: #fff; border-radius: 24px; padding: 24px 20px 18px;
  box-shadow: 0 34px 70px -30px rgba(2, 44, 30, 0.7);
  display: grid; justify-items: stretch; gap: 0;
}
.login-merek { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
#formMasuk .medan .bantuan { line-height: 1.4; }
.login-merek img { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 10px 22px -14px rgba(2, 44, 30, 0.8); }
.login-merek strong { display: block; font-size: 17px; font-weight: 750; color: var(--ink); }
.login-merek span { display: block; font-size: 12px; color: var(--muted); }
.login-form { width: 100%; }
.login-pesan { min-height: 20px; font-size: 12.5px; font-weight: 650; color: #B91C1C; margin: 0 0 10px; }
.sandi-bungkus { position: relative; display: flex; }
.sandi-bungkus input { padding-right: 46px; }
.lihat-sandi {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--muted);
}
.lihat-sandi:hover { background: rgba(5, 150, 105, 0.1); color: var(--brand-deep); }
.login-bantuan { display: grid; gap: 8px; margin-top: 14px; text-align: center; font-size: 11.5px; color: var(--muted); }
.login-status {
  margin-top: 14px; font-size: 11.5px; color: var(--muted);
  display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; flex-wrap: wrap;
}
.login-status .dot { width: 8px; height: 8px; border-radius: 50%; background: #10B981; }
.login-status.browser .dot { background: #F59E0B; }
.login-status svg { width: 14px; height: 14px; }

.captcha { display: flex; align-items: center; gap: 10px; margin: 4px 0 14px; cursor: pointer; user-select: none; }
.captcha input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.captcha-kotak {
  width: 26px; height: 26px; border-radius: 8px; border: 2px solid rgba(99, 95, 130, 0.35);
  display: grid; place-items: center; color: #fff; background: #fff; transition: all 140ms ease; flex: 0 0 auto;
}
.captcha-kotak svg { width: 16px; height: 16px; opacity: 0; }
.captcha input:checked + .captcha-kotak { background: var(--brand); border-color: var(--brand); }
.captcha input:checked + .captcha-kotak svg { opacity: 1; }
.captcha input:focus-visible + .captcha-kotak { box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2); }
.captcha-teks { font-size: 13.5px; font-weight: 600; color: var(--ink); }

/* -------------------------------------------------------------- umum */

.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.2px;
  background: rgba(91, 111, 104, 0.12); color: var(--muted); white-space: nowrap;
}
.pill svg { width: 13px; height: 13px; }
.pill.aktif, .pill.lunas, .pill.benar { background: var(--ok-bg); color: #065F46; }
.pill.draf, .pill.belum, .pill.menunggu { background: var(--warn-bg); color: #92400E; }
.pill.selesai, .pill.info { background: rgba(37, 99, 235, 0.12); color: #1D4ED8; }
.pill.bahaya, .pill.salah { background: var(--bad-bg); color: #991B1B; }

.ringkas { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.ringkas.lima, .ringkas.tiga { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.ringkas .kotak {
  border-radius: 16px; padding: 14px; background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0;
}
.ringkas .kotak .label { font-size: 11px; font-weight: 650; color: var(--muted); letter-spacing: 0.3px; }
.ringkas .kotak b { display: block; font-size: 22px; font-weight: 750; margin-top: 4px; font-variant-numeric: tabular-nums; }
.ringkas .kotak span { display: block; font-size: 11.5px; color: var(--muted); margin-top: 3px; }
.ringkas .kotak.hijau { background: linear-gradient(135deg, rgba(5, 150, 105, 0.14), rgba(16, 185, 129, 0.05)); }
.ringkas .kotak.emas { background: linear-gradient(135deg, rgba(217, 119, 6, 0.13), rgba(245, 158, 11, 0.04)); }
.ringkas .kotak.merah { background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(239, 68, 68, 0.03)); }
.ringkas .kotak.biru { background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(37, 99, 235, 0.03)); }

.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.menu-kotak {
  display: grid; gap: 2px; justify-items: start; text-align: left;
  padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); min-width: 0;
}
.menu-kotak svg { width: 26px; height: 26px; color: var(--brand); margin-bottom: 6px; }
.menu-kotak b { font-size: 14.5px; font-weight: 700; }
.menu-kotak span { font-size: 11.5px; color: var(--muted); text-align: left; }
.menu-kotak:active { transform: scale(0.98); }

.teks-kecil { font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.meta-baris { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); margin-top: 8px; }
.meta-baris span { display: inline-flex; align-items: center; gap: 5px; }
.meta-baris svg { width: 14px; height: 14px; }
.memuat-kartu { display: grid; place-items: center; padding: 34px; }
.spinner.gelap { border-color: rgba(5, 150, 105, 0.24); border-top-color: #059669; }

.kendali-baris { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.kendali-baris input, .kendali-baris select { flex: 1 1 160px; }
.tombol-tambah {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 650;
  color: var(--brand-deep); padding: 8px 10px; border-radius: 10px; background: rgba(5, 150, 105, 0.08);
}
.tombol-tambah svg { width: 15px; height: 15px; }
.tautan { display: inline-flex; align-items: center; min-height: 30px; color: var(--brand-deep); font-weight: 650; font-size: 13px; background: none; padding: 4px 2px; }
.sandi-seb-baris { display: flex; gap: 8px; align-items: stretch; }
.sandi-seb-baris input { flex: 1 1 auto; min-width: 0; }
.sandi-seb-baris .tombol { flex: 0 0 auto; min-height: var(--kontrol-h); padding: 0 14px; }
.sandi-seb-baris .tombol svg { width: 17px; height: 17px; }
@media (max-width: 359px) { .sandi-seb-baris { flex-wrap: wrap; } .sandi-seb-baris input { flex: 1 1 100%; } }

.cek-kotak {
  display: flex; gap: 11px; align-items: flex-start;
  padding: 14px; border-radius: 14px; background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line); font-size: 13.5px; font-weight: 550; cursor: pointer;
}
.cek-kotak input { width: 22px; height: 22px; accent-color: var(--brand); margin-top: 1px; flex: 0 0 auto; }
.instruksi-judul { display: flex; align-items: center; gap: 9px; margin: 6px 0 10px; }
.instruksi-judul svg { width: 20px; height: 20px; color: var(--brand-deep); }
.instruksi-judul strong { font-size: 15px; }

/* --------------------------------------------------- cek perangkat */

.perangkat-daftar { display: grid; gap: 8px; }
.perangkat-baris {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 13px; border-radius: 13px;
  background: rgba(255, 255, 255, 0.86); border: 1px solid var(--line);
}
.perangkat-baris .ikon {
  width: 38px; height: 38px; border-radius: 11px; flex: 0 0 auto;
  display: grid; place-items: center; background: rgba(5, 150, 105, 0.1); color: var(--brand-deep);
}
.perangkat-baris .ikon svg { width: 20px; height: 20px; }
.perangkat-baris .nama { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; }
.perangkat-baris .status { flex: 0 0 auto; }

/* -------------------------------------------------------- token ujian */

.token-kartu { display: grid; justify-items: center; text-align: center; gap: 4px; padding: 26px 18px; }
.token-ikon {
  width: 62px; height: 62px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(5, 150, 105, 0.12); color: var(--brand-deep); margin-bottom: 8px;
}
.token-ikon svg { width: 30px; height: 30px; }
.token-kartu h2 { font-size: 19px; font-weight: 750; }
.token-medan { width: 100%; max-width: 300px; margin: 14px 0 10px; }
.token-medan input {
  text-align: center; font-size: 22px; font-weight: 750; letter-spacing: 3px;
  text-transform: uppercase; padding: 14px 12px;
}
.token-pesan { min-height: 20px; font-size: 12.5px; font-weight: 650; color: #B91C1C; margin-bottom: 10px; }
.token-info { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 12px; margin-top: 14px; font-size: 11.5px; color: var(--muted); }

/* ------------------------------------------------------- engine ujian */

#layarUjian {
  position: fixed; inset: 0; z-index: 80; display: none; flex-direction: column;
  background: #F1FAF5; color: var(--ink); overscroll-behavior: contain;
}
#layarUjian.tampil { display: flex; }
#ujBar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: calc(8px + var(--safe-t)) 12px 8px;
  background: #fff; border-bottom: 1px solid rgba(5, 150, 105, 0.14);
  box-shadow: 0 8px 22px -22px rgba(6, 44, 33, 0.8);
}
.uj-merek { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; }
.uj-merek img { width: 28px; height: 28px; border-radius: 8px; }
.uj-merek strong { font-size: 14px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uj-timer {
  display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto;
  padding: 7px 11px; border-radius: 999px;
  background: #ECFDF5; color: var(--brand-deep); border: 1px solid rgba(5, 150, 105, 0.2);
  font-size: 13.5px; font-variant-numeric: tabular-nums;
}
.uj-timer .lab { display: none; font-size: 11px; font-weight: 600; opacity: 0.8; }
.uj-timer b { font-weight: 750; letter-spacing: 0.4px; font-size: 15px; }
.uj-timer svg { width: 15px; height: 15px; }
.uj-timer.hampir { background: var(--bad-bg); color: #B91C1C; border-color: rgba(185, 28, 28, 0.25); animation: denyut 1.6s ease-in-out infinite; }
@keyframes denyut { 50% { transform: scale(1.04); } }
#ujSelesaiTop { flex: 0 0 auto; }
#ujSelesaiTop span { display: none; }
.uj-progres { height: 4px; background: rgba(5, 150, 105, 0.12); }
.uj-progres i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--brand), var(--brand-2)); transition: width 260ms ease; }
.uj-isi-luar { flex: 1; display: flex; min-height: 0; position: relative; }
.uj-sisi {
  position: absolute; z-index: 5; left: 0; top: 0; bottom: 0; width: 288px; max-width: 86%;
  display: flex; flex-direction: column; gap: 10px;
  padding: 14px; background: #fff; border-right: 1px solid rgba(5, 150, 105, 0.14);
  transform: translateX(-102%); transition: transform 220ms ease;
  box-shadow: 14px 0 40px -30px rgba(6, 44, 33, 0.8);
}
.uj-sisi.tampil { transform: none; }
.uj-sisi-kepala { display: flex; align-items: center; justify-content: space-between; }
.uj-sisi-kepala strong { font-size: 14px; }
.uj-sisi-kepala .ikon-tombol { width: 34px; height: 34px; background: rgba(5, 150, 105, 0.08); color: var(--brand-deep); }
.uj-sisi-kaki { margin-top: auto; }
.uj-sisi-kaki .tombol { min-height: 42px; font-size: 13px; }
.uj-sisi-kaki .tombol.aktif { background: var(--warn-bg); color: #92400E; border-color: rgba(180, 83, 9, 0.3); }
.uj-utama { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
#ujIsi { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px 14px 22px; }
.uj-bungkus { max-width: 860px; margin: 0 auto; display: grid; gap: 14px; }
.soal-kartu {
  background: #fff; border: 1px solid rgba(255, 255, 255, 0.9); border-radius: 20px;
  padding: 20px 16px; box-shadow: 0 18px 40px -32px rgba(6, 44, 33, 0.6);
}
.soal-kepala { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.soal-nomor {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 750; letter-spacing: 0.5px; text-transform: uppercase;
  color: var(--brand-deep); background: rgba(5, 150, 105, 0.1); padding: 5px 11px; border-radius: 999px;
}
.soal-teks { font-size: 16.5px; font-weight: 600; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.opsi-daftar { display: grid; gap: 10px; margin-top: 18px; }
.opsi {
  display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 14px;
  border: 1px solid rgba(99, 95, 130, 0.18); background: rgba(255, 255, 255, 0.9);
  cursor: pointer; position: relative; transition: border-color 140ms ease, background 140ms ease;
}
.opsi:hover { border-color: rgba(5, 150, 105, 0.35); }
.opsi input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opsi .huruf {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  flex: 0 0 auto; font-size: 13px; font-weight: 750;
  background: rgba(5, 150, 105, 0.1); color: var(--brand-deep);
}
.opsi .teks { font-size: 14.5px; line-height: 1.5; padding-top: 3px; word-break: break-word; }
.opsi.aktif { border-color: var(--brand); background: rgba(236, 253, 245, 0.96); box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.13); }
.opsi.aktif .huruf { background: var(--brand); color: #fff; }
.jawab-esai {
  width: 100%; min-height: 190px; margin-top: 18px; padding: 14px; border-radius: 14px;
  border: 1px solid rgba(99, 95, 130, 0.2); background: #fff; font-size: 14.5px; line-height: 1.6; resize: vertical;
}
.jawab-esai:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.13); outline: none; }
.jawab-info { display: flex; justify-content: space-between; gap: 10px; font-size: 11.5px; color: var(--muted); margin-top: 8px; }
.hitungan-medan { margin-top: 18px; max-width: 320px; }
.hitungan-medan input { font-size: 18px; font-weight: 650; font-variant-numeric: tabular-nums; }
#ujKaki {
  display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px;
  padding: 10px 12px calc(10px + var(--safe-b));
  background: #fff; border-top: 1px solid rgba(5, 150, 105, 0.14);
}
#ujKaki .tombol { min-height: 46px; padding: 0 12px; font-size: 13.5px; }
#ujKaki .tombol span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#ujKaki #ujRagu span { display: none; }
#ujKaki #ujRagu.aktif { background: var(--warn-bg); color: #92400E; border-color: rgba(180, 83, 9, 0.3); }
.uj-tombol-daftar {
  position: fixed; right: 14px; bottom: calc(80px + var(--safe-b)); z-index: 82;
  display: inline-flex; align-items: center; gap: 7px;
  padding: 10px 14px; border-radius: 999px;
  background: var(--brand-deep); color: #fff; font-size: 12.5px; font-weight: 650;
  box-shadow: 0 14px 30px -14px rgba(4, 120, 87, 0.9);
}
.uj-tombol-daftar svg { width: 16px; height: 16px; }
.uj-simpan {
  position: fixed; right: 14px; bottom: calc(126px + var(--safe-b)); z-index: 82;
  padding: 7px 13px; border-radius: 999px; background: rgba(6, 44, 33, 0.9); color: #fff;
  font-size: 11.5px; font-weight: 650; opacity: 0; visibility: hidden;
  transition: opacity 180ms ease, visibility 180ms ease;
}
.uj-simpan.tampil { opacity: 1; visibility: visible; }
.uj-simpan.gagal { background: #B91C1C; }
.nav-soal { display: grid; grid-template-columns: repeat(auto-fill, minmax(42px, 1fr)); gap: 7px; overflow-y: auto; padding-right: 2px; }
.nav-soal button {
  height: 42px; border-radius: 10px; border: 1px solid rgba(91, 111, 104, 0.22);
  background: #fff; font-size: 13px; font-weight: 700; color: var(--ink); display: grid; place-items: center;
}
.nav-soal button.dijawab { background: var(--ok-bg); border-color: rgba(5, 150, 105, 0.35); color: #065F46; }
.nav-soal button.ditandai { background: var(--warn-bg); border-color: rgba(180, 83, 9, 0.35); color: #92400E; }
.nav-soal button.sekarang { box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.28); border-color: var(--biru); color: var(--biru-tua); }
.nav-legenda { display: flex; flex-wrap: wrap; gap: 8px 12px; font-size: 11px; color: var(--muted); }
.nav-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.nav-legenda i { width: 12px; height: 12px; border-radius: 4px; background: #fff; border: 1px solid rgba(91, 111, 104, 0.3); }
.nav-legenda i.sekarang { background: rgba(37, 99, 235, 0.18); border-color: var(--biru); }
.nav-legenda i.dijawab { background: var(--ok-bg); border-color: rgba(5, 150, 105, 0.4); }
.nav-legenda i.belum { background: #fff; }
.nav-legenda i.ditandai { background: var(--warn-bg); border-color: rgba(180, 83, 9, 0.4); }

/* konfirmasi & proses */
.konfirmasi-ikon { width: 54px; height: 54px; margin: 0 auto 10px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-bg); color: #B45309; }
.konfirmasi-ikon svg { width: 28px; height: 28px; }
.konfirmasi-judul { text-align: center; font-size: 17px; font-weight: 750; margin-bottom: 4px; }
.konfirmasi-angka { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 14px; }
.konfirmasi-angka > div { text-align: center; padding: 12px 6px; border-radius: 13px; background: rgba(255, 255, 255, 0.8); border: 1px solid var(--line); }
.konfirmasi-angka span { display: block; font-size: 11px; color: var(--muted); }
.konfirmasi-angka b { display: block; font-size: 21px; font-weight: 750; margin-top: 2px; }
.konfirmasi-angka b.merah { color: #B91C1C; }
.konfirmasi-angka b.emas { color: #B45309; }
#prosesLapis {
  position: fixed; inset: 0; z-index: 150; display: none; place-items: center;
  padding: 22px; background: rgba(6, 44, 33, 0.55); backdrop-filter: blur(4px);
}
#prosesLapis.tampil { display: grid; }
.proses-kotak {
  width: 100%; max-width: 340px; background: #fff; border-radius: 22px; padding: 26px 22px;
  text-align: center; box-shadow: 0 34px 70px -30px rgba(2, 32, 22, 0.7);
}
.proses-kotak h3 { font-size: 17px; font-weight: 750; margin: 12px 0 16px; }
.spinner.besar { width: 38px; height: 38px; border-width: 4px; margin: 0 auto; border-color: rgba(5, 150, 105, 0.2); border-top-color: #059669; }
.spinner.kecil { width: 14px; height: 14px; border-width: 2px; border-color: rgba(5, 150, 105, 0.25); border-top-color: #059669; }
.proses-langkah { display: grid; gap: 9px; text-align: left; }
.proses-baris { display: flex; align-items: center; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.proses-baris .tanda { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: rgba(91, 111, 104, 0.1); flex: 0 0 auto; }
.proses-baris .tanda svg { width: 14px; height: 14px; }
.proses-baris.selesai { color: var(--ink); }
.proses-baris.selesai .tanda { background: var(--ok-bg); color: #065F46; }
.proses-baris.jalan { color: var(--brand-deep); }

/* hasil */
.nilai-kartu {
  display: grid; justify-items: center; gap: 4px; padding: 24px 18px; border-radius: 20px; text-align: center;
  background: radial-gradient(22rem 16rem at 50% -20%, rgba(163, 230, 53, 0.3), transparent 62%), linear-gradient(150deg, #047857, #059669 55%, #10B981);
  color: #fff; box-shadow: 0 22px 44px -26px rgba(4, 120, 87, 0.9);
}
.nilai-kartu .label { font-size: 11px; font-weight: 700; letter-spacing: 1.3px; text-transform: uppercase; opacity: 0.85; }
.nilai-angka { font-size: 52px; font-weight: 800; line-height: 1.05; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.nilai-angka small { font-size: 15px; font-weight: 600; opacity: 0.7; margin-left: 2px; }
.nilai-kartu .sub { font-size: 12.5px; opacity: 0.92; }
.nilai-badge { margin-top: 6px; padding: 5px 13px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); border: 1px solid rgba(255, 255, 255, 0.42); font-size: 12px; font-weight: 700; }
.nilai-badge.tunggu { background: rgba(255, 237, 213, 0.26); }
.nilai-badge.gagal { background: rgba(254, 226, 226, 0.3); }
.hasil-tunggu { display: grid; justify-items: center; text-align: center; gap: 6px; padding: 28px 20px; }
.hasil-tunggu .token-ikon { margin-bottom: 4px; }

.review {
  border-radius: 16px; padding: 15px; background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm);
  display: grid; gap: 9px; min-width: 0;
}
.review.benar { border-left: 4px solid #10B981; }
.review.salah { border-left: 4px solid #EF4444; }
.review.esai { border-left: 4px solid #F59E0B; }
.review.kosong { border-left: 4px solid #94A3B8; }
.review .r-kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.review .r-nomor { font-size: 11.5px; font-weight: 750; letter-spacing: 0.4px; color: var(--muted); text-transform: uppercase; }
.review .r-teks { font-size: 14px; font-weight: 600; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.skor-mini { font-size: 12px; font-weight: 700; color: var(--brand-deep); white-space: nowrap; }
.jw-baris {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
  font-size: 13px; line-height: 1.5; background: rgba(241, 245, 249, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.jw-baris b { flex: 0 0 auto; font-size: 10.5px; font-weight: 750; letter-spacing: 0.4px; text-transform: uppercase; color: var(--muted); padding-top: 2px; }
.jw-baris span { word-break: break-word; white-space: pre-wrap; }
.jw-baris.benar { background: rgba(220, 252, 231, 0.75); border-color: rgba(5, 150, 105, 0.28); }
.jw-baris.salah { background: rgba(254, 226, 226, 0.72); border-color: rgba(185, 28, 28, 0.22); }
.jw-baris.esai { background: rgba(254, 243, 199, 0.7); border-color: rgba(180, 83, 9, 0.22); }
.pembahasan { font-size: 12.5px; line-height: 1.55; color: var(--muted); border-left: 3px solid rgba(5, 150, 105, 0.35); padding: 2px 0 2px 10px; white-space: pre-wrap; }
.pembahasan b { color: var(--ink); }
.atur-nilai { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; align-items: start; }
@media (max-width: 430px) { .atur-nilai { grid-template-columns: minmax(0, 1fr); } }

/* sertifikat */
.sertifikat {
  border-radius: 16px; padding: 22px 18px; text-align: center; color: #0B2B22;
  background:
    radial-gradient(circle at 12% 8%, rgba(5, 150, 105, 0.09), transparent 42%),
    radial-gradient(circle at 88% 92%, rgba(37, 99, 235, 0.08), transparent 42%),
    #FFFDF7;
  border: 3px double rgba(5, 150, 105, 0.5);
}
.sert-kop { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; text-align: left; }
.sert-kop img { width: 42px; height: 42px; border-radius: 11px; }
.sert-kop strong { display: block; font-size: 13px; }
.sert-kop span { display: block; font-size: 10.5px; color: var(--muted); }
.sertifikat h2 { font-size: 22px; letter-spacing: 4px; color: var(--brand-deep); margin: 8px 0 2px; }
.sert-no { font-size: 10.5px; color: var(--muted); margin: 0 0 12px; }
.sertifikat p { font-size: 12px; margin: 6px 0; color: #40554C; }
.sertifikat h3 { font-size: 20px; font-weight: 800; margin: 2px 0; }
.sert-ujian { font-size: 15px !important; color: var(--brand-deep) !important; }
.sert-nomor { font-size: 12px !important; }
.sert-tanggal { margin-top: 14px !important; font-size: 11.5px !important; }
.sert-ttd { margin-top: 24px; display: grid; justify-items: center; gap: 4px; }
.sert-ttd .garis { width: 170px; height: 1px; background: rgba(11, 43, 34, 0.4); }
.sert-ttd span { font-size: 11.5px; font-weight: 650; }

/* admin: bank soal & paket */
.opsi-mini { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); }
.opsi-mini span.benar { color: #065F46; font-weight: 700; }
.monitor-baris {
  display: grid; gap: 7px; padding: 14px; border-radius: 16px;
  background: rgba(255, 255, 255, 0.8); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
}
.monitor-baris.curiga { border-color: rgba(185, 28, 28, 0.3); background: rgba(254, 242, 242, 0.8); }
.monitor-baris .kepala { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.monitor-baris .kepala strong { font-size: 14.5px; }
.akses-baris { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 12.5px; }
.akses-baris + .akses-baris { border-top: 1px dashed rgba(91, 111, 104, 0.18); }
.akses-baris .kiri { min-width: 0; }
.akses-baris .kiri b { display: block; font-weight: 650; }
.akses-baris .kiri span { display: block; color: var(--muted); font-size: 11.5px; word-break: break-word; }
.token-tampil {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; border-radius: 14px; margin-top: 12px;
  background: rgba(37, 99, 235, 0.07); border: 1px dashed rgba(37, 99, 235, 0.35);
}
.token-tampil > div { flex: 1 1 auto; min-width: 0; }
.token-tampil .label { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--muted); }
.token-tampil b { font-size: 20px; font-weight: 800; letter-spacing: 3px; color: var(--biru-tua); }
.profil-kartu { display: flex; align-items: center; gap: 14px; }
.profil-avatar { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; background: rgba(5, 150, 105, 0.12); color: var(--brand-deep); flex: 0 0 auto; }
.profil-avatar svg { width: 27px; height: 27px; }
.cek-daftar { display: grid; gap: 8px; max-height: 55vh; overflow-y: auto; }
.cek-soal {
  display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
  background: rgba(255, 255, 255, 0.85); border: 1px solid var(--line); font-size: 12.5px; cursor: pointer;
}
.cek-soal input { width: 20px; height: 20px; accent-color: var(--brand); flex: 0 0 auto; margin-top: 1px; }
.cek-soal span b { display: block; font-size: 11px; color: var(--muted); font-weight: 700; margin-bottom: 3px; }
.cek-soal span { min-width: 0; word-break: break-word; }

/* ----------------------------------------------------------- desktop */

@media (min-width: 900px) {
  .pub-nav { display: flex; }
  .pub-hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr); align-items: center; padding: 44px 24px 52px; gap: 34px; }
  .pub-hero-teks h1 { font-size: 42px; }
  .pub-hero-teks p { font-size: 15.5px; }
  .pub-wadah { padding: 34px 24px 48px; }
  .pub-bar { padding: 12px 24px; }
  #ujBar { padding: 12px 26px; }
  .uj-timer .lab { display: inline; }
  #ujSelesaiTop span { display: inline; }
  .uj-sisi { position: static; transform: none; width: 288px; flex: 0 0 288px; box-shadow: none; }
  #ujIsi { padding: 24px 26px 30px; }
  .soal-kartu { padding: 26px 26px; }
  .soal-teks { font-size: 18px; }
  .uj-tombol-daftar, .uj-simpan { display: none; }
  #ujKaki { padding: 12px 26px calc(12px + var(--safe-b)); }
  #ujKaki #ujRagu span { display: inline; }
  .login-bungkus { padding: 30px 28px 22px; }
}

/* cetak sertifikat */
@media print {
  @page { size: A4; margin: 14mm; }
  body::before, #publik, #shell, #layarLogin, #layarUjian, #splash, #backdrop, #sheet, #toast, #popupLapis, #prosesLapis, .baris-tombol { display: none !important; }
  body { background: #fff !important; }
  #printArea { display: block !important; }
  #printArea .sertifikat { border-width: 4px; padding: 36px 30px; }
  #printArea .sertifikat h2 { font-size: 30px; }
  #printArea .sertifikat h3 { font-size: 26px; }
}
#printArea { display: none; }

/* Menu publik di HP (nav penuh disembunyikan, tombol menu membuka panel). */
.pub-menu { flex: 0 0 auto; width: 38px; height: 38px; background: rgba(5, 150, 105, 0.08); color: var(--brand-deep); }
.pub-menu svg { width: 20px; height: 20px; }
@media (max-width: 899px) {
  .pub-bar { position: relative; flex-wrap: wrap; }
  .pub-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 8px 12px 12px; background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid var(--line); box-shadow: 0 18px 30px -24px rgba(6, 44, 33, 0.8);
  }
  .pub-nav.buka { display: flex; }
  .pub-nav button { text-align: left; padding: 11px 12px; border-radius: 11px; font-size: 13.5px; }
}
@media (min-width: 900px) { .pub-menu { display: none; } }
.captcha-kotak, .captcha-kotak svg { pointer-events: none; }
