/* ==========================================================================
   Andikarya — panel owner & pengawas
   ========================================================================== */
:root {
    --ink: #13161b;
    --ink-2: #1c2027;
    --ink-3: #2a2f38;
    --bg: #f3f1ec;
    --card: #ffffff;
    --line: #e6e1d8;
    --line-2: #efebe4;
    --text: #1d2026;
    --muted: #747780;
    --brass: #b08d57;
    --brass-2: #cfb07b;
    --brass-ink: #8a6a37;
    --brass-soft: #f5eddf;
    --green: #3f7d4e; --green-soft: #e6f1e8;
    --red: #b4472f; --red-soft: #f8e7e2;
    --amber: #b07a16; --amber-soft: #faefd9;
    --blue: #3b6aa0; --blue-soft: #e5edf7;
    --gray-soft: #eeece8;
    --serif: "Cormorant Garamond", Georgia, serif;
    --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(19, 22, 27, .04), 0 6px 24px rgba(19, 22, 27, .04);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 14.5px/1.55 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 700; letter-spacing: -.01em; }
svg.i { width: 18px; height: 18px; flex: none; }

/* ---------- Kerangka ---------- */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.side { background: var(--ink); color: rgba(255, 255, 255, .72); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; overflow-y: auto; }
.side .brand { display: flex; align-items: center; gap: 12px; padding: 4px 10px 26px; color: #fff; }
.side .brand svg { width: 36px; height: 36px; color: var(--brass-2); }
.side .brand b { display: block; font: 600 15.5px/1.1 var(--serif); letter-spacing: .12em; text-transform: uppercase; }
.side .brand small { display: block; font-size: 9.5px; letter-spacing: .26em; text-transform: uppercase; color: var(--brass-2); margin-top: 5px; }
.nav-label { font-size: 10px; letter-spacing: .22em; text-transform: uppercase; color: rgba(255, 255, 255, .35); padding: 18px 12px 8px; }
.side nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; font-weight: 500; transition: background .2s, color .2s; position: relative; }
.side nav a:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.side nav a.on { background: rgba(207, 176, 123, .12); color: #fff; }
.side nav a.on::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass-2); }
.side nav a.on svg { color: var(--brass-2); }
.side .count { margin-left: auto; background: var(--brass); color: #fff; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 20px; }
.side-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .08); }
.me { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; }
.me:hover { background: rgba(255, 255, 255, .05); }
.me b { display: block; color: #fff; font-size: 13.5px; font-weight: 600; }
.me small { font-size: 11.5px; color: rgba(255, 255, 255, .5); }
.side-foot form button { width: 100%; margin-top: 8px; background: none; border: 1px solid rgba(255, 255, 255, .12); color: rgba(255, 255, 255, .7); border-radius: 10px; padding: 9px; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 8px; }
.side-foot form button:hover { border-color: var(--brass-2); color: #fff; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { display: flex; align-items: center; gap: 16px; padding: 22px 36px 0; }
.top .burger { display: none; background: var(--card); border: 1px solid var(--line); border-radius: 10px; width: 42px; height: 42px; place-items: center; cursor: pointer; }
.top .site-link { margin-left: auto; font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.top .site-link:hover { color: var(--brass-ink); }
.content { padding: 22px 36px 60px; max-width: 1380px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font: 600 34px/1.1 var(--serif); letter-spacing: 0; }
.page-head p { margin: 6px 0 0; color: var(--muted); }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; display: flex; gap: 6px; align-items: center; }
.crumb a:hover { color: var(--brass-ink); }

/* ---------- Komponen ---------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { font-size: 15px; }
.card-h small, .card-h a.more { color: var(--muted); font-size: 12.5px; }
.card-h a.more:hover { color: var(--brass-ink); }
.card-b { padding: 20px 22px; }
.grid { display: grid; gap: 20px; }
.g2 { grid-template-columns: 1fr 1fr; }
.g3 { grid-template-columns: repeat(3, 1fr); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.stack { display: grid; gap: 20px; align-content: start; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); font-weight: 600; font-size: 13.5px; cursor: pointer; transition: all .2s; white-space: nowrap; }
.btn:hover { border-color: #cfc7b9; background: #fbfaf7; }
.btn.primary { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.primary:hover { background: var(--ink-3); }
.btn.brass { background: var(--brass); border-color: var(--brass); color: #fff; }
.btn.brass:hover { background: var(--brass-ink); border-color: var(--brass-ink); }
.btn.danger { color: var(--red); }
.btn.danger:hover { background: var(--red-soft); border-color: #eac3b8; }
.btn.sm { height: 32px; padding: 0 11px; font-size: 12.5px; border-radius: 8px; }
.btn.lg { height: 50px; padding: 0 22px; font-size: 15px; border-radius: 12px; }
.btn.block { width: 100%; }
.link { color: var(--brass-ink); font-weight: 600; }
.link:hover { text-decoration: underline; }

.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 20px; background: var(--gray-soft); color: var(--muted); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.plain::before { display: none; }
.badge.persiapan { background: var(--blue-soft); color: var(--blue); }
.badge.berjalan { background: var(--brass-soft); color: var(--brass-ink); }
.badge.tertunda { background: var(--amber-soft); color: var(--amber); }
.badge.selesai, .badge.ok { background: var(--green-soft); color: var(--green); }
.badge.warn { background: var(--amber-soft); color: var(--amber); }
.badge.bad { background: var(--red-soft); color: var(--red); }

.pbar { height: 8px; border-radius: 8px; background: var(--gray-soft); position: relative; overflow: visible; }
.pbar b { position: absolute; inset: 0 auto 0 0; border-radius: 8px; background: linear-gradient(90deg, var(--brass), var(--brass-2)); }
.pbar.done b { background: var(--green); }
.pbar.late b { background: linear-gradient(90deg, #c66a4f, #dd8d68); }
.pbar s { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--ink); border-radius: 2px; }
.pbar.thin { height: 5px; }
.pline { display: flex; align-items: center; gap: 12px; }
.pline .pbar { flex: 1; }
.pline .pct { font-weight: 700; font-size: 13px; min-width: 38px; text-align: right; font-variant-numeric: tabular-nums; }

.avatar { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--brass-soft); color: var(--brass-ink); font-weight: 700; font-size: 12.5px; flex: none; }
.side .avatar { background: rgba(207, 176, 123, .18); color: var(--brass-2); }
.avatar.lg { width: 64px; height: 64px; font-size: 20px; }

.muted { color: var(--muted); }
.small { font-size: 12.5px; }
.mono { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }
.nowrap { white-space: nowrap; }
.empty { text-align: center; padding: 44px 20px; color: var(--muted); }
.empty svg { width: 34px; height: 34px; color: var(--brass); margin: 0 auto 10px; }

/* KPI */
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; margin-bottom: 22px; }
.kpis.k4 { grid-template-columns: repeat(4, 1fr); }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.kpi small { display: block; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.kpi b { display: block; font: 600 40px/1 var(--serif); margin-top: 12px; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.kpi.dark small, .kpi.dark span { color: rgba(255, 255, 255, .55); }
.kpi.dark b { color: var(--brass-2); }
.kpi.is-bad b { color: var(--red); }
.kpi.is-warn b { color: var(--amber); }

/* Tabel */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: #fbfaf8; }
.t td { padding: 14px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr { transition: background .15s; }
.t tbody tr:hover { background: #fcfbf8; }
.t .title { font-weight: 700; display: block; }
.t .sub { font-size: 12.5px; color: var(--muted); }

/* Wilayah (dashboard owner) */
.region-card { padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.region-card:last-child { border-bottom: 0; }
.region-top { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.region-top h4 { font: 600 22px/1.1 var(--serif); }
.region-top .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.region-avg { font: 600 28px/1 var(--serif); color: var(--brass-ink); }
.region-projects { display: grid; gap: 10px; }
.rp { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) minmax(90px, auto); gap: 16px; align-items: center; padding: 10px 12px; border-radius: 10px; background: #faf8f4; transition: background .2s; }
.rp:hover { background: var(--brass-soft); }
.rp .name { font-weight: 600; font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp .who { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.flags { display: flex; gap: 6px; flex-wrap: wrap; }
.rp .flags { justify-content: flex-end; max-width: 250px; }

/* Feed laporan */
.feed-item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .thumb { width: 92px; height: 72px; border-radius: 10px; overflow: hidden; background: var(--gray-soft); position: relative; }
.feed-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.feed-item .thumb em { position: absolute; right: 5px; bottom: 5px; background: rgba(19, 22, 27, .75); color: #fff; font-style: normal; font-size: 10.5px; font-weight: 700; padding: 1px 6px; border-radius: 6px; }
.feed-item b { display: block; font-size: 13.5px; line-height: 1.35; }
.feed-item .proj { font-size: 12.5px; color: var(--brass-ink); font-weight: 600; }
.feed-item .meta { font-size: 12px; color: var(--muted); margin-top: 4px; }

.sv-row { display: flex; align-items: center; gap: 12px; padding: 12px 22px; border-bottom: 1px solid var(--line-2); }
.sv-row:last-child { border-bottom: 0; }
.sv-row .info { flex: 1; min-width: 0; }
.sv-row b { display: block; font-size: 13.5px; }
.sv-row small { color: var(--muted); font-size: 12px; }

/* Kartu proyek (pengawas) */
.pcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; }
.pcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column; transition: transform .25s, box-shadow .25s; }
.pcard:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(19, 22, 27, .08); }
.pcard .img { aspect-ratio: 16/8; position: relative; background: var(--gray-soft); }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; }
.pcard .img .badge { position: absolute; left: 12px; top: 12px; background: rgba(255, 255, 255, .94); }
.pcard .body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.pcard h3 { font-size: 15.5px; line-height: 1.3; }
.pcard .loc { font-size: 12.5px; color: var(--muted); }
.pcard .foot { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.pcard .foot .btn { flex: 1; }

/* Detail proyek */
.hero-card { display: grid; grid-template-columns: 300px 1fr; overflow: hidden; }
.hero-card .cover { position: relative; min-height: 230px; background: var(--gray-soft); }
.hero-card .cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card .info { padding: 24px 26px; display: flex; flex-direction: column; gap: 16px; }
.big-pct { font: 600 58px/1 var(--serif); color: var(--brass-ink); }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px 20px; }
.facts small { display: block; font-size: 10.5px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.facts span { font-weight: 600; font-size: 13.5px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

.chart svg { width: 100%; height: auto; display: block; }

.report { padding: 20px 22px; border-bottom: 1px solid var(--line-2); }
.report:last-child { border-bottom: 0; }
.report-head { display: flex; gap: 12px; align-items: flex-start; }
.report-head .info { flex: 1; min-width: 0; }
.report-head b { font-size: 15px; display: block; }
.report-head .meta { font-size: 12.5px; color: var(--muted); margin-top: 3px; display: flex; flex-wrap: wrap; gap: 4px 12px; }
.report-pct { font: 600 26px/1 var(--serif); color: var(--brass-ink); text-align: right; }
.report-pct small { display: block; font: 600 11px/1.3 var(--sans); color: var(--green); }
.report-pct small.down { color: var(--red); }
.report p { margin: 10px 0 0; color: #474a52; white-space: pre-line; }
.issue { margin-top: 10px; padding: 10px 14px; background: var(--amber-soft); border-radius: 10px; color: #7a5410; font-size: 13px; display: flex; gap: 8px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; margin-top: 14px; }
.photos .ph { position: relative; aspect-ratio: 4/3; border-radius: 10px; overflow: hidden; background: var(--gray-soft); }
.photos .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.photos .ph:hover img { transform: scale(1.05); }
.photos .ph form { position: absolute; right: 6px; top: 6px; opacity: 0; transition: opacity .2s; }
.photos .ph:hover form { opacity: 1; }
.photos .ph .cover-on { position: absolute; left: 6px; top: 6px; background: var(--brass); color: #fff; font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 6px; }
.photos .ph form button { background: rgba(19, 22, 27, .78); color: #fff; border: 0; border-radius: 7px; font-size: 10.5px; font-weight: 700; padding: 4px 8px; cursor: pointer; }

.share { display: flex; gap: 8px; align-items: center; background: #faf8f4; border: 1px dashed #d8cfbf; border-radius: 10px; padding: 8px 8px 8px 14px; }
.share code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12.5px; color: var(--brass-ink); font-family: ui-monospace, Consolas, monospace; }

/* Form */
.form { display: grid; gap: 18px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.row3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fld label, .lbl { display: block; font-size: 12.5px; font-weight: 700; margin-bottom: 6px; color: #3a3d44; }
.fld .hint { font-size: 12px; color: var(--muted); margin-top: 5px; }
.inp { width: 100%; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: #fff; padding: 0 13px; outline: none; transition: border-color .2s, box-shadow .2s; font-size: 14.5px; }
textarea.inp { height: auto; min-height: 90px; padding: 11px 13px; resize: vertical; }
select.inp { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%23747780' stroke-width='1.6'%3E%3Cpath d='M1 1l5 5 5-5'/%3E%3C/svg%3E") right 13px center no-repeat; padding-right: 34px; }
.inp:focus { border-color: var(--brass); box-shadow: 0 0 0 3px rgba(176, 141, 87, .15); }
.inp.sm { height: 38px; font-size: 13.5px; }
.err { color: var(--red); font-size: 12.5px; margin-top: 5px; }
.check { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.check input { width: 18px; height: 18px; accent-color: var(--brass); margin-top: 1px; flex: none; }
.check b { display: block; font-size: 13.5px; }
.check span { font-size: 12.5px; color: var(--muted); }
.filters { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; }
.filters .inp { width: auto; min-width: 160px; }
.filters .inp.grow { flex: 1; min-width: 200px; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; padding-top: 6px; }

.alert { padding: 13px 16px; border-radius: 12px; margin-bottom: 20px; font-weight: 500; display: flex; gap: 10px; align-items: center; }
.alert.ok { background: var(--green-soft); color: #2c5c38; }
.alert.bad { background: var(--red-soft); color: #8a3522; }

/* Formulir laporan progres */
.sheet { border: 0; padding: 0; width: min(640px, 100%); max-height: 94vh; border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .3); }
.sheet::backdrop { background: rgba(19, 22, 27, .55); backdrop-filter: blur(3px); }
.sheet-h { position: sticky; top: 0; z-index: 2; background: #fff; display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line-2); }
.sheet-h h3 { font: 600 24px/1.1 var(--serif); }
.sheet-h button { background: var(--gray-soft); border: 0; width: 36px; height: 36px; border-radius: 50%; cursor: pointer; font-size: 20px; line-height: 1; }
.sheet-b { padding: 20px 22px 24px; }
.drop { border: 1.5px dashed #d3c8b5; border-radius: 14px; padding: 22px; text-align: center; background: #fcfaf6; cursor: pointer; transition: all .2s; display: block; }
.drop:hover, .drop.over { border-color: var(--brass); background: var(--brass-soft); }
.drop svg { width: 34px; height: 34px; color: var(--brass); margin: 0 auto 8px; }
.drop b { display: block; }
.drop span { font-size: 12.5px; color: var(--muted); }
.previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.pv { position: relative; border-radius: 10px; overflow: hidden; background: var(--gray-soft); border: 1px solid var(--line); }
.pv img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.pv input { width: 100%; border: 0; border-top: 1px solid var(--line); padding: 7px 9px; font-size: 12px; outline: none; }
.pv button { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(19, 22, 27, .75); color: #fff; cursor: pointer; font-size: 15px; line-height: 1; }
.pv .size { position: absolute; left: 6px; top: 6px; background: rgba(19, 22, 27, .7); color: #fff; font-size: 10px; padding: 2px 6px; border-radius: 6px; }
.range-row { display: flex; align-items: center; gap: 14px; }
.range-row input[type=range] { flex: 1; accent-color: var(--brass); height: 30px; }
.range-row .inp { width: 90px; text-align: center; font-weight: 700; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips label { cursor: pointer; }
.chips input { position: absolute; opacity: 0; pointer-events: none; }
.chips span { display: inline-block; padding: 8px 14px; border: 1px solid var(--line); border-radius: 20px; font-size: 13px; font-weight: 600; background: #fff; transition: all .2s; }
.chips input:checked + span { background: var(--ink); color: #fff; border-color: var(--ink); }
.upbar { height: 6px; background: var(--gray-soft); border-radius: 6px; overflow: hidden; margin-top: 12px; display: none; }
.upbar b { display: block; height: 100%; width: 0; background: var(--brass); transition: width .2s; }
.uploading .upbar { display: block; }

.fab { position: fixed; right: 18px; bottom: 18px; z-index: 30; display: none; box-shadow: 0 14px 30px rgba(19, 22, 27, .3); }

/* Lightbox */
.lb { position: fixed; inset: 0; z-index: 200; background: rgba(10, 11, 14, .94); display: none; align-items: center; justify-content: center; padding: 30px; }
.lb.open { display: flex; }
.lb img { max-width: 100%; max-height: 84vh; object-fit: contain; border-radius: 6px; }
.lb-cap { position: absolute; left: 0; right: 0; bottom: 20px; text-align: center; color: rgba(255, 255, 255, .8); font-size: 13.5px; padding: 0 20px; }
.lb button { position: absolute; background: rgba(255, 255, 255, .08); border: 0; color: #fff; width: 46px; height: 46px; border-radius: 50%; cursor: pointer; font-size: 22px; }
.lb button:hover { background: var(--brass); }
.lb .x { top: 18px; right: 18px; }
.lb .prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lb .next { right: 18px; top: 50%; transform: translateY(-50%); }

/* Pagination */
.pager { display: flex; gap: 6px; justify-content: center; padding: 18px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 36px; height: 36px; padding: 0 10px; display: grid; place-items: center; border-radius: 9px; border: 1px solid var(--line); background: #fff; font-size: 13px; font-weight: 600; }
.pager .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .off { opacity: .4; }

/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth-art { position: relative; background: var(--ink); color: #fff; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; padding: 44px; }
.auth-art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .35; }
.auth-art > * { position: relative; }
.auth-art h2 { font: 500 52px/1.05 var(--serif); max-width: 520px; }
.auth-art h2 em { color: var(--brass-2); }
.auth-art p { color: rgba(255, 255, 255, .65); max-width: 440px; }
.auth-form { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.auth-form .box { width: 100%; max-width: 380px; }
.auth-form h1 { font: 600 36px/1.1 var(--serif); margin-bottom: 6px; }

/* Tab halaman proyek */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 12px 16px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: color .2s; }
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--text); border-color: var(--brass); }
.tabs a.on svg { color: var(--brass); }
.tabs span { font-size: 11.5px; background: var(--gray-soft); padding: 1px 8px; border-radius: 20px; }
.tabs em { font-style: normal; font-size: 11px; font-weight: 700; background: var(--amber); color: #fff; padding: 1px 7px; border-radius: 20px; }

/* Segmented control */
.seg { display: inline-flex; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg a, .seg span { padding: 6px 13px; border-radius: 7px; font-size: 13px; font-weight: 600; color: var(--muted); }
.seg a:hover { color: var(--text); }
.seg a.on { background: var(--ink); color: #fff; }
.seg .off { opacity: .35; }

/* Folder pekerjaan */
.folder { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 20px; align-items: start; }
.folder-nav { padding: 8px; position: sticky; top: 16px; }
.folder-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; font-size: 13.5px; }
.folder-nav a:hover { background: #faf8f4; }
.folder-nav a.on { background: var(--brass-soft); }
.folder-nav a svg { color: var(--brass); }
.folder-nav b { flex: 1; font-weight: 600; }
.folder-nav b small { font-weight: 500; color: var(--muted); font-size: 11px; }
.folder-nav span { font-size: 12px; color: var(--muted); font-weight: 700; }
.upload-box summary { cursor: pointer; list-style: none; border-bottom: 0; }
.upload-box summary::-webkit-details-marker { display: none; }
.upload-box[open] summary { border-bottom: 1px solid var(--line-2); }
.doc { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 14px; padding: 14px 22px; border-bottom: 1px solid var(--line-2); align-items: start; }
.doc:last-child { border-bottom: 0; }
.doc-ico { width: 64px; height: 52px; border-radius: 10px; display: grid; place-items: center; font-size: 10.5px; font-weight: 800; letter-spacing: .04em; background: var(--gray-soft); color: var(--muted); overflow: hidden; }
.doc-ico.img img { width: 100%; height: 100%; object-fit: cover; }
.doc-ico.k-pdf { background: #fbe9e5; color: #b4472f; }
.doc-ico.k-xls { background: #e4f2e8; color: #2f7a46; }
.doc-ico.k-doc { background: #e5edf7; color: #3b6aa0; }
.doc-ico.k-cad { background: #efe8f7; color: #6b4ba0; }
.doc-ico.k-catatan { background: var(--brass-soft); color: var(--brass-ink); font-size: 9.5px; }
.doc-body { min-width: 0; }
.doc-body b { display: block; font-size: 14px; line-height: 1.35; }
.doc-body .meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.doc-body p { margin: 8px 0 0; font-size: 13px; color: #4a4d55; white-space: pre-line; }
.doc-act { display: flex; gap: 6px; }
.review { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.print-only { display: none; }

@media print {
    body { background: #fff; font-size: 11.5px; }
    .side, .top, .no-print, .fab, .alert, .lb { display: none !important; }
    .app { display: block; }
    .content { padding: 0; max-width: none; }
    .card, .kpi { box-shadow: none; break-inside: avoid; }
    .kpis { grid-template-columns: repeat(6, 1fr) !important; gap: 8px; }
    .kpi { padding: 10px 12px; }
    .kpi b { font-size: 26px; margin-top: 6px; }
    .grid.g2 { grid-template-columns: 1fr 1fr !important; }
    .t td, .t th { padding: 7px 10px; }
    .t .hide-m { display: table-cell !important; }
    .print-only { display: block; }
    a { color: inherit; }
}

/* ---------- Responsif ---------- */
@media (max-width: 1200px) {
    .kpis { grid-template-columns: repeat(3, 1fr); }
    .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1024px) {
    .g-main, .g2 { grid-template-columns: 1fr; }
    .hero-card { grid-template-columns: 1fr; }
    .hero-card .cover { min-height: 200px; }
}
@media (max-width: 860px) {
    .app { grid-template-columns: 1fr; }
    .side { position: fixed; z-index: 100; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .3s; box-shadow: 0 0 60px rgba(0, 0, 0, .3); }
    .app.nav-open .side { transform: none; }
    .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(19, 22, 27, .45); z-index: 90; }
    .top { padding: 14px 18px 0; }
    .top .burger { display: grid; }
    .content { padding: 18px 18px 90px; }
    .page-head h1 { font-size: 29px; }
    .g3, .row3 { grid-template-columns: 1fr; }
    .rp { grid-template-columns: 1fr; gap: 8px; }
    .folder { grid-template-columns: 1fr; }
    .folder-nav { position: static; display: flex; overflow-x: auto; gap: 4px; }
    .folder-nav a { white-space: nowrap; flex: none; }
    .folder-nav b small { display: none; }
    .auth { grid-template-columns: 1fr; }
    .auth-art { display: none; }
    .fab { display: inline-flex; }
}
@media (max-width: 560px) {
    .kpis, .kpis.k4 { grid-template-columns: 1fr 1fr; gap: 12px; }
    .kpi b { font-size: 32px; }
    .row2 { grid-template-columns: 1fr; }
    .card-b, .card-h { padding-left: 16px; padding-right: 16px; }
    .feed-item, .report, .region-card, .sv-row { padding-left: 16px; padding-right: 16px; }
    .feed-item { grid-template-columns: 74px 1fr; }
    .feed-item .thumb { width: 74px; height: 60px; }
    .filters .inp { flex: 1; min-width: 140px; }
    .sheet { max-height: 100vh; height: 100%; border-radius: 0; max-width: 100%; margin: 0; }
    .t .hide-m { display: none; }
    .facts { grid-template-columns: 1fr 1fr; }
    .page-head .actions { width: 100%; }
    .page-head .actions .btn { flex: 1; }
    .doc { grid-template-columns: 52px minmax(0, 1fr); padding-left: 16px; padding-right: 16px; }
    .doc-ico { width: 52px; height: 44px; }
    .doc-act { grid-column: 2; }
}

/* Angka tegak (bukan oldstyle) agar 1 tidak terbaca I */
.kpi b, .big-pct, .region-avg, .report-pct, .page-head h1, .t td { font-variant-numeric: lining-nums tabular-nums; }
