:root {
  --brand: #8b5cf6;
  --brand-dark: #6d28d9;
  --bg: #0e1018;
  --card: #181c2b;
  --text: #e8eaf2;
  --muted: #97a1b5;
  --ok: #22c55e;
  --warn: #f59e0b;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

a { color: var(--brand); text-decoration: none; }

.appbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(16,18,28,.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: var(--text); padding: 10px 16px;
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 1px 10px rgba(0,0,0,.25);
}
.brand-center { display: flex; align-items: center; justify-content: center; }
.brand-center-logo { height: 40px; width: auto; object-fit: contain; }

.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: rgba(16,18,28,.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255,255,255,.08);
  display: flex; padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
}
.bottom-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--muted); font-size: 11px; opacity: .8;
}
.bottom-item .bi { font-size: 20px; line-height: 1; }
.bottom-item:hover, .bottom-item:active { opacity: 1; color: var(--brand); }

.container { max-width: 720px; margin: 0 auto; padding: 16px; padding-bottom: 84px; }

.card {
  background: var(--card); border-radius: 14px; padding: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); margin-bottom: 14px;
}

.grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(3, 1fr); } }

.product {
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); text-align: center;
}
  .product img { width: 100%; height: 160px; object-fit: cover; background: #20263a; }
.product .body { padding: 10px; }
.product .name { font-weight: 600; font-size: 14px; }
.product .price { color: var(--brand); font-weight: 700; margin: 6px 0; }
.btn {
  display: inline-block; background: var(--brand); color: #fff;
  border: none; border-radius: 10px; padding: 10px 16px; font-size: 15px;
  font-weight: 600; cursor: pointer; width: 100%; text-align: center;
}
.btn:active { transform: scale(.98); }
.btn.active { outline: 3px solid var(--brand); font-weight: 700; }
  .btn.secondary { background: #2a3147; color: var(--text); }
.btn.ok { background: var(--ok); }
.btn.warn { background: var(--warn); }
.btn-row { display: flex; gap: 10px; }

.size-radio { display: flex; flex-wrap: nowrap; gap: 8px; }
.size-opt { position: relative; cursor: pointer; flex: 1; }
.size-opt input { position: absolute; opacity: 0; }
  .size-opt span {
  display: block; text-align: center;
  padding: 10px 4px; border: 2px solid #3b4263; border-radius: 10px;
  font-weight: 700; background: #20263a; color: var(--text);
}
.size-opt input:checked + span { border-color: var(--brand); background: var(--brand); color: #fff; }

.color-radio { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 4px; }
.color-opt {
  display: inline-flex; flex-direction: column; align-items: center; gap: 4px;
  cursor: pointer; padding: 6px 8px; border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px; background: var(--card); min-width: 62px;
}
.color-opt input { display: none; }
.color-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); box-shadow: 0 1px 4px rgba(0,0,0,.4);
}
.color-name { font-size: 12px; color: var(--text); opacity: .9; }
.color-opt input:checked + .color-swatch { outline: 3px solid var(--brand); outline-offset: 2px; }

label { display: block; font-size: 13px; color: var(--muted); margin: 6px 0 3px; }
  input, select, textarea {
    width: 100%; padding: 10px; border: 1px solid #3b4263; border-radius: 10px;
    font-size: 15px; background: #20263a; color: var(--text);
}

.video-wrap { position: relative; width: 100%; background: #000; border-radius: 14px; overflow: hidden; }
video, #preview { width: 100%; display: block; }
#overlay { position: absolute; left: 0; top: 0; touch-action: none; }

  .receipt {
    background: var(--card); border: 2px dashed #2c3349; border-radius: 14px; padding: 20px;
    text-align: center;
  }
.receipt .code { font-size: 26px; font-weight: 800; letter-spacing: 2px; color: var(--brand); }
.receipt .paid { color: var(--ok); font-weight: 700; }
.stamp {
  display: inline-block; margin: 10px auto; padding: 8px 22px;
  color: #b91c1c; border: 4px double #b91c1c; border-radius: 10px;
  font-size: 30px; font-weight: 800; letter-spacing: 6px; text-transform: uppercase;
  transform: rotate(-13deg); opacity: .82; line-height: 1;
  text-shadow: 0 0 1px rgba(185,28,28,.4);
}

.login-wrap { display: flex; justify-content: center; padding: 24px 0; }
.login-card { width: 100%; max-width: 360px; }
.alert {
  background: #fee2e2; color: #991b1b; border: 1px solid #fecaca;
  padding: 10px 12px; border-radius: 10px; margin-bottom: 10px; font-size: 14px;
}

/* Splash / Onboarding */
.splash {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 50; overflow: hidden;
  background-color: #0e1018;
  background-image: url('../img/bg.jpg');
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  display: flex; flex-direction: column;
  padding: 24px; padding-bottom: max(28px, env(safe-area-inset-bottom));
  color: #fff;
}
.splash-content {
  position: relative; z-index: 1; flex: 1; width: 100%; max-width: 480px; margin: 0 auto;
  display: flex; flex-direction: column; justify-content: space-between; text-align: center;
}
.splash-top { padding-top: 8px; }
.splash-mid { flex: 1; display: flex; align-items: center; justify-content: center; }
.splash-logo {
  line-height: 1; margin-bottom: 18px;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.3));
}
.splash-logo img { width: 140px; height: auto; }
.ob-img {
  width: 100%; max-width: 340px; height: auto; border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35); background: rgba(255,255,255,.06);
}
.ob-logo { width: 120px; height: auto; margin-bottom: 16px; filter: drop-shadow(0 4px 10px rgba(0,0,0,.3)); }
.splash-title { font-size: 26px; font-weight: 800; margin: 0 0 8px; }
.splash-desc { font-size: 15px; line-height: 1.5; margin: 0 0 18px; color: rgba(255,255,255,.9); }
.dot-wrap { display: flex; gap: 8px; justify-content: center; margin-bottom: 18px; }
.dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(255,255,255,.4); transition: .25s; }
.dot.active { width: 22px; background: #fff; }
.splash-btns { display: flex; gap: 12px; }
.btn-skip, .btn-primary {
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: 14px; border-radius: 12px; font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; border: none;
}
.btn-skip { background: rgba(255,255,255,.18); color: #fff; }
.btn-primary { background: #fff; color: #6d28d9; box-shadow: 0 2px 10px rgba(109,40,217,.25); }
.splash-footer { margin-top: 16px; font-size: 13px; color: rgba(255,255,255,.85); }
.splash-footer a { color: #fff; font-weight: 700; text-decoration: underline; }

/* Home: promo board + sections */
.promo-banner {
  display: flex; align-items: center; gap: 14px; justify-content: space-between;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: #fff; border-radius: 16px; padding: 18px; margin-bottom: 18px;
  box-shadow: 0 8px 20px rgba(109,40,217,.25);
}
.promo-text { flex: 1; min-width: 0; }
.promo-tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .5px;
  background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 999px; margin-bottom: 8px;
}
.promo-banner h2 { margin: 0 0 6px; font-size: 20px; }
.promo-banner p { margin: 0 0 12px; font-size: 13px; line-height: 1.5; color: rgba(255,255,255,.92); }
.promo-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.promo-btns .btn { width: auto; }
.promo-art { font-size: 64px; line-height: 1; flex-shrink: 0; }

.home-section { margin-bottom: 22px; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.section-title { margin: 0; font-size: 17px; font-weight: 800; }
.section-link { color: var(--brand); font-size: 13px; font-weight: 600; text-decoration: none; }

.news-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; }
.news-card {
  flex: 0 0 78%; max-width: 300px; background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08);
}
  .news-thumb {
    height: 130px; background: #20263a; color: var(--muted); display: flex; align-items: center; justify-content: center;
    font-size: 13px; border-bottom: 1px dashed #2c3349;
  }
.news-body { padding: 10px 12px; }
.news-body strong { display: block; font-size: 14px; margin-bottom: 4px; }
.news-body p { margin: 0; font-size: 12px; color: var(--muted); }

.kaos-row { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 4px; scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch; }
.kaos-card {
  flex: 0 0 64%; max-width: 260px; background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); scroll-snap-align: start;
}
/* Kaos board: full front+back */
.kaos-board { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.kaos-board-head { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; }
.kaos-views { display: flex; gap: 8px; padding: 0 10px; }
.kaos-view { flex: 1; margin: 0; text-align: center; }
.kaos-view img { width: 100%; height: 160px; object-fit: cover; border-radius: 12px; background: #20263a; cursor: zoom-in; }
.kaos-view figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.kaos-board-info { padding: 10px 14px 12px; }

.img-zoom {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 200;
  background: rgba(0,0,0,.9); align-items: center; justify-content: center;
  cursor: zoom-out; padding: 20px;
}
.img-zoom img { max-width: 100%; max-height: 90vh; object-fit: contain; border-radius: 12px; }

.poster-view {
  margin: 0 0 12px; padding: 10px; border-radius: 14px;
  background: var(--card); border: 1px solid rgba(255,255,255,.08);
  text-align: center; cursor: zoom-in;
}
.poster-view img { display: block; width: auto; max-width: 100%; max-height: 65vh; margin: 0 auto; border-radius: 10px; }
.poster-view figcaption { font-size: 12px; margin-top: 6px; }

.sponsor-bar { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px 0 6px; }
.sponsor-logo { height: 18px; width: auto; object-fit: contain; opacity: .7; filter: grayscale(.2); }

.pay-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid rgba(255,255,255,.08); }
.pay-row:last-child { border-bottom: none; }
.pay-row span:first-child { font-size: 20px; }
.pay-row strong { font-size: 14px; }
.pay-row-link { text-decoration: none; color: var(--text); border-radius: 10px; transition: background .2s; }
.pay-row-link:hover { background: rgba(139,92,246,.12); }
.wa-icon { width: 22px; height: 22px; flex-shrink: 0; color: #25D366; }

.receipt-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.06); font-size: 14px; }
.receipt-row span:first-child { color: var(--muted); }
.receipt-row span:last-child, .receipt-row strong { text-align: right; }

/* Legacy solo card (kept for fallback) */
.kaos-card.solo { flex: 1; max-width: 100%; display: flex; align-items: center; gap: 14px; padding: 12px; }
.kaos-card.solo .solo-img { width: 45%; max-width: 220px; height: 200px; object-fit: cover; border-radius: 12px; background: #20263a; }
.kaos-card.solo .solo-info { flex: 1; text-align: left; }
.kaos-card.solo .solo-info strong { font-size: 16px; }
.kaos-card img { width: 100%; height: 180px; object-fit: cover; display: block; background: #20263a; }
.kaos-body { display: flex; align-items: center; justify-content: space-between; padding: 9px 12px; gap: 8px; }
.kaos-body strong { font-size: 14px; }
.btn.mini { padding: 7px 14px; font-size: 13px; }
.btn-row2 { display: flex; gap: 8px; }
.btn-row2 .btn { flex: 1; text-align: center; }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.pill.pending { background: #fef3c7; color: #92400e; }
.pill.waiting { background: #ffedd5; color: #9a3412; }
.pill.warn { background: #ffedd5; color: #9a3412; }
.pill.paid { background: #dcfce7; color: #166534; }
.pill.completed { background: #dbeafe; color: #1e40af; }
.pill.cancelled { background: #fee2e2; color: #991b1b; }

.center { text-align: center; }
.muted { color: var(--muted); font-size: 13px; }

/* Product detail */
.pd-hero { display: flex; gap: 12px; }
.pd-main { flex: 1; }
.pd-main img { width: 100%; height: auto; max-height: 380px; object-fit: contain; border-radius: 16px; background: #20263a; }
.pd-thumbs { display: flex; flex-direction: column; gap: 8px; width: 76px; }
.pd-thumb { background: var(--card); border: 2px solid transparent; border-radius: 12px; padding: 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pd-thumb img { width: 100%; height: 56px; object-fit: cover; border-radius: 8px; background: #20263a; }
.pd-thumb span { font-size: 11px; color: var(--muted); }
.pd-thumb.active { border-color: var(--brand); }
.pd-info { text-align: left; }
.btn.block { display: block; width: 100%; text-align: center; }
.pd-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.pill-paid { display: inline-flex; align-items: center; gap: 6px; background: rgba(139,92,246,.16); color: var(--brand); padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.dotk { width: 14px; height: 14px; border-radius: 50%; background: #111; border: 1px solid rgba(255,255,255,.4); display: inline-block; }
.pd-list { list-style: none; margin: 0; padding: 0; }
.pd-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dashed rgba(255,255,255,.1); font-size: 13px; }
.pd-list li span { color: var(--muted); }
.pd-list li strong { text-align: right; }
.size-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.size-table th, .size-table td { padding: 8px 10px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.08); }
.size-table th { color: var(--muted); font-weight: 600; }
.size-table td:first-child, .size-table th:first-child { color: var(--brand); font-weight: 700; }
.trust-row { display: flex; gap: 10px; flex-wrap: wrap; }
.trust-item { flex: 1; min-width: 120px; background: var(--card); border-radius: 12px; padding: 12px; text-align: center; }
.ti-ic { font-size: 22px; margin-bottom: 4px; }
.trust-item strong { display: block; font-size: 13px; margin-bottom: 2px; }
.trust-item span { font-size: 11px; color: var(--muted); }

/* Info pemesanan */
.info-sub { font-weight: 700; font-size: 13px; margin: 12px 0 6px; color: var(--brand); }
.info-sub:first-child { margin-top: 0; }
.info-list { margin: 0; padding-left: 18px; }
.info-list li { font-size: 13px; margin: 3px 0; color: var(--text); }
.info-contact { display: flex; gap: 10px; flex-wrap: wrap; }
.contact { flex: 1; min-width: 130px; background: var(--card); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: var(--text); display: flex; flex-direction: column; }
.contact span { font-size: 12px; color: var(--muted); }
.contact strong { font-size: 15px; }
.info-bank { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; background: var(--card); border-radius: 12px; padding: 10px 12px; }
.info-bank span:first-child { font-size: 13px; color: var(--brand); font-weight: 700; }
.info-bank strong { font-size: 18px; letter-spacing: .5px; }
.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: #111827; color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px;
  opacity: 0; transition: opacity .3s; z-index: 100; pointer-events: none;
}
.toast.show { opacity: 1; }
