/* ============================================================
   StickerEcho v3, Design System (Swiss Modern / Minimal)
   Token bersama Worker A (dashboard) dan Worker B (create/panel).
   Font: Inter + fallback system-ui. Tanpa emoji, tanpa em dash.
   Cache-buster: ?v=20261201a
   ============================================================ */
:root {
  /* Token v3, nama persis sesuai spec. Light mode default. */
  --bg: #F5F5F2;
  --bg2: #E8E8E4;
  --surface: #FFFFFF;
  --ink: #171717;
  --muted: #737373;
  --line: #E5E5E2;
  --lime: #D4FF45;
  --dark: #171717;

  /* Alias lama supaya create.html / panel.html (Worker B) tetap jalan
     sebelum mereka pindah ke token baru. Jangan tambah alias baru. */
  --kartu: var(--surface);
  --garis: var(--line);
  --teks: var(--ink);
  --redup: var(--muted);
  --hijau: #22C55E;
  --hijau-hover: #16A34A;
  --hijau-muda: #DCFCE7;
  --merah: #DC2626;
  --merah-bg: #FEF2F2;
  --kuning: #EAB308;
  --bayang: 0 1px 2px rgba(0, 0, 0, 0.04);
  --radius: 14px;
}
html[data-theme="dark"] {
  --bg: #1B1B19;
  --bg2: #222220;
  --surface: #262624;
  --ink: #EDEDE8;
  --muted: #A3A3A0;
  --line: #333330;
  --lime: #D4FF45;
  --dark: #171717;

  --kartu: var(--surface);
  --garis: var(--line);
  --teks: var(--ink);
  --redup: var(--muted);
  --hijau-muda: #14532D;
  --merah-bg: #2A1212;
  --bayang: 0 1px 2px rgba(0, 0, 0, 0.35);
}

/* ---------- reset dan tipografi ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.6;
}
img { max-width: 100%; }
a { color: var(--ink); }
button { font: inherit; cursor: pointer; color: var(--ink); }
button:disabled { opacity: 0.45; cursor: default; }
input[type="text"], input[type="password"], input[type="email"], select, textarea {
  font: inherit;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  min-height: 44px;
}
input[type="text"]:focus, input[type="password"]:focus, input[type="email"]:focus,
select:focus, textarea:focus, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: 40px; font-weight: 800; }
h2 { font-size: 28px; font-weight: 800; margin: 0 0 8px; }
h3 { font-size: 20px; font-weight: 700; margin: 0 0 8px; }
p { margin: 0 0 12px; }
.label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.muted { color: var(--muted); font-size: 13px; }
.hidden { display: none !important; }

/* ---------- layout: grid 12 kolom ---------- */
.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
main.wrap { max-width: 640px; padding: 16px; } /* panel owner, tetap sempit */
.grid12 { display: grid; grid-template-columns: repeat(12, 1fr); gap: 16px; }
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.bagian { padding: 72px 0; }
.bagian-head { margin-bottom: 24px; max-width: 640px; }
.bagian-head .sub { margin: 0; color: var(--muted); font-size: 15px; }
.bagian-head .row-judul { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- tombol ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: transparent;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.btn:hover { border-color: var(--ink); }
.btn-utama, .btn-hijau {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--bg);
}
html[data-theme="dark"] .btn-utama, html[data-theme="dark"] .btn-hijau {
  background: #FFFFFF;
  border-color: #FFFFFF;
  color: #171717;
}
.btn-utama:hover, .btn-hijau:hover { border-color: var(--ink); opacity: 0.92; }
.btn-garis { background: transparent; }
.btn-kecil { min-height: 44px; padding: 8px 14px; font-size: 13px; }
.btn-blok { width: 100%; }
.btn svg { flex: none; }
.tautan-teks {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: 14px;
  border-bottom: 2px solid var(--lime);
  padding-bottom: 1px;
}
.tautan-teks:hover { border-bottom-color: var(--ink); }

/* ---------- kartu dan chip ---------- */
.kartu {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}
a.kartu, .kartu.naik:hover { transform: translateY(-2px); border-color: var(--ink); }
.kartu h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.kartu p { margin: 0 0 12px; color: var(--muted); font-size: 14px; }
.kartu p:last-child { margin-bottom: 0; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.chip .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--lime);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
  flex: none;
}
.chip-hijau { background: var(--hijau-muda); border-color: transparent; color: var(--hijau); }

/* ---------- animasi scroll: fade + naik 12px, 250ms ---------- */
.muncul { opacity: 0; transform: translateY(12px); transition: opacity 0.25s ease, transform 0.25s ease; }
.muncul.tampil { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .muncul { opacity: 1; transform: none; transition: none; }
  * { transition: none !important; animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ---------- navbar ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  transition: transform 0.25s ease;
}
.navbar.nav-sembunyi { transform: translateY(-100%); }
.navbar-dalam {
  width: min(1120px, 100% - 40px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 60px;
  padding: 8px 0;
}
.merek { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 18px; }
.merek img, .merek svg { width: 32px; height: 32px; border-radius: 8px; flex: none; }
.nav-menu { display: flex; align-items: center; gap: 4px; margin: 0 auto; }
.nav-menu a, .nav-menu button.nav-link {
  color: var(--ink);
  background: none;
  border: none;
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 12px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
}
.nav-menu a:hover, .nav-menu button.nav-link:hover { background: var(--bg2); }
.nav-menu a.aktif { box-shadow: inset 0 -2px 0 var(--lime); border-radius: 10px 10px 0 0; }
.nav-kanan { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.tombol-i {
  width: 44px; height: 44px; flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 800; font-size: 16px;
  display: inline-flex; align-items: center; justify-content: center;
}
.tombol-i:hover { border-color: var(--ink); }
.nav-toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); align-items: center; justify-content: center; }
.nav-toggle svg { display: block; }

/* saklar tema: pil geser, ikon bulan/matahari di dalam knob */
.saklar-tema { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: none; padding: 0; min-height: 44px; }
.saklar-rel { width: 48px; height: 26px; border-radius: 999px; background: var(--bg2); border: 1px solid var(--line); position: relative; flex: none; }
.saklar-knob {
  position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ink); color: var(--bg);
  display: inline-flex; align-items: center; justify-content: center;
  transition: left 0.2s ease;
}
html[data-theme="dark"] .saklar-knob { left: 24px; }
.tema-label { font-size: 13px; font-weight: 600; }

/* ---------- hero ---------- */
.hero { border-bottom: 1px solid var(--line); }
.hero-dalam {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding: 72px 0;
}
.hero h1 { font-size: 40px; line-height: 1.1; margin: 16px 0 12px; font-weight: 800; letter-spacing: -0.02em; }
.hero p.lead { font-size: 16px; color: var(--muted); max-width: 520px; margin: 0 0 24px; }
.hero-aksi { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-kartu-stiker {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
}
.hero-kartu-stiker img { width: 180px; height: 180px; }
.hero-kartu-stiker .wave { margin: 12px auto 0; max-width: 200px; }
.hero-kartu-stiker p { margin: 8px 0 0; }
.kartu-mengambang {
  position: absolute;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 700;
}
.km-1 { top: 8px; left: -8px; }
.km-2 { top: 40%; right: -12px; }
.km-3 { bottom: 12px; left: 16px; }
.km-1 .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-right: 6px; vertical-align: 1px; }

/* ---------- statistik ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat-kartu { position: relative; }
.stat-ikon { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; color: var(--muted); }
.stat-angka { font-size: 36px; font-weight: 800; line-height: 1.1; margin: 6px 0 2px; letter-spacing: -0.02em; }
.stat-label { color: var(--muted); font-size: 13px; }
.stat-bawah { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-top: 16px; }
.grafik-batang { margin-top: 8px; }
.grafik-batang svg rect { fill: var(--ink); }
.grafik-batang svg rect:hover { fill: var(--lime); }
.daftar-kiriman { display: flex; flex-direction: column; }
.baris-kiriman {
  display: grid; grid-template-columns: 74px 1fr auto auto; gap: 10px; align-items: center;
  padding: 10px 2px; border-bottom: 1px solid var(--line); font-size: 13px;
}
.baris-kiriman:last-child { border-bottom: none; }
.baris-kiriman .waktu { color: var(--muted); }
.baris-kiriman .jenis { font-weight: 700; }
.status-ok { color: var(--ink); font-weight: 700; }
.status-ok::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--lime); margin-right: 6px; }
.status-gagal { color: var(--merah); font-weight: 700; }
.pesan-gagal { padding: 16px; text-align: center; color: var(--muted); }
.skel {
  border-radius: 8px;
  background: linear-gradient(90deg, var(--surface) 25%, var(--bg2) 50%, var(--surface) 75%);
  background-size: 200% 100%;
  animation: skel 1.2s linear infinite;
  color: transparent !important;
  min-height: 20px;
}
@keyframes skel { to { background-position: -200% 0; } }

/* kiriman terbaru: tabel di desktop, kartu di HP */
.recent-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.recent-table th, .recent-table td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); }
.recent-table th { color: var(--muted); font-size: 12px; }
.recent-cards { display: none; }
.kartu-kiriman { border-bottom: 1px solid var(--line); padding: 2px 0; }
.kartu-kiriman:last-child { border-bottom: none; }

/* ---------- showcase ---------- */
.showcase-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.showcase-kartu { text-align: center; }
.showcase-kartu img { width: 120px; height: 120px; }
.showcase-kartu .wave { margin: 8px auto 0; max-width: 140px; }
.showcase-kartu h3 { font-size: 16px; margin: 12px 0 4px; }
.showcase-kartu p { margin: 0; }
.label-contoh {
  display: inline-block;
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
  margin-bottom: 8px;
}

/* ---------- format ---------- */
.format-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.format-bawah { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 12px; }
.format-angka { font-size: 13px; color: var(--muted); }
.format-angka strong { font-size: 20px; color: var(--ink); }
.catatan-lainnya { margin-top: 12px; font-size: 13px; color: var(--muted); }

/* ---------- langkah ---------- */
.langkah-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.langkah-kartu { position: relative; }
.langkah-nomor {
  width: 40px; height: 40px; border-radius: 50%;
  background: transparent; border: 1.5px solid var(--ink); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 17px; margin-bottom: 12px;
}
.langkah-ikon { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; color: var(--muted); }

/* ---------- fitur ---------- */
.fitur-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.fitur-ikon {
  width: 44px; height: 44px; border-radius: 12px;
  background: var(--bg2);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 12px; color: var(--ink);
}
.fitur-ikon svg { display: block; }

/* ---------- spesifikasi (blok kode SPEK.TXT) ---------- */
.blok-kode {
  background: #171717;
  color: #EDEDE8;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}
.blok-kode header {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  background: #222220;
  border-bottom: 1px solid #333330;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13px; font-weight: 700;
}
.blok-kode header .titik { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.blok-kode header .titik:nth-child(1) { background: #FF5F57; }
.blok-kode header .titik:nth-child(2) { background: #FEBC2E; }
.blok-kode header .titik:nth-child(3) { background: #28C840; }
.blok-kode pre {
  margin: 0; padding: 16px 0;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13.5px; line-height: 1.7;
  overflow-x: auto;
  counter-reset: baris;
}
.blok-kode pre span { display: block; padding: 0 16px 0 52px; position: relative; white-space: pre; }
.blok-kode pre span::before {
  counter-increment: baris;
  content: counter(baris);
  position: absolute; left: 16px;
  color: #737373;
  width: 20px; text-align: right;
}
.blok-kode .kunci { color: #D4FF45; }
.blok-kode .angka { color: #F59E0B; }
.blok-kode .nilai { color: #EDEDE8; }
.salin-btn {
  margin-left: auto;
  background: transparent;
  border: 1px solid #333330;
  color: #EDEDE8;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  min-height: 32px;
  padding: 4px 10px;
}
.salin-btn:hover { border-color: #D4FF45; }

/* ---------- sistem ---------- */
.sistem-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.sistem-item:last-child { border-bottom: none; }
.lampu { width: 12px; height: 12px; border-radius: 50%; background: var(--muted); flex: none; }
.lampu.hijau { background: var(--lime); box-shadow: 0 0 0 4px rgba(212, 255, 69, 0.18); }
.lampu.merah { background: var(--merah); box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.2); }
.sistem-item .nilai { margin-left: auto; color: var(--muted); font-weight: 700; font-size: 13px; }
.bar-meter { margin: 12px 0; }
.bar-meter .baris-meter { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 6px; }
.bar { height: 10px; background: var(--bg2); border-radius: 6px; overflow: hidden; }
.bar > div { height: 100%; width: 0; background: var(--ink); transition: width 0.3s ease; }

/* ---------- FAQ ---------- */
.faq details {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0 18px;
  margin-bottom: 10px;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  padding: 16px 0;
  min-height: 44px;
  list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--ink); font-size: 20px; font-weight: 800; flex: none; }
.faq details[open] summary::after { content: "-"; }
.faq details p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.faq-ikon { width: 18px; height: 18px; flex: none; color: var(--muted); }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--line); margin-top: 72px; padding: 36px 0 24px; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 24px; }
footer h4 { margin: 0 0 10px; font-size: 14px; }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 8px; }
footer a { color: var(--muted); text-decoration: none; font-size: 14px; }
footer a:hover { color: var(--ink); }
.footer-bawah { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---------- modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0, 0, 0, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.modal[hidden] { display: none; }
.modal-kartu {
  width: min(480px, 94vw);
  max-height: 86vh; overflow: auto;
  background: var(--bg); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  box-shadow: var(--bayang);
}
.modal-kartu h3 { margin: 0 0 10px; font-size: 20px; }
.modal-kartu p { margin: 0 0 12px; line-height: 1.6; color: var(--muted); }
.modal-kartu .lbl { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 4px; }
.modal-kartu .nama-besar { font-size: 18px; font-weight: 800; margin-bottom: 12px; color: var(--ink); }
.modal-kartu .tautan a { display: flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; margin: 6px 0; }
.modal-kartu .tautan a:hover { color: var(--ink); }
.blok-author { white-space: pre-line; margin: 12px 0; line-height: 1.6; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 14px; }

/* ---------- class lama dari app.js, dipakai elemen dinamis create.js ---------- */
.act {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 18px; border-radius: 8px;
  border: 1px solid var(--ink); background: var(--ink); color: var(--bg);
  font-weight: 700; text-decoration: none;
}
.act:hover { opacity: 0.92; }
.sec {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  min-height: 44px; padding: 8px 14px; border-radius: 10px;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 700; text-decoration: none;
}
.sec:hover { border-color: var(--ink); }
.sec.on, .cropbar .sec.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.ico-play { display: inline-block; width: 0; height: 0; border-left: 11px solid currentColor; border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-right: 6px; vertical-align: -1px; }

/* ---------- halaman create (dipakai Worker B, kelas dipertahankan) ---------- */
.judul-halaman { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding: 28px 0 4px; }
.judul-halaman h1 { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -0.01em; flex: 1; }
.halaman-create { padding-bottom: 56px; }
.tabs { display: flex; gap: 10px; margin: 20px 0 8px; }
.tabs button {
  flex: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  padding: 16px 8px 14px;
  font-size: 13px; font-weight: 800;
  min-height: 44px;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.tabs button:hover { border-color: var(--ink); }
.tabs button.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tabs button svg { flex: none; }
.desc { color: var(--muted); font-size: 14px; margin: 0 0 8px; }
section.kartu { margin: 16px 0; }
section.kartu h3 { margin: 0 0 10px; font-size: 16px; }
section.kartu.off { opacity: 0.45; pointer-events: none; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 8px 0; }
.meta { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; align-items: center; margin: 6px 0 12px; }
.meta label { font-weight: 700; font-size: 14px; }
.meta input[type="text"] { width: 100%; max-width: 320px; }
.bar-progres { height: 12px; background: var(--bg2); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; margin-top: 10px; }
.bar-progres > div { height: 100%; width: 0; background: var(--hijau); transition: width 0.2s ease; }
.status { font-size: 13px; margin: 8px 0 0; min-height: 18px; }
.status.err { color: var(--merah); font-weight: 700; }
.hasil { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; margin-top: 12px; }
.thumb {
  width: 150px; height: 150px; object-fit: contain;
  border: 1px solid var(--line); border-radius: 12px;
  background: repeating-conic-gradient(#9CA3AF 0 25%, #E5E7EB 0 50%) 50% / 18px 18px;
  flex: none;
}
html[data-theme="dark"] .thumb { background: repeating-conic-gradient(#4B5563 0 25%, #1F2937 0 50%) 50% / 18px 18px; }
.hasil audio { width: 100%; }
.chanline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
details.alat { margin-top: 16px; }
details.alat summary { cursor: pointer; color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; min-height: 44px; display: flex; align-items: center; }
.logbox {
  max-height: 150px; overflow: auto;
  font: 11px/1.4 ui-monospace, Consolas, monospace;
  background: var(--surface); border: 1px solid var(--line);
  padding: 8px 10px; border-radius: 10px; white-space: pre-wrap; margin-top: 8px;
}
.logbox .e { color: var(--merah); }
.logbox .w { color: var(--kuning); }

/* ---------- trimmer ---------- */
.track {
  position: relative; height: 48px; margin: 12px 8px 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px;
  cursor: pointer; touch-action: none; user-select: none;
}
.track canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.track .sel { position: absolute; top: 0; bottom: 0; background: rgba(34, 197, 94, 0.45); border-top: 3px solid var(--hijau); border-bottom: 3px solid var(--hijau); cursor: grab; }
.track .sel:active { cursor: grabbing; }
.track .handle {
  position: absolute; top: -5px; bottom: -5px; width: 14px; margin-left: -7px;
  background: var(--hijau); border: 2px solid var(--ink); border-radius: 6px; cursor: ew-resize;
}
.track .handle::before { content: ""; position: absolute; left: -9px; right: -9px; top: -10px; bottom: -10px; }
.track .handle::after { content: ""; position: absolute; left: 4px; top: 10px; bottom: 10px; width: 4px; border-left: 1px solid rgba(255, 255, 255, 0.8); border-right: 1px solid rgba(255, 255, 255, 0.8); }
.track .ph { position: absolute; top: -8px; bottom: -8px; width: 2px; margin-left: -1px; background: var(--ink); pointer-events: none; }
.times { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin: 0 8px; }
.trim { display: grid; grid-template-columns: auto auto 1fr; gap: 6px 10px; align-items: center; }
.vmedia { position: relative; }
.vmedia video, video { display: block; width: 100%; max-height: 260px; background: #000000; border: 1px solid var(--line); border-radius: 10px; }

/* ---------- pangkas ---------- */
.cropwrap { margin: 10px 0; }
.cropbox {
  position: relative; width: 100%; max-width: 430px;
  border: 1px solid var(--line); border-radius: 12px; overflow: hidden;
  background: repeating-conic-gradient(#9CA3AF 0 25%, #E5E7EB 0 50%) 50% / 18px 18px;
  touch-action: none; user-select: none;
}
.cropbox img { display: block; width: 100%; height: auto; pointer-events: none; }
.croprect { position: absolute; border: 3px solid var(--kuning); cursor: move; touch-action: none; }
.cropdim { position: absolute; background: rgba(0, 0, 0, 0.55); pointer-events: none; }
.croprect .ch { position: absolute; width: 14px; height: 14px; background: #FFFFFF; border: 2px solid #0B0B0B; }
.croprect .ch::before { content: ""; position: absolute; left: -9px; right: -9px; top: -9px; bottom: -9px; }
.cropbar { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin: 10px 0 2px; }
.cropbar .btn.on { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.cropinfo { font-size: 12px; color: var(--muted); margin: 2px 0 0; }

/* ---------- saluran ---------- */
.chanitem { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px; background: var(--surface); }
.chanitem .cname { font-size: 16px; font-weight: 800; }
.chanitem .cstate { font-size: 12px; color: var(--muted); margin: 2px 0 8px; }
.chanitem .row { margin: 0; }

/* ---------- tombol mengambang ---------- */
.floatbtn {
  position: fixed; z-index: 150;
  width: 56px; height: 56px; border-radius: 50%;
  border: 2px solid var(--ink);
  background: var(--ink);
  cursor: grab; padding: 0; overflow: hidden;
  touch-action: none; user-select: none;
  box-shadow: var(--bayang);
}
.floatbtn:active { cursor: grabbing; }
.floatbtn img { display: block; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }

/* ---------- panel owner (/panel.html): kelas dipertahankan ---------- */
.topbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 12px 16px; background: var(--surface); border-bottom: 1px solid var(--line); }
.btn.kecil { min-height: 44px; padding: 8px 14px; font-size: 13px; }
.btn.utama { background: var(--hijau); border-color: var(--hijau); color: #FFFFFF; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 56px; height: 56px; border-radius: 12px; border: 2px solid #22C55E; }
.brand h1 { margin: 0; font-size: 20px; font-weight: 900; letter-spacing: 0.01em; }
.brand .tagline { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.ver { border: 1px solid #22C55E; color: #22C55E; font-size: 11px; font-weight: 800; padding: 1px 6px; border-radius: 999px; }
.top-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; margin: 12px 0; }
.card h2 { margin: 0 0 8px; font-size: 16px; font-weight: 800; }
.login-card { max-width: 420px; margin: 24px auto; }
.login-card label { display: block; font-weight: 700; font-size: 13px; margin: 10px 0; }
.login-card input { display: block; width: 100%; margin-top: 4px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit; }
.nomor { display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px; border-radius: 50%; background: #22C55E; color: #fff; font-size: 13px; font-weight: 900; margin-right: 6px; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line); }
.badge-ok { background: #22C55E; border-color: #22C55E; color: #fff; }
.badge-warn { background: transparent; color: var(--muted); }
.error { color: #EF4444; font-weight: 700; font-size: 13px; }
.note { font-size: 13px; color: var(--muted); }

/* ---------- responsif: otomatis via media query, tanpa tombol mode ---------- */
@media (min-width: 861px) {
  h1 { font-size: 56px; }
  body { font-size: 16px; }
  .bagian { padding: 96px 0; }
}
@media (max-width: 860px) {
  .hero-dalam { grid-template-columns: 1fr; gap: 32px; padding: 56px 0; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .stat-bawah { grid-template-columns: 1fr; }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
  .format-grid { grid-template-columns: 1fr; }
  .langkah-grid { grid-template-columns: repeat(2, 1fr); }
  .fitur-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-flex; }
  .nav-menu {
    display: none;
    position: absolute; top: 60px; left: 0; right: 0;
    flex-direction: column; align-items: stretch;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    padding: 8px 20px 12px;
    margin-left: 0;
  }
  .nav-menu.buka { display: flex; }
  .nav-menu a, .nav-menu button.nav-link { padding: 12px; justify-content: flex-start; width: 100%; }
  .nav-kanan .teks-saweria { display: none; }
  .tema-label { display: none; }
  .span-3, .span-4, .span-6, .span-8 { grid-column: span 12; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .showcase-grid, .langkah-grid, .fitur-grid { grid-template-columns: 1fr 1fr; }
  .baris-kiriman { grid-template-columns: 64px 1fr auto; }
  .baris-kiriman .saluran { display: none; }
  .recent-table { display: none; }
  .recent-cards { display: block; }
  .hero-dalam { padding: 48px 0 40px; }
  .bagian { padding: 56px 0; }
  .meta { grid-template-columns: 1fr; }
  .meta input[type="text"] { max-width: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .km-2 { right: 0; }
  .km-1 { left: 0; }
}
@media (max-width: 380px) {
  .showcase-grid, .langkah-grid, .fitur-grid { grid-template-columns: 1fr; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
}
