/* =====================================================================
   Dashboard SPPG Agrabinta — tema resmi Badan Gizi Nasional
   Palet logo BGN: #071e49 (biru gelap) • #92d05d (hijau) •
   #b5e0ea (biru muda) • #d1b06c (emas)
   ===================================================================== */
:root {
  --navy: #071e49;
  --navy-2: #0b2b63;
  --hijau: #92d05d;
  --biru-muda: #b5e0ea;
  --emas: #d1b06c;
  --teks: #14213d;
  --teks-lembut: #5b6b84;
  --garis: #e2e9f2;
  --kertas: #ffffff;
  --latar: #f2f6fa;
  --grad-utama: linear-gradient(135deg, #0b2b63 0%, #16407f 55%, #0e7a5f 100%);
  --grad-hero: linear-gradient(135deg, #071e49 0%, #123a72 52%, #0c6b57 100%);
  --grad-aksen: linear-gradient(135deg, #92d05d, #4fb3a0);
  --radius: 16px;
  --radius-kecil: 11px;
  --bayang: 0 10px 26px -18px rgba(7, 30, 73, .45), 0 2px 6px -4px rgba(7, 30, 73, .18);
  --bayang-naik: 0 18px 38px -22px rgba(7, 30, 73, .55);
  --logo-tinggi: 34px;
  --logo-lebar-maks: 190px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--teks);
  font-size: 14px;
  line-height: 1.5;
  background:
    radial-gradient(1100px 520px at 8% -8%, rgba(146, 208, 93, .18), transparent 62%),
    radial-gradient(900px 480px at 100% 0%, rgba(181, 224, 234, .34), transparent 64%),
    radial-gradient(760px 420px at 60% 100%, rgba(209, 176, 108, .16), transparent 60%),
    var(--latar);
  min-height: 100vh;
}
a { color: #16407f; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; line-height: 1.25; }
h1 { font-size: 21px; letter-spacing: -.2px; }
h2 { font-size: 15.5px; }
p { margin: 0; }
.iko { flex: 0 0 auto; vertical-align: -3px; }
.ta-r { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------------ layout */
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 258px;
  background: linear-gradient(180deg, #071e49 0%, #0a2555 58%, #082549 100%);
  color: #dce6f5; display: flex; flex-direction: column; z-index: 40;
  box-shadow: 12px 0 34px -30px #000;
}
.merek {
  display: flex; align-items: center; gap: 10px; padding: 16px 16px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.merek .logo-mark { width: var(--logo-tinggi); height: var(--logo-tinggi); flex: 0 0 auto; }
.merek .logo-gambar {
  height: var(--logo-tinggi); width: auto; max-width: min(62vw, var(--logo-lebar-maks));
  object-fit: contain; background: #fff; border-radius: 8px; padding: 2px 4px;
}
.merek-teks { min-width: 0; }
.merek-teks strong { display: block; font-size: 13px; color: #fff; letter-spacing: .1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.merek-teks small { display: block; font-size: 10.5px; color: #a9c2e0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tutup-laci { display: none; margin-left: auto; background: transparent; border: 0; color: #cfe0f2; cursor: pointer; }
.nav { flex: 1; overflow-y: auto; padding: 12px 10px 18px; }
.nav-grup { margin-bottom: 14px; }
.nav-label {
  font-size: 9.6px; text-transform: uppercase; letter-spacing: 1.3px; color: #8fa8cb;
  padding: 4px 10px 7px;
}
.nav-item {
  display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: 10px;
  color: #d6e2f2; font-size: 12.6px; margin-bottom: 2px; position: relative;
}
.nav-item:hover { background: rgba(255, 255, 255, .08); text-decoration: none; color: #fff; }
.nav-item.aktif {
  background: linear-gradient(90deg, rgba(146, 208, 93, .24), rgba(181, 224, 234, .13));
  color: #fff; font-weight: 600;
}
.nav-item.aktif::before {
  content: ''; position: absolute; left: -10px; top: 6px; bottom: 6px; width: 3px;
  border-radius: 3px; background: var(--emas);
}
.nav-item .iko { opacity: .92; }
.sidebar-kaki { padding: 10px 16px 14px; font-size: 10.5px; color: #8fa8cb; border-top: 1px solid rgba(255, 255, 255, .1); }

.isi { margin-left: 258px; min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 10px 22px; background: rgba(255, 255, 255, .86); backdrop-filter: blur(12px) saturate(160%);
  border-bottom: 1px solid var(--garis);
}
.topbar-judul { font-weight: 700; font-size: 13.5px; color: var(--navy); }
.topbar-kanan { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.jam-wib {
  display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums;
  font-size: 11.5px; color: var(--teks-lembut); background: #eef4fb; border: 1px solid var(--garis);
  padding: 4px 9px; border-radius: 20px;
}
.jam-dot { width: 6px; height: 6px; border-radius: 50%; background: #2fa96a; box-shadow: 0 0 0 3px rgba(47, 169, 106, .16); }
.chip-sppg {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: #0b4b3a;
  background: #e6f7ec; border: 1px solid #bfe7cd; padding: 4px 9px; border-radius: 20px; max-width: 230px;
}
.chip-sppg .iko { color: #12855a; }
.chip-user { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--teks-lembut); }
.chip-user b { color: var(--teks); font-weight: 600; }
.tombol-keluar {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: #8a2f3d;
  border: 1px solid #f2d3d8; background: #fdf1f3; padding: 4px 9px; border-radius: 8px;
}
.tombol-keluar:hover { background: #fbe4e8; text-decoration: none; }
.buka-menu { display: none; background: transparent; border: 0; color: var(--navy); cursor: pointer; padding: 4px; }
.konten { flex: 1; padding: 22px 22px 34px; max-width: 1400px; width: 100%; }
.kaki {
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 12px 22px 16px; font-size: 10.8px; color: #8b9ab0; border-top: 1px solid var(--garis);
}
.flash-area:empty { display: none; }

/* ------------------------------------------------------------------ judul halaman */
.judul-halaman { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.judul-halaman .sub { color: var(--teks-lembut); font-size: 12.4px; margin-top: 3px; }
.judul-aksi { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ------------------------------------------------------------------ tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid transparent; border-radius: 10px; padding: 8px 13px;
  font-size: 12.4px; font-weight: 600; cursor: pointer; background: #fff; color: var(--navy);
  border-color: var(--garis); transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
  font-family: inherit; text-decoration: none;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--bayang); text-decoration: none; }
.btn:active { transform: translateY(0); }
.btn-utama { background: var(--grad-utama); color: #fff; border-color: transparent; }
.btn-aksen { background: var(--grad-aksen); color: #0b3a2a; border-color: transparent; }
.btn-garis { background: #fff; color: var(--navy); border-color: #cfdbea; }
.btn-bahaya { background: #fdf0f2; color: #9b2233; border-color: #f3cdd3; }
.btn-kecil { padding: 5px 9px; font-size: 11.2px; border-radius: 8px; }
.btn-lebar { width: 100%; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; }

/* ------------------------------------------------------------------ kartu */
.kartu {
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .8);
  border-radius: var(--radius);
  box-shadow: var(--bayang);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.kartu-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.kartu-head h2 { font-size: 14px; color: var(--navy); }
.kartu-head .aksi { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid-2 > .kartu, .grid-3 > .kartu { margin-bottom: 0; }
/* Anak grid WAJIB boleh menyusut — tanpa min-width:0 tabel di dalam kartu
 * memaksa kolom grid melebar dan halaman bergulir horizontal di ponsel. */
.grid-2 > *, .grid-3 > *, .suhu-grid > *, .sa-launcher > * { min-width: 0; }
.grid-2, .grid-3 { grid-auto-rows: min-content; }

/* ------------------------------------------------------------------ beranda SuperApp */
.sa-hero {
  position: relative; overflow: hidden; border-radius: 20px; padding: 22px 24px;
  background: var(--grad-hero); color: #fff; margin-bottom: 18px;
  box-shadow: var(--bayang-naik);
}
.sa-hero::after {
  content: ''; position: absolute; width: 320px; height: 320px; right: -80px; top: -120px;
  background: radial-gradient(circle, rgba(146, 208, 93, .38), transparent 64%); border-radius: 50%;
}
.sa-hero::before {
  content: ''; position: absolute; width: 260px; height: 260px; left: 34%; bottom: -170px;
  background: radial-gradient(circle, rgba(209, 176, 108, .32), transparent 66%); border-radius: 50%;
}
.sa-hero-isi { position: relative; z-index: 1; display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.sa-sapa { flex: 1 1 320px; min-width: 0; }
.sa-sapa .sa-halo { font-size: 11px; text-transform: uppercase; letter-spacing: 1.7px; color: #b8f0cd; }
.sa-sapa h1 { font-size: 24px; margin: 4px 0 4px; color: #fff; }
.sa-sapa .sa-peran { font-size: 12.6px; color: #cfe0f3; }
.sa-jam {
  text-align: right; min-width: 168px; padding: 10px 16px; border-radius: 16px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18);
}
.sa-jam b { display: block; font-size: 27px; letter-spacing: .5px; font-variant-numeric: tabular-nums; color: #fff; }
.sa-jam span { font-size: 10.6px; color: #c7dcf1; }
.sa-chip {
  display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; position: relative; z-index: 1;
}
.sa-chip a, .sa-chip span {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.4px; color: #eaf4ff;
  background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 999px; padding: 5px 11px;
}
.sa-chip a:hover { background: rgba(255, 255, 255, .2); text-decoration: none; }
.sa-chip b { color: #fff; }

.sa-launcher { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; }
.sa-petak {
  display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: 14px;
  background: #fff; border: 1px solid var(--garis); color: var(--teks);
  box-shadow: 0 6px 18px -16px rgba(7, 30, 73, .5); transition: transform .14s ease, box-shadow .14s ease;
  position: relative; min-height: 96px;
}
.sa-petak:hover { transform: translateY(-2px); box-shadow: var(--bayang); text-decoration: none; }
.sa-petak .sa-ikon {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #eaf4ff, #e8f7ec); color: #0b3a72; border: 1px solid #deebf7;
}
.sa-petak b { font-size: 12.4px; line-height: 1.3; font-weight: 600; word-break: break-word; }
.sa-petak .pita { align-self: flex-start; white-space: normal; font-size: 9.8px; line-height: 1.35; }
.sa-petak small { font-size: 10.6px; color: var(--teks-lembut); }
.sa-section-title {
  display: flex; align-items: center; gap: 10px; margin: 24px 0 12px;
  font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: #6d7f99; font-weight: 700;
}
.sa-section-title::after { content: ''; flex: 1; height: 1px; background: var(--garis); }

/* ------------------------------------------------------------------ statistik */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 14px; }
.stat {
  background: #fff; border: 1px solid var(--garis); border-radius: 14px; padding: 13px 14px;
  box-shadow: 0 8px 20px -20px rgba(7, 30, 73, .5); position: relative; overflow: hidden;
}
.stat::after { content: ''; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--grad-aksen); opacity: .8; }
.stat .label { font-size: 10.6px; text-transform: uppercase; letter-spacing: .9px; color: #7d8da6; display: flex; align-items: center; gap: 5px; }
.stat .nilai { font-size: 23px; font-weight: 800; color: var(--navy); margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat .ket { font-size: 10.8px; color: var(--teks-lembut); margin-top: 2px; }
.stat.ungu::after { background: linear-gradient(90deg, #7c5cff, #b68cff); }
.stat.biru::after { background: linear-gradient(90deg, #16407f, #4b8fd8); }
.stat.hijau::after { background: linear-gradient(90deg, #12855a, #92d05d); }
.stat.emas::after { background: linear-gradient(90deg, #b48a2f, #e2c988); }
.stat.merah::after { background: linear-gradient(90deg, #b02a3a, #e38993); }

/* ------------------------------------------------------------------ tabel */
.tabel-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--garis); background: #fff; }
.tabel { width: 100%; border-collapse: collapse; font-size: 12px; }
.tabel th {
  position: sticky; top: 0; background: #f1f6fb; color: #3c5372; text-align: left; font-weight: 700;
  font-size: 10.4px; letter-spacing: .5px; text-transform: uppercase; padding: 8px 9px;
  border-bottom: 1px solid var(--garis); white-space: nowrap;
}
.tabel td { padding: 7px 9px; border-bottom: 1px solid #eef3f8; vertical-align: top; }
.tabel tbody tr:nth-child(even) { background: #fafcfe; }
.tabel tbody tr:hover { background: #f3f9f3; }
.tabel tbody tr:last-child td { border-bottom: 0; }
.tabel .nama { font-weight: 600; color: var(--navy); }
.tabel .kecil { font-size: 10.6px; color: var(--teks-lembut); }
.tabel .aksi-baris { display: flex; gap: 5px; flex-wrap: wrap; }
.baris-jumlah td { background: #eef6ef !important; font-weight: 700; }
.kosong { padding: 22px; text-align: center; color: #8496ad; font-size: 12.4px; background: #fbfdff; border-radius: 12px; border: 1px dashed #dbe6f1; }

/* ------------------------------------------------------------------ lencana */
.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px;
  font-size: 10.4px; font-weight: 700; letter-spacing: .2px; border: 1px solid transparent; white-space: nowrap;
}
.b-hijau { background: #e7f7ec; color: #116944; border-color: #c6ebd4; }
.b-kuning { background: #fdf5e3; color: #8a5a09; border-color: #f4e2b8; }
.b-merah { background: #fdeef0; color: #9b2233; border-color: #f5cdd4; }
.b-biru { background: #eaf2fd; color: #16407f; border-color: #cfe0f7; }
.b-ungu { background: #f1ecfe; color: #5533b8; border-color: #ddd2fb; }
.b-abu { background: #eef2f7; color: #4d5f78; border-color: #dfe7f0; }

/* ------------------------------------------------------------------ pesan */
.pesan {
  display: block; padding: 10px 13px; border-radius: 11px; margin-bottom: 12px; font-size: 12.4px;
  border: 1px solid transparent;
}
.pesan .iko-pesan { margin-right: 7px; vertical-align: -3px; }
.pesan-ok { background: #eaf8ef; border-color: #c7e9d3; color: #11603f; }
.pesan-galat { background: #fdeef0; border-color: #f3ccd3; color: #8f1f30; }
.pesan-info { background: #eef4fd; border-color: #d3e2f6; color: #16407f; }
.pesan-kuning { background: #fdf7e7; border-color: #f2e3b7; color: #7d5408; }

/* ------------------------------------------------------------------ formulir */
.bidang { display: block; margin-bottom: 13px; }
.bidang > span.ket, .bidang > span:first-child {
  display: block; font-size: 11.4px; font-weight: 600; color: #40536f; margin-bottom: 5px;
}
.bidang .wajib { color: #b02a3a; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=number],
input[type=tel], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border-radius: 9px; border: 1px solid #d5e0ec; background: #fff;
  font-size: 12.8px; color: var(--teks); font-family: inherit; transition: border .12s, box-shadow .12s;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: #4d8fd6; box-shadow: 0 0 0 3px rgba(77, 143, 214, .16);
}
textarea { min-height: 74px; resize: vertical; }
input[readonly], input[disabled], select[disabled] { background: #f4f7fb; color: #6a7c93; }
.bantuan { font-size: 10.8px; color: var(--teks-lembut); margin-top: 4px; display: block; line-height: 1.45; }
.bantuan b { color: #2f4864; }
.petunjuk-nik { background: #f3f8ff; border: 1px dashed #cddff3; border-radius: 9px; padding: 8px 10px; font-size: 10.9px; color: #37516f; margin-top: 5px; }
.cek-nik { font-size: 11px; margin-top: 5px; font-weight: 600; }
.cek-nik.ok { color: #12724c; }
.cek-nik.bad { color: #a3243a; }
.baris-bidang { display: grid; gap: 13px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.baris-bidang.dua { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.baris-bidang.tiga { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.input-sandi { position: relative; display: block; }
.input-sandi input { padding-right: 38px; }
.lihat-sandi { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); background: transparent; border: 0; color: #7b8ea6; cursor: pointer; padding: 4px; }
.pilihan-kategori { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pilihan-kategori label {
  display: flex; gap: 8px; align-items: center; padding: 10px 12px; border: 1px solid #d9e3ef;
  border-radius: 12px; cursor: pointer; background: #fff; font-size: 12.4px; font-weight: 600; color: #33475f;
}
.pilihan-kategori input { width: auto; }
.pilihan-kategori label:has(input:checked) { border-color: #2f7d5b; background: #eef8f2; box-shadow: 0 0 0 2px rgba(47, 125, 91, .12); }
.berkas-unggah { border: 1px dashed #cbd9e8; border-radius: 11px; padding: 10px; background: #fbfdff; }
.berkas-unggah img { max-width: 150px; border-radius: 8px; border: 1px solid var(--garis); display: block; margin-top: 6px; }
.aksi-form { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 8px; }
.checkline { display: flex; align-items: center; gap: 7px; font-size: 12.2px; color: #3d526e; }
.checkline input { width: auto; }

/* ------------------------------------------------------------------ filter */
.filter-baris { display: flex; gap: 9px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 14px; }
.filter-baris .bidang { margin: 0; min-width: 150px; flex: 1 1 150px; }
.filter-baris .btn { flex: 0 0 auto; }
.papan-aksi { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; background: #f4f9f4; border: 1px solid #d9ebdd; padding: 9px 12px; border-radius: 11px; margin-bottom: 12px; font-size: 12px; }
.papan-aksi .jumlah { font-weight: 700; color: #11603f; }
.halaman-nav { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.halaman-nav a, .halaman-nav span {
  padding: 5px 10px; border-radius: 8px; border: 1px solid var(--garis); font-size: 11.6px; background: #fff; color: #34506f;
}
.halaman-nav .aktif { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ------------------------------------------------------------------ infografis */
.info-donut { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.info-legenda { list-style: none; margin: 0; padding: 0; flex: 1 1 190px; min-width: 0; }
.info-legenda li { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 5px 0; border-bottom: 1px dashed #eef2f7; }
.info-legenda li:last-child { border-bottom: 0; }
.info-legenda .titik { width: 9px; height: 9px; border-radius: 3px; }
.info-legenda .lbl { flex: 1; color: #3d526e; }
.info-legenda b { color: var(--navy); }
.info-legenda small { color: #8798ae; font-size: 10.6px; width: 34px; text-align: right; }
.info-batang { list-style: none; margin: 0; padding: 0; }
.info-batang li { display: flex; align-items: center; gap: 9px; padding: 4px 0; font-size: 11.8px; }
.info-batang .bar-lbl { width: 118px; color: #3d526e; flex: 0 0 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.info-batang .bar-track { flex: 1; height: 9px; background: #eef3f9; border-radius: 6px; overflow: hidden; }
.info-batang .bar-fill { display: block; height: 100%; border-radius: 6px; }
.info-batang .bar-val { width: 38px; text-align: right; color: var(--navy); }
.info-progres { margin-top: 8px; }
.ip-head { display: flex; justify-content: space-between; font-size: 11.4px; color: #3d526e; margin-bottom: 5px; }
.ip-track { height: 8px; background: #eef3f9; border-radius: 6px; overflow: hidden; }
.ip-fill { display: block; height: 100%; border-radius: 6px; }

/* ------------------------------------------------------------------ keamanan pangan */
.suhu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.suhu-kartu {
  border: 1px solid var(--garis); border-radius: 14px; padding: 12px 14px; background: #fff;
  display: flex; flex-direction: column; gap: 6px; position: relative;
}
.suhu-kartu .sk-judul { font-size: 11.6px; font-weight: 700; color: #33475f; }
.suhu-kartu .sk-nilai { font-size: 24px; font-weight: 800; color: var(--navy); font-variant-numeric: tabular-nums; }
.suhu-kartu .sk-acuan { font-size: 10.6px; color: #7d8da6; }
.suhu-kartu .sk-foto { margin-top: 4px; }
.suhu-kartu .sk-foto img { width: 100%; height: 92px; object-fit: cover; border-radius: 9px; border: 1px solid var(--garis); }
.suhu-kartu.belum { border-style: dashed; background: #fbfdff; }
.kamera-kotak { position: relative; border-radius: 14px; overflow: hidden; background: #0a1730; aspect-ratio: 4 / 3; display: grid; place-items: center; color: #9fb6d4; }
.kamera-kotak video, .kamera-kotak canvas, .kamera-kotak img { width: 100%; height: 100%; object-fit: cover; display: block; }
.kamera-kotak .kamera-pesan { padding: 16px; text-align: center; font-size: 12px; }
.kamera-aksi { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.baris-suhu { display: grid; grid-template-columns: 150px 120px 1fr; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px dashed #eef2f7; }
.baris-suhu:last-child { border-bottom: 0; }
.baris-suhu .bs-label { font-size: 12px; font-weight: 600; color: #33475f; }
.baris-suhu .bs-acuan { font-size: 10.6px; color: #8798ae; display: block; font-weight: 400; }

/* ------------------------------------------------------------------ login */
.halaman-login { display: grid; place-items: center; min-height: 100vh; padding: 20px; }
.login-grid {
  display: grid; grid-template-columns: 1.05fr .95fr; gap: 0; width: min(1080px, 100%);
  background: #fff; border-radius: 22px; overflow: hidden; box-shadow: 0 30px 70px -40px rgba(7, 30, 73, .55);
}
.login-brand {
  background: var(--grad-hero); color: #fff; padding: 34px 32px; display: flex; flex-direction: column; gap: 20px;
  position: relative; overflow: hidden;
}
.login-brand::after {
  content: ''; position: absolute; width: 300px; height: 300px; right: -120px; bottom: -140px;
  background: radial-gradient(circle, rgba(146, 208, 93, .36), transparent 65%); border-radius: 50%;
}
.login-logo, .login-brand .logo-mark { width: 78px; height: 78px; object-fit: contain; background: #fff; border-radius: 16px; padding: 6px; }
.login-brand h1 { font-size: 23px; color: #fff; margin: 14px 0 4px; }
.login-brand p { font-size: 12.6px; color: #c9dcf1; }
.login-ciri { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; position: relative; z-index: 1; }
.login-ciri li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.2px; }
.login-ciri .iko { color: #b8f0cd; margin-top: 2px; }
.login-ciri b { display: block; color: #fff; font-size: 12.4px; }
.login-ciri span { color: #b9cfe7; font-size: 11.2px; }
.login-palet { display: flex; gap: 7px; margin-top: auto; position: relative; z-index: 1; }
.login-palet span { width: 26px; height: 8px; border-radius: 5px; }
.login-form { padding: 34px 32px; display: flex; flex-direction: column; justify-content: center; gap: 12px; }
.login-kartu { border: 0; box-shadow: none; padding: 0; margin: 0; background: transparent; }
.login-kartu h2 { font-size: 19px; color: var(--navy); }
.login-ket { font-size: 12px; color: var(--teks-lembut); margin: 4px 0 14px; }
.login-catatan { font-size: 10.8px; color: #8496ad; margin-top: 12px; line-height: 1.5; }
.login-kaki { font-size: 10.6px; color: #94a4b9; text-align: center; }

/* ------------------------------------------------------------------ detail data */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 4px 18px; }
.detail-item { padding: 7px 0; border-bottom: 1px dashed #eef2f7; }
.detail-item .dl { font-size: 10.4px; text-transform: uppercase; letter-spacing: .6px; color: #8496ad; }
.detail-item .dv { font-size: 12.6px; font-weight: 600; color: #24374f; word-break: break-word; }
.detail-item .dv.lembut { font-weight: 400; color: #4b5f79; }
.lampiran-dua { display: flex; gap: 14px; flex-wrap: wrap; }
.lampiran-satu { flex: 1 1 220px; border: 1px solid var(--garis); border-radius: 12px; padding: 10px; background: #fbfdff; }
.lampiran-satu img { width: 100%; max-height: 220px; object-fit: contain; border-radius: 8px; background: #fff; }
.lampiran-satu .ls-judul { font-size: 11px; font-weight: 700; color: #33475f; margin-bottom: 6px; }
.unduhan-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr)); gap: 14px; }
.unduhan-kartu {
  display: flex; gap: 11px; align-items: flex-start; border: 1px solid var(--garis); border-radius: 13px;
  padding: 13px; background: #fff; color: var(--teks);
}
.unduhan-kartu:hover { border-color: #b9d5c2; box-shadow: var(--bayang); text-decoration: none; }
.unduhan-kartu .uk-ikon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: #eef5fd; color: #16407f; flex: 0 0 auto; }
.unduhan-kartu b { display: block; font-size: 12.4px; }
.unduhan-kartu small { font-size: 10.8px; color: var(--teks-lembut); line-height: 1.4; }
.pita { display: inline-flex; align-items: center; gap: 5px; font-size: 10.6px; padding: 2px 8px; border-radius: 999px; background: #eef4fb; color: #34506f; }

/* ------------------------------------------------------------------ laci (mobile) */
.laci-overlay {
  position: fixed; inset: 0; background: rgba(7, 30, 73, .45); z-index: 35; backdrop-filter: blur(2px);
}
@media (max-width: 980px) {
  .sidebar { transform: translateX(-100%); transition: transform .22s ease; width: 272px; }
  .sidebar.terbuka { transform: none; }
  .tutup-laci { display: inline-flex; }
  .isi { margin-left: 0; }
  .buka-menu { display: inline-flex; }
  .topbar { padding: 9px 14px; }
  .topbar-judul { display: none; }
  .chip-sppg { display: none; }
  .konten { padding: 16px 14px 28px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .sa-hero { padding: 18px; }
  .sa-sapa h1 { font-size: 19px; }
  .sa-jam { min-width: 0; width: 100%; text-align: left; }
  .login-grid { grid-template-columns: 1fr; }
  .login-brand { padding: 24px; }
  .login-form { padding: 24px; }
  .pilihan-kategori { grid-template-columns: 1fr; }
  .baris-bidang.dua, .baris-bidang.tiga { grid-template-columns: 1fr; }
  .jam-wib { display: none; }
  .tombol-keluar span { display: none; }
  .baris-suhu { grid-template-columns: 1fr; gap: 4px; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .chip-user b { display: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .nilai { font-size: 19px; }
  .sa-launcher { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .sa-petak { min-height: 88px; padding: 11px; }
  .judul-halaman h1 { font-size: 18px; }
  .kartu { padding: 13px 14px; }
}
@media print {
  .sidebar, .topbar, .kaki, .judul-aksi, .filter-baris, .papan-aksi { display: none !important; }
  .isi { margin: 0; }
  .kartu { box-shadow: none; border: 1px solid #ddd; }
}

/* ------------------------------------------------------------------ tambahan komponen */
.teks-bahaya { color: #a3243a; font-weight: 600; }
.daftar-perhatian { list-style: none; margin: 0; padding: 0; }
.daftar-perhatian li { display: flex; gap: 9px; align-items: flex-start; padding: 9px 0; border-bottom: 1px dashed #eef2f7; }
.daftar-perhatian li:last-child { border-bottom: 0; }
.daftar-perhatian div { min-width: 0; }
.daftar-perhatian a { font-weight: 600; font-size: 12.4px; }
.daftar-perhatian small { display: block; font-size: 10.6px; color: #6d7f99; }
.daftar-perhatian em { display: block; font-size: 11px; color: #8a5a09; font-style: normal; margin-top: 2px; }
.daftar-syarat { margin: 0; padding-left: 18px; font-size: 12px; color: #3d526e; line-height: 1.65; }
.daftar-syarat li { margin-bottom: 5px; }
.kartu-head .aksi { display: flex; gap: 6px; align-items: center; }

/* ==================================================================
   PENCATATAN SUHU HARIAN — kartu per ruangan dengan Cek 1 / Cek 2
   ================================================================== */
.ruang-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 18px; }
.ruang-grid > * { min-width: 0; }
.ruang-kartu { margin-bottom: 0; }
.ruang-kartu.sorot { outline: 2px solid rgba(146, 208, 93, .75); outline-offset: 2px; }
.ruang-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ruang-head h2 { font-size: 13.6px; color: var(--navy); }
.ruang-blok { padding: 10px 0; border-top: 1px dashed #e7eef6; }
.ruang-blok:first-of-type { border-top: 0; padding-top: 0; }
.rb-judul { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 7px; }
.rb-judul b { font-size: 12.4px; color: #24374f; }
.cek-daftar { display: flex; flex-direction: column; gap: 8px; }

.cek-baris {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 8px 10px; border: 1px solid #e9f0f7; border-radius: 12px; background: #fbfdff;
}
.cek-baris.terisi { background: #f4fbf5; border-color: #d7ecdd; }
.cek-label { font-size: 11px; font-weight: 700; color: #5b6b84; min-width: 42px; }

.cek-thumb {
  width: 58px; height: 46px; border-radius: 9px; overflow: hidden; background: #eef3f9;
  display: grid; place-items: center; flex: 0 0 auto; border: 1px solid #dfe8f1;
}
.cek-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cek-thumb.kosong { color: #a7b6c8; font-size: 15px; }

.cek-nilai { display: inline-flex; align-items: baseline; gap: 3px; font-size: 15px; font-weight: 800; color: var(--navy); }
.cek-nilai em { font-style: normal; font-size: 10.4px; font-weight: 600; color: #7d8da6; }
.cek-nilai.kosong { color: #b6c3d3; }
.cek-jam { font-size: 13px; font-weight: 700; color: #33475f; min-width: 46px; }
.cek-jam.kosong { color: #b6c3d3; font-weight: 600; }

.cek-foto {
  width: 70px; height: 54px; border-radius: 11px; border: 1px dashed #b9cfe4; background: #fff;
  color: #16407f; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; cursor: pointer; font-family: inherit; padding: 0; overflow: hidden; flex: 0 0 auto;
  transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease;
}
.cek-foto:hover { border-color: #2f7d5b; box-shadow: 0 6px 16px -14px rgba(7, 30, 73, .5); transform: translateY(-1px); }
.cek-foto img { width: 100%; height: 100%; object-fit: cover; }
.cek-foto-teks { font-size: 9.6px; font-weight: 700; }
.cek-foto-ikon { color: #16407f; }

.cek-nilai label, label.cek-nilai { display: inline-flex; flex-direction: column; gap: 2px; }
label.cek-nilai > span:first-child { font-size: 9.2px; font-weight: 700; letter-spacing: .5px; color: #7d8da6; }
.cek-kotak {
  display: inline-flex; align-items: center; gap: 3px; border: 1px solid #d5e0ec; border-radius: 9px;
  background: #fff; padding: 4px 8px; min-width: 86px;
}
.cek-kotak input {
  border: 0; padding: 1px 0; width: 62px; font-size: 15px; font-weight: 800; color: var(--navy);
  background: transparent; font-variant-numeric: tabular-nums;
}
.cek-kotak input:focus { outline: none; box-shadow: none; }
.cek-kotak input.dari-ocr { color: #0b6b45; }
.cek-kotak em { font-style: normal; font-size: 10.4px; color: #7d8da6; font-weight: 600; }
.cek-catatan { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.cek-deteksi {
  font-size: 9.6px; font-weight: 700; color: #0b6b45; background: #e7f7ec;
  border: 1px solid #c6ebd4; border-radius: 999px; padding: 2px 7px; white-space: nowrap;
}

.papan-simpan {
  position: sticky; bottom: 12px; z-index: 20; margin-top: 18px;
  background: rgba(255, 255, 255, .96); border: 1px solid var(--garis); border-radius: 14px;
  padding: 11px 14px; box-shadow: var(--bayang-naik); backdrop-filter: blur(8px);
}

/* ---- modal kamera ---- */
.modal-kamera {
  position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 14px;
  background: rgba(7, 30, 73, .55); backdrop-filter: blur(3px);
}
.modal-kamera[hidden] { display: none; }
.modal-isi {
  width: min(540px, 100%); max-height: 94vh; overflow-y: auto; background: #fff;
  border-radius: 18px; padding: 15px 16px 18px; box-shadow: 0 30px 70px -30px rgba(7, 30, 73, .7);
}
.modal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.modal-head b { font-size: 13.6px; color: var(--navy); }
.tutup-modal { margin-left: auto; background: #f1f5fa; border: 1px solid var(--garis); border-radius: 9px; padding: 5px; color: #5b6b84; cursor: pointer; display: inline-flex; }
.modal-isi .kamera-kotak { aspect-ratio: 4 / 3; }
.hasil-ocr { margin-top: 10px; }
.hasil-ocr .ocr-ok, .hasil-ocr .ocr-gagal {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.4px; font-weight: 700;
  padding: 9px 11px; border-radius: 11px; border: 1px solid transparent;
}
.hasil-ocr .ocr-ok { background: #eaf8ef; border-color: #c7e9d3; color: #11603f; }
.hasil-ocr .ocr-gagal { background: #fdf7e7; border-color: #f2e3b7; color: #7d5408; }
.hasil-ocr small { display: block; width: 100%; font-weight: 500; font-size: 10.8px; opacity: .8; }
.foto-pratinjau img { width: 100%; max-height: 160px; object-fit: contain; border-radius: 10px; margin-top: 8px; background: #f4f7fb; }

@media (max-width: 560px) {
  .ruang-grid { grid-template-columns: 1fr; gap: 12px; }
  .cek-baris { gap: 8px; padding: 8px; }
  .cek-foto { width: 58px; height: 48px; }
  .cek-kotak { min-width: 74px; }
  .cek-kotak input { width: 52px; font-size: 14px; }
  .cek-catatan { margin-left: 0; }
  .modal-isi { padding: 12px; }
}

/* ---- grafik garis (SVG) di dashboard ---- */
.grafik-kartu svg { width: 100%; height: auto; display: block; }
.grafik-legenda { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 10.6px; color: #4b5f79; }
.grafik-legenda span { display: inline-flex; align-items: center; gap: 5px; }
.grafik-legenda i { width: 10px; height: 4px; border-radius: 3px; display: inline-block; }
.grafik-tab { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.grafik-tab a {
  font-size: 11.2px; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--garis);
  background: #fff; color: #34506f;
}
.grafik-tab a.aktif { background: var(--navy); color: #fff; border-color: var(--navy); }


/* ==================================================================
   MATRIKS AKSES MODUL (Pengaturan → Akses Modul per Role)
   ================================================================== */
.matriks-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--garis); background: #fff; }
.matriks-akses { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 720px; }
.matriks-akses th, .matriks-akses td { padding: 7px 8px; border-bottom: 1px solid #eef3f8; }
.matriks-akses thead th {
  position: sticky; top: 0; background: #f1f6fb; color: #3c5372; font-size: 10px;
  text-transform: uppercase; letter-spacing: .5px; text-align: center; z-index: 2;
}
.matriks-akses thead th.kol-modul { text-align: left; }
.matriks-akses thead th small { display: block; font-size: 9px; color: #8798ae; text-transform: none; letter-spacing: 0; }
.matriks-akses .kol-modul { text-align: left; min-width: 210px; }
.matriks-akses .kol-modul .kecil { font-family: var(--mono, monospace); font-size: 9.6px; color: #8798ae; }
.matriks-akses .kol-role { text-align: center; width: 92px; }
.matriks-akses tr.baris-grup td {
  background: #eef6ef; font-weight: 700; font-size: 10.4px; text-transform: uppercase;
  letter-spacing: .8px; color: #2f6b45;
}
.cek-akses { position: relative; display: inline-flex; cursor: pointer; }
.cek-akses input { position: absolute; opacity: 0; width: 0; height: 0; }
.cek-akses .kotak {
  width: 22px; height: 22px; border-radius: 7px; border: 1.6px solid #cdd9e6; background: #fff;
  display: inline-grid; place-items: center; color: transparent; transition: all .14s ease;
}
.cek-akses .iko { width: 13px; height: 13px; }
.cek-akses input:checked + .kotak {
  background: linear-gradient(135deg, #92d05d, #2f9e6b); border-color: transparent; color: #06301f;
  box-shadow: 0 4px 12px -6px rgba(47, 158, 107, .8);
}
.cek-akses input:focus-visible + .kotak { box-shadow: 0 0 0 3px rgba(77, 143, 214, .3); }
.cek-akses.terkunci { cursor: not-allowed; }
.cek-akses.terkunci .kotak { opacity: .62; }
.ikon-kunci { color: #94a4b9; margin-left: 2px; vertical-align: -2px; }
