/* Neraca — tenang, bersih, klasik. Satu warna aksen, garis halus, angka rapi. */

:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --ink: #1b1b19;
  --muted: #72716b;
  --faint: #a3a29b;
  --line: #e6e4dd;
  --line-strong: #cfcdc4;
  --accent: #1d5a46;
  --accent-ink: #ffffff;
  --accent-soft: #e6f0eb;
  --brass: #b08a3e;
  --brass-soft: #f6efdc;
  --slate: #3f6483;
  --slate-soft: #e7eef4;
  --plum: #8a4a5e;
  --plum-soft: #f5e9ed;
  --side-bg: #173b2f;
  --side-ink: #c9d8d0;
  --side-faint: #7f9a8d;
  --shadow: 0 6px 18px -8px rgba(23, 59, 47, .28);
  --danger: #a4382a;
  --danger-soft: #f8ecea;
  --warn: #8a5f0c;
  --warn-soft: #f7f0de;
  --radius: 10px;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: ui-serif, "New York", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151514;
    --surface: #1d1d1b;
    --ink: #eceae4;
    --muted: #9c9a92;
    --faint: #6d6c66;
    --line: #2c2c29;
    --line-strong: #3f3e3a;
    --accent: #8fc3ae;
    --accent-ink: #10201a;
    --accent-soft: #1d2a25;
    --brass: #d4b26a;
    --brass-soft: #2f2817;
    --slate: #8fb3d1;
    --slate-soft: #1c2630;
    --plum: #d79bb0;
    --plum-soft: #33202a;
    --side-bg: #101a16;
    --side-ink: #b9c7bf;
    --side-faint: #6d8478;
    --shadow: 0 6px 18px -8px rgba(0, 0, 0, .6);
    --danger: #e08b7d;
    --danger-soft: #33201d;
    --warn: #d9b15c;
    --warn-soft: #2f2817;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.55 var(--sans);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "tnum" 1;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
h1 { font-size: 30px; line-height: 1.2; }
h2 { font-size: 19px; }
h3 { font-size: 16px; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 600; }
.neg { color: var(--danger); }

/* ---------- Kerangka ---------- */

.ico { width: 20px; height: 20px; flex: none; }
:root { --sbw: 248px; }
html.sb-collapsed { --sbw: 72px; }

.shell { display: grid; grid-template-columns: var(--sbw) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s cubic-bezier(.4, 0, .2, 1); }

.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-x: hidden; overflow-y: auto; scrollbar-width: none;
  padding: 22px 12px 14px; background: var(--side-bg); color: var(--side-ink);
  display: flex; flex-direction: column; gap: 18px; z-index: 30;
}
.sidebar::-webkit-scrollbar { display: none; }

.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px; min-height: 40px; }
.logo {
  flex: none; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center;
  font: 600 21px/1 var(--serif); color: #1b2a22; background: linear-gradient(145deg, #d9bd7e, #b08a3e);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.25);
}
.brand-text { min-width: 0; display: flex; flex-direction: column; }
.brand-name { font-family: var(--serif); font-size: 21px; color: #f4f1e8; letter-spacing: -0.01em; line-height: 1.15; }
.brand-company { font-size: 12px; color: var(--side-faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--side-faint); padding: 0 12px; margin: 16px 0 6px; white-space: nowrap; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px;
  border-radius: 10px; color: var(--side-ink); font-size: 14.5px; white-space: nowrap;
  transition: background .15s, color .15s, transform .15s;
}
.nav a .ico { color: var(--side-faint); transition: color .15s, transform .2s; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a:hover .ico { color: var(--brass); transform: translateX(1px) scale(1.08); }
.nav a:active { transform: scale(.98); }
.nav a.active { background: rgba(255,255,255,.12); color: #fff; font-weight: 550; }
.nav a.active .ico { color: var(--brass); }
.nav a.active::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--brass); }

.sidebar-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-direction: column; gap: 10px; }
.me { display: flex; align-items: center; gap: 11px; padding: 0 6px; min-width: 0; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font: 600 15px var(--sans); color: #1b2a22; background: #dfe9e3; }
.me-text { min-width: 0; display: flex; flex-direction: column; line-height: 1.3; }
.who { color: #f4f1e8; font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role { font-size: 12px; color: var(--side-faint); }
.foot-links { display: flex; flex-direction: column; gap: 2px; }
.foot-links form { margin: 0; }
.foot-links a, .foot-links button {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 34px; padding: 0 12px; border: 0; background: none;
  border-radius: 9px; color: var(--side-ink); font: 13.5px var(--sans); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s;
}
.foot-links .ico { width: 18px; height: 18px; color: var(--side-faint); }
.foot-links a:hover, .foot-links button:hover { background: rgba(255,255,255,.07); color: #fff; }
.foot-links button:hover .ico { color: #e8a090; }

.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--muted); cursor: pointer; }
.linklike:hover { color: var(--ink); text-decoration: underline; }
.linklike.danger:hover { color: var(--danger); }

/* Sidebar ringkas (hanya ikon) */
html.sb-collapsed .brand-text, html.sb-collapsed .nav a span, html.sb-collapsed .me-text, html.sb-collapsed .foot-links span { display: none; }
html.sb-collapsed .nav-label { font-size: 0; padding: 0; margin: 12px 14px; height: 1px; background: rgba(255,255,255,.1); }
html.sb-collapsed .nav a, html.sb-collapsed .foot-links a, html.sb-collapsed .foot-links button { justify-content: center; padding: 0; }
html.sb-collapsed .brand, html.sb-collapsed .me { justify-content: center; padding: 0; }
html.sb-collapsed .nav a.active::before { left: -12px; }

/* Bilah atas + tombol buka/tutup */
.main { min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 14px; height: 56px; padding: 0 28px; background: var(--bg); border-bottom: 1px solid var(--line); }
.sb-toggle { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.sb-toggle:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--ink); }
.sb-toggle:active { transform: scale(.92); }
.topbar-title { font-family: var(--serif); font-size: 16px; color: var(--muted); }

.page { padding: 34px 52px 80px; animation: rise .3s ease both; }
.content { max-width: 1040px; margin: 0 auto; }
.content.narrow { max-width: 720px; }
.scrim { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.crumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; display: inline-block; }
.crumb:hover { color: var(--ink); }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

/* ---------- Tombol ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 16px; border-radius: 999px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 500 14px var(--sans); cursor: pointer; white-space: nowrap;
  transition: background .12s, border-color .12s, opacity .12s;
}
.btn:hover { border-color: var(--faint); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { opacity: .9; }
.btn.quiet { border-color: transparent; background: transparent; color: var(--muted); }
.btn.quiet:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 5%, transparent); }
.btn.danger { color: var(--danger); }
.btn.small { height: 30px; padding: 0 12px; font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Kartu & ringkasan ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card.pad { padding: 24px 26px; }
.card + .card, .card + .stats, .stats + .card { margin-top: 20px; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.section-title { margin: 34px 0 12px; }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.stat-label { font-size: 12.5px; color: var(--muted); }
.stat-value { font-family: var(--serif); font-size: 25px; margin-top: 4px; letter-spacing: -0.01em; white-space: nowrap; }
.stat-value .cur { font-size: 14px; color: var(--muted); margin-right: 3px; font-family: var(--sans); }
.stat-note { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Tabel ---------- */

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 11.5px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); padding: 11px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th:first-child, td:first-child { padding-left: 22px; }
th:last-child, td:last-child { padding-right: 22px; }
tbody tr:last-child td { border-bottom: 0; }
th.num { text-align: right; }
tr.link { cursor: pointer; }
tr.link:hover td { background: color-mix(in srgb, var(--ink) 2.5%, transparent); }
tfoot td { border-top: 1px solid var(--line-strong); border-bottom: 0; font-weight: 600; }
td .sub { display: block; font-size: 12.5px; color: var(--muted); }
.code { font-size: 13px; color: var(--muted); white-space: nowrap; }

.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); margin-bottom: 6px; }
.empty .btn { margin-top: 16px; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: color-mix(in srgb, var(--ink) 6%, transparent); color: var(--muted); white-space: nowrap; }
.badge.paid { background: var(--accent-soft); color: var(--accent); }
.badge.overdue { background: var(--danger-soft); color: var(--danger); }
.badge.partial { background: var(--warn-soft); color: var(--warn); }

/* ---------- Filter ---------- */

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.pills { display: flex; gap: 4px; flex-wrap: wrap; }
.pills a { padding: 5px 13px; border-radius: 999px; font-size: 13.5px; color: var(--muted); }
.pills a:hover { color: var(--ink); }
.pills a.active { background: var(--ink); color: var(--bg); }
.search { height: 34px; width: 220px; border-radius: 999px; padding: 0 14px; }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.pager .actions a, .pager .actions span { padding: 4px 12px; border: 1px solid var(--line); border-radius: 999px; }
.pager .actions span { opacity: .4; }

/* ---------- Formulir ---------- */

label, .label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search], input[type=number], select, textarea {
  width: 100%; height: 38px; padding: 0 12px; border-radius: 8px;
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 15px var(--sans); transition: border-color .12s, box-shadow .12s;
}
textarea { height: auto; padding: 9px 12px; resize: vertical; min-height: 76px; line-height: 1.5; }
select { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' fill='none' stroke='%2388877f' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
input:focus, select:focus, textarea:focus { outline: 0; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input.num { text-align: right; }
::placeholder { color: var(--faint); }

.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.fields.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fields .wide { grid-column: 1 / -1; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.error { font-size: 12.5px; color: var(--danger); margin-top: 6px; }
.check { display: flex; align-items: center; gap: 9px; color: var(--ink); font-size: 14.5px; margin: 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); margin: 0; }
.form-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 26px; }

.segmented { display: inline-flex; padding: 3px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 6%, transparent); }
.segmented label { margin: 0; cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 6px 18px; border-radius: 999px; font-size: 14px; color: var(--muted); }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* Baris rincian (faktur & jurnal) */
.rows th, .rows td { padding: 8px 6px; border-bottom: 0; }
.rows th:first-child, .rows td:first-child { padding-left: 0; }
.rows th:last-child, .rows td:last-child { padding-right: 0; }
.rows thead th { border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.rows tbody tr:first-child td { padding-top: 14px; }
.row-remove { width: 30px; height: 38px; border: 0; background: none; color: var(--faint); font-size: 18px; cursor: pointer; border-radius: 6px; }
.row-remove:hover { color: var(--danger); }
.totals { margin-left: auto; width: 320px; max-width: 100%; margin-top: 18px; }
.totals div { display: flex; justify-content: space-between; padding: 6px 0; }
.totals .grand { border-top: 1px solid var(--line-strong); margin-top: 6px; padding-top: 12px; font-family: var(--serif); font-size: 20px; }
.balance-ok { color: var(--accent); }
.balance-off { color: var(--danger); }

/* ---------- Pesan ---------- */

.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 22px; font-size: 14px; background: var(--accent-soft); color: var(--accent); }
.flash.bad { background: var(--danger-soft); color: var(--danger); }
.flash ul { margin: 0; padding-left: 18px; }

/* ---------- Rincian dokumen ---------- */

.doc { padding: 40px 44px; }
.doc-head { display: flex; justify-content: space-between; gap: 24px; margin-bottom: 34px; }
.doc-title { font-family: var(--serif); font-size: 26px; }
.doc-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-bottom: 30px; }
.doc-meta dt, .dl dt { font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); margin-bottom: 3px; }
.doc-meta dd, .dl dd { margin: 0; }
.dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin: 0; }
.doc table td:first-child, .doc table th:first-child { padding-left: 0; }
.doc table td:last-child, .doc table th:last-child { padding-right: 0; }

/* ---------- Laporan ---------- */

.report-bar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 22px; }
.report-bar .f { width: 160px; }
.report-bar .f.wide { width: 280px; }
.statement { padding: 44px 52px; }
.statement-head { text-align: center; margin-bottom: 34px; }
.statement-head .company { font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.statement-head h2 { font-size: 26px; margin: 6px 0 4px; }
.statement table td, .statement table th { padding-left: 0; padding-right: 0; }
.st { width: 100%; }
.st td { border: 0; padding: 5px 0; }
.st .group td { padding-top: 22px; font-size: 11.5px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.st .item td:first-child { padding-left: 18px; }
.st .item .code { margin-right: 10px; }
.st .subtotal td { border-top: 1px solid var(--line); font-weight: 600; padding-top: 9px; }
.st .total td { border-top: 1px solid var(--ink); border-bottom: 3px double var(--ink); font-family: var(--serif); font-size: 18px; padding: 11px 0; }
.st .spacer td { padding: 8px 0; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; }

.report-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.report-list a { display: block; padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .12s; }
.report-list a:hover { border-color: var(--faint); }
.report-list h3 { margin-bottom: 4px; font-size: 18px; }

/* Grafik batang sederhana */
.chart { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 18px; align-items: end; height: 190px; padding: 6px 0 0; }
.chart .col { display: flex; flex-direction: column; align-items: center; gap: 8px; height: 100%; }
.chart .bars { flex: 1; width: 100%; display: flex; align-items: flex-end; justify-content: center; gap: 4px; }
.chart .bar { width: 16px; border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .bar.income { background: var(--accent); }
.chart .bar.expense { background: var(--line-strong); }
.chart .lbl { font-size: 12px; color: var(--muted); }
.legend { display: flex; gap: 16px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 6px; }

pre.codeblock { margin: 10px 0 0; padding: 14px 16px; border-radius: 8px; background: color-mix(in srgb, var(--ink) 5%, transparent); font: 12.5px/1.6 ui-monospace, "SF Mono", Menlo, Consolas, monospace; overflow-x: auto; white-space: pre; }
code { font: 13px ui-monospace, "SF Mono", Menlo, Consolas, monospace; background: color-mix(in srgb, var(--ink) 6%, transparent); padding: 1px 5px; border-radius: 4px; }
.token-box { display: flex; gap: 8px; margin-top: 10px; }
.token-box input { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }

.tabs { display: flex; gap: 22px; border-bottom: 1px solid var(--line); margin-bottom: 26px; }
.tabs a { padding: 0 0 10px; color: var(--muted); margin-bottom: -1px; border-bottom: 2px solid transparent; }
.tabs a.active { color: var(--ink); border-color: var(--ink); }

/* ---------- Halaman masuk ---------- */

.auth { min-height: 100vh; display: grid; place-items: center; padding: 32px 20px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box.wide { max-width: 440px; }
.auth-brand { font-family: var(--serif); font-size: 34px; text-align: center; letter-spacing: -0.02em; }
.auth-tag { text-align: center; color: var(--muted); margin: 6px 0 30px; }
.auth-box .card { padding: 28px; }
.auth-box .field + .field { margin-top: 16px; }
.auth-box .btn { width: 100%; height: 42px; margin-top: 22px; font-size: 15px; }

.stack > * + * { margin-top: 16px; }

/* ---------- Layar kecil ---------- */

.menu-toggle { display: none; }

@media (max-width: 880px) {
  .shell, html.sb-collapsed .shell { display: block; }
  .sidebar { position: fixed; inset: 0 auto 0 0; width: 264px; transform: translateX(-100%); transition: transform .22s cubic-bezier(.4, 0, .2, 1); box-shadow: none; }
  html.sb-open .sidebar { transform: none; box-shadow: 8px 0 30px rgba(0,0,0,.25); }
  html.sb-open .scrim { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(10, 20, 15, .45); animation: fade .2s ease both; }
  /* di layar kecil panel selalu tampil penuh saat dibuka */
  html.sb-collapsed .brand-text, html.sb-collapsed .me-text { display: flex; }
  html.sb-collapsed .nav a span, html.sb-collapsed .foot-links span { display: inline; }
  html.sb-collapsed .nav-label { font-size: 10.5px; padding: 0 12px; margin: 16px 0 6px; height: auto; background: none; }
  html.sb-collapsed .nav a, html.sb-collapsed .foot-links a, html.sb-collapsed .foot-links button { justify-content: flex-start; padding: 0 12px; }
  html.sb-collapsed .brand, html.sb-collapsed .me { justify-content: flex-start; padding: 0 6px; }
  .topbar { padding: 0 16px; }
  .page { padding: 22px 18px 60px; }
  h1 { font-size: 25px; }
  .fields, .fields.three, .doc-meta, .two-col, .report-list, .dl { grid-template-columns: 1fr; }
  .two-col { gap: 0; }
  .doc, .statement { padding: 26px 20px; }
  .search { width: 100%; }
  .rows { min-width: 620px; }
}
/* ---------- Cetak ---------- */

@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --muted: #444; --line: #ccc; --line-strong: #999; --accent: #000; }
  body { font-size: 12px; }
  .sidebar, .topbar, .scrim, .no-print, .flash, .report-bar, .page-head { display: none !important; }
  .shell { display: block; }
  .page { padding: 0; animation: none; }
  .content { max-width: none; }
  .card { border: 0; }
  .doc, .statement { padding: 0; }
}

.two-col > table { align-self: start; }

/* ---------- Tambahan: produk, aset, bank, peran ---------- */
.rows select.mini { height: 30px; font-size: 13px; margin-bottom: 6px; color: var(--muted); }
.badge.in { background: var(--accent-soft); color: var(--accent); }
.badge.out { background: var(--danger-soft); color: var(--danger); }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inline-form select, .inline-form input { height: 32px; font-size: 13.5px; width: auto; min-width: 150px; }
details.more > summary { cursor: pointer; color: var(--muted); font-size: 13px; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary:hover { color: var(--ink); }
details.more[open] > summary { margin-bottom: 10px; }
.role-note { font-size: 12.5px; color: var(--muted); }
.suggest { background: var(--accent-soft); border-radius: 8px; padding: 8px 10px; font-size: 13px; margin-bottom: 8px; }
.progress { height: 6px; border-radius: 999px; background: color-mix(in srgb, var(--ink) 8%, transparent); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--accent); }
.map-grid { display: grid; grid-template-columns: 200px 1fr; gap: 14px 18px; align-items: center; }
.map-grid label { margin: 0; }
tr.dim td { opacity: .45; }

/* ---------- Tema & interaksi (ringan: hanya transform/opacity) ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(6px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes grow { from { transform: scaleY(0); } }
@keyframes slide { from { transform: scaleX(0); } }

h1 { position: relative; }
.page-head h1::after { content: ""; display: block; width: 34px; height: 3px; border-radius: 3px; background: var(--brass); margin-top: 10px; }

.btn { transition: background .15s, border-color .15s, transform .12s, box-shadow .15s, opacity .15s; }
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0) scale(.97); box-shadow: none; }
.btn.primary { background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 88%, #fff), var(--accent)); }
.btn.primary:hover { opacity: 1; filter: brightness(1.08); }
.btn .ico { width: 17px; height: 17px; }
.btn.quiet:hover { box-shadow: none; transform: none; }

.card, .stat, .report-list a { transition: transform .18s, box-shadow .18s, border-color .18s; }
.stat:hover, .report-list a:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-strong); }

.stat { position: relative; overflow: hidden; }
.stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--tone, var(--accent)); opacity: .85; }
.stat-ico { position: absolute; right: 16px; top: 16px; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; color: var(--tone, var(--accent)); background: var(--tone-soft, var(--accent-soft)); transition: transform .2s; }
.stat:hover .stat-ico { transform: rotate(-6deg) scale(1.08); }
.tone-green { --tone: var(--accent); --tone-soft: var(--accent-soft); }
.tone-slate { --tone: var(--slate); --tone-soft: var(--slate-soft); }
.tone-brass { --tone: var(--brass); --tone-soft: var(--brass-soft); }
.tone-plum  { --tone: var(--plum);  --tone-soft: var(--plum-soft); }

.report-list a { display: flex; gap: 16px; align-items: flex-start; }
.report-list .r-ico { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: var(--tone); background: var(--tone-soft); transition: transform .2s; }
.report-list a:hover .r-ico { transform: scale(1.1) rotate(-5deg); }
.report-list h3 { font-size: 17px; }

tr[data-href], tr.link { cursor: pointer; }
tr[data-href]:hover td, tr.link:hover td { background: color-mix(in srgb, var(--brass) 7%, transparent); }
tr[data-href]:hover td:first-child, tr.link:hover td:first-child { box-shadow: inset 3px 0 0 var(--brass); }
tbody tr td { transition: background .12s; }

.pills a { transition: background .15s, color .15s; }
.pills a:hover { background: color-mix(in srgb, var(--ink) 6%, transparent); }
.pills a.active:hover { background: var(--ink); }
.tabs a { transition: color .15s, border-color .15s; }
.tabs a:hover { border-color: var(--line-strong); }
.tabs a.active:hover { border-color: var(--ink); }

.chart .bar { transform-origin: bottom; animation: grow .7s cubic-bezier(.2, .8, .2, 1) both; transition: filter .15s; }
.chart .col:nth-child(2) .bar { animation-delay: .05s; } .chart .col:nth-child(3) .bar { animation-delay: .1s; }
.chart .col:nth-child(4) .bar { animation-delay: .15s; } .chart .col:nth-child(5) .bar { animation-delay: .2s; }
.chart .col:nth-child(6) .bar { animation-delay: .25s; }
.chart .col:hover .bar { filter: brightness(1.12); }
.chart .col:hover .lbl { color: var(--ink); }
.progress > i { transform-origin: left; animation: slide .8s cubic-bezier(.2, .8, .2, 1) both; }

.empty::before { content: ""; display: block; width: 44px; height: 3px; border-radius: 3px; margin: 0 auto 18px; background: var(--brass); }
.badge { transition: transform .15s; }
tr:hover .badge { transform: scale(1.04); }
.flash { animation: rise .25s ease both; }
.suggest { transition: background .15s; }
.suggest:hover { background: color-mix(in srgb, var(--accent) 14%, var(--accent-soft)); }

/* Halaman masuk */
.auth { background: radial-gradient(900px 420px at 50% -10%, color-mix(in srgb, var(--accent) 12%, transparent), transparent 70%); }
.auth-box { animation: rise .35s ease both; }
.auth-brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.auth-brand .logo { width: 44px; height: 44px; font-size: 26px; border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
.stat-value { margin-top: 10px; }
.stat-label { padding-right: 46px; }

/* Logo usaha */
.logo.has-img { background: #fff; padding: 3px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.3); }
.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 7px; display: block; }
.logo-lg { width: 72px; height: 72px; font-size: 40px; border-radius: 18px; }
.logo-lg.has-img { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong); }
.logo-row { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.logo-card input:focus-visible + * , label.btn:has(+ input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.doc-company { display: flex; flex-direction: column; align-items: flex-end; text-align: right; gap: 6px; }
.doc-logo { max-height: 64px; max-width: 200px; object-fit: contain; }

/* QRIS */
.qris-preview { width: 96px; height: 96px; border-radius: 14px; display: grid; place-items: center; color: var(--faint); background: var(--surface); border: 1px dashed var(--line-strong); overflow: hidden; }
.qris-preview .ico { width: 34px; height: 34px; }
.qris-preview.has-img { border-style: solid; background: #fff; padding: 4px; }
.qris-preview img { width: 100%; height: 100%; object-fit: contain; }
.qris-box { display: flex; align-items: center; gap: 20px; margin-top: 30px; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--accent-soft); break-inside: avoid; }
.qris-box img { width: 150px; height: 150px; object-fit: contain; background: #fff; border-radius: 10px; padding: 6px; flex: none; }
.qris-box p { margin-top: 4px; max-width: 360px; }
@media (max-width: 880px) { .qris-box { flex-direction: column; align-items: flex-start; } }

/* Identitas perusahaan di menu samping */
.brand-name { font-size: 17px; line-height: 1.25; white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-word; }
.auth-brand { font-size: 28px; line-height: 1.2; text-align: left; }
