﻿* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  --primary: #5B4FCF;
  --primary-light: #7B6FE8;
  --primary-dark: #3D31B0;
  --accent: #FF6B35;
  --accent2: #00C896;
  --bg: #F0F2F8;
  --card: #FFFFFF;
  --text: #1A1A2E;
  --muted: #8B8FA8;
  --border: #E8EAF2;
  --danger: #FF4757;
  --warning: #FFA502;
  --font: 'Nunito', sans-serif;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

html, body {
  height: 100%;
  background: #FFFFFF;
  display: flex;
  justify-content: center;
  align-items: center;
  font-family: var(--font);
}

/* Phone frame */
.phone {
  width: 390px;
  height: 844px;
  background: var(--bg);
  border-radius: 44px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 40px 100px rgba(0,0,0,0.6), inset 0 0 0 1px rgba(255,255,255,0.1);
  display: flex;
  flex-direction: column;
}

/* Status bar */
.status-bar {
  background: var(--primary-dark);
  padding: 12px 28px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-shrink: 0;
}
.status-time { color: #fff; font-size: 15px; font-weight: 800; }
.status-icons { display: flex; gap: 6px; align-items: center; }
.status-icons span { color: #fff; font-size: 13px; }
.phone:has(#screen-login.active) .status-bar,
.phone:has(#screen-forgot-password.active) .status-bar,
.phone:has(#screen-register-mitra.active) .status-bar {
  display: none;
}

/* Scrollable content */
.screen {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scroll-behavior: smooth;
  display: none;
}
.screen.active { display: block; }
.screen::-webkit-scrollbar { display: none; }

.auth-screen {
  min-height: 100%;
  background: #FFFFFF;
  padding: 30px 22px;
  color: var(--text);
}
.auth-minimal {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 38px 22px;
  overflow: hidden;
  background:
    radial-gradient(circle at 20% 12%, rgba(47,78,173,.08), transparent 30%),
    linear-gradient(180deg, #FFFFFF 0%, #F8FAFF 100%);
}
#screen-login .auth-screen {
  min-height: 100%;
}
.auth-brand {
  padding: 0 4px 24px;
}
.auth-brand-card {
  padding: 0 0 28px;
  text-align: center;
}
.auth-logo {
  width: 52px;
  height: 52px;
  border-radius: 17px;
  background: #EAF0FF;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 14px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.5);
}
.auth-title {
  font-size: 30px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: 0;
}
.auth-subtitle {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
  line-height: 1.45;
  max-width: 340px;
}
.auth-logo-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: #0F254F;
  font-size: 26px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
}
.auth-logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  background: linear-gradient(135deg, #2457D6, #17B6A2);
  font-size: 15px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(36,87,214,.24);
}
.auth-logo-word {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  color: #10254B;
}
.auth-logo-word strong {
  color: #2457D6;
  font-size: 16px;
  font-weight: 900;
}
.auth-dots {
  position: absolute;
  width: 190px;
  height: 190px;
  right: -48px;
  top: 42px;
  opacity: .16;
  background-image: linear-gradient(135deg, #2457D6 25%, transparent 25%, transparent 50%, #2457D6 50%, #2457D6 75%, transparent 75%);
  background-size: 18px 18px;
  border-radius: 50%;
  pointer-events: none;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px;
  color: var(--text);
  box-shadow: 0 18px 44px rgba(15,23,42,.18);
}
.auth-card-centered {
  position: relative;
  z-index: 1;
  width: min(100%, 402px);
  border-radius: 22px;
  padding: 30px 26px 34px;
  border: 1px solid #DDE6F3;
  box-shadow: 0 18px 46px rgba(15,23,42,.10);
  overflow: hidden;
}
.auth-card-centered::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, #2457D6, #17B6A2);
}
.auth-card-small {
  padding-top: 34px;
  padding-bottom: 28px;
}
#screen-login .form-input,
.auth-card-centered .form-input {
  min-height: 39px;
  border-radius: 5px;
  background: #FFFFFF;
  border-color: #CCD4E2;
  font-size: 14px;
  padding: 9px 14px;
}
.register-screen {
  padding-top: 28px;
  padding-bottom: 28px;
  align-items: flex-start;
}
.register-header {
  margin: 0 -14px 18px;
  border-radius: 0 0 24px 24px;
  padding: 20px 20px 18px;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary) 62%, #19B6A4);
}
.register-card {
  padding: 28px 24px 30px;
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(15,23,42,.10);
}
.auth-card-centered .input-label,
.register-card .input-label {
  margin-top: 16px;
  margin-bottom: 8px;
  color: #243D66;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}
.auth-brand-card + .input-label,
.register-card .auth-brand-card + .input-label {
  margin-top: 0;
}
.register-card .form-input {
  min-height: 39px;
  border-radius: 5px;
  background: #FFFFFF;
}
.input-row-label {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}
.input-row-label .input-label {
  margin-top: 0;
}
.inline-link,
.captcha-reload,
.auth-note button,
.auth-bottom-link button,
.terms-link {
  border: 0;
  background: transparent;
  color: #214AA8;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}
.password-field {
  position: relative;
}
.password-field .form-input {
  padding-right: 58px;
  width: 100%;
}
.password-toggle {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: #607089;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
}
.captcha-code {
  margin: 15px 0 8px;
  text-align: center;
  color: #10254B;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 7px;
  font-family: Arial, sans-serif;
  background: linear-gradient(135deg, #F5F8FF, #EEF7F5);
  border: 1px dashed #B7C5DA;
  border-radius: 12px;
  padding: 10px 12px;
  user-select: none;
}
.captcha-reload {
  display: block;
  margin: 0 auto 10px;
  font-size: 12px;
}
.auth-primary-btn {
  width: 100%;
  min-height: 40px;
  margin-top: 16px;
  border-radius: 5px;
  background: #2F4EAD;
  box-shadow: 0 7px 12px rgba(47,78,173,.18);
}
.auth-form-title {
  color: #304563;
  font-size: 22px;
  font-weight: 500;
  margin-bottom: 6px;
}
.auth-form-sub {
  color: #52657F;
  font-size: 15px;
  line-height: 1.45;
  margin-bottom: 28px;
}
.auth-note {
  margin-top: 16px;
  color: #52657F;
  font-size: 14px;
  line-height: 1.55;
  text-align: center;
}
.auth-note button {
  color: #EF4770;
  text-decoration: underline;
  font-size: 14px;
}
.auth-bottom-link,
.auth-back-link {
  display: block;
  width: 100%;
  margin-top: 18px;
  text-align: center;
  color: #52657F;
  font-size: 15px;
}
.auth-bottom-link button,
.auth-back-link {
  color: #214AA8;
  font-size: 15px;
}
.auth-back-link {
  border: 0;
  background: transparent;
  font-family: var(--font);
  cursor: pointer;
}
.remember-login {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  user-select: none;
}
.terms-login {
  margin-top: 16px;
  align-items: flex-start;
  color: #52657F;
  font-weight: 700;
}
.terms-link {
  font-size: 13px;
}
.terms-card {
  padding-bottom: 26px;
}
.terms-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 18px 0 6px;
}
.terms-item {
  border: 1px solid #DDE6F3;
  background: #F8FAFF;
  border-radius: 14px;
  padding: 12px 13px;
}
.terms-item strong {
  display: block;
  color: #10254B;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 4px;
}
.terms-item span {
  display: block;
  color: #52657F;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}
.remember-login input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.remember-check {
  width: 18px;
  height: 18px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #F4F7FC;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 900;
}
.remember-login input:checked + .remember-check {
  border-color: var(--primary);
  background: var(--primary);
}
.remember-login input:checked + .remember-check::after {
  content: "✓";
}
.auth-link-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 900;
  padding: 14px 8px 0;
  cursor: pointer;
}
.auth-loading {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.auth-loading.show { display: flex; }
.auth-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid #E4E8F1;
  border-top-color: var(--primary);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Header */
.header {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--primary-light) 100%);
  padding: 20px 20px 60px;
  position: relative;
  overflow: hidden;
}
.header::before {
  content: '';
  position: absolute;
  width: 200px; height: 200px;
  background: rgba(255,255,255,0.06);
  border-radius: 50%;
  top: -80px; right: -60px;
}
.header::after {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
  bottom: 20px; left: -40px;
}
.header-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  position: relative; z-index: 1;
}
.greeting { color: rgba(255,255,255,0.75); font-size: 13px; font-weight: 600; }
.username { color: #fff; font-size: 18px; font-weight: 800; }
.avatar {
  width: 42px; height: 42px;
  background: linear-gradient(135deg, var(--accent), #FF9F43);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}
.balance-card {
  background: rgba(255,255,255,0.12);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 20px;
  padding: 16px 20px;
  position: relative; z-index: 1;
}
.balance-label { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600; letter-spacing: 1px; text-transform: uppercase; }
.balance-amount { color: #fff; font-size: 28px; font-weight: 900; margin: 4px 0; }
.balance-row { display: flex; align-items: center; justify-content: space-between; }
.topup-btn {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 8px 16px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 4px 15px rgba(255,107,53,0.4);
}
.topup-btn:active { transform: scale(0.95); }

/* Main content */
.content { margin-top: -40px; padding: 0 16px 100px; }

/* Quick menu */
.quick-menu {
  background: transparent;
  border-radius: 24px;
  padding: 0 2px;
  margin-bottom: 16px;
  box-shadow: none;
}
.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 12px;
}
.service-group {
  margin-bottom: 18px;
}
.service-group:last-child {
  margin-bottom: 0;
}
.service-group-title {
  margin: 0 0 10px 2px;
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.quick-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.15s;
}
.quick-item:active { transform: scale(0.92); }
.quick-icon {
  width: 52px; height: 52px;
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px;
}
.qi-pulsa { background: linear-gradient(135deg, #667eea, #764ba2); }
.qi-data { background: linear-gradient(135deg, #f093fb, #f5576c); }
.qi-listrik { background: linear-gradient(135deg, #4facfe, #00f2fe); }
.qi-game { background: linear-gradient(135deg, #43e97b, #38f9d7); }
.qi-emoney { background: linear-gradient(135deg, #fa709a, #fee140); }
.qi-bpjs { background: linear-gradient(135deg, #30cfd0, #330867); }
.qi-pdam { background: linear-gradient(135deg, #a18cd1, #fbc2eb); }
.service-other-stream { background: linear-gradient(135deg, #7C3AED, #DB2777); }
.service-other-voucher { background: linear-gradient(135deg, #2457D6, #08A88A); }
.service-other-internet { background: linear-gradient(135deg, #0EA5E9, #22C55E); }
.service-other-credit { background: linear-gradient(135deg, #64748B, #111827); }
.service-other-emeterai { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.service-other-sign { background: linear-gradient(135deg, #2563EB, #7C3AED); }
.service-other-ticket { background: linear-gradient(135deg, #06B6D4, #2563EB); }
.service-other-hotel { background: linear-gradient(135deg, #059669, #84CC16); }
.quick-label { font-size: 11px; font-weight: 700; color: var(--text); text-align: center; }

.service-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px 10px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 20px 12px;
  box-shadow: 0 8px 26px rgba(15,23,42,.06);
}
.game-grid {
  padding: 20px 16px;
  gap: 14px 12px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.service-choice {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 7px;
  text-align: center;
}
.service-choice.selected {
  border: 0;
  box-shadow: none;
}
.service-choice.selected::after {
  display: none;
}
.service-choice-icon {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: .2px;
  line-height: 1;
}
.service-choice .product-nominal {
  width: 100%;
  color: var(--text);
  font-size: 11px;
  line-height: 1.15;
  font-weight: 900;
}
.service-choice .product-desc {
  max-width: 78px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.15;
  font-weight: 700;
}
.game-grid .service-choice {
  min-height: 72px;
  justify-content: center;
}
.game-grid .service-choice .product-nominal {
  min-height: 24px;
  max-width: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-grid .service-choice .product-desc {
  max-width: 72px;
}
.service-game-ml { background: linear-gradient(135deg, #3B6FEF, #6D5DF6); }
.service-game-ff { background: linear-gradient(135deg, #FF8A3D, #F59E0B); }
.service-game-pubg { background: linear-gradient(135deg, #111827, #4B5563); }
.service-game-valorant { background: linear-gradient(135deg, #E5484D, #F9738E); }
/* Section */
.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 16px 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.see-all { font-size: 12px; color: var(--primary); font-weight: 700; cursor: pointer; }

/* Promo banner */
.promo-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 16px;
}
.promo-scroll::-webkit-scrollbar { display: none; }
.promo-card {
  min-width: 280px;
  height: 130px;
  border-radius: 20px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s;
}
.promo-card:active { transform: scale(0.97); }
.promo-card-1 { background: linear-gradient(135deg, #5B4FCF, #FF6B35); }
.promo-card-2 { background: linear-gradient(135deg, #11998e, #38ef7d); }
.promo-card-3 { background: linear-gradient(135deg, #fc4a1a, #f7b733); }
.promo-card::before {
  content: '';
  position: absolute;
  width: 120px; height: 120px;
  background: rgba(255,255,255,0.08);
  border-radius: 50%;
  right: -30px; top: -30px;
}
.promo-tag {
  background: rgba(255,255,255,0.25);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 100px;
  letter-spacing: 1px;
  width: fit-content;
}
.promo-title { color: #fff; font-size: 16px; font-weight: 900; }
.promo-desc { color: rgba(255,255,255,0.8); font-size: 12px; font-weight: 600; }
.mid-banner {
  margin: 4px 0 16px;
  border-radius: 20px;
  padding: 16px 18px;
  background: linear-gradient(135deg, #111827, #2457D6 52%, #08A88A);
  color: #FFFFFF;
  box-shadow: 0 14px 30px rgba(15,23,42,.14);
  cursor: pointer;
}
.mid-banner:active {
  transform: scale(.985);
}
.mid-banner-badge {
  display: inline-flex;
  width: fit-content;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 12px;
}
.mid-banner-title {
  font-size: 17px;
  font-weight: 900;
  line-height: 1.15;
}
.mid-banner-sub {
  margin-top: 4px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

/* Transaksi terakhir */
.txn-list { display: flex; flex-direction: column; gap: 10px; }
.txn-item {
  background: var(--card);
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  cursor: pointer;
  transition: transform 0.15s;
}
.txn-item:active { transform: scale(0.98); }
.txn-icon {
  width: 44px; height: 44px;
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.txn-body { flex: 1; }
.txn-name { font-size: 14px; font-weight: 700; color: var(--text); }
.txn-detail { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.txn-right { text-align: right; }
.txn-amount { font-size: 14px; font-weight: 800; color: var(--text); }
.txn-status {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  margin-top: 4px;
  display: inline-block;
}
.status-success { background: rgba(0,200,150,0.12); color: var(--accent2); }
.status-pending { background: rgba(255,165,2,0.12); color: var(--warning); }
.status-fail { background: rgba(255,71,87,0.12); color: var(--danger); }

/* ============ PRODUCT SCREEN ============ */
.product-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 20px 20px 20px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.back-btn {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 18px;
  flex-shrink: 0;
}
.product-title { color: #fff; font-size: 18px; font-weight: 800; }
.product-subtitle { color: rgba(255,255,255,0.7); font-size: 12px; font-weight: 600; }

.phone-input-card {
  margin: 16px;
  background: var(--card);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}
.input-label { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 10px; }
.phone-field {
  display: flex;
  gap: 10px;
  align-items: center;
}
.country-code {
  background: var(--bg);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  flex-shrink: 0;
}
.phone-input {
  flex: 1;
  background: var(--bg);
  border: none;
  border-radius: 12px;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  outline: none;
  width: 100%;
}
.phone-input::placeholder { color: var(--muted); font-weight: 600; }
.operator-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.op-dot { width: 8px; height: 8px; background: var(--accent2); border-radius: 50%; }
.op-name { font-size: 13px; font-weight: 700; color: var(--accent2); }

.product-section { padding: 0 16px 16px; }
.product-section.locked {
  display: none;
}
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.product-card {
  background: var(--card);
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all 0.2s;
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  position: relative;
  overflow: hidden;
}
.product-card:active { transform: scale(0.97); }
.product-card.selected {
  border-color: var(--primary);
  background: rgba(91,79,207,0.05);
}
.product-card.selected::after {
  content: 'OK';
  position: absolute;
  top: 8px; right: 10px;
  width: 20px; height: 20px;
  background: var(--primary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px;
  color: #fff;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}
.product-nominal { font-size: 18px; font-weight: 900; color: var(--text); }
.product-desc { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.product-price { font-size: 14px; font-weight: 800; color: var(--primary); margin-top: 8px; }
.product-original { font-size: 11px; color: var(--muted); text-decoration: line-through; font-weight: 600; }
.product-badge {
  position: absolute;
  top: 0; left: 0;
  background: var(--accent);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 0 0 10px 0;
}

/* Tab filters */
.tab-filter {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 14px;
}
.tab-filter::-webkit-scrollbar { display: none; }
.filter-btn {
  padding: 8px 16px;
  border-radius: 100px;
  border: 2px solid var(--border);
  background: var(--card);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s;
  flex-shrink: 0;
}
.filter-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Buy bar */
.buy-bar {
  position: sticky;
  bottom: 0;
  background: var(--card);
  padding: 16px 16px calc(16px + var(--safe-bottom));
  border-top: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: center;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.08);
}
.buy-info { flex: 1; }
.buy-label { font-size: 11px; color: var(--muted); font-weight: 600; }
.buy-price { font-size: 20px; font-weight: 900; color: var(--primary); }
.buy-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 16px;
  padding: 14px 28px;
  font-family: var(--font);
  font-size: 15px;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.15s;
  box-shadow: 0 6px 20px rgba(91,79,207,0.4);
}
.buy-btn:active { transform: scale(0.96); }
.buy-btn:disabled {
  background: var(--border);
  color: var(--muted);
  box-shadow: none;
}

/* ============ BOTTOM NAV ============ */
.bottom-nav {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: var(--card);
  border-top: 1px solid var(--border);
  display: flex;
  padding: 10px 0 calc(10px + var(--safe-bottom));
  z-index: 100;
  box-shadow: 0 -8px 30px rgba(0,0,0,0.06);
}
.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  padding: 4px 0;
  transition: transform 0.15s;
}
.nav-item:active { transform: scale(0.9); }
.nav-icon { font-size: 22px; line-height: 1; }
.nav-label { font-size: 10px; font-weight: 700; color: var(--muted); }
.nav-item.active .nav-label { color: var(--primary); }
.nav-dot {
  width: 5px; height: 5px;
  background: var(--primary);
  border-radius: 50%;
  display: none;
}
.nav-item.active .nav-dot { display: block; }

/* ============ MODAL ============ */
.modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 200;
  display: none;
  align-items: flex-end;
}
.modal-overlay.show { display: flex; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-sheet {
  background: var(--card);
  border-radius: 28px 28px 0 0;
  padding: 20px 20px calc(20px + var(--safe-bottom));
  width: 100%;
  animation: slideUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes slideUp {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.modal-handle {
  width: 40px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 0 auto 20px;
}
.modal-title { font-size: 18px; font-weight: 900; color: var(--text); margin-bottom: 4px; }
.modal-sub { font-size: 13px; color: var(--muted); font-weight: 600; margin-bottom: 20px; }
.modal-detail-row {
  display: flex;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.modal-detail-row:last-of-type { border-bottom: none; }
.detail-key { font-size: 13px; color: var(--muted); font-weight: 600; }
.detail-val { font-size: 13px; font-weight: 800; color: var(--text); }
.modal-total {
  background: linear-gradient(135deg, rgba(91,79,207,0.08), rgba(91,79,207,0.04));
  border-radius: 16px;
  padding: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 16px 0;
}
.total-label { font-size: 14px; font-weight: 700; color: var(--text); }
.total-val { font-size: 22px; font-weight: 900; color: var(--primary); }
.confirm-btn {
  width: 100%;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  border: none;
  border-radius: 18px;
  padding: 16px;
  font-family: var(--font);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 8px 25px rgba(91,79,207,0.4);
  transition: transform 0.15s;
}
.confirm-btn:active { transform: scale(0.98); }

/* Toast */
.toast {
  position: absolute;
  top: 60px;
  left: 20px; right: 20px;
  background: var(--text);
  color: #fff;
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 14px;
  font-weight: 700;
  z-index: 300;
  display: none;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
  animation: slideDown 0.3s ease;
}
.toast.show { display: flex; }
@keyframes slideDown { from { transform: translateY(-20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast.success { background: var(--accent2); }
.toast.error { background: var(--danger); }

/* Riwayat screen */
.riwayat-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 20px;
  color: #fff;
}
.riwayat-title { font-size: 20px; font-weight: 900; }
.riwayat-sub { font-size: 13px; opacity: 0.7; font-weight: 600; margin-top: 4px; }

.filter-tabs {
  display: flex;
  background: var(--card);
  padding: 12px 16px;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.filter-tabs::-webkit-scrollbar { display: none; }

.txn-full-list { padding: 16px; display: flex; flex-direction: column; gap: 10px; padding-bottom: 100px; }
.txn-full-list .txn-item { cursor: pointer; }
.txn-full-list .txn-item:active { transform: scale(0.985); }
.receipt-note {
  background: #F8FAFC;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.45;
  margin-top: 10px;
}

/* Profile screen */
.profile-header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  padding: 30px 20px 40px;
  text-align: center;
}
.profile-avatar {
  width: 80px; height: 80px;
  background: linear-gradient(135deg, var(--accent), #FF9F43);
  border-radius: 28px;
  display: flex; align-items: center; justify-content: center;
  font-size: 36px;
  margin: 0 auto 12px;
  box-shadow: 0 8px 25px rgba(255,107,53,0.4);
}
.profile-name { color: #fff; font-size: 22px; font-weight: 900; }
.profile-phone { color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 600; margin-top: 4px; }
.profile-level {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255,255,255,0.15);
  color: #FFD700;
  border-radius: 100px;
  padding: 4px 14px;
  font-size: 12px;
  font-weight: 800;
  margin-top: 10px;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin: -1px 0;
}
.stat-item {
  background: var(--card);
  padding: 16px 8px;
  text-align: center;
}
.stat-val { font-size: 18px; font-weight: 900; color: var(--primary); }
.stat-key { font-size: 11px; color: var(--muted); font-weight: 600; margin-top: 2px; }

.menu-group { margin: 16px; }
.menu-group-title { font-size: 11px; font-weight: 800; color: var(--muted); letter-spacing: 1.5px; text-transform: uppercase; margin-bottom: 8px; padding: 0 4px; }
.menu-list { background: var(--card); border-radius: 20px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.04); }
.menu-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  cursor: pointer;
  transition: background 0.15s;
  border-bottom: 1px solid var(--border);
}
.menu-item:last-child { border-bottom: none; }
.menu-item:active { background: var(--bg); }
.menu-item-icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.menu-item-text { flex: 1; }
.menu-item-name { font-size: 14px; font-weight: 700; color: var(--text); }
.menu-item-desc { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 1px; }
.menu-arrow { color: var(--muted); font-size: 16px; }
.menu-badge {
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 100px;
  padding: 2px 7px;
}
.voucher-item.used {
  opacity: .72;
}
.voucher-use-btn {
  border: 0;
  border-radius: 999px;
  background: var(--danger);
  color: #FFFFFF;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 900;
  padding: 5px 9px;
  cursor: pointer;
  flex-shrink: 0;
}
.voucher-use-btn.used {
  background: #E5E7EB;
  color: #6B7280;
  cursor: default;
}

/* Design refresh: Android-first mobile app */
:root {
  --primary: #2457D6;
  --primary-light: #4F8BFF;
  --primary-dark: #12357F;
  --accent: #FF7A3D;
  --accent2: #08A88A;
  --bg: #F6F8FC;
  --card: #FFFFFF;
  --text: #111827;
  --muted: #6B7280;
  --border: #E4E8F1;
  --danger: #E5484D;
  --warning: #F59E0B;
}

html, body {
  background: #FFFFFF;
}

.phone {
  width: min(430px, 100vw);
  height: min(920px, 100vh);
  border-radius: 34px;
  background: var(--bg);
  border: 0;
  box-shadow: 0 24px 60px rgba(2,6,23,.28);
}

.status-bar { display: none; }

.header,
.product-header,
.riwayat-header,
.profile-header {
  background:
    linear-gradient(145deg, rgba(18,53,127,.98), rgba(36,87,214,.94) 54%, rgba(8,168,138,.9));
}

.header { padding: 20px 18px 30px; }
.header::before,
.header::after,
.promo-card::before { display: none; }
.header-top {
  margin-bottom: 20px;
  justify-content: flex-start;
}
.greeting {
  color: rgba(255,255,255,.78);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 3px;
  text-transform: lowercase;
}
.username {
  font-size: 20px;
  letter-spacing: 0;
  line-height: 1.15;
  font-weight: 900;
}
.user-id {
  margin-top: 5px;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .6px;
  line-height: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}
.copy-id-btn {
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(255,255,255,.14);
  color: #fff;
  border-radius: 999px;
  padding: 2px 6px;
  font-family: var(--font);
  font-size: 9px;
  font-weight: 900;
  line-height: 1.2;
  cursor: pointer;
}
.copy-id-btn:active { transform: scale(.96); }
.hide-balance-btn {
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  color: #fff;
  border-radius: 999px;
  width: 44px;
  min-width: 44px;
  height: 24px;
  padding: 0;
  font-family: var(--font);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}
.hide-balance-btn:active { transform: scale(.96); }
.balance-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}
.home-banner {
  margin-bottom: 12px;
  border-radius: 18px;
  padding: 14px 14px;
  background: linear-gradient(135deg, #2457D6, #08A88A);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 12px 28px rgba(15,23,42,.12);
  cursor: pointer;
  transition: transform .16s ease, filter .16s ease;
}
.home-banner:active {
  transform: scale(.985);
  filter: brightness(.98);
}
.home-banner-title {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
}
.home-banner-sub {
  margin-top: 3px;
  color: rgba(255,255,255,.78);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.home-banner-dots {
  display: flex;
  gap: 5px;
  margin-top: 9px;
}
.home-banner-dot {
  width: 6px;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.35);
  padding: 0;
  cursor: pointer;
}
.home-banner-dot.active {
  width: 18px;
  background: #FFFFFF;
}
.home-banner-btn {
  border: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  color: #FFFFFF;
  font-family: var(--font);
  font-size: 11px;
  font-weight: 900;
  padding: 8px 12px;
  flex-shrink: 0;
}
.scan-shortcut {
  margin-bottom: 14px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 10px 26px rgba(15,23,42,.07);
  cursor: pointer;
}
.scan-camera {
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 900;
  flex-shrink: 0;
}
.scan-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.scan-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px;
}

.form-input {
  width: 100%;
  border: 1px solid var(--border);
  background: #F6F8FC;
  color: var(--text);
  border-radius: 14px;
  padding: 13px 14px;
  font-family: var(--font);
  font-size: 14px;
  font-weight: 700;
  outline: none;
}
.form-input:focus { border-color: var(--primary); background: #fff; }
.avatar-editor {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: #F8FAFC;
  margin-bottom: 16px;
}
.kyc-upload {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 48px;
  border: 1px dashed rgba(36,87,214,.38);
  border-radius: 14px;
  background: #F7F9FD;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.kyc-upload input {
  display: none;
}
.kyc-file-name {
  margin-top: 7px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
}
.profile-level.kyc-pending {
  background: rgba(245,158,11,.16);
  color: #B45309;
}
.profile-level.kyc-verified {
  background: rgba(8,168,138,.16);
  color: #047857;
}
.avatar-preview {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB547, #FF7A3D);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  font-size: 28px;
  font-weight: 900;
  border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(15,23,42,.12);
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.avatar-actions { flex: 1; min-width: 0; }
.avatar-upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #EAF0FF;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}
.avatar-upload-btn input { display: none; }
.avatar-swatches {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.avatar-swatch {
  width: 26px;
  height: 26px;
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--border);
  cursor: pointer;
}
.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid var(--border);
}
.setting-row:last-child { border-bottom: 0; }
.setting-row-label { font-size: 14px; font-weight: 800; color: var(--text); }
.setting-row-sub { font-size: 12px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.payment-detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15,23,42,.07);
}
.promo-detail-card {
  padding: 20px;
}
.promo-detail-badge {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(36,87,214,.10);
  color: var(--primary);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .4px;
}
.promo-detail-name {
  margin-top: 16px;
  color: var(--text);
  font-size: 22px;
  line-height: 1.15;
  font-weight: 900;
}
.promo-detail-desc {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}
.detail-list {
  margin-top: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  background: #F8FAFC;
}
.detail-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--border);
}
.detail-row:last-child {
  border-bottom: 0;
}
.detail-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.detail-row strong {
  color: var(--text);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
  line-height: 1.35;
}
.qris-box {
  width: 184px;
  height: 184px;
  margin: 8px auto 16px;
  border-radius: 20px;
  background:
    linear-gradient(90deg, #111827 12px, transparent 12px) 0 0 / 28px 28px,
    linear-gradient(#111827 12px, transparent 12px) 0 0 / 28px 28px,
    #fff;
  border: 12px solid #fff;
  box-shadow: inset 0 0 0 1px var(--border), 0 12px 28px rgba(15,23,42,.12);
}
.payment-title {
  font-size: 16px;
  font-weight: 900;
  color: var(--text);
  line-height: 1.2;
}
.payment-sub {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
  margin-top: 4px;
}
.bank-code {
  font-size: 18px;
  font-weight: 900;
  color: var(--primary);
  margin-top: 6px;
  letter-spacing: .4px;
}
.payment-method-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.payment-option {
  width: 100%;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-family: var(--font);
  text-align: left;
  cursor: pointer;
}
.payment-option:active { transform: scale(.985); }
.payment-option-title {
  font-size: 14px;
  font-weight: 900;
  color: var(--text);
}
.payment-option-sub {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 2px;
}
.payment-code-box {
  border: 1px solid var(--border);
  background: #F8FAFC;
  border-radius: 18px;
  padding: 16px;
  text-align: center;
}
.payment-code-label {
  font-size: 12px;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
}
.payment-code-value {
  color: var(--primary);
  font-size: 20px;
  font-weight: 900;
  line-height: 1.25;
  margin-top: 8px;
  word-break: break-word;
}
.invoice-qris {
  display: none;
  margin: 0 0 14px;
}
.invoice-qris.show {
  display: block;
}
.invoice-qris .qris-box {
  width: 156px;
  height: 156px;
  margin: 0 auto 10px;
}
.invoice-payment-code {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: #F8FAFC;
  padding: 14px;
  margin: 0 0 14px;
}
.invoice-payment-code .payment-code-value {
  font-size: 18px;
  text-align: left;
}
.invoice-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 10px 26px rgba(15,23,42,.07);
}
.invoice-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: #EAFBF5;
  color: var(--accent2);
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 14px;
}
.invoice-id {
  color: var(--primary);
  font-size: 18px;
  font-weight: 900;
  line-height: 1.2;
  margin-bottom: 12px;
}
.invoice-countdown {
  background: #FFF7E6;
  color: #B45309;
  border: 1px solid rgba(245,158,11,.24);
  border-radius: 14px;
  padding: 12px;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  margin: 12px 0;
}
.invoice-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.outline-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 999px;
  padding: 13px;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
.outline-btn.danger {
  color: var(--danger);
  border-color: rgba(229,72,77,.24);
  background: rgba(229,72,77,.06);
}
.voucher-camera-panel {
  display: none;
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  margin-top: 14px;
  border-radius: 18px;
  overflow: hidden;
  background: #0F172A;
  border: 1px solid var(--border);
}
.voucher-camera-panel.show {
  display: block;
}
.voucher-camera-panel video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.voucher-scan-frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 72%;
  height: 38%;
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255,255,255,.9);
  border-radius: 14px;
  box-shadow: 0 0 0 999px rgba(15,23,42,.28);
  pointer-events: none;
}
.voucher-camera-actions {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}
.voucher-camera-actions.show {
  display: grid;
}
.toggle-switch {
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
}
.toggle-switch::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  position: absolute;
  top: 3px;
  left: 3px;
  transition: left .2s;
}
.toggle-switch.on { background: var(--accent2); }
.toggle-switch.on::after { left: 23px; }

.avatar,
.profile-avatar {
  border-radius: 50%;
  background: linear-gradient(135deg, #FFB547, #FF7A3D);
  box-shadow: 0 8px 22px rgba(255,122,61,.34);
}

.balance-card {
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.14);
  box-shadow: 0 18px 34px rgba(15,23,42,.18);
  padding: 16px 20px 18px;
}

.balance-label {
  letter-spacing: .7px;
  line-height: 1;
  margin-bottom: 8px;
}
.balance-amount {
  font-size: 30px;
  line-height: 1;
  margin: 0;
}
.balance-row {
  align-items: center;
  gap: 16px;
}

.topup-btn,
.buy-btn,
.confirm-btn {
  background: linear-gradient(135deg, var(--accent), #FFB547);
  border-radius: 999px;
  box-shadow: 0 10px 20px rgba(255,122,61,.26);
}

#screen-home .header {
  padding: 26px 18px 30px;
}
#screen-home .header-top {
  margin-bottom: 16px;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}
#screen-home .greeting {
  font-size: 12px;
  line-height: 1.2;
  margin-bottom: 4px;
  color: rgba(255,255,255,.82);
}
#screen-home .username {
  font-size: 20px;
  line-height: 1.15;
}
#screen-home .user-id {
  margin-top: 8px;
  gap: 7px;
  align-items: center;
  line-height: 1.2;
}
#screen-home .copy-id-btn {
  height: 19px;
  padding: 0 7px;
  display: inline-flex;
  align-items: center;
}
#screen-home .home-avatar {
  width: 52px;
  height: 52px;
  border: 2px solid rgba(255,255,255,.65);
  border-radius: 50%;
  background: linear-gradient(135deg,#FFB547,#FF7A3D);
  color: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-size: 18px;
  font-weight: 900;
  box-shadow: 0 12px 24px rgba(15,23,42,.18);
  cursor: pointer;
  flex-shrink: 0;
}
#screen-home .home-avatar:active {
  transform: scale(.96);
}
#screen-home .balance-card {
  padding: 17px 20px;
  border-radius: 18px;
}
#screen-home .balance-label {
  margin-bottom: 10px;
}
#screen-home .balance-row {
  min-height: 38px;
}
#screen-home .balance-main {
  gap: 9px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: center;
  max-width: calc(100% - 118px);
}
#screen-home .balance-amount {
  font-size: 30px;
  line-height: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#screen-home .hide-balance-btn {
  height: 24px;
  padding: 0;
  justify-self: start;
}
#screen-home .topup-btn {
  min-height: 38px;
  padding: 0 17px;
}

.content {
  margin-top: 0;
  padding: 14px 14px 106px;
}

.phone-input-card,
.menu-list,
.stat-item,
.txn-item {
  border: 1px solid rgba(228,232,241,.92);
  box-shadow: 0 10px 26px rgba(15,23,42,.07);
}

.quick-menu {
  border-radius: 22px;
  padding: 0 2px;
  margin-top: 0;
  border: 0;
  box-shadow: none;
}

.quick-grid { gap: 10px 8px; }
.service-group {
  padding: 0;
}
.service-group + .service-group {
  margin-top: 6px;
}
.service-group-title {
  letter-spacing: 0;
}
.service-choice-grid {
  gap: 12px 8px;
  padding: 18px 10px;
}
.game-grid {
  padding: 18px 12px;
  gap: 12px 8px;
  background: transparent;
  border: 0;
  box-shadow: none;
}
.quick-item {
  min-height: 78px;
  border-radius: 18px;
  justify-content: center;
}

.quick-item:active,
.txn-item:active,
.product-card:active { transform: scale(.98); }

.quick-icon {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  color: #fff;
  box-shadow: inset 0 -10px 20px rgba(0,0,0,.12);
}
.service-choice-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  font-size: 12px;
}
.service-choice .product-nominal {
  font-size: 10px;
}
.service-choice .product-desc {
  font-size: 9px;
}
.game-grid .service-choice .product-nominal {
  max-width: 68px;
  min-height: 24px;
}

.quick-icon,
.nav-icon,
.txn-icon {
  font-size: 0;
}

.quick-icon::before,
.nav-icon::before,
.txn-icon::before {
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  color: #fff;
}

.qi-pulsa::before { content: "PLS"; }
.qi-data::before { content: "NET"; }
.qi-listrik::before { content: "PLN"; }
.qi-game::before { content: "GM"; }
.qi-emoney::before { content: "PAY"; }
.qi-bpjs::before { content: "BPJS"; font-size: 10px; }
.qi-pdam::before { content: "AIR"; }

.bottom-nav .nav-item:nth-child(1) .nav-icon::before { content: "HM"; color: var(--primary); }
.bottom-nav .nav-item:nth-child(2) .nav-icon::before { content: "RW"; color: #111827; }
.bottom-nav .nav-item:nth-child(3) .nav-icon::before { content: "PR"; color: #111827; }
.bottom-nav .nav-item:nth-child(4) .nav-icon::before { content: "AK"; color: #111827; }
.bottom-nav .nav-item.active .nav-icon::before { color: var(--primary); }

.txn-list .txn-item:nth-child(1) .txn-icon::before,
.txn-full-list .txn-item[data-category="pulsa"] .txn-icon::before { content: "PLS"; }
.txn-list .txn-item:nth-child(2) .txn-icon::before,
.txn-full-list .txn-item[data-category="listrik"] .txn-icon::before { content: "PLN"; }
.txn-list .txn-item:nth-child(3) .txn-icon::before,
.txn-full-list .txn-item[data-category="data"] .txn-icon::before { content: "NET"; }
.txn-full-list .txn-item[data-category="game"] .txn-icon::before { content: "GM"; }

.qi-pulsa { background: linear-gradient(135deg, #2457D6, #4F8BFF); }
.qi-data { background: linear-gradient(135deg, #08A88A, #35D3B4); }
.qi-listrik { background: linear-gradient(135deg, #F59E0B, #FFCF5A); }
.qi-game { background: linear-gradient(135deg, #7C3AED, #DB2777); }
.qi-emoney { background: linear-gradient(135deg, #0EA5E9, #22D3EE); }
.qi-bpjs { background: linear-gradient(135deg, #16A34A, #84CC16); }
.qi-pdam { background: linear-gradient(135deg, #0284C7, #38BDF8); }
.service-other-stream { background: linear-gradient(135deg, #7C3AED, #DB2777); }
.service-other-voucher { background: linear-gradient(135deg, #2457D6, #08A88A); }
.service-other-internet { background: linear-gradient(135deg, #0EA5E9, #22C55E); }
.service-other-credit { background: linear-gradient(135deg, #64748B, #111827); }
.service-other-emeterai { background: linear-gradient(135deg, #F59E0B, #EF4444); }
.service-other-sign { background: linear-gradient(135deg, #2563EB, #7C3AED); }
.service-other-ticket { background: linear-gradient(135deg, #06B6D4, #2563EB); }
.service-other-hotel { background: linear-gradient(135deg, #059669, #84CC16); }

.quick-label,
.txn-name,
.menu-item-name { color: #111827; }

.section-title {
  margin: 18px 2px 10px;
  font-size: 15px;
  letter-spacing: 0;
}

.see-all { color: var(--primary); }

.promo-card {
  min-width: min(276px, calc(100vw - 128px));
  height: 126px;
  border-radius: 22px;
  box-shadow: 0 14px 28px rgba(15,23,42,.12);
}

.promo-card-1 { background: linear-gradient(135deg, #2457D6, #08A88A); }
.promo-card-2 { background: linear-gradient(135deg, #08A88A, #F59E0B); }
.promo-card-3 { background: linear-gradient(135deg, #FF7A3D, #E5484D); }
.promo-tag {
  background: rgba(255,255,255,.2);
  border: 1px solid rgba(255,255,255,.22);
}

.txn-item {
  border-radius: 18px;
  padding: 13px 14px;
}

.txn-icon,
.menu-item-icon { border-radius: 16px; }
.txn-body { min-width: 0; }
.txn-name,
.txn-detail {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.txn-right {
  flex-shrink: 0;
  width: 86px;
  max-width: 86px;
  text-align: right;
}
.txn-amount {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.txn-amount { color: #0F172A; }
.txn-status { border-radius: 999px; }

.product-header {
  padding: 18px 18px 22px;
  border-bottom-left-radius: 26px;
  border-bottom-right-radius: 26px;
}

.back-btn {
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 14px;
}

.phone-input-card { border-radius: 22px; }
.phone-field {
  border-radius: 18px;
  background: #F8FAFC;
}

.country-code {
  background: #EAF0FF;
  color: var(--primary);
  border-radius: 14px;
}

.tab-filter,
.filter-tabs { gap: 8px; }

.filter-btn {
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--border);
  color: #475569;
}

.filter-btn.active {
  background: #EAF0FF;
  color: var(--primary);
  box-shadow: none;
}

.product-grid { gap: 14px 12px; }
.product-card {
  position: relative;
  min-height: 98px;
  border-radius: 20px;
  border: 1px solid var(--border);
  box-shadow: 0 8px 20px rgba(15,23,42,.06);
}

.product-card:has(.product-badge) {
  padding-top: 32px;
}

.product-badge {
  top: 10px;
  left: 12px;
  border-radius: 999px;
  padding: 4px 8px;
  line-height: 1;
  box-shadow: 0 4px 10px rgba(255,122,61,.18);
}

.product-nominal {
  line-height: 1.12;
}

.product-desc {
  line-height: 1.35;
}

.product-price,
.product-original {
  line-height: 1.25;
}

.product-card.selected {
  border-color: var(--primary);
  background: linear-gradient(180deg, #FFFFFF, #F0F5FF);
  box-shadow: 0 14px 28px rgba(36,87,214,.14);
}

.product-card.selected::after { background: var(--primary); }
.service-choice-grid .service-choice,
.service-choice-grid .service-choice.selected {
  min-height: 82px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.service-choice-grid .service-choice.selected::after {
  display: none;
}
.service-choice-grid .service-choice:active {
  transform: scale(.96);
}
.game-grid .service-choice {
  justify-content: center;
}
.product-price,
.buy-price,
.stat-val { color: var(--primary); }

.buy-bar {
  position: absolute;
  left: 14px;
  right: auto;
  width: calc(100% - 28px);
  bottom: calc(12px + var(--safe-bottom));
  max-width: none;
  box-sizing: border-box;
  min-height: 74px;
  padding: 14px 16px;
  display: flex;
  gap: 12px;
  align-items: center;
  border-radius: 22px;
  border: 1px solid rgba(226,232,240,.98);
  background: rgba(255,255,255,.98);
  box-shadow: 0 16px 38px rgba(15,23,42,.14);
  overflow: hidden;
  z-index: 90;
}

.buy-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
  justify-content: center;
}

.buy-label {
  line-height: 1;
  display: block;
  width: fit-content;
  max-width: 100%;
  background: transparent;
}

.buy-price {
  line-height: 1.15;
  display: block;
  max-width: 100%;
}

.buy-btn {
  flex: 0 0 auto;
  min-width: 86px;
  height: 48px;
  padding: 0 18px;
  border-radius: 999px;
}

.bottom-nav {
  left: 12px;
  right: 12px;
  width: auto;
  max-width: calc(100% - 24px);
  bottom: calc(8px + var(--safe-bottom));
  min-height: 58px;
  padding: 7px 6px calc(7px + var(--safe-bottom));
  border-radius: 22px;
  border: 1px solid rgba(228,232,241,.95);
  box-shadow: 0 12px 30px rgba(15,23,42,.12);
  align-items: center;
}
.bottom-nav .nav-item {
  min-height: 44px;
  gap: 2px;
  padding: 4px 0 3px;
}
.bottom-nav .nav-icon::before {
  font-size: 11px;
}
.bottom-nav .nav-label {
  font-size: 9px;
  line-height: 1.1;
}
.bottom-nav .nav-dot {
  width: 4px;
  height: 4px;
}

.nav-item.active .nav-icon { color: var(--primary); }
.nav-dot { background: var(--accent); }
.modal-sheet { border-radius: 28px 28px 0 0; }
.toast {
  border-radius: 999px;
  background: #111827;
}

#screen-profil .profile-header {
  padding: 30px 20px 48px;
  text-align: center;
}

#screen-profil .profile-avatar {
  width: 76px;
  height: 76px;
  margin: 0 auto 14px;
  border: 3px solid rgba(255,255,255,.26);
  color: #111827;
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
}

#screen-profil .profile-name {
  font-size: 21px;
  line-height: 1.2;
  letter-spacing: 0;
  margin-bottom: 6px;
}

#screen-profil .profile-phone {
  color: rgba(255,255,255,.78);
  font-size: 13px;
  line-height: 1;
  margin-top: 0;
}

#screen-profil .profile-account-id {
  color: rgba(255,255,255,.62);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .4px;
  line-height: 1;
  margin-top: 7px;
  text-transform: lowercase;
}

#screen-profil .profile-level {
  margin-top: 12px;
  padding: 5px 13px;
  background: rgba(255,255,255,.16);
  border: 1px solid rgba(255,255,255,.16);
  color: #FFF3B0;
  font-size: 11px;
  line-height: 1;
  box-shadow: none;
}

#screen-profil .profile-stats {
  margin: -26px 14px 0;
  padding: 0;
  gap: 0;
  border: 1px solid rgba(228,232,241,.95);
  border-radius: 20px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 14px 32px rgba(15,23,42,.12);
  position: relative;
  z-index: 2;
}

#screen-profil .stat-item {
  min-height: 76px;
  padding: 15px 8px 13px;
  border: 0;
  border-right: 1px solid var(--border);
  box-shadow: none;
}

#screen-profil .stat-item:last-child { border-right: 0; }

#screen-profil .stat-val {
  font-size: 17px;
  line-height: 1.15;
}

#screen-profil .stat-key {
  margin-top: 5px;
  font-size: 11px;
  line-height: 1;
}

#screen-profil .menu-group:first-child { margin-top: 18px; }
#screen-reward .profile-stats {
  margin: -12px 18px 0;
  padding: 0;
  gap: 0;
  border: 1px solid rgba(228,232,241,.95);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  box-shadow: 0 12px 28px rgba(15,23,42,.09);
  position: relative;
  z-index: 2;
}

#screen-reward .stat-item {
  min-height: 68px;
  padding: 13px 8px 11px;
  border: 0;
  border-right: 1px solid var(--border);
  box-shadow: none;
}

#screen-reward .stat-item:last-child { border-right: 0; }
#screen-reward .stat-val { font-size: 17px; line-height: 1.15; }
#screen-reward .stat-key { margin-top: 5px; font-size: 11px; line-height: 1; }
#screen-reward .reward-section {
  padding: 28px 18px 110px;
}
#screen-reward .reward-section .section-title {
  margin: 8px 2px 14px;
}
#screen-reward .reward-section .product-grid {
  gap: 14px;
}
#screen-reward .reward-card {
  min-height: 112px;
  padding: 18px 16px;
  border-radius: 18px;
}

#screen-reward .reward-card .product-price {
  display: inline-flex;
  margin-top: 12px;
  padding: 7px 12px;
  border-radius: 999px;
  background: #EAF0FF;
  line-height: 1;
}
#screen-reward .reward-main-btn {
  width: 100%;
  min-height: 54px;
  margin-top: 18px;
}
.menu-group { margin: 16px 14px; }
.menu-list { border-radius: 20px; }

@media (max-width: 520px) {
  html, body {
    display: block;
    background: var(--bg);
    width: 100%;
    overflow: hidden;
  }

  .phone {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100dvh;
    min-height: 100vh;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .screen,
  .header,
  .product-header,
  .riwayat-header,
  .profile-header,
  .content {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  .balance-row {
    gap: 12px;
  }

  .balance-amount {
    min-width: 0;
    font-size: 29px;
  }

  .topup-btn {
    flex-shrink: 0;
    padding: 9px 14px;
    font-size: 12px;
  }

  .txn-list,
  .txn-full-list {
    width: 100%;
    overflow: hidden;
  }

  .txn-item {
    width: 100%;
    max-width: 100%;
    gap: 10px;
  }

  .txn-right {
    width: 82px;
    max-width: 82px;
    margin-right: 6px;
  }

  .txn-amount {
    font-size: 12px;
  }

  .see-all {
    margin-right: 4px;
    white-space: nowrap;
  }

  .header,
  .product-header,
  .riwayat-header,
  .profile-header {
    padding-right: 18px;
  }

  .content,
  .product-section,
  .filter-tabs,
  .profile-stats,
  .menu-group {
    padding-right: 14px;
  }

  .bottom-nav {
    left: 14px;
    right: 14px;
    max-width: calc(100% - 28px);
    bottom: calc(8px + var(--safe-bottom));
  }

  .buy-bar {
    left: 14px;
    right: auto;
    width: calc(100% - 28px);
    max-width: none;
    bottom: calc(14px + var(--safe-bottom));
    border-radius: 24px;
  }
}

@media (max-width: 360px) {
  .quick-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 4px;
  }

  .quick-icon {
    width: 42px;
    height: 42px;
  }

  .quick-label { font-size: 10px; }
  .balance-amount { font-size: 25px; }
}


.product-empty{
  grid-column:1/-1;
  padding:22px 16px;
  border:1px dashed #D8E0EC;
  border-radius:18px;
  background:#fff;
  color:#68758A;
  font-size:13px;
  font-weight:800;
  text-align:center;
}

.auth-card-centered .auth-primary-btn {
  border-radius: 12px;
  background: linear-gradient(135deg, #2457D6, #17B6A2);
  box-shadow: 0 12px 24px rgba(36,87,214,.20);
  padding: 10px 16px;
}

/* Distinct Greattech auth variant */
.auth-minimal {
  background:
    radial-gradient(circle at 12% 16%, rgba(36,87,214,.14), transparent 26%),
    radial-gradient(circle at 88% 88%, rgba(23,182,162,.16), transparent 32%),
    linear-gradient(180deg,#F8FBFF 0%,#EEF5F8 100%);
}

.auth-dots {
  width: 210px;
  height: 210px;
  right: -72px;
  top: -18px;
  opacity: .12;
  background-image: radial-gradient(#2457D6 3px, transparent 3px);
  background-size: 22px 22px;
  border-radius: 50%;
}

.auth-card-centered {
  border-radius: 26px;
  border: 1px solid #DDE6F1;
  box-shadow: 0 24px 60px rgba(15,23,42,.10);
}

.auth-card-centered::before {
  height: 7px;
  background: linear-gradient(90deg,#2457D6,#17B6A2);
}

.auth-brand-card {
  padding-bottom: 24px;
}

.auth-logo-text {
  width: 100%;
  justify-content: flex-start;
}

.auth-logo-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: linear-gradient(135deg,#2457D6,#17B6A2);
}

.auth-logo-word {
  font-size: 24px;
}

.auth-logo-word strong {
  color: #17A894;
}

.auth-card-centered .input-label {
  color: #52657F;
  font-size: 11px;
  letter-spacing: .6px;
}

#screen-login .form-input,
.auth-card-centered .form-input {
  min-height: 46px;
  border-radius: 14px;
  background: #F8FAFC;
  border-color: #D6DFEC;
}

#screen-login .form-input:focus,
.auth-card-centered .form-input:focus {
  background: #FFFFFF;
  border-color: #2457D6;
  box-shadow: 0 0 0 3px rgba(36,87,214,.10);
}

.captcha-code {
  border-radius: 16px;
  background:
    linear-gradient(135deg,rgba(36,87,214,.08),rgba(23,182,162,.09)),
    #FFFFFF;
}

.auth-card-centered .auth-primary-btn {
  min-height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg,#2457D6,#17B6A2);
}

#screen-edit-profil .edit-profile-header {
  padding: 20px 18px 28px;
  border-bottom-left-radius: 28px;
  border-bottom-right-radius: 28px;
  align-items: center;
}

#screen-edit-profil .edit-profile-section {
  padding: 18px 18px 110px;
}

#screen-edit-profil .edit-profile-card {
  margin: 0;
  padding: 18px;
  border: 1px solid rgba(228,232,241,.95);
  box-shadow: 0 16px 36px rgba(15,23,42,.10);
}

#screen-edit-profil .avatar-editor {
  padding: 13px;
  gap: 13px;
  align-items: center;
  border-radius: 18px;
  margin-bottom: 18px;
}

#screen-edit-profil .avatar-preview {
  width: 66px;
  height: 66px;
  font-size: 27px;
}

#screen-edit-profil .avatar-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

#screen-edit-profil .avatar-upload-btn {
  min-height: 32px;
  padding: 7px 13px;
}

#screen-edit-profil .avatar-swatches {
  margin-top: 0;
  gap: 8px;
  flex-wrap: wrap;
}

#screen-edit-profil .avatar-swatch {
  width: 24px;
  height: 24px;
}

#screen-edit-profil .input-label {
  margin-top: 15px;
  margin-bottom: 8px;
  color: #64748B;
  font-weight: 900;
  letter-spacing: .5px;
}

#screen-edit-profil .edit-profile-card > .input-label:first-child {
  margin-top: 0;
}

#screen-edit-profil .form-input {
  min-height: 48px;
  border-radius: 14px;
  background: #F7F9FD;
}

#screen-edit-profil .confirm-btn {
  min-height: 54px;
  margin-top: 20px !important;
}

#screen-profil .profile-stats {
  width: calc(100% - 28px);
  margin: -26px auto 0;
}

#screen-profil .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
