/* Kas DSI — styles.css · tokens locked per design doc §9 */
:root {
  --wash: #EAF6F3;
  --surface: #FFFFFF;
  --ink: #12343B;
  --accent: #5BC8B8;
  --action: #5B8DEF;
  --amber: #E8A23D;
  --ink-dim: #5A757B;
  --line: #D8E9E4;
  --radius: 16px;
  --danger: #C4453A;
  --soft-danger: #D96C5F;
  --ok: #2E8B6E;
  --dri: #E07B26;
  --dsi: #1B5EA6;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--wash);
  color: var(--ink);
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.45;
}

.hidden { display: none !important; }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.dim { color: var(--ink-dim); }
.hint { font-weight: 400; color: var(--ink-dim); font-size: 0.85em; }

/* ---------- buttons: pills ---------- */
.btn {
  font: inherit; font-weight: 700;
  border: none; border-radius: 999px;
  padding: 9px 22px; cursor: pointer;
  transition: filter .12s ease;
}
.btn:hover { filter: brightness(1.06); }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.btn-primary { background: var(--action); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1.5px solid var(--line); }
.btn-danger { background: transparent; color: var(--danger); border: 1.5px solid var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
#editDelete { margin-right: auto; }
.delete-title { color: var(--danger); margin: 0 0 4px; }
.delete-summary {
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin: 10px 0; line-height: 1.5;
}
.delete-warn { color: var(--danger); font-weight: 700; margin: 8px 0 0; }
.btn-wide { width: 100%; margin-top: 14px; }
.btn-small { padding: 5px 14px; font-size: 0.85em; font-weight: 600; }

/* ---------- gate (login / setup) ---------- */
.gate {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: 24px;
}
.gate-card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 8px 32px rgba(18, 52, 59, .08);
  padding: 36px;
  width: 100%; max-width: 400px;
}
.brand { text-align: center; margin-bottom: 26px; }
.brand-mark {
  font-size: 42px; font-weight: 800; letter-spacing: -1px;
  color: var(--ink);
}
.brand-mark::after { content: '.'; color: var(--accent); }
.brand-sub { color: var(--ink-dim); font-weight: 600; }
.setup-note { color: var(--ink-dim); margin-top: 0; }

/* ---------- forms ---------- */
label { display: block; font-weight: 700; margin: 14px 0 5px; }
input[type="text"], input[type="email"], input[type="password"],
input[type="date"], input[type="number"], .select {
  font: inherit;
  width: 100%;
  padding: 9px 13px;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
/* v2.21.0: amount fields — grouped id-ID numbers read better right-aligned. */
.num-input { text-align: right; font-variant-numeric: tabular-nums; }
input:focus-visible, .select:focus-visible {
  outline: none;
  border-color: var(--action);
  box-shadow: 0 0 0 3px rgba(91, 141, 239, .18);
}
.form-error { color: var(--danger); font-weight: 600; min-height: 1.2em; margin: 10px 0 0; }
.form-ok { color: var(--ok); font-weight: 600; min-height: 1.2em; margin: 10px 0 0; }

/* ---------- app shell ---------- */
.topbar {
  display: flex; align-items: center; gap: 24px;
  background: var(--surface);
  padding: 12px 24px;
  border-bottom: 1.5px solid var(--line);
  flex-wrap: wrap;
}
.brand-inline { font-size: 20px; font-weight: 800; }
.brand-inline .brand-dim { font-weight: 600; color: var(--ink-dim); font-size: 15px; }
.nav { display: flex; gap: 6px; flex: 1; }
.nav-btn {
  font: inherit; font-weight: 700;
  background: transparent; border: none; cursor: pointer;
  color: var(--ink-dim);
  padding: 8px 16px; border-radius: 999px;
}
.nav-btn.active { background: var(--wash); color: var(--ink); }
.nav-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-name { font-weight: 700; color: var(--ink-dim); }

.main { max-width: min(1600px, 95vw); margin: 24px auto; padding: 0 20px; }
.footer { text-align: center; color: var(--ink-dim); font-size: 12px; padding: 18px; }

/* ---------- cards ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 4px 20px rgba(18, 52, 59, .05);
  padding: 22px;
}
.card-narrow { max-width: 520px; }
.card-title { margin: 0 0 4px; font-size: 20px; }
.card-sub { margin: 0 0 10px; color: var(--ink-dim); }
.card-head-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }

/* ---------- ledger ---------- */
.controls { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.controls .select { width: auto; min-width: 110px; }
#accountSelect { min-width: 220px; }
.select-wide { width: 100%; }

.ledger-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 14px; flex-wrap: wrap;
}
.ledger-title { font-size: 22px; font-weight: 800; }
.ledger-meta { color: var(--ink-dim); font-weight: 600; }
.saldo-box { text-align: right; }
.saldo-label { color: var(--ink-dim); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.saldo-value { font-size: 22px; font-weight: 800; }

.table-wrap { overflow-x: auto; }
table.ledger { width: 100%; border-collapse: collapse; }
.ledger th {
  text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--ink-dim); padding: 8px 10px; border-bottom: 2px solid var(--line);
}
.ledger th.num { text-align: right; }
.ledger td { padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.ledger tbody tr:hover { background: #F4FBF9; }
.row-opening td { color: var(--ink-dim); font-weight: 700; background: #F7FBFA; }
.voucher { white-space: nowrap; font-weight: 600; }
.desc { max-width: 320px; }
.loading { color: var(--ink-dim); text-align: center; padding: 24px !important; }

.badge-amber {
  background: rgba(232, 162, 61, .14);
  color: #9A6716;
  border-radius: 999px;
  padding: 2px 11px;
  font-weight: 700; font-size: 0.85em;
  white-space: nowrap;
}

.empty { text-align: center; color: var(--ink-dim); padding: 42px 0; font-weight: 600; }

/* ---------- manual entry ---------- */
.amount-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
#manualForm .btn-primary { margin-top: 16px; }

/* ---------- users ---------- */
.row-actions { white-space: nowrap; text-align: right; }
.row-actions .btn { margin-left: 6px; }

.modal {
  position: fixed; inset: 0;
  background: rgba(18, 52, 59, .35);
  display: grid; place-items: center;
  padding: 20px; z-index: 40;
}
.modal-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 26px;
  width: 100%; max-width: 420px;
}
.modal-card h3 { margin: 0 0 6px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* ---------- draggable modal (v2.30.3) ---------- */
/* The grip is the title block; drag writes a translate() on .modal-card only,
   so .modal keeps its grid centering and split-open widening still works. */
.modal-grip {
  display: flex; align-items: flex-start; gap: 10px;
  margin: -26px -26px 0; padding: 22px 26px 8px;
  border-radius: var(--radius) var(--radius) 0 0;
  cursor: move; touch-action: none;
  user-select: none; -webkit-user-select: none;
}
.modal-grip-text { flex: 1; min-width: 0; }
.modal-grip h3 { margin: 0 0 2px; }
.modal-grip .edit-context { white-space: normal; margin-bottom: 0; }
.grip-recenter {
  flex: none; width: 28px; height: 28px; padding: 0;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: transparent; color: var(--ink-dim);
  font: inherit; font-size: 14px; line-height: 1; cursor: pointer;
}
.grip-recenter:hover { border-color: var(--accent); color: var(--ink); }
.grip-recenter:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
/* Moved off centre: lighten the backdrop so the ledger behind is readable. */
.modal.modal-moved { background: rgba(18, 52, 59, .12); }
@media (max-width: 820px) {
  .modal-grip { cursor: default; }
  .grip-recenter { display: none; }
}

/* ---------- split voucher (v2.12.0) ---------- */
.modal-card.split-open { max-width: 640px; }
.split-toggle-row { margin: 14px 0 2px; }
.split-box { background: var(--wash); border-radius: 12px; padding: 12px 14px; margin-top: 8px; }
.split-total { margin-bottom: 10px; }
.split-lines-head {
  display: grid; grid-template-columns: 118px 1fr 1fr 30px;
  gap: 8px; align-items: center;
}
.split-lines-head { font-size: 0.85em; color: var(--ink-dim); margin-bottom: 4px; }
.split-line { margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px dashed var(--line); }
.split-line:last-child { border-bottom: none; margin-bottom: 0; }
.split-line-top {
  display: grid; grid-template-columns: 118px 1fr 30px;
  gap: 8px; align-items: center; margin-bottom: 5px;
}
.split-line-bot {
  display: grid; grid-template-columns: 1.3fr 1fr;
  gap: 8px; align-items: center;
}
.split-line .select, .split-line input { width: 100%; margin: 0; }
.split-line .split-del { padding: 4px 9px; line-height: 1; }
.split-check { margin: 10px 0 2px; }
.split-check .ok { color: var(--ok); }
.split-check .bad { color: var(--soft-danger); }
.split-warn { color: var(--soft-danger); font-size: 0.85em; margin: 6px 0 0; }
@media (max-width: 640px) {
  .split-lines-head { display: none; }
  .split-line-top { grid-template-columns: 104px 1fr 30px; }
  .split-line-bot { grid-template-columns: 1fr; }
}

/* ---------- responsive ---------- */
@media (max-width: 640px) {
  .topbar { gap: 10px; padding: 10px 14px; }
  .main { margin: 14px auto; padding: 0 10px; }
  .card { padding: 14px; }
  .ledger td, .ledger th { padding: 6px 7px; }
  .desc { max-width: 180px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}

/* ===== Build 3: import pipeline ===== */
.attention-toggle {
  display: inline-flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: 0.92em;
  background: var(--surface); border-radius: 999px; padding: 8px 16px;
  cursor: pointer; user-select: none;
}
.attention-toggle input { accent-color: var(--amber); }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.drop-zone {
  border: 2px dashed var(--line); border-radius: var(--radius);
  padding: 34px 20px; text-align: center; cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.drop-zone:hover, .drop-zone:focus-visible { border-color: var(--accent); outline: none; }
.drop-zone.drop-hot { border-color: var(--action); background: rgba(91, 141, 239, .06); }
.drop-zone.drop-busy { opacity: .55; pointer-events: none; }
.drop-icon { font-size: 30px; color: var(--accent); line-height: 1; margin-bottom: 8px; }

.imp-head {
  display: flex; justify-content: space-between; align-items: center;
  gap: 16px; flex-wrap: wrap; margin-top: 16px;
}
.imp-acct { text-align: right; }
.imp-book { font-weight: 800; font-size: 1.06em; }
.badge-bank {
  display: inline-block; font-size: 0.78em; font-weight: 800;
  background: rgba(91, 200, 184, .16); border-radius: 999px; padding: 3px 11px;
}

.imp-receipt { margin-top: 12px; }
.imp-receipt-title {
  margin: 0 0 8px; font-size: 0.82em; font-weight: 800;
  letter-spacing: .02em; color: var(--ink-dim); text-transform: uppercase;
}
.imp-receipt ul {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 5px 26px;
}
.imp-receipt li { display: flex; align-items: baseline; gap: 9px; font-size: 0.92em; padding: 2px 0; }
.imp-tick {
  flex: none; width: 17px; height: 17px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  background: var(--accent); transform: translateY(2px);
}
.imp-fail .imp-tick, .imp-tick-bad { background: var(--amber); }
.imp-tick-ok { background: var(--accent); }
.imp-val { margin-left: auto; color: var(--ink-dim); font-size: 0.86em; text-align: right; }
.imp-fail .imp-val { color: var(--amber); font-weight: 700; }

.imp-chips { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.chip {
  background: var(--surface); border-radius: 999px; padding: 7px 15px;
  font-size: 0.88em; font-weight: 700;
}
.chip-amber { background: rgba(232, 162, 61, .15); }
.chip-clear { color: var(--ok); }
.chip-pend { color: var(--action); }
.chip-dup { color: var(--ink-dim); }

tr.row-dup td { opacity: .42; }
tr.row-amber { background: rgba(232, 162, 61, .12); }
.tag-dup, .tag-fixed {
  font-size: 0.72em; font-weight: 800; border-radius: 999px;
  padding: 2px 9px; white-space: nowrap;
  background: var(--wash); color: var(--ink-dim);
}
.tag-fixed { background: rgba(91, 200, 184, .16); color: var(--ink); }
.imp-cat { font-weight: 700; }
.raw-desc {
  color: var(--ink-dim); font-size: 0.78em; margin-top: 2px;
  max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

.fixbox { display: flex; flex-direction: column; gap: 5px; min-width: 220px; }
.fixbox label { font-size: 0.74em; font-weight: 800; color: var(--ink-dim); }
.fixbox select, .fixbox input {
  font: inherit; font-size: 0.92em; color: var(--ink);
  border: 1.5px solid rgba(232, 162, 61, .55); border-radius: 10px;
  padding: 6px 9px; background: var(--surface); width: 100%;
}
.fixbox select:focus, .fixbox input:focus {
  outline: 2px solid var(--action); outline-offset: 1px; border-color: transparent;
}

.imp-bar {
  position: sticky; bottom: 0; z-index: 5;
  background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 -6px 24px rgba(18, 52, 59, .10);
  padding: 13px 18px; margin-top: 12px;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.imp-status { font-weight: 700; display: inline-flex; align-items: center; gap: 8px; }
.imp-grow { flex: 1; }
.btn:disabled { background: var(--line); color: var(--ink-dim); cursor: not-allowed; filter: none; }

.edit-context { color: var(--ink-dim); font-size: 0.9em; margin-bottom: 6px; }
.edit-raw {
  background: var(--wash); border-radius: 10px; padding: 8px 12px;
  font-size: 0.82em; color: var(--ink-dim); margin-bottom: 12px;
  word-break: break-all;
}

/* ---------- laporan ---------- */
.rep-tabs { display: flex; gap: 8px; }
.rep-tab {
  border: none; background: #fff; color: var(--ink);
  padding: 8px 18px; border-radius: 999px; font-family: inherit;
  font-weight: 700; font-size: 14px; cursor: pointer;
  box-shadow: 0 1px 2px rgba(18, 52, 59, .08);
}
.rep-tab.active { background: var(--accent); color: var(--ink); }
.rep-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.rep-controls input[type="date"] {
  font-family: inherit; font-size: 14px; padding: 7px 10px;
  border: 1px solid rgba(18, 52, 59, .18); border-radius: 10px; color: var(--ink);
}
tr.group-row td {
  background: rgba(91, 200, 184, .14); font-weight: 800;
  letter-spacing: .04em; padding: 8px 12px;
}
tr.subtotal-row td { font-weight: 800; border-top: 2px solid rgba(18, 52, 59, .18); }
.badge-status {
  display: inline-block; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700;
  background: rgba(18, 52, 59, .08); color: var(--ink);
}
.dot-stale {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber); margin-right: 7px; vertical-align: 1px;
}

.rep-filters { margin: 6px 0 14px; }
.rep-search {
  font-family: inherit; font-size: 14px; padding: 7px 12px; min-width: 260px;
  border: 1px solid rgba(18, 52, 59, .18); border-radius: 999px; color: var(--ink);
}
#gabTable td { max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.table-scroll { overflow-x: auto; }
#rekapTable th, #rekapTable td { white-space: nowrap; }
td.neg { color: #B4552D; }
/* Transposed rekap: keep the category label column visible when scrolling outlets */
#rekapTable th:first-child, #rekapTable td:first-child {
  position: sticky; left: 0; z-index: 2; text-align: left; background: #fff;
}
.ledger td.hist { color: #B4552D; background: #FCF4E6; }
.ledger td.pct { color: var(--action); }

/* ---------- Build 6: gate animation + Beranda (game layer) ---------- */
.gate-anim { width: 120px; height: 120px; margin: 0 auto 6px; }

.brn-greet { margin: 4px 0 18px; }
.brn-hello { margin: 0; font-size: 26px; font-weight: 800; color: var(--ink); }
.brn-date { margin: 2px 0 0; color: var(--ink-dim); font-size: 14px; }

.brn-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.brn-main { display: flex; flex-direction: column; gap: 16px; }
.brn-side { display: flex; flex-direction: column; gap: 16px; }

.brn-count { font-weight: 800; color: var(--ink-dim); font-size: 15px; }
.brn-progress {
  height: 9px; background: var(--wash);
  border-radius: 999px; overflow: hidden; margin: 4px 0 14px;
}
.brn-progress-fill {
  height: 100%; width: 0; background: var(--accent);
  border-radius: 999px; transition: width .4s ease;
}
.brn-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.brn-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 13px; border-radius: 999px;
  font-size: 13px; font-weight: 700; white-space: nowrap;
}
.brn-chip-done { background: var(--accent); color: #08302B; }
.brn-chip-done::before { content: "\2713"; font-weight: 800; }
.brn-chip-todo {
  background: var(--surface); color: #8A6A2A;
  border: 1.5px dashed var(--amber);
}
.brn-go { margin-top: 16px; align-self: flex-start; }

.brn-allclear { text-align: center; }
.brn-allclear-title { font-size: 20px; font-weight: 800; color: var(--ink); }
.brn-allclear-sub { color: var(--ink-dim); font-size: 14px; margin-top: 2px; }
.brn-anim { margin: 0 auto; }
.brn-anim-lg { width: 180px; height: 180px; }

.brn-stat { text-align: center; }
.brn-stat-num { font-size: 30px; font-weight: 800; color: var(--ink); line-height: 1.1; text-align: center; }
.brn-stat-label { color: var(--ink-dim); font-size: 13px; margin-top: 2px; }

.brn-links { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.brn-link {
  font: inherit; font-weight: 700; cursor: pointer;
  background: var(--surface); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius);
  padding: 14px 18px; flex: 1 1 200px; text-align: left;
  transition: border-color .12s ease;
}
.brn-link:hover { border-color: var(--accent); }
.brn-link:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

@media (max-width: 720px) {
  .brn-grid { grid-template-columns: 1fr; }
}

/* ---------- Build 6 slice 2: empty-state + success illustrations ---------- */
.empty-anim { width: 140px; height: 140px; margin: 0 auto 8px; pointer-events: none; }
.empty-text { margin: 0; }
.drop-anim { width: 96px; height: 96px; margin: 0 auto 6px; pointer-events: none; }
.done-anim { width: 120px; height: 120px; margin: 0 auto 2px; pointer-events: none; }

/* outlet admin: inline checkbox row in the modal form */
.check-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 10px 0 4px;
  font-weight: 600;
  color: var(--ink, #12343B);
}
.check-inline input { width: auto; margin: 0; }

/* ---- CSV/PDF exports on Buku Bank ledger head ---- */
.ledger-head-right { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.ledger-exports { display: flex; gap: 8px; }

/* ---- PDF size/orientation popover ---- */
.pdf-pop {
  position: absolute; z-index: 60; min-width: 220px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius); padding: 14px;
  box-shadow: 0 10px 30px rgba(18, 52, 59, .16);
}
.pdf-pop-title { font-weight: 800; font-size: 13px; margin: 0 0 4px; }
.pdf-pop-row { margin-top: 10px; }
.pdf-pop-label {
  color: var(--ink-dim); font-weight: 700; font-size: 11px;
  text-transform: uppercase; letter-spacing: .05em; margin-bottom: 6px;
}
.pdf-seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.pdf-seg button {
  border: 0; background: transparent; color: var(--ink);
  font: inherit; font-weight: 700; padding: 6px 16px; cursor: pointer;
}
.pdf-seg button + button { border-left: 1.5px solid var(--line); }
.pdf-seg button.on { background: var(--accent); color: #fff; }
.pdf-pop-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* ---------- settings menu (admin: Outlet + Pengguna) ---------- */
.settings-wrap { position: relative; }
.settings-btn { display: inline-flex; align-items: center; gap: 6px; }
.settings-gear { width: 18px; height: 18px; flex: 0 0 auto; }
.settings-menu {
  position: absolute; top: calc(100% + 6px); right: 0; z-index: 60;
  min-width: 180px; padding: 6px;
  background: var(--surface); border: 1.5px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 10px 30px rgba(18, 52, 59, .16);
  display: flex; flex-direction: column; gap: 2px;
}
.settings-item {
  font: inherit; font-weight: 700; text-align: left;
  background: transparent; border: none; cursor: pointer;
  color: var(--ink); padding: 10px 14px; border-radius: 10px;
}
.settings-item:hover { background: var(--wash); }
.settings-item:focus-visible { outline: 3px solid var(--accent); outline-offset: -2px; }

/* ---------- laporan: laba rugi (income statement) ---------- */
#lrTable td { padding: 7px 12px; }
.lr-band td {
  background: var(--wash); font-weight: 800; font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase; color: var(--ink-dim);
  border-bottom: none; padding-top: 13px;
}
tr.lr-sub td { border-top: 2px solid rgba(18, 52, 59, .18); font-weight: 800; }
tr.lr-base td { background: rgba(91, 200, 184, .18); font-weight: 800; }
tr.lr-wf td { background: rgba(91, 200, 184, .10); font-weight: 700; }
tr.lr-final td { background: var(--action); color: #fff; font-weight: 800; }
.lr-ded td.num { color: #B4552D; }

/* laba rugi: Bulanan/Setahun toggle + year grid */
.lr-seg { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.lr-seg button { font: inherit; font-weight: 800; border: 0; background: transparent; color: var(--ink); padding: 8px 16px; cursor: pointer; }
.lr-seg button.on { background: var(--accent); color: #fff; }
#lrHead td {
  font-weight: 800; color: var(--ink-dim); font-size: 11px; text-transform: uppercase;
  letter-spacing: .04em; border-bottom: 2px solid var(--line); background: var(--surface); white-space: nowrap;
}
#lrTable td.k { position: sticky; left: 0; z-index: 1; background: var(--surface); min-width: 240px; }
#lrHead td.k { z-index: 2; }
#lrTable td.num { white-space: nowrap; }
#lrTable td.tot { font-weight: 800; border-left: 2px solid var(--line); }
#lrTable td.pct { color: var(--ink-dim); min-width: 60px; }
#lrTable tr.lr-band td.k { background: var(--wash); }
#lrTable tr.lr-base td.k { background: #dff3ef; }
#lrTable tr.lr-wf td.k { background: #ecf8f5; }
#lrTable tr.lr-final td.k { background: var(--action); color: #fff; }
#lrTable tr.lr-final td.pct { color: rgba(255, 255, 255, .85); }
.lr-memo { margin-top: 12px; padding: 12px 14px; background: var(--wash); border-radius: 12px; font-size: 13px; line-height: 1.55; color: var(--ink); }
.lr-memo .lr-memo-t { font-weight: 800; margin-bottom: 4px; }
.lr-memo .lr-memo-t + div + .lr-memo-t { margin-top: 8px; }
.lr-memo b { font-variant-numeric: tabular-nums; }
.lr-badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.lr-badge-aktual { background: #dff3ef; color: #0F6E56; }
.lr-badge-sebagian { background: #fbeed8; color: #854F0B; }

/* ===== Penjualan Aktual (v2.23.0) ===== */
.sa-period { display: flex; gap: 8px; }
.sa-actions { display: flex; align-items: center; gap: 12px; }
.sa-status { font-size: 13px; }
.sa-status-ok { color: #0F6E56; }
.sa-status-bad { color: #A32D2D; }
.sa-table td, .sa-table th { vertical-align: middle; }
.sa-table .sa-name { display: block; font-weight: 400; font-size: 12px; color: var(--ink-dim); }
.sa-in { width: 100%; min-width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.sa-table td.sa-bank, .sa-table td.sa-gap { font-variant-numeric: tabular-nums; color: var(--ink-dim); white-space: nowrap; }
.sa-table td.sa-gap-bad { color: #A32D2D; font-weight: 700; }
.sa-table td.sa-flag, .sa-table th.sa-flag { white-space: nowrap; font-size: 11px; font-weight: 700; }
.sa-flag-aktual { color: #0F6E56; }
.sa-flag-estimasi { color: var(--ink-dim); font-weight: 400; }
.sa-flag-belum { color: #854F0B; }
.sa-flag-periksa { color: #A32D2D; }
.sa-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--ink-dim); }
.sa-legend .sa-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.sa-dot-ok { background: #1D9E75; }
.sa-dot-warn { background: #EF9F27; }
.sa-dot-bad { background: #E24B4A; }

/* ===== Perlu perhatian (v2.9.11) ===== */
/* Dashboard card: hopestar icon + amber count badge */
.brn-link-attn { display: flex; align-items: center; gap: 10px; }
.brn-link-ico { width: 26px; height: 26px; flex: 0 0 auto; display: block; }
.brn-link-txt { flex: 0 1 auto; }
.brn-link-badge {
  background: rgba(232, 162, 61, .14); color: #9A6716;
  font-weight: 800; font-size: 12px; padding: 1px 9px; border-radius: 999px;
}

/* Worklist view */
.att-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.att-title { font-size: 24px; font-weight: 800; margin: 0; }
.att-sub { color: var(--ink-dim); font-size: 14px; margin: 4px 0 0; max-width: 640px; }
.att-group { margin-bottom: 18px; }
.att-group-head { font-weight: 800; font-size: 14px; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.att-code { color: var(--ink-dim); font-weight: 600; }
.att-badge { background: rgba(232, 162, 61, .14); color: #9A6716; font-weight: 800; font-size: 12px; padding: 1px 8px; border-radius: 999px; }
.att-rows { border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.att-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  font: inherit; text-align: left; cursor: pointer; color: var(--ink);
  background: rgba(232, 162, 61, .05); border: 0; border-bottom: 1px solid var(--wash);
  padding: 11px 14px; transition: background .12s ease;
}
.att-row:last-child { border-bottom: 0; }
.att-row:hover { background: rgba(232, 162, 61, .12); }
.att-row:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.att-date { flex: 0 0 74px; font-size: 13px; }
.att-voucher { flex: 0 0 140px; font-size: 13px; font-weight: 700; }
.att-desc { flex: 1 1 auto; min-width: 0; font-size: 13px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-amt { flex: 0 0 auto; font-size: 13px; font-weight: 700; text-align: right; }
.att-chev { flex: 0 0 auto; color: var(--action); font-size: 18px; font-weight: 800; line-height: 1; }

@media (max-width: 720px) {
  .att-voucher { flex-basis: 118px; }
  .att-date { flex-basis: 60px; }
}

/* Ledger row flash after a jump from the worklist */
tr.row-jump { animation: rowJump 2.2s ease; }
@keyframes rowJump {
  0%, 40% { background: rgba(91, 141, 239, .22); }
  100% { background: transparent; }
}

/* ---- v2.10.0: Petty Cash card + Entri Manual required markers ---- */
/* Petty Cash quick-link card (mirrors the Perlu perhatian card layout) */
.brn-link-petty { display: flex; align-items: center; gap: 10px; }

/* Required-field marker: Outlet (always, inside the petty-only row) and
   Kategori (only in petty-cash mode via .manual-pc on the form). */
.req { color: var(--danger); font-weight: 800; }
.req-pc { display: none; }
.manual-pc .req-pc { display: inline; }

/* ---- v2.10.2: dedicated Petty Cash page ---- */
.pc-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.pc-head-ico { width: 46px; height: 46px; flex: none; }
.pc-head-ico svg { width: 100%; height: 100%; display: block; }
.pc-title { margin: 0; font-size: 24px; font-weight: 800; letter-spacing: .01em; }
.pc-sub { margin: 2px 0 0; color: var(--ink-dim); font-weight: 600; }

.pc-entry-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.pc-field { display: flex; flex-direction: column; min-width: 0; }
.pc-field > label { margin: 0 0 5px; }
.pc-entry-row > .pc-field { flex: 1 1 160px; }
.pc-entry-row > .pc-field-date { flex: 0 1 170px; }
.pc-entry-row > .pc-field-nominal { flex: 2 1 260px; }

/* Nominal: OUT/IN segmented toggle + single amount input */
.pc-amt { display: flex; gap: 10px; align-items: stretch; }
.pc-amt #pAmount { flex: 1; min-width: 0; text-align: right; font-weight: 700; }
.pc-dir { display: inline-flex; flex: none; border: 1.5px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pc-dir-btn {
  font: inherit; font-weight: 800; cursor: pointer; border: 0; background: transparent;
  color: var(--ink-dim); padding: 0 16px; min-width: 54px;
}
.pc-dir-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
#pDirOut.active { background: var(--soft-danger); color: #fff; }
#pDirIn.active { background: var(--ok); color: #fff; }

.pc-required-note { display: flex; align-items: center; gap: 6px; margin: 14px 0 0; color: var(--ink-dim); font-weight: 600; font-size: 0.85em; }
.pc-req-ico { color: var(--action); font-style: normal; }
#pettyForm .btn-primary { margin-top: 14px; }

/* Petty book: controls + orthodox ledger table */
.pc-led-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin-bottom: 12px; }
.pc-led-controls .select { width: auto; min-width: 120px; flex: 0 1 auto; }
.pc-led-right { margin-left: auto; display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.pc-saldo { text-align: right; }
.pc-saldo-label { display: block; color: var(--ink-dim); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
.pc-saldo-value { font-size: 18px; font-weight: 800; }

.pc-filter-note { margin: 0 0 8px; color: var(--ink-dim); font-weight: 700; font-size: 0.85em; }

#pettyLedgerTable .pc-cell-outlet { font-weight: 700; white-space: nowrap; }
#pettyLedgerTable .pc-out { color: var(--soft-danger); }
#pettyLedgerTable .pc-in { color: var(--ok); }

/* ---------- Invoice (v2.11.0) ---------- */
/* Invoice page carries two company blocks (v2.27.0): DSI then DRI, one shared
   Pelanggan master below both. Colour lives on the monogram tile only — the
   stat cards stay semantic (amber/danger/accent) in both blocks. */
.inv-blockdiv { height: 1.5px; background: var(--line); margin: 30px 0 26px; }
.inv-mono-tile {
  width: 54px; height: 54px; flex: 0 0 auto;
  border-radius: 12px; color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 1.05rem; letter-spacing: 0.03em;
}
.inv-mono-dsi { background: var(--dsi); }
.inv-mono-dri { background: var(--dri); }
.inv-pagehead { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.inv-head-ico { width: 54px; height: 54px; flex: 0 0 auto; }
.inv-title { margin: 0; font-size: 1.5rem; }
.inv-sub { margin: 2px 0 0; color: var(--ink-dim); font-size: 0.9rem; }

.inv-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 16px; }
.inv-card { padding: 16px 18px; border-top: 4px solid var(--line); }
.inv-card-open { border-top-color: var(--amber); }
.inv-card-late { border-top-color: var(--danger); }
.inv-card-paid { border-top-color: var(--accent); }
.inv-card-k { font-size: 0.78rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-dim); }
.inv-card-n { font-size: 1.35rem; font-weight: 800; text-align: left; margin-top: 4px; }
.inv-card-open .inv-card-n { color: var(--amber); }
.inv-card-late .inv-card-n { color: var(--danger); }
.inv-card-paid .inv-card-n { color: var(--accent); }
.inv-card-d { color: var(--ink-dim); font-size: 0.85rem; margin-top: 2px; }

.inv-filters { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.inv-filters .select { flex: 0 1 auto; max-width: 170px; }
.inv-chips { display: flex; gap: 8px; }
.inv-chip {
  font: inherit; font-weight: 700; font-size: 0.85rem;
  border: 1.5px solid var(--line); border-radius: 999px;
  background: var(--surface); color: var(--ink-dim);
  padding: 7px 14px; cursor: pointer;
}
.inv-chip.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.inv-search {
  font: inherit; margin-left: auto; min-width: 200px;
  border: 1.5px solid var(--line); border-radius: 999px;
  padding: 8px 16px; background: var(--surface); color: var(--ink);
}
.inv-search:focus { outline: none; border-color: var(--accent); }

.inv-no { font-weight: 800; text-align: left; }
.inv-co { font-size: 0.8rem; }
.inv-row-batal td { opacity: 0.55; }
.inv-row-batal .inv-no { text-decoration: line-through; }
.inv-act { white-space: nowrap; text-align: right; }
.inv-act-btn { padding: 5px 12px; font-size: 0.8rem; border: 1.5px solid var(--line); }

.inv-st {
  display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em;
  border-radius: 999px; padding: 3px 10px; white-space: nowrap;
}
.inv-st-open { background: #FDF3E3; color: #A66A14; }
.inv-st-late { background: #FBE9E7; color: var(--danger); }
.inv-st-lunas { background: #E4F5EE; color: var(--ok); }
.inv-st-batal { background: #ECEFF1; color: var(--ink-dim); }

.inv-number-preview { font-weight: 800; color: var(--action); }
.inv-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.inv-field label { display: block; font-weight: 700; font-size: 0.85rem; margin: 10px 0 4px; }
.inv-autofill { font-size: 0.85rem; line-height: 1.4; padding-top: 6px; min-height: 48px; }
.inv-lines-label { display: block; font-weight: 700; font-size: 0.85rem; margin: 14px 0 6px; }
.inv-lines { display: flex; flex-direction: column; gap: 8px; }
.inv-line { display: flex; align-items: center; gap: 8px; }
.inv-line-desc { flex: 1 1 auto; }
.inv-line-amt { flex: 0 0 140px; text-align: right; }
.inv-line-note .inv-line-desc { color: var(--ink-dim); font-style: italic; }
.inv-line-note .inv-line-amt { visibility: hidden; }
.inv-line-toggle { display: inline-flex; align-items: center; gap: 6px; flex: 0 0 auto; cursor: pointer; }
.inv-line-toggle-txt { font-size: 0.75rem; font-weight: 700; color: var(--ink-dim); white-space: nowrap; }
.inv-line-del {
  font: inherit; font-size: 1.1rem; line-height: 1;
  border: none; background: none; color: var(--ink-dim); cursor: pointer;
  padding: 4px 6px; border-radius: 8px;
}
.inv-line-del:hover { color: var(--danger); background: #FBE9E7; }
.inv-addline {
  font: inherit; font-weight: 700; font-size: 0.85rem;
  margin-top: 8px; border: 1.5px dashed var(--line); border-radius: 12px;
  background: none; color: var(--action); cursor: pointer; padding: 8px 14px;
}
.inv-addline:hover { border-color: var(--action); }

.inv-switch { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.inv-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.inv-sw {
  width: 34px; height: 20px; border-radius: 999px; background: var(--line);
  display: inline-block; position: relative; transition: background .15s ease;
}
.inv-sw::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 16px; height: 16px; border-radius: 50%; background: #fff;
  transition: left .15s ease;
}
.inv-switch input:checked + .inv-sw { background: var(--accent); }
.inv-switch input:checked + .inv-sw::after { left: 16px; }
.inv-switch input:focus-visible + .inv-sw { outline: 3px solid var(--accent); outline-offset: 2px; }

.inv-totrow {
  display: flex; justify-content: flex-end; align-items: center; gap: 26px;
  padding: 7px 0; font-size: 0.95rem;
}
.inv-totrow > span { color: var(--ink-dim); display: inline-flex; align-items: center; gap: 8px; }
.inv-totrow b { min-width: 150px; }
.inv-grand { border-top: 2px solid var(--ink); margin-top: 4px; padding-top: 10px; font-size: 1.05rem; }
.inv-grand > span { color: var(--ink); font-weight: 800; }
.inv-grand b { color: var(--action); }
.inv-formfoot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 16px; }

.inv-status-sub { margin: 4px 0 12px; }
.inv-status-opts { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.inv-status-opt { display: flex; align-items: center; gap: 8px; font-weight: 600; cursor: pointer; }
.inv-paid-date { margin-top: 6px; }
.brn-link-invoice { display: flex; align-items: center; gap: 10px; }

@media (max-width: 760px) {
  .inv-cards { grid-template-columns: 1fr; }
  .inv-filters { flex-wrap: wrap; }
  .inv-filters .select { max-width: none; }
  .inv-grid2 { grid-template-columns: 1fr; }
  .inv-search { margin-left: 0; width: 100%; }
  .inv-line { flex-wrap: wrap; }
  .inv-line-amt { flex: 1 1 120px; }
}

/* ---------- Invoice accordions (v2.11.1) ---------- */
.inv-acc {
  background: var(--surface); border-radius: var(--radius);
  box-shadow: 0 1px 4px rgba(18, 52, 59, 0.06);
  margin-bottom: 12px; overflow: hidden;
}
.inv-acc-head {
  font: inherit; width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 14px 20px; color: var(--ink);
}
.inv-acc-head:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.inv-acc-title { font-weight: 800; font-size: 1rem; }
.inv-acc-hint { color: var(--ink-dim); font-weight: 600; font-size: 0.85rem; }
.inv-acc-chev { margin-left: auto; color: var(--ink-dim); transition: transform 0.15s ease; }
.inv-acc.open .inv-acc-chev { transform: rotate(180deg); }
.inv-acc-body { display: none; padding: 16px 20px 20px; border-top: 1.5px solid var(--line); }
.inv-acc.open .inv-acc-body { display: block; }
.inv-acc-actions { display: flex; justify-content: flex-end; margin-bottom: 10px; }
.inv-preview-label { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }

.inv-bank { font-weight: 800; white-space: nowrap; font-size: 0.85rem; }
.inv-bank-amt { font-size: 0.8rem; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.inv-bank-diff { color: var(--amber); font-weight: 800; }

/* ===== Tagihan (v2.13.0) — reuses inv-* skeleton, adds AP-specific pieces ===== */
.tgh-cards { grid-template-columns: repeat(4, 1fr); }
.tgh-card-sup { border-top-color: var(--action); }
.tgh-card-sup .inv-card-n { color: var(--action); }
.tgh-card-kew { border-top-color: var(--ink); }
.tgh-card-kew .inv-card-n { color: var(--ink); }

.tgh-seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.tgh-seg button {
  padding: 7px 14px; border: 0; background: transparent; font: inherit;
  font-weight: 800; font-size: 0.85rem; color: var(--ink-dim); cursor: pointer;
}
.tgh-seg button.on { background: var(--ink); color: #fff; }

.inv-st-part { background: #E8EEFB; color: #3D68C4; }

.tgh-vendor-inactive td { opacity: 0.55; }
.tgh-total-row td { background: #F7FBFA; }
.tgh-flt-spacer { flex: 1; }
.brn-link-tagihan { display: flex; align-items: center; gap: 10px; }

@media (max-width: 980px) { .tgh-cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 760px) { .tgh-cards { grid-template-columns: 1fr; } .tgh-seg { width: 100%; } .tgh-seg button { flex: 1; } }

/* ===== Tagihan pembayaran (v2.14.0) ===== */
.tgh-pay-sub { margin: -4px 0 12px; font-size: 0.88rem; }
.tgh-paid-btn {
  background: none; border: 0; padding: 0; font: inherit; font-weight: inherit;
  color: inherit; cursor: pointer; white-space: nowrap;
}
.tgh-hist-chev { color: var(--ink-dim); font-size: 0.75rem; }
.tgh-hist-row td { background: #F7FBFA; padding: 8px 12px; }
.tgh-hist-wrap { display: flex; flex-direction: column; gap: 4px; }
.tgh-hist-item { display: flex; align-items: center; gap: 14px; font-size: 0.86rem; }
.tgh-hist-date { min-width: 96px; }
.tgh-hist-bank { font-weight: 800; font-size: 0.8rem; }
.tgh-hist-lock {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.04em; text-transform: uppercase;
  color: var(--ink-dim); background: #ECEFF1; border-radius: 6px; padding: 2px 8px;
}
.tgh-batch-card { max-width: 620px; width: min(620px, 92vw); }
.tgh-batch-label { display: block; margin: 10px 0 6px; font-weight: 700; }
.tgh-batch-list {
  border: 1px solid var(--line); border-radius: 12px; max-height: 300px; overflow-y: auto;
  padding: 4px 0; background: #fff;
}
.tgh-batch-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.tgh-batch-item:last-child { border-bottom: 0; }
.tgh-batch-item input[type="checkbox"] { width: 16px; height: 16px; flex: none; }
.tgh-batch-info { flex: 1; min-width: 0; }
.tgh-batch-desc { font-size: 0.88rem; }
input.tgh-batch-amt { width: 130px; flex: none; text-align: right; }
.tgh-batch-tot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; }
.tgh-batch-selisih { margin-top: 2px; color: var(--ink-dim); font-size: 0.9rem; }
.tgh-over { color: var(--danger) !important; }

/* ===== Voucher generator (v2.22.0) ===== */
.vch-card { max-width: 560px; width: min(560px, 92vw); }
.vch-head { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.vch-head .card-title { margin: 0; }
.vch-pill {
  font-size: 0.72rem; font-weight: 800; letter-spacing: 0.03em;
  border: 1.5px solid currentColor; border-radius: 20px; padding: 2px 10px;
  flex: none;
}
.vch-controls { display: flex; gap: 14px; margin: 12px 0 4px; flex-wrap: wrap; }
.vch-controls .inv-field { flex: 1; min-width: 160px; }
.vch-list-head { display: flex; justify-content: space-between; align-items: center; margin: 12px 0 6px; }
.vch-list {
  border: 1px solid var(--line); border-radius: 12px; max-height: 260px; overflow-y: auto;
  padding: 4px 0; background: #fff;
}
.vch-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  border-bottom: 1px solid var(--line);
}
.vch-item:last-child { border-bottom: 0; }
.vch-item input[type="checkbox"] { width: 16px; height: 16px; flex: none; }
.vch-amt { width: 110px; flex: none; text-align: right; font-size: 0.85rem; }
.vch-amt.vch-out { color: var(--danger); }

/* ===== Verifikasi Supplier (v2.16.0) ===== */
.vf-head { margin-bottom: 12px; display: flex; align-items: center; justify-content: flex-start; gap: 12px; }
.vf-months { margin-top: 8px; }
.vf-mo-year { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.vf-mo-year > span:first-child { color: var(--ink-dim); font-size: 0.78rem; font-weight: 800; }
.vf-mo-rule { flex: 1; border-top: 1px solid var(--line); }
.vf-mo-line { color: var(--ink-dim); font-size: 0.8rem; line-height: 1.9; }
.vf-mo-line b { color: var(--ink); }
.vf-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.vf-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vf-card-label { color: var(--ink-dim); font-size: 0.82rem; }
.vf-card-num { font-size: 1.35rem; }
.vf-card-sub { color: var(--ink-dim); font-size: 0.82rem; min-height: 1em; }
.vf-card-sub b { color: var(--ink); }
.vf-search { flex: 1; min-width: 160px; }
.vf-badge {
  font-weight: 800;
  font-size: 12px;
  padding: 1px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.vf-badge-ok { background: rgba(46, 139, 110, .14); color: var(--ok); }
.vf-badge-part { background: rgba(91, 141, 239, .14); color: var(--action); }
.vf-work-links { font-size: 0.8rem; margin-top: 2px; }
.vf-txn-info {
  background: var(--wash);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  font-size: 0.92rem;
}
.vf-txn-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.vf-txn-amt { white-space: nowrap; }
.vf-linked { margin-bottom: 4px; }
.vf-linked-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  border-bottom: 1px solid rgba(18, 52, 59, .08);
}
.vf-linked-row .voucher { flex: 1; min-width: 0; }
.vf-linked-row:last-child { border-bottom: 0; }

/* ===== Supplier page (v2.17.0) ===== */
.brn-link-supplier { display: flex; align-items: center; gap: 10px; }
.inv-acc-goto {
  font: inherit; width: 100%; display: flex; align-items: center; gap: 10px;
  background: none; border: none; cursor: pointer; text-align: left;
  padding: 14px 20px; color: var(--ink);
}
.inv-acc-goto:hover .inv-acc-chev { color: var(--action); transform: translateX(3px); }
.inv-acc-goto:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.pc-led-spacer { flex: 1 1 auto; }
.sup-det-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 860px) { .sup-det-grid { grid-template-columns: 1fr; } }
.sup-det-title { margin: 0 0 8px; font-weight: 800; font-size: 0.9rem; color: var(--ink); }
.sup-hub-none { background: #FAEEDA; color: #854F0B; font-size: 0.78rem; font-weight: 700;
  padding: 2px 8px; border-radius: 8px; white-space: nowrap; }
.sup-match-hint { color: var(--ok); margin: -4px 0 8px; }
.vf-card-num.neg { color: #B4552D; }

/* ===== Kategori registry (v2.18.0) ===== */
.kat-controls { margin-bottom: 10px; }
.kat-controls input[type="search"] { max-width: 260px; }
.kat-table td { vertical-align: middle; }
.kat-inactive td { color: var(--ink-dim); opacity: .65; }
.kat-by { color: var(--ink-dim); font-size: 12px; font-weight: 600; }
.kat-actions a { color: var(--action); font-weight: 700; text-decoration: none; }
.kat-actions a:hover { text-decoration: underline; }
.kat-badge { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 10px; border-radius: 999px; white-space: nowrap; }
.kat-b-sales  { background: rgba(91, 200, 184, .16); color: #0F6E56; }
.kat-b-cogs   { background: rgba(216, 90, 48, .13); color: #993C1D; }
.kat-b-sdm    { background: rgba(91, 141, 239, .14); color: #2C5AB8; }
.kat-b-pindah { background: rgba(127, 119, 221, .15); color: #534AB7; }
.kat-b-sistem { background: rgba(232, 162, 61, .16); color: #9A6716; }
.kat-b-biaya  { background: rgba(90, 117, 123, .12); color: #445A60; }
.kat-note { background: rgba(232, 162, 61, .14); color: #7A5210; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-top: 10px; }
.kat-name-hint { min-height: 1.2em; margin: 4px 0 0; }
.kat-name-ok { color: var(--ok); font-weight: 700; }
.kat-name-dup { color: var(--danger); font-weight: 700; }
.kat-missing-hint { margin: 4px 0 0; }
.kat-missing-hint a { color: var(--action); font-weight: 700; }

/* Perlu perhatian: one-shot confetti overlay above the all-clear state */
.att-empty-wrap { position: relative; }
.att-confetti { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.att-confetti svg { width: 100%; height: 100%; }

/* ==================================================================
   v2.23.0 — kartu "Belum terbayar" di Beranda, kartu Tagihan yang bisa
   diklik, dan termometer umur tagihan. Semua pakai token terkunci.
   ================================================================== */

/* Beranda: kartu tagihan belum terbayar (di bawah Total saldo DSI) */
.brn-bills {
  display: block; width: 100%; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  border: 1px solid var(--line);
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.brn-bills:hover { border-color: var(--accent); }
.brn-bills:active { transform: scale(0.995); }
.brn-bills:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.brn-bills-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 8px; margin-bottom: 8px;
}
.brn-bills-k { color: var(--ink-dim); font-size: 13px; }
.brn-bills-go { color: var(--action); font-size: 12px; }
.brn-bills-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 3px 0; }
.brn-bills-lbl { color: var(--ink-dim); font-size: 14px; }
.brn-bills-n { color: var(--ink-dim); font-size: 12px; opacity: 0.75; }
.brn-bills-v { color: var(--ink); font-size: 14px; font-weight: 700; }
.brn-bills-total {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  border-top: 1px solid var(--line); margin-top: 8px; padding-top: 8px;
}
.brn-bills-total .brn-bills-lbl { color: var(--ink); font-weight: 700; }
.brn-bills-total .brn-bills-v { font-size: 16px; }

/* Tagihan: kartu ringkasan sebagai tombol filter */
.tgh-cardbtn {
  display: block; width: 100%; text-align: left;
  font: inherit; color: inherit; cursor: pointer;
  transition: border-color 0.15s ease, transform 0.1s ease;
}
.tgh-cardbtn .inv-card-k,
.tgh-cardbtn .inv-card-n,
.tgh-cardbtn .inv-card-d { display: block; }
.tgh-cardbtn:hover { border-top-color: var(--action); }
.tgh-cardbtn:active { transform: scale(0.995); }
.tgh-cardbtn:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.tgh-cardbtn.on { box-shadow: inset 0 0 0 2px var(--action); }
.tgh-cardbtn.inv-card-open.on { box-shadow: inset 0 0 0 2px var(--amber); }
.tgh-cardbtn.inv-card-late.on { box-shadow: inset 0 0 0 2px var(--danger); }

/* Termometer umur tagihan supplier */
.tgh-aging { padding: 16px 18px; margin-bottom: 14px; }
.tgh-aging-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 12px; flex-wrap: wrap;
}
.tgh-aging-title { font-weight: 800; color: var(--ink); font-size: 0.95rem; }
.tgh-aging-meta { color: var(--ink-dim); font-size: 0.82rem; }
.tgh-aging-bar {
  display: flex; height: 26px; border-radius: 8px; overflow: hidden;
  background: var(--wash);
}
.tgh-age-seg {
  border: 0; padding: 0; margin: 0; cursor: pointer;
  font: inherit; font-size: 11px; font-weight: 700; color: var(--ink);
  min-width: 3px; line-height: 26px; text-align: center;
  transition: filter 0.15s ease;
}
.tgh-age-seg:hover { filter: brightness(1.08); }
.tgh-age-seg:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
.tgh-age-seg.on { box-shadow: inset 0 0 0 2px var(--ink); }
.tgh-aging-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; }
.tgh-age-leg {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 2px 6px; margin: 0;
  border-radius: 8px; cursor: pointer;
  font: inherit; font-size: 0.78rem; color: var(--ink-dim);
}
.tgh-age-leg:hover { background: var(--wash); color: var(--ink); }
.tgh-age-leg:focus-visible { outline: 2px solid var(--action); outline-offset: 1px; }
.tgh-age-leg.on { background: var(--wash); color: var(--ink); font-weight: 700; }
.tgh-age-dot { width: 9px; height: 9px; border-radius: 3px; display: inline-block; }
@media (max-width: 760px) {
  .tgh-aging-legend { gap: 4px 10px; }
  .tgh-age-leg { font-size: 0.72rem; }
}

/* ==================================================================
   v2.24.0 — Cocokkan. Token terkunci; warna tingkat mengikuti pola
   termometer umur (aqua sehat → merah perlu perhatian).
   ================================================================== */
.cck-back { margin-left: auto; }
.cck-tiers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.cck-tier {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: 20px; padding: 7px 14px; cursor: pointer;
  font: inherit; font-size: 0.82rem; color: var(--ink-dim);
}
.cck-tier:hover { border-color: var(--accent); color: var(--ink); }
.cck-tier:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.cck-tier.on { border: 2px solid var(--accent); color: var(--ink); font-weight: 800; }
.cck-tier-n { font-weight: 800; color: var(--ink); }
.cck-note { color: var(--ink-dim); font-size: 0.82rem; margin: 0 0 14px; }

.cck-list { display: flex; flex-direction: column; gap: 10px; }
.cck-card {
  background: var(--surface); border-radius: var(--radius);
  padding: 14px 16px; border-left: 4px solid var(--line);
}
.cck-card.cck-pas { border-left-color: var(--accent); }
.cck-card.cck-pilih { border-left-color: var(--amber); }
.cck-card.cck-borongan { border-left-color: var(--action); }
.cck-card.cck-tanpa { border-left-color: var(--line); }
.cck-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.cck-vch { font-size: 0.76rem; color: var(--ink-dim); }
.cck-amt-big { font-size: 1.02rem; font-weight: 800; color: var(--ink); }
.cck-desc { font-size: 0.84rem; color: var(--ink-dim); margin: 6px 0 10px; }

.cck-cands { background: var(--wash); border-radius: 12px; padding: 10px 12px; }
.cck-cand { display: flex; align-items: center; gap: 10px; padding: 4px 0; font-size: 0.88rem; }
.cck-cand-main { flex: 1; min-width: 0; color: var(--ink); }
.cck-cand-side { text-align: right; }
.cck-cand-meta { display: block; font-size: 0.72rem; color: var(--ink-dim); }
.cck-cand-pick, .cck-cand-alloc { cursor: pointer; }
.cck-cand-sisa { font-size: 0.74rem; color: var(--ink-dim); white-space: nowrap; }
.cck-amt { width: 130px; text-align: right; }
.cck-nocand { font-size: 0.84rem; color: var(--ink-dim); font-style: italic; }
.cck-alloc-sum { font-size: 0.8rem; color: var(--ink-dim); margin-top: 8px; }
.cck-alloc-sum.ok { color: var(--ok); font-weight: 700; }

.cck-actions { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.cck-go[disabled] { opacity: 0.45; cursor: not-allowed; }
.cck-guard { font-size: 0.76rem; color: var(--ink-dim); }
.cck-more-wrap { display: flex; justify-content: center; margin-top: 14px; }
.cck-empty-wrap { position: relative; }
.brn-link-cocokkan .brn-link-txt { font-weight: 800; }
@media (max-width: 760px) {
  .cck-cand { flex-wrap: wrap; }
  .cck-amt { width: 100%; }
}

/* Tautkan pembayaran (v2.25.0) */
.vf-paynote { margin: 2px 0 0; font-size: 0.85rem; }
.vf-late { color: var(--amber); font-weight: 600; }

/* Titik tautan di Buku Bank COMMON (v2.26.1) */
.vf-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--accent); margin-right: 6px; vertical-align: middle;
}

/* v2.30.0: entri manual langsung di halaman Buku + tabel Info Buku */
.ldg-entry-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 16px; align-items: end; }
.ldg-entry-grid label { display: block; margin-bottom: 4px; }
.ldg-entry-desc { grid-column: span 2; }
.ldg-entry-btn { display: flex; align-items: flex-end; }
.modal-card.info-buku { max-width: 900px; max-height: 85vh; display: flex; flex-direction: column; }
.modal-card.info-buku .table-wrap { overflow-y: auto; flex: 1; min-height: 0; }
#infoBukuBody tr.dim td { opacity: 0.55; }
#infoBukuBody .btn-linklike { background: none; border: 0; padding: 0; color: var(--action, #5B8DEF); cursor: pointer; font: inherit; text-decoration: underline; text-align: left; }
