/* gaya.css, lapisan Web fondasi Kwitans.
   Koreksi komposisi (vonis owner 3 Des 2026): struktur layar
   dibangun ulang mengikuti komposisi mockup Kwitans
   (mockup-kwitans-2) elemen per elemen: sidebar tunggal 264px
   berkelompok ala Linear, bilah atas lengket, hero saldo
   gabungan, panel Perlu Perhatian, kartu tabel dengan bilah
   alat (tab status dan kotak cari), baris statistik, kisi
   laporan dengan baris ringkas. Sistem token tetap yang
   diekstrak dari mockup pada tahap reskin: permukaan terang
   tenang, aksen hijau Mercury, ungu Linear, tipografi Plus
   Jakarta Sans dan JetBrains Mono, mode gelap mengikuti
   sistem. Kelas layar lama yang masih dipakai layar yang
   tidak berubah komposisinya dipertahankan. */

:root {
  --bg: #f6f7f8; --surface: #ffffff; --surface-2: #fbfbfc; --surface-3: #f1f2f4;
  --ink: #101418; --ink-2: #3c4450; --muted: #6b7482; --faint: #5f6873;
  --line: #e6e8ec; --line-2: #eef0f2;
  --accent: #12715a; --accent-soft: #e7f4ef; --accent-ink: #0c5a47;
  --indigo: #5e6ad2;
  --amber: #b7791f; --amber-soft: #fdf3e0;
  --red: #c2413a; --red-soft: #fdecea;
  --blue: #2563eb; --blue-soft: #e9effd;
  --sidebar: #0e1116; --sidebar-2: #171b21; --sidebar-ink: #e8eaee; --sidebar-muted: #8b93a1;
  --sidebar-line: rgba(255,255,255,.08);
  --shadow: 0 1px 2px rgba(16,20,24,.05), 0 8px 24px -12px rgba(16,20,24,.12);
  --shadow-lg: 0 2px 4px rgba(16,20,24,.06), 0 24px 48px -16px rgba(16,20,24,.18);
  --r-lg: 16px; --r-md: 12px; --r-sm: 8px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0d10; --surface: #13161b; --surface-2: #171a20; --surface-3: #1d2129;
    --ink: #eceef1; --ink-2: #c3c9d2; --muted: #8b93a1; --faint: #a7b0bc;
    --line: #23272f; --line-2: #1c2027;
    --accent: #3ec79f; --accent-soft: #123128; --accent-ink: #7fe0c3;
    --amber: #e5b45a; --amber-soft: #33270e;
    --red: #f08a84; --red-soft: #3a1a18;
    --blue: #7ea6f8; --blue-soft: #1a2440;
    --sidebar: #08090c; --sidebar-2: #101318;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.5);
    --shadow-lg: 0 2px 4px rgba(0,0,0,.4), 0 24px 48px -16px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; border-radius: 6px; }
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 12.5px; }
kbd {
  font-family: var(--mono); font-size: 10px;
  background: rgba(127,135,150,.18); border: 1px solid rgba(127,135,150,.25);
  border-bottom-width: 2px; border-radius: 5px; padding: 1px 5px; color: inherit;
}

input, select, textarea {
  font-family: inherit;
  font-size: 14px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 8px 11px;
  min-height: 36px;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--indigo);
  box-shadow: 0 0 0 3px rgba(94,106,210,.18);
}

/* ---------- Kerang: sidebar tunggal 264px ala Linear ---------- */
.kerang { display: flex; min-height: 100vh; }
.samping {
  width: 264px; flex: 0 0 264px;
  background: var(--sidebar); color: var(--sidebar-ink);
  padding: 16px 14px;
  display: flex; flex-direction: column; gap: 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; z-index: 30;
  scrollbar-width: thin;
}
.merek-baris { display: flex; gap: 10px; align-items: center; padding: 2px 6px; }
.tanda-merek {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, #1d9e7a, #0c5a47); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 16px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.nama-merek { color: #fff; font-weight: 700; font-size: 15.5px; line-height: 1.2; }
.sub-merek { font-size: 11px; color: var(--sidebar-muted); }
.perusahaan-kotak {
  display: flex; gap: 10px; align-items: center;
  background: var(--sidebar-2); border: 1px solid var(--sidebar-line);
  border-radius: 11px; padding: 9px 11px; margin-top: 12px;
}
.ava {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  background: rgba(62,199,159,.16); color: #7fe0c3;
  display: flex; align-items: center; justify-content: center;
  font-size: 11.5px; font-weight: 700;
}
.pk-teks, .su-teks { min-width: 0; }
.pk-teks b, .su-teks b {
  display: block; color: var(--sidebar-ink); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pk-teks span, .su-teks span {
  font-size: 11.5px; color: var(--sidebar-muted); display: block;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cari-samping {
  display: flex; align-items: center; gap: 8px; width: 100%;
  background: var(--sidebar-2); border: 1px solid var(--sidebar-line);
  color: var(--sidebar-muted); border-radius: 9px;
  padding: 0 10px; min-height: 36px;
  font-size: 12px; text-align: left;
  white-space: nowrap; overflow: hidden;
}
.cari-samping kbd { flex: none; }
.cari-samping:hover { border-color: rgba(255,255,255,.18); color: var(--sidebar-ink); }
.cari-samping kbd { margin-left: auto; }
.nav-samping { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--sidebar-muted);
  margin: 10px 8px 4px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  background: transparent; border: 0; border-radius: 8px;
  color: #c9ced8; font-size: 13.5px; font-weight: 500;
  padding: 8px 10px; min-height: 36px; text-align: left; position: relative;
  transition: background .15s, color .15s;
}
.nav-item:hover { background: rgba(255,255,255,.05); color: #fff; }
.nav-item.aktif { background: rgba(255,255,255,.09); color: #fff; }
.nav-item.aktif::before {
  content: ""; position: absolute; left: -14px; top: 8px; bottom: 8px;
  width: 3px; border-radius: 3px; background: var(--indigo);
}
.nav-item svg { flex: none; opacity: .85; }
.pil-nav {
  margin-left: auto; flex: none;
  font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
  color: var(--sidebar-ink); background: rgba(255,255,255,.12);
  border-radius: 99px; padding: 2px 8px;
}
.sisi-user {
  display: flex; align-items: center; gap: 10px;
  border-top: 1px solid var(--sidebar-line); padding-top: 14px;
}
.su-teks { flex: 1; }
.btn-keluar {
  background: var(--sidebar-2); border: 1px solid var(--sidebar-line);
  color: #c9ced8; border-radius: 8px; padding: 6px 10px; min-height: 32px;
  font-size: 12px; font-weight: 600;
}
.btn-keluar:hover { border-color: rgba(255,255,255,.18); color: #fff; }

/* ---------- Bilah atas lengket ---------- */
.utama { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bilah-atas {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  padding: 10px 28px; min-height: 57px;
  display: flex; align-items: center; gap: 12px;
}
.crumb { display: flex; gap: 8px; align-items: center; font-size: 13.5px; color: var(--muted); min-width: 0; flex: 1; }
.crumb b { color: var(--ink); font-weight: 600; white-space: nowrap; }
.aksi-atas { display: flex; gap: 9px; align-items: center; flex: none; }
/* Tombol keluar bilah atas hanya untuk layar sempit; di desktop
   tombol keluar tinggal di kaki samping. */
.btn.keluar-hp { display: none; }
.konten { padding: 26px 28px 90px; max-width: 1240px; width: 100%; margin: 0 auto; }
.konten > div { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
/* Bilah tab modul: tampil di semua lebar layar (pola mockup). */
.tab-modul {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  max-width: 1240px; width: 100%; margin: 0 auto;
  padding: 12px 28px 0;
}
/* Pudar tepi bilah tab hanya pada sisi yang masih menyembunyikan
   tab: kelas gulir-kiri/gulir-kanan diatur segarkanPudarTab. */
.tab-modul.gulir-kanan {
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
}
.tab-modul.gulir-kiri {
  -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to left, #000 calc(100% - 20px), transparent);
}
.tab-modul.gulir-kiri.gulir-kanan {
  -webkit-mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(to right, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}
.tab-modul::-webkit-scrollbar { display: none; }
.tab-modul a {
  flex: none; font-size: 13px; font-weight: 600; color: var(--muted);
  padding: 7px 12px; border-radius: 99px; min-height: 34px;
  display: flex; align-items: center; border: 1px solid transparent;
}
.tab-modul a:hover { text-decoration: none; color: var(--ink); }
.tab-modul a.aktif { color: var(--accent-ink); background: var(--accent-soft); border-color: var(--accent-soft); }

/* Pemilih periode di bilah atas. */
.pemilih-periode {
  display: flex; gap: 2px; background: var(--surface-3);
  border: 1px solid var(--line); border-radius: 99px; padding: 2px;
}
.pemilih-periode button {
  border: 0; background: transparent; color: var(--muted);
  font-size: 12.5px; font-weight: 600; padding: 5px 11px;
  border-radius: 99px; min-height: 30px; cursor: pointer;
}
.pemilih-periode button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }

/* Pil delta dan sparkline hero dasbor. */
.baris-delta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.delta-pil {
  font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 2px 9px;
  background: var(--surface-3); color: var(--muted); white-space: nowrap;
}
.delta-pil.naik { background: var(--accent-soft); color: var(--accent-ink); }
.delta-pil.turun { background: var(--red-soft); color: var(--red); }
.spark { display: block; width: 100%; height: 54px; margin-top: 12px; }
.spark-garis { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-area { fill: var(--accent); opacity: .12; stroke: none; }

/* Panel dua kolom dasbor dan grafik arus kas. */
.panel-row { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-bottom: 14px; }
.panel-row .panel { margin-bottom: 0; }
.grafik-arus { display: flex; gap: 10px; align-items: flex-end; padding: 8px 2px 2px; }
.ember-kolom { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; }
.batang-wrap { display: flex; gap: 3px; align-items: flex-end; height: 84px; }
.batang { display: block; width: 11px; border-radius: 3px 3px 0 0; }
.batang.masuk { background: var(--accent); }
.batang.keluar { background: var(--red); }
.ember-label { font-size: 10.5px; color: var(--faint); font-weight: 600; white-space: nowrap; }

/* Kartu akun Kas & Bank bergaya bank. */
.akun-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; margin-bottom: 14px; }
.akun-card {
  background: var(--sidebar); color: var(--sidebar-ink);
  border-radius: var(--r-lg); padding: 18px 20px; box-shadow: var(--shadow-lg);
}
.akun-atas { display: flex; justify-content: space-between; align-items: center; }
.akun-bank { font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--sidebar-muted); }
.akun-kode { font-size: 11px; font-weight: 600; color: var(--sidebar-muted); font-variant-numeric: tabular-nums; }
.akun-nama { font-size: 15px; font-weight: 700; margin-top: 10px; }
.akun-nomor { font-size: 12.5px; color: var(--sidebar-muted); margin-top: 2px; letter-spacing: .04em; }
.akun-saldo { font-size: 23px; font-weight: 800; letter-spacing: -.01em; margin-top: 12px; font-variant-numeric: tabular-nums; }
.akun-atasnama { font-size: 12px; color: var(--sidebar-muted); margin-top: 4px; }

/* Ekspor dan sub statistik. */
.grup-ekspor { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ekspor-status { margin-left: 4px; }
.stat-sub {
  display: block; font-size: 12px; color: var(--muted); margin-top: 4px;
  text-transform: none; letter-spacing: 0; font-weight: 500;
}
.strip-stat { margin-top: 0; }

/* ---------- Kepala halaman ---------- */
.kepala-halaman {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.kepala-halaman h1 { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0; line-height: 1.2; }
.kepala-halaman h1 .kepala-nomor { font-family: var(--mono); font-size: .58em; font-weight: 700; color: var(--muted); white-space: nowrap; letter-spacing: -.01em; }
.kepala-halaman p { color: var(--muted); font-size: 13.5px; margin: 3px 0 0; max-width: 640px; }
.aksi-halaman { display: flex; gap: 8px; flex-wrap: wrap; }
.sub-detail { display: inline-flex; gap: 8px; align-items: center; }

/* ---------- Komponen dasar ---------- */
h1.judul { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 3px; }
.subjudul { color: var(--muted); font-size: 13.5px; margin: 0 0 20px; }
.kartu, .card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow);
}
.kartu { padding: 20px 22px; margin-bottom: 14px; overflow-x: auto; }
.kartu h3 { margin: 0 0 14px; font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.kartu-tabel { padding: 0; overflow: hidden; }
.panel { padding: 20px 22px; margin-bottom: 14px; }
.panel-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; margin-bottom: 12px;
}
.panel-head h2 { font-size: 15.5px; font-weight: 700; letter-spacing: -.01em; margin: 0; }
.panel-head a { font-size: 12.5px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; min-height: 24px; }

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  min-height: 36px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font-size: 13px; font-weight: 600;
  box-shadow: 0 1px 2px rgba(16,20,24,.04);
  transition: transform .12s, box-shadow .12s;
}
.btn:hover { box-shadow: var(--shadow); text-decoration: none; }
.btn.utama, .btn.hijau { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.utama:hover, .btn.hijau:hover { transform: translateY(-1px); }
.btn.gelap { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.gelap:hover { transform: translateY(-1px); }
.btn.bahaya { color: var(--red); }
.btn.bahaya:hover { background: var(--red-soft); }
.btn.kecil { min-height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 7px; }
.btn.ikon { width: 36px; padding: 0; justify-content: center; }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn svg { flex: none; }
.baris-aksi { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: center; }

.pesan {
  border-radius: var(--r-md); padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px;
  background: var(--accent-soft); color: var(--accent-ink);
}
.pesan.galat { background: var(--red-soft); color: var(--red); }
.pesan.peringatan { background: var(--amber-soft); color: var(--amber); }

.medan { margin-bottom: 12px; }
.medan label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 5px; font-weight: 600; }
.medan input, .medan select, .medan textarea { width: 100%; }
.grid-medan { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.petunjuk { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.petunjuk.dalam { padding: 14px 18px; margin: 0; }

dl.rincian { display: grid; grid-template-columns: 190px 1fr; gap: 6px 16px; margin: 0; }
dl.rincian dt { color: var(--muted); font-size: 13px; }
dl.rincian dd { margin: 0; font-size: 13.5px; word-break: break-word; }

.lencana, .tag {
  display: inline-block; padding: 2px 8px; border-radius: 20px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap; line-height: 16px;
  background: var(--surface-3); color: var(--muted);
}
.lencana.ok, .tag.hijau { background: var(--accent-soft); color: var(--accent-ink); }
.lencana.warn, .tag.kuning { background: var(--amber-soft); color: var(--amber); }
.lencana.danger, .tag.merah { background: var(--red-soft); color: var(--red); }
.tag.biru { background: var(--blue-soft); color: var(--blue); }
.tag.abu { background: var(--surface-3); color: var(--muted); }

/* ---------- Tabel ---------- */
.bungkus-tabel { overflow-x: auto; }
table.tabel { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.tabel th {
  font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--faint); font-weight: 700; text-align: left;
  padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); white-space: nowrap;
}
table.tabel td {
  padding: 12px 14px; border-bottom: 1px solid var(--line-2);
  text-align: left; vertical-align: middle;
}
table.tabel tr:last-child td { border-bottom: 0; }
table.tabel tbody tr { transition: background .12s; }
table.tabel td.kanan, table.tabel th.kanan {
  text-align: right; font-variant-numeric: tabular-nums;
}
table.tabel td.kanan { font-family: var(--mono); font-size: 12.5px; }
table.tabel tr.klik { cursor: pointer; }
table.tabel tr.klik:hover { background: var(--surface-2); }
table.tabel td input, table.tabel td select { max-width: 220px; }
.baris-kosong td { text-align: center; color: var(--muted); padding: 26px 14px; }
.inv-id { font-weight: 700; }
.inv-sub { font-size: 12px; color: var(--muted); }

/* ---------- Bilah alat kartu tabel ---------- */
.table-tools {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 14px 18px; border-bottom: 1px solid var(--line);
}
.judul-alat { font-size: 14.5px; font-weight: 700; }
.taut-panel { margin-left: auto; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.tabs {
  display: flex; gap: 4px; background: var(--surface-3);
  padding: 3px; border-radius: 9px;
}
.tabs button {
  border: 0; background: transparent; padding: 5px 12px; min-height: 30px;
  border-radius: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted);
}
.tabs button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16,20,24,.14); }
.searchbox {
  margin-left: auto; display: flex; align-items: center; gap: 7px;
  background: var(--surface-2); border: 1px solid var(--line);
  border-radius: 9px; padding: 0 10px; color: var(--muted);
}
.searchbox input { border: 0; background: transparent; padding: 0; width: 180px; min-height: 34px; }
.searchbox input:focus { box-shadow: none; border-color: transparent; }
.table-tools.saring { padding-top: 10px; padding-bottom: 10px; }
.alat-label { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.table-tools input[type="date"] { min-height: 32px; padding: 4px 9px; font-size: 12.5px; }
.table-tools select {
  min-height: 32px; padding: 4px 8px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 12.5px; background: var(--surface); color: var(--ink);
}
.kaki-tabel {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap;
  padding: 12px 18px; border-top: 1px solid var(--line);
}
.kaki-tabel .petunjuk { margin: 0; }
.kaki-tabel .baris-aksi { margin: 0; }

/* ---------- Dasbor: hero saldo gabungan ---------- */
.hero-grid {
  display: grid; grid-template-columns: 1.35fr 1fr 1fr;
  gap: 14px; margin-bottom: 14px;
}
.bal-main { padding: 22px 24px; position: relative; overflow: hidden; }
.bal-mini { padding: 18px 20px; display: flex; flex-direction: column; }
.bal-label {
  font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  display: flex; align-items: center;
}
.bal-label .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #3ec79f; display: inline-block; margin-right: 7px;
}
.bal-num {
  font-size: 24px; font-weight: 800; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums; margin-top: 8px; line-height: 1.15;
}
.bal-main .bal-num { font-size: 33px; }
.bal-num small { font-size: .55em; font-weight: 600; opacity: .75; }
.bal-sub { font-size: 12.5px; color: var(--muted); margin-top: 7px; }

/* ---------- Panel Perlu Perhatian ---------- */
.due-list { display: flex; flex-direction: column; }
.due {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 0; border-top: 1px solid var(--line-2);
}
.due:first-child { border-top: 0; padding-top: 2px; }
.due:last-child { padding-bottom: 2px; }
.due .ic {
  width: 34px; height: 34px; border-radius: 9px; flex: none;
  display: flex; align-items: center; justify-content: center;
}
.due .ic.merah { background: var(--red-soft); color: var(--red); }
.due .ic.kuning { background: var(--amber-soft); color: var(--amber); }
.due .ic.biru { background: var(--blue-soft); color: var(--blue); }
.due .ic.hijau { background: var(--accent-soft); color: var(--accent-ink); }
.due b { font-size: 13.5px; display: block; line-height: 1.35; }
.due span { font-size: 12px; color: var(--muted); }
.due .amt { margin-left: auto; text-align: right; flex: none; }
.due .amt b { font-size: 13.5px; }

/* ---------- Baris statistik ---------- */
.stat-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px; margin-bottom: 14px;
}
.stat {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow);
}
.stat > span:not(.stat-sub) {
  font-size: 12px; color: var(--muted); font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em;
}
.stat b { display: block; font-size: 19px; font-weight: 800; letter-spacing: -.01em; margin-top: 5px; font-variant-numeric: tabular-nums; }

/* ---------- Laporan ---------- */
.rep-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 14px; margin-bottom: 14px; }
.rep-grid .panel { margin-bottom: 0; }
.pl { display: flex; flex-direction: column; }
.pl-row {
  display: flex; justify-content: space-between; gap: 14px;
  padding: 8px 0; border-top: 1px solid var(--line-2); font-size: 13.5px;
}
.pl-row:first-child { border-top: 0; }
.pl-row span { color: var(--muted); }
.pl-row b { font-variant-numeric: tabular-nums; text-align: right; font-weight: 600; }
.pl-row.total { font-weight: 700; }
.pl-row.total span { color: var(--ink); }
.pl-row.akhir { border-top: 2px solid var(--ink); font-size: 14.5px; font-weight: 800; }
.pl-row.akhir span { color: var(--ink); }
.pl-row.kepala { border-top: 0; padding-bottom: 2px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; }
.rep-note { font-size: 12.5px; color: var(--muted); margin: 12px 0 0; }
.rep-list { display: flex; flex-direction: column; gap: 6px; }
.rep-item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; background: transparent;
  border: 1px solid transparent; border-radius: 11px;
  padding: 10px 12px; font-size: 13.5px; color: var(--ink); min-height: 52px;
}
.rep-item:hover { background: var(--surface-2); border-color: var(--line); }
.rep-item .ric {
  width: 32px; height: 32px; border-radius: 8px; flex: none;
  background: var(--accent-soft); color: var(--accent-ink);
  display: flex; align-items: center; justify-content: center;
}
.rep-item > span:nth-child(2) { flex: 1; min-width: 0; }
.rep-item b { display: block; font-size: 13.5px; }
.rep-item > span:nth-child(2) span { font-size: 12px; color: var(--muted); display: block; }
.rep-item .chev { color: var(--faint); flex: none; display: flex; }
.neraca-duo { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 36px; }

/* ---------- Layar masuk dan atur ulang ---------- */
.pusat { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 18px; }
.kotak-masuk {
  width: 100%; max-width: 400px;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-lg); box-shadow: var(--shadow-lg);
  padding: 28px;
}
.kotak-masuk .kartu { background: var(--surface-2); box-shadow: none; padding: 16px 18px; overflow: visible; }
.kotak-masuk .merek-besar {
  width: 52px; height: 52px; border-radius: 12px;
  background: linear-gradient(135deg, #1d9e7a, #0c5a47); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 26px; font-weight: 800; margin-bottom: 12px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.kotak-masuk h1.judul { font-size: 24px; }
.kotak-masuk form .btn.utama { width: 100%; justify-content: center; }
/* ---------- Penahan kerangka layar (navigasi lembut) ---------- */
.skl {
  display: block;
  background: var(--surface-3);
  border-radius: 6px;
  animation: skl-kedip 1.15s ease-in-out infinite alternate;
}
.skl + .skl { margin-top: 10px; }
@keyframes skl-kedip { from { opacity: .45; } to { opacity: 1; } }
.skl-inline { display: inline-block; width: 180px; height: 12px; vertical-align: middle; }
.kerangka-tabel { padding-bottom: 4px; }
.kerangka-tabel-kepala {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}
.kerangka-tabel-kepala .skl { margin-top: 0; }
.kerangka-baris {
  display: flex; gap: 18px; align-items: center;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line-2);
}
.kerangka-baris .skl { margin-top: 0; flex: none; }
.kerangka-rincian { display: flex; flex-direction: column; margin-top: 10px; }
.kerangka-rincian .kerangka-baris { padding: 8px 0; border-bottom: 0; }
.akun-card .skl { background: rgba(255, 255, 255, .16); }

/* ---------- Palette perintah (pola mockup) ---------- */
.palet-latar {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: flex-start; justify-content: center;
  padding: 12vh 16px 16px;
  background: rgba(10,12,16,.5); backdrop-filter: blur(3px);
}
.palet-latar.terbuka { display: flex; }
.palet {
  background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  width: 100%; max-width: 560px; overflow: hidden; border: 1px solid var(--line);
}
.palet input {
  width: 100%; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--ink);
  font-size: 15px; padding: 15px 18px; min-height: 52px; border-radius: 0;
}
.palet input:focus { box-shadow: none; border-color: var(--line); }
.palet-daftar { max-height: 320px; overflow-y: auto; padding: 6px; }
.palet-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 10px; border: 0; background: transparent; border-radius: 9px;
  color: var(--ink); font-size: 13.5px; text-align: left; min-height: 36px;
}
.palet-item:hover, .palet-item.sel { background: var(--surface-3); }
.palet-item .grup { color: var(--muted); font-size: 12px; margin-left: auto; white-space: nowrap; }
.palet-kosong { padding: 16px; color: var(--muted); font-size: 13px; margin: 0; }

/* ---------- Dock HP melayang ---------- */
.dock { display: none; }

/* ---------- Lebar menengah ---------- */
@media (max-width: 1020px) {
  .hero-grid { grid-template-columns: 1fr 1fr; }
  .bal-main { grid-column: 1 / -1; }
  .rep-grid { grid-template-columns: 1fr; }
}

/* ---------- Layar sempit ---------- */
@media (max-width: 760px) {
  .samping { display: none; }
  .sembunyi-hp { display: none; }
  .bilah-atas { padding: 10px 14px; flex-wrap: wrap; row-gap: 8px; }
  .aksi-atas { order: 3; flex: 1 1 100%; }
  .aksi-atas .pemilih-periode { flex: 1; }
  .aksi-atas .pemilih-periode button { flex: 1; }
  .crumb { min-width: 0; flex: 1 1 auto; }
  .crumb b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .crumb .keluar-hp { display: inline-flex; margin-left: auto; flex: none; min-height: 36px; }
  .konten { padding: 18px 14px 120px; }
  .tab-modul { padding: 10px 14px 0; }
  .tab-modul a { font-size: 12.5px; padding: 6px 11px; }
  .pemilih-periode button { padding: 5px 8px; font-size: 12px; }
  .panel-row { grid-template-columns: 1fr; }
  .akun-grid { grid-template-columns: 1fr; }
  .kepala-halaman h1 { font-size: 23px; }
  .kartu { padding: 16px; }
  .kartu-tabel { padding: 0; }
  .panel { padding: 16px; }
  dl.rincian { grid-template-columns: 118px 1fr; }
  .hero-grid { grid-template-columns: 1fr; }
  .bal-main .bal-num { font-size: 28px; }
  .stat-row { grid-template-columns: 1fr 1fr; }
  .neraca-stat { grid-template-columns: 1fr; }
  .neraca-duo { grid-template-columns: 1fr; }
  .searchbox { margin-left: 0; width: 100%; }
  .searchbox input { width: 100%; }

  /* Zona label dan sub statistik bertinggi tetap: angka sejajar
     antar kartu dalam satu strip walau label membungkus dua baris. */
  .stat > span:not(.stat-sub) { display: block; min-height: 36px; }
  .stat .stat-sub { min-height: 36px; }

  table.tabel thead { display: none; }
  table.tabel, table.tabel tbody, table.tabel tr, table.tabel td { display: block; width: 100%; }
  table.tabel tbody tr { padding: 10px 4px; border-bottom: 1px solid var(--line-2); }
  table.tabel tbody tr:last-child { border-bottom: 0; }
  table.tabel td {
    border: 0; padding: 3px 8px; min-height: 27px;
    display: flex; justify-content: space-between; gap: 14px; align-items: center;
  }
  table.tabel td::before {
    content: attr(data-l); font-size: 11px; text-transform: uppercase;
    letter-spacing: .05em; color: var(--faint); font-weight: 700;
  }
  table.tabel td.kanan { text-align: right; }
  table.tabel td input, table.tabel td select { max-width: 62%; }
  table.tabel td .baris-aksi { margin: 0; }
  .baris-kosong td { display: block; text-align: center; }
  .baris-kosong td::before { content: none; }

  .dock {
    display: flex; position: fixed; left: 10px; right: 10px;
    bottom: calc(10px + env(safe-area-inset-bottom)); z-index: 50;
    background: var(--sidebar); border-radius: 18px; padding: 6px;
    box-shadow: var(--shadow-lg); justify-content: space-around;
  }
  .dock button {
    flex: 1; border: 0; background: transparent; color: var(--sidebar-muted);
    font-size: 9.5px; font-weight: 600;
    display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 1px; border-radius: 12px; min-height: 48px;
  }
  .dock button.aktif { background: rgba(255,255,255,.1); color: #fff; }
}

/* Bilah alat daftar menjadi grid label + medan yang berpasangan
   sampai lebar tablet potret: judul, tab, cari, petunjuk, dan
   tautan membentang penuh; setiap label duduk di kolom tetap dan
   medannya sejajar di kolom isi. Di atas lebar ini bilah alat
   desktop muat tanpa membungkus pasangan. */
@media (max-width: 900px) {
  .table-tools {
    display: grid; grid-template-columns: 104px 1fr;
    align-items: center; gap: 8px 10px;
  }
  .table-tools .judul-alat { grid-column: 1 / -1; }
  .table-tools .tabs { grid-column: 1 / -1; }
  .table-tools .searchbox { grid-column: 1 / -1; }
  .table-tools .petunjuk { grid-column: 1 / -1; }
  .table-tools .taut-panel { grid-column: 1 / -1; justify-self: end; }
  .table-tools .grup-ekspor { grid-column: 1 / -1; justify-self: end; }
  .table-tools > .btn.kecil { grid-column: 1 / -1; justify-self: start; }
  .table-tools input[type="date"] { width: 100%; }
  .table-tools select { width: 100%; }
  .tabs {
    overflow-x: auto; scrollbar-width: none; max-width: 100%;
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
    mask-image: linear-gradient(to right, #000 calc(100% - 20px), transparent);
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs button { flex: none; }
}

/* Layar sangat sempit: teks tombol utama disembunyikan supaya
   bilah atas tidak melebar melewati viewport 360px. */
@media (max-width: 560px) {
  .bilah-atas { gap: 6px; }
  .bilah-atas .teks-cta { display: none; }
  .bilah-atas .btn.gelap { padding: 8px 10px; height: 36px; box-sizing: border-box; }
  .pemilih-periode button { padding: 5px 7px; font-size: 11.5px; }
  /* Kartu statistik dua kolom: nilai rupiah panjang tidak boleh
     memaksa kolom melewati lebar layar (min-content grid). */
  .stat { min-width: 0; padding: 13px 14px; }
  .stat b { font-size: 16px; }
}

/* Permukaan kelompok Pindah Semuanya (5 Desember 2026): daftar
   centang untuk pemilih faktur, anggota grup, dan cakupan
   token; matriks izin grup akses memakai tabel yang sama
   dengan sel centang di tengah. */
.daftar-centang { display: flex; flex-direction: column; gap: 6px; }
.baris-centang {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--hatch-widget-text, inherit); cursor: pointer;
}
.baris-centang input[type='checkbox'] { width: 16px; height: 16px; flex: none; }
.tabel.matriks-izin td input[type='checkbox'] { width: 16px; height: 16px; }
.tabel td input[type='checkbox'] { vertical-align: middle; }

/* ---------- Perbaikan GAS AUDIT KERING Jalur C (5 Des 2026) ---------- */
/* Kotak centang tidak mewarisi tinggi medan teks global. */
input[type='checkbox'] { min-height: 0; width: 16px; height: 16px; padding: 0; flex: none; }
.daftar-centang { gap: 2px; }
.baris-centang { min-height: 36px; padding: 5px 0; margin: 0; }
/* Pesan galat di dalam kartu tabel tidak menempel tepi kartu. */
.kartu-tabel > .pesan, .kartu-tabel .pesan.galat { margin: 14px 18px; }
/* Keadaan kosong di tengah kartu pada semua ukuran. */
.baris-kosong td { text-align: center; }
.kartu > .petunjuk.dalam:only-child { text-align: center; padding: 26px 18px; }
/* Penanda pudar gulir tabel pada lebar tablet dan HP. */
@media (max-width: 1020px) {
  .bungkus-tabel {
    -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 18px), rgba(0,0,0,.45));
    mask-image: linear-gradient(to right, #000 calc(100% - 18px), rgba(0,0,0,.45));
  }
}
/* Medan saring tidak meluap dari kartu pada 360px. */
.grid-medan { grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); }
.table-tools input[type='date'], .table-tools select { min-width: 0; }
.kartu { max-width: 100%; }
/* Input berkas bergaya mengikuti sistem, bukan bawaan peramban. */
input[type='file'] {
  padding: 6px 10px; font-size: 13px; color: var(--ink-2);
  background: var(--surface-2); cursor: pointer;
}
input[type='file']::file-selector-button {
  font-family: inherit; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 7px; padding: 5px 10px; margin-right: 10px; cursor: pointer;
}
/* Contoh JSON terbaca: bungkus kata panjang di dalam token. */
textarea { white-space: pre-wrap; overflow-wrap: anywhere; }
/* Kotak cari katalog dan daftar tidak terpotong di desktop. */
.searchbox { flex: 1 1 220px; max-width: 420px; }
.searchbox input { flex: 1; width: auto; min-width: 0; }
/* Baris katalog: kode tidak membungkus dua baris. */
table.tabel td.mono, table.tabel td .inv-id { white-space: nowrap; }
/* Judul detail: nomor dokumen tidak memaksa dua baris besar. */
.kepala-halaman h1 .kepala-nomor { display: inline-block; max-width: 100%; }
select { max-width: 100%; }
.medan select { width: 100%; }
