/* ============================================================
   UnlockTool Seller — Styles
   Compact single-card layout with modern e-wallet picker
   ============================================================ */

/* ---- Design tokens ---- */
:root {
  --bg: #0d0c11;
  --paper: #16151d;
  --ink: #e8e4f0;
  --muted: #8a8498;
  --line: #2c2936;
  --accent: #c49a3c;
  --accent-deep: #e8b84b;
  --ok: #26c775;
  --warn: #e8943a;
  --error: #e05060;
  --shadow-card: 0 32px 80px rgba(0, 0, 0, 0.55), 0 4px 16px rgba(0, 0, 0, 0.38);
  --radius-card: 22px;
  --radius-md: 14px;
  --radius-sm: 10px;
}

/* ---- Reset ---- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  font-size: 108%;
}
html,
body {
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

body {
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 80% -10%, rgba(196, 154, 60, 0.12), transparent 36%),
    radial-gradient(circle at 10% 25%, rgba(80, 60, 160, 0.09), transparent 30%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.5;
}

h1, h2, h3 {
  font-family: "Prata", serif;
  line-height: 1.2;
  margin-top: 0;
}

/* ---- Noise overlay ---- */
.noise-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.17;
  background-image: radial-gradient(rgba(0, 0, 0, 0.06) 0.45px, transparent 0.45px);
  background-size: 3px 3px;
}

/* ---- Footer container utility ---- */
.container {
  width: min(1080px, 92vw);
  margin: 0 auto;
}

/* ===========================================================
   MAIN WRAP — centers the card vertically
   =========================================================== */
.main-wrap {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 50px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 1rem 0.8rem 0.7rem;
}

/* ===========================================================
   CHECKOUT CARD — outer shell
   =========================================================== */
.checkout-card {
  width: min(660px, 100%);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-card);
  /* overflow: clip — visually sama dengan hidden tapi tidak jadi scroll container,
     sehingga position: sticky pada .checkout-cta-bar di dalam card tetap bekerja */
  overflow: clip;
  animation: card-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-in {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- Card header bar ---- */
.card-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.56rem;
  padding: 0.72rem 1.08rem;
  border-bottom: 1px solid var(--line);
  background: rgba(22, 21, 29, 0.85);
}

.brand {
  font-family: "Prata", serif;
  font-size: 0.96rem;
  letter-spacing: 0.01em;
  margin-right: auto;
}

.header-link {
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.62rem;
}

.header-link:hover {
  border-color: var(--accent);
}

.secure-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--ok);
  background: rgba(15, 122, 68, 0.08);
  border: 1px solid rgba(15, 122, 68, 0.22);
  border-radius: 999px;
  padding: 0.22rem 0.65rem;
}

.promo-strip {
  border-bottom: 1px solid var(--line);
  padding: 0.56rem 1.08rem;
  background: linear-gradient(90deg, rgba(196, 154, 60, 0.18), rgba(196, 154, 60, 0.04));
}

.promo-title {
  margin: 0;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent-deep);
}

.promo-caption {
  margin: 0.18rem 0 0;
  font-size: 0.72rem;
  color: #ddd4bc;
}

/* ===========================================================
   PACKAGE SELECTOR
   =========================================================== */
.pkg-selector {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.5rem;
  padding: 0.82rem 1.08rem;
  border-bottom: 1px solid var(--line);
  background: rgba(18, 17, 24, 0.6);
}

.package-loading {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.package-card {
  position: relative;
  background: #1e1c28;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.56rem 0.42rem 0.52rem;
  cursor: pointer;
  text-align: center;
  -webkit-user-select: none;
  user-select: none;
  transition:
    border-color 0.18s ease,
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

.package-card:hover,
.package-card:focus-visible {
  border-color: rgba(160, 118, 48, 0.7);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(120, 84, 26, 0.1);
  outline: none;
}

.package-card.selected {
  border-color: var(--accent);
  background: linear-gradient(155deg, #231f14, #2a2210);
  box-shadow: 0 0 0 3px rgba(196, 154, 60, 0.18);
}

/* "Terlaris" badge */
.pkg-badge {
  display: none;
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #000;
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  white-space: nowrap;
}

.package-card.featured .pkg-badge {
  display: inline-block;
}

.pkg-dur {
  margin: 0 0 0.14rem;
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-deep);
}

.pkg-name {
  margin: 0 0 0.24rem;
  font-family: "Prata", serif;
  font-size: 0.84rem;
  line-height: 1.2;
}

.pkg-price {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
}

.pkg-price-original {
  font-size: 0.8rem;
  color: var(--error);
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  margin-bottom: 0.1rem;
}

.pkg-price-promo {
  color: var(--ok);
}

/* ===========================================================
   FORM WRAP
   =========================================================== */
.form-wrap {
  position: relative;
  padding: 0.9rem 1.08rem 1rem;
}

.form-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
  align-items: start;
}

.form-col {
  display: flex;
  flex-direction: column;
  gap: 0.62rem;
}

/* ---- Text input field ---- */
.field {
  display: flex;
  flex-direction: column;
  gap: 0.22rem;
}

.field-label,
.field > span.field-label {
  font-size: 0.64rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
}

/* Wrapper konsisten untuk semua input teks */
.input-wrap {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
}

.input-wrap .form-input,
.input-wrap input[type="text"],
.input-wrap input[type="tel"],
.input-wrap input[type="email"],
.input-wrap input[type="password"],
.input-wrap input[type="search"],
.input-wrap input[type="url"],
.input-wrap input[type="number"] {
  flex: 1;
  min-width: 0;
}

.field .form-input,
.field input[type="text"],
.field input[type="tel"],
.field input[type="email"],
.field input[type="password"],
.field input[type="search"],
.field input[type="url"],
.field input[type="number"] {
  width: 100%;
  min-height: 38px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 0.52rem 0.66rem;
  font: inherit;
  font-size: 0.82rem;
  line-height: 1.35;
  -webkit-appearance: none;
  appearance: none;
  background: #1e1c28;
  color: var(--ink);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field .form-input::placeholder,
.field input[type="text"]::placeholder,
.field input[type="tel"]::placeholder,
.field input[type="email"]::placeholder,
.field input[type="password"]::placeholder,
.field input[type="search"]::placeholder,
.field input[type="url"]::placeholder,
.field input[type="number"]::placeholder {
  color: #504d5e;
}

.field .form-input:focus,
.field input[type="text"]:focus,
.field input[type="tel"]:focus,
.field input[type="email"]:focus,
.field input[type="password"]:focus,
.field input[type="search"]:focus,
.field input[type="url"]:focus,
.field input[type="number"]:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 154, 60, 0.14);
}

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-top: 0.12rem;
  padding: 0.12rem 0.05rem;
  cursor: pointer;
}

.consent-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin-top: 0.12rem;
  accent-color: var(--accent);
  flex-shrink: 0;
}

.consent-check span {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.consent-check:hover span {
  color: var(--ink);
}

.field small {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.anti-spam-input {
  display: none !important;
}

/* ---- Trust list ---- */
.trust-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.trust-list li {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.35;
}

.trust-list li::before {
  content: '';
  display: inline-block;
  flex-shrink: 0;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background-color: var(--ok);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' fill='none'%3E%3Cpath d='M2.5 6l2 2 4.5-4.5' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-size: 11px 11px;
  background-position: center;
  background-repeat: no-repeat;
}

/* ===========================================================
   E-WALLET PICKER
   =========================================================== */
.wallet-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.34rem;
  margin-top: 0.28rem;
}

.wallet-card {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 0.36rem;
  padding: 0.42rem 0.46rem 0.4rem 0.42rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  cursor: pointer;
  background: #1e1c28;
  -webkit-user-select: none;
  user-select: none;
  text-align: left;
  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    transform 0.15s ease;
}

.wallet-card:hover {
  border-color: rgba(196, 154, 60, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.3);
}

.wallet-card:focus-visible {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 154, 60, 0.18);
}

.wallet-card:has(input:focus-visible) {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(196, 154, 60, 0.18);
}

/* Sembunyikan input radio bawaan */
.wallet-card input[type="radio"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  margin: 0;
  cursor: pointer;
}

.wallet-gopay {
  --ico-bg: #00aa5b;
}

.wallet-card.wallet-gopay {
  min-height: 36px;
  padding-top: 0.36rem;
  padding-bottom: 0.34rem;
}

.wallet-shopeepay {
  --ico-bg: #ef4f2f;
}

.wallet-dana {
  --ico-bg: #0396d6;
}

.wallet-ovo {
  --ico-bg: #4c4f56;
}

.wallet-qris {
  --ico-bg: #6f6f77;
}

/* Keadaan terpilih lewat kelas + :has() agar dukungan lebih luas */
.wallet-card.is-selected,
.wallet-card:has(input:checked) {
  border-color: var(--accent);
  background: linear-gradient(155deg, #231f14, #2a2210);
  box-shadow: 0 0 0 2.5px rgba(196, 154, 60, 0.22);
}

/* Desktop layout: stack e-wallet options vertically so full payment names are visible */
@media (min-width: 900px) {
  .wallet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .wallet-card {
    align-items: center;
    text-align: left;
  }

  .wallet-name {
    white-space: nowrap;
  }
}

/* Colored brand icon box */
.wallet-ico {
  width: 34px;
  height: 34px;
  min-width: 34px;
  border-radius: 12px;
  background: var(--ico-bg, #888);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.wallet-ico svg {
  width: 56%;
  height: 56%;
  display: block;
}

.wallet-name {
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 1.8rem);
}

/* Badge centang di pojok kanan atas */
.wallet-tick {
  position: absolute;
  top: 3px;
  right: 3px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
}

.wallet-card.is-selected .wallet-tick,
.wallet-card:has(input:checked) .wallet-tick {
  display: flex;
}

.payment-fixed-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  margin-top: 0.18rem;
  border: 1px solid rgba(196, 154, 60, 0.35);
  border-radius: 999px;
  padding: 0.34rem 0.72rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #ffe7b0;
  background: linear-gradient(145deg, rgba(196, 154, 60, 0.22), rgba(196, 154, 60, 0.08));
}

.payment-fixed-badge::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: #4ad37d;
  box-shadow: 0 0 0 3px rgba(74, 211, 125, 0.2);
}

.turnstile-box {
  margin-top: 0.72rem;
  padding: 0.44rem;
  border-radius: 12px;
  border: 1px solid rgba(196, 154, 60, 0.3);
  background: rgba(26, 24, 33, 0.78);
}

/* ===========================================================
   ORDER SUMMARY BAR
   =========================================================== */
.summary-bar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.46rem;
  background: linear-gradient(155deg, #231f14, #2a2210);
  border: 1px dashed rgba(196, 154, 60, 0.36);
  border-radius: var(--radius-sm);
  padding: 0.36rem 0.5rem;
}

.summary-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas:
    "label title"
    "discount discount";
  align-items: center;
  column-gap: 0.38rem;
  row-gap: 0.04rem;
  min-width: 0;
}

.summary-label {
  grid-area: label;
  margin: 0;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  font-weight: 700;
  color: var(--muted);
}

.summary-title {
  grid-area: title;
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  min-width: 0;
}

.summary-discount {
  grid-area: discount;
  margin: 0;
  font-size: 0.66rem;
  color: #d5cca8;
}

.summary-discount:empty {
  display: none;
}

.summary-price {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--accent-deep);
  white-space: nowrap;
  flex-shrink: 0;
  align-self: center;
}

/* ===========================================================
   BUTTONS
   =========================================================== */
.btn-primary,
.btn-secondary,
.btn-ghost {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: var(--radius-sm);
  font: inherit;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 0 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
}

.btn-primary {
  margin-top: 0.62rem;
  width: 100%;
  font-size: 0.88rem;
  background: linear-gradient(145deg, var(--accent), #a87e28);
  color: #0d0c11;
  box-shadow: 0 4px 18px rgba(196, 154, 60, 0.3);
}

.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 26px rgba(196, 154, 60, 0.42);
}

.btn-primary:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.btn-secondary {
  background: var(--ink);
  color: #fff;
  border-radius: var(--radius-sm);
}

.btn-secondary:hover { opacity: 0.87; }

.btn-ghost {
  border: 1.5px solid var(--line);
  background: transparent;
  color: var(--ink);
}

.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }

/* ---- Form status message ---- */
/* ===========================================================
   CHECKOUT CTA BAR — wraps summary-bar + pay button
   Sticky bottom on small screens when vertical scroll is active
   =========================================================== */
.checkout-cta-bar {
  position: relative;
  z-index: 8;
}

.form-wrap.is-pending-locked .checkout-cta-bar {
  /* Saat sticky di mobile, elemen ini membentuk stacking context sendiri.
     z-index harus di atas .pending-checkout-overlay (12) agar tombol Bayar tetap terlihat. */
  z-index: 16;
}

.form-wrap.is-pending-locked #orderSummary {
  visibility: hidden;
  pointer-events: none;
}

.pending-checkout-overlay {
  position: absolute;
  inset: 0;
  z-index: 12;
  border-radius: 14px;
  display: grid;
  place-items: center;
  padding: 0.95rem;
  background: rgba(8, 10, 15, 0.5);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.pending-checkout-overlay__note {
  width: min(100%, 440px);
  border: 1px solid rgba(196, 154, 60, 0.42);
  border-radius: 12px;
  background: rgba(20, 18, 29, 0.9);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
  padding: 0.78rem 0.86rem;
  text-align: center;
}

.pending-checkout-overlay__note h4 {
  margin: 0;
  font-size: 0.88rem;
  color: #f5be79;
}

.pending-checkout-overlay__note p {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: #d7d1e7;
  line-height: 1.42;
}

/* Jalan keluar wajib: kalau QRIS gagal ditampilkan, ini satu-satunya cara buyer
   melepas lock pending tanpa menunggu expiry. Harus selalu bisa diklik. */
.pending-checkout-overlay__cancel {
  margin-top: 0.6rem;
  min-height: 44px;
  padding-inline: 1rem;
  font-size: 0.78rem;
}

.form-wrap.is-pending-locked .form-body {
  pointer-events: none;
}

.form-wrap.is-pending-locked #pendingPayButton {
  position: relative;
  z-index: 14;
}

.form-message {
  min-height: 1.2rem;
  margin: 0.36rem 0 0;
  font-size: 0.76rem;
  text-align: center;
}

.form-message.error   { color: var(--error); }
.form-message.success { color: var(--ok); }

/* ===========================================================
   RESULT CARD
   =========================================================== */
.result-card {
  margin: 0 1.08rem 0.92rem;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-md);
  padding: 0.86rem;
  background: #1e1c28;
  animation: card-in 0.35s ease both;
}

.result-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.05rem;
}

.order-id-text {
  margin: 0 0 0.75rem;
  font-size: 0.83rem;
  color: var(--muted);
}

.result-actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.status-message {
  margin: 0.56rem 0 0;
  font-size: 0.78rem;
}

.status-message.pending { color: var(--warn); }
.status-message.success { color: var(--ok); }
.status-message.failed  { color: var(--error); }

.status-detail-wrap {
  margin-top: 0.85rem;
  border: 1px solid #342f43;
  border-radius: 10px;
  background: #1a1725;
  padding: 0.72rem;
}

.status-detail-wrap h4 {
  margin: 0 0 0.45rem;
  font-size: 0.84rem;
  letter-spacing: 0.02em;
  color: #ddd4bc;
}

.status-detail-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(110px, 155px) 1fr;
  gap: 0.34rem 0.6rem;
}

.status-detail-list dt {
  margin: 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.status-detail-list dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 600;
  word-break: break-word;
}

/* ===========================================================
   FOOTER
   =========================================================== */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid rgba(196, 154, 60, 0.12);
  padding: 0.62rem 0 0.82rem;
  color: var(--muted);
  font-size: 0.74rem;
  text-align: center;
}

.site-footer .container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.32rem;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.68rem;
}

.site-footer-links a {
  color: #d4bf90;
  text-decoration: none;
  font-size: 0.78rem;
}

.site-footer-links a:hover {
  text-decoration: underline;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.68);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 1rem;
  overflow-y: auto;
  animation: modal-overlay-enter 180ms ease-out;
}

#cancelPendingModal {
  z-index: 24;
}

.modal-card {
  width: min(520px, 100%);
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #171521;
  box-shadow: 0 30px 75px rgba(0, 0, 0, 0.48);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  animation: modal-card-enter 220ms cubic-bezier(0.2, 0.82, 0.2, 1) both;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  border-bottom: 1px solid var(--line);
  padding: 0.8rem 1rem;
}

.modal-head h3 {
  margin: 0;
  font-size: 1rem;
}

.modal-close-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  min-height: 34px;
  padding: 0 0.7rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.modal-body {
  padding: 0.9rem 1rem 1rem;
  display: grid;
  gap: 0.6rem;
  min-height: 0;
  overflow-y: auto;
}

.modal-description {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
}

.credential-row {
  border: 1px solid #332f42;
  border-radius: 10px;
  padding: 0.62rem;
  display: grid;
  grid-template-columns: 86px 1fr auto;
  align-items: center;
  gap: 0.6rem;
  background: #1f1c2b;
}

.credential-label {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.credential-value {
  margin: 0;
  font-weight: 700;
  word-break: break-all;
}

.copy-inline-btn {
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 34px;
  padding: 0 0.68rem;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

.modal-copy-message {
  margin: 0;
  min-height: 1rem;
  font-size: 0.84rem;
  color: var(--muted);
}

.modal-card-compact {
  width: min(430px, 100%);
}

.modal-body-compact {
  gap: 0.5rem;
}

.modal-confirm-card {
  width: min(430px, 100%);
}

.modal-confirm-message {
  margin: 0;
  color: #e7e2f4;
  font-size: 0.9rem;
  line-height: 1.46;
}

.modal-confirm-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.modal-confirm-actions .btn-ghost,
.modal-confirm-actions .btn-primary {
  flex: 1;
}

.validation-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.validation-message {
  margin: 0;
  color: #f2d59f;
  font-size: 0.9rem;
  line-height: 1.42;
}

.validation-ok-btn {
  margin-top: 0.16rem;
}

.qris-modal-body {
  gap: 0.55rem;
}

/* Modal QRIS lebih compact — max-width dikecilkan */
.qris-payment-card {
  width: min(460px, 100%);
  position: relative; /* Dibutuhkan untuk overlay sukses */
}

.qris-meta-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.38rem;
}

.qris-meta-grid p {
  margin: 0;
  border: 1px solid #332f42;
  border-radius: 8px;
  background: #1f1c2b;
  padding: 0.36rem 0.46rem;
  display: grid;
  gap: 0.14rem;
}

.qris-meta-grid span {
  font-size: 0.66rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--muted);
}

.qris-meta-grid strong {
  font-size: 0.8rem;
  line-height: 1.3;
  word-break: break-word;
}

.qris-partner-note {
  margin: 0.12rem 0 0;
  display: grid;
  gap: 0.06rem;
  text-align: center;
  color: #e9dfc8;
  font-size: 0.78rem;
  line-height: 1.3;
}

.qris-partner-note span:first-child {
  font-weight: 700;
  letter-spacing: 0.03em;
}

.qris-image-wrap {
  border: 1px dashed rgba(196, 154, 60, 0.38);
  border-radius: 12px;
  padding: 0.6rem;
  background: radial-gradient(circle at top, rgba(196, 154, 60, 0.14), rgba(23, 21, 33, 0.95));
  display: flex;
  justify-content: center;
}

.qris-image-wrap img {
  width: min(220px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
  padding: 0.44rem;
}

.qris-warning-note {
  margin: 0 0 0.5rem 0;
  padding: 0.58rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(224, 80, 96, 0.58);
  background: rgba(224, 80, 96, 0.18);
  color: #e05060;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  font-weight: 700;
}

.qris-return-browser-note {
  margin: 0;
  padding: 0.58rem 0.72rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 149, 0, 0.58);
  background: rgba(255, 149, 0, 0.18);
  color: #ff9a1f;
  font-size: 0.82rem;
  line-height: 1.4;
  text-align: center;
  font-weight: 700;
}

/* Tombol cek status manual di modal QRIS — warna orange sesuai tema */
.qris-check-btn {
  width: 100%;
  font-size: 0.88rem;
  min-height: 40px;
  background: linear-gradient(135deg, #c4943c, #d4a84b);
  color: #0e0c18;
  border: none;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: opacity 0.15s;
}

.qris-check-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.qris-check-btn:not(:disabled):hover {
  opacity: 0.88;
}

.qris-actions {
  justify-content: center;
  gap: 0.5rem;
}

@keyframes modal-overlay-enter {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes modal-card-enter {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.98);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal-overlay,
  .modal-card {
    animation: none !important;
  }

  .result-pill,
  .result-pill--pending .result-pill-icon,
  .result-account-highlight {
    animation: none !important;
  }

  .result-detail-chevron {
    transition: none;
  }
}

/* Tombol kecil di baris aksi bawah modal */
.qris-action-sm {
  font-size: 0.78rem;
  min-height: 34px;
  padding: 0 0.8rem;
}

.qris-action-danger {
  border-color: rgba(224, 80, 96, 0.45);
  color: #f4b8bf;
}

.qris-action-danger:hover {
  background: rgba(224, 80, 96, 0.14);
}

/* ===========================================================
   PAYMENT RESULT PAGE
   =========================================================== */
.result-page-card {
  width: min(560px, 100%);
}

.result-page-body {
  padding: 0.95rem 0.95rem 0.9rem;
  display: grid;
  gap: 0.6rem;
}

/* ---- Hero status ---- */
.result-hero {
  display: grid;
  justify-items: center;
  gap: 0.3rem;
  text-align: center;
  padding: 0.15rem 0 0.1rem;
}

.result-page-lead {
  margin: 0;
  font-family: "Prata", serif;
  font-size: 1.24rem;
  line-height: 1.22;
  text-wrap: balance;
}

.result-page-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 44ch;
  text-wrap: balance;
}

.result-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.44rem;
  border-radius: 999px;
  font-size: 0.71rem;
  letter-spacing: 0.11em;
  font-weight: 800;
  padding: 0.26rem 0.78rem 0.26rem 0.3rem;
  min-height: 34px;
  border: 1px solid transparent;
  animation: result-hero-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.result-pill-icon {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  line-height: 1;
  font-weight: 800;
}

.result-pill-text {
  line-height: 1;
}

@keyframes result-hero-in {
  from {
    opacity: 0;
    transform: translateY(-6px) scale(0.94);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* Denyut hanya untuk status sementara (pending). Status final tidak beranimasi
   supaya halaman yang dibiarkan terbuka tidak membakar CPU tanpa guna. */
@keyframes result-dot-blink {
  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.42;
  }
}

.result-pill--pending {
  background: rgba(232, 148, 58, 0.12);
  color: #f5be79;
  border-color: rgba(232, 148, 58, 0.35);
}

.result-pill--pending .result-pill-icon {
  color: #f5be79;
  background: rgba(232, 148, 58, 0.2);
  animation: result-dot-blink 1.5s ease-in-out infinite;
}

.result-pill--success {
  background: rgba(38, 199, 117, 0.14);
  color: #8de6b7;
  border-color: rgba(38, 199, 117, 0.42);
}

.result-pill--success .result-pill-icon {
  color: #0b2c1a;
  background: #26c775;
}

.result-pill--failed {
  background: rgba(224, 80, 96, 0.15);
  color: #f4b8bf;
  border-color: rgba(224, 80, 96, 0.45);
}

.result-pill--failed .result-pill-icon {
  color: #2c0d11;
  background: #e05060;
}

/* ---- Chip nomor transaksi ---- */
.result-order-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.16rem 0 0;
  padding: 0.22rem 0.24rem 0.22rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(16, 15, 24, 0.55);
  max-width: 100%;
}

.result-order-chip-label {
  font-size: 0.65rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}

.result-order-chip-value {
  font-family: ui-monospace, "SFMono-Regular", "Consolas", monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: #e9dfc8;
  overflow-wrap: anywhere;
}

.result-order-chip-copy {
  appearance: none;
  border: 0;
  cursor: pointer;
  font: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  min-height: 32px;
  background: rgba(196, 154, 60, 0.16);
  color: var(--accent-deep);
  transition: background 0.15s ease;
}

.result-order-chip-copy:hover {
  background: rgba(196, 154, 60, 0.28);
}

/* ---- Rail progres 3 langkah ---- */
.result-steps {
  list-style: none;
  margin: 0.1rem 0 0.05rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.result-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 0.34rem;
}

.result-step + .result-step::before {
  content: "";
  position: absolute;
  top: 8px;
  left: -50%;
  right: 50%;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

.result-step-dot {
  position: relative;
  z-index: 1;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--line);
  background: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.result-step-label {
  font-size: 0.67rem;
  line-height: 1.25;
  letter-spacing: 0.015em;
  color: var(--muted);
  text-align: center;
}

.result-step.is-done .result-step-dot {
  border-color: #26c775;
  background: #26c775;
}

.result-step.is-done .result-step-dot::after {
  content: "";
  width: 4px;
  height: 8px;
  border-right: 2px solid #0b2c1a;
  border-bottom: 2px solid #0b2c1a;
  transform: rotate(45deg) translate(-1px, -1px);
}

.result-step.is-done + .result-step::before {
  background: rgba(38, 199, 117, 0.5);
}

.result-step.is-done .result-step-label {
  color: #8de6b7;
}

.result-step.is-active .result-step-dot {
  border-color: var(--warn);
  background: rgba(232, 148, 58, 0.22);
  box-shadow: 0 0 0 3px rgba(232, 148, 58, 0.14);
}

.result-step.is-active .result-step-label {
  color: #f5be79;
  font-weight: 700;
}

.result-step.is-failed .result-step-dot {
  border-color: var(--error);
  background: var(--error);
}

.result-step.is-failed .result-step-dot::after {
  content: "\00d7";
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1;
  color: #2c0d11;
}

.result-step.is-failed .result-step-label {
  color: #f4b8bf;
}

/* Garis hijau yang bermuara di tanda silang membaca salah: yang menentukan
   warna penghubung adalah langkah TUJUAN-nya, bukan langkah sebelumnya. */
.result-step + .result-step.is-failed::before {
  background: rgba(224, 80, 96, 0.5);
}

/* ---- Catatan instruksi (hanya saat menunggu) ---- */
.result-note {
  margin: 0;
  padding: 0.5rem 0.62rem;
  border-radius: 10px;
  border: 1px solid rgba(232, 148, 58, 0.26);
  background: rgba(232, 148, 58, 0.08);
  color: #f0dcc2;
  font-size: 0.73rem;
  line-height: 1.45;
}

.result-note strong {
  color: #f5be79;
}

/* ---- Kartu data akun ---- */
.result-account-highlight {
  border: 1px solid rgba(196, 154, 60, 0.4);
  border-radius: 14px;
  background: linear-gradient(150deg, rgba(196, 154, 60, 0.16), rgba(20, 18, 30, 0.96) 62%);
  padding: 0.72rem;
  display: grid;
  gap: 0.5rem;
  text-align: left;
  animation: card-in 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.result-account-head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.result-account-title {
  margin: 0;
  font-size: 0.98rem;
  margin-right: auto;
}

.result-account-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #8de6b7;
  background: rgba(38, 199, 117, 0.14);
  border: 1px solid rgba(38, 199, 117, 0.38);
  border-radius: 999px;
  padding: 0.16rem 0.5rem;
  white-space: nowrap;
}

.result-account-caption {
  margin: 0;
  font-size: 0.73rem;
  color: #e9dfc8;
}

.result-account-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.42rem;
}

.result-account-item {
  border: 1px solid rgba(233, 223, 200, 0.18);
  border-radius: 10px;
  background: rgba(13, 12, 17, 0.66);
  padding: 0.42rem 0.5rem;
  display: grid;
  gap: 0.16rem;
}

.result-account-label {
  margin: 0;
  font-size: 0.63rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  text-align: left;
}

.result-account-inline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.46rem;
}

.result-account-value {
  margin: 0;
  font-family: ui-monospace, "SFMono-Regular", "Consolas", monospace;
  font-size: 0.94rem;
  font-weight: 700;
  color: #f2f6f3;
  overflow-wrap: anywhere;
  text-align: left;
}

.result-account-inline .copy-inline-btn {
  min-height: 32px;
  min-width: 64px;
  font-size: 0.74rem;
  border-color: rgba(233, 223, 200, 0.22);
}

.result-account-inline .copy-inline-btn:hover {
  border-color: var(--accent);
  background: rgba(196, 154, 60, 0.12);
}

.result-account-actions {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 0.44rem;
}

.result-account-btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-size: 0.79rem;
  font-weight: 700;
  letter-spacing: 0.012em;
  border-radius: 10px;
  min-height: 40px;
  padding: 0 0.7rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.38rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.result-account-btn:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.result-account-btn--download {
  background: linear-gradient(145deg, var(--accent-deep), #a87e28);
  color: #0d0c11;
  border-color: rgba(196, 154, 60, 0.6);
  box-shadow: 0 4px 16px rgba(196, 154, 60, 0.28);
}

.result-account-btn--download:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(196, 154, 60, 0.4);
}

.result-account-btn--copyall {
  background: rgba(233, 223, 200, 0.07);
  border-color: rgba(233, 223, 200, 0.24);
  color: var(--ink);
}

.result-account-btn--copyall:hover:not(:disabled) {
  background: rgba(233, 223, 200, 0.13);
  border-color: rgba(196, 154, 60, 0.5);
}

.result-btn-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---- Tombol kontak seller ---- */
.result-contact-seller {
  margin: 0;
}

.result-contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(42, 189, 108, 0.7);
  background: linear-gradient(135deg, #37d67f 0%, #1ea55d 56%, #17924f 100%);
  color: #082012;
  font-size: 0.83rem;
  font-weight: 800;
  letter-spacing: 0.014em;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(26, 136, 78, 0.3);
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.result-contact-link:hover {
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow: 0 10px 24px rgba(26, 136, 78, 0.42);
}

.result-contact-link:focus-visible {
  outline: 2px solid rgba(141, 230, 183, 0.88);
  outline-offset: 2px;
}

/* ---- Ringkasan transaksi (accordion) ---- */
.result-detail-wrap {
  border-radius: 12px;
  border: 1px solid rgba(233, 223, 200, 0.13);
  background: rgba(16, 15, 24, 0.45);
  overflow: clip;
}

.result-detail-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  list-style: none;
  padding: 0.56rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ddd4bc;
}

.result-detail-summary::-webkit-details-marker {
  display: none;
}

.result-detail-summary:hover {
  color: var(--accent-deep);
}

.result-detail-summary:focus-visible {
  outline: 2px solid rgba(196, 154, 60, 0.7);
  outline-offset: -2px;
}

.result-detail-summary-text {
  margin-right: auto;
}

.result-detail-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translate(-2px, -2px);
  transition: transform 0.18s ease;
}

.result-detail-wrap[open] .result-detail-chevron {
  transform: rotate(225deg) translate(-2px, -2px);
}

.result-detail-wrap .status-detail-list {
  padding: 0.56rem 0.7rem 0.62rem;
  border-top: 1px solid rgba(233, 223, 200, 0.09);
}

/* ---- Baris aksi halaman ---- */
.result-page-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.44rem;
}

.result-page-actions .btn-primary,
.result-page-actions .btn-ghost,
.result-page-actions .btn-secondary {
  text-decoration: none;
  font-size: 0.78rem;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 0.7rem;
  width: auto;
  margin-top: 0;
}

.result-page-actions .result-refresh-btn {
  background: rgba(196, 154, 60, 0.14);
  color: var(--accent-deep);
  border: 1px solid rgba(196, 154, 60, 0.45);
}

.result-page-actions .result-refresh-btn:hover:not(:disabled) {
  opacity: 1;
  background: rgba(196, 154, 60, 0.24);
  border-color: rgba(196, 154, 60, 0.62);
}

.result-page-actions .result-save-btn {
  border: 1px solid rgba(38, 199, 117, 0.42);
  color: #8de6b7;
  background: rgba(38, 199, 117, 0.1);
}

.result-page-actions .result-save-btn:hover:not(:disabled) {
  opacity: 1;
  background: rgba(38, 199, 117, 0.18);
  border-color: rgba(38, 199, 117, 0.58);
}

.result-page-actions .btn-secondary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

/* ========================
   QRIS SUCCESS OVERLAY
   ======================== */
.qris-success-overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 21, 33, 0.96);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  border-radius: 16px;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: qris-overlay-in 0.3s ease both;
}

.qris-success-overlay[hidden] {
  display: none;
}

@keyframes qris-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.qris-success-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
  padding: 1.5rem;
}

.qris-check-icon {
  width: 72px;
  height: 72px;
  animation: qris-check-pop 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.15s both;
}

@keyframes qris-check-pop {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.qris-success-label {
  margin: 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: #26c775;
  animation: qris-fade-up 0.4s ease 0.4s both;
}

.qris-success-sub {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
  animation: qris-fade-up 0.4s ease 0.55s both;
}

@keyframes qris-fade-up {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ========================
   QRIS GUIDE
   ======================== */
.qris-guide-section-title {
  margin: 0 0 0.3rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.qris-guide-section-title-spaced {
  margin-top: 0.6rem;
}

.qris-guide-body ol {
  margin: 0;
  padding-left: 1.15rem;
  display: grid;
  gap: 0.4rem;
  color: var(--ink);
  font-size: 0.88rem;
}

.qris-guide-note {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

/* ===========================================================
   RESPONSIVE
   =========================================================== */
@media (max-width: 580px) {
  html {
    font-size: 100%;
  }

  .main-wrap {
    padding: 0.78rem 0.55rem 1rem;
    align-items: flex-start;
  }

  .checkout-card {
    border-radius: 18px;
  }

  .card-header {
    padding: 0.8rem 1rem;
    gap: 0.4rem;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    max-width: 100%;
    font-size: 0.98rem;
    line-height: 1.25;
    margin-right: 0;
    flex: 1 1 100%;
  }

  .secure-badge {
    font-size: 0.68rem;
    padding: 0.18rem 0.5rem;
    white-space: nowrap;
  }

  .promo-strip {
    padding: 0.68rem 1rem;
  }

  .pkg-selector {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 1rem;
    gap: 0.5rem;
  }

  .package-card:last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  .pkg-name {
    font-size: 0.88rem;
  }

  .pkg-price {
    font-size: 1.05rem;
  }

  .form-wrap {
    padding: 1rem;
  }

  .form-body {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .wallet-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.38rem;
  }

  .wallet-ico {
    width: 32px;
    height: 32px;
    min-width: 32px;
    font-size: 0.63rem;
  }

  .wallet-name {
    font-size: 0.6rem;
  }

  .wallet-card {
    padding: 0.44rem 0.16rem 0.36rem;
  }

  .wallet-card.wallet-gopay {
    min-height: 38px;
    padding-top: 0.37rem;
    padding-bottom: 0.32rem;
  }

  .summary-bar {
    align-items: flex-start;
    gap: 0.42rem;
    padding: 0.46rem 0.6rem;
  }

  .summary-price {
    margin-left: auto;
  }

  .summary-price {
    font-size: 1.25rem;
  }

  /* Sticky CTA bar: hanya aktif saat scroll vertikal ada (layar kecil).
     position:sticky bottom:0 secara alami hanya 'stick' saat ada overflow,
     jika halaman muat penuh tanpa scroll maka elemen tetap di posisi normal. */
  .checkout-cta-bar {
    position: sticky;
    bottom: 0;
    z-index: 20;
    /* bleed ke tepi card supaya background seamless */
    margin: 0.2rem -0.72rem -0.72rem;
    padding: 0.5rem 0.72rem calc(0.56rem + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(to bottom, transparent 0px, var(--paper) 14px);
    border-top: 1px solid var(--line);
  }

  /* Hapus margin-top summary-bar karena padding-top cta-bar sudah jadi spacer */
  .checkout-cta-bar .summary-bar {
    margin-top: 0;
  }

  .result-card {
    margin: 0 1rem 1rem;
  }

  .status-detail-list {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .status-detail-list dt {
    font-size: 0.72rem;
  }

  .status-detail-list dd {
    margin-bottom: 0.38rem;
  }

  .credential-row {
    grid-template-columns: 1fr;
  }

  .qris-meta-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .qris-actions .btn-secondary,
  .qris-actions .btn-ghost {
    flex: 1;
  }

  .result-account-grid {
    grid-template-columns: 1fr;
  }

  .result-page-card {
    width: 100%;
  }

  .result-page-body {
    padding: 0.85rem 0.8rem 0.85rem;
    gap: 0.54rem;
  }

  .result-page-lead {
    font-size: 1.1rem;
  }

  .result-page-sub {
    font-size: 0.75rem;
  }

  .result-pill {
    font-size: 0.67rem;
    min-height: 32px;
    padding: 0.24rem 0.68rem 0.24rem 0.28rem;
  }

  .result-pill-icon {
    width: 24px;
    height: 24px;
    font-size: 0.76rem;
  }

  .result-order-chip-label {
    font-size: 0.61rem;
  }

  .result-step-label {
    font-size: 0.63rem;
  }

  .result-note {
    font-size: 0.72rem;
  }

  .result-contact-link {
    font-size: 0.8rem;
  }

  .result-account-highlight {
    padding: 0.62rem;
    gap: 0.44rem;
  }

  .result-account-title {
    font-size: 0.92rem;
  }

  .result-account-caption {
    font-size: 0.71rem;
  }

  .result-account-value {
    font-size: 0.9rem;
  }

  .result-account-actions {
    grid-template-columns: 1fr;
  }

  .result-detail-summary {
    font-size: 0.8rem;
  }
}

@media (max-height: 760px) {
  .modal-overlay {
    align-items: start;
    padding-top: 0.7rem;
  }

  .modal-card {
    max-height: calc(100vh - 1.4rem);
    max-height: calc(100dvh - 1.4rem);
  }

  .qris-meta-grid p {
    padding: 0.32rem 0.42rem;
  }

  .qris-image-wrap img {
    width: min(190px, 100%);
  }
}

@media (max-width: 420px) {
  html {
    font-size: 100%;
  }

  .main-wrap {
    padding: 1rem 0.55rem 1.4rem;
  }

  .checkout-card {
    border-radius: 16px;
  }

  .card-header {
    padding: 0.72rem 0.8rem;
  }

  .brand {
    max-width: 70%;
    font-size: 0.9rem;
  }

  .pkg-selector {
    padding: 0.82rem 0.72rem;
    gap: 0.45rem;
  }

  .package-card {
    padding: 0.62rem 0.38rem 0.58rem;
  }

  .pkg-dur {
    letter-spacing: 0.08em;
  }

  .form-wrap {
    padding: 0.82rem;
  }

  .field-label,
  .field > span.field-label {
    letter-spacing: 0.04em;
  }

  .wallet-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem;
  }

  .wallet-card {
    padding: 0.38rem 0.14rem 0.34rem;
  }

  .wallet-card.wallet-gopay {
    min-height: 35px;
    padding-top: 0.34rem;
    padding-bottom: 0.28rem;
  }

  .wallet-name {
    font-size: 0.62rem;
  }

  .consent-check span,
  .field small,
  .trust-list li {
    font-size: 14px;
  }

  .summary-label {
    font-size: 0.64rem;
  }

  .summary-price {
    font-size: 1.08rem;
  }

  /* form-wrap padding 0.82rem di breakpoint ini — sesuaikan bleed */
  .checkout-cta-bar {
    margin: 0.2rem -0.82rem -0.82rem;
    padding-left: 0.82rem;
    padding-right: 0.82rem;
  }
}

@media (max-width: 360px) {
  html {
    font-size: 95%;
  }

  .main-wrap {
    padding: 0.88rem 0.45rem 1.15rem;
  }

  .card-header {
    padding: 0.62rem 0.7rem;
  }

  .brand {
    font-size: 0.84rem;
  }

  .secure-badge {
    font-size: 0.62rem;
    padding: 0.16rem 0.48rem;
  }

  .pkg-selector {
    padding: 0.68rem;
  }

  .pkg-price {
    font-size: 1rem;
  }

  .form-wrap {
    padding: 0.72rem;
  }

  .summary-bar {
    padding: 0.5rem 0.56rem;
  }

  .summary-title {
    font-size: 0.84rem;
  }

  .summary-price {
    font-size: 1rem;
  }

  .btn-primary {
    min-height: 44px;
    font-size: 0.94rem;
  }

  .result-card {
    margin: 0 0.72rem 0.82rem;
    padding: 0.9rem;
  }

  /* form-wrap padding kembali ke 0.72rem — reset bleed ke nilai awal */
  .checkout-cta-bar {
    margin: 0.2rem -0.72rem -0.72rem;
    padding-left: 0.72rem;
    padding-right: 0.72rem;
  }

  .result-page-actions .btn-primary,
  .result-page-actions .btn-ghost,
  .result-page-actions .btn-secondary {
    font-size: 0.73rem;
    padding: 0 0.5rem;
  }
}

@media (max-width: 900px) {
  .header-link,
  .btn-primary,
  .btn-secondary,
  .btn-ghost,
  .modal-close-btn,
  .copy-inline-btn,
  .result-account-inline .copy-inline-btn,
  .result-contact-link,
  .qris-action-sm,
  .result-page-actions .btn-primary,
  .result-page-actions .btn-ghost,
  .result-account-btn,
  .result-page-actions .btn-secondary {
    min-height: 44px;
  }

  .field .form-input,
  .field input[type="text"],
  .field input[type="tel"],
  .field input[type="email"],
  .field input[type="password"],
  .field input[type="search"],
  .field input[type="url"],
  .field input[type="number"] {
    min-height: 44px;
  }

  .header-link,
  .site-footer-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .site-footer-links a {
    min-height: 44px;
    min-width: 44px;
    padding-inline: 0.28rem;
  }
}
