/* ============================================================
   Mode Kiosk — pindai kartu QR (tema biru tua resmi)
   ============================================================ */
:root {
  --navy-900: #061A33;
  --navy-800: #0B2545;
  --navy-700: #123B6D;
  --biru-500: #3B82F6;
  --ok: #16A34A;
  --warn: #D97706;
  --bad: #DC2626;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body.kiosk {
  min-height: 100vh;
  color: #fff;
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1100px 620px at 15% -8%, #17497F 0%, var(--navy-800) 48%, var(--navy-900) 100%) fixed;
}

.k-wrap { max-width: 1520px; margin: 0 auto; padding: 22px 26px 34px; }

.k-topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 20px; flex-wrap: wrap; margin-bottom: 22px;
}
.k-brand { display: flex; align-items: center; gap: 14px; }
.k-mark {
  width: 52px; height: 52px; border-radius: 12px; flex: 0 0 52px;
  background: #fff; color: var(--navy-800);
  display: grid; place-items: center; font-weight: 800; letter-spacing: .5px;
}
.k-brand h1 { font-size: 23px; margin: 0; color: #fff; font-weight: 700; letter-spacing: -.01em; }
.k-brand .sub { font-size: 13.5px; color: rgba(255, 255, 255, .72); }
.k-jam { text-align: right; }
.k-jam .waktu {
  font-size: 34px; font-weight: 700; font-variant-numeric: tabular-nums;
  line-height: 1.05; letter-spacing: -.02em;
}
.k-jam .tanggal { font-size: 13.5px; color: rgba(255, 255, 255, .72); }

.k-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.k-tabs button {
  font-family: inherit; font-size: 14px; font-weight: 600; cursor: pointer;
  padding: 10px 18px; border-radius: 9px; color: rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
}
.k-tabs button.aktif { background: #fff; color: var(--navy-800); border-color: #fff; }

.k-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(320px, .82fr); gap: 24px; align-items: start; }

.k-panel {
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(8px);
  box-shadow: 0 18px 40px -24px rgba(0, 0, 0, .7);
}
.k-panel h2 { font-size: 15px; margin: 0 0 14px; color: #fff; text-transform: uppercase; letter-spacing: .07em; }
.k-panel .k-sub { font-size: 12.5px; color: rgba(255, 255, 255, .66); text-transform: none; letter-spacing: 0; }

.k-kamera { position: relative; border-radius: 13px; overflow: hidden; background: #04101F; aspect-ratio: 4 / 3; }
.k-kamera video { width: 100%; height: 100%; object-fit: cover; display: block; transform: scaleX(-1); }
.k-kamera .kamera-off {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  padding: 30px; font-size: 14px; color: rgba(255, 255, 255, .82); background: rgba(4, 16, 31, .92);
}
.k-bingkai {
  position: absolute; inset: 0; pointer-events: none;
  display: grid; place-items: center;
}
.k-bingkai .kotak {
  width: 58%; aspect-ratio: 1; max-width: 320px;
  border: 2px solid rgba(255, 255, 255, .55); border-radius: 16px;
  box-shadow: 0 0 0 100vmax rgba(3, 12, 24, .35);
}
.k-bingkai .garis {
  position: absolute; left: 21%; right: 21%; height: 2px; background: rgba(96, 165, 250, .95);
  box-shadow: 0 0 12px rgba(96, 165, 250, .9);
  animation: sapu 2.4s ease-in-out infinite;
}
@keyframes sapu {
  0% { top: 30%; } 50% { top: 70%; } 100% { top: 30%; }
}

.k-hasil {
  position: absolute; inset: 0; display: none;
  padding: 26px; align-items: center; gap: 16px;
  background: rgba(3, 12, 24, .9);
}
.k-hasil.tampil { display: flex; }
.k-hasil .ikon {
  width: 68px; height: 68px; flex: 0 0 68px; border-radius: 50%;
  display: grid; place-items: center; font-size: 34px; font-weight: 700;
  background: rgba(255, 255, 255, .13);
}
.k-hasil .teks { min-width: 0; }
.k-hasil .status { font-size: 13px; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; }
.k-hasil .nama { font-size: 30px; font-weight: 700; line-height: 1.15; margin: 2px 0 3px; }
.k-hasil .ket { font-size: 14.5px; color: rgba(255, 255, 255, .78); }
.k-hasil.ok .ikon { background: rgba(22, 163, 74, .28); color: #6EE7A7; }
.k-hasil.ok .status { color: #6EE7A7; }
.k-hasil.warn .ikon { background: rgba(217, 119, 6, .28); color: #FBBF6B; }
.k-hasil.warn .status { color: #FBBF6B; }
.k-hasil.info .ikon { background: rgba(59, 130, 246, .28); color: #93C5FD; }
.k-hasil.info .status { color: #93C5FD; }
.k-hasil.bad .ikon { background: rgba(220, 38, 38, .3); color: #FCA5A5; }
.k-hasil.bad .status { color: #FCA5A5; }

.k-info-bawah {
  display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px;
  font-size: 13px; color: rgba(255, 255, 255, .74);
}
.k-info-bawah .pill {
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 999px; padding: 6px 13px;
}
.k-info-bawah .pill b { color: #fff; }

.k-manual { display: flex; gap: 10px; margin-top: 14px; }
.k-manual input {
  flex: 1; padding: 12px 14px; border-radius: 9px; font-size: 15px; font-family: inherit;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff;
}
.k-manual input::placeholder { color: rgba(255, 255, 255, .5); }
.k-manual input:focus { outline: none; border-color: #60A5FA; background: rgba(255, 255, 255, .16); }
.k-manual button {
  padding: 12px 20px; border-radius: 9px; border: 0; cursor: pointer;
  background: #2563EB; color: #fff; font-weight: 600; font-family: inherit; font-size: 14.5px;
}

.k-riwayat { display: flex; flex-direction: column; gap: 9px; max-height: 460px; overflow-y: auto; }
.k-riwayat .item {
  display: flex; align-items: center; gap: 12px;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 10px; padding: 10px 12px;
}
.k-riwayat .jam { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 13.5px; color: #93C5FD; flex: 0 0 52px; }
.k-riwayat .nm { flex: 1; min-width: 0; font-size: 14px; }
.k-riwayat .nm small { display: block; color: rgba(255, 255, 255, .6); font-size: 12px; }
.k-riwayat .kosong { color: rgba(255, 255, 255, .6); font-size: 13.5px; padding: 12px 2px; }

.k-old { padding: 12px 26px; border-top: 1px solid rgba(255, 255, 255, .12); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: rgba(255, 255, 255, .55); }
.k-old a { color: rgba(255, 255, 255, .8); }

/* formulir izin/sakit */
.k-form label { display: block; margin-bottom: 14px; }
.k-form .lbl { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; color: rgba(255, 255, 255, .88); }
.k-form input, .k-form select, .k-form textarea {
  width: 100%; padding: 11px 13px; border-radius: 9px; font-size: 14.5px; font-family: inherit;
  border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #fff;
}
.k-form select option { color: #101828; }
.k-form input[type=file] { padding: 9px 10px; font-size: 13px; }
.k-form textarea { min-height: 88px; resize: vertical; }
.k-form input:focus, .k-form select:focus, .k-form textarea:focus { outline: none; border-color: #60A5FA; background: rgba(255, 255, 255, .16); }
.k-form .hint { font-size: 12.5px; color: rgba(255, 255, 255, .62); margin-top: 5px; }
.k-form .baris2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.k-form button.kirim {
  width: 100%; padding: 13px; border: 0; border-radius: 9px; cursor: pointer;
  background: #2563EB; color: #fff; font-weight: 700; font-size: 15px; font-family: inherit;
}
.k-pesan { display: none; padding: 12px 15px; border-radius: 9px; margin-bottom: 16px; font-size: 14px; }
.k-pesan.tampil { display: block; }
.k-pesan.ok { background: rgba(22, 163, 74, .22); border: 1px solid rgba(22, 163, 74, .5); }
.k-pesan.bad { background: rgba(220, 38, 38, .22); border: 1px solid rgba(220, 38, 38, .5); }

@media (max-width: 1000px) {
  .k-grid { grid-template-columns: 1fr; }
  .k-wrap { padding: 18px 16px 28px; }
  .k-hasil .nama { font-size: 23px; }
}


/* Logo sekolah di header kiosk (termasuk pengaman ukuran) */
.k-mark { overflow: hidden; }
.k-mark img { max-width: 100% !important; max-height: 100% !important; object-fit: contain; display: block; }
.k-mark.logo-penanda { padding: 5px; }
.k-mark.logo-penanda img { width: 100%; height: 100%; object-fit: contain; display: block; }
