:root {
  --biru: #0f3d91;
  --biru-muda: #e8effc;
  --hijau: #1a8f4e;
  --oranye: #c2560f;
  --merah: #b42318;
  --wa: #25d366;
  --teks: #1d2433;
  --abu: #667085;
  --garis: #d0d5dd;
  --latar: #f2f4f7;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--latar);
  color: var(--teks);
  font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

[hidden] { display: none !important; }

.top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  background: var(--biru);
  color: #fff;
}
.top .sub { color: #c9d6f2; }
.brand { font-weight: 700; font-size: 18px; }
.clock { text-align: right; }
#jam { font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; }

main { max-width: 520px; margin: 0 auto; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); }

h1 { font-size: 20px; margin: 0 0 12px; }
h2 { font-size: 16px; margin: 0 0 8px; }
.sub { color: var(--abu); font-size: 13px; }

.card {
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .06);
}

label { display: block; margin-bottom: 12px; font-weight: 600; font-size: 14px; }
label.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }
select, input[type=text], input[type=password] {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 12px;
  font: inherit;
  border: 1px solid var(--garis);
  border-radius: 10px;
  background: #fff;
}

.btn {
  display: block;
  width: 100%;
  margin-top: 10px;
  padding: 14px;
  font: inherit;
  font-weight: 700;
  border: 0;
  border-radius: 12px;
  cursor: pointer;
}
.btn:disabled { opacity: .5; }
.btn.primary { background: var(--biru); color: #fff; }
.btn.ghost { background: transparent; color: var(--biru); }
.btn.small { width: auto; margin: 0; padding: 8px 12px; }
.btn.wa { background: var(--wa); color: #fff; }

.aksi { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 14px; }
.aksi .btn { margin: 0; padding: 28px 10px; font-size: 18px; color: #fff; }
.btn.masuk { background: var(--hijau); }
.btn.pulang { background: var(--oranye); }

.who { display: flex; justify-content: space-between; align-items: center; }
.nama { font-size: 18px; font-weight: 700; }

.kamera {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
}
.kamera video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }

.status { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--biru-muda); font-size: 14px; }
.status.ok { background: #e7f6ec; color: #0b5c2e; }
.status.warn { background: #fff4e5; color: #7a3a00; }
.status.err { background: #fdecea; color: var(--merah); }

.foto { width: 100%; border-radius: 12px; margin-bottom: 12px; }

.banner { padding: 12px; border-radius: 10px; margin-bottom: 14px; background: #fff4e5; color: #7a3a00; font-size: 14px; }

.riwayat { list-style: none; margin: 0; padding: 0; }
.riwayat li { padding: 8px 0; border-top: 1px solid #eef0f3; font-size: 14px; }
.riwayat li:first-child { border-top: 0; }

.hasil-ok h1 { color: var(--hijau); }
.hasil-gagal h1 { color: var(--merah); }
dl { margin: 0 0 8px; display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; }
dt { color: var(--abu); }
dd { margin: 0; overflow-wrap: anywhere; }
