@font-face {
  font-family: Mulish;
  src: url('/brand/mulish-latin.woff2') format('woff2');
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --navy-900: #151b4a;
  --navy-800: #1d2462;
  --navy: #293179;
  --navy-600: #3a43a0;
  --navy-100: #e6e8f5;
  --navy-50: #f2f3fa;
  --orange: #f05623;
  --orange-700: #b83b10;
  --amber: #ffb600;
  --amber-100: #fff2cc;
  --amber-900: #6b4a00;
  --green-100: #e2f2ea;
  --green-800: #17604a;
  --red-100: #fbe7e6;
  --red-800: #9b2620;
  --ink: #1a1d33;
  --ink-2: #4a4f6a;
  --line: #dfe2ee;
  --line-2: #eceef6;
  --surface: #ffffff;
  --canvas: #f4f5fa;
  --radius: 10px;
  --shadow: 0 1px 2px rgb(21 27 74 / .05), 0 4px 14px -6px rgb(21 27 74 / .1);
  font-family: Mulish, 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  color: var(--ink);
  background: var(--canvas);
  color-scheme: light;
  accent-color: var(--navy);
  caret-color: var(--navy);
  scrollbar-color: #b9bdd4 transparent;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; -webkit-font-smoothing: antialiased; }
::selection { background: var(--amber-100); color: var(--ink); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }

/* Header */
.top { background: var(--navy); color: #fff; border-bottom: 3px solid var(--orange); }
.top-inner, main { width: min(1160px, calc(100% - 32px)); margin-inline: auto; }
.top-inner { min-height: 64px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 9px; background: #fff; }
.brand-mark img { display: block; }
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-size: 1.06rem; font-weight: 800; letter-spacing: .01em; text-transform: uppercase; }
.brand-text span { font-size: .78rem; color: #c9cdeb; font-weight: 600; }
.env { color: #c9cdeb; font-size: .82rem; font-weight: 600; }

/* Menu tabs */
.subnav { background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 2px rgb(21 27 74 / .04); }
.subnav-inner { width: min(1160px, calc(100% - 32px)); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 10px 24px; flex-wrap: wrap; padding-block: 8px; }
.tabs { display: flex; gap: 4px; align-self: stretch; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; margin-block: -8px; border-bottom: 3px solid transparent; color: var(--ink-2); font-weight: 800; font-size: .93rem; text-decoration: none; transition: color .15s, border-color .15s, background-color .15s; }
.tab svg { color: #9ea4c4; transition: color .15s; }
.tab:hover { color: var(--navy); background: var(--navy-50); }
.tab[aria-current="page"] { color: var(--navy-900); border-bottom-color: var(--orange); }
.tab[aria-current="page"] svg { color: var(--orange); }
.subnav .reviewer { grid-auto-flow: column; align-items: center; gap: 10px; }
.subnav .reviewer input { min-height: 34px; }

main { padding-block: 28px 56px; }

/* Type */
h1 { font-size: 1.85rem; font-weight: 800; line-height: 1.15; margin: 0 0 6px; letter-spacing: -.02em; color: var(--navy-900); }
h2 { font-size: 1.05rem; font-weight: 800; margin: 0 0 4px; color: var(--navy-900); }
p { margin: 0 0 10px; line-height: 1.5; }
.muted { color: var(--ink-2); }

/* Intro + run control */
.intro { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px 32px; margin-bottom: 14px; }
.intro p { color: var(--ink-2); max-width: 62ch; margin: 0; }
.run { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; display: grid; gap: 8px; }
.run-title { font-size: .82rem; color: var(--ink-2); font-weight: 700; margin: 0; }
.run-controls { display: flex; align-items: end; gap: 10px; flex-wrap: wrap; }
.run-meta { font-size: .8rem; color: var(--ink-2); }

/* Fields and buttons */
.field { display: grid; gap: 5px; font-weight: 700; font-size: .8rem; color: var(--ink-2); }
input { min-height: 38px; border: 1px solid #c3c7db; border-radius: 7px; padding: 6px 10px; font: inherit; font-size: .93rem; color: var(--ink); background: #fff; transition: border-color .15s, box-shadow .15s; }
input:hover { border-color: #9ea4c4; }
input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgb(41 49 121 / .16); }
button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; font: inherit; font-weight: 700; font-size: .9rem; min-height: 38px; padding: 8px 14px; border-radius: 7px; border: 1px solid transparent; cursor: pointer; transition: background-color .15s, border-color .15s, color .15s, transform .1s; }
button:active:not(:disabled) { transform: translateY(1px); }
button, .primary { background: var(--navy); color: #fff; }
button:hover:not(:disabled) { background: var(--navy-800); }
button.secondary { background: #fff; color: var(--ink); border-color: #c3c7db; }
button.secondary:hover:not(:disabled) { background: var(--navy-50); border-color: #9ea4c4; }
button:disabled { opacity: .55; cursor: progress; }

#feedback, .feedback { margin: 0 0 14px; padding: 10px 14px; border-radius: 8px; background: var(--green-100); color: var(--green-800); font-weight: 700; font-size: .9rem; }
#feedback:empty, .feedback:empty { display: none; }
#feedback.error, .feedback.error { background: var(--red-100); color: var(--red-800); }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 20px; margin-bottom: 16px; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 12px 24px; margin-bottom: 14px; }
.panel-head p { margin: 0; }
.reviewer input { width: 220px; }

/* Tally strip */
.tally { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 14px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tally-item { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--navy-50); }
.tally-item + .tally-item { border-left: 1px solid var(--line); }
.tally dt { font-size: .82rem; font-weight: 700; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.tally dt::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--navy); flex: none; }
.tally .pending dt::before { background: var(--amber); }
.tally .approved dt::before { background: var(--green-800); }
.tally dd { margin: 0; font-size: 1.35rem; font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.tally .pending { background: #fffaeb; }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 8px; }
table { width: 100%; border-collapse: collapse; text-align: left; font-variant-numeric: tabular-nums; }
th { background: var(--navy-50); color: var(--ink-2); font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: #fafbfe; }
td { line-height: 1.42; font-size: .89rem; }
td .muted { display: block; margin-top: 3px; font-size: .8rem; }
.reminder-table { min-width: 820px; }
#outcomes table { min-width: 560px; }
#outcomes td:first-child { font-weight: 700; color: var(--navy-900); }
.reminder-table td:nth-child(1) { font-weight: 700; color: var(--navy-900); }
.reminder-table td:nth-child(1) .muted { font-weight: 600; }
.reminder-table td:nth-child(2), .reminder-table td:nth-child(3), #outcomes td:nth-child(2) { white-space: nowrap; }
.reminder-table td:nth-child(1) { min-width: 210px; }
.reminder-table td:nth-child(4) { width: 34%; }
.reminder-table td:nth-child(5) { width: 200px; }

/* Status pills */
.status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .8rem; border-radius: 999px; padding: 3px 10px 3px 8px; background: var(--navy-100); color: var(--navy-800); white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.pending_review { background: var(--amber-100); color: var(--amber-900); }
.status.pending_review::before { background: var(--amber); }
.status.approved, .status.sent { background: var(--green-100); color: var(--green-800); }
.status.rejected, .status.send_failed { background: var(--red-100); color: var(--red-800); }
.status.skipped { background: #eef0f5; color: var(--ink-2); }
.warn-note { color: var(--amber-900) !important; font-weight: 700; }

/* Editable draft */
.message-edit { display: block; width: 100%; min-height: 112px; resize: vertical; border: 1px solid #e6cf8f; border-radius: 7px; padding: 8px 10px; font: inherit; font-size: .89rem; line-height: 1.45; color: var(--ink); background: #fffcf2; transition: border-color .15s, box-shadow .15s; }
.message-edit:hover { border-color: #d4b25a; }
.message-edit:focus { outline: none; border-color: var(--navy); background: #fff; box-shadow: 0 0 0 3px rgb(41 49 121 / .16); }
.message-edit:disabled { opacity: .65; }
.review-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.review-actions button { min-height: 32px; padding: 5px 12px; font-size: .82rem; }

/* Lower row */
.lower { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(260px, 1fr); gap: 16px; align-items: start; }
.lower .panel { margin-bottom: 0; }
.downloads { display: grid; gap: 8px; margin-top: 12px; }
.file-link { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; color: var(--navy); font-weight: 700; text-decoration: none; transition: background-color .15s, border-color .15s; }
.file-link:hover { background: var(--navy-50); border-color: #c3c7db; }
.file-link svg { color: var(--orange); flex: none; }
details { margin-top: 12px; }
summary { cursor: pointer; font-weight: 700; color: var(--navy); }
#run-history { padding-left: 20px; line-height: 1.6; font-size: .88rem; color: var(--ink-2); }

/* Dokumen (Modul 2) */
.upload { display: grid; justify-items: start; gap: 6px; }
.sheet-sync { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sheet-sync input { width: 280px; max-width: 100%; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.doc-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: 16px; align-items: start; }
.doc-layout .panel { margin-bottom: 0; }
.doc-list-panel { position: sticky; top: 12px; }
.doc-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; max-height: calc(100vh - 220px); overflow-y: auto; }
.doc-item { display: grid; grid-template-columns: minmax(0, 1fr); justify-content: stretch; justify-items: start; gap: 4px; width: 100%; text-align: left; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-weight: 600; }
.doc-item:hover:not(:disabled) { background: var(--navy-50); border-color: #c3c7db; }
.doc-item.selected { border-color: var(--navy); box-shadow: inset 3px 0 0 var(--orange); background: var(--navy-50); }
.doc-item-title { font-weight: 800; color: var(--navy-900); font-size: .9rem; }
.doc-item-meta, .doc-item-time { font-size: .78rem; color: var(--ink-2); overflow-wrap: anywhere; }
.doc-item-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 2px; }
.flag-count { font-size: .76rem; font-weight: 800; color: var(--orange-700); background: #fdeee8; border-radius: 999px; padding: 2px 8px; }
.status.doc-needs_check { background: var(--amber-100); color: var(--amber-900); }
.status.doc-needs_check::before { background: var(--amber); }
.status.doc-draft_ready { background: var(--navy-100); color: var(--navy-800); }
.status.doc-approved { background: var(--green-100); color: var(--green-800); }
.status.doc-rejected, .status.doc-final_failed { background: var(--red-100); color: var(--red-800); }
.doc-detail { container-type: inline-size; }
.doc-detail:focus { outline: none; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.doc-head h2 { font-size: 1.2rem; }
.doc-head p { margin: 0; font-size: .85rem; overflow-wrap: anywhere; }
.flags { border: 1px solid #f0d58a; background: #fffaeb; border-radius: 8px; padding: 10px 14px; margin-bottom: 14px; color: var(--amber-900); }
.flags strong { font-size: .88rem; }
.flags ul { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; line-height: 1.5; }
.review-note { font-size: .85rem; }
.doc-links { margin: 0 0 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.doc-section { border-top: 1px solid var(--line-2); padding-top: 14px; margin-top: 14px; }
.doc-section h3 { font-size: .8rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-2); margin: 0 0 10px; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.cert-grid input { width: 100%; }
input:disabled { background: var(--navy-50); color: var(--ink); border-color: var(--line); cursor: default; }
.items-table { min-width: 760px; }
.items-table td { vertical-align: middle; }
.items-table td:nth-child(1) { font-weight: 700; color: var(--navy-900); }
.items-table td:nth-child(7), .items-table th:nth-child(7) { text-align: right; white-space: nowrap; font-weight: 700; }
.items-table tr.needs-attention td { background: #fffaeb; }
.num-input { width: 100%; text-align: right; font-variant-numeric: tabular-nums; }
.num-input.qty { width: 80px; }
.num-input.price { width: 140px; }
.source-tag { display: inline-block; font-size: .76rem; font-weight: 700; color: var(--navy-800); background: var(--navy-100); border-radius: 5px; padding: 2px 7px; }
.missing { font-size: .8rem; font-weight: 700; color: var(--orange-700); }
.money { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 340px); gap: 20px; align-items: start; }
.fees { display: grid; gap: 14px; }
.fees-top { display: grid; grid-template-columns: repeat(2, minmax(0, 180px)); gap: 12px; }
.field-title { font-weight: 700; font-size: .8rem; color: var(--ink-2); }
.fee-rows { display: grid; gap: 8px; justify-items: start; }
.fee-row { display: grid; grid-template-columns: minmax(0, 1fr) 150px auto; gap: 8px; width: 100%; }
.fee-row input { width: 100%; }
button.small { min-height: 34px; padding: 5px 12px; font-size: .82rem; }
.small-text { font-size: .85rem; }
.totals { margin: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.totals-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 14px; font-variant-numeric: tabular-nums; }
.totals-row + .totals-row { border-top: 1px solid var(--line-2); }
.totals dt { font-size: .85rem; color: var(--ink-2); font-weight: 700; }
.totals dd { margin: 0; font-weight: 800; color: var(--navy-900); white-space: nowrap; }
.totals-row.total { background: var(--navy); }
.totals-row.total dt, .totals-row.total dd { color: #fff; }
.totals-row.total dd { font-size: 1.15rem; }
.doc-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 10px; border-top: 1px solid var(--line-2); margin-top: 18px; padding-top: 16px; }
.doc-actions > .muted { margin-right: auto; font-size: .88rem; }
.dirty-note { margin-right: auto; font-size: .85rem; font-weight: 700; color: var(--amber-900); }
button.accent { background: var(--orange); color: #fff; }
button.accent:hover:not(:disabled) { background: var(--orange-700); }
button.secondary.danger { color: var(--red-800); }
button.secondary.danger:hover:not(:disabled) { background: var(--red-100); border-color: #e3a9a5; }
.offline { grid-column: 1 / -1; border-color: #f0d58a; background: #fffaeb; }

/* Komponen bersama Modul 3-6 */
select { min-height: 38px; border: 1px solid #c3c7db; border-radius: 7px; padding: 6px 30px 6px 10px; font: inherit; font-size: .9rem; color: var(--ink); background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='%234a4f6a' stroke-width='1.7' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 8px center / 16px; appearance: none; max-width: 100%; cursor: pointer; }
select:hover { border-color: #9ea4c4; }
select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgb(41 49 121 / .16); }
.panel-tools { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; }
.file-link.compact { padding: 8px 12px; font-size: .88rem; align-self: end; }
.nowrap { white-space: nowrap; }
.empty { padding: 18px 4px; text-align: center; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.chip { min-height: 32px; padding: 4px 12px; border-radius: 999px; background: #fff; color: var(--ink-2); border: 1px solid #c3c7db; font-size: .82rem; font-weight: 700; gap: 6px; }
.chip:hover:not(:disabled) { background: var(--navy-50); color: var(--navy); }
.chip[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.chip-count { font-size: .74rem; font-weight: 800; background: var(--navy-100); color: var(--navy-800); border-radius: 999px; padding: 0 7px; min-width: 20px; }
.chip[aria-pressed="true"] .chip-count { background: rgb(255 255 255 / .18); color: #fff; }
.inline-form { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.inline-form input { flex: 1 1 180px; min-height: 34px; }
.small-link { font-size: .82rem; font-weight: 700; color: var(--navy); }
.status.internal { background: var(--navy-100); color: var(--navy-800); }
.tally.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }

/* Forecast (Modul 3) */
.fc-table { min-width: 760px; }
.fc-table td strong { color: var(--navy-900); }
.fc-table .num, .fc-table th:nth-child(n+2):not(:last-child) { text-align: right; white-space: nowrap; }
.fc-table .strong { font-weight: 800; color: var(--navy-900); }
.fc-table .basis { color: var(--ink-2); font-size: .84rem; }
.fc-table tr.short td { background: #fff7f3; }
.short-tag, .ok-tag { display: inline-block; font-size: .78rem; font-weight: 800; border-radius: 999px; padding: 2px 9px; white-space: nowrap; }
.short-tag { background: #fdeee8; color: var(--orange-700); }
.ok-tag { background: var(--green-100); color: var(--green-800); }
.run-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; }
.run-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line-2); }
.run-list li:first-child { border-top: 0; }
.run-list strong { display: block; color: var(--navy-900); font-size: .9rem; }
.run-list .muted { font-size: .8rem; }
.run-figures { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .86rem; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* Verifikasi (Modul 4) */
.split-layout { display: grid; grid-template-columns: minmax(260px, 330px) minmax(0, 1fr); gap: 16px; align-items: start; }
.split-layout .panel { margin-bottom: 0; }
.stack-form { display: grid; gap: 12px; margin-top: 12px; }
.stack-form input { width: 100%; }
.stack-form button { justify-self: start; }
.cert-code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-weight: 700; font-size: .88rem; letter-spacing: .04em; color: var(--navy-900); background: var(--navy-50); border: 1px solid var(--line); border-radius: 6px; padding: 2px 7px; white-space: nowrap; }
.cert-code.big { font-size: 1.25rem; padding: 6px 12px; display: inline-block; }
.issued { display: grid; justify-items: start; gap: 6px; margin-top: 16px; padding: 14px; border-radius: 8px; background: var(--green-100); border: 1px solid #b9dccb; }
.issued-label { font-size: .76rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: var(--green-800); }
.issued-url { font-size: .8rem; overflow-wrap: anywhere; }
.vf-table { min-width: 720px; }
.vf-table td strong { color: var(--navy-900); }
.code-cell .muted { margin-top: 6px !important; }
.row-actions { white-space: nowrap; width: 1%; }
.row-actions > * + * { margin-left: 6px; }
.row-actions .inline-form { min-width: 300px; white-space: normal; }

/* Inbox (Modul 5) */
.doc-item.attention:not(.selected) { border-color: #f0d58a; background: #fffdf5; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.thread { display: grid; gap: 0; }
.thread:focus { outline: none; }
.thread-head .review-actions { margin-top: 0; align-items: center; }
.messages { display: grid; gap: 8px; align-content: start; max-height: min(56vh, 520px); min-height: 220px; overflow-y: auto; padding: 14px; margin-bottom: 12px; background: var(--canvas); border: 1px solid var(--line-2); border-radius: 8px; overscroll-behavior: contain; }
.bubble-row { display: flex; }
.bubble-row.out { justify-content: flex-end; }
.bubble { max-width: min(78%, 520px); padding: 8px 12px; border-radius: 12px; background: #fff; border: 1px solid var(--line); box-shadow: 0 1px 1px rgb(21 27 74 / .04); }
.bubble p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .9rem; line-height: 1.45; }
.bubble-row.in .bubble { border-bottom-left-radius: 4px; }
.bubble-row.out .bubble { border-bottom-right-radius: 4px; background: var(--navy-100); border-color: #cfd3ec; }
.bubble-row.marketing .bubble { background: #fff2ea; border-color: #f6cdb8; }
.bubble-meta { display: block; margin-top: 4px; font-size: .72rem; font-weight: 700; color: var(--ink-2); }
.reply { display: grid; gap: 8px; }
.reply-box { min-height: 84px; }
.reply-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; }
.reply-bar > .muted { margin-right: auto; }

/* Pembayaran (Modul 6) */
.pay-list { display: grid; gap: 10px; }
.pay-card { min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 14px 16px; background: #fff; display: grid; gap: 10px; }
.pay-card.ambiguous, .pay-card.unmatched { border-color: #f0d58a; background: #fffdf5; }
.pay-card.confirmed { background: #fbfdfc; }
.pay-card.ignored { background: #fafbfd; }
.pay-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pay-money { display: grid; gap: 2px; }
.pay-amount { font-size: 1.2rem; font-weight: 800; color: var(--navy-900); font-variant-numeric: tabular-nums; }
.pay-money .muted { font-size: .82rem; }
.pay-info { display: grid; grid-template-columns: minmax(140px, 1fr) minmax(0, 2fr) minmax(120px, 1fr); gap: 8px 16px; margin: 0; }
.pay-info dt { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.pay-info dd { margin: 2px 0 0; font-size: .88rem; overflow-wrap: anywhere; }
.pay-reason { margin: 0; font-size: .84rem; color: var(--ink-2); background: var(--navy-50); border-radius: 6px; padding: 6px 10px; }
.pay-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 10px; }
.invoice-select { flex: 1 1 280px; min-width: 0; width: 100%; min-height: 34px; font-size: .85rem; text-overflow: ellipsis; }
.pay-actions .inline-form { flex: 1 1 100%; }

/* Halaman cek publik: status ditandai warna latar dan ikon, tanpa garis aksen */
body.public { min-height: 100vh; }
main.cek { width: min(620px, calc(100% - 32px)); padding-block: 40px 56px; }
.cek-form { display: grid; gap: 6px; margin: 20px 0 18px; padding: 18px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.cek-row { display: flex; gap: 8px; }
.cek-row input { flex: 1; min-width: 0; font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: 1.05rem; letter-spacing: .06em; text-transform: uppercase; }
.cek-result { border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); padding: 18px 20px; box-shadow: var(--shadow); }
.cek-result p { margin: 10px 0 0; }
.cek-head { display: flex; gap: 12px; align-items: flex-start; }
.cek-head svg { flex: none; margin-top: 2px; }
.cek-head h2 { font-size: 1.15rem; margin-bottom: 6px; }
.cek-result.valid { border-color: #9fd0b8; background: #f6fbf8; }
.cek-result.valid .cek-head svg { color: var(--green-800); }
.cek-result.expired { border-color: #f0d58a; background: #fffdf5; }
.cek-result.expired .cek-head svg { color: var(--amber-900); }
.cek-result.revoked, .cek-result.unknown { border-color: #e9b4b0; background: #fdf7f6; }
.cek-result.revoked .cek-head svg, .cek-result.unknown .cek-head svg { color: var(--red-800); }
.cek-result.error { background: var(--red-100); border-color: #e9b4b0; color: var(--red-800); font-weight: 700; }
.cek-result.error p, .cek-result.loading p { margin: 0; }
.cek-result.loading { color: var(--ink-2); }
.cek-data { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 20px; margin: 16px 0 0; padding-top: 14px; border-top: 1px solid var(--line-2); }
.cek-data dt { font-size: .74rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); }
.cek-data dd { margin: 3px 0 0; font-weight: 700; color: var(--navy-900); }
.cek-foot { margin-top: 22px; font-size: .85rem; }

@media (max-width: 1100px) {
  .split-layout { grid-template-columns: minmax(0, 1fr); }
  .stack-form { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); align-items: end; }
}
@media (max-width: 860px) {
  .intro, .lower { grid-template-columns: minmax(0, 1fr); }
  .doc-layout, .split-layout { grid-template-columns: minmax(0, 1fr); }
  .doc-list-panel { position: static; }
  .pay-info { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .pay-info > div:nth-child(2) { grid-column: 1 / -1; order: 3; }
  .doc-list { max-height: 320px; }
  .lower { gap: 16px; }
}
@media (max-width: 600px) {
  .env { display: none; }
  h1 { font-size: 1.5rem; }
  .panel { padding: 14px; }
  .subnav-inner { padding-block: 0 10px; }
  .tabs { width: calc(100% + 32px); margin-inline: -16px; padding-inline: 8px; overflow-x: auto; scrollbar-width: none; scroll-snap-type: x proximity; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab { flex: none; justify-content: center; margin-block: 0; padding: 12px; scroll-snap-align: start; }
  .tally.four { grid-template-columns: 1fr 1fr; }
  .tally.four .tally-item + .tally-item { border-top: 0; }
  .tally.four .tally-item:nth-child(n+3) { border-top: 1px solid var(--line); }
  .tally.four .tally-item:nth-child(even) { border-left: 1px solid var(--line); }
  .panel-tools, .panel-tools .field, .panel-tools select { width: 100%; }
  .run-list li { flex-direction: column; align-items: flex-start; }
  .fc-wrap, .vf-wrap { border: 0; overflow: visible; }
  .fc-table, .vf-table { display: block; min-width: 0; }
  .fc-table thead, .vf-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .fc-table tbody, .vf-table tbody { display: grid; gap: 10px; }
  .fc-table tr, .vf-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 9px; padding: 6px; }
  .fc-table td, .vf-table td { border: 0; padding: 6px 8px; text-align: left !important; width: auto; }
  .fc-table td:first-child, .fc-table td:last-child, .vf-table td:first-child, .vf-table td:nth-child(2), .vf-table td:last-child { grid-column: 1 / -1; }
  .fc-table tr.short { border-color: #f6cdb8; background: #fff7f3; }
  .fc-table td[data-label]::before, .vf-table td[data-label]::before { display: block; content: attr(data-label); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 3px; }
  .row-actions { white-space: normal; }
  .row-actions .inline-form { min-width: 0; }
  .pay-top { flex-direction: column; }
  .pay-info { grid-template-columns: minmax(0, 1fr); }
  .pay-info > div:nth-child(2) { order: 0; }
  .pay-actions > button { flex: 1 1 auto; }
  .bubble { max-width: 88%; }
  .cek-row { flex-direction: column; }
  .cek-data { grid-template-columns: minmax(0, 1fr); }
  .subnav .reviewer { width: 100%; grid-template-columns: auto minmax(0, 1fr); grid-auto-flow: row; }
  .subnav .reviewer input { width: 100%; }
  .doc-head { flex-direction: column; }
  .doc-actions { justify-content: stretch; }
  .doc-actions > button { flex: 1 1 auto; }
  .tally { grid-template-columns: 1fr; }
  .tally-item + .tally-item { border-left: 0; border-top: 1px solid var(--line); }
  .run-controls > * { flex: 1 1 auto; }
  #reminders .table-wrap { border: 0; overflow: visible; }
  #outcomes td:nth-child(2) { white-space: normal; }
  .reminder-table { display: block; min-width: 0; }
  .reminder-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .reminder-table tbody { display: grid; gap: 10px; }
  .reminder-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 9px; padding: 6px; }
  .reminder-table td { border: 0; padding: 6px 8px; width: auto !important; }
  .reminder-table td:nth-child(1), .reminder-table td:nth-child(4), .reminder-table td:nth-child(5) { grid-column: 1 / -1; }
  .reminder-table td::before { display: block; content: attr(data-label); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 3px; }
}
@container (max-width: 760px) {
  .money { grid-template-columns: minmax(0, 1fr); }
}
@container (max-width: 640px) {
  .items-wrap { border: 0; overflow: visible; }
  .items-table { display: block; min-width: 0; }
  .items-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .items-table tbody { display: grid; gap: 10px; }
  .items-table tr { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line); border-radius: 9px; padding: 6px; }
  .items-table tr.needs-attention { background: #fffaeb; }
  .items-table td { border: 0; padding: 6px 8px; text-align: left !important; }
  .items-table td:nth-child(1) { grid-column: 1 / -1; }
  .items-table td::before { display: block; content: attr(data-label); font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-2); margin-bottom: 3px; }
  .num-input.qty, .num-input.price { width: 100%; }
}
@container (max-width: 420px) {
  .fees-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fee-row { grid-template-columns: minmax(0, 1fr) 110px; }
  .fee-row button { grid-column: 1 / -1; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
