@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');
/* EXOTIC STORE — Panel Store. Tema gelap modern, responsif. */
/* v5.9: font Plus Jakarta Sans (dibuat di Jakarta, tegas + gampang dibaca)
   dengan fallback ke font sistem kalau Google Fonts tidak terjangkau. */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #0a0f1e; --bg2: #0d1428; --card: #121a33; --card2: #182144;
  --line: #22304f; --line2: #2e3f66;
  --text: #eef1fa; --muted: #a2adc9; --dim: #7c89ab;
  --accent: #ffb020; --accent2: #ff8a00; --blue: #6ea8ff; --green: #34d399; --red: #f87171; --violet: #a78bfa;
  --radius: 16px; --shadow: 0 10px 30px rgba(0,0,0,.35);
}
html { scroll-behavior: smooth; overflow-x: clip; }
body { background: var(--bg); color: var(--text); font-family: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; line-height: 1.55; overflow-x: clip; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- navbar ---------- */
.nav { position: sticky; top: 0; z-index: 60; background: rgba(10,15,30,.88); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.nav-in { max-width: 1080px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 18px; }
.logo { font-size: 19px; font-weight: 800; letter-spacing: .4px; color: var(--text); white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; }
.logo-img { height: 32px; width: auto; display: block; border-radius: 10px; }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 4px; margin-left: 8px; }
.nav-links a { color: var(--muted); padding: 8px 14px; border-radius: 10px; font-size: 14.5px; font-weight: 700; background: var(--card2); border: 1px solid var(--line2); white-space: nowrap; }
.nav-links a:hover { color: var(--text); border-color: var(--blue); text-decoration: none; }
.nav-links a.active { color: var(--accent); border-color: rgba(255,176,32,.55); background: rgba(255,176,32,.10); }
.nav-right { margin-left: auto; display: flex; gap: 8px; align-items: center; }

/* ---------- navigasi bawah (khusus HP, tampil lewat media query) ---------- */
.bottom-nav { display: none; }
.nav-user { color: var(--muted); font-size: 14px; font-weight: 600; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- tombol ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; border: none; border-radius: 12px; padding: 12px 22px; font-size: 15.5px; font-weight: 800; cursor: pointer; text-align: center; }
.btn svg { width: 15px; height: 15px; flex: none; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn.block { display: block; width: 100%; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line2); font-weight: 700; }
.btn.ghost:hover { border-color: var(--blue); }
.btn.small { padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.btn.danger { background: #3a1a22; color: #fca5a5; border: 1px solid #5b2530; font-weight: 700; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- layout ---------- */
.wrap { max-width: 1080px; margin: 0 auto; padding: 28px 20px 80px; }
.wrap.narrow { max-width: 560px; }
.wrap.wide { max-width: 1280px; }
/* --- v6.6.26: halaman auth mandiri (login / register) — TANPA sidebar,
   topbar, atau bottom nav. Kartu auth sengaja BESAR dan proporsional
   (bukan kolom sempit 560px, bukan strip lebar 1080px): max-width 640px,
   padding 30px, input besar. --- */
/* v6.6.30: kartu auth DI TENGAH layar secara vertikal (bukan nempel di
   atas) — wrapper flex kolom + justify-content center + min-height
   100vh/100dvh. min-height (bukan height) supaya kalau konten lebih
   tinggi dari layar, halaman tetap bisa di-scroll (tidak terpotong). */
.auth-wrap { max-width: 640px; margin: 0 auto; padding: 28px 20px 40px; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.auth-logo { display: flex; justify-content: center; margin: 14px 0 22px; font-size: 22px; }
.auth-logo .logo-img { height: 38px; }
.auth-card { padding: 30px 32px; }
.auth-card h2 { font-size: 21px; }
.auth-card input[type=text], .auth-card input[type=email], .auth-card input[type=password], .auth-card input[type=tel] { padding: 14px 15px; font-size: 15.5px; }
.auth-links { text-align: center; margin-top: 16px; font-size: 14px; }
.auth-links a { font-weight: 700; }
/* v6.6.30: navigasi auth jadi TOMBOL (bukan teks kecil bergaris bawah) —
   tombol sekunder bergaris (ghost) yang jelas bisa diketuk, dua tombol
   berdampingan; .subtle (Kembali ke Beranda) satu baris penuh di bawah,
   lebih redup. Berlaku gelap + terang (var --line/--line2/--card2). */
.auth-nav { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.auth-nav-btn { flex: 1 1 0; display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-width: 0; padding: 11px 12px; border: 1.5px solid var(--line2); border-radius: 12px; background: var(--card2); color: var(--text); font-size: 14px; font-weight: 600; text-align: center; text-decoration: none; cursor: pointer; }
.auth-nav-btn:hover { border-color: var(--blue); color: var(--text); text-decoration: none; }
.auth-nav-btn.subtle { flex-basis: 100%; background: transparent; border-color: var(--line); color: var(--muted); font-weight: 500; }
a.auth-nav-btn:hover { text-decoration: none; }
.auth-waiting { background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 14px 16px; margin: 14px 0; font-size: 14px; line-height: 1.6; }
.auth-waiting b { color: var(--text); }
/* Tombol mata (lihat/sembunyikan password) — di dalam input, kanan. */
.pw-wrap { position: relative; }
.pw-wrap input[type=password], .pw-wrap input[type=text] { padding-right: 48px; }
.pw-toggle { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); background: none; border: none; color: var(--muted); cursor: pointer; padding: 8px; line-height: 0; border-radius: 8px; }
.pw-toggle:hover { color: var(--text); }
.pw-toggle svg { width: 20px; height: 20px; }
.pw-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* v6.6.27: [hidden] HARUS menyembunyikan elemen. Aturan eksplisit ini
   memperbaiki akar masalah ikon mata v6.6.26 — tombol berisi dua SVG
   (mata + mata-coret) yang mengandalkan UA stylesheet saja, sehingga di
   HP Wynne keduanya tampil bersamaan (ikon ganda). Aturan ini juga
   mengeraskan semua pemakaian [hidden] lain (modal, dropdown, stamp). */
[hidden] { display: none !important; }
/* v6.6.27: ikon "i" info untuk penjelasan field di halaman auth.
   Penjelasan (hint) disembunyikan dulu (.hint-collapsed), muncul saat
   ikon di-tap/klik; ketuk di luar menutupnya. Hanya halaman auth. */
.lbl-row { display: flex; align-items: center; gap: 6px; margin: 14px 0 6px; }
.lbl-row label { margin: 0; }
.info-toggle { flex: none; width: 20px; height: 20px; padding: 0; background: none; border: none; color: var(--muted); cursor: pointer; line-height: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; }
.info-toggle:hover, .info-toggle.active { color: var(--blue); }
.info-toggle svg { width: 19px; height: 19px; display: block; }
.info-toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.hint-collapsed { display: none; }
@media (max-width: 700px) {
  .auth-card { padding: 24px 20px; }
  .auth-wrap { padding: 20px 14px 40px; }
}
/* Judul halaman ala aplikasi: kecil, rapat, tanpa blok hero. */
.page-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 2px 0 16px; }
.page-head h1 { font-size: 22px; font-weight: 800; }
.page-head p { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
/* Grid 2 kolom untuk pengaturan admin (desktop); 1 kolom di HP. */
.admin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; margin-bottom: 16px; }
.admin-grid.one-col { grid-template-columns: 1fr; }
.admin-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.admin-col .card { margin-bottom: 0; min-width: 0; /* v6.5: kartu boleh mengecil — tabel di dalamnya scroll horizontal via .table-wrap, bukan memaksa kolom melebar */ }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 16px; box-shadow: var(--shadow); scroll-margin-top: 72px; }
.card h2 { font-size: 18px; margin-bottom: 12px; }
.card h3 { font-size: 15px; margin-bottom: 8px; }
.muted { color: var(--muted); }
.dim { color: var(--dim); font-size: 13px; }
.hint { font-size: 12.5px; color: var(--dim); margin-top: 6px; }

/* ---------- hero ---------- */
.hero { text-align: center; padding: 52px 16px 30px; background: radial-gradient(700px 320px at 50% -60px, rgba(255,176,32,.22), transparent 70%), radial-gradient(500px 260px at 85% 0, rgba(167,139,250,.14), transparent 70%); border-radius: 0 0 28px 28px; }
.hero h1 { font-size: 42px; line-height: 1.12; font-weight: 900; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(90deg, var(--accent), #ff7a18); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--muted); font-size: 17px; max-width: 620px; margin: 14px auto 0; }
.hero-cta { display: flex; gap: 12px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 28px; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.hero-stats div b { display: block; font-size: 22px; }
.hero-stats div span { color: var(--dim); font-size: 13px; }

/* ---------- toko (halaman utama, tanpa landing page) ---------- */
.shop-head { margin: 4px 0 18px; }
.shop-head h1 { font-size: 24px; font-weight: 800; }
.shop-head p { color: var(--muted); margin-top: 4px; font-size: 14.5px; }

/* ---------- fitur ---------- */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 26px 0; }
.feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.feature .ic { font-size: 24px; margin-bottom: 8px; }
.feature b { display: block; font-size: 15px; margin-bottom: 4px; }
.feature p { color: var(--muted); font-size: 13.5px; }

/* ---------- paket ---------- */
.section-title { font-size: 24px; font-weight: 800; text-align: center; margin: 34px 0 6px; }
.section-sub { text-align: center; color: var(--muted); margin-bottom: 22px; }
.plans { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.plan { position: relative; border: 1px solid var(--line2); border-radius: var(--radius); padding: 20px; cursor: pointer; display: block; background: var(--card); transition: transform .15s, border-color .15s, box-shadow .15s; }
.plan:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow); }
.plan input { display: none; }
.plan:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); background: var(--card2); }
.plan .tag { position: absolute; top: -11px; right: 14px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; font-size: 11px; font-weight: 800; padding: 3px 10px; border-radius: 20px; }
.plan b { font-size: 20px; display: block; }
.plan .spec { color: var(--muted); font-size: 13.5px; margin: 8px 0 12px; line-height: 1.7; }
.plan .price { color: var(--accent); font-weight: 800; font-size: 19px; display: block; }
.plan .price small { color: var(--dim); font-size: 12px; font-weight: 600; }

/* ---------- form ---------- */
label { display: block; font-size: 13.5px; color: #b9c2dc; margin: 14px 0 6px; font-weight: 600; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], select, textarea {
  width: 100%; background: var(--bg2); border: 1px solid var(--line2); color: var(--text);
  border-radius: 11px; padding: 12px 13px; font-size: 15px; outline: none; transition: border-color .15s;
}
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(110,168,255,.18); }
.alert { background: #3a1620; border: 1px solid #7a2a3a; color: #ffb3c0; border-radius: 12px; padding: 13px 15px; margin-bottom: 16px; }
.okbox { background: #0f2b1d; border: 1px solid #2c6b45; color: #a7f3d0; border-radius: 12px; padding: 13px 15px; margin-bottom: 16px; }

/* ---------- dashboard ---------- */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.stat b { font-size: 26px; display: block; }
.stat span { color: var(--dim); font-size: 13px; }
.servers { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.server { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.server-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.server-top b { font-size: 17px; }
.badge { display: inline-block; font-size: 12px; font-weight: 800; padding: 4px 11px; border-radius: 20px; white-space: nowrap; }
.badge.on { background: rgba(52,211,153,.15); color: var(--green); }
.badge.off { background: rgba(148,163,184,.15); color: #94a3b8; }
.badge.warn { background: rgba(255,176,32,.15); color: var(--accent); }
.badge.err { background: rgba(248,113,113,.15); color: var(--red); }
.server .meta { color: var(--muted); font-size: 13.5px; margin: 10px 0 14px; line-height: 1.7; }
.server .actions { display: flex; gap: 8px; flex-wrap: wrap; }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
#qrcode img { max-width: 100%; height: auto; display: block; }
.kv:last-child { border-bottom: none; }
.kv span:first-child { color: var(--muted); }
.kv code { background: var(--bg2); padding: 2px 8px; border-radius: 6px; font-size: 14px; word-break: break-all; }
.cred { background: var(--bg2); border: 1px dashed var(--accent); border-radius: 12px; padding: 14px; margin: 12px 0; }
.cred b { color: var(--accent); }

/* ---------- layout beli (desktop 2 kolom) ---------- */
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 18px; align-items: start; }
.summary { position: sticky; top: 76px; }
.summary .total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.summary .total b { color: var(--accent); font-size: 24px; }
footer { text-align: center; color: var(--dim); font-size: 13px; margin-top: 34px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 600; }
/* Tabel tidak boleh mendorong halaman jadi lebar: scroll di dalam kartu, bukan di halaman. */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 0 -22px; padding: 0 22px; scrollbar-width: thin; }
.table-wrap table { width: max-content; min-width: 100%; }
/* Riwayat terpadu (v6.2): di desktop (≥900px) tabel invoice muat dalam
   kartu — kolom punya lebar tetap supaya Status/Detail tidak terpotong
   dan teks panjang membungkus. Di HP, kembali ke lebar konten + scroll
   horizontal via .table-wrap. */
@media (min-width: 900px) {
  .table-wrap table.inv-table { width: 100%; table-layout: fixed; }
  .inv-table th:nth-child(1), .inv-table td:nth-child(1) { width: 26%; }
  .inv-table th:nth-child(2), .inv-table td:nth-child(2) { width: 36%; }
  .inv-table th:nth-child(3), .inv-table td:nth-child(3) { width: 14%; }
  .inv-table th:nth-child(4), .inv-table td:nth-child(4) { width: 12%; }
  .inv-table th:nth-child(5), .inv-table td:nth-child(5) { width: 12%; }
  .inv-table td { overflow-wrap: break-word; }
}
.row { display: flex; gap: 10px; }
.row > div { flex: 1; }
.mobile-cta { display: none; }

/* ---------- mobile ---------- */
@media (max-width: 899px) {
  .hero { padding: 36px 14px 22px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 15px; }
  .features { grid-template-columns: 1fr 1fr; }
  .plans { grid-template-columns: 1fr; }
  .plan { padding: 18px; }
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; }
  .servers { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .nav-in { padding: 10px 14px; gap: 10px; flex-wrap: nowrap; }
  .nav-links { display: none; }
  .logo { font-size: 16px; gap: 6px; }
  .logo-img { height: 26px; }
  /* Tamu di HP: lonceng tidak berguna (notifikasi butuh login) — sembunyikan supaya
     tombol Masuk + Daftar muat satu baris dan tidak kepotong di tepi kanan. */
  .nav-right.guest .icon-btn[href="notifications.php"] { display: none; }
  .nav-right .btn.small { padding: 7px 10px; font-size: 12.5px; }
  .nav-right { gap: 6px; }
  .logo-sub { display: none; }
  .nav-links a { padding: 7px 9px; font-size: 13.5px; white-space: nowrap; }
  .nav-user { display: none; }
  .wrap { padding: 20px 14px 140px; }
  .wrap.has-cta { padding-bottom: 212px; }
  /* Navigasi bawah ala aplikasi: ikon + label, nempel di bawah layar. */
  .bottom-nav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    background: rgba(18,26,51,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottom-nav a { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: var(--muted); font-size: 10.5px; font-weight: 700; padding: 6px 2px; border-radius: 10px; text-decoration: none; }
  .bottom-nav a svg { width: 22px; height: 22px; flex: none; }
  .bottom-nav a span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .bottom-nav a.active { color: var(--accent); }
  .card { padding: 16px; }
  .table-wrap { margin: 0 -16px; padding: 0 16px; }
  .row { flex-direction: column; gap: 0; }
  .kv { flex-wrap: wrap; }
  header h1 { font-size: 22px; }
  .admin-grid { grid-template-columns: 1fr; }
  /* Tabel paket di HP jadi kartu bertumpuk, bukan tabel lebar yang di-scroll. */
  .plan-table, .plan-table tbody, .plan-table tr, .plan-table td { display: block; width: 100%; }
  .plan-table tr:first-child { display: none; }
  .plan-table tr { border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; background: var(--bg2); }
  .plan-table td { border-bottom: none; padding: 5px 0; display: flex; align-items: center; gap: 10px; }
  .plan-table td::before { content: attr(data-label); flex: 0 0 92px; color: var(--muted); font-size: 13px; font-weight: 600; }
  .plan-table td input[type=text], .plan-table td input[type=number] { flex: 1; width: auto !important; min-width: 0; }
  .plan-table td input[type=checkbox] { width: 20px; height: 20px; flex: none; }
  /* Tabel Kelola User di HP TETAP tabel (v6.6.35) — tapi hanya kolom
     kunci yang tampil (Username, Saldo, Status, Aksi); Email, Panel
     user ID, Daftar disembunyikan di HP. Detail lengkap ada di kartu
     detail (modal #ku-modal-detail) saat tombol "Detail" diketuk.
     Dulu v6.6.34 kartu bertumpuk (display:block + data-label) —
     tiap user jadi kartu tinggi berisi semua field (Wynne 2026-11-21
     00:08: "jadi tetep dibuat tabel tapi nampilin beberapa info
     doang"). Dropdown Aksi disembunyikan di HP (diganti tombol
     Detail); di desktop dropdown tetap seperti biasa. */
  .ku-table th:nth-child(2), .ku-table td:nth-child(2),
  .ku-table th:nth-child(4), .ku-table td:nth-child(4),
  .ku-table th:nth-child(5), .ku-table td:nth-child(5) { display: none; }
  .ku-table .ku-dropdown-wrap { display: none; }
  .ku-table .ku-detail-btn { display: inline-flex; }
  /* Pencarian Kelola User di HP: input + tombol bertumpuk penuh-lebar
     (dulu berdesakan satu baris = jelek). */
  .ku-search { flex-direction: column; gap: 8px; }
  .ku-search input[type="search"] { width: 100%; }
  .ku-search .btn { width: 100%; }
  body { padding-bottom: 0; }
  .mobile-cta { display: flex; position: fixed; left: 0; right: 0; bottom: 62px; z-index: 50;
    background: rgba(18,26,51,.97); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom)); gap: 12px; align-items: center; }
  .mobile-cta .m-info { flex: 1; min-width: 0; }
  .mobile-cta .m-info b { color: var(--accent); font-size: 17px; display: block; }
  .mobile-cta .m-info span { color: var(--muted); font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .mobile-cta button { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; border: none; border-radius: 10px; padding: 13px 20px; font-size: 16px; font-weight: 800; cursor: pointer; flex-shrink: 0; }
  /* Label Saldo Akun / Server Aktif satu baris: rapatkan kotak dompet di HP. */
  .wallet-box { padding: 16px 12px; }
  .wallet-box .saldo-row { gap: 8px; }
  .wallet-box .saldo-box { padding: 2px 8px 2px 6px; }
  .wallet-box .deposit-btn { min-width: 68px; padding: 10px 6px; }
  .saldo-label { font-size: 10.5px; letter-spacing: 0; }
}

/* ---------- v4: light mode + toko produk digital ---------- */
/* Tema terang (dari screenshot 2): latar biru cerah, kartu putih. */
html[data-theme="light"] {
  --bg: #2b7de9; --bg2: #e9f2fd; --card: #ffffff; --card2: #f2f7ff;
  --line: #d8e6f8; --line2: #c2d6ef;
  --text: #12233d; --muted: #4d6486; --dim: #5f7896;
  /* v6.6.23: teks sekunder yang duduk LANGSUNG di atas latar biru (#2b7de9).
     --muted (#4d6486) cuma ~1,5:1 dan --dim (#5f7896) ~1,1:1 di atas biru —
     samar, tidak terbaca. #0a1428 = 4,56:1 (lolos WCAG AA ≥ 4,5:1).
     Hanya dipakai untuk teks di atas latar biru; --muted/--dim di DALAM
     kartu putih TIDAK berubah (di sana sudah terbaca, 6:1). */
  --onbg-muted: #0a1428;
  --blue: #1d6fe0; --shadow: 0 10px 30px rgba(10,40,90,.18);
}
html[data-theme="light"] .nav { background: rgba(255,255,255,.94); border-bottom-color: var(--line); }
html[data-theme="light"] .nav-links a { background: var(--card2); }
html[data-theme="light"] .bottom-nav { background: rgba(255,255,255,.97); }
html[data-theme="light"] .mobile-cta { background: rgba(255,255,255,.97); }
html[data-theme="light"] label { color: #3d5578; }
html[data-theme="light"] .hero { background: radial-gradient(700px 320px at 50% -60px, rgba(255,176,32,.25), transparent 70%); }
html[data-theme="light"] footer { color: rgba(255,255,255,.75); }
html[data-theme="light"] .shop-head h1, html[data-theme="light"] .section-title { color: #fff; }
html[data-theme="light"] .shop-head p { color: rgba(255,255,255,.85); }
/* v6.6.23: subjudul halaman (.page-head p) + catatan kaki / teks sekunder
   yang duduk langsung di atas latar biru (.wrap > p.muted/.hint/.dim —
   mis. footnote Peringkat & Voucher, subjudul Topup, empty-state Cari)
   pakai --onbg-muted supaya terbaca (4,56:1). Aturan ini TIDAK menyentuh
   teks di dalam kartu putih (.card .muted/.hint tetap pakai --muted/--dim).
   Dark mode tidak diubah (di sana --muted sudah kontras di atas #0a0f1e). */
html[data-theme="light"] .page-head p { color: var(--onbg-muted); }
html[data-theme="light"] .wrap > p.muted,
html[data-theme="light"] .wrap > p.hint,
html[data-theme="light"] .wrap > p.dim { color: var(--onbg-muted); }
/* v5.9: saldo duduk di dalam kartu putih — aturan lama yang memutihkan
   label + nominal bikin teksnya hilang (putih di atas putih). Sekarang
   label pakai --muted dan nominal pakai biru supaya terbaca jelas. */
html[data-theme="light"] .saldo-val { color: var(--blue); }
/* Kuning aksen terlalu pucat di atas putih — tautan aktif di light mode
   pakai biru supaya jelas. */
html[data-theme="light"] .nav-links a.active { color: var(--blue); border-color: rgba(29,111,224,.45); background: rgba(29,111,224,.08); }
html[data-theme="light"] .sb-link.active { color: var(--blue); background: rgba(29,111,224,.08); }
.theme-btn { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 10px; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn:hover { border-color: var(--blue); }

/* Banner promo toko (teks bisa diubah admin di kartu Toko). */
.banner { position: relative; overflow: hidden; border-radius: 18px; padding: 20px 22px; margin-bottom: 16px;
  background: linear-gradient(120deg, #7c1d2e 0%, #b91c2e 55%, #e11d48 100%); color: #fff;
  display: flex; align-items: center; gap: 16px; box-shadow: var(--shadow); }
.banner img { width: 92px; height: 92px; object-fit: contain; flex: none; filter: drop-shadow(0 6px 10px rgba(0,0,0,.35)); }
.banner .b-text b { display: block; font-size: 19px; line-height: 1.25; letter-spacing: .2px; }
.banner .b-text span { display: block; font-size: 13.5px; opacity: .92; margin-top: 4px; line-height: 1.45; }
html[data-theme="light"] .banner { background: linear-gradient(120deg, #123a6e 0%, #1d6fe0 60%, #2b7de9 100%); }

/* Poster foto asli di atas beranda (v4.1; v5.1 dikecilkan; v5.2 blur ala referensi):
   gambar tajam di tengah (maks 720px), kiri-kanannya diisi salinan gambar yang
   sama tapi di-blur — jadi kalau gambar kurang panjang, pinggirnya tetap
   terisi blur, bukan kosong / langsung kepotong. */
/* v6.6.2: sudut lebih membulat (18px -> 28px) + jarak atas lebih lega
   (16px -> 28px) supaya banner tidak mepet garis atas halaman. */
.banner-photo { position: relative; overflow: hidden; border-radius: 28px; margin: 28px 20px 16px; box-shadow: var(--shadow); }
/* ---------- carousel banner (v5.4): maks 3 poster, gulir otomatis 5 detik ---------- */
/* v6.6.2: wadah ikut membulat 28px + overflow hidden (gambar di dalam ikut
   membulat); touch-action pan-y supaya swipe horizontal ditangani JS
   sementara scroll vertikal halaman tetap jalan. */
.banner-carousel { position: relative; margin: 28px 20px 16px; overflow: hidden; border-radius: 28px; touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; }
.banner-carousel .banner-photo { margin: 0; border-radius: 28px; }
.banner-carousel.dragging { cursor: grabbing; }
/* v6.6.2: track flex + translateX — slide bergeser mengikuti jari/mouse
   (bukan cuma fade); transisi halus cubic-bezier, dimatikan saat di-drag. */
.banner-track { display: flex; transition: transform .45s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.banner-track.dragging { transition: none; }
.banner-slide { flex: 0 0 100%; min-width: 0; }
.banner-slide img { -webkit-user-drag: none; user-select: none; }
.banner-dots { position: absolute; left: 0; right: 0; bottom: 10px; display: flex; gap: 6px; justify-content: center; z-index: 2; }
.banner-dot { width: 8px; height: 8px; border-radius: 50%; border: none; background: rgba(255,255,255,.55); cursor: pointer; padding: 0; transition: all .2s; }
.banner-dot.active { background: #fff; width: 22px; border-radius: 6px; }

/* ---------- detail produk ala referensi (v5.6, gambar seperti semula v5.8) ---------- */
/* Gambar produk tampil seperti sebelum v5.6: gambarnya sendiri yang memenuhi
   lebar, tanpa kotak hero / latar di sekelilingnya — kotak hero bikin logo
   kotak kelihatan kecil di tengah bingkai kosong. */
.pd-img { width: 100%; max-width: 520px; margin: 0 auto 16px; border-radius: 18px; border: 1px solid var(--line); display: block; }
.pd-card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin: 0 0 16px; position: relative; z-index: 2; box-shadow: var(--shadow); }
/* ---------- detail produk dua kolom (v6.1, ala referensi) ---------- */
/* Desktop: gambar kiri, kartu detail kanan. HP: susun vertikal. */
.pd-wrap { max-width: 1020px; }
.pd-layout { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 24px; align-items: start; margin-bottom: 16px; }
.pd-layout > * { min-width: 0; }
/* Wadah gambar: bingkai + bayangan TEGAS supaya kelihatan jelas (bukan samar)
   di dark mode maupun light mode; overflow hidden supaya zoom tidak tumpah. */
.pd-zoom { position: relative; width: 100%; max-width: 560px; margin: 0 auto; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 6px 18px rgba(0,0,0,.40); cursor: zoom-in; }
.pd-zoom .pd-img { width: 100%; max-width: none; margin: 0; border: none; border-radius: 0; display: block; transition: transform .25s ease; will-change: transform; }
.pd-zoom.zoomed .pd-img { transform: scale(1.8); }
/* Hint zoom: pill di bawah gambar (seperti referensi); memudar saat zoom aktif
   dan disembunyikan di HP (tidak ada kursor). */
.pd-zoom-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 6px; background: rgba(10,15,30,.72); color: #fff; font-size: 12.5px; font-weight: 700; padding: 7px 14px; border-radius: 20px; pointer-events: none; white-space: nowrap; transition: opacity .2s ease; }
.pd-zoom-hint svg { width: 14px; height: 14px; flex: none; }
.pd-zoom.zoomed .pd-zoom-hint { opacity: 0; }
/* Cap "STOK HABIS" di atas gambar produk (v6.6.9): tampil kalau varian
   yang dipilih habis — menggantikan badge merah di bawah pill varian.
   Gambar ikut meredup (grayscale) saat cap tampil. */
.pd-sold-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); border: 3px solid #dc2626; border-radius: 10px; background: rgba(255,255,255,.9); color: #dc2626; font-weight: 900; font-size: 20px; letter-spacing: 3px; text-transform: uppercase; padding: 10px 20px; white-space: nowrap; box-shadow: 0 4px 18px rgba(0,0,0,.35); pointer-events: none; z-index: 3; }
.pd-sold-stamp[hidden] { display: none; }
.pd-zoom.sold-out .pd-img { filter: grayscale(.55) brightness(.78); }
/* Kartu detail: bayangan tegas yang sama seperti wadah gambar. */
.pd-layout .pd-card { margin: 0; box-shadow: 0 24px 60px rgba(0,0,0,.55), 0 6px 18px rgba(0,0,0,.40); }
.pd-title-block { min-width: 0; }
.pd-code { color: var(--muted); font-size: 13px; margin-top: 2px; }
/* Light mode: bayangan biru gelap supaya tetap kelihatan di atas latar biru. */
html[data-theme="light"] .pd-zoom, html[data-theme="light"] .pd-layout .pd-card { box-shadow: 0 24px 60px rgba(8,30,70,.35), 0 6px 18px rgba(8,30,70,.22); }
.pd-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pd-top h1 { font-size: 22px; margin: 0; }
/* Badge Terlaris: api SVG beranimasi (bukan emoji) — apinya berkedip terus
   dan ada kilau yang menyapu badge secara berkala. */
.pd-badge-terlaris { background: #dc2626; color: #fff; font-size: 12.5px; font-weight: 800; padding: 5px 12px; border-radius: 20px; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; position: relative; overflow: hidden; }
.pd-badge-terlaris .flame { display: inline-flex; width: 15px; height: 15px; flex: none; animation: flame-flicker .8s ease-in-out infinite; transform-origin: 50% 100%; filter: drop-shadow(0 0 3px rgba(255,176,32,.9)); }
.pd-badge-terlaris .flame svg { width: 100%; height: 100%; display: block; }
@keyframes flame-flicker {
  0%, 100% { transform: scaleY(1) rotate(-2.5deg) scaleX(1); }
  25% { transform: scaleY(1.14) rotate(2deg) scaleX(.96); }
  50% { transform: scaleY(.92) rotate(-1deg) scaleX(1.04); }
  75% { transform: scaleY(1.07) rotate(1.5deg) scaleX(.98); }
}
.pd-badge-terlaris::after { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.6), transparent);
  transform: translateX(-220%); animation: badge-shine 3s ease-in-out infinite; pointer-events: none; }
@keyframes badge-shine {
  0%, 55% { transform: translateX(-220%); }
  90%, 100% { transform: translateX(340%); }
}
.pd-price { font-size: 26px; font-weight: 900; color: var(--text); margin-top: 10px; }
.pd-stats { display: flex; margin-top: 14px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.pd-stats div { flex: 1; text-align: center; }
.pd-stats div + div { border-left: 1px solid var(--line); }
.pd-stats span { display: block; color: var(--muted); font-size: 12.5px; }
.pd-stats b { font-size: 17px; }
.pd-section { margin-top: 16px; }
.pd-label { font-size: 13.5px; font-weight: 700; margin-bottom: 8px; display: block; }
.pd-variants { display: flex; gap: 8px; flex-wrap: wrap; }
.var-pill { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 12px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.var-pill:hover { border-color: var(--blue); }
.var-pill.active { background: var(--blue); border-color: var(--blue); color: #fff; }
.var-pill:disabled { opacity: .45; cursor: not-allowed; }
.pd-variant-note { color: var(--muted); font-size: 13px; margin-top: 8px; }
/* Deskripsi: kotak mencolok (latar tint + garis kuning) + bisa diciutkan.
   Diciutkan tampil 3 baris + gradasi bawah; tombol muncul hanya kalau
   deskripsinya memang panjang (diatur JS di product.php). */
.pd-desc-box { background: var(--card2); border: 1px solid var(--line2); border-left: 4px solid var(--accent); border-radius: 14px; padding: 14px 16px; }
.pd-desc-head { display: flex; align-items: center; gap: 7px; font-size: 15px; color: var(--accent); }
.pd-desc-head svg { width: 18px; height: 18px; flex: none; }
.pd-desc { white-space: pre-wrap; line-height: 1.65; font-size: 14.5px; font-weight: 600; color: var(--text); transition: max-height .35s ease; position: relative; }
.pd-desc-box.collapsed .pd-desc { max-height: 72px; overflow: hidden; }
.pd-desc-box.collapsed .pd-desc::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 28px; background: linear-gradient(to bottom, rgba(0,0,0,0), var(--card2)); pointer-events: none; }
.pd-desc-box.expanded .pd-desc { max-height: 2000px; }
.pd-desc-toggle { margin-top: 10px; background: none; border: none; padding: 0; color: var(--blue); font-size: 13.5px; font-weight: 800; cursor: pointer; font-family: inherit; }
.pd-desc-toggle:hover { text-decoration: underline; }
.pd-qty-row { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; }
.qty-stepper { display: flex; align-items: center; border: 1px solid var(--line2); border-radius: 12px; overflow: hidden; }
.qty-stepper button { width: 44px; height: 40px; background: var(--card2); border: none; color: var(--text); font-size: 18px; font-weight: 700; cursor: pointer; font-family: inherit; }
.qty-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.qty-stepper span { min-width: 44px; text-align: center; font-weight: 800; font-size: 16px; }
.pd-total-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 15px; }
.pd-total-row b { font-size: 20px; font-weight: 900; color: var(--accent); }
.pd-total-row b s { color: var(--muted); font-size: 14px; font-weight: 600; margin-right: 8px; }
.pd-actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pd-actions .btn { padding: 13px 18px; font-size: 15.5px; }
.pay-panel { margin-top: 14px; background: var(--card2); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; }
.pd-balance { font-size: 14px; margin-bottom: 10px; }

/* ---------- popup saldo kurang (v5.7) ---------- */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); display: flex; align-items: center; justify-content: center; z-index: 100; padding: 20px; }
.modal-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 22px; max-width: 360px; width: 100%; box-shadow: var(--shadow); }
.modal-card h3 { margin: 0 0 8px; font-size: 19px; }
.modal-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 12px; }

/* --- v6.6.23: halaman Contact (contact.php) — menggantikan modal v6.6.22 --- */
/* Header halaman: panah kembali + judul (topbar standar tetap ada). */
.contact-head { display: flex; align-items: center; gap: 12px; margin: 2px 0 16px; }
.contact-head h1 { font-size: 22px; font-weight: 800; }
.contact-back { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; border-radius: 50%; background: var(--card); border: 1px solid var(--line); color: var(--text); flex: none; }
.contact-back:hover { text-decoration: none; border-color: var(--blue); }
.contact-back svg { width: 20px; height: 20px; }
/* Kartu owner: avatar huruf + nama toko + badge Support + jam layanan. */
.contact-owner { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.contact-avatar { width: 56px; height: 56px; border-radius: 50%; background: #6b7280; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 30px; font-weight: 700; flex: none; }
.contact-store { font-size: 18px; font-weight: 800; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.contact-badge-support { display: inline-flex; align-items: center; gap: 4px; background: var(--card2); border: 1px solid var(--line2); color: var(--muted); font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 20px; }
.contact-badge-support svg { width: 13px; height: 13px; color: var(--green); }
.contact-hours { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13.5px; margin-top: 5px; }
.contact-hours svg { width: 15px; height: 15px; flex: none; }
/* Baris kontak: ikon brand di kotak biru + nama + badge Online + Chat: ...
   + tombol salin & buka link di kanan. */
.contact-row { display: flex; align-items: center; gap: 12px; padding: 14px 2px; }
.contact-row + .contact-row { border-top: 1px solid var(--line); }
.contact-row-icon { width: 46px; height: 46px; border-radius: 12px; background: #1d6fe0; color: #fff; display: flex; align-items: center; justify-content: center; flex: none; }
.contact-row-icon svg { width: 26px; height: 26px; }
.contact-row-body { flex: 1; min-width: 0; }
.contact-row-name { font-weight: 800; font-size: 15.5px; display: flex; align-items: center; gap: 7px; }
.contact-online { display: inline-flex; align-items: center; gap: 5px; background: rgba(52,211,153,.14); color: #059669; font-size: 11.5px; font-weight: 800; padding: 2px 8px; border-radius: 20px; }
.contact-online::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #22c55e; }
html[data-theme="dark"] .contact-online { color: #34d399; }
.contact-row-chat { color: var(--muted); font-size: 13.5px; margin-top: 2px; word-break: break-all; }
.contact-row-actions { display: flex; gap: 6px; flex: none; }
.contact-act { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px; background: var(--card2); border: 1px solid var(--line2); color: var(--muted); cursor: pointer; padding: 0; }
.contact-act:hover { color: var(--text); border-color: var(--blue); text-decoration: none; }
.contact-act svg { width: 18px; height: 18px; }
/* Kotak tips bantuan cepat. */
.contact-tips { background: var(--card2); border: 1px solid var(--line2); border-radius: 14px; padding: 16px 18px; margin-top: 16px; }
.contact-tips h3 { font-size: 15.5px; margin-bottom: 8px; }
.contact-tips ul { list-style: none; }
.contact-tips li { font-size: 13.5px; line-height: 1.6; color: var(--muted); padding-left: 14px; position: relative; margin-top: 6px; }
.contact-tips li::before { content: '—'; position: absolute; left: 0; }
.contact-tips li b { color: var(--text); }

/* Modal data akun di riwayat (v6.3): mengambang di tengah layar, kartu
   lebih lebar dari modal saldo (data akun bisa panjang), isi di-scroll. */
.inv-modal-card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 20px; width: 100%; max-width: 560px; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow); position: relative; }
.inv-modal-card h3 { margin: 0 0 4px; font-size: 19px; padding-right: 32px; }
.inv-modal-x { position: absolute; top: 8px; right: 12px; background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 4px 8px; }
.inv-modal-x:hover { color: var(--text); }
.modal-amounts { background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; }
.modal-amounts div { display: flex; justify-content: space-between; font-size: 14px; padding: 3px 0; }
.modal-amounts b { font-weight: 800; }
.modal-amounts .short { color: #dc2626; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; padding: 12px; }
.banner-photo::before { content: ""; position: absolute; inset: -24px; background-image: var(--banner-url); background-size: cover; background-position: center; filter: blur(26px) brightness(.8) saturate(1.25); transform: scale(1.05); }
.banner-photo img { position: relative; z-index: 1; display: block; width: 100%; max-width: 720px; height: auto; margin: 0 auto; }

/* Sub-menu tab Produk admin (v5.2): Kelola Produk / Stok / Voucher / Rekap. */
.prod-sub { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }
.prod-sub-btn { background: var(--card2); color: var(--muted); border: 1px solid var(--line2); border-radius: 20px; padding: 8px 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; font-family: inherit; }
.prod-sub-btn:hover { color: var(--text); border-color: var(--blue); }
.prod-sub-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; border-color: transparent; }

/* ---------- layout Produk admin (v5.3): nav di samping kiri, konten kanan ---------- */
/* Ala referensi: navigasi produk di pinggir kiri, daftar produk di kanan. */
.prod-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 16px; align-items: start; }
.prod-layout .prod-sub { flex-direction: column; flex-wrap: nowrap; margin-bottom: 0; position: sticky; top: 72px; }
.prod-layout .prod-sub-btn { text-align: left; border-radius: 12px; }
.prod-content { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.prod-content .card { margin-bottom: 0; }
/* Statistik ala referensi: Total Produk / Total Stok / Total Varian / Terjual. */
.prod-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat-mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat-mini span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; }
.stat-mini b { display: block; font-size: 22px; font-weight: 900; margin-top: 2px; }
/* Toolbar daftar produk: cari + tombol tambah. */
.prod-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.prod-toolbar input[type=text] { flex: 1; min-width: 180px; margin: 0; }
/* Tabel daftar produk (nama dulu, klik nama = masuk ke Kelola Stok produk itu). */
.prod-name { background: none; border: none; padding: 0; cursor: pointer; font: inherit; font-size: 15px; font-weight: 800; color: var(--text); text-align: left; text-decoration: none; display: inline-block; }
.prod-name:hover { color: var(--blue); text-decoration: underline; }
.prod-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 10px; border: 1px solid var(--line); flex: none; }
.stock-pill { display: inline-block; font-size: 13px; font-weight: 800; padding: 5px 12px; border-radius: 20px; background: #14532d; color: #a7f3d0; }
.stock-pill.out { background: #7f1d1d; color: #fecaca; }
/* Chip kecil "Ya (N)" di tabel Kelola Produk admin (bukan pill varian
   halaman produk) — namanya dibedakan supaya aturannya tidak bentrok. */
.var-chip { display: inline-block; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 20px; background: var(--card2); border: 1px solid var(--line2); color: var(--muted); }
.icon-btn-sm { background: none; border: none; cursor: pointer; color: var(--muted); padding: 6px; border-radius: 8px; line-height: 0; }
.icon-btn-sm:hover { color: var(--text); background: var(--card2); }
.icon-btn-sm svg { width: 17px; height: 17px; }
.icon-btn-sm.danger:hover { color: #fca5a5; }
@media (max-width: 899px) {
  .banner-photo { margin: 20px 12px 12px; }
  .banner-carousel { margin: 20px 12px 12px; }
  .pd-card { margin: 0 0 16px; padding: 16px; }
  .pd-top h1 { font-size: 19px; }
  /* v6.1: detail produk susun vertikal (gambar di atas, kartu di bawah);
     hint zoom disembunyikan (tidak ada kursor di sentuh). */
  .pd-layout { grid-template-columns: 1fr; gap: 16px; }
  .pd-zoom-hint { display: none; }
  .pd-zoom { cursor: default; }
  .prod-layout { grid-template-columns: 1fr; }
  .prod-layout .prod-sub { flex-direction: row; position: static; overflow-x: auto; padding-bottom: 4px; }
  .prod-layout .prod-sub-btn { white-space: nowrap; }
  .prod-stats { grid-template-columns: repeat(2, 1fr); }
}

/* Satu kotak untuk saldo + navigasi (v4.4): saldo & Deposit di atas,
   Keranjang / Voucher / Peringkat / Beli Panel di bawah, dipisah garis. */
.wallet-box { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.wallet-box .saldo-row { margin-bottom: 0; align-items: stretch; }
.wallet-box .saldo-box { background: transparent; border: none; box-shadow: none; padding: 2px 18px 2px 10px; border-right: 1px solid var(--line); text-align: center; }
.wallet-box .saldo-row .btn { align-self: stretch; }
.wallet-box .deposit-btn { background: #2b7de9; color: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-width: 88px; border-radius: 12px; padding: 12px 14px; }
.wallet-box .deposit-btn:hover { filter: brightness(1.1); }
.wallet-box .deposit-btn svg { width: 24px; height: 24px; }
.wallet-box .quick-menu { margin-bottom: 0; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.wallet-box .quick-menu a { background: transparent; border: none; box-shadow: none; padding: 0; }

/* Halaman sukses pembelian (success_digital.php): centang beranimasi di atas,
   ringkasan pesanan di atas, Data Akun + S&K berdekatan. */
.success-hero { text-align: center; padding: 10px 0 4px; }
.success-check { width: 84px; height: 84px; margin: 6px auto 12px; animation: check-pop .45s ease-out; }
.success-check svg { width: 100%; height: 100%; display: block; }
.success-check circle { fill: none; stroke: #22c55e; stroke-width: 3; stroke-dasharray: 151; stroke-dashoffset: 151; animation: check-circle .6s ease-out forwards; }
.success-check path { fill: none; stroke: #22c55e; stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 36; stroke-dashoffset: 36; animation: check-mark .4s .5s ease-out forwards; }
@keyframes check-pop { 0% { transform: scale(.7); opacity: 0; } 60% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
@keyframes check-circle { to { stroke-dashoffset: 0; } }
@keyframes check-mark { to { stroke-dashoffset: 0; } }
.success-hero h1 { font-size: 24px; margin: 0 0 6px; }
.success-hero p { margin: 0 0 4px; }
.order-summary { padding-top: 10px; padding-bottom: 10px; }
.order-summary .kv:last-child { border-bottom: none; }
.order-summary .kv span:last-child { word-break: break-all; text-align: right; }
.success-account { margin-bottom: 10px; }

/* Baris saldo + tombol Deposit. */
.saldo-row { display: flex; gap: 12px; align-items: stretch; margin-bottom: 16px; }
.saldo-box { flex: 1; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 18px; box-shadow: var(--shadow); }
.saldo-label { color: var(--muted); font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }
.saldo-val { font-size: 24px; font-weight: 900; color: var(--accent); line-height: 1.2; }
.saldo-box .btn { align-self: center; white-space: nowrap; }

/* Menu cepat: Keranjang / Voucher / Peringkat / Beli Panel. */
.quick-menu { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.quick-menu a { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--text); font-size: 13px; font-weight: 700; box-shadow: var(--shadow); }
.quick-menu a:hover { border-color: var(--blue); text-decoration: none; }
.quick-menu a svg { width: 24px; height: 24px; color: var(--accent); }

/* Grid produk digital. */
.products-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; display: block; color: var(--text); box-shadow: var(--shadow); transition: transform .15s, border-color .15s; }
.product-card:hover { transform: translateY(-3px); border-color: var(--blue); text-decoration: none; }
.product-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--bg2); }
.product-card .pc-body { display: block; text-align: left; padding: 12px 16px 14px; }
.product-card .pc-name { font-size: 15.5px; font-weight: 800; display: block; }
.product-card .pc-sold { color: var(--muted); font-size: 12.5px; margin-top: 2px; display: block; }
.product-card .pc-price { color: var(--accent); font-weight: 900; font-size: 17px; display: block; margin-top: 6px; }
/* Badge "Sisa N" di kartu produk: warna solid kontras tinggi (hijau tua
   di atas gambar, merah kalau habis) — tidak mengandalkan animasi kilau. */
.stock-badge { position: absolute; top: 10px; left: 10px; background: #15803d; color: #fff; font-size: 12.5px; font-weight: 800; padding: 5px 12px; border-radius: 20px; box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.stock-badge.out { background: #b91c1c; }
/* Bar pencarian produk (beranda + halaman Semua Produk, v6.6.8):
   filter kartu produk berdasarkan nama, langsung saat mengetik. */
.product-search { position: relative; margin: 2px 0 14px; }
.product-search svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.product-search input[type=search] { width: 100%; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 12px; padding: 11px 13px 11px 40px; font-size: 14.5px; outline: none; transition: border-color .15s; }
.product-search input[type=search]:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(110,168,255,.18); }
.product-search-empty { text-align: center; margin: 18px 0; }

/* --- v6.6.23: form Deposit (topup.php) — input nominal + chip cepat + rincian --- */
/* Satu input nominal (bukan lagi radio preset + input custom terpisah);
   chip mengisi input, rincian Nominal / Kode unik / Total ikut berubah. */
.dep-amount { display: flex; align-items: center; gap: 10px; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 16px; margin-bottom: 12px; }
.dep-amount:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(110,168,255,.18); }
.dep-amount .dep-rp { font-size: 17px; font-weight: 800; color: var(--muted); flex: none; }
.dep-amount input { flex: 1; min-width: 0; background: none; border: none; outline: none; color: var(--text); font: inherit; font-size: 19px; font-weight: 800; }
.dep-chips { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.dep-chip { background: var(--card2); border: 1px solid var(--line2); color: var(--text); border-radius: 10px; padding: 9px 16px; font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.dep-chip:hover { border-color: var(--blue); }
.dep-chip.active { border-color: var(--blue); background: rgba(110,168,255,.14); color: var(--blue); }
.dep-breakdown { border-top: 1px solid var(--line); margin-top: 4px; }
.dep-note { font-size: 13px; color: var(--muted); margin: 12px 0 16px; }

/* --- v6.6.23: baris produk di beranda — baris horizontal ringkas --- */
/* Menggantikan .products-grid di index.php yang kartunya terlalu besar.
   products.php TETAP memakai .products-grid (tidak disentuh). */
/* --- v6.6.25: di HP (<=700px) baris di atas KEMBALI jadi grid 2 kolom
   TANPA scroll horizontal (dulu benar sebelum v6.6.23; baris horizontal
   membuat kartu pertama terpotong di kiri dan harus digeser).
   Desktop (>700px) TIDAK berubah: tetap baris horizontal flex. --- */
.ps-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 8px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.ps-card { position: relative; flex: 0 0 160px; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line2); border-radius: 14px; overflow: hidden; color: var(--text); }
.ps-card:hover { border-color: var(--blue); text-decoration: none; }
.ps-card img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--bg2); }
.ps-card .ps-name { display: block; padding: 10px 12px 0; font-size: 13.5px; font-weight: 800; text-transform: uppercase; line-height: 1.35; }
.ps-card .ps-sold { display: block; padding: 2px 12px 0; color: var(--muted); font-size: 12px; }
.ps-card .ps-price { display: block; padding: 4px 12px 12px; color: var(--accent); font-weight: 900; font-size: 15px; }
.ps-card .stock-badge { top: 8px; left: 8px; font-size: 11.5px; padding: 4px 10px; }
@media (max-width: 700px) {
  .ps-row { display: grid; grid-template-columns: 1fr 1fr; overflow-x: visible; scroll-snap-type: none; }
  .ps-card { flex: none; scroll-snap-align: none; }
}

/* Halaman detail produk. */
.product-detail { display: grid; grid-template-columns: 300px 1fr; gap: 20px; align-items: start; }
.product-detail img.pd-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.variant { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.variant:last-child { border-bottom: none; }
.variant b { font-size: 15.5px; display: block; }
.variant .v-meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.variant .v-price { color: var(--accent); font-weight: 900; font-size: 17px; white-space: nowrap; }
.variant .v-price s { color: var(--muted); font-size: 13px; font-weight: 600; margin-right: 6px; }

/* Kotak data akun + S&K di halaman sukses / riwayat. */
.account-box { background: var(--bg2); border: 1px dashed var(--accent); border-radius: 12px; padding: 16px; margin: 12px 0; }
.account-box pre { white-space: pre-wrap; word-break: break-word; font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 15px; line-height: 1.6; margin: 8px 0; }
.snk-box { background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; padding: 16px; margin: 12px 0; }
.snk-box pre { white-space: pre-wrap; word-break: break-word; font-family: inherit; font-size: 14px; line-height: 1.6; margin-top: 6px; }
.copy-btn { margin-top: 4px; }

/* Notif popup (v4.7): muncul di atas-tengah layar dengan animasi turun,
   jadi tidak perlu scroll ke atas untuk melihat "berhasil menyimpan" dll.
   Dipakai semua halaman lewat showToast() di _toast.php; klik untuk menutup. */
.toast-wrap { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 200;
  display: flex; flex-direction: column; gap: 8px; align-items: center; width: min(92vw, 480px); pointer-events: none; }
.toast { pointer-events: auto; width: 100%; background: #1a1206; color: #ffd9a0;
  border: 1px solid rgba(255,176,32,.55); border-radius: 12px; padding: 12px 16px; font-size: 14px; font-weight: 700;
  box-shadow: var(--shadow); text-align: center; cursor: pointer; animation: toast-in .35s cubic-bezier(.2,.9,.3,1.2); }
.toast-ok { background: #0f2b1d; color: #a7f3d0; border-color: #2c6b45; }
.toast-err { background: #3a1620; color: #ffb3c0; border-color: #7a2a3a; }
html[data-theme="light"] .toast { background: #12233d; color: #ffd9a0; }
html[data-theme="light"] .toast-ok { background: #0f2b1d; color: #a7f3d0; }
html[data-theme="light"] .toast-err { background: #3a1620; color: #ffb3c0; }
.toast.hide { animation: toast-out .3s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-12px) scale(.97); } }

@media (max-width: 899px) {
  .products-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .quick-menu { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .quick-menu a { font-size: 11.5px; padding: 12px 4px; }
  .banner { padding: 16px; }
  .banner img { width: 72px; height: 72px; }
  .banner .b-text b { font-size: 16px; }
  .product-detail { grid-template-columns: 1fr; }
  .saldo-val { font-size: 20px; }
}
.theme-btn .ic-moon { display: none; }
html[data-theme="light"] .theme-btn .ic-moon { display: block; }
html[data-theme="light"] .theme-btn .ic-sun { display: none; }
input[type=file] { width: 100%; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 11px; padding: 10px 12px; font-size: 14px; }

/* ---------- sidebar + topbar desktop (v5.0, ala referensi) ---------- */
/* Di HP sidebar/topbar disembunyikan; yang tampil nav atas + nav bawah biasa.
   Di desktop (>=900px) nav atas diganti sidebar kiri + topbar, dan isi halaman
   bergeser ke kanan supaya tidak ketutup sidebar. Admin tidak pakai ini
   (admin tidak include _nav.php, jadi tidak dapat class has-sidebar). */
.sidebar, .topbar { display: none; }
.voucher-code { font-size: 20px; font-weight: 800; background: var(--bg2); border: 1px dashed var(--accent); border-radius: 10px; padding: 8px 14px; color: var(--accent); letter-spacing: 1px; }
@media (min-width: 900px) {
  html.has-sidebar body { padding-left: 244px; }
  html.has-sidebar .nav { display: none; }
  html.has-sidebar .sidebar { display: flex; position: fixed; left: 12px; top: 12px; bottom: 12px; width: 220px; z-index: 80; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 12px; box-shadow: var(--shadow); overflow-y: auto; }
  .sidebar .logo { padding: 4px 10px 16px; font-size: 18px; }
  .sb-link { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 10px 12px; border-radius: 12px; margin-bottom: 2px; }
  .sb-link:hover { color: var(--text); background: var(--card2); text-decoration: none; }
  .sb-link.active { color: var(--accent); background: rgba(255,176,32,.10); }
  .sb-link svg { width: 20px; height: 20px; flex: none; }
  html.has-sidebar .topbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: sticky; top: 12px; z-index: 70; background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; margin: 12px 20px 0; box-shadow: var(--shadow); }
  .topbar > b { font-size: 17px; }
  .topbar-right { display: flex; gap: 8px; align-items: center; }
  .icon-btn { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 50%; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; }
  .icon-btn:hover { border-color: var(--blue); }
  .icon-btn svg { width: 18px; height: 18px; }
  .avatar-btn { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 50%; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; flex: none; }
  .avatar-btn:hover { border-color: var(--blue); text-decoration: none; }
  .avatar-btn svg { width: 18px; height: 18px; }
}

/* ================= v6.0 ================= */
/* --- ikon nav global (keranjang + lonceng) — .icon-btn sebelumnya hanya
   ada di media query desktop, padahal ikon ini juga dipakai di nav HP. --- */
.icon-btn { position: relative; background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 50%; width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; flex: none; text-decoration: none; }
.icon-btn:hover { border-color: var(--blue); text-decoration: none; }
.icon-btn svg { width: 18px; height: 18px; }
/* Badge angka di ikon nav (jumlah keranjang / notifikasi belum dibaca). */
.nav-badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; line-height: 18px; text-align: center; border: 2px solid var(--card); box-sizing: border-box; }

/* --- nav bawah HP: tombol "Lainnya" (samakan gaya dengan tautan nav) --- */
.bottom-nav button.bn-more { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 10.5px; font-weight: 700; padding: 6px 2px; border-radius: 10px; background: none; border: none; cursor: pointer; font-family: inherit; }
.bottom-nav button.bn-more svg { width: 22px; height: 22px; flex: none; }
.bottom-nav button.bn-more span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

/* --- "Lainnya": navigasi mengambang (bottom sheet) --- */
.more-sheet-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 90; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
.more-sheet-backdrop.open { opacity: 1; pointer-events: auto; }
.more-sheet { position: fixed; left: 0; right: 0; bottom: 0; z-index: 91; background: var(--card); border-top: 1px solid var(--line); border-radius: 18px 18px 0 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); transform: translateY(105%); transition: transform .3s ease; box-shadow: 0 -8px 30px rgba(0,0,0,.35); max-width: 560px; margin: 0 auto; }
.more-sheet.open { transform: translateY(0); }
.more-sheet-handle { width: 42px; height: 4px; border-radius: 2px; background: var(--line2); margin: 2px auto 10px; }
.more-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.more-sheet-head b { font-size: 16px; }
.more-sheet-close { background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
/* v6.6.22: item sheet jadi ubin kotak ala ikon aplikasi (grid 4 kolom,
   ikon di atas label) — bukan lagi baris daftar. */
.more-sheet-items { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.more-item { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; aspect-ratio: 1; padding: 10px 6px; color: var(--text); font-weight: 700; font-size: 12px; line-height: 1.25; text-align: center; background: var(--card2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.more-item:hover { text-decoration: none; color: var(--accent); }
.more-item svg { width: 26px; height: 26px; color: var(--muted); flex: none; }
.more-sheet-note { color: var(--dim); font-size: 12.5px; text-align: center; margin: 12px 0 0; }
/* v6.6.23: submenu Contact Owner (v6.6.3/v6.6.22) dihapus — ubin Contact
   Owner sekarang langsung membuka halaman Contact (contact.php). */
body.sheet-open { overflow: hidden; }

/* --- popup pengumuman (modal layar penuh) --- */
/* v6.6.33: DIROMBAK — lebih menarik, tidak kaku, tidak terlalu kecil
   (Wynne 2026-11-20 22:56–22:57 WIB). Kartu lebih lebar (560px) +
   padding 28px, judul + tanggal di tengah, strip gradien oranye di atas
   kartu, animasi muncul (fade + naik sedikit). v6.6.34: lencana emoji
   📢 DIGANTI ikon SVG megaphone (Wynne 23:30 WIB: "pake icon atau
   simbol pengumuman aja") — BUKAN emoji, melainkan ikon vektor.
   Isi tetap rata kiri supaya gampang dibaca. Dark + light. */
.ann-modal { position: fixed; inset: 0; z-index: 100; background: rgba(0,0,0,.65); display: flex; align-items: center; justify-content: center; padding: 18px; animation: ann-fade .2s ease; }
@keyframes ann-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes ann-card-in { from { opacity: 0; transform: translateY(10px) scale(.98); } to { opacity: 1; transform: translateY(0) scale(1); } }
.ann-modal-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: 28px 28px 24px; max-width: 560px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow); text-align: center; animation: ann-card-in .25s ease; }
.ann-modal-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; border-radius: 20px 20px 0 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.ann-modal-x { position: absolute; top: 10px; right: 12px; background: none; border: none; color: var(--muted); font-size: 26px; line-height: 1; cursor: pointer; padding: 0 4px; }
/* v6.6.34: lencana bulat 56px berisi IKON SVG megaphone (bukan emoji) —
   warna aksen (stroke currentColor), ikon 28px di tengah. */
.ann-modal-badge { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.35); display: inline-flex; align-items: center; justify-content: center; color: var(--accent); margin: 0 auto 14px; }
.ann-modal-badge svg { width: 28px; height: 28px; }
.ann-modal-img { width: 100%; border-radius: 12px; margin-bottom: 12px; display: block; }
.ann-modal-card h2 { font-size: 22px; margin-bottom: 4px; padding-right: 28px; }
.ann-modal-date { color: var(--dim); font-size: 13px; margin-bottom: 12px; }
.ann-modal-body { font-size: 15px; line-height: 1.65; margin-bottom: 18px; word-break: break-word; text-align: left; }
/* v6.6.33: mention @username di isi pengumuman (popup + halaman). */
.ann-mention { color: var(--accent); font-weight: 700; }

/* --- editor pengumuman (rich text, v6.6.33) --- */
.ann-editor { border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; min-height: 110px; font-size: 15px; line-height: 1.6; background: var(--card); color: var(--text); outline: none; }
.ann-editor:focus { border-color: var(--blue); }
.ann-editor:empty:before { content: attr(data-placeholder); color: var(--muted); pointer-events: none; }
.ann-toolbar { position: fixed; z-index: 500; display: flex; gap: 4px; background: var(--card2); border: 1px solid var(--line2); border-radius: 10px; padding: 4px; box-shadow: var(--shadow); }
.ann-toolbar[hidden] { display: none; }
.ann-toolbar button { background: none; border: none; color: var(--text); font-size: 15px; width: 34px; height: 34px; border-radius: 8px; cursor: pointer; }
.ann-toolbar button:hover { background: rgba(255,176,32,.15); }

/* --- halaman Pengumuman --- */
.ann-item { margin-bottom: 14px; }
.ann-img { width: 100%; border-radius: 12px; margin-bottom: 12px; display: block; }
.ann-item h2 { font-size: 18px; margin-bottom: 4px; }
.ann-date { margin-bottom: 10px; }
.ann-body { font-size: 14.5px; line-height: 1.65; word-break: break-word; }

/* --- halaman Notifikasi --- */
.notif-item:hover { background: var(--card2); }
.notif-unread b { font-weight: 800; }

/* --- halaman Peringkat --- */
.rank-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: nowrap; }
.rank-tabs .btn { flex: 1; text-align: center; }
.rank-tab-active { background: var(--accent) !important; color: #1a1200 !important; border-color: var(--accent) !important; }
.rank-table th:first-child, .rank-table td:first-child { width: 64px; }
.rank-row.rank-me { background: rgba(255,176,32,.08); }
/* Ikon medali SVG (v6.6.10): medali emas/perak/perunggu dengan pita melengkung,
   tanpa teks dan tanpa emoji, tanpa background (transparan). Cakram metalik
   (gradasi radial) + kilau lembut yang mengikuti bentuk cakram. */
.rank-medal-svg { display: inline-flex; width: 28px; height: 32px; position: relative; overflow: hidden; vertical-align: middle; background: none; }
.rank-medal-svg svg { width: 100%; height: 100%; display: block; }
.medal-ribbon-stroke { fill: none; stroke: #dc2626; stroke-width: 3.5; stroke-linecap: round; }
.medal-ribbon-dark-stroke { stroke: #991b1b; }
.rank-gold .medal-disc-ring { fill: none; stroke: #b8860b; stroke-width: 1; }
.rank-silver .medal-disc-ring { fill: none; stroke: #94a3b8; stroke-width: 1; }
.rank-bronze .medal-disc-ring { fill: none; stroke: #8c4a1f; stroke-width: 1; }
.medal-num { font-size: 10px; font-weight: 800; fill: #1a1200; font-family: inherit; }
/* Kilau medali (v6.6.10): elips cahaya lembut di DALAM cakram medali (clipPath
   SVG), menyapu mengikuti bentuk bulat cakram — tidak meluber ke luar. */
.medal-shine-anim { animation: medal-shine-svg 2.8s ease-in-out infinite; }
@keyframes medal-shine-svg {
  0%, 55% { transform: translateX(-13px); }
  90%, 100% { transform: translateX(13px); }
}
.rank-num { font-weight: 800; color: var(--muted); }
.rank-you { color: var(--accent); font-weight: 700; font-size: 12.5px; }

/* --- halaman Keranjang --- */
.cart-empty { text-align: center; padding: 34px 20px; }
.cart-item { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); align-items: flex-start; }
.cart-item:last-child { border-bottom: none; padding-bottom: 4px; }
.cart-item-img { width: 72px; height: 72px; object-fit: cover; border-radius: 12px; border: 1px solid var(--line); flex: none; background: var(--card2); }
.cart-item-info { flex: 1; min-width: 0; }
.cart-item-name { font-weight: 800; font-size: 15px; }
.cart-item-variant { color: var(--muted); font-size: 13px; margin-top: 2px; }
.cart-item-price { font-weight: 700; font-size: 13.5px; margin-top: 6px; color: var(--blue); }
.cart-item-side { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.cart-item-side .qty-stepper button { width: 36px; height: 34px; }
.cart-item-side .qty-stepper span { min-width: 34px; font-size: 14px; }
.cart-item-line { font-weight: 800; font-size: 15px; }
.cart-item-remove { color: var(--red); }
.cart-summary { margin-top: 4px; }
@media (max-width: 560px) {
  .cart-item { flex-wrap: wrap; }
  .cart-item-side { flex-direction: row; align-items: center; width: 100%; justify-content: space-between; }
}

/* --- v6.0 (lanjutan): input warna di admin (pengaturan PWA) --- */
input[type=color] { width: 64px; height: 42px; padding: 3px; background: var(--card2); border: 1px solid var(--line2); border-radius: 10px; cursor: pointer; }

/* ================= v6.4 ================= */
/* --- Sidebar admin berkelompok (ala AstraDax) --- */
/* Struktur: logo di atas, lalu kelompok (TOKO SAYA / PEMBAYARAN /
   INFORMASI / PENGATURAN) dengan item ber-ikon di bawah tiap kelompok.
   Desktop: sidebar tetap di kiri, isi halaman bergeser ke kanan.
   HP: sidebar jadi drawer (geser dari kiri) lewat tombol hamburger. */
.adm-sidebar { display: none; }
.adm-backdrop { display: none; }
.adm-burger { display: none; }
.adm-sidebar .logo { padding: 4px 10px 14px; font-size: 18px; }
.adm-group { color: var(--dim); font-size: 11.5px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; padding: 14px 12px 6px; }
.adm-link { display: flex; align-items: center; gap: 12px; color: var(--muted); font-weight: 700; font-size: 14.5px; padding: 10px 12px; border-radius: 12px; margin-bottom: 2px; }
.adm-link:hover { color: var(--text); background: var(--card2); text-decoration: none; }
.adm-link.active { color: var(--accent); background: rgba(255,176,32,.10); }
.adm-link svg { width: 20px; height: 20px; flex: none; }
.adm-foot { margin-top: auto; padding: 12px 10px 4px; color: var(--dim); font-size: 12px; }
.adm-side-actions { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 10px; }
html[data-theme="light"] .adm-link.active { color: var(--blue); background: rgba(29,111,224,.08); }
@media (min-width: 900px) {
  html.has-adm-sidebar body { padding-left: 272px; }
  html.has-adm-sidebar .nav.admin-nav { display: none; }
  html.has-adm-sidebar .adm-sidebar { display: flex; position: fixed; left: 12px; top: 12px; bottom: 12px; width: 248px; z-index: 80; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 16px 12px; box-shadow: var(--shadow); overflow-y: auto; }
}
@media (max-width: 899px) {
  html.has-adm-sidebar .adm-sidebar { display: flex; position: fixed; left: 0; top: 0; bottom: 0; width: 280px; max-width: 84vw; z-index: 95; flex-direction: column; background: var(--card); border-right: 1px solid var(--line); padding: 16px 12px; overflow-y: auto; transform: translateX(-105%); transition: transform .25s ease; box-shadow: var(--shadow); }
  html.has-adm-sidebar .adm-sidebar.open { transform: none; }
  html.has-adm-sidebar .adm-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 94; opacity: 0; pointer-events: none; transition: opacity .25s ease; }
  html.has-adm-sidebar .adm-backdrop.open { opacity: 1; pointer-events: auto; }
  html.has-adm-sidebar .adm-burger { display: inline-flex; }
  /* Admin tidak punya nav bawah lagi (v6.4) — padding bawah wrap kembali normal. */
  html.has-adm-sidebar .wrap { padding-bottom: 28px; }
}

/* --- Riwayat: filter kategori + toggle Tabel/Kartu + kartu invoice (v6.4) --- */
.hist-tools { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.hist-pills { display: flex; gap: 6px; flex-wrap: wrap; flex: 1; min-width: 0; }
.hist-pill { background: var(--card2); color: var(--muted); border: 1px solid var(--line2); border-radius: 20px; padding: 7px 13px; font-size: 13px; font-weight: 700; text-decoration: none; white-space: nowrap; }
.hist-pill:hover { color: var(--text); border-color: var(--blue); text-decoration: none; }
.hist-pill.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; border-color: transparent; }
.hist-view { display: flex; gap: 6px; flex: none; }
.hist-view-btn { display: inline-flex; align-items: center; gap: 6px; background: var(--card2); color: var(--muted); border: 1px solid var(--line2); border-radius: 20px; padding: 7px 13px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; }
.hist-view-btn svg { width: 16px; height: 16px; }
.hist-view-btn:hover { color: var(--text); border-color: var(--blue); }
.hist-view-btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; border-color: transparent; }
/* --- v6.6.3: rapikan filter riwayat di HP — pill filter dan tombol
   Tabel/Kartu tidak lagi tercampur dalam satu baris yang membungkus
   acak-acakan; pill di baris sendiri, tombol tampilan di baris sendiri. --- */
@media (max-width: 700px) {
  .hist-tools { flex-direction: column; align-items: stretch; }
  .hist-pills { flex: none; }
  .hist-view { justify-content: flex-end; }
}
/* Kartu invoice: tiap invoice satu kartu vertikal — semua info muat tanpa
   scroll ke samping di HP. Kartunya sendiri diklik untuk detail. */
.inv-cards { display: flex; flex-direction: column; gap: 10px; }
.inv-card { background: var(--bg2); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; cursor: pointer; }
.inv-card:hover { border-color: var(--blue); }
.inv-card-top { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 700; }
.inv-card-item { margin-top: 8px; }
.inv-card-item b { display: block; font-size: 15px; }
.inv-card-item .dim { display: block; margin-top: 2px; overflow-wrap: break-word; }
.inv-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; }
.inv-amt { font-weight: 800; font-size: 15px; }
.inv-card-hint { color: var(--dim); font-size: 12px; margin-top: 8px; }

/* ================= v6.5 ================= */
/* --- Header sidebar admin: "Admin Panel" di bawah nama store (kecil) --- */
.adm-brand { padding: 4px 10px 12px; }
.adm-brand .logo { padding: 0; font-size: 18px; display: block; }
.adm-logo-sub { color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: .4px; margin-top: 2px; padding-left: 2px; }

/* --- Dashboard admin: 8 kartu statistik (2 kolom) + grafik 7 hari --- */
.dash-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 14px; }
.dash-card { background: var(--card2); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; }
.dash-card span { display: block; color: var(--muted); font-size: 12.5px; font-weight: 700; }
.dash-card b { display: block; font-size: 21px; margin: 5px 0 3px; overflow-wrap: break-word; }
.dash-card small { color: var(--dim); font-size: 11.5px; line-height: 1.4; display: block; }
.dash-legend { display: flex; gap: 16px; flex-wrap: wrap; margin: 10px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); }
.dash-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; box-shadow: 0 2px 5px rgba(0,0,0,.25); }
/* v6.5.4: chip legenda pakai gradient yang sama dengan batangnya. */
.dash-legend .lg-ok { background: linear-gradient(135deg, #4ade80, #16a34a); }
.dash-legend .lg-pending { background: linear-gradient(135deg, #fbbf24, #d97706); }
.dash-legend .lg-fail { background: linear-gradient(135deg, #f87171, #dc2626); }
.dash-legend .lg-gross { background: linear-gradient(135deg, #818cf8, #4f46e5); }
.dash-legend .lg-profit { background: linear-gradient(135deg, #34d399, #059669); }
.dash-legend .lg-qty { background: linear-gradient(135deg, #22d3ee, #0891b2); }
/* v6.5.4: grafik vertikal didesain ulang — batang gradient (bukan flat),
   ujung atas membulat, bayangan lembut, garis bantu halus di belakang,
   label angka lebih jelas; label "0" disembunyikan (batang tetap ada,
   nilai lengkap tetap di tooltip) supaya tidak menumpuk deretan nol. */
.dash-chart { display: flex; gap: 10px; align-items: flex-end; margin-top: 12px; min-height: 150px; position: relative; }
.dash-gridlines { position: absolute; left: 0; right: 0; bottom: 24px; height: 120px; z-index: 0; background: repeating-linear-gradient(to top, var(--line2) 0 1px, transparent 1px 30px); opacity: .45; pointer-events: none; }
.dash-day { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 6px; position: relative; z-index: 1; }
.dash-bars { display: flex; gap: 5px; align-items: flex-end; height: 120px; }
/* v6.5.1: pasangan bar Kotor vs Profit — label angka di atas bar (mis.
   "400"/"100") butuh jarak lebih lebar supaya tidak berdempetan. */
.dash-bars.wide { gap: 16px; }
.dash-bar { width: 18px; border-radius: 8px 8px 2px 2px; position: relative; display: flex; justify-content: center; box-shadow: 0 4px 12px rgba(0,0,0,.22); }
.dash-bars.wide .dash-bar { width: 20px; }
.dash-bar.ok { background: linear-gradient(180deg, #4ade80, #16a34a); }
.dash-bar.pending { background: linear-gradient(180deg, #fbbf24, #d97706); }
.dash-bar.fail { background: linear-gradient(180deg, #f87171, #dc2626); }
.dash-bar.gross { background: linear-gradient(180deg, #818cf8, #4f46e5); }
.dash-bar.profit { background: linear-gradient(180deg, #34d399, #059669); }
.dash-bar span { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 11px; font-weight: 800; color: var(--text); white-space: nowrap; }
.dash-val.zero { visibility: hidden; }
.dash-day-label { font-size: 11.5px; font-weight: 700; color: var(--dim); white-space: nowrap; }
/* v6.5.1: animasi grafik dashboard — bar tumbuh dari 0 (staggered via
   transition-delay inline), angka muncul setelah bar selesai.
   v6.5.4: durasi sedikit lebih panjang supaya gerakannya lebih smooth. */
.dash-anim { height: 4px; transition: height .9s cubic-bezier(.22,1,.36,1); }
.dash-anim.go { height: var(--h, 4px); }
.dash-val { opacity: 0; transition: opacity .45s ease; }
.dash-anim.go .dash-val { opacity: 1; }
/* Donat Top Produk (v6.5.1; v6.5.4: segmen gradient + celah antar segmen
   + bayangan lembut + angka tengah lebih besar. Ujung segmen sengaja
   tetap rata (bukan round): di stroke-width 18, round cap menjulur
   ~3,6 unit melewati ujung segmen dan akan menutup celah + menimpa
   segmen tetangga. Proporsi segmen diperbaiki dengan pathLength=100 di
   markup — sebelumnya tanpa pathLength, segmen hanya tampil ~40% dari
   proporsi sebenarnya.) */
.donut-wrap { display: flex; gap: 20px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.donut { filter: drop-shadow(0 6px 14px rgba(0,0,0,.28)); }
.donut-seg { transition: stroke-dasharray 1s cubic-bezier(.22,1,.36,1), stroke-dashoffset 1s cubic-bezier(.22,1,.36,1); }
.donut-total { font-size: 24px; font-weight: 800; fill: var(--text); }
.donut-sub { font-size: 10px; letter-spacing: .5px; fill: var(--muted); }
.donut-legend { display: flex; flex-direction: column; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); }
.donut-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; box-shadow: 0 2px 5px rgba(0,0,0,.25); }
/* Bar horizontal Top Produk (v6.5.1; v6.5.4: bar lebih tebal + gradient
   + bayangan + rel (track) halus di belakang bar). */
.hbar-list { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.hbar-row { display: flex; flex-direction: column; gap: 5px; }
.hbar-name { font-size: 12.5px; font-weight: 800; color: var(--muted); }
.hbar-track { display: flex; align-items: center; gap: 8px; }
.hbar-rail { flex: 1; min-width: 0; height: 16px; background: var(--card2); border: 1px solid var(--line2); border-radius: 9px; overflow: hidden; }
.hbar { height: 100%; border-radius: 8px; width: 0; transition: width 1s cubic-bezier(.22,1,.36,1); box-shadow: 0 3px 8px rgba(0,0,0,.20); }
.hbar.go { width: var(--w, 0%); }
.hbar.gross { background: linear-gradient(90deg, #818cf8, #4f46e5); }
.hbar.profit { background: linear-gradient(90deg, #34d399, #059669); }
.hbar.qty { background: linear-gradient(90deg, #22d3ee, #0891b2); }
.hbar-val { font-size: 11.5px; font-weight: 700; color: var(--muted); white-space: nowrap; }
/* v6.5.4: di HP batang vertikal dikecilkan supaya 7 hari tetap muat
   satu baris tanpa tumpang tindih (konten kartu ~306px di layar 390px). */
@media (max-width: 899px) {
  .dash-chart { gap: 4px; }
  .dash-bars { gap: 3px; }
  .dash-bars.wide { gap: 8px; }
  .dash-bar { width: 12px; border-radius: 6px 6px 2px 2px; }
  .dash-bars.wide .dash-bar { width: 14px; }
  .dash-bar span { font-size: 10.5px; top: -16px; }
  .donut-wrap { gap: 14px; }
}
/* Toolbar rekap order (v6.5.1): pencarian + sortir. */
.rekap-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0; align-items: center; }
/* Alert error persisten di bawah form (v6.5.1: upload poster) — tidak
   hilang sendiri seperti toast, supaya gagal upload tidak terlewat. */
.alert-err { background: rgba(239,68,68,.14); border: 1px solid rgba(239,68,68,.5); color: #fca5a5; border-radius: 10px; padding: 10px 12px; margin-top: 10px; font-size: 13px; font-weight: 600; line-height: 1.5; }
.rekap-tools input[type="search"] { flex: 1; min-width: 200px; }
.rekap-tools select { min-width: 170px; }
.pay-badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11.5px; font-weight: 800; }
.pay-badge.qris { background: rgba(99,102,241,.18); color: #818cf8; }
.pay-badge.saldo { background: rgba(16,185,129,.16); color: #34d399; }
@media (prefers-reduced-motion: reduce) {
  .dash-anim, .hbar-anim, .donut-seg, .dash-val { transition: none !important; }
  .dash-anim { height: var(--h, 4px) !important; }
  .hbar-anim { width: var(--w, 0%) !important; }
  .dash-val { opacity: 1 !important; }
}

/* --- Poster Banner: thumbnail kecil, grid 3 kolom --- */
.poster-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 12px; }
.poster-slot { border: 1px solid var(--line); border-radius: 12px; padding: 12px; min-width: 0; }
.poster-thumb { width: 100%; max-width: 320px; border-radius: 8px; border: 1px solid var(--line); display: block; margin: 10px 0; }
@media (max-width: 700px) { .poster-grid { grid-template-columns: 1fr; } }

/* --- Produk: kode varian di dekat nama varian + gambar bisa diklik --- */
.var-code { font-size: 11px; font-weight: 800; color: var(--blue); background: rgba(29,111,224,.12); border-radius: 6px; padding: 2px 6px; margin-left: 4px; vertical-align: 1px; }
.prod-img-click { display: inline-block; position: relative; cursor: pointer; border-radius: 14px; overflow: hidden; border: 1px solid var(--line); }
.prod-img-click img { display: block; width: 180px; height: 180px; object-fit: cover; }
.prod-img-hint { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 12px; font-weight: 700; text-align: center; padding: 6px 4px; }
.prod-img-click:hover .prod-img-hint { background: rgba(29,111,224,.9); }

/* --- Saklar global penjualan panel --- */
.switch-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; cursor: pointer; }
.switch-row input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }

/* ================= v6.6 ================= */

/* --- Profil: foto profil besar + pemilih avatar 2 seksi --- */
.profile-avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 3px solid var(--accent); background: var(--card2); flex: none; }
.avatar-section { font-size: 15px; margin: 16px 0 8px; }
.avatar-section:first-of-type { margin-top: 4px; }
.avatar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.avatar-opt { display: flex; flex-direction: column; align-items: center; gap: 4px; background: var(--card2); border: 2px solid var(--line); border-radius: 14px; padding: 8px 4px 6px; cursor: pointer; color: var(--text); font-family: inherit; }
.avatar-opt img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; display: block; }
.avatar-opt span { font-size: 11px; font-weight: 600; text-align: center; line-height: 1.2; }
.avatar-opt:hover { border-color: var(--blue); }
.avatar-opt.selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,176,32,.35); }
/* --- v6.6.3: foto profil bisa diklik (buka modal pemilih avatar) --- */
.profile-avatar-btn { position: relative; padding: 0; border: none; background: none; cursor: pointer; border-radius: 50%; flex: none; }
.profile-avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.profile-avatar-edit { position: absolute; right: -2px; bottom: -2px; width: 28px; height: 28px; border-radius: 50%; background: var(--accent); color: #1a1a1a; display: inline-flex; align-items: center; justify-content: center; border: 2px solid var(--card); }
.profile-avatar-edit svg { width: 14px; height: 14px; }
/* --- v6.6.3: modal pemilih avatar (tersembunyi sampai foto profil diklik) --- */
.avatar-modal { position: fixed; inset: 0; z-index: 100; display: none; align-items: flex-end; justify-content: center; }
.avatar-modal.open { display: flex; }
.avatar-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.6); }
.avatar-modal-box { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 20px 20px 0 0; max-width: 560px; width: 100%; max-height: 85vh; max-height: 85dvh; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; touch-action: pan-y; padding: 18px 18px calc(24px + env(safe-area-inset-bottom)); }
.avatar-modal-head { display: flex; align-items: center; justify-content: space-between; }
.avatar-modal-head h2 { margin: 0; }
.avatar-modal-close { background: var(--card2); color: var(--text); border: 1px solid var(--line2); border-radius: 50%; width: 34px; height: 34px; font-size: 20px; line-height: 1; cursor: pointer; flex: none; }
@media (min-width: 700px) { .avatar-modal { align-items: center; padding: 24px; } .avatar-modal-box { border-radius: 20px; } }
@media (max-width: 700px) { .avatar-grid { grid-template-columns: repeat(3, 1fr); } }

/* --- Checkout: pilihan pengiriman akun --- */
.delivery-list { display: grid; gap: 8px; margin: 6px 0 12px; }
.delivery-opt { display: flex; gap: 10px; align-items: flex-start; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; cursor: pointer; font-weight: 400; }
.delivery-opt input[type="radio"] { width: 18px; height: 18px; accent-color: var(--blue); margin: 2px 0 0; flex: none; }
.delivery-opt:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.delivery-opt.disabled { opacity: .55; cursor: not-allowed; }

/* --- Admin: modal varian (pakai .modal-overlay + .inv-modal-card yang
       sudah ada; modal varian butuh kartu lebih lebar + form di dalamnya) --- */
.variant-modal .inv-modal-card { max-width: 640px; }
.variant-modal .inv-modal-card form { margin-top: 10px; }

/* ================= v6.6.1 ================= */

/* --- Modal varian rapi: grid 2 kolom label+input sejajar --- */
.vform-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.vform-grid > div { min-width: 0; }
@media (max-width: 600px) { .vform-grid { grid-template-columns: 1fr; } }

/* --- Ikon "i" penjelasan di samping label (ganti teks panjang) --- */
.info-i { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: var(--blue); color: #fff; font-size: 11px; font-weight: 800; font-style: italic; line-height: 1; cursor: pointer; vertical-align: 1px; margin-left: 4px; position: relative; flex: none; }
.info-i:hover { filter: brightness(1.15); }
.info-i:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.info-pop { display: none; position: absolute; top: 22px; left: -8px; z-index: 60; width: 260px; max-width: 78vw; background: var(--card); color: var(--text); border: 1px solid var(--line2); border-radius: 12px; padding: 10px 12px; font-size: 13px; font-weight: 400; font-style: normal; line-height: 1.5; box-shadow: 0 12px 32px rgba(0,0,0,.35); text-align: left; white-space: normal; }
.info-i.open .info-pop { display: block; }

/* --- Drag-to-reorder varian: handle + baris yang digeser + placeholder --- */
.drag-col { width: 34px; }
.drag-cell { padding-left: 4px; padding-right: 0; }
.drag-handle { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 32px; cursor: grab; touch-action: none; color: var(--muted); font-size: 15px; letter-spacing: 1px; user-select: none; -webkit-user-select: none; border-radius: 8px; }
.drag-handle:hover { color: var(--text); background: var(--card2); }
.drag-handle:active { cursor: grabbing; }
#variant-table tr.dragging { opacity: .85; background: var(--card2); box-shadow: 0 10px 24px rgba(0,0,0,.35); position: relative; z-index: 5; }
#variant-table tr.dragging td { border-color: var(--blue); }
#variant-table tr.drag-placeholder td { background: rgba(29,111,224,.14); border: 2px dashed var(--blue); border-radius: 8px; }

/* --- Label "Sisa" stok: warna solid kontras tinggi, teks tegas --- */
.sisa-badge { display: inline-block; font-size: 13px; font-weight: 800; padding: 4px 12px; border-radius: 20px; background: #15803d; color: #fff; white-space: nowrap; }
.sisa-badge.out { background: #b91c1c; }
.pd-variant-note .sisa-badge { font-size: 13.5px; padding: 5px 14px; }

/* --- Halaman Bot: layout 2 kolom (pengaturan | aksi & kontrol) --- */
.bot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: start; }
.bot-col h3 { margin: 0 0 10px; font-size: 16px; }
.bot-col h4 { margin: 14px 0 6px; font-size: 14px; }
.bot-col form { margin-top: 0; }
@media (max-width: 899px) { .bot-grid { grid-template-columns: 1fr; } }
.bot-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 14px; margin: 8px 0 12px; }
.bot-kv dt { color: var(--muted); font-weight: 700; }
.bot-kv dd { margin: 0; overflow-wrap: anywhere; }
.bot-controls { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.bot-controls .btn[disabled] { opacity: .45; cursor: not-allowed; filter: saturate(.35); }
.bot-log { background: #0b1220; color: #a7f3d0; border-radius: 12px; padding: 12px 14px; font-size: 12.5px; line-height: 1.6; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; margin: 8px 0 0; }
html[data-theme="light"] .bot-log { background: #0f1729; color: #a7f3d0; }
.tg-status-box { background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; align-items: flex-start; }
.tg-status-box .dim { font-size: 13px; }

/* --- Pairing: tab QR / No. HP + tampilan kode pairing --- */
.pairing-tabs { display: flex; gap: 6px; margin: 10px 0 12px; }
.pairing-tab { flex: 1; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line2); background: var(--card2); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; }
.pairing-tab.active { background: var(--blue); border-color: var(--blue); color: #fff; }
/* v6.6.18: tab pairing DIKUNCI kalau bot sudah terhubung — tidak bisa
   diklik / dipindah; tetap tampil (tab aktif tetap biru) tapi pudar. */
.pairing-tab:disabled, .pairing-tab.locked { opacity: .55; cursor: not-allowed; }
/* v6.6.18: rekap Order dipisah jadi 2 tab (Produk Digital / Panel) —
   hanya pane aktif yang tampil. */
.rekap-pane { display: none; }
.rekap-pane.active { display: block; }

/* v6.6.21: popup kalender kecil untuk input tanggal filter rekap
   (dd/mm/yyyy). Dipakai bersama oleh keempat input .date-dmy. */
.dmy-cal { position: absolute; z-index: 120; background: var(--bg2); border: 1px solid var(--line2); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.35); padding: 10px; width: 248px; }
.dmy-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dmy-cal-title { font-weight: 700; font-size: 13.5px; color: var(--text); }
.dmy-cal-nav { background: var(--bg); border: 1px solid var(--line2); color: var(--text); border-radius: 8px; width: 28px; height: 28px; font-size: 16px; line-height: 1; cursor: pointer; }
.dmy-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.dmy-cal-dow span { font-size: 11px; font-weight: 700; color: var(--muted); padding: 4px 0; }
.dmy-cal-day { background: transparent; border: none; color: var(--text); border-radius: 8px; height: 30px; font-size: 13px; cursor: pointer; padding: 0; }
.dmy-cal-day:hover { background: rgba(110,168,255,.18); }
.dmy-cal-day.today { outline: 1px solid var(--blue); }
.dmy-cal-day.sel { background: var(--blue); color: #fff; }
.dmy-cal-empty { height: 30px; }
/* v6.6.18: panel filter multi-field rekap digital — grid responsif
   (Cari Nama / Account / Reff ID / Pembeli / Nama Produk / Dari / Sampai). */
.rekap-filter { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 8px; margin: 12px 0; align-items: end; }
.rekap-filter label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0; }
.rekap-filter input[type="search"], .rekap-filter input.date-dmy { width: 100%; background: var(--bg2); border: 1px solid var(--line2); color: var(--text); border-radius: 11px; padding: 12px 13px; font-size: 14px; outline: none; }
.rekap-filter input:focus, .rekap-filter select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(110,168,255,.18); }
.pairing-pane { display: none; }
.pairing-pane.active { display: block; }
/* v6.6.13: indikator "Langkah Menyambungkan Bot" — 4 langkah, langkah
   yang sedang berjalan disorot (border + nomor biru), langkah yang
   sudah lewat diberi centang hijau. Diperbarui JS tiap 3 detik dari
   status bot (bot_qr_status) supaya Wynne selalu tahu sedang di
   langkah mana tanpa menebak-nebak. */
.bot-steps { display: flex; flex-direction: column; gap: 6px; margin: 10px 0 4px; }
.bot-step { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--line2); border-radius: 10px; color: var(--muted); font-size: 13.5px; }
.bot-step-num { width: 24px; height: 24px; border-radius: 50%; background: var(--card2); border: 1px solid var(--line2); color: var(--muted); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 12.5px; flex: none; }
.bot-step.current { border-color: var(--blue); color: var(--text); background: rgba(110,168,255,.08); }
.bot-step.current .bot-step-num { background: var(--blue); border-color: var(--blue); color: #fff; }
.bot-step.done { color: var(--muted); }
.bot-step.done .bot-step-num { background: var(--green); border-color: var(--green); color: #06281c; }
.pairing-code { display: flex; align-items: center; gap: 4px; justify-content: center; background: var(--card2); border: 1px dashed var(--line2); border-radius: 12px; padding: 14px 10px; margin: 10px 0; }
.pairing-char { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 40px; background: var(--card); border: 1px solid var(--line2); border-radius: 8px; font-size: 22px; font-weight: 900; letter-spacing: 0; }
.pairing-dash { font-size: 22px; font-weight: 900; color: var(--muted); margin: 0 2px; }

/* ================= v6.6.2 ================= */

/* --- Avatar tanpa nama: tombol hanya gambar (label <span> dihapus) --- */
.avatar-opt { padding: 8px 4px; }
.avatar-opt span { display: none; }

/* --- Pilihan gender (pill radio) di daftar + profil --- */
.gender-pills { display: flex; gap: 10px; margin: 6px 0 4px; }
.gender-pill { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 2px solid var(--line); border-radius: 999px; cursor: pointer; font-weight: 700; font-size: 15px; background: var(--card2); color: var(--text); }
.gender-pill input[type="radio"] { width: 18px; height: 18px; accent-color: var(--blue); margin: 0; }
.gender-pill:has(input:checked) { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.gender-pill.selected { border-color: var(--blue); }

/* --- Tab profil (Notifikasi / Akun Panel / Kelola Perangkat / Kontak) --- */
.profile-tab { display: none; }
.profile-tab.active { display: block; }
.profile-tab-btn.active { background: var(--blue); border-color: var(--blue); color: #fff; }

/* --- Layar "Pilih Metode Masuk": tiga tombol besar + panel per metode --- */
.method-grid { display: grid; gap: 10px; margin: 14px 0 6px; }
.method-btn { display: flex; gap: 12px; align-items: center; text-align: left; width: 100%; padding: 14px 16px; border: 2px solid var(--line); border-radius: 14px; background: var(--card2); color: var(--text); font: inherit; cursor: pointer; }
.method-btn svg { width: 34px; height: 34px; flex: none; }
.method-btn span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.method-btn b { font-size: 16px; }
.method-btn small { font-size: 13px; color: var(--muted); font-weight: 400; }
.method-btn:hover { border-color: var(--blue); }
a.method-btn:hover { text-decoration: none; }
.method-btn.active { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue); }
.method-panel { display: none; margin-top: 14px; }
.method-panel.active { display: block; }

/* --- Carousel v6.6.2 (lanjutan): gambar banner sendiri ikut membulat ---
   Di desktop gambar (maks 720px) berada di tengah wadah yang lebih lebar,
   jadi radius wadah saja tidak memotong sudut gambar — img butuh radius
   sendiri. Blur di belakang tetap mengisi sisi-sisinya. */
.banner-photo img { border-radius: 28px; }

/* --- Autofill Chrome tidak boleh mengubah latar input jadi putih ---
   (terlihat di screenshot render: input tel jadi putih). */
input:-webkit-autofill { -webkit-box-shadow: 0 0 0 1000px var(--card2) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); }
/* ============================================================
   v6.6.26 ITEM 6 — Kelola User: dropdown Aksi + 4 modal aksi.
   SNIPPET ini disisipkan ke public/assets/style.css saat
   integrasi (parent yang merge). JANGAN taruh file ini di
   dalam tree panel-store supaya tidak ikut ke zip.
   Memakai variabel toko yang sudah ada (var(--card),
   var(--card2), var(--line), var(--line2), --text, --muted,
   --red, --shadow) — jalan di light + dark mode.
   ============================================================ */

/* --- Pencarian Kelola User (v6.6.33) + dirapikan v6.6.34 ---
   Desktop: input lebar + tombol Cari di samping (rapi, tidak sempit).
   HP: input FULL-WIDTH di baris sendiri, tombol Cari penuh-lebar di
   bawahnya (dulu input + tombol berdesakan satu baris = jelek). */
.ku-search { display: flex; gap: 10px; margin-bottom: 14px; align-items: stretch; }
.ku-search input[type="search"] { flex: 1; min-width: 0; padding: 11px 14px; border-radius: 12px; font-size: 14.5px; }
.ku-search .btn { padding: 11px 20px; font-size: 14.5px; flex: none; }
.ku-search .btn.ghost { padding: 11px 16px; }

/* --- Dropdown Aksi (mengambang, tidak menggeser tabel) ---
   Menu pakai position: fixed + diposisikan JS dari
   getBoundingClientRect() tombol, karena .table-wrap punya
   overflow-x: auto yang memotong menu absolute di dalam sel. */
.ku-dropdown-wrap { position: relative; display: inline-block; }
.ku-dropdown-btn[aria-expanded="true"] { border-color: var(--accent); }
.ku-dropdown {
  position: fixed;
  z-index: 300;
  min-width: 190px;
  background: var(--card);
  border: 1px solid var(--line2);
  border-radius: 12px;
  box-shadow: var(--shadow);
  padding: 6px;
}
.ku-dropdown[hidden] { display: none; }
.ku-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 9px 12px;
  border-radius: 8px;
  cursor: pointer;
}
.ku-dropdown-item:hover { background: var(--card2); }
.ku-dropdown-item.ku-danger { color: var(--red); }
/* Kartu detail user Kelola User (v6.6.35, HP): tombol "Detail" di tiap
   baris membuka modal #ku-modal-detail berisi SEMUA field + aksi.
   Tombol Detail disembunyikan di desktop (di sana ada dropdown Aksi).
   Baris detail: label kiri (muted), nilai kanan. Aksi di kartu detail
   tersusun grid 2 kolom, tombol Hapus User penuh-lebar di baris akhir. */
.ku-detail-btn { display: none; }
.ku-detail-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line2); font-size: 14px; }
.ku-detail-row span { color: var(--muted); font-weight: 600; flex: none; }
.ku-detail-row b { text-align: right; word-break: break-all; }
.ku-detail-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.ku-detail-actions .btn:last-child { grid-column: 1 / -1; }

/* --- Modal aksi (halaman mengambang, terpusat) ---
   .ku-modal adalah backdrop full-screen (klik backdrop menutup);
   .ku-modal-card adalah kartunya (max-width 480px, scroll kalau
   konten melebihi viewport). [hidden] harus menang atas display. */
.ku-modal {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .55);
}
.ku-modal[hidden] { display: none; }
.ku-modal-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 22px;
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 40px);
  max-height: calc(100dvh - 40px);
  overflow-y: auto;
}
.ku-modal-card h3 { margin: 0 0 8px; font-size: 19px; padding-right: 28px; }
.ku-modal-card p { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0 0 12px; }
.ku-modal-card p b { color: var(--text); }
.ku-modal-card form { display: grid; gap: 8px; }
.ku-modal-card label { font-size: 13px; font-weight: 700; color: var(--muted); }
.ku-modal-x {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
}
.ku-modal-x:hover { color: var(--text); }
.ku-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 6px;
}
@media (max-width: 700px) {
  .ku-modal { padding: 12px; }
  .ku-modal-card { padding: 18px; border-radius: 14px; }
  .ku-modal-actions .btn { flex: 1; }
}

/* ============ v6.6.29 ============ */
/* ITEM 1 — indikator live cek username (modal Ganti Username). Ikon
   SATU svg per status (ceklis / X), di kanan dalam input. Warna
   kontras-teruji di tema gelap (bg input #0d1428) DAN terang
   (bg input #e9f2fd): hijau #16a34a/#166534, merah #ef4444/#b91c1c
   (bukan var(--green)/var(--red) — gagal kontras di terang). */
.uname-wrap { position: relative; }
.uname-wrap input[type=text] { padding-right: 44px; }
.uname-ind { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); width: 20px; height: 20px; display: none; align-items: center; justify-content: center; line-height: 0; pointer-events: none; }
.uname-ind.ok, .uname-ind.bad, .uname-ind.checking { display: inline-flex; }
.uname-ind svg { width: 20px; height: 20px; display: block; }
.uname-ind.ok { color: #16a34a; }
.uname-ind.bad { color: #ef4444; }
html[data-theme="light"] .uname-ind.ok { color: #166534; }
html[data-theme="light"] .uname-ind.bad { color: #b91c1c; }
.ku-modal-card .uname-msg { font-size: 13px; margin: 2px 0 0; min-height: 18px; }
.ku-modal-card .uname-msg.ok { color: #16a34a; }
.ku-modal-card .uname-msg.bad { color: #ef4444; }
html[data-theme="light"] .ku-modal-card .uname-msg.ok { color: #166534; }
html[data-theme="light"] .ku-modal-card .uname-msg.bad { color: #b91c1c; }
.uname-spin { display: block; width: 16px; height: 16px; border: 2px solid var(--line2); border-top-color: var(--blue); border-radius: 50%; animation: uname-spin .7s linear infinite; }
@keyframes uname-spin { to { transform: rotate(360deg); } }
/* ITEM 2 — tombol ikon pensil (trigger Ganti Username, profile).
   Area sentuh 36px, warna muted, bekerja di kedua tema. */
.icon-btn { flex: none; width: 36px; height: 36px; padding: 0; background: transparent; border: 1px solid var(--line); border-radius: 10px; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; line-height: 0; }
.icon-btn:hover { color: var(--text); border-color: var(--blue); }
.icon-btn svg { width: 18px; height: 18px; display: block; }
.icon-btn:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
/* ITEM 3 — kotak digit OTP (Step 2 login WA). 4 kotak, gaya Telegram:
   kotak bulat, satu digit per kotak, digit di tengah, kotak AKTIF
   (fokus) border biru. Bekerja di tema gelap + terang. */
.otp-boxes { display: flex; gap: 12px; justify-content: center; margin: 18px 0 6px; }
.auth-card .otp-boxes input.otp-box { width: 56px; height: 64px; flex: none; padding: 0; text-align: center; font-size: 28px; font-weight: 800; line-height: 1; color: var(--text); background: var(--bg2); border: 2px solid var(--line2); border-radius: 14px; outline: none; transition: border-color .2s ease, box-shadow .2s ease, transform .15s ease; }
.auth-card .otp-boxes input.otp-box:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(110,168,255,.18); }
html[data-theme="light"] .auth-card .otp-boxes input.otp-box:focus { box-shadow: 0 0 0 3px rgba(29,111,224,.16); }
.auth-card .otp-boxes input.otp-box.pop { animation: otp-pop .18s ease; }
@keyframes otp-pop { 0% { transform: scale(1); } 40% { transform: scale(1.12); } 100% { transform: scale(1); } }
.otp-boxes.shake { animation: otp-shake .4s ease; }
@keyframes otp-shake { 0%, 100% { transform: translateX(0); } 20% { transform: translateX(-7px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(5px); } }
/* ITEM 3 — link "Kirim ulang kode" / "Sudah punya kode?" (Step 2 dan
   Step 1). Tampil seperti link, bukan tombol penuh. Saat countdown:
   abu-abu, tidak bisa diklik. */
.auth-resend { display: block; width: 100%; background: none; border: none; padding: 6px 0; margin: 6px 0 0; color: var(--blue); font-size: 14px; font-weight: 600; text-align: center; cursor: pointer; text-decoration: underline; }
.auth-resend:hover { color: var(--text); }
.auth-resend:disabled { color: var(--dim); cursor: default; text-decoration: none; }
/* ITEM 4 — animasi ganti tema (circular reveal, View Transitions API).
   Matikan animasi default (cross-fade) supaya hanya lingkaran yang
   terlihat; tampilan BARU di atas (z-index tinggi), lingkaran tumbuh
   dari tombol yang diklik (clip-path di JS _nav.php). */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-old(root) { z-index: 1; }
::view-transition-new(root) { z-index: 2147483646; }
@media (prefers-reduced-motion: reduce) {
  .uname-spin { animation: none; }
  .auth-card .otp-boxes input.otp-box { transition: none; }
  .auth-card .otp-boxes input.otp-box.pop, .otp-boxes.shake { animation: none; }
}

/* ============ v6.6.32 ============ */
/* ITEM 2 — ikon profil topbar + tab Profil nav bawah menampilkan FOTO
   avatar user saat ini (bukan ikon orang generik). <img> diposisikan
   menutupi svg di bawahnya (fallback kalau gambar gagal dimuat, JS
   onerror menghapus <img> sehingga svg tampil lagi). Bentuk tetap
   lingkaran, ukuran sama dengan ikon sebelumnya (topbar 34px,
   nav bawah 22px). */
.avatar-btn { position: relative; overflow: hidden; }
.avatar-btn img.topbar-avatar { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bottom-nav .bn-avatar-wrap { position: relative; width: 22px; height: 22px; flex: none; line-height: 0; }
.bottom-nav .bn-avatar-wrap svg { width: 22px; height: 22px; }
.bottom-nav .bn-avatar-wrap img.bn-avatar { position: absolute; inset: 0; width: 22px; height: 22px; border-radius: 50%; object-fit: cover; }
/* ============ v6.6.33 ============ */
/* ITEM 1 — modal onboarding pasca-login: LEBIH BESAR + LEBIH RAPIH
   (Wynne 2026-11-20 22:42 WIB: "tampilannya jelek banget, ubah
   tampilannya agak lebih besar dan rapih"). Kartu lebih lebar
   (max-width 520px), padding lebih lega (28px), judul lebih besar
   (22px), teks isi 15px / line-height 1.65, ikon bulat di atas judul,
   tombol aksi penuh-lebar bertumpuk (primer oranye + Lewati), hint
   di tengah. Pola .ku-modal tetap dipakai; dark + light. */
.onboarding-modal .ku-modal-card { max-width: 520px; padding: 28px 28px 24px; border-radius: 20px; }
.onboarding-modal .ku-modal-card h3 { font-size: 22px; margin: 0 0 10px; }
.onboarding-modal .ku-modal-card p { font-size: 15px; line-height: 1.65; margin: 0 0 16px; }
.onboarding-modal .onb-icon { width: 56px; height: 56px; border-radius: 50%; background: rgba(255,176,32,.12); border: 1px solid rgba(255,176,32,.35); display: flex; align-items: center; justify-content: center; font-size: 28px; margin-bottom: 16px; }
.onboarding-modal .ku-modal-actions { flex-direction: column; margin-top: 4px; }
.onboarding-modal .ku-modal-actions .btn { flex: none; width: 100%; padding: 13px 16px; font-size: 15px; }
.onboarding-modal .ku-modal-card p.hint { text-align: center; font-size: 13.5px; margin: 14px 0 0; }
.onboarding-modal .ku-modal-x { padding: 8px 10px; }
@media (max-width: 700px) {
  .onboarding-modal .ku-modal-card { padding: 24px 20px 20px; }
  .onboarding-modal .ku-modal-card h3 { font-size: 20px; }
}
/* ============ v6.6.36: LIVE CHAT (sistem tiket) ============ */
/* Kotak chat mengambang kanan bawah (seperti chat IG/FB web) — HANYA
   user login. Desain: bersih, bulat, jelas (Wynne 2026-11-21 00:42 WIB:
   "pastikan mudah dipahami dan menarik"). Pesan user di kanan (oranye),
   pesan admin di kiri (abu). Header: avatar + nama admin + ID tiket. */
/* Tombol mengambang (FAB). Di HP duduk di atas bottom nav (~56px). */
.lc-fab { position: fixed; right: 20px; bottom: 20px; z-index: 80; width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; color: #1a1206; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.lc-fab svg { width: 26px; height: 26px; }
.lc-fab:hover { filter: brightness(1.08); }
.lc-fab-dot { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--red); border: 2px solid var(--card); }
.lc-panel { position: fixed; right: 20px; bottom: 88px; z-index: 80; width: 360px; max-width: calc(100vw - 24px); height: 480px; max-height: calc(100vh - 120px); display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,.4); overflow: hidden; }
.lc-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: linear-gradient(135deg, rgba(255,176,32,.16), rgba(255,176,32,.05)); border-bottom: 1px solid var(--line); }
.lc-head-avatar { width: 38px; height: 38px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; font-weight: 800; font-size: 17px; display: flex; align-items: center; justify-content: center; flex: none; }
.lc-head-text { flex: 1; min-width: 0; }
.lc-head-title { font-weight: 800; font-size: 15px; }
.lc-ticket { font-weight: 700; font-size: 12px; color: var(--accent); margin-left: 4px; }
.lc-head-status { font-size: 12.5px; color: var(--muted); margin-top: 1px; }
.lc-x { background: none; border: none; color: var(--muted); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px 8px; border-radius: 8px; }
.lc-x:hover { color: var(--text); background: var(--card2); }
.lc-status { padding: 10px 14px; font-size: 13.5px; line-height: 1.5; border-bottom: 1px solid var(--line); background: var(--card2); color: var(--muted); }
.lc-status-ok { color: var(--green); background: rgba(52,211,153,.08); }
.lc-status-end { color: var(--muted); }
.lc-slow { color: var(--accent); font-weight: 700; }
.lc-messages { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; }
.lc-msg { display: flex; flex-direction: column; max-width: 82%; }
.lc-msg-user { align-self: flex-end; align-items: flex-end; }
.lc-msg-admin { align-self: flex-start; align-items: flex-start; }
.lc-bubble { padding: 9px 13px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.lc-msg-user .lc-bubble { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; border-bottom-right-radius: 5px; font-weight: 600; }
.lc-msg-admin .lc-bubble { background: var(--card2); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.lc-time { font-size: 11px; color: var(--muted); margin-top: 3px; }
.lc-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); }
/* v6.6.39: PREVIEW media sebelum dikirim (Wynne 2026-11-21 02:32 WIB —
   media tidak langsung terkirim saat dipilih; user/admin menulis
   caption dulu lalu tekan Kirim). Thumbnail/nama file + input caption
   + tombol Kirim/Batal. Dipakai kotak user (_nav.php) dan panel admin. */
.lc-preview { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--card2); }
.lc-preview[hidden] { display: none; }
.lc-preview-img, .lc-preview-video { display: block; max-width: 220px; max-height: 160px; border-radius: 10px; }
.lc-preview-name { font-size: 12.5px; color: var(--muted); word-break: break-all; }
.lc-preview input[type="text"] { width: 100%; border: 1px solid var(--line2); background: var(--card); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; font-family: inherit; }
.lc-preview input[type="text"]:focus { outline: none; border-color: var(--accent); }
.lc-preview-actions { display: flex; gap: 8px; }
.lc-input-row input { flex: 1; min-width: 0; border: 1px solid var(--line2); background: var(--card2); color: var(--text); border-radius: 12px; padding: 10px 12px; font-size: 14.5px; font-family: inherit; }
.lc-input-row input:focus { outline: none; border-color: var(--accent); }
.lc-end { background: none; border: none; border-top: 1px solid var(--line); color: var(--red); font-size: 13.5px; font-weight: 700; padding: 10px; cursor: pointer; font-family: inherit; }
.lc-end:hover { background: rgba(248,113,113,.08); }
.lc-new { margin: 10px 12px 12px; }
/* Kartu Live Chat di halaman Contact (hanya login). v6.6.38: kartu bisa
   diklik langsung untuk membuka room chat (bukan lagi input pesan
   pertama + tombol "Mulai Chat"). */
.contact-row-livechat { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 16px; cursor: pointer; }
.contact-livechat-btn { flex: none; padding: 10px 18px; font-size: 14px; }
/* ---------- Admin: seksi Live Chat ---------- */
.adm-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; margin-left: auto; border-radius: 10px; background: var(--red); color: #fff; font-size: 12px; font-weight: 800; }
.lc-count { color: var(--muted); font-weight: 700; font-size: 13px; }
.lc-admin-layout { display: grid; grid-template-columns: minmax(400px, 42%) 1fr; gap: 16px; align-items: start; }
.lc-admin-list { display: flex; flex-direction: column; gap: 18px; }
.lc-admin-sec h3 { margin: 0 0 8px; font-size: 15px; }
.lc-admin-item { display: block; width: 100%; text-align: left; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; cursor: pointer; color: var(--text); font-family: inherit; }
.lc-admin-item:hover { border-color: var(--accent); }
.lc-admin-item-sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.lc-admin-item-top { font-size: 14px; }
.lc-admin-item-top .muted { font-weight: 600; }
.lc-admin-item-sub { font-size: 13px; color: var(--muted); margin-top: 4px; line-height: 1.45; }
.lc-admin-chat { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.lc-admin-chat-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--card2); border-bottom: 1px solid var(--line); font-weight: 800; font-size: 14.5px; }
.lc-admin-head-btns { display: flex; gap: 8px; align-items: center; flex: none; }
/* v6.6.38: area chat admin KOMPAK — tinggi dibatasi (480px, maks 60vh)
   dengan scroll internal, supaya layar chat tidak mendominasi halaman
   dan daftar antrean + chat aktif tetap terlihat sekilas. flex: none
   penting: .lc-messages memakai flex: 1 (flex-basis 0) yang membuat
   height diabaikan dan area chat membesar mengikuti isi (mis. gambar
   besar) — dengan flex: none, height 480px benar-benar mengikat. */
.lc-admin-messages { flex: none; height: 480px; max-height: 60vh; }

/* ============ v6.6.37 ============ */
/* ITEM 1 — kotak chat user bisa DIGESER (drag) di PC: header jadi gagang
   (cursor grab saat desktop; di HP/mobile tetap di tempat — drag
   dimatikan JS-nya di sana). Saat digeser, panel memakai left/top
   inline (right/bottom auto) dan kursor berubah grabbing. */
@media (min-width: 900px) and (pointer: fine) {
  .lc-head { cursor: grab; user-select: none; -webkit-user-select: none; touch-action: none; }
  .lc-head.lc-dragging { cursor: grabbing; }
}
/* ITEM 2 (v6.6.37) — input pesan pertama di kartu Live Chat (Contact) +
   composer pesan pertama di dalam kotak chat. DIHAPUS v6.6.38 (Wynne
   2026-11-21 02:10 WIB: "cukup buka aja langsung room chat nya pas
   diklik") — pesan pertama kini diketik di input utama room (teks atau
   media); aturan "tiket baru wajib ada pesan" tetap berlaku di server. */
/* ITEM 3 — alignment panel admin DIBALIK dari kotak user: di panel admin,
   pesan ADMIN (sendiri) di KANAN oranye dan pesan user di KIRI abu.
   Kelas pengirim TIDAK diubah (lc-msg-admin tetap = admin) — posisinya
   dibalik lewat konteks .lc-admin-messages. */
.lc-admin-messages .lc-msg-admin { align-self: flex-end; align-items: flex-end; }
.lc-admin-messages .lc-msg-admin .lc-bubble { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #1a1206; border: 1px solid transparent; border-bottom-right-radius: 5px; border-bottom-left-radius: 16px; font-weight: 600; }
.lc-admin-messages .lc-msg-user { align-self: flex-start; align-items: flex-start; }
.lc-admin-messages .lc-msg-user .lc-bubble { background: var(--card2); color: var(--text); border: 1px solid var(--line); border-bottom-left-radius: 5px; border-bottom-right-radius: 16px; font-weight: 400; }
/* ITEM 4 — media (gambar/video) di chat: gambar thumbnail (klik untuk
   lihat penuh), video player inline. Berlaku di kotak user + panel admin.
   v6.6.38: ukuran media DIBATASI (maks ~280px di kotak user, ~300px di
   panel admin) supaya gambar besar tidak memenuhi layar chat — klik
   untuk lihat penuh. Caption (kalau ada) tampil di bawah media. */
.lc-attach { flex: none; width: 42px; height: 42px; border: 1px solid var(--line2); background: var(--card2); color: var(--muted); border-radius: 12px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lc-attach:hover { color: var(--accent); border-color: var(--accent); }
.lc-attach:disabled { opacity: .45; cursor: not-allowed; }
.lc-attach svg { width: 20px; height: 20px; }
.lc-media-link { display: block; max-width: 100%; }
.lc-media-img { display: block; max-width: 280px; max-height: 280px; object-fit: contain; border-radius: 12px; }
.lc-media-video { display: block; max-width: 280px; max-height: 280px; object-fit: contain; border-radius: 12px; background: #000; }
.lc-admin-messages .lc-media-img, .lc-admin-messages .lc-media-video { max-width: 300px; max-height: 300px; }
/* v6.6.40: media + caption SATU bubble ala WhatsApp — media di atas,
   caption langsung di bawahnya DI DALAM bubble yang sama. Bubble media
   padding tipis supaya gambar hampir mengisi bubble; caption punya
   padding sendiri. Batas ukuran media tetap (280px kotak user,
   300px panel admin; klik untuk lihat penuh). */
.lc-bubble-media { padding: 5px; overflow: hidden; }
.lc-bubble-media .lc-media-img, .lc-bubble-media .lc-media-video { border-radius: 11px; }
.lc-bubble-media .lc-caption { padding: 7px 8px 4px; font-size: 14.5px; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
/* ITEM 6 + 7 — antrean admin DILEBARKAN (kolom daftar 42% dari lebar,
   bukan 340px — lihat .lc-admin-layout di atas) + preview isi chat
   menunggu (pesan pertama + jumlah pesan, membungkus rapi 3 baris). */
.lc-admin-item-preview { font-size: 13.5px; color: var(--text); margin-top: 6px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.lc-admin-item-preview .muted { font-weight: 700; }
/* ITEM 5 — modal "Akhiri chat" memakai gaya .ku-modal yang sudah ada
   (backdrop + kartu rounded + tombol Batal / Ya, Akhiri Chat) — tidak
   ada CSS modal baru yang dibutuhkan di sini. */
@media (max-width: 899px) {
  .lc-fab { right: 14px; bottom: 76px; }
  .lc-panel { right: 12px; left: 12px; bottom: 76px; width: auto; height: 520px; max-height: calc(100vh - 100px); }
  .lc-admin-layout { grid-template-columns: 1fr; }
  .lc-admin-messages { height: 300px; }
}
