:root {
  --bg: #f6f7f9; --card: #fff; --ink: #1b1f24; --muted: #6b7280; --line: #e3e6ea;
  --accent: #1e5eff; --accent-ink: #fff;
  --ink-2: #374151; --line-2: #cfd4db; --tint: #eef0f3; --tint-info: #eef3ff; --tint-danger: #fdecec; --tint-warn: #fff6e0; --tint-ok: #e6f6ec;
  --danger-ink: #8a1c1c; --warn-ink: #7a5200; --ok-ink: #1b5e2f; --info-ink: #1b3f9e;
  --side-bg: #172033; --side-ink: #d7dce5; --side-strong: #fff; --side-muted: #8e98ad; --side-hover: rgba(255,255,255,.07); --side-line: rgba(255,255,255,.08);
  --font: "Segoe UI", "Segoe UI Web (West European)", -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif; --fs: 15px; --danger: #c62828; --ok: #1b7f3b; --warn: #b26a00;
  --radius: 8px; font-size: var(--fs);
}
* { box-sizing: border-box; }
[x-cloak] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); line-height: 1.45; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 1180px; margin: 0 auto; padding: 20px 16px 40px; }
.footer { text-align: center; color: var(--muted); font-size: 12px; padding: 16px; }
.topbar { display: flex; align-items: center; gap: 24px; background: var(--card); border-bottom: 1px solid var(--line); padding: 0 16px; height: 52px; position: sticky; top: 0; z-index: 10; }
.topbar .brand { font-weight: 700; color: var(--ink); white-space: nowrap; }
.topbar .menu { display: flex; gap: 4px; flex: 1; }
.topbar .menu > a, .topbar .dropdown > a { display: block; padding: 8px 12px; color: var(--ink); border-radius: 6px; }
.topbar .menu > a.active, .topbar .dropdown > a.active { background: var(--tint-info); color: var(--accent); }
.topbar .menu a:hover { background: var(--tint); text-decoration: none; }
.dropdown { position: relative; }
.dropdown-menu { position: absolute; top: 100%; left: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.08); min-width: 220px; padding: 6px; }
.dropdown-menu a { display: block; padding: 8px 10px; color: var(--ink); border-radius: 6px; }
.userbox { display: flex; align-items: center; gap: 12px; font-size: 14px; white-space: nowrap; }
.muted { color: var(--muted); }
.inline { display: inline; }
button.link { background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; padding: 0; }
h1 { font-size: 22px; margin: 0 0 4px; }
h2 { font-size: 17px; margin: 24px 0 8px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.grid { display: grid; gap: 14px; }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.stat { padding: 14px 16px; }
.stat .n { font-size: 28px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 13px; }
table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; white-space: nowrap; max-width: 420px; overflow: hidden; text-overflow: ellipsis; }
td.wrap, th.wrap, td.muted[colspan], .lines-table td, table.pl td, table.roles td, table.roles th { white-space: normal; max-width: none; overflow: visible; }
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); max-width: 100%; }
.tablewrap > table { margin-bottom: 0; }
.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; margin: 8px 0 14px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.pager select { width: auto; padding: 4px 8px; font-size: 13px; }
.pager button { padding: 4px 10px; font-size: 13px; background: var(--card); border: 1px solid var(--line-2); border-radius: 6px; cursor: pointer; }
.pager button:disabled { opacity: .45; cursor: default; }
th { background: var(--tint); font-weight: 600; color: var(--ink-2); }
tr:last-child td { border-bottom: 0; }
tr.inactive td { color: var(--muted); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; flex-wrap: wrap; }
.toolbar input[type=search] { flex: 1; min-width: 200px; }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], input[type=email], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid var(--line-2); border-radius: 6px; font: inherit; background: var(--card);
}
textarea { min-height: 72px; }
label { display: block; font-size: 13px; color: var(--ink-2); margin-bottom: 4px; font-weight: 600; }
.field { margin-bottom: 14px; }
.field .help { color: var(--muted); font-size: 12px; margin-top: 3px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.check input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 0 20px; }
.form-grid .full { grid-column: 1 / -1; }
.btn { display: inline-block; padding: 8px 14px; border-radius: 6px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink); font: inherit; cursor: pointer; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.small { padding: 3px 9px; font-size: 13px; }
.btn.danger { color: var(--danger); border-color: var(--line-2); }
.btn:hover { text-decoration: none; filter: brightness(.97); }
.actions { display: flex; gap: 10px; margin-top: 8px; }
.alert { padding: 10px 14px; border-radius: 6px; margin-bottom: 14px; border: 1px solid; }
.alert.error { background: var(--tint-danger); border-color: var(--line-2); color: var(--danger-ink); }
.alert.ok { background: var(--tint-ok); border-color: var(--line-2); color: var(--ok-ink); }
.alert.info { background: var(--tint-info); border-color: var(--line-2); color: var(--info-ink); }
.badge { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; background: var(--tint); color: var(--ink-2); }
.badge.type-asset { background: var(--tint-info); } .badge.type-liability { background: var(--tint-warn); } .badge.type-equity { background: var(--tint-info); }
.badge.type-revenue { background: var(--tint-ok); } .badge.type-cogs { background: var(--tint-warn); } .badge.type-expense { background: var(--tint-danger); }
.badge.type-other { background: var(--tint); } .badge.type-tax { background: var(--tint-warn); }
.badge.ctrl { background: #1b1f24; color: #fff; }
.tree-indent { display: inline-block; }
.coa-header td { font-weight: 700; background: var(--tint-info); }
.login-wrap { max-width: 380px; margin: 80px auto; }
.login-wrap h1 { text-align: center; margin-bottom: 18px; }
code { background: var(--tint); padding: 1px 5px; border-radius: 4px; font-size: 13px; }
.small { font-size: 13px; }
@media (max-width: 720px) { .topbar { flex-wrap: wrap; height: auto; padding: 8px 12px; } .userbox { margin-left: auto; } }

/* ---- layout sidebar (Rilis 2) ---- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: 232px; flex: 0 0 232px; background: var(--side-bg); color: var(--side-ink); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.sidebar .brand { padding: 18px 18px 12px; font-weight: 700; color: var(--side-strong); font-size: 16px; border-bottom: 1px solid var(--side-line); }
.sidebar .brand small { display: block; font-weight: 400; color: var(--side-muted); font-size: 12px; margin-top: 2px; }
.sidebar nav { padding: 10px 10px; flex: 1; }
.sidebar nav a { display: block; padding: 7px 10px; border-radius: 6px; color: var(--side-ink); font-size: 14px; margin: 1px 0; }
.sidebar nav a:hover { background: var(--side-hover); text-decoration: none; }
.sidebar nav a.active { background: var(--accent); color: #fff; }
.sidebar nav .group { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-muted); padding: 10px 10px 6px; }
.sidebar nav button.group { display: flex; width: 100%; justify-content: space-between; align-items: center; background: none; border: 0; cursor: pointer; font: inherit; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--side-muted); border-radius: 6px; margin-top: 4px; }
.sidebar nav button.group:hover { background: var(--side-hover); color: var(--side-ink); }
.sidebar nav .grp.open button.group { color: var(--side-strong); }
.sidebar nav .chev { width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin-right: 4px; }
.sidebar nav .grp.open .chev { transform: rotate(45deg); }
.sidebar nav .grp-items { padding-left: 6px; border-left: 1px solid var(--side-line); margin-left: 12px; }
.sidebar nav .grp-items a { font-size: 13px; padding: 6px 10px; }
.sidebar .brand { display: flex; align-items: center; gap: 10px; }
.sidebar .brand img.logo { width: 36px; height: 36px; object-fit: contain; background: #fff; border-radius: 6px; padding: 2px; }
.sidebar .userbox { padding: 12px 16px 16px; border-top: 1px solid var(--side-line); display: block; }
.sidebar .userbox .name { color: var(--side-strong); font-weight: 600; font-size: 14px; }
.sidebar .userbox .links { margin-top: 6px; font-size: 13px; }
.sidebar .userbox a, .sidebar .userbox button.link { color: #9fc0ff; }
.content { flex: 1; min-width: 0; padding: 22px 28px 40px; }
.mobilebar { display: none; }
@media (max-width: 860px) {
  .shell { display: block; }
  .mobilebar { display: flex; gap: 12px; align-items: center; padding: 8px 12px; background: #172033; color: #fff; position: sticky; top: 0; z-index: 20; }
  .mobilebar .brand { font-weight: 700; }
  .sidebar { display: none; position: fixed; top: 44px; left: 0; bottom: 0; width: 260px; z-index: 19; height: auto; }
  .sidebar.open { display: flex; }
  .content { padding: 16px 12px 32px; }
}
/* dokumen */
.doc-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px 18px; font-size: 14px; }
.doc-head .k { color: var(--muted); font-size: 12px; }
.status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--tint); }
.status.draft { background: var(--tint); } .status.submitted { background: var(--tint-warn); color: var(--warn-ink); } .status.approved { background: var(--tint-info); color: var(--info-ink); }
.status.posted, .status.issued, .status.closed { background: var(--tint-ok); color: var(--ok-ink); } .status.rejected, .status.cancelled { background: var(--tint-danger); color: var(--danger-ink); }
.lines-table input, .lines-table select { padding: 5px 8px; }
.lines-table td { padding: 4px 6px; }
.totals { text-align: right; font-size: 14px; margin-top: 10px; }
.totals .big { font-size: 18px; font-weight: 700; }
.timeline { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.timeline li { padding: 6px 0; border-bottom: 1px dashed var(--line); }
.print-only { display: none; }
@media print {
  .sidebar, .mobilebar, .footer, .no-print { display: none !important; }
  .content { padding: 0; }
  body { background: var(--card); }
  .print-only { display: block; }
}

/* ---- dashboard AP ---- */
.dash .kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; background: var(--tint-info); padding: 14px; border-radius: 10px; margin-bottom: 16px; }
.dash .kpi { background: var(--card); border: 1px solid var(--line-2); border-radius: 8px; padding: 14px 16px; display: flex; gap: 12px; align-items: center; }
.dash .kpi .ico { font-size: 26px; width: 40px; text-align: center; }
.dash .kpi .l { color: var(--ink-2); font-size: 13px; } .dash .kpi .n { font-size: 26px; font-weight: 500; letter-spacing: -.01em; }
.dash .panel { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.dash .panel-title { font-size: 20px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.dash .pill { margin-left: auto; border: 1px solid var(--line); border-radius: 8px; padding: 6px 14px; font-size: 14px; font-weight: 400; }
.dash .split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: center; } .dash .split > *, .dash .row2 > *, .grid > * { min-width: 0; }
.dash .bars { display: grid; gap: 6px; }
.dash .bar-row { display: grid; grid-template-columns: 170px 1fr 120px; align-items: center; gap: 10px; font-size: 13px; }
.dash .bar-label { text-align: right; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dash .bar-track { background: var(--tint-info); height: 22px; border-radius: 3px; }
.dash .bar-fill { background: #e15b46; height: 100%; border-radius: 0 4px 4px 0; min-width: 2px; }
.dash .bar-val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }
.dash .donut-wrap { display: flex; gap: 16px; align-items: center; justify-content: center; }
.dash .legend { list-style: none; margin: 0; padding: 0; font-size: 13px; }
.dash .legend li { display: flex; gap: 8px; align-items: center; margin: 3px 0; } .dash .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.dash .row2 { display: grid; grid-template-columns: 1fr 1.3fr; gap: 16px; }
.dash table.heat td, .dash table.aging td, .dash table.heat th, .dash table.aging th { font-size: 13px; padding: 7px 10px; }
.dash table.aging thead th { background: #4b1d6b; color: #fff; }
.dash .row2 .panel:last-child table.aging thead th { background: #0b2a4a; }
.dash td.late { color: var(--danger); font-weight: 600; }
.dash .vbars { display: flex; gap: 18px; align-items: flex-end; height: 190px; padding: 0 6px; }
.dash .vbar { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; height: 100%; }
.dash .vbar-val { font-size: 11px; color: var(--info-ink); margin-bottom: 4px; white-space: nowrap; } .dash .vbar-val.neg { color: #e15b46; }
.dash .vbar-track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.dash .vbar-fill { width: 70%; max-width: 64px; background: #00b2e8; border-radius: 3px 3px 0 0; } .dash .vbar-fill.neg { background: #e15b46; }
.dash .vbar-label { font-size: 11px; color: var(--ink-2); margin-top: 6px; text-align: center; border-top: 1px solid var(--line-2); width: 100%; padding-top: 4px; }
@media (max-width: 1000px) { .dash .split, .dash .row2 { grid-template-columns: 1fr; } }

/* laporan laba/rugi */
table.pl td, table.pl th { padding: 6px 10px; } table.pl td.num, table.pl th.num { white-space: nowrap; } table.real td:first-child { min-width: 220px; }
table.pl tr.sec td { background: var(--tint); font-weight: 700; text-transform: uppercase; font-size: 12px; letter-spacing: .03em; color: var(--ink-2); }
table.pl tr.grp td { font-weight: 600; color: var(--ink-2); }
table.pl tr.sub td { border-top: 1px solid var(--line-2); font-weight: 600; }
table.pl tr.tot td { background: var(--tint-info); font-weight: 700; }
table.pl tr.net td { background: #0b2a4a; color: #fff; font-weight: 700; font-size: 15px; }
table.pl td.neg { color: #e15b46; }
table.pl td.pct, table.pl th.pct { width: 70px; color: var(--muted); font-size: 12px; }
@media print { .sidebar, .mobilebar, .no-print, .footer { display: none !important; } .content { padding: 0; } .shell { display: block; } }

.sidebar nav a.soon { opacity: .5; cursor: default; } .sidebar nav a.soon small { font-size: 10px; margin-left: 6px; border: 1px solid currentColor; border-radius: 8px; padding: 0 5px; }

/* anggaran & realisasi */
table.bgrid input { width: 66px; min-width: 0; text-align: right; padding: 3px 4px; font-size: 11px; box-sizing: border-box; }
table.bgrid td, table.bgrid th { padding: 3px 3px; font-size: 12px; white-space: nowrap; }
table.bgrid td:first-child { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
table.bgrid tr.sec td { background: var(--tint); font-weight: 700; text-transform: uppercase; font-size: 11px; }
table.bgrid tfoot td { font-weight: 700; border-top: 2px solid var(--line-2); }
table.real th.grp-h { text-align: center; background: var(--tint-info); }
table.real td.pct.warn { background: var(--tint-warn); color: var(--warn-ink); font-weight: 600; }
table.real td.pct.over { background: var(--tint-danger); color: var(--danger-ink); font-weight: 700; }
.status.approved { background: var(--tint-ok); color: var(--ok-ink); } .status.superseded { background: var(--tint); color: var(--ink-2); }
.budget-warn { margin-top: 10px; } .budget-warn table td, .budget-warn table th { padding: 4px 8px; font-size: 12px; }

/* dashboard v0.6 */
.dash .kpi .n.neg { color: #e15b46; } .dash .kpi .s { font-size: 11px; margin-top: 2px; }
.dash .vbars.trend { height: 200px; gap: 6px; } .dash .vbars.trend .vbar-track { gap: 2px; } .dash .vbars.trend .vbar-fill { width: 45%; max-width: none; } .dash .vbar-fill.rev { background: #1f77b4; }
.dash .vbar-label.cur { font-weight: 700; color: var(--ink); } .dash .legend-inline { font-size: 11px; color: var(--muted); margin-left: 8px; } .dash .legend-inline .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 4px 0 8px; }
.dash td.late { color: var(--danger-ink); font-weight: 600; }
.dash .vbars.trend .vbar-track { justify-content: center; }
/* matriks peran & hak akses */
.roles-card { padding: 0; overflow: hidden; }
.roles-scroll { overflow-x: auto; }
table.roles { border: 0; border-radius: 0; font-size: 13px; }
table.roles th, table.roles td { padding: 5px 6px; border-bottom: 1px solid var(--line); }
table.roles th.perm-h, table.roles td.perm { position: sticky; left: 0; background: var(--card); z-index: 1; min-width: 236px; max-width: 260px; box-shadow: 1px 0 0 var(--line); }
table.roles thead th { background: var(--tint); vertical-align: top; }
table.roles thead th.perm-h { background: var(--tint); }
table.roles th.role-h { min-width: 92px; text-align: center; padding: 10px 4px 8px; }
table.roles th.role-h .role-name { font-size: 12px; font-weight: 700; color: var(--ink); line-height: 1.25; white-space: normal; }
table.roles th.role-h .role-code { font-size: 10.5px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; margin-top: 2px; }
table.roles th.role-h .role-count { font-size: 10.5px; color: var(--muted); }
table.roles th.role-h .role-tools { font-size: 10.5px; margin-top: 4px; }
table.roles th.role-h.is-admin { background: var(--tint-info); }
table.roles td.chk { text-align: center; vertical-align: middle; }
table.roles td.chk.is-admin { background: var(--tint-info); }
table.roles td.chk input { width: 16px; height: 16px; accent-color: var(--accent); cursor: pointer; }
table.roles td.chk .always { color: var(--info-ink); font-weight: 700; }
table.roles tr.sec td { background: var(--tint-info); font-weight: 700; text-transform: uppercase; font-size: 11px; letter-spacing: .04em; color: var(--ink-2); position: sticky; left: 0; }
table.roles tbody tr:hover td { background: var(--tint-info); } table.roles tbody tr:hover td.perm { background: var(--tint-info); }
table.roles td.perm .perm-name { font-weight: 500; color: var(--ink); }
table.roles td.perm .perm-code { font-size: 10.5px; color: var(--muted); font-family: ui-monospace, Menlo, monospace; }
table.roles .lnk { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: inherit; } table.roles .lnk:hover { text-decoration: underline; }
.roles-actions { padding: 14px 18px; border-top: 1px solid var(--line); background: var(--card); position: sticky; bottom: 0; }

/* filter periode dashboard */
.toolbar.period { align-items: center; flex-wrap: wrap; gap: 8px; }
.toolbar.period .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--card); }
.toolbar.period .seg label { padding: 7px 12px; font-size: 13px; cursor: pointer; margin: 0; font-weight: 500; color: var(--ink-2); border-right: 1px solid var(--line); }
.toolbar.period .seg label:last-child { border-right: 0; } .toolbar.period .seg label.on { background: var(--accent); color: #fff; }
.toolbar.period .seg input { display: none; }
.toolbar.period .chips { display: inline-flex; gap: 6px; flex-wrap: wrap; margin-left: 4px; }
.toolbar.period .chips a { font-size: 12px; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--ink-2); }
.toolbar.period .chips a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.form-section { grid-column: 1 / -1; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 14px 0 4px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }

/* kotak persetujuan */
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tabs button, .tabs a.tab { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.tabs button.on, .tabs a.tab.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.tabs .cnt { display: inline-block; min-width: 18px; padding: 0 6px; border-radius: 999px; background: rgba(0,0,0,.08); font-size: 11px; margin-left: 4px; text-align: center; }
.tabs button.on .cnt, .tabs a.tab.on .cnt { background: rgba(255,255,255,.25); }
table.inbox { border: 0; border-radius: 0; }
table.inbox th, table.inbox td { padding: 9px 12px; vertical-align: middle; }
table.inbox td:first-child { white-space: nowrap; } table.inbox td.desc { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
table.inbox td.nowrap, table.inbox th.nowrap { white-space: nowrap; }
table.inbox td.empty { text-align: center; color: var(--muted); padding: 28px; }
table.inbox tbody tr:hover td { background: var(--tint-info); }
.doc-kind { display: inline-block; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 7px; border-radius: 4px; margin-right: 6px; background: var(--tint); color: var(--ink-2); }
.doc-kind.k-biaya { background: var(--tint-danger); color: var(--danger-ink); } .doc-kind.k-po { background: var(--tint-warn); color: var(--warn-ink); } .doc-kind.k-transfer { background: var(--tint-info); color: var(--info-ink); }
.doc-kind.k-pendapatan { background: var(--tint-ok); color: var(--ok-ink); } .doc-kind.k-pembayaran { background: var(--tint-info); color: var(--info-ink); } .doc-kind.k-penerimaan { background: var(--tint-ok); color: var(--ok-ink); } .doc-kind.k-jurnal { background: var(--tint); color: var(--ink-2); }
.doc-no { font-weight: 600; }

/* polesan global */
tbody tr:hover td { background: var(--tint-info); }
h2 { font-size: 17px; margin: 22px 0 10px; }
.page-head h1 { letter-spacing: -.01em; }
.status { font-size: 11.5px; letter-spacing: .01em; }
table.inbox .sign { margin-top: 3px; display: flex; gap: 8px; } table.inbox .sign .ok { color: var(--ok-ink); } table.inbox .sign .wait { color: var(--muted); }
.card.stat .n.late { color: var(--danger-ink); }
.doc-kind.k-penyusutan { background: var(--tint-warn); color: var(--warn-ink); }

.tabs a.tab { text-decoration: none; display: inline-block; }
table.open-grid input { width: 100%; box-sizing: border-box; }
.doc-kind.k-notakredit { background: var(--tint-danger); color: var(--danger-ink); }
.doc-kind.k-notadebit { background: var(--tint-warn); color: var(--warn-ink); } .doc-kind.k-gaji { background: var(--tint-info); color: var(--info-ink); }
/* beranda: kolom nama boleh melipat, angka tetap satu baris; label batang kecil agar tidak bertumpuk */
.dash table.heat td:first-child, .dash table.aging td:first-child { white-space: normal; }
.dash .split { grid-template-columns: 1.7fr 1fr; }
.dash .vbar-val { font-size: 10px; }
.dash .vbars:not(.trend) .vbar-val { display: none; }

/* kolom kata sandi: tombol lihat/sembunyikan */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 40px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; line-height: 0; border-radius: 6px; }
.pw-eye:hover, .pw-eye.on { color: var(--accent); background: var(--tint-info); }
/* halaman masuk: latar dari Pengaturan → Tampilan halaman masuk */
body.login-page { min-height: 100vh; }
body.login-page .login-wrap { box-shadow: 0 10px 40px rgba(0,0,0,.12); }
body.login-page.dark .footer, body.login-page.dark .login-tagline { color: rgba(255,255,255,.85); }
body.login-page.dark .footer a { color: #fff; }
.login-tagline { text-align: center; color: var(--muted); font-size: 15px; margin: -60px auto 0; max-width: 480px; }


/* ---------- mode gelap (pengaturan Tampilan) ---------- */
[data-theme="dark"] { --bg: #0f141b; --card: #171e28; --ink: #e6e9ee; --ink-2: #c9d0da; --muted: #9aa4b2; --line: #2a3340; --line-2: #3a4556;
  --tint: #1e2632; --tint-info: #1a2540; --tint-danger: #3a1d20; --tint-warn: #3a2e14; --tint-ok: #15301f;
  --danger-ink: #f3a6a6; --warn-ink: #f5cf7a; --ok-ink: #8fdca8; --info-ink: #a9c1ff; --accent: #4b7dff; --danger: #ef6b6b; --ok: #4cc278; --warn: #e3a33a; color-scheme: dark; }
@media (prefers-color-scheme: dark) { [data-theme="auto"] { --bg: #0f141b; --card: #171e28; --ink: #e6e9ee; --ink-2: #c9d0da; --muted: #9aa4b2; --line: #2a3340; --line-2: #3a4556;
  --tint: #1e2632; --tint-info: #1a2540; --tint-danger: #3a1d20; --tint-warn: #3a2e14; --tint-ok: #15301f;
  --danger-ink: #f3a6a6; --warn-ink: #f5cf7a; --ok-ink: #8fdca8; --info-ink: #a9c1ff; --accent: #4b7dff; --danger: #ef6b6b; --ok: #4cc278; --warn: #e3a33a; color-scheme: dark; } }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { background: var(--card); color: var(--ink); border-color: var(--line-2); }
@media (prefers-color-scheme: dark) { [data-theme="auto"] input, [data-theme="auto"] select, [data-theme="auto"] textarea { background: var(--card); color: var(--ink); border-color: var(--line-2); } }
[data-theme="dark"] img.logo, [data-theme="dark"] .brand img { background: #fff; border-radius: 6px; }
.theme-toggle { background: none; border: 1px solid var(--side-line); color: var(--side-ink); border-radius: 6px; padding: 2px 8px; cursor: pointer; font-size: 13px; }
.sidebar { border-right: 1px solid var(--side-line); }
