/* ABPi Mall Indonesia — tema toko gelap ungu + emas (portal toko harga Rupiah) */
:root {
  --bg: #0a0714;
  --bg-2: #120a26;
  --text: #f4f1ff;
  --muted: #a49cc4;
  --muted-2: #7f77a3;
  --line: rgba(255, 255, 255, 0.09);
  --line-2: rgba(255, 255, 255, 0.16);
  --input: rgba(255, 255, 255, 0.05);
  --card: rgba(23, 15, 46, 0.72);
  --card-solid: #150d2b;
  --purple: #7d3cff;
  --purple-2: #b18cff;
  --gold: #f5b942;
  --green: #24d07a;
  --red: #f6465d;
  --radius: 14px;
  --gap: 20px;
  --pad: 22px;
  --font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

/* Latar gelap juga di <html>: tanpa ini area di luar body (overscroll di HP,
   atau tinggi halaman yang melebihi viewport) tampil putih. */
html { background: #0a0714; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }

body {
  background:
    radial-gradient(900px 520px at 88% -8%, rgba(125, 60, 255, 0.28), transparent 62%),
    radial-gradient(760px 460px at 4% 4%, rgba(245, 185, 66, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.01em; }
h1 { font-size: clamp(28px, 3.6vw, 42px); font-weight: 800; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
h4 { font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-variant-numeric: tabular-nums; }
.up { color: var(--green); }
.down { color: var(--red); }
.gold { color: var(--gold); }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: var(--gap); }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; align-items: center; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }

/* ---------------------------------------------------------------- topbar */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 18px;
  padding: 12px clamp(14px, 3vw, 34px);
  background: rgba(10, 7, 20, 0.82);
  backdrop-filter: blur(18px) saturate(160%);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.brand em { color: var(--gold); font-style: normal; }
/* Logo owner bisa berbentuk TIDAK persegi (mis. 814×664). Tanpa object-fit, gambar itu digepengkan
   ke kotak 34×34 sehingga tampak tidak sesuai dengan aslinya — dan berbeda dari yang tampil di
   kartu identitas. `contain` menjaga rasio tanpa menggeser tata letak. */
.brand-logo { width: 34px; height: 34px; object-fit: contain; }

/* Lockup logo (lambang π biru + wordmark) untuk area besar: hero beranda & halaman Tentang.
   Wordmark ditulis sebagai teks HTML — bukan teks di dalam SVG — supaya tetap tajam dan
   memakai font situs (font tidak bisa dimuat di dalam <img> SVG). */
.brand-lockup { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 0 4px; }
.lockup-mark { width: 122px; height: 122px; object-fit: contain; }
.lockup-word {
  font-size: clamp(26px, 4.4vw, 38px); font-weight: 800; letter-spacing: 0.5px; line-height: 1;
  background: linear-gradient(135deg, #FFFFFF 0%, #D7E3F7 45%, #8FB6F0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@supports not ((-webkit-background-clip: text) or (background-clip: text)) {
  .lockup-word { color: #E6EEFB; }
}
.lockup-sub { font-size: 13px; letter-spacing: 0.24em; text-transform: uppercase; color: var(--muted-2); font-weight: 700; }
@media (max-width: 560px) { .lockup-mark { width: 96px; height: 96px; } }
.nav-main { display: flex; align-items: center; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.nav-main::-webkit-scrollbar { display: none; }
.nav-main a {
  padding: 8px 12px; border-radius: 10px; font-size: 14px; font-weight: 600;
  color: var(--muted); white-space: nowrap;
}
.nav-main a:hover { color: var(--text); background: rgba(255, 255, 255, 0.05); }
.nav-main a.active { color: var(--text); background: rgba(125, 60, 255, 0.22); }
.cart-count {
  display: inline-block; min-width: 18px; padding: 1px 6px; margin-left: 4px;
  border-radius: 999px; background: var(--gold); color: #23180a; font-size: 11px; font-weight: 800;
}
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.member-chip { display: flex; align-items: center; gap: 10px; }
.member-chip .avatar {
  width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: linear-gradient(135deg, var(--purple), var(--gold));
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #1b1030; overflow: hidden;
}
.member-chip .avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { display: flex; flex-direction: column; line-height: 1.25; }
.who strong, .who small { max-width: 20ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who small { font-size: 11px; color: var(--muted); }

/* ---------------------------------------------------------------- layout */
.shell { max-width: 1240px; margin: 0 auto; padding: 30px clamp(14px, 3vw, 34px) 60px; }
.view { display: flex; flex-direction: column; gap: 34px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: var(--pad); backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
  min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.card-hint { margin-top: 14px; }
.grid-cards { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.grid-cards > * { min-width: 0; }
.split { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr) minmax(0, 360px); }
.split > * { min-width: 0; }
.split-wide { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 1fr) minmax(0, 460px); }
.split-wide > * { min-width: 0; }
@media (max-width: 960px) { .split, .split-wide { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- atoms */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px; border: 1px solid transparent;
  font-weight: 700; font-size: 14px; cursor: pointer; transition: transform 0.12s ease, filter 0.12s ease;
  background: rgba(255, 255, 255, 0.06);
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-gold { background: linear-gradient(135deg, #ffd479, var(--gold)); color: #2a1c05; }
.btn-purple { background: linear-gradient(135deg, var(--purple), #b06bff); color: #fff; }
.btn-ghost { background: rgba(255, 255, 255, 0.05); border-color: var(--line-2); color: var(--text); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 10px; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(246, 70, 93, 0.16); border-color: rgba(246, 70, 93, 0.5); color: #ffb3c0; }
.text-link { color: var(--purple-2); font-weight: 600; }
.text-link:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: rgba(245, 185, 66, 0.12); border: 1px solid rgba(245, 185, 66, 0.35);
  color: #f8d79a; font-size: 12px; font-weight: 600;
}
.chip.purple { background: rgba(125, 60, 255, 0.16); border-color: rgba(125, 60, 255, 0.42); color: #d5c2ff; }
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.badge-ok { background: rgba(36, 208, 122, 0.16); color: #7cf0b4; }
.badge-warn { background: rgba(245, 185, 66, 0.18); color: #f7d491; }
.badge-info { background: rgba(125, 60, 255, 0.2); color: #cbb4ff; }
.badge-muted { background: rgba(255, 255, 255, 0.07); color: var(--muted); }
.badge-red { background: rgba(246, 70, 93, 0.16); color: #ffb0bd; }

.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.stat .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); font-weight: 700; }
.stat strong { font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.stat small { font-size: 12px; color: var(--muted-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px; border-radius: 11px; border: 1px solid var(--line-2);
  background: var(--input); color: var(--text); outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--purple-2); }
.field textarea { min-height: 92px; resize: vertical; }
.field .hint { font-size: 12px; color: var(--muted-2); }
.form-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 720px) { .form-grid .span-2 { grid-column: span 1; } }

table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
table.tbl th {
  text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  color: var(--muted-2); padding: 8px 10px; border-bottom: 1px solid var(--line);
}
table.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.tbl tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- hero */
.hero { display: grid; gap: 28px; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: center; }
.hero > * { min-width: 0; }
@media (max-width: 900px) { .hero { grid-template-columns: minmax(0, 1fr); } }
.hero h1 { margin-bottom: 12px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.lede { font-size: 15.5px; color: var(--muted); max-width: 60ch; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.hero-media {
  border-radius: 20px; border: 1px solid var(--line-2); padding: 18px;
  background: linear-gradient(160deg, rgba(125, 60, 255, 0.24), rgba(245, 185, 66, 0.12));
  display: flex; flex-direction: column; gap: 14px;
}
.hero-media img { width: 100%; height: 210px; object-fit: contain; }
.hero-price { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.hero-price strong { font-size: 24px; font-weight: 800; }
.price-tag { display: flex; flex-direction: column; gap: 2px; }
.price-legend { display: flex; gap: 8px; flex-wrap: wrap; }

.steps { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
.steps > * { min-width: 0; }
.step {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 18px;
  background: rgba(255, 255, 255, 0.03);
}
.step .num {
  display: inline-flex; align-items: center; justify-content: center; width: 26px; height: 26px;
  border-radius: 50%; background: rgba(245, 185, 66, 0.18); color: var(--gold); font-weight: 800; font-size: 13px;
  margin-bottom: 10px;
}
.step h4 { margin-bottom: 6px; color: var(--text); text-transform: none; letter-spacing: 0; font-size: 15px; }

/* ---------------------------------------------------------------- kategori & produk */
.cat-tiles { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }
.cat-tiles > * { min-width: 0; }
.cat-tile {
  display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius);
  border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); cursor: pointer;
}
.cat-tile:hover { border-color: var(--purple-2); background: rgba(125, 60, 255, 0.14); }
.cat-tile img { width: 46px; height: 46px; }
.cat-tile strong { font-size: 15px; }

.toolbar { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.toolbar .field { min-width: 180px; flex: 1; }
.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-chips button {
  padding: 8px 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04); color: var(--muted); font-size: 13px; font-weight: 600; cursor: pointer;
}
.filter-chips button.active { background: rgba(245, 185, 66, 0.16); border-color: rgba(245, 185, 66, 0.5); color: #f8d79a; }

.product-grid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.product-grid > * { min-width: 0; }
.prod-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--card); min-width: 0;
}
.prod-media { position: relative; background: rgba(255, 255, 255, 0.04); aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center; }
.prod-media img { width: 100%; height: 100%; object-fit: cover; }
.prod-media .ph { width: 62%; height: 62%; }
.prod-flag { position: absolute; top: 10px; left: 10px; }
.prod-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.prod-name { font-size: 15px; font-weight: 700; }
.prod-cat { font-size: 11.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted-2); font-weight: 700; }
.prod-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.price-primary { font-size: 18px; font-weight: 800; }
.price-secondary { font-size: 12.5px; color: var(--muted-2); }
.stock-line { font-size: 12px; }
.thumb { width: 58px; height: 58px; border-radius: 10px; object-fit: cover; background: rgba(255, 255, 255, 0.05); }

/* ---------------------------------------------------------------- cart / checkout */
.cart-line { display: flex; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cart-line:last-child { border-bottom: none; }
.qty-box { display: inline-flex; align-items: center; gap: 6px; }
.qty-box button {
  width: 30px; height: 30px; border-radius: 9px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.05); cursor: pointer; font-weight: 800;
}
.qty-box input { width: 58px; text-align: center; padding: 6px; border-radius: 9px; border: 1px solid var(--line-2); background: var(--input); }
.cart-line .cart-amount { min-width: 104px; text-align: right; }
.summary-line { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 7px 0; }
.summary-line.total { border-top: 1px solid var(--line-2); margin-top: 8px; padding-top: 14px; font-size: 18px; font-weight: 800; }
.pay-option {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.03); cursor: pointer;
}
.pay-option.active { border-color: var(--gold); background: rgba(245, 185, 66, 0.1); }
.pay-option input { margin-top: 3px; }
.wallet-addr {
  display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px;
  background: rgba(0, 0, 0, 0.25); border: 1px dashed var(--line-2); word-break: break-all;
}
.qr-box { background: #fff; padding: 10px; border-radius: 12px; width: 150px; height: 150px; flex: 0 0 auto; }
.qr-box img { width: 100%; height: 100%; display: block; }

.status-track { display: flex; gap: 0; flex-wrap: wrap; margin: 6px 0 4px; }
.status-step { flex: 1; min-width: 120px; display: flex; flex-direction: column; gap: 6px; padding-right: 12px; }
.status-step .dot { width: 100%; height: 5px; border-radius: 999px; background: rgba(255, 255, 255, 0.09); }
.status-step.done .dot { background: linear-gradient(90deg, var(--purple), var(--gold)); }
.status-step span { font-size: 12px; color: var(--muted-2); font-weight: 600; }
.status-step.done span { color: var(--text); }

/* ---------------------------------------------------------------- modal / toast */
.modal-root { position: fixed; inset: 0; z-index: 80; background: rgba(6, 3, 14, 0.72); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; overflow-y: auto; }
.modal {
  width: 100%; max-width: 620px; background: var(--card-solid); border: 1px solid var(--line-2);
  border-radius: 18px; padding: 24px; box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
.modal.wide { max-width: 860px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.modal-close { background: none; border: none; font-size: 22px; line-height: 1; cursor: pointer; color: var(--muted); }
.modal-close:hover { color: var(--text); }

.toasts { position: fixed; right: 18px; bottom: 18px; z-index: 120; display: flex; flex-direction: column; gap: 10px; max-width: 340px; }
.toast {
  padding: 12px 15px; border-radius: 12px; border: 1px solid var(--line-2);
  background: var(--card-solid); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.4); font-size: 13.5px;
}
.toast.err { border-color: rgba(246, 70, 93, 0.55); color: #ffc2cc; }
.toast.ok { border-color: rgba(36, 208, 122, 0.5); color: #a9f2cb; }

/* ---------------------------------------------------------------- misc blok */
.notice {
  border-radius: 12px; padding: 14px 16px; font-size: 13.5px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.04); color: var(--muted);
}
.notice.gold { border-color: rgba(245, 185, 66, 0.4); background: rgba(245, 185, 66, 0.09); color: #f6dcae; }
.notice.warn { border-color: rgba(246, 70, 93, 0.4); background: rgba(246, 70, 93, 0.09); color: #ffc0ca; }
.empty { padding: 26px; text-align: center; color: var(--muted-2); border: 1px dashed var(--line-2); border-radius: var(--radius); }

.admin-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.admin-tabs button {
  padding: 9px 15px; border-radius: 11px; border: 1px solid var(--line-2);
  background: rgba(255, 255, 255, 0.04); cursor: pointer; font-weight: 600; font-size: 13.5px; color: var(--muted);
}
.admin-tabs button.active { background: rgba(125, 60, 255, 0.22); border-color: rgba(125, 60, 255, 0.6); color: var(--text); }

.site-foot {
  border-top: 1px solid var(--line); margin-top: 20px; padding: 26px clamp(14px, 3vw, 34px) 40px;
  max-width: 1240px; margin-left: auto; margin-right: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.foot-brand { display: flex; align-items: center; gap: 12px; }
.foot-brand img { width: 34px; height: 34px; object-fit: contain; }
.foot-brand span { display: block; font-size: 12.5px; color: var(--muted-2); }
.foot-note { font-size: 12.5px; color: var(--muted-2); max-width: 100ch; }

/* Identitas badan usaha di bawah footer — sengaja SAMAR (warna muted + sedikit transparan)
   supaya tidak bersaing dengan isi halaman, sama seperti app ABPIGCV Mall Global & ABPIGCVgold. */
.foot-legal { margin-top: 2px; padding-top: 14px; border-top: 1px solid var(--line); opacity: .82; }
.fl-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px 22px; }
.fl-grid > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.fl-grid span { font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.fl-grid strong { font-size: 13px; font-weight: 600; color: var(--muted); overflow-wrap: anywhere; }
.fl-grid a { color: var(--muted); }
.fl-note { margin-top: 12px; font-size: 11.5px; color: var(--muted-2); }
@media (max-width: 560px) { .fl-grid { grid-template-columns: 1fr 1fr; gap: 10px 14px; } }

@media print {
  .topbar, .site-foot, .no-print { display: none !important; }
}

/* Layar sempit: pada ≤900px menu dipindah ke drawer (blok di akhir file);
   di bawah ini hanya penyesuaian jarak supaya tidak ada overflow horizontal di 390px. */
@media (max-width: 760px) {
  .topbar { padding: 10px 14px; }
  .member-chip .who { display: none; }
  .brand { font-size: 16px; }
  .shell { padding: 20px 14px 48px; }
  .view { gap: 24px; }
}

/* Baris cart: di layar sempit biarkan membungkus supaya tidak mendorong lebar halaman. */
@media (max-width: 620px) {
  .cart-line { flex-wrap: wrap; row-gap: 10px; }
  .cart-line .grow { flex: 1 1 60%; }
  .cart-line .qty-box { order: 3; }
  .cart-line .cart-amount { order: 4; min-width: 0; text-align: left; }
  .cart-line > .btn { order: 5; margin-left: auto; }
}

/* ---------------------------------------------------------------- catatan harga & kanal bayar */
.price-third { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.chip-bank { border-color: rgba(88, 150, 255, .5); color: #9dc4ff; background: rgba(60, 110, 230, .14); }
.pay-assets { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; }
.pay-option.pay-asset { align-items: flex-start; }
.pay-option.pay-asset.is-disabled { opacity: .6; }
.pay-option.pay-asset > span { display: flex; flex-direction: column; gap: 4px; }
.hr { border: 0; height: 1px; background: rgba(255, 255, 255, .1); margin: 18px 0; }
.badge-info { background: rgba(88, 150, 255, .18); color: #9dc4ff; }
@media (max-width: 620px) {
  .pay-assets { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- tambahan ABPi Mall Indonesia */
.brand-suffix { color: var(--muted); font-weight: 700; font-size: 14px; }
@media (max-width: 560px) { .brand-suffix { display: none; } }

/* Kartu FAQ / bantuan + unduhan APK */
.faq-list { display: flex; flex-direction: column; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03); padding: 14px 16px; }
.faq-item summary { cursor: pointer; font-weight: 700; font-size: 14.5px; }
.faq-item[open] summary { color: var(--gold); }
.faq-item p { margin-top: 10px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }
.apk-card { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.apk-card .apk-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.apk-meta { font-size: 12.5px; color: var(--muted-2); }
.contact-links { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }

/* Catatan kecil di dalam form (dipakai kartu email admin) */
.form-note { font-size: 13.5px; color: var(--muted); margin-top: 10px; }

/* Kotak angka pembayaran */
.pay-box { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.pay-detail { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 260px; }
.big-amount { font-size: clamp(20px, 3vw, 28px); font-weight: 800; }
.copy-row { display: flex; gap: 8px; flex-wrap: wrap; }

/* Tabel admin di layar sempit */
@media (max-width: 620px) {
  .faq-item { padding: 12px 14px; }
  .apk-card { flex-direction: column; align-items: flex-start; }
}

/* ------------------------------------------------------------------ menu HP (drawer)
   Di layar kecil menu dipindah ke panel geser dari kiri (tombol 3 garis di kiri atas),
   supaya topbar tidak lagi membungkus jadi 4–5 baris. Di desktop tampilannya tidak berubah:
   tombol 3 garis disembunyikan dan #nav kembali inline.
   Modul JS-nya: public/nav-mobile.js (dipakai identik di app lain). */

.nav-toggle { display: none; }
.nav-drawer-head { display: none; }
.nav-scrim { display: none; }

@media (max-width: 900px) {
  /* --- topbar: satu baris rapi --- */
  .topbar {
    flex-wrap: nowrap;
    gap: 10px;
    padding: 10px 12px;
    align-items: center;
  }
  .brand { min-width: 0; flex: 1 1 auto; }
  .topbar-actions { flex-wrap: nowrap; margin-left: auto; gap: 6px; }
  .member-chip { gap: 8px; padding: 4px 6px; }
  .member-chip .who { display: none; }                 /* hemat ruang di layar kecil */
  .brand-suffix { display: none; }

  /* --- tombol 3 garis (kiri atas) --- */
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4px;
    width: 42px; height: 42px; flex: 0 0 auto; padding: 0 10px;
    border: 1px solid var(--line-2); border-radius: 12px;
    background: rgba(255, 255, 255, 0.05); cursor: pointer;
  }
  .nav-toggle span { display: block; height: 2px; border-radius: 2px; background: var(--text); }
  .nav-toggle:hover { border-color: var(--gold); }
  .nav-toggle[aria-expanded="true"] { border-color: var(--gold); background: rgba(245, 185, 66, 0.14); }

  /* --- panel menu geser dari kiri --- */
  /* PENTING: .topbar memakai `backdrop-filter`, dan itu membuat topbar menjadi CONTAINING
     BLOCK untuk anak ber-position:fixed. Akibatnya `top:0;bottom:0` mengukur tinggi topbar
     (±72px), bukan layar — drawer jadi strip kecil. Solusinya: tinggi eksplisit 100dvh/100vh
     (bukan mengandalkan top/bottom). */
  #nav {
    position: fixed; top: 0; left: 0; z-index: 70;
    height: 100vh; max-height: 100vh;
    width: min(84vw, 330px); max-width: 330px;
    display: flex; flex-direction: column; flex-wrap: nowrap; gap: 4px;
    align-items: stretch; flex: none;
    padding: 14px 14px 26px; margin: 0;
    background: var(--card-solid); border-right: 1px solid var(--line-2);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55);
    overflow-y: auto; overscroll-behavior: contain;
    transform: translateX(-104%);
    transition: transform 0.22s ease;
    visibility: hidden;
  }
  @supports (height: 100dvh) {
    #nav { height: 100dvh; max-height: 100dvh; }
  }
  #nav.is-open { transform: translateX(0); visibility: visible; }
  #nav a {
    display: block; width: 100%; padding: 13px 14px; border-radius: 12px;
    font-size: 15.5px; font-weight: 600;
    border-bottom: 1px solid var(--line);
  }
  #nav a:last-of-type { border-bottom: none; }
  #nav a.active { background: rgba(125, 60, 255, 0.22); color: var(--text); }

  .nav-drawer-head {
    display: flex; flex-direction: row-reverse; align-items: center; justify-content: space-between;
    padding: 2px 4px 12px; margin-bottom: 6px;
    border-bottom: 1px solid var(--line-2);
  }
  /* row-reverse → tombol × berada di KIRI, persis di posisi tombol 3 garis tadi. */
  .nav-drawer-head strong { font-size: 14px; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); }
  .nav-close {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 10px; cursor: pointer;
    border: 1px solid var(--line-2); background: rgba(255, 255, 255, 0.05);
    color: var(--text); font-size: 20px; line-height: 1;
  }
  .nav-close:hover { border-color: var(--gold); }

  /* PENTING: z-index scrim HARUS lebih kecil dari .topbar (30), bukan lebih besar dari #nav.
     .topbar memakai position:sticky + z-index → punya stacking context sendiri, jadi z-index
     #nav dihitung di dalam konteks itu dan selalu kalah dari scrim kalau scrim di atasnya.
     Pernah kejadian: seluruh tautan menu tidak bisa diklik karena tertutup scrim. */
  .nav-scrim {
    display: none; position: fixed; inset: 0; z-index: 20;
    background: rgba(6, 3, 14, 0.62); backdrop-filter: blur(2px);
  }
  .nav-scrim.is-open { display: block; }
  body.nav-open { overflow: hidden; }
}

/* Layar sangat sempit: sedikit lebih rapat lagi. */
@media (max-width: 400px) {
  .topbar { padding: 9px 10px; gap: 8px; }
  .nav-toggle { width: 38px; height: 38px; }
}

/* ---------------------------------------------------------------- Rupiah (toko Indonesia)
   Kelas khusus tampilan harga Rupiah, diskon, pilihan kurir, kanal pembayaran,
   bukti transfer, dan editor daftar di panel admin. */

.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; }

.price-wrap { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.price-strike { font-size: 12.5px; color: var(--muted-2); text-decoration: line-through; }
.discount-chip {
  display: inline-block; padding: 2px 7px; border-radius: 6px; font-size: 11.5px; font-weight: 800;
  background: rgba(246, 70, 93, .16); color: #ffb0bd; border: 1px solid rgba(246, 70, 93, .4);
}
.prod-disc {
  position: absolute; top: 10px; right: 10px; padding: 3px 8px; border-radius: 8px;
  background: rgba(246, 70, 93, .9); color: #fff; font-size: 12px; font-weight: 800;
}

/* Pilihan kurir */
.courier-list { display: flex; flex-direction: column; gap: 10px; }
.courier-item {
  display: flex; align-items: center; gap: 12px; padding: 13px 14px; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .03);
}
.courier-item:hover { border-color: var(--purple-2); }
.courier-item.active { border-color: var(--gold); background: rgba(245, 185, 66, .1); }
.courier-item input { margin: 0; }
.courier-item .ci-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.courier-item .ci-fee { font-weight: 800; white-space: nowrap; }

/* Metode & kanal pembayaran */
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.pay-option > span { display: flex; flex-direction: column; gap: 4px; }
.pay-channels { display: flex; flex-direction: column; gap: 10px; }
.pay-channel {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px;
  background: rgba(0, 0, 0, .22); border: 1px dashed var(--line-2); flex-wrap: wrap;
}
.pay-channel-main { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.pay-channel .pc-label { font-weight: 700; font-size: 14px; }
.pay-channel .pc-value { font-size: 15.5px; word-break: break-all; }
.pay-channel .pc-holder { font-size: 12.5px; color: var(--muted-2); }
.qris-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 12px;
  padding: 14px; border-radius: 14px; background: #fff; width: fit-content; max-width: 100%;
}
.qris-box img { display: block; width: 240px; height: 240px; max-width: 100%; }
.qris-box .small { color: #3c3557; text-align: center; }

/* Kebijakan */
.policy-list { margin: 10px 0 0 18px; padding: 0; color: var(--muted); font-size: 13.5px; line-height: 1.85; }
.policy-list li { margin-bottom: 4px; }

/* Editor daftar di panel admin (kurir / rekening / e-wallet) */
.list-wrap { display: flex; flex-direction: column; gap: 12px; }
.list-row {
  display: grid; gap: 12px; align-items: end;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .03);
}
/* ---------- Filter katalog bertingkat (Kategori → Sub kategori → Merek) ---------- */
.filter-level { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.filter-level .lv {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  font-weight: 700; padding-top: 7px; min-width: 92px;
}
.filter-chips .chip-n {
  display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .12); font-size: 11px; font-weight: 700; color: var(--muted);
}
.filter-chips button.active .chip-n { background: rgba(0, 0, 0, .25); color: inherit; }
.linklike { background: none; border: 0; padding: 0; color: var(--gold); font-weight: 600; cursor: pointer; font: inherit; }

/* Pohon kategori (tab Kategori): tingkat ditandai lekukan + label warna. */
.cat-lv-tag { display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; padding: 1px 6px; border-radius: 999px; margin-right: 6px; }
.cat-lv-tag.lv-kategori { background: rgba(245, 185, 66, .18); color: #f5b942; }
.cat-lv-tag.lv-sub { background: rgba(125, 60, 255, .22); color: #b79bff; }
.cat-lv-tag.lv-merek { background: rgba(255, 255, 255, .12); color: var(--muted); }
tr.cat-lv-sub td:first-child { padding-left: 26px !important; }
tr.cat-lv-merek td:first-child { padding-left: 48px !important; }
@media (max-width: 620px) { .filter-level .lv { min-width: 100%; padding-top: 0; } }

/* ---------- Halaman LAPAK penjual (storefront publik) ---------- */
.lapak-head { display: block; }
.lapak-top { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.lapak-mark {
  width: 62px; height: 62px; border-radius: 18px; flex: 0 0 auto;
  display: grid; place-items: center; font-size: 28px; font-weight: 800; color: #241a04;
  background: linear-gradient(140deg, #ffd97a, #e39a1a); box-shadow: 0 6px 18px rgba(0, 0, 0, .35);
}
.lapak-id { flex: 1 1 240px; min-width: 0; }
.lapak-stats { display: flex; gap: 18px; flex-wrap: wrap; }
.lapak-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 66px; }
.lapak-stats strong { font-size: 19px; font-weight: 800; }
.lapak-stats span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.lapak-map summary { cursor: pointer; }
.shop-chips { display: flex; align-items: flex-start; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.shop-chips .lv {
  font-size: 11px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted);
  font-weight: 700; padding-top: 7px; min-width: 92px;
}
@media (max-width: 620px) { .shop-chips .lv { min-width: 100%; padding-top: 0; } }
/* Tile kategori tanpa berkas ikon: monogram huruf pertama (kategori buatan admin). */
.cat-tile-mark {
  width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center;
  font-size: 22px; font-weight: 800; color: #241a04;
  background: linear-gradient(140deg, #ffd97a, #e39a1a); box-shadow: 0 4px 12px rgba(0, 0, 0, .3);
}
.chip-link {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: inherit;
  font-size: 13.5px; font-weight: 600; text-decoration: none;
}
.chip-link:hover { border-color: var(--gold); color: var(--gold); }
.prod-cat a.prod-shop { color: var(--gold); font-weight: 700; text-decoration: none; }
.prod-cat a.prod-shop:hover { text-decoration: underline; }
@media (max-width: 620px) {
  .lapak-stats { width: 100%; justify-content: space-between; }
  .lapak-mark { width: 52px; height: 52px; font-size: 24px; border-radius: 15px; }
}

.list-row .btn { justify-self: start; }
@media (max-width: 620px) { .list-row { grid-template-columns: 1fr; } }

/* ---- Ongkir per WILAYAH + BERAT ------------------------------------------------
   Baris kurir: kolom tarif dasar + kotak tarif khusus per wilayah (satu input per wilayah).
   `.zone-fees` wajib membentang seluruh kolom grid (grid-column: 1 / -1) supaya tidak
   menyempitkan kolom lain. */
.courier-row .zone-fees { grid-column: 1 / -1; border-top: 1px dashed var(--line); padding-top: 10px; }
.courier-row .zone-fees p { margin: 0 0 10px; }
.zone-fee-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.zone-fee-grid .field label { font-size: 11.5px; }
/* Kotak wilayah + berat di checkout */
.ship-zone-box { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); align-items: start; margin-bottom: 14px; }
.ship-weight { display: flex; flex-direction: column; gap: 6px; padding: 12px 14px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px dashed var(--line-2); }
.ship-weight .lbl { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.ship-weight strong { font-size: 17px; }
@media (max-width: 620px) { .ship-zone-box { grid-template-columns: 1fr; } }
.courier-item .ci-note { display: block; margin-top: 2px; }

/* ---------------------------------------------------------------- rating & ulasan */
.stars { display: inline-flex; gap: 2px; font-size: 14px; line-height: 1; letter-spacing: 1px; }
.stars .stars-on { color: var(--gold); }
.stars .stars-off { color: rgba(255, 255, 255, .22); }
.stars-sm { font-size: 12.5px; }
.stars-sm .stars-on { color: var(--gold); }
.rating-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; }
.rating-line { display: inline-flex; align-items: center; gap: 6px; color: var(--text); }
.rating-line strong { font-weight: 800; }
.rating-empty { color: var(--muted-2); font-size: 12.5px; }

.rating-summary {
  display: grid; gap: 20px; grid-template-columns: minmax(0, 180px) minmax(0, 1fr);
  align-items: center; padding: 16px; border-radius: 14px;
  border: 1px solid var(--line); background: rgba(255, 255, 255, .03); margin-bottom: 18px;
}
.rating-summary > * { min-width: 0; }
.rating-big { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.rating-big strong { font-size: 34px; font-weight: 800; line-height: 1; }
.rating-bars { display: flex; flex-direction: column; gap: 7px; }
.rating-bar-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; gap: 10px; align-items: center; font-size: 12.5px; }
.rating-bar { height: 7px; border-radius: 999px; background: rgba(255, 255, 255, .1); overflow: hidden; }
.rating-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--purple), var(--gold)); }
.rb-label { color: var(--muted); }
.rb-count { color: var(--muted-2); text-align: right; }
@media (max-width: 620px) { .rating-summary { grid-template-columns: minmax(0, 1fr); } }

.review-list { display: flex; flex-direction: column; gap: 12px; }
.review-item { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.review-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.review-body { color: var(--muted); font-size: 14px; line-height: 1.65; white-space: pre-wrap; }

.review-form-row { display: grid; gap: 12px; grid-template-columns: minmax(0, 220px) minmax(0, 1fr); align-items: start;
  padding: 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); }
.review-form-row > * { min-width: 0; }
.review-done { padding: 10px 14px; border-radius: 12px; border: 1px dashed var(--line-2); background: rgba(255, 255, 255, .02); font-size: 14px; }
@media (max-width: 620px) { .review-form-row { grid-template-columns: minmax(0, 1fr); } }

/* ---------------------------------------------------------------- COD (bayar di tempat) */
.warn-text { color: #f7d491; }
.pay-option.is-disabled { opacity: .55; cursor: not-allowed; }
.pay-option.is-disabled input { cursor: not-allowed; }

/* ---------------------------------------------------------------- akun & KYC */
.agree-row { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--muted); line-height: 1.6; }
.agree-row input { margin-top: 3px; flex: 0 0 auto; }
#user-chip .avatar, #admin-chip .avatar { flex: 0 0 auto; }
@media (max-width: 560px) {
  /* chip akun: sembunyikan kolom teks supaya topbar tetap satu baris */
  #user-chip .who { display: none; }
}

/* ---------------------------------------------------------------- ikon keranjang & keterangan produk */
.ico-cart { display: block; flex: 0 0 auto; }
/* Tombol keranjang di kartu barang: ikon saja (menggantikan tombol teks "+ Keranjang"),
   tetap punya title + aria-label supaya jelas & terbaca pembaca layar. */
.btn-cart {
  width: 44px; height: 44px; padding: 0; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
}
.btn-cart:disabled { opacity: .5; }
.btn-with-cart { gap: 10px; }

/* Keterangan produk di kartu: dua baris lalu dipotong (bukan deskripsi penuh). */
.prod-desc {
  font-size: 12.5px; line-height: 1.55; color: var(--muted);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.prod-detail-link { font-size: 12.5px; font-weight: 600; color: var(--purple-2); }
.prod-detail-link:hover { text-decoration: underline; }
.cart-desc {
  display: block; font-size: 12px; line-height: 1.5; color: var(--muted-2); margin: 2px 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46ch;
}
@media (max-width: 620px) {
  .cart-desc { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
}

/* ---------------------------------------------------------------- CS AI mengambang (kanan bawah)
   Bentuknya disamakan dengan pistake / ABPIGCV Mall Global: tombol pil berisi avatar asisten +
   label teks + lencana "AI", dengan panel lebar yang berisi transkrip, kolom tanya, chip saran,
   dan tautan ke halaman penuh (#/ai). */
.chat-root { position: fixed; right: 18px; bottom: 18px; z-index: 90; display: flex; flex-direction: column;
  align-items: flex-end; gap: 12px; pointer-events: none; }
.chat-root > * { pointer-events: auto; }

.chat-fab { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer;
  padding: 7px 18px 7px 7px; border-radius: 999px; border: 1px solid rgba(245, 185, 66, .5);
  background: linear-gradient(120deg, rgba(125, 60, 255, .95), rgba(59, 33, 112, .96));
  box-shadow: 0 14px 34px rgba(6, 3, 16, .55), 0 0 0 0 rgba(139, 92, 255, .5);
  animation: chat-fab-pulse 3.4s ease-in-out infinite; }
.chat-fab:hover { border-color: rgba(245, 185, 66, .85); }
.chat-fab:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.chat-fab.is-open { animation: none; }
.chat-fab-img { width: 54px; height: 54px; border-radius: 50%; flex: none; display: block;
  background: #1b1030; border: 2px solid rgba(245, 185, 66, .55); }
.chat-fab-label { font-weight: 800; font-size: 14.5px; letter-spacing: .2px; color: #fff; white-space: nowrap; }
.chat-fab-badge { position: absolute; top: -4px; left: 42px; font-size: 10px; font-weight: 800; letter-spacing: .08em;
  padding: 2px 7px; border-radius: 999px; color: #2a1c05; background: linear-gradient(135deg, #ffd479, var(--gold)); }
.chat-fab-dot { position: absolute; top: -2px; right: 6px; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center; }
@keyframes chat-fab-pulse {
  0% { box-shadow: 0 14px 34px rgba(6, 3, 16, .55), 0 0 0 0 rgba(139, 92, 255, .45); }
  70% { box-shadow: 0 14px 34px rgba(6, 3, 16, .55), 0 0 0 14px rgba(139, 92, 255, 0); }
  100% { box-shadow: 0 14px 34px rgba(6, 3, 16, .55), 0 0 0 0 rgba(139, 92, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .chat-fab { animation: none; } }

.chat-panel { width: min(520px, calc(100vw - 24px)); height: min(88vh, 780px); max-height: calc(100vh - 24px);
  display: flex; flex-direction: column; border-radius: 18px; overflow: hidden;
  border: 1px solid rgba(245, 185, 66, .35);
  background: var(--card-solid); box-shadow: 0 26px 60px rgba(4, 2, 12, .62); }
.chat-panel[hidden] { display: none; }
.chat-head { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto auto; align-items: center; gap: 10px;
  padding: 11px 13px; border-bottom: 1px solid var(--line);
  background: linear-gradient(120deg, rgba(125, 60, 255, .3), rgba(59, 33, 112, .35)); }
.chat-head-img { width: 40px; height: 40px; border-radius: 50%; flex: none; background: #1b1030;
  border: 1px solid rgba(245, 185, 66, .5); }
.chat-head-title { display: flex; flex-direction: column; min-width: 0; }
.chat-head-title strong { font-size: 15px; }
.chat-sub { line-height: 1.35; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-size: 11.5px; color: var(--muted); }
.chat-head-chip { white-space: nowrap; padding: 4px 11px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: rgba(255, 255, 255, .08); color: var(--muted); border: 1px solid var(--line-2); }
.chat-head-chip.is-on { background: rgba(36, 208, 122, .16); color: #7cf0b4; border-color: rgba(36, 208, 122, .4); }
.chat-x { flex: none; width: 30px; height: 30px; border-radius: 50%; cursor: pointer; font-size: 18px;
  border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); color: var(--muted); line-height: 1; }
.chat-x:hover { color: var(--text); border-color: var(--purple-2); }
.chat-body { padding: 14px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; min-height: 0; }
.chat-log { flex: 1 1 auto; min-height: 200px; overflow-y: auto; padding: 4px 2px; display: flex; flex-direction: column; gap: 10px; }
.chat-empty { color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.chat-msg { display: flex; flex-direction: column; gap: 3px; max-width: 88%; }
.chat-msg.me { align-self: flex-end; align-items: flex-end; }
.chat-msg.them, .chat-msg.ai { align-self: flex-start; }
.chat-who { font-size: 11px; color: var(--muted-2); font-weight: 700; }
.chat-bubble {
  padding: 10px 13px; border-radius: 14px; font-size: 13.8px; line-height: 1.65;
  background: rgba(255, 255, 255, .06); border: 1px solid var(--line);
}
.chat-msg.me .chat-bubble { background: linear-gradient(135deg, var(--purple), #9a6bff); border-color: transparent; color: #fff; }
.chat-msg.ai .chat-bubble { background: rgba(245, 185, 66, .12); border-color: rgba(245, 185, 66, .35); }
.chat-time { font-size: 10.5px; color: var(--muted-2); }
.chat-sys {
  align-self: center; text-align: center; font-size: 12px; color: var(--muted-2);
  background: rgba(255, 255, 255, .04); border: 1px dashed var(--line-2);
  padding: 7px 12px; border-radius: 10px; max-width: 92%;
}
.chat-identity { display: flex; flex-direction: column; gap: 6px; flex: 0 0 auto; }
.chat-id-row { display: grid; gap: 8px; grid-template-columns: 1fr 1fr; }
.chat-id-row input {
  padding: 9px 11px; border-radius: 10px; border: 1px solid var(--line-2);
  background: var(--input); color: var(--text); font: inherit; font-size: 13px;
}
.chat-form { border-top: 1px solid var(--line); padding-top: 10px; flex: 0 0 auto; }
.chat-form textarea {
  width: 100%; resize: vertical; min-height: 46px; padding: 10px 12px; border-radius: 12px;
  border: 1px solid var(--line-2); background: var(--input); color: var(--text); font: inherit; font-size: 13.8px;
}
.chat-form-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 8px; }
.chat-form-foot .muted { max-width: 62%; line-height: 1.4; }
/* Chip saran: SATU baris yang bisa digeser — kalau membungkus jadi beberapa baris, ruang transkrip
   ikut termakan sehingga jawaban AI jadi sempit (pelajaran dari pistake). */
.chat-chips { display: flex; gap: 8px; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; flex: 0 0 auto; }
.chat-chip { flex: 0 0 auto; padding: 7px 12px; border-radius: 999px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  border: 1px solid var(--line-2); background: rgba(255, 255, 255, .04); color: var(--muted); }
.chat-chip:hover { border-color: var(--purple-2); color: var(--text); }
.chat-foot { flex: 0 0 auto; font-size: 12px; }
.chat-full-link { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--gold); font-weight: 600; }
.chat-full-link:hover { text-decoration: underline; }

/* Di HP: label tetap tampil (lebih kecil) dan panel dipakai hampir penuh layar supaya
   papan chatnya lapang — sama seperti pistake / ABPIGCV Mall Global. */
@media (max-width: 640px) {
  .chat-root { right: 10px; bottom: 10px; gap: 10px; }
  .chat-fab { padding: 6px 14px 6px 6px; gap: 8px; }
  .chat-fab-img { width: 46px; height: 46px; }
  .chat-fab-label { font-size: 13px; }
  .chat-fab-badge { left: 34px; }
  .chat-panel { width: calc(100vw - 16px); height: calc(100vh - 96px); max-height: none; }
  .chat-head { grid-template-columns: 34px minmax(0, 1fr) auto; gap: 8px; padding: 10px 11px; }
  .chat-head-img { width: 34px; height: 34px; }
  .chat-head-title strong { font-size: 14px; }
  .chat-head-chip { display: none; }   /* hemat ruang di HP; status tetap terbaca di subjudul */
  .chat-body { padding: 11px; }
  .chat-log { min-height: 160px; }
  /* beri ruang di bawah supaya konten tidak tertutup tombol */
  .site-foot { padding-bottom: 92px; }
}

/* Inbox petugas CS */
.cs-inbox { display: grid; gap: var(--gap); grid-template-columns: minmax(0, 330px) minmax(0, 1fr); align-items: start; }
.cs-inbox > * { min-width: 0; }
@media (max-width: 900px) { .cs-inbox { grid-template-columns: minmax(0, 1fr); } }
.cs-list { max-height: 70vh; overflow-y: auto; }
.cs-thread {
  display: flex; flex-direction: column; gap: 4px; width: 100%; text-align: left; cursor: pointer;
  padding: 12px; border-radius: 12px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .03); margin-bottom: 8px; color: inherit; font: inherit;
}
.cs-thread:hover { border-color: var(--purple-2); }
.cs-thread.active { border-color: var(--gold); background: rgba(245, 185, 66, .1); }
.cs-thread-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cs-thread-prev { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cs-thread-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cs-badge { min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; text-align: center; }
.cs-room { display: flex; flex-direction: column; gap: 12px; }
.cs-room-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.cs-visitor { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cs-log { max-height: 52vh; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); border-radius: 12px; }
@media (max-width: 620px) {
  .chat-id-row { grid-template-columns: 1fr; }
  .chat-panel { width: calc(100vw - 24px); right: -6px; }
  .chat-form-foot { flex-direction: column; align-items: flex-start; }
  .chat-form-foot .muted { max-width: 100%; }
}

/* ---------------------------------------------------------------- penyedia AI berlapis */
.list-row[data-li="profile"] { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.list-row[data-li="profile"] .copy-row { align-self: end; }

/* ---------------------------------------------------------------- halaman #/ai */
.chat-full-link { display: inline-block; margin-top: 4px; font-size: 12px; color: var(--gold); font-weight: 600; }
.chat-full-link:hover { text-decoration: underline; }
#view-ai .cs-log { min-height: 260px; max-height: 56vh; }
#view-ai .chat-form { border-top: 1px solid var(--line); margin-top: 12px; padding-top: 12px; }

/* ---------------------------------------------------------------- peta lokasi (#/tentang) */
.map-wrap { position: relative; border-radius: 14px; overflow: hidden; border: 1px solid var(--line-2); background: rgba(0, 0, 0, .25); }
.map-frame { display: block; width: 100%; height: 340px; border: 0; }
@media (max-width: 620px) { .map-frame { height: 240px; } }

/* --------- Peta lokasi (halaman seller & modal admin) ---------
   Kotak peta BERTINGGI TETAP: pratinjau muncul/hilang tidak boleh menggeser tata letak form,
   karena pergeseran itu membuat tombol "Daftar" berpindah tepat saat diklik (klik gagal senyap). */
.seller-map-box { min-height: 236px; display: flex; flex-direction: column; justify-content: center; }
.seller-map-box .map-frame { height: 210px; }
@media (max-width: 620px) { .seller-map-box { min-height: 200px; } .seller-map-box .map-frame { height: 176px; } }

/* --- Kode promo (voucher) di halaman checkout -------------------------------------- */
.voucher-box { margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.voucher-row { display: flex; gap: 10px; align-items: stretch; }
.voucher-row input { flex: 1 1 auto; min-width: 0; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; }
.voucher-row .btn { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 420px) {
  .voucher-row { flex-wrap: wrap; }
  .voucher-row .btn { flex: 1 1 100%; }
}

/* --- Kartu Identitas Anggota (2 sisi, unduh PNG, cetak) --------------------------------- */
.kc-wrap { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.kc-side {
  position: relative; border-radius: 22px; padding: 24px;
  background: linear-gradient(150deg, #161033, #0f0a26 52%, #1b1236);
  border: 1px solid rgba(245, 185, 66, 0.42);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
  min-width: 0; overflow: hidden;
}
.kc-glow {
  position: absolute; inset: -30% -10% auto auto; width: 320px; height: 320px; pointer-events: none;
  background: radial-gradient(circle, rgba(245, 185, 66, 0.16), transparent 68%);
}
/* Baris identitas: logo + nama brand (besar) + chip peran. Kalau ruangnya sempit (HP), chip peran
   TURUN ke baris sendiri — jangan sampai nama brand terbelah dua baris ("ABPiMall" / "Indonesia"). */
.kc-top { display: flex; align-items: center; gap: 14px; position: relative; flex-wrap: wrap; }
/* Logo di kartu: kotak tetap + object-fit contain supaya logo owner yang TIDAK persegi tidak
   gepeng. `.on` = plakat terang, dipakai otomatis kalau logo unggahannya gelap & padat
   (diukur di kartu.js) agar tetap terbaca di atas kartu navy. */
/* Ukuran logo & nama sengaja lebih besar daripada sub-judulnya (permintaan pemilik akun):
   identitas brand harus jadi hal pertama yang terlihat di kartu. */
.kc-mark-plate {
  width: 58px; height: 58px; border-radius: 14px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.kc-mark-plate.on { background: #f7f5fd; box-shadow: 0 2px 10px rgba(0, 0, 0, .35); }
.kc-mark { width: 100%; height: 100%; object-fit: contain; display: block; }
.kc-mark.on-plate { padding: 8px; }
.kc-brand { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: 1 1 190px; }
.kc-brand strong { font-size: 21px; letter-spacing: -0.015em; }
.kc-brand span { font-size: 9.5px; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.11em; font-weight: 700; }
.kc-role {
  flex: 0 0 auto; margin-left: auto; padding: 6px 13px; border-radius: 999px; font-size: 12px; font-weight: 800;
  background: rgba(245, 185, 66, 0.16); border: 1px solid rgba(245, 185, 66, 0.5); color: #f8d79a;
  text-transform: uppercase; letter-spacing: 0.06em;
}
.kc-mid { display: flex; align-items: center; gap: 16px; margin-top: 20px; flex-wrap: wrap; }
.kc-avatar { width: 76px; height: 76px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  display: grid; place-items: center; background: linear-gradient(140deg, rgba(245,185,66,.3), rgba(125,60,255,.3));
  border: 3px solid transparent; background-clip: padding-box; box-shadow: 0 0 0 2px rgba(245,185,66,.55); }
.kc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.kc-initial { font-size: 26px; font-weight: 800; color: #ffe9b0; }
.kc-who { display: flex; flex-direction: column; gap: 6px; min-width: 0; flex: 1 1 190px; }
.kc-name { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.kc-code { font-size: 14px; color: #f8d79a; font-weight: 700; overflow-wrap: anywhere; }
.kc-status { align-self: flex-start; padding: 4px 11px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; }
.kc-status.ok { background: rgba(36, 208, 122, 0.16); border: 1px solid rgba(36, 208, 122, 0.45); color: #8ef0b0; }
.kc-status.exp { background: rgba(246, 70, 93, 0.16); border: 1px solid rgba(246, 70, 93, 0.45); color: #ffc0ca; }
.kc-qr { flex: 0 0 auto; text-align: center; }
.kc-qr-cap { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted-2); letter-spacing: 0.06em; margin-bottom: 6px; }
.kc-qr-img { width: 118px; height: 118px; background: #fff; border-radius: 12px; padding: 6px; display: block; }
.kc-foot { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px;
  padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, 0.14); }
.kc-foot span { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted-2); letter-spacing: 0.07em; text-transform: uppercase; }
.kc-foot strong { display: block; font-size: 17px; margin-top: 3px; }
.kc-foot > div:nth-child(2) strong { color: #f8d79a; }
.kc-back-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kc-back-head strong { font-size: 18px; }
.kc-back-band { padding: 6px 12px; border-radius: 9px; background: rgba(245, 185, 66, 0.18); color: #f8d79a;
  font-size: 12px; font-weight: 700; }
.kc-rows { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 26px; margin-top: 18px; }
.kc-row { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kc-row span { font-size: 10.5px; font-weight: 700; color: var(--muted-2); letter-spacing: 0.07em; text-transform: uppercase; }
.kc-row strong { font-size: 14.5px; overflow-wrap: anywhere; }
.kc-sign { margin-top: 22px; padding-top: 14px; border-top: 1px dashed rgba(255, 255, 255, 0.18); }
.kc-sig { display: block; font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 25px;
  color: #f8d79a; border-bottom: 1px solid rgba(255, 255, 255, 0.22); padding-bottom: 4px; max-width: 320px; }
.kc-sign small { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted-2); }
.kc-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); line-height: 1.55; }
.kyc-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.kyc-box { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px;
  border: 1px dashed var(--line-2); background: rgba(255, 255, 255, 0.03); min-width: 0; }
.kyc-cap { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.kyc-thumb { width: 100%; max-height: 150px; object-fit: cover; border-radius: 9px; }
.kyc-empty { padding: 22px 8px; text-align: center; font-size: 12.5px; color: var(--muted-2);
  border-radius: 9px; background: rgba(255, 255, 255, 0.03); }
.kyc-box input[type=file] { font-size: 12.5px; }
@media (min-width: 900px) {
  .kc-wrap { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 640px) {
  .kc-rows { grid-template-columns: minmax(0, 1fr); }
  .kc-qr { flex: 1 1 100%; }
  .kc-qr-img { margin: 0 auto; }
  .kyc-photos { grid-template-columns: minmax(0, 1fr); }
  .kc-foot { grid-template-columns: minmax(0, 1fr); gap: 10px; }
}
/* Cetak: hanya kartunya yang ikut tercetak. */
@media print {
  body.printing-card { background: #fff; }
  body.printing-card .topbar, body.printing-card .site-foot, body.printing-card .toasts,
  body.printing-card .chat-root, body.printing-card .no-print,
  body.printing-card .view:not(#view-kartu), body.printing-card #view-kartu > *:not(#kartu-wrap) { display: none !important; }
  body.printing-card .view, body.printing-card .shell { padding: 0 !important; margin: 0 !important; }
  body.printing-card .kc-wrap { display: block !important; }
  body.printing-card .kc-side { break-inside: avoid; page-break-inside: avoid; margin: 0 0 12mm; box-shadow: none; }
}

/* --- Lupa password: kode password sementara di modal admin ------------------------------ */
.temp-pw {
  font-size: 22px; font-weight: 800; letter-spacing: 0.06em; text-align: center;
  padding: 14px 16px; margin: 12px 0; border-radius: 12px;
  background: rgba(245, 185, 66, 0.12); border: 1px dashed rgba(245, 185, 66, 0.55); color: #f8d79a;
}
#pw-search-result .tbl td { vertical-align: middle; }
#pw-search-result .input { padding: 8px 10px; }
@media (max-width: 640px) {
  .temp-pw { font-size: 18px; }
}

/* ---------------------------------------------------------------- REFERRAL (11 Okt 2026)
   Kotak undangan di halaman Akun Saya + baris ringkas di halaman Kartu Anggota. */
.ref-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ref-row input { flex: 1 1 220px; min-width: 0; }
.ref-code { font-size: 16px; letter-spacing: .04em; padding: 8px 12px; border-radius: 10px;
  border: 1px solid var(--line, rgba(255,255,255,.14)); background: rgba(255,255,255,.05); }
.ref-bar { margin-top: 16px; padding: 12px 14px; border-radius: 14px; display: flex;
  gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  border: 1px solid var(--line, rgba(255,255,255,.14)); background: rgba(255,255,255,.04); }
@media (max-width: 640px) {
  .ref-bar { flex-direction: column; align-items: flex-start; }
  .ref-row input { flex: 1 1 100%; }
}
