/* =====================================================================
   NAS AND SONS GROUP SMART OPERATION — sistem visual
   Sumber: NAS & SONS Brand Guideline Presentation (2026 Edition)
   Palet: Hitam Absolut #121315, Grafit #232629, Putih Lembut #F5F5F3,
          Hijau Biliar #0E6B2F, Emas Kayu #C49A6C.
   Tipografi: Telegraf (judul/navigasi), Aileron (isi). Dipakai bila terpasang
   di perangkat; file font berlisensi belum disediakan (lihat docs/KEPUTUSAN_DAN_ASUMSI.md).
   Elemen khas: potongan sudut diagonal dari monogram "N" (dipakai terbatas).
   ===================================================================== */

@font-face { font-family: "Telegraf"; src: local("Telegraf"), local("Telegraf Bold"), local("Telegraf-Bold"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Telegraf"; src: local("Telegraf"), local("Telegraf Regular"), local("Telegraf-Regular"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Aileron"; src: local("Aileron"), local("Aileron Regular"), local("Aileron-Regular"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Aileron"; src: local("Aileron Bold"), local("Aileron-Bold"); font-weight: 700; font-display: swap; }

:root {
  --ink: #121315;
  --graphite: #232629;
  --paper: #f5f5f3;
  --surface: #ffffff;
  --felt: #0e6b2f;
  --felt-deep: #0a5223;
  --felt-wash: #e8f2eb;
  --wood: #c49a6c;
  --wood-text: #7d5a35;
  --wood-wash: #f6efe6;
  --line: #dedcd6;
  --line-strong: #c9c6be;
  --text: #121315;
  --text-2: #4c4f54;
  --muted: #6a6d72;
  --warn: #8f5300;
  --warn-wash: #fbf0de;
  --danger: #a3261b;
  --danger-wash: #fbe9e7;
  --info: #24527a;
  --info-wash: #e8eff6;
  --focus: #0e6b2f;

  --font-head: "Telegraf", "Aileron", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Aileron", "Segoe UI", "Roboto", "Helvetica Neue", Arial, sans-serif;

  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-md: 0.9375rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fs-2xl: 1.75rem;
  --fs-3xl: 2.25rem;

  --r-panel: 4px;
  --r-control: 6px;
  --rail-w: 252px;
  --cut: 14px;
  --shadow-pop: 0 12px 32px rgba(18, 19, 21, 0.18);
}

/* ---------- Dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-md);
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  font-variant-numeric: tabular-nums;
}
img, svg, video, canvas { display: block; max-width: 100%; }
a { color: var(--felt); text-underline-offset: 2px; }
a:hover { color: var(--felt-deep); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
::selection { background: var(--felt-wash); }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 8px; top: -60px; background: var(--ink); color: #fff; padding: 8px 12px; z-index: 100; }
.skip-link:focus { top: 8px; }

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; margin: 0; letter-spacing: -0.01em; color: var(--ink); }
h1 { font-size: var(--fs-2xl); }
h2 { font-size: var(--fs-xl); }
h3 { font-size: var(--fs-lg); }
h4 { font-size: var(--fs-md); }
p { margin: 0 0 0.75rem; max-width: 72ch; }
.muted { color: var(--muted); }
.small { font-size: var(--fs-sm); }
.xsmall { font-size: var(--fs-xs); }
.num { text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 700; }
.mono-code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.85em; }

/* ---------- Kerangka aplikasi ---------- */
.shell { display: grid; grid-template-columns: var(--rail-w) minmax(0, 1fr); min-height: 100vh; }
/* Kolom rail tetap gelap sepanjang halaman (rail sendiri sticky setinggi layar). */
@media (min-width: 961px) { .shell { background: linear-gradient(90deg, var(--ink) 0 var(--rail-w), transparent var(--rail-w)); } }
.rail {
  background: var(--ink);
  color: #e9e8e4;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--wood); /* inlay kayu cue */
}
.rail-brand { display: flex; align-items: center; gap: 12px; padding: 22px 20px 18px; color: #fff; text-decoration: none; }
.rail-brand img { width: 30px; height: auto; }
.rail-brand span { font-family: var(--font-head); font-weight: 700; font-size: 0.8125rem; line-height: 1.25; letter-spacing: 0.02em; }
.rail-context { margin: 0 14px 10px; padding: 10px 12px; background: var(--graphite); border-radius: var(--r-control); font-size: var(--fs-sm); }
.rail-context .who { color: #fff; font-weight: 700; display: block; }
.rail-context .role { color: var(--wood); }
.rail-switch-label { display: block; color: #9a9a96; font-size: var(--fs-xs); margin: 8px 0 3px; }
.rail-nav { padding: 6px 10px 18px; flex: 1; }
.rail-group { margin-top: 14px; }
.rail-group-label { color: #9a9a96; font-size: var(--fs-xs); padding: 0 10px 6px; }
.rail-link {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; margin: 1px 0;
  color: #d8d7d2; text-decoration: none; border-radius: var(--r-control);
  font-size: var(--fs-md);
}
.rail-link:hover { background: var(--graphite); color: #fff; }
.rail-link[aria-current="page"] {
  background: var(--felt); color: #fff;
  border-radius: 0;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.rail-link .count { margin-left: auto; background: var(--wood); color: var(--ink); border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; padding: 0 7px; }
.rail-foot { padding: 12px 14px 18px; border-top: 1px solid #2c2f33; font-size: var(--fs-sm); color: #a8a7a2; }
.rail-foot form { margin: 0; }
.rail-foot button { background: none; border: 0; color: #d8d7d2; padding: 6px 0; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.main { min-width: 0; display: flex; flex-direction: column; }
/* Pita Mode Review Lokal + topbar menempel bersama di atas. */
.top-stack { position: sticky; top: 0; z-index: 20; }
.topbar {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 28px; min-height: 58px;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
/* Mode Review Lokal (khusus development): penanda mencolok agar tidak dikira production. */
.review-banner {
  display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px;
  padding: 6px 28px; background: #b42318; color: #fff; font-size: var(--fs-sm);
  overflow-wrap: anywhere;
}
.review-banner strong { letter-spacing: .04em; }
.review-banner a { color: #fff; text-decoration: underline; text-underline-offset: 3px; margin-left: auto; }
.review-solo .review-banner { position: sticky; top: 0; z-index: 20; }
.review-page { max-width: 1180px; margin: 0 auto; }
.topbar .crumb { color: var(--muted); font-size: var(--fs-sm); }
.topbar .spacer { flex: 1; }
/* .btn menetapkan display; tombol menu hanya muncul pada layar sempit. */
.btn.menu-toggle { display: none; }
.topbar-mark { display: none; }
.bell { position: relative; display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: var(--r-control); color: var(--ink); }
.bell:hover { background: var(--paper); }
.bell .dot { position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; display: flex; align-items: center; justify-content: center; padding: 0 4px; }
.bell .dot[hidden] { display: none; }
.page { padding: 26px 28px 60px; max-width: 1360px; width: 100%; }
.page-narrow { max-width: 760px; }
.page-header { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; margin-bottom: 22px; }
/* String panjang tanpa spasi (nomor kontrak, sidik jari, URL) memecah baris, tidak terpotong di tepi panel. */
.page-header h1, .kv dd, .panel-head h2 { overflow-wrap: anywhere; }
.page-header > div { min-width: 0; }
.page-header .lede { color: var(--text-2); margin: 6px 0 0; }
.page-header .actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Panel & struktur ---------- */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.panel + .panel, .section + .section { margin-top: 18px; }
/* Ritme vertikal antarblok utama halaman; item di dalam grid memakai gap, bukan margin. */
.page > * + * { margin-top: 18px; }
.page > .page-header + *, .page > .tabs + * { margin-top: 0; }
.grid > .panel + .panel, .grid > .notice + .notice, .grid > * + .panel { margin-top: 0; }
.panel-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.panel-head h2, .panel-head h3 { font-size: var(--fs-lg); }
.panel-head .hint { color: var(--muted); font-size: var(--fs-sm); margin: 2px 0 0; }
.panel-body { padding: 16px 18px; }
.panel-body.flush { padding: 0; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--muted); }
.panel-attention { border-color: var(--ink); }
.panel-attention > .panel-head {
  background: var(--ink); color: #fff; border-bottom-color: var(--ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.panel-attention > .panel-head h2, .panel-attention > .panel-head h3 { color: #fff; }
.panel-attention > .panel-head .hint { color: #c8c7c2; }

.grid { display: grid; gap: 18px; }
/* Item grid boleh menyusut; tabel lebar menggulir di dalam .table-wrap, bukan melebarkan halaman. */
.grid > * { min-width: 0; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main-side { grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); }
.stack > * + * { margin-top: 12px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.divider { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* Ringkasan angka: baris berlabel, bukan kartu seragam */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--line); margin: 0; }
.panel-body.flush > .figures { border-top: 0; }
.figures > div { padding: 14px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.figures dt { color: var(--muted); font-size: var(--fs-sm); }
.figures dd { margin: 2px 0 0; font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 700; color: var(--ink); }
.figures dd .unit { font-size: var(--fs-sm); color: var(--muted); font-family: var(--font-body); font-weight: 400; margin-left: 4px; }
.figures dd.na { font-size: var(--fs-md); color: var(--muted); font-family: var(--font-body); font-weight: 400; overflow-wrap: anywhere; }

/* ---------- Statistik Hybrid Konsep 4 (web/stats.ts) ----------
   Hijau = baik & tercapai, emas = menunggu tindakan, merah = masalah, netral = informasi. */
.stat-section { margin-bottom: 18px; }
.stat-section-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-bottom: 8px; }
.stat-section-head h2 { font-size: var(--fs-lg); margin: 0; }
.stat-section-head .hint { color: var(--muted); font-size: var(--fs-sm); margin: 0; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.stat-card { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 14px 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); color: var(--ink); text-decoration: none; border-top: 3px solid var(--line-strong); }
.stat-card.is-link:hover { border-color: var(--felt); }
.stat-card.is-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.stat-ok { border-top-color: var(--felt); }
.stat-warn { border-top-color: var(--wood); }
.stat-bad { border-top-color: var(--danger); }
.stat-head { display: flex; align-items: center; gap: 8px; color: var(--text-2); font-size: var(--fs-sm); font-weight: 700; }
.stat-icon { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: var(--r-control); background: var(--felt-wash); color: var(--felt); flex: none; }
.stat-warn .stat-icon { background: var(--wood-wash); color: var(--wood-text); }
.stat-bad .stat-icon { background: var(--danger-wash); color: var(--danger); }
.stat-label { min-width: 0; overflow-wrap: anywhere; }
.stat-value { min-width: 0; }
.stat-num { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-2xl); line-height: 1.1; overflow-wrap: anywhere; }
.stat-money { font-size: var(--fs-xl); }
.stat-unit { margin-left: 6px; color: var(--muted); font-size: var(--fs-sm); }
.stat-text { font-weight: 700; overflow-wrap: anywhere; }
.stat-state { display: inline-block; color: var(--muted); font-size: var(--fs-sm); font-weight: 700; }
.stat-unavailable { color: var(--warn); background: var(--warn-wash); padding: 2px 8px; border-radius: var(--r-control); }
.stat-error { color: var(--danger); }
.stat-sub { color: var(--muted); font-size: var(--fs-xs); line-height: 1.4; overflow-wrap: anywhere; }

.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 14px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-panel); }
.period-tabs { display: flex; flex-wrap: wrap; gap: 4px; }
.period-tabs a { padding: 6px 12px; border-radius: var(--r-control); text-decoration: none; color: var(--text-2); font-weight: 700; font-size: var(--fs-sm); border: 1px solid var(--line); }
.period-tabs a[aria-current="page"] { background: var(--felt); border-color: var(--felt); color: #fff; }
.period-range { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 6px; margin: 0; }
.period-range label { display: grid; gap: 2px; font-size: var(--fs-xs); color: var(--muted); }
.period-label { margin: 0; font-size: var(--fs-sm); color: var(--text-2); flex-basis: 100%; }
.period-warn { margin: 0; flex-basis: 100%; color: var(--warn); font-size: var(--fs-sm); font-weight: 700; }

.chart { margin: 0; }
.chart figcaption { font-weight: 700; font-size: var(--fs-sm); margin-bottom: 6px; }
.chart svg { display: block; width: 100%; height: 200px; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .ax { fill: var(--muted); font-size: 11px; font-family: var(--font-body); }
.chart .bar-in { fill: var(--felt); }
.chart .bar-out { fill: var(--wood); }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 6px 0 0; padding: 0; font-size: var(--fs-sm); color: var(--text-2); }
.chart-legend .sw { display: inline-block; width: 10px; height: 10px; margin-right: 6px; vertical-align: middle; }
.sw-in { background: var(--felt); }
.sw-out { background: var(--wood); }
.chart-data { margin-top: 8px; font-size: var(--fs-sm); }
.chart-empty { display: grid; justify-items: center; gap: 6px; padding: 26px 12px; color: var(--muted); text-align: center; border: 1px dashed var(--line-strong); border-radius: var(--r-panel); }
.chart-empty p { margin: 0; font-size: var(--fs-sm); }
.activity-list li .when { color: var(--muted); font-size: var(--fs-xs); white-space: nowrap; }
.section-title { font-size: var(--fs-lg); margin: 22px 0 10px; }
.grid-top { align-items: start; margin-bottom: 18px; }
.btn-badge { position: relative; }
.btn-badge .badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: 8px; border-radius: 999px; background: var(--wood); color: var(--ink); font-size: var(--fs-xs); font-weight: 700; }

.kv { display: grid; grid-template-columns: minmax(130px, max-content) 1fr; gap: 8px 18px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 38px; padding: 7px 14px;
  border-radius: var(--r-control); border: 1px solid var(--line-strong);
  background: var(--surface); color: var(--ink);
  font-weight: 700; font-size: var(--fs-md); text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--felt); border-color: var(--felt); color: #fff; }
.btn-primary:hover { background: var(--felt-deep); border-color: var(--felt-deep); color: #fff; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: var(--graphite); color: #fff; }
.btn-danger { background: var(--surface); border-color: var(--danger); color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-quiet { border-color: transparent; background: transparent; color: var(--felt); padding-inline: 8px; }
.btn-quiet:hover { background: var(--felt-wash); border-color: transparent; }
.btn-sm { min-height: 30px; padding: 4px 10px; font-size: var(--fs-sm); }
.btn-lg { min-height: 50px; padding: 12px 22px; font-size: var(--fs-lg); }
.btn-block { width: 100%; }
.btn[data-busy="true"] { position: relative; color: transparent !important; }
.btn[data-busy="true"]::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid currentColor; border-color: #fff #fff transparent transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
.btn:not(.btn-primary):not(.btn-dark)[data-busy="true"]::after { border-color: var(--ink) var(--ink) transparent transparent; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formulir ---------- */
.form { display: grid; gap: 14px; }
.form-grid { display: grid; gap: 14px 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid .span-2 { grid-column: 1 / -1; }
.field { display: grid; gap: 5px; }
.field label, .field .label { font-weight: 700; font-size: var(--fs-sm); color: var(--ink); }
.field .help { color: var(--muted); font-size: var(--fs-sm); }
.field .error, [data-error-for] { color: var(--danger); font-size: var(--fs-sm); font-weight: 700; }
.field .error:empty, [data-error-for]:empty { display: none; }
.input, .select, .textarea {
  width: 100%; min-height: 40px; padding: 8px 11px;
  border: 1px solid var(--line-strong); border-radius: var(--r-control);
  background: var(--surface); color: var(--ink);
}
.textarea { min-height: 90px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: 2px solid var(--felt); outline-offset: 0; border-color: var(--felt); }
.input[aria-invalid="true"], .select[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input-sm { min-height: 32px; padding: 4px 8px; font-size: var(--fs-sm); }
.check { display: flex; align-items: flex-start; gap: 8px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--felt); }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--r-control); background: var(--surface); font-weight: 700; font-size: var(--fs-sm); }
.choice input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.choice.is-bad input:checked + span { background: var(--danger); border-color: var(--danger); }
.choice.is-good input:checked + span { background: var(--felt); border-color: var(--felt); }
.form-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.form-error { color: var(--danger); font-weight: 700; }
.form-error:empty { display: none; }
.form-error:has(ul) { background: var(--danger-wash); border: 1px solid #efc3be; border-radius: var(--r-panel); padding: 10px 14px; }
.form-error ul { margin: 6px 0 0; padding-left: 18px; font-weight: 400; color: var(--danger); }
.form-error li + li { margin-top: 2px; }
fieldset { border: 1px solid var(--line); border-radius: var(--r-panel); padding: 12px 14px; margin: 0; }
legend { font-weight: 700; padding: 0 6px; }

/* ---------- Tabel ---------- */
/* position: relative — elemen absolut di dalam tabel (mis. .sr-only) ikut terpotong, tidak melebarkan halaman di HP. */
.table-wrap { overflow-x: auto; position: relative; }
.table { width: 100%; border-collapse: collapse; font-size: var(--fs-md); }
.table th { text-align: left; font-weight: 700; font-size: var(--fs-sm); color: var(--text-2); padding: 10px 14px; border-bottom: 1px solid var(--line-strong); background: #fafaf8; white-space: nowrap; }
.table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:hover { background: #fbfbf9; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num, .table th.num { text-align: right; }
.table-compact td, .table-compact th { padding: 6px 10px; }
.table-filter { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.table-filter .input { max-width: 280px; }
th[data-sort] { cursor: pointer; }
th[data-sort]::after { content: ""; display: inline-block; margin-left: 6px; border: 4px solid transparent; border-top-color: var(--line-strong); vertical-align: middle; }
th[data-sort="asc"]::after { border-top-color: transparent; border-bottom-color: var(--ink); margin-bottom: 4px; }
th[data-sort="desc"]::after { border-top-color: var(--ink); }

/* ---------- Status & label ---------- */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: var(--fs-xs); font-weight: 700; background: #efeeea; color: var(--text-2); white-space: nowrap; line-height: 1.6; }
.chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: 0.85; }
.chip-ok { background: var(--felt-wash); color: var(--felt); }
.chip-warn { background: var(--warn-wash); color: var(--warn); }
.chip-bad { background: var(--danger-wash); color: var(--danger); }
.chip-info { background: var(--info-wash); color: var(--info); }
.chip-wood { background: var(--wood-wash); color: var(--wood-text); }
.chip-dark { background: var(--ink); color: #fff; }
.tag { display: inline-block; border: 1px solid var(--line-strong); border-radius: 4px; padding: 0 6px; font-size: var(--fs-xs); color: var(--text-2); }

/* ---------- Pemberitahuan ---------- */
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 16px; border-radius: var(--r-panel); border: 1px solid var(--line); background: var(--surface); }
.notice + .notice { margin-top: 10px; }
.notice strong { display: block; }
.notice-info { border-color: #c5d6e7; background: var(--info-wash); }
.notice-warn { border-color: #ecd3a7; background: var(--warn-wash); }
.notice-bad { border-color: #efc0ba; background: var(--danger-wash); }
.notice-ok { border-color: #bfd9c7; background: var(--felt-wash); }
.notice-alarm {
  background: var(--ink); color: #fff; border-color: var(--ink);
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.notice-alarm a { color: var(--wood); }
.notice .grow { flex: 1; }
.pos-label { display: inline-block; padding: 3px 10px; border-radius: var(--r-control); background: var(--warn-wash); color: var(--warn); font-weight: 700; font-size: var(--fs-sm); }

.empty { padding: 30px 18px; text-align: left; }
.empty h3 { font-size: var(--fs-md); margin-bottom: 4px; }
.empty p { color: var(--muted); margin: 0 0 10px; }

/* ---------- Daftar aktivitas / notifikasi ---------- */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 18px; border-bottom: 1px solid var(--line); display: flex; gap: 12px; align-items: flex-start; }
.list > li:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .meta { color: var(--muted); font-size: var(--fs-sm); }
.list .title { font-weight: 700; }
.list > li.unread { background: #fbfdfb; box-shadow: inset 3px 0 0 var(--felt); }
.sev { width: 10px; height: 10px; border-radius: 50%; margin-top: 7px; flex: none; background: var(--line-strong); }
.sev-PERINGATAN { background: #d08a1a; }
.sev-KRITIS { background: var(--danger); }
.sev-INFO { background: #8fa79a; }

/* Alur approval (urutan tahap nyata) */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.steps li { position: relative; padding: 0 0 16px 30px; }
.steps li::before { content: ""; position: absolute; left: 7px; top: 18px; bottom: 0; width: 2px; background: var(--line); }
.steps li:last-child::before { display: none; }
.steps .mark { position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); background: var(--surface); }
.steps li.done .mark { background: var(--felt); border-color: var(--felt); }
.steps li.rejected .mark { background: var(--danger); border-color: var(--danger); }
.steps li.current .mark { border-color: var(--wood); background: var(--wood-wash); }
.steps .stage { font-weight: 700; }
.steps .detail { color: var(--muted); font-size: var(--fs-sm); }

/* ---------- Tab & pemilih lingkup ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--text-2); font-weight: 700; border-bottom: 3px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--felt); }
.tabs a:hover { color: var(--ink); }
.scope-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.scope-current { font-family: var(--font-head); font-size: var(--fs-xl); font-weight: 700; }
.scope-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.scope-option {
  display: block; padding: 14px 16px; text-decoration: none; color: var(--ink);
  border: 1px solid var(--line-strong); background: var(--surface);
}
.scope-option strong { display: block; font-family: var(--font-head); font-size: var(--fs-lg); }
.scope-option span { color: var(--muted); font-size: var(--fs-sm); }
.scope-option:hover { border-color: var(--ink); }
.scope-option[aria-current="true"] {
  background: var(--felt); border-color: var(--felt); color: #fff;
  clip-path: polygon(0 0, calc(100% - var(--cut)) 0, 100% var(--cut), 100% 100%, 0 100%);
}
.scope-option[aria-current="true"] span { color: #d9eadf; }
.live { display: inline-flex; align-items: center; gap: 6px; font-size: var(--fs-sm); color: var(--muted); }
.live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--felt); }
.live[data-state="error"]::before { background: var(--danger); }
.live[data-state="loading"]::before { background: var(--wood); }

/* ---------- Dialog & toast ---------- */
dialog { border: 1px solid var(--line-strong); border-radius: var(--r-panel); padding: 0; max-width: min(640px, calc(100vw - 24px)); width: 100%; box-shadow: var(--shadow-pop); color: var(--ink); }
dialog.dialog-wide { max-width: min(1100px, calc(100vw - 24px)); }
dialog::backdrop { background: rgba(18, 19, 21, 0.55); }
.dialog-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.dialog-body { padding: 16px 18px; max-height: 75vh; overflow-y: auto; }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.toast-host { position: fixed; right: 16px; bottom: 16px; z-index: 200; display: grid; gap: 8px; max-width: min(420px, calc(100vw - 32px)); }
.toast { background: var(--ink); color: #fff; padding: 12px 16px; border-radius: var(--r-control); box-shadow: var(--shadow-pop); border-left: 4px solid var(--felt); }
.toast-bad { border-left-color: var(--danger); }
.toast-warn { border-left-color: var(--wood); }

/* ---------- Kamera, foto, QR ---------- */
.camera { position: relative; background: var(--ink); border-radius: var(--r-panel); overflow: hidden; aspect-ratio: 3 / 4; max-height: 60vh; }
.camera video { width: 100%; height: 100%; object-fit: cover; }
.camera.mirror video { transform: scaleX(-1); }
.camera .overlay { position: absolute; inset: auto 0 0 0; padding: 12px; display: flex; justify-content: center; gap: 8px; background: linear-gradient(transparent, rgba(0, 0, 0, 0.55)); }
.camera-status { color: #fff; position: absolute; top: 10px; left: 10px; right: 10px; font-size: var(--fs-sm); text-shadow: 0 1px 2px #000; }
.photo-strip { display: flex; flex-wrap: wrap; gap: 8px; }
.photo-strip figure { margin: 0; position: relative; width: 84px; }
.photo-strip img { width: 84px; height: 84px; object-fit: cover; border-radius: var(--r-control); border: 1px solid var(--line); }
.photo-strip figcaption { font-size: var(--fs-xs); color: var(--muted); }
.photo-strip .remove { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: var(--ink); color: #fff; cursor: pointer; line-height: 22px; padding: 0; }
.qr-frame { background: #fff; padding: 18px; display: inline-block; border: 1px solid var(--line); }
.qr-frame img { width: min(62vh, 420px); height: auto; image-rendering: pixelated; }

/* Checklist cross-check */
.check-item { padding: 16px 18px; border-bottom: 1px solid var(--line); }
.check-item:last-child { border-bottom: 0; }
.check-item .label-line { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.check-item .obj { font-weight: 700; }
.check-item.is-done { background: #fbfdfb; box-shadow: inset 3px 0 0 var(--felt); }
.check-item.has-issue { box-shadow: inset 3px 0 0 var(--danger); }
.check-item .controls { display: grid; gap: 10px; margin-top: 10px; }
.progress-line { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; }
.progress-line > span { display: block; height: 100%; background: var(--felt); width: 0; }
progress { width: 100%; height: 8px; accent-color: var(--felt); }

/* Roster */
.roster-wrap { overflow: auto; max-height: 70vh; border-top: 1px solid var(--line); }
.roster { border-collapse: separate; border-spacing: 0; font-size: var(--fs-sm); }
.roster th, .roster td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 0; text-align: center; min-width: 38px; height: 34px; }
.roster thead th { position: sticky; top: 0; background: #fafaf8; z-index: 2; padding: 4px; font-weight: 700; }
.roster th.name, .roster td.name { position: sticky; left: 0; background: var(--surface); text-align: left; min-width: 190px; padding: 4px 10px; z-index: 1; }
.roster thead th.name { z-index: 3; background: #fafaf8; }
.roster .wknd { background: #f7f6f2; }
.roster select { border: 0; background: transparent; width: 100%; height: 34px; text-align: center; font-weight: 700; cursor: pointer; padding: 0 2px; }
.roster .cell-L { color: var(--muted); }
.roster .changed { outline: 2px solid var(--wood); outline-offset: -2px; }

/* ---------- Komponen mobile-first bersama (src/server/web/mobile.ts) ---------- */
/* Akses cepat berbentuk lingkaran: ikon dalam lingkaran + label di bawah; lencana hanya untuk jumlah nyata. */
.qa { margin: 0 0 18px; }
.qa-title { font-size: var(--fs-md); margin: 0 0 10px; }
.qa-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px 6px; }
.qa-grid-dense { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); margin-bottom: 14px; }
.qa-item { display: flex; flex-direction: column; align-items: center; gap: 6px; min-width: 0; padding: 2px; border: 0; background: none; color: var(--ink); text-decoration: none; font: inherit; cursor: pointer; text-align: center; }
.qa-item:hover { color: var(--ink); }
.qa-item:hover .qa-circle { filter: brightness(1.08); }
.qa-item:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 12px; }
.qa-circle { position: relative; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; flex: none; }
.qa-green .qa-circle { background: var(--felt); color: #fff; }
.qa-wood .qa-circle { background: var(--wood); color: var(--ink); }
.qa-dark .qa-circle { background: var(--graphite); color: #fff; }
.qa-soft .qa-circle { background: var(--felt-wash); color: var(--felt); }
.qa-badge { position: absolute; top: -3px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; display: grid; place-items: center; border-radius: 999px; background: var(--danger); color: #fff; font-size: 11px; font-weight: 700; line-height: 1; border: 2px solid var(--surface); }
/* Label dipatah hanya di batas kata (tidak di tengah kata seperti "Persetujua-n"). */
.qa-label { font-size: 11.5px; font-weight: 600; line-height: 1.2; max-width: calc(100% + 8px); overflow-wrap: normal; word-break: normal; letter-spacing: -0.01em; }
.qa-group { font-size: var(--fs-sm); color: var(--muted); margin: 4px 0 10px; }
/* Kartu & daftar antrean ringkas. */
.m-card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; margin-bottom: 16px; }
.m-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.m-head h2 { flex: 1; margin: 0; font-size: var(--fs-md); }
.m-head a, .panel-link { font-size: var(--fs-sm); font-weight: 700; color: var(--felt); text-decoration: none; white-space: nowrap; }
.m-head-icon { display: grid; color: var(--felt); }
.m-queue { list-style: none; margin: 0; padding: 0; }
.m-queue li + li { border-top: 1px solid var(--line); }
.m-queue a { display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 8px 0; color: var(--ink); text-decoration: none; }
.m-queue-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border-radius: 50%; background: var(--felt-wash); color: var(--felt); }
.m-queue-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.m-queue-text strong { font-size: var(--fs-sm); overflow-wrap: anywhere; }
.m-queue-text span { font-size: var(--fs-xs); color: var(--muted); }
.m-queue-go { color: var(--muted); flex: none; }
.topbar-avatar { display: none; }
.m-only { display: none; }

/* ---------- Seluler ---------- */
.bottom-nav { display: none; }
@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  /* Laci tertutup juga visibility:hidden agar tautannya keluar dari urutan Tab & pohon aksesibilitas. Saat dibuka visibility
     berganti seketika (fokus dapat langsung masuk); saat ditutup baru tersembunyi setelah animasi geser selesai. */
  .rail { position: fixed; inset: 0 auto 0 0; width: min(300px, 86vw); z-index: 60; transform: translateX(-102%); visibility: hidden; transition: transform 0.2s ease, visibility 0.2s; }
  .rail[data-open="true"] { transform: none; visibility: visible; transition: transform 0.2s ease; box-shadow: var(--shadow-pop); }
  .btn.menu-toggle { display: inline-flex; }
  .topbar { padding: 8px 14px; }
  .review-banner { padding: 6px 14px; }
  .page { padding: 18px 14px 90px; }
  /* Tab modul ringkas agar baris yang membungkus tetap sedikit; target sentuh minimal ±36 px untuk kontrol kecil. */
  .tabs a { padding: 8px 10px; font-size: var(--fs-sm); }
  .btn-sm, .input-sm, select.input-sm { min-height: 36px; }
  .table-stack td { overflow-wrap: anywhere; }
  /* Label kv dibatasi 42% agar nilai (nominal, nomor) tidak terpecah per karakter. */
  .kv { grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 6px 12px; }
  .grid-2, .grid-3, .grid-main-side, .form-grid { grid-template-columns: 1fr; }
  .scope-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  h1 { font-size: var(--fs-xl); }
  /* Navigasi bawah pendamping HP (referensi Konsep 4): bar putih, 5 item satu baris, item aktif hijau, item lain netral,
     "Absensi QR" di tengah sebagai lingkaran hijau yang sedikit menonjol di atas bar. Area aman gesture bar didukung. */
  .bottom-nav {
    display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); align-items: end;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(18, 19, 21, 0.08);
    padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
  }
  .bottom-nav a {
    min-width: 0; min-height: 58px; padding: 8px 2px 7px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 3px;
    color: #7a7d82; text-decoration: none; text-align: center; font-size: 11.5px; line-height: 1.15; font-weight: 600;
  }
  .bottom-nav a span { max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .bottom-nav .bn-icon { display: grid; place-items: center; font-style: normal; }
  .bottom-nav a svg { width: 24px; height: 24px; }
  .bottom-nav a[aria-current="page"] { color: var(--felt); font-weight: 700; }
  .bottom-nav a:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 10px; }
  .bottom-nav a.is-primary { color: var(--ink); }
  .bottom-nav a.is-primary[aria-current="page"] { color: var(--felt); }
  .bottom-nav a.is-primary .bn-icon {
    width: 58px; height: 58px; margin-top: -30px; border-radius: 50%;
    background: var(--felt); color: #fff; border: 4px solid var(--surface); box-shadow: 0 6px 14px rgba(14, 107, 47, 0.35);
  }
  .bottom-nav a.is-primary .bn-icon svg { width: 26px; height: 26px; }
  .bottom-nav a.is-primary[aria-current="page"] .bn-icon { background: var(--felt-deep); }
  /* Ruang bawah: tinggi bar + lingkaran menonjol + area aman, agar tombol/formulir terakhir tetap dapat dijangkau. */
  .companion .page { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
  .companion .panel { border-radius: 14px; }
  .companion .panel-head { border-radius: 14px 14px 0 0; }
  /* "Lihat Semua" tetap sejajar judul kartu; judul panjang membungkus di kolomnya sendiri. */
  .companion .panel-head:has(> .panel-link) { flex-wrap: nowrap; align-items: flex-start; }
  .companion .panel-head > div { min-width: 0; }
  /* Statistik di HP: dua kolom ringkas (Hybrid Konsep 4 — susun ulang, bukan sekadar mengecilkan desktop). */
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-card { padding: 10px 12px; gap: 4px; }
  .stat-icon { width: 24px; height: 24px; }
  .stat-head { font-size: var(--fs-xs); gap: 6px; align-items: flex-start; }
  .stat-num { font-size: var(--fs-xl); }
  .stat-money { font-size: var(--fs-md); }
  .period-bar { padding: 8px 10px; }
  .period-range { width: 100%; }
  .period-range label { flex: 1 1 120px; }
  /* Konsep 4 §6.A: header pendamping HP hitam ringkas dengan wordmark NAS & SONS. */
  .topbar-companion { background: var(--ink); border-bottom-color: var(--wood); color: #fff; }
  .topbar-companion .crumb { color: #cfcec9; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .topbar-companion .btn.menu-toggle, .topbar-companion .bell { color: #fff; background: transparent; border-color: transparent; }
  .topbar-mark { display: block; height: 18px; width: auto; flex: none; }
  .companion .topbar-avatar {
    display: grid; place-items: center; width: 34px; height: 34px; flex: none; border-radius: 50%;
    background: var(--graphite); color: #fff; border: 1px solid rgba(255, 255, 255, 0.28); font-size: 13px; font-weight: 700; text-decoration: none;
  }
  .m-only { display: block; }
  .d-only { display: none !important; }
  .qa-grid { gap: 12px 2px; }
  .qa-circle { width: 52px; height: 52px; }
  .companion .panel, .companion .m-card { box-shadow: 0 1px 2px rgba(18, 19, 21, 0.04); }
  /* Target sentuh HP ≥ 36 px untuk tautan teks kaki panel / "Lihat Semua" dan kotak centang berlabel (Checkpoint 36). */
  .panel-foot a, .m-head a, .panel-link { display: inline-flex; align-items: center; min-height: 36px; }
  .panel-foot { padding-top: 6px; padding-bottom: 6px; }
  .check { min-height: 36px; align-items: center; }
  /* Judul baris daftar yang berupa tautan & remah navigasi Code Browser (Checkpoint 37). */
  a.title, .title > a, .code-crumbs a { display: inline-flex; align-items: center; min-height: 32px; }
  .check input { margin-top: 0; width: 22px; height: 22px; flex: none; }
  /* Bilah aksi yang menempel di bawah (kirim checklist, simpan konten) berada di atas navigasi bawah, bukan tertutup. */
  .companion .cek-bar, .companion .cms-actions { bottom: calc(66px + env(safe-area-inset-bottom)); }
  .companion .toast-host { bottom: calc(84px + env(safe-area-inset-bottom)); }
  .table-stack thead { display: none; }
  .table-stack tr { display: block; border-bottom: 1px solid var(--line); padding: 8px 0; }
  .table-stack td {
    display: grid; grid-template-columns: minmax(88px, 36%) minmax(0, 1fr); column-gap: 12px; row-gap: 0;
    justify-items: end; text-align: right; border: 0; padding: 4px 14px;
  }
  .table-stack td::before { content: attr(data-label); grid-column: 1; grid-row: 1 / span 6; justify-self: start; text-align: left; color: var(--muted); font-size: var(--fs-sm); }
  .table-stack td.num { text-align: right; }
  .table-stack tfoot tr { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 14px; background: #fafaf8; }
  .table-stack tfoot th { display: block; padding: 0; border: 0; background: none; }
  .table-stack tfoot th:empty { display: none; }
}
@media (max-width: 380px) {
  .qa-circle { width: 46px; height: 46px; }
  .qa-circle svg { width: 22px; height: 22px; }
  .qa-label { font-size: 11px; }
}
.scrim { display: none; }
.scrim[data-open="true"] { display: block; position: fixed; inset: 0; background: rgba(18, 19, 21, 0.5); z-index: 50; }

/* ---------- Halaman masuk & mandiri ---------- */
.solo { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 520px); }
.solo-art { background: var(--ink); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--wood); }
.solo-art .mark { width: 92px; }
.solo-art h1 { color: #fff; font-size: var(--fs-3xl); max-width: 14ch; }
.solo-art p { color: #c8c7c2; }
.solo-form { display: flex; flex-direction: column; justify-content: center; padding: 40px clamp(20px, 5vw, 56px); background: var(--surface); }
.solo-form h2 { margin-bottom: 6px; }
@media (max-width: 860px) {
  .solo { grid-template-columns: 1fr; }
  .solo-art { padding: 28px 22px; gap: 18px; }
  .solo-art h1 { font-size: var(--fs-xl); }
}

/* Terminal absensi (PC kasir) */
.terminal { min-height: 100vh; background: var(--ink); color: #fff; display: grid; place-items: center; padding: 24px; text-align: center; }
.terminal h1 { color: #fff; }
.terminal .countdown { font-family: var(--font-head); font-size: var(--fs-3xl); color: var(--wood); }
.terminal .meta { color: #a8a7a2; }

/* ---------- Kartu identitas karyawan (cetak) ---------- */
.idcard { width: 85.6mm; height: 54mm; background: var(--ink); color: #fff; border-radius: 3mm; padding: 4mm 5mm; display: grid; grid-template-columns: 16mm 1fr; gap: 4mm; position: relative; overflow: hidden; border: 0.4mm solid var(--wood); }
.idcard img.n { width: 14mm; }
.idcard .nm { font-family: var(--font-head); font-weight: 700; font-size: 12pt; line-height: 1.15; }
.idcard .pos { color: var(--wood); font-size: 8.5pt; }
.idcard .meta { font-size: 7.5pt; color: #d0cfca; margin-top: 2mm; }
.idcard .org { position: absolute; left: 5mm; bottom: 3.5mm; font-size: 6.5pt; color: #a8a7a2; letter-spacing: 0.04em; }
.idcard::after { content: ""; position: absolute; right: -6mm; bottom: -6mm; width: 22mm; height: 22mm; background: var(--felt); transform: rotate(45deg); }

@media print {
  .rail, .topbar, .bottom-nav, .no-print, .toast-host { display: none !important; }
  .top-stack { position: static; }
  .shell { display: block; }
  .page { padding: 0; }
  body { background: #fff; }
  .panel { border-color: #999; }
  .idcard { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* =====================================================================
   SITUS PUBLIK (landing & booking)
   ===================================================================== */
.site { background: var(--paper); }
.site-head { background: var(--ink); color: #fff; border-bottom: 1px solid var(--wood); }
.site-head .inner { max-width: 1180px; margin: 0 auto; padding: 14px 24px; display: flex; align-items: center; gap: 18px; }
.site-head .logo img { width: 210px; height: auto; }
.site-head nav { margin-left: auto; display: flex; gap: 18px; flex-wrap: wrap; }
.site-head nav a { color: #e1e0db; text-decoration: none; font-weight: 700; font-size: var(--fs-sm); }
.site-head nav a:hover { color: #fff; }
.hero { background: var(--ink); color: #fff; }
.hero .inner { max-width: 1180px; margin: 0 auto; padding: 56px 24px 64px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 460px); gap: 48px; align-items: end; }
.hero h1 { color: #fff; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.05; max-width: 15ch; letter-spacing: -0.02em; }
.hero p { color: #cfcec9; font-size: var(--fs-lg); max-width: 46ch; }
.hero .cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.hero .btn { border-color: #fff; }
.hero .btn:not(.btn-primary) { background: transparent; color: #fff; }
.hero .btn:not(.btn-primary):hover { background: #fff; color: var(--ink); }
/* Tumpukan lantai gedung: elemen khas landing page */
.floors { display: grid; gap: 6px; }
.floor { display: grid; grid-template-columns: 64px 1fr; align-items: stretch; background: var(--graphite); border-left: 3px solid var(--wood); }
.floor .lvl { font-family: var(--font-head); font-weight: 700; font-size: var(--fs-2xl); display: grid; place-items: center; color: var(--wood); border-right: 1px solid #34383d; }
.floor .what { padding: 12px 16px; }
.floor .what strong { display: block; color: #fff; font-family: var(--font-head); }
.floor .what span { color: #b9b8b3; font-size: var(--fs-sm); }
.floor.top { border-left-color: var(--felt); }
.site-section { max-width: 1180px; margin: 0 auto; padding: 56px 24px; }
.site-section h2 { font-size: var(--fs-2xl); margin-bottom: 10px; max-width: 24ch; }
.site-section .intro { color: var(--text-2); max-width: 60ch; margin-bottom: 28px; }
.offer { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); }
.offer > div { padding: 22px 22px 26px 0; border-bottom: 1px solid var(--line); }
.offer > div + div { padding-left: 22px; border-left: 1px solid var(--line); }
.offer h3 { margin-bottom: 6px; }
.offer p { color: var(--text-2); margin: 0; }
.rules { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; }
.rules dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.rules dt { font-weight: 700; }
.rules dd { margin: 2px 0 0; color: var(--text-2); }
.photo-slot { border: 1px dashed var(--line-strong); padding: 18px; color: var(--muted); font-size: var(--fs-sm); background: var(--surface); }
.site-foot { background: var(--ink); color: #c8c7c2; }
.site-foot .inner { max-width: 1180px; margin: 0 auto; padding: 32px 24px; display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; }
.site-foot a { color: #fff; }
.booking-box { background: var(--surface); border: 1px solid var(--line); padding: 22px; }
@media (max-width: 860px) {
  .hero .inner { grid-template-columns: 1fr; padding: 32px 18px 40px; gap: 28px; }
  .offer, .rules { grid-template-columns: 1fr; }
  .offer > div + div { padding-left: 0; border-left: 0; }
  .site-head .logo img { width: 160px; }
  .site-head nav { gap: 12px; }
}

/* ---------- Utilitas jarak (CSP melarang atribut style inline) ---------- */
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; } .mt-4 { margin-top: 28px; }
.mb-0 { margin-bottom: 0; } .mb-1 { margin-bottom: 6px; } .mb-2 { margin-bottom: 12px; } .mb-3 { margin-bottom: 18px; }
.w-100 { width: 100%; } .maxw-sm { max-width: 420px; } .maxw-md { max-width: 640px; }
.hidden { display: none !important; }
.text-right { text-align: right; }
.gap-2 { gap: 12px; }

/* Evaluasi video & lini masa */
.eval-video { width: 100%; max-height: 70vh; background: #000; border-radius: 8px; }
.timeline-body { white-space: pre-line; }
