:root {
  --bg: #0b0f1a;
  --bg-soft: #121829;
  --card: #161d31;
  --card-2: #1c2440;
  --line: #262f4d;
  --text: #eef2ff;
  --muted: #93a0c4;
  --gold: #ffc93c;
  --gold-2: #f7a500;
  --green: #2ecc71;
  --red: #ff5c5c;
  --radius: 16px;
  --shadow: 0 18px 40px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background:
    radial-gradient(1200px 600px at 80% -10%, #1a2440 0%, transparent 60%),
    radial-gradient(900px 500px at -10% 10%, #20182f 0%, transparent 55%),
    var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

.container { width: min(1180px, 92vw); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  backdrop-filter: blur(12px);
  background: rgba(11, 15, 26, .78);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-logo { display: inline-flex; width: 34px; height: 34px; filter: drop-shadow(0 4px 12px rgba(255,201,60,.45)); }
.brand-logo svg { width: 100%; height: 100%; display: block; }
.brand strong {
  display: block; font-size: 16px; letter-spacing: .6px; font-weight: 800;
  background: linear-gradient(90deg, #ffffff, #ffd873 75%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brand em { display: block; font-size: 11px; color: var(--muted); font-style: normal; }
.nav { display: flex; gap: 6px; align-items: center; }
.nav button {
  background: transparent; border: 0; color: var(--muted);
  font-size: 14px; padding: 9px 13px; border-radius: 10px; cursor: pointer; font-weight: 600;
}
.nav button:hover { color: var(--text); background: var(--card); }
.nav .nav-cta { background: var(--gold); color: #1a1400; }
.nav .nav-cta:hover { background: var(--gold-2); color: #1a1400; }
.hamburger { display: none; background: var(--card); border: 1px solid var(--line); color: var(--text); font-size: 20px; border-radius: 10px; padding: 4px 12px; cursor: pointer; }

/* ---------- Hero ---------- */
.hero { padding: 58px 0 30px; text-align: center; }
.hero .badge {
  display: inline-block; max-width: 780px;
  background: linear-gradient(180deg, rgba(255, 201, 60, .16), rgba(255, 201, 60, .04));
  color: #ffe9a8; border: 1px solid rgba(255, 201, 60, .38);
  padding: 9px 20px; border-radius: 999px; font-size: 13.5px; font-weight: 600;
  line-height: 1.55; letter-spacing: .2px;
  box-shadow: 0 0 0 1px rgba(255, 201, 60, .08) inset, 0 10px 30px -14px rgba(255, 201, 60, .55);
}
.hero .badge b { color: #fff; font-weight: 800; }
.hero h1 {
  font-size: clamp(30px, 6vw, 54px); margin: 16px 0 8px; letter-spacing: 1px;
  background: linear-gradient(180deg, #fff, var(--gold)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub { color: var(--muted); font-size: 16px; margin: 0 auto; max-width: 560px; }
.hero-stats { display: flex; gap: 14px; justify-content: center; margin-top: 26px; flex-wrap: wrap; }
.hero-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 22px; min-width: 120px; }
.hero-stats strong { display: block; color: var(--gold); font-size: 17px; }
.hero-stats span { font-size: 12px; color: var(--muted); }

/* ---------- Actions ---------- */
.actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin: 26px auto; }
.action-card {
  display: flex; align-items: center; gap: 12px; text-align: left; cursor: pointer;
  background: var(--card); border: 1px solid var(--line); color: var(--text);
  border-radius: 14px; padding: 16px; font-weight: 700; font-size: 14px; transition: .15s;
}
.action-card span { font-size: 22px; }
.action-card:hover { border-color: var(--gold); transform: translateY(-2px); background: var(--card-2); }
.action-card.sell { border-color: rgba(255,201,60,.45); background: linear-gradient(135deg, rgba(255,201,60,.12), rgba(255,201,60,.02)); }
.action-card.sell:hover { border-color: var(--gold); background: linear-gradient(135deg, rgba(255,201,60,.2), rgba(255,201,60,.05)); }

/* ---------- Order wrap ---------- */
.order-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 22px; margin: 34px auto; align-items: start; }
.catalog-head h2 { margin: 0 0 4px; font-size: 22px; }
.catalog-head p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }

.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.product {
  position: relative; cursor: pointer; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; transition: .15s; text-align: left; color: var(--text);
}
.product:hover { border-color: var(--gold); transform: translateY(-2px); }
.product.selected { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(255,201,60,.35) inset; background: var(--card-2); }
.product .chip-amount { font-size: 20px; font-weight: 800; color: var(--gold); }
.product .chip-amount small { font-size: 12px; color: var(--muted); display: block; font-weight: 600; }
.product .price {
  margin-top: 10px; font-weight: 800; font-size: 16px; letter-spacing: .2px;
  color: #f8fbff; text-shadow: 0 1px 10px rgba(255, 201, 60, .28);
}
.product .price .strike { color: #b9c4e0; text-decoration: line-through; font-size: 12px; font-weight: 600; margin-right: 6px; }
.product .discount {
  position: absolute; top: 10px; right: 10px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 800; padding: 2px 7px; border-radius: 7px;
}

/* ---------- Form card ---------- */
.form-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; position: sticky; top: 84px; }
.form-card h2 { margin: 0 0 14px; font-size: 18px; }
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; font-weight: 600; }
.input-row { display: flex; gap: 8px; }
.field input {
  width: 100%; background: #0e1425; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 13px; font-size: 15px; outline: none;
}
.field input:focus, .field select:focus { border-color: var(--gold); }
.field select {
  width: 100%; background: #0e1425; border: 1px solid var(--line); color: var(--text);
  border-radius: 10px; padding: 11px 13px; font-size: 15px; outline: none; cursor: pointer;
}
.input-row input { flex: 1; }
.input-suffix { position: relative; }
.input-suffix input { padding-right: 40px; }
.input-suffix em {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font-style: normal; font-weight: 800; font-size: 15px; color: var(--gold);
  opacity: 0; transition: opacity .12s; pointer-events: none;
}
.input-suffix.has-value em { opacity: 1; }
.hint { display: block; margin-top: 6px; font-size: 12px; color: var(--muted); }
.hint.ok { color: var(--green); }
.hint.err { color: var(--red); }
.hint.warn { color: var(--gold); }

.selected-box { background: #0e1425; border: 1px dashed var(--line); border-radius: 12px; padding: 14px; margin: 6px 0 16px; font-size: 14px; }
.selected-box .line { display: flex; justify-content: space-between; margin-top: 6px; }
.selected-box .line b { color: var(--gold); }

button { font-family: inherit; color: inherit; }
.btn-primary {
  width: 100%; border: 0; cursor: pointer; font-weight: 800; font-size: 15px;
  background: linear-gradient(180deg, var(--gold), var(--gold-2)); color: #1a1400;
  padding: 13px; border-radius: 12px; transition: .15s;
}
.btn-primary:hover:not(:disabled) { filter: brightness(1.06); }
.btn-primary:disabled { opacity: .45; cursor: not-allowed; }
.btn-ghost { background: var(--card-2); color: var(--text); border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; cursor: pointer; font-weight: 700; white-space: nowrap; }
.btn-ghost:hover { border-color: var(--gold); }
.terms { font-size: 11px; color: var(--muted); margin: 12px 0 0; }

/* ---------- Trust ---------- */
.trust { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 30px auto; }
.trust-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; text-align: center; }
.trust-card span { font-size: 26px; }
.trust-card b { display: block; margin: 8px 0 4px; }
.trust-card p { margin: 0; color: var(--muted); font-size: 13px; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: 30px; padding: 24px 0; text-align: center; color: var(--muted); font-size: 13px; }
.site-footer .fine { font-size: 11px; opacity: .8; margin: 6px 0 0; }

/* ---------- Modal ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 60; display: none;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(4, 7, 14, .72); backdrop-filter: blur(4px);
}
.modal-overlay.open { display: flex; animation: fade .18s ease; }
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.modal {
  position: relative; width: min(560px, 100%); max-height: 90vh; overflow: auto;
  background: var(--bg-soft); border: 1px solid var(--line); border-radius: 18px; padding: 24px; box-shadow: var(--shadow);
  animation: pop .2s ease;
}
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: .6 } to { transform: none; opacity: 1 } }
.modal-wide { width: min(720px, 100%); }
.modal h3 { margin: 0 0 4px; font-size: 20px; }
.modal a { color: var(--gold); }

.info-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 18px; }
.info-card { background: #0e1425; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.info-card h4 { margin: 0 0 8px; font-size: 12px; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; }
.info-card .row { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; padding: 3px 0; }
.info-card .row span { color: var(--muted); }
.info-card .row b { text-align: right; }
.modal-close { position: absolute; top: 12px; right: 14px; background: transparent; border: 0; color: var(--muted); font-size: 26px; cursor: pointer; line-height: 1; }
.modal-close:hover { color: var(--text); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.center { text-align: center; }
.fine { font-size: 11px; color: var(--muted); }

.id-note {
  margin: 12px 0 0; padding: 10px 12px; border-radius: 10px;
  background: rgba(255, 201, 60, .08); border-left: 3px solid var(--gold);
  font-size: 12px; line-height: 1.5; color: #d7def2; font-style: italic;
}

.summary { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 18px 0; }
.summary-col { background: #0e1425; border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.summary-col h4 { margin: 0 0 10px; font-size: 13px; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; }
.summary .row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; padding: 4px 0; }
.summary .row span { color: var(--muted); }
.summary .row.total { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; font-size: 15px; }
.summary .row.total b { color: var(--gold); }

.verify-box { display: flex; gap: 10px; align-items: center; background: rgba(255,201,60,.08); border: 1px solid rgba(255,201,60,.3); border-radius: 12px; padding: 13px; font-size: 13px; cursor: pointer; }
.verify-box input { width: 18px; height: 18px; accent-color: var(--gold); }

.modal-actions { display: flex; gap: 10px; margin-top: 18px; }
.modal-actions .btn-primary, .modal-actions .btn-ghost { flex: 1; }

/* Payment */
.pay-head { display: flex; justify-content: space-between; align-items: center; margin: 14px 0; }
.order-code { font-size: 20px; font-weight: 800; color: var(--gold); letter-spacing: 1px; }
.countdown { font-size: 18px; font-weight: 800; color: var(--red); }
.qr-mock {
  width: 190px; height: 190px; margin: 8px auto 12px; border-radius: 12px; background: #fff;
  background-image:
    linear-gradient(90deg, #111 4px, transparent 4px), linear-gradient(#111 4px, transparent 4px),
    linear-gradient(90deg, #111 2px, transparent 2px), linear-gradient(#111 2px, transparent 2px);
  background-size: 24px 24px, 24px 24px, 12px 12px, 12px 12px;
  background-position: 0 0, 0 0, 0 0, 0 0;
  border: 8px solid #fff;
}
.amount-row { display: flex; justify-content: space-between; font-size: 16px; background: #0e1425; border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin: 12px 0; }
.amount-row b { color: var(--gold); }

/* Status */
.status-result { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; }
.status-box { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #0e1425; font-size: 13px; }
.status-box .row { display: flex; justify-content: space-between; padding: 5px 0; }
.status-box .row span { color: var(--muted); }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.pill.FULFILLED { background: rgba(46,204,113,.15); color: var(--green); }
.pill.PAID { background: rgba(255,201,60,.15); color: var(--gold); }
.pill.PENDING { background: rgba(147,160,196,.18); color: var(--muted); }
.pill.REQUESTED { background: rgba(147,160,196,.18); color: var(--muted); }
.pill.VERIFIED, .pill.PAIDOUT { background: rgba(46,204,113,.15); color: var(--green); }
.pill.FAILED { background: rgba(255,92,92,.15); color: var(--red); }

.payout-box { display: flex; justify-content: space-between; background: #0e1425; border: 1px solid var(--line); border-radius: 12px; padding: 13px 16px; margin: 6px 0 16px; }
.payout-box b { color: var(--gold); }

.steps { color: var(--text); font-size: 14px; padding-left: 20px; }
.steps li { margin-bottom: 8px; }

/* ---------- Halaman Request Bongkar ---------- */
.page-view { position: fixed; inset: 0; z-index: 55; background: var(--bg); overflow-y: auto; display: none; }
.page-view.open { display: block; animation: fade .2s ease; }
.page-topbar { position: sticky; top: 0; background: rgba(11,15,26,.9); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.page-topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 62px; }
.brand-small { font-weight: 800; letter-spacing: .5px; }

.req-wrap { padding: 26px 0 60px; }
.req-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.req-total { text-align: center; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.req-chip { font-size: 40px; font-weight: 800; color: var(--gold); line-height: 1.1; }
.req-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0; }
.req-mini { background: #0e1425; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.req-mini b { display: block; margin-top: 4px; font-size: 16px; }
.gold { color: var(--gold); }
.req-rows { border-top: 1px solid var(--line); padding-top: 12px; }
.req-rows .row { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; }
.req-rows .row span { color: var(--muted); }
.req-rows .row.total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; font-size: 16px; }
.req-rows .row.total b { color: var(--gold); }
.req-trx { margin-top: 16px; background: #0e1425; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; }
.trx-id { font-family: Consolas, monospace; font-size: 14px; margin-top: 4px; word-break: break-all; }

.req-instruction { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; }
.req-instruction > p { font-size: 15px; }
.dest-box { background: #0e1425; border: 1px solid var(--gold); border-radius: 12px; padding: 14px 16px; margin: 12px 0; text-align: center; }
.dest-id { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 6px; }
.dest-id b { font-size: 26px; letter-spacing: 2px; color: var(--gold); font-family: Consolas, monospace; }

.upload-box { background: #0e1425; border: 1px dashed var(--line); border-radius: 12px; padding: 16px; margin-top: 14px; }
.upload-label { display: block; cursor: pointer; margin-bottom: 12px; }
.upload-label b { display: block; }
.upload-label span { font-size: 12px; color: var(--muted); }
.upload-picked { font-size: 13px; color: var(--green); margin-bottom: 12px; }

.req-status { margin-top: 16px; background: rgba(255,201,60,.08); border: 1px solid rgba(255,201,60,.35); border-radius: 12px; padding: 16px; }
.req-status.ok { background: rgba(46,204,113,.1); border-color: rgba(46,204,113,.4); }
.req-status h4 { margin: 0 0 4px; }

/* ---------- Halaman Pembayaran QRIS ---------- */
.pay-page { padding: 40px 0 70px; max-width: 480px; }
.pay-total-big { text-align: center; font-size: 34px; font-weight: 800; color: var(--gold); margin-bottom: 18px; }
.pay-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 12px; }
.pay-trx { background: #0e1425; border: 1px dashed var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 22px; }
.pay-qr { display: block; width: 100%; max-width: 320px; height: auto; margin: 8px auto 16px; background: #fff; border-radius: 12px; padding: 8px; object-fit: contain; }
.pay-timer-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.pay-actions { display: flex; gap: 10px; margin-top: 18px; }
.pay-actions a, .pay-actions button { flex: 1; }
#btnDownloadQr { width: 100%; }

.section-label { margin: 16px 0 8px; font-size: 13px; color: var(--gold); text-transform: uppercase; letter-spacing: .5px; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.tag.muted { background: rgba(147,160,196,.18); color: var(--muted); }
.tag.gold { background: rgba(255,201,60,.15); color: var(--gold); }
.tag.green { background: rgba(46,204,113,.15); color: var(--green); }
.tag.warn { background: rgba(255,140,0,.16); color: #ffab40; }
.tag.red { background: rgba(255,92,92,.15); color: var(--red); }

/* ---------- Toast ---------- */
.toast-stack { position: fixed; bottom: 18px; right: 18px; z-index: 80; display: flex; flex-direction: column; gap: 10px; }
.toast {
  background: var(--card-2); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: var(--shadow); min-width: 240px;
  animation: slide .25s ease;
}
.toast.ok { border-left-color: var(--green); }
.toast.err { border-left-color: var(--red); }
@keyframes slide { from { transform: translateX(20px); opacity: 0 } to { transform: none; opacity: 1 } }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .order-wrap { grid-template-columns: 1fr; }
  .form-card { position: static; }
  .actions { grid-template-columns: repeat(2, 1fr); }
  .summary { grid-template-columns: 1fr; }
  .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .container { width: min(100%, 94vw); }
  .header-inner { height: 60px; }
  .brand-logo { width: 30px; height: 30px; }
  .brand strong { font-size: 14px; }
  .brand em { font-size: 10px; }

  .nav {
    position: absolute; top: 60px; left: 0; right: 0; flex-direction: column; gap: 4px;
    background: var(--bg-soft); border-bottom: 1px solid var(--line); padding: 10px;
    display: none; box-shadow: var(--shadow); max-height: 70vh; overflow-y: auto;
  }
  .nav.open { display: flex; animation: fade .18s ease; }
  .nav button { width: 100%; text-align: left; padding: 12px 14px; }
  .hamburger { display: block; }

  .hero { padding: 40px 0 22px; }
  .hero .sub { font-size: 14px; }
  .hero-stats { gap: 10px; }
  .hero-stats div { min-width: 96px; padding: 8px 16px; }

  .actions { grid-template-columns: 1fr; gap: 10px; margin: 20px auto; }
  .action-card { padding: 14px; }

  .product-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); gap: 10px; }
  .product { padding: 12px; }
  .product .chip-amount { font-size: 18px; }

  .trust { grid-template-columns: 1fr; }

  .modal { padding: 18px; border-radius: 16px; }
  .modal h3 { font-size: 18px; }
  .modal-wide { width: 100%; }

  .pay-page { padding: 26px 0 50px; }
  .pay-total-big { font-size: 28px; }
  .pay-qr { width: 100%; max-width: 240px; height: auto; }

  .req-wrap { padding: 18px 0 48px; }
  .req-chip { font-size: 32px; }
  .dest-id b { font-size: 21px; }
  .req-grid2, .pay-meta { gap: 10px; }

  .toast-stack { left: 12px; right: 12px; bottom: 12px; }
  .toast { min-width: 0; }
}

@media (max-width: 380px) {
  .hero h1 { font-size: 26px; }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .req-grid2, .pay-meta { grid-template-columns: 1fr; }
  .modal-actions { flex-direction: column; }
}
