/* ==========================================================================
   Jam Digital - situs pembeli (pratinjau UI)
   Ringan: tanpa font/library luar. Bahasa desain: biru tenang, aksen emas kecil, banyak ruang kosong.
   Urutan: 1 token, 2 dasar, 3 tata letak, 4 komponen, 5 halaman (beranda/TV/landing), 6 alat bantu
   ========================================================================== */

/* ---------- 1. Token ---------- */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --line: #e3e8f1;
  --line-strong: #cbd5e4;
  --text: #0f172a;
  --muted: #566579;
  --faint: #8794a8;

  --primary: #1d4ed8;
  --primary-600: #1e40af;
  --primary-50: #eff4ff;
  --primary-100: #dbe6ff;

  --gold: #b7791f;
  --gold-50: #fff8e6;

  --ok: #15803d;      --ok-50: #ecfdf3;
  --warn: #a15c07;    --warn-50: #fff6e5;
  --bad: #b91c1c;     --bad-50: #fef1f1;

  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .05);
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 28px -14px rgba(15, 23, 42, .16);
  --ring: 0 0 0 3px rgba(29, 78, 216, .22);

  --nav-h: 66px;
  --tabbar-h: 64px;
  --maxw: 1080px;
}

/* ---------- 2. Dasar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; line-height: 1.25; letter-spacing: -.012em; font-weight: 700; }
p { margin: 0; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
img, svg { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
.icon { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--primary); color: #fff; padding: 10px 14px; border-radius: 10px; z-index: 100; }
.skip-link:focus { top: 12px; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; scroll-behavior: auto !important; } }

/* ---------- 3. Tata letak ---------- */
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.page { padding: 30px 0 64px; }
.page-narrow { max-width: 720px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head h1 { font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem); }
.page-head p { color: var(--muted); margin-top: 4px; }
.back { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: .95rem; margin-bottom: 10px; }
.back:hover { color: var(--primary); text-decoration: none; }
.back .icon { transform: rotate(180deg); }

.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.stack-lg { display: grid; gap: 28px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-nowrap { flex-wrap: nowrap; }
.between { justify-content: space-between; }
.grow { flex: 1 1 0; min-width: 0; }
.g2, .g3, .g4 { 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)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.sticky { position: sticky; top: calc(var(--nav-h) + 16px); }
@media (max-width: 900px) { .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .split { grid-template-columns: minmax(0, 1fr); } .sticky { position: static; } }
@media (max-width: 640px) { .g2, .g3, .g4 { grid-template-columns: minmax(0, 1fr); } .container { padding: 0 16px; } .page { padding-top: 22px; } }

.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: .9rem; }
.tiny { font-size: .8rem; }
.strong { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.mono { font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace; letter-spacing: .04em; }
.lead { font-size: 1.1rem; color: var(--muted); }
.hide { display: none !important; }
[hidden] { display: none !important; }

/* ---------- 4. Komponen ---------- */
/* Tombol */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 600; font-size: 1rem; line-height: 1; cursor: pointer; text-decoration: none !important;
  transition: background .15s, border-color .15s, box-shadow .15s, transform .05s; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 1px 2px rgba(29, 78, 216, .35); }
.btn-primary:hover { background: var(--primary-600); }
.btn-soft { background: var(--primary-50); color: var(--primary-600); }
.btn-soft:hover { background: var(--primary-100); }
.btn-outline { background: var(--surface); color: var(--text); border-color: var(--line-strong); }
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(15, 23, 42, .05); color: var(--text); }
.btn-danger { background: var(--surface); color: var(--bad); border-color: #f1c4c4; }
.btn-danger:hover { background: var(--bad-50); }
.btn-wa { background: #16a34a; color: #fff; }
.btn-wa:hover { background: #15803d; }
.btn-lg { min-height: 52px; padding: 0 24px; font-size: 1.05rem; border-radius: 14px; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: .92rem; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-icon { min-width: 44px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* Kartu */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-body { padding: 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.card-head h2, .card-head h3 { font-size: 1.08rem; }
.card-foot { padding: 14px 22px; border-top: 1px solid var(--line); background: #fafbfe; border-radius: 0 0 var(--radius) var(--radius); }
.card-link { display: block; color: inherit; transition: border-color .15s, box-shadow .15s, transform .15s; }
.card-link:hover { border-color: var(--primary-100); box-shadow: 0 1px 2px rgba(15, 23, 42, .05), 0 14px 32px -14px rgba(29, 78, 216, .28); text-decoration: none; }
@media (max-width: 640px) { .card-body { padding: 18px; } .card-head { padding: 16px 18px; } }

/* Kotak informasi */
.callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm); background: var(--primary-50); color: #1e3a8a; font-size: .96rem; }
.callout .icon { margin-top: 2px; }
.callout-ok { background: var(--ok-50); color: #14532d; }
.callout-warn { background: var(--warn-50); color: #7c4a03; }
.callout-gold { background: var(--gold-50); color: #7a4f0e; }

/* Label status */
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; line-height: 1.5; background: #eef2f7; color: #475569; white-space: nowrap; }
.chip-ok { background: var(--ok-50); color: var(--ok); }
.chip-warn { background: var(--warn-50); color: var(--warn); }
.chip-bad { background: var(--bad-50); color: var(--bad); }
.chip-info { background: var(--primary-50); color: var(--primary-600); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; display: inline-block; }
.dot-ok { background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, .2); }

/* Formulir */
.field { display: grid; gap: 6px; }
.label { font-weight: 600; font-size: .95rem; }
.hint { color: var(--muted); font-size: .88rem; }
.err { color: var(--bad); font-size: .88rem; font-weight: 600; }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 10px 14px; border: 1px solid var(--line-strong); border-radius: 12px;
  background: #fff; transition: border-color .15s, box-shadow .15s; font-size: 1rem;
}
.textarea { min-height: 96px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--primary); box-shadow: var(--ring); }
.input[aria-invalid="true"] { border-color: var(--bad); }
.input-group { position: relative; }
.input-group .input { padding-right: 48px; }
.input-group .btn-icon { position: absolute; right: 2px; top: 1px; min-height: 44px; color: var(--muted); }
.code-input { font-size: 2rem; font-weight: 700; letter-spacing: .45em; text-align: center; padding-left: .45em; min-height: 64px; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--primary); }

/* Kartu pilihan (radio) */
.radio-card { display: flex; gap: 14px; padding: 16px; border: 1.5px solid var(--line-strong); border-radius: var(--radius); cursor: pointer; background: #fff; position: relative; transition: border-color .15s, background .15s; }
.radio-card:hover { border-color: var(--primary); }
.radio-card input { position: absolute; opacity: 0; pointer-events: none; }
.radio-card .mark { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-strong); flex: none; margin-top: 2px; display: grid; place-items: center; }
.radio-card:has(input:checked) { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 1px var(--primary); }
.radio-card:has(input:checked) .mark { border-color: var(--primary); background: var(--primary); }
.radio-card:has(input:checked) .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #fff; }
.radio-card:has(input:focus-visible) { box-shadow: var(--ring); }
.radio-card .price { font-weight: 800; font-size: 1.2rem; letter-spacing: -.01em; }

/* Saklar */
.switch { position: relative; display: inline-block; width: 48px; height: 28px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; cursor: pointer; margin: 0; }
.switch .track { position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .15s; pointer-events: none; }
.switch .track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .15s; }
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { box-shadow: var(--ring); }

/* Daftar baris */
.list { display: grid; }
.list-item { display: flex; align-items: center; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: 10px 16px; font-size: .96rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; }
@media (max-width: 480px) { .kv { grid-template-columns: minmax(0, 1fr); gap: 2px; } .kv dd { margin-bottom: 10px; } }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--primary-100); color: var(--primary-600); display: grid; place-items: center; font-weight: 700; flex: none; }
.ico-box { width: 44px; height: 44px; border-radius: 12px; background: var(--primary-50); color: var(--primary); display: grid; place-items: center; flex: none; }
.ico-box .icon { width: 22px; height: 22px; }
.ico-box.gold { background: var(--gold-50); color: var(--gold); }
.ico-box.ok { background: var(--ok-50); color: var(--ok); }

/* Langkah (stepper) */
.steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; counter-reset: s; }
.step { display: grid; justify-items: center; gap: 8px; text-align: center; font-size: .86rem; color: var(--muted); position: relative; }
.step .n { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; background: #e8edf5; color: var(--muted); position: relative; z-index: 1; }
.step::before { content: ""; position: absolute; top: 17px; left: -50%; width: 100%; height: 2px; background: #e1e7f0; }
.step:first-child::before { display: none; }
.step.done .n { background: var(--primary); color: #fff; }
.step.done::before, .step.active::before { background: var(--primary); }
.step.active .n { background: #fff; color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.step.active, .step.done { color: var(--text); font-weight: 600; }

/* Garis waktu vertikal */
.timeline { display: grid; gap: 0; }
.tl { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; position: relative; padding-bottom: 20px; }
.tl:last-child { padding-bottom: 0; }
.tl::before { content: ""; position: absolute; left: 13px; top: 28px; bottom: 0; width: 2px; background: #e1e7f0; }
.tl:last-child::before { display: none; }
.tl .b { width: 28px; height: 28px; border-radius: 50%; background: #e8edf5; color: var(--faint); display: grid; place-items: center; }
.tl.done .b { background: var(--ok); color: #fff; }
.tl.now .b { background: #fff; color: var(--primary); box-shadow: 0 0 0 2px var(--primary); }
.tl .b .icon { width: 15px; height: 15px; stroke-width: 3; }
.tl .t { font-weight: 600; }
.tl.todo .t { color: var(--faint); font-weight: 500; }

/* Tab */
.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin-bottom: 22px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { display: inline-flex; align-items: center; gap: 8px; padding: 12px 16px; border: 0; background: transparent; color: var(--muted); font-weight: 600; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--primary); border-bottom-color: var(--primary); }

/* Bilah kemajuan */
.bar { height: 10px; border-radius: 99px; background: #e8edf5; overflow: hidden; }
.bar > span { display: block; height: 100%; border-radius: 99px; background: var(--primary); }

/* Tabel sederhana */
.table { width: 100%; border-collapse: collapse; font-size: .96rem; }
.table th { text-align: left; color: var(--muted); font-weight: 600; font-size: .85rem; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table-wrap { overflow-x: auto; }

/* Kondisi kosong */
.empty { text-align: center; padding: 44px 20px; display: grid; justify-items: center; gap: 10px; }
.empty .ico-box { width: 64px; height: 64px; border-radius: 20px; }
.empty .ico-box .icon { width: 30px; height: 30px; }
.empty h3 { font-size: 1.15rem; }
.empty p { color: var(--muted); max-width: 42ch; }

/* Bilah atas dan navigasi */
.topbar { position: sticky; top: 0; z-index: 30; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(1.4) blur(8px); border-bottom: 1px solid var(--line); }
.topbar-inner { height: var(--nav-h); display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.1rem; color: var(--text); letter-spacing: -.01em; }
.brand:hover { text-decoration: none; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 10px; color: var(--muted); font-weight: 600; }
.nav a:hover { background: rgba(15, 23, 42, .05); color: var(--text); text-decoration: none; }
.nav a[aria-current="page"] { background: var(--primary-50); color: var(--primary-600); }
.nav-end { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.menu { position: relative; }
.menu-btn { display: inline-flex; align-items: center; gap: 10px; padding: 5px 10px 5px 5px; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; font-weight: 600; }
.menu-btn:hover { border-color: var(--line-strong); }
.menu-list { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 8px; z-index: 40; }
.menu-list a, .menu-list button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: transparent; border-radius: 10px; color: var(--text); font-weight: 500; cursor: pointer; text-align: left; }
.menu-list a:hover, .menu-list button:hover { background: #f1f5fb; text-decoration: none; }
.menu-list hr { border: 0; border-top: 1px solid var(--line); margin: 6px 0; }
.menu-head { padding: 8px 12px 10px; }

.tabbar { display: none; }
@media (max-width: 760px) {
  .nav, .menu-btn .who { display: none; }
  .topbar-inner { gap: 12px; }
  .nav-public-links { display: none; }
  .tabbar {
    display: grid; grid-template-columns: repeat(4, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(8px); border-top: 1px solid var(--line);
  }
  .tabbar a { display: grid; justify-items: center; align-content: center; gap: 3px; color: var(--faint); font-size: .74rem; font-weight: 600; position: relative; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .icon { width: 24px; height: 24px; }
  .tabbar a[aria-current="page"] { color: var(--primary); }
  .tabbar a[aria-current="page"]::before { content: ""; position: absolute; top: 0; width: 28px; height: 3px; border-radius: 0 0 4px 4px; background: var(--primary); }
  .has-tabbar .page { padding-bottom: calc(var(--tabbar-h) + 44px + env(safe-area-inset-bottom)); }
}

.footer { border-top: 1px solid var(--line); background: #fff; padding: 28px 0; color: var(--muted); font-size: .92rem; }
.footer .row { justify-content: space-between; }

/* ---------- 5. Halaman ---------- */
/* Sapaan dan langkah berikutnya (beranda) */
.greet { margin-bottom: 20px; }
.greet h1 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); }
.next {
  position: relative; overflow: hidden; border-radius: var(--radius); padding: 26px;
  background: linear-gradient(135deg, #1e3fae 0%, #1d4ed8 55%, #2f6bf0 100%); color: #fff; box-shadow: var(--shadow);
}
.next::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255, 255, 255, .08); }
.next h2 { font-size: 1.35rem; max-width: 30ch; position: relative; z-index: 1; }
.next p { color: rgba(255, 255, 255, .86); margin-top: 6px; max-width: 52ch; position: relative; z-index: 1; }
.next .actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; position: relative; z-index: 1; }
.next .btn-light { background: #fff; color: var(--primary-600); }
.next .btn-light:hover { background: #eef3ff; }
.next .btn-line { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .5); }
.next .btn-line:hover { background: rgba(255, 255, 255, .12); }
.next .steps { margin-top: 22px; position: relative; z-index: 1; }
.next .step { color: rgba(255, 255, 255, .75); }
.next .step .n { background: rgba(255, 255, 255, .18); color: #fff; }
.next .step::before { background: rgba(255, 255, 255, .25); }
.next .step.done .n { background: #fff; color: var(--primary); }
.next .step.done::before, .next .step.active::before { background: #fff; }
.next .step.active .n { background: transparent; color: #fff; box-shadow: 0 0 0 2px #fff; }
.next .step.active, .next .step.done { color: #fff; }
.next-ok { background: linear-gradient(135deg, #0f6b45, #15803d 60%, #1c9a4e); }

.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 14px; }
.section-title h2 { font-size: 1.2rem; }

.tv-card { padding: 18px; display: grid; gap: 14px; }
.tv-card h3 { font-size: 1.08rem; }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.quick a { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 18px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--text); font-weight: 600; font-size: .95rem; box-shadow: var(--shadow-sm); }
.quick a:hover { border-color: var(--primary-100); text-decoration: none; box-shadow: var(--shadow); }
@media (max-width: 900px) { .quick { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Nominal transfer */
.pay-amount { font-size: clamp(1.9rem, 1.4rem + 2vw, 2.6rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; }
.pay-amount .code { color: var(--primary); }
.copy-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px; background: #fafbfe; }
.copy-row .v { font-weight: 700; font-size: 1.1rem; word-break: break-all; }
.license-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-radius: 14px; background: var(--gold-50); border: 1px solid #f0d9a4; }
.license-box .key { font-size: clamp(1.05rem, .9rem + .8vw, 1.4rem); font-weight: 800; letter-spacing: .08em; }

/* TV contoh (dibuat dengan CSS; ukuran huruf mengikuti lebar TV) */
.tv { background: #0a1020; border-radius: 18px; padding: 9px; box-shadow: 0 22px 44px -22px rgba(15, 23, 42, .55); }
.tv-screen {
  container-type: inline-size; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; color: #fff; display: grid; grid-template-rows: auto 1fr auto auto;
  background: radial-gradient(120% 90% at 80% 0%, #2f6bf0 0%, rgba(47, 107, 240, 0) 55%), linear-gradient(165deg, #0b2a66, #0c3a86 60%, #0e4a9c);
}
.tv-top { display: grid; grid-template-columns: 1fr 1.6fr 1fr; align-items: center; text-align: center; background: rgba(6, 18, 48, .72); padding: 2.2cqw 2cqw; }
.tv-clock { font-size: 6.6cqw; font-weight: 800; letter-spacing: -.02em; line-height: 1; font-variant-numeric: tabular-nums; }
.tv-clock small { display: block; font-size: 1.5cqw; letter-spacing: .25em; opacity: .7; margin-top: .6cqw; font-weight: 600; }
.tv-name { font-size: 2.6cqw; font-weight: 800; }
.tv-addr { font-size: 1.6cqw; opacity: .75; }
.tv-date { font-size: 1.8cqw; font-weight: 700; }
.tv-date small { display: block; font-size: 1.4cqw; opacity: .7; font-weight: 500; }
.tv-mid { display: grid; place-items: center; padding: 1cqw; }
.tv-next { display: inline-flex; align-items: baseline; gap: 1.2cqw; background: #f0a92a; color: #2a1a00; padding: 1cqw 2.6cqw; border-radius: 99px; font-size: 2.1cqw; font-weight: 700; }
.tv-next b { font-size: 2.9cqw; font-variant-numeric: tabular-nums; }
.tv-strip { display: grid; grid-template-columns: repeat(5, 1fr); background: rgba(6, 18, 48, .78); text-align: center; }
.tv-strip div { padding: 1.3cqw 0; font-size: 1.55cqw; opacity: .8; font-weight: 600; }
.tv-strip div b { display: block; font-size: 2.5cqw; font-weight: 800; opacity: 1; font-variant-numeric: tabular-nums; }
.tv-strip .on { background: #f0a92a; color: #2a1a00; opacity: 1; }
.tv-ticker { background: #061230; font-size: 1.5cqw; padding: .9cqw 2cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .9; }

/* Beranda publik (landing) */
.public-hero { padding: 56px 0 44px; background: linear-gradient(180deg, #eef3ff 0%, var(--bg) 100%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 44px; align-items: center; }
.hero-grid h1 { font-size: clamp(2rem, 1.3rem + 2.8vw, 3.2rem); font-weight: 800; letter-spacing: -.025em; line-height: 1.12; }
.hero-grid h1 em { font-style: normal; color: var(--primary); }
.hero-grid .lead { margin-top: 16px; max-width: 46ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.hero-note { display: flex; gap: 18px; flex-wrap: wrap; margin-top: 22px; color: var(--muted); font-size: .92rem; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note .icon { color: var(--ok); width: 1.1em; height: 1.1em; stroke-width: 2.5; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; } .public-hero { padding-top: 32px; } }

.section { padding: 58px 0; }
.section.alt { background: #fff; border-block: 1px solid var(--line); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 34px; }
.section-head h2 { font-size: clamp(1.5rem, 1.2rem + 1.4vw, 2.1rem); letter-spacing: -.02em; }
.section-head p { color: var(--muted); margin-top: 8px; }
.feature { padding: 22px; display: grid; gap: 12px; }
.feature h3 { font-size: 1.1rem; }
.feature p { color: var(--muted); }
.how { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; counter-reset: h; }
.how li { list-style: none; position: relative; padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow-sm); counter-increment: h; }
.how li::before { content: counter(h); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 700; margin-bottom: 12px; }
.how h3 { font-size: 1.05rem; margin-bottom: 4px; }
.how p { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .how { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .how { grid-template-columns: minmax(0, 1fr); } .section { padding: 44px 0; } }

.pricing { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; max-width: 820px; margin: 0 auto; }
.price-card { padding: 28px; display: grid; gap: 16px; align-content: start; position: relative; }
.price-card.best { border: 2px solid var(--primary); }
.price-card .tag { position: absolute; top: -13px; left: 24px; background: var(--primary); color: #fff; font-size: .8rem; font-weight: 700; padding: 3px 12px; border-radius: 99px; }
.price-card h3 { font-size: 1.15rem; }
.price-card .amount { font-size: 2.2rem; font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.price-card .amount small { font-size: 1rem; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.ticks { display: grid; gap: 10px; padding: 0; margin: 0; list-style: none; }
.ticks li { display: flex; gap: 10px; align-items: flex-start; }
.ticks .icon { color: var(--ok); margin-top: 3px; stroke-width: 3; width: 1.05em; height: 1.05em; }
@media (max-width: 700px) { .pricing { grid-template-columns: minmax(0, 1fr); } }

.faq { max-width: 760px; margin: 0 auto; display: grid; gap: 10px; }
.faq details { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 0 18px; }
.faq summary { cursor: pointer; padding: 16px 0; font-weight: 600; 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: "+"; font-size: 1.4rem; color: var(--primary); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 16px; color: var(--muted); }
.cta-band { background: linear-gradient(135deg, #1e3fae, #1d4ed8 60%, #2f6bf0); color: #fff; border-radius: 22px; padding: 44px 28px; text-align: center; }
.cta-band h2 { font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); }
.cta-band p { color: rgba(255, 255, 255, .85); margin: 8px auto 22px; max-width: 46ch; }

/* Masuk / daftar */
.auth { min-height: calc(100vh - var(--nav-h)); display: grid; place-items: center; padding: 32px 16px 56px; }
.auth-card { width: 100%; max-width: 440px; padding: 34px; }
.auth-card .logo { width: 56px; height: 56px; border-radius: 14px; margin-bottom: 14px; }
.auth-card h1 { font-size: 1.6rem; }
@media (max-width: 480px) { .auth-card { padding: 24px 20px; } }

/* Pengaturan TV */
.themes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.theme { position: relative; aspect-ratio: 16 / 10; border-radius: 12px; border: 2px solid transparent; cursor: pointer; overflow: hidden; padding: 0; }
.theme[aria-pressed="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.theme span { position: absolute; left: 6px; bottom: 5px; font-size: .72rem; font-weight: 700; color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
@media (max-width: 700px) { .themes { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.media-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) { .media-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.media { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: #fff; }
.media .thumb { aspect-ratio: 16 / 9; display: grid; place-items: center; color: rgba(255, 255, 255, .9); position: relative; }
.media .thumb .chip { position: absolute; top: 8px; left: 8px; background: rgba(0, 0, 0, .5); color: #fff; }
.media .meta { padding: 10px 12px; display: grid; gap: 8px; }
.drop { border: 2px dashed var(--line-strong); border-radius: 14px; padding: 26px; text-align: center; color: var(--muted); background: #fafbfe; display: grid; justify-items: center; gap: 8px; }
.drop:hover { border-color: var(--primary); background: var(--primary-50); }
.time-cell { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.time-cell:last-child { border-bottom: 0; }
.time-cell .t { font-size: 1.25rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 12px; overflow: hidden; }
.stepper button { width: 40px; height: 40px; border: 0; background: #fff; font-size: 1.2rem; cursor: pointer; color: var(--primary); }
.stepper button:hover { background: var(--primary-50); }
.stepper output { min-width: 62px; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; font-size: .95rem; }

/* ---------- 6. Alat bantu ---------- */
.toast-wrap { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 90; display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
.toast { background: #0f172a; color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: pop .18s ease-out; font-weight: 500; }
.toast .icon { color: #4ade80; }
@keyframes pop { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) { .has-tabbar .toast-wrap { bottom: calc(var(--tabbar-h) + 18px); } }

dialog.modal { border: 0; border-radius: 18px; padding: 0; width: min(92vw, 460px); box-shadow: 0 30px 60px -20px rgba(15, 23, 42, .5); }
dialog.modal::backdrop { background: rgba(15, 23, 42, .5); }
dialog.modal .modal-body { padding: 24px; display: grid; gap: 12px; }
dialog.modal .modal-foot { padding: 14px 24px 22px; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

.preview-bar { position: fixed; left: 12px; bottom: 12px; z-index: 80; background: #0f172a; color: #e2e8f0; border-radius: 14px; padding: 8px 10px; display: flex; gap: 8px; align-items: center; font-size: .82rem; box-shadow: var(--shadow); max-width: calc(100vw - 24px); }
.preview-bar select { background: #1e293b; color: #fff; border: 1px solid #334155; border-radius: 8px; padding: 5px 8px; font-size: .82rem; }
.preview-bar b { color: #fbbf24; }
@media (max-width: 760px) { .has-tabbar .preview-bar { bottom: calc(var(--tabbar-h) + 10px); } }

/* Baris pesanan: sisi kanan boleh menyempit di layar kecil */
.ord-side { text-align: right; flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.ord-side .chip { white-space: normal; text-align: right; line-height: 1.3; }
@media (max-width: 480px) { .card-link .chev { display: none; } }

.next .steps { margin-top: 22px; }

/* ===== Tambahan untuk data nyata ===== */
.loading { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 90px 0; color: var(--muted); }
.spin { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation-duration: 2.4s; } }
.btn.is-busy { position: relative; opacity: .7; cursor: progress; }
.toast.err .icon { color: #fca5a5; }
.next-warn { background: linear-gradient(135deg, #92400e, #b45309 60%, #c2660c); }
.media .thumb { background: linear-gradient(135deg, #3b82f6, #1e3a8a); overflow: hidden; }
.media .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.media .thumb .chip { z-index: 1; }
.table-wrap { overflow-x: auto; }
.table-wrap .input { min-width: 64px; padding: 8px 10px; }
details.adv { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 12px 16px; background: #fff; }
details.adv > summary { cursor: pointer; font-weight: 600; color: var(--primary); }
details.card > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; }
details.card > summary::-webkit-details-marker { display: none; }
.time-cell { grid-template-columns: minmax(0, 1fr) auto auto; }
.time-cell .tc-in .input { width: 124px; padding: 8px 10px; }
#sched[data-mode="auto"] .tc-in { display: none; }
#sched[data-mode="auto"] .time-cell { grid-template-columns: minmax(0, 1fr) auto; }
@media (max-width: 520px) {
  .time-cell, #sched[data-mode="manual"] .time-cell { grid-template-columns: minmax(0, 1fr) auto; }
  #sched[data-mode="manual"] .tc-in { grid-column: 1 / -1; grid-row: 2; }
}
dialog.modal form { display: contents; }
dialog.modal { max-height: 92vh; overflow-y: auto; }
