:root {
  --blue-900: #0b2f52;
  --blue-800: #0e3d6b;
  --blue-700: #114c86;
  --blue-600: #1a5fa3;
  --blue-500: #2f76bd;
  --blue-100: #dbe8f5;
  --blue-50: #eef4fb;
  --green-700: #136b47;
  --green-600: #1a8459;
  --green-500: #24a06d;
  --green-100: #d5efe2;
  --green-50: #edf8f2;
  --ink: #142233;
  --ink-2: #33475b;
  --muted: #64768a;
  --faint: #93a3b4;
  --line: #e2e8ef;
  --line-2: #eef2f6;
  --bg: #f5f7fa;
  --surface: #ffffff;
  --red: #b93a2b;
  --red-50: #fcefed;
  --amber: #9a6410;
  --amber-50: #fdf5e6;
  --radius: 6px;
  --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --side: 232px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 14px/1.5 var(--sans); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { text-decoration: underline; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
.num, td.num, th.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.mono { font-family: var(--mono); font-size: 12.5px; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.pos { color: var(--green-700); }
.neg { color: var(--red); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
svg.i { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- shell ---------- */
.app { display: grid; grid-template-columns: var(--side) 1fr; min-height: 100vh; }
.side { background: var(--blue-900); color: #c9d7e6; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 18px 14px; color: #fff; }
.brand-logo { display: block; height: 30px; width: auto; }
.brand b { font-size: 17px; letter-spacing: -0.02em; }
.brand small { display: block; font-size: 11px; color: #8fa8c2; font-weight: 400; margin-top: -2px; }
.org { margin: 0 12px 10px; padding: 9px 10px; border-radius: var(--radius); background: rgba(255,255,255,.06); font-size: 12.5px; line-height: 1.35; }
.org strong { display: block; color: #fff; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { padding: 4px 8px 16px; }
.nav h6 { margin: 14px 10px 4px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: #7590ad; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 5px; color: #c9d7e6; text-decoration: none; font-size: 13.5px; }
.nav a:hover { background: rgba(255,255,255,.06); color: #fff; }
.nav a.on { background: rgba(255,255,255,.11); color: #fff; }
.nav a.on svg { color: #6fd3a5; }
.nav a .count { margin-left: auto; font-size: 11px; background: rgba(255,255,255,.12); padding: 0 6px; border-radius: 9px; }
.side-foot { margin-top: auto; padding: 12px 18px 16px; font-size: 11.5px; color: #7590ad; border-top: 1px solid rgba(255,255,255,.07); }
.side-foot b { color: #c9d7e6; font-weight: 500; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { height: 56px; display: flex; align-items: center; gap: 12px; padding: 0 28px; background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.search { display: flex; align-items: center; gap: 8px; width: min(420px, 100%); height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg); color: var(--muted); cursor: text; }
.search span { flex: 1; font-size: 13px; }
kbd { font: 11px var(--mono); padding: 1px 5px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; background: #fff; color: var(--muted); }
.top .grow { flex: 1; }
.menu-btn { display: none; }

.page { padding: 24px 28px 64px; max-width: 1320px; width: 100%; }
.head { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.head h1 { font-size: 22px; }
.head p { margin: 2px 0 0; color: var(--muted); }
.head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 4px; }
.crumb a { color: var(--muted); }

/* ---------- controls ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 13px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font-weight: 500; font-size: 13.5px; cursor: pointer; white-space: nowrap; text-decoration: none !important; }
.btn:hover { border-color: #c8d3de; background: #fafbfd; }
.btn.primary { background: var(--blue-700); border-color: var(--blue-700); color: #fff; }
.btn.primary:hover { background: var(--blue-800); }
.btn.green { background: var(--green-600); border-color: var(--green-600); color: #fff; }
.btn.green:hover { background: var(--green-700); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.danger { color: var(--red); }
.btn.sm { height: 28px; padding: 0 9px; font-size: 12.5px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .field input:focus-visible, select:focus-visible { outline: 2px solid var(--blue-500); outline-offset: 1px; }

.field { display: flex; flex-direction: column; gap: 5px; }
.field label, .lbl { font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.field .hint { font-size: 12px; color: var(--muted); }
input.in, select.in, textarea.in { height: 34px; padding: 0 10px; border: 1px solid #d5dee8; border-radius: var(--radius); background: #fff; width: 100%; }
textarea.in { height: auto; padding: 8px 10px; resize: vertical; }
input.in:focus, select.in:focus, textarea.in:focus { outline: none; border-color: var(--blue-500); box-shadow: 0 0 0 3px var(--blue-50); }
input.in.num { text-align: right; }
.grid { display: grid; gap: 14px; }
.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)); }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }

.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 2px; }
.seg button { border: 0; background: none; padding: 4px 11px; border-radius: 4px; cursor: pointer; font-size: 13px; color: var(--muted); }
.seg button.on { background: var(--blue-50); color: var(--blue-800); font-weight: 500; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; text-decoration: none; font-weight: 500; font-size: 13.5px; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--blue-700); border-color: var(--blue-700); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; }
.card-h { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); }
.card-h h3 { font-size: 14.5px; }
.card-h .r { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-b { padding: 16px 18px; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.cols { display: grid; gap: 16px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 8px; background: var(--surface); margin-bottom: 16px; }
.kpi { padding: 16px 18px; border-left: 1px solid var(--line-2); min-width: 0; }
.kpi:first-child { border-left: 0; }
.kpi .k { font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi .v { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi .v small { font-size: 13px; font-weight: 500; color: var(--muted); margin-right: 2px; }
.kpi .d { font-size: 12.5px; margin-top: 2px; color: var(--muted); }

.badge { display: inline-flex; align-items: center; gap: 5px; height: 21px; padding: 0 8px; border-radius: 11px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: var(--line-2); color: var(--ink-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .8; }
.badge.lunas { background: var(--green-50); color: var(--green-700); }
.badge.belum { background: var(--blue-50); color: var(--blue-700); }
.badge.sebagian { background: var(--amber-50); color: var(--amber); }
.badge.telat { background: var(--red-50); color: var(--red); }
.badge.batal { background: var(--line-2); color: var(--faint); }
.tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px; background: var(--line-2); color: var(--muted); font-weight: 500; }
.tag.blue { background: var(--blue-50); color: var(--blue-700); }
.tag.green { background: var(--green-50); color: var(--green-700); }

/* ---------- tables ---------- */
.tbl-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; }
.t th { text-align: left; font-size: 12px; font-weight: 500; color: var(--muted); padding: 9px 14px; border-bottom: 1px solid var(--line); background: #fbfcfd; white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 9px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr.click { cursor: pointer; }
.t tbody tr.click:hover td { background: #f8fafc; }
.t td.sub { padding-left: 32px; }
.t tr.total td { font-weight: 600; border-top: 1px solid var(--line); background: #fbfcfd; }
.t tr.grand td { font-weight: 600; border-top: 2px solid var(--ink); font-size: 14.5px; }
.t tr.section td { font-weight: 600; color: var(--blue-800); padding-top: 16px; border-bottom-color: var(--line); }
.t .who { font-weight: 500; }
.t .who small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty b { display: block; color: var(--ink); margin-bottom: 4px; font-weight: 500; }

.toolbar { display: flex; gap: 8px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.toolbar .in { width: auto; }
.toolbar .search-in { width: 260px; }
.toolbar .grow { flex: 1; }
.sum-strip { display: flex; gap: 28px; padding: 12px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.sum-strip div { font-size: 12.5px; color: var(--muted); }
.sum-strip b { display: block; font-size: 16px; color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }

/* ---------- dashboard bits ---------- */
.quick { display: flex; gap: 10px; align-items: center; padding: 10px 10px 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
.quick input { flex: 1; border: 0; outline: 0; font-size: 14.5px; background: transparent; min-width: 0; }
.quick .ico { color: var(--green-600); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 16px; }
.chip { border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 3px 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.chip:hover { border-color: var(--blue-500); color: var(--blue-700); }

.chart { width: 100%; display: block; }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }

.list { list-style: none; margin: 0; padding: 0; }
.list li { display: flex; gap: 12px; align-items: flex-start; padding: 11px 18px; border-bottom: 1px solid var(--line-2); }
.list li:last-child { border-bottom: 0; }
.list .dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; flex: none; }
.list .grow { flex: 1; min-width: 0; }
.list small { color: var(--muted); display: block; font-size: 12.5px; }

.meter { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--green-500); border-radius: 3px; }
.meter i.warn { background: #d29a2b; }
.meter i.bad { background: var(--red); }

.health { display: grid; grid-template-columns: repeat(2, 1fr); }
.health div { padding: 13px 18px; border-bottom: 1px solid var(--line-2); border-right: 1px solid var(--line-2); }
.health div:nth-child(2n) { border-right: 0; }
.health b { display: block; font-size: 18px; font-variant-numeric: tabular-nums; }
.health span { font-size: 12px; color: var(--muted); }
.health em { font-style: normal; font-size: 12px; }

/* ---------- learn box ---------- */
.learn { border: 1px solid var(--green-100); background: var(--green-50); border-radius: 8px; padding: 12px 14px; font-size: 13px; color: #1d4a36; }
.learn h4 { font-size: 13px; display: flex; align-items: center; gap: 6px; margin-bottom: 6px; color: var(--green-700); }
.learn ul { margin: 0; padding-left: 18px; }
.learn li + li { margin-top: 3px; }

/* ---------- doc form ---------- */
.lines .in { height: 32px; }
.lines td { padding: 6px 8px; }
.lines th { padding: 8px; }
.totals { margin-left: auto; width: 320px; }
.totals div { display: flex; justify-content: space-between; padding: 5px 0; font-variant-numeric: tabular-nums; }
.totals .big { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; font-weight: 600; font-size: 16px; }

/* invoice paper */
.paper { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 40px 44px; }
.paper .ph { display: flex; justify-content: space-between; gap: 20px; padding-bottom: 22px; border-bottom: 2px solid var(--blue-800); margin-bottom: 22px; }
.paper .ph h2 { font-size: 26px; color: var(--blue-800); letter-spacing: 0.02em; }
.paper .meta { display: grid; grid-template-columns: auto auto; gap: 2px 16px; font-size: 13px; }
.paper .meta span { color: var(--muted); }
.paper .note { margin-top: 26px; font-size: 12.5px; color: var(--muted); }

/* ---------- modal / toast / palette ---------- */
.overlay { position: fixed; inset: 0; background: rgba(13, 30, 48, .38); display: flex; align-items: flex-start; justify-content: center; padding: 8vh 16px 16px; z-index: 100; animation: fade .12s ease-out; }
.modal { background: #fff; border-radius: 10px; width: min(560px, 100%); max-height: 84vh; display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(10, 30, 50, .22); }
.modal.wide { width: min(820px, 100%); }
.modal-h { display: flex; align-items: center; padding: 16px 20px; border-bottom: 1px solid var(--line-2); }
.modal-h h3 { font-size: 16px; }
.modal-h button { margin-left: auto; }
.modal-b { padding: 18px 20px; overflow-y: auto; }
.modal-f { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 20px; border-top: 1px solid var(--line-2); background: #fbfcfd; border-radius: 0 0 10px 10px; }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; bottom: 20px; right: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 200; }
.toast { background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 6px; font-size: 13.5px; display: flex; gap: 10px; align-items: center; box-shadow: 0 8px 24px rgba(0,0,0,.18); animation: fade .15s; }
.toast svg { color: #6fd3a5; }
.toast.err svg { color: #ff9d8f; }

.palette { width: min(600px, 100%); background: #fff; border-radius: 10px; box-shadow: 0 18px 50px rgba(10, 30, 50, .25); overflow: hidden; }
.palette input { width: 100%; border: 0; outline: 0; padding: 16px 18px; font-size: 15.5px; border-bottom: 1px solid var(--line); }
.palette ul { list-style: none; margin: 0; padding: 6px; max-height: 52vh; overflow-y: auto; }
.palette li { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; cursor: pointer; color: var(--ink-2); }
.palette li small { margin-left: auto; color: var(--faint); font-size: 12px; }
.palette li.on { background: var(--blue-50); color: var(--blue-800); }
.palette .grp { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); padding: 8px 10px 4px; }
.palette .foot { display: flex; gap: 14px; padding: 9px 16px; border-top: 1px solid var(--line-2); font-size: 12px; color: var(--muted); background: #fbfcfd; }

.preview-j { border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: 12px; }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .cols { grid-template-columns: 1fr; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .kpi:nth-child(3) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
}
@media (max-width: 820px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 260px; z-index: 60; transform: translateX(-100%); transition: transform .2s; }
  .app.nav-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(13,30,48,.4); }
  .menu-btn { display: inline-flex; }
  .top { padding: 0 16px; }
  .page { padding: 18px 16px 48px; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .search kbd { display: none; }
  .totals { width: 100%; }
  .paper { padding: 24px 18px; }
  .toolbar .search-in { width: 100%; }
}

@media print {
  body { background: #fff; }
  .side, .top, .no-print, .toasts { display: none !important; }
  .app { display: block; }
  .page { padding: 0; max-width: none; }
  .card, .paper { border: 0; }
  .t th { position: static; }
}

/* sel tabel yang tidak boleh terlipat */
.t td.mono, .t td[data-v], .t td.nowrap { white-space: nowrap; }

/* ---------- status simpan ---------- */
.save-state { font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.save-state::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }
.save-state.saving::before { background: #d29a2b; }
.save-state.error { color: var(--red); }
.save-state.error::before { background: var(--red); }
.save-state.ro::before { background: var(--faint); }
.boot { padding: 80px 0; text-align: center; color: var(--muted); }
.ro-banner { background: var(--amber-50); color: #6d4a0c; border: 1px solid #f0dcb4; border-radius: 8px; padding: 10px 14px; margin-bottom: 16px; font-size: 13px; display: flex; gap: 8px; align-items: center; }

/* pemilih buku & menu pengguna di sidebar */
.org { display: block; width: calc(100% - 24px); text-align: left; border: 0; color: inherit; cursor: pointer; }
.org:hover { background: rgba(255,255,255,.1); }
.org .chev { float: right; margin-top: -26px; opacity: .6; }
.dropdown { position: fixed; z-index: 120; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 32px rgba(10,30,50,.18); min-width: 240px; padding: 6px; }
.dropdown button, .dropdown a { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border: 0; background: none; border-radius: 5px; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--ink); text-decoration: none; }
.dropdown button:hover, .dropdown a:hover { background: var(--bg); }
.dropdown .sep { height: 1px; background: var(--line-2); margin: 5px 0; }
.dropdown .hd { padding: 6px 10px 4px; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.dropdown small { margin-left: auto; color: var(--faint); font-size: 11.5px; }
.user-chip { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: 0; color: #c9d7e6; cursor: pointer; padding: 0; text-align: left; }
.avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--green-600); color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600; flex: none; }

/* ---------- halaman masuk & daftar ---------- */
.auth-body { background: var(--surface); }
.auth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; }
.auth-main { display: flex; flex-direction: column; padding: 28px 56px; }
.auth-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.auth-brand { display: inline-flex; align-items: center; text-decoration: none !important; }
.auth-brand img { display: block; height: 36px; width: auto; }
.auth-brand b { display: block; font-size: 18px; letter-spacing: -0.02em; line-height: 1.1; }
.auth-brand small { display: block; font-size: 11.5px; color: var(--muted); }
.auth-switch { font-size: 13.5px; color: var(--muted); }
.auth-switch a { font-weight: 500; }
.auth-box { width: min(460px, 100%); margin: auto; padding: 48px 0; }
.auth-box h1 { font-size: 30px; letter-spacing: -0.025em; line-height: 1.15; }
.auth-sub { margin: 8px 0 28px; color: var(--muted); font-size: 15px; line-height: 1.55; }
.auth-sub b { color: var(--ink); font-weight: 500; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .field label, .auth-form .lbl { font-size: 13px; }
.in-wrap { position: relative; }
.in-wrap > .i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--faint); pointer-events: none; }
.in-wrap .in { height: 44px; padding-left: 38px; font-size: 14.5px; border-radius: 8px; background: #fbfcfd; }
.in-wrap .in:focus { background: #fff; }
.in-wrap .in:focus ~ .i, .in-wrap:focus-within > .i { color: var(--blue-600); }
.in-wrap .eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 6px; border-radius: 6px; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.in-wrap .eye:hover { background: var(--line-2); color: var(--ink); }
.in-wrap .eye .i { position: static; transform: none; }
.in-wrap .eye .i + .i, .in-wrap .eye.on .i:first-child { display: none; }
.in-wrap .eye.on .i + .i { display: block; }
.in-wrap:has(.eye) .in { padding-right: 42px; }
.auth-small { font-size: 13px; }
.auth-btn { height: 46px; justify-content: center; font-size: 15px; border-radius: 8px; margin-top: 4px; }
.auth-btn .i { transition: transform .15s; }
.auth-btn:hover .i { transform: translateX(3px); }
.auth-note { display: flex; gap: 8px; align-items: flex-start; padding: 11px 13px; border-radius: 8px; font-size: 13.5px; margin-bottom: 20px; line-height: 1.5; }
.auth-note .i { margin-top: 2px; }
.auth-note.ok { background: var(--green-50); color: var(--green-700); }
.auth-note.err { background: var(--red-50); color: var(--red); }
.auth-fine { font-size: 12.5px; color: var(--muted); line-height: 1.55; margin: 4px 0 0; }
.auth-trial { margin-top: 28px; padding: 14px 16px; border: 1px dashed #c6d4e3; border-radius: 10px; display: grid; grid-template-columns: 1fr auto; gap: 2px 16px; align-items: center; font-size: 13.5px; }
.auth-trial b { font-weight: 600; }
.auth-trial span { color: var(--muted); grid-column: 1; }
.auth-trial a { grid-row: 1 / span 2; grid-column: 2; font-weight: 500; }
.pw-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin-top: 4px; }
.pw-meter i { height: 4px; border-radius: 2px; background: var(--line); transition: background .2s; }
.pw-meter[data-lv="1"] i:nth-child(-n+1) { background: var(--red); }
.pw-meter[data-lv="2"] i:nth-child(-n+2) { background: #d29a2b; }
.pw-meter[data-lv="3"] i:nth-child(-n+3) { background: var(--green-500); }
.pw-meter[data-lv="4"] i { background: var(--green-600); }
.auth-choice { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-choice legend { margin-bottom: 6px; }
.auth-choice label { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; transition: border-color .15s, background .15s; }
.auth-choice label:hover { border-color: #c6d4e3; }
.auth-choice label:has(input:checked) { border-color: var(--blue-600); background: var(--blue-50); box-shadow: 0 0 0 1px var(--blue-600); }
.auth-choice input { margin-top: 3px; accent-color: var(--blue-600); }
.auth-choice b { display: block; font-weight: 500; font-size: 13.5px; }
.auth-choice small { color: var(--muted); font-size: 12px; }
.auth-mail { display: flex; gap: 16px; align-items: flex-start; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: #fbfcfd; margin-bottom: 16px; }
.auth-mail-ico { width: 44px; height: 44px; border-radius: 10px; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; flex: none; }
.auth-mail-ico .i { width: 22px; height: 22px; }
.auth-mail ol { margin: 0; padding-left: 18px; font-size: 13.5px; line-height: 1.9; color: var(--ink-2); }
.auth-mail b { font-weight: 500; color: var(--ink); }
.auth-foot { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--faint); }
.auth-foot a { color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }

/* panel kanan: kertas buku kas */
.auth-side { position: relative; overflow: hidden; background: var(--blue-900); color: #dbe6f1; display: flex; align-items: center; justify-content: center; padding: 56px; }
.ledger { position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, transparent 0 88px, rgba(229, 115, 115, .32) 88px 89px, transparent 89px 93px, rgba(229, 115, 115, .32) 93px 94px, transparent 94px),
    repeating-linear-gradient(180deg, transparent 0 31px, rgba(255, 255, 255, .055) 31px 32px);
  mask-image: linear-gradient(180deg, transparent, #000 18%, #000 82%, transparent); }
.auth-side-in { position: relative; width: min(440px, 100%); }
.auth-kicker { margin: 0 0 10px; font: 500 11.5px var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #7fc8a6; }
.auth-quote { font-size: 32px; line-height: 1.15; letter-spacing: -0.025em; color: #fff; font-weight: 600; margin: 0 0 32px; }
.stackcards { position: relative; display: grid; gap: 14px; }
.sc { background: #fff; color: var(--ink); border-radius: 12px; padding: 14px 16px; box-shadow: 0 18px 40px rgba(3, 18, 34, .35); font-size: 13px; }
.sc-kpi { transform: rotate(-1.2deg); }
.sc-inv { margin-left: 36px; margin-right: -18px; transform: rotate(.8deg); }
.sc-type { margin-right: 28px; }
.sc-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-variant-numeric: tabular-nums; }
.sc-label { font-size: 12px; color: var(--muted); }
.sc-big { font-size: 22px; letter-spacing: -0.02em; font-weight: 600; }
.sc-up { font-size: 12px; font-weight: 500; color: var(--green-700); background: var(--green-50); padding: 2px 8px; border-radius: 10px; }
.sc-spark { display: block; width: 100%; height: 44px; margin-top: 6px; }
.sc-mono { font: 12px var(--mono); color: var(--muted); }
.sc-badge { font-size: 11px; font-weight: 600; color: var(--green-700); background: var(--green-50); padding: 2px 8px; border-radius: 10px; }
.sc-inv > b { display: block; margin: 6px 0 4px; font-weight: 600; font-size: 14px; }
.sc-muted { color: var(--muted); font-size: 12.5px; }
.sc-input { display: flex; align-items: center; gap: 8px; border: 1px solid var(--blue-500); box-shadow: 0 0 0 3px var(--blue-50); border-radius: 8px; padding: 9px 11px; font-size: 13.5px; }
.sc-input .i { color: var(--green-600); }
.caret { width: 2px; height: 15px; background: var(--blue-600); animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.sc-lines { margin-top: 10px; display: grid; gap: 6px; transition: opacity .2s; }
.sc-lines.dim { opacity: .3; }
.sc-cr { padding-left: 18px; color: var(--ink-2); }
.auth-points { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 10px; font-size: 13.5px; color: #c4d4e4; }
.auth-points li { display: flex; gap: 10px; align-items: center; }
.auth-points .i { color: #7fc8a6; }

.auth-mhero { display: none; }
@media (max-width: 960px) {
  .auth-mhero { display: block; position: relative; overflow: hidden; margin: 16px 0 0; padding: 18px 18px 16px; border-radius: 12px; background: var(--blue-900); color: #dbe6f1; }
  .auth-mhero .ledger { mask-image: none; }
  .auth-mhero > *:not(.ledger) { position: relative; }
  .auth-mhero .auth-kicker { margin-bottom: 6px; }
  .auth-mquote { margin: 0 0 14px; font-size: 20px; line-height: 1.2; font-weight: 600; letter-spacing: -0.02em; color: #fff; }
  .auth-mrow { display: flex; justify-content: space-between; align-items: center; background: #fff; color: var(--ink); border-radius: 8px; padding: 9px 12px; font-size: 12.5px; }
  .auth-mrow span { color: var(--muted); }
  .auth-mrow b { font-variant-numeric: tabular-nums; font-size: 15px; }
  .auth { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .auth-main { padding: 18px 16px 20px; }
  .auth-top { padding-bottom: 14px; border-bottom: 1px solid var(--line-2); }
  .auth-box { padding: 24px 0 32px; margin-top: 0; }
  .auth-box h1 { font-size: 26px; }
  .auth-choice { grid-template-columns: 1fr; }
  .auth-switch { font-size: 12.5px; text-align: right; }
  .save-state span { display: none; }
}
@media (prefers-reduced-motion: reduce) { .caret { animation: none; } }

/* ---------- masa coba ---------- */
.trial-banner { display: flex; align-items: center; gap: 14px; background: var(--blue-50); border: 1px solid var(--blue-100); color: var(--blue-900); border-radius: 8px; padding: 9px 14px; margin-bottom: 16px; font-size: 13px; flex-wrap: wrap; }
.trial-banner .meter { flex: 1; min-width: 120px; max-width: 240px; background: #fff; }
.trial-banner .btn { margin-left: auto; }
.ro-banner .btn { margin-left: auto; }
.is-trial .paper { position: relative; overflow: hidden; }
.is-trial .paper::after { content: 'DEMO · MASA COBA AKTIVA'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 46px; font-weight: 600; letter-spacing: .08em; color: rgba(185, 58, 43, .1); transform: rotate(-24deg); pointer-events: none; }
@media print { .is-trial .paper::after { color: rgba(185, 58, 43, .16); } }

/* ---------- panduan ---------- */
.g-wrap { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 20px; align-items: start; }
.g-toc { position: sticky; top: 76px; padding: 8px; max-height: calc(100vh - 96px); overflow-y: auto; }
.g-toc h6 { margin: 12px 10px 4px; font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; color: var(--faint); }
.g-toc h6:first-child { margin-top: 4px; }
.g-toc a { display: flex; align-items: center; gap: 9px; padding: 6px 10px; border-radius: 5px; color: var(--ink-2); font-size: 13.5px; text-decoration: none; }
.g-toc a:hover { background: var(--bg); }
.g-toc a.on { background: var(--blue-50); color: var(--blue-700); font-weight: 500; }
.g-pick { display: none; }
.g-body { padding: 28px 32px 8px; max-width: 920px; }
.g-top { display: flex; gap: 14px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); margin-bottom: 8px; }
.g-ico { width: 42px; height: 42px; border-radius: 10px; background: var(--blue-50); color: var(--blue-600); display: grid; place-items: center; flex: none; }
.g-ico svg.i { width: 22px; height: 22px; }
.g-crumb { font-size: 12px; color: var(--faint); }
.g-top h2 { font-size: 22px; margin: 2px 0 4px; }
.g-lead { margin: 0; color: var(--muted); font-size: 14.5px; }
.g-content { font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }
.g-content p { margin: 10px 0; }
.g-content code { font: 12.5px var(--mono); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; color: var(--ink); }
.g-h3 { font-size: 16px; color: var(--ink); margin: 28px 0 6px; }
.g-shot { margin: 14px 0 6px; }
.g-shot button { display: block; width: 100%; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; cursor: zoom-in; box-shadow: 0 1px 2px rgba(20,34,51,.05), 0 6px 20px rgba(20,34,51,.06); }
.g-shot.narrow button { max-width: 520px; }
.g-shot img { display: block; width: 100%; height: auto; }
.g-shot figcaption { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.gm { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e8590c; color: #fff; font-size: 12px; font-weight: 700; flex: none; vertical-align: -5px; }
.g-marks { list-style: none; padding: 0; margin: 10px 0 4px; display: grid; gap: 8px; }
.g-marks li { display: flex; gap: 10px; align-items: flex-start; }
.g-marks li .gm { margin-top: 2px; }
.g-steps { padding-left: 0; margin: 10px 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.g-steps li { counter-increment: s; position: relative; padding-left: 34px; }
.g-steps li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%; background: var(--blue-50); color: var(--blue-700); font-size: 12px; font-weight: 600; display: grid; place-items: center; }
.g-fields { margin: 12px 0; border: 1px solid var(--line); border-radius: 8px; }
.g-fields .t td { vertical-align: top; font-size: 13.5px; line-height: 1.5; }
.g-fields .t td:first-child { white-space: nowrap; color: var(--ink); }
.g-note { display: flex; gap: 10px; border-radius: 8px; padding: 12px 14px; margin: 14px 0; font-size: 13.5px; line-height: 1.55; }
.g-note svg.i { margin-top: 2px; }
.g-note b { display: block; margin-bottom: 2px; }
.g-note.tip { background: var(--green-50); border: 1px solid var(--green-100); color: #1d4a36; }
.g-note.tip svg { color: var(--green-600); }
.g-note.warn { background: var(--amber-50); border: 1px solid #f0dcb4; color: #6d4a0c; }
.g-note.warn svg { color: var(--amber); }
.g-go { margin: 20px 0 6px; }
.g-faq { border: 1px solid var(--line); border-radius: 8px; padding: 0 14px; margin: 8px 0; background: #fff; }
.g-faq summary { cursor: pointer; padding: 12px 0; font-weight: 500; color: var(--ink); }
.g-faq p { margin: 0 0 12px; }
.g-pager { display: flex; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line-2); margin-top: 28px; padding: 16px 0 20px; }
.g-pager a { display: flex; flex-direction: column; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; min-width: 0; }
.g-pager a:hover { border-color: var(--blue-500); text-decoration: none; }
.g-pager a.nx { text-align: right; margin-left: auto; }
.g-pager small { color: var(--faint); font-size: 12px; }
.g-zoom { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; cursor: zoom-out; }
.g-zoom img { max-width: 100%; max-height: calc(100vh - 100px); border-radius: 8px; box-shadow: 0 10px 40px rgba(0,0,0,.35); background: #fff; }
@media (max-width: 1000px) {
  .g-wrap { grid-template-columns: 1fr; }
  .g-toc { position: static; max-height: none; padding: 10px; }
  .g-toc-list { display: none; }
  .g-pick { display: block; }
}
@media (max-width: 820px) {
  .g-body { padding: 20px 16px 4px; }
  .g-fields .t td:first-child { white-space: normal; }
}
.g-zoom { background: rgba(13, 30, 48, .82); }

/* SSO akun Zennit di halaman masuk/daftar */
.sso-btn { width: 100%; gap: 10px; }
.sso-btn img { border-radius: 4px; }
.auth-atau { display: flex; align-items: center; gap: 10px; margin: 18px 0; color: var(--muted); font-size: 12.5px; }
.auth-atau::before, .auth-atau::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* Logo usaha */
.org.has-logo { position: relative; padding-left: 48px; min-height: 48px; }
.org-logo { position: absolute; left: 9px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; border-radius: 6px; object-fit: contain; background: #fff; }
.logo-pick { display: flex; gap: 14px; align-items: center; }
.logo-box { width: 72px; height: 72px; flex: none; border-radius: 12px; border: 1px solid var(--line); background: var(--blue-50, #eef4fb); color: var(--blue-800); display: grid; place-items: center; font-weight: 700; font-size: 20px; overflow: hidden; }
.logo-box.filled { background: #fff; }
.logo-box img { width: 100%; height: 100%; object-fit: contain; }
.doc-logo { display: block; max-height: 56px; max-width: 160px; object-fit: contain; margin: 0 0 8px auto; }

/* Layar HP: baris atas ringkas, kartu angka 2 kolom, kepala kartu & faktur boleh turun baris */
.card-h { flex-wrap: wrap; }
/* isi grid jangan melebar mengikuti tabel di dalamnya (tabel sudah bisa digeser sendiri) */
.cols > *, .stack > * { min-width: 0; }
@media (max-width: 820px) {
  .top { gap: 8px; }
  .top .grow { display: none; }
  .search { flex: 1; min-width: 0; width: auto; }
  .search span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  #quickBtn span, #newInv span, .save-state span { display: none; }
  /* sebagian halaman menulis jumlah kolom langsung di elemen (style="…"), jadi perlu !important */
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .kpi { padding: 12px 14px; border-top: 0; }
  .kpi:nth-child(odd) { border-left: 0; }
  .kpi:nth-child(n+3) { border-top: 1px solid var(--line-2); }
  .kpi .v { font-size: 18px; }
  .paper .ph { flex-direction: column; }
  .paper { overflow-x: auto; }
  /* baris barang di form faktur/tagihan: tetap lega, digeser ke samping */
  .t.lines { min-width: 680px; }
}

/* tagih piutang lewat WhatsApp */
.tagih-list { border: 1px solid var(--line); border-radius: var(--radius); max-height: 220px; overflow-y: auto; }
.tagih-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.tagih-row:last-child { border-bottom: 0; }
.tagih-row > span { flex: 1; min-width: 0; }
.tagih-row small { display: block; color: var(--muted); font-size: 12px; }
.tagih-row input { flex: none; width: 16px; height: 16px; }

/* PPh Final UMKM: panduan setor Coretax */
.langkah-pph { margin: 0; padding: 14px 16px 10px 36px; display: grid; gap: 8px; font-size: 13.5px; line-height: 1.5; }
.langkah-pph .btn { padding: 0 6px; height: 24px; vertical-align: middle; }
