/*
  Sahabat Pulsa - Website Utama
  Sistem desain "Tenang": rounded lembut, satu aksen lavender kalem, minim kontras.
  Satu keluarga font (Outfit), satu tema (tanpa toggle light/dark).
*/

:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface-soft: #F2F0FB;
  --ink: #221F2E;
  --ink-soft: #4A4658;
  --muted: #7A7688;
  --faint: #ADA9BC;
  --border: #ECEAF3;
  --accent: #7B6EF6;
  --accent-deep: #5B4FE0;
  --accent-tint: #EFEDFC;
  --success: #1E9E6B;
  --success-tint: #E4F6ED;
  --warning: #C08A1E;
  --warning-tint: #FBF0DE;
  --error: #D8484A;
  --error-tint: #FBE8E8;
  --info: #3D6FD1;
  --info-tint: #E8EEFC;
  --sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  --shadow-sm: 0 1px 2px rgba(34,31,46,0.03), 0 6px 18px -10px rgba(34,31,46,0.08);
  --shadow-md: 0 2px 6px rgba(34,31,46,0.04), 0 20px 40px -20px rgba(91,79,224,0.20);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  line-height: 1.6;
  min-height: 100vh;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font-family: inherit; }
button { cursor: pointer; }
.tabular { font-variant-numeric: tabular-nums; }
::selection { background: var(--accent-tint); color: var(--accent-deep); }
.hidden { display: none !important; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.page-flex { min-height: 100vh; display: flex; flex-direction: column; }
.page-flex main { flex: 1 0 auto; width: 100%; }

/* ---------- Header ---------- */
header.site {
  position: sticky; top: 0; z-index: 40;
  background: rgba(247,246,243,0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.site-nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 0; }
.brand { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 13px;
  background: var(--accent);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.brand-word { font-size: 17px; font-weight: 700; letter-spacing: -0.01em; color: var(--ink); line-height: 1.1; }
.brand-word em { font-style: normal; color: var(--accent-deep); font-weight: 700; }
.brand-sub { font-size: 10.5px; color: var(--faint); margin-top: 2px; font-weight: 500; }
.nav-actions { display: flex; align-items: center; gap: 8px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  border-radius: 999px; font-size: 13px; font-weight: 600;
  padding: 10px 18px; border: 1px solid transparent;
  transition: all .15s ease; white-space: nowrap;
}
.btn-ghost { background: transparent; color: var(--ink-soft); }
.btn-ghost:hover { background: var(--surface-soft); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-sm); }
.btn-primary:hover { background: var(--accent-deep); }
.btn-primary:disabled { background: #E4E2ED; color: #B4B0C4; box-shadow: none; cursor: not-allowed; }
.btn-outline { background: var(--surface); color: var(--ink-soft); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-deep); }
.btn-block { width: 100%; justify-content: center; padding: 16px 18px; font-size: 14.5px; border-radius: 18px; }
.btn-sm { padding: 8px 14px; font-size: 12.5px; }

/* ---------- Hero ---------- */
.hero { padding: 60px 0 8px; }
.hero.hero-compact { padding: 44px 0 4px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--accent-deep); background: var(--accent-tint);
  border-radius: 999px; padding: 7px 14px;
}
h1.hero-title {
  font-weight: 700; font-size: 38px; line-height: 1.25; letter-spacing: -0.02em;
  margin: 20px 0 14px; max-width: 20ch; text-wrap: balance; color: var(--ink);
}
h1.hero-title em { font-style: normal; color: var(--accent-deep); }
.hero-sub { font-size: 15px; color: var(--muted); max-width: 52ch; line-height: 1.75; margin: 0; font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

/* ---------- Cards (generic) ---------- */
.card {
  background: var(--surface); border-radius: 24px; padding: 28px;
  box-shadow: var(--shadow-sm);
}
.card-soft {
  background: var(--surface-soft); border-radius: 24px; padding: 28px;
}

/* ---------- Account card ---------- */
.account-card {
  background: var(--surface); border-radius: 22px; padding: 20px 22px;
  box-shadow: var(--shadow-sm);
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
}
.account-card .lab { font-size: 11px; font-weight: 600; color: var(--faint); }
.account-card .name { font-size: 15.5px; font-weight: 700; margin-top: 3px; }
.account-card .refund { text-align: right; }
.account-card .refund .amt { font-weight: 700; color: var(--accent-deep); font-size: 15px; margin-top: 3px; }
.account-card .meta-line { margin-top: 12px; font-size: 12.5px; color: var(--muted); line-height: 1.6; }

/* ---------- Step / form cards ---------- */
.step-card {
  background: var(--surface); border-radius: 24px; padding: 28px;
  box-shadow: var(--shadow-sm); margin-bottom: 18px;
}
.step-head { display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.step-num {
  font-size: 12px; font-weight: 700; color: var(--accent-deep);
  background: var(--accent-tint); width: 30px; height: 30px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.step-head h2 { font-size: 15.5px; margin: 0; font-weight: 700; color: var(--ink); }
.step-head .step-hint { font-size: 12.5px; color: var(--faint); margin-top: 2px; font-weight: 400; }

/* ---------- Fields ---------- */
.field { margin-bottom: 16px; }
.field:last-child { margin-bottom: 0; }
.field label {
  display: block; margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--muted);
}
.field input {
  width: 100%; font-size: 14.5px; font-weight: 500;
  background: var(--bg); border: 1.5px solid transparent; border-radius: 16px;
  padding: 14px 16px; color: var(--ink); outline: none; transition: all .15s ease;
}
.field input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.field input.otp-input { text-align: center; letter-spacing: 0.5em; font-weight: 700; font-size: 17px; }

.phone-field { position: relative; }
.phone-field input {
  width: 100%; font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 600; letter-spacing: 0.01em;
  background: var(--bg); border: 1.5px solid transparent; border-radius: 18px;
  padding: 17px 128px 17px 20px; color: var(--ink); outline: none;
  transition: all .15s ease;
}
.phone-field input:focus { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-tint); }
.provider-chip {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: var(--success-tint); color: var(--success);
  font-size: 11px; font-weight: 700; padding: 8px 13px; border-radius: 999px;
  display: flex; align-items: center; gap: 6px;
}
.provider-chip .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); }

/* ---------- Tabs / chips ---------- */
.tabs { display: flex; gap: 4px; background: var(--bg); padding: 5px; border-radius: 16px; margin-bottom: 18px; }
.tab { flex: 1; text-align: center; padding: 10px 10px; border-radius: 12px; font-size: 13px; font-weight: 600; color: var(--muted); background: transparent; border: none; transition: all .15s ease; }
.tab.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-sm); }

.cat-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.cat-chip { font-size: 12px; font-weight: 600; padding: 8px 15px; border-radius: 999px; color: var(--ink-soft); background: var(--bg); border: none; }
.cat-chip.active { background: var(--accent); color: #fff; }

/* ---------- Product grid ---------- */
.product-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.product-card {
  position: relative; text-align: left; border-radius: 18px; padding: 16px 17px;
  background: var(--bg); border: 1.5px solid transparent;
  transition: all .15s ease;
}
.product-card:hover { background: var(--surface); box-shadow: var(--shadow-sm); }
.product-card .meta { font-size: 10.5px; font-weight: 600; color: var(--faint); }
.product-card .pname { font-size: 14px; font-weight: 700; margin: 6px 0 12px; line-height: 1.35; color: var(--ink); }
.product-card .price { font-size: 14.5px; font-weight: 700; color: var(--accent-deep); }
.product-card.selected { background: var(--accent-tint); border-color: var(--accent); }
.check-badge {
  position: absolute; top: 14px; right: 14px; width: 21px; height: 21px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: none; align-items: center; justify-content: center; font-size: 11px;
}
.product-card.selected .check-badge { display: flex; }

/* ---------- Voucher ---------- */
.voucher-row { display: grid; grid-template-columns: minmax(0,1fr) 116px; gap: 10px; }
.voucher-row input {
  text-transform: uppercase; letter-spacing: 0.04em; font-size: 13.5px; font-weight: 700;
  background: var(--bg); border: 1.5px solid transparent; border-radius: 16px;
  padding: 14px 16px; color: var(--ink); outline: none; transition: all .15s ease;
}
.voucher-row input:focus { background: var(--surface); border-color: var(--accent); }
.voucher-row .btn-primary { border-radius: 16px; }

/* ---------- Notices (generic, JS-driven success/error/info/warning) ---------- */
.notice {
  border-radius: 16px; padding: 14px 17px; font-size: 12.5px; font-weight: 500;
}
.notice-success { background: var(--success-tint); color: #0F6E48; }
.notice-error { background: var(--error-tint); color: #A5292B; }
.notice-info { background: var(--info-tint); color: #244E9C; }
.notice-warning { background: var(--warning-tint); color: #8A6414; }
.notice-neutral { background: var(--bg); color: var(--muted); }
.notice b { font-weight: 700; }

.cat-label { font-size: 11px; font-weight: 700; color: var(--faint); margin-bottom: 10px; }
.p-body { min-width: 0; flex: 1; }
.p-body .p-label, .p-body .p-desc { display: block; }

.voucher-applied {
  margin-top: 14px; background: var(--success-tint); border-radius: 16px;
  padding: 14px 17px; font-size: 12.5px; color: #0F6E48; font-weight: 500;
  line-height: 1.85;
}
.voucher-applied b { font-weight: 700; }

/* ---------- Payment options ---------- */
.pay-option {
  display: flex; align-items: flex-start; gap: 13px; border-radius: 18px;
  padding: 16px 17px; margin-bottom: 8px; background: var(--bg);
  border: 1.5px solid transparent; transition: all .15s ease; cursor: pointer;
}
.pay-option.selected { background: var(--accent-tint); border-color: var(--accent); }
.radio-dot {
  width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--faint);
  flex-shrink: 0; margin-top: 1px; display: flex; align-items: center; justify-content: center;
  background: var(--surface);
}
.pay-option.selected .radio-dot { border-color: var(--accent); }
.radio-dot .fill { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); display: none; }
.pay-option.selected .radio-dot .fill { display: block; }
.pay-option .p-label { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.pay-option .p-desc { font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.55; font-weight: 400; }
.pay-option .p-amt { margin-left: auto; font-size: 13px; font-weight: 700; white-space: nowrap; color: var(--ink); }

/* ---------- Order summary / receipt ---------- */
.order-grid { display: grid; grid-template-columns: minmax(0,1fr) 372px; gap: 24px; align-items: start; }

.receipt {
  position: sticky; top: 96px;
  background: var(--surface); border-radius: 26px; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.receipt-top { padding: 24px 26px 18px; }
.receipt-top .rk { font-size: 11px; font-weight: 600; color: var(--faint); }
.receipt-top h3 { font-size: 18px; font-weight: 700; margin: 4px 0 0; color: var(--ink); }

.soft-divider { height: 1px; background: var(--border); margin: 0 26px; }

.receipt-lines { padding: 18px 26px; display: flex; flex-direction: column; gap: 12px; }
.r-line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.r-line .rl-lab { color: var(--muted); }
.r-line .rl-val { font-weight: 600; text-align: right; color: var(--ink); }
.r-line.discount .rl-val { color: var(--success); }

.receipt-total {
  margin: 6px 26px 24px; background: var(--accent-tint); border-radius: 18px;
  padding: 16px 20px; display: flex; justify-content: space-between; align-items: flex-end;
}
.receipt-total .rt-lab { font-size: 11px; color: var(--accent-deep); font-weight: 600; }
.receipt-total .rt-val { font-size: 25px; font-weight: 700; margin-top: 3px; color: var(--ink); }

.receipt-cta { padding: 0 26px 26px; }
.receipt-note { padding: 0 26px 24px; font-size: 11.5px; color: var(--faint); line-height: 1.6; }

/* ---------- Status badges (payment monitor) ---------- */
.status-badge {
  display: inline-flex; align-items: center; border-radius: 999px; padding: 6px 14px;
  font-size: 12px; font-weight: 700;
}
.status-badge.st-pending { background: var(--warning-tint); color: #8A6414; }
.status-badge.st-info { background: var(--info-tint); color: #244E9C; }
.status-badge.st-success { background: var(--success-tint); color: #0F6E48; }
.status-badge.st-error { background: var(--error-tint); color: #A5292B; }

.qr-box {
  border-radius: 22px; overflow: hidden; background: var(--bg);
  display: flex; align-items: center; justify-content: center; min-height: 300px; text-align: center;
}
.qr-box img { width: 100%; display: block; }
.qr-box .qr-empty { padding: 32px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.qr-box .qr-empty .ico { width: 56px; height: 56px; border-radius: 18px; background: var(--surface); margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; }

/* ---------- Feature / FAQ cards (index) ---------- */
.feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }
.feature-card { background: var(--surface); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-sm); }
.feature-card .f-ico { width: 44px; height: 44px; border-radius: 14px; background: var(--accent-tint); color: var(--accent-deep); display: flex; align-items: center; justify-content: center; font-size: 18px; }
.feature-card h3 { margin: 16px 0 8px; font-size: 15.5px; font-weight: 700; }
.feature-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.7; }

.faq-item { background: var(--bg); border-radius: 18px; padding: 16px 18px; margin-bottom: 10px; }
.faq-item:last-child { margin-bottom: 0; }
.faq-item .q { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.faq-item .a { font-size: 12.5px; color: var(--muted); margin-top: 6px; line-height: 1.7; }

.cta-band {
  background: var(--ink); border-radius: 28px; padding: 34px 32px; color: #fff;
}
.cta-band .eyebrow { background: rgba(255,255,255,0.1); color: #D8D5E6; }
.cta-band h2 { font-size: 26px; font-weight: 700; margin: 14px 0 10px; letter-spacing: -0.01em; }
.cta-band p { font-size: 13.5px; color: #B9B5CB; line-height: 1.7; margin: 0; max-width: 46ch; }
.cta-band .hero-actions { margin-top: 22px; }
.cta-band .btn-primary { background: var(--accent); }
.cta-band .btn-outline { background: rgba(255,255,255,0.06); color: #fff; border-color: rgba(255,255,255,0.16); }
.cta-band .btn-outline:hover { border-color: rgba(255,255,255,0.4); }

/* ---------- Order history ---------- */
.order-row {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 16px 4px; border-bottom: 1px solid var(--border);
  text-decoration: none; color: inherit; transition: background .15s ease;
  border-radius: 14px;
}
.order-row:hover { background: var(--bg); }
.order-row:last-child { border-bottom: none; }
.order-row .or-main { min-width: 0; }
.order-row .or-invoice { font-size: 12px; font-weight: 700; color: var(--faint); }
.order-row .or-product { font-size: 14px; font-weight: 700; margin-top: 3px; }
.order-row .or-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.order-row .or-right { text-align: right; flex-shrink: 0; }
.order-row .or-price { font-size: 13.5px; font-weight: 700; }

.pagination { display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 22px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; padding: 0 12px; border-radius: 12px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-soft); background: var(--bg);
}
.pagination a:hover { background: var(--accent-tint); color: var(--accent-deep); }
.pagination .current { background: var(--accent); color: #fff; }
.pagination .disabled { opacity: 0.4; pointer-events: none; }

.summary-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.summary-stats .stat-box { background: var(--bg); border-radius: 16px; padding: 16px 18px; }
.summary-stats .stat-box .sv { font-size: 20px; font-weight: 700; }
.summary-stats .stat-box .sl { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ---------- Footer ---------- */
footer.site { padding: 30px 0; text-align: center; font-size: 12.5px; color: var(--faint); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .order-grid { grid-template-columns: 1fr; }
  .receipt { position: static; }
  .feature-grid { grid-template-columns: 1fr; }
  h1.hero-title { font-size: 30px; }
  .site-nav .btn span.btn-label-full { display: none; }
}

@media (max-width: 560px) {
  .wrap { padding: 0 16px; }
  .step-card, .card, .card-soft { padding: 20px; border-radius: 20px; }
  .product-grid { grid-template-columns: 1fr; }
  .voucher-row { grid-template-columns: 1fr; }
  h1.hero-title { font-size: 26px; }
  .cta-band { padding: 26px 22px; }
  .nav-actions .btn-outline { display: none; }
  .phone-field input { font-size: 16px; padding-right: 104px; }
  .provider-chip { right: 6px; padding: 6px 10px; font-size: 10px; }
  .site-nav { flex-wrap: wrap; row-gap: 10px; }
}
