/* ====== SURVEY TAGING TM — STYLE ====== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --biru: #0c6bb5;
  --biru-tua: #084d84;
  --kuning: #ffd400;
  --merah: #e53935;
  --hijau: #2e7d32;
  --abu: #f4f6f8;
  --teks: #1c2733;
  --radius: 12px;
  --bayang: 0 2px 10px rgba(0,0,0,.18);
}

html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--teks);
  overflow: hidden;
}

/* ---------- Top bar ---------- */
#topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1100;
  height: 52px;
  background: var(--biru);
  color: #fff;
  display: flex; align-items: center; gap: 8px;
  padding: 0 10px;
  box-shadow: var(--bayang);
}
#topbar .logo { font-size: 20px; }
#topbar .logo-img { width: 34px; height: 34px; border-radius: 8px; }
#topbar .judul { font-weight: 700; font-size: 15px; line-height: 1.1; white-space: nowrap; }
#topbar .judul small { display: block; font-weight: 400; font-size: 10px; opacity: .85; }
/* deretan menu topbar: satu baris, bisa digeser bila sempit */
#menu-bar {
  display: flex; align-items: center; gap: 8px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: none; max-width: 100%;
}
#menu-bar::-webkit-scrollbar { display: none; }
#menu-bar .tombol-bar { flex: 0 0 auto; }
@media (max-width: 640px) {
  #topbar { gap: 6px; padding: 0 6px; }
  #topbar .judul { display: none; }       /* di HP: logo + deretan menu penuh */
  #topbar .logo-img { width: 30px; height: 30px; }
  #menu-bar { gap: 5px; }
  .teks-bar { display: none; }             /* tombol jadi ikon saja agar semua muat */
  .tombol-bar { padding: 7px 8px; font-size: 14px; }
  #badge-offline { font-size: 9px; padding: 2px 5px; }
}
#topbar .spacer { flex: 1; }
#badge-offline {
  background: var(--merah); color: #fff;
  font-size: 10px; font-weight: 800;
  padding: 3px 7px; border-radius: 10px;
  margin-left: 6px; white-space: nowrap;
}
.tombol-bar {
  background: rgba(255,255,255,.15);
  border: none; color: #fff;
  padding: 7px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 600;
  cursor: pointer; white-space: nowrap;
}
.tombol-bar:active { background: rgba(255,255,255,.3); }

/* ---------- Peta ---------- */
#map { position: fixed; inset: 52px 0 64px 0; z-index: 1; }

/* Label tiang di peta */
.label-tiang {
  background: transparent; border: none;
}
.label-tiang .pin {
  display: flex; flex-direction: column; align-items: center;
  transform: translateY(-4px);
  position: relative;
}
/* lencana status pekerjaan pada marker */
.badge-u {
  position: absolute; top: -9px; left: calc(50% + 4px);
  width: 15px; height: 15px; border-radius: 50%;
  font-size: 10px; font-weight: 900; color: #fff;
  text-align: center; line-height: 15px;
  border: 1.5px solid #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,.45);
  z-index: 5;
}
.badge-u.perlu { background: #e53935; }
.badge-u.ok { background: #2e7d32; }
.label-tiang .titik {
  width: 16px; height: 16px; border-radius: 50%;
  border: 3px solid #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.label-tiang .nama {
  margin-top: 2px;
  background: #fff; border-radius: 6px;
  padding: 1px 5px;
  font-size: 10px; font-weight: 700;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
  white-space: nowrap;
}
.label-jarak {
  background: rgba(255,255,255,.92);
  border: 1px solid var(--biru);
  border-radius: 8px;
  padding: 1px 6px;
  font-size: 10px; font-weight: 700; color: var(--biru-tua);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}

/* ---------- Tombol melayang ---------- */
#fab-wrap {
  position: fixed; right: 12px; bottom: 84px; z-index: 1050;
  display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
}
.fab {
  border: none; cursor: pointer;
  border-radius: 28px;
  padding: 13px 16px;
  font-size: 13px; font-weight: 700;
  box-shadow: var(--bayang);
  display: flex; align-items: center; gap: 7px;
}
.fab.gps { background: var(--biru); color: #fff; }
.fab.tag { background: #fff; color: var(--teks); }
.fab.tag.aktif { background: var(--kuning); color: #000; }
.fab.live { background: var(--hijau); color: #fff; }

/* ---------- Panel live survey ---------- */
.sembunyi { display: none !important; }
#panel-live {
  position: fixed; left: 0; right: 0; bottom: 64px; z-index: 1050;
  background: #fff;
  border-top: 3px solid var(--hijau);
  box-shadow: 0 -3px 12px rgba(0,0,0,.15);
  padding: 8px 10px 10px;
}
#panel-live .live-info { display: flex; margin-bottom: 8px; }
#panel-live .li-kol { flex: 1; text-align: center; }
#panel-live .li-kol span { display: block; font-weight: 800; font-size: 17px; color: var(--teks); }
#panel-live .li-kol span.ideal { color: var(--hijau); }
#panel-live .li-kol small { font-size: 10px; color: #6b7a89; }
#panel-live .live-aksi { display: flex; gap: 8px; }
#lv-tanam {
  flex: 1; border: none; cursor: pointer;
  background: var(--hijau); color: #fff;
  border-radius: 10px; padding: 13px;
  font-size: 15px; font-weight: 800;
}
#lv-ikuti, #lv-stop {
  border: none; cursor: pointer; border-radius: 10px;
  width: 48px; font-size: 17px;
}
#lv-ikuti { background: #e7ecf1; }
#lv-ikuti.aktif { background: var(--kuning); }
#lv-stop { background: #fdecea; color: var(--merah); }

/* Kartu tanam cepat (dengan estimasi biaya) */
#q-konstruksi { display: grid; grid-template-columns: repeat(auto-fill, minmax(155px, 1fr)); gap: 8px; }
.kartu-q {
  border: 2px solid #d7dee5; border-radius: 10px;
  padding: 9px 10px; cursor: pointer; background: #fff;
}
.kartu-q:active { border-color: var(--hijau); background: #eef7ee; }
.kartu-q .kode { font-weight: 800; font-size: 14px; }
.kartu-q .fungsi { font-size: 11px; color: #45566a; margin: 2px 0; }
.kartu-q .biaya { font-size: 12px; font-weight: 700; color: var(--hijau); }

/* ---------- Bar ringkasan bawah ---------- */
#ringkas {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 1100;
  height: 64px;
  background: #fff;
  border-top: 1px solid #dfe5ea;
  display: flex; align-items: center;
  padding: 0 8px;
  cursor: pointer;
}
#ringkas .kol { flex: 1; text-align: center; }
#ringkas .kol .angka { font-weight: 800; font-size: 14px; color: var(--biru-tua); }
#ringkas .kol .ket { font-size: 10px; color: #6b7a89; }
#ringkas .buka { font-size: 18px; color: var(--biru); padding: 0 6px; }

/* ---------- Modal ---------- */
.modal-latar {
  position: fixed; inset: 0; z-index: 1200;
  background: rgba(10,25,40,.55);
  display: none;
  align-items: flex-end; justify-content: center;
}
.modal-latar.tampil { display: flex; }
.modal {
  background: #fff;
  width: 100%; max-width: 640px;
  max-height: 88vh;
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  overflow: hidden;
}
@media (min-width: 700px) {
  .modal-latar { align-items: center; }
  .modal { border-radius: 16px; }
}
.modal-kepala {
  background: var(--biru); color: #fff;
  padding: 13px 16px;
  font-weight: 700; font-size: 15px;
  display: flex; align-items: center;
}
.modal-kepala .tutup {
  margin-left: auto; background: none; border: none;
  color: #fff; font-size: 20px; cursor: pointer; line-height: 1;
}
.modal-isi { padding: 14px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.modal-kaki {
  padding: 10px 16px;
  border-top: 1px solid #e4e9ee;
  display: flex; gap: 10px; justify-content: flex-end;
  background: #fafbfc;
}

/* ---------- Form ---------- */
.form-grup { margin-bottom: 13px; }
.form-grup label { display: block; font-size: 12px; font-weight: 700; margin-bottom: 5px; color: #37475a; }
.form-grup input[type=text], .form-grup input[type=number], .form-grup select, .form-grup textarea {
  width: 100%;
  border: 1px solid #c6d0da;
  border-radius: 8px;
  padding: 9px 10px;
  font-size: 14px;
  background: #fff;
}
.form-baris { display: flex; gap: 10px; }
.form-baris .form-grup { flex: 1; }
.cek-baris { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.cek-baris input { width: 17px; height: 17px; }

/* Toggle segmen (mode rencana/eksisting, kondisi aset) */
.seg { display: flex; gap: 6px; }
.seg button {
  flex: 1; border: 2px solid #d7dee5; background: #fff;
  border-radius: 9px; padding: 9px 6px;
  font-size: 13px; font-weight: 700; cursor: pointer; color: var(--teks);
}
.seg button.aktif { border-color: var(--biru); background: #eaf4fd; color: var(--biru-tua); }
.seg button.aktif[data-kondisi="baik"] { border-color: #2e7d32; background: #eef7ee; color: #2e7d32; }
.seg button.aktif[data-kondisi="rusakRingan"] { border-color: #f57c00; background: #fff3e6; color: #f57c00; }
.seg button.aktif[data-kondisi="rusakBerat"] { border-color: #e53935; background: #fdecea; color: #e53935; }

/* Usulan perbaikan di form */
.baris-usulan { display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: 13px; }
.baris-usulan input { width: 17px; height: 17px; }
.baris-usulan .hrg { margin-left: auto; font-size: 11px; font-weight: 700; color: var(--hijau); white-space: nowrap; }
.baris-usulan.saran { background: #eef7ee; border-radius: 7px; padding-left: 6px; padding-right: 6px; }

/* Galeri foto */
#galeri-foto { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
#galeri-foto .foto {
  position: relative; width: 84px; height: 84px;
  border-radius: 8px; overflow: hidden; border: 1px solid #c6d0da;
}
#galeri-foto .foto img { width: 100%; height: 100%; object-fit: cover; }
#galeri-foto .foto button {
  position: absolute; top: 2px; right: 2px;
  width: 22px; height: 22px; border: none; border-radius: 50%;
  background: rgba(0,0,0,.6); color: #fff; font-size: 12px; cursor: pointer;
  line-height: 1;
}
/* Panel pencarian lokasi */
#panel-cari {
  position: fixed; top: 52px; left: 0; right: 0; z-index: 1150;
  background: #fff;
  border-bottom: 1px solid #dfe5ea;
  box-shadow: 0 3px 10px rgba(0,0,0,.12);
  padding: 8px 10px;
}
#panel-cari .cari-baris { display: flex; gap: 7px; }
#panel-cari input {
  flex: 1; border: 1px solid #c6d0da; border-radius: 9px;
  padding: 9px 11px; font-size: 14px;
}
#cari-hasil { max-height: 45vh; overflow-y: auto; }
.hasil-cari {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 6px; border-bottom: 1px solid #eef2f6;
  cursor: pointer; font-size: 13px;
}
.hasil-cari:active { background: #eaf4fd; }
.hasil-cari .ik { font-size: 16px; flex-shrink: 0; }
.hasil-cari .ket-hasil { font-size: 11px; color: #7c8b9a; }

/* Slot eviden calon pelanggan */
.slot-eviden {
  display: flex; align-items: center; gap: 10px;
  border: 1px solid #dde4ea; border-radius: 10px;
  padding: 7px 9px; margin-bottom: 7px;
}
.slot-eviden.terisi { border-color: #a5d6a7; background: #f4faf4; }
.slot-eviden img, .slot-eviden .kosong {
  width: 52px; height: 52px; border-radius: 8px; object-fit: cover; flex-shrink: 0;
}
.slot-eviden .kosong {
  background: #eef2f6; display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: #9aa9b8;
}
.slot-eviden .lbl { flex: 1; font-size: 12.5px; font-weight: 600; }

.badge-skor {
  display: inline-block; min-width: 26px; text-align: center;
  border-radius: 7px; padding: 2px 6px;
  font-size: 11px; font-weight: 800; color: #fff;
}

/* Kartu pilihan konstruksi */
#pilih-konstruksi { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.kartu-k {
  border: 2px solid #d7dee5; border-radius: 10px;
  padding: 8px 9px; cursor: pointer;
  background: #fff;
}
.kartu-k.pilih { border-color: var(--biru); background: #eaf4fd; }
.kartu-k .kode { font-weight: 800; font-size: 13px; }
.kartu-k .fungsi { font-size: 11px; color: #45566a; margin-top: 2px; }
.kartu-k .sudut { font-size: 10px; color: #7c8b9a; margin-top: 2px; }
.grup-kartu {
  grid-column: 1 / -1;
  font-size: 11px; font-weight: 800; color: var(--biru-tua);
  border-bottom: 2px solid var(--kuning);
  padding: 6px 0 3px; margin-top: 2px;
}

.info-biaya {
  background: #eef7ee; border: 1px solid #bfdcbf;
  border-radius: 10px; padding: 10px 12px;
  font-size: 13px; margin-top: 4px;
}
.info-biaya b { color: var(--hijau); }

/* ---------- Tombol umum ---------- */
.tombol {
  border: none; cursor: pointer;
  border-radius: 9px;
  padding: 10px 18px;
  font-size: 13px; font-weight: 700;
}
.tombol.utama { background: var(--biru); color: #fff; }
.tombol.polos { background: #e7ecf1; color: var(--teks); }
.tombol.bahaya { background: var(--merah); color: #fff; }
.tombol.kecil { padding: 5px 9px; font-size: 11px; border-radius: 7px; }

/* ---------- Tabel ---------- */
.bungkus-tabel { overflow-x: auto; margin-bottom: 14px; }
table.rab { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 460px; }
table.rab th {
  background: var(--biru-tua); color: #fff;
  padding: 7px 8px; text-align: left; white-space: nowrap;
}
table.rab td { padding: 6px 8px; border-bottom: 1px solid #e6ebf0; vertical-align: top; }
table.rab tr.total td { font-weight: 800; background: #fff8dc; border-top: 2px solid var(--kuning); }
table.rab tr.sub td { font-weight: 700; background: #f0f4f8; }
td.angka, th.angka { text-align: right; white-space: nowrap; }

.judul-seksi {
  font-size: 13px; font-weight: 800; color: var(--biru-tua);
  margin: 16px 0 8px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--kuning);
}
.judul-seksi:first-child { margin-top: 0; }

.catatan-kecil { font-size: 11px; color: #7c8b9a; margin-top: 6px; }

/* ---------- Daftar tiang ---------- */
.item-tiang {
  display: flex; align-items: center; gap: 9px;
  border: 1px solid #dde4ea; border-radius: 10px;
  padding: 9px 10px; margin-bottom: 8px;
}
.item-tiang .bulat {
  width: 30px; height: 30px; border-radius: 50%;
  color: #fff; font-size: 10px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.item-tiang .isi { flex: 1; min-width: 0; }
.item-tiang .nm { font-weight: 700; font-size: 13px; }
.item-tiang .dt { font-size: 11px; color: #61707f; }
.item-tiang .aksi { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }

/* ---------- Popup leaflet ---------- */
.popup-tiang { font-size: 12px; min-width: 170px; }
.popup-tiang .pjudul { font-weight: 800; font-size: 13px; margin-bottom: 3px; }
.popup-tiang .pinfo { color: #4a5a6a; margin-bottom: 7px; line-height: 1.5; }
.popup-tiang .paksi { display: flex; gap: 6px; }

/* ---------- Pengaturan harga ---------- */
.grup-harga h4 { font-size: 12px; margin: 12px 0 6px; color: var(--biru-tua); text-transform: uppercase; }
.baris-harga { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.baris-harga .nm { flex: 1; font-size: 12px; }
.baris-harga .nm small { color: #8494a4; }
.baris-harga input { width: 130px; text-align: right; border: 1px solid #c6d0da; border-radius: 7px; padding: 6px 8px; font-size: 13px; }

/* Layar masuk */
#layar-masuk {
  position: fixed; inset: 0; z-index: 3000;
  background: linear-gradient(160deg, var(--biru-tua), var(--biru) 55%, #1b86d8);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.kotak-masuk {
  background: #fff; border-radius: 16px;
  padding: 26px 22px; width: 100%; max-width: 350px;
  text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,.35);
}
.kotak-masuk img { width: 68px; height: 68px; border-radius: 14px; }
.kotak-masuk h1 { font-size: 26px; letter-spacing: 2px; color: var(--biru-tua); margin: 8px 0 2px; }
.kotak-masuk .slogan { font-size: 11px; color: #61707f; margin-bottom: 18px; }
.kotak-masuk input {
  width: 100%; border: 1px solid #c6d0da; border-radius: 9px;
  padding: 11px 12px; font-size: 14px; margin-bottom: 10px;
}
.kotak-masuk button { width: 100%; padding: 12px; font-size: 15px; }
.kotak-masuk .galat { color: var(--merah); font-size: 12px; font-weight: 700; margin-top: 10px; }
.kotak-masuk .ket { font-size: 10.5px; color: #8494a4; margin-top: 14px; line-height: 1.5; }

/* toast */
#toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: #263445; color: #fff;
  padding: 9px 16px; border-radius: 20px;
  font-size: 13px; z-index: 1500;
  opacity: 0; transition: opacity .25s;
  pointer-events: none;
  max-width: 90vw; text-align: center;
}
#toast.tampil { opacity: 1; }

/* ===== lembar gambar rencana (cetak / PDF) ===== */
#lembar-wrap {
  position: fixed; inset: 0; z-index: 1400;
  background: #3a4654; overflow: auto; padding: 10px;
}
#lembar-wrap.sembunyi { display: none; }
.lembar-alat {
  background: #fff; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px;
  max-width: 1122px; margin-left: auto; margin-right: auto;
}
.lembar-isian { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.lembar-isian input {
  flex: 1; min-width: 150px; border: 1px solid #c6d0da; border-radius: 8px;
  padding: 8px 10px; font-size: 13px;
}
/* ukuran tetap 1122×792 px ≈ A4 lanskap 96 dpi → hasil cetak = tampilan layar */
.lembar {
  width: 1122px; height: 792px; margin: 0 auto;
  background: #fff; display: flex; box-shadow: 0 4px 18px rgba(0,0,0,.4);
}
.lembar-peta-wrap { position: relative; flex: 1; border: 2px solid #222; }
#peta-lembar { position: absolute; inset: 0; background: #dfe7ee; }
.lembar-judul-peta {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  z-index: 1000; background: rgba(255,255,255,.95); border: 1px solid #222;
  padding: 7px 22px; font-size: 19px; font-weight: 800; letter-spacing: .5px;
  white-space: nowrap; border-radius: 3px;
}
.lembar-side {
  width: 218px; border: 2px solid #222; border-left: none;
  display: flex; flex-direction: column; font-size: 11px;
}
.ls-logo { text-align: center; padding: 12px 8px 8px; }
.ls-unit { font-size: 9.5px; font-weight: 700; margin-top: 6px; line-height: 1.5; }
.ls-baris { border-top: 1.5px solid #222; padding: 7px 10px; flex: 0 0 auto; }
.ls-baris small { display: block; font-weight: 700; text-decoration: underline; margin-bottom: 5px; font-size: 9.5px; }
.ls-baris b { display: block; text-align: center; font-size: 11.5px; min-height: 14px; }
.ls-legenda div { display: flex; align-items: center; gap: 7px; margin: 4px 0; font-size: 9.5px; }
.lg-kotak { width: 11px; height: 11px; display: inline-block; border: 1px solid #555; flex: 0 0 auto; }
.lg-garis { width: 26px; border-top: 2.5px solid #111; display: inline-block; flex: 0 0 auto; }

/* marker & label di peta lembar */
.lg-badge {
  background: rgba(255,255,255,.96); border: 1.5px solid #333; border-radius: 50%;
  width: 44px; height: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; line-height: 1.12;
  font-weight: 800; color: #111; box-shadow: 0 1px 4px rgba(0,0,0,.5);
}
.lg-badge .k { font-size: 10.5px; }
.lg-badge .b { font-size: 9px; border-top: 1px solid #777; padding-top: 1px; font-weight: 700; }
.lg-jarak {
  color: #fff; font-weight: 800; font-size: 13px; text-decoration: underline;
  text-shadow: 0 0 3px #000, 0 0 5px #000; white-space: nowrap;
}
.lg-nama {
  color: #fff; font-weight: 700; font-size: 11px;
  text-shadow: 0 0 3px #000, 0 0 5px #000; white-space: nowrap;
}

/* ===== lembar RAB resmi (cetak / PDF) ===== */
#rab-wrap { position: fixed; inset: 0; z-index: 1400; background: #3a4654; overflow: auto; padding: 10px; }
#rab-wrap.sembunyi { display: none; }
.rab-lembar {
  width: 1122px; min-height: 792px; margin: 0 auto; background: #fff;
  padding: 34px 44px; box-shadow: 0 4px 18px rgba(0,0,0,.4);
  font-family: Arial, Helvetica, sans-serif; color: #000; font-size: 12px;
}
.rab-lembar .rjudul { text-align: center; font-size: 16px; font-weight: 800; text-decoration: underline; margin-bottom: 16px; letter-spacing: .5px; }
.rab-lembar .rinfo { margin: 0 0 10px 60px; font-weight: 700; }
.rab-lembar .rinfo span { display: inline-block; width: 90px; }
.rab-lembar table.rtab { width: 100%; border-collapse: collapse; }
.rab-lembar table.rtab th, .rab-lembar table.rtab td { border: 1.2px solid #000; padding: 3px 7px; font-size: 11.5px; }
.rab-lembar table.rtab th { text-align: center; font-weight: 700; }
.rab-lembar td.angka { text-align: right; font-weight: 700; white-space: nowrap; }
.rab-lembar td.tengah { text-align: center; font-weight: 700; }
.rab-lembar tr.seksi td { background: #dcdcdc; font-weight: 800; }
.rab-lembar tr.rekap td { font-weight: 800; }
.rab-lembar td.uraian { font-weight: 700; }
.rab-lembar .ttd { display: flex; justify-content: space-between; margin: 26px 40px 0; text-align: center; font-weight: 700; }
.rab-lembar .ttd .blok { min-width: 260px; }
.rab-lembar .ttd .nama, .rab-lembar .ttd-tengah .nama { margin-top: 84px; font-weight: 800; text-transform: uppercase; }
.rab-lembar .ttd-tengah { text-align: center; font-weight: 700; margin-top: 8px; }

@media print {
  @page { size: A4 landscape; margin: 0; }
  html, body { height: auto !important; overflow: visible !important; }
  body > *:not(.cetak-wrap) { display: none !important; }
  .cetak-wrap.sembunyi { display: none !important; }
  .cetak-wrap { position: static; background: #fff; padding: 0 !important; overflow: visible; }
  .no-cetak { display: none !important; }
  /* satu lembar penuh: skala cetak diatur app.js (siapkanCetak) agar isi
     sampai tanda tangan muat satu halaman tanpa terpotong */
  .lembar, .rab-lembar { box-shadow: none; margin: 0 auto; page-break-inside: avoid; }
}

@media print {
  /* kontrol zoom & atribusi peta tidak ikut tercetak */
  #lembar .leaflet-control-zoom { display: none !important; }
}

/* ===== tampilan HP: lembar cetak & toolbar ===== */
/* lembar tetap 1122px (ukuran cetak A4) — di layar sempit diskalakan
   otomatis lewat properti zoom (diatur app.js) agar terlihat utuh */
@media (max-width: 720px) {
  #lembar-wrap, #rab-wrap { padding: 6px; }
  .lembar-alat { padding: 8px 10px; border-radius: 8px; }
  .lembar-isian { gap: 5px; margin-bottom: 6px; }
  .lembar-isian input { flex: 1 1 45%; min-width: 0; font-size: 12px; padding: 7px 8px; }
  .lembar-alat .tombol { flex: 1; padding: 10px 8px; }
}
/* skala cetak dikendalikan app.js lewat beforeprint/afterprint —
   di layar skala mengikuti lebar layar, di kertas skala pas satu halaman */

/* papan nama pekerjaan di peta aplikasi */
.label-pekerjaan {
  background: rgba(255,255,255,.95);
  border: 1px solid #90a4ae; border-left: 4px solid #90a4ae;
  border-radius: 8px; padding: 3px 8px;
  font-size: 10.5px; font-weight: 800; color: #37474f;
  white-space: nowrap; box-shadow: 0 1px 4px rgba(0,0,0,.3);
  width: max-content !important; height: auto !important;
}
.label-pekerjaan.aktif { border-color: var(--biru); border-left-color: var(--biru); color: var(--biru-tua); }
.label-pekerjaan small { display: block; font-weight: 600; font-size: 9.5px; color: #607d8b; }
