/* TTA Dashboard UI (D-83): bahasa visual dashboard Vercel (Geist). Token warna diambil dari dashboard Vercel asli
   (25/10/2026): latar background-100 / 200, abu gray-alpha, teks gray-1000 / 900, aksen biru / hijau / merah / kuning.
   Tata letak: sidebar kiri 256px (tim, cari, menu, akun), bilah atas tipis (konteks, judul, aksi), isi lebar maksimal.
   Satu file untuk semua halaman; tidak ada skin lain. */
@font-face { font-family: "Geist"; src: url("fonts/geist.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("fonts/geist-mono.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --bg: #fafafa; --surface: #ffffff; --surface-2: #f2f2f2; --surface-3: #ebebeb;
  --border: rgba(0, 0, 0, .08); --border-2: rgba(0, 0, 0, .15); --hover: rgba(0, 0, 0, .05); --aktif: rgba(0, 0, 0, .08);
  --text: #171717; --muted: #666666; --faint: #8f8f8f;
  --blue: #0068d6; --blue-solid: #006bff; --blue-soft: rgba(0, 107, 255, .09);
  --jade: #107d32; --jade-soft: rgba(16, 125, 50, .09);
  --red: #cb2a2f; --red-soft: rgba(203, 42, 47, .08);
  --gold: #a35200; --gold-soft: rgba(255, 178, 36, .16);
  --rose: #c41562; --rose-soft: rgba(196, 21, 98, .08);
  --purple: #7820bc;
  --ink: #171717; --ink-on: #ffffff; --ink-hover: #383838;
  --shadow-kartu: 0 1px 2px rgba(0, 0, 0, .04);
  --shadow-menu: 0 0 0 1px rgba(0, 0, 0, .08), 0 4px 8px -4px rgba(0, 0, 0, .04), 0 16px 24px -8px rgba(0, 0, 0, .06);
  --fokus: 0 0 0 2px var(--surface), 0 0 0 4px rgba(0, 107, 255, .55);
  --chart: #006bff;
  --gg1: #006bff; --gg2: #7820bc; --gg3: #107d32; --gg4: #d97706; --gg5: #c41562; --gg6: #666666; --gg7: #0d9488; --gg8: #a1a1a1;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #000000; --surface: #0a0a0a; --surface-2: #1a1a1a; --surface-3: #1f1f1f;
  --border: rgba(255, 255, 255, .14); --border-2: rgba(255, 255, 255, .24); --hover: rgba(255, 255, 255, .06); --aktif: rgba(255, 255, 255, .11);
  --text: #ededed; --muted: #a1a1a1; --faint: #8f8f8f;
  --blue: #52a8ff; --blue-solid: #006bff; --blue-soft: rgba(0, 107, 255, .2);
  --jade: #63c174; --jade-soft: rgba(99, 193, 116, .14);
  --red: #ff6166; --red-soft: rgba(255, 97, 102, .14);
  --gold: #f2a60d; --gold-soft: rgba(242, 166, 13, .14);
  --rose: #f75f8f; --rose-soft: rgba(247, 95, 143, .14);
  --purple: #bf7af0;
  --ink: #ededed; --ink-on: #0a0a0a; --ink-hover: #cccccc;
  --shadow-kartu: none;
  --shadow-menu: 0 0 0 1px rgba(255, 255, 255, .14), 0 16px 24px -8px rgba(0, 0, 0, .5);
  --fokus: 0 0 0 2px #0a0a0a, 0 0 0 4px #52a8ff;
  --chart: #52a8ff;
  --gg1: #52a8ff; --gg2: #bf7af0; --gg3: #63c174; --gg4: #f2a60d; --gg5: #f75f8f; --gg6: #a1a1a1; --gg7: #2dd4bf; --gg8: #8f8f8f;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ dasar */
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 400 14px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
/* Lenis (vendor/lenis.css 1.3.27): saat aktif, scroll dihaluskan Lenis, bukan CSS */
html.lenis, html.lenis body { height: auto; }
html.lenis { scroll-behavior: auto; }
.lenis:not(.lenis-autoToggle).lenis-stopped { overflow: clip; }
.lenis [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-smooth iframe { pointer-events: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: 24px; line-height: 32px; letter-spacing: -.96px; }
h2 { font-size: 16px; line-height: 24px; letter-spacing: -.32px; }
h3 { font-size: 14px; }
code, pre, .mono { font-family: var(--mono); font-size: 12.5px; }
code { padding: 1px 5px; border-radius: 4px; background: var(--surface-2); }
p { margin: 0 0 10px; }
ol, ul { margin: 6px 0; }
::selection { background: var(--blue-soft); }
:focus-visible { outline: none; box-shadow: var(--fokus); border-radius: 6px; }
[hidden] { display: none !important; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 13px; }
.num { font-variant-numeric: tabular-nums; }
.ik { width: 16px; height: 16px; flex: none; fill: currentColor; vertical-align: -3px; }  /* ikon Phosphor (sprite ikon.svg, D-85) */
.naik { color: var(--jade); } .turun { color: var(--red); }
.grow { flex: 1; }
.lewati { position: absolute; left: -999px; top: 8px; z-index: 100; padding: 8px 12px; background: var(--surface); border-radius: 6px; }
.lewati:focus { left: 8px; }

/* ------------------------------------------------------------------ kerangka: sidebar + bilah atas + isi */
.app { position: relative; z-index: 1; display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: color-mix(in srgb, var(--bg) 70%, transparent);
  border-right: 1px solid var(--border); z-index: 40; }
.side-tim { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 12px 0 14px; flex: none; }
.side-tim img { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 1px solid var(--border); flex: none; object-fit: contain; }
.side-tim .logo-tta { flex: none; fill: var(--text); }
.side-tim b { font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-cari { position: relative; margin: 0 8px 8px; flex: none; }
.side-cari svg { position: absolute; left: 10px; top: 50%; translate: 0 -50%; width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.side-cari input { height: 36px; padding: 0 34px; background: var(--surface); }
.side-cari kbd { position: absolute; right: 8px; top: 50%; translate: 0 -50%; pointer-events: none; }
kbd { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 4px; border: 1px solid var(--border);
  background: var(--surface-2); font: 500 11px var(--sans); color: var(--muted); }
.nav { position: relative; flex: 1; min-height: 0; overflow-y: auto; padding: 4px 8px 8px; overscroll-behavior: contain; }
.nav-g + .nav-g { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--border); }
.nav a { display: flex; align-items: center; gap: 10px; height: 36px; padding: 0 10px; border-radius: 6px; color: var(--muted); transition: background .12s, color .12s; }
.nav a svg { width: 16px; height: 16px; flex: none; }
.nav a:hover { background: var(--hover); color: var(--text); }
.nav a.on { background: var(--aktif); color: var(--text); }
/* penanda menu aktif yang meluncur (gerak.js): latar aktif dipindah ke penanda */
.nav a { position: relative; z-index: 1; }
.nav.ada-sorot a.on { background: transparent; }
.nav-sorot { position: absolute; left: 8px; right: 8px; top: 0; height: 36px; border-radius: 6px; background: var(--aktif); z-index: 0; will-change: transform; }
.nav a .badge { margin-left: auto; }
.side-kaki { display: flex; align-items: center; gap: 8px; height: 56px; padding: 0 8px 0 14px; border-top: 1px solid var(--border); flex: none; }
.avatar { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; font-size: 11px; font-weight: 600; color: #fff;
  background: linear-gradient(135deg, #006bff, #7820bc); }
.side-kaki .nm { min-width: 0; flex: 1; line-height: 1.2; }
.side-kaki .nm b { display: block; font-weight: 500; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-kaki .nm span { font-size: 12px; color: var(--muted); }
.side-kaki form { margin: 0; }

.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; height: 56px; padding: 0 16px;
  background: var(--bg);
  border-bottom: 1px solid var(--border); }
.top-kiri, .top-kanan { display: flex; align-items: center; gap: 8px; min-width: 0; }
.top-kanan { justify-content: flex-end; }
.top-jejak { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 14px; white-space: nowrap; overflow: hidden; }
.top-jejak a:hover { color: var(--text); }
.top-jejak .garis { color: var(--border-2); }
.top-judul { font-weight: 500; letter-spacing: -.28px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.ikon-terang { display: none; }
:root[data-theme="dark"] .ikon-gelap { display: none; }
:root[data-theme="dark"] .ikon-terang { display: inline-flex; }
.top .tombol-menu { display: none; }

.isi { width: 100%; max-width: 1240px; margin: 0 auto; padding: 32px 24px 80px; }
.kepala { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.kepala-judul { flex: 1; min-width: 240px; }
.kepala .sub { margin-top: 4px; color: var(--muted); font-size: 14px; }
.kepala-aksi { display: flex; gap: 8px; flex-wrap: wrap; }

/* bilah kemajuan pindah halaman (app.js) */
.muat { position: fixed; left: 0; top: 0; height: 2px; width: 0; z-index: 100; background: var(--blue-solid); opacity: 0; transition: width .25s ease, opacity .2s; }
.muat.jalan { opacity: 1; }

/* ------------------------------------------------------------------ komponen */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 20px 24px; box-shadow: var(--shadow-kartu); min-width: 0; }
.card > .card-h:first-child { margin: -20px -24px 16px; padding: 14px 24px; border-bottom: 1px solid var(--border); }
/* kartu langsung di area isi: selalu berjarak dengan blok berikutnya (margin bertumpuk dengan margin-top inline, tidak dobel) */
.isi > .card, .isi > .grid:not(.metrik) { margin-bottom: 16px; }
/* item Perlu Keputusan yang bisa dibuka untuk dilihat sekilas (details.intip, templates/_perlu.html) */
.intip { border-top: 1px solid var(--border); }
.intip > summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 10px 0; cursor: pointer; color: inherit; font-weight: inherit; }
.intip > summary::-webkit-details-marker { display: none; }
.intip > summary::after { content: ""; flex: none; width: 7px; height: 7px; margin: 0 4px 3px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .2s; }
.intip[open] > summary::after { transform: rotate(-135deg); margin-bottom: -3px; }
.intip > summary:hover b { text-decoration: underline; text-underline-offset: 3px; }
.intip-isi { margin: 0 0 12px 2px; padding: 2px 0 2px 14px; border-left: 2px solid var(--border); }
.intip-baris { display: flex; align-items: flex-start; gap: 12px; padding: 6px 0; border-bottom: 1px dashed var(--border); }
.card-h { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 32px; }
.card-h h2 { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; letter-spacing: -.28px; }
.card-h h2 svg { width: 16px; height: 16px; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.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)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); }
.stack > * + * { margin-top: 16px; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* angka ringkasan: kartu metrik bersekat dalam satu panel (seperti panel metrik Analytics Vercel). Kelas di template
   (bukan :has) supaya hover / ganti halaman tidak memicu hitung ulang gaya seluruh halaman: metrik = panel,
   lanjut = disambung panel berikutnya, sambung = menyambung panel sebelumnya, lebar5 = 4 kartu sejajar 5 kolom di atasnya */
.metrik { gap: 1px; background: var(--border); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: var(--shadow-kartu); }
.grid > .card.stat { border: 0; border-radius: 0; box-shadow: none; padding: 18px 20px 20px; }
.metrik.sambung { margin-top: -1px !important; border-top-left-radius: 0; border-top-right-radius: 0; }
.metrik.lanjut { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* 5 kolom hanya kalau area isi cukup lebar (viewport - sidebar 256 - padding): zoom Cmd/Ctrl + memperkecil lebar CSS,
   dulu 5 kolom tetap dipakai sampai 1181px sehingga kartu 175px dan angka rupiah terpotong (D-170) */
@media (min-width: 1360px) {
  .metrik.lebar5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .metrik.lebar5 > .card.stat:last-child { grid-column: span 2; }
}
.card.stat { container-type: inline-size; }
.stat .lbl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
.stat .lbl svg { width: 14px; height: 14px; }
.stat .val { margin-top: 8px; font-size: 22px; font-size: clamp(14px, 11.5cqi, 24px); line-height: 32px; font-weight: 600; letter-spacing: -.96px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat .val .small { font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--muted); }
.stat .foot { margin-top: 6px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 40px; padding: 0 14px; border-radius: 6px; border: 0;
  background: var(--surface); color: var(--text); box-shadow: 0 0 0 1px var(--border-2); font: 500 14px var(--sans); cursor: pointer; white-space: nowrap;
  transition: background .12s, box-shadow .12s, color .12s, transform .1s; }
.btn:hover { background: var(--surface-2); }
.btn:active { transform: scale(.98); }
.btn svg { width: 16px; height: 16px; }
.btn-s { height: 32px; padding: 0 10px; font-size: 13px; }
.btn-p { background: var(--ink); color: var(--ink-on); box-shadow: none; }
.btn-p:hover { background: var(--ink-hover); }
.btn-d { color: var(--red); }
.btn-ghost { background: transparent; box-shadow: none; color: var(--muted); }
.btn-ghost:hover { background: var(--hover); color: var(--text); }
.btn-ikon { width: 32px; padding: 0; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

input, select, textarea { width: 100%; max-width: 100%; min-height: 40px; padding: 0 12px; border-radius: 6px; border: 0; background: var(--surface); color: var(--text);
  box-shadow: 0 0 0 1px var(--border-2); font: 400 14px var(--sans); transition: box-shadow .12s; }
textarea { padding: 10px 12px; min-height: 90px; resize: vertical; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:hover, select:hover, textarea:hover { box-shadow: 0 0 0 1px var(--muted); }
input:focus, select:focus, textarea:focus { outline: none; box-shadow: 0 0 0 1px var(--muted), 0 0 0 4px var(--hover); }
select { -webkit-appearance: none; appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238f8f8f' stroke-width='1.5'%3E%3Cpath d='m4 6 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
input[type=checkbox], input[type=radio] { width: auto; min-height: 0; box-shadow: none; accent-color: var(--ink); }
input[type=file] { padding: 8px 12px; }
input[type=date] { width: auto; }
.row > input, .row > select { width: auto; }
label.f { display: block; }
label.f > span { display: block; margin-bottom: 6px; color: var(--muted); font-size: 13px; font-weight: 500; }
label.f + label.f, .hint + label.f, .hint + .f { margin-top: 14px; }
.hint { margin-top: 6px; color: var(--muted); font-size: 12.5px; }
details summary { cursor: pointer; color: var(--muted); font-weight: 500; }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; background: var(--surface-3); color: var(--text);
  font: 500 11px/1 var(--sans); letter-spacing: .2px; white-space: nowrap; vertical-align: 1px; }
.b-jade { background: var(--jade-soft); color: var(--jade); }
.b-gold { background: var(--gold-soft); color: var(--gold); }
.b-rose { background: var(--rose-soft); color: var(--rose); }
.b-red { background: var(--red-soft); color: var(--red); }
.b-blue { background: var(--blue-soft); color: var(--blue); }
.st-belum_bayar, .st-sampai { background: var(--surface-3); color: var(--muted); }
.st-dibayar { background: var(--blue-soft); color: var(--blue); }
.st-siap_kirim, .st-dikirim { background: var(--gold-soft); color: var(--gold); }
.st-selesai { background: var(--jade-soft); color: var(--jade); }
.st-batal, .st-retur { background: var(--red-soft); color: var(--red); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; display: inline-block; }
.live { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; }
.live .dot { color: var(--jade); animation: denyut 1.8s infinite; }
@keyframes denyut { 50% { opacity: .35; } }

.alert { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 16px; padding: 12px 14px; border-radius: 6px; border: 1px solid var(--border);
  background: var(--surface); font-size: 14px; }
.alert svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.a-ok { background: var(--jade-soft); border-color: color-mix(in srgb, var(--jade) 30%, transparent); }
.a-ok svg { color: var(--jade); }
.a-err { background: var(--red-soft); border-color: color-mix(in srgb, var(--red) 30%, transparent); }
.a-err svg { color: var(--red); }
.a-warn { background: var(--gold-soft); border-color: color-mix(in srgb, var(--gold) 30%, transparent); }
.a-warn svg { color: var(--gold); }
.a-info { background: var(--blue-soft); border-color: color-mix(in srgb, var(--blue) 30%, transparent); }
.a-info svg { color: var(--blue); }

/* tabel: kepala abu, baris bergaris, sorot saat kursor (seperti daftar Deployments) */
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 12px; text-align: left; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; background: var(--bg); border-bottom: 1px solid var(--border); }
td { padding: 12px; border-bottom: 1px solid var(--border); vertical-align: middle; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--hover); }
tr[data-href] { cursor: pointer; }
td.r, th.r { text-align: right; }
.tbl-wrap { overflow-x: auto; margin: 0 -24px; }
.tbl-wrap th:first-child, .tbl-wrap td:first-child { padding-left: 24px; }
.tbl-wrap th:last-child, .tbl-wrap td:last-child { padding-right: 24px; }
.card > .card-h:first-child + .tbl-wrap { margin-top: -16px; }
.card > .tbl-wrap:first-child { margin: -20px -24px 0; }
/* teks / tombol sesudah tabel di dalam kartu tidak menempel ke baris terakhir */
.card > .tbl-wrap + :not(.tbl-wrap) { margin-top: 12px; }
.card > :not(.card-h) + .tbl-wrap { margin-top: 10px; }
.card > .tbl-wrap:last-child { margin-bottom: -20px; }
.card > .tbl-wrap:last-child tbody tr:last-child td:first-child { border-bottom-left-radius: 12px; }
.empty { padding: 32px 10px; text-align: center; color: var(--muted); font-size: 14px; }
.empty svg { display: block; width: 20px; height: 20px; margin: 0 auto 10px; color: var(--muted); }

/* tab di halaman: kontrol segmen seperti pemilih tampilan Vercel */
.tabs { display: inline-flex; gap: 2px; padding: 3px; border-radius: 8px; background: var(--surface); box-shadow: 0 0 0 1px var(--border); flex-wrap: wrap; max-width: 100%; }
.tabs a { display: inline-flex; align-items: center; height: 30px; padding: 0 12px; border-radius: 6px; color: var(--muted); font-size: 13px; font-weight: 500; white-space: nowrap; }
.tabs a:hover { color: var(--text); background: var(--hover); }
.tabs a.on { background: var(--aktif); color: var(--text); }
.tabs a .n { margin-left: 6px; color: var(--faint); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; margin: 0; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.li:last-child { border-bottom: 0; }
.li .t { font-weight: 500; } .li .s { color: var(--muted); font-size: 12.5px; }
details.li { display: block; } /* <details class="li"> (iklan Meta, kompetitor, promo): ringkasan di atas, isi di bawah, bukan sejajar */
details.li > summary { cursor: pointer; }
.langkah { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.6; }
.baris { align-items: center; }
.slot { padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); }
.slot.kosong { border-style: dashed; background: transparent; }
.qr-2fa { width: 200px; height: 200px; padding: 10px; border-radius: 8px; background: #fff; border: 1px solid var(--border); }
.qr-2fa svg, .qr-2fa img { width: 100%; height: 100%; display: block; }
pre { white-space: pre-wrap; margin: 0; padding: 12px; border-radius: 6px; background: var(--surface-2); }

/* kartu toko Dashboard (D-72) + rincian per toko di kartu ringkasan (D-82) */
.mini { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 0; }
.mini dt { color: var(--muted); font-size: 12.5px; }
.mini dd { margin: 2px 0 0; font-size: 16px; font-weight: 600; letter-spacing: -.32px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.mini .mini-ket { color: var(--muted); font-size: 12.5px; font-weight: 400; white-space: normal; }
.rinci { display: grid; gap: 3px; margin: 12px 0 0; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12.5px; }
.rinci > div { display: flex; justify-content: space-between; gap: 10px; }
.rinci dt { color: var(--muted); }
.rinci dd { margin: 0; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* menu tarik (details.pop) */
details.pop { position: relative; }
details.pop > summary { list-style: none; }
details.pop > summary::-webkit-details-marker { display: none; }
.pop-isi { position: absolute; z-index: 50; min-width: 220px; padding: 6px; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow-menu); }
.pop-isi a, .pop-isi button { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 8px; border: 0; border-radius: 6px;
  background: none; color: var(--text); font: 400 14px var(--sans); cursor: pointer; text-align: left; }
.pop-isi a:hover, .pop-isi button:hover { background: var(--hover); }
.pop-isi svg { width: 16px; height: 16px; color: var(--muted); }

/* grafik garis interaktif (D-82, app.js grafikGaris) */
.gg-legenda { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.gg-chip { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent;
  box-shadow: 0 0 0 1px var(--border); color: var(--faint); font: 500 12.5px var(--sans); cursor: pointer; }
.gg-chip i { width: 8px; height: 8px; border-radius: 50%; background: var(--border-2); }
.gg-chip.gg-putus i { border-radius: 2px; width: 10px; height: 2px; }
.gg-chip[aria-pressed="true"] { color: var(--text); background: var(--surface-2); box-shadow: 0 0 0 1px var(--border-2); }
.gg-chip[aria-pressed="true"] i { background: var(--w); }
.gg-chip:hover { color: var(--text); }
.gg-kanvas { position: relative; touch-action: pan-y; cursor: crosshair; }
.gg-svg { display: block; width: 100%; height: auto; overflow: visible; }
.gg-grid { stroke: var(--border); stroke-width: 1; stroke-dasharray: 2 3; }
.gg-nol { stroke: var(--border-2); stroke-width: 1; }
.gg-sb { fill: var(--faint); font: 400 11px var(--sans); font-variant-numeric: tabular-nums; }
.gg-garis { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.gg-pandu { stroke: var(--border-2); stroke-width: 1; }
.gg-titik { stroke: var(--surface); stroke-width: 2; }
.gg-tip { position: absolute; top: 4px; z-index: 5; min-width: 180px; padding: 8px 10px; border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-menu);
  animation: muncul .12s ease-out;
  font-size: 12.5px; pointer-events: none; }
.gg-tip b { display: block; margin-bottom: 6px; font-weight: 500; color: var(--muted); }
.gg-baris { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 4px 8px; color: var(--muted); line-height: 1.7; }
.gg-baris i { width: 8px; height: 8px; border-radius: 50%; }
.gg-baris .num { color: var(--text); text-align: right; font-weight: 500; }

/* ------------------------------------------------------------------ halaman masuk */
.hal-login { min-height: 100vh; display: grid; place-items: center; padding: 32px 16px; }
.masuk { position: relative; z-index: 1; width: 100%; max-width: 380px; }
.masuk-logo { display: block; width: 48px; height: 48px; margin: 0 auto 20px; fill: var(--text); }
.masuk h1 { text-align: center; font-size: 24px; }
.masuk-sub { margin: 6px 0 24px; text-align: center; color: var(--muted); }
.masuk .alert { margin: 0 0 14px; }
.masuk-tombol { width: 100%; margin-top: 20px; }
.masuk-pw { position: relative; display: block; }
.masuk-pw input { padding-right: 44px; }
.masuk-pw .btn { position: absolute; right: 4px; top: 50%; translate: 0 -50%; }
.masuk-kode { font-family: var(--mono); font-size: 20px; letter-spacing: .3em; text-align: center; }
.masuk-catatan { margin: 14px 0 0; color: var(--muted); font-size: 13px; text-align: center; }
.masuk-link { display: block; margin-top: 14px; text-align: center; color: var(--muted); font-size: 13px; text-decoration: underline; }
.masuk-kaki { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 32px; color: var(--faint); font-size: 12px; }
.masuk-kaki svg { width: 14px; height: 14px; }

/* ------------------------------------------------------------------ Drop List untuk shipper (D-139) */
.dl-tarik { width: 100%; justify-content: center; font-size: 17px; font-weight: 600; padding: 16px 20px; min-height: 56px; }
.dl-toko { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.dl-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.dl-brand { display: block; padding: 18px 20px; color: inherit; text-decoration: none; }
.dl-brand:hover { background: var(--hover); }
.dl-brand .dl-nama { font-size: 18px; font-weight: 700; letter-spacing: .02em; }
.dl-brand .dl-angka { font-size: 28px; font-weight: 700; line-height: 1.1; margin-top: 6px; }
.dl-baris { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.dl-baris:first-child { border-top: 0; }
.dl-foto { display: flex; gap: 6px; flex: none; }
.dl-foto img, .dl-foto .dl-kosong { width: 72px; height: 72px; border-radius: 10px; object-fit: cover; background: var(--surface-2); }
.dl-kosong { display: flex; align-items: center; justify-content: center; text-align: center; font-size: 11px; color: var(--faint);
  border: 1px dashed var(--border-2); text-decoration: none; }
.dl-info { flex: 1; min-width: 150px; }
.dl-info .dl-barang { font-size: 17px; font-weight: 600; }
.dl-info .dl-kode { display: inline-block; font-size: 34px; font-weight: 800; letter-spacing: .12em; line-height: 1.1; padding: 2px 12px;
  border: 3px solid currentColor; border-radius: 10px; margin-bottom: 6px; font-family: var(--mono, ui-monospace, monospace); }
.dl-pcs { display: inline-block; font-size: 22px; font-weight: 800; padding: 2px 12px; border: 2px solid currentColor; border-radius: 8px;
  margin: 6px 10px 0 0; }
.dl-resi { font-size: 16px; font-weight: 600; }
.dl-aksi { flex: none; text-align: right; }
.dl-aksi .btn-p { font-size: 15px; padding: 10px 16px; }
.dl-sudah { opacity: .55; }
.dl-langkah { display: flex; flex-direction: column; gap: 8px; font-size: 16px; }
@media (max-width: 600px) { .dl-aksi { width: 100%; } .dl-aksi .btn { width: 100%; justify-content: center; } }

/* ------------------------------------------------------------------ layar sempit */
.tirai { display: none; }
/* Titik ganti berdasar lebar area isi, bukan lebar layar: area isi = layar - sidebar 256 - padding 48. Zoom browser
   Cmd/Ctrl +/- mengubah lebar CSS layar, jadi titik ganti yang terlalu longgar membuat kartu sempit dan isinya terpotong. */
@media (max-width: 1359px) {
  .g5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g4.metrik > .card.stat:last-child:nth-child(odd) { grid-column: span 2; }  /* sisa satu kartu mengisi baris, bukan kotak abu kosong */
}
@media (min-width: 861px) and (max-width: 1359px) {
  .g5.metrik > .card.stat:last-child:nth-child(3n+2) { grid-column: span 2; }
  .g5.metrik > .card.stat:last-child:nth-child(3n+1) { grid-column: span 3; }
}
@media (max-width: 1000px) {
  .g2, .g3, .g-main { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: 280px; max-width: 86vw; background: var(--bg); transform: translateX(-100%); visibility: hidden;
    transition: transform .38s cubic-bezier(.32, .72, 0, 1), visibility .38s; }
  body.menu-buka .side { transform: none; visibility: visible; box-shadow: var(--shadow-menu); }
  body.menu-buka .tirai { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .4); }
  .top .tombol-menu { display: inline-flex; }
  .top { grid-template-columns: auto 1fr auto; padding: 0 8px; }
  .top-jejak { display: none; }
  .top-judul { max-width: none; }
  .isi { padding: 20px 16px 64px; }
  .card { padding: 16px; }
  .card > .card-h:first-child { margin: -16px -16px 14px; padding: 12px 16px; }
  .tbl-wrap, .card > .tbl-wrap:first-child { margin-left: -16px; margin-right: -16px; }
  .card > .tbl-wrap:last-child, .card > .card-h:first-child + .tbl-wrap { margin-bottom: -16px; }
  .tbl-wrap th:first-child, .tbl-wrap td:first-child { padding-left: 16px; }
  .tbl-wrap th:last-child, .tbl-wrap td:last-child { padding-right: 16px; }
  .grid > .card.stat { padding: 14px 16px 16px; }
  .g4, .g5, .metrik.lebar5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g5 > .card.stat:first-child { grid-column: 1 / -1; }
  .mini { gap: 12px 10px; }
  .mini dd { font-size: 15px; }
  input, select, textarea { font-size: 16px; }
  .row > input[name=cari] { width: 100% !important; flex: 1 1 100% !important; }
  h1 { font-size: 22px; }
}

/* HP (D-170): tanpa geser samping. Tabel jadi kartu per baris (app.js mengisi data-label di tiap sel dari teks kepala kolom;
   sel pertama = judul kartu, sel tanpa label = tombol aksi satu baris penuh); form, tombol, filter, tab selebar layar.
   Tabel kecil yang harus tetap tabel: kelas tbl-tetap (app.js memasangnya sendiri untuk tabel tanpa kepala kolom). */
@media (max-width: 640px) {
  .isi, .card, .alert, .li, .kv dd, .slot, details { overflow-wrap: anywhere; }
  .kepala { gap: 12px; margin-bottom: 16px; }
  .kepala-judul { flex: 1 1 100%; min-width: 0; }
  .kepala-aksi { width: 100%; }
  .kepala-aksi > * { flex: 1 1 auto; }
  .kepala-aksi > form { display: flex; }
  .kepala-aksi > form > .btn { flex: 1; }
  .btn { height: auto; min-height: 40px; padding: 8px 14px; white-space: normal; text-align: center; line-height: 1.3; }
  .btn-s { min-height: 32px; padding: 5px 10px; }
  .btn-ikon { width: 32px; padding: 0; }
  .badge { height: auto; min-height: 20px; padding: 3px 8px; white-space: normal; line-height: 1.3; }
  .row > :is(input, select, textarea):not([type=checkbox]):not([type=radio]), .row > label.f, .row > details {
    flex: 1 1 140px; width: auto !important; min-width: 0 !important; max-width: 100% !important; }
  .row > form, .row > .grow { flex: 1 1 auto; min-width: 0; max-width: 100%; }
  .tabs { display: flex; width: 100%; }
  .tabs a { flex: 1 1 auto; justify-content: center; }
  .li { flex-wrap: wrap; }
  .kv { grid-template-columns: minmax(0, auto) minmax(0, 1fr); gap: 6px 12px; }
  .mini { grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); }
  .mini dd, .rinci dd { overflow-wrap: anywhere; white-space: normal; }
  .gg-tip { min-width: 0; max-width: 70vw; }
  .qr-2fa { max-width: 100%; }

  .tbl-wrap { overflow-x: visible; }
  .tbl-wrap table:not(.tbl-tetap), .tbl-wrap table:not(.tbl-tetap) :is(tbody, tfoot, tr, td) { display: block; }
  .tbl-wrap table:not(.tbl-tetap) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .tbl-wrap table:not(.tbl-tetap) tr { padding: 12px 16px; border-bottom: 1px solid var(--border); }
  .tbl-wrap table:not(.tbl-tetap) tbody tr:last-child { border-bottom: 0; }
  .tbl-wrap table:not(.tbl-tetap) tr:hover td { background: transparent; }
  .tbl-wrap table:not(.tbl-tetap) td { display: flow-root; min-width: 0 !important; padding: 4px 0; border: 0; text-align: right; white-space: normal; }
  .tbl-wrap table:not(.tbl-tetap) td::before { content: attr(data-label); float: left; max-width: 46%; margin-right: 14px; text-align: left;
    color: var(--muted); font-size: 13px; font-weight: 500; }
  .tbl-wrap table:not(.tbl-tetap) td.sel-judul { padding: 0 0 6px; text-align: left; font-size: 15px; font-weight: 600; }
  .tbl-wrap table:not(.tbl-tetap) td.sel-judul::before, .tbl-wrap table:not(.tbl-tetap) td[colspan]::before,
  .tbl-wrap table:not(.tbl-tetap) td[data-label=""]::before { display: none; }
  .tbl-wrap table:not(.tbl-tetap) td.sel-kosong { display: none; }
  .tbl-wrap table:not(.tbl-tetap) td[colspan] { text-align: center; }
  .tbl-wrap table:not(.tbl-tetap) td[data-label=""] { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 8px; text-align: left; }
  .tbl-wrap table:not(.tbl-tetap) td[data-label=""] > * { flex: 1 1 auto; }
  .tbl-wrap table:not(.tbl-tetap) td[data-label=""] > form { display: flex; margin: 0; }
  .tbl-wrap table:not(.tbl-tetap) td[data-label=""] > form > .btn { flex: 1; }
  .tbl-wrap table:not(.tbl-tetap) td > form.row, .tbl-wrap table:not(.tbl-tetap) td > .row { justify-content: flex-end; }
  .tbl-wrap table.tbl-tetap :is(th, td) { white-space: normal; overflow-wrap: anywhere; padding: 8px 6px; }
  .tbl-wrap table.tbl-tetap :is(th, td):first-child { padding-left: 16px; }
  .tbl-wrap table.tbl-tetap :is(th, td):last-child { padding-right: 16px; }
}

/* ------------------------------------------------------------------ gerak (D-84, gerak.js + Motion) */
#isi { animation: isi-masuk .32s cubic-bezier(.22, 1, .36, 1) both; }
.tanpa-gerak #isi { animation: none; }
@keyframes isi-masuk { from { opacity: 0; transform: translateY(8px); } }
@keyframes muncul { from { opacity: 0; transform: translateY(2px); } }
.kartu-toko, .slot, .gg-chip, .tabs a, .badge { transition: border-color .15s, background .15s, color .15s, box-shadow .15s; }
.kartu-toko:hover { border-color: var(--border-2); }
tbody tr td { transition: background .12s; }
/* tabel bisa diurutkan (table[data-urut], app.js) */
th .urut { all: unset; cursor: pointer; white-space: nowrap; }
th .urut::after { content: " ↕"; color: var(--muted); font-size: 11px; }
th[aria-sort=ascending] .urut::after { content: " ↑"; color: inherit; }
th[aria-sort=descending] .urut::after { content: " ↓"; color: inherit; }
th .urut:focus-visible { outline: 2px solid var(--accent, currentColor); outline-offset: 2px; border-radius: 3px; }
body:not(.lihat-sepi) tr[data-sepi], body.lihat-sepi tr[data-kosong-sepi] { display: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
