:root {
  /* Brand Hitungtukang (dokumen produk bagian 5): oranye bata + abu semen, terang. Tegas · teliti · orang lapangan. */
  --brand: #D9480F; --brand2: #B83C0B; --aksen: #495057; --sukses: #2B8A3E; --peringatan: #E8A100; --bahaya: #C92A2A;
  --bg: #F8F6F2; --bg-gelap: #1B1A18; --teks: #1F1D1A;
  --panel: #FFFFFF; --panel2: #F1EDE6; --line: #E3DDD3; --muted: #6B6560;
  --brandSoft: #FCE8DD; --on-brand: #FFFFFF; --aksenSoft: #E9ECEF; --okSoft: #E3F2E6; --warnSoft: #FFF4D6; --warnText: #8A5D00; --dangerSoft: #FBE3E3;
  --font-judul: "Archivo", ui-sans-serif, system-ui, sans-serif;
  --font-isi: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --r: 14px; --shadow: 0 1px 2px rgba(31, 29, 26, .06);
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: var(--bg-gelap); --teks: #F1ECE4; --panel: #24221F; --panel2: #2E2B27; --line: #3A3631; --muted: #A59E94;
  --brand: #F06A2E; --brand2: #FF7F45; --aksen: #ADB5BD; --brandSoft: #3A2419; --aksenSoft: #2F3236; --okSoft: #183020; --sukses: #51CF66;
  --warnSoft: #3A2F12; --warnText: #FFD43B; --dangerSoft: #3A1C1C; --bahaya: #FF8787; --shadow: none;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--teks); font: 15px/1.5 var(--font-isi); -webkit-text-size-adjust: 100%; }
a { color: var(--brand); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; font-family: var(--font-judul); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.3rem; } h3 { font-size: 1.05rem; font-weight: 700; }
small, .muted { color: var(--muted); }
[hidden] { display: none !important; }
.mono, .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.num { font-weight: 600; }
.r { text-align: right; }

.boot { min-height: 100vh; display: grid; place-content: center; text-align: center; gap: 12px; color: var(--muted); }
.logo-mark { width: 38px; height: 38px; border-radius: 10px; display: block; flex: none; }
.logo-mark.big { width: 72px; height: 72px; margin: 0 auto; }

.shell { display: grid; grid-template-columns: 252px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; overflow-y: auto; background: var(--panel); border-right: 1px solid var(--line); padding: 16px 12px; display: flex; flex-direction: column; z-index: 20; }
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 14px; color: var(--teks); }
.brand b { display: block; font-family: var(--font-judul); font-weight: 800; font-size: 19px; } .brand small { font-size: 12px; }
.nav-h { font-size: 11px; letter-spacing: .1em; font-weight: 700; color: var(--muted); margin: 16px 10px 6px; }
.nav-a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--teks); font-size: 14px; }
.nav-a:hover { background: var(--panel2); }
.nav-a.on { background: var(--brandSoft); color: var(--brand); font-weight: 700; }
.nav-a .ic { width: 20px; text-align: center; flex: none; }
.nav-a .n { margin-left: auto; font-size: 12px; color: var(--muted); font-family: var(--font-mono); }
.nav-a .tag { margin-left: auto; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 6px; background: var(--brand); color: var(--on-brand); }
.side-foot { margin-top: auto; padding: 12px 10px 0; font-size: 12px; color: var(--muted); }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 10; display: flex; gap: 10px; align-items: center; padding: 12px 24px; background: color-mix(in srgb, var(--bg) 90%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.search { position: relative; flex: 1; max-width: 560px; }
.search input { width: 100%; padding: 10px 40px 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); outline: none; min-height: 44px; }
.search input:focus { border-color: var(--brand); }
.search kbd { position: absolute; right: 10px; top: 11px; font-size: 12px; border: 1px solid var(--line); border-radius: 6px; padding: 0 6px; color: var(--muted); }
.qres { position: absolute; left: 0; right: 0; top: 50px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.12); max-height: 60vh; overflow: auto; padding: 6px; }
.qres a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--teks); font-size: 14px; }
.qres a:hover { background: var(--panel2); }
.qres .qh { font-size: 11px; font-weight: 700; color: var(--muted); padding: 8px 10px 2px; letter-spacing: .06em; }
.icon-btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; flex: none; font-size: 18px; }
.view { padding: 24px; max-width: 1140px; width: 100%; }
.foot { margin-top: auto; padding: 18px 24px; color: var(--muted); font-size: 12px; border-top: 1px solid var(--line); }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; box-shadow: var(--shadow); }
.card.tight { padding: 12px 14px; }
.grid { display: grid; gap: 14px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat b { display: block; font: 700 1.6rem/1.1 var(--font-mono); color: var(--brand); } .stat span { font-size: 13px; color: var(--muted); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.hero { background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--brand); border-radius: 16px; padding: 22px; }
.mt { margin-top: 18px; } .mb { margin-bottom: 14px; } .mt0 { margin-top: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid transparent; background: var(--brand); color: var(--on-brand); padding: 10px 16px; border-radius: 11px; cursor: pointer; font-weight: 700; font-size: 14px; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--brand2); }
.btn.ghost { background: var(--panel); color: var(--teks); border-color: var(--line); }
.btn.ghost:hover { background: var(--panel2); }
.btn.dark { background: var(--aksen); color: #fff; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 9px; min-height: 38px; }
.btn.big { font-size: 16px; padding: 14px 22px; min-height: 52px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.chip { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--panel2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.chip.ok { background: var(--okSoft); color: var(--sukses); border-color: transparent; }
.chip.brand { background: var(--brandSoft); color: var(--brand); border-color: transparent; }
.chip.warn { background: var(--warnSoft); color: var(--warnText); border-color: transparent; }
.chip.batal { background: var(--dangerSoft); color: var(--bahaya); border-color: transparent; }

label.f { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
.inp, select.inp, textarea.inp { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 11px; background: var(--panel); outline: none; min-height: 46px; font-size: 16px; }
.inp:focus { border-color: var(--brand); }
.inp.num { font-family: var(--font-mono); }
textarea.inp { min-height: 90px; resize: vertical; line-height: 1.5; font-size: 15px; }
.steps { display: flex; gap: 6px; margin: 4px 0 6px; }
.steps div { flex: 1; height: 6px; border-radius: 4px; background: var(--line); }
.steps div.on { background: var(--brand); }
.steplbl { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-bottom: 16px; gap: 4px; }
.steplbl span.on { color: var(--brand); font-weight: 700; }
.disclaimer { background: var(--warnSoft); color: var(--warnText); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.info { background: var(--brandSoft); color: var(--brand); border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.err { color: var(--bahaya); font-size: 13px; margin-top: 6px; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: 14px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0 14px; }
.tabs button { border: 1px solid var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; min-height: 38px; }
.tabs button.on { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.kat { display: flex; gap: 10px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--teks); }
.kat:hover { border-color: var(--brand); } .kat b { display: block; font-size: 14px; } .kat span { font-size: 12px; color: var(--muted); } .kat .ic { font-size: 22px; }

.item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--teks); margin-bottom: 8px; }
a.item:hover { border-color: var(--brand); }
.item .t { font-weight: 600; } .item .s { font-size: 13px; color: var(--muted); }
.item .kode { font-family: var(--font-mono); font-size: 12px; color: var(--brand); min-width: 44px; }
.star { background: none; border: 0; font-size: 20px; cursor: pointer; color: var(--muted); padding: 0 4px; flex: none; margin-left: auto; min-width: 40px; min-height: 40px; }
.star.on { color: #E8A100; }

/* Tabel RAB */
.tbl-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
table.t th { background: var(--brand); color: #fff; text-align: left; font-weight: 700; padding: 8px 10px; font-size: 12px; white-space: nowrap; }
table.t td { padding: 8px 10px; border-top: 1px solid var(--line); vertical-align: top; }
table.t td.n, table.t th.n { text-align: right; font-family: var(--font-mono); white-space: nowrap; }
table.t tr.grp td { background: var(--panel2); font-weight: 700; }
table.t tr.sub td { font-weight: 700; }
table.t tr.tot td { background: var(--brandSoft); color: var(--brand); font-weight: 800; font-size: 15px; }
.big-total { font: 800 2rem/1.1 var(--font-mono); color: var(--brand); }
.ringkas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ringkas div { background: var(--panel2); border-radius: 12px; padding: 10px 12px; }
.ringkas b { display: block; font: 700 1.1rem var(--font-mono); } .ringkas span { font-size: 12px; color: var(--muted); }

/* Wizard ruang */
.ruang { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 14px; margin-bottom: 12px; }
.ruang .ukur { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.ruang .ukur label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
.geo { font-size: 12px; color: var(--muted); margin-top: 8px; display: flex; gap: 10px; flex-wrap: wrap; }
.geo b { color: var(--teks); font-family: var(--font-mono); }
.pilih { display: flex; gap: 8px; flex-wrap: wrap; }
.pilih button { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 8px 12px; cursor: pointer; font-size: 13px; min-height: 40px; text-align: left; }
.pilih.scroll { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.pilih.scroll button { flex: none; white-space: nowrap; }
.pilih button.on { border-color: var(--brand); background: var(--brandSoft); color: var(--brand); font-weight: 700; }
.it-row { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px dashed var(--line); font-size: 14px; }
.it-row .vol { width: 84px; flex: none; }
@media (max-width: 520px) { .it-row { flex-wrap: wrap; } .it-row .grow { flex-basis: calc(100% - 60px); } .it-row .vol { margin-left: 54px; } }
.it-row .x { background: none; border: 0; color: var(--muted); cursor: pointer; font-size: 18px; min-width: 36px; min-height: 36px; }
.mic { background: var(--aksen); color: #fff; border: 0; border-radius: 10px; min-width: 46px; min-height: 46px; cursor: pointer; font-size: 18px; }
.mic.on { background: var(--bahaya); animation: pulse 1s infinite; }
@keyframes pulse { 50% { opacity: .6; } }

/* Jadwal */
.gantt { overflow-x: auto; }
.gantt table { border-collapse: collapse; font-size: 13px; min-width: 100%; }
.gantt td, .gantt th { border: 1px solid var(--line); padding: 6px 8px; text-align: center; white-space: nowrap; }
.gantt td:first-child, .gantt th:first-child { text-align: left; }
.gantt td.on { background: var(--brand); }
.kurva { width: 100%; height: 160px; }

pre.prompt { white-space: pre-wrap; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: 12.5px/1.5 var(--font-mono); max-height: 260px; overflow: auto; }
.modal { position: fixed; inset: 0; background: rgba(27, 26, 24, .55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--panel); border-radius: 18px; padding: 22px; max-width: 620px; width: 100%; max-height: 92vh; overflow: auto; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--teks); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: 14px; z-index: 70; max-width: 92vw; }
.scrim { position: fixed; inset: 0; background: rgba(27, 26, 24, .45); z-index: 19; }
.bottom { position: fixed; bottom: 0; left: 0; right: 0; background: var(--panel); border-top: 1px solid var(--line); display: flex; z-index: 15; padding-bottom: env(safe-area-inset-bottom); }
.bottom a { flex: 1; text-align: center; font-size: 11px; padding: 6px 2px; color: var(--muted); min-height: 56px; }
.bottom a span { display: block; font-size: 20px; line-height: 1.3; }
.bottom a.on { color: var(--brand); font-weight: 700; }
.bottom a.plus span { background: var(--brand); color: #fff; width: 40px; height: 32px; border-radius: 10px; margin: 0 auto; display: grid; place-items: center; font-size: 22px; }
.only-m { display: none; }

@media print {
  .side, .top, .bottom, .foot, .no-print { display: none !important; }
  .shell { display: block; } .view { padding: 0; max-width: none; }
  body { background: #fff; color: #000; }
  table.t th { background: #eee !important; color: #000 !important; }
}
@media (max-width: 520px) {
  table.t .hm { display: none; }
  .lbl-d { display: none; }
  .det-top { flex-wrap: nowrap; } .det-act { flex-wrap: nowrap; gap: 6px; } .det-act select.inp { min-width: 0; }
  table.t td, table.t th { padding: 7px 6px; }
}
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 280px; transform: translateX(-100%); transition: transform .2s; }
  .side.open { transform: none; }
  .only-m { display: inline-flex; } .only-d { display: none; }
  .top { padding: 10px 14px; } .view { padding: 16px 14px 96px; } .foot { padding-bottom: 84px; }
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: 1fr; } .g2 { grid-template-columns: 1fr; }
  .ruang .ukur { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ringkas { grid-template-columns: 1fr 1fr; }
  h1 { font-size: 1.45rem; }
  table.t { font-size: 13px; }
}
