/* ==========================================================================
   PDAM Cilawu — tema "biru PDAM"
   Palet mengikuti identitas PDAM: biru tua (seragam dinas) + biru air + cyan
   tetes air + aksen emas tipis untuk penanda aktif/unggulan.
   Catatan: NAMA variabel dipertahankan (dipakai juga oleh app-android.css).
   ========================================================================== */
:root {
  --blue-deep: #052a4e;      /* biru tua PDAM (sidebar, judul) */
  --navy-900: #041f3b;
  --blue-800: #0a3f74;
  --blue-700: #0c5495;
  --blue-600: #0f6cbb;
  --blue: #1279cc;           /* biru utama tombol/tautan */
  --cyan: #0aa6c9;           /* cyan air */
  --cyan-light: #46cfe6;
  --gold: #f4b721;           /* aksen emas tipis */
  --gold-soft: #fff4d6;
  --ink: #0b2540;
  --muted: #58738f;
  --line: #d9e8f5;
  --bg: #eef6fc;
  --surface: #ffffff;
  --ok: #0d8a5f;
  --warn: #a9700a;
  --rose: #c0392b;
  --radius: 16px;
  --radius-sm: 12px;
  --ring: 0 0 0 3px rgba(18, 121, 204, .16);
  --shadow-sm: 0 1px 2px rgba(5, 42, 78, .06);
  --shadow: 0 1px 2px rgba(5, 42, 78, .05), 0 18px 34px -22px rgba(5, 42, 78, .35);
  --shadow-lg: 0 30px 60px -34px rgba(5, 42, 78, .5);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
/* Latar seluruh aplikasi: FOTO ASLI pegunungan bersalju + danau air jernih
   (public/bg-gunung-air.jpg — dipasang di SEMUA halaman; lihat catatan sumber di bawah).
   Gambar tidak diulang & selalu menutup layar; di atasnya ada selubung putih tipis supaya
   tulisan/kartu tetap jelas dibaca. Alamatnya relatif terhadap berkas CSS ini (bukan "/...")
   supaya tetap benar di bawah base path aplikasi.
   Sumber foto (bebas pakai, CC0): "Boat on Lake Louise" oleh April Portrais — Unsplash,
   tersedia di Wikimedia Commons: File:Boat on Lake Louise (Unsplash).jpg
   Bila gambarnya diganti: naikkan angka ?v= (gambar disajikan dengan max-age=3600). */
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 14.5px; line-height: 1.5; color: var(--ink);
  background-color: #dceffa;
  background-image:
    linear-gradient(180deg, rgba(238, 246, 252, .46) 0%, rgba(240, 249, 253, .24) 42%, rgba(240, 250, 254, .10) 100%),
    url("bg-gunung-air.jpg?v=2");
  background-repeat: no-repeat, no-repeat;
  background-size: cover, cover;
  background-position: center center, center center;
  background-attachment: fixed, fixed;
  -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(18, 121, 204, .18); color: var(--blue-deep); }
* { scrollbar-width: thin; scrollbar-color: #b7d4ea transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: #c3dcef; border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background: #9dc4e2; background-clip: content-box; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
p { margin: 0 0 10px; }
a { color: var(--blue-700); text-decoration: none; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
a.link { color: var(--blue-700); font-weight: 550; }
a.link:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: #e8f2fa; padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-family: ui-monospace, Menlo, monospace; word-break: break-word; }
.strong { font-weight: 650; }

/* ---------- kerangka ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 264px; flex: 0 0 264px; display: flex; flex-direction: column; gap: 18px;
  padding: 20px 15px 18px; color: #eaf4fb;
  /* biru seragam PDAM: navy tua → biru dinas → biru-air, dengan pendar cyan di atas */
  background-color: #062c52;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='264' height='120' viewBox='0 0 264 120'%3E%3Cpath d='M0 92c44-24 88-24 132 0s88 24 132 0v28H0z' fill='%23ffffff' fill-opacity='.05'/%3E%3Cpath d='M0 106c44-18 88-18 132 0s88 18 132 0v14H0z' fill='%23ffffff' fill-opacity='.04'/%3E%3C/svg%3E"),
    radial-gradient(420px 260px at 0% 0%, rgba(70, 207, 230, .28), transparent 68%),
    radial-gradient(360px 300px at 110% 88%, rgba(244, 183, 33, .16), transparent 70%),
    linear-gradient(178deg, #052a4e 0%, #0a3f74 46%, #0b5f86 78%, #0a7290 100%);
  background-repeat: no-repeat;
  background-position: left bottom, 0 0, 0 0, 0 0;
  background-size: 264px 120px, auto, auto, auto;
  box-shadow: 6px 0 40px -26px rgba(4, 31, 59, .95), inset -1px 0 0 rgba(255, 255, 255, .06);
  position: sticky; top: 0; align-self: flex-start; height: 100vh; overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 6px 16px; border-bottom: 1px solid rgba(255, 255, 255, .16); }
.brand-logo {
  display: grid; place-items: center; width: 44px; height: 44px; flex: 0 0 44px;
  border-radius: 14px; background: #fff;
  box-shadow: 0 12px 24px -14px rgba(0, 0, 0, .8), inset 0 0 0 1px rgba(255, 255, 255, .75);
}
.brand-logo img { display: block; width: 36px; height: 36px; border-radius: 9px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.22; min-width: 0; }
.brand-text strong { font-size: 14.5px; font-weight: 750; letter-spacing: .09em; color: #fff; }
.brand-text small { font-size: 10.5px; color: #a9cde3; letter-spacing: .02em; }
.nav { display: flex; flex-direction: column; gap: 16px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.nav-group { display: flex; flex-direction: column; gap: 3px; }
.nav-title {
  font-size: 9.8px; text-transform: uppercase; letter-spacing: .16em; color: #8fc2e2;
  padding: 0 11px 6px; font-weight: 700; display: flex; align-items: center; gap: 7px;
}
.nav-title::after { content: ""; flex: 1 1 auto; height: 1px; background: linear-gradient(90deg, rgba(255, 255, 255, .18), transparent); }
.nav-link {
  display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 11px;
  color: #d8e9f6; font-size: 13.5px; font-weight: 500;
  transition: background .16s, color .16s, transform .12s, box-shadow .16s;
}
.nav-link:hover { background: rgba(255, 255, 255, .12); color: #fff; transform: translateX(1px); }
.nav-link.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .07));
  color: #fff; font-weight: 650;
  box-shadow: inset 3px 0 0 var(--gold), 0 12px 22px -18px rgba(0, 0, 0, .9);
}
.nav-link .ic { flex: 0 0 auto; opacity: .95; color: #a7dff2; transition: color .16s; }
.nav-link:hover .ic, .nav-link.active .ic { color: #fff; }
.nav-kosong { display: flex; flex-direction: column; gap: 6px; }
.nav-kosong p {
  margin: 0; padding: 12px 12px; border-radius: 12px; font-size: 12.5px; line-height: 1.45;
  color: #b9d5e7; background: rgba(255, 255, 255, .07); border: 1px dashed rgba(255, 255, 255, .22);
}
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 13px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(4px);
}
.avatar {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #8ce7f4, #1e88d6); color: #04243f; font-weight: 750; font-size: 14px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, .28);
}
.user-meta { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1;
  padding-right: 10px; border-right: 1px solid rgba(255, 255, 255, .16); }
.user-meta strong { font-size: 12.8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { font-size: 10.5px; color: #a9cde3; }
.logout { margin-left: auto; color: #cfe4f2; display: flex; padding: 5px; border-radius: 8px; }
.logout:hover { background: rgba(255, 255, 255, .16); color: #fff; }
.chip-btn { color: #cfe4f2; display: flex; padding: 5px; border-radius: 8px; }
.chip-btn:hover, .chip-btn.active { background: rgba(255, 255, 255, .16); color: #fff; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px 32px 16px;
  /* sedikit lebih tembus pandang supaya langit/gunung latar terlihat di baliknya */
  background: linear-gradient(180deg, rgba(238, 246, 252, .78), rgba(238, 246, 252, .34));
  backdrop-filter: blur(10px) saturate(120%);
  border-bottom: 1px solid rgba(217, 232, 245, .85);
}
.topbar-title { display: flex; flex-direction: column; min-width: 0; position: relative; padding-left: 15px; }
/* garis aksen biru→cyan di kiri judul halaman (ciri khas PDAM) */
.topbar-title::before {
  content: ""; position: absolute; left: 0; top: 3px; bottom: 3px; width: 4px; border-radius: 999px;
  background: linear-gradient(180deg, var(--blue), var(--cyan-light));
  box-shadow: 0 6px 14px -8px rgba(10, 166, 201, .9);
}
.app-android .topbar-title { padding-left: 0; }
.app-android .topbar-title::before { display: none; }
.topbar-title h1 { font-size: 24px; font-weight: 750; letter-spacing: -.022em; color: var(--blue-deep); }
.topbar-title p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.topbar-right .today {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 12.5px; font-weight: 600; color: var(--blue-800);
  background: #fff; border: 1px solid #cfe4f4;
  padding: 7px 14px; border-radius: 999px; box-shadow: var(--shadow-sm); white-space: nowrap;
}
.topbar-right .today::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #8ce7f4, var(--cyan));
  box-shadow: 0 0 0 3px rgba(70, 207, 230, .22);
}
.content { padding: 20px 32px 32px; display: flex; flex-direction: column; gap: 22px; }
.foot { margin-top: auto; padding: 18px 32px 26px; color: #7d97b1; font-size: 11.5px; letter-spacing: .01em; }
.flash-wrap { margin-bottom: -4px; }

/* ---------- grid ---------- */
.grid { display: grid; gap: 22px; grid-template-columns: 1fr; }
.grid.g2 { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); }
.grid.g3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid.g4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.grid.g2-1 { grid-template-columns: 1.55fr 1fr; }
.grid.g3-1 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
@media (max-width: 1100px) { .grid.g2-1 { grid-template-columns: 1fr; } }

/* ---------- kartu ---------- */
.card {
  position: relative; background: var(--surface); border: 1px solid #dceaf7; border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; min-width: 0; overflow: hidden;
  background-image: linear-gradient(180deg, #ffffff, #fcfdff);
}
/* garis tipis biru→cyan di puncak kartu: mempertegas "kartu PDAM" tanpa menambah elemen */
.card::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 3px;
  background: linear-gradient(90deg, var(--blue-700), var(--cyan) 55%, var(--cyan-light));
  opacity: .55;
}
.card.highlight {
  border-color: #a9d2ea;
  box-shadow: 0 0 0 3px rgba(18, 121, 204, .10), var(--shadow);
}
@media (hover: hover) and (min-width: 901px) {
  .card { transition: box-shadow .18s, border-color .18s; }
  .card:hover { border-color: #c9e2f6; box-shadow: 0 1px 2px rgba(5, 42, 78, .05), 0 24px 46px -26px rgba(5, 42, 78, .4); }
}
.card.highlight::before { opacity: 1; }
.card.warn-card { border-color: #f0cfa5; background: #fffdf8; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.card-head h2 { font-size: 15.5px; font-weight: 700; color: var(--blue-deep); letter-spacing: -.012em; }
.card-sub { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }
.card-actions { display: flex; gap: 8px; flex: 0 0 auto; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 560px) {
  /* kartu dengan beberapa tombol tidak boleh meluber keluar layar ponsel */
  .card-head { flex-wrap: wrap; }
  .card-actions { flex: 1 1 auto; justify-content: flex-start; }
}
.card-body > *:last-child { margin-bottom: 0; }
.card-body > .table-wrap:first-child { margin-top: -4px; }
.card-foot-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- statistik ---------- */
.stat {
  display: flex; gap: 14px; align-items: flex-start; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px;
}
.stat-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; background: #e8f2fa; color: var(--blue); }
.stat-ic.teal { background: #e2f6f8; color: #0a7f96; }
.stat-ic.amber { background: #fdf2df; color: var(--warn); }
.stat-ic.rose { background: #fbe9e6; color: var(--rose); }
.stat-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat-label { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.stat-value { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; }
.stat-sub { font-size: 12px; color: var(--muted); }

/* ---------- tabel ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 11px 13px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--line); }
th {
  font-size: 10.3px; text-transform: uppercase; letter-spacing: .085em; color: #3d5f80;
  background-image: linear-gradient(180deg, #f2f9ff, #e5f2fd);
  font-weight: 750; white-space: nowrap; position: sticky; top: 0;
  border-bottom: 1px solid #d3e6f6;
}
thead tr:first-child th:first-child { border-top-left-radius: 10px; }
thead tr:first-child th:last-child { border-top-right-radius: 10px; }
tbody tr { transition: background .12s; }
tbody tr:hover { background: #f4fbff; }
tbody tr:last-child td { border-bottom: 0; }
tfoot td {
  border-top: 2px solid #bfdff5; border-bottom: 0; font-size: 12.5px; font-weight: 650;
  background-image: linear-gradient(180deg, #eef8ff, #e3f2fd); color: var(--blue-deep);
}
td.num, th.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
td.num { letter-spacing: -.01em; }
td.act, th.act { text-align: right; white-space: nowrap; }
th.cek, td.cek { width: 36px; text-align: center; }
td.empty {
  text-align: center; color: #6a849d; padding: 30px 14px; font-style: normal; font-size: 13px;
  background-image: radial-gradient(420px 120px at 50% 0%, rgba(18, 121, 204, .07), transparent 70%);
}
td .input { min-width: 92px; }
/* Teks dari berkas upload ditampilkan apa adanya: spasi ganda & baris baru dipertahankan */
.teks-asli { white-space: pre-wrap; word-break: break-word; display: inline-block; max-width: 34ch; vertical-align: top; }
@media (max-width: 900px) { .teks-asli { max-width: 22ch; } }
th.input-col { min-width: 120px; }

/* ---------- lencana & pill ---------- */
.badge {
  display: inline-block; padding: 3.5px 9.5px; border-radius: 999px; font-size: 11px; font-weight: 700;
  letter-spacing: .012em; background: #eaf1f7; color: #4a6478; white-space: nowrap;
  border: 1px solid rgba(5, 42, 78, .06);
}
.badge.ok { background: #e4f8ef; color: #0a6b49; border-color: #bfe8d6; }
.badge.warn { background: #fdf2dd; color: #8a5c06; border-color: #f2dfae; }
.badge.rose { background: #fdeceb; color: #a3301f; border-color: #f5cdc7; }
.badge.info { background: #e7f2fe; color: var(--blue-700); border-color: #c9e2f8; }
.badge.muted { background: #eef3f8; color: #5c7488; border-color: #e0e9f1; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 8px; font-size: 11.5px; font-weight: 700; background: #edf3f9; color: #46617a; border: 1px solid rgba(5, 42, 78, .05); }
.pill.ok { background: #e2f5ec; color: var(--ok); }
.pill.warn { background: #fdf1dc; color: var(--warn); }
.pill.rose { background: #fbe9e6; color: var(--rose); }
.badge-row { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.kolom-lista { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.kolom-lista .pill { background: #eef6fc; color: var(--blue-800); }
.catatan { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 7px; font-size: 13px; color: #33506e; }
.catatan li::marker { color: var(--warn); }
.galat-box { margin-top: 14px; border: 1px solid #f3c9c2; background: #fdeeec; border-radius: 12px; padding: 12px 15px; }
.galat-box summary { cursor: pointer; font-size: 13px; font-weight: 650; color: #9c2f22; }
.galat-box .catatan { margin-top: 10px; max-height: 220px; overflow-y: auto; }
.opsi { margin-top: 16px; grid-template-columns: 1fr; }
label.cek {
  display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: #f8fbfe; font-size: 13px;
}
label.cek:hover { border-color: #a9d2ea; background: #f1f9fd; }
label.cek input { margin-top: 3px; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--blue); }
label.cek span { display: block; min-width: 0; }
input[type="file"].input { padding: 9px 12px; background: #f8fbfe; cursor: pointer; }
input[type="file"].input::file-selector-button {
  font: inherit; font-size: 12.5px; font-weight: 600; margin-right: 12px; padding: 6px 12px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--blue-800); cursor: pointer;
}

/* ---------- tombol & form ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9.5px 16px; border-radius: 11px; border: 1px solid transparent; cursor: pointer;
  font: inherit; font-size: 13.5px; font-weight: 650;
  transition: transform .12s, box-shadow .16s, background .16s, border-color .16s;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background-image: linear-gradient(135deg, #0c5495, #1279cc 46%, #12a6cd);
  color: #fff; border-color: rgba(4, 31, 59, .18);
  box-shadow: 0 10px 20px -12px rgba(15, 108, 187, .95), inset 0 1px 0 rgba(255, 255, 255, .26);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 16px 26px -12px rgba(15, 108, 187, 1), inset 0 1px 0 rgba(255, 255, 255, .3); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost { background: #fff; border-color: #cfe3f3; color: var(--blue-800); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { background: #f2faff; border-color: #a9d2ea; color: var(--blue-700); }
/* tombol aksen emas (opsional, sewarna aksen aktif sidebar) */
.btn-gold { background: linear-gradient(135deg, #f7c53f, #e9a304); color: #4a3200; border-color: #dc9c04; font-weight: 700; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label { font-size: 12.5px; font-weight: 600; color: #44618a; }
.field .req { color: var(--rose); }
.input {
  width: 100%; padding: 9.5px 12px; border: 1px solid #cfe3f3; border-radius: 11px;
  font: inherit; font-size: 13.5px; color: var(--ink); background: #fbfdff; transition: border-color .15s, box-shadow .15s;
}
.input:focus { outline: none; border-color: var(--blue); box-shadow: var(--ring); background: #fff; }
.input:disabled { background: #f1f5f9; color: #8298ab; }
textarea.input { resize: vertical; min-height: 62px; }
select.input { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%235c7794' stroke-width='2.2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 11px center; padding-right: 32px; }
.num-input { text-align: right; }
.hint { color: var(--muted); font-size: 11.5px; }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.form-actions.wide { grid-column: 1 / -1; }
.form-actions.sticky {
  position: sticky; bottom: 0; background: rgba(255, 255, 255, .92); backdrop-filter: blur(8px);
  border-top: 1px solid var(--line); padding: 13px 0 4px; margin-top: 14px; justify-content: space-between;
}
/* halaman berpindah (pager) pada daftar data */
.pager { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; justify-content: center; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.pg {
  display: inline-flex; align-items: center; justify-content: center; min-width: 38px; padding: 7px 11px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--blue-800);
  font-size: 12.8px; font-weight: 600; box-shadow: var(--shadow-sm);
}
.pg:hover { background: #f1f9fd; border-color: #b6d5ea; }
.pg.aktif { background: linear-gradient(135deg, var(--blue), var(--cyan)); border-color: transparent; color: #fff; }
.pg-sep { color: var(--muted); font-size: 12.5px; padding: 0 2px; }

/* ---------- penagihan lapangan: kamera, foto, GPS ---------- */
.card[id] { scroll-margin-top: 12px; }
.ringkas-tagih {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px;
  margin-bottom: 18px; padding: 15px 17px; border-radius: 15px;
  background-image:
    radial-gradient(320px 120px at 100% 0%, rgba(70, 207, 230, .18), transparent 70%),
    linear-gradient(135deg, #f1faff, #e6f5fb);
  border: 1px solid #c6e5f2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.ringkas-tagih > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
/* dua pilihan tindakan saat menekan Tagih */
.pilihan-tindakan { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.pilihan {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: 14px;
  border: 1px solid var(--line); background: #f8fbfe; color: var(--ink); transition: border-color .15s, background .15s, transform .12s;
}
.pilihan:hover { border-color: #a9d2ea; background: #f1f9fd; transform: translateY(-1px); }
.pilihan.aktif { border-color: var(--blue); background: #eef7fd; box-shadow: var(--ring); }
.pilihan-ic { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 12px; display: grid; place-items: center; background: #e8f2fa; color: var(--blue); }
.pilihan-ic.bahaya { background: #fbe9e6; color: var(--rose); }
/* Penutupan kran (tindakan ke-3): warna kuning-oranye supaya beda dari penagihan (biru)
   dan penutupan water meter (merah). */
.pilihan-ic.kran { background: #fff5e3; color: #b8720e; }
.pilihan-teks { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pilihan-teks strong { font-size: 14.5px; }
.pilihan-teks small { color: var(--muted); font-size: 12.3px; line-height: 1.45; }
@media (max-width: 520px) { .pilihan-tindakan { grid-template-columns: 1fr; } }
.ringkas-tagih span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 650; }
.ringkas-tagih strong { font-size: 18px; color: var(--blue-deep); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.ringkas-tagih strong.teks-asli { font-size: 13.5px; }
.sembunyi { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.blok-meter, .blok-penagihan, .blok-lokasi, .blok-foto, .riwayat-kunjungan {
  margin-top: 20px; padding: 16px 18px; border: 1px solid #dcebf7; border-radius: 15px;
  background: linear-gradient(180deg, #f9fcff, #f3faff);
}
.blok-judul {
  display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
  margin-bottom: 8px; color: var(--blue-800); letter-spacing: -.008em;
}
.blok-judul .ic { color: var(--cyan); }
.blok-judul .ic { flex: 0 0 auto; }
/* pemilih menu pengguna (halaman Tambah User / Atur Menu) */
.pilih-menu { margin-top: 10px; display: flex; flex-direction: column; gap: 18px; }
.pilih-menu[hidden] { display: none; }
.menu-grup { display: flex; flex-direction: column; gap: 10px; }
.menu-grup-judul {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700;
}
.menu-daftar { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.menu-pil {
  display: flex; align-items: flex-start; gap: 10px; padding: 11px 13px; cursor: pointer;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow-sm);
}
.menu-pil:hover { border-color: #a9d2ea; background: #f4fbfe; }
.menu-pil input { margin: 2px 0 0; flex: 0 0 auto; width: 16px; height: 16px; accent-color: var(--blue); }
.menu-pil-teks { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.menu-pil-teks strong { font-size: 13.4px; font-weight: 600; color: var(--ink); }
.menu-pil-teks small { font-size: 11.4px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; overflow-wrap: anywhere; }
.menu-pil.wajib { background: #eef7fd; border-color: #bcdcef; }
.menu-pil.wajib input { cursor: not-allowed; }
.cek-baris { display: flex; align-items: center; gap: 9px; font-size: 13.5px; }
.cek-baris input { width: 16px; height: 16px; accent-color: var(--blue); }
@media (max-width: 520px) { .menu-daftar { grid-template-columns: 1fr; } }
.total-terpilih { margin: 12px 0 0; font-size: 13.5px; }
.foto-tombol { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; }
.foto-kartu { position: relative; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: #fff; }
.foto-kartu img { display: block; width: 100%; height: 92px; object-fit: cover; }
.foto-nama { display: block; padding: 4px 6px; font-size: 10.5px; color: var(--muted); text-align: center; }
.foto-hapus {
  position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border: 0; border-radius: 50%;
  background: rgba(14, 43, 71, .72); color: #fff; font-size: 15px; line-height: 1; cursor: pointer;
}
.foto-hapus:hover { background: var(--rose); }
.foto-galeri { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; }
.foto-item { display: block; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.foto-item img { display: block; width: 100%; height: 150px; object-fit: cover; }
.foto-meta { display: block; padding: 6px 9px; font-size: 11px; color: var(--muted); }
.foto-mini { width: 54px; height: 42px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); display: block; }
.gps-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); margin-bottom: 12px; }
.gps-ok { color: var(--ok); }
.gps-gagal { color: var(--rose); }
.gps-teks { font-weight: 600; }
/* daftar kegiatan (dashboard team penagihan lapangan) */
.daftar-kegiatan { display: flex; flex-direction: column; gap: 12px; }
.kegiatan {
  display: flex; align-items: center; gap: 14px; padding: 12px 14px; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 12px; background: #fff; transition: border-color .15s, background .15s;
}
.kegiatan:hover { border-color: #a9d2ea; background: #f1f9fd; }
.kegiatan-ic { flex: 0 0 38px; width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; background: #e8f2fa; color: var(--blue); }
.kegiatan-ic.bahaya { background: #fbe9e6; color: var(--rose); }
.kegiatan-teks { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
.kegiatan-teks strong { font-size: 14px; }
.kegiatan-teks small { color: var(--muted); font-size: 12.2px; }
.kegiatan-kanan { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; text-align: right; }
@media (max-width: 560px) { .kegiatan { align-items: flex-start; } .kegiatan-kanan { text-align: right; } }

/* satu menu "Laporan" — dua laporan dipisah lewat tab di dalam halaman */
.tab-laporan { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.tab-laporan .tab {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; text-decoration: none; color: inherit;
  border: 1px solid var(--line); border-radius: 14px; background: #fff; transition: border-color .15s, background .15s;
}
.tab-laporan .tab:hover { border-color: #a9d2ea; background: #f1f9fd; }
.tab-laporan .tab.aktif { border-color: var(--blue); background: #eef7fd; box-shadow: var(--ring); }
.tab-laporan .tab .ic { flex: 0 0 auto; color: var(--blue); }
.tab-laporan .tab-teks { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.tab-laporan .tab-teks strong { font-size: 14.5px; }
.tab-laporan .tab-teks small { color: var(--muted); font-size: 12.3px; line-height: 1.4; }
@media (max-width: 520px) { .tab-laporan { grid-template-columns: 1fr; } }

.export-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 4px; }
@media (max-width: 520px) {
  .foto-grid { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .foto-kartu img { height: 76px; }
  .foto-galeri { grid-template-columns: 1fr 1fr; }
  .foto-item img { height: 110px; }
  .foto-tombol .btn { flex: 1 1 100%; }
}
.filter-bar {
  display: flex; align-items: flex-end; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; padding: 14px;
  background-image: linear-gradient(180deg, #f8fcff, #f1f9fe);
  border: 1px solid #dcebf7; border-radius: 13px;
}
.filter-bar .field { min-width: 150px; }
.filter-bar .field.grow { flex: 1 1 220px; }
.filter-bar .btn { margin-bottom: 1px; }
.total-box { font-size: 13px; color: var(--muted); align-self: center; }
.total-line { margin-top: 12px; text-align: right; font-size: 14px; }

/* ---------- notifikasi ---------- */
.alert {
  display: flex; gap: 10px; align-items: flex-start; padding: 12px 15px; border-radius: 13px;
  font-size: 13.5px; border: 1px solid #cfe4f4; color: var(--blue-800);
  background-image: linear-gradient(180deg, #f6fcff, #eef8fe);
  box-shadow: inset 3px 0 0 rgba(18, 121, 204, .35);
}
.alert .ic { flex: 0 0 auto; margin-top: 1px; }
.alert.ok { background-image: linear-gradient(180deg, #f0fbf6, #e6f8ef); border-color: #bfe6d4; color: #0a6b49; box-shadow: inset 3px 0 0 #12a26b; }
.alert.err { background-image: linear-gradient(180deg, #fef3f1, #fdeceb); border-color: #f3c9c2; color: #9c2f22; box-shadow: inset 3px 0 0 #d0553f; }
.alert.warn { background-image: linear-gradient(180deg, #fff9ec, #fdf3e0); border-color: #f0d9ac; color: #8a5907; box-shadow: inset 3px 0 0 var(--gold); }
.alert.info { background-image: linear-gradient(180deg, #f4fbff, #ecf7fe); border-color: #c7e1f2; box-shadow: inset 3px 0 0 var(--cyan); }

/* ---------- daftar definisi ---------- */
.kv { display: flex; flex-direction: column; gap: 0; margin: 0; }
.kv > div { display: flex; gap: 14px; padding: 10px 0; border-bottom: 1px dashed #e3eef8; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { flex: 0 0 152px; color: #647e97; font-size: 12.5px; font-weight: 600; letter-spacing: .01em; }
.kv dd { margin: 0; flex: 1; font-size: 13.5px; word-break: break-word; }
.steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 10px; font-size: 13.2px; color: #33506e; }
.steps li::marker { color: var(--blue); font-weight: 700; }

/* ---------- grafik ---------- */
.chart { display: flex; align-items: flex-end; gap: 12px; height: 186px; padding-top: 22px; }
.chart-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 7px; min-width: 0; }
.chart-bar {
  width: 100%; max-width: 62px; border-radius: 10px 10px 5px 5px;
  background-image: linear-gradient(180deg, #7ee3f2, #22b7d6 46%, #0f6cbb);
  box-shadow: 0 10px 18px -14px rgba(15, 108, 187, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
  transition: filter .15s;
}
.chart-col:hover .chart-bar { filter: brightness(1.08); }
.chart-val { font-size: 11.5px; font-weight: 650; color: var(--blue-800); white-space: nowrap; }
.chart-lbl { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.chart-block { margin-top: 20px; border-top: 1px solid var(--line); }
.hbars { display: flex; flex-direction: column; gap: 14px; }
.hbar-top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.8px; margin-bottom: 6px; }
.hbar-top span { color: #33506e; }
.hbar-track { height: 10px; background: #e9f2fa; border-radius: 999px; overflow: hidden; box-shadow: inset 0 1px 2px rgba(5, 42, 78, .06); }
.hbar-fill { height: 100%; border-radius: 999px; background-image: linear-gradient(90deg, #0f6cbb, #12a6cd 70%, #46cfe6); }
.hbar-fill.teal { background: linear-gradient(90deg, #0f8a9e, var(--cyan-light)); }
.progress { height: 11px; border-radius: 999px; background: #eaf2f9; overflow: hidden; margin-bottom: 12px; }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--blue), var(--cyan-light)); }

/* ---------- kuitansi ---------- */
.receipt-wrap { display: flex; flex-direction: column; align-items: center; gap: 18px; }
/* kop surat resmi di atas kuitansi (satu sumber: ui.kopSurat) */
.receipt-kop { width: 100%; max-width: 560px; }
.receipt {
  position: relative; width: 100%; max-width: 560px; background: #fff; border: 1px solid #dceaf7;
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px 28px; overflow: hidden;
}
.receipt::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px;
  background-image: linear-gradient(90deg, var(--blue-700), var(--cyan) 55%, var(--cyan-light));
}
.receipt-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; padding-bottom: 16px; border-bottom: 2px solid var(--blue-800); }
.receipt-tag { font-size: 17px; font-weight: 750; letter-spacing: .16em; color: var(--blue-800); }
.receipt-no { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--muted); padding: 11px 0; border-bottom: 1px dashed var(--line); }
.receipt-rows { padding: 6px 0; }
.receipt-rows .row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; font-size: 13.2px; border-bottom: 1px dashed #eef4f9; }
.receipt-rows .row:last-child { border-bottom: 0; }
.receipt-rows .row > span:first-child { color: var(--muted); }
.receipt-rows .row > span:last-child { font-weight: 550; text-align: right; }
.receipt-total { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 14px; padding: 14px 16px; border-radius: 12px; background: linear-gradient(135deg, #eef8fd, #e4f4f9); border: 1px solid #cbe6f0; }
.receipt-total span { font-size: 11.5px; letter-spacing: .09em; color: var(--blue-800); font-weight: 650; }
.receipt-total strong { font-size: 21px; color: var(--blue-deep); }
.receipt-note { display: flex; align-items: center; gap: 9px; margin-top: 14px; }
.receipt-sign { display: flex; justify-content: space-between; margin-top: 26px; padding-top: 14px; border-top: 1px dashed var(--line); }
.receipt-sign div { display: flex; flex-direction: column; gap: 22px; min-width: 140px; }
.receipt-sign small { color: var(--muted); font-size: 11.5px; }
.receipt-sign strong { font-size: 13px; border-top: 1px solid #9fb6c9; padding-top: 5px; }
.receipt-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* ---------- halaman masuk (SANGAT RINGKAS) ---------- */
/* Permintaan pemilik aplikasi 2026-10: "Menu masuk cukup username dan password dengan logo
   PDAM jangan ada yang lain lagi" → hanya logo + dua kolom isian + tombol Masuk.
   Gaya panel kiri/daftar fitur/kotak akun contoh sudah DIHAPUS; jangan dihidupkan lagi. */
body.bare {
  display: grid; place-items: center; min-height: 100vh; padding: 26px 18px;
  /* Halaman masuk: foto yang sama, tetapi diberi selubung biru tua supaya kartu putih
     (logo + kolom isian) tetap menonjol. Gunung & air jernih masih terlihat di baliknya. */
  background-color: #052a4e;
  background-image:
    linear-gradient(170deg, rgba(4, 31, 59, .58) 0%, rgba(6, 55, 100, .36) 46%, rgba(8, 84, 122, .20) 100%),
    radial-gradient(720px 520px at 50% 108%, rgba(70, 207, 230, .20), transparent 68%),
    url("bg-gunung-air.jpg?v=2");
  background-repeat: no-repeat, no-repeat, no-repeat;
  background-size: cover, cover, cover;
  background-position: center center, center center, center center;
  background-attachment: fixed, fixed, fixed;
}
.login-ringkas {
  position: relative; width: 100%; max-width: 372px; display: flex; flex-direction: column; align-items: center;
  gap: 22px; padding: 34px 30px 30px; background: #fff; border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, .6);
  box-shadow: 0 40px 80px -38px rgba(0, 0, 0, .75), 0 2px 0 rgba(255, 255, 255, .5) inset;
}
/* garis biru→cyan di puncak kartu masuk */
.login-ringkas::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 4px; border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, var(--blue-700), var(--cyan) 55%, var(--cyan-light));
}
.login-logo {
  display: block; width: 112px; height: 112px; border-radius: 26px;
  box-shadow: 0 16px 34px -16px rgba(5, 42, 78, .7);
}
.login-ringkas .login-form { width: 100%; display: flex; flex-direction: column; gap: 15px; margin: 0; }
.login-ringkas .alert { width: 100%; }
@media (max-width: 420px) {
  .login-ringkas { padding: 26px 20px 22px; gap: 18px; }
  .login-logo { width: 92px; height: 92px; border-radius: 22px; }
}

/* Di layar kecil dipakai berkas gambar yang lebih ringan (74 KB vs 245 KB) supaya
   halaman cepat terbuka di HP tanpa sinyal bagus. Tampilannya sama, hanya lebih kecil. */
@media (max-width: 900px) {
  body {
    background-image:
      linear-gradient(180deg, rgba(238, 246, 252, .46) 0%, rgba(240, 249, 253, .24) 42%, rgba(240, 250, 254, .10) 100%),
      url("bg-gunung-air-hp.jpg?v=2");
  }
  body.bare {
    background-image:
      linear-gradient(170deg, rgba(4, 31, 59, .58) 0%, rgba(6, 55, 100, .36) 46%, rgba(8, 84, 122, .20) 100%),
      radial-gradient(720px 520px at 50% 108%, rgba(70, 207, 230, .20), transparent 68%),
      url("bg-gunung-air-hp.jpg?v=2");
  }
}

/* ---------- responsif ---------- */
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; flex: 0 0 auto; padding: 16px 14px; gap: 14px;
    position: static; height: auto; overflow: visible; }
  .brand { padding: 0 4px 12px; }
  .nav { flex-direction: row; gap: 14px; overflow-x: auto; padding-bottom: 4px; flex: 0 0 auto; }
  .nav-group { flex-direction: row; gap: 6px; align-items: center; }
  .nav-title { display: none; }
  .nav-link { white-space: nowrap; padding: 8px 12px; }
  .nav-link.active { box-shadow: inset 0 -2px 0 var(--cyan-light); }
  .side-foot { border-top: 0; padding-top: 0; flex-direction: row; align-items: center; gap: 12px; }
  .user-chip { flex: 1; }
  .topbar { padding: 18px 18px 12px; flex-direction: column; align-items: flex-start; gap: 10px; }
  .topbar-title { padding-left: 13px; }
  .nav-link:hover { transform: none; }
  .topbar-title h1 { font-size: 21px; }
  .content { padding: 0 18px 26px; gap: 18px; }
  .grid { gap: 16px; }
  .card { padding: 18px; }
  .foot { padding: 16px 18px 22px; }
  .kv dt { flex: 0 0 120px; }
  .chart { height: 160px; gap: 8px; }
  .chart-val { font-size: 10.5px; }
  .form-actions { justify-content: stretch; }
  .form-actions .btn { flex: 1 1 auto; }
}

/* ---------- tombol aksi per baris (Detail + Hapus) ---------- */
.aksi-baris { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.aksi-baris form { margin: 0; display: inline-flex; }
.btn-hapus {
  background: #fdeeec; color: #9c2f22; border: 1px solid #f3c9c2;
}
.btn-hapus:hover { background: #fbdcd6; }
.btn-hapus:disabled { opacity: .6; cursor: wait; }
/* tombol hapus di luar tabel (mis. halaman Daftar Rekap) */
.form-inline { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
/* garis pemisah di dalam kartu (mis. antara "Simpan perubahan" dan "Hapus akun") */
hr.pemisah { border: none; border-top: 1px solid #e3e9f0; margin: 18px 0 14px; }

/* ---------- Zoom Meeting (routes/zoom.js) ----------
   Satu ruang rapat bersama untuk semua akun: judul besar, waktu, penanda "Sedang berlangsung" /
   "Hari ini", dan tombol "Gabung Zoom" yang menonjol. Permintaan pemilik aplikasi 2026-10. */
.zoom-kartu .card-body { display: flex; flex-direction: column; gap: 18px; }
.zoom-kepala {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 18px; padding: 18px 20px; border-radius: 16px;
  background-image:
    radial-gradient(340px 140px at 100% 0%, rgba(70, 207, 230, .22), transparent 70%),
    linear-gradient(135deg, #f1faff, #e6f5fb);
  border: 1px solid #c6e5f2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .8);
}
.zoom-info { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1 1 260px; }
.zoom-penanda { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.zoom-waktu {
  margin: 0; font-size: 15px; line-height: 1.4; font-weight: 650; color: #123a5e;
  font-variant-numeric: tabular-nums;
}
.btn-gabung {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 9px;
  padding: 15px 26px; font-size: 16.5px; font-weight: 700; border-radius: 999px;
  box-shadow: 0 14px 26px -14px rgba(12, 84, 149, .95), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.btn-gabung:hover { transform: translateY(-1px); }
.zoom-rincian { margin: 0; }
@media (max-width: 640px) {
  .zoom-kepala { flex-direction: column; align-items: stretch; }
  .btn-gabung { justify-content: center; width: 100%; padding: 14px 20px; font-size: 15.5px; }
}

/* ---------- notifikasi pendapatan (tulisan + bunyi "ding" 2×) ----------
   Dipakai public/notifikasi.js: saat petugas menyimpan setoran & saat admin membuka
   Dashboard Penagihan. Kartu muncul di kanan bawah (ponsel: tengah bawah), tidak menutupi
   isi halaman, dan hilang sendiri setelah 12 detik. */
.notif-wadah {
  position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex;
  flex-direction: column; gap: 10px; max-width: min(360px, calc(100vw - 28px));
}
.notif {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid #bfe6d4; border-left: 4px solid #12a26b;
  border-radius: 14px; padding: 12px 13px; box-shadow: 0 12px 30px -14px rgba(9, 44, 78, .5);
  animation: notif-masuk .18s ease-out;
}
@keyframes notif-masuk { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.notif-ic { font-size: 17px; line-height: 1.15; flex: 0 0 auto; }
.notif-isi { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1 1 auto; }
.notif-isi strong { color: #0c6b4a; font-size: 13.5px; line-height: 1.3; }
.notif-sub { color: var(--muted); font-size: 11.5px; line-height: 1.35; }
.notif-lihat {
  flex: 0 0 auto; align-self: center; font-size: 12px; font-weight: 600;
  color: var(--blue-700); text-decoration: none; padding: 4px 2px;
}
.notif-tutup {
  flex: 0 0 auto; align-self: flex-start; border: 0; background: transparent; cursor: pointer;
  color: #8aa0b4; font-size: 17px; line-height: 1; padding: 0 2px;
}
.notif-tutup:hover { color: var(--blue-800); }
.notif-suara {
  position: fixed; right: 18px; bottom: 18px; z-index: 91;
  display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  background: #fff8e6; color: #7a5b12; border: 1px solid #f2dca6; border-radius: 999px;
  padding: 9px 15px; font: inherit; font-size: 12.5px; font-weight: 700;
  box-shadow: 0 8px 20px -12px rgba(9, 44, 78, .5);
}
.notif-suara:hover { background: #fdf1d6; }
/* tombol "Bunyikan" DI DALAM kartu notifikasi (bunyi belum diizinkan peramban) */
.notif-bunyi {
  align-self: flex-start; margin-top: 5px; cursor: pointer;
  background: #fff8e6; color: #7a5b12; border: 1px solid #f2dca6; border-radius: 999px;
  padding: 5px 11px; font: inherit; font-size: 11.5px; font-weight: 700;
}
.notif-bunyi:hover { background: #fdf1d6; }
@media (max-width: 640px) {
  .notif-wadah { right: 10px; left: 10px; bottom: 10px; max-width: none; }
  .notif { padding: 11px 12px; }
  /* tombol izin bunyi dipindah ke ATAS kartu notifikasi supaya tidak menutupinya */
  .notif-suara { right: 10px; left: 10px; bottom: auto; top: 10px; justify-content: center; }
}
/* ---------- RAPAT VIDEO (v25) ----------
   Panggilan kamera+mikrofon di dalam aplikasi (khusus Bagian Keuangan).
   Permintaan pemilik aplikasi 2026-10: *"bikin aplikasi seperti kayak zoom meteeng husus buak
   para akun keuangan"*. Gaya di sini hanya tampilan — jalur panggilannya di public/rapat.js. */
.rapat-kode { font-size: 12.5px; color: var(--muted); background: #eef6fc; border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; }
.rapat-kartu .card-body { display: flex; flex-direction: column; gap: 14px; }
.rapat { display: flex; flex-direction: column; gap: 14px; }
.rapat-status { font-size: 13px; color: var(--muted); background: #f4f9fe; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.rapat-status.ok { color: #0a6b4a; background: #ecfaf3; border-color: #b7e6d2; }
.rapat-status.awas { color: #8a4b00; background: #fff6e6; border-color: #f3d9a8; }
/* Kisi peserta: 1 kolom di HP, 2–3 kolom di layar lebar. */
.rapat-video { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .rapat-video { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .rapat-video { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.rapat-kotak {
  position: relative; background: #06233c; border-radius: 14px; overflow: hidden;
  aspect-ratio: 4 / 3; box-shadow: 0 10px 22px rgba(5, 42, 78, .18);
}
.rapat-kotak video { width: 100%; height: 100%; object-fit: cover; display: block; background: #06233c; }
.rapat-kotak video.cermin { transform: scaleX(-1); }
.rapat-kotak.sendiri { outline: 2px solid var(--cyan-light); outline-offset: -2px; }
.rapat-nama {
  position: absolute; left: 8px; bottom: 8px; max-width: calc(100% - 16px);
  background: rgba(4, 24, 41, .72); color: #fff; font-size: 12px; padding: 4px 10px;
  border-radius: 999px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rapat-kendali { display: flex; flex-wrap: wrap; gap: 10px; }
.rapat-kendali .btn { white-space: normal; }
@media (max-width: 560px) {
  .rapat-kendali .btn { flex: 1 1 100%; justify-content: center; }
  .rapat-kotak { aspect-ratio: 3 / 4; }
}

@media print { .notif-wadah, .notif-suara { display: none !important; } }

/* ---------- dokumen cetak (Cetak Rekap Lapangan) ---------- */
.cetak-halaman { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-bottom: 22px; }
/* KOP SURAT resmi semua dokumen cetak — satu sumber: ui.kopSurat().
   Bentuk mengikuti CONTOH KOP SURAT RESMI Perumda Cabang Cilawu: lambang di kiri, lalu di tengah
   PEMERINTAH KABUPATEN GARUT / PERUSAHAAN UMUM DAERAH AIR MINUM / CABANG CILAWU / alamat, dan
   garis tebal di bawah. Blok kanan (judul/sub dokumen) hanya pada dokumen yang memerlukannya. */
/* Kop surat TANPA gambar/logo (permintaan pemilik aplikasi 2026-10-20: logo hasil gambar ulang
 * tidak pernah sama dengan aslinya, jadi cukup teks + garis tebal). Teks di tengah. */
.cetak-kop { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; padding-bottom: 10px; border-bottom: 3px solid var(--ink); margin-bottom: 16px; }
.cetak-kop-teks { flex: 1 1 auto; min-width: 0; text-align: center; line-height: 1.38; }
/* baris paling atas kop: PEMERINTAH KABUPATEN GARUT (lebih kecil dari nama perumda) */
.cetak-kop-teks .kop-pemerintah { display: block; font-size: 12.5px; font-weight: 700; letter-spacing: .08em; color: var(--blue-deep); margin-bottom: 1px; }
.cetak-kop-teks strong { display: block; font-size: 16px; letter-spacing: .02em; color: var(--ink); }
.cetak-kop-teks .kop-cabang { letter-spacing: .06em; }
.cetak-kop-teks .kop-alamat { display: block; font-size: 12px; font-weight: 500; color: #33506e; margin-top: 2px; }
.cetak-kop-kanan { flex: 0 0 auto; text-align: right; max-width: 34%; }
.cetak-kop-kanan small { color: var(--muted); font-size: 11.5px; }
.cetak-kop-kanan strong { display: block; font-size: 14px; color: var(--blue-deep); letter-spacing: .04em; }
.cetak-ket { font-size: 12.5px; margin: 0 0 12px; color: #33506e; }
.cetak-catatan { font-size: 12px; color: #5c7794; margin: 12px 0 18px; line-height: 1.5; }
.cetak-ttd { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px; margin-top: 26px; }
.cetak-ttd > div { display: flex; flex-direction: column; align-items: center; gap: 6px; flex: 1 1 140px; min-width: 0; max-width: 220px; }
.cetak-ttd small { color: var(--muted); font-size: 11.5px; }
.cetak-garis { display: block; width: 100%; height: 54px; border-bottom: 1px solid #9fb6c9; }
table.cetak-tabel { font-size: 11.5px; }
table.cetak-tabel th, table.cetak-tabel td { padding: 5px 7px; }
table.cetak-tabel tbody tr:last-child { background: #f3f9fd; }
.cetak-tabel td .teks-asli { max-width: 26ch; }

/* ---------- LAMPIRAN DAFTAR REDUKSI (routes/reduksi.js — dokumen cetak per bulan) ----------
   Mengikuti contoh lampiran resmi cabang: judul + CABANG CILAWU + BULAN, tabel dua baris judul
   (Sebelumnya / Hasil Reduksi / Selisih, masing-masing Uang Air + Total), baris JUMLAH, dan
   dua kolom tanda tangan. */
.rd-kepala { text-align: center; margin: 0 0 12px; }
.rd-judul { font-size: 15px; font-weight: 800; letter-spacing: .08em; color: var(--blue-deep); margin: 0 0 3px; text-transform: uppercase; }
.rd-cabang { font-size: 12.5px; font-weight: 700; letter-spacing: .06em; color: #33506e; margin: 0; }
.rd-bulan { font-size: 12.5px; font-weight: 700; letter-spacing: .04em; color: var(--ink); margin: 3px 0 0; }
table.rd-tabel { font-size: 11px; }
table.rd-tabel th { text-align: center; vertical-align: middle; }
table.rd-tabel th, table.rd-tabel td { padding: 4px 6px; }
table.rd-tabel tbody td.num, table.rd-tabel tfoot td.num { text-align: right; }
table.rd-tabel td.rd-no, table.rd-tabel th.rd-no { width: 34px; text-align: center; }
table.rd-tabel tfoot td { border-top: 2px solid #cfe3f0; background: #f7fbfe; }

/* ---------- BERITA ACARA PENUTUPAN WATER METER (kertas A4 tegak) ---------- */
.ba-judul { text-align: center; font-size: 15.5px; letter-spacing: .06em; margin: 0 0 2px; color: #0b2540; text-decoration: underline; }
.ba-nomor { text-align: center; font-size: 12.5px; margin: 0 0 18px; color: #33506e; }
.ba-para { font-size: 12.8px; line-height: 1.75; margin: 0 0 12px; color: #17324d; }
.ba-sub { font-size: 12.5px; margin: 16px 0 6px; color: #0b2540; letter-spacing: .02em; }
.ba-data { margin: 0 0 6px; font-size: 12.8px; }
.ba-baris { display: flex; gap: 6px; padding: 2px 0 2px 18px; line-height: 1.6; }
.ba-label { flex: 0 0 210px; color: #33506e; }
.ba-titik { flex: 0 0 auto; }
.ba-nilai { flex: 1 1 auto; min-width: 0; color: #17324d; }
.ba-foto { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 4px; }
.ba-foto figure { margin: 0; width: 148px; }
.ba-foto img { width: 100%; height: 108px; object-fit: cover; border: 1px solid var(--line); border-radius: 6px; }
.ba-foto figcaption { font-size: 10.5px; color: #5c7794; text-align: center; padding-top: 2px; }
.ba-ttd { margin-top: 34px; }

/* ---------- tanda terima titipan (menu Catatan Titipan) ---------- */
.tt-judul { font-size: 15px; letter-spacing: .04em; text-align: center; margin: 4px 0 2px;
  text-decoration: underline; text-underline-offset: 3px; }
.tt-nomor { text-align: center; font-size: 12px; color: #33506e; margin: 0 0 12px; }
.tt-para { font-size: 13px; line-height: 1.6; margin: 0 0 10px; }

/* kertas TEGAK untuk berita acara (named page; bila peramban tidak mendukung, ikut ukuran global) */
@page berita-acara { size: A4 portrait; margin: 15mm 18mm; }

/* kertas TEGAK juga untuk KUITANSI (kop 4 baris + rincian + tanda tangan tidak muat
 * satu halaman bila ikut kertas mendatar milik Cetak Rekap Lapangan). */
@page kuitansi { size: A4 portrait; margin: 15mm 18mm; }
/* kertas TEGAK untuk TANDA TERIMA TITIPAN (routes/titipan.js — catatan cicilan tagihan air). */
@page titipan { size: A4 portrait; margin: 15mm 18mm; }

@media print {
  .cetak-berita { page: berita-acara; page-break-after: auto; }
  .receipt-wrap { page: kuitansi; }
  .cetak-tt { page: titipan; }
  .receipt-kop .cetak-kop { margin-bottom: 8px; }
  .cetak-berita .cetak-kop-teks strong { font-size: 14px; }
  .cetak-berita .cetak-kop-teks .kop-pemerintah { font-size: 11px; }
  .cetak-berita .ba-label { flex-basis: 180px; }
  .cetak-berita .ba-foto figure { width: 130px; }
  .cetak-berita .ba-foto img { height: 92px; }
  /* dirapatkan supaya seluruh berita acara tetap muat SATU halaman A4 tegak (dengan kop 4 baris,
   * dua blok data, catatan lokasi, foto bukti, dan tiga kolom tanda tangan). */
  .cetak-berita .ba-nomor { margin-bottom: 12px; }
  .cetak-berita .ba-para { line-height: 1.5; margin-bottom: 8px; }
  .cetak-berita .ba-sub { margin: 10px 0 4px; }
  .cetak-berita .ba-baris { line-height: 1.45; padding: 1px 0 1px 18px; }
  .cetak-berita .ba-ttd { margin-top: 18px; }
}

@media (max-width: 640px) {
  .cetak-kop { gap: 8px 10px; }
  .cetak-kop-teks strong { font-size: 13.5px; }
  .cetak-kop-teks .kop-pemerintah { font-size: 11px; }
  .cetak-kop-teks .kop-alamat { font-size: 11px; }
  .cetak-kop-kanan { max-width: 100%; text-align: left; }
  .ba-label { flex-basis: 128px; }
  .ba-foto figure { width: 46%; }
}

@media print {
  @page { size: A4 landscape; margin: 8mm; }
  /* `.flash-wrap` = pesan hasil/peringatan setelah menyimpan. Ikut disembunyikan saat mencetak:
   * kalau tidak, dokumen berita acara/kuitansi yang dibuka TEPAT setelah menyimpan tercetak
   * dengan satu halaman tambahan berisi pesan itu (halaman pertama jadi kertas mendatar kosong). */
  .sidebar, .topbar, .foot, .no-print, .receipt-actions, .flash-wrap { display: none !important; }
  body { background: #fff !important; background-image: none !important; font-size: 10px; }
  .card::before { display: none !important; }
  .content { padding: 0; gap: 0; }
  .grid { gap: 0; }
  .receipt { box-shadow: none; border: 0; max-width: none; }
  .receipt-kop { max-width: none; }
  .app { display: block; }
  .cetak-halaman { border: 0; border-radius: 0; box-shadow: none; padding: 0; margin: 0; page-break-after: always; }
  .cetak-halaman:last-child { page-break-after: auto; }
  .cetak-halaman + .cetak-halaman { page-break-before: always; }
  .card { border: 0; box-shadow: none; padding: 0; }
  table { font-size: 9.5px; }
  table th, table td { padding: 3px 5px; }
  table.cetak-tabel { font-size: 9px; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  tr, img { break-inside: avoid; page-break-inside: avoid; }
  th { position: static; }
  .cetak-ttd { page-break-inside: avoid; }
  .cetak-tabel td .teks-asli { max-width: 22ch; }
  /* LAMPIRAN DAFTAR REDUKSI: 15 kolom harus muat satu halaman A4 mendatar. */
  .rd-kepala { margin-bottom: 8px; }
  .rd-judul { font-size: 12px; }
  .rd-cabang, .rd-bulan { font-size: 10.5px; }
  table.rd-tabel { font-size: 8.6px; }
  table.rd-tabel th, table.rd-tabel td { padding: 2px 3px; }
  table.rd-tabel td .teks-asli { max-width: 15ch; }
}
