/* ============================================================
   Popayee — Glassmorphism UI
   Vibrant gradient bg · frosted glass surfaces · subtle white border · backdrop blur
   ============================================================ */

:root {
  /* Palet Puaz — tema TERANG: indigo tua + biru, latar off-white, kartu putih */
  --gold: #26215C;        /* aksen utama / harga / CTA (indigo tua) */
  --gold-soft: #378ADD;   /* aksen sekunder / hover (biru) */
  --purple: #26215C;      /* brand utama (indigo tua) */
  --teal: #0f9d8f;        /* sukses */
  --danger: #cf3b3b;      /* bahaya */

  /* Glass tokens → di tema terang ini berperan sebagai KARTU PUTIH */
  --glass-bg: #FFFFFF;
  --glass-bg-strong: #FFFFFF;
  --glass-border: #D3D1C7;          /* border tipis kartu */
  --glass-border-strong: #C4C1B5;
  --field-fill: #FFFFFF;
  --glass-blur: 16px;
  --glass-shadow: 0 1px 8px rgba(38, 33, 92, 0.06);   /* shadow ringan (tanpa bayangan berat) */

  /* Overlay melayang (dropdown/menu) — putih opak */
  --popover-bg: #FFFFFF;
  --popover-border: rgba(38, 33, 92, 0.12);
  --popover-shadow: 0 14px 36px rgba(38, 33, 92, 0.16);

  /* Teks di atas latar terang */
  --text: #2C2C2A;                  /* abu gelap, bukan hitam pekat */
  --text-muted: rgba(44, 44, 42, 0.66);
  --text-dim: rgba(44, 44, 42, 0.42);

  --radius: 22px;
  --radius-sm: 14px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --font-head: 'Space Grotesk', 'Manrope', system-ui, sans-serif;
  --font-body: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  /* Latar body off-white (bukan putih polos, agar tidak silau) */
  --bg-1: #F7F6F3;
  --bg-2: #F7F6F3;

  /* Gradient header khas Puaz (indigo tua → biru) */
  --puaz-header: linear-gradient(135deg, #26215C 0%, #378ADD 100%);
}

/* Puaz = tema terang saja. Varian ini diselaraskan agar toggle tak merusak tampilan. */
:root[data-theme="light"] {
  --glass-bg: #FFFFFF;
  --glass-bg-strong: #FFFFFF;
  --glass-border: #D3D1C7;
  --glass-border-strong: #C4C1B5;
  --field-fill: #FFFFFF;
  --text: #2C2C2A;
  --text-muted: rgba(44, 44, 42, 0.66);
  --text-dim: rgba(44, 44, 42, 0.42);
  --glass-shadow: 0 1px 8px rgba(38, 33, 92, 0.06);
  --bg-1: #F7F6F3;
  --bg-2: #F7F6F3;
  --popover-bg: #FFFFFF;
  --popover-border: rgba(38, 33, 92, 0.12);
  --popover-shadow: 0 14px 36px rgba(38, 33, 92, 0.16);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* Kontrol form tidak boleh melebihi kontainer (cegah overflow di mobile). */
input, select, textarea, button { max-width: 100%; font-family: inherit; }
img, svg, video { max-width: 100%; }

html { -webkit-text-size-adjust: 100%; }

/* ---------- Scrollbar bertema (menyatu dengan glassmorphism ungu) ----------
   Batang geser default OS terlihat asing di tema gelap; ini menggantinya jadi
   tipis, membulat, dan berwarna ungu translusen. */
* { scrollbar-width: thin; scrollbar-color: var(--scroll-thumb, rgba(59, 130, 246,0.55)) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--scroll-thumb, rgba(59, 130, 246,0.5));
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--scroll-thumb-hover, rgba(59, 130, 246,0.8)); background-clip: padding-box;
}
::-webkit-scrollbar-corner { background: transparent; }

body {
  font-family: var(--font-body);
  color: var(--text);
  min-height: 100dvh;
  line-height: 1.5;
  background: var(--bg-2);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
/* Heading pakai Space Grotesk (khas Puaz, beda dari tokogue) */
h1, h2, h3, h4, h5, h6, .brand-name, .panel__title, .wallet-title, .dsection__head h2,
.dhero__text h1, .auth-title {
  font-family: var(--font-head);
  letter-spacing: -0.01em;
}

/* ---------- Latar aurora / gradient vibrant ---------- */
.bg-aurora {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: #F7F6F3; /* Puaz: latar off-white polos (tanpa aurora gelap) */
}
.blob { display: none; } /* Puaz tema terang: tanpa blob navy */

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4vmax, 3vmax) scale(1.08); }
  66% { transform: translate(-3vmax, 2vmax) scale(0.95); }
}

/* ---------- Kartu glass generik ---------- */
.glass, .glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.4);
  box-shadow: var(--glass-shadow);
}
.glass-card {
  border-radius: var(--radius);
  /* Highlight tepi atas (efek pantulan cahaya) */
  position: relative;
}
.glass-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(180deg, var(--glass-border-strong), transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* ---------- Layout halaman ---------- */
.page { min-height: 100dvh; }
.page--app {
  max-width: 1100px;
  margin: 0 auto;
  padding: 88px 20px 60px;
}

/* ---------- Navbar (app) ---------- */
.navbar {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: min(1100px, calc(100% - 28px));
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
  border-radius: 18px;
}
.navbar__brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--text); font-weight: 700;
}
.brand-mark {
  display: grid; place-items: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #ffffff; font-weight: 900; font-size: 18px;
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.45);
}
.brand-mark--lg { width: 54px; height: 54px; border-radius: 16px; font-size: 28px; }
.brand-name { font-size: 18px; letter-spacing: -0.02em; }
.navbar__links { display: flex; gap: 6px; margin-left: auto; }
.nav-link {
  padding: 8px 14px; border-radius: 10px;
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
}
.nav-link:hover { background: var(--glass-bg-strong); color: var(--text); }
.nav-link.is-active { background: var(--glass-bg-strong); color: var(--text); }
.nav-link.is-disabled { opacity: 0.45; cursor: not-allowed; }
.navbar__user { display: flex; align-items: center; gap: 12px; }
.avatar {
  display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), #3b82f6);
  color: #fff; font-weight: 700; font-size: 14px;
  border: 1px solid var(--glass-border-strong);
}

/* ---------- Auth ---------- */
.auth-wrap {
  min-height: 100dvh;
  display: grid; place-items: center;
  padding: 32px 18px;
}
.auth-card { width: min(430px, 100%); padding: 34px 30px; }
.auth-brand { text-align: center; margin-bottom: 24px; }
.auth-brand .brand-mark--lg { margin: 0 auto 16px; }
.auth-title { font-size: 25px; font-weight: 800; letter-spacing: -0.03em; }
.auth-sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; }
.auth-foot { text-align: center; margin-top: 22px; color: var(--text-muted); font-size: 14px; }
.auth-foot a { color: var(--gold-soft); font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* ---------- Form ---------- */
.form { display: flex; flex-direction: column; gap: 16px; }
/* min-width:0 penting: tanpa ini anak flex/grid tidak bisa menyusut sehingga
   melebihi lebar layar & terpotong di mobile (body overflow-x: hidden). */
/* Atribut [hidden] HARUS menang atas display milik komponen.
   Aturan bawaan browser ([hidden]{display:none}) berasal dari stylesheet UA,
   jadi kalah oleh aturan penulis seperti `.field { display: flex }` — akibatnya
   elemen ber-`hidden` tetap terlihat. Pernah terjadi: panel tanggal pre-order
   ikut tampil pada produk digital. */
[hidden] { display: none !important; }

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field-row > .field { min-width: 0; }
.field__label { font-size: 13px; font-weight: 600; color: var(--text-muted); }
.field__opt { font-weight: 400; color: var(--text-dim); }
.input-glass {
  display: flex; align-items: center; gap: 10px;
  padding: 0 14px;
  min-width: 0; max-width: 100%;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.input-glass:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25);
}
.input-icon { color: var(--text-dim); flex-shrink: 0; }
.input-glass input {
  flex: 1; min-width: 0;
  background: transparent; border: none; outline: none;
  padding: 13px 0; font-size: 15px; color: var(--text);
  font-family: inherit;
}
.input-glass input::placeholder { color: var(--text-dim); }

/* Autofill Chrome: tanpa penanganan, kolom yang diisi otomatis (PIN, voucher,
   alamat) dicat putih pucat oleh browser — tampak seperti "tempelan" putih di
   atas glass gelap. Kita paksa ikut tema. box-shadow inset menutup warna bawaan
   (harus SOLID, translucent tak menutup penuh); text-fill-color untuk teksnya;
   transisi 8000s menahan kilas putih sepersekian detik saat autofill dipakai. */
.input-glass input:-webkit-autofill,
.input-glass input:-webkit-autofill:hover,
.input-glass input:-webkit-autofill:focus,
.input-glass input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text);
  caret-color: var(--text);
  -webkit-box-shadow: 0 0 0 1000px var(--field-fill) inset;
  box-shadow: 0 0 0 1000px var(--field-fill) inset;
  transition: background-color 8000s ease-in-out 0s;
  border-radius: inherit;
}
.input-toggle {
  background: transparent; border: none; cursor: pointer;
  color: var(--text-dim); display: grid; place-items: center; padding: 4px;
}
.input-toggle:hover { color: var(--text); }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 20px; border-radius: var(--radius-sm);
  font-family: inherit; font-size: 15px; font-weight: 600;
  cursor: pointer; border: 1px solid transparent;
  transition: transform 0.15s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease), opacity 0.2s;
  text-decoration: none;
}
.btn:active { transform: translateY(1px) scale(0.99); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn--block { width: 100%; }
.btn--sm { padding: 9px 14px; font-size: 13px; }
.btn--primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-soft));
  color: #ffffff;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}
.btn--primary:hover { box-shadow: 0 8px 26px rgba(37, 99, 235, 0.55); transform: translateY(-1px); }
.btn--light { background: #fff; color: #1e1b3a; }
.btn--light:hover:not(:disabled) { transform: translateY(-1px); }
.btn--ghost {
  background: var(--glass-bg); color: var(--text);
  border-color: var(--glass-border);
}
.btn--ghost:hover { background: var(--glass-bg-strong); }
.btn--ghost-light {
  background: rgba(255,255,255,0.16); color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* ---------- Alert ---------- */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius-sm);
  font-size: 14px; margin-bottom: 18px;
}
.alert--error {
  background: rgba(248, 113, 113, 0.16);
  border: 1px solid rgba(248, 113, 113, 0.5);
  color: #fecaca;
}
:root[data-theme="light"] .alert--error { color: #991b1b; }
.alert svg { flex-shrink: 0; }
/* Tautan di dalam alert. Tanpa aturan ini link memakai warna bawaan peramban
   (biru tua #0000EE) yang nyaris tak terbaca di atas alert gelap — pernah
   terjadi pada ajakan "Isi sekarang di Profil". Memakai var(--text) agar putih
   di tema gelap DAN tetap gelap/terbaca di tema terang; garis bawah + tebal
   supaya tetap dikenali sebagai tautan tanpa mengandalkan warna saja.
   :not(.alert-link) menjaga komponen tautan alert yang sudah ada (memakai
   color:inherit) tetap seperti semula — aturan ini hanya menambal tautan polos. */
.alert a:not(.alert-link) {
  color: var(--text); font-weight: 700;
  text-decoration: underline; text-underline-offset: 2px;
}
.alert a:not(.alert-link):hover { opacity: 0.85; }

/* ---------- Dashboard ---------- */
.dash { display: flex; flex-direction: column; gap: 20px; }
.dash__head { display: flex; align-items: center; justify-content: space-between; }
.dash__greet { color: var(--text-muted); font-size: 14px; }
.dash__name { font-size: 26px; font-weight: 800; letter-spacing: -0.03em; }
.badge {
  padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid var(--glass-border);
}
.badge--premium { background: linear-gradient(135deg, rgba(37, 99, 235,0.3), rgba(59, 130, 246,0.2)); color: var(--gold-soft); border-color: rgba(37, 99, 235,0.5); }
.badge--regular { background: var(--glass-bg); color: var(--text-muted); }

/* Kartu saldo */
.balance-card { padding: 26px; overflow: hidden; }
.balance-card__glow {
  position: absolute; width: 260px; height: 260px; right: -60px; top: -80px;
  background: radial-gradient(circle, rgba(37, 99, 235,0.5), transparent 70%);
  filter: blur(30px); pointer-events: none;
}
.balance-card__label { color: var(--text-muted); font-size: 14px; }
.balance-card__amount {
  font-size: clamp(34px, 8vw, 48px); font-weight: 900; letter-spacing: -0.03em;
  margin: 6px 0 14px; font-variant-numeric: tabular-nums;
}
.balance-card__meta { display: flex; gap: 16px; align-items: center; font-size: 13px; color: var(--text-muted); }
.status-dot { display: inline-flex; align-items: center; gap: 6px; }
.status-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); }
.status-dot--banned::before { background: var(--danger); }
.status-dot--expired::before { background: var(--gold); }
.balance-card__actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Stat grid */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius-sm); }
.stat__icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.stat__icon--gold { background: rgba(37, 99, 235,0.2); color: var(--gold-soft); }
.stat__icon--purple { background: rgba(59, 130, 246,0.2); color: #93c5fd; }
.stat__icon--teal { background: rgba(45,212,191,0.2); color: #5eead4; }
.stat__value { font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.stat__label { font-size: 12px; color: var(--text-muted); }

/* Panel menu */
.panel { padding: 22px; }
.panel__title { font-size: 16px; font-weight: 700; margin-bottom: 16px; }
.menu-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; }
.menu-item {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 8px; border-radius: var(--radius-sm);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--text); text-decoration: none; font-size: 12px; font-weight: 500;
  transition: transform 0.15s var(--ease), background 0.2s;
}
.menu-item:not(.is-disabled):hover { transform: translateY(-2px); background: var(--glass-bg-strong); }
.menu-item.is-disabled { opacity: 0.5; cursor: not-allowed; }
.menu-item__ic { font-size: 22px; }
.panel__note { margin-top: 14px; font-size: 12px; color: var(--text-dim); }

/* ---------- Panel head / link / transaksi ---------- */
.panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.panel__head .panel__title, .panel__head .wallet-title { margin: 0; }
.panel__link { color: var(--gold-soft); text-decoration: none; font-size: 13px; font-weight: 600; }
.panel__link:hover { text-decoration: underline; }
.saldo-chip { font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 999px; background: var(--glass-bg-strong); border: 1px solid var(--glass-border); }

.menu-item__ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 13px; }
.menu-item__ic.ic-gold { background: rgba(37, 99, 235,0.2); color: var(--gold-soft); }
.menu-item__ic.ic-purple { background: rgba(59, 130, 246,0.2); color: #93c5fd; }
.menu-item__ic.ic-teal { background: rgba(45,212,191,0.2); color: #5eead4; }
.menu-item__ic.ic-blue { background: rgba(59,130,246,0.2); color: #93c5fd; }

.txlist { list-style: none; display: flex; flex-direction: column; }
.txlist__item { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.txlist__item:last-child { border-bottom: none; }
.tx-ic { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; flex-shrink: 0; }
.tx-ic--in { background: rgba(45,212,191,0.18); color: #5eead4; }
.tx-ic--out { background: rgba(248,113,113,0.18); color: #fca5a5; }
.tx-info { flex: 1; min-width: 0; }
.tx-desc { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-date { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.tx-amount { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-amount--in { color: #5eead4; }
.tx-amount--out { color: #fca5a5; }
.empty { color: var(--text-muted); font-size: 14px; padding: 8px 0; }
.empty a { color: var(--gold-soft); }

/* ---------- Wallet pages ---------- */
.wallet { display: flex; flex-direction: column; gap: 18px; }
.back-link { color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; width: fit-content; }
.back-link:hover { color: var(--text); }
.wallet-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.wallet-single { max-width: 520px; }
.wallet-form { padding: 26px; }
.wallet-side { padding: 22px; }
.wallet-title { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.wallet-sub { color: var(--text-muted); font-size: 14px; margin: 4px 0 20px; }
.field__hint { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
/* Tautan di dalam teks bantuan. Tanpa aturan ini link memakai biru bawaan
   peramban (#0000EE) yang tak terbaca di atas kartu gelap — pernah terjadi di
   Admin → Halaman Home ("Produk → Jadikan"). --gold-soft = warna aksen tautan
   yang dipakai di seluruh situs; garis bawah agar jelas ini tautan. */
.field__hint a { color: var(--gold-soft); text-decoration: underline; text-underline-offset: 2px; }
.field__hint a:hover { color: var(--text); }

.input-glass--amount .input-prefix { font-weight: 700; color: var(--text-muted); }
.input-prefix { padding-left: 4px; }
.select-glass {
  flex: 1; background: transparent; border: none; outline: none;
  padding: 13px 0; font-size: 15px; color: var(--text); font-family: inherit; cursor: pointer;
}
.select-glass option { background: var(--bg-2); color: var(--text); }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: -6px; }
.chip {
  padding: 7px 14px; border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 600;
  background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text);
  transition: background 0.15s var(--ease), transform 0.15s var(--ease);
}
.chip:hover { background: var(--glass-bg-strong); }
.chip.is-active { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: #ffffff; border-color: transparent; }

.reqlist { list-style: none; display: flex; flex-direction: column; }
.reqlist__item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--glass-border); }
.reqlist__item:last-child { border-bottom: none; }
.reqlist__amt { font-weight: 700; font-variant-numeric: tabular-nums; }
.reqlist__meta { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

.alert--success { background: rgba(45,212,191,0.16); border: 1px solid rgba(45,212,191,0.5); color: #99f6e4; }
:root[data-theme="light"] .alert--success { color: #0f766e; }

.pill { font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.pill--1 { background: rgba(37, 99, 235,0.2); color: var(--gold-soft); }
.pill--2 { background: rgba(248,113,113,0.2); color: #fca5a5; }
.pill--3 { background: rgba(45,212,191,0.2); color: #5eead4; }

@media (max-width: 720px) {
  .wallet-grid { grid-template-columns: 1fr; }
}

/* ---------- Marketplace ---------- */
.mkt { display: flex; flex-direction: column; gap: 16px; }
.mkt__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mkt-search { display: flex; gap: 10px; }
.mkt-search .input-glass { flex: 1; }
.mkt-cats { margin-top: -4px; }
.mkt-cats .chip { text-decoration: none; }

.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.product-card { border-radius: var(--radius-sm); overflow: hidden; text-decoration: none; color: var(--text); transition: transform 0.15s var(--ease); display: flex; flex-direction: column; }
.product-card:hover { transform: translateY(-3px); }
.product-thumb {
  position: relative; aspect-ratio: 4/3; display: grid; place-items: center;
  background: linear-gradient(135deg, hsl(calc(var(--seed) * 47 % 360) 70% 55%), hsl(calc(var(--seed) * 47 % 360 + 40) 70% 45%));
}
.product-thumb--lg { aspect-ratio: 1/1; border-radius: var(--radius-sm); }
.product-thumb__txt { font-size: 32px; font-weight: 900; color: rgba(255,255,255,0.9); letter-spacing: -0.02em; }
.product-thumb--lg .product-thumb__txt { font-size: 64px; }
.product-badge { position: absolute; top: 8px; left: 8px; font-size: 10px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: rgba(0,0,0,0.4); color: #fff; }
.product-body { padding: 12px 14px 14px; }
.product-name { font-size: 14px; font-weight: 600; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.product-price { font-size: 16px; font-weight: 800; color: var(--gold-soft); margin-top: 4px; }
.product-seller { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Detail produk */
.detail-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 18px; align-items: start; }
.detail-media { padding: 16px; }
.detail-info { padding: 26px; }
.detail-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 6px; }
.detail-price { font-size: 28px; font-weight: 900; color: var(--gold-soft); }
.detail-seller { font-size: 14px; color: var(--text-muted); margin: 8px 0; }
.detail-content { font-size: 14px; line-height: 1.6; color: var(--text-muted); margin: 12px 0 20px; }
.detail-buy { margin-top: 8px; }
.detail-checkout { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.detail-saldo { font-size: 13px; color: var(--text-muted); }

/* Order cards */
.order-list { display: flex; flex-direction: column; gap: 12px; }
.order-card { padding: 16px; border-radius: var(--radius-sm); background: var(--glass-bg); border: 1px solid var(--glass-border); }
.order-card__main { display: flex; justify-content: space-between; gap: 12px; }
.order-card__name { font-weight: 700; font-size: 15px; }
.order-qty { color: var(--text-muted); font-weight: 500; font-size: 13px; }
.order-card__meta { font-size: 12px; color: var(--text-muted); margin-top: 3px; }
.order-card__right { text-align: right; flex-shrink: 0; }
.order-total { display: block; font-weight: 800; font-variant-numeric: tabular-nums; }
.order-status { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.order-status--1 { background: rgba(37, 99, 235,0.2); color: var(--gold-soft); }
.order-status--2 { background: rgba(59,130,246,0.2); color: #93c5fd; }
.order-status--3 { background: rgba(45,212,191,0.2); color: #5eead4; }
.order-status--4 { background: rgba(248,113,113,0.2); color: #fca5a5; }
.order-card__actions { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.order-card__actions form { margin: 0; }
.ship-form { display: flex; gap: 8px; flex-wrap: wrap; }
.ship-input { padding: 8px 12px; border-radius: 10px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text); font-family: inherit; font-size: 13px; outline: none; }
.ship-input:focus { border-color: var(--gold); }
/* Dropdown kurir: latar SOLID (bukan kaca) supaya daftar opsi native tidak
   tampil seperti tempelan putih di atas latar gelap. */
select.ship-input { background: var(--field-fill); color: var(--text); cursor: pointer; }
select.ship-input option { background: var(--field-fill); color: var(--text); }
/* Form perbaikan resi pada pesanan yang sudah dikirim. */
.ship-fix { margin-top: 8px; }
.ship-fix > summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--gold-soft); list-style: none; }
.ship-fix > summary::-webkit-details-marker { display: none; }
.ship-fix > summary::before { content: "✎ "; }
.ship-fix[open] > summary { margin-bottom: 8px; }
.ship-fix__hint { font-size: 11.5px; color: var(--text-dim); margin: 6px 0 0; }

@media (max-width: 900px) { .product-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 720px) {
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .detail-grid { grid-template-columns: 1fr; }
}

/* ---------- Navbar icon + badge ---------- */
.nav-icon { position: relative; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; color: var(--text); text-decoration: none; transition: background 0.2s; }
.nav-icon:hover { background: var(--glass-bg-strong); }
.nav-badge { position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px; background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }
a.avatar { text-decoration: none; }

/* ---------- Profile ---------- */
.profile-head { display: flex; align-items: center; gap: 18px; padding: 22px; border-radius: var(--radius); }
.avatar--lg { width: 64px; height: 64px; font-size: 24px; border-radius: 18px; }
.profile-head__info { flex: 1; min-width: 0; }
.profile-name { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.profile-meta { font-size: 13px; color: var(--text-muted); margin-top: 2px; }
.profile-side { display: flex; flex-direction: column; gap: 18px; }
.form-subtitle { font-size: 13px; font-weight: 700; color: var(--text-muted); margin: 6px 0 -4px; }

/* Admin → Halaman Home: form panjang bertumpuk dalam satu kartu. .field tidak
   punya margin sendiri (mengandalkan gap induk), tapi di sini bersarang dalam
   <section> sehingga saling menempel dan terasa sesak. Beri ritme vertikal +
   pemisah antar sub-bagian. Scope `.home-cfg` supaya form lain tak terpengaruh. */
.home-cfg .field { margin-bottom: 14px; }
.home-cfg .grid-2 .field { margin-bottom: 0; } /* grid-2 sudah punya gap sendiri */
.home-cfg .form-subtitle { margin: 24px 0 12px; font-size: 14px; } /* pisah antar bagian, batalkan margin negatif */
.home-cfg .btn--block { margin-top: 12px; }

/* ---------- Profil: kelompok kartu berdasarkan peruntukan ---------- */
/* Judul tiap kelompok (Akun, Keamanan, Keuangan, dst). */
/* Kontainer (.wallet / .dakun-main) sudah memberi gap 18px antar anak; margin-top
   kecil menambah jeda ekstra sebelum judul agar tiap kelompok terbaca terpisah. */
.profile-group__title {
  font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  margin: 8px 0 0; padding-left: 12px; position: relative;
}
.profile-group__title::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 16px; border-radius: 3px;
  background: linear-gradient(180deg, #60a5fa, #2563eb);
}
/* Grid kartu yang mengisi ruang secara merata (tanpa area kosong menganga).
   Kartu dalam satu baris otomatis sama tinggi; tombol menempel di dasar kartu. */
.profile-group {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px; align-items: stretch;
}
.profile-group > .glass-card { display: flex; flex-direction: column; }
/* Tombol aksi (link) di kartu menu didorong ke bawah agar sejajar antar kartu. */
.profile-group > .glass-card > .btn:last-child { margin-top: auto; }

/* ---------- Notifikasi ---------- */
.notif-list { display: flex; flex-direction: column; }
.notif-item { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--glass-border); text-decoration: none; color: var(--text); }
.notif-item:last-child { border-bottom: none; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: transparent; flex-shrink: 0; }
.notif-item--unread .notif-dot { background: var(--gold); box-shadow: 0 0 8px var(--gold); }
.notif-item--unread .notif-title { font-weight: 700; }
.notif-title { font-size: 14px; }
.notif-time { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- FAQ ---------- */
.faq { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.faq-item { background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); padding: 4px 16px; }
.faq-q { font-size: 14px; font-weight: 600; padding: 12px 0; cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.faq-q::-webkit-details-marker { display: none; }
.faq-q::after { content: "+"; font-size: 20px; color: var(--text-muted); }
details[open] .faq-q::after { content: "−"; }
.faq-a { font-size: 14px; line-height: 1.6; color: var(--text-muted); padding: 0 0 14px; }

@media (max-width: 720px) {
  .profile-head { flex-wrap: wrap; }
}

/* ---------- Admin sidebar ---------- */
.admin-head__title { font-weight: 800; font-size: 15px; }
.admin-head__sub { font-size: 11px; color: var(--text-muted); }

/* Sidebar tetap di kiri (desktop) */
.adminbar {
  position: fixed; top: 14px; left: 14px; bottom: 14px; width: 236px; z-index: 45;
  border-radius: var(--radius); padding: 16px 12px; display: flex; flex-direction: column;
  overflow: visible; /* JANGAN clip: biar dropdown lonceng bisa keluar dari sidebar */
}
.adminbar__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); padding: 4px 8px 14px; }
/* Daftar menu yang menggulir (bukan seluruh sidebar) — kepala/lonceng tetap diam
   & dropdown tidak terpotong oleh area gulir. */
.adminbar__nav { display: flex; flex-direction: column; gap: 2px; flex: 1; min-height: 0; overflow-y: auto; }
.adminbar__group { font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin: 12px 10px 4px; }
.adminbar__link {
  display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 11px;
  color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background 0.15s var(--ease), color 0.15s var(--ease);
}
.adminbar__link:hover { background: var(--glass-bg-strong); color: var(--text); }
.adminbar__link.is-active { background: linear-gradient(135deg, rgba(37, 99, 235,0.25), rgba(59, 130, 246,0.18)); color: var(--text); font-weight: 600; }
.adminbar__ic { display: grid; place-items: center; width: 20px; flex-shrink: 0; opacity: 0.9; }
.adminbar__sep { height: 1px; background: var(--glass-border); margin: 12px 8px; }
.adminbar__link--out { color: #fca5a5; }

/* Konten admin digeser ke kanan sidebar */
.page--admin { max-width: none; margin: 0; padding: 24px 24px 48px 274px; }

/* Topbar + scrim khusus mobile (disembunyikan di desktop) */
.admin-topbar, .adminbar-scrim { display: none; }

.stat-grid--admin { grid-template-columns: repeat(3, 1fr); }
.stat-grid--admin .stat { text-decoration: none; color: var(--text); }

@media (max-width: 900px) {
  /* Sidebar jadi drawer */
  .adminbar { transform: translateX(-110%); transition: transform 0.25s var(--ease); top: 0; left: 0; bottom: 0; border-radius: 0 var(--radius) var(--radius) 0; width: 250px; }
  body.adminbar-open .adminbar { transform: translateX(0); }
  .adminbar-scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 44; opacity: 0; pointer-events: none; transition: opacity 0.25s; }
  body.adminbar-open .adminbar-scrim { opacity: 1; pointer-events: auto; }
  .admin-topbar { display: flex; align-items: center; gap: 12px; position: fixed; top: 10px; left: 10px; right: 10px; z-index: 40; padding: 10px 14px; border-radius: 14px; }
  .admin-burger { background: none; border: none; color: var(--text); cursor: pointer; display: grid; place-items: center; padding: 0; }
  .admin-topbar__title { font-weight: 700; }
  .page--admin { padding: 74px 14px 40px; }
}

/* Kartu statistik admin (6 kartu) */
.admin-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.astat { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); transition: transform 0.15s var(--ease); }
a.astat:hover { transform: translateY(-2px); }
.astat__ic { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; }
.astat__ic.ic-gold { background: rgba(37, 99, 235,0.2); color: var(--gold-soft); }
.astat__ic.ic-purple { background: rgba(59, 130, 246,0.2); color: #93c5fd; }
.astat__ic.ic-teal { background: rgba(45,212,191,0.2); color: #5eead4; }
.astat__ic.ic-blue { background: rgba(59,130,246,0.2); color: #93c5fd; }
.astat__val { font-size: 19px; font-weight: 800; font-variant-numeric: tabular-nums; }
.astat__lbl { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
@media (max-width: 900px) { .admin-stats { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .admin-stats { grid-template-columns: 1fr; } }

.switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.switch input { width: auto; }

.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 640px; }
.table th { text-align: left; padding: 10px 12px; color: var(--text-muted); font-weight: 600; border-bottom: 1px solid var(--glass-border); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--glass-border); vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table-actions { display: flex; gap: 6px; }
.table-actions form { margin: 0; }
.table-muted { color: var(--text-dim); }
.table-json { max-width: 220px; font-size: 11px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 720px) {
  .stat-grid--admin { grid-template-columns: 1fr; }
}

/* ---------- Payment ---------- */
.topup-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--text-dim); font-size: 12px; }
.topup-divider::before, .topup-divider::after { content: ""; flex: 1; height: 1px; background: var(--glass-border); }
.pay-summary { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 18px; padding: 16px; border-radius: var(--radius-sm); background: var(--glass-bg); border: 1px solid var(--glass-border); }
.pay-row { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text-muted); }
.pay-row strong { color: var(--text); }
.pay-amount { font-size: 20px; font-weight: 800; color: var(--gold-soft); }
.pay-note { font-size: 12px; color: var(--text-dim); margin-bottom: 16px; line-height: 1.5; }
.pay-check { width: 72px; height: 72px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: rgba(45,212,191,0.2); color: #5eead4; }

/* ---------- Uploader foto ---------- */
.textarea-glass {
  width: 100%; max-width: 100%; resize: vertical; min-height: 96px;
  padding: 13px 14px; font-size: 15px; color: var(--text); font-family: inherit; line-height: 1.5;
  background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: var(--radius-sm); outline: none;
}
.textarea-glass:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(37, 99, 235,0.25); }
.textarea-glass::placeholder { color: var(--text-dim); }

.uploader {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  padding: 22px; text-align: center; cursor: pointer;
  background: var(--glass-bg); border: 1.5px dashed var(--glass-border-strong); border-radius: var(--radius-sm);
  color: var(--text-muted); transition: border-color 0.2s, background 0.2s;
}
.uploader:hover { border-color: var(--gold); background: var(--glass-bg-strong); }
.uploader__text { font-size: 14px; font-weight: 600; color: var(--text); }
.uploader__hint { font-size: 12px; color: var(--text-dim); }
.upload-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.upload-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 10px; border: 1px solid var(--glass-border); }

/* ---------- Galeri produk + thumbnail ---------- */
.product-thumb__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.gallery { display: flex; flex-direction: column; gap: 10px; }
.gallery__main { border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1/1; background: var(--glass-bg); }
.gallery__img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; display: block; }
.gallery__thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.gallery__thumb {
  width: 60px; height: 60px; padding: 0; border-radius: 10px; overflow: hidden; cursor: pointer;
  border: 2px solid transparent; background: none;
}
.gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.gallery__thumb.is-active { border-color: var(--gold); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(0,0,0,0.85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  padding: 24px; cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: 92vw; max-height: 88vh; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.lightbox__close {
  position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 1px solid rgba(255,255,255,0.3); color: #fff;
  font-size: 28px; line-height: 1; cursor: pointer;
}
.lightbox__close:hover { background: rgba(255,255,255,0.28); }

/* ---------- Share ---------- */
.detail-content { font-size: 14px; line-height: 1.65; color: var(--text-muted); margin: 12px 0 18px; white-space: pre-wrap; }
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 4px 0 20px; }
.share__label { font-size: 13px; color: var(--text-muted); margin-right: 2px; }
.share__btn {
  width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center;
  color: #fff; text-decoration: none; border: none; cursor: pointer; transition: transform 0.15s var(--ease), filter 0.15s;
}
.share__btn:hover { transform: translateY(-2px); filter: brightness(1.1); }
.share__btn--wa { background: #25D366; }
.share__btn--fb { background: #1877F2; }
.share__btn--x { background: #000; border: 1px solid rgba(255,255,255,0.25); }
.share__btn--tg { background: #229ED9; }
.share__btn--copy { background: var(--glass-bg-strong); color: var(--text); border: 1px solid var(--glass-border); }

.stock-out { color: #fca5a5; font-weight: 700; }

/* Banner strip di dashboard (scroll horizontal) */
.banner-strip { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; }
.banner-item { flex: 0 0 88%; max-width: 88%; scroll-snap-align: start; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--glass-border); }
.banner-item img { width: 100%; height: 100%; display: block; object-fit: cover; }
@media (min-width: 720px) { .banner-item { flex-basis: 48%; max-width: 48%; } }

/* Banner di panel admin */
.banner-admin-list { display: flex; flex-direction: column; gap: 12px; }
.banner-admin-item { display: flex; align-items: center; gap: 12px; }
.banner-admin-item img { width: 90px; height: 50px; object-fit: cover; border-radius: 8px; border: 1px solid var(--glass-border); flex-shrink: 0; }
.banner-admin-meta { flex: 1; min-width: 0; }

/* Halaman statis (CMS) */
.static__content { font-size: 15px; line-height: 1.7; color: var(--text-muted); white-space: pre-wrap; margin-top: 12px; }

/* ---------- Chat ---------- */
.chat-box { display: flex; flex-direction: column; gap: 10px; max-height: 55vh; overflow-y: auto; padding: 14px 4px; margin: 12px 0; }
.chat-msg { display: flex; }
.chat-msg--me { justify-content: flex-end; }
.chat-msg--admin { justify-content: flex-start; }
.chat-bubble { max-width: 78%; padding: 10px 14px; border-radius: 16px; font-size: 14px; line-height: 1.4; }
.chat-msg--me .chat-bubble { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: #ffffff; border-bottom-right-radius: 4px; }
.chat-msg--admin .chat-bubble { background: var(--glass-bg-strong); border: 1px solid var(--glass-border); border-bottom-left-radius: 4px; }
.chat-who { display: block; font-size: 11px; font-weight: 700; opacity: 0.8; margin-bottom: 2px; }
.chat-bubble p { margin: 0; white-space: pre-wrap; word-break: break-word; }
.chat-time { display: block; font-size: 10px; opacity: 0.6; margin-top: 4px; text-align: right; }
.chat-form { display: flex; gap: 8px; }
.chat-form .input-glass { flex: 1; }

/* Daftar percakapan admin */
.conv-list { display: flex; flex-direction: column; }
.conv-item { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--glass-border); text-decoration: none; color: var(--text); }
.conv-item:last-child { border-bottom: none; }
.conv-info { flex: 1; min-width: 0; }
.conv-name { font-weight: 700; font-size: 14px; }
.conv-last { font-size: 12px; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-meta { text-align: right; flex-shrink: 0; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.conv-time { font-size: 11px; color: var(--text-dim); }
.conv-meta .nav-badge { position: static; }

/* Form jadikan admin */
.promote-form { display: flex; gap: 10px; align-items: stretch; }
.promote-form .input-glass { flex: 1; }
@media (max-width: 560px) { .promote-form { flex-direction: column; } }

/* Daftar rekening tujuan topup */
.bank-list { margin: 4px 0 18px; display: flex; flex-direction: column; gap: 8px; }
.bank-list__title { font-size: 13px; color: var(--text-muted); }
.bank-card { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--glass-bg); border: 1px solid var(--glass-border); }
.bank-card__name { font-weight: 800; color: var(--gold-soft); }
.bank-card__no { font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: 0.5px; }
.bank-card__an { font-size: 12px; color: var(--text-muted); }
.reqlist__actions { display: flex; gap: 12px; align-items: center; flex-shrink: 0; }

/* Foto pada halaman edit produk */
.edit-photos { display: flex; flex-wrap: wrap; gap: 10px; }
.edit-photo { display: flex; flex-direction: column; gap: 5px; align-items: center; }
.edit-photo img { width: 76px; height: 76px; object-fit: cover; border-radius: 10px; border: 1px solid var(--glass-border); }
.edit-photo__del { font-size: 11px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.edit-photo__del input { width: auto; }

/* ============================================================
   DESKTOP MARKETPLACE (tampilan desktop publik)
   ============================================================ */
.dweb { }
.promo-bar { text-align: center; font-size: 13px; padding: 7px 12px; color: var(--text); background: linear-gradient(90deg, rgba(37, 99, 235,0.25), rgba(59, 130, 246,0.25)); border-bottom: 1px solid var(--glass-border); }

.dheader { position: sticky; top: 0; z-index: 40; border-bottom: 1px solid var(--glass-border); border-radius: 0; }
.dheader__inner { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; gap: 22px; padding: 12px 24px; }
.dbrand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 700; flex-shrink: 0; }
.dsearch { flex: 1; display: flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; background: var(--glass-bg); border: 1px solid var(--glass-border); border-radius: 12px; color: var(--text-dim); }
.dsearch:focus-within { border-color: var(--gold); }
.dsearch input { flex: 1; min-width: 0; background: transparent; border: none; outline: none; padding: 11px 0; font-size: 14px; color: var(--text); font-family: inherit; }
.dsearch input::placeholder { color: var(--text-dim); }
.dsearch button { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: #ffffff; border: none; padding: 8px 16px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer; }
.dnav { display: flex; gap: 4px; flex: 1; justify-content: center; }
.dnav__link { padding: 8px 12px; border-radius: 9px; color: var(--text-muted); text-decoration: none; font-size: 14px; font-weight: 500; }
.dnav__link:hover, .dnav__link.is-active { background: var(--glass-bg-strong); color: var(--text); }
.dheader__actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.dmain { max-width: 1240px; margin: 0 auto; padding: 24px; }
.dwrap { display: flex; flex-direction: column; gap: 36px; }

/* Hero slider */
.dhero-slider { position: relative; overflow: hidden; border-radius: var(--radius); }
.dhero-track { display: flex; transition: transform 0.5s var(--ease); }
.dhero-slide { flex: 0 0 100%; min-width: 100%; min-height: clamp(280px, 32vw, 400px); }
.dhero-slide--img { display: block; }
.dhero-slide--img img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: var(--radius); }
.dhero-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: rgba(0,0,0,0.35); border: 1px solid var(--glass-border); color: #fff; font-size: 26px; line-height: 1; cursor: pointer; z-index: 3; transition: background 0.2s; }
.dhero-arrow:hover { background: rgba(0,0,0,0.55); }
.dhero-arrow--prev { left: 14px; }
.dhero-arrow--next { right: 14px; }
.dhero-dots { position: absolute; bottom: 14px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 3; }
.dhero-dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,0.45); border: none; cursor: pointer; padding: 0; transition: width 0.2s, background 0.2s; }
.dhero-dot.is-active { width: 22px; background: var(--gold); }
/* Sembunyikan kontrol bila slide tunggal */
.dhero-slider.is-single .dhero-arrow, .dhero-slider.is-single .dhero-dots { display: none; }

/* Isi slide custom — beri ruang untuk panah & dot agar tidak tabrakan */
.dhero-slide--custom { display: flex; align-items: center; gap: 28px; padding: 44px 72px 56px; overflow: hidden; }
.dhero__text { flex: 1; }
.dhero__text h1 { font-size: clamp(26px, 3.4vw, 42px); font-weight: 900; line-height: 1.1; letter-spacing: -0.03em; }
.dhero__text h1 span { background: linear-gradient(135deg, var(--gold), var(--gold-soft)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.dhero__text p { color: var(--text-muted); font-size: 16px; margin: 14px 0 22px; max-width: 520px; }
.dhero__cta { display: flex; gap: 12px; }
.dhero__trust { display: flex; gap: 18px; margin-top: 22px; font-size: 13px; color: var(--text-muted); flex-wrap: wrap; }
.dhero__art { width: 200px; height: 200px; flex-shrink: 0; display: grid; place-items: center; border-radius: 30px; background: radial-gradient(circle, rgba(37, 99, 235,0.35), transparent 70%); }
.dhero__art .brand-mark--lg { width: 120px; height: 120px; font-size: 64px; border-radius: 32px; }

/* Section umum */
.dsection__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 18px; }
.dsection__head h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.dsection__more:hover { text-decoration: underline; }
.dsection__more { color: var(--gold-soft); text-decoration: none; font-size: 14px; font-weight: 600; }
.flash-timer { font-size: 13px; color: var(--text-muted); }
.flash-badge { display: inline-block; background: linear-gradient(135deg, #f97316, #ef4444); color: #fff; font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 8px; position: absolute; top: 8px; left: 8px; transform: scale(.5); transform-origin: top left; }
.dprod__thumb .flash-badge { z-index: 2; }
.dprod__old { font-size: 12px; color: var(--text-dim); font-weight: 500; }
.dpd__old { font-size: 16px; color: var(--text-dim); font-weight: 500; margin-left: 6px; }
.dpd__price .flash-badge { position: static; margin: 0 6px; }
.flash-until { font-size: 13px; color: #fca5a5; margin: 6px 0 10px; font-weight: 600; }
.dsection--flash .dsection__head h2 { color: #fca5a5; }

/* Kategori */
.dcat-grid { display: grid; grid-template-columns: repeat(8, 1fr); gap: 12px; }
.dcat { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 18px 8px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); transition: transform 0.15s var(--ease); }
.dcat:hover { transform: translateY(-3px); }
.dcat__ic { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; font-weight: 800; color: #fff; background: linear-gradient(135deg, hsl(calc(var(--seed) * 57 % 360) 70% 55%), hsl(calc(var(--seed) * 57 % 360 + 40) 70% 45%)); }
.dcat__name { font-size: 12px; font-weight: 600; text-align: center; }

/* Grid produk desktop.
   Jumlah kolom sengaja dijaga pada himpunan {4, 3, 2} — ketiganya membagi habis
   24 (jumlah produk per halaman), sehingga baris terakhir SELALU penuh di lebar
   layar mana pun. Kalau kolomnya diubah, sesuaikan juga PerPage di handler.
   4 kolom (bukan 5) juga membuat kartu ~226px pada lebar maksimum .dmain(1240px)
   alih-alih ~178px — foto & harga jauh lebih jelas terbaca. */
.dprod-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }

/* Baris "intip" (rekomendasi & seksi beranda) jumlah datanya tidak bisa
   dipastikan bulat, jadi kelebihannya disembunyikan agar barisnya SELALU utuh.
   Ambang dipilih per jumlah kolom supaya hasilnya selalu baris penuh:
     rekomendasi -> 1 baris : 4 kol=4 · 3 kol=3 · 2 kol=4 (2 baris)
     beranda     -> 2 baris : 4 kol=8 · 3 kol=6 · 2 kol=8 (4 baris)
   Aturan tablet ditulis sebagai RENTANG (641-1024px) agar tidak ikut terbawa
   ke layar ponsel — di sana jumlah kolomnya sudah berbeda lagi. */
.prodrec .dprod-grid > *:nth-child(n+5) { display: none; }
.dsection .dprod-grid > *:nth-child(n+9) { display: none; }
@media (min-width: 641px) and (max-width: 1024px) {
  .prodrec .dprod-grid > *:nth-child(n+4) { display: none; }
  .dsection .dprod-grid > *:nth-child(n+7) { display: none; }
}

/* Baris intip yang isinya HANYA SATU kartu selalu terbaca seperti kesalahan
   (satu kartu kecil dengan sel kosong panjang di sebelahnya), jadi barisnya
   disembunyikan sekalian. Dua kartu atau lebih tetap ditampilkan: rata kiri dan
   masih terbaca sebagai daftar pendek yang wajar. */
.prodrec:not(:has(.dprod-grid > *:nth-child(2))) { display: none; }

/* ===== Homepage Puaz: hero imersif ===== */
.dhero2 { position: relative; padding: 66px 32px 58px; margin: 6px 0 24px; border-radius: var(--radius);
  overflow: hidden; text-align: center; background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3); -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3); }
.dhero2::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(circle at 30% 0%, rgba(59,130,246,.18), transparent 55%),
              radial-gradient(circle at 80% 100%, rgba(37,99,235,.14), transparent 50%); }
.dhero2__inner { max-width: 780px; margin: 0 auto; }
.dhero2__badge { display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 5px 14px; border-radius: 999px; background: rgba(59,130,246,.16); color: #93c5fd; margin-bottom: 18px; }
.dhero2__title { font-size: clamp(30px, 4.2vw, 48px); line-height: 1.08; font-weight: 700; letter-spacing: -0.025em; }
.dhero2__title span { background: linear-gradient(135deg, #60a5fa, #3b82f6); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; }
.dhero2__sub { color: var(--text-muted); font-size: 16px; line-height: 1.6; margin: 16px auto 0; max-width: 580px; }
/* Jarak sebelum kolom cari diletakkan pada search (margin-top), BUKAN pada
   bottom subtitle — supaya gap tetap konsisten walau sub-teks dikosongkan. */
.dhero2__search { display: flex; align-items: center; gap: 10px; max-width: 580px; margin: 26px auto 0;
  background: var(--popover-bg); border: 1px solid var(--glass-border); border-radius: 999px; padding: 6px 6px 6px 18px; }
.dhero2__search svg { color: var(--text-dim); flex: none; }
.dhero2__search input { flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 15px; padding: 12px 0; font-family: inherit; }
.dhero2__search button { flex: none; border: none; cursor: pointer; padding: 12px 24px; border-radius: 999px;
  font-weight: 700; color: #fff; font-family: inherit; background: linear-gradient(135deg, var(--purple), #3b82f6); }
.dhero2__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.dhero2__chip { font-size: 13px; padding: 7px 14px; border-radius: 999px; background: var(--glass-bg);
  border: 1px solid var(--glass-border); color: var(--text-muted); text-decoration: none; transition: color .15s, border-color .15s; }
.dhero2__chip:hover { color: var(--text); border-color: rgba(59,130,246,.5); }
.dbanner-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 33%); gap: 14px;
  overflow-x: auto; padding-bottom: 14px; margin-bottom: 26px; scroll-snap-type: x proximity; }
.dbanner { border-radius: var(--radius-sm); overflow: hidden; scroll-snap-align: start;
  border: 1px solid var(--glass-border); transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.dbanner:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(2,8,20,.45); }
/* Rasio 2:1 mengikuti gambar banner (800x400) → tidak terpotong. */
.dbanner img { width: 100%; aspect-ratio: 2 / 1; height: auto; object-fit: cover; display: block; }
@media (max-width: 900px) { .dbanner-rail { grid-auto-columns: minmax(260px, 80%); } }

/* ===== Homepage Puaz: trust band + bento + rail (susunan khas) ===== */
.dtrust-band { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 22px 0 26px; }
.dtrust-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius-sm);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  backdrop-filter: blur(var(--glass-blur)); -webkit-backdrop-filter: blur(var(--glass-blur)); }
.dtrust-ic { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--purple), var(--gold)); color: #fff; }
.dtrust-item strong { display: block; font-size: 14px; }
.dtrust-item small { color: var(--text-muted); font-size: 11.5px; }

.dbento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 116px; gap: 14px; }
.dbento .glass-card { transition: transform .18s var(--ease), box-shadow .18s var(--ease); }
.dbento a:hover { transform: translateY(-3px); box-shadow: 0 14px 36px rgba(2,8,20,0.4); }
.dbento__hl { grid-column: span 2; grid-row: span 2; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 24px; text-decoration: none; color: var(--text); }
.dbento__hl h3 { font-size: 23px; margin: 8px 0 4px; }
.dbento__hl p { color: var(--text-muted); font-size: 13.5px; max-width: 92%; }
.dbento__tag { display: inline-block; align-self: flex-start; font-size: 11px; font-weight: 800; padding: 3px 10px;
  border-radius: 999px; background: rgba(59,130,246,.2); color: #93c5fd; }
.dbento__tag--flash { background: rgba(249,115,22,.2); color: #fdba74; }
.dbento__go { margin-top: 12px; font-weight: 700; color: var(--gold-soft); font-size: 13.5px; }
.dbento__cat { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  text-decoration: none; color: var(--text); padding: 12px; text-align: center; }
.dbento__flash { grid-column: span 2; display: flex; flex-direction: column; justify-content: center; padding: 22px;
  text-decoration: none; color: var(--text); }
.dbento__flash h3 { font-size: 18px; margin-top: 6px; }

.dprod-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 220px); gap: 16px;
  overflow-x: auto; padding: 4px 2px 16px; scroll-snap-type: x proximity; }
.dprod-rail > * { scroll-snap-align: start; }
@media (max-width: 900px) {
  .dtrust-band { grid-template-columns: repeat(2, 1fr); }
  .dbento { grid-template-columns: repeat(2, 1fr); }
  .dbento__hl, .dbento__flash { grid-column: span 2; }
}
.dprod { text-decoration: none; color: var(--text); border-radius: var(--radius-sm); overflow: hidden; display: flex; flex-direction: column; transition: transform 0.18s var(--ease), box-shadow 0.18s var(--ease); }
.dprod:hover { transform: translateY(-4px); box-shadow: 0 14px 36px rgba(2, 8, 20,0.45); }
.dprod:hover .dprod__name { color: var(--gold-soft); }
.dprod__name { transition: color 0.15s var(--ease); }
.dprod__thumb { position: relative; aspect-ratio: 1/1; display: grid; place-items: center; background: linear-gradient(135deg, hsl(calc(var(--seed) * 47 % 360) 70% 55%), hsl(calc(var(--seed) * 47 % 360 + 40) 70% 45%)); }
.dprod__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.dprod__thumb span { font-size: 30px; font-weight: 900; color: rgba(255,255,255,0.9); }
.dprod__body { padding: 12px 14px 14px; }
.dprod__name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dprod__price { font-size: 16px; font-weight: 800; color: var(--gold-soft); margin-top: 4px; }
.dprod__seller { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* Seller CTA */
.dseller { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 30px 34px; flex-wrap: wrap; }
.dseller h2 { font-size: 22px; font-weight: 800; }
.dseller p { color: var(--text-muted); margin-top: 6px; }

/* Footer */
.dfooter { border-radius: 0; border-top: 1px solid var(--glass-border); margin-top: 20px; }
.dfooter__grid { max-width: 1240px; margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1.2fr; gap: 24px; padding: 40px 24px 24px; }
.dfooter__col h4 { font-size: 14px; font-weight: 700; margin-bottom: 12px; }
.dfooter__col a { display: block; color: var(--text-muted); text-decoration: none; font-size: 14px; padding: 4px 0; }
.dfooter__col a:hover { color: var(--text); }
.dfooter__desc { color: var(--text-muted); font-size: 14px; margin-top: 12px; line-height: 1.6; max-width: 320px; }
.dfooter__badges { display: flex; gap: 8px; margin-top: 12px; }
.fbadge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 8px; background: var(--glass-bg-strong); border: 1px solid var(--glass-border); }
.dfooter__bottom { max-width: 1240px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--glass-border); font-size: 13px; color: var(--text-muted); }
.dfooter__switch { color: var(--gold-soft); text-decoration: none; font-weight: 600; }

/* Halaman Belanja: sidebar filter + grid */
.dshop { display: grid; grid-template-columns: 220px 1fr; gap: 20px; align-items: start; }
.dshop__side { padding: 18px; position: sticky; top: 90px; }
.dshop__title { font-size: 14px; font-weight: 800; margin-bottom: 12px; }
.dshop__cats { display: flex; flex-direction: column; gap: 2px; }
.dshop__cat { padding: 9px 12px; border-radius: 10px; color: var(--text-muted); text-decoration: none; font-size: 14px; }
.dshop__cat:hover { background: var(--glass-bg-strong); color: var(--text); }
.dshop__cat.is-active { background: linear-gradient(135deg, rgba(37, 99, 235,0.25), rgba(59, 130, 246,0.18)); color: var(--text); font-weight: 600; }
/* Kolom pencarian di halaman belanja — tujuan ikon "cari" di header.
   Sebelumnya ikon header hanya melempar ke grid tanpa tempat mengetik. */
.dshop__search {
  display: flex; align-items: center; gap: 10px;
  padding: 0 8px 0 14px; margin-bottom: 18px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.dshop__search:focus-within { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.25); }
.dshop__search-ic { display: grid; place-items: center; color: var(--text-dim); flex: none; }
.dshop__search input {
  flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  padding: 12px 0; font-size: 15px; color: var(--text); font-family: inherit;
}
.dshop__search input::placeholder { color: var(--text-dim); }
.dshop__search button { flex: none; }
.dshop__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 16px; }
.dshop__h1 { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.dshop__count { font-size: 13px; color: var(--text-muted); }
.dempty { padding: 40px; text-align: center; color: var(--text-muted); display: flex; flex-direction: column; gap: 14px; align-items: center; }
.dcat-grid--page { grid-template-columns: repeat(6, 1fr); }

/* Detail produk desktop */
.dcrumb { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.dcrumb a { color: var(--text-muted); text-decoration: none; }
.dcrumb a:hover { color: var(--text); }
.dcrumb span { margin: 0 4px; }
/* Layout detail produk ala marketplace besar:
   - kolom KIRI  : galeri (baris 1) + deskripsi (baris 2) -> ruang di bawah foto terisi
   - kolom KANAN : panel beli, STICKY mengikuti gulir, merentang dua baris
   Urutan sumber elemen: media, info, deskripsi -> di mobile (1 kolom) menjadi
   galeri -> panel beli -> deskripsi, jadi tombol beli tetap dekat foto. */
.dpd { display: grid; grid-template-columns: 1fr 1.1fr; gap: 22px; align-items: start; }
.dpd__media { grid-column: 1; grid-row: 1; padding: 16px; }
.dpd__desccol { grid-column: 1; grid-row: 2; }
.dpd__desccol .dpd__desc { margin: 0; }
.dpd__info { grid-column: 2; grid-row: 1 / span 2; padding: 28px; }
.dpd__name { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; margin: 10px 0 6px; }
.dpd__price { font-size: 30px; font-weight: 900; color: var(--gold-soft); }
.dpd__meta { font-size: 14px; color: var(--text-muted); margin: 10px 0; }
.dpd__desc { font-size: 15px; line-height: 1.7; color: var(--text-muted); margin: 14px 0 20px; white-space: pre-wrap; }
.dpd__buy { margin-bottom: 8px; }
.dpd__hint { font-size: 13px; color: var(--text-muted); margin-top: 8px; text-align: center; }
.dpd__hint a, .dpd__desc a { color: var(--gold-soft); }

/* Cart icon di header */
.dcart { position: relative; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; color: var(--text); text-decoration: none; }
.dcart:hover { background: var(--glass-bg-strong); }

/* Tombol beli desktop */
.dpd__qty { margin-bottom: 12px; }
.dpd__actions { display: flex; gap: 10px; }

/* Panel beli mengikuti gulir saat pembaca menelusuri deskripsi panjang di kiri —
   tombol beli selalu terjangkau tanpa menggulir balik ke atas.
   `max-height` + `overflow` menjaga panel yang lebih tinggi dari layar tetap
   bisa dibaca seluruhnya; sticky hanya dipakai bila layarnya memang cukup tinggi. */
@media (min-width: 1025px) { /* selaras dengan breakpoint tablet (maks 1024px) */
  .dpd__info { position: sticky; top: 92px; align-self: start; }
}
/* Pemilih varian di bawah foto (kolom kiri) */
.dpd__variants { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--glass-border); }
.dpd__variants .variant-pick { margin: 0; }

/* Keranjang & checkout */
.dcart-grid { display: grid; grid-template-columns: 1fr 320px; gap: 20px; align-items: start; }
.dcart-items { display: flex; flex-direction: column; gap: 12px; }
.dcart-item { display: grid; grid-template-columns: 72px 1fr auto auto auto; align-items: center; gap: 14px; padding: 14px; }
.dcart-thumb { width: 72px; height: 72px; border-radius: 12px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, hsl(calc(var(--seed) * 47 % 360) 70% 55%), hsl(calc(var(--seed) * 47 % 360 + 40) 70% 45%)); color: #fff; font-weight: 800; text-decoration: none; }
.dcart-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dcart-info { min-width: 0; }
.dcart-name { font-weight: 600; text-decoration: none; color: var(--text); display: block; }
.dcart-seller { font-size: 12px; color: var(--text-muted); }
.dcart-price { font-size: 14px; color: var(--gold-soft); font-weight: 700; margin-top: 4px; }
.dcart-qty input { width: 64px; padding: 8px; border-radius: 10px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text); text-align: center; font-family: inherit; }
.dcart-sub { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dcart-del { background: none; border: none; color: var(--danger); cursor: pointer; padding: 6px; }
.dcart-summary { padding: 22px; position: sticky; top: 90px; }
.dcart-summary h3 { font-size: 16px; font-weight: 800; margin-bottom: 14px; }
.dcart-row { display: flex; justify-content: space-between; font-size: 14px; padding: 8px 0; }
.dcart-row--muted { color: var(--text-muted); }
.dcart-total { border-top: 1px solid var(--glass-border); margin-top: 6px; padding-top: 12px; font-size: 15px; }
.dcart-summary .btn { margin-top: 14px; }
.dcart-continue { display: block; text-align: center; margin-top: 12px; color: var(--text-muted); text-decoration: none; font-size: 13px; }

.dco-left { display: flex; flex-direction: column; gap: 16px; }
.dco-box { padding: 20px; }
.dco-box h3 { font-size: 15px; font-weight: 800; margin-bottom: 12px; }
.dco-items { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.dco-item { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 12px; }
.dco-thumb { width: 44px; height: 44px; border-radius: 10px; overflow: hidden; display: grid; place-items: center; background: linear-gradient(135deg, hsl(calc(var(--seed) * 47 % 360) 70% 55%), hsl(calc(var(--seed) * 47 % 360 + 40) 70% 45%)); color: #fff; font-weight: 700; font-size: 13px; }
.dco-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dco-name { font-size: 14px; } .dco-name em { color: var(--text-muted); font-style: normal; }
.dco-price { font-weight: 700; font-variant-numeric: tabular-nums; }

.dco-success { text-align: center; padding: 44px; max-width: 520px; margin: 0 auto; }
.dco-success h1 { font-size: 24px; font-weight: 800; margin-top: 8px; }
.dco-success p { color: var(--text-muted); margin-top: 8px; }
.dco-invoices { list-style: none; margin: 16px 0; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-muted); }
.dco-success__cta { display: flex; gap: 12px; justify-content: center; margin-top: 8px; }

/* ---------- Area Akun desktop (wallet/pesanan/profil) ---------- */
.dakun { display: grid; grid-template-columns: 250px 1fr; gap: 20px; align-items: start; }
.dakun-side { padding: 18px 12px; position: sticky; top: 90px; }
.dakun-user { display: flex; align-items: center; gap: 12px; padding: 6px 8px 16px; border-bottom: 1px solid var(--glass-border); margin-bottom: 8px; }
.dakun-user__info { min-width: 0; }
.dakun-user__name { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dakun-user__saldo { font-size: 13px; color: var(--gold-soft); font-weight: 700; }
.dakun-nav { display: flex; flex-direction: column; gap: 2px; }
.dakun-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.dakun-balance { padding: 26px 30px; }
.dakun-balance__top { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.dakun-balance .balance-card__actions { margin-top: 0; }
.dakun-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dakun-qcard { display: flex; align-items: center; gap: 14px; padding: 18px; border-radius: var(--radius-sm); text-decoration: none; color: var(--text); transition: transform 0.15s var(--ease); }
.dakun-qcard:hover { transform: translateY(-2px); }
.dakun-qtitle { font-weight: 700; font-size: 14px; }
.dakun-qsub { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* ---------- Referral ---------- */
.ref-hero { padding: 28px; }
.ref-hero__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.ref-link { display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; padding: 10px 10px 10px 16px; border-radius: var(--radius-sm); background: var(--glass-bg); border: 1px solid var(--glass-border); }
.ref-link__txt { flex: 1; min-width: 0; font-size: 13px; font-family: ui-monospace, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--gold-soft); }
.ref-stats { display: flex; gap: 24px; margin-top: 16px; }
.ref-hero__top .ref-stats { margin-top: 0; }
.ref-stat__val { font-size: 22px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ref-stat__lbl { font-size: 12px; color: var(--text-muted); }
.ref-sources { margin-top: 14px; font-size: 13px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ref-cta { display: flex; align-items: center; justify-content: space-between; gap: 16px; text-decoration: none; color: var(--text); transition: transform 0.15s var(--ease); }
.ref-cta:hover { transform: translateY(-2px); }
.switch--big span { font-size: 15px; }
.ref-sources.field, .field.ref-sources { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* ---------- Rating & ulasan ---------- */
.stars { display: inline-flex; gap: 1px; }
.star { color: var(--text-dim); font-size: 15px; line-height: 1; }
.star.is-on { color: var(--gold); }
.stars--sm .star { font-size: 12px; }
.rating-summary { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0 4px; }
.rating-count { color: var(--text-muted); font-size: 13px; }
.dprod__rating { font-size: 12px; color: var(--text-muted); margin-top: 3px; display: flex; align-items: center; gap: 3px; }
.dprod__rating .star { font-size: 12px; }

/* Jarak antar blok besar halaman produk = 22px, sama dengan gap grid .dpd,
   sehingga ritme vertikalnya konsisten (kartu deskripsi, spesifikasi, ulasan). */
.dreviews { margin-top: 22px; }
.review-list { list-style: none; display: flex; flex-direction: column; }
.review-item { display: flex; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--glass-border); }
.review-item:last-child { border-bottom: none; }
.review-body { flex: 1; min-width: 0; }
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.review-date { font-size: 12px; color: var(--text-dim); }
.review-comment { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-top: 6px; }

/* Form ulasan */
.review-form { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--glass-border); }
.rating-input { display: flex; align-items: center; gap: 4px; }
.star-radio { cursor: pointer; }
.star-radio input { display: none; }
.star-radio span { font-size: 26px; color: var(--text-dim); transition: color 0.12s; }
/* Bintang terpilih & semua sebelumnya menyala (dipakai JS: .is-picked) */
.star-radio.is-picked span { color: var(--gold); }
.star-radio:hover span { color: var(--gold-soft); }

/* Blok tulis ulasan: mengajak menulis, bukan sekadar bintang.
   Label + prompt spesifik + chip cepat + textarea besar. */
.rv-write { display: flex; flex-direction: column; gap: 8px; }
.rv-write__label { font-size: 14px; font-weight: 700; color: var(--text); margin: 0; }
.rv-write__hint { font-size: 12.5px; color: var(--text-muted); margin: 0; line-height: 1.5; }
.rv-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 2px 0; }
/* Chip cepat: ketuk untuk menyisipkan frasa. Target sentuh ≥ nyaman. */
.rv-chip { padding: 7px 12px; border-radius: 999px; font-size: 12.5px; font-weight: 600;
  color: var(--text); background: var(--glass-bg); border: 1px solid var(--glass-border);
  cursor: pointer; transition: background 0.15s, border-color 0.15s; }
.rv-chip:hover { background: var(--glass-bg-strong); }
.rv-chip.is-on { background: color-mix(in srgb, var(--gold) 16%, var(--field-fill)); border-color: var(--gold); }
/* Textarea di dalam .input-glass: meniru .input-glass input tapi multi-baris. */
.input-glass textarea { flex: 1; min-width: 0; background: transparent; border: none; outline: none;
  padding: 12px 0; font-size: 15px; color: var(--text); font-family: inherit; line-height: 1.5;
  resize: vertical; min-height: 68px; }
.input-glass textarea::placeholder { color: var(--text-dim); }

@media (max-width: 1024px) {
  .dakun { grid-template-columns: 1fr; }
  .dakun-side { position: static; }
  .dakun-nav { flex-direction: row; flex-wrap: wrap; }
  .dakun-nav .adminbar__group { width: 100%; }
  .dakun-quick { grid-template-columns: 1fr; }
}

/* Halaman statis desktop */
.dstatic { padding: 36px 40px; max-width: 820px; margin: 0 auto; }
.dstatic__title { font-size: 28px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 10px; }
.dstatic__content { font-size: 15px; line-height: 1.8; color: var(--text-muted); white-space: pre-wrap; }

/* Onboarding penjual */
.dsell-hero { display: flex; align-items: center; gap: 24px; padding: 40px; overflow: hidden; }
.dsell-hero__text { flex: 1; }
.dsell-tag { display: inline-block; background: rgba(45,212,191,0.2); color: #5eead4; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; }
.dsell-hero h1 { font-size: clamp(26px, 3.4vw, 40px); font-weight: 900; letter-spacing: -0.03em; margin: 12px 0; }
.dsell-hero h1 span { color: var(--gold-soft); }
.dsell-hero p { color: var(--text-muted); font-size: 16px; max-width: 500px; }
.dsell-promo { margin: 16px 0 22px; padding: 12px 16px; border-radius: 12px; background: linear-gradient(135deg, rgba(37, 99, 235,0.2), rgba(219,39,119,0.2)); border: 1px solid var(--glass-border); font-size: 15px; }
.dsell-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.dsell-card { padding: 24px; }
.dsell-ic { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 14px; }
.dsell-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; }
.dsell-card p { font-size: 14px; color: var(--text-muted); line-height: 1.6; }
.dsell-steps { padding: 34px; text-align: center; }
.dsell-steps h2 { font-size: 22px; font-weight: 800; margin-bottom: 22px; }
.dsell-steplist { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.dsell-step { display: flex; gap: 14px; text-align: left; align-items: flex-start; }
.dsell-num { flex-shrink: 0; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: linear-gradient(135deg, var(--gold), var(--gold-soft)); color: #ffffff; }
.dsell-step h4 { font-size: 15px; font-weight: 700; }
.dsell-step p { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

/* Responsif desktop → tablet */
@media (max-width: 1024px) {
  .dsell-grid, .dsell-steplist { grid-template-columns: 1fr; }
  .dcat-grid { grid-template-columns: repeat(4, 1fr); }
  .dcat-grid--page { grid-template-columns: repeat(4, 1fr); }
  .dprod-grid { grid-template-columns: repeat(3, 1fr); }
  .dnav { display: none; }
  .dfooter__grid { grid-template-columns: 1fr 1fr; }
  .dshop { grid-template-columns: 1fr; }
  .dshop__side { position: static; }
  .dshop__cats { flex-direction: row; flex-wrap: wrap; }
  /* Satu kolom: buang penempatan eksplisit agar elemen mengalir sesuai urutan
     sumber (galeri → panel beli → deskripsi) dan tidak saling menimpa. */
  .dpd { grid-template-columns: 1fr; }
  .dpd__media, .dpd__info, .dpd__desccol { grid-column: auto; grid-row: auto; }
  .dpd__info { position: static; }
  .dcart-grid { grid-template-columns: 1fr; }
  .dcart-summary { position: static; }
}
@media (max-width: 640px) {
  .dprod-grid { grid-template-columns: repeat(2, 1fr); }
  .dcat-grid, .dcat-grid--page { grid-template-columns: repeat(3, 1fr); }
  .dhero-slide--custom { flex-direction: column; padding: 26px; text-align: center; }
  .dhero__art { display: none; }
  .dsearch { display: none; }
}

/* ---------- Theme toggle ---------- */
.theme-toggle {
  position: fixed; bottom: 20px; right: 20px; z-index: 50;
  width: 46px; height: 46px; border-radius: 14px;
  display: grid; place-items: center; cursor: pointer;
  color: var(--text);
}
.theme-toggle .icon-moon { display: none; }
:root[data-theme="light"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="light"] .theme-toggle .icon-moon { display: block; }

/* ---------- Sengketa ---------- */
.sengketa-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-left: 3px solid var(--danger);
}
.sengketa-box__head { margin-bottom: 8px; }
.sengketa-line { font-size: 14px; line-height: 1.7; margin: 6px 0; }
.sengketa-line span { color: var(--text-muted); font-weight: 600; }
.sengketa-reply { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--glass-border); }
.sengketa-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sengketa-retur { margin-top: 8px; }
.sengketa-bukti-link { font-size: 13px; color: var(--gold-soft); text-decoration: none; }
.sengketa-bukti-link:hover { text-decoration: underline; }
.sengketa-bukti { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; font-size: 13px; }

/* Form komplain pembeli: lampiran bukti wajib, dibedakan agar tak terlewat. */
.sengketa-form .sengketa-bukti input { font-size: 13px; }

/* Label status berwarna sesuai tahap. Merah = butuh tindakan, hijau = tuntas. */
/* Selaras dengan pola pill status app: latar tint transparan + teks pastel
   terang (bukan solid jenuh + putih), agar sengketa satu bahasa dengan
   .pill dan .order-status di seluruh situs. */
.sengketa-tag {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .01em;
}
.sengketa-tag--1 { background: rgba(217,119,6,0.2);  color: #fcd34d; } /* menunggu penjual */
.sengketa-tag--2 { background: rgba(59,130,246,0.2); color: #93c5fd; } /* menunggu pembeli */
.sengketa-tag--3 { background: rgba(248,113,113,0.2); color: #fca5a5; } /* menunggu admin */
.sengketa-tag--4 { background: rgba(45,212,191,0.2); color: #5eead4; } /* selesai damai */
.sengketa-tag--5 { background: rgba(124,58,237,0.22); color: #c4b5fd; } /* menunggu retur */
.sengketa-tag--6 { background: rgba(37,99,235,0.2);  color: var(--gold-soft); } /* retur dikirim */
.sengketa-tag--7 { background: rgba(45,212,191,0.2); color: #5eead4; } /* selesai */

/* Detail sengketa di admin. */
.sengketa-detail__row { padding: 10px 0; border-bottom: 1px solid var(--glass-border); }
.sengketa-detail__row:last-child { border-bottom: 0; }
.sengketa-detail__label {
  display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted);
}
.sengketa-detail__row p { margin: 0; font-size: 14px; line-height: 1.7; max-width: 72ch; }
.sengketa-bukti-thumb { display: inline-block; }
.sengketa-bukti-thumb--gap { margin-top: 8px; }
.sengketa-bukti-thumb img { display: block; width: 220px; max-width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--glass-border); }
.sengketa-decide { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }

/* Link teks generik & link inline dalam manual — konsisten dengan konvensi
   app: aksen gold-soft, tanpa garis bawah, underline saat hover. */
.link, .mn-sec a { color: var(--gold-soft); text-decoration: none; font-weight: 600; }
.link:hover, .mn-sec a:hover { text-decoration: underline; }

/* ---------- Manual admin ---------- */
/* Paragraf pengantar manual ikut dibatasi lebar bacanya (kelas khusus, tidak
   memengaruhi .field__hint di halaman lain). */
.mn-intro { max-width: 72ch; }
.mn-h { margin: 0 0 12px; font-size: 17px; font-weight: 800; letter-spacing: -.01em; }
.mn-sub { margin: 18px 0 8px; font-size: 14px; font-weight: 700; color: var(--gold-soft); }
.mn-path {
  display: inline-block; margin-left: 8px; padding: 2px 8px; border-radius: 8px;
  font-size: 11px; font-weight: 600; letter-spacing: 0;
  color: var(--text-muted); background: var(--glass-bg); border: 1px solid var(--glass-border);
}
/* Lebar baca dibatasi ~68 karakter. Tanpa ini, di layar admin yang lebar teks
   membentang ~200 karakter per baris — mata kehilangan barisnya saat kembali
   ke kiri. Kartu tetap lebar penuh; hanya kolom teksnya yang dipersempit. */
.mn-sec p,
.mn-sec .mn-list,
.mn-sec ol.mn-list,
.mn-rule,
.mn-warn { max-width: 68ch; }
.mn-sec p { font-size: 15px; line-height: 1.7; margin: 0 0 12px; }
.mn-list { margin: 0 0 12px; padding-left: 20px; }
.mn-list li { font-size: 15px; line-height: 1.7; margin-bottom: 7px; }

/* Nilai yang dibaca langsung dari pengaturan aktif — dibedakan supaya pembaca
   tahu itu bukan contoh, melainkan angka yang sedang berlaku. */
.mn-live {
  padding: 1px 6px; border-radius: 6px; font-weight: 700;
  color: var(--gold-soft); background: rgba(96, 165, 250, .12);
}

/* Aturan mutlak & peringatan: sengaja mencolok, isinya berkonsekuensi uang. */
.mn-rule, .mn-warn {
  margin: 12px 0; padding: 12px 14px; border-radius: 12px;
  font-size: 14px; line-height: 1.7;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.mn-rule { border-left: 3px solid var(--gold); }
.mn-warn { border-left: 3px solid var(--danger); }

.mn-table { width: 100%; max-width: 46rem; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.mn-table th, .mn-table td {
  padding: 9px 10px; text-align: left; vertical-align: top;
  border-bottom: 1px solid var(--glass-border);
}
.mn-table th { font-weight: 700; color: var(--text-muted); font-size: 12px;
  text-transform: uppercase; letter-spacing: .04em; }

.mn-toc__title {
  margin: 0 0 12px; font-size: 15px; font-weight: 700; letter-spacing: -.01em;
  color: var(--text);
}
.mn-toc__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; }
.mn-toc__grid a {
  display: flex; align-items: center; min-height: 44px;
  padding: 8px 12px; border-radius: 10px; font-size: 13.5px; line-height: 1.35;
  text-decoration: none; color: var(--text);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  transition: background .2s ease;
}
.mn-toc__grid a:hover { background: var(--glass-bg-strong); }
@media (prefers-reduced-motion: reduce) { .mn-toc__grid a { transition: none; } }

/* Tabel manual bisa lebih lebar dari layar ponsel — biarkan ia menggulir
   sendiri, jangan sampai seluruh halaman ikut bergeser ke samping. */
@media (max-width: 640px) {
  .mn-sec { overflow-x: auto; }
}

/* ---------- Jenis produk: pre-order & digital ---------- */
.jenis-badge {
  position: absolute; top: 8px; right: 8px;
  padding: 3px 7px; border-radius: 8px;
  font-size: 10px; font-weight: 800; letter-spacing: .02em;
  color: #fff; background: var(--purple);
}
.jenis-badge--digital { background: #7c3aed; }
.jenis-badge--preorder { background: #0891b2; }

/* Penjelasan jenis di halaman produk & pesanan. Dibuat menonjol karena
   memuat konsekuensi uang: kapan dana cair dan kapan boleh komplain. */
.jenis-info {
  margin: 14px 0; padding: 12px 14px; border-radius: 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-left: 3px solid var(--gold);
}
.jenis-info strong { display: block; margin-bottom: 4px; font-size: 13px; letter-spacing: .02em; }
.jenis-info p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--text-muted); }
.jenis-info--digital { border-left-color: #a78bfa; }
.jenis-info--preorder { border-left-color: #22d3ee; }

.order-digital, .order-po {
  margin: 12px 0; padding: 12px 14px; border-radius: 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.order-digital__title, .order-po__title {
  margin: 0 0 8px; font-size: 12px; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted);
}

/* ---------- Kepala panel chat + saklar bunyi ---------- */
.chat-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.chat-head .wallet-sub { margin-bottom: 0; }
.chat-sound {
  flex: none; display: grid; place-items: center;
  width: 38px; height: 38px; border-radius: 12px;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  color: var(--text); cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.chat-sound:hover { background: var(--glass-bg-strong); }
.chat-sound .icon-off { display: none; }
.chat-sound.is-off { color: var(--text-muted); }
.chat-sound.is-off .icon-on { display: none; }
.chat-sound.is-off .icon-off { display: block; }
@media (prefers-reduced-motion: reduce) { .chat-sound { transition: none; } }

/* ---------- Indikator "sedang mengetik" ----------
   Tiga titik memantul bergantian, seperti aplikasi pesan pada umumnya. Tujuannya
   satu: memberi tahu pengguna bahwa pesannya SUDAH diterima dan jawaban sedang
   disusun — balasan asisten butuh beberapa detik untuk sampai. */
.chat-bubble--typing { display: inline-flex; flex-direction: column; gap: 4px; }
.typing-dots { display: inline-flex; align-items: center; gap: 4px; height: 16px; }
.typing-dots i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--text-muted);
  animation: typingBounce 1.3s infinite ease-in-out both;
}
.typing-dots i:nth-child(1) { animation-delay: -0.32s; }
.typing-dots i:nth-child(2) { animation-delay: -0.16s; }
@keyframes typingBounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .45; }
  40%           { transform: translateY(-5px); opacity: 1; }
}
/* Gelembungnya masuk lembut, tidak "meletup" begitu saja. */
.chat-typing:not([hidden]) { animation: typingMasuk .22s ease-out; }
@keyframes typingMasuk {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes typingPudar { 0%, 80%, 100% { opacity: .35; } 40% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  /* Tetap berdenyut halus supaya maknanya tak hilang, tanpa gerak melompat. */
  .typing-dots i { animation: typingPudar 1.6s infinite ease-in-out both; }
  .chat-typing:not([hidden]) { animation: none; }
}

/* Hanya untuk pembaca layar: ada di DOM, tidak terlihat di layar. */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- Tombol bantuan melayang ----------
   Duduk tepat di atas tombol tema (tema: bottom 20px, tinggi 46px + jarak 12px). */
.support-fab {
  position: fixed; bottom: 78px; right: 20px; z-index: 50;
  display: inline-flex; align-items: center; gap: 8px;
  height: 46px; padding: 0 16px; border-radius: 23px;
  color: var(--text); text-decoration: none;
  font-size: 14px; font-weight: 600; letter-spacing: .01em;
  transition: transform .2s ease, box-shadow .2s ease;
}
.support-fab:hover { transform: translateY(-2px); }
.support-fab:active { transform: translateY(0) scale(.97); }
.support-fab svg { flex: none; }
/* Titik merah = ada balasan belum dibaca. Diberi label teks untuk pembaca layar. */
.support-fab__dot {
  position: absolute; top: 8px; right: 10px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 0 2px var(--popover-bg);
}
@media (max-width: 480px) {
  /* Layar sempit: ringkas jadi lingkaran ikon saja agar tidak menutupi konten. */
  .support-fab { width: 46px; padding: 0; justify-content: center; border-radius: 14px; }
  .support-fab__txt { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .support-fab { transition: none; }
  .support-fab:hover, .support-fab:active { transform: none; }
}

/* Penanda pengirim: balasan asisten dibedakan dari petugas manusia. */
.chat-who--ai { color: var(--gold-soft); opacity: 1; }

/* Panel ambil alih di thread chat admin. */
.chat-mode {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 10px;
  margin-bottom: 12px; padding: 10px 14px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
}
.chat-mode .field__hint { margin: 0; flex: 1 1 240px; }

/* ---------- Responsif ---------- */
@media (max-width: 720px) {
  .navbar__links { display: none; }
  /* Menu tengah disembunyikan → dorong grup user (notif/avatar/Keluar) ke kanan */
  .navbar__user { margin-left: auto; }
  .stat-grid { grid-template-columns: 1fr; }
  .menu-grid { grid-template-columns: repeat(3, 1fr); }
  .page--app { padding: 78px 14px 48px; }
  /* Head yang tadinya sejajar → bungkus agar tidak terpotong */
  .panel__head, .mkt__head { flex-wrap: wrap; }
  .detail-checkout { flex-direction: column; align-items: stretch; }
  .detail-checkout .btn { width: 100%; }
}

/* Form dua kolom jadi satu kolom lebih awal (muat di HP standar) */
@media (max-width: 560px) {
  .field-row { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .menu-grid { grid-template-columns: repeat(2, 1fr); }
  /* Navbar app LAMA ringkas: kecilkan padding & sembunyikan teks brand.
     Dibatasi ke .navbar saja — di header marketplace (.dbrand) tulisan
     "Puaz" TETAP tampil di sebelah logo N (permintaan: header clean = N + Puaz). */
  .navbar { gap: 8px; padding: 8px 12px; }
  .navbar .brand-name { display: none; }
  .navbar__user { gap: 8px; }
  .auth-card, .wallet-form, .wallet-side { padding-left: 18px; padding-right: 18px; }
  .balance-card, .panel, .profile-head { padding-left: 18px; padding-right: 18px; }
  .ship-form { flex-direction: column; align-items: stretch; }
  .ship-form .btn { width: 100%; }
}

/* Footer mobile (tombol ke desktop) */
.mfooter { display: flex; justify-content: center; padding: 24px 16px calc(28px + env(safe-area-inset-bottom, 0px)); }
.mfooter__switch { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--text-muted); text-decoration: none; padding: 8px 16px; border-radius: 999px; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.mfooter__switch:hover { color: var(--text); background: var(--glass-bg-strong); }

/* ---------- Aksesibilitas: kurangi gerak ---------- */
@media (prefers-reduced-motion: reduce) {
  .blob { animation: none; }
  .btn, .menu-item { transition: none; }
}

/* ---------- QR Pembayaran ---------- */
.balance-card__qr { display: flex; gap: 10px; margin-top: 12px; }
.qr-quick {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 12px; border-radius: 14px; font-size: 13px; font-weight: 600;
  color: #fff; text-decoration: none;
  background: rgba(255,255,255,0.14); border: 1px solid rgba(255,255,255,0.28);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  transition: background .2s ease, transform .2s ease;
}
.qr-quick:hover { background: rgba(255,255,255,0.24); }
.qr-quick:active { transform: scale(0.97); }

.qr-card { padding: 24px; }
.qr-card--narrow { max-width: 520px; }
.qr-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.qr-name { font-size: 17px; font-weight: 600; color: var(--text); }
.qr-payid { font-size: 13px; color: var(--text-muted); margin-top: 2px; }

.qr-box {
  display: grid; place-items: center; padding: 18px; margin: 0 auto 16px; width: fit-content;
  background: #fff; border-radius: 20px; border: 1px solid var(--glass-border);
  box-shadow: 0 12px 32px rgba(0,0,0,0.22);
}
.qr-img { display: block; width: 232px; height: 232px; max-width: 100%; image-rendering: pixelated; }

.qr-amount { text-align: center; font-size: 22px; font-weight: 700; color: var(--text); }
.qr-amount--free { font-size: 16px; font-weight: 600; color: var(--text-muted); }
.qr-note { text-align: center; font-size: 13px; color: var(--text-muted); margin-top: 4px; }
.qr-reset { display: block; text-align: center; font-size: 13px; margin-top: 8px; color: var(--accent, #7dd3fc); }
.qr-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.qr-actions .btn { flex: 1; min-width: 120px; }

.qr-payee { display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 18px; border-radius: 16px; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.qr-payee__label { font-size: 12px; color: var(--text-muted); text-transform: uppercase; letter-spacing: .04em; }
.qr-fixed { font-size: 26px; font-weight: 700; color: var(--text); padding: 12px 0; }
.qr-note-box { padding: 12px 14px; border-radius: 12px; font-size: 14px; color: var(--text); background: var(--glass-bg); border: 1px solid var(--glass-border); }
.qr-success__amount { font-size: 28px; font-weight: 700; color: var(--text); margin: 6px 0 4px; }

.qr-steps { list-style: none; display: grid; gap: 10px; margin-top: 12px; }
.qr-steps li { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.qr-steps li span { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: var(--text); background: var(--glass-bg-strong); border: 1px solid var(--glass-border); }

/* Area kamera */
.scan-box {
  position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 340px; margin: 0 auto;
  border-radius: 20px; overflow: hidden; display: grid; place-items: center;
  background: rgba(0,0,0,0.35); border: 1px solid var(--glass-border);
}
.scan-box video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .25s ease; }
.scan-box.is-live video { opacity: 1; }
.scan-frame { position: relative; width: 62%; aspect-ratio: 1/1; border-radius: 16px; box-shadow: 0 0 0 2000px rgba(0,0,0,0.28); border: 2px solid rgba(255,255,255,0.75); opacity: 0; transition: opacity .25s ease; }
.scan-box.is-live .scan-frame { opacity: 1; }
.scan-hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center; font-size: 13px; color: rgba(255,255,255,0.85); }

@media (max-width: 480px) {
  .qr-img { width: 200px; height: 200px; }
  .qr-actions .btn { min-width: 0; flex: 1 1 100%; }
}

/* ---------- Admin: markup & sebaran komisi ---------- */
.markup-card { margin-bottom: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.markup-sum { margin: 4px 0 18px; padding: 14px 16px; border-radius: 16px; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.markup-sum__row { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--text-muted); padding: 3px 0; }
.markup-sum__row strong { font-size: 17px; color: var(--text); font-variant-numeric: tabular-nums; }
.markup-sum__msg { margin-top: 8px; font-size: 13px; }
.markup-sum.is-ok { border-color: rgba(45,212,191,0.5); background: rgba(45,212,191,0.10); }
.markup-sum.is-ok .markup-sum__msg { color: #5eead4; }
.markup-sum.is-bad { border-color: rgba(248,113,113,0.5); background: rgba(248,113,113,0.10); }
.markup-sum.is-bad .markup-sum__msg { color: #fca5a5; }
.markup-example { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--glass-border); }
.price-preview strong { color: var(--text); }

/* ---------- Promo & voucher ---------- */
.code-chip { display: inline-block; margin-top: 4px; padding: 2px 8px; border-radius: 8px; font-family: ui-monospace, monospace; font-size: 12px; letter-spacing: .05em; color: var(--text); background: var(--glass-bg-strong); border: 1px solid var(--glass-border); }
.dcart-row--disc { color: #5eead4; }
.dcart-row--disc strong { color: #5eead4; }
.dco-promo__name { font-size: 12px; color: var(--text-muted); text-align: right; margin-top: -6px; margin-bottom: 8px; }
.dco-voucher { margin-top: 18px; padding: 18px 20px; max-width: 520px; }
.dco-voucher__row { display: flex; gap: 10px; margin-top: 8px; }
.dco-voucher__row .input-glass { flex: 1; }
.dco-voucher__err { margin-top: 10px; font-size: 13px; color: #fca5a5; }
.dco-voucher__ok { margin-top: 10px; font-size: 13px; color: #5eead4; }

@media (max-width: 640px) {
  .grid-2 { grid-template-columns: 1fr; }
  .dco-voucher__row { flex-wrap: wrap; }
}

/* ---------- Admin: baris jenjang komisi ---------- */
.tier-list { display: grid; gap: 10px; margin-bottom: 10px; }
.tier-row { display: flex; align-items: center; gap: 10px; }
.tier-row__label { flex: none; width: 92px; font-size: 13px; color: var(--text-muted); }
.tier-row .input-glass { flex: 1; }
.tier-row__del {
  flex: none; width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
  font-size: 18px; line-height: 1; color: var(--text-muted);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.tier-row__del:hover { color: #fca5a5; border-color: rgba(248,113,113,0.5); }
.tier-add { margin-bottom: 18px; }

/* ---------- Admin: pemilih produk (Halaman Home) ---------- */
.pick-list {
  max-height: 260px; overflow-y: auto; display: grid; gap: 6px; padding: 10px;
  border-radius: 14px; background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.pick-item { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 13px; }
.pick-item:hover { background: var(--glass-bg-strong); }
.pick-item input { flex: none; width: 16px; height: 16px; accent-color: #7dd3fc; }
.pick-item__name { flex: 1; color: var(--text); }
.pick-item__meta { flex: none; font-size: 12px; color: var(--text-muted); }

/* ---------- Admin: filter + bulk delete produk ---------- */
.filterbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filterbar__search { flex: 1 1 220px; }
.table__check { width: 38px; text-align: center; }
.table__check input { width: 16px; height: 16px; accent-color: #7dd3fc; cursor: pointer; }
.bulkbar {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px; padding: 12px 16px;
  border-radius: 14px; font-size: 14px; color: var(--text);
  background: rgba(56,189,248,0.12); border: 1px solid rgba(56,189,248,0.35);
}
.bulkbar span { flex: 1; }
.btn--danger { background: rgba(248,113,113,0.16); border: 1px solid rgba(248,113,113,0.45); color: #fca5a5; }
.btn--danger:hover { background: rgba(248,113,113,0.26); }
.btn--xs { padding: 5px 10px; font-size: 12px; border-radius: 9px; }

/* ---------- Admin: daftar kategori (edit inline) ---------- */
.catlist { list-style: none; display: grid; gap: 12px; }
.catlist__item { padding: 12px; border-radius: 14px; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.catlist__form { display: flex; gap: 8px; align-items: center; }
.catlist__form .input-glass { flex: 1; }
.catlist__foot { display: flex; align-items: center; justify-content: space-between; margin-top: 8px; }

/* ---------- Admin: grafik laporan ---------- */
.chart-panel { margin-top: 18px; }
.period-picker { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.period-date {
  padding: 7px 10px; border-radius: 10px; font-size: 13px; color: var(--text);
  background: var(--glass-bg); border: 1px solid var(--glass-border);
}
.period-sep { color: var(--text-muted); }
.chip.is-on { background: rgba(56,189,248,0.2); border-color: rgba(56,189,248,0.5); color: #e0f2fe; }

.chart-sum { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 16px 0 10px; }
.chart-sum__item {
  display: flex; flex-direction: column; gap: 4px; align-items: flex-start; cursor: pointer;
  padding: 12px 14px; border-radius: 14px; text-align: left;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  border-left: 3px solid transparent; opacity: 0.5; transition: opacity .2s ease, background .2s ease;
}
.chart-sum__item.is-on { opacity: 1; border-left-color: var(--c); background: var(--glass-bg-strong); }
.chart-sum__lbl { font-size: 12px; color: var(--text-muted); }
.chart-sum__val { font-size: 17px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

.chart-box { position: relative; width: 100%; margin-bottom: 8px; }
.chart-svg { width: 100%; height: 260px; display: block; overflow: visible; }
.chart-box--bars .chart-svg { height: 160px; }
.chart-grid { stroke: rgba(255,255,255,0.08); stroke-width: 1; }
.chart-cursor { stroke: rgba(255,255,255,0.35); stroke-width: 1; stroke-dasharray: 4 4; }
.chart-ylbl { fill: #94a3b8; font-size: 11px; text-anchor: end; }
.chart-xlbl { fill: #94a3b8; font-size: 11px; text-anchor: middle; }
.chart-tip {
  position: absolute; top: 8px; transform: translateX(-50%); pointer-events: none; z-index: 3;
  min-width: 150px; padding: 10px 12px; border-radius: 12px; font-size: 12px; color: var(--text);
  background: rgba(15,23,42,0.92); border: 1px solid var(--glass-border);
  backdrop-filter: blur(8px); box-shadow: 0 10px 26px rgba(0,0,0,0.35);
}
.chart-tip strong { display: block; margin-bottom: 6px; }
.chart-tip__row { display: flex; align-items: center; gap: 6px; padding: 2px 0; color: var(--text-muted); }
.chart-tip__row i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.chart-tip__row b { margin-left: auto; color: var(--text); font-variant-numeric: tabular-nums; }
.chart-legend { display: flex; gap: 16px; margin: 14px 0 6px; font-size: 12px; color: var(--text-muted); }
.chart-legend__item { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend__item::before { content: ""; width: 10px; height: 10px; border-radius: 3px; background: var(--c); }

@media (max-width: 720px) {
  .chart-sum { grid-template-columns: repeat(2, 1fr); }
  .period-picker { width: 100%; }
  .filterbar__search { flex: 1 1 100%; }
}

/* ---------- Sengketa pesanan ---------- */
.dispute-box {
  margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 14px; color: var(--text);
  background: rgba(59, 130, 246,0.10); border: 1px solid rgba(59, 130, 246,0.35);
}
.order-status--5 { background: rgba(59, 130, 246,0.18); color: #fcd34d; }

/* ---------- PIN & pengajuan ganti PIN ---------- */
.alert--warn { background: rgba(59, 130, 246,0.12); border: 1px solid rgba(59, 130, 246,0.4); color: #fcd34d; }
.pin-locked { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 16px;
  border-radius: 16px; background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-muted); }
.pin-locked__title { font-size: 15px; font-weight: 600; color: var(--text); }

.pinreq-list { display: grid; gap: 14px; }
.pinreq { padding: 16px 18px; }
.pinreq__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.pinreq__reason { margin-top: 8px; font-style: italic; color: var(--text); }
.pinreq__docs { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.pinreq__act { display: flex; gap: 10px; align-items: center; margin-top: 8px; }
.pinreq__act .input-glass { flex: 1; }

/* ---------- Smart Assistant ---------- */
.assistant-answer { padding: 14px 16px; border-radius: 14px; line-height: 1.6; color: var(--text);
  background: var(--glass-bg); border: 1px solid var(--glass-border); white-space: pre-wrap; }
.wa-connected { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px;
  background: rgba(45,212,191,0.12); border: 1px solid rgba(45,212,191,0.4); color: #5eead4; }

/* ---------- Paginasi ---------- */
.pager { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  margin: 20px 0 8px; padding: 14px 16px; border-radius: 16px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); }
.pager__info { font-size: 13px; color: var(--text-muted); }
.pager__nav { display: flex; align-items: center; gap: 10px; }
.pager__now { font-size: 13px; color: var(--text-muted); }
.pager__btn { padding: 8px 14px; border-radius: 10px; font-size: 13px; text-decoration: none; color: var(--text);
  background: var(--glass-bg-strong); border: 1px solid var(--glass-border); }
.pager__btn:hover { background: rgba(255,255,255,0.16); }
.pager__btn.is-off { opacity: 0.35; cursor: default; }

/* ---------- Textarea di dalam .input-glass ----------
   .input-glass dirancang untuk input satu baris (flex, rata tengah) dan tidak
   punya aturan untuk <textarea>, sehingga textarea tampil mentah & tidak penuh.
   Aturan ini merapikannya di semua form (Smart Assistant, komplain, ajukan PIN). */
.input-glass textarea {
  flex: 1;
  width: 100%;
  min-width: 0;
  padding: 12px 0;
  background: transparent;
  border: 0;
  outline: 0;
  resize: vertical;
  color: var(--text);
  font-size: 15px;
  line-height: 1.65;
  font-family: inherit;
}
.input-glass textarea::placeholder { color: var(--text-dim); }
/* Bila isinya textarea, kotaknya meregang penuh (bukan rata tengah). */
.input-glass:has(textarea) { align-items: stretch; }

/* ---------- Rekening tujuan penarikan (panel admin) ---------- */
.rek-bank { font-weight: 600; color: var(--text); }
.rek-no   { font-family: ui-monospace, monospace; letter-spacing: .04em; color: var(--text); }
.rek-atas { font-size: 12px; color: var(--text-muted); }
.lengkapi-rek { display: block; text-decoration: none; margin-bottom: 16px; }
.lengkapi-rek:hover { filter: brightness(1.1); }

/* ---------- Laporan komisi admin (riwayat bulanan) ---------- */
.komisi-list { list-style: none; display: grid; gap: 10px; }
.komisi-bar {
  display: block; padding: 12px 14px; border-radius: 14px; text-decoration: none;
  background: var(--glass-bg); border: 1px solid var(--glass-border);
  transition: background .2s ease, border-color .2s ease;
}
.komisi-bar:hover { background: var(--glass-bg-strong); }
.komisi-bar.is-active { border-color: rgba(56,189,248,0.55); background: rgba(56,189,248,0.10); }
.komisi-bar__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.komisi-bar__bulan { font-size: 14px; font-weight: 600; color: var(--text); }
.komisi-bar__nilai { font-size: 14px; color: var(--text); font-variant-numeric: tabular-nums; }
.komisi-bar__track { margin: 8px 0 6px; height: 7px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.komisi-bar__fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #38bdf8, #60a5fa); }
.komisi-bar__meta { font-size: 12px; color: var(--text-muted); }

/* Baris rekonsiliasi yang bisa diklik */
.reqlist__item--link { padding: 0; }
.reqlist__link { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 12px 0; text-decoration: none; }
.reqlist__link:hover .reqlist__amt { color: #7dd3fc; }

/* ---------- Audit log ---------- */
.audit-detail { max-width: 340px; font-size: 12px; color: var(--text-muted);
  word-break: break-word; font-family: ui-monospace, monospace; }

/* ---------- Gerbang KYC di halaman penarikan ---------- */
.kyc-gate { display: block; text-decoration: none; margin-bottom: 16px; }
a.kyc-gate:hover { filter: brightness(1.1); }

/* ---------- Moderasi & laporan ---------- */
.mod-list { display: grid; gap: 14px; }
.mod-item { display: flex; gap: 16px; padding: 16px; }
.mod-item--flat { display: block; }
.mod-item__media { flex: none; width: 92px; height: 92px; border-radius: 14px; overflow: hidden;
  display: grid; place-items: center; background: var(--glass-bg); border: 1px solid var(--glass-border); }
.mod-item__media img { width: 100%; height: 100%; object-fit: cover; }
.mod-item__body { flex: 1; min-width: 0; }
.mod-item__desc { margin-top: 8px; font-size: 13px; color: var(--text-muted); line-height: 1.5;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mod-item__act { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 12px; }
.mod-item__tolak { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 10px; }
.mod-item__tolak .input-glass { flex: 1; min-width: 200px; }
.lapor-alasan { margin-top: 10px; font-weight: 600; color: #fcd34d; }

/* Tombol laporkan di halaman produk */
.lapor-wrap { margin-top: 16px; }
.lapor-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: 10px;
  font-size: 13px; color: var(--text-muted); cursor: pointer;
  background: transparent; border: 1px solid var(--glass-border); }
.lapor-btn:hover { color: #fca5a5; border-color: rgba(248,113,113,0.45); }
.lapor-form { margin-top: 12px; padding: 14px; border-radius: 14px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); }

/* ---------- Toko penjual ---------- */
.toko-head { display: flex; gap: 18px; align-items: center; padding: 20px; }
.toko-avatar { flex: none; width: 72px; height: 72px; border-radius: 20px; display: grid; place-items: center;
  font-size: 22px; font-weight: 700; color: #0f172a;
  background: linear-gradient(135deg, hsl(calc(var(--seed) * 47 % 360) 80% 72%), hsl(calc(var(--seed) * 91 % 360) 80% 60%)); }
.toko-head__body { flex: 1; min-width: 0; }
.toko-name { margin: 0 0 4px; font-size: 20px; font-weight: 700; }
.toko-meta { margin: 0 0 12px; font-size: 12px; color: var(--text-muted); }
.toko-stats { display: flex; gap: 22px; }
.toko-stat { display: flex; flex-direction: column; }
.toko-stat__num { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.toko-stat__lbl { font-size: 11px; color: var(--text-muted); }
.seller-link { color: inherit; text-decoration: none; border-bottom: 1px dashed var(--glass-border); }
.seller-link:hover { color: #7dd3fc; border-bottom-color: #7dd3fc; }
.dshop__sort { display: flex; gap: 8px; }

/* ---------- Wishlist ---------- */
.wish-form { margin: 12px 0 0; }
.wish-btn { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px;
  border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer;
  color: var(--text-muted); background: transparent; border: 1px solid var(--glass-border);
  transition: color .18s ease, border-color .18s ease, transform .18s ease; }
.wish-btn:hover { color: #fda4af; border-color: rgba(251,113,133,.5); }
.wish-btn:active { transform: scale(.97); }
.wish-btn.is-on { color: #fb7185; border-color: rgba(251,113,133,.6); background: rgba(251,113,133,.1); }
.wish-cell { display: flex; flex-direction: column; gap: 8px; }
.wish-remove { margin: 0; text-align: center; }
.product-card--wish { display: flex; flex-direction: column; padding-bottom: 10px; }
.product-card__link { display: block; color: inherit; text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  .wish-btn { transition: none; }
}

/* ---------- Jenis member, rekening terkunci & kode verifikasi ---------- */
.mbadge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; text-decoration: none;
  background: var(--glass-bg); border: 1px solid var(--glass-border); color: var(--text-muted); }
a.mbadge:hover { border-color: rgba(125,211,252,0.5); color: var(--text); }
.mbadge--verified { background: rgba(45,212,191,0.18); border-color: rgba(45,212,191,0.45); color: #5eead4; }
.mbadge--xs { padding: 2px 7px; font-size: 10px; margin-left: 4px; }
.mbadge__ic { flex: none; }

/* Kotak data rekening / alamat (baca-saja) */
.rek-box { padding: 14px 16px; border-radius: 16px; background: var(--glass-bg);
  border: 1px solid var(--glass-border); }
.rek-box__bank { margin: 0; font-size: 15px; font-weight: 700; color: var(--text); }
.rek-box__no { margin: 4px 0 0; font-size: 20px; font-weight: 700; letter-spacing: 1px;
  font-variant-numeric: tabular-nums; color: var(--text); }
.rek-box__an { margin: 4px 0 0; font-size: 13px; color: var(--text-muted); }

/* Ringkasan lama → baru di panel admin */
.bankdiff { display: flex; align-items: center; gap: 14px; margin-top: 12px; flex-wrap: wrap; }
.bankdiff__col { flex: 1; min-width: 180px; padding: 12px 14px; border-radius: 14px;
  background: var(--glass-bg); border: 1px solid var(--glass-border); }
.bankdiff__col--new { border-color: rgba(45,212,191,0.45); }
.bankdiff__lbl { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
  color: var(--text-muted); }
.bankdiff__arrow { font-size: 20px; color: var(--text-muted); }

/* Kode verifikasi yang harus dicetak & dikirim admin lewat pos */
.kodebox { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; padding: 12px 16px;
  border-radius: 14px; background: rgba(125,211,252,0.1); border: 1px dashed rgba(125,211,252,0.5); }
.kodebox__lbl { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); }
.kodebox__val { font-size: 26px; font-weight: 800; letter-spacing: 5px; color: #7dd3fc;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; }
.kodebox__meta { font-size: 12px; color: var(--text-muted); }

/* Info penjual di halaman produk */
.sellerbox { margin: 16px 0; padding: 14px 16px; border-radius: 16px; background: var(--glass-bg);
  border: 1px solid var(--glass-border); }
.sellerbox__top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sellerbox__id { flex: 1; min-width: 140px; }
.sellerbox__name { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.sellerbox__note { margin: 12px 0 0; font-size: 12px; line-height: 1.6; color: var(--text-muted); }
.toko-note { margin: 0 0 12px; font-size: 12px; line-height: 1.6; color: var(--text-muted); }

/* Langkah-langkah upgrade + panel yang bisa dibuka-tutup */
.steps { margin: 0; padding-left: 20px; display: grid; gap: 8px; font-size: 13px; line-height: 1.6;
  color: var(--text-muted); }
.steps strong { color: var(--text); }
.ajuan-toggle > summary { list-style: none; cursor: pointer; }
.ajuan-toggle > summary::-webkit-details-marker { display: none; }
.alert-link { color: inherit; font-weight: 700; text-decoration: underline; white-space: nowrap; }
.alert--info { background: rgba(125,211,252,0.12); border: 1px solid rgba(125,211,252,0.4); color: #bae6fd; }
:root[data-theme="light"] .alert--info { color: #075985; }
.pill--4 { background: rgba(148,163,184,0.2); color: #cbd5e1; }

/* ---------- Halaman 404 kustom (#6) ---------- */
.notfound { display: flex; align-items: center; justify-content: center; min-height: 60vh; padding: 40px 16px; }
.notfound__card { max-width: 560px; width: 100%; text-align: center; padding: 40px 32px; border-radius: 24px; }
.notfound__code { font-size: clamp(72px, 16vw, 132px); font-weight: 900; line-height: 1;
  background: linear-gradient(135deg, #60a5fa, #93c5fd, #3b82f6); -webkit-background-clip: text;
  background-clip: text; -webkit-text-fill-color: transparent; letter-spacing: -0.04em; }
.notfound__emoji { font-size: 40px; margin: 4px 0 8px; }
.notfound__title { font-size: clamp(20px, 4vw, 28px); font-weight: 800; margin: 4px 0 10px; }
.notfound__desc { color: var(--muted, #94a3b8); font-size: 15px; line-height: 1.6; margin: 0 auto 24px; max-width: 42ch; }
.notfound__actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-bottom: 22px; }
.notfound__search { display: flex; align-items: center; gap: 8px; max-width: 380px; margin: 0 auto;
  padding: 8px 8px 8px 14px; border-radius: 14px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); }
.notfound__search svg { color: var(--muted, #94a3b8); flex: none; }
.notfound__search input { flex: 1; background: transparent; border: 0; color: inherit; font-size: 14px; outline: none; }
.notfound__search button { flex: none; padding: 8px 16px; border: 0; border-radius: 10px; cursor: pointer;
  font-weight: 700; font-size: 13px; color: #fff; background: linear-gradient(135deg, #2563eb, #3b82f6); }
:root[data-theme="light"] .notfound__search { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }

/* ---------- Pagination numerik generik (#1) ---------- */
.pagernum { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap;
  gap: 12px; margin-top: 16px; }
.pagernum__info { font-size: 12.5px; color: var(--muted, #94a3b8); }
.pagernum__nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pagernum__btn { min-width: 34px; height: 34px; padding: 0 10px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 9px; font-size: 13.5px; font-weight: 600; text-decoration: none;
  color: inherit; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); transition: .15s; }
.pagernum__btn:hover { background: rgba(255,255,255,0.12); }
.pagernum__btn.is-now { background: linear-gradient(135deg, #2563eb, #3b82f6); border-color: transparent; color: #fff; }
.pagernum__btn.is-off { opacity: .4; pointer-events: none; }
.pagernum__gap { padding: 0 4px; color: var(--muted, #94a3b8); }
:root[data-theme="light"] .pagernum__btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }

/* ---------- Video YouTube produk (#4) ---------- */
.product-video { margin-top: 14px; }
.product-video__title { font-size: 14px; font-weight: 700; margin: 0 0 8px; opacity: .9; }
.product-video__frame { position: relative; width: 100%; padding-top: 56.25%; border-radius: 14px;
  overflow: hidden; background: #000; border: 1px solid rgba(255,255,255,0.1); }
.product-video__frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Konfirmasi top-up manual (#10) ---------- */
.topup-instruksi { margin: 4px 0 18px; }
.topup-instruksi__lead { font-size: 14px; margin: 0 0 12px; }
.bank-card--dest { border: 1px solid rgba(167,139,250,0.4); background: rgba(37, 99, 235,0.1); }

/* ---------- Lonceng notifikasi request admin (#2) ---------- */
.adminbar__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.adminbar__badge { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px;
  padding: 0 5px; margin-left: auto; border-radius: 9px; font-size: 11px; font-weight: 800; line-height: 1;
  color: #fff; background: #ef4444; }
.admin-bell { position: relative; }
.admin-bell__btn { position: relative; display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: 11px; cursor: pointer; list-style: none;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); color: inherit; }
.admin-bell__btn::-webkit-details-marker { display: none; }
.admin-bell__btn:hover { background: rgba(255,255,255,0.12); }
.admin-bell__badge { position: absolute; top: -5px; right: -5px; min-width: 18px; height: 18px; padding: 0 5px;
  display: inline-flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 10.5px;
  font-weight: 800; color: #fff; background: #ef4444; border: 2px solid var(--surface, #1e1b2e); }
/* Dropdown lonceng: overlay OPAK (bukan glass transparan) supaya konten di
   belakang tidak menembus & bertabrakan dengan teks. Blur hanya sentuhan. */
.admin-bell__menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60;
  width: 320px; max-width: calc(100vw - 24px); max-height: min(72vh, 560px); overflow-y: auto;
  padding: 8px; border-radius: 16px;
  background: var(--popover-bg); border: 1px solid var(--popover-border);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: var(--popover-shadow); color: var(--text); }
/* Lonceng di SIDEBAR (kiri layar, desktop): buka ke KANAN agar tidak keluar
   tepi kiri layar & terpotong. Lonceng di topbar (mobile, kanan atas) tetap
   buka ke kiri (right:0 default). */
.adminbar__head .admin-bell__menu { left: 0; right: auto; }
.admin-bell[open] .admin-bell__menu { animation: bellIn .16s var(--ease, ease); }
@keyframes bellIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.admin-bell__title { font-size: 11px; font-weight: 800; color: var(--text-muted);
  margin: 6px 10px 6px; text-transform: uppercase; letter-spacing: .06em; }
.admin-bell__item { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 12px; border-radius: 10px; text-decoration: none; color: var(--text); font-size: 13.5px; }
.admin-bell__item > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.admin-bell__item:hover { background: rgba(37, 99, 235,0.14); }
.admin-bell__count { flex: none; min-width: 22px; height: 20px; padding: 0 7px; display: inline-flex;
  align-items: center; justify-content: center; border-radius: 10px; font-size: 11.5px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, #2563eb, #3b82f6); font-variant-numeric: tabular-nums; }
.admin-bell__empty { text-align: center; padding: 18px 8px; font-size: 13px; color: var(--text-muted); }
.admin-bell__title--sep { margin-top: 6px; }
/* Item aktivitas: judul panjang MEMBUNGKUS (tidak terpotong), waktu di bawah. */
.admin-bell__item--act { flex-direction: column; align-items: stretch; gap: 4px; }
.admin-bell__actxt { display: block; font-size: 13px; line-height: 1.4; overflow-wrap: anywhere; }
.admin-bell__acttime { font-size: 11px; color: var(--text-dim); }
.admin-bell__acthead { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-top: 6px; padding: 6px 10px 2px; border-top: 1px solid var(--popover-border); }
.admin-bell__markread { background: none; border: 0; color: #93c5fd; font-size: 11.5px; font-weight: 700;
  cursor: pointer; padding: 3px 6px; border-radius: 6px; white-space: nowrap; flex: none; }
.admin-bell__markread:hover { background: rgba(37, 99, 235,0.18); color: #fff; }
.admin-bell__item--act.is-unread { background: rgba(37, 99, 235,0.12); }
.admin-bell__item--act.is-unread .admin-bell__actxt { padding-left: 14px; position: relative; }
.admin-bell__item--act.is-unread .admin-bell__actxt::before { content: ""; position: absolute; left: 0; top: .5em;
  width: 6px; height: 6px; border-radius: 50%; background: #3b82f6; }
:root[data-theme="light"] .admin-bell__markread { color: #2563eb; }

/* ---------- Hak akses admin / RBAC (#8) ---------- */
.akses-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; margin-top: 12px; }
/* Baris pengaturan on/off: keterangan di kiri, toggle switch bertema di kanan. */
.akses-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--glass-border); background: rgba(255,255,255,0.03); cursor: pointer;
  transition: border-color .15s var(--ease), background .15s var(--ease); }
.akses-item:hover { border-color: rgba(37, 99, 235,0.5); background: rgba(37, 99, 235,0.07); }
.akses-item:has(input:checked) { border-color: rgba(37, 99, 235,0.55); background: rgba(37, 99, 235,0.11); }
.akses-item__body { order: 1; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.akses-item__body strong { font-size: 13.5px; }
.akses-item__body small { font-size: 11.5px; color: var(--text-muted); line-height: 1.35; }
/* Toggle switch: track + knob, appearance none agar bisa ditema penuh. */
.akses-item input { order: 2; flex: none; appearance: none; -webkit-appearance: none; margin: 0;
  position: relative; width: 42px; height: 24px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,0.16); border: 1px solid var(--glass-border);
  transition: background .2s var(--ease), border-color .2s var(--ease); }
.akses-item input::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px;
  border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.35);
  transition: transform .2s var(--ease); }
.akses-item input:checked { background: linear-gradient(135deg, #2563eb, #3b82f6); border-color: transparent; }
.akses-item input:checked::before { transform: translateX(18px); }
.akses-item input:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(37, 99, 235,.35); }
.akses-item input:disabled { opacity: .5; cursor: not-allowed; }
.akses-item:has(input:disabled) { cursor: not-allowed; }
.akses-form select.input-glass { padding: 10px 12px; max-width: 340px; }
:root[data-theme="light"] .akses-item { border-color: rgba(30,27,58,0.12); background: rgba(30,27,58,0.02); }
:root[data-theme="light"] .akses-item input { background: rgba(30,27,58,0.15); border-color: rgba(30,27,58,0.12); }
:root[data-theme="light"] .akses-item:has(input:checked) { background: rgba(37, 99, 235,0.09); }

/* ---------- Kelola Peran (RBAC #8) — kartu peran mengikuti template glass ---------- */
.role-card { border: 1px solid var(--glass-border); background: rgba(255,255,255,0.04);
  border-radius: var(--radius-sm); padding: 16px; margin-bottom: 14px; }
.role-card__head { display: flex; align-items: flex-start; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
/* Nama peran: input yang tampak seperti judul yang bisa diedit (bukan kotak tempelan). */
.role-card__label { background: transparent; border: 1px solid transparent; border-radius: 10px;
  padding: 6px 10px; margin-left: -10px; font-family: inherit; font-size: 17px; font-weight: 700;
  color: var(--text); letter-spacing: -.01em; width: auto; max-width: 100%; transition: border-color .2s var(--ease), background .2s var(--ease); }
.role-card__label:hover:not([readonly]) { background: rgba(255,255,255,0.05); }
.role-card__label:focus { outline: none; border-color: var(--gold); background: var(--glass-bg);
  box-shadow: 0 0 0 3px rgba(37, 99, 235,0.22); }
.role-card__label[readonly] { cursor: default; } /* peran bawaan: baca-saja, tampil sebagai judul */
.role-card__meta { display: block; margin: 2px 0 0 0; font-size: 12px; color: var(--text-muted);
  text-transform: uppercase; letter-spacing: .04em; }
.role-card__actions { display: flex; gap: 8px; flex: none; }
:root[data-theme="light"] .role-card { border-color: rgba(30,27,58,0.12); background: rgba(255,255,255,0.35); }
:root[data-theme="light"] .role-card__label:hover:not([readonly]) { background: rgba(30,27,58,0.05); }
:root[data-theme="light"] .admin-bell__btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }
:root[data-theme="light"] .admin-bell__badge { border-color: #fff; }

/* ---------- Chat attachment (#3) ---------- */
.chat-attach-btn { flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 12px; cursor: pointer; color: var(--muted, #94a3b8);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); transition: .15s; }
.chat-attach-btn:hover { background: rgba(255,255,255,0.12); color: inherit; }
.chat-attach-hint { margin-top: 6px; }
.chat-attach-img { display: block; margin: 4px 0; }
.chat-attach-img img { max-width: 220px; max-height: 220px; border-radius: 10px; display: block; }
.chat-attach-file { display: inline-flex; align-items: center; gap: 6px; margin: 4px 0; padding: 7px 11px;
  border-radius: 9px; background: rgba(255,255,255,0.08); text-decoration: none; color: inherit; font-size: 13px; }
.chat-attach-file:hover { background: rgba(255,255,255,0.14); }
:root[data-theme="light"] .chat-attach-btn { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.1); }

/* ---------- Follow toko (#8) ---------- */
.toko-follow-form { margin-top: 16px; }
.btn--follow { min-width: 160px; }

/* ---------- Hapus akun (#9) ---------- */
.btn--danger-ghost { background: transparent; border: 1px solid rgba(248,113,113,0.5); color: #fca5a5; }
.btn--danger-ghost:hover { background: rgba(248,113,113,0.12); }
.danger-zone { margin-top: 16px; border: 1px solid rgba(248,113,113,0.28); }
.hapus-tos ul { margin: 10px 0 0; padding-left: 20px; }
.hapus-tos li { margin-bottom: 6px; line-height: 1.5; }
.alert--warning { background: rgba(59, 130, 246,0.1); border: 1px solid rgba(59, 130, 246,0.38); color: #fcd34d; }
:root[data-theme="light"] .alert--warning { color: #92400e; }
.check-line { display: flex; align-items: flex-start; gap: 10px; margin: 14px 0; font-size: 13.5px; line-height: 1.5; cursor: pointer; }
.check-line input { margin-top: 3px; flex: none; }

/* ---------- Produk Pilihan / premium listing (#5) ---------- */
.pill-featured { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 8px; font-size: 11px;
  font-weight: 800; color: #0b1a33; background: linear-gradient(135deg, #60a5fa, #3b82f6); vertical-align: middle; }
/* Dikecilkan 50% memakai transform: scale() — BUKAN font-size mungil. Browser
   punya setelan "minimum font size" yang diam-diam menaikkan teks < ~6px, jadi
   font-size 4.5px bisa dirender sama besar dengan 9px. transform tidak kena
   batas itu dan mengecilkan seluruh badge (teks, padding, sudut) secara nyata. */
.featured-badge { position: absolute; top: 6px; left: 6px; padding: 1.5px 6px; border-radius: 6px; font-size: 9px;
  line-height: 1.3; font-weight: 800; letter-spacing: .01em; color: #0b1a33;
  background: linear-gradient(135deg, #bfdbfe, #3b82f6); box-shadow: 0 1px 4px rgba(0,0,0,.18);
  transform: scale(.5); transform-origin: top left; }
.btn--featured { background: linear-gradient(135deg, #60a5fa, #3b82f6); border: 0; color: #0b1a33; font-weight: 700; }
.btn--featured:hover { filter: brightness(1.05); }
.feat-active { color: #34d399; }
.feat-expired { color: #fca5a5; }
.reqlist__item--stack { flex-direction: column; align-items: stretch; gap: 8px; }
.reqlist__row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.feat-cta > summary { list-style: none; cursor: pointer; display: inline-flex; }
.feat-cta > summary::-webkit-details-marker { display: none; }
.feat-form { margin-top: 10px; padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.04); }
.feat-form__row { display: flex; gap: 8px; margin-top: 8px; }
.feat-form__row .input-glass { flex: 1; }
.pp-lead { color: var(--muted, #94a3b8); margin: 4px 0 18px; }
.pp-more { display: flex; justify-content: center; margin: 22px 0; min-height: 20px; }

/* ---------- Chat antar user (#7) ---------- */
.chat-seller-btn { display: inline-flex; align-items: center; gap: 8px; margin: 6px 0 14px; }
.convo-list { display: flex; flex-direction: column; gap: 4px; margin-top: 12px; }
.convo-item { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px;
  text-decoration: none; color: inherit; transition: .15s; }
.convo-item:hover { background: rgba(255,255,255,0.06); }
.convo-avatar { flex: none; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, #2563eb, #3b82f6); }
.convo-body { flex: 1; min-width: 0; }
.convo-name { font-weight: 700; margin: 0; }
.convo-last { margin: 2px 0 0; font-size: 13px; color: var(--muted, #94a3b8); overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }
.convo-side { flex: none; text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.convo-time { font-size: 11.5px; color: var(--muted, #94a3b8); }
.convo-unread { min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center;
  justify-content: center; border-radius: 10px; font-size: 11.5px; font-weight: 800; color: #fff; background: #ef4444; }
.td-truncate { max-width: 280px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Foto profil / avatar upload ---------- */
.uavatar--img { padding: 0; overflow: hidden; background: rgba(255,255,255,0.06); }
.uavatar--img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-avatar-wrap { position: relative; flex: none; width: max-content; }
.avatar-upload { position: absolute; right: -4px; bottom: -4px; margin: 0; }
.avatar-cam { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px;
  border-radius: 50%; cursor: pointer; color: #fff; background: linear-gradient(135deg, #2563eb, #3b82f6);
  border: 2px solid var(--surface, #1e1b2e); box-shadow: 0 2px 8px rgba(0,0,0,.3); }
.avatar-cam:hover { filter: brightness(1.08); }
.link-danger { background: none; border: 0; padding: 0; cursor: pointer; color: #fca5a5;
  font-size: 12.5px; text-decoration: underline; font: inherit; }
.link-danger:hover { color: #f87171; }

/* ---------- Buku alamat + peta pin-point ---------- */
.addr-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.addr-card { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); }
.addr-card--primary { border-color: rgba(167,139,250,0.5); background: rgba(37, 99, 235,0.08); }
.addr-card__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.addr-card__label { font-weight: 700; }
.addr-badge { margin-left: 6px; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 800;
  color: #fff; background: linear-gradient(135deg, #2563eb, #3b82f6); }
.addr-pin { margin-left: 4px; }
.addr-card__name { font-size: 14px; margin: 2px 0; }
.addr-card__detail { font-size: 13.5px; color: var(--text); margin: 2px 0; }
.addr-card__wil, .addr-card__patokan { font-size: 12.5px; color: var(--muted, #94a3b8); margin: 2px 0; }
.addr-card__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.map-search { display: flex; gap: 8px; margin: 8px 0 10px; }
.map-search .input-glass { flex: 1; }
.addr-map { width: 100%; height: 300px; border-radius: 14px; overflow: hidden;
  border: 1px solid rgba(255,255,255,0.15); z-index: 0; }
.addr-map .leaflet-container { font: inherit; }
/* Kontrol Leaflet agar kontras di tema gelap */
.leaflet-bar a { color: #222 !important; }

/* ---------- Pemilih alamat (checkout/beli) ---------- */
.addrpick__list { display: flex; flex-direction: column; gap: 8px; margin: 6px 0; }
.addrpick__opt { display: flex; gap: 10px; padding: 10px 12px; border-radius: 12px; cursor: pointer;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); }
.addrpick__opt:hover { background: rgba(255,255,255,0.07); }
.addrpick__opt input { margin-top: 3px; flex: none; }
.addrpick__opt.is-primary { border-color: rgba(167,139,250,0.4); }
.addrpick__body { min-width: 0; }
.addrpick__label { font-weight: 700; font-size: 13.5px; margin: 0; }
.addrpick__name { font-size: 13px; margin: 2px 0 0; }
.addrpick__detail { font-size: 12.5px; color: var(--muted, #94a3b8); margin: 2px 0 0; }
.addrpick__opt--manual { border-style: dashed; }
.addrpick__manual { margin-top: 8px; }

/* ---------- Filter belanja + rekomendasi ---------- */
.shop-filter .field { margin-bottom: 12px; }
.filter-price { display: flex; align-items: center; gap: 8px; }
.filter-price .input-glass { flex: 1; }
.filter-price span { color: var(--muted, #94a3b8); }
.prodrec { margin-top: 28px; }
.prodrec__title { font-size: 17px; font-weight: 800; margin: 0 0 14px; padding-left: 12px; position: relative; }
.prodrec__title::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 4px; height: 18px; border-radius: 3px; background: linear-gradient(180deg, #60a5fa, #2563eb); }

/* ---------- Spesifikasi + Tanya Penjual (Q&A) ---------- */
.spec-box { margin-bottom: 22px; }
.spec-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.spec-table th, .spec-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid rgba(255,255,255,0.08); vertical-align: top; }
.spec-table th { width: 38%; color: var(--muted, #94a3b8); font-weight: 600; }
.spec-table td.spec-free { white-space: pre-wrap; } /* baris teks bebas (tanpa "Label: Nilai") */
.qna { margin-top: 8px; }
.qna-ask, .qna-answer { display: flex; gap: 8px; margin-bottom: 14px; }
.qna-ask .input-glass, .qna-answer .input-glass { flex: 1; }
.qna-list { display: flex; flex-direction: column; gap: 14px; }
.qna-item { padding: 12px; border-radius: 12px; background: rgba(255,255,255,0.04); }
.qna-q { margin: 0 0 6px; font-size: 14px; }
.qna-a { margin: 6px 0 0; font-size: 13.5px; color: var(--text); }
.qna-a--wait { color: var(--muted, #94a3b8); font-style: italic; }
.qna-meta { font-size: 11.5px; color: var(--muted, #94a3b8); font-weight: 400; }
.qna-badge { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border-radius: 5px; font-size: 11px; font-weight: 800; color: #fff; background: #3b82f6; margin-right: 4px; }
.qna-badge--a { background: #10b981; }
.qna-answer { margin-top: 8px; }

/* ---------- Timeline status pesanan ---------- */
.order-track { margin: 4px 0 10px; }
.order-track > summary { cursor: pointer; font-size: 13px; color: #60a5fa; list-style: none; padding: 4px 0; }
.order-track > summary::-webkit-details-marker { display: none; }
.order-track > summary::before { content: "▸ "; }
.order-track[open] > summary::before { content: "▾ "; }
.otl { list-style: none; margin: 10px 0 4px; padding: 0 0 0 6px; }
.otl__step { position: relative; padding: 0 0 16px 24px; }
.otl__step::before { content: ""; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px;
  background: rgba(255,255,255,0.12); }
.otl__step:last-child::before { display: none; }
.otl__dot { position: absolute; left: 0; top: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: rgba(255,255,255,0.15); border: 2px solid rgba(255,255,255,0.25); }
.otl__step.is-done .otl__dot { background: #10b981; border-color: #10b981; }
.otl__step.is-now .otl__dot { box-shadow: 0 0 0 4px rgba(16,185,129,0.25); }
.otl__step.is-bad .otl__dot { background: #ef4444; border-color: #ef4444; }
.otl__step.is-bad.is-now .otl__dot { box-shadow: 0 0 0 4px rgba(239,68,68,0.25); }
.otl__label { font-size: 13.5px; font-weight: 700; margin: 0; opacity: .55; }
.otl__step.is-done .otl__label, .otl__step.is-now .otl__label { opacity: 1; }
.otl__desc { font-size: 12px; color: var(--muted, #94a3b8); margin: 1px 0 0; }
.otl__time { font-size: 11.5px; color: var(--muted, #94a3b8); margin: 2px 0 0; }
.otl__resi { font-size: 12.5px; margin: 6px 0 0; padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,0.05); }

/* Pilih kurir toko (halaman profil penjual): chip centang. */
.kurir-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.kurir-chip { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  background: var(--field-fill); border: 1px solid var(--glass-border); cursor: pointer; font-size: 13px;
  color: var(--text); user-select: none; }
.kurir-chip input { accent-color: var(--gold); width: 16px; height: 16px; cursor: pointer; }
.kurir-chip:has(input:checked) { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 14%, var(--field-fill)); }

/* Halaman lacak paket — memakai ulang timeline .otl di atas. */
.lacak-status { font-size: 14px; margin: 14px 0 0; }
.lacak-note { font-size: 12px; color: var(--text-dim); margin: 14px 0 12px; line-height: 1.5; }
/* Tautan "Lacak" di kartu pesanan: dibuat sebagai chip agar target sentuhnya
   nyaman di ponsel, bukan tautan teks setipis rambut. */
.lacak-link { display: inline-block; margin-left: 6px; padding: 6px 10px; border-radius: 8px;
  font-size: 12px; font-weight: 700; text-decoration: none; color: var(--text);
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14); }
.lacak-link:hover { background: rgba(255,255,255,0.14); }

/* ---------- Dashboard analitik penjual ---------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-top: 12px; }
.stat-card { padding: 14px; border-radius: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.1); }
.stat-card__lbl { display: block; font-size: 12px; color: var(--muted, #94a3b8); }
.stat-card__num { display: block; font-size: 22px; font-weight: 900; margin: 4px 0 2px; letter-spacing: -0.02em; }
.stat-card__sub { display: block; font-size: 11.5px; color: var(--muted, #94a3b8); }
.chart-bars { display: flex; align-items: flex-end; gap: 6px; height: 160px; margin-top: 12px;
  padding: 10px; border-radius: 12px; background: rgba(255,255,255,0.03); overflow-x: auto; }
.chart-bar { flex: 1; min-width: 26px; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; }
.chart-bar__track { flex: 1; width: 100%; display: flex; align-items: flex-end; }
.chart-bar__fill { width: 100%; min-height: 2px; border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #60a5fa, #2563eb); transition: height .3s var(--ease, ease); }
.chart-bar__lbl { font-size: 9.5px; color: var(--muted, #94a3b8); white-space: nowrap; transform: rotate(-45deg); transform-origin: center; height: 20px; }

/* ---------- Varian produk ---------- */
.variant-rows { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.variant-row { display: flex; gap: 8px; align-items: center; }
.variant-row input { flex: 1; min-width: 0; padding: 9px 11px; border-radius: 10px; font: inherit; color: inherit;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12); outline: none; }
.variant-row .vr-name { flex: 2; }
.variant-row .vr-stock { flex: 0 0 80px; }
.vr-del { flex: none; width: 34px; height: 34px; border-radius: 9px; cursor: pointer; color: #fca5a5;
  background: rgba(248,113,113,0.12); border: 1px solid rgba(248,113,113,0.3); }
.variant-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-opt { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 10px;
  cursor: pointer; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.14); font-size: 13px; }
.variant-opt input { accent-color: #2563eb; }
.variant-opt:has(input:checked) { border-color: #60a5fa; background: rgba(37, 99, 235,0.14); }
.variant-opt.is-out { opacity: .5; }
.variant-opt__price { font-weight: 700; }
.variant-opt__stock { font-size: 11px; color: var(--muted, #94a3b8); }
.variant-opt__out { font-size: 11px; color: #fca5a5; }

/* ---------- Varian produk: editor (Tokopedia/Shopee style) ---------- */
.ve { border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 16px; margin: 8px 0 4px;
  background: rgba(255,255,255,0.03); }
.ve__head { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.ve__title { display: block; font-weight: 800; font-size: 15px; }
.ve__sub { display: block; font-size: 12px; color: var(--muted, #94a3b8); margin-top: 2px; }
.ve__body { margin-top: 16px; display: flex; flex-direction: column; gap: 16px; }
.ve__dims { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.ve-dim { display: flex; flex-direction: column; gap: 8px; }
.ve__note { font-size: 12px; color: var(--muted, #94a3b8); line-height: 1.5; margin: 0; }
.ve__empty { font-size: 13px; color: var(--muted, #94a3b8); text-align: center; padding: 18px 12px;
  border: 1px dashed rgba(255,255,255,0.15); border-radius: 12px; margin: 0; }

/* Toggle switch (khusus editor varian) */
.vswitch { position: relative; display: inline-flex; flex: none; cursor: pointer; }
.vswitch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.vswitch__track { width: 46px; height: 26px; border-radius: 13px; background: rgba(255,255,255,0.14);
  transition: background .2s var(--ease, ease); display: inline-flex; align-items: center; padding: 3px; }
.vswitch__thumb { width: 20px; height: 20px; border-radius: 50%; background: #fff;
  transition: transform .2s var(--ease, ease); box-shadow: 0 1px 3px rgba(0,0,0,.35); }
.vswitch input:checked + .vswitch__track { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.vswitch input:checked + .vswitch__track .vswitch__thumb { transform: translateX(20px); }
.vswitch input:focus-visible + .vswitch__track { box-shadow: 0 0 0 3px rgba(167,139,250,0.4); }

/* Chip input opsi varian */
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border-radius: 11px;
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12); }
.chips-input__list { display: contents; }
.chip-tag { display: inline-flex; align-items: center; gap: 5px; padding: 4px 6px 4px 11px; border-radius: 8px;
  font-size: 12.5px; font-weight: 600; color: #dbeafe; background: rgba(37, 99, 235,0.22);
  border: 1px solid rgba(167,139,250,0.4); }
.chip-tag button { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px;
  border: 0; border-radius: 5px; cursor: pointer; color: #93c5fd; background: rgba(255,255,255,0.06); transition: .15s; }
.chip-tag button:hover { background: rgba(239,68,68,0.3); color: #fff; }
.chips-input__field { flex: 1; min-width: 120px; background: transparent; border: 0; outline: none;
  color: inherit; font: inherit; font-size: 13px; padding: 4px 6px; }
.chips-input__field::placeholder { color: var(--muted, #94a3b8); }

/* Isi cepat (bulk apply) */
.ve__bulk { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 12px; border-radius: 12px;
  background: rgba(37, 99, 235,0.08); border: 1px solid rgba(167,139,250,0.25); }
.ve__bulk-lbl { font-size: 12.5px; font-weight: 700; align-self: center; }
.ve__bulk-in { display: flex; flex-direction: column; gap: 4px; }
.ve__bulk-in label { font-size: 11px; color: var(--muted, #94a3b8); }
.ve__bulk-in input { width: 110px; padding: 8px 10px; border-radius: 9px; font: inherit; color: inherit;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); outline: none; }

/* Penghitung opsi & kombinasi (batas ala Tokopedia) */
.ve-count { font-size: 11px; font-weight: 700; color: var(--text-dim); margin-left: 4px; }
.ve-count.is-full { color: #fca5a5; }
.ve-combos { font-size: 12px; color: var(--text-dim); margin: 8px 2px 0; }
.ve-combos.is-full { color: #fca5a5; font-weight: 600; }
.chips-input__field.is-limit { color: #fca5a5; }

/* Matriks kombinasi DIKELOMPOKKAN per Opt1 (ala Tokopedia) */
.ve__matrix { display: flex; flex-direction: column; gap: 10px; }
.ve-grp { border-radius: 12px; background: rgba(255,255,255,0.04); border: 1px solid var(--glass-border); overflow: hidden; }
.ve-grp__head { display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.08); }
.ve-grp--inline .ve-grp__head { border-bottom: 0; flex-wrap: wrap; }
.ve-grp__name { flex: 1; min-width: 80px; font-weight: 700; font-size: 14px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Slot foto (thumbnail kecil di header grup) */
.ve-foto { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: none; }
.ve-foto__preview { width: 52px; height: 52px; border-radius: 9px; overflow: hidden;
  background: rgba(255,255,255,0.06); display: grid; place-items: center; }
.ve-foto__preview img { width: 100%; height: 100%; object-fit: cover; }
.ve-foto__ph { font-size: 9px; color: var(--text-dim); text-align: center; line-height: 1.15; }
.ve-foto__pick { cursor: pointer; }
.ve-foto__pick input { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.ve-foto__pick span { font-size: 11px; font-weight: 600; color: var(--gold-soft);
  padding: 3px 9px; border-radius: 7px; background: rgba(37, 99, 235,0.14); border: 1px solid rgba(59,130,246,0.3); }
.ve-foto__pick:hover span { background: rgba(37, 99, 235,0.24); }

/* Baris kombinasi (dimensi 2) di dalam grup */
.vmx-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; }
.ve-grp > .vmx-row + .vmx-row { border-top: 1px solid rgba(255,255,255,0.06); }
.vmx-label { flex: 1; min-width: 60px; font-weight: 600; font-size: 13.5px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vmx-cell { display: flex; align-items: center; gap: 8px; }
.vmx-stok { width: 84px; padding: 8px 10px; border-radius: 8px; font: inherit; color: inherit;
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); outline: none; }
.vmx-harga.input-glass { width: 150px; padding: 0 10px; display: flex; align-items: center; gap: 4px; }
.vmx-harga input { border: 0; background: transparent; outline: none; color: inherit; font: inherit; width: 100%; padding: 8px 0; }
.vmx-stok:focus, .chips-input__field:focus, .ve__bulk-in input:focus { box-shadow: 0 0 0 2px rgba(167,139,250,0.35); }
@media (max-width: 520px) {
  .vmx-cell { flex: 1; }
  .vmx-stok { width: 72px; }
  .vmx-harga.input-glass { width: auto; flex: 1; }
}

/* ---------- Varian: pemilih di halaman produk (pembeli) ---------- */
.variant-pick { margin-bottom: 4px; display: flex; flex-direction: column; gap: 12px; }
.variant-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.variant-opt { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px;
  border-radius: 10px; cursor: pointer; font-size: 13.5px; font-weight: 600;
  background: rgba(255,255,255,0.05); border: 1.5px solid rgba(255,255,255,0.14); transition: .15s var(--ease, ease); }
.variant-opt:hover { border-color: rgba(167,139,250,0.5); }
.variant-opt input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.variant-opt:has(input:checked) { border-color: #60a5fa; background: rgba(37, 99, 235,0.18); color: #dbeafe; }
.variant-opt.is-out { opacity: .45; text-decoration: line-through; pointer-events: none; }
.variant-info { margin: 0; font-size: 13.5px; font-weight: 700; color: #60a5fa; min-height: 18px; }

/* ---------- Pembukuan bulanan (Admin → Pembukuan) ---------- */
.ta-r { text-align: right; }

.pb-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.pb-head__sub { margin: 6px 0 0; font-size: 13.5px; color: var(--text-muted); }
.pb-head__tools { display: flex; align-items: center; gap: 10px; margin: 0; }
.pb-head__tools .input-glass { margin: 0; }

.pb-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 16px 0; }
.pb-stat { padding: 18px 20px; }
.pb-stat__label { margin: 0 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em;
  text-transform: uppercase; color: var(--text-dim); }
.pb-stat__val { margin: 0; font-family: var(--font-head); font-size: 26px; font-weight: 700; line-height: 1.2; }
.pb-stat__val--in { color: #5eead4; }
.pb-stat__val--out { color: #fca5a5; }
.pb-stat__hint { margin: 8px 0 0; font-size: 12px; color: var(--text-dim); }
/* Angka bersih = kesimpulan laporan, jadi dibuat paling menonjol. */
.pb-stat--net { border-color: rgba(59,130,246,0.45); background: rgba(37,99,235,0.12); }
.pb-stat--net .pb-stat__val { color: #93c5fd; }
.pb-stat--net.is-loss { border-color: rgba(248,113,113,0.45); background: rgba(248,113,113,0.1); }
.pb-stat--net.is-loss .pb-stat__val { color: #fca5a5; }

.pb-total td { border-top: 1.5px solid var(--glass-border); background: rgba(255,255,255,0.04); }

.pb-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.pb-form__wide { grid-column: span 2; }
.pb-form__act { display: flex; align-items: flex-end; }
@media (max-width: 640px) {
  .pb-form { grid-template-columns: 1fr; }
  .pb-form__wide { grid-column: auto; }
}

.pb-bars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.pb-bar__top { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; margin-bottom: 6px; }
.pb-bar__track { height: 8px; border-radius: 999px; background: rgba(255,255,255,0.08); overflow: hidden; }
.pb-bar__fill { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #60a5fa); }
/* Nama penjual di label kurir checkout (ongkir per penjual) */
.dco-seller { font-weight: 600; color: var(--gold-soft); }

/* Aksesibilitas: fokus keyboard yang JELAS. :focus-visible hanya aktif saat
   navigasi keyboard (Tab), bukan klik mouse — jadi tampilan pengguna mouse tidak
   berubah, tetapi pengguna keyboard/screen-reader selalu melihat posisi fokus.
   Ditaruh paling akhir agar menang atas 'outline:none' yang tersebar di atas. */
a:focus-visible,
button:focus-visible,
select:focus-visible,
textarea:focus-visible,
input:focus-visible,
[tabindex]:focus-visible,
.gallery__thumb:focus-visible {
  outline: 2px solid var(--gold-soft, #d4af37);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ===== Bottom-nav mobile (Step A) =====
   Navigasi utama tetap di bawah untuk perangkat sentuh — pola "app" yang
   memberi akses 1-tap ke Home/Belanja/Keranjang/Akun. Hanya tampil ≤720px;
   di desktop navigasi ada di header. */
.dbnav { display: none; }
@media (max-width: 720px) {
  .dbnav {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
    background: var(--glass-bg-strong); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-top: 1px solid var(--glass-border);
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .dbnav__item {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; min-height: 56px; padding: 7px 4px;
    color: var(--text-muted); text-decoration: none;
    font-size: 11px; font-weight: 600; line-height: 1;
    -webkit-tap-highlight-color: transparent;
  }
  .dbnav__item svg { width: 23px; height: 23px; }
  .dbnav__item.is-active { color: var(--gold-soft); }
  .dbnav__item:active { transform: scale(0.94); }
  .dbnav__ic { position: relative; display: grid; place-items: center; }
  .dbnav__badge {
    position: absolute; top: -6px; right: -9px;
    min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px;
    background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
    display: grid; place-items: center;
  }
  /* Konten tak tertutup nav; tombol melayang naik di atas nav. */
  .dmain { padding-bottom: calc(64px + env(safe-area-inset-bottom, 0px)); }
  .theme-toggle { bottom: calc(72px + env(safe-area-inset-bottom, 0px)); }
  .support-fab { bottom: calc(128px + env(safe-area-inset-bottom, 0px)); }
  /* Header HP jadi bersih: hanya logo + "Puaz". Tombol Masuk/Daftar (tamu)
     sudah ada di bottom-nav; Keranjang/Akun juga; Keluar dipindah ke menu Akun. */
  .dheader__actions { display: none; }
  .dheader__inner { justify-content: flex-start; }
  /* Header lega → brand dibuat sedikit lebih besar agar menonjol & elegan. */
  .dheader .brand-mark { width: 40px; height: 40px; font-size: 22px; border-radius: 12px; }
  .dheader .brand-name { font-size: 21px; }
}

/* ===== Hero & jarak antar-seksi mobile (Step B) =====
   Hero desktop terlalu tinggi di HP (padding 66px) → produk terdorong jauh ke
   bawah. Rampingkan; chip kategori jadi satu baris yang bisa digeser, bukan
   menumpuk 3 baris. Input 16px agar iOS tidak auto-zoom. */
@media (max-width: 720px) {
  .dwrap { gap: 22px; }
  .dhero2 { padding: 30px 18px 26px; margin: 0 0 12px; }
  .dhero2__badge { font-size: 10px; padding: 4px 12px; }
  .dhero2__title { font-size: clamp(23px, 6.6vw, 31px); }
  .dhero2__sub { font-size: 14px; line-height: 1.55; margin: 12px auto 0; }
  .dhero2__search { margin-top: 20px; } /* jarak konsisten walau sub-teks kosong */
  .dhero2__search input { font-size: 16px; }
  .dhero2__search button { padding: 11px 18px; }
  .dhero2__chips {
    flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start;
    margin-top: 14px; padding: 2px 0 5px; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dhero2__chips::-webkit-scrollbar { display: none; }
  .dhero2__chip { flex: none; white-space: nowrap; }
}

/* ===== Pangkas homepage mobile (Step C) =====
   Kurangi "tembok" seksi di HP. Kartu kategori di bento DUPLIKAT dari chip hero
   & bottom-nav Kategori → disembunyikan; sisakan 2 kartu promo. Header & trust
   diringkas. Urutan DOM dipertahankan (baik untuk pembaca layar). */
@media (max-width: 720px) {
  .dsection__head { margin-bottom: 12px; }
  .dsection__head h2 { font-size: 18px; }
  .dtrust-item { padding: 11px 12px; gap: 10px; }
  .dtrust-ic { width: 36px; height: 36px; }
  .dbento { grid-template-columns: 1fr; grid-auto-rows: auto; gap: 12px; }
  .dbento__cat { display: none; }
  .dbento__hl, .dbento__flash { grid-column: 1 / -1; grid-row: auto; }
}

/* ===== Filter Belanja jadi panel toggle di HP (Step D) =====
   Desktop: sidebar tampil, tombol disembunyikan. HP: produk langsung terlihat;
   sidebar (kategori+filter) collapse di balik tombol "Filter & Kategori"
   (CSS-only checkbox-hack, tanpa JS). */
.dshop__filterbtn { display: none; }
@media (max-width: 720px) {
  .dshop { display: flex; flex-direction: column; }
  .dshop__filterbtn {
    order: 0; display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 12px; margin-bottom: 4px;
    background: var(--glass-bg); border: 1px solid var(--glass-border);
    border-radius: var(--radius-sm); color: var(--text);
    font-size: 14px; font-weight: 600; cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }
  .dshop__filterbtn:active { transform: scale(0.98); }
  .dshop__side { order: 1; display: none; margin-bottom: 6px; }
  .dshop__main { order: 2; }
  #dshopFilter:checked ~ .dshop .dshop__side { display: block; }
}

/* Ikon inline sejajar teks (pengganti emoji dekoratif ★/⚡ pada tag & heading). */
.ic-inline { width: 1em; height: 1em; vertical-align: -0.12em; margin-right: 5px; }

/* Tombol Keluar di menu Akun (dakunnav) — tampil seperti link menu, warna danger.
   Ada di menu Akun karena tombol Keluar header disembunyikan di HP. */
.dakun-logout { margin: 0; }
.dakun-logout .adminbar__link { width: 100%; background: none; border: none; cursor: pointer; font-family: inherit; text-align: left; }
.adminbar__link--danger { color: #f87171; }
.adminbar__link--danger:hover { background: rgba(239,68,68,0.12); color: #fca5a5; }

/* Sidebar admin: grup accordion (buka-tutup) agar tak kepanjangan ke bawah.
   Grup halaman yang sedang dibuka otomatis terbuka (atribut open dari template). */
.adminbar__grp { border: none; margin: 0; }
.adminbar__grp-head {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; border-radius: 8px; -webkit-tap-highlight-color: transparent;
}
.adminbar__grp-head::-webkit-details-marker { display: none; }
.adminbar__grp-head::marker { content: ""; }
.adminbar__grp-head .adminbar__group { margin: 10px 4px 6px 10px; }
.adminbar__grp-head:hover .adminbar__group { color: var(--text-muted); }
.adminbar__chev { color: var(--text-dim); transition: transform .2s var(--ease); flex: none; margin-right: 10px; }
.adminbar__grp[open] > .adminbar__grp-head .adminbar__chev { transform: rotate(180deg); }
.adminbar__grp-body { display: flex; flex-direction: column; gap: 2px; }

/* Halaman setting admin: header + kolom kartu terpisah (rapi & mudah dicari). */
.cfg-head { margin-bottom: 16px; }
.cfg-head__title { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.cfg-head__sub { color: var(--text-muted); font-size: 14px; margin-top: 4px; line-height: 1.5; }
.home-cfg-col, .cfg-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cfg-col--narrow { max-width: 780px; }
.cfg-card { padding: 22px; }
.cfg-card > .panel__title { margin-bottom: 14px; }
.cfg-card > .form-subtitle:first-of-type { margin-top: 4px; }

/* ============================================================
   PUAZ — Header gradient (indigo tua → biru) dengan teks putih.
   Selector .dheader.glass (0,2,0) menang atas .glass (0,1,0).
   ============================================================ */
.dheader.glass {
  background: var(--puaz-header);
  border-bottom: none;
  box-shadow: 0 2px 14px rgba(38, 33, 92, 0.18);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.dheader .brand-name,
.dheader .dnav__link,
.dheader .dheader__actions a,
.dheader .dheader__actions button { color: #fff; }
.dheader .dnav__link { opacity: 0.9; }
.dheader .dnav__link:hover,
.dheader .dnav__link.is-active { opacity: 1; color: #fff; }
.dheader .dheader__actions svg,
.dheader .dbrand svg { color: #fff; stroke: #fff; }
/* Brand-mark "P" di header → kotak kaca putih semi-transparan */
.dheader .brand-mark {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: #fff;
}
/* Panel kaca (search dll) di atas gradient header */
.dheader .input-glass {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.35);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}
.dheader .input-glass input { color: #fff; }
.dheader .input-glass input::placeholder { color: rgba(255, 255, 255, 0.78); }
.dheader .input-icon { color: rgba(255, 255, 255, 0.85); }
/* Theme toggle di header ikut putih */
.dheader .theme-toggle.glass { background: rgba(255, 255, 255, 0.16); border-color: rgba(255, 255, 255, 0.3); color: #fff; }
/* Tombol ghost (Masuk/Akun) & nav aktif di header gradient: transparan + teks putih */
.dheader .btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.42);
}
.dheader .btn--ghost:hover { background: rgba(255, 255, 255, 0.24); }
.dheader .dnav__link.is-active,
.dheader .dnav__link:hover { background: rgba(255, 255, 255, 0.16); color: #fff; }

/* ============================================================
   PUAZ — Poles visual (ikon kategori, depth/hover, trust band,
   ritme section, kartu produk). Semua dalam palet indigo/biru.
   ============================================================ */

/* --- Ikon kategori: badge tint indigo lembut + ikon indigo (ganti rainbow) --- */
.dcat__ic {
  width: 52px; height: 52px; border-radius: 16px;
  background: linear-gradient(150deg, rgba(38,33,92,0.08), rgba(55,138,221,0.10));
  color: var(--gold);
  border: 1px solid rgba(38,33,92,0.08);
}
.dcat__ic svg { width: 26px; height: 26px; }
.dcat__name { font-size: 13px; font-weight: 600; text-align: center; }
.dcat:hover .dcat__ic {
  background: linear-gradient(150deg, #26215C, #378ADD);
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(38,33,92,0.22);
}

/* --- Depth & hover: kartu terangkat halus --- */
.dcat, .dprod {
  border: 1px solid var(--glass-border);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), border-color .18s var(--ease);
}
.dcat:hover, .dprod:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 26px rgba(38,33,92,0.12);
  border-color: rgba(38,33,92,0.16);
}

/* --- Trust band --- */
.dtrust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 22px; }
.dtrust__item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm); padding: 16px 18px;
}
.dtrust__ic {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px;
  display: grid; place-items: center; color: var(--gold);
  background: linear-gradient(150deg, rgba(38,33,92,0.08), rgba(55,138,221,0.10));
}
.dtrust__ic svg { width: 24px; height: 24px; }
.dtrust__txt { display: flex; flex-direction: column; line-height: 1.35; }
.dtrust__txt strong { font-size: 14px; font-weight: 700; color: var(--text); }
.dtrust__txt span { font-size: 12px; color: var(--text-muted); }

/* --- Ritme antar-section + penanda aksen di judul --- */
.dsection { margin-top: 46px; }
.dsection__head h2 { position: relative; padding-left: 14px; }
.dsection__head h2::before {
  content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
  width: 5px; height: 22px; border-radius: 3px;
  background: linear-gradient(180deg, #26215C, #378ADD);
}
.dsection__more { color: var(--gold); }

/* Flash Sale: judul tetap gelap, kilat oranye hangat (konvensi flash) */
.dsection--flash .dsection__head h2 { color: var(--text); }
.dsection--flash .dsection__head h2::before { background: linear-gradient(180deg, #f59e0b, #f97316); }
.dsection--flash .ic-title { color: #f59e0b; }

/* Icon sizing */
.ic-title { width: 20px; height: 20px; vertical-align: -3px; }
.dhero__trust .ic-inline { width: 16px; height: 16px; vertical-align: -2px; color: var(--gold-soft); }

/* --- Kartu produk: harga indigo tebal, bintang amber --- */
.dprod__price { color: var(--gold); font-weight: 800; }
.dprod__old { color: var(--text-dim); font-weight: 500; }
.dprod__rating .star.is-on { color: #f59e0b; }

/* Seller CTA band: gradient tipis biar tak polos */
.dseller { background: linear-gradient(135deg, rgba(38,33,92,0.05), rgba(55,138,221,0.07)); }

/* Responsif trust band & kategori */
@media (max-width: 900px) {
  .dtrust { grid-template-columns: repeat(2, 1fr); }
  .dcat-grid { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 640px) {
  /* HP: sembunyikan trust band (Dana Ditahan/Penjual Terverifikasi/Pengiriman
     Cepat/Bayar Aman) dan chip trust di hero — di layar kecil hanya menambah
     panjang & mengurangi fokus. Hero jadi ringkas: judul → sub → tombol. */
  .dtrust { display: none; }
  .dhero__trust { display: none; }
  /* Hero lebih rapat & fokus di HP */
  .dhero-slide--custom { padding: 22px 20px; }
  .dhero__cta { margin-top: 18px; }
  .dhero__cta .btn { flex: 1; justify-content: center; }  /* tombol seimbang, tap target lebih besar */
  .dhero__text p { margin-bottom: 4px; }

  /* HP: "Kategori Populer" (beranda) jadi rail geser horizontal — hemat tinggi,
     1 sapuan jempol untuk lihat semua. Halaman /kategori tetap grid penuh. */
  .dcat-grid:not(.dcat-grid--page) {
    display: flex; overflow-x: auto; gap: 10px; padding-bottom: 6px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dcat-grid:not(.dcat-grid--page)::-webkit-scrollbar { display: none; }
  .dcat-grid:not(.dcat-grid--page) > .dcat {
    flex: 0 0 auto; width: 86px; scroll-snap-align: start;
  }
  .dcat-grid--page { grid-template-columns: repeat(3, 1fr); }

  /* HP: Flash Sale (bila muncul) jadi rail geser — kartu produk lebih besar &
     bisa digeser, alih-alih grid 2 kolom yang sempit. */
  .dsection--flash .dprod-grid {
    display: flex; overflow-x: auto; gap: 12px; padding-bottom: 6px;
    scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .dsection--flash .dprod-grid::-webkit-scrollbar { display: none; }
  .dsection--flash .dprod-grid > * {
    flex: 0 0 auto; width: 150px; scroll-snap-align: start;
  }
}

/* ============================================================
   PUAZ — Hero slide 1 (gradient menarik) + Footer gradient.
   Bookend halaman: header gradient (atas) ↔ footer gradient (bawah).
   ============================================================ */

/* --- Hero slide custom: gradient indigo→biru, teks putih --- */
.dhero-slide--custom.glass-card {
  background: linear-gradient(135deg, #26215C 0%, #33357f 48%, #378ADD 100%);
  border: none; color: #fff; position: relative;
}
.dhero-slide--custom.glass-card::before { display: none; }
.dhero-slide--custom::after {
  content: ""; position: absolute; right: -70px; top: -70px;
  width: 340px; height: 340px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.16), transparent 70%);
  pointer-events: none;
}
.dhero-slide--custom .dhero__text h1 { color: #fff; }
.dhero-slide--custom .dhero__text h1 span {
  background: linear-gradient(135deg, #a9c9ff, #ffffff);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.dhero-slide--custom .dhero__text p { color: rgba(255,255,255,0.86); }
.dhero-slide--custom .dhero__trust span { color: rgba(255,255,255,0.9); }
.dhero-slide--custom .dhero__trust .ic-inline { color: rgba(255,255,255,0.85); }
/* CTA di atas gradient: primary → putih solid, ghost → outline putih */
.dhero-slide--custom .btn--primary { background: #fff; color: var(--gold); box-shadow: 0 8px 22px rgba(2,6,23,0.22); }
.dhero-slide--custom .btn--primary:hover { box-shadow: 0 10px 28px rgba(2,6,23,0.30); transform: translateY(-1px); }
.dhero-slide--custom .btn--ghost { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.5); }
.dhero-slide--custom .btn--ghost:hover { background: rgba(255,255,255,0.24); }
/* Art: badge kaca putih di atas gradient */
.dhero-slide--custom .dhero__art { background: radial-gradient(circle, rgba(255,255,255,0.18), transparent 70%); }
.dhero-slide--custom .dhero__art .brand-mark--lg {
  background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.35); color: #fff;
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}

/* --- Footer: gradient indigo→biru gelap, teks putih --- */
.dfooter.glass {
  background: linear-gradient(135deg, #201b52 0%, #26215C 55%, #2b3f8a 100%);
  border-top: none; color: #fff;
}
.dfooter.glass::before { display: none; }
.dfooter__col h4 { color: #fff; }
.dfooter__col a { color: rgba(255,255,255,0.72); }
.dfooter__col a:hover { color: #fff; }
.dfooter__desc { color: rgba(255,255,255,0.72); }
.dfooter .brand-name { color: #fff; }
.dfooter .brand-mark { background: rgba(255,255,255,0.16); border: 1px solid rgba(255,255,255,0.32); color: #fff; }
.dfooter__badges span { background: rgba(255,255,255,0.14); color: rgba(255,255,255,0.9); border: 1px solid rgba(255,255,255,0.22); }
.dfooter__bottom { color: rgba(255,255,255,0.72); border-top-color: rgba(255,255,255,0.14); }
.dfooter__bottom a, .dfooter__switch { color: #cbd5ff; }

/* ---------- Alert di tema terang Puaz ----------
   Layout memakai <html data-theme="dark"> tetapi :root Puaz palet terang
   (latar off-white). Warna teks alert bawaan (#99f6e4 / #fecaca) terlalu muda
   sehingga pesan seperti "Pengaturan halaman depan disimpan" tak terbaca.
   Pakai teks gelap + latar tint yang kontras di atas off-white. */
.alert--success {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.45);
  color: #0f766e;
}
.alert--error {
  background: rgba(220, 38, 38, 0.10);
  border: 1px solid rgba(220, 38, 38, 0.42);
  color: #991b1b;
}

/* ============================================================
   PERBAIKAN RESPONSIF HP (hasil audit tampilan mobile)
   Catatan: body{overflow-x:hidden} membuat elemen kelebar TERPOTONG
   diam-diam (bukan scroll) — jadi masalah muncul sebagai "konten terpotong".
   ============================================================ */

/* [KRITIS] Baris keranjang: grid 5 kolom (thumb·info·qty·subtotal·hapus) tak
   pernah menumpuk → di HP tombol hapus & subtotal di kanan terpotong. Susun
   ulang jadi 2 baris: [thumb | nama/harga | hapus] / [thumb | qty | subtotal]. */
@media (max-width: 560px) {
  .dcart-item {
    grid-template-columns: 56px 1fr auto;
    grid-template-areas:
      "thumb info del"
      "thumb qty  sub";
    row-gap: 8px; column-gap: 12px;
  }
  .dcart-thumb { grid-area: thumb; width: 56px; height: 56px; align-self: start; }
  .dcart-info  { grid-area: info; }
  .dcart-qty   { grid-area: qty; }
  .dcart-qty input { width: 72px; }
  .dcart-sub   { grid-area: sub; justify-self: end; align-self: center; }
  .dcart-item > form:last-child { grid-area: del; justify-self: end; align-self: start; }
}

/* Footer: turun ke 1 kolom di HP agar kolom tautan tak berdesakan */
@media (max-width: 560px) {
  .dfooter__grid { grid-template-columns: 1fr; gap: 22px; }
}

/* Ringkasan KPI chart (admin): 1 kolom di HP kecil agar angka tak sesak */
@media (max-width: 480px) {
  .chart-sum { grid-template-columns: 1fr; }
}

/* Halaman /kategori: 2 kolom di HP kecil → kartu lebih lega, nama tak sempit */
@media (max-width: 430px) {
  .dcat-grid--page { grid-template-columns: repeat(2, 1fr); }
}
