/* ==========================================================================
   SIMKEU KAMPUNG — dasbor keuangan kampung
   Tema: hijau pemerintah + emas, kartu putih di atas latar sejuk.
   Catatan penting: JANGAN memakai overflow-x:hidden pada body
   (mematikan position:sticky pada topbar & sidebar). Yang diberi html.
   ========================================================================== */

:root {
    --bg: #F2F6F4;
    --ink: #0F211C;
    --ink-2: #34473F;
    --muted: #6C8079;
    --line: #E0E9E4;
    --line-2: #EEF3F0;
    --card: #FFFFFF;
    --green: #0E8C6A;
    --green-d: #0A6B51;
    --green-l: #E7F5EF;
    --teal: #127C8C;
    --gold: #C8901F;
    --gold-l: #FBF3DE;
    --amber: #B8770A;
    --ok: #12814F;
    --warn: #B8770A;
    --bad: #BE3A2B;
    --bad-l: #FCECE9;
    --side-1: #0B302A;
    --side-2: #08211D;
    --r-lg: 18px;
    --r: 14px;
    --r-sm: 10px;
    --shadow: 0 1px 2px rgba(15, 33, 28, .05), 0 16px 36px -30px rgba(15, 33, 28, .55);
    --shadow-sm: 0 1px 2px rgba(15, 33, 28, .06);
    --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
    --font: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --head: 'Plus Jakarta Sans', 'Inter', system-ui, sans-serif;
    --side-w: 268px;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    font-family: var(--font);
    font-size: 14.2px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

body.app {
    background:
        radial-gradient(860px 520px at 100% -6%, #E3F1EA 0%, rgba(227, 241, 234, 0) 60%),
        radial-gradient(700px 480px at 0% 100%, #EDF3FF 0%, rgba(237, 243, 255, 0) 62%),
        var(--bg);
    background-attachment: fixed;
}

h1, h2, h3, h4 { font-family: var(--head); margin: 0; line-height: 1.25; letter-spacing: -.012em; }
a { color: var(--green-d); text-decoration: none; }
a:hover { color: var(--green); }
.i { flex: 0 0 auto; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.hint { color: var(--muted); font-size: 12.4px; margin: 8px 0 10px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------------ cangkang */

.shell {
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
    min-height: 100vh;
}

.side {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px 16px;
    background: linear-gradient(172deg, var(--side-1), var(--side-2) 82%);
    color: rgba(255, 255, 255, .78);
    z-index: 60;
    overflow-y: auto;
    scrollbar-width: thin;
}
.side::after {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 320px;
    background: radial-gradient(420px 200px at 20% 0%, rgba(232, 163, 60, .14), rgba(232, 163, 60, 0) 70%);
    pointer-events: none;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 2px 4px 8px; position: relative; z-index: 1; }
.brand-mark {
    width: 42px; height: 42px; flex: 0 0 auto;
    display: grid; place-items: center;
    color: #F3D08A;
    border-radius: 13px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .14);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12);
}
.brand-txt strong { display: block; font-family: var(--head); font-size: 14px; letter-spacing: .1em; color: #fff; }
.brand-txt small { display: block; font-size: 11.4px; color: rgba(255, 255, 255, .58); letter-spacing: .02em; }

.desa-switch, .desa-chip {
    position: relative; z-index: 1;
    background: rgba(255, 255, 255, .07);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 12px;
    padding: 10px 11px;
}
.desa-switch label {
    display: flex; align-items: center; gap: 6px;
    font-size: 10.6px; font-weight: 600; letter-spacing: .09em;
    text-transform: uppercase; color: rgba(255, 255, 255, .55);
    margin-bottom: 6px;
}
.desa-switch .sel-wrap select {
    background: rgba(255, 255, 255, .94);
    color: var(--ink);
    border: 1px solid rgba(255, 255, 255, .18);
    font-weight: 600;
    font-size: 12.8px;
    padding: 7px 28px 7px 9px;
}
.desa-chip { display: flex; align-items: center; gap: 9px; color: rgba(255, 255, 255, .82); }
.desa-chip svg { color: #F3D08A; }
.desa-chip strong { display: block; font-family: var(--head); font-size: 13.4px; color: #fff; }
.desa-chip small { display: block; font-size: 11.4px; color: rgba(255, 255, 255, .58); }

.desa-lock {
    position: relative; z-index: 1;
    display: flex; align-items: center; gap: 5px;
    margin: -6px 2px 2px;
    font-size: 10.8px; line-height: 1.4;
    color: rgba(255, 255, 255, .48);
}
.desa-chip small { white-space: normal; }

.nav { display: flex; flex-direction: column; gap: 2px; position: relative; z-index: 1; }
.nav-lab {
    font-size: 10px; font-weight: 700; letter-spacing: .14em;
    text-transform: uppercase; color: rgba(255, 255, 255, .38);
    padding: 8px 12px 6px;
}
.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 9px 12px; border-radius: 11px;
    color: rgba(255, 255, 255, .72); font-size: 13.4px; font-weight: 500;
    transition: background .16s, color .16s;
}
.nav-item:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.nav-item.on {
    background: rgba(255, 255, 255, .13);
    color: #fff; font-weight: 600;
    box-shadow: inset 2px 0 0 #E8B04A;
}
.nav-item.on .nav-ico { color: #F3D08A; }
.nav-ico { display: grid; place-items: center; color: rgba(255, 255, 255, .62); }
.nav-item.on .nav-ico { color: #F3D08A; }
.nav-txt { flex: 1 1 auto; min-width: 0; }
.nav-count {
    font-family: var(--mono); font-size: 10.6px; font-weight: 600;
    padding: 1px 7px; border-radius: 20px;
    background: rgba(255, 255, 255, .14); color: #fff;
}
.nav-count.warn { background: #C8901F; color: #21170A; }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 9px; position: relative; z-index: 1; }
.side-note {
    display: flex; align-items: center; gap: 8px;
    font-size: 12px; color: #F3D08A;
    background: rgba(232, 163, 60, .12);
    border: 1px solid rgba(232, 163, 60, .26);
    border-radius: 10px; padding: 8px 10px;
}
.side-note:hover { color: #FFE6B4; }
.side-user { display: flex; align-items: center; gap: 10px; padding: 8px 4px 2px; border-top: 1px solid rgba(255, 255, 255, .1); }
.side-user strong { display: block; font-size: 12.8px; color: #fff; font-weight: 600; }
.side-user small { display: block; font-size: 11px; color: rgba(255, 255, 255, .5); }
.side-user .ava { background: rgba(255, 255, 255, .13); color: #F3D08A; }
.logout-form { margin: 0; }

.main { min-width: 0; display: flex; flex-direction: column; min-height: 100vh; }

/* Tombol penutup sidebar hanya dipakai di layar kecil; tanpa aturan ini ia
   ikut mengambil kolom grid dan mendorong .main ke baris berikutnya. */
.scrim-side { display: none; }

.topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 14px;
    padding: 13px 26px;
    background: rgba(255, 255, 255, .84);
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--line);
}
.tb-title { min-width: 0; flex: 1 1 auto; }
.tb-title h1 { font-size: 18.5px; font-weight: 700; }
.tb-title p { margin: 2px 0 0; font-size: 12.4px; color: var(--muted); }
.tb-right { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; justify-content: flex-end; }
.tb-chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.8px; font-weight: 600; color: var(--green-d);
    background: var(--green-l); border: 1px solid #CFE9DE;
    padding: 5px 10px; border-radius: 20px;
    max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.tb-chip.tb-tahun { color: #8A6410; background: var(--gold-l); border-color: #EFDFB4; }
.tb-date { font-size: 11.8px; color: var(--muted); }
.burger { display: none !important; }

.content { padding: 22px 26px 34px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }

.foot {
    margin-top: auto;
    display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
    padding: 14px 26px;
    border-top: 1px solid var(--line);
    font-size: 11.8px; color: var(--muted);
}

/* ------------------------------------------------------------------ tombol */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 7px;
    padding: 9px 14px;
    font: inherit; font-size: 13px; font-weight: 600;
    color: var(--ink-2);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s;
    white-space: nowrap;
    text-decoration: none;
}
.btn:hover { border-color: #C6D8D0; color: var(--green-d); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
    background: linear-gradient(135deg, #128A69, #0A6B51);
    border-color: #0A6B51; color: #fff;
    box-shadow: 0 10px 22px -16px rgba(10, 107, 81, .9);
}
.btn-primary:hover { color: #fff; background: linear-gradient(135deg, #169B76, #0B7859); }
.btn-gold { background: linear-gradient(135deg, #D9A33C, #BE8515); border-color: #BE8515; color: #24180A; }
.btn-gold:hover { color: #24180A; background: linear-gradient(135deg, #E4B255, #C8901F); }
.btn-soft { background: var(--green-l); border-color: #CFE9DE; color: var(--green-d); }
.btn-soft:hover { background: #DAF0E7; color: var(--green-d); }
.btn-ghost { background: #fff; }
.btn-danger { background: var(--bad-l); border-color: #F3D2CB; color: #A3301F; }
.btn-danger:hover { background: #F8DDD7; color: #8C2517; }
.btn-xs { padding: 5px 9px; font-size: 11.8px; border-radius: 8px; gap: 5px; }
.btn-sm { padding: 7px 11px; font-size: 12.4px; border-radius: 9px; }
.btn-block { width: 100%; }
.btn-side {
    background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
    color: rgba(255, 255, 255, .78); width: 100%; font-size: 12.6px;
}
.btn-side:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.icon-btn {
    width: 34px; height: 34px; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 9px; border: 1px solid var(--line);
    background: #fff; color: var(--ink-2); cursor: pointer;
}
.icon-btn:hover { color: var(--green-d); border-color: #C6D8D0; }

/* ------------------------------------------------------------------ kartu KPI */

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.kpi-grid.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.kpi {
    position: relative;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r);
    padding: 15px 16px 14px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.kpi::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--green); }
.kpi.k-gold::before { background: var(--gold); }
.kpi.k-teal::before { background: var(--teal); }
.kpi.k-clay::before { background: #B8543C; }
.kpi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.kpi-lab {
    font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase;
    color: var(--muted); line-height: 1.35;
}
.kpi-ico {
    width: 30px; height: 30px; flex: 0 0 auto; display: grid; place-items: center;
    border-radius: 9px; background: var(--green-l); color: var(--green-d);
}
.kpi.k-gold .kpi-ico { background: var(--gold-l); color: #8A6410; }
.kpi.k-teal .kpi-ico { background: #E4F2F4; color: #0E6373; }
.kpi.k-clay .kpi-ico { background: #FBEDE8; color: #A3452F; }
.kpi-val {
    display: block; margin-top: 8px;
    font-family: var(--mono); font-size: 21px; font-weight: 600;
    letter-spacing: -.02em; color: var(--ink);
}
.kpi-sub { display: block; font-size: 11.8px; color: var(--muted); margin-top: 3px; }
.kpi-sub b { color: var(--ink-2); font-weight: 600; }

/* ------------------------------------------------------------------ panel */

.panel {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow);
    min-width: 0;
    overflow: hidden;
}
.panel-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding: 15px 20px 14px;
    border-bottom: 1px solid var(--line-2);
}
.ph-txt { min-width: 0; }
.panel-head h2 { display: flex; align-items: center; gap: 8px; font-size: 14.8px; font-weight: 700; }
.ph-ico {
    width: 26px; height: 26px; display: grid; place-items: center;
    border-radius: 8px; background: var(--green-l); color: var(--green-d);
}
.panel-head p { margin: 3px 0 0; font-size: 12.2px; color: var(--muted); }
.ph-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.panel-body { padding: 18px 20px; min-width: 0; }
.panel-body.flush { padding: 0; }
.panel-foot {
    padding: 12px 20px; border-top: 1px solid var(--line-2);
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
    font-size: 12.2px; color: var(--muted);
    background: #FBFDFC;
}
.grid-2 { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ------------------------------------------------------------------ badge & pita */

.badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 600; letter-spacing: .01em;
    padding: 3px 8px; border-radius: 20px;
    background: var(--line-2); color: var(--ink-2);
    border: 1px solid transparent;
    white-space: nowrap;
}
.b-ok { background: #E4F4EC; color: #0A6B51; }
.b-warn { background: var(--gold-l); color: #8A6410; }
.b-bad { background: var(--bad-l); color: #A3301F; }
.b-info { background: #E4F2F4; color: #0E6373; }
.b-muted { background: #EEF2F0; color: #5B6E67; }
.b-gold { background: var(--gold-l); color: #8A6410; }

.bbidang {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11.4px; color: var(--ink-2); max-width: 100%;
}
.bbidang i {
    width: 20px; height: 20px; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 6px; font-style: normal;
    font-family: var(--mono); font-size: 9.6px; font-weight: 600;
    color: #fff; background: var(--bc);
}
.bsumber {
    display: inline-flex; align-items: center;
    font-family: var(--mono); font-size: 10.4px; font-weight: 600;
    letter-spacing: .02em;
    padding: 2px 7px; border-radius: 6px;
    color: var(--sc); background: color-mix(in srgb, var(--sc) 12%, white);
    border: 1px solid color-mix(in srgb, var(--sc) 26%, white);
    white-space: nowrap;
}

/* ------------------------------------------------------------------ bilah anggaran */

.mbar { display: flex; flex-direction: column; gap: 5px; padding: 2px 0; }
.mbar + .mbar { margin-top: 13px; }
.mbar-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; }
.mbar-lab { display: block; font-size: 12.8px; font-weight: 600; min-width: 0; flex: 1 1 55%; }
.mbar-lab i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.mbar-lab small { display: block; font-weight: 400; color: var(--muted); font-size: 11.4px; margin-top: 1px; }
.mbar-val { font-family: var(--mono); font-size: 12.4px; color: var(--ink); white-space: nowrap; margin-left: auto; }
.mbar-val small { color: var(--muted); font-weight: 500; }
.mbar-track { height: 7px; border-radius: 6px; background: #EDF2EF; overflow: hidden; }
.mbar-fill { display: block; height: 100%; border-radius: 6px; }
.mbar-foot {
    display: flex; justify-content: space-between; gap: 8px;
    font-size: 11.2px; color: var(--muted);
}

.prog { height: 6px; border-radius: 6px; background: #EDF2EF; overflow: hidden; min-width: 54px; }
.prog-fill { display: block; height: 100%; border-radius: 6px; background: var(--green); }
.pf-gold { background: var(--gold); }
.pf-warn { background: var(--warn); }
.pf-bad { background: var(--bad); }

.donut {
    width: 116px; height: 116px; border-radius: 50%;
    display: grid; place-items: center; flex: 0 0 auto;
}
.donut-in {
    width: 84px; height: 84px; border-radius: 50%;
    background: #fff; display: grid; place-items: center; text-align: center;
    box-shadow: inset 0 0 0 1px var(--line-2);
}
.donut-in strong { font-family: var(--mono); font-size: 19px; font-weight: 600; }
.donut-in span { font-size: 10.4px; color: var(--muted); }

/* Isian progres fisik per baris (laporan pembangunan) */
.fisik-form { display: flex; align-items: center; gap: 5px; }
.fisik-input { position: relative; display: flex; align-items: center; }
.fisik-input input {
    width: 62px; padding: 5px 20px 5px 8px;
    font: inherit; font-size: 12.4px; font-family: var(--mono); text-align: right;
    color: var(--ink); background: #fff;
    border: 1px solid #D9E4DE; border-radius: 7px;
}
.fisik-input input:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(14,140,106,.13); }
.fisik-input input::-webkit-outer-spin-button, .fisik-input input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fisik-input input[type=number] { -moz-appearance: textfield; appearance: textfield; }
.persen-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.persen-btn {
    font: inherit; font-size: 11.8px; font-weight: 600; font-family: var(--mono);
    padding: 4px 9px; cursor: pointer;
    border: 1px solid #D9E4DE; border-radius: 8px; background: #fff; color: var(--ink-2);
}
.persen-btn:hover { border-color: var(--green); color: var(--green-d); }
.persen-btn.on { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.fisik-input > span {
    position: absolute; right: 7px; font-size: 11px; color: var(--muted); pointer-events: none;
}

/* ------------------------------------------------------------------ tabel */

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 12.9px; }
.tbl th {
    text-align: left; font-size: 10.6px; font-weight: 700; letter-spacing: .07em;
    text-transform: uppercase; color: var(--muted);
    padding: 10px 14px; background: #F7FAF8;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tbody tr:hover { background: #FAFCFB; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl .num.right, .tbl th.right { text-align: right; }
.tbl .sub { display: block; font-size: 11.2px; color: var(--muted); margin-top: 2px; }
.tbl .aksi { display: flex; gap: 5px; justify-content: flex-end; }
.tbl-compact td { padding: 8px 14px; }
.tbl tfoot td { background: #F7FAF8; font-weight: 600; border-top: 1px solid var(--line); }

.usaha-nama { font-weight: 600; color: var(--ink); }
.usaha-nama:hover { color: var(--green-d); }

/* ------------------------------------------------------------------ form */

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; min-width: 0; }
.field > label { font-size: 12.2px; font-weight: 600; color: var(--ink-2); }
.field > label i { color: var(--bad); font-style: normal; }
.field > small { font-size: 11.4px; color: var(--muted); }
.field input[type=text], .field input[type=password], .field input[type=email],
.field input[type=date], .field input[type=number], .field input[type=url],
.field select, .field textarea {
    width: 100%;
    font: inherit; font-size: 13.2px;
    padding: 9px 11px;
    color: var(--ink);
    background: #fff;
    border: 1px solid #D9E4DE;
    border-radius: 9px;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { line-height: 1.55; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
    outline: 0; border-color: var(--green);
    box-shadow: 0 0 0 3px rgba(14, 140, 106, .13);
}
.field input::placeholder, .field textarea::placeholder { color: #A7B6AF; }
.sel-wrap { position: relative; }
.sel-wrap select { appearance: none; padding-right: 30px; cursor: pointer; }
.sel-wrap::after {
    content: ''; position: absolute; right: 12px; top: 50%;
    width: 7px; height: 7px; margin-top: -5px;
    border-right: 1.6px solid var(--muted); border-bottom: 1.6px solid var(--muted);
    transform: rotate(45deg); pointer-events: none;
}
.sel-wrap.sm select { padding: 7px 26px 7px 9px; font-size: 12.4px; border-radius: 8px; }
.fgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 14px; }
.fgrid .wide { grid-column: 1 / -1; }
.fgrid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
.form-act {
    display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
    margin-top: 6px; padding-top: 14px; border-top: 1px solid var(--line-2);
}
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 12.8px; color: var(--ink-2); cursor: pointer; margin: 4px 0 12px; }
.check input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--green); }
.check small { display: block; color: var(--muted); font-size: 11.4px; }
.money-wrap { position: relative; }
.money-wrap > span {
    position: absolute; left: 11px; top: 50%; transform: translateY(-50%);
    font-size: 12px; font-weight: 600; color: var(--muted);
}
.money-wrap input { padding-left: 34px !important; font-family: var(--mono); }
.inp-uang {
    width: 100%; text-align: right;
    font-family: var(--mono); font-size: 12.6px;
    padding: 7px 10px; color: var(--ink);
    border: 1px solid #D9E4DE; border-radius: 8px; background: #fff;
}
.inp-uang:focus { outline: 0; border-color: var(--green); box-shadow: 0 0 0 3px rgba(14,140,106,.13); }

/* filter bar */
.filter-bar {
    display: flex; gap: 9px; flex-wrap: wrap; align-items: center;
    padding: 13px 20px; border-bottom: 1px solid var(--line-2); background: #FBFDFC;
}
.filter-bar .field { margin: 0; min-width: 132px; }
.filter-bar .grow { flex: 1 1 190px; }
.filter-bar .btn { align-self: flex-end; }

/* chip filter */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 12.2px; font-weight: 500;
    padding: 6px 11px; border-radius: 20px;
    border: 1px solid var(--line); background: #fff; color: var(--ink-2);
}
.chip:hover { border-color: #C6D8D0; color: var(--green-d); }
.chip.on { background: var(--green-d); border-color: var(--green-d); color: #fff; }
.chip b { font-family: var(--mono); font-size: 11px; opacity: .8; font-weight: 600; }

/* ------------------------------------------------------------------ alert */

.alert {
    display: flex; align-items: flex-start; gap: 10px;
    padding: 11px 14px; border-radius: 11px;
    font-size: 12.9px; line-height: 1.5;
    border: 1px solid transparent;
}
.alert b { font-weight: 700; }
.alert a { text-decoration: underline; }
.a-ok { background: #E7F5EE; border-color: #C4E5D6; color: #0A5B45; }
.a-warn { background: var(--gold-l); border-color: #EFDFB4; color: #7A5809; }
.a-bad { background: var(--bad-l); border-color: #F2CFC8; color: #9A2E1E; }
.devbar {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 13px; border-radius: 10px;
    background: #FFF8E7; border: 1px dashed #E7CF95; color: #7A5809;
    font-size: 12.2px;
}
.pop { animation: pop .28s ease-out; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------------ tabel data & daftar */

.rowlist { display: flex; flex-direction: column; }
.rowlist-item {
    display: flex; align-items: center; gap: 11px;
    padding: 11px 20px; border-bottom: 1px solid var(--line-2);
}
.rowlist-item:last-child { border-bottom: 0; }
.rowlist-item:hover { background: #FAFCFB; }
.rowlist-txt { flex: 1 1 auto; min-width: 0; }
.rowlist-txt strong { display: block; font-size: 12.9px; font-weight: 600; }
.rowlist-txt small { display: block; font-size: 11.3px; color: var(--muted); }
.rowlist-val { font-family: var(--mono); font-size: 12.4px; text-align: right; white-space: nowrap; }
.rowlist-val.masuk { color: #0A6B51; }
.rowlist-val.keluar { color: #A3452F; }

.stat-mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-mini > div { background: #F8FBF9; border: 1px solid var(--line-2); border-radius: 10px; padding: 10px 12px; }
.stat-mini span { display: block; font-size: 10.8px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.stat-mini strong { display: block; font-family: var(--mono); font-size: 14.4px; margin-top: 3px; }

.empty {
    display: flex; flex-direction: column; align-items: center; gap: 7px;
    padding: 34px 20px; text-align: center; color: var(--muted);
}
.empty-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: var(--green-l); color: var(--green-d); }
.empty strong { color: var(--ink); font-size: 13.4px; }
.empty p { margin: 0; font-size: 12.4px; max-width: 44ch; }
.empty .btn { margin-top: 6px; }

.pager { display: flex; gap: 5px; justify-content: flex-end; align-items: center; }
.pg {
    min-width: 30px; height: 30px; padding: 0 8px;
    display: grid; place-items: center;
    border-radius: 8px; border: 1px solid var(--line);
    background: #fff; font-size: 12.4px; color: var(--ink-2);
}
.pg:hover { border-color: #C6D8D0; color: var(--green-d); }
.pg.on { background: var(--green-d); border-color: var(--green-d); color: #fff; font-weight: 600; }
.pg.off { opacity: .4; pointer-events: none; }

/* Sebaran distrik (tab Kampung & Akun) */
.dist-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 10px; }
.dist-item {
    border: 1px solid var(--line); border-radius: 11px; background: #FBFDFC;
    padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0;
}
.dist-item.on { border-color: #BFE3D4; background: #F2FAF6; box-shadow: inset 3px 0 0 var(--green); }
.dist-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px; min-width: 0; }
.dist-head strong { font-size: 12.8px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dist-kode { font-size: 9.8px; color: var(--muted); flex: 0 0 auto; }
.dist-meta { display: flex; justify-content: space-between; gap: 6px; font-size: 11.2px; color: var(--muted); }
.dist-daftar { color: var(--green-d); font-weight: 600; }
.dist-item .badge { align-self: flex-start; font-size: 10px; }

/* ------------------------------------------------------------------ detail pembangunan */

.pb-hero {
    padding: 22px 24px;
    border-radius: var(--r-lg);
    background: linear-gradient(135deg, #0B3A31, #08241E 78%);
    color: rgba(255, 255, 255, .82);
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
}
.pb-hero::after {
    content: '';
    position: absolute; inset: 0;
    background: radial-gradient(420px 200px at 88% 0%, rgba(232, 163, 60, .18), rgba(232, 163, 60, 0) 70%);
    pointer-events: none;
}
.pb-hero-kicker {
    display: inline-block; font-size: 10.6px; font-weight: 700; letter-spacing: .22em;
    text-transform: uppercase; color: #F3D08A; margin-bottom: 6px;
}
.pb-hero h1 { font-size: clamp(19px, 2.4vw, 27px); color: #fff; line-height: 1.25; position: relative; z-index: 1; }
.pb-hero-tags { display: flex; gap: 7px; flex-wrap: wrap; margin-top: 12px; position: relative; z-index: 1; }
.pb-hero-tags .badge { background: rgba(255, 255, 255, .12); color: #EAF6F1; border-color: transparent; }
.pb-hero-tags .badge.b-warn { background: rgba(232, 163, 60, .22); color: #FFE0A8; }
.pb-hero-tags .badge.b-bad { background: rgba(200, 70, 45, .28); color: #FFD9CF; }
.pb-hero-tags .bbidang, .pb-hero-tags .bbidang i { color: #fff; }

.pb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.pb-card { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: #FDFEFD; }
.pb-row { display: grid; grid-template-columns: 158px minmax(0, 1fr); gap: 10px; padding: 13px 15px; border-bottom: 1px solid var(--line-2); align-items: start; }
.pb-row:last-child { border-bottom: 0; }
.pb-lab { font-size: 12.4px; font-weight: 600; color: var(--muted); }
.pb-val { font-size: 13px; color: var(--ink); min-width: 0; }
.pb-val strong { font-weight: 600; }
.pb-val .sub { display: block; font-size: 11.4px; color: var(--muted); margin-top: 2px; }
.pb-btnrow { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

.pb-progress {
    display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 16px; align-items: center;
    margin-top: 18px; padding: 15px 16px;
    border: 1px solid var(--line); border-radius: var(--r); background: #F8FBF9;
}
.pb-progress .pb-lab { display: block; margin-bottom: 2px; }
.pb-progress > div { min-width: 0; }
.pb-progress-act { justify-self: end; }

.foto-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.foto-item { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.foto-link { display: block; aspect-ratio: 4 / 3; background: #EEF3F0; overflow: hidden; position: relative; }
.foto-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-item figcaption {
    display: flex; flex-direction: column; align-items: stretch; gap: 5px;
    padding: 6px 8px; font-size: 10.8px; color: var(--ink-2);
}
.foto-act { display: flex; align-items: center; gap: 5px; }
.foto-persen-form { margin: 0; flex: 1 1 auto; min-width: 0; }
.foto-persen-form select {
    width: 100%; font: inherit; font-size: 10.4px;
    padding: 2px 4px; border: 1px solid var(--line); border-radius: 5px;
    background: #fff; color: var(--ink-2); cursor: pointer;
}
.foto-persen-txt { font-family: var(--mono); font-size: 10.6px; font-weight: 700; color: var(--green-d); }
.foto-tahap {
    position: absolute; left: 5px; top: 5px;
    font-family: var(--mono); font-size: 10px; font-weight: 700;
    padding: 1px 6px; border-radius: 5px;
    background: rgba(11, 58, 49, .85); color: #F3D08A;
}
.foto-tahap.kosong { background: rgba(120, 90, 10, .8); color: #FFE9B8; }
.foto-item figcaption > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.foto-item figcaption form { margin: 0; }
.foto-del {
    width: 22px; height: 22px; display: grid; place-items: center;
    border: 1px solid #F3D2CB; border-radius: 6px; background: var(--bad-l); color: #A3301F; cursor: pointer;
}
.foto-del:hover { background: #F8DDD7; }
.foto-upload {
    display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
    margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-2);
}
.foto-upload .field { flex: 1 1 260px; min-width: 0; }

/* ------------------------------------------------------------------ form data pembangunan */

.pb-form-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.pb-form .fgrid-3 select, .pb-form .fgrid-3 input { min-width: 0; }
.pb-form .panel-foot { justify-content: flex-end; gap: 10px; }

.loc-tabs { display: flex; gap: 0; margin-bottom: 8px; }
.loc-tab {
    font: inherit; font-size: 12.2px; font-weight: 600;
    padding: 7px 14px; cursor: pointer;
    border: 1px solid #CFDBD5; background: #F7FBF9; color: var(--ink-2);
}
.loc-tab:first-child { border-radius: 9px 0 0 9px; }
.loc-tab:last-child { border-radius: 0 9px 9px 0; border-left: 0; }
.loc-tab.on { background: var(--green-d); border-color: var(--green-d); color: #fff; }

.gambar-box {
    border: 1px dashed #CFDBD5; border-radius: 12px; background: #F8FBF9;
    min-height: 190px; display: grid; place-items: center; overflow: hidden;
}
.gambar-box img { width: 100%; height: 190px; object-fit: cover; display: block; }
.gambar-empty {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    color: var(--muted); font-size: 12px; padding: 24px; text-align: center;
}
.gambar-empty svg { color: #B9C7BF; }

@media (max-width: 1100px) {
    .pb-form-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------------------------ drawer */

.drawer-wrap { position: fixed; inset: 0; z-index: 90; }
.drawer-wrap .scrim { position: absolute; inset: 0; background: rgba(8, 26, 22, .45); backdrop-filter: blur(2px); }
.drawer {
    position: absolute; inset: 0 0 0 auto;
    width: min(560px, 100%);
    display: flex; flex-direction: column;
    background: #fff;
    box-shadow: -24px 0 60px -30px rgba(8, 26, 22, .6);
    animation: slidein .22s ease-out;
}
@keyframes slidein { from { transform: translateX(28px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head {
    display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
    padding: 16px 18px; border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #F7FBF9, #fff);
}
.drawer-head h2 { display: flex; align-items: center; gap: 8px; font-size: 15.4px; }
.drawer-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); max-width: 42ch; }
.drawer-body { flex: 1; overflow-y: auto; padding: 18px; }
.drawer .fgrid { grid-template-columns: minmax(0, 1fr); }
.drawer .fgrid-3 { grid-template-columns: minmax(0, 1fr); }
.drawer .alert { margin-bottom: 14px; }

/* bukti: kategori (nota / foto kegiatan) */
.bukti-group + .bukti-group { margin-top: 14px; }
.bukti-group-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; font-size: 11.4px; }
.bukti-tag {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 10.2px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    padding: 2px 7px; border-radius: 6px; white-space: nowrap;
}
.bt-nota { background: #E4F4EC; color: #0A6B51; }
.bt-kegiatan { background: #E4F2F4; color: #0E6373; }
.bt-lain { background: #EEF2F0; color: #5B6E67; }

.upload-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.upload-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #FBFDFC; }
.upload-box .field:last-child { margin-bottom: 0; }
.upload-box .field > label { display: flex; align-items: center; gap: 5px; }
.upload-nota { border-color: #CFE9DE; }
.upload-kegiatan { border-color: #CFE4E9; }
.upload-nota .field, .upload-nota input { border-color: #CFE9DE; }
.upload-kegiatan input { border-color: #CFE4E9; }

.bukti-pair { display: flex; flex-direction: column; gap: 8px; min-width: 210px; }
.bukti-mini { display: flex; align-items: center; gap: 7px; }
.bukti-mini-row { display: flex; gap: 4px; flex-wrap: wrap; }
.bukti-mini-thumb {
    width: 40px; height: 34px; border-radius: 6px; overflow: hidden;
    border: 1px solid var(--line); background: #EEF3F0; display: grid; place-items: center;
}
.bukti-mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bukti-mini-thumb .bukti-pdf { font-size: 0; }

/* bukti */
.bukti-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; }
.bukti-item { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #FBFDFC; }
.bukti-thumb { display: block; aspect-ratio: 4 / 3; background: #EEF3F0; overflow: hidden; position: relative; }
.bukti-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.bukti-pdf { display: flex; flex-direction: column; align-items: center; justify-content: center; height: 100%; gap: 2px; color: #A3452F; }
.bukti-pdf b { font-size: 10px; letter-spacing: .08em; }
.bukti-meta { padding: 6px 7px; font-size: 10.8px; display: flex; flex-direction: column; gap: 3px; }
.bukti-meta > span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bukti-kat {
    width: 100%; font: inherit; font-size: 10.4px;
    padding: 2px 4px; margin-bottom: 3px;
    border: 1px solid var(--line); border-radius: 5px; background: #fff; color: var(--ink-2);
}
.bukti-persen {
    position: absolute; left: 4px; top: 4px;
    font-family: var(--mono); font-size: 9.8px; font-weight: 700;
    padding: 1px 5px; border-radius: 5px;
    background: rgba(11, 58, 49, .82); color: #F3D08A;
}
.foto-persen { color: var(--green-d); font-family: var(--mono); font-size: 10.6px; }
.bukti-del { display: flex; align-items: center; gap: 4px; color: var(--bad); font-size: 10.6px; cursor: pointer; }
.bukti-del input { width: 12px; height: 12px; accent-color: var(--bad); }

/* ------------------------------------------------------------------ login */

body.auth {
    background:
        radial-gradient(900px 600px at 8% -10%, #DDF0E7, rgba(221, 240, 231, 0) 62%),
        radial-gradient(720px 520px at 96% 6%, #E9F0FF, rgba(233, 240, 255, 0) 60%),
        #F2F6F4;
    min-height: 100vh;
    display: grid; place-items: center;
    padding: 26px 18px;
}
.auth-wrap { width: 100%; max-width: 940px; }
.auth-card {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    background: #fff; border-radius: 22px; overflow: hidden;
    box-shadow: 0 30px 70px -46px rgba(8, 42, 34, .6), 0 1px 2px rgba(8, 42, 34, .06);
    border: 1px solid var(--line);
}
.auth-side {
    position: relative;
    padding: 30px 28px;
    color: rgba(255, 255, 255, .78);
    background: linear-gradient(168deg, #0C3A32, #08211D 84%);
    display: flex; flex-direction: column; gap: 14px;
}
.auth-side::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(340px 200px at 85% 8%, rgba(232, 163, 60, .16), rgba(232, 163, 60, 0) 70%);
    pointer-events: none;
}
.auth-brand { display: flex; align-items: center; gap: 11px; }
.auth-brand strong { display: block; color: #fff; font-family: var(--head); font-size: 14.4px; letter-spacing: .1em; }
.auth-brand small { display: block; font-size: 11.2px; color: rgba(255, 255, 255, .55); }
.auth-side h2 { font-size: 21px; color: #fff; line-height: 1.32; margin-top: 8px; }
.auth-side p { margin: 0; font-size: 12.8px; color: rgba(255, 255, 255, .66); }
.auth-list { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.auth-list li { display: flex; align-items: center; gap: 9px; font-size: 12.6px; color: rgba(255, 255, 255, .8); }
.auth-list svg { color: #F3D08A; }
.auth-stamp {
    margin-top: auto; font-size: 10.8px; letter-spacing: .06em; text-transform: uppercase;
    color: rgba(255, 255, 255, .42); border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 12px;
}
.auth-main { padding: 34px 32px; display: flex; flex-direction: column; }
.auth-main h1 { font-size: 21px; }
.auth-sub { margin: 4px 0 18px; font-size: 12.8px; color: var(--muted); }
.auth-form .field { margin-bottom: 13px; }
.auth-form .btn { margin-top: 4px; }
.auth-note { font-size: 12px; color: var(--muted); margin: 12px 0 0; }
.auth-note b { color: var(--warn); }
.auth-foot { margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); font-size: 11.6px; color: var(--muted); line-height: 1.7; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px !important; }
.pw-eye {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    width: 30px; height: 30px; display: grid; place-items: center;
    border: 0; background: transparent; color: var(--muted); cursor: pointer; border-radius: 7px;
}
.pw-eye:hover, .pw-eye.on { color: var(--green-d); background: var(--green-l); }

/* ------------------------------------------------------------------ util */

.split-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.split-head h2 { font-size: 15.4px; }
.split-head p { margin: 3px 0 0; font-size: 12.4px; color: var(--muted); }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kbd {
    font-family: var(--mono); font-size: 11px; padding: 1px 5px;
    border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px;
    background: #fff; color: var(--ink-2);
}
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 11.4px; color: var(--muted); }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.list-flat { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.list-flat li { display: flex; gap: 9px; font-size: 12.6px; color: var(--ink-2); align-items: flex-start; }
.list-flat li svg { color: var(--green); margin-top: 2px; }
.avatar-row { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ava {
    width: 32px; height: 32px; flex: 0 0 auto;
    display: grid; place-items: center;
    border-radius: 50%; background: var(--green-l); color: var(--green-d);
    font-size: 11.4px; font-weight: 700; letter-spacing: .02em;
}

/* ------------------------------------------------------------------ responsif */

@media (max-width: 1180px) {
    .kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .kpi-grid.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1000px) {
    .shell { grid-template-columns: minmax(0, 1fr); }
    .side {
        position: fixed; inset: 0 auto 0 0; width: 282px;
        transform: translateX(-100%);
        transition: transform .22s ease;
        box-shadow: 24px 0 60px -30px rgba(4, 18, 15, .7);
    }
    .side.open { transform: none; }
    .scrim-side { display: none; position: fixed; inset: 0; z-index: 55; background: rgba(6, 22, 18, .5); border: 0; }
    .scrim-side.on { display: block; }
    .burger { display: grid !important; }
    .topbar { padding: 11px 16px; gap: 10px; }
    .content { padding: 16px 16px 30px; gap: 14px; }
    .foot { padding: 12px 16px; }
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
    .tb-date { display: none; }
}

@media (max-width: 860px) {
    .grid-3 { grid-template-columns: minmax(0, 1fr); }
    .pb-grid { grid-template-columns: minmax(0, 1fr); }
    .pb-progress { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pb-progress-act { justify-self: start; }
    .auth-card { grid-template-columns: minmax(0, 1fr); }
    .auth-side { padding: 22px 22px 24px; }
    .auth-side h2 { font-size: 18.5px; }
    .auth-main { padding: 24px 20px 26px; }
    .topbar { flex-wrap: wrap; }
    .tb-title h1 { font-size: 16.4px; }
    .tb-title p { font-size: 11.6px; }
    .tb-right { gap: 6px; }
}

@media (max-width: 700px) {
    .upload-pair { grid-template-columns: minmax(0, 1fr); }
    .kpi-grid, .kpi-grid.k5 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
    .kpi { padding: 12px 13px; }
    .kpi-val { font-size: 17.4px; }
    .kpi-lab { font-size: 10px; }
    .panel-head { padding: 13px 15px; flex-wrap: wrap; }
    .panel-body { padding: 15px; }
    .panel-foot { padding: 11px 15px; }
    .filter-bar { padding: 11px 15px; }
    .filter-bar .field { flex: 1 1 140px; }
    .fgrid, .fgrid-3, .drawer .fgrid-3 { grid-template-columns: minmax(0, 1fr); }
    .stat-mini { grid-template-columns: minmax(0, 1fr); }
    .tbl th, .tbl td { padding: 9px 11px; }
    .drawer { width: 100%; }
    .drawer-body { padding: 15px; }
    .rowlist-item { padding: 10px 15px; }
    .pb-row { grid-template-columns: minmax(0, 1fr); gap: 3px; padding: 11px 13px; }
    .pb-lab { font-size: 11.2px; text-transform: uppercase; letter-spacing: .05em; }
    .pb-hero { padding: 18px 16px; }
    .pb-progress { grid-template-columns: minmax(0, 1fr); gap: 12px; }
    .donut { width: 96px; height: 96px; }
    .donut-in { width: 70px; height: 70px; }
    .donut-in strong { font-size: 16px; }
}

@media (max-width: 430px) {
    .kpi-grid, .kpi-grid.k5 { grid-template-columns: minmax(0, 1fr); }
    .tb-chip { font-size: 10.8px; padding: 4px 8px; max-width: 170px; }
    .btn { padding: 8px 12px; font-size: 12.4px; }
}

@media print {
    .side, .topbar, .foot, .ph-act, .filter-bar, .pager, .scrim-side, .drawer-wrap { display: none !important; }
    body { background: #fff; }
    .shell { display: block; }
    .content { padding: 0; }
    .panel { box-shadow: none; border: 1px solid #ddd; break-inside: avoid; }
}
