/* UD Sari Bulan Utama — tema hijau sesuai logo SBU */

/* Font lokal di assets/fonts (SIL OFL 1.1, tidak perlu internet), subset Latin.
   Aktif: Plus Jakarta Sans. Inter tetap tersedia untuk perbandingan: ganti --font-utama di bawah. */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/inter-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('../fonts/inter-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('../fonts/inter-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('../fonts/inter-latin-700-normal.woff2') format('woff2'); }

:root {
    /* Font utama dulu; kalau gagal dimuat, jatuh ke font sistem. Untuk kembali ke Inter: ubah --font-utama jadi 'Inter'. */
    --font-utama: 'Plus Jakarta Sans';
    --bs-body-font-family: var(--font-utama), system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    --bs-font-sans-serif: var(--bs-body-font-family);
    --bs-body-font-weight: 400;
    --sbu-green: #2f9e44;
    --sbu-green-dark: #1f6f31;
    --sbu-green-deep: #14492a;
    --sbu-green-soft: #e8f5ec;
    --sbu-amber: #e8a317;
    --sbu-blue: #3b82c4;
    --sbu-bg: #f3f6f4;
    --sbu-card: #ffffff;
    --sbu-ink: #1d2a22;
    --sbu-muted: #6b7a71;
    --sbu-line: #e1e8e3;
    --sbu-up: #1f8a3b;
    --sbu-down: #c63d3d;
}

/* Ukuran dasar teks (semua ukuran lain berbasis rem, jadi mengikuti nilai ini). Bawaan browser = 16px. */
html { font-size: 14.5px; }
html, body { height: 100%; }
body {
    background: var(--sbu-bg);
    color: var(--sbu-ink);
    font-size: .925rem;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

/* ---------- Layout: footer selalu di dasar ---------- */
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
.app-content { flex: 1 0 auto; padding-top: 1.5rem; padding-bottom: 2rem; }

/* ---------- Topnavbar ---------- */
.app-topnav {
    background: linear-gradient(90deg, var(--sbu-green-deep), var(--sbu-green-dark));
    box-shadow: 0 1px 8px rgba(0, 0, 0, .15);
    padding-top: .4rem;
    padding-bottom: .4rem;
}
.app-topnav__brand { display: flex; align-items: center; gap: .6rem; font-weight: 600; letter-spacing: .2px; }
.app-topnav .nav-link { color: rgba(255, 255, 255, .78); padding: .55rem .9rem; border-radius: .4rem; }
.app-topnav .nav-link:hover { color: #fff; background: rgba(255, 255, 255, .08); }
.app-topnav .nav-link.active { color: #fff; background: rgba(255, 255, 255, .16); }
.app-topnav__menu { min-width: 12rem; }
.app-topnav__menu .dropdown-header { color: var(--sbu-green-dark); font-weight: 600; }
.app-topnav__menu .dropdown-item:active { background: var(--sbu-green); }
.app-topnav__role { font-size: .72rem; opacity: .75; }
.app-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    background: #fff; color: var(--sbu-green-dark); font-weight: 700;
}

/* ---------- Footer ---------- */
.app-footer {
    flex-shrink: 0;
    background: #fff;
    border-top: 1px solid var(--sbu-line);
    color: var(--sbu-muted);
    font-size: .8rem;
    padding: .9rem 0;
}

/* ---------- Judul halaman ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; margin-bottom: 1rem; flex-wrap: wrap; }
.page-title { font-size: 1.35rem; font-weight: 700; margin: 0; }
.page-sub { margin: .15rem 0 0; color: var(--sbu-muted); }
.page-actions { display: flex; gap: .5rem; }

/* ---------- Tombol ---------- */
.btn-sbu { background: var(--sbu-green); border-color: var(--sbu-green); color: #fff; }
.btn-sbu:hover, .btn-sbu:focus { background: var(--sbu-green-dark); border-color: var(--sbu-green-dark); color: #fff; }
.btn-outline-sbu { color: var(--sbu-green-dark); border-color: var(--sbu-green); background: #fff; }
.btn-outline-sbu:hover { background: var(--sbu-green); border-color: var(--sbu-green); color: #fff; }

/* ---------- Panel / kartu ---------- */
.panel {
    background: var(--sbu-card);
    border: 1px solid var(--sbu-line);
    border-radius: .6rem;
    padding: 1rem 1.1rem;
}
.panel__title { font-size: .95rem; font-weight: 600; margin: 0 0 .8rem; display: flex; align-items: baseline; gap: .5rem; }
.panel__title span { font-weight: 400; font-size: .78rem; color: var(--sbu-muted); }
.panel__link { margin-left: auto; font-size: .78rem; font-weight: 400; color: var(--sbu-green-dark); text-decoration: none; }
.panel__link:hover { text-decoration: underline; }
.empty { color: var(--sbu-muted); text-align: center; padding: 1.5rem 0; margin: 0; }

/* ---------- KPI dashboard ---------- */
.kpi {
    display: flex; flex-direction: column; gap: .15rem;
    background: var(--sbu-card);
    border: 1px solid var(--sbu-line);
    border-left: 4px solid var(--kpi, var(--sbu-green));
    border-radius: .6rem;
    padding: .9rem 1rem;
    color: inherit; text-decoration: none; height: 100%;
}
a.kpi:hover { box-shadow: 0 3px 12px rgba(20, 73, 42, .12); }
.kpi--jual { --kpi: var(--sbu-green); }
.kpi--beli { --kpi: var(--sbu-amber); }
.kpi--prod { --kpi: var(--sbu-blue); }
.kpi--avg  { --kpi: #8a6fc7; }
.kpi__label { font-size: .78rem; color: var(--sbu-muted); text-transform: uppercase; letter-spacing: .4px; }
.kpi__value { font-size: 1.45rem; font-weight: 700; line-height: 1.2; }
.kpi__meta { font-size: .78rem; color: var(--sbu-muted); display: flex; flex-wrap: wrap; gap: .1rem .5rem; align-items: center; }
.kpi__delta { font-weight: 600; }
.kpi__delta.is-up { color: var(--sbu-up); }
.kpi__delta.is-down { color: var(--sbu-down); }

.chart-box { position: relative; height: 260px; }

.table-mini th { font-size: .75rem; text-transform: uppercase; color: var(--sbu-muted); font-weight: 600; border-bottom-width: 1px; }
.table-mini td { font-size: .85rem; }

/* ---------- Laporan ---------- */
.nav-tabs-sbu { display: flex; gap: .25rem; border-bottom: 2px solid var(--sbu-line); list-style: none; padding: 0; }
.nav-tabs-sbu .nav-link { color: var(--sbu-muted); padding: .5rem 1rem; border-bottom: 2px solid transparent; margin-bottom: -2px; font-weight: 500; }
.nav-tabs-sbu .nav-link:hover { color: var(--sbu-green-dark); }
.nav-tabs-sbu .nav-link.active { color: var(--sbu-green-dark); border-bottom-color: var(--sbu-green); }

.filter-form .form-label { font-size: .75rem; color: var(--sbu-muted); margin-bottom: .15rem; }

.stat { background: var(--sbu-green-soft); border-radius: .5rem; padding: .6rem .9rem; display: flex; flex-direction: column; }
.stat__label { font-size: .75rem; color: var(--sbu-green-dark); }
.stat__value { font-size: 1.15rem; font-weight: 700; color: var(--sbu-green-deep); }

.table-tools { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .7rem 1rem; border-bottom: 1px solid var(--sbu-line); }
.table-tools .form-control { max-width: 18rem; }

.table-scroll { max-height: 68vh; overflow: auto; }
.table-sbu { font-size: .85rem; }
.table-sbu thead th {
    position: sticky; top: 0; z-index: 2;
    background: var(--sbu-green-deep); color: #fff; font-weight: 600; white-space: nowrap;
    border-bottom: 0;
}
.table-sbu tbody td { white-space: nowrap; }
.table-sbu tbody td:nth-child(n+3) { white-space: normal; }
.table-sbu tfoot td {
    position: sticky; bottom: 0; background: var(--sbu-green-soft);
    font-weight: 700; border-top: 2px solid var(--sbu-green); white-space: nowrap;
}
.table-sbu .col-no { width: 3rem; text-align: center; }
.table-sbu tr.is-clickable { cursor: pointer; }
.table-sbu tbody tr[hidden] { display: none; }

.detail-head dt { color: var(--sbu-muted); font-weight: 500; font-size: .8rem; }
.detail-head dd { margin-bottom: .4rem; }

/* ---------- Login ---------- */
.login-body { background: linear-gradient(135deg, var(--sbu-green-deep), var(--sbu-green) 70%); }
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: .9rem; padding: 2rem 1.75rem; box-shadow: 0 12px 40px rgba(0, 0, 0, .25); text-align: center; }
.login-card form { text-align: left; }
.login-card__logo { height: 72px; margin-bottom: .75rem; }
.login-card__title { font-size: 1.25rem; font-weight: 700; margin: 0; }
.login-card__tagline { color: var(--sbu-muted); font-size: .82rem; margin: .25rem 0 1.5rem; }
.login-card__footer { color: var(--sbu-muted); font-size: .75rem; margin: 1.5rem 0 0; }
.login-card .form-control:focus { border-color: var(--sbu-green); box-shadow: 0 0 0 .2rem rgba(47, 158, 68, .2); }

/* ---------- Cetak ---------- */
@media print {
    .app-topnav, .app-footer, .page-actions, .nav-tabs-sbu, .filter-form, .table-tools { display: none !important; }
    body { background: #fff; }
    .app-content { padding: 0; }
    .table-scroll { max-height: none; overflow: visible; }
    .table-sbu thead th { position: static; background: #eee !important; color: #000; }
    .table-sbu tfoot td { position: static; }
    .panel { border: 0; padding: 0; }
}

/* ---------- Header tabel 2 baris ---------- */
.table-sbu thead th { vertical-align: middle; }
.table-sbu thead tr:first-child th { height: 2.4rem; }
.table-sbu thead tr.thead-sub th { top: 2.4rem; background: var(--sbu-green-dark); }
.table-sbu thead tr:first-child th[colspan] { border-bottom: 1px solid rgba(255, 255, 255, .25); }

/* ---------- Tabel gaya ringan (.table-lite): header terang, zebra, garis horizontal ---------- */
.table-lite {
    --bs-table-bg: transparent;
    --bs-table-hover-bg: #e9f5ee;
    --bs-table-hover-color: var(--sbu-ink);
    font-variant-numeric: tabular-nums;
}
.table-lite thead th {
    background: #c8e4d0;
    color: var(--sbu-green-deep);
    font-weight: 600;
    border-bottom: 2px solid var(--sbu-green);
    border-left: 1px solid #a9d0b5;
}
.table-lite thead th:first-child { border-left: 0; }
.table-lite thead tr:first-child th[colspan] {
    font-size: .72rem; text-transform: uppercase; letter-spacing: .6px;
    border-bottom: 1px solid #a9d0b5;
}
.table-lite thead tr.thead-sub th { background: #dcefe2; color: var(--sbu-green-dark); border-bottom: 2px solid var(--sbu-green); }
.table-lite tbody td { border-bottom: 1px solid var(--sbu-line); }
.table-lite tbody tr.is-alt > * { background: #f8fbf9; }
.table-lite tbody tr:hover > * { background: var(--bs-table-hover-bg); }
.table-lite td.is-zero { color: #b5c0b9; }
.table-lite td.is-neg { color: var(--sbu-down); font-weight: 600; }

@media print {
    .table-lite th, .table-lite td { border: 1px solid #999 !important; }
}

/* ---------- Popup History Stock ---------- */
.history-title { font-family: Georgia, 'Times New Roman', serif; font-size: 1.15rem; font-weight: 400; text-align: center; margin: 0 0 .6rem; letter-spacing: .5px; text-transform: uppercase; }
.history-box { border: 1px solid var(--sbu-line); border-radius: .4rem; min-height: 14rem; max-height: 55vh; overflow: auto; }
.history-table thead th { position: sticky; top: 0; }
.history-table td.history-gap { height: 1.2rem; padding: 0; border-bottom: 0; }
.history-table tr.history-total td { font-weight: 700; border-bottom: 0; }
.history-table tbody td { white-space: normal; }

/* ---------- Data Produksi ---------- */
.table-sbu tbody td.td-wrap { white-space: pre-line; }
.table-lite tbody tr.row-neg > * { background: #fce4e4; }
.table-lite tbody tr.row-neg:hover > * { background: #f9d3d3; }
.table-lite tbody tr.row-neg td.is-neg { color: var(--sbu-down); }
.detail-section { font-size: .8rem; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--sbu-green-dark); margin: 1rem 0 .4rem; }
.detail-section:first-of-type { margin-top: 0; }
.table-detail tr.detail-total td { font-weight: 700; border-bottom: 0; }

/* ---------- Datepicker (dd/mm/yyyy) ---------- */
.datepick { position: relative; }
.dp-pop {
    position: absolute; z-index: 1060; top: calc(100% + 4px); left: 0; width: 17.5rem;
    background: #fff; border: 1px solid var(--sbu-line); border-radius: .6rem; padding: .6rem;
    box-shadow: 0 8px 24px rgba(20, 73, 42, .18);
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.dp-judul { font-weight: 600; color: var(--sbu-green-deep); }
.dp-nav { border: 0; background: transparent; width: 2rem; height: 2rem; border-radius: .4rem; font-size: 1.2rem; line-height: 1; color: var(--sbu-green-dark); }
.dp-nav:hover { background: var(--sbu-green-soft); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dp-hari { font-size: .7rem; font-weight: 600; color: var(--sbu-muted); padding: .2rem 0; }
.dp-tgl { border: 0; background: transparent; border-radius: .4rem; height: 2rem; font-size: .85rem; color: var(--sbu-ink); }
.dp-tgl:hover:not(:disabled) { background: var(--sbu-green-soft); }
.dp-tgl.is-today { box-shadow: inset 0 0 0 1px var(--sbu-green); }
.dp-tgl.is-selected { background: var(--sbu-green); color: #fff; font-weight: 600; }
.dp-tgl:disabled { color: #c3cbc6; cursor: not-allowed; }
.dp-foot { text-align: center; margin-top: .4rem; border-top: 1px solid var(--sbu-line); padding-top: .4rem; }
.dp-hariini { border: 0; background: transparent; color: var(--sbu-green-dark); font-size: .8rem; font-weight: 600; }
.dp-hariini:hover { text-decoration: underline; }

/* ---------- Popup edit pembelian ---------- */
.beli-cari { position: relative; max-width: 32rem; }
.beli-cari__hasil { position: absolute; z-index: 1070; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--sbu-line); border-radius: .4rem; box-shadow: 0 8px 24px rgba(20, 73, 42, .18); max-height: 14rem; overflow: auto; }
.beli-cari__item { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: .4rem .7rem; font-size: .85rem; }
button.beli-cari__item:hover { background: var(--sbu-green-soft); }
.beli-items { max-height: 38vh; overflow: auto; border: 1px solid var(--sbu-line); border-radius: .4rem; }
.beli-items .form-control { min-width: 5rem; }
.beli-total { text-align: right; }
.beli-total span { color: var(--sbu-muted); margin-right: .5rem; }
.beli-total strong { font-size: 1.05rem; color: var(--sbu-green-deep); }

/* Popup Riwayat Stok: kolom Keterangan paling lebar, Tanggal & Qty ringkas */
.history-table { table-layout: fixed; width: 100%; }
.history-table th:nth-child(1), .history-table td:nth-child(1) { width: 2.8rem; }
.history-table th:nth-child(2), .history-table td:nth-child(2) { width: 6.6rem; }
.history-table th:nth-child(4), .history-table td:nth-child(4) { width: 4.2rem; }
.history-table td:nth-child(3) { overflow-wrap: anywhere; }

/* ---------- Popup pembayaran: bagian-bagian form ---------- */
.form-section { border: 1px solid var(--sbu-line); border-radius: .55rem; padding: .85rem 1rem 1rem; margin-bottom: .9rem; background: #fbfdfc; }
.form-section__title { font-size: .72rem; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--sbu-green-dark); margin: 0 0 .7rem; padding-bottom: .4rem; border-bottom: 1px solid var(--sbu-line); }
.form-section__sep { margin: .9rem 0; border: 0; border-top: 1px dashed var(--sbu-line); opacity: 1; }
.form-section .form-label { margin-bottom: .2rem; }

/* ---------- Tombol Action Bayar (belum lunas) vs Riwayat (lunas) ---------- */
.btn.btn-aksi-belum { background: #e8590c; border-color: #e8590c; color: #fff; font-weight: 600; }
.btn.btn-aksi-belum:hover, .btn.btn-aksi-belum:focus { background: #c94a08; border-color: #c94a08; color: #fff; }
.btn.btn-aksi-lunas { background: var(--sbu-green-soft); border-color: var(--sbu-green); color: var(--sbu-green-dark); }
.btn.btn-aksi-lunas:hover, .btn.btn-aksi-lunas:focus { background: var(--sbu-green); border-color: var(--sbu-green); color: #fff; }

/* ---------- Sumber data: Realtime / Arsip ---------- */
.sumber-btn { display: inline-flex; align-items: center; gap: .45rem; color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .3); border-radius: 999px; padding: .25rem .8rem; font-weight: 600; }
.sumber-btn:hover, .sumber-btn:focus, .sumber-btn.show { color: #fff; background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .5); }
.sumber-btn__dot { width: .55rem; height: .55rem; border-radius: 50%; background: #6bdc84; box-shadow: 0 0 0 3px rgba(107, 220, 132, .25); flex: none; }
.sumber-btn--arsip { background: #ffd43b; border-color: #ffd43b; color: #3b2f00; }
.sumber-btn--arsip:hover, .sumber-btn--arsip:focus, .sumber-btn--arsip.show { background: #ffe066; border-color: #ffe066; color: #3b2f00; }
.sumber-btn--arsip .sumber-btn__dot { background: #3b2f00; box-shadow: 0 0 0 3px rgba(59, 47, 0, .2); }


/* Mode arsip: navbar berganti warna (biru-abu) dan ada pita peringatan di bawahnya */
.app-topnav--arsip { background: linear-gradient(90deg, #2b3a55, #3d5a80); }
.arsip-bar { background: #fff3bf; border-bottom: 2px solid #f0b400; color: #3b2f00; padding: .5rem 0; font-size: .85rem; }
.arsip-bar__badge { background: #3b2f00; color: #ffd43b; font-weight: 700; letter-spacing: .6px; border-radius: .3rem; padding: .1rem .55rem; }
.arsip-bar__pratinjau { background: rgba(59, 47, 0, .08); border: 1px dashed #b38600; border-radius: .3rem; padding: .05rem .5rem; font-size: .78rem; }
body.mode-arsip { background: #f1f3f7; }
body.mode-arsip .app-footer { border-top-color: #f0b400; }

/* ---------- Login: Sumber data (dipilih lebih dulu) ---------- */
.login-sumber__info { font-size: .78rem; color: var(--sbu-muted); margin-top: .3rem; text-align: left; }
.login-card { border-top: 4px solid transparent; transition: border-color .2s; }
.login-card--arsip { border-top-color: #f0b400; }
.login-card--arsip .login-sumber .form-select { border-color: #f0b400; background-color: #fff9db; }
.login-card--arsip .login-sumber__info { color: #7a5c00; font-weight: 600; }
.login-card--arsip .btn-sbu { background: #3d5a80; border-color: #3d5a80; }
.login-card--arsip .btn-sbu:hover, .login-card--arsip .btn-sbu:focus { background: #2b3a55; border-color: #2b3a55; }

/* Lencana status sumber data di navbar (hanya tampilan, bukan tombol) */
.sumber-badge { cursor: default; user-select: none; }
.sumber-badge:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); color: #fff; }
.sumber-badge.sumber-btn--arsip:hover { background: #ffd43b; border-color: #ffd43b; color: #3b2f00; }
.sumber-btn { white-space: nowrap; }

/* =====================================================================================================
   PONSEL (< 576px): tabel laporan tampil sebagai kartu, filter tambahan dilipat, target sentuh besar.
   Label tiap kolom diambil dari atribut data-label pada sel. Hanya berlaku untuk #tabelLaporan.
   ===================================================================================================== */
@media (max-width: 575.98px) {
    /* ---- Filter: periode selalu terlihat, filter lain dilipat lewat tombol "Filter lainnya" */
    .filter-form .filter-extra { display: none; }
    .filter-form.filter-buka .filter-extra { display: block; }
    .filter-form .form-control-sm, .filter-form .form-select-sm { min-height: 42px; font-size: 1rem; }
    .filter-form .btn { min-height: 44px; }
    .btn-filter-toggle::after { content: ' ▾'; }
    .filter-form.filter-buka .btn-filter-toggle::after { content: ' ▴'; }
    .table-tools { flex-wrap: wrap; gap: .5rem; padding: .6rem .75rem; }
    .table-tools .form-control { max-width: none; flex: 1 1 100%; min-height: 42px; font-size: 1rem; }

    /* ---- Tabel -> kartu */
    .table-scroll { max-height: none; overflow: visible; }
    #tabelLaporan, #tabelLaporan tbody, #tabelLaporan tfoot { display: block; width: 100%; }
    #tabelLaporan thead { display: none; }
    #tabelLaporan tbody { padding: .5rem; }
    #tabelLaporan tbody tr, #tabelLaporan tfoot tr {
        display: grid; grid-template-columns: 1fr 1fr; gap: .45rem .75rem;
        margin: 0 0 .6rem; padding: .7rem .8rem;
        background: #fff; border: 1px solid var(--sbu-line); border-radius: 10px;
    }
    #tabelLaporan tbody tr[hidden], #tabelLaporan tbody tr.m-sembunyi { display: none; }
    #tabelLaporan tbody tr.row-neg { background: #fce4e4; }
    #tabelLaporan tbody tr.is-clickable:active { background: var(--sbu-green-soft); }

    #tabelLaporan td, #tabelLaporan th {
        display: block; padding: 0; border: 0; background: transparent !important; box-shadow: none !important;
        text-align: left !important; white-space: normal !important; font-size: .9rem; min-width: 0; overflow-wrap: anywhere;
    }
    #tabelLaporan td::before {
        content: attr(data-label); display: block;
        font-size: .68rem; text-transform: uppercase; letter-spacing: .03em; color: var(--sbu-muted); line-height: 1.2;
    }
    #tabelLaporan td.col-no { display: none; }
    /* kolom pertama = judul kartu; kolom teks panjang selebar kartu */
    #tabelLaporan td { order: 2; }                                   /* kolom pendek (tanggal, angka) berdampingan */
    #tabelLaporan td.td-judul { order: 1; grid-column: 1 / -1; font-weight: 700; font-size: 1rem; color: var(--sbu-green-dark); }
    #tabelLaporan td.td-judul::before { content: none; }
    #tabelLaporan td.td-lebar { order: 3; grid-column: 1 / -1; }      /* teks panjang di bawahnya, selebar kartu */
    #tabelLaporan td.is-zero { color: #b5c0b9; }

    /* ---- Tombol aksi: besar & lebar penuh */
    #tabelLaporan td.td-aksi { order: 4; grid-column: 1 / -1; display: flex; gap: .5rem; margin-top: .25rem; }
    #tabelLaporan td.td-aksi::before { content: none; }
    #tabelLaporan td.td-aksi .btn { flex: 1 1 0; min-height: 44px; padding: .45rem .6rem !important; font-size: .95rem; }

    /* ---- Total di ujung daftar */
    #tabelLaporan tfoot tr { background: var(--sbu-green-soft); border-color: var(--sbu-green); }
    #tabelLaporan tfoot td:not([data-total]):not(.td-judul) { display: none; }
    #tabelLaporan tfoot td[data-total] { font-weight: 700; }
}
