/* Madani OS — gaya dasar DISALIN dari standar Proyek Madani (proyek-desa-madani/public/app.css): warna, tombol, angka ringkasan, tabel, lembar, petunjuk. */
:root {
  --bg: #f4f5f7;
  --surface: #ffffff;
  --surface-2: #f9fafb;
  --line: #e2e5e9;
  --line-strong: #cfd4da;
  --text: #16191d;
  --text-2: #4a525c;
  --muted: #7a828c;
  --navy: #13294b;
  --navy-2: #1d3a66;
  --navy-soft: #e8edf5;
  --green: #1d6b46;
  --green-soft: #e7f2ec;
  --amber: #1d4e89;      /* dulu kuning: kini biru aksen untuk pemberitahuan (keputusan Bapak 14 Nov: warna uang hanya merah & hijau) */
  --amber-soft: #e8eef8;
  --red: #a4262c;
  --red-soft: #fbecec;
  --radius: 6px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--navy-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.hidden { display: none !important; }

/* ===== Login ===== */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.login-card { width: 100%; max-width: 380px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 32px 28px 24px; }
.brand-mark { display: flex; align-items: center; gap: 10px; margin-bottom: 24px; }
.brand-mark .logo { width: 38px; height: 38px; flex: none; border-radius: 8px; background: var(--navy); color: #fff; display: grid; place-items: center; }
.brand-mark .logo svg, .side .brand .logo svg { width: 100%; height: 100%; display: block; }
.brand-mark .t1 { font-weight: 600; font-size: 15px; }
.brand-mark .t2 { font-size: 12px; color: var(--muted); }
.login-card h1 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }
.login-card p { margin: 0 0 20px; color: var(--muted); font-size: 13px; }
.powered { text-align: center; font-size: 11px; color: var(--muted); margin-top: 20px; letter-spacing: .2px; }


/* ===== Buttons & inputs ===== */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--text); padding: 7px 14px; border-radius: var(--radius); cursor: pointer; font-weight: 500; font-size: 13px; white-space: nowrap; }
.btn:hover { background: var(--surface-2); border-color: #b9c0c8; }
.btn:focus-visible, .inp:focus-visible { outline: 2px solid #7aa2d6; outline-offset: 1px; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #e5b9bb; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--navy-soft); }
.btn.sm { padding: 4px 10px; font-size: 12.5px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.inp, select.inp, textarea.inp { width: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 7px 10px; background: var(--surface); min-height: 34px; }
.inp:focus { border-color: #7aa2d6; outline: none; box-shadow: 0 0 0 3px rgba(29,58,102,.10); }
.inp.num { text-align: right; }
.inp[readonly] { background: var(--surface-2); color: var(--text-2); }
.field { display: flex; flex-direction: column; gap: 5px; }
.field > span { font-size: 12px; color: var(--text-2); font-weight: 500; }
.field small { color: var(--muted); font-size: 11.5px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.err { color: var(--red); font-size: 13px; min-height: 18px; }

/* ===== Panels, KPI, tables ===== */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; }
.panel-h { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.panel-h h3 { margin: 0; font-size: 14px; font-weight: 600; }
.panel-h .note { color: var(--muted); font-size: 12.5px; }
/* Kotak pencarian di tabel */
.panel-h .brk { flex-basis: 100%; height: 0; }
.cari-box { position: relative; display: inline-flex; align-items: center; flex: 0 1 300px; min-width: 200px; }
.cari-box svg { position: absolute; left: 10px; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.cari-box .inp { padding-left: 34px; padding-right: 10px; }
.cari-box .cari-n { position: absolute; left: 0; top: 100%; margin-top: 3px; font-size: 11.5px; color: var(--navy-2); white-space: nowrap; }
.cari-box .cari-n:empty { display: none; }
.cari-box:has(.cari-n:not(:empty)) { margin-bottom: 16px; }
.filters .cari-box .inp { width: 100%; min-width: 0; }
.tbl .ulang { display: none; }
.tbl.mencari .ulang { display: inline; color: var(--muted); }
.panel-h .r { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.panel-b { padding: 16px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 18px; overflow: hidden; }
.kpi { padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.kpi .l { font-size: 12px; color: var(--muted); }
.kpi .v { font-size: 20px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -.3px; }
.kpi .s { font-size: 12px; color: var(--text-2); margin-top: 2px; }
.kpi.alert .v { color: var(--amber); }
.kpi.merah .v { color: var(--red); }
.kpi.hijau .v { color: var(--green); }
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; font-size: 11.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); background: var(--surface-2); padding: 9px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 12px; border-bottom: 1px solid #eef0f2; vertical-align: top; }
.tbl tbody tr:hover td { background: #fafbfc; }
.tbl tr.click { cursor: pointer; }
.tbl tfoot td { font-weight: 600; background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 0; }
.tbl th.num, .tbl td.num { text-align: right; }
.tbl td.c, .tbl th.c { text-align: center; }
.tbl tr.sub td { color: var(--text-2); }
.tbl tr.batal td { color: var(--muted); text-decoration: line-through; }
.tbl tr.grp td { background: var(--surface-2); font-weight: 600; }
.tbl.compact td { padding: 6px 10px; }
.tbl .inp { min-height: 30px; padding: 5px 8px; }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); }

.tag { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 1px 8px; border-radius: 4px; border: 1px solid transparent; white-space: nowrap; }
.tag.navy { background: var(--navy-soft); color: var(--navy-2); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.gray { background: #eef0f2; color: var(--text-2); }
.neg { color: var(--red); }
.tbl tr.retur td, .tbl tr.retur td a { color: var(--red); }
.ubah-harga { background: none; border: 0; padding: 2px 4px; margin: -2px -4px; font: inherit; color: inherit; cursor: pointer; border-radius: 4px; text-decoration: underline dotted; text-underline-offset: 3px; display: inline-flex; gap: 6px; align-items: center; }
.ubah-harga:hover { background: var(--navy-soft); }
.ubah-harga .tag { font-size: 10.5px; padding: 0 5px; }
.pos { color: var(--green); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 9px 14px; cursor: pointer; color: var(--text-2); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--navy); border-bottom-color: var(--navy); }
.seg { display: inline-flex; border: 1px solid var(--line-strong); border-radius: var(--radius); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 5px 12px; cursor: pointer; font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.seg button + button { border-left: 1px solid var(--line-strong); }
.seg button.on { background: var(--navy); color: #fff; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters .inp { width: auto; min-width: 160px; }
.banner { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border: 1px solid #c9d6ea; background: var(--amber-soft); color: #1a3a66; border-radius: 8px; margin-bottom: 18px; font-size: 13px; }
.banner.hijau { border-color: #b9dcc8; background: var(--green-soft); color: #14532d; }
.banner.merah { border-color: #e5b9bb; background: var(--red-soft); color: #7f1d1d; }
.banner .r { margin-left: auto; }
.info-line { display: grid; grid-template-columns: 150px 1fr; gap: 6px 12px; font-size: 13px; }
.info-line dt { color: var(--muted); }
.info-line dd { margin: 0; }

/* ===== Modal ===== */
.modal-back { position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 48px 16px; overflow-y: auto; }
.modal { background: var(--surface); border-radius: 8px; width: 100%; max-width: 560px; box-shadow: 0 20px 50px rgba(0,0,0,.18); }
.modal.wide { max-width: 980px; }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal-h h3 { margin: 0; font-size: 16px; font-weight: 600; }
.modal-h .x { margin-left: auto; }
.modal-b { padding: 18px 20px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; align-items: center; background: var(--surface-2); border-radius: 0 0 8px 8px; flex-wrap: wrap; }
.modal-f .l { margin-right: auto; font-size: 13px; color: var(--text-2); }
.sumline { display: flex; justify-content: flex-end; gap: 28px; padding: 12px 4px 0; font-size: 13px; flex-wrap: wrap; }
.sumline b { font-variant-numeric: tabular-nums; }
.hint { font-size: 12px; color: var(--muted); }

/* Isian barang dengan saran */
.ac { position: relative; }
.ac-list { position: absolute; left: 0; right: 0; top: 100%; z-index: 50; background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.10); max-height: 240px; overflow-y: auto; margin-top: 2px; }
.ac-list div { padding: 6px 10px; cursor: pointer; display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }
.ac-list div span { color: var(--muted); font-size: 12px; }
.ac-list div.on, .ac-list div:hover { background: var(--navy-soft); }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(20px); background: #1b2330; color: #fff; padding: 10px 18px; border-radius: 6px; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 200; max-width: calc(100vw - 32px); }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.powered-in { font-size: 11px; color: var(--muted); padding: 18px 24px 24px; }
.loading { padding: 60px; text-align: center; color: var(--muted); }


/* Tampilan HP terkunci (tidak zoom masuk/keluar): huruf isian 16px agar iPhone tidak membesar otomatis,
   ketuk dua kali tidak memperbesar, halaman tidak lebih lebar dari layar */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
html, body { overflow-x: hidden; max-width: 100%; }
@media (max-width: 900px), (pointer: coarse) {
  input, select, textarea, .inp, select.inp, textarea.inp, .tbl .inp, .topbar .desa-pick select { font-size: 16px; }
}

/* ===== Petunjuk singkat tiap layar (tombol "?") ===== */
.ptj-btn { flex: none; width: 40px; height: 40px; min-width: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); color: var(--navy); font: 600 17px/1 var(--font); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.ptj-btn:hover { background: var(--navy-soft); border-color: var(--navy-2); }
.ptj-btn:focus-visible { outline: 2px solid var(--navy-2); outline-offset: 2px; }
.ptj-btn.denyut, .btn-bantu.denyut { animation: ptj-denyut 1.6s ease-out 2; }
@keyframes ptj-denyut { 0% { box-shadow: 0 0 0 0 rgba(19, 41, 75, .38); } 100% { box-shadow: 0 0 0 11px rgba(19, 41, 75, 0); } }
.modal-h .ptj-btn { margin-left: auto; }
.modal-h .ptj-btn + .x { margin-left: 4px; }
.login-card { position: relative; }
.login-card > .ptj-btn { position: absolute; top: 14px; right: 14px; }
.ptj-back { position: fixed; inset: 0; z-index: 300; background: rgba(17, 24, 39, 0); display: flex; align-items: center; justify-content: center; padding: 24px 16px; transition: background .18s ease; }
.ptj-back.on { background: rgba(17, 24, 39, .45); }
.ptj { background: var(--surface); width: 100%; max-width: 560px; max-height: calc(100vh - 48px); display: flex; flex-direction: column; border-radius: 10px; box-shadow: 0 20px 50px rgba(0,0,0,.2); opacity: 0; transform: translateY(8px); transition: opacity .18s ease, transform .18s ease; font-size: 15px; }
.ptj-back.on .ptj { opacity: 1; transform: none; }
.ptj-pegangan { display: none; }
.ptj-h { display: flex; align-items: flex-start; gap: 12px; padding: 16px 20px 12px; border-bottom: 1px solid var(--line); }
.ptj-h h3 { margin: 2px 0 0; font-size: 18px; font-weight: 600; color: var(--navy); }
.ptj-h .x { margin-left: auto; }
.ptj-label { font-size: 12px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); }
.ptj-b { padding: 14px 20px 6px; overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; line-height: 1.55; }
.ptj-untuk { background: var(--navy-soft); border-radius: 6px; padding: 10px 12px; color: var(--text); }
.ptj-sub { font-size: 13px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; color: var(--text-2); margin: 16px 0 8px; }
.ptj-langkah { list-style: none; counter-reset: ptj; margin: 0; padding: 0; }
.ptj-langkah li { counter-increment: ptj; position: relative; padding: 0 0 10px 36px; }
.ptj-langkah li::before { content: counter(ptj); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.ptj-hati { border-left: 3px solid var(--red); background: var(--red-soft); border-radius: 0 6px 6px 0; padding: 2px 12px 8px; margin-top: 6px; }
.ptj-hati .ptj-sub { color: var(--red); margin-top: 8px; }
.ptj-hati ul, .ptj-istilah ul { margin: 0; padding-left: 18px; }
.ptj-hati li, .ptj-istilah li { margin-bottom: 6px; }
.ptj-istilah { margin: 14px 0 8px; color: var(--text-2); }
.ptj-istilah summary { cursor: pointer; font-weight: 600; color: var(--navy-2); padding: 6px 0; min-height: 32px; }
.ptj-f { padding: 12px 20px 16px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; }
@media (max-width: 900px) {
  .ptj-back { align-items: flex-end; padding: 0; }
  .ptj { max-width: none; max-height: 88vh; border-radius: 14px 14px 0 0; transform: translateY(100%); font-size: 16px; }
  .ptj-back.on .ptj { transform: none; }
  .ptj-pegangan { display: block; width: 40px; height: 4px; border-radius: 2px; background: var(--line-strong); margin: 8px auto 0; }
  .ptj-h { padding: 10px 16px 10px; }
  .ptj-b { padding: 12px 16px 6px; }
  .ptj-f { padding: 10px 16px calc(12px + env(safe-area-inset-bottom)); }
  .ptj-f .btn { width: 100%; justify-content: center; min-height: 44px; font-size: 16px; }
}
/* tombol ? tidak menambah tinggi judul/kepala lembar (tata letak lama tetap) */
.modal-h .ptj-btn { margin-top: -8px; margin-bottom: -8px; }

/* ======================================================================
   MADANI OS — tata letak sendiri. HP dulu (menu bawah); PC (>=1024px) di blok paling bawah (menu samping navy).
   ====================================================================== */
body { overscroll-behavior-y: none; }
.os { min-height: 100vh; padding-bottom: calc(62px + env(safe-area-inset-bottom)); }
.os-side { display: none; }
.os-top { position: sticky; top: 0; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.os-top-dalam { height: 56px; display: flex; align-items: center; gap: 8px; padding: 0 12px; }
.os-top .logo-kecil { width: 30px; height: 30px; border-radius: 7px; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.os-top .logo-kecil svg { width: 18px; height: 18px; }
.os-top .judul { flex: 1; min-width: 0; line-height: 1.15; }
.os-top .judul b { display: block; font-size: 15.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.os-top .judul span { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.os-top .btn-ikon { width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--surface); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; color: var(--navy); padding: 0; flex: none; }
.os-top .btn-ikon svg { width: 18px; height: 18px; }
.os-top .btn-ikon.putar svg { animation: putar 1s linear infinite; }
@keyframes putar { to { transform: rotate(360deg); } }
.os-isi { padding: 14px 12px 28px; max-width: 1160px; margin: 0 auto; }
.os-bawah { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); display: grid; grid-template-columns: repeat(5, 1fr); padding-bottom: env(safe-area-inset-bottom); }
.os-bawah button { background: none; border: 0; padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: var(--muted); cursor: pointer; min-height: 56px; -webkit-tap-highlight-color: transparent; }
.os-bawah button svg { width: 21px; height: 21px; }
.os-bawah button.on { color: var(--navy); font-weight: 600; }

/* Kotak tanya */
.tanya { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.tanya h2 { margin: 0 0 2px; font-size: 16px; font-weight: 600; }
.tanya .sub { margin: 0 0 10px; font-size: 12.5px; color: var(--muted); }
.tanya-baris { display: flex; gap: 8px; }
.tanya-baris .cari-box { flex: 1; min-width: 0; }
.tanya-baris .inp { min-height: 44px; font-size: 16px; }
.tanya-baris .btn { min-height: 44px; padding: 0 16px; }
.saran { display: flex; gap: 6px; overflow-x: auto; margin-top: 10px; padding-bottom: 2px; scrollbar-width: none; }
.saran::-webkit-scrollbar { display: none; }
.saran button { flex: none; border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 16px; padding: 6px 12px; font-size: 12.5px; color: var(--text-2); cursor: pointer; white-space: nowrap; }
.saran button:hover { background: var(--navy-soft); color: var(--navy-2); }
.jawaban { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.jawaban .teks { white-space: pre-wrap; line-height: 1.6; font-size: 14.5px; }
.jawaban .label { font-size: 11.5px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; display: flex; gap: 8px; align-items: center; }
.memuat-titik::after { content: "…"; animation: titik 1.2s steps(4) infinite; display: inline-block; width: 1.2em; overflow: hidden; vertical-align: bottom; }
@keyframes titik { from { width: 0; } to { width: 1.2em; } }
.hasil-grup { margin-top: 12px; }
.hasil-grup h4 { margin: 0 0 4px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px; }
.hasil { display: flex; gap: 10px; align-items: center; padding: 9px 2px; border-bottom: 1px solid #eef0f2; cursor: pointer; }
.hasil:last-child { border-bottom: 0; }
.hasil:hover { background: var(--surface-2); }
.hasil .k { flex: 1; min-width: 0; }
.hasil .k b { display: block; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.hasil .k span { display: block; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.hasil .n { text-align: right; flex: none; font-variant-numeric: tabular-nums; }
.hasil .n b { display: block; font-weight: 600; }
.hasil .n span { display: block; font-size: 11px; color: var(--muted); }

/* Angka ringkasan di HP: 2 kolom */
.kpis { grid-template-columns: 1fr 1fr; }
.kpi { padding: 12px 14px; }
.kpi .v { font-size: 17px; white-space: nowrap; }
.kpi .l { line-height: 1.3; }
button.kpi { background: none; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; font: inherit; color: inherit; width: 100%; }
button.kpi:hover { background: var(--surface-2); }
.kpi .go { font-size: 12px; color: var(--navy-2); font-weight: 500; margin-top: 4px; }

/* Perlu perhatian */
.perhatian { list-style: none; margin: 0; padding: 0; }
.perhatian li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 16px; border-bottom: 1px solid #eef0f2; cursor: pointer; }
.perhatian li:last-child { border-bottom: 0; }
.perhatian li:hover { background: var(--surface-2); }
.perhatian .tanda { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; background: var(--amber); }
.perhatian .tanda.merah { background: var(--red); }
.perhatian .t { flex: 1; min-width: 0; }
.perhatian .nilai { font-variant-numeric: tabular-nums; font-weight: 600; white-space: nowrap; }

.seg-baris { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.seg-baris .cari-box { flex: 1 1 220px; }
.tbl-wrap { -webkit-overflow-scrolling: touch; }
.tbl td.nm { min-width: 150px; white-space: normal; }
.tbl tfoot td { position: sticky; bottom: 0; }
.pc-saja { display: none; }
.kosong { padding: 28px 16px; text-align: center; color: var(--muted); font-size: 13px; }
.kecil-abu { font-size: 12px; color: var(--muted); }
.lembar-menu { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lembar-menu button { display: flex; align-items: center; gap: 10px; padding: 14px 12px; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; min-height: 52px; }
.lembar-menu button svg { width: 20px; height: 20px; color: var(--navy); flex: none; }
.powered-in { text-align: center; }

/* HP: lembar (modal) naik dari bawah, hampir penuh */
@media (max-width: 1023px) {
  .modal-back { padding: 0; align-items: flex-end; }
  .modal { border-radius: 14px 14px 0 0; max-height: 92vh; display: flex; flex-direction: column; }
  .modal-b { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 14px 16px calc(18px + env(safe-area-inset-bottom)); }
  .modal-h { padding: 14px 16px; }
  .tbl td, .tbl th { white-space: nowrap; }
  .tbl { font-size: 12.5px; }
  .tbl td, .tbl th { padding: 8px 6px; }
  .tbl td:first-child, .tbl th:first-child { padding-left: 10px; }
  .tbl td:last-child, .tbl th:last-child { padding-right: 10px; }
  .tbl.excel, .tbl.compact { font-size: 12px; }
  .tbl th { font-size: 10.5px; letter-spacing: .3px; }
  .tbl td.nm { white-space: normal; min-width: 130px; }
}

/* ===== Tampilan PC (1024px ke atas) ===== */
@media (min-width: 1024px) {
  .os { padding-bottom: 0; padding-left: 248px; }
  .os-bawah { display: none; }
  .os-side { display: flex; flex-direction: column; position: fixed; left: 0; top: 0; bottom: 0; width: 248px; background: var(--navy); color: #c9d3e3; z-index: 50; }
  .os-side .brand { padding: 18px 18px 16px; border-bottom: 1px solid rgba(255,255,255,.08); display: flex; gap: 10px; align-items: center; }
  .os-side .brand .logo { width: 32px; height: 32px; flex: none; border-radius: 7px; background: #fff; color: var(--navy); display: grid; place-items: center; }
  .os-side .brand .logo svg { width: 19px; height: 19px; }
  .os-side .brand .t1 { color: #fff; font-weight: 600; font-size: 14px; line-height: 1.2; }
  .os-side .brand .t2 { font-size: 11px; color: #8fa0bb; }
  .os-side nav { padding: 10px 10px; flex: 1; overflow-y: auto; }
  .os-side .grp { font-size: 10.5px; text-transform: uppercase; letter-spacing: .9px; color: #7487a5; padding: 14px 10px 6px; }
  .os-side a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 5px; color: #c9d3e3; text-decoration: none; font-size: 13.5px; cursor: pointer; }
  .os-side a:hover { background: rgba(255,255,255,.06); color: #fff; }
  .os-side a.on { background: rgba(255,255,255,.12); color: #fff; font-weight: 500; }
  .os-side a svg { width: 16px; height: 16px; flex: none; opacity: .85; }
  .os-side a .badge { margin-left: auto; background: #a4262c; color: #fff; font-size: 11px; padding: 0 6px; border-radius: 9px; line-height: 18px; }
  .os-side .foot { padding: 12px 18px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11px; color: #7487a5; }
  .os-side .foot button { background: none; border: 0; color: #c9d3e3; font: inherit; font-size: 12.5px; cursor: pointer; padding: 0; margin-top: 6px; }
  .os-top-dalam { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
  .os-top .logo-kecil { display: none; }
  .os-isi { padding: 22px 24px 32px; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
  .kpis.k8 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .saran { flex-wrap: wrap; overflow: visible; }
  .kpi { padding: 14px 18px; }
  .kpi .v { font-size: 20px; }
  .tanya { padding: 18px 20px; }
  .tanya h2 { font-size: 18px; }
  .dua-kolom { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; align-items: start; }
  .dua-kolom > .panel { margin-bottom: 0; }
  .pc-saja { display: revert; }
  .hp-saja { display: none !important; }
  .tbl-wrap.tinggi { max-height: 640px; overflow-y: auto; }
  .tbl-wrap.tinggi thead th { position: sticky; top: 0; z-index: 2; }
  .tbl.excel td, .tbl.excel th { border-right: 1px solid #eef0f2; }
  .tbl.excel tbody tr:nth-child(even) td { background: #fbfcfd; }
  .modal-back { align-items: center; }
  .hasil-kolom { display: grid; grid-template-columns: 1fr 1fr; gap: 0 24px; }
}
.tgl-jelas { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; font-weight: 400; }
.daftar-hp .hasil { padding: 11px 14px; }
.daftar-hp .total-hp { display: flex; justify-content: space-between; padding: 11px 14px; background: var(--surface-2); border-top: 1px solid var(--line); font-weight: 600; font-variant-numeric: tabular-nums; border-radius: 0 0 8px 8px; }

/* ===== Perbaikan 6 Des 2026 (masukan Bapak) ===== */
/* Saringan cabang di atas tiap layar */
.saring { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 14px; }
.saring .lbl { font-size: 11.5px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .5px; }
.saring .seg button { padding: 7px 18px; font-size: 13.5px; min-height: 36px; }
.saring .ket { font-size: 12px; color: var(--muted); }
@media (max-width: 1023px) { .saring .seg { flex: 1; } .saring .seg button { flex: 1; } .saring .ket { width: 100%; } }
/* Dua panel berdampingan sama lebar (MPP | MSR) */
.dua-rata { display: grid; gap: 0; }
@media (min-width: 1024px) { .dua-rata { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; margin-bottom: 18px; } .dua-rata > .panel { margin-bottom: 0; } }
/* Kolom angka sejajar di hasil cari (stok MPP | MSR) */
.hasil .kol { display: flex; flex: none; }
.hasil .kol div { width: 62px; text-align: right; }
.hasil .kol span { display: block; font-size: 10.5px; color: var(--muted); }
.hasil .kol b { display: block; font-weight: 600; font-variant-numeric: tabular-nums; }
/* Cari barang */
.hasil-ket { padding: 10px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }
.sub-judul { padding: 14px 16px 8px; font-size: 12px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .4px; border-top: 1px solid var(--line); }
.tbl.brg th.grp { text-align: center; }
.tbl.brg td.pisah, .tbl.brg th.pisah { border-left: 2px solid var(--line-strong); }
.brg-hp .brg { padding: 12px 14px; border-top: 1px solid #eef0f2; }
.brg-hp .brg .nm b { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.brg-hp .brg .nm span { display: block; font-size: 12px; color: var(--muted); }
.brg-hp .kisi { display: grid; grid-template-columns: minmax(0, 1fr) 92px 92px; margin-top: 8px; background: var(--surface-2); border-radius: 6px; padding: 7px 10px; row-gap: 5px; font-size: 13.5px; font-variant-numeric: tabular-nums; }
.brg-hp .kisi.g1 { grid-template-columns: minmax(0, 1fr) 120px; }
.brg-hp .kisi .h { text-align: right; font-size: 11px; font-weight: 600; color: var(--text-2); letter-spacing: .3px; }
.brg-hp .kisi .l { color: var(--muted); font-size: 12.5px; }
.brg-hp .kisi .v { text-align: right; font-weight: 500; }
/* Kiriman: pilihan tanggal + daftar */
.tgl-chip { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 6px; margin-bottom: 12px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.tgl-chip button { flex: none; border: 1px solid var(--line-strong); background: var(--surface); border-radius: 8px; padding: 7px 13px; text-align: left; cursor: pointer; font: inherit; color: var(--text); min-width: 92px; }
.tgl-chip button b { display: block; font-size: 13px; font-weight: 600; }
.tgl-chip button span { display: block; font-size: 11.5px; color: var(--muted); }
.tgl-chip button.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.tgl-chip button.on span { color: #c9d3e3; }
.kr { display: flex; gap: 12px; padding: 12px 14px; border-top: 1px solid #eef0f2; }
.kr:first-child { border-top: 0; }
.kr .no { width: 24px; height: 24px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); font-size: 12px; font-weight: 600; display: grid; place-items: center; flex: none; font-variant-numeric: tabular-nums; }
.kr .isi { flex: 1; min-width: 0; }
.kr .isi b { display: block; font-weight: 600; font-size: 14px; overflow-wrap: anywhere; }
.kr .brg-t { font-size: 13.5px; margin-top: 2px; overflow-wrap: anywhere; }
.kr .tim { font-size: 12px; color: var(--muted); margin-top: 3px; }
.kaki { padding: 10px 14px; font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--line); background: var(--surface-2); border-radius: 0 0 8px 8px; display: grid; gap: 4px; }
.kosong.err { color: var(--red); }
.panel-b > .cari-box { display: flex; width: 100%; }
.cari-box .inp { width: 100%; min-width: 0; }
@media (max-width: 1023px) { .kpis > :last-child:nth-child(odd) { grid-column: 1 / -1; } }
.tbl.kirim td.nm { min-width: 0; white-space: normal; }
.tbl.kirim td:first-child { width: 36px; }
