/* Paket Tryout - semua selektor di-scope di bawah .cbtp */
.cbtp, .cbtp *, .cbtp *::before, .cbtp *::after { box-sizing: border-box; }
.cbtp {
  --p-bg: #f1f5f9; --p-card: #fff; --p-text: #0f172a; --p-muted: #64748b; --p-line: #e2e8f0;
  --p-brand: #2563eb; --p-brand-dark: #1d4ed8; --p-brand-soft: #dbeafe;
  --p-ok: #166534; --p-ok-bg: #dcfce7; --p-warn: #92400e; --p-warn-bg: #fef3c7; --p-bad: #991b1b; --p-bad-bg: #fee2e2;
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 20px; background: var(--p-bg); color: var(--p-text);
  border-radius: 16px; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px; line-height: 1.55; text-align: left;
}
.cbtp h2, .cbtp h3, .cbtp p, .cbtp ul, .cbtp ol, .cbtp dl, .cbtp dd, .cbtp dt { margin: 0; padding: 0; color: inherit; text-transform: none; letter-spacing: normal; }
.cbtp a { color: var(--p-brand-dark); }
.cbtp .screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cbtp a:focus-visible, .cbtp button:focus-visible, .cbtp input:focus-visible { outline: 3px solid var(--p-brand-soft); outline-offset: 2px; box-shadow: 0 0 0 2px var(--p-brand); }

/* Header */
.cbtp-head { margin-bottom: 18px; }
.cbtp-title { font-size: 26px; font-weight: 800; line-height: 1.25; }
.cbtp-title-sm { font-size: 20px; }
.cbtp-sub { color: var(--p-muted); font-size: 14px; margin-top: 2px; }
.cbtp-muted { color: var(--p-muted); font-size: 14px; }
.cbtp-foot { margin-top: 12px; }
.cbtp-center { text-align: center; margin-top: 12px; }
.cbtp-back { margin-bottom: 14px; font-size: 14px; }
.cbtp-back a { text-decoration: none; font-weight: 600; }

/* Notifikasi */
.cbtp-notice { padding: 12px 16px; margin-bottom: 16px; border-radius: 10px; font-size: 14px; font-weight: 600; }
.cbtp-notice-success { background: var(--p-ok-bg); color: var(--p-ok); }
.cbtp-notice-error { background: var(--p-bad-bg); color: var(--p-bad); }
.cbtp-notice-info { background: var(--p-brand-soft); color: #1e3a8a; }

/* Tombol */
.cbtp .cbtp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border: 1px solid var(--p-line); border-radius: 10px; background: #fff; color: var(--p-text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; text-align: center; transition: background .15s, border-color .15s; }
.cbtp .cbtp-btn:hover { background: var(--p-bg); }
.cbtp .cbtp-btn-primary { background: var(--p-brand); border-color: var(--p-brand); color: #fff; }
.cbtp .cbtp-btn-primary:hover { background: var(--p-brand-dark); border-color: var(--p-brand-dark); }
.cbtp .cbtp-btn-ghost { background: transparent; }
.cbtp .cbtp-btn-block { display: flex; width: 100%; }
.cbtp .cbtp-btn-lg { min-height: 52px; font-size: 16px; }
.cbtp .cbtp-btn.is-locked { background: var(--p-bg); color: var(--p-muted); border-style: dashed; cursor: not-allowed; }
.cbtp .cbtp-btn.is-locked:hover { background: var(--p-bg); }
.cbtp-link-danger { color: var(--p-bad) !important; font-size: 14px; }

/* Harga & chip */
.cbtp-price { display: inline-block; padding: 3px 12px; border-radius: 999px; background: var(--p-brand-soft); color: var(--p-brand-dark); font-weight: 800; font-size: 14px; }
.cbtp-price-free { background: var(--p-ok-bg); color: var(--p-ok); letter-spacing: .04em; text-transform: uppercase; }
.cbtp-price-lg { padding: 0; background: none; font-size: 34px; line-height: 1.2; }
.cbtp-price-free.cbtp-price-lg { background: none; }
.cbtp-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 999px; background: var(--p-bg); color: var(--p-muted); font-size: 12px; font-weight: 700; white-space: nowrap; }
.cbtp-chip-ok { background: var(--p-ok-bg); color: var(--p-ok); }
.cbtp-chip-warn { background: var(--p-warn-bg); color: var(--p-warn); }
.cbtp-chip-bad { background: var(--p-bad-bg); color: var(--p-bad); }
.cbtp-chip-lg { padding: 6px 14px; font-size: 14px; }

/* Daftar paket */
.cbtp-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cbtp-cols-1 { grid-template-columns: minmax(0, 1fr); }
.cbtp-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cbtp-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.cbtp-card { display: flex; flex-direction: column; background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; transition: box-shadow .2s, transform .2s; }
.cbtp-card:hover { box-shadow: 0 8px 24px rgba(15, 23, 42, .1); transform: translateY(-2px); }
.cbtp-card-media { display: block; aspect-ratio: 16 / 9; background: linear-gradient(135deg, #dbeafe, #e0e7ff); overflow: hidden; }
.cbtp-card-media img { display: block; width: 100%; height: 100%; object-fit: cover; }
.cbtp-card-ph { display: flex; align-items: center; justify-content: center; height: 100%; font-size: 44px; }
.cbtp-card-body { display: flex; flex-direction: column; gap: 10px; flex: 1; padding: 16px; }
.cbtp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.cbtp-card-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.cbtp-card-title a { color: inherit; text-decoration: none; }
.cbtp-card-desc { color: var(--p-muted); font-size: 14px; flex: 1; }
.cbtp-card-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--p-muted); }

/* Detail paket */
.cbtp-detail { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.cbtp-main { display: grid; gap: 16px; min-width: 0; }
.cbtp-hero { display: flex; flex-direction: column; gap: 14px; background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; }
.cbtp-hero-img { display: block; width: 100%; max-height: 300px; object-fit: cover; }
.cbtp-hero-txt { display: grid; gap: 8px; padding: 0 18px 18px; }
.cbtp-hero > .cbtp-hero-txt:first-child { padding-top: 18px; }
.cbtp-box { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; padding: 18px; min-width: 0; }
.cbtp-box-title { font-size: 17px; font-weight: 700; margin-bottom: 12px; }
.cbtp-desc > * + * { margin-top: 10px; }
.cbtp-desc ul, .cbtp-desc ol { padding-left: 22px; }
.cbtp-desc img { max-width: 100%; height: auto; }
.cbtp-note { padding: 10px 14px; margin-bottom: 12px; border-radius: 10px; background: var(--p-warn-bg); color: var(--p-warn); font-size: 14px; }
.cbtp-note-ok { background: var(--p-ok-bg); color: var(--p-ok); }

/* Daftar tryout */
.cbtp-tests { display: grid; gap: 10px; list-style: none; }
.cbtp-test { display: flex; align-items: center; gap: 14px; padding: 14px; background: var(--p-bg); border-radius: 12px; }
.cbtp-test-no { flex: 0 0 34px; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--p-card); color: var(--p-brand-dark); font-weight: 800; }
.cbtp-test-info { flex: 1; min-width: 0; }
.cbtp-test-name { font-weight: 700; word-break: break-word; }
.cbtp-test-meta { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: center; margin-top: 4px; font-size: 13px; color: var(--p-muted); }
.cbtp-test-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

/* Kotak beli */
.cbtp-aside { position: sticky; top: 16px; }
.cbtp-buy { background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; padding: 20px; display: grid; gap: 14px; }
.cbtp-feat { list-style: none; display: grid; gap: 6px; font-size: 14px; }
.cbtp-feat .is-off { color: var(--p-muted); }
.cbtp-buy-note { font-size: 13px; color: var(--p-muted); text-align: center; }
.cbtp-form { display: grid; gap: 10px; }
.cbtp-methods { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.cbtp-method { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 10px 14px; border: 1px solid var(--p-line); border-radius: 10px; cursor: pointer; font-weight: 600; }
.cbtp-method:has(input:checked) { border-color: var(--p-brand); background: var(--p-brand-soft); }

/* Pesanan */
.cbtp-order { display: grid; gap: 16px; max-width: 720px; margin: 0 auto; }
.cbtp-order-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.cbtp-dl { display: grid; gap: 10px; }
.cbtp-dl > div { display: flex; justify-content: space-between; gap: 16px; padding-bottom: 8px; border-bottom: 1px solid var(--p-line); }
.cbtp-dl > div:last-child { border-bottom: 0; padding-bottom: 0; }
.cbtp-dl dt { color: var(--p-muted); }
.cbtp-dl dd { text-align: right; font-weight: 600; }
.cbtp-total { font-size: 20px; color: var(--p-brand-dark); }
.cbtp-copy { margin-left: 6px; padding: 3px 10px; border: 1px solid var(--p-line); border-radius: 8px; background: #fff; font: inherit; font-size: 12px; cursor: pointer; }
.cbtp-bank { padding: 14px; margin-bottom: 12px; background: var(--p-bg); border-radius: 10px; font-weight: 600; word-break: break-word; }
.cbtp-bank p + p { margin-top: 6px; }
.cbtp-qris { text-align: center; margin-bottom: 12px; }
.cbtp-qris img { max-width: 260px; width: 100%; height: auto; border-radius: 10px; border: 1px solid var(--p-line); }
.cbtp-label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 4px; }
.cbtp-input, .cbtp-file { width: 100%; min-height: 44px; padding: 9px 12px; border: 1px solid var(--p-line); border-radius: 10px; background: #fff; font: inherit; }
.cbtp-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.cbtp-success { background: var(--p-ok-bg); border-color: #bbf7d0; }
.cbtp-success p { margin-bottom: 12px; }

/* Kosong & terkunci */
.cbtp-empty, .cbtp-lock { padding: 36px 16px; text-align: center; color: var(--p-muted); background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; }
.cbtp-empty p { margin-bottom: 12px; }
.cbtp-lock-ico { font-size: 40px; margin-bottom: 6px; }
.cbtp-lock h3 { font-size: 20px; color: var(--p-text); margin-bottom: 8px; }
.cbtp-lock-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0; }
.cbtp-rank-head { margin-bottom: 14px; }
.cbtp-mobilebar { display: none; }

/* ===== Tablet ===== */
@media (max-width: 1024px) {
  .cbtp-grid, .cbtp-cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cbtp-detail { grid-template-columns: 1fr; }
  .cbtp-aside { position: static; order: -1; }
}

/* ===== Mobile ===== */
@media (max-width: 640px) {
  .cbtp { padding: 12px; border-radius: 12px; font-size: 14px; }
  .cbtp-title { font-size: 21px; }
  .cbtp-grid, .cbtp-cols-2, .cbtp-cols-4 { grid-template-columns: 1fr; }
  .cbtp-box, .cbtp-buy { padding: 14px; }
  .cbtp-test { flex-wrap: wrap; align-items: flex-start; }
  .cbtp-test-info { flex: 1 1 calc(100% - 50px); }
  .cbtp-test-actions { flex: 1 1 100%; justify-content: stretch; }
  .cbtp-test-actions .cbtp-btn { flex: 1; }
  .cbtp-dl > div { flex-direction: column; gap: 2px; }
  .cbtp-dl dd { text-align: left; }
  .cbtp-actions .cbtp-btn { flex: 1 1 100%; }
  .cbtp-detail { padding-bottom: 76px; }
  .cbtp-mobilebar { position: fixed; z-index: 999; left: 0; right: 0; bottom: 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px)); background: #fff; border-top: 1px solid var(--p-line); box-shadow: 0 -4px 16px rgba(15, 23, 42, .1); }
  .cbtp-mb-label { font-size: 12px; color: var(--p-muted); }
  .cbtp-mb-price { font-size: 20px; font-weight: 800; }
}
@media (prefers-reduced-motion: reduce) { .cbtp-card { transition: none; } .cbtp-card:hover { transform: none; } }

/* ===== Voucher ===== */
.cbtp-voucher { padding: 10px 12px; border: 1px dashed #cbd5e1; border-radius: 10px; background: var(--p-bg); }
.cbtp-voucher summary { min-height: 28px; font-weight: 600; cursor: pointer; }
.cbtp-voucher-row { display: flex; gap: 8px; margin-top: 10px; }
.cbtp-voucher-row .cbtp-input { flex: 1; min-width: 0; text-transform: uppercase; }
.cbtp-voucher-row .cbtp-btn { flex: 0 0 auto; }
.cbtp-voucher-msg { margin-top: 8px; font-size: 13px; }
.cbtp-voucher-msg:empty { display: none; }
.cbtp-voucher-msg.is-ok { color: var(--p-ok); font-weight: 600; }
.cbtp-voucher-msg.is-err { color: var(--p-bad); font-weight: 600; }
.cbtp-price-old { display: block; color: var(--p-muted); font-size: 16px; font-weight: 600; text-decoration: line-through; }

/* ===== Tawaran paket berbayar ===== */
.cbtp-up { padding: 18px; background: linear-gradient(135deg, #eff6ff, #eef2ff); border: 1px solid #bfdbfe; border-radius: 14px; text-align: left; color: var(--p-text); }
.cbtp-up-title { font-size: 18px; font-weight: 800; }
.cbtp-up-sub { margin: 4px 0 14px; color: var(--p-muted); font-size: 14px; }
.cbtp-up-list { display: grid; gap: 10px; }
.cbtp .cbtp-up-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; background: #fff; border: 1px solid var(--p-line); border-radius: 12px; color: var(--p-text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.cbtp .cbtp-up-item:hover { border-color: var(--p-brand); box-shadow: 0 4px 14px rgba(37, 99, 235, .12); }
.cbtp-up-info { display: grid; gap: 2px; min-width: 0; }
.cbtp-up-name { font-weight: 700; word-break: break-word; }
.cbtp-up-meta { font-size: 12px; color: var(--p-muted); }
.cbtp-up-price { font-weight: 800; color: var(--p-brand-dark); white-space: nowrap; }
.cbtp-up-cta { display: inline-flex; align-items: center; min-height: 40px; padding: 8px 14px; border-radius: 10px; background: var(--p-brand); color: #fff; font-weight: 600; font-size: 14px; white-space: nowrap; }
.cbtp-up-note { margin-top: 12px; font-size: 13px; color: var(--p-muted); }
@media (max-width: 640px) {
  .cbtp .cbtp-up-item { grid-template-columns: 1fr auto; }
  .cbtp-up-cta { grid-column: 1 / -1; justify-content: center; }
  .cbtp-voucher-row { flex-direction: column; }
}

/* ===== Ikon SVG ===== */
.cbtp .cbtp-ico { flex: 0 0 auto; width: 1.1em; height: 1.1em; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.2em; }
.cbtp-card-meta span, .cbtp-test-meta span { display: inline-flex; align-items: center; gap: 5px; }
.cbtp .cbtp-btn .cbtp-ico { margin-right: 2px; }

/* ===== Unduh QRIS ===== */
.cbtp-qris { display: grid; justify-items: center; gap: 10px; }
.cbtp-qris .cbtp-btn { width: 100%; max-width: 260px; }
.cbtp-qris-hint { max-width: 320px; font-size: 13px; color: var(--p-muted); text-align: center; }

/* ===== Nota digital ===== */
.cbtp-receipt { position: relative; padding: 22px 20px 18px; background: #fff; border: 1px solid var(--p-line); border-radius: 14px; box-shadow: 0 8px 24px rgba(15, 23, 42, .08); }
.cbtp-receipt::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px; border-radius: 14px 14px 0 0; background: linear-gradient(90deg, #1f3864, #2563eb); }
.cbtp-rc-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.cbtp-rc-brand { font-size: 13px; font-weight: 700; color: var(--p-muted); text-transform: uppercase; letter-spacing: .05em; word-break: break-word; }
.cbtp-rc-title { font-size: 22px; font-weight: 800; line-height: 1.25; }
.cbtp-rc-stamp { flex: 0 0 auto; padding: 4px 14px; border: 3px double #2e7d32; border-radius: 6px; color: #2e7d32; font-size: 18px; font-weight: 800; letter-spacing: .08em; transform: rotate(-6deg); }
.cbtp-rc-rows { display: grid; gap: 0; margin: 0; border-top: 2px dashed var(--p-line); }
.cbtp-rc-rows > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--p-line); }
.cbtp-rc-rows dt { color: var(--p-muted); font-size: 14px; }
.cbtp-rc-rows dd { margin: 0; text-align: right; font-weight: 600; font-size: 14px; word-break: break-word; }
.cbtp-rc-rows .is-disc dd, .cbtp-rc-rows .is-disc dt { color: var(--p-ok); }
.cbtp-rc-total { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 14px 0 6px; }
.cbtp-rc-total span { font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: 14px; }
.cbtp-rc-total strong { font-size: 26px; color: #1f3864; line-height: 1.2; }
.cbtp-rc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.cbtp-rc-foot { margin-top: 14px; font-size: 12px; color: var(--p-muted); text-align: center; }

/* ===== Riwayat pembelian ===== */
.cbtp-history { margin-top: 18px; }
.cbtp-hist-list { display: grid; gap: 10px; list-style: none; }
.cbtp-hist-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 14px; padding: 12px 14px; background: var(--p-bg); border-radius: 12px; }
.cbtp-hist-info { display: grid; gap: 2px; min-width: 0; }
.cbtp-hist-name { font-weight: 700; word-break: break-word; }
.cbtp-hist-meta { font-size: 12px; color: var(--p-muted); }
.cbtp-hist-total { font-weight: 800; color: var(--p-brand-dark); white-space: nowrap; }

@media (max-width: 640px) {
  .cbtp-receipt { padding: 20px 14px 16px; }
  .cbtp-rc-title { font-size: 19px; }
  .cbtp-rc-total strong { font-size: 22px; }
  .cbtp-rc-actions .cbtp-btn { flex: 1 1 100%; }
  .cbtp-hist-list li { grid-template-columns: 1fr auto; }
  .cbtp-hist-list li .cbtp-btn { grid-column: 1 / -1; }
}
@media print { .cbtp-rc-actions, .cbtp-back { display: none !important; } }

/* ===== Pencarian & filter paket ===== */
.cbtp [hidden] { display: none !important; }
.cbtp-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px 14px; align-items: center; margin-bottom: 18px; padding: 14px; background: var(--p-card); border: 1px solid var(--p-line); border-radius: 14px; }
.cbtp-search { position: relative; grid-column: 1 / -1; }
.cbtp-search > .cbtp-ico { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; margin-top: -9px; color: var(--p-muted); pointer-events: none; }
.cbtp-search .cbtp-input { min-height: 48px; padding-left: 42px; padding-right: 44px; font-size: 16px; border-radius: 12px; }
.cbtp-search-clear { position: absolute; right: 6px; top: 50%; width: 36px; height: 36px; margin-top: -18px; border: 0; border-radius: 50%; background: var(--p-bg); color: var(--p-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.cbtp-search-clear:hover { background: var(--p-line); color: var(--p-text); }
.cbtp-chips { display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.cbtp .cbtp-fchip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 6px 14px; border: 1px solid var(--p-line); border-radius: 999px; background: #fff; color: var(--p-text); font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; transition: background .15s, border-color .15s, color .15s; }
.cbtp .cbtp-fchip span { padding: 0 7px; border-radius: 999px; background: var(--p-bg); color: var(--p-muted); font-size: 12px; font-weight: 700; }
.cbtp .cbtp-fchip:hover { border-color: var(--p-brand); }
.cbtp .cbtp-fchip.is-active { background: var(--p-brand); border-color: var(--p-brand); color: #fff; }
.cbtp .cbtp-fchip.is-active span { background: rgba(255, 255, 255, .25); color: #fff; }
.cbtp-sortbox { display: flex; align-items: center; gap: 8px; }
.cbtp-sortbox label { font-size: 13px; color: var(--p-muted); white-space: nowrap; }
.cbtp-sortbox .cbtp-input { width: auto; min-width: 170px; padding-right: 30px; }
.cbtp-count { grid-column: 1 / -1; font-size: 13px; color: var(--p-muted); }
.cbtp-count:empty { display: none; }
@media (max-width: 640px) {
  .cbtp-filter { grid-template-columns: 1fr; padding: 12px; }
  .cbtp-chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 2px; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .cbtp-chips::-webkit-scrollbar { display: none; }
  .cbtp .cbtp-fchip { flex: 0 0 auto; }
  .cbtp-sortbox { width: 100%; }
  .cbtp-sortbox .cbtp-input { flex: 1; width: 100%; }
}
