/* ==========================================================================
   Aplikasi Pembukuan CV.BERDIKARI - gaya antarmuka (rapat, modern)
   ========================================================================== */
:root {
  color-scheme: light;
  --bg: #f3f5f9; --surface: #ffffff; --surface-2: #f8fafc; --surface-3: #eef2f7;
  --border: #e2e8f0; --border-strong: #cbd5e1;
  --text: #0f172a; --text-2: #475569; --muted: #64748b;
  --primary: #2563eb; --primary-h: #1d4ed8; --primary-weak: #eff6ff; --primary-ink: #ffffff;
  --ok: #15803d; --ok-bg: #dcfce7; --warn: #b45309; --warn-bg: #fef3c7; --bad: #b91c1c; --bad-bg: #fee2e2; --info: #0369a1; --info-bg: #e0f2fe;
  --sb-bg: #0f172a; --sb-text: #cbd5e1; --sb-muted: #64748b; --sb-active: rgba(255,255,255,.09); --sb-hover: rgba(255,255,255,.05);
  --series-1: #2a78d6; --series-2: #eb6834; --grid: #e8edf3;
  --shadow: 0 1px 2px rgba(15,23,42,.06), 0 1px 1px rgba(15,23,42,.04);
  --shadow-lg: 0 12px 32px rgba(15,23,42,.18), 0 2px 6px rgba(15,23,42,.08);
  --r: 8px; --r-sm: 6px;
  --sb: 212px;
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) {
    color-scheme: dark;
    --bg: #0b1220; --surface: #111a2c; --surface-2: #15203a; --surface-3: #1a2745;
    --border: #23304d; --border-strong: #334262;
    --text: #e6ebf5; --text-2: #aab6cc; --muted: #8a97b0;
    --primary: #4d8bff; --primary-h: #6b9fff; --primary-weak: #172a52; --primary-ink: #06122b;
    --ok: #4ade80; --ok-bg: #0f3a22; --warn: #fbbf24; --warn-bg: #3d2d08; --bad: #f87171; --bad-bg: #431a1a; --info: #38bdf8; --info-bg: #0c3350;
    --sb-bg: #0a1020; --sb-text: #b6c2d9; --sb-muted: #6b7a96;
    --series-1: #3987e5; --series-2: #d95926; --grid: #1e2a45;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0b1220; --surface: #111a2c; --surface-2: #15203a; --surface-3: #1a2745;
  --border: #23304d; --border-strong: #334262;
  --text: #e6ebf5; --text-2: #aab6cc; --muted: #8a97b0;
  --primary: #4d8bff; --primary-h: #6b9fff; --primary-weak: #172a52; --primary-ink: #06122b;
  --ok: #4ade80; --ok-bg: #0f3a22; --warn: #fbbf24; --warn-bg: #3d2d08; --bad: #f87171; --bad-bg: #431a1a; --info: #38bdf8; --info-bg: #0c3350;
  --sb-bg: #0a1020; --sb-text: #b6c2d9; --sb-muted: #6b7a96;
  --series-1: #3987e5; --series-2: #d95926; --grid: #1e2a45;
  --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 12px 32px rgba(0,0,0,.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: var(--bg); color: var(--text);
  font: 13px/1.4 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -.005em; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
.ic { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }
.num, .tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--muted); } .t2 { color: var(--text-2); }
.b { font-weight: 600; } .nowrap { white-space: nowrap; }
.right { text-align: right; } .center { text-align: center; }
.pos { color: var(--ok); } .neg { color: var(--bad); }
.hidden { display: none !important; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------------------------------------------------------------- Login */
#login { min-height: 100vh; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(1200px 500px at 15% -10%, color-mix(in srgb, var(--primary) 22%, transparent), transparent), var(--bg); }
.login-card { width: 100%; max-width: 372px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 24px 22px 18px; }
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; background: linear-gradient(135deg, #2563eb, #1e40af); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 15px; letter-spacing: -.02em; flex: none; }
.login-card h1 { font-size: 18px; line-height: 1.15; }
.login-card .sub { color: var(--muted); font-size: 12px; }
.login-msg { margin-bottom: 10px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--warn-bg); color: var(--warn); font-size: 12px; display: flex; gap: 6px; align-items: flex-start; }
.login-note { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); font-size: 11.5px; color: var(--muted); display: flex; gap: 6px; }

/* ------------------------------------------------------------ Kerangka */
.app { display: grid; grid-template-columns: var(--sb) minmax(0, 1fr); grid-template-rows: 44px minmax(0, 1fr); height: 100vh; }
.app.sb-mini { --sb: 54px; }
.topbar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: var(--surface); border-bottom: 1px solid var(--border); z-index: 20; }
.topbar .brand { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; letter-spacing: -.01em; }
.topbar .brand .logo-mark { width: 26px; height: 26px; border-radius: 7px; font-size: 11px; }
.topbar .brand small { font-weight: 500; color: var(--muted); font-size: 11.5px; margin-left: 2px; }
.tb-spacer { flex: 1; }
.tb-date { color: var(--text-2); font-size: 12px; display: flex; gap: 5px; align-items: center; }
.user-chip { display: flex; align-items: center; gap: 7px; padding: 3px 9px 3px 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface-2); }
.avatar { width: 24px; height: 24px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-size: 11px; font-weight: 700; }
.user-chip .who { line-height: 1.1; } .user-chip .who b { display: block; font-size: 12px; } .user-chip .who span { font-size: 10.5px; color: var(--muted); text-transform: capitalize; }

.sidebar { background: var(--sb-bg); color: var(--sb-text); overflow-y: auto; overflow-x: hidden; padding: 6px 6px 12px; scrollbar-width: thin; scrollbar-color: #334155 transparent; }
.sb-group { margin-top: 8px; }
.sb-title { font-size: 10px; text-transform: uppercase; letter-spacing: .08em; color: var(--sb-muted); padding: 4px 8px 3px; white-space: nowrap; }
.sb-item { display: flex; align-items: center; gap: 9px; padding: 6px 8px; border-radius: 6px; color: var(--sb-text); cursor: pointer; white-space: nowrap; font-size: 12.5px; text-decoration: none !important; position: relative; }
.sb-item:hover { background: var(--sb-hover); color: #fff; }
.sb-item.active { background: var(--sb-active); color: #fff; font-weight: 600; }
.sb-item.active::before { content: ""; position: absolute; left: -6px; top: 6px; bottom: 6px; width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa; }
.sb-item .ic { width: 16px; height: 16px; opacity: .9; }
.sb-mini .sb-title { visibility: hidden; height: 6px; padding: 0; }
.sb-mini .sb-item span { display: none; }
.sb-mini .sb-item { justify-content: center; }

.main { overflow: auto; padding: 12px 14px 24px; min-width: 0; }
.page { max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 10px; margin-bottom: 9px; flex-wrap: wrap; }
.page-head h1 { font-size: 17px; line-height: 1.2; }
.page-head .sub { color: var(--muted); font-size: 12px; margin-top: 1px; }
.page-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

/* ------------------------------------------------------------ Komponen */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 10px 12px; box-shadow: var(--shadow); }
.card.flush { padding: 0; overflow: hidden; }
.card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-weight: 600; font-size: 12.5px; margin-bottom: 7px; }
.card-title .muted { font-weight: 400; font-size: 11.5px; }
.grid { display: grid; gap: 8px; }
.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)); } .g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); } .g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } .g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .span4 { grid-column: 1 / -1; }
.row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.row.tight { gap: 5px; } .grow { flex: 1; min-width: 0; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.mt { margin-top: 8px; } .mb { margin-bottom: 8px; }
.sep { height: 1px; background: var(--border); margin: 8px 0; border: 0; }

.kpi { display: flex; gap: 10px; align-items: center; padding: 10px 12px; }
.kpi .ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.kpi .ico .ic { width: 18px; height: 18px; }
.kpi .lbl { font-size: 11.5px; color: var(--muted); }
.kpi .val { font-size: 19px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; font-variant-numeric: tabular-nums; white-space: nowrap; }
.kpi > div:last-child { min-width: 0; }
.kpi .val { overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 1560px) { .g5 .kpi .ico, .g6 .kpi .ico { display: none; } .g5 .kpi, .g6 .kpi { padding: 9px 11px; } .g5 .kpi .val, .g6 .kpi .val { font-size: 17px; } }
.kpi .sm { font-size: 11px; color: var(--muted); margin-top: 1px; }
.ico-blue { background: var(--info-bg); color: var(--info); } .ico-green { background: var(--ok-bg); color: var(--ok); }
.ico-amber { background: var(--warn-bg); color: var(--warn); } .ico-red { background: var(--bad-bg); color: var(--bad); } .ico-slate { background: var(--surface-3); color: var(--text-2); }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 30px; padding: 0 11px; border-radius: var(--r-sm); border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); cursor: pointer; font-weight: 500; white-space: nowrap; transition: background .12s, border-color .12s, box-shadow .12s; }
.btn:hover { background: var(--surface-3); }
.btn:focus-visible, .inp:focus-visible, .sb-item:focus-visible { outline: 2px solid var(--primary); outline-offset: 1px; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.btn-primary:hover { background: var(--primary-h); border-color: var(--primary-h); }
.btn-danger { background: var(--bad); border-color: var(--bad); color: #fff; } .btn-danger:hover { filter: brightness(.92); background: var(--bad); }
.btn-ghost { border-color: transparent; background: transparent; } .btn-ghost:hover { background: var(--surface-3); }
.btn-sm { height: 26px; padding: 0 8px; font-size: 12px; gap: 4px; } .btn-sm .ic { width: 14px; height: 14px; }
.btn-icon { width: 26px; height: 26px; padding: 0; }
.btn[disabled], .btn.loading { opacity: .6; pointer-events: none; }
.btn.loading::after { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.act-del:hover { color: var(--bad); } .act-ok:hover { color: var(--ok); }

/* Form */
.fld { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fld > label, .lbl { font-size: 11.5px; color: var(--text-2); font-weight: 500; }
.fld > label .req { color: var(--bad); }
.fld .hint { font-size: 11px; color: var(--muted); }
.inp { height: 30px; width: 100%; padding: 0 9px; border: 1px solid var(--border-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); font: inherit; min-width: 0; }
textarea.inp { height: auto; padding: 6px 9px; resize: vertical; min-height: 52px; }
select.inp { padding-right: 4px; }
.inp:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 20%, transparent); }
.inp[readonly] { background: var(--surface-2); }
.inp.err { border-color: var(--bad); }
.inp.sm { height: 26px; font-size: 12px; padding: 0 6px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 15px; height: 15px; margin: 0; }
.chk { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-size: 12.5px; }
.input-icon { position: relative; } .input-icon .ic { position: absolute; left: 8px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.input-icon .inp { padding-left: 27px; }

/* Badge */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; line-height: 1.5; }
.b-green { background: var(--ok-bg); color: var(--ok); } .b-amber { background: var(--warn-bg); color: var(--warn); }
.b-red { background: var(--bad-bg); color: var(--bad); } .b-blue { background: var(--info-bg); color: var(--info); } .b-gray { background: var(--surface-3); color: var(--text-2); }

/* Tabel */
.tbl-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.tbl-bar { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tbl-bar .search { width: 230px; }
.tbl-info { color: var(--muted); font-size: 11.5px; }
.tbl-scroll { overflow: auto; max-height: calc(100vh - 230px); }
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); text-align: left; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); padding: 6px 9px; border-bottom: 1px solid var(--border-strong); white-space: nowrap; user-select: none; }
.tbl th.sortable { cursor: pointer; } .tbl th.sortable:hover { color: var(--text); }
.tbl th .sort { opacity: .5; margin-left: 2px; font-size: 9px; }
.tbl td.nm { min-width: 130px; }
.nw, .tbl td.mono { white-space: nowrap; }
.tbl td { padding: 5px 9px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tbody tr.clickable { cursor: pointer; }
.tbl tbody tr.batal td { color: var(--muted); text-decoration: line-through; }
.tbl tbody tr.batal td .badge, .tbl tbody tr.batal td .acts { text-decoration: none; }
.tbl tfoot td { font-weight: 700; background: var(--surface-2); border-top: 1px solid var(--border-strong); padding: 6px 9px; }
.tbl td.acts { text-align: right; white-space: nowrap; width: 1%; position: sticky; right: 0; z-index: 1; background: var(--surface); box-shadow: -6px 0 6px -6px rgba(0, 0, 0, .18); }
.tbl th.acts { position: sticky; right: 0; top: 0; z-index: 2; box-shadow: -6px 0 6px -6px rgba(0, 0, 0, .18); }
.tbl tbody tr:hover td.acts { background: var(--surface-2); }
.tbl tbody tr.batal td.acts { background: var(--surface); }
.tbl.compact td, .tbl.compact th { padding: 3px 7px; }
.tbl .grp td { background: var(--surface-3); font-weight: 700; font-size: 11.5px; }
.tbl .sub td { font-weight: 600; background: var(--surface-2); }
.tbl .tot td { font-weight: 700; border-top: 1px solid var(--text-2); background: var(--surface-2); }
.tbl .gtot td { font-weight: 800; border-top: 2px solid var(--text); border-bottom: 2px solid var(--text); background: var(--surface-3); }
.tbl .ind1 td:first-child { padding-left: 22px; } .tbl .ind2 td:first-child { padding-left: 36px; }
.tbl-foot { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); gap: 8px; flex-wrap: wrap; }
.pager { display: flex; gap: 3px; align-items: center; }
.pager button { min-width: 26px; height: 24px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; cursor: pointer; font-size: 12px; }
.pager button:hover:not([disabled]) { background: var(--surface-3); }
.pager button.on { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.pager button[disabled] { opacity: .4; cursor: default; }
.empty { padding: 26px 12px; text-align: center; color: var(--muted); }
.empty .ic { width: 28px; height: 28px; opacity: .5; display: block; margin: 0 auto 6px; }

/* Tab & filter */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 9px; overflow-x: auto; }
.tab { padding: 7px 12px; cursor: pointer; border-bottom: 2px solid transparent; color: var(--text-2); font-weight: 500; white-space: nowrap; margin-bottom: -1px; background: none; border-top: 0; border-left: 0; border-right: 0; }
.tab:hover { color: var(--text); } .tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.filters { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 9px; }
.filters .fld { min-width: 120px; } .filters .fld.w-lg { min-width: 190px; } .filters .fld.w-sm { min-width: 90px; }
.seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: var(--r-sm); overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 0 10px; height: 28px; cursor: pointer; font-size: 12px; border-right: 1px solid var(--border); }
.seg button:last-child { border-right: 0; } .seg button.on { background: var(--primary); color: var(--primary-ink); font-weight: 600; }

/* Info & peringatan inline */
.note { display: flex; gap: 8px; padding: 7px 10px; border-radius: var(--r-sm); font-size: 12px; align-items: flex-start; line-height: 1.4; }
.note .ic { margin-top: 1px; }
.note-info { background: var(--info-bg); color: var(--info); } .note-warn { background: var(--warn-bg); color: var(--warn); }
.note-bad { background: var(--bad-bg); color: var(--bad); } .note-ok { background: var(--ok-bg); color: var(--ok); }
.note b { font-weight: 700; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 2px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.summary { display: grid; gap: 3px; font-size: 12.5px; }
.summary .r { display: flex; justify-content: space-between; gap: 14px; }
.summary .r.t { border-top: 1px solid var(--border-strong); padding-top: 4px; margin-top: 2px; font-weight: 700; font-size: 13.5px; }
.summary .r span:last-child { font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- Modal */
.overlay { position: fixed; inset: 0; background: rgba(2, 6, 23, .5); backdrop-filter: blur(2px); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 12px 12px; overflow: auto; animation: fade .14s ease-out; }
.modal { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--shadow-lg); width: 100%; max-width: 560px; display: flex; flex-direction: column; max-height: 92vh; animation: pop .16s cubic-bezier(.2, .9, .3, 1.15); }
.modal.sm { max-width: 400px; } .modal.md { max-width: 640px; } .modal.lg { max-width: 860px; } .modal.xl { max-width: 1120px; } .modal.xxl { max-width: 1300px; }
.modal-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
.modal-h h3 { font-size: 14.5px; } .modal-h .sub { font-size: 11.5px; color: var(--muted); font-weight: 400; }
.modal-b { padding: 12px 14px; overflow: auto; min-height: 0; }
.modal-f { display: flex; justify-content: flex-end; gap: 6px; padding: 9px 14px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 12px 12px; align-items: center; }
.modal-f .lft { margin-right: auto; }
.form-err { margin-bottom: 8px; }
.confirm-ico { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 8px; }
.confirm-ico .ic { width: 20px; height: 20px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }

/* ------------------------------------------------------------- Toast */
#toasts { position: fixed; top: 52px; right: 14px; z-index: 300; display: flex; flex-direction: column; gap: 8px; width: 340px; max-width: calc(100vw - 24px); pointer-events: none; }
.toast { pointer-events: auto; position: relative; display: flex; gap: 10px; padding: 10px 30px 12px 10px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); overflow: hidden; animation: tin .28s cubic-bezier(.2, .9, .3, 1.1); }
.toast.out { animation: tout .22s ease-in forwards; }
.toast .t-ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.toast .t-ic .ic { width: 16px; height: 16px; stroke-width: 2.2; }
.toast .t-b { min-width: 0; } .toast .t-t { font-weight: 700; font-size: 13px; line-height: 1.25; } .toast .t-m { color: var(--text-2); font-size: 12px; margin-top: 1px; word-break: break-word; }
.toast .t-x { position: absolute; top: 6px; right: 6px; border: 0; background: transparent; color: var(--muted); cursor: pointer; width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; }
.toast .t-x:hover { background: var(--surface-3); color: var(--text); }
.toast .t-bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; transform-origin: left; animation: tbar linear forwards; }
.toast:hover .t-bar { animation-play-state: paused; }
.toast.sukses .t-ic { background: var(--ok-bg); color: var(--ok); } .toast.sukses .t-bar { background: var(--ok); } .toast.sukses { border-left: 3px solid var(--ok); }
.toast.ubah .t-ic { background: var(--info-bg); color: var(--info); } .toast.ubah .t-bar { background: var(--info); } .toast.ubah { border-left: 3px solid var(--info); }
.toast.batal .t-ic { background: var(--warn-bg); color: var(--warn); } .toast.batal .t-bar { background: var(--warn); } .toast.batal { border-left: 3px solid var(--warn); }
.toast.galat .t-ic { background: var(--bad-bg); color: var(--bad); } .toast.galat .t-bar { background: var(--bad); } .toast.galat { border-left: 3px solid var(--bad); }
@keyframes tin { from { opacity: 0; transform: translateX(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tout { to { opacity: 0; transform: translateX(24px); } }
@keyframes tbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }

/* ------------------------------------------------------ Date picker */
.dp { position: relative; display: block; }
.dp .inp { padding-right: 28px; cursor: pointer; }
.dp .dp-btn { position: absolute; right: 1px; top: 1px; height: calc(100% - 2px); width: 26px; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; border-radius: 0 5px 5px 0; }
.dp-pop { position: fixed; z-index: 400; width: 252px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 8px; animation: fade .1s; }
.dp-head { display: flex; gap: 4px; align-items: center; margin-bottom: 6px; }
.dp-head select { height: 26px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface); color: var(--text); font: inherit; font-size: 12px; padding: 0 2px; }
.dp-head .dp-m { flex: 1; } .dp-head .dp-y { width: 66px; }
.dp-nav { width: 26px; height: 26px; border: 1px solid var(--border); background: var(--surface); border-radius: 5px; cursor: pointer; display: grid; place-items: center; color: var(--text); }
.dp-nav:hover { background: var(--surface-3); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.dp-dow { font-size: 10.5px; color: var(--muted); text-align: center; padding: 2px 0 3px; font-weight: 600; }
.dp-d { height: 28px; border: 0; background: transparent; border-radius: 6px; cursor: pointer; font-size: 12px; color: var(--text); font-variant-numeric: tabular-nums; }
.dp-d:hover { background: var(--surface-3); } .dp-d.out { color: var(--muted); opacity: .55; }
.dp-d.today { box-shadow: inset 0 0 0 1px var(--primary); } .dp-d.sel { background: var(--primary); color: var(--primary-ink); font-weight: 700; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border); }

/* ------------------------------------------------------------ Combo */
.combo { position: relative; }
.combo .inp { padding-right: 22px; }
.combo::after { content: ""; position: absolute; right: 8px; top: 50%; width: 5px; height: 5px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.combo-list { position: fixed; z-index: 410; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-lg); max-height: 240px; overflow: auto; min-width: 200px; padding: 3px; }
.combo-opt { padding: 5px 8px; border-radius: 5px; cursor: pointer; display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; }
.combo-opt small { color: var(--muted); white-space: nowrap; }
.combo-opt.on, .combo-opt:hover { background: var(--primary-weak); }
.combo-empty { padding: 8px; color: var(--muted); font-size: 12px; }

/* ---------------------------------------------- Editor dokumen */
.lines { width: 100%; border-collapse: collapse; }
.lines th { font-size: 10.5px; text-transform: uppercase; letter-spacing: .03em; color: var(--text-2); font-weight: 600; text-align: left; padding: 4px 4px; background: var(--surface-2); border-bottom: 1px solid var(--border-strong); white-space: nowrap; }
.lines td { padding: 3px 3px; vertical-align: middle; border-bottom: 1px solid var(--border); }
.lines .inp { height: 27px; font-size: 12.5px; padding: 0 6px; }
.lines td.n { width: 24px; text-align: center; color: var(--muted); font-size: 11px; }
.lines td.amt { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 8px; }
.lines .inp.uang, .lines .inp.qty, .num-inp { text-align: right; font-variant-numeric: tabular-nums; }
.inp.uang, .inp.qty { text-align: right; font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ Chart */
.chart { width: 100%; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart .gl { stroke: var(--grid); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 10.5px; }
.chart .bar-1 { fill: var(--series-1); } .chart .bar-2 { fill: var(--series-2); }
.chart .hit { fill: transparent; cursor: default; } .chart .hit:hover { fill: color-mix(in srgb, var(--text) 5%, transparent); }
.legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--text-2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.tip { position: fixed; z-index: 500; pointer-events: none; background: var(--surface); border: 1px solid var(--border-strong); border-radius: 8px; box-shadow: var(--shadow-lg); padding: 6px 9px; font-size: 12px; min-width: 150px; }
.tip b { display: block; margin-bottom: 3px; } .tip .r { display: flex; justify-content: space-between; gap: 14px; }
.tip i { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 5px; }
.meter { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 4px; background: var(--primary); }

/* ------------------------------------------------- Laporan & cetak */
.report { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); padding: 12px 16px 16px; }
.report-head { text-align: center; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 2px solid var(--text); }
.report-head .co { font-size: 15px; font-weight: 700; letter-spacing: .02em; }
.report-head .ti { font-size: 14px; font-weight: 700; margin-top: 1px; }
.report-head .pr { font-size: 12px; color: var(--text-2); }
.doc-paper { background: #fff; color: #111; padding: 18px 22px; border: 1px solid var(--border); border-radius: 6px; font-size: 12px; }

.overlay-load { position: fixed; inset: 0; z-index: 600; background: rgba(2, 6, 23, .55); display: grid; place-items: center; color: #fff; }
.overlay-load .box { background: var(--surface); color: var(--text); padding: 18px 22px; border-radius: 12px; box-shadow: var(--shadow-lg); text-align: center; min-width: 260px; }
.spinner { width: 26px; height: 26px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--primary); animation: spin .8s linear infinite; margin: 0 auto 8px; }
.skeleton { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--surface-3), var(--surface-2), var(--surface-3)); background-size: 200% 100%; animation: sk 1.2s infinite; margin: 8px 0; }
@keyframes sk { from { background-position: 200% 0; } to { background-position: -200% 0; } }

@media (max-width: 1100px) { .g5, .g6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-2-1, .g-3-2 { grid-template-columns: 1fr; } }
.sidebar { grid-column: 1; } .main { grid-column: 2; }
@media (max-width: 800px) {
  .main { grid-column: 1 / -1; padding: 10px 10px 20px; }
  .topbar { gap: 6px; padding: 0 8px; } .topbar .brand { min-width: 0; } .topbar .brand small, .user-chip { display: none; }
  #brand-nama { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .app.sb-open::before { content: ''; position: fixed; inset: 44px 0 0 0; background: rgba(15, 23, 42, .45); z-index: 40; }
  .app { --sb: 0px; } .sidebar { position: fixed; top: 44px; bottom: 0; left: 0; width: 220px; transform: translateX(-100%); transition: transform .2s; z-index: 50; }
  .app.sb-open .sidebar { transform: none; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .g5, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span2, .span3 { grid-column: auto; }
  .tb-date, .user-chip .who { display: none; }
}
@media print { .no-print { display: none !important; } }

input[type=file].inp, input[type=file] { font: inherit; color: var(--text-2); }
input[type=file]::file-selector-button { font: inherit; font-weight: 600; margin-right: 8px; padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 6px; background: var(--surface); color: var(--text); cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--surface-2); }

/* ------------------------------------------------- Lampiran foto nota */
.lampiran-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 8px; }
.lampiran-thumb { position: relative; aspect-ratio: 1; border: 1px solid var(--border); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.lampiran-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lampiran-thumb .lampiran-lihat { display: block; width: 100%; height: 100%; border: none; padding: 0; margin: 0; background: none; cursor: pointer; }
.lampiran-hapus { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; border-radius: 50%; border: none; background: rgba(15, 23, 42, .62); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.lampiran-hapus:hover { background: var(--danger, #dc2626); }
.lampiran-hapus svg { width: 12px; height: 12px; }
.foto-besar { display: flex; justify-content: center; align-items: center; background: var(--surface-2); border-radius: var(--r-sm); }
.foto-besar img { max-width: 100%; max-height: 78vh; display: block; object-fit: contain; }

/* ===================== Catat Transaksi, Buku Harian, Pengingat, Impor Sistem Nota Berdikari ===================== */
.catat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 10px; }
.catat-kartu { display: flex; gap: 12px; align-items: center; text-align: left; padding: 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--shadow); cursor: pointer; color: var(--text); font: inherit; transition: border-color .12s, transform .12s, box-shadow .12s; }
.catat-kartu:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: var(--shadow-lg); }
.catat-kartu:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.catat-kartu .ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; flex: none; }
.catat-kartu .ico .ic { width: 22px; height: 22px; }
.catat-kartu b { display: block; font-size: 14.5px; }
.catat-kartu small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; line-height: 1.35; }
.ico { display: inline-grid; place-items: center; }
.seg-lebar { display: flex; width: 100%; } .seg-lebar button { flex: 1; height: 34px; font-size: 12.5px; }
.ppn-box { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 9px 10px; background: var(--surface-2); display: grid; gap: 8px; }
.ppn-box .summary { background: var(--surface); }
details.lain > summary { cursor: pointer; font-size: 12.5px; color: var(--primary); font-weight: 600; }
.hint a, .hint label { color: var(--primary); cursor: pointer; font-size: 11.5px; }
.uraian { color: var(--text-2); }
/* pengingat & lonceng */
.pengingat .card-title .ic { width: 15px; height: 15px; vertical-align: -3px; }
.nt-ring { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin-bottom: 8px; }
.nt-ring > div { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-sm); padding: 6px 9px; }
.nt-ring small { display: block; color: var(--muted); font-size: 11px; } .nt-ring b { font-size: 14px; font-variant-numeric: tabular-nums; }
.nt-list { display: grid; gap: 6px; }
.nt-item { display: flex; gap: 9px; align-items: flex-start; padding: 7px 9px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--text); text-decoration: none; border-left-width: 4px; }
.nt-item, .nt-item:hover, .nt-item * { text-decoration: none; } .nt-item:hover { background: var(--surface-2); }
.nt-item .ico { width: 26px; height: 26px; border-radius: 8px; flex: none; } .nt-item .ico .ic { width: 15px; height: 15px; }
.nt-item.nt-bad { border-left-color: var(--bad); } .nt-item.nt-warn { border-left-color: var(--warn); } .nt-item.nt-info { border-left-color: var(--info); }
.nt-b b { display: block; font-size: 12.5px; } .nt-b small { display: block; color: var(--text-2); font-size: 11.5px; line-height: 1.4; margin-top: 1px; }
#btn-notif { position: relative; }
.nt-badge { position: absolute; top: -3px; right: -4px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--bad); color: #fff; font-size: 10px; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.nt-panel { position: fixed; top: 46px; right: 10px; width: min(420px, calc(100vw - 20px)); max-height: calc(100vh - 62px); overflow: auto; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 10px; z-index: 60; }
.nt-panel[hidden] { display: none; }
.nt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
/* impor */
.aksi-bawah { position: sticky; bottom: 0; z-index: 5; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 10px; padding: 9px 12px; background: var(--surface); border: 1px solid var(--border-strong); border-radius: var(--r); box-shadow: var(--shadow-lg); }
.tbl input[type=checkbox], .chk input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--primary); cursor: pointer; }
@media (max-width: 800px) { .catat-kartu { padding: 12px; } .nt-panel { top: 44px; } }

/* =====================================================================
   TAMPILAN MODERN: huruf lebih besar, warna lebih hidup, sudut membulat
   ===================================================================== */
:root {
  --primary: #4f46e5; --primary-h: #4338ca; --primary-weak: #eef2ff;
  --bg: #f1f4fb; --border: #e3e8f2; --r: 12px; --r-sm: 9px; --sb: 232px;
  --shadow: 0 1px 2px rgba(30,41,90,.06), 0 4px 14px rgba(30,41,90,.05);
  --shadow-lg: 0 18px 44px rgba(30,41,90,.22), 0 3px 8px rgba(30,41,90,.08);
  --sb-bg: #111936; --sb-text: #c9d2ee; --sb-muted: #7f8bb3; --sb-active: rgba(129,140,248,.2);
  --grad: linear-gradient(135deg, #4f46e5 0%, #7c3aed 55%, #db2777 120%);
}
@media (prefers-color-scheme: dark) { :root:where(:not([data-theme="light"])) { --primary: #818cf8; --primary-h: #a5b4fc; --primary-ink: #0b1030; --bg: #0b1024; --sb-bg: #080c1c; --grad: linear-gradient(135deg, #6366f1, #a855f7 60%, #ec4899 120%); } }
:root[data-theme="dark"] { --primary: #818cf8; --primary-h: #a5b4fc; --primary-ink: #0b1030; --bg: #0b1024; --sb-bg: #080c1c; --grad: linear-gradient(135deg, #6366f1, #a855f7 60%, #ec4899 120%); }
body { font: 14.5px/1.5 "Plus Jakarta Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif; background: radial-gradient(900px 380px at 100% -5%, color-mix(in srgb, var(--primary) 9%, transparent), transparent), var(--bg); }
.app { grid-template-rows: 54px minmax(0, 1fr); }
.topbar { background: var(--surface); border-bottom: 0; box-shadow: 0 1px 0 var(--border), 0 6px 18px rgba(30,41,90,.05); position: relative; }
.topbar::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--grad); }
.topbar .brand { font-size: 16px; } .topbar .brand .logo-mark { width: 32px; height: 32px; font-size: 13px; border-radius: 10px; }
.logo-mark { background: var(--grad); box-shadow: 0 4px 12px rgba(79,70,229,.35); }
.tb-date { font-size: 13px; } .user-chip .who b { font-size: 13px; } .user-chip .who span { font-size: 11.5px; }
.avatar { width: 30px; height: 30px; background: var(--grad); color: #fff; font-size: 13px; }
/* sidebar */
.sidebar { background: linear-gradient(180deg, var(--sb-bg) 0%, color-mix(in srgb, var(--sb-bg) 82%, #4f46e5) 100%); padding: 10px 10px 16px; }
.sb-group { margin-top: 12px; }
.sb-title { font-size: 11px; letter-spacing: .1em; padding: 4px 10px 5px; font-weight: 700; }
.sb-item { font-size: 14px; padding: 8px 10px; border-radius: 10px; gap: 11px; transition: background .12s, transform .12s; }
.sb-item:hover { background: rgba(255,255,255,.08); transform: translateX(2px); }
.sb-item.active { background: linear-gradient(90deg, rgba(129,140,248,.34), rgba(129,140,248,.1)); box-shadow: inset 0 0 0 1px rgba(165,180,252,.25); }
.sb-item.active::before { background: #a5b4fc; left: -10px; width: 4px; }
.sb-item .ic { width: 19px; height: 19px; opacity: 1; stroke-width: 1.9; }
.sb-group:nth-child(1) .sb-item .ic { color: #a5b4fc; } .sb-group:nth-child(2) .sb-item .ic { color: #f9a8d4; } .sb-group:nth-child(3) .sb-item .ic { color: #86efac; }
.sb-group:nth-child(4) .sb-item .ic { color: #fcd34d; } .sb-group:nth-child(5) .sb-item .ic { color: #fdba74; } .sb-group:nth-child(6) .sb-item .ic { color: #7dd3fc; }
.sb-group:nth-child(7) .sb-item .ic { color: #c4b5fd; } .sb-group:nth-child(8) .sb-item .ic { color: #5eead4; } .sb-group:nth-child(9) .sb-item .ic { color: #fca5a5; }
.app.sb-mini { --sb: 62px; }
.main { padding: 18px 22px 32px; }
/* judul halaman */
.page-head { margin-bottom: 14px; } .page-head h1 { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.page-head .sub { font-size: 13.5px; margin-top: 3px; }
/* kartu */
.card { padding: 14px 16px; border-radius: var(--r); }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.card-title .muted { font-size: 12.5px; }
/* tombol & isian */
.btn { height: 38px; padding: 0 15px; font-size: 14px; border-radius: var(--r-sm); font-weight: 600; box-shadow: 0 1px 2px rgba(30,41,90,.05); }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--grad); border-color: transparent; color: #fff; box-shadow: 0 4px 14px rgba(79,70,229,.35); }
.btn-primary:hover { background: var(--grad); border-color: transparent; filter: brightness(1.08); }
.btn-ghost { box-shadow: none; } .btn-ghost:hover { transform: none; }
.btn-sm { height: 32px; padding: 0 11px; font-size: 13px; } .btn-sm .ic { width: 16px; height: 16px; }
.btn-icon { width: 36px; height: 36px; } .btn-icon.btn-sm { width: 32px; height: 32px; }
.btn-danger { box-shadow: 0 4px 12px rgba(185,28,28,.28); }
.ic { width: 18px; height: 18px; }
.inp { height: 38px; font-size: 14.5px; padding: 0 12px; border-radius: var(--r-sm); }
.inp.sm { height: 32px; font-size: 13.5px; } textarea.inp { font-size: 14.5px; }
.fld > label, .lbl { font-size: 13px; font-weight: 600; color: var(--text); } .fld .hint { font-size: 12.5px; }
.chk { font-size: 14px; } input[type=checkbox], input[type=radio] { width: 17px; height: 17px; }
.seg { border-radius: var(--r-sm); } .seg button { height: 36px; font-size: 13.5px; padding: 0 14px; font-weight: 600; }
.seg button.on { background: var(--grad); }
.filters { padding: 12px 14px; gap: 12px; }
.badge { font-size: 12px; padding: 2px 10px; font-weight: 700; }
.note { font-size: 13.5px; padding: 10px 13px; border-radius: var(--r-sm); }
/* tabel */
.tbl-wrap { border-radius: var(--r); }
.tbl-bar { padding: 10px 14px; } .tbl-info { font-size: 13px; }
.tbl-bar .search { width: 280px; }
.tbl th { font-size: 12px; padding: 10px 12px; background: color-mix(in srgb, var(--primary) 7%, var(--surface-2)); color: var(--text-2); letter-spacing: .04em; }
.tbl td { padding: 10px 12px; font-size: 14px; }
.tbl.compact td, .tbl.compact th { padding: 7px 10px; }
.tbl tbody tr:hover td { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.tbl tbody tr:nth-child(even) td { background: color-mix(in srgb, var(--primary) 2.5%, var(--surface)); }
.tbl tbody tr:nth-child(even):hover td { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.tbl td.acts, .tbl tbody tr:nth-child(even) td.acts { background: var(--surface); } .tbl tbody tr:hover td.acts { background: color-mix(in srgb, var(--primary) 6%, var(--surface)); }
.tbl tfoot td { font-size: 14px; padding: 10px 12px; }
.mono { font-size: 13px; } .pager button { height: 32px; min-width: 32px; font-size: 13px; }
/* KPI berwarna */
.kpi { padding: 14px 16px; gap: 13px; position: relative; overflow: hidden; border: 0; color: var(--text); }
.kpi::before { content: ""; position: absolute; inset: 0; opacity: .1; background: var(--kc, var(--primary)); }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kc, var(--primary)); }
.kpi > * { position: relative; }
.kpi .ico { width: 44px; height: 44px; border-radius: 13px; } .kpi .ico .ic { width: 22px; height: 22px; }
.kpi .lbl { font-size: 13px; font-weight: 600; } .kpi .val { font-size: 22px; font-weight: 800; } .kpi .sm { font-size: 12.5px; }
.grid > .kpi:nth-child(6n+1) { --kc: #3b82f6; } .grid > .kpi:nth-child(6n+2) { --kc: #10b981; } .grid > .kpi:nth-child(6n+3) { --kc: #8b5cf6; }
.grid > .kpi:nth-child(6n+4) { --kc: #f59e0b; } .grid > .kpi:nth-child(6n+5) { --kc: #64748b; } .grid > .kpi:nth-child(6n) { --kc: #ef4444; }
@media (max-width: 1700px) { .g5 .kpi .ico, .g6 .kpi .ico { display: none; } .g5 .kpi .val, .g6 .kpi .val { font-size: 19px; } .g6 .kpi { padding: 12px 13px; } }
.sb-item span { white-space: normal; line-height: 1.25; } .kpi .val { overflow: visible; text-overflow: clip; } .g6 .kpi .val { font-size: 17.5px; }
/* modal */
.modal { border-radius: 16px; } .modal-h { padding: 15px 20px; background: linear-gradient(180deg, color-mix(in srgb, var(--primary) 7%, var(--surface)), var(--surface)); }
.modal-h h3 { font-size: 17px; font-weight: 800; } .modal-h .sub { font-size: 13px; }
.modal-b { padding: 18px 20px; } .modal-f { padding: 13px 20px; gap: 9px; }
.toast .t-t { font-size: 14.5px; } .toast .t-m { font-size: 13.5px; }
.combo-opt { font-size: 14px; padding: 8px 12px; } .dp-pop { font-size: 14px; }
/* Catat Transaksi, pengingat */
.catat-kartu { padding: 18px; border-radius: 16px; border: 0; position: relative; overflow: hidden; color: var(--text); }
.catat-kartu::before { content: ""; position: absolute; inset: 0; opacity: .13; background: var(--kc); }
.catat-kartu::after { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 5px; background: var(--kc); }
.catat-kartu > * { position: relative; }
.catat-kartu:nth-child(1) { --kc: linear-gradient(135deg, #10b981, #059669); } .catat-kartu:nth-child(2) { --kc: linear-gradient(135deg, #f59e0b, #ea580c); }
.catat-kartu:nth-child(3) { --kc: linear-gradient(135deg, #3b82f6, #6366f1); } .catat-kartu:nth-child(4) { --kc: linear-gradient(135deg, #f43f5e, #db2777); }
.catat-kartu .ico { width: 54px; height: 54px; border-radius: 15px; } .catat-kartu .ico .ic { width: 27px; height: 27px; }
.catat-kartu b { font-size: 17px; font-weight: 800; } .catat-kartu small { font-size: 13.5px; }
.nt-b b { font-size: 14px; } .nt-b small { font-size: 13px; } .nt-ring small { font-size: 12.5px; } .nt-ring b { font-size: 16px; }
.nt-item .ico { width: 32px; height: 32px; } .nt-item .ico .ic { width: 18px; height: 18px; }
.ppn-box { padding: 12px; } .summary { font-size: 14px; } .summary .r.t { font-size: 15.5px; }
.seg-lebar button { height: 40px; font-size: 14px; }
.sb-title, .login-card .sub { font-size: 11.5px; }
@media (max-width: 800px) { .main { padding: 14px 12px 28px; } .page-head h1 { font-size: 21px; } .app { grid-template-rows: 52px minmax(0, 1fr); } }

.lampiran-nota.drop-aktif{outline:2px dashed var(--primary,#4f46e5);outline-offset:4px;border-radius:10px;background:rgba(79,70,229,.06)}

.pdf-thumb{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;width:100%;height:100%;min-height:84px;background:var(--surface-3,#f3f4f6);color:#dc2626;text-align:center;padding:6px}
.pdf-thumb svg{width:26px;height:26px}.pdf-thumb b{font-size:13px}.pdf-thumb small{font-size:10px;color:var(--text-2,#6b7280);word-break:break-all;line-height:1.2}

/* ===== Akun unggah foto (Ainul) & halaman Transaksi Ainul ===== */
.ainul-app .main{padding:18px 16px;max-width:560px;margin:0 auto;display:block}
.ainul-wrap{display:flex;flex-direction:column;gap:16px}
.ainul-sapa h1{font-size:24px;margin:4px 0}.ainul-sapa p{color:var(--text-2,#6b7280);margin:0;font-size:15px}
.ainul-btn{display:flex;align-items:center;gap:16px;width:100%;min-height:118px;padding:20px;border:0;border-radius:18px;color:#fff;text-align:left;cursor:pointer;box-shadow:0 8px 22px rgba(0,0,0,.18);font-family:inherit}
.ainul-btn:active{transform:scale(.98)}
.ainul-btn svg{width:44px;height:44px;flex:none}
.ainul-btn b{display:block;font-size:21px;line-height:1.2}.ainul-btn small{display:block;font-size:14px;opacity:.9;margin-top:4px}
.ainul-btn.a1{background:linear-gradient(135deg,#2563eb,#4f46e5)}.ainul-btn.a2{background:linear-gradient(135deg,#059669,#0d9488)}
.ainul-terkirim .lbl{margin:6px 0}.ain-kirim{display:flex;gap:8px;align-items:flex-start;padding:8px 10px;border-radius:10px;background:var(--surface-3,#f3f4f6);margin-bottom:6px;font-size:14px}
.ain-kirim svg{width:18px;height:18px;color:#059669;flex:none;margin-top:2px}
.ain-prev{background:#111;border-radius:12px;overflow:hidden;text-align:center}.ain-prev img{max-width:100%;max-height:48vh;display:block;margin:0 auto}
.ain-tgl{display:flex;justify-content:space-between;align-items:center;gap:8px;margin:22px 0 10px;padding:9px 14px;border-radius:10px;background:linear-gradient(90deg,rgba(79,70,229,.14),rgba(79,70,229,.03));border-left:4px solid #4f46e5;font-weight:700}
.ain-tgl span{display:flex;align-items:center;gap:8px}.ain-tgl svg{width:16px;height:16px}.ain-tgl em{font-style:normal;font-weight:500;font-size:12.5px;color:var(--text-2,#6b7280)}
.ain-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:14px}
.ain-card{border:1px solid var(--border,#e5e7eb);border-radius:14px;background:var(--surface,#fff);overflow:hidden;display:flex;flex-direction:column}
.ain-foto{border:0;padding:0;background:#111;cursor:zoom-in;display:block;aspect-ratio:3/4}.ain-foto img{width:100%;height:100%;object-fit:contain;display:block}
.ain-meta{display:flex;justify-content:space-between;align-items:center;gap:6px;padding:8px 10px 0}.ain-meta small{color:var(--text-2,#6b7280)}
.ain-badge{font-size:11.5px;font-weight:700;padding:2px 9px;border-radius:99px;color:#fff}.ain-badge.nota_pembelian{background:#4f46e5}.ain-badge.pencairan{background:#059669}
.ain-ket{padding:6px 10px;font-size:13.5px;flex:1}.ain-aksi{display:flex;gap:6px;padding:0 10px 10px}

.ainul-btn.a3{background:linear-gradient(135deg,#d97706,#ea580c)}.ainul-btn.kecil{min-height:88px;padding:14px 16px}.ainul-btn.kecil b{font-size:18px}.ainul-btn.kecil svg{width:36px;height:36px}
.ain-rtgl{margin:12px 0 6px;font-weight:700;font-size:13px;color:var(--text-2,#6b7280)}
.ain-r{display:flex;gap:10px;align-items:center;width:100%;text-align:left;border:1px solid var(--border,#e5e7eb);background:var(--surface,#fff);border-radius:12px;padding:8px;margin-bottom:8px;cursor:pointer;font-family:inherit;color:inherit}
.ain-r img{width:64px;height:64px;object-fit:cover;border-radius:8px;flex:none;background:#111}.ain-rket{font-size:14px;word-break:break-word}.ain-r small{color:var(--text-2,#6b7280)}
.ain-ukuran{padding:2px 10px 0;font-size:12px;color:var(--text-2,#6b7280)}

/* logo gambar */
.logo-mark{background:#fff!important;padding:3px;box-shadow:0 2px 8px rgba(0,0,0,.18)!important;overflow:hidden}
.logo-mark img{width:100%;height:100%;object-fit:contain;display:block}
.login-logo .logo-mark{width:54px;height:54px;border-radius:12px}
/* riwayat thumbnail kecil */
.ain-rgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(68px,1fr));gap:6px}
.ain-t{position:relative;padding:0;border:2px solid transparent;border-radius:8px;overflow:hidden;background:#111;cursor:pointer;aspect-ratio:1/1}
.ain-t.nota_pembelian{border-color:#4f46e5}.ain-t.pencairan{border-color:#059669}
.ain-t img{width:100%;height:100%;object-fit:cover;display:block}
.ain-t span{position:absolute;left:0;right:0;bottom:0;font-size:10px;line-height:1.5;color:#fff;background:rgba(0,0,0,.6);text-align:center}
.ainul-btn.a3{background:linear-gradient(135deg,#16a34a,#15803d)!important}
