:root {
  /* Brand Proyekin (dokumen produk v2 bagian 5): tegas · rapi · lapangan — oranye rompi proyek + arang, latar kertas */
  --brand: #E8740C; --aksen: #1F2A37; --bg: #F6F4EF; --bg-gelap: #121417; --teks: #1F2A37; --sukses: #15803D; --peringatan: #C2410C; --bahaya: #B91C1C;
  --font-judul: "Barlow Condensed", "Inter", ui-sans-serif, system-ui, sans-serif;
  --font-isi: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --panel: #FFFFFF; --panel2: #EFEBE3; --line: #E2DCD1; --text: var(--teks); --muted: #646B73;
  --brand2: #C9610A; --brandSoft: #FDEBD8; --brandText: #A84F05; --on-brand: #FFFFFF; --aksenSoft: #E6E9EE;
  --okSoft: #DCF2E3; --warnSoft: #FDE8D7; --warnText: #9A3412; --dangerSoft: #FBE1E1; --hujan: #DCE8F5; --hujanText: #1E4E8C;
  --shadow: 0 1px 2px rgba(31,42,55,.05), 0 8px 24px rgba(31,42,55,.06); --r: 10px;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: var(--bg-gelap); --teks: #ECEFF3; --panel: #1C2026; --panel2: #262B33; --line: #343A44; --muted: #A3AAB4;
  --brand: #F08A2C; --brand2: #F6A253; --brandSoft: #3A2716; --brandText: #F6A253; --on-brand: #1A1209; --aksen: #CBD3DE; --aksenSoft: #2A3039;
  --okSoft: #183324; --sukses: #4ADE80; --warnSoft: #3A2414; --warnText: #FDBA74; --dangerSoft: #3B1D1D; --bahaya: #F87171; --hujan: #1C2E45; --hujanText: #9CC3F0;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.55 var(--font-isi); -webkit-text-size-adjust: 100%; }
a { color: var(--brandText); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .45em; font-family: var(--font-judul); letter-spacing: .005em; font-weight: 700; }
h1 { font-size: 2rem; } h2 { font-size: 1.45rem; } h3 { font-size: 1.15rem; }
small, .muted { color: var(--muted); }
[hidden] { display: none !important; }
.mono, .num { font-family: var(--font-mono); }
.num { font-weight: 600; }
.lbl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
svg.i { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -3px; }

.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: 256px 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 12px; color: var(--text); }
.brand b { display: block; font-family: var(--font-judul); font-size: 24px; line-height: 1; letter-spacing: .01em; } .brand small { font-size: 12px; }
.proj-pick { margin: 0 4px 6px; }
.proj-pick select { width: 100%; padding: 8px 10px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel2); font-size: 13px; min-height: 40px; }
.nav-h { font-size: 11px; letter-spacing: .08em; font-weight: 700; color: var(--muted); margin: 14px 10px 6px; font-family: var(--font-mono); }
.nav-a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r); color: var(--text); font-size: 14px; }
.nav-a:hover { background: var(--panel2); }
.nav-a.on { background: var(--brandSoft); color: var(--brandText); font-weight: 600; }
.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); letter-spacing: .03em; }
.nav-a .tag.abu { background: var(--panel2); color: var(--muted); }
.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: var(--r); border: 1px solid var(--line); background: var(--panel); outline: none; min-height: 42px; }
.search input:focus { border-color: var(--brand); }
.search kbd { position: absolute; right: 10px; top: 10px; 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: 48px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); max-height: 60vh; overflow: auto; padding: 6px; }
.qres a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--text); 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; font-family: var(--font-mono); }
.icon-btn { border: 1px solid var(--line); background: var(--panel); border-radius: var(--r); width: 42px; height: 42px; cursor: pointer; flex: none; display: grid; place-items: center; color: var(--text); }
.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.soft { background: var(--panel2); box-shadow: none; }
.card.garis { border-top: 4px solid var(--brand); }
.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: 600 1.7rem/1.1 var(--font-mono); color: var(--text); } .stat span { font-size: 13px; color: var(--muted); }
.stat.oren b { color: var(--brandText); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.mt { margin-top: 18px; } .mb { margin-bottom: 14px; } .mt8 { margin-top: 8px; }

.hero { background: var(--aksen); color: #fff; border-radius: 14px; padding: 22px; position: relative; overflow: hidden; }
:root[data-theme="dark"] .hero { background: #232A33; color: var(--teks); border: 1px solid var(--line); }
.hero h1 { margin-bottom: 4px; color: inherit; }
.hero p { color: rgba(255,255,255,.78); margin: 0; } :root[data-theme="dark"] .hero p { color: var(--muted); }
.hero .stripe { position: absolute; right: 0; top: 0; bottom: 0; width: 120px; background: repeating-linear-gradient(-45deg, var(--brand) 0 14px, transparent 14px 28px); opacity: .9; mask: linear-gradient(90deg, transparent, #000 60%); -webkit-mask: linear-gradient(90deg, transparent, #000 60%); }
.hero .row { position: relative; }

.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: var(--r); cursor: pointer; font-weight: 600; font-size: 14px; text-decoration: none; min-height: 44px; }
.btn:hover { background: var(--brand2); }
.btn.ghost { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn.ghost:hover { background: var(--panel2); }
.btn.gelap { background: var(--aksen); color: #fff; } :root[data-theme="dark"] .btn.gelap { color: #111; }
.btn.putih { background: #fff; color: var(--aksen); } .btn.putih:hover { background: #F3EFE8; }
.btn.sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; min-height: 36px; }
.btn.big { font-size: 16px; padding: 14px 22px; min-height: 52px; }
.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.warn { background: var(--warnSoft); color: var(--warnText); border-color: transparent; }
.chip.danger { background: var(--dangerSoft); color: var(--bahaya); border-color: transparent; }
.chip.brand { background: var(--brandSoft); color: var(--brandText); border-color: transparent; }

label.f { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 6px; }
label.f small { font-weight: 400; }
.inp, select.inp, textarea.inp { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); outline: none; min-height: 44px; }
.inp:focus { border-color: var(--brand); }
textarea.inp { min-height: 120px; resize: vertical; line-height: 1.5; }
.inp.kosong { background: var(--warnSoft); border-color: color-mix(in srgb, var(--peringatan) 50%, var(--line)); }
.steps { display: flex; gap: 6px; margin: 4px 0 18px; }
.steps div { flex: 1; height: 6px; border-radius: 4px; background: var(--line); }
.steps div.on { background: var(--brand); }
.stepname { display: flex; gap: 6px; font-size: 12px; color: var(--muted); margin-bottom: 6px; font-family: var(--font-mono); } .stepname span { flex: 1; } .stepname span.on { color: var(--brandText); font-weight: 600; }
.disclaimer { background: var(--warnSoft); color: var(--warnText); border-radius: var(--r); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; }
.info { background: var(--panel2); color: var(--text); border-radius: var(--r); padding: 10px 14px; font-size: 13px; margin-bottom: 14px; border-left: 4px solid var(--brand); }
.progress { height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; } .progress i { display: block; height: 100%; background: var(--brand); transition: width .3s; }
.empty { text-align: center; padding: 30px 16px; color: var(--muted); border: 1px dashed var(--line); border-radius: var(--r); }
.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: 36px; }
.tabs button.on { background: var(--aksen); color: #fff; border-color: var(--aksen); } :root[data-theme="dark"] .tabs button.on { color: #111; }
.kat { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text); }
.kat:hover { border-color: var(--brand); } .kat b { display: block; font-size: 14px; } .kat span { font-size: 12px; color: var(--muted); }
.kat .ic { width: 40px; height: 40px; border-radius: 10px; background: var(--brandSoft); color: var(--brandText); display: grid; place-items: center; flex: none; }

/* Mic & wizard */
.mic-wrap { display: grid; place-items: center; gap: 10px; padding: 18px 0 8px; text-align: center; }
.mic { width: 112px; height: 112px; border-radius: 50%; border: 0; background: var(--brand); color: #fff; cursor: pointer; display: grid; place-items: center; box-shadow: 0 10px 30px color-mix(in srgb, var(--brand) 40%, transparent); transition: transform .15s; }
.mic svg { width: 46px; height: 46px; stroke-width: 2.2; }
.mic:active { transform: scale(.96); }
.mic.on { background: var(--bahaya); animation: denyut 1.4s infinite; }
@keyframes denyut { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--bahaya) 50%, transparent); } 70% { box-shadow: 0 0 0 22px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.mic-wrap .stat-mic { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.contoh-kal { display: flex; gap: 6px; flex-wrap: wrap; }
.contoh-kal button { border: 1px dashed var(--line); background: var(--panel); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-size: 13px; text-align: left; min-height: 36px; }
.contoh-kal button:hover { border-color: var(--brand); color: var(--brandText); }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
.foto { position: relative; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--panel2); aspect-ratio: 4/3; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto input { position: absolute; left: 0; right: 0; bottom: 0; border: 0; padding: 4px 6px; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; outline: none; }
.foto button { position: absolute; top: 4px; right: 4px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; }
.foto-add { border: 2px dashed var(--line); border-radius: 8px; display: grid; place-items: center; aspect-ratio: 4/3; color: var(--muted); cursor: pointer; text-align: center; font-size: 12px; gap: 4px; background: var(--panel); }
.foto-add:hover { border-color: var(--brand); color: var(--brandText); }

/* Kertas laporan (cek) */
.kertas { background: #fff; color: #1F2A37; border: 1px solid var(--line); border-radius: 6px; padding: 18px; box-shadow: var(--shadow); font-size: 13px; }
:root[data-theme="dark"] .kertas { background: #F4F1EA; }
.kertas h4 { font: 700 18px/1.1 var(--font-judul); text-align: center; margin: 0; letter-spacing: .04em; }
.kertas .sub { text-align: center; font-size: 12px; color: #4B5563; margin: 4px 0 10px; }
.kertas .sec { font: 700 12px var(--font-mono); letter-spacing: .06em; margin: 12px 0 4px; color: #1F2A37; }
.kertas table { width: 100%; border-collapse: collapse; font-size: 12px; }
.kertas th { background: #1F2A37; color: #fff; font-weight: 600; padding: 4px 6px; text-align: left; }
.kertas td { border: 1px solid #C9C3B8; padding: 4px 6px; vertical-align: top; }
.kertas td.n { text-align: right; font-family: var(--font-mono); }
.kertas .cu td { text-align: center; font-size: 11px; padding: 3px 2px; } .kertas .cu td.h { background: #DCE8F5; color: #1E4E8C; } .kertas .cu td.c { background: #FFF1DC; }
.kertas .ttd { display: grid; grid-template-columns: repeat(3, 1fr); text-align: center; margin-top: 16px; font-size: 12px; gap: 6px; } .kertas .ttd b { display: block; margin-top: 40px; }
.kertas .kosong { background: #FDE8D7; color: #9A3412; font-style: italic; }

/* Editor tabel laporan */
.ed { width: 100%; border-collapse: collapse; font-size: 14px; }
.ed td { padding: 3px; vertical-align: top; }
.ed input, .ed select { width: 100%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); min-height: 40px; }
.ed .x { border: 0; background: none; cursor: pointer; color: var(--muted); width: 36px; height: 40px; }
.ed .w-n { width: 92px; } .ed .w-s { width: 84px; } .ed .w-x { width: 40px; } .ed .w-k { width: 110px; }
.cuaca-ed { display: grid; grid-template-columns: repeat(11, minmax(0, 1fr)); gap: 4px; }
.cuaca-ed div { text-align: center; } .cuaca-ed small { display: block; font-family: var(--font-mono); font-size: 11px; }
.cuaca-ed button { width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 8px 0; cursor: pointer; font-size: 11px; background: #FFF1DC; color: #7C4A03; min-height: 44px; }
.cuaca-ed button.h { background: var(--hujan); color: var(--hujanText); } .cuaca-ed button.m { background: var(--panel2); color: var(--muted); }
.blok { border: 1px solid var(--line); border-radius: var(--r); padding: 12px; margin-bottom: 10px; background: var(--panel); }
.blok > .row:first-child { margin-bottom: 6px; } .blok h3 { margin: 0; font-size: 1.05rem; }
.skor { display: flex; gap: 6px; flex-wrap: wrap; }

/* Daftar item */
.item { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--panel); color: var(--text); margin-bottom: 8px; }
a.item:hover { border-color: var(--brand); }
.item .t { font-weight: 600; } .item .s { font-size: 13px; color: var(--muted); margin-top: 2px; }
.item .kode { font-family: var(--font-mono); font-size: 11px; color: var(--brandText); background: var(--brandSoft); padding: 3px 7px; border-radius: 6px; flex: none; margin-top: 2px; }
.star { background: none; border: 0; cursor: pointer; color: var(--muted); padding: 0 4px; flex: none; margin-left: auto; min-width: 36px; min-height: 36px; display: grid; place-items: center; }
.star.on { color: #E0A500; } .star.on svg { fill: #E0A500; }
.aksi-row { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; }
pre.prompt { white-space: pre-wrap; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; font: 13px/1.55 var(--font-mono); max-height: 360px; overflow: auto; }

/* Kalender laporan */
.kal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.kal div { aspect-ratio: 1; border-radius: 8px; display: grid; place-items: center; font-size: 12px; font-family: var(--font-mono); background: var(--panel2); color: var(--muted); }
.kal div.ada { background: var(--brand); color: #fff; font-weight: 700; cursor: pointer; } .kal div.ini { outline: 2px solid var(--aksen); }
.kal .hd { background: none; font-size: 11px; aspect-ratio: auto; }
.kurva { width: 100%; height: auto; background: #fff; border-radius: 8px; border: 1px solid var(--line); }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl td { padding: 8px 6px; border-bottom: 1px solid var(--line); }
.tbl td.n, .tbl th.n { text-align: right; font-family: var(--font-mono); }
.scroll-x { overflow-x: auto; }
.dev-min { color: var(--bahaya); font-weight: 700; } .dev-plus { color: var(--sukses); font-weight: 700; }

.modal { position: fixed; inset: 0; background: rgba(18,20,23,.55); z-index: 50; display: grid; place-items: center; padding: 16px; }
.modal-box { background: var(--panel); border-radius: 14px; padding: 22px; max-width: 600px; width: 100%; max-height: 92vh; overflow: auto; box-shadow: var(--shadow); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--aksen); color: #fff; padding: 10px 16px; border-radius: var(--r); font-size: 14px; z-index: 70; max-width: 92vw; }
:root[data-theme="dark"] .toast { background: #ECEFF3; color: #111; }
.scrim { position: fixed; inset: 0; background: rgba(18,20,23,.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: 8px 2px 6px; color: var(--muted); min-height: 54px; display: grid; justify-items: center; gap: 2px; }
.bottom a svg { width: 22px; height: 22px; }
.bottom a.on { color: var(--brandText); font-weight: 600; }
.bottom a.utama { color: var(--brandText); } .bottom a.utama svg { background: var(--brand); color: #fff; border-radius: 50%; padding: 4px; width: 30px; height: 30px; margin-top: -6px; }
.only-m { display: none; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; width: 284px; 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; }
  h1 { font-size: 1.7rem; }
  .hero .stripe { width: 70px; }
  .cuaca-ed { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .kertas { padding: 12px; } .kertas .ttd { grid-template-columns: 1fr 1fr 1fr; font-size: 10px; }
  .ed .w-n { width: 70px; } .ed .w-s { width: 64px; } .ed .w-k { width: 86px; }
}
.grid > * { min-width: 0; }
.kertas { overflow-x: auto; }
.kertas table.cu { table-layout: fixed; }
.kertas .cu td { font-size: 10px; padding: 3px 0; overflow-wrap: anywhere; }
@media (max-width: 900px) { .kertas .cu td { font-size: 8.5px; } .kertas td, .kertas th { padding: 3px 4px; } }
