@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; }
/* 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; }
  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;
  --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); }
/* 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; }
/* 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: 20px; padding: 12px 20px; font-size: 15px; 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; }

/* 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; }

/* 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; }
.more-sheet-items { display: flex; flex-direction: column; }
.more-item { display: flex; align-items: center; gap: 12px; padding: 12px 6px; color: var(--text); font-weight: 700; font-size: 15px; border-bottom: 1px solid var(--line); }
.more-item:last-child { border-bottom: none; }
.more-item:hover { text-decoration: none; color: var(--accent); }
.more-item svg { width: 22px; height: 22px; color: var(--muted); flex: none; }
.more-sheet-note { color: var(--dim); font-size: 12.5px; text-align: center; margin: 12px 0 0; }
/* --- v6.6.3: Contact Owner satu menu + submenu (WhatsApp/Telegram) --- */
.more-expand { width: 100%; text-align: left; background: none; border: none; border-bottom: 1px solid var(--line); font-family: inherit; cursor: pointer; }
.more-chevron { margin-left: auto; display: inline-flex; transition: transform .2s; }
.more-chevron svg { width: 18px; height: 18px; }
.more-expand.expanded .more-chevron { transform: rotate(180deg); }
.more-subitems { display: none; }
.more-subitems.open { display: block; }
.more-subitem { padding-left: 22px; }
body.sheet-open { overflow: hidden; }

/* --- popup pengumuman (modal layar penuh) --- */
.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; } }
.ann-modal-card { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; max-width: 520px; width: 100%; max-height: 86vh; overflow-y: auto; box-shadow: var(--shadow); }
.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; }
.ann-modal-img { width: 100%; border-radius: 12px; margin-bottom: 12px; display: block; }
.ann-modal-card h2 { font-size: 19px; margin-bottom: 4px; padding-right: 28px; }
.ann-modal-date { color: var(--dim); font-size: 12.5px; margin-bottom: 10px; }
.ann-modal-body { font-size: 14.5px; line-height: 1.6; margin-bottom: 16px; word-break: break-word; }

/* --- 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: wrap; }
.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: 110px; }
.rank-row.rank-me { background: rgba(255,176,32,.08); }
.rank-medal { display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%; font-weight: 800; font-size: 13px; color: #1a1200; vertical-align: middle; }
.rank-gold { background: linear-gradient(135deg, #ffd75e, #f5a623); }
.rank-silver { background: linear-gradient(135deg, #e8edf5, #b8c2d4); }
.rank-bronze { background: linear-gradient(135deg, #f0a35e, #c47b3a); }
.rank-medal-label { font-size: 12px; color: var(--muted); margin-left: 6px; }
.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; }
}

/* --- Kelola User: dropdown Aksi per user --- */
.user-actions summary { list-style: none; cursor: pointer; }
.user-actions summary::-webkit-details-marker { display: none; }
.user-actions-body { margin-top: 8px; min-width: 220px; background: var(--card2); border: 1px solid var(--line2); border-radius: 12px; padding: 12px; display: grid; gap: 12px; }
.user-actions-body form { display: grid; gap: 6px; }
.user-actions-body label { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0; }
.user-actions-body input { margin: 0; }

/* --- 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; }
.pairing-pane { display: none; }
.pairing-pane.active { display: block; }
.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); }
.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); }
