/* Sistem Manajemen Aset Kendaraan · tampilan navy & emas */
:root {
  --navy: #0B2447; --navy-2: #1B375A; --navy-3: #2C4268; --side: #031B3B; --side-2: #05254B; --box: #041F41;
  --gold: #D4A84B; --gold-2: #E9C470; --gold-soft: #FDF1D6;
  --bg: #F8FAFD; --gold-icon: #F5A623; --card: #FFFFFF; --line: #E6EAF0; --line-2: #EEF1F6;
  --text: #13213F; --muted: #5B6478; --faint: #8A93A3;
  --green: #22A645; --green-soft: #E3F6E7; --red: #D93025; --red-soft: #FCE6E4;
  --orange: #E8890C; --orange-soft: #FDEFD6; --blue: #1A6FE0; --blue-soft: #E3EEFD;
  --radius: 14px; --shadow: 0 4px 14px rgba(15, 30, 61, .07);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; font-size: 14px; color: var(--text);
  background: var(--bg); line-height: 1.45; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.25; }
.ic { width: 18px; height: 18px; flex: none; vertical-align: -3px; }
.ic-lg { width: 26px; height: 26px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); font-size: 12px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.mt { margin-top: 16px; } .mb { margin-bottom: 18px; }

/* ---------- layout ---------- */
.app { display: grid; grid-template-columns: 214px 1fr; min-height: 100vh; background: linear-gradient(to right, var(--side) 214px, transparent 214px); }
.side { background: linear-gradient(180deg, var(--side) 0%, var(--side-2) 100%); color: #fff; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 20px 10px 14px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.18); margin: 0 14px 10px; }
.brand img { width: 124px; height: auto; display: block; margin: 0 auto 4px; }
.brand .b1 { font-weight: 700; font-size: 18px; line-height: 1.2; }
.brand .b2 { font-weight: 800; font-size: 22px; letter-spacing: .3px; color: #fff; line-height: 1.25; }
.nav { list-style: none; margin: 0; padding: 2px 8px 10px; }
.nav a { display: flex; align-items: center; gap: 13px; color: #fff; padding: 10px 12px; border-radius: 9px; font-size: 14.5px; font-weight: 500; white-space: nowrap; }
.nav a .ic { width: 22px; height: 22px; stroke-width: 1.8; }
.nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; }
.nav a.on { background: linear-gradient(90deg, #DDA345 0%, #F6C56C 55%, #E9B458 100%); color: var(--navy); font-weight: 700;
  box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.nav .sep { height: 1px; background: rgba(255,255,255,.14); margin: 8px 8px; }
.nav .badge-n { margin-left: auto; background: var(--red); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; font-weight: 700; }
.side-art { flex: 1 0 140px; min-height: 140px;
  background: linear-gradient(to bottom, var(--side-2) 0, rgba(5,37,75,0) 70px), url(side-mobil.png) center bottom / 100% auto no-repeat; }
.main { min-width: 0; }
.top { display: flex; align-items: center; gap: 16px; padding: 12px 290px 12px 24px; min-height: 67px; background: #fff;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.top .crumb { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 2px; font-weight: 600; }
.top h1 { font-size: 22px; font-weight: 800; }
.top h1 em { color: var(--gold); font-style: italic; }
.top .spacer { flex: 1; }
/* kotak pengguna navy di pojok kanan atas (seperti mockup) */
.userbox { position: absolute; top: 0; right: 0; height: 67px; min-width: 254px; display: flex; align-items: center; gap: 14px;
  padding: 0 16px 0 22px; background: var(--box); color: #fff; border-bottom-left-radius: 13px; }
.bell { position: relative; color: #fff; display: inline-flex; padding: 6px; border-radius: 10px; }
.bell:hover { background: rgba(255,255,255,.1); }
.bell .n { position: absolute; top: 0; right: -2px; background: var(--red); color: #fff; font-size: 10px; font-weight: 700; border-radius: 9px; padding: 1px 5px; }
.vsep { width: 1px; height: 34px; background: rgba(255,255,255,.25); }
.usermenu { position: relative; }
.usermenu summary { list-style: none; display: flex; align-items: center; gap: 10px; cursor: pointer; }
.usermenu summary::-webkit-details-marker { display: none; }
.usermenu summary .ic { width: 18px; height: 18px; transition: transform .15s; }
.usermenu[open] summary .ic { transform: rotate(180deg); }
.usermenu .av { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, #F6C56C, #D9A23A); color: var(--navy);
  display: grid; place-items: center; font-weight: 800; font-size: 16px; border: 2px solid rgba(255,255,255,.85); }
.usermenu .nm { font-weight: 700; font-size: 14.5px; line-height: 1.2; }
.usermenu .nm small { display: block; color: #AFC0DA; font-weight: 500; font-size: 11.5px; }
.usermenu-pop { position: absolute; right: -8px; top: calc(100% + 16px); background: #fff; color: var(--text); border-radius: 10px;
  box-shadow: 0 12px 30px rgba(15,30,61,.2); min-width: 200px; padding: 6px; z-index: 40; }
.usermenu-pop a, .usermenu-pop button { display: flex; width: 100%; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 7px;
  color: var(--text); font: inherit; font-weight: 600; background: none; border: 0; cursor: pointer; text-align: left; }
.usermenu-pop a:hover, .usermenu-pop button:hover { background: var(--line-2); text-decoration: none; }
.usermenu-pop form { margin: 0; }
.content { padding: 18px 22px 44px; max-width: 1600px; }
.menu-btn { display: none; background: none; border: 0; color: var(--navy); padding: 6px; }

/* ---------- cards ---------- */
.card { background: var(--card); border: 1px solid #E9EDF3; border-radius: var(--radius); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-h h2 { font-size: 15px; font-weight: 700; }
.card-h .ic { color: var(--gold); }
.card-h.navy { background: linear-gradient(90deg, #0A2347 0%, #12335F 100%); border-radius: var(--radius) var(--radius) 0 0; color: #fff;
  border-bottom: 0; padding: 13px 18px; }
.card-h.navy h2 { color: #fff; font-size: 16.5px; }
.card-h.navy .ic { color: #F5B942; width: 22px; height: 22px; }
.gold-link { color: #F5B942; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; font-size: 14px; }
.gold-link .ic { color: inherit !important; width: 17px !important; height: 17px !important; }
.card-h .act { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px 18px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }

.kpi { display: flex; gap: 10px; align-items: center; padding: 18px 14px; border: 0; }
.kpi .ico { width: 42px; height: 42px; display: grid; place-items: center; color: var(--gold-icon); flex: none; }
.kpi .ico .ic { width: 40px; height: 40px; stroke-width: 1.7; }
.kpi .ico.green { color: #22A645; }
.kpi .ico.orange { color: var(--gold-icon); }
.kpi .ico.red { color: #E53935; }
.kpi .ico.navy { color: var(--navy); }
.kpi .l { font-size: 12.5px; font-weight: 700; color: var(--text); line-height: 1.25; }
.kpi > div:last-child { min-width: 0; }
.kpi .v { font-size: 25px; font-weight: 800; line-height: 1.15; letter-spacing: -.3px; white-space: nowrap; }
.kpi .v .u { font-size: 15px; font-weight: 700; letter-spacing: 0; margin-left: 1px; }
.kpi .s { font-size: 12.5px; color: var(--text); }
.kpis .kpi .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.35em; }
@media (max-width: 1400px) {
  .kpi { gap: 8px; padding: 16px 12px; }
  .kpi .ico { width: 34px; height: 34px; }
  .kpi .ico .ic { width: 32px; height: 32px; }
  .kpi .l { font-size: 12px; }
  /* judul kartu selalu 2 baris (rata bawah) agar angka di semua kartu sejajar */
  .kpis .kpi .l { min-height: 2.5em; display: flex; align-items: flex-end; }
  .kpi .v { font-size: 23px; }
  .kpi .v .u { font-size: 14px; }
}
.kpi.dark { background: linear-gradient(135deg, #0A2347, #14386A); }
.kpi.dark .ico { color: #fff; }
.kpi.dark .l, .kpi.dark .s { color: #D3DCEB; } .kpi.dark .v { color: #fff; }

/* ---------- table ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700;
  background: #F3F5F9; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl.navy th { background: var(--navy); color: #fff; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: #FAFBFD; }
.tbl .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl tfoot td { font-weight: 700; background: #F8F9FC; border-top: 1px solid var(--line); }
.thumb { width: 56px; height: 36px; object-fit: cover; border-radius: 6px; background: var(--line-2); display: block; }
.thumb.empty { display: grid; place-items: center; color: var(--faint); }
.unit-name { font-weight: 700; }
.unit-sub { font-size: 12px; color: var(--muted); }
.empty-state { padding: 34px; text-align: center; color: var(--muted); }
.empty-state > .ic { width: 34px; height: 34px; color: var(--gold); display: block; margin: 0 auto 8px; }

/* ---------- badge ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; border-radius: 20px; padding: 3px 10px; white-space: nowrap; }
.b-green { background: var(--green-soft); color: #18792F; }
.b-red { background: var(--red-soft); color: #B3261E; }
.b-orange { background: var(--orange-soft); color: #9A5A00; }
.b-blue { background: var(--blue-soft); color: #1553B0; }
.b-gray { background: var(--line-2); color: var(--muted); }
.b-navy { background: var(--navy); color: #fff; }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }

/* ---------- buttons & forms ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border-radius: 9px; padding: 9px 14px; font-weight: 600; font-size: 13.5px;
  border: 1px solid var(--line); background: #fff; color: var(--text); cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { text-decoration: none; border-color: #CBD3DF; }
.btn.primary { background: var(--navy); border-color: var(--navy); color: #fff; }
.btn.primary:hover { background: var(--navy-2); }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--navy); }
.btn.danger { color: var(--red); border-color: #F2C2BE; }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.link { border: 0; background: none; color: var(--blue); padding: 4px; }
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .spacer { flex: 1; }
input[type=text], input[type=search], input[type=date], input[type=number], input[type=password], input[type=email], input[type=time], select, textarea {
  font: inherit; color: var(--text); border: 1px solid #D6DCE6; border-radius: 9px; padding: 8px 11px; background: #fff; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--gold-2); outline-offset: 0; border-color: var(--gold); }
textarea { min-height: 76px; resize: vertical; }
.toolbar input, .toolbar select { width: auto; }
/* bilah halaman detail: status di kiri, tombol berkelompok di kanan (bila sempit, tombol pindah baris bersama-sama) */
.toolbar.split { align-items: flex-start; gap: 10px 16px; }
.toolbar.split > .tb-info, .toolbar.split > .tb-act { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; min-height: 40px; }
.toolbar.split > .tb-info { flex: 1 1 260px; min-width: 0; }
.toolbar.split > .tb-act { flex: 0 1 auto; justify-content: flex-end; margin-left: auto; }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 18px; }
.form-grid .wide { grid-column: 1 / -1; }
.form-grid h3 { grid-column: 1 / -1; font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); margin-top: 10px;
  padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
.field label { display: block; font-weight: 600; font-size: 13px; margin-bottom: 5px; }
.field .req { color: var(--red); }
.field .help { font-size: 12px; color: var(--muted); margin-top: 4px; }
.field .err { font-size: 12px; color: var(--red); margin-top: 4px; font-weight: 600; }
.field.has-err input, .field.has-err select { border-color: var(--red); }
.check { display: flex; align-items: center; gap: 9px; font-weight: 600; }
.check input { width: 18px; height: 18px; }
.form-actions { display: flex; gap: 10px; margin-top: 22px; }
.inline-form { display: inline; }

/* ---------- flash ---------- */
.flash { border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; font-weight: 600; display: flex; gap: 9px; align-items: center; }
.flash.ok { background: var(--green-soft); color: #18792F; }
.flash.error { background: var(--red-soft); color: #B3261E; }
.flash.warn { background: var(--orange-soft); color: #9A5A00; }

/* ---------- dashboard bits ---------- */
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 14.5px; }
.legend li { display: grid; grid-template-columns: 16px 1fr auto; gap: 12px; align-items: center; }
.legend .sw { width: 16px; height: 16px; border-radius: 4px; }
.donut-wrap { display: flex; gap: 26px; align-items: center; }
.donut-total { font-size: 34px; font-weight: 800; fill: var(--text); }
.donut-sub { font-size: 15px; fill: var(--text); }
.bar-row { display: grid; grid-template-columns: 30px 110px 1fr 50px; gap: 14px; align-items: center; padding: 13px 0; font-size: 15px; }
.bar-row .ic { color: var(--navy); width: 26px; height: 26px; stroke-width: 1.7; }
.bar-row b { font-size: 15px; }
.bar { height: 14px; background: #E8EBF2; border-radius: 8px; overflow: hidden; }
.bar > span { display: block; height: 100%; background: #26A04A; border-radius: 8px; }
.agenda { list-style: none; margin: 0; padding: 0; }
.agenda li { display: grid; grid-template-columns: 50px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.agenda li:last-child { border-bottom: 0; }
.agenda li b { font-size: 14.5px; }
.agenda li > a { color: var(--navy); }
.date-box { background: #FDEBC4; border-radius: 8px; text-align: center; padding: 6px 0; line-height: 1.05; color: var(--navy); }
.date-box b { display: block; font-size: 19px; }
.date-box span { font-size: 12.5px; font-weight: 600; }
.date-box.red { background: var(--red-soft); color: #9F1E17; }
.agenda-b { padding: 4px 18px; }
.chart .grid { stroke: #E6EAF0; stroke-width: 1; }
.chart .axis { font-size: 12px; fill: var(--text); }
.chart { width: 100%; height: auto; display: block; }
.chart-legend { display: flex; gap: 8px 18px; flex-wrap: wrap; justify-content: center; font-size: 13px; margin-top: 8px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i { width: 15px; height: 15px; border-radius: 3px; display: inline-block; }
.cost-head { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; font-size: 15px; }
.big-total { font-size: 28px; font-weight: 800; letter-spacing: -.3px; }
.pill-delta { font-size: 13px; font-weight: 700; padding: 4px 12px; border-radius: 20px; }

/* header dashboard dengan gambar mobil (mockup) */
.top.top-hero { position: relative; height: 150px; align-items: flex-start; padding: 18px 24px 0; border-bottom: 0;
  background: var(--bg) url(hero-dashboard.png) no-repeat;
  background-size: auto 150px; background-position: right min(0px, calc(100vw - 1440px)) top; }
.top-hero .top-l { position: relative; z-index: 1; }
.top-hero .crumb { color: var(--navy); letter-spacing: 4px; font-weight: 800; font-size: 13px; }
.top-hero h1 { font-size: 30px; color: #0B1B33; letter-spacing: -.3px; }
.top-hero h1 em { position: relative; white-space: nowrap; color: #D49A2E; padding-right: 2px; }
.top-hero h1 em::after { content: ""; position: absolute; left: -6px; right: -10px; bottom: -11px; height: 13px;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20' preserveAspectRatio='none'><path d='M2 17 C55 5 135 1 198 5 C140 7 75 11 6 20 Z' fill='%23D49A2E'/></svg>") center / 100% 100% no-repeat; }
.filters { display: flex; align-items: center; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.filters label { font-size: 15px; margin-left: 18px; }
.filters label:first-child { margin-left: 0; }
.sel { position: relative; display: inline-flex; align-items: center; margin: 0; }
.sel select { -webkit-appearance: none; appearance: none; width: auto; min-width: 150px; font-weight: 600; font-size: 14.5px;
  padding: 9px 38px 9px 14px; border: 1px solid #DCE2EC; border-radius: 10px; box-shadow: 0 2px 6px rgba(15,30,61,.06); cursor: pointer;
  background: #fff url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230B2447' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>") right 13px center / 15px no-repeat; }
.sel.has-ic > .ic { position: absolute; left: 12px; color: var(--navy); pointer-events: none; }
.sel.has-ic select { padding-left: 38px; min-width: 170px; }
.sel-light select { min-width: 120px; padding: 5px 34px 5px 12px; font-size: 13.5px; border-radius: 8px; box-shadow: none; }
.dash-mid { grid-template-columns: 1.22fr 1.3fr 1fr; }
.dash-bot { grid-template-columns: 1.12fr 1fr; }
.comp { padding-top: 10px; padding-bottom: 10px; }
.tbl-dash th { text-transform: none; letter-spacing: 0; font-size: 13.5px; color: var(--text); background: #F3F5F9; }
.tbl-dash td { padding: 8px 12px; font-size: 14px; }
.veh { display: flex; align-items: center; gap: 12px; }
.veh:hover { text-decoration: none; }
.veh .thumb { width: 92px; height: 52px; border-radius: 8px; flex: none; }
.veh .thumb.empty .ic { width: 30px; height: 30px; }
.veh .unit-name { color: var(--navy); line-height: 1.25; white-space: nowrap; }
.tbl-dash .badge { font-size: 13px; padding: 5px 13px; }

/* ---------- kartu aset ---------- */
.hero { display: grid; grid-template-columns: 360px 1fr; gap: 20px; }
.photo-main { width: 100%; aspect-ratio: 16/10; object-fit: cover; border-radius: 10px; background: var(--line-2); display: grid; place-items: center; color: var(--faint); }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 8px; }
.photo-strip a, .photo-strip div { aspect-ratio: 4/3; border-radius: 8px; overflow: hidden; background: var(--line-2); display: grid; place-items: center;
  font-size: 11px; color: var(--faint); text-align: center; }
.photo-strip img { width: 100%; height: 100%; object-fit: cover; }
.photo-strip div { align-content: center; line-height: 1.3; }
.photo-strip .pv-nb { display: block; }
dl.kv { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 7px 14px; margin: 0; align-content: start; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
/* kartu aset: data unit dan jatuh tempo berdampingan bila muat, bertumpuk bila sempit */
.unit-info { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 20px 28px; align-items: start; min-width: 0; }
.unit-info > dl.kv { grid-template-columns: minmax(110px, min(38%, 175px)) minmax(0, 1fr); }
.unit-info dl.kv-biaya { grid-template-columns: minmax(110px, min(46%, 175px)) minmax(0, 1fr); gap: 5px 14px; }
.sub-h { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); font-weight: 700; margin: 0 0 8px; }
.sub-h.mt { margin-top: 18px; }
.due-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.due-list li { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--line-2); }
.due-list li:last-child { border-bottom: 0; }
.due-list li > div { flex: 1; min-width: 0; }
.due-list b { display: block; font-size: 13.5px; line-height: 1.3; }
.due-list .d { display: block; font-size: 12.5px; color: var(--muted); }
.due-list .badge { flex: none; }
.unit-info .toolbar { gap: 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 22px 0 16px; overflow-x: auto; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a.on, .tabs a:hover { color: var(--navy); border-color: var(--gold); text-decoration: none; }
.section, .card[id] { scroll-margin-top: 90px; }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { padding: 9px 0 9px 18px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 14px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); }
.files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.file { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; font-size: 12px; }
.file .pv { height: 96px; background: var(--line-2); display: grid; place-items: center; color: var(--faint); }
.file .pv img { width: 100%; height: 100%; object-fit: cover; }
.file .meta { padding: 7px 9px; }
.file .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.upload-row select { width: auto; }

/* ---------- auth ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; background: var(--navy); padding: 20px; }
.auth .box { width: 100%; max-width: 400px; background: #fff; border-radius: 16px; padding: 30px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth .logo { background: var(--navy); border-radius: 12px; padding: 16px; text-align: center; margin-bottom: 20px; color: #fff; }
.auth .logo img { width: 150px; }
.auth .logo b { display: block; color: var(--gold-2); font-size: 20px; letter-spacing: .5px; }
.auth .field { margin-bottom: 14px; }

@media (max-width: 1360px) {
  .dash-mid { grid-template-columns: 1fr 1fr; }
  .dash-mid > .card:last-child { grid-column: 1 / -1; }
  .dash-bot { grid-template-columns: 1fr; }
}
@media (max-width: 1200px) {
  .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; background: none; }
  .side { position: fixed; z-index: 20; width: 230px; left: -240px; transition: left .2s; }
  .side.open { left: 0; }
  .menu-btn { display: inline-flex; }
  .g2, .g3, .g4, .g6 { grid-template-columns: 1fr; }
  .span2 { grid-column: auto; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 16px; }
  .top { padding: 12px 110px 12px 16px; min-height: 60px; }
  .userbox { height: 60px; min-width: 0; padding: 0 12px 0 14px; gap: 8px; }
  .userbox .nm, .userbox .vsep { display: none; }
  .top.top-hero { height: auto; padding: 14px 16px 16px; background-image: none; }
  .top-hero h1 { font-size: 24px; padding-right: 100px; }
  .filters label { margin-left: 0; }
  .dash-mid, .dash-bot { grid-template-columns: 1fr; }
  .dash-mid > .card:last-child { grid-column: auto; }
  dl.kv { grid-template-columns: 1fr; }
}
@media print {
  .side, .top, .toolbar, .btn, .no-print, .userbox { display: none !important; }
  .app { display: block; }
  .card { box-shadow: none; }
}
.more-link { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; color: var(--navy); margin: 2px 0 8px; }
.more-link .ic { width: 15px; height: 15px; }

/* ======================================================================
   Halaman menu bergaya mockup "Pajak & STNK"
   ====================================================================== */
/* header halaman dengan gambar */
.top-hero.sub { height: 150px; padding-top: 16px; }
.top-hero.hero-b { background-image: url(hero-pajak.png); }
.top-hero.sub .top-l { text-shadow: 0 0 14px rgba(255,255,255,.9), 0 0 3px rgba(255,255,255,.9); }
.top-hero.sub .crumb { display: flex; align-items: center; gap: 8px; text-transform: none; letter-spacing: 0; font-size: 13.5px;
  font-weight: 600; color: var(--navy); }
.top-hero.sub .crumb a { color: var(--navy); }
.crumb-home .ic { width: 20px; height: 20px; color: var(--navy); vertical-align: -4px; }
.crumb-sep { width: 13px !important; height: 13px !important; color: #5B6478; }
.top-hero.sub h1 { font-size: 36px; margin-top: 6px; letter-spacing: -.5px; }
.top-hero .subtitle { font-size: 14.5px; color: #24324D; margin: 6px 0 0; max-width: 620px; font-weight: 500; }

/* kartu angka besar dengan garis warna */
.stat { display: flex; align-items: center; gap: 18px; padding: 20px 22px 24px; position: relative; overflow: hidden;
  border: 0; border-radius: 16px; color: var(--text); text-decoration: none; }
a.stat:hover { text-decoration: none; box-shadow: 0 8px 22px rgba(15,30,61,.12); }
.stat::after { content: ""; position: absolute; left: 22px; bottom: 0; width: 42%; height: 4px; border-radius: 4px 4px 0 0; background: var(--tone); }
.stat-ic .ic { width: 52px; height: 52px; stroke-width: 1.6; color: var(--tone); }
.stat-v { font-size: 32px; font-weight: 800; line-height: 1.05; letter-spacing: -.5px; white-space: nowrap; }
.stat-l { font-size: 14.5px; font-weight: 500; line-height: 1.25; margin-top: 4px; }
.stat-s { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.stat.dark { background: linear-gradient(135deg, #0A2347 0%, #163B6C 100%); color: #fff; }
.stat.dark .stat-ic .ic { color: #fff; }
.stat.dark .stat-s { color: #C9D5EA; }
.stat.dark::after { background: var(--gold-2); }
.tone-red { --tone: #E53935; } .tone-orange { --tone: #F5A623; } .tone-green { --tone: #26A04A; }
.tone-gold { --tone: #E9A82B; } .tone-navy { --tone: #0B2447; } .tone-blue { --tone: #1877F2; } .tone-gray { --tone: #9AA3B2; }

/* kepala kartu putih */
.card-h.plain { border-bottom: 0; padding: 16px 20px 6px; flex-wrap: wrap; row-gap: 10px; }
.card-h.plain h2 { white-space: nowrap; }
.card-h.plain .act { flex-wrap: wrap; justify-content: flex-end; }
.card-h.plain h2 { font-size: 17px; font-weight: 800; }
.card-h.plain > .ic { color: var(--navy); width: 26px; height: 26px; stroke-width: 1.8; }
.card-h .act .link-blue { color: var(--blue); font-weight: 700; display: inline-flex; align-items: center; gap: 6px; }

/* donut + legenda dua baris */
.legend2 { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; flex: 1; min-width: 0; }
.card .donut-wrap { gap: 20px; }
.legend2 li { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: start; }
.legend2 .sw { width: 14px; height: 14px; border-radius: 3px; margin-top: 3px; }
.legend2 b { display: block; font-size: 14px; font-weight: 600; line-height: 1.25; }
.legend2 span { font-size: 13px; color: var(--muted); }
.legend2 em { font-style: normal; font-weight: 800; font-size: 15.5px; }

/* daftar alert dengan pil status */
.alerts { list-style: none; margin: 0; padding: 0 20px 10px; }
.alerts li { display: grid; grid-template-columns: 36px 1fr auto; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line-2); }
.alerts li:last-child { border-bottom: 0; }
.al-ic .ic { width: 30px; height: 30px; stroke-width: 1.7; }
.al-ic.t-red { color: #E53935; } .al-ic.t-orange { color: #F5A623; } .al-ic.t-green { color: #26A04A; }
.al-ic.t-blue { color: #1877F2; } .al-ic.t-gold { color: #E9A82B; } .al-ic.t-navy { color: var(--navy); }
.al-t { color: var(--text); min-width: 0; }
.al-t:hover { text-decoration: none; }
.al-t b { display: block; font-size: 14px; line-height: 1.3; }
.al-t span { font-size: 13px; color: #3A4660; }
.pill { display: inline-block; font-size: 12.5px; font-weight: 700; border-radius: 20px; padding: 5px 14px; white-space: nowrap; text-align: center; }
.p-red { background: #FDE3E1; color: #C62828; } .p-orange { background: #FDEFD6; color: #9A5A00; }
.p-blue { background: #E3EEFD; color: #1553B0; } .p-green { background: #E0F4E5; color: #18792F; }
.p-gray { background: #EEF1F6; color: #5B6478; } .p-navy { background: var(--navy); color: #fff; }

/* tabel kepala navy bergaris (mockup) */
.tbl.mock { border-collapse: separate; border-spacing: 0; }
.tbl.mock th { background: var(--navy); color: #fff; text-transform: none; letter-spacing: 0; font-size: 13.5px; text-align: center;
  padding: 11px 10px; border-bottom: 0; border-right: 1px solid rgba(255,255,255,.14); position: sticky; top: 0; z-index: 1; }
.tbl.mock th:last-child { border-right: 0; }
.tbl.mock th.l, .tbl.mock td.l { text-align: left; }
.tbl.mock td { text-align: center; border-right: 1px solid #E8ECF2; border-bottom: 1px solid #E8ECF2; padding: 8px 9px; font-size: 13.5px; }
.tbl.mock td:last-child { border-right: 0; }
.tbl.mock tbody tr:hover td { background: #F7F9FD; }
.tbl.mock .num { text-align: right; }
.tbl-box { margin: 6px 16px 16px; border: 1px solid #E3E8EF; border-radius: 10px; overflow: auto; }
.tbl-box.scroll { max-height: 460px; }
.icon-btn { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; color: var(--blue); }
.icon-btn:hover { background: var(--blue-soft); text-decoration: none; }
.icon-btn .ic { width: 19px; height: 19px; }
.searchbox { position: relative; display: inline-flex; align-items: center; }
.searchbox .ic { position: absolute; right: 12px; color: var(--navy); pointer-events: none; }
.searchbox input { border-radius: 22px; padding: 8px 38px 8px 16px; min-width: 250px; width: auto; }
.btn.navy { background: var(--navy); border-color: var(--navy); color: #fff; border-radius: 22px; padding: 8px 18px; }
.btn.navy:hover { background: var(--navy-2); }
.card-h.plain .act select { width: auto; border-radius: 10px; padding: 6px 10px; }

/* susunan grid halaman */
.pg-row { display: grid; gap: 16px; margin-top: 16px; }
.pg-3 { grid-template-columns: 1fr 1fr 1.18fr; }
.pg-21 { grid-template-columns: minmax(0, 2.35fr) minmax(0, 1fr); align-items: start; }
.pg-12 { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
.stats4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.card-foot { padding: 0 20px 16px; font-size: 13px; color: var(--muted); display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.chart-legend.legend-top { justify-content: center; margin: 0 0 4px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; padding: 6px 20px 20px; }
.tile { display: flex; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--text); background: #fff; }
.tile:hover { text-decoration: none; border-color: var(--gold); box-shadow: 0 4px 12px rgba(15,30,61,.08); }
.tile > .ic { width: 30px; height: 30px; color: var(--gold-icon); flex: none; }
.tile-act .ic { width: 15px; height: 15px; }
.tile b { display: block; font-size: 14px; }
.tile span { font-size: 12px; color: var(--muted); }

@media (max-width: 1360px) {
  .pg-3 { grid-template-columns: 1fr 1fr; }
  .pg-3 > :last-child { grid-column: 1 / -1; }
  .pg-21, .pg-12 { grid-template-columns: 1fr; }
}
@media (max-width: 1200px) {
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .top-hero.sub { height: auto; padding-bottom: 14px; }
  .top-hero.sub h1 { font-size: 26px; }
  .pg-3, .stats4 { grid-template-columns: 1fr; }
  .pg-3 > :last-child { grid-column: auto; }
  .searchbox input { min-width: 0; width: 100%; }
}
.tbl.mock .thumb { width: 72px; height: 42px; margin: 0 auto; border-radius: 7px; }
.tbl.mock .thumb.empty .ic { width: 24px; height: 24px; }
.tbl.mock .pill .ic { width: 14px; height: 14px; vertical-align: -2px; }
.tbl.mock tfoot td { background: #F3F5F9; font-weight: 800; }
.btn.sm.navy { padding: 5px 12px; }
.card-h.plain .act .sel select { padding: 6px 34px 6px 12px; }
.tbl.mock td.l { min-width: 130px; }
@media (max-width: 900px) {
  .top-hero .crumb { padding-right: 215px; }
  .top-hero.sub h1 { padding-right: 96px; }
  .top-hero .crumb { flex-wrap: wrap; }
}
@media (max-width: 600px) {
  /* ponsel: remah roti disembunyikan agar tidak tertutup tombol bahasa dan akun */
  .top-hero .crumb { visibility: hidden; height: 46px; overflow: hidden; margin: 0; }
}

/* ---------- layar laptop kecil / skala Windows 125–150% ---------- */
@media (min-width: 901px) and (max-width: 1366px) {
  .content { padding: 14px 18px 36px; }
  .top.top-hero { height: 128px; padding-top: 14px; background-size: auto 128px; background-position: right top; }
  .top-hero h1 { font-size: 26px; }
  .top-hero .crumb { font-size: 12px; }
  .filters { margin-top: 12px; }
  .filters label { font-size: 14px; margin-left: 10px; }
  .sel select { padding: 7px 34px 7px 12px; font-size: 13.5px; min-width: 130px; }
  .sel.has-ic select { min-width: 150px; padding-left: 36px; }
  .top-hero.sub { height: 116px; padding-top: 12px; }
  .top-hero.sub, .top-hero.sub.hero-b { background-size: auto 116px; background-position: right top; }
  .top-hero.sub h1 { font-size: 28px; margin-top: 2px; }
  .top-hero.sub .crumb { font-size: 12.5px; }
  .top-hero .subtitle { font-size: 13.5px; margin-top: 2px; }
  .stats4, .pg-row { gap: 14px; }
  .pg-row { margin-top: 14px; }
  .stat { padding: 14px 16px 18px; gap: 14px; }
  .stat-ic .ic { width: 40px; height: 40px; }
  .stat-v { font-size: 26px; }
  .stat-l { font-size: 13.5px; margin-top: 2px; }
  .stat-s { font-size: 11.5px; }
  .card-h.plain { padding: 12px 16px 4px; }
  .card-h.plain h2 { font-size: 16px; }
  .card-h.plain .act select, .searchbox input { font-size: 13.5px; padding-top: 7px; padding-bottom: 7px; }
  .searchbox input { min-width: 0; width: 210px; }
  .card-h.plain .act { gap: 7px; }
  .btn.navy, .card-h.plain .act .btn { padding: 7px 13px; font-size: 13px; }
  .tbl-box { margin: 4px 12px 12px; }
  .alerts { padding: 0 16px 8px; }
  .alerts li { padding: 9px 0; }
}
/* tinggi layar terbatas: rapatkan menu samping */
@media (min-width: 901px) and (max-height: 760px) {
  .brand { padding: 12px 10px 10px; margin-bottom: 6px; }
  .brand img { width: 96px; margin-bottom: 2px; }
  .brand .b1 { font-size: 15px; } .brand .b2 { font-size: 18px; }
  .nav a { padding: 7px 12px; font-size: 14px; }
  .nav a .ic { width: 20px; height: 20px; }
  .nav .sep { margin: 4px 8px; }
  .side-art { min-height: 90px; flex-basis: 90px; }
}

.sel select { max-width: 290px; text-overflow: ellipsis; }
.ent-tag { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11.5px; font-weight: 700; color: #9A6A12;
  background: #FDF3DD; border-radius: 6px; padding: 2px 7px; }
.ent-tag .ic { width: 12px; height: 12px; }
.card-h.plain .act select { max-width: 220px; }
.chart { max-height: 290px; }
/* tombol bahasa ID / EN */
.langsw { display: inline-flex; border: 1px solid rgba(255,255,255,.35); border-radius: 8px; overflow: hidden; }
.langsw a { color: #DCE5F3; font-size: 12px; font-weight: 800; padding: 4px 8px; letter-spacing: .5px; }
.langsw a:hover { background: rgba(255,255,255,.12); text-decoration: none; }
.langsw a.on { background: #F5B942; color: var(--navy); }
.auth .langsw { position: absolute; top: 40px; right: 40px; z-index: 1; }
.auth .langsw a { padding: 3px 7px; font-size: 11px; }
.auth .box { position: relative; }
@media (max-width: 900px) { .userbox .langsw a { padding: 3px 6px; } }

/* ---------- AP Voucher & jual beli ---------- */
.sec-h { font-size: 13px; text-transform: uppercase; letter-spacing: 1px; color: var(--gold); margin: 22px 0 10px; }
.tbl tr.row-hi td { background: #FFF9EC; }
.apv-items select, .apv-items input { width: 100%; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.checklist li { display: flex; align-items: center; gap: 8px; }
.checklist li .ic { color: var(--faint); }
.checklist li.ok .ic { color: var(--green); }
.checklist li.no { color: #B3261E; }
.checklist li.no .ic { color: var(--red); }
.checklist li.warn .ic { color: var(--orange); }
.checklist .check { font-weight: 500; }
.steps4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.step { display: flex; gap: 10px; border: 1px solid var(--line); border-radius: 12px; padding: 12px; background: #fff; }
.step-n { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 700;
  background: var(--line-2); color: var(--muted); }
.step-t { display: flex; flex-direction: column; gap: 3px; min-width: 0; font-size: 13px; }
.step-t .pill { align-self: flex-start; padding: 3px 10px; font-size: 11.5px; }
.step.done { border-color: #BFE5C8; background: #F4FBF6; } .step.done .step-n { background: var(--green); color: #fff; }
.step.now { border-color: #F5D29A; background: #FFFAF0; } .step.now .step-n { background: var(--orange); color: #fff; }
.step.rej { border-color: #F2C2BE; background: #FFF6F5; } .step.rej .step-n { background: var(--red); color: #fff; }
.approve-box { border: 1px solid #F5D29A; background: #FFFAF0; border-radius: 12px; padding: 14px; }
details.fold { border-top: 1px solid var(--line-2); padding: 10px 0; }
details.fold > summary { cursor: pointer; font-weight: 600; color: var(--navy); list-style: none; display: flex; align-items: center; gap: 8px; }
details.fold > summary::-webkit-details-marker { display: none; }
details.fold[open] > summary { margin-bottom: 12px; }
details.fold.card-b { border-top: 1px solid var(--line-2); }
.form-grid.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.danger-t { color: var(--red) !important; }
.ok-t { color: #18792F; font-weight: 600; }
.flow-steps { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.flow-steps li { border: 1px solid var(--line); background: #fff; border-radius: 12px; padding: 10px 12px; font-weight: 600; font-size: 13px;
  color: var(--muted); display: flex; align-items: center; gap: 10px; }
.flow-steps li b { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--line-2); flex: none; }
.flow-steps li.done { color: #18792F; border-color: #BFE5C8; } .flow-steps li.done b { background: var(--green); color: #fff; }
.flow-steps li.now { color: var(--navy); border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-soft); } .flow-steps li.now b { background: var(--gold); color: var(--navy); }
.cek-tbl th.c, .cek-tbl td.c { text-align: center; width: 110px; }
.cek-tbl input[type=radio] { width: 17px; height: 17px; }
.cek-tbl.has-err { outline: 2px solid var(--red); }
.hak-tbl select { min-width: 100px; padding: 6px 8px; }
.tahap-form { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; }
.tahap-form .check { font-weight: 500; font-size: 12.5px; gap: 5px; }
.tahap-form .check input { width: 15px; height: 15px; }
@media (max-width: 1100px) { .steps4, .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .steps4, .flow-steps, .form-grid.g-2 { grid-template-columns: 1fr; } }
.apv-mini { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.apv-mini .pill { padding: 2px 9px; font-size: 11.5px; }
.note-warn { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--orange-soft); color: #7A4700; font-size: 13px;
  display: flex; gap: 8px; align-items: flex-start; }
.alamat-list { margin: 8px 0 10px; padding-left: 18px; display: grid; gap: 4px; }
.alamat-list code { font-size: 14px; font-weight: 600; background: var(--line-2); padding: 3px 8px; border-radius: 6px; }
.exportmenu { position: relative; display: inline-block; }
.exportmenu > summary { list-style: none; cursor: pointer; user-select: none; }
.exportmenu > summary::-webkit-details-marker { display: none; }
.exportmenu-pop { position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: 0 10px 24px rgba(15, 30, 61, .14); min-width: 175px; z-index: 40; padding: 6px; display: grid; gap: 2px; }
.exportmenu-pop a { padding: 8px 10px; border-radius: 8px; color: var(--text); display: flex; gap: 9px; align-items: center; font-weight: 600; font-size: 13px; }
.exportmenu-pop a:hover { background: var(--line-2); text-decoration: none; }
.tile-act { display: flex; gap: 6px; margin-top: 8px; }
.tile-act .btn { padding: 4px 9px; font-size: 12px; }
@media print { .exportmenu { display: none !important; } }

/* ---------- APV: isi dari invoice / kuitansi vendor ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); border: 0; }
.inv-box { border: 1px dashed #C9D3E1; background: #F7F9FC; border-radius: 12px; padding: 14px 16px; margin-bottom: 18px; scroll-margin-top: 90px; }
.inv-box:target { border-color: var(--gold); box-shadow: 0 0 0 3px var(--gold-soft); }
.inv-h { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.inv-h > .ic { width: 24px; height: 24px; color: var(--gold); flex: none; margin-top: 1px; }
.inv-h b { display: block; font-size: 14.5px; }
.inv-h span { display: block; font-size: 12.5px; color: var(--muted); margin-top: 2px; max-width: 760px; }
.inv-box .upload-row input[type=file] { max-width: 100%; }
.inv-files { list-style: none; margin: 12px 0 0; padding: 0; display: grid; gap: 6px; }
.inv-files li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.inv-nama { font-weight: 600; display: inline-flex; gap: 6px; align-items: center; min-width: 0; overflow-wrap: anywhere; margin-right: auto; }
.inv-files select { width: auto; max-width: 220px; padding: 5px 8px; font-size: 13px; }
.inv-files .pill { padding: 3px 10px; font-size: 11.5px; }
.inv-lepas { font-weight: 500; font-size: 12.5px; color: var(--muted); gap: 5px; }
.inv-lepas input { width: 15px; height: 15px; }
.inv-alasan { flex-basis: 100%; }
.inv-hasil { margin-top: 12px; }
.inv-hasil .note-warn { margin: 0 0 8px; }
.inv-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.inv-list li { display: grid; grid-template-columns: minmax(110px, 190px) minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 7px 12px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.inv-list li:last-child { border-bottom: 0; }
.inv-list .l { color: var(--muted); font-size: 12.5px; }
.inv-list .v { font-weight: 600; overflow-wrap: anywhere; }
.inv-list .pill { padding: 3px 10px; font-size: 11.5px; }
.inv-catatan { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13px; color: #7A4700; }
.inv-catatan li { display: flex; gap: 6px; align-items: flex-start; }
.inv-catatan .ic { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.inv-kosong { margin: 10px 0 0; }
.dari-inv { background-color: #FFF8E1 !important; border-color: #E9C470 !important; }
table.dari-inv { outline: 2px solid #E9C470; outline-offset: 2px; border-radius: 6px; }
.apv-pv { margin-bottom: 16px; overflow: hidden; }
.apv-pv > summary { list-style: none; cursor: pointer; }
.apv-pv > summary::-webkit-details-marker { display: none; }
.pv-tabs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 8px; }
.pv-tabs button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12.5px; cursor: pointer;
  max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-tabs button.on { border-color: var(--navy); background: var(--navy); color: #fff; }
.pv-item { padding: 0 16px 16px; display: grid; gap: 8px; justify-items: start; }
.pv-item[hidden] { display: none; }
.pv-item iframe { width: 100%; height: min(78vh, 900px); min-height: 420px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pv-item img { max-width: 100%; max-height: 78vh; border: 1px solid var(--line); border-radius: 8px; }
@media (min-width: 1200px) {
  .apv-split.ada-pv { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(360px, 1fr); gap: 16px; align-items: start; }
  .apv-split.ada-pv > .apv-main { grid-column: 1; grid-row: 1; }
  .apv-split.ada-pv > .apv-pv { grid-column: 2; grid-row: 1; position: sticky; top: 80px; margin-bottom: 0; }
  .apv-split.ada-pv .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apv-split.ada-pv .apv-items th:nth-child(1) { width: 118px !important; }
  .apv-split.ada-pv .apv-items th:nth-child(3) { width: 150px !important; }
  .apv-split.ada-pv .apv-items td { padding-left: 6px; padding-right: 6px; }
}

/* ======================================================================
   Tampilan ponsel (lebar layar <= 640px): bilah atas, navigasi bawah,
   tabel menjadi kartu, formulir satu kolom.
   ====================================================================== */
.mbar, .bnav { display: none; }
.m-v { display: contents; }
@media (max-width: 640px) {
  html { -webkit-text-size-adjust: 100%; }
  body { -webkit-tap-highlight-color: rgba(212, 168, 75, .25); }
  .app { display: block; background: none; min-height: 0; }
  .main { min-height: 100vh; padding-bottom: calc(66px + env(safe-area-inset-bottom)); }
  .content { padding: 8px 12px 20px; overflow-x: clip; }

  /* bilah atas */
  .mbar { display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30; height: 54px; padding: 0 10px 0 14px;
    background: linear-gradient(90deg, var(--side) 0%, var(--side-2) 100%); color: #fff; box-shadow: 0 2px 10px rgba(3, 27, 59, .25); }
  .mbar-brand { display: flex; align-items: center; gap: 10px; color: #fff; min-width: 0; margin-right: auto; }
  .mbar-brand:hover { text-decoration: none; }
  .mbar-brand img { width: 50px; height: auto; flex: none; }
  .mbar-brand span { font-weight: 800; font-size: 16px; letter-spacing: .3px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mbar-brand small { display: block; font-size: 11px; font-weight: 500; color: #AFC0DA; letter-spacing: 0; }
  .mbar-user .av { width: 36px; height: 36px; font-size: 15px; }
  .mbar-user .usermenu-pop { right: 0; top: calc(100% + 9px); min-width: 240px; }
  .um-who { padding: 8px 12px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
  .um-who b { display: block; font-size: 15px; }
  .um-who small { color: var(--muted); font-size: 12px; }
  .um-lang { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; font-weight: 600; }
  .um-lang .langsw { border-color: #D6DCE6; }
  .um-lang .langsw a { color: var(--muted); padding: 5px 12px; font-size: 13px; }
  .um-lang .langsw a.on { color: var(--navy); }
  .mbar-user .usermenu-pop a, .mbar-user .usermenu-pop button { padding: 11px 12px; }

  /* navigasi bawah */
  .bnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: #fff; border-top: 1px solid var(--line);
    box-shadow: 0 -4px 14px rgba(15, 30, 61, .08); padding: 4px 4px env(safe-area-inset-bottom); }
  .bnav a, .bnav button { flex: 1 1 0; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px;
    padding: 7px 2px 6px; color: var(--muted); font: inherit; font-size: 11px; font-weight: 600; background: none; border: 0; border-radius: 10px; cursor: pointer; }
  .bnav a:hover { text-decoration: none; }
  .bnav .ic { width: 23px; height: 23px; }
  .bnav span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bnav a.on { color: var(--navy); }
  .bnav a.on .ic { color: #C8932F; }
  .bnav a.on::before { content: ""; position: absolute; top: -4px; left: 30%; right: 30%; height: 3px; border-radius: 0 0 3px 3px; background: var(--gold); }
  .bnav .n { position: absolute; top: 2px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: 10px; font-weight: 700;
    border-radius: 9px; padding: 1px 5px; line-height: 1.3; }

  /* menu samping sebagai laci */
  .side { position: fixed; z-index: 40; top: 0; bottom: 0; left: -280px; width: 264px; height: auto; transition: left .2s; }
  .side.open { left: 0; box-shadow: 8px 0 30px rgba(0, 0, 0, .3); }
  .side.open + .main::after { content: ""; position: fixed; inset: 0; z-index: 35; background: rgba(3, 27, 59, .45); }
  .side .nav a { padding: 12px 12px; }
  .side-art { min-height: 90px; flex-basis: 90px; }

  /* kepala halaman (judul) tidak lagi menempel di atas */
  .top .menu-btn, .top .userbox, .top .spacer { display: none !important; }
  .top, .top.top-hero, .top-hero.sub { position: static; display: block; height: auto; min-height: 0; padding: 14px 16px 6px;
    background: transparent; border: 0; }
  .top .crumb, .top-hero .crumb, .top-hero.sub .crumb { visibility: visible; height: auto; overflow: visible; margin: 0; padding-right: 0;
    font-size: 12px; letter-spacing: .4px; flex-wrap: wrap; }
  .top-hero.sub .crumb { gap: 5px; }
  .crumb-home .ic { width: 16px; height: 16px; }
  .top h1, .top-hero h1, .top-hero.sub h1 { font-size: 22px; margin-top: 3px; padding-right: 0; letter-spacing: -.2px; }
  .top-hero h1 em::after { bottom: -8px; height: 9px; }
  .top-hero.sub .top-l { text-shadow: none; }
  .top-hero .subtitle { font-size: 13px; margin-top: 4px; color: var(--muted); }
  .filters { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 10px; margin-top: 12px; align-items: center; }
  .filters label, .filters label:first-child { margin: 0; font-size: 13px; color: var(--muted); font-weight: 600; }
  .filters .sel, .filters .sel select, .sel.has-ic select { width: 100%; min-width: 0; max-width: none; }

  /* kontrol formulir: huruf 16px agar iPhone tidak memperbesar layar saat mengetik */
  input[type=text], input[type=search], input[type=date], input[type=number], input[type=password], input[type=email], input[type=time],
  select, textarea, .sel select, .card-h.plain .act select, .searchbox input { font-size: 16px; }
  input[type=text], input[type=search], input[type=number], input[type=password], input[type=email], select { min-height: 42px; }
  input[type=date], input[type=time] { min-height: 42px; -webkit-appearance: none; appearance: none; }
  input[type=file] { max-width: 100%; font-size: 14px; }
  .form-grid, .form-grid.g-2 { grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .form-grid .span2, .form-grid .wide { grid-column: auto; }
  .form-actions { flex-wrap: wrap; gap: 8px; }
  .form-actions .btn { flex: 1 1 auto; justify-content: center; padding: 12px 14px; }
  .btn { padding: 10px 14px; }
  .btn.sm { padding: 7px 11px; }
  .toolbar { gap: 8px; }
  .toolbar .btn { flex: 1 1 auto; justify-content: center; }
  .toolbar .spacer { display: none; }
  .toolbar.split > .tb-info { flex-basis: 100%; min-height: 0; }
  .toolbar.split > .tb-act { flex: 1 1 100%; margin-left: 0; min-height: 0; }
  .upload-row > * { flex: 1 1 100%; }
  .upload-row select { width: 100%; }

  /* kartu & susunan grid */
  .grid, .pg-row { gap: 12px; }
  .mt { margin-top: 12px; }
  .grid > *, .pg-row > *, .stats4 > * { min-width: 0; }
  .g2, .g3, .g4, .dash-mid, .dash-bot, .pg-3, .pg-21, .pg-12, .hero { grid-template-columns: minmax(0, 1fr); }
  .span2, .pg-3 > :last-child, .dash-mid > .card:last-child { grid-column: auto; }
  .card { border-radius: 12px; }
  .card-h { padding: 12px 14px; flex-wrap: wrap; row-gap: 8px; }
  .card-h.navy { padding: 11px 14px; }
  .card-h.navy h2 { font-size: 15px; }
  .card-h h2 { min-width: 0; }
  .card-b { padding: 14px; }
  .card-foot { padding: 0 14px 14px; }
  .card-h.plain { padding: 14px 14px 6px; }
  .card-h.plain h2 { font-size: 16px; white-space: normal; flex: 1; }
  .card-h.plain .act { margin-left: 0; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .card-h.plain .act > * { min-width: 0; width: 100%; max-width: none; }
  .card-h.plain .act .searchbox { grid-column: 1 / -1; }
  .card-h.plain .act select, .card-h.plain .act .sel select { width: 100%; max-width: none; padding-top: 9px; padding-bottom: 9px; }
  .card-h.plain .act .btn, .card-h.plain .act .exportmenu > summary { width: 100%; justify-content: center; }
  .card-h.plain .act > .searchbox:first-child ~ :last-child:nth-child(even),
  .card-h.plain .act > :first-child:not(.searchbox) ~ :last-child:nth-child(odd) { grid-column: 1 / -1; }
  .searchbox { width: 100%; }
  .searchbox input { min-width: 0; width: 100%; }
  .exportmenu-pop { min-width: 190px; }
  .exportmenu-pop a { padding: 11px 12px; font-size: 14px; }

  /* dashboard */
  .kpis.g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .kpi { padding: 12px 10px; gap: 8px; align-items: flex-start; }
  .kpi .ico { width: 28px; height: 28px; }
  .kpi .ico .ic { width: 26px; height: 26px; }
  .kpis .kpi .l { min-height: 2.5em; font-size: 12px; }
  .kpi .v { font-size: 21px; }
  .kpi .v .u { font-size: 13px; }
  .kpis .kpi .s { white-space: normal; min-height: 0; font-size: 11.5px; }
  .donut-wrap, .card .donut-wrap { flex-direction: column; gap: 14px; align-items: stretch; }
  .donut-wrap > svg { width: 180px; height: auto; margin: 0 auto; }
  .legend { font-size: 14px; gap: 9px; }
  .bar-row { grid-template-columns: 24px 92px minmax(0, 1fr) 44px; gap: 10px; font-size: 14px; padding: 11px 0; }
  .bar-row .ic { width: 22px; height: 22px; }
  .agenda-b { padding: 4px 14px; }
  .agenda li { grid-template-columns: 46px minmax(0, 1fr) auto; gap: 12px; }
  .cost-head { gap: 8px 14px; font-size: 14px; }
  .big-total { font-size: 24px; }
  .veh .thumb { width: 72px; height: 42px; }
  .veh .unit-name { white-space: normal; }

  /* kartu angka */
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 12px 12px 16px; border-radius: 12px; }
  .stat::after { left: 12px; width: 50%; }
  .stat-ic .ic { width: 28px; height: 28px; }
  .stat-v { font-size: 22px; white-space: normal; overflow-wrap: anywhere; }
  .stat-l { font-size: 12.5px; margin-top: 2px; }
  .stat-s { font-size: 11px; }

  /* daftar, detail, alur */
  .alerts { padding: 0 14px 8px; }
  .alerts li { grid-template-columns: 30px minmax(0, 1fr); gap: 4px 12px; }
  .alerts li > :last-child:not(.al-t) { grid-column: 2; justify-self: start; }
  .al-ic .ic { width: 26px; height: 26px; }
  .tiles { grid-template-columns: minmax(0, 1fr); padding: 6px 14px 14px; gap: 10px; }
  dl.kv { grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) !important; gap: 9px 12px; }
  dl.kv dt { font-size: 12.5px; }
  dl.kv dd { overflow-wrap: anywhere; min-width: 0; }
  .tabs { margin: 16px -12px 12px; padding: 0 12px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .files { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .photo-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .steps4, .flow-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .step { padding: 10px; gap: 8px; }
  .step-n { width: 24px; height: 24px; font-size: 12px; }
  .step-t { font-size: 12px; }
  .flow-steps li { padding: 8px 10px; font-size: 12px; gap: 8px; }
  .approve-box { padding: 12px; }
  .approve-box .btn, .approve-box button { justify-content: center; }
  details.fold > summary { padding: 4px 0; }
  .note-warn { font-size: 12.5px; }
  .alamat-list code { font-size: 13px; overflow-wrap: anywhere; }
  .flash { font-size: 13.5px; align-items: flex-start; }
  .empty-state { padding: 24px 10px; }

  /* tabel menjadi kartu */
  .tbl-wrap, .tbl-box, .tbl-box.scroll { overflow: visible; max-height: none; }
  .tbl-box { margin: 6px 12px 12px; border: 0; border-radius: 0; }
  .card > .tbl-wrap { padding: 12px 12px 2px; }
  table.m-cards, .m-cards > tbody, .m-cards > tfoot { display: block; width: 100%; }
  .m-cards > thead { display: none; }
  .m-cards > tbody > tr, .m-cards > tfoot > tr { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; background: #fff;
    border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; box-shadow: 0 1px 3px rgba(15, 30, 61, .05); }
  .m-cards > tbody > tr.row-hi { border-color: #F5D29A; background: #FFFAF0; }
  .m-cards > tfoot > tr { background: #F3F5F9; font-weight: 700; }
  .m-cards > tbody > tr > td, .m-cards > tfoot > tr > td { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(88px, 36%) minmax(0, 1fr);
    gap: 10px; align-items: baseline; padding: 4px 0 !important; border: 0 !important; text-align: left !important; background: none !important;
    font-size: 13.5px; white-space: normal; overflow-wrap: anywhere; }
  .m-cards .m-v > br { display: none; }
  .m-cards .m-v > br + .badge, .m-cards .m-v > br + .pill, .m-cards .m-v > br + span { margin-left: 6px; }
  .m-cards td > .m-v { display: block; min-width: 0; }
  .m-cards td::before { content: attr(data-label); color: var(--muted); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; }
  .m-cards > tbody > tr > td:not([data-label]), .m-cards > tfoot > tr > td:not([data-label]) { display: block; }
  .m-cards td:not([data-label])::before { content: none; }
  .m-cards > tbody > tr:hover > td { background: none; }
  .m-cards td:empty, .m-cards td.m-hide, .m-cards td.m-kosong { display: none !important; }
  .m-cards td.m-title { order: -1; display: block; font-size: 14.5px; font-weight: 600; padding: 3px 0 8px !important; margin-bottom: 4px; border-bottom: 1px solid var(--line-2) !important; }
  .m-cards td.m-title::before { content: none; }
  .m-cards td.m-thumb { order: -2; grid-column: 1; display: block; padding: 3px 0 8px !important; margin-bottom: 4px; border-bottom: 1px solid var(--line-2) !important; }
  .m-cards td.m-thumb::before { content: none; }
  .m-cards td.m-thumb ~ td.m-title { grid-column: 2; }
  .m-cards td.m-thumb .thumb { width: 64px; height: 40px; margin: 0; }
  .m-cards td.m-act { display: flex !important; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; border-top: 1px solid var(--line-2) !important;
    margin-top: 4px; padding-top: 8px !important; }
  .m-cards td.m-act::before { content: none; }
  .m-cards td.m-span { display: block; }
  .m-cards td .empty-state, .m-cards td.empty-state { padding: 18px 6px; }
  .m-cards td br + .badge, .m-cards td br + .pill { margin-top: 3px; }
  .m-cards td.nowrap { white-space: normal; }
  .m-cards input, .m-cards select { width: 100%; }
  .m-cards input[type=checkbox], .m-cards input[type=radio] { width: 20px; height: 20px; min-height: 0; }
  .tbl.mock td.l { min-width: 0; }
  /* APV dari invoice: PDF dibuka di tab baru (banyak browser ponsel tidak menampilkan PDF di dalam halaman) */
  .pv-item iframe { display: none; }
  .inv-box { padding: 12px; }
  .inv-list li { grid-template-columns: minmax(0, 1fr) auto; }
  .inv-list .l { grid-column: 1 / -1; }
  .inv-files select { max-width: none; flex: 1 1 100%; }
  /* baris rincian APV: tombol hapus di pojok kanan atas kartu */
  .apv-items.m-cards > tbody > tr { position: relative; padding-right: 44px; }
  .apv-items.m-cards td.m-act { position: absolute; grid-column: auto; top: 8px; right: 6px; border: 0 !important; margin: 0; padding: 0 !important; }
  .apv-items.m-cards td.m-act .btn { padding: 8px; }
  .apv-items.m-cards > tfoot > tr { padding-right: 12px; }
}
/* layar sedang: foto unit tetap di kiri (tidak membesar selebar kartu) */
@media (min-width: 641px) and (max-width: 1200px) {
  .hero { grid-template-columns: minmax(200px, 30%) minmax(0, 1fr); }
  .photo-strip { gap: 6px; }
  .photo-strip .pv-nb { display: none; }
}
/* tablet (641–900px): kartu angka dua / tiga kolom */
@media (min-width: 641px) and (max-width: 900px) {
  .stats4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media print { .mbar, .bnav { display: none !important; } }

/*ttd*/
/* tanda tangan elektronik */
.ttd-pad canvas { display: block; width: 100%; height: 170px; background: #fff linear-gradient(to bottom, transparent 74%, #D5DCE6 74%, #D5DCE6 calc(74% + 1px), transparent calc(74% + 1px));
  border: 1.5px dashed #B9C4D3; border-radius: 12px; touch-action: none; cursor: crosshair; }
.ttd-pad.isi canvas { border-style: solid; border-color: #8FA3BF; }
.ttd-pad-bar { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 6px; font-size: 12.5px; }
.ttd-lihat { display: inline-block; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 16px; margin: 4px 0 10px; }
.ttd-lihat img { display: block; max-height: 90px; max-width: 100%; }
.ttd-mini { display: block; max-height: 36px; max-width: 100%; margin-top: 6px; }
.ttd-setuju { margin: 12px 0; }
@media (max-width: 640px) { .ttd-pad canvas { height: 150px; } }
/*/ttd*/

/* tanda pembuat */
.hak-cipta { margin: 18px 0 0; text-align: center; font-size: 11.5px; color: #8A93A6; letter-spacing: .2px; }
