/* Buku Order — kertas, tinta, stempel. */
:root {
  --paper: #ECE7DB;
  --sheet: #FAF7F0;
  --sheet-2: #F3EFE4;
  --ink: #1D1B17;
  --ink-2: #4B473F;
  --ink-3: #857F72;
  --rule: #D5CEBE;
  --rule-2: #E4DED0;
  --accent: #CF4520;
  --accent-ink: #FFF6EF;
  --accent-soft: #F6DDD0;
  --moss: #2E6A45;
  --moss-soft: #DCE9DB;
  --ochre: #A86E12;
  --ochre-soft: #F2E4C6;
  --blue: #2B5786;
  --blue-soft: #DCE5EF;
  --plum: #6F4A8E;
  --plum-soft: #E7DEEE;
  --rust: #9A4A26;
  --shadow: #1D1B17;
  --serif: "Fraunces", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #15140F; --sheet: #1E1C17; --sheet-2: #25231D; --ink: #EDE7D8; --ink-2: #C4BCA9; --ink-3: #8D8676;
    --rule: #3A372E; --rule-2: #2D2A23; --accent: #F06B43; --accent-ink: #1A0E08; --accent-soft: #3E2117;
    --moss: #7DC496; --moss-soft: #1D3325; --ochre: #E0A84A; --ochre-soft: #3A2D14; --blue: #83AEE0;
    --blue-soft: #1B2939; --plum: #BE9BDB; --plum-soft: #2E2338; --rust: #E08A62; --shadow: #000;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #15140F; --sheet: #1E1C17; --sheet-2: #25231D; --ink: #EDE7D8; --ink-2: #C4BCA9; --ink-3: #8D8676;
  --rule: #3A372E; --rule-2: #2D2A23; --accent: #F06B43; --accent-ink: #1A0E08; --accent-soft: #3E2117;
  --moss: #7DC496; --moss-soft: #1D3325; --ochre: #E0A84A; --ochre-soft: #3A2D14; --blue: #83AEE0;
  --blue-soft: #1B2939; --plum: #BE9BDB; --plum-soft: #2E2338; --rust: #E08A62; --shadow: #000;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 15px/1.5 var(--sans);
  background-image: radial-gradient(color-mix(in srgb, var(--ink) 9%, transparent) 1px, transparent 1.2px);
  background-size: 22px 22px;
  min-height: 100vh;
}
a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 35%, transparent); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--accent); }
::selection { background: var(--accent); color: var(--accent-ink); }
.mono { font-family: var(--mono); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; white-space: nowrap; }
.muted { color: var(--ink-3); }
.small { font-size: 12.5px; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- masthead ---------- */
.mast {
  max-width: 1320px; margin: 0 auto; padding: 18px 24px 0;
  display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: end;
}
.brand { text-decoration: none; display: block; line-height: 1; }
.brand b {
  font: italic 600 34px/0.9 var(--serif); letter-spacing: -0.02em; display: block;
  font-variation-settings: "SOFT" 100, "WONK" 1;
}
.brand b::after { content: "."; color: var(--accent); }
.edition {
  font: 11px/1.4 var(--mono); color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em;
  border-left: 1px solid var(--rule); padding-left: 16px; align-self: center;
}
.edition strong { color: var(--ink-2); font-weight: 500; }
.mast-tools { display: flex; gap: 8px; align-items: center; }
.search {
  display: flex; align-items: center; border: 1px solid var(--rule); background: var(--sheet);
  padding: 0 8px; height: 34px; border-radius: 2px;
}
.search input { border: 0; background: none; outline: none; font: 13px var(--sans); width: 150px; color: var(--ink); padding: 0 6px; }
.search kbd { font: 10.5px var(--mono); border: 1px solid var(--rule); padding: 0 5px; border-radius: 2px; color: var(--ink-3); }

.nav {
  max-width: 1320px; margin: 14px auto 0; padding: 0 24px;
  display: flex; gap: 2px; border-bottom: 2px solid var(--ink); overflow-x: auto; scrollbar-width: none;
}
.nav::-webkit-scrollbar { display: none; }
.nav a {
  text-decoration: none; padding: 9px 14px 8px; font-size: 14px; white-space: nowrap; color: var(--ink-2);
  border: 1px solid transparent; border-bottom: 0; border-radius: 3px 3px 0 0; position: relative; top: 2px;
}
.nav a i { font: normal 10.5px var(--mono); color: var(--ink-3); margin-right: 6px; }
.nav a:hover { color: var(--ink); background: color-mix(in srgb, var(--sheet) 60%, transparent); }
.nav a.on {
  background: var(--sheet); border-color: var(--ink); color: var(--ink); font-weight: 600;
  box-shadow: inset 0 3px 0 var(--accent);
}
.nav a.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; background: var(--sheet); }
.nav .spacer { flex: 1; }

main { max-width: 1320px; margin: 0 auto; padding: 28px 24px 80px; }

/* ---------- headings ---------- */
.head { display: flex; gap: 16px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; margin-bottom: 22px; }
.kicker { font: 11px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin: 0 0 8px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; margin: 0; }
h1 { font-size: clamp(30px, 4vw, 44px); line-height: 1.08; font-variation-settings: "opsz" 48, "SOFT" 30; letter-spacing: -0.01em; }
h2 { font-size: 22px; line-height: 1.2; }
h3 { font-size: 17px; }
.head .actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- sheets (panel ber-tab map) ---------- */
.sheet {
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px;
  padding: 20px; position: relative; margin-top: 16px;
}
.sheet.hard { border-color: var(--ink); box-shadow: 5px 5px 0 var(--shadow); }
.tab {
  position: absolute; top: -13px; left: 14px; background: var(--sheet); border: 1px solid var(--rule);
  border-bottom: 0; padding: 3px 10px 2px; font: 10.5px/1.4 var(--mono); letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink-2); border-radius: 3px 3px 0 0;
}
.sheet.hard .tab { border-color: var(--ink); }
.tab b { color: var(--accent); font-weight: 500; margin-right: 6px; }
.sheet > .tab + * { margin-top: 2px; }
.sheet-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 12px; }

.grid { display: grid; gap: 22px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); }
.g-side { grid-template-columns: minmax(0, 1fr) 340px; }
.span-2 { grid-column: span 2; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px;
  font: 500 13.5px var(--sans); color: var(--sheet); background: var(--ink); border: 1px solid var(--ink);
  border-radius: 2px; cursor: pointer; text-decoration: none; white-space: nowrap;
  box-shadow: 2px 2px 0 var(--accent); transition: transform .08s, box-shadow .08s;
}
.btn:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--accent); }
.btn:active { transform: translate(1px, 1px); box-shadow: 0 0 0 var(--accent); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: none; border-color: var(--ink-3); }
.btn.ghost:hover { border-color: var(--ink); background: var(--sheet); }
.btn.accent { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: 2px 2px 0 var(--ink); }
.btn.danger { background: transparent; color: var(--accent); border-color: currentColor; box-shadow: none; }
.btn.sm { height: 28px; padding: 0 10px; font-size: 12.5px; }
.btn.link { background: none; border: 0; box-shadow: none; color: var(--ink-2); padding: 0 4px; text-decoration: underline; text-decoration-color: var(--rule); }
.btn.link:hover { color: var(--accent); transform: none; }
form.inline { display: inline; }

/* ---------- stempel status ---------- */
.stamp {
  display: inline-block; font: 500 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 6px 3px; border: 1.5px solid currentColor; border-radius: 2px; white-space: nowrap;
  transform: rotate(-1.2deg); color: var(--ink-2);
}
.st-masuk { color: var(--blue); }
.st-diskusi { color: var(--ochre); }
.st-penawaran { color: var(--plum); }
.st-dikerjakan { color: var(--accent); }
.st-uji { color: var(--rust); }
.st-selesai, .st-lunas, .st-disetujui { color: var(--moss); }
.st-batal, .st-ditolak, .st-draft { color: var(--ink-3); border-style: dashed; }
.st-terbit, .st-dikirim { color: var(--blue); }
.st-sebagian { color: var(--ochre); }
.st-jatuh_tempo { color: var(--sheet); background: var(--accent); border-color: var(--accent); }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; vertical-align: middle; }

/* ---------- tabel buku besar ---------- */
.ledger { width: 100%; border-collapse: collapse; font-size: 14px; }
.ledger th {
  font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3);
  text-align: left; padding: 8px 10px; border-bottom: 1.5px solid var(--ink);
}
.ledger td { padding: 11px 10px; border-bottom: 1px dashed var(--rule); vertical-align: top; }
.ledger tr:last-child td { border-bottom: 0; }
.ledger tbody tr:hover td { background: color-mix(in srgb, var(--accent) 4%, transparent); }
.ledger .num, .ledger th.right { text-align: right; }
.ledger td.title a { font-weight: 500; text-decoration: none; }
.ledger td.title a:hover { text-decoration: underline; }
.ledger .sub { color: var(--ink-3); font-size: 12.5px; }
.ledger tfoot td { border-top: 1.5px solid var(--ink); border-bottom: 0; font-weight: 600; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }

/* leader dots: "Subtotal ........ Rp 1.000" */
.leaders { list-style: none; margin: 0; padding: 0; }
.leaders li { display: flex; align-items: baseline; gap: 8px; padding: 5px 0; }
.leaders li .fill { flex: 1; border-bottom: 1.5px dotted var(--ink-3); transform: translateY(-4px); min-width: 20px; }
.leaders li.total { border-top: 1.5px solid var(--ink); margin-top: 6px; padding-top: 10px; font-weight: 600; font-size: 17px; }
.leaders li.total .fill { border: 0; }

/* ---------- form kertas ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 16px; min-width: 0; }
.field > span, .label {
  font: 500 10.5px var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--ink-3);
}
.field small { color: var(--ink-3); font-size: 12px; }
input[type=text], input[type=search], input[type=email], input[type=tel], input[type=date], input[type=number],
input[type=password], select, textarea {
  font: 15px var(--sans); color: var(--ink); background: transparent; width: 100%;
  border: 0; border-bottom: 1.5px solid var(--rule); border-radius: 0; padding: 7px 2px; outline: none;
}
select { padding-right: 20px; }
textarea { min-height: 90px; resize: vertical; border: 1.5px solid var(--rule); padding: 9px 10px; border-radius: 2px; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); background: color-mix(in srgb, var(--sheet-2) 70%, transparent); }
input.money, input.qty { font-family: var(--mono); text-align: right; }
.row { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.form-foot { display: flex; gap: 10px; align-items: center; padding-top: 6px; flex-wrap: wrap; }
.choice { display: flex; gap: 6px; flex-wrap: wrap; }
.choice label { cursor: pointer; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
  display: inline-block; padding: 6px 11px; border: 1px solid var(--rule); border-radius: 2px; font-size: 13.5px;
  background: var(--sheet);
}
.choice input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--sheet); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- flash ---------- */
.flashes { margin-bottom: 18px; display: grid; gap: 8px; }
.flash {
  background: var(--sheet); border: 1px solid var(--ink); border-left: 6px solid var(--moss);
  padding: 10px 14px; font-size: 14px; animation: drop .25s ease-out;
}
.flash.error { border-left-color: var(--accent); }
@keyframes drop { from { transform: translateY(-6px); opacity: 0; } }

/* ---------- meja kerja ---------- */
.lede {
  font: 400 clamp(23px, 2.8vw, 34px)/1.3 var(--serif); letter-spacing: -0.005em; margin: 4px 0 28px;
  max-width: 1000px; font-variation-settings: "opsz" 36, "SOFT" 50;
}
.lede em { font-style: italic; color: var(--accent); }
.lede a { text-decoration-thickness: 1.5px; }
.lede .hl { background: linear-gradient(transparent 62%, var(--ochre-soft) 62%); padding: 0 2px; }

.figures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 2px solid var(--ink); border-bottom: 1px solid var(--rule); }
.figures > div { padding: 14px 16px 14px 0; }
.figures > div + div { border-left: 1px solid var(--rule); padding-left: 16px; }
.figures .label { display: block; margin-bottom: 6px; }
.figures .v { font: 500 26px/1.1 var(--mono); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.figures .d { font-size: 12.5px; color: var(--ink-3); margin-top: 4px; }

.ruler-wrap { position: relative; padding: 4px 0 0; }
.ruler { position: relative; height: 160px; margin: 0 8px; }
.ruler .scale { position: absolute; left: 0; right: 0; bottom: 26px; height: 1.5px; background: var(--ink); }
.ruler .tick { position: absolute; bottom: 26px; width: 1px; background: var(--ink-3); height: 6px; }
.ruler .tick.wk { height: 12px; background: var(--ink); }
.ruler .tick-label { position: absolute; bottom: 4px; transform: translateX(-50%); font: 10.5px var(--mono); color: var(--ink-3); white-space: nowrap; }
.ruler .today { position: absolute; bottom: 26px; top: 0; width: 0; border-left: 1.5px dashed var(--accent); }
.ruler .today span { position: absolute; top: -2px; left: 4px; font: 10.5px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: .08em; }
.pin {
  position: absolute; transform: translateX(-6px); text-decoration: none; display: flex; flex-direction: column;
  align-items: flex-start; max-width: 150px;
}
.pin .stem { position: absolute; left: 5px; width: 1.5px; background: var(--ink-2); z-index: 0; }
.pin .head-dot { width: 12px; height: 12px; border-radius: 50%; background: var(--sheet); border: 2px solid var(--ink); position: absolute; left: 0; }
.pin.late .head-dot, .pin.p1 .head-dot { background: var(--accent); border-color: var(--accent); }
.pin .lbl {
  position: absolute; left: 16px; font-size: 12px; line-height: 1.25; white-space: nowrap; background: var(--sheet);
  padding: 1px 5px; border: 1px solid var(--rule); max-width: 170px; overflow: hidden; text-overflow: ellipsis; z-index: 2;
}
.pin .head-dot { z-index: 1; }
.pin .lbl b { font: 500 10.5px var(--mono); color: var(--ink-3); margin-right: 4px; }
.pin:hover .lbl { border-color: var(--ink); z-index: 3; max-width: none; }

.nudges { list-style: none; margin: 0; padding: 0; counter-reset: n; }
.nudges li { border-bottom: 1px dashed var(--rule); }
.nudges li:last-child { border-bottom: 0; }
.nudges a { display: grid; grid-template-columns: 26px 1fr auto; gap: 10px; padding: 10px 0; text-decoration: none; align-items: start; }
.nudges a::before { counter-increment: n; content: counter(n, decimal-leading-zero); font: 11px var(--mono); color: var(--ink-3); padding-top: 3px; }
.nudges a:hover b { text-decoration: underline; text-decoration-color: var(--accent); }
.nudges .why { display: block; font-size: 12.5px; color: var(--ink-3); }
.nudges .go { font: 12px var(--mono); color: var(--accent); padding-top: 2px; }
.nudges .k-tagih b, .nudges .k-telat b { color: var(--accent); }
.empty-note { font: italic 17px var(--serif); color: var(--ink-3); padding: 18px 0 6px; }

.funnel { display: grid; gap: 6px; }
.funnel a { display: grid; grid-template-columns: 130px 1fr 40px; gap: 10px; align-items: center; text-decoration: none; font-size: 13.5px; }
.funnel .bar { height: 16px; background: var(--sheet-2); border: 1px solid var(--rule); position: relative; }
.funnel .bar i { position: absolute; inset: -1px auto -1px -1px; background: currentColor; }
.funnel .n { font: 13px var(--mono); text-align: right; }

.journal { list-style: none; margin: 0; padding: 0; }
.journal li { display: grid; grid-template-columns: 74px 1fr; gap: 12px; padding: 8px 0; font-size: 13.5px; border-bottom: 1px dashed var(--rule-2); }
.journal li:last-child { border-bottom: 0; }
.journal time { font: 11px/1.9 var(--mono); color: var(--ink-3); }
.journal .note { font-family: var(--serif); font-size: 15px; }
.journal .note::before { content: "✎ "; color: var(--accent); font-family: var(--sans); }

.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font: 10.5px var(--mono); fill: var(--ink-3); }
.chart .paid { fill: var(--ink); }
.chart .billed { fill: none; stroke: var(--ink-3); stroke-width: 1.2; stroke-dasharray: 3 2; }
.chart .grid-line { stroke: var(--rule); stroke-width: 1; }
.chart .v { fill: var(--ink-2); }
.legend { display: flex; gap: 16px; font: 11px var(--mono); color: var(--ink-3); margin-top: 8px; }
.legend i { display: inline-block; width: 12px; height: 10px; margin-right: 5px; vertical-align: -1px; }

/* ---------- papan (kanban) ---------- */
.board { display: grid; grid-template-columns: repeat(6, minmax(196px, 1fr)); gap: 14px; overflow-x: auto; padding: 4px 4px 16px; scroll-snap-type: x proximity; }
.col { scroll-snap-align: start; min-width: 0; }
.col-head { display: flex; align-items: baseline; gap: 8px; border-bottom: 2px solid var(--ink); padding-bottom: 6px; margin-bottom: 10px; }
.col-head i { font: normal 11px var(--mono); color: var(--ink-3); }
.col-head b { font: 600 15px var(--serif); }
.col-head .count { margin-left: auto; font: 12px var(--mono); }
.col-head .val { font: 11px var(--mono); color: var(--ink-3); }
.drop:not(:has(.ticket))::before { content: "kosong"; font: italic 14px var(--serif); color: var(--ink-3); padding: 10px 4px; }
.drop { min-height: 200px; display: grid; align-content: start; gap: 10px; padding: 2px; border-radius: 3px; transition: background .15s; }
.drop.over { background: color-mix(in srgb, var(--accent) 9%, transparent); outline: 1.5px dashed var(--accent); }

.ticket {
  background: var(--sheet); border: 1px solid var(--ink); border-radius: 3px; padding: 12px 12px 10px 22px;
  position: relative; cursor: grab; text-decoration: none; display: block;
  transition: transform .1s, box-shadow .1s;
}
.ticket::before { /* perforasi */
  content: ""; position: absolute; left: 12px; top: 8px; bottom: 8px; border-left: 1.5px dashed var(--rule);
}
.ticket::after { /* lubang */
  content: ""; position: absolute; left: 5px; top: 12px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper); border: 1px solid var(--ink-3);
}
.ticket:hover { transform: translate(-2px, -2px); box-shadow: 4px 4px 0 var(--shadow); }
.ticket.dragging { opacity: .45; transform: rotate(2deg); }
.ticket.p1 { box-shadow: inset 4px 0 0 var(--accent); }
.ticket.p1:hover { box-shadow: inset 4px 0 0 var(--accent), 4px 4px 0 var(--shadow); }
.ticket .t-top { display: flex; justify-content: space-between; gap: 8px; font: 11px var(--mono); color: var(--ink-3); }
.ticket .t-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; margin: 5px 0 2px; }
.ticket .t-client { font-size: 12.5px; color: var(--ink-2); }
.ticket .t-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; gap: 8px; font: 11.5px var(--mono); }
.dl { padding: 1px 5px; border-radius: 2px; }
.dl.dekat { background: var(--ochre-soft); color: var(--ochre); }
.dl.lewat { background: var(--accent); color: var(--accent-ink); }
.dl.normal { color: var(--ink-2); }
.dl.selesai { color: var(--ink-3); }
.progress { height: 4px; background: var(--rule-2); margin-top: 9px; position: relative; overflow: hidden; }
.progress i { position: absolute; inset: 0 auto 0 0; background: var(--moss); }
.ticket .add-ghost { border: 1px dashed var(--ink-3); }
.col .new { display: block; text-align: center; border: 1px dashed var(--ink-3); padding: 9px; font-size: 13px; text-decoration: none; color: var(--ink-3); border-radius: 3px; }
.col .new:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- jalur status (stepper) ---------- */
.track { display: flex; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; background: var(--sheet); }
.track form { flex: 1; display: flex; }
.track button {
  flex: 1; border: 0; background: none; font: 12.5px var(--sans); padding: 10px 8px 9px; cursor: pointer; color: var(--ink-3);
  border-right: 1px solid var(--rule); text-align: left; line-height: 1.2;
}
.track form:last-child button { border-right: 0; }
.track button i { display: block; font: normal 10px var(--mono); margin-bottom: 3px; }
.track button.done { color: var(--ink-2); background: var(--sheet-2); }
.track button.cur { background: var(--ink); color: var(--sheet); font-weight: 600; }
.track button.cur i { color: var(--accent); }
.track button:hover:not(.cur) { background: color-mix(in srgb, var(--accent) 10%, var(--sheet)); color: var(--ink); }

.facts { display: grid; grid-template-columns: 120px 1fr; gap: 8px 14px; font-size: 14px; margin: 0; }
.facts dt { font: 500 10.5px/2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.facts dd { margin: 0; }

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; padding: 7px 0; border-bottom: 1px dashed var(--rule-2); }
.checklist .box {
  width: 18px; height: 18px; border: 1.5px solid var(--ink); background: var(--sheet); flex: none; cursor: pointer;
  display: grid; place-items: center; padding: 0; border-radius: 2px; margin-top: 1px; font: 600 13px/1 var(--mono); color: var(--accent);
}
.checklist li.done .t { text-decoration: line-through; text-decoration-color: var(--accent); color: var(--ink-3); }
.checklist .t { flex: 1; }
.checklist .x { opacity: 0; transition: opacity .1s; }
.checklist li:hover .x { opacity: 1; }

.moneybar { display: flex; height: 22px; border: 1px solid var(--ink); background: var(--sheet-2); margin: 8px 0 12px; }
.moneybar i { display: block; height: 100%; }
.moneybar .paid { background: var(--moss); }
.moneybar .billed { background: repeating-linear-gradient(45deg, var(--ochre), var(--ochre) 3px, transparent 3px, transparent 6px); }

/* ---------- editor baris (taksiran / invoice) ---------- */
.lines { width: 100%; border-collapse: collapse; }
.lines th { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); text-align: left; padding: 6px 6px; border-bottom: 1.5px solid var(--ink); }
.lines td { padding: 3px 6px; border-bottom: 1px dashed var(--rule-2); vertical-align: middle; }
.lines td input { border-bottom-color: transparent; padding: 7px 2px; }
.lines td input:hover { border-bottom-color: var(--rule); }
.lines th.right { text-align: right; }
.lines .amt { font: 13.5px var(--mono); text-align: right; white-space: nowrap; color: var(--ink-2); }
.lines .rm { border: 0; background: none; cursor: pointer; color: var(--ink-3); font-size: 18px; padding: 0 4px; }
.lines .rm:hover { color: var(--accent); }
.lines .grip { color: var(--ink-3); font-size: 12px; width: 22px; font-family: var(--mono); }
.lines-actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.catalog-pick { max-height: 420px; overflow: auto; margin: 0 -6px; }
.catalog-pick h4 { font: 500 10.5px var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin: 12px 6px 4px; }
.catalog-pick button {
  display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none;
  border: 0; padding: 7px 6px; cursor: pointer; font: 13.5px var(--sans); color: var(--ink); border-radius: 2px;
}
.catalog-pick button:hover { background: var(--sheet-2); }
.catalog-pick button span:last-child { font: 12px var(--mono); color: var(--ink-3); white-space: nowrap; }
.catalog-pick button span:first-child::before { content: "+ "; color: var(--accent); font-family: var(--mono); }

.receipt {
  background: var(--sheet); border: 1px solid var(--ink); padding: 18px 18px 22px; position: relative;
  --zig: 8px;
  -webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
          mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--zig)) 100%;
  padding-bottom: 30px;
}
.receipt .big { font: 600 30px/1.1 var(--mono); letter-spacing: -0.02em; margin: 6px 0 2px; }
.receipt .say { font: italic 14px var(--serif); color: var(--ink-2); }
.sticky { position: sticky; top: 16px; }

.bars-h { display: grid; gap: 8px; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--rule); }
.bars-h:empty { display: none; }
.bars-h div { display: grid; grid-template-columns: 1fr auto; font-size: 12.5px; gap: 2px 10px; }
.bars-h div i { grid-column: span 2; height: 6px; background: var(--ink); display: block; }

/* ---------- daftar filter ---------- */
.filters { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; align-items: center; }
.filters a {
  text-decoration: none; padding: 5px 10px; border: 1px solid var(--rule); font-size: 13px; border-radius: 2px;
  background: var(--sheet); display: inline-flex; gap: 6px; align-items: baseline;
}
.filters a b { font: 500 11px var(--mono); color: var(--ink-3); }
.filters a.on { background: var(--ink); color: var(--sheet); border-color: var(--ink); }
.filters a.on b { color: var(--accent); }
.filters form { margin-left: auto; display: flex; gap: 6px; }
.filters input[type=search] { background: var(--sheet); border: 1px solid var(--rule); padding: 5px 10px; font-size: 13.5px; width: 220px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.card {
  background: var(--sheet); border: 1px solid var(--rule); padding: 16px; text-decoration: none; display: block;
  border-radius: 2px; position: relative;
}
.card:hover { border-color: var(--ink); box-shadow: 4px 4px 0 var(--shadow); transform: translate(-2px, -2px); }
.card .monogram {
  width: 42px; height: 42px; display: grid; place-items: center; border: 1.5px solid var(--ink); border-radius: 50%;
  font: italic 600 18px var(--serif); float: right; margin-left: 10px; background: var(--sheet-2);
}
.card h3 { font-size: 19px; }
.card .meta { font: 11.5px var(--mono); color: var(--ink-3); margin-top: 12px; display: flex; gap: 12px; flex-wrap: wrap; }

.danger-zone { border-top: 1px dashed var(--rule); margin-top: 26px; padding-top: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.login {
  min-height: 100vh; display: grid; place-items: center; padding: 20px;
}
.login .sheet { width: min(400px, 100%); padding: 34px 30px 28px; }
.login .brand b { font-size: 46px; margin-bottom: 4px; }

.big-empty { text-align: center; padding: 50px 20px; }
.big-empty p { font: italic 22px var(--serif); color: var(--ink-2); margin: 0 0 18px; }

/* ---------- responsif ---------- */
@media (max-width: 1100px) {
  .g-main, .g-side { grid-template-columns: 1fr; }
  .sticky { position: static; }
  .figures { grid-template-columns: repeat(2, 1fr); }
  .figures > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .figures > div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 760px) {
  body { font-size: 14.5px; }
  .mast { grid-template-columns: 1fr auto; padding: 14px 16px 0; gap: 10px; }
  .edition { display: none; }
  .search input { width: 90px; }
  .search kbd { display: none; }
  .mast-tools .btn.accent span { display: none; }
  .nav { padding: 0 16px; }
  main { padding: 22px 16px 60px; }
  .g-2, .g-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .board { grid-template-columns: repeat(6, 82vw); }
  .track { flex-wrap: wrap; }
  .track form { flex: 1 0 33%; }
  .track button { border-bottom: 1px solid var(--rule); }
  .facts { grid-template-columns: 1fr; gap: 0 0; }
  .facts dd { margin-bottom: 8px; }
  .filters form { margin-left: 0; width: 100%; }
  .filters input[type=search] { width: 100%; }
  .funnel a { grid-template-columns: 105px 1fr 30px; }
  .lines thead { display: none; }
  .lines tr { display: grid; grid-template-columns: 1fr 1fr auto; border-bottom: 1px dashed var(--rule); padding: 6px 0; }
  .lines td { border: 0; }
  .lines td.wide { grid-column: 1 / -1; }
  .lines td.grip { display: none; }
  .ledger.stack thead { display: none; }
  .ledger.stack tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px dashed var(--rule); padding: 8px 0; }
  .ledger.stack td { border: 0; padding: 2px 4px; }
  .ledger.stack td.hide-m { display: none; }
  .ledger.stack td.num { grid-column: 2; text-align: right; }
}
@media print {
  .mast, .nav, .no-print { display: none !important; }
  body { background: #fff; }
}
