/* Stock Opname by Gravita Tech. Token dari Design Brief v0.3 Bagian 2; huruf Carlito disajikan sendiri (Bagian 4). */
@font-face { font-family: 'Carlito'; src: url('../assets/fonts/carlito-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Carlito'; src: url('../assets/fonts/carlito-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

:root {
  --primary: #E07B00; --primary-deep: #F08A10; --on-primary: #0C1844; --accent-text: #B85C00;
  --bg: #F5F7FB; --surface: #FFFFFF; --ink: #0C1844; --gray: #46506B; --line: #D6DCE8; --line-input: #46506B; --focus: #B85C00;
  --navy: #0C1844; --on-navy: #FFFFFF; --on-navy-muted: #C8D2EA;
  --bad: #9B2C22; --bad-bg: #FBE9E7; --wait: #8A4B08; --wait-bg: #FDF0E1; --wait-strong: #B45F0A; --on-wait-strong: #FFFFFF;
  --info: #1D4E89; --info-bg: #E6EEF8; --ok: #2F6B12; --ok-bg: #EAF3E3; --todo: #3D4845; --todo-bg: #EEF0EF;
  --shadow: 0 1px 2px rgba(12, 24, 68, .06), 0 8px 24px rgba(12, 24, 68, .06);
  --r: 12px; --font: 'Carlito', Calibri, 'Segoe UI', Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --primary: #E07B00; --primary-deep: #F08A10; --on-primary: #0C1844; --accent-text: #F2A54A;
    --bg: #0A1030; --surface: #111A42; --ink: #EEF1FA; --gray: #B4BED8; --line: #27326A; --line-input: #8A96C0; --focus: #F2A54A;
    --navy: #060B24; --on-navy: #FFFFFF; --on-navy-muted: #B4BED8;
    --bad: #F2A196; --bad-bg: #3D1C18; --wait: #F0B866; --wait-bg: #3A2A12; --wait-strong: #F0B866; --on-wait-strong: #0A1030;
    --info: #9DC0EE; --info-bg: #182A40; --ok: #A6D88A; --ok-bg: #1F3315; --todo: #C3CCC8; --todo-bg: #252F2C;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --primary: #E07B00; --primary-deep: #F08A10; --on-primary: #0C1844; --accent-text: #F2A54A;
  --bg: #0A1030; --surface: #111A42; --ink: #EEF1FA; --gray: #B4BED8; --line: #27326A; --line-input: #8A96C0; --focus: #F2A54A;
  --navy: #060B24; --on-navy: #FFFFFF; --on-navy-muted: #B4BED8;
  --bad: #F2A196; --bad-bg: #3D1C18; --wait: #F0B866; --wait-bg: #3A2A12; --wait-strong: #F0B866; --on-wait-strong: #0A1030;
  --info: #9DC0EE; --info-bg: #182A40; --ok: #A6D88A; --ok-bg: #1F3315; --todo: #C3CCC8; --todo-bg: #252F2C;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 10px 28px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--bg); color: var(--ink);
  font: 400 16px/1.5 var(--font); font-variant-numeric: tabular-nums; -webkit-tap-highlight-color: transparent; }
main { flex: 1; outline: none; }
h1 { font-size: 34px; line-height: 1.2; margin: 0 0 6px; text-wrap: balance; }
h2 { font-size: 22px; line-height: 1.3; margin: 0 0 12px; text-wrap: balance; }
p { margin: 0 0 12px; }
a { color: inherit; text-decoration-color: var(--primary); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.muted { color: var(--gray); }
.small { font-size: 14px; line-height: 1.4; }
.lead { font-size: 18px; color: var(--gray); max-width: 68ch; }
.code { font-weight: 700; margin-right: 6px; }

/* ---------- Bilah demo ---------- */
.demo-bar { background: var(--navy); color: var(--on-navy); font-size: 15px; border-bottom: 3px solid var(--primary); }
.demo-inner { max-width: 1240px; margin: 0 auto; padding: 8px 24px; display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.demo-note { margin: 0; color: var(--on-navy-muted); }
.demo-left { display: flex; align-items: center; gap: 8px 16px; flex-wrap: wrap; min-width: 0; }
/* Tombol bagikan di bilah demo: warna bilah navy, tinggi sama dengan tombol bilah lain; menu memakai warna aplikasi. */
.demo-bar .gshare-btn { min-height: 36px; padding: 4px 12px; font-size: 17px; font-weight: 700; color: var(--on-navy); border-color: rgba(255, 255, 255, .35); border-radius: 8px; }
.demo-bar .gshare-btn:hover { color: var(--on-navy); border-color: var(--primary); }
.demo-bar .gshare-btn svg { width: 16px; height: 16px; }
.gshare-menu { background: var(--surface); color: var(--ink); border-color: var(--line); }
.gshare-item:hover, .gshare-item:focus-visible { background: var(--bg); color: var(--ink); }
.gshare-copy { border-top-color: var(--line); }
.demo-home { display: inline-flex; align-items: center; text-decoration: none; white-space: nowrap; }
.demo-home::before { content: '\2190'; margin-right: 6px; color: var(--primary); font-family: var(--font); }
.demo-tag { display: inline-block; font-weight: 700; color: var(--navy); background: var(--primary); border-radius: 6px; padding: 1px 8px; margin-right: 6px; }
.demo-menu > summary { display: none; }
.demo-controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; overflow: hidden; }
.seg button { font: inherit; font-weight: 700; color: var(--on-navy); background: transparent; border: 0; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--on-navy); color: #0C1844; }
.demo-btn { font: inherit; font-weight: 700; color: var(--on-navy); background: transparent; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; padding: 6px 12px; min-height: 36px; cursor: pointer; }
.demo-btn:hover, .seg button:hover { border-color: var(--primary); }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; min-height: 36px; }
.switch input { appearance: none; width: 38px; height: 22px; border-radius: 11px; background: rgba(255, 255, 255, .25); position: relative; margin: 0; cursor: pointer; transition: background .2s; }
.switch input::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #FFFFFF; transition: transform .2s; }
.switch input:checked { background: var(--primary); }
.switch input:checked::after { transform: translateX(16px); }
.demo-bar :focus-visible { outline-color: var(--primary); }
/* Bahasa Jepang (butir 17, 1 Nov 2026): bentuk huruf Jepang, bukan Tionghoa; Carlito tetap untuk huruf Latin. */
[lang="ja"] { font-family: "Carlito", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif; line-break: strict; word-break: auto-phrase; }
/* Menu bagikan dipasang share.js di luar bilah demo (tanpa lang="ja"): huruf Jepang yang sama untuk "リンクをコピー". */
.gshare-menu { font-family: "Carlito", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic UI", "Yu Gothic", Meiryo, sans-serif; }

/* ---------- Kepala dan kaki halaman ---------- */
.app-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.hdr { max-width: 1240px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand:hover { color: var(--ink); }
.logo-chip { display: inline-flex; align-items: center; flex: none; }
.logo-chip img { height: 36px; width: auto; display: block; }
.wordmark { font-size: 28px; font-weight: 700; line-height: 1.1; padding-left: 14px; border-left: 1px solid var(--line); }
.hdr-right { display: flex; align-items: center; gap: 12px; flex: none; }
.who { display: flex; align-items: center; gap: 10px; }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--navy); color: #FFFFFF; font-weight: 700; flex: none; }
:root[data-theme="dark"] .avatar { background: #EEF1FA; color: #0A1030; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .avatar { background: #EEF1FA; color: #0A1030; } }
.avatar-none { background: var(--gray) !important; color: var(--surface) !important; }
.who-text { display: flex; flex-direction: column; line-height: 1.25; font-size: 15px; }
.who-text span { color: var(--gray); font-size: 14px; }
.btn-ghost { font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); background: transparent; border: 1px solid var(--line-input); border-radius: 8px; min-height: 40px; padding: 0 14px; cursor: pointer; }
.btn-ghost:hover { border-color: var(--primary); }
.app-footer { border-top: 1px solid var(--line); background: var(--surface); }
.ftr { max-width: 1240px; margin: 0 auto; padding: 16px 24px; display: flex; justify-content: space-between; gap: 8px 24px; flex-wrap: wrap; font-size: 14px; color: var(--gray); }

/* ---------- Tata letak dan kartu ---------- */
.wrap { max-width: 1240px; margin: 0 auto; padding: 32px 24px 56px; }
.wrap.narrow { max-width: 760px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 24px; box-shadow: var(--shadow); }
.card-flush { padding: 0; overflow: hidden; }
.card-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; padding: 18px 24px; border-bottom: 1px solid var(--line); }
.card-title h2 { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; margin-top: 20px; }
.side { display: flex; flex-direction: column; gap: 20px; }
.back { display: inline-block; font-weight: 700; margin-bottom: 14px; text-decoration: none; min-height: 24px; }
.back::before { content: '\2190'; margin-right: 6px; color: var(--accent-text); }
.title-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; } /* SO-014: jarak ke paragraf di bawah, sama dengan margin h1 (0 0 6px), juga saat chip turun ke baris kedua */
.title-row h1 { margin: 0; }
.eyebrow { font-size: 14px; font-weight: 700; color: var(--wait); margin: 0 0 4px; }

/* ---------- Tombol dan isian ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 20px; border-radius: 8px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-deep); color: var(--on-primary); }
.btn-secondary { background: transparent; color: var(--ink); border-color: var(--line-input); }
.btn-secondary:hover { border-color: var(--primary); color: var(--ink); }
.btn-block { width: 100%; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 15px; }
.btn-link { font: inherit; font-size: 15px; font-weight: 700; color: var(--ink); background: none; border: 0; padding: 6px 0; cursor: pointer; text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; min-height: 32px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field .label { font-size: 14px; font-weight: 700; }
.field .btn-link { align-self: flex-start; }
.cols-wide { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); }
.nowrap, td:first-child b { white-space: nowrap; }
input[type="email"], input[type="password"], input[type="text"], input[type="number"] {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-input); border-radius: 8px; min-height: 48px; padding: 0 14px; width: 100%; }
.err { color: var(--bad); background: var(--bad-bg); border-radius: 8px; padding: 10px 14px; margin: 0 0 12px; font-weight: 700; }
.note { border-radius: 10px; padding: 12px 16px; margin: 0 0 16px; }
.note-wait { background: var(--wait-bg); color: var(--wait); }

/* ---------- Chip status: teks selalu tertulis (Design Brief Bagian 2) ---------- */
.chip { display: inline-block; white-space: nowrap; border-radius: 999px; padding: 3px 12px; font-size: 14px; font-weight: 700; line-height: 1.4; }
.chip-ok { color: var(--ok); background: var(--ok-bg); }
.chip-wait { color: var(--wait); background: var(--wait-bg); }
.chip-info { color: var(--info); background: var(--info-bg); }
.chip-todo { color: var(--todo); background: var(--todo-bg); }
.chip-bad { color: var(--bad); background: var(--bad-bg); }

/* ---------- ARK-SCR-001 Masuk ---------- */
.signin { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 20px; align-items: start; }
.signin-form { position: sticky; top: 20px; }
.acct-list { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.acct { border: 1px solid var(--line); border-radius: 10px; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.acct-head { display: flex; flex-direction: column; line-height: 1.3; }
.acct-head span { color: var(--gray); font-size: 15px; }
.acct-cred { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; font-size: 15px; }
.acct-cred div { display: contents; }
.acct-cred dt { color: var(--gray); }
.acct-cred dd { margin: 0; font-weight: 700; word-break: break-all; }
.acct .btn { margin-top: auto; min-height: 44px; }

/* ---------- ARK-SCR-005 Beranda Klien ---------- */
.client-head { display: flex; justify-content: space-between; align-items: center; gap: 16px 40px; flex-wrap: wrap; }
.client-head h1 { margin-bottom: 4px; }
.client-head .lead { margin: 0; }
.progress-box { display: flex; flex-direction: column; gap: 8px; min-width: 240px; }
.bar { display: block; height: 8px; border-radius: 4px; background: var(--todo-bg); overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--primary); border-radius: 4px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { display: flex; align-items: center; gap: 14px; padding: 12px 24px; border-top: 1px solid var(--line); }
.step:first-child { border-top: 0; }
.step-active { background: var(--wait-bg); }
.step-active .chip-wait { background: var(--surface); }
.dot { width: 34px; height: 34px; flex: none; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px; background: var(--todo-bg); color: var(--todo); }
.dot-done { background: var(--navy); color: #FFFFFF; }
:root[data-theme="dark"] .dot-done { background: #EEF1FA; color: #0A1030; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .dot-done { background: #EEF1FA; color: #0A1030; } }
.dot-active { background: var(--wait-strong); color: var(--on-wait-strong); }
.step-text { flex: 1; display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.step-text span { font-size: 14px; color: var(--gray); }
.step-text b { font-weight: 400; }
.step-active .step-text b { font-weight: 700; }
.now { border-top: 4px solid var(--primary); }
.kv { list-style: none; margin: 0 0 16px; padding: 0; }
.kv-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv-row:last-child { border-bottom: 0; }

/* ---------- ARK-SCR-008 Menghitung ---------- */
.loc-list { list-style: none; margin: 8px 0 16px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.loc { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; text-decoration: none; min-height: 72px; box-shadow: var(--shadow); transition: border-color .15s; }
.loc:hover { border-color: var(--primary); color: var(--ink); }
.loc-main { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.loc-main b { font-size: 20px; }
.loc-main span { color: var(--gray); font-size: 15px; }
.items { list-style: none; margin: 0; padding: 0; }
.item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 20px; border-top: 1px solid var(--line); }
.item:first-child { border-top: 0; }
.item-name { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.item-name b { font-size: 17px; }
.item-name span { color: var(--gray); font-size: 14px; }
.stepper { display: flex; align-items: center; flex: none; }
.step-btn { width: 48px; height: 48px; font: inherit; font-size: 22px; font-weight: 700; color: var(--ink); background: var(--surface); border: 1px solid var(--line-input); cursor: pointer; }
.step-btn:first-child { border-radius: 8px 0 0 8px; }
.step-btn:last-child { border-radius: 0 8px 8px 0; }
.step-btn:hover { border-color: var(--primary); }
.qty { width: 96px !important; text-align: center; border-radius: 0 !important; border-left: 0 !important; border-right: 0 !important; font-size: 18px !important; font-weight: 700; -moz-appearance: textfield; }
.qty::-webkit-outer-spin-button, .qty::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.qty-read { font-weight: 700; font-size: 17px; white-space: nowrap; }
.sign-card, .signed { margin-top: 20px; }
.sig { width: 100%; height: 160px; display: block; border: 1px dashed var(--line-input); border-radius: 10px; background: #FFFFFF; touch-action: none; cursor: crosshair; color: #0C1844; }
/* 2A: tanda tangan dengan mengetik nama */
.sig-type { margin-top: 12px; }
.sig-type label { display: block; font-size: 14px; color: var(--gray); margin-bottom: 4px; }
.sig-type-row { display: flex; gap: 8px; align-items: stretch; }
.sig-type-row input { flex: 1 1 auto; min-width: 0; }
.sig-type-row .btn { flex: none; }
.sig-img { display: block; max-width: 100%; height: 120px; object-fit: contain; border: 1px solid var(--line); border-radius: 10px; background: #FFFFFF; margin: 0 0 16px; }
.facts { margin: 0 0 16px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.facts dt { font-size: 14px; color: var(--gray); }
.facts dd { margin: 0; font-weight: 700; }

/* ---------- ARK-SCR-003 Dasbor TAS ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; display: flex; flex-direction: column; gap: 4px; box-shadow: var(--shadow); }
.tile span { color: var(--gray); font-size: 15px; }
.tile b { font-size: 34px; line-height: 1.1; }
.tile-wait b { color: var(--wait); } .tile-info b { color: var(--info); } .tile-ok b { color: var(--ok); } .tile-todo b { color: var(--todo); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th { text-align: left; font-size: 14px; color: var(--gray); font-weight: 700; padding: 10px 16px; background: var(--bg); white-space: nowrap; }
td { padding: 12px 16px; border-top: 1px solid var(--line); vertical-align: top; }
td .sub, .arrival .sub { display: block; color: var(--gray); font-size: 14px; }
.num { text-align: right; }
td.bad { color: var(--bad); font-weight: 700; }
.arrivals { list-style: none; margin: 0; padding: 0; }
.arrival { border-top: 1px solid var(--line); }
.arrival summary { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px 0; cursor: pointer; list-style: none; }
.arrival summary::-webkit-details-marker { display: none; }
.counts { list-style: none; margin: 0 0 12px; padding: 0; font-size: 15px; }
.counts li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }

/* ---------- Tahap penyesuaian: selisih, rekonsiliasi, jurnal, persetujuan ---------- */
.step-skip .step-text b, .step-skip .dot { opacity: .7; }
.now-info { border-top-color: var(--info); }
.now-ok { border-top-color: var(--ok); }
.eyebrow-info { color: var(--info); }
.eyebrow-ok { color: var(--ok); }
textarea { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-input); border-radius: 8px; padding: 10px 14px; width: 100%; resize: vertical; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.file-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.file-btn { position: relative; }
.file-btn:focus-within { outline: 2px solid var(--focus); outline-offset: 2px; }
.note-info { background: var(--info-bg); color: var(--info); }
.note-ok { background: var(--ok-bg); color: var(--ok); }
.note-bad { background: var(--bad-bg); color: var(--bad); }
.note a { color: inherit; font-weight: 700; }
.diffs { list-style: none; margin: 8px 0 20px; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.diff { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 20px; box-shadow: var(--shadow); }
.diff-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.diff-head b { font-size: 18px; }
.diff-head .sub, .reason .sub, .tile .sub { display: block; color: var(--gray); font-size: 14px; }
.diff-nums { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 12px 0; }
.diff-nums dt { font-size: 14px; color: var(--gray); }
.diff-nums dd { margin: 0; font-weight: 700; }
.neg { color: var(--bad); }
.pos { color: var(--ok); }
.reason { margin: 0; }
.diff .field { margin: 12px 0 0; }
.action-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--primary); border-radius: var(--r); padding: 16px 20px; margin: 20px 0; box-shadow: var(--shadow); }
.action-bar p { margin: 0; flex: 1 1 320px; }
.tiles + .note, .tiles + .action-bar { margin-top: 20px; }
.tile-bad b { color: var(--bad); }
.tile b.money { font-size: 28px; }
td.neg, td.pos { font-weight: 700; }
.reason-cell { min-width: 220px; }
tr.total td { background: var(--bg); border-top: 2px solid var(--line-input); }
.reject { margin-top: 16px; }
.reject > summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; }
.reject[open] > summary { margin-bottom: 12px; }
.row-link { text-decoration: none; }
.row-link b { text-decoration: underline; text-decoration-color: var(--primary); text-underline-offset: 3px; }
.todo-item { padding: 4px 0 8px; border-top: 0; }
.todo-item p { margin: 0 0 12px; }
.wrap > .card.card-flush { margin-top: 20px; }
.wrap > .card + .muted.small { margin-top: 12px; }
.wrap.mid { max-width: 980px; }
.reject > summary { list-style: none; justify-content: space-between; }
.reject > summary::-webkit-details-marker { display: none; }
.reject > summary::after { content: '\25BE'; color: var(--accent-text); }
.reject[open] > summary::after { content: '\25B4'; }

/* Uji cut-off, kondisi stok, penilaian, berita acara */
select { font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); border: 1px solid var(--line-input); border-radius: 8px; min-height: 48px; padding: 0 12px; }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }
.action-bar .btn-row { flex: 0 1 auto; }
.t1-row { align-items: flex-start; flex-wrap: wrap; }
.t1-row .item-name { flex: 1 1 280px; }
.t1-row .item-name span { margin-top: 2px; }
.t1-input { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 8px; flex: 1 1 100%; }
.t1-input textarea { resize: none; overflow: hidden; } /* SO-014: tingginya diatur skrip mengikuti isi (p2.js tumbuh) */
.t1-row > .chip + .sub, .t1-row .sub { display: block; color: var(--gray); font-size: 14px; max-width: 320px; text-align: right; }
.kv-col { flex-direction: column; align-items: stretch; gap: 4px; }
.kv-col input { margin-top: 2px; }
.cond { align-items: flex-start; }
.cond .sub { display: block; color: var(--gray); font-size: 14px; margin-top: 2px; }
.cond-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; flex: none; }
.check { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; min-height: 32px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--primary); }
.add-row { margin: 16px 0; }
.add-row > summary { cursor: pointer; font-weight: 700; min-height: 32px; display: flex; align-items: center; justify-content: space-between; list-style: none; }
.add-row > summary::-webkit-details-marker { display: none; }
.add-row > summary::after { content: '\25BE'; color: var(--accent-text); }
.add-row[open] > summary { margin-bottom: 12px; }
.add-row[open] > summary::after { content: '\25B4'; }
.add-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 0 12px; }
.add-wide { grid-column: 1 / -1; }
.wrap.narrow > .card + .card, .wrap.narrow > .card + .btn, .wrap.narrow > div + .btn { margin-top: 16px; }
.tiles-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.num-in { width: 120px; min-height: 40px !important; text-align: right; }
/* SO-014: isian estimasi harga jual dengan awalan Rp dan titik ribuan */
.num-field { display: flex; align-items: center; gap: 8px; }
.num-field .num-rp { flex: none; color: var(--gray); font-weight: 700; }
.num-field .num-in { flex: 1 1 auto; min-width: 0; }
.facts-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.doc-row { align-items: flex-start; }
.reco { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 10px; }
.reco li::marker { color: var(--accent-text); font-weight: 700; }
.kv-row .sub { display: block; color: var(--gray); font-size: 14px; }
.step select { min-height: 40px; flex: none; }
.step-text a { color: var(--ink); }

/* ---------- Pesan dan tur ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); max-width: min(560px, calc(100vw - 32px)); background: var(--navy); color: #FFFFFF; border-radius: 10px; padding: 12px 18px; font-weight: 700; box-shadow: var(--shadow); opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; z-index: 40; border-left: 4px solid var(--primary); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
/* Kotak tur hijau, sama di tema terang dan gelap (Project Director 1A, 31 Okt 2026; green-tour-box-spec.md). */
.tour-spot { position: fixed; z-index: 60; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(6, 11, 36, .55); outline: 3px solid #2F7A60; pointer-events: none; transition: top .2s, left .2s, width .2s, height .2s; }
.tour-pop { position: fixed; z-index: 61; width: min(360px, calc(100vw - 16px)); background: #0E4D3B; color: #FFFFFF; border-radius: 12px; padding: 18px 20px; box-shadow: 0 12px 40px rgba(6, 11, 36, .35); border: 1px solid #2F7A60; }
.tour-pop.tour-center { left: 50%; top: 50%; transform: translate(-50%, -50%); }
.tour-pop h2 { font-size: 20px; margin-bottom: 6px; color: #FFFFFF; }
.tour-pop p { font-size: 16px; color: #FFFFFF; }
.tour-pop .tour-count { font-size: 15px; font-weight: 400; color: #FFFFFF; margin: 0 0 4px; }
.tour-pop p.tour-note { font-size: 15px; color: #FFFFFF; background: rgba(255, 255, 255, .12); border-radius: 8px; padding: 6px 10px; margin: 2px 0 8px; }
.tour-pop .btn-primary { background: #FFFFFF; color: #0E4D3B; font-size: 17px; font-weight: 700; }
.tour-pop .btn-primary:hover { background: #E8F3EF; color: #0E4D3B; }
.tour-pop .btn-secondary { background: transparent; color: #FFFFFF; border: 1.5px solid rgba(255, 255, 255, .7); font-size: 17px; font-weight: 700; }
.tour-pop .btn-secondary:hover { background: rgba(255, 255, 255, .12); color: #FFFFFF; border-color: rgba(255, 255, 255, .7); }
.tour-pop .btn-link { color: #FFFFFF; font-size: 16px; font-weight: 400; text-decoration-color: #FFFFFF; }
.tour-pop :focus-visible { outline: 2px solid #FFFFFF; outline-offset: 2px; }
.tour-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 8px; }
.tour-nav { display: flex; gap: 8px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* ---------- Layar sempit ---------- */
@media (max-width: 900px) {
  .demo-inner { padding: 8px 16px; }
  .demo-menu { width: 100%; }
  .demo-menu > summary { display: inline-flex; align-items: center; min-height: 36px; font-weight: 700; cursor: pointer; list-style: none; border: 1px solid rgba(255, 255, 255, .35); border-radius: 8px; padding: 4px 12px; }
  .demo-menu > summary::-webkit-details-marker { display: none; }
  .demo-menu > summary::after { content: '\25BE'; margin-left: 8px; }
  .demo-menu[open] > summary::after { content: '\25B4'; }
  .demo-menu[open] .demo-controls { margin-top: 10px; }
  .cols, .cols-wide, .signin { grid-template-columns: 1fr; }
  .cols > .side { order: -1; }
  .signin-form { position: static; }
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .lead { font-size: 17px; }
  .hdr { padding: 10px 16px; gap: 10px; flex-wrap: wrap; }
  .logo-chip img { height: 28px; }
  .wordmark { font-size: 18px; padding-left: 10px; }
  .hdr-right { width: 100%; justify-content: space-between; }
  .who-text span { display: none; }
  .wrap { padding: 20px 16px 40px; }
  .card { padding: 16px; }
  .card.card-flush { padding: 0; }
  .card-title, .step { padding-left: 16px; padding-right: 16px; }
  .acct-list { grid-template-columns: 1fr; }
  .item { padding: 12px 16px; flex-wrap: wrap; }
  .item-name { flex: 1 1 100%; }
  .stepper { width: 100%; }
  .stepper .qty { flex: 1; width: auto !important; }
  .step-btn { width: 64px; height: 52px; }
  .stepper .qty { min-height: 52px; }
  .facts { grid-template-columns: 1fr; }
  .signin > section:last-child { order: -1; }
  .diff { padding: 14px 16px; }
  .t1-row { flex-direction: column; align-items: stretch; }
  .t1-row .item-name { flex: none; }
  .t1-input { grid-template-columns: 1fr; width: 100%; }
  .t1-row .sub { text-align: left; max-width: none; }
  .tiles-3 { grid-template-columns: 1fr; }
  .cond { flex-direction: column; }
  .cond-right { flex-direction: row; align-items: center; justify-content: space-between; width: 100%; }
  .add-grid { grid-template-columns: 1fr; }
  .btn-row .btn { flex: 1 1 100%; }
  .facts-2 { grid-template-columns: 1fr; }
  .diff-nums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .action-bar .btn { width: 100%; }
  .table-wrap tr.total td:empty { display: none; }
  .reason-cell { min-width: 0; }
  .table-wrap td.reason-cell { flex-direction: column; gap: 2px; }
  .table-wrap thead { display: none; }
  .table-wrap table, .table-wrap tbody, .table-wrap tr, .table-wrap td { display: block; }
  .table-wrap tr { padding: 12px 16px; border-top: 1px solid var(--line); }
  .table-wrap td { border: 0; padding: 3px 0; text-align: right; display: flex; justify-content: space-between; gap: 12px; }
  .table-wrap td.reason-cell { text-align: left; }
  .table-wrap td:first-child:not([data-label]) { display: block; padding-bottom: 6px; text-align: left; }
  .tile b.money { font-size: 22px; white-space: nowrap; }
  .btn-ghost { white-space: nowrap; }
  .who { min-width: 0; }
  .who-text b { display: block; max-width: 112px; }
  .table-wrap td[data-label]::before { content: attr(data-label); color: var(--gray); font-size: 14px; flex: none; white-space: nowrap; text-align: left; }
  td:first-child b { white-space: normal; }
  .progress-box { min-width: 0; width: 100%; }
  .loc { padding: 14px 16px; }
  .ftr { padding: 14px 16px; }
}
