/* ── Reset & Base ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:    #2563eb;
  --blue-lt: #eff6ff;
  --blue-md: #dbeafe;
  --green:   #16a34a;
  --red:     #dc2626;
  --amber:   #f59e0b;
  --bg:      #eef2f9;
  --surface: #ffffff;
  --border:  #e2e8f0;
  --text-1:  #0f172a;
  --text-2:  #475569;
  --text-3:  #94a3b8;
  --radius:  16px;
  --shadow:  0 2px 12px rgba(0,0,0,0.07);
  --shadow-md: 0 8px 32px rgba(0,0,0,0.1);
  --transition: 0.18s ease;
}

html { font-size: 15px; }
body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: linear-gradient(135deg, #eef2ff 0%, #e8edf8 30%, #f0e6ff 60%, #eef2ff 100%);
  background-attachment: fixed;
  color: var(--text-1);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ── Navbar ── */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.navbar-inner {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
  height: 58px;
  display: flex;
  align-items: center;
  gap: 20px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}

.logo-icon {
  width: 34px;
  height: 34px;
  background: var(--blue);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 2px;
  margin-left: 12px;
}

.nav-link {
  padding: 6px 14px;
  border-radius: 8px;
  border: none;
  background: transparent;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.nav-link:hover { background: #f1f5f9; color: var(--text-1); }
.nav-link.active { background: var(--blue-md); color: var(--blue); font-weight: 600; }

.btn-history-nav {
  margin-left: auto;
  padding: 6px 16px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-history-nav:hover {
  border-color: var(--blue);
  color: var(--blue);
}

/* ── Tab panels ── */
.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Hero Section ── */
.hero {
  max-width: 680px;
  margin: 0 auto;
  padding: 56px 24px 48px;
  text-align: center;
  position: relative;
}

/* Bright background behind hero */
.tab-panel.active#tab-check {
  background: #eef0f8;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 16px;
  border-radius: 20px;
  background: rgba(255,255,255,0.9);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(37,99,235,0.15);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 22px;
  box-shadow: 0 4px 15px rgba(37,99,235,0.1);
  animation: fadeSlideUp 0.6s ease;
}

.hero-title {
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 900;
  color: var(--text-1);
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin-bottom: 16px;
  animation: fadeSlideUp 0.6s ease 0.1s both;
}

.hero-accent {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 50%, #2563eb 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: shimmerText 3s linear infinite;
}

.hero-sub {
  font-size: 15px;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 32px;
  animation: fadeSlideUp 0.6s ease 0.2s both;
}

@keyframes fadeSlideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes shimmerText {
  0%   { background-position: 0% center; }
  100% { background-position: 200% center; }
}

/* ── Decorative Orbs ── */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  width: 300px; height: 300px;
  background: linear-gradient(135deg, #2563eb, #7c3aed);
  top: -80px; left: -120px;
  animation: orbFloat 8s ease-in-out infinite;
}

.orb-2 {
  width: 200px; height: 200px;
  background: linear-gradient(135deg, #06b6d4, #2563eb);
  top: 60px; right: -80px;
  animation: orbFloat 10s ease-in-out infinite reverse;
}

.orb-3 {
  width: 150px; height: 150px;
  background: linear-gradient(135deg, #f59e0b, #ef4444);
  bottom: 80px; left: 40%;
  animation: orbFloat 7s ease-in-out infinite 2s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%      { transform: translate(15px, -20px) scale(1.05); }
  66%      { transform: translate(-10px, 10px) scale(0.95); }
}

/* ── How To Section ── */
.how-to-section {
  margin-top: 28px;
  animation: fadeSlideUp 0.6s ease 0.5s both;
}

.how-to-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 14px;
}

.features-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.feature-card {
  background: white;
  border-radius: 14px;
  padding: 20px 14px;
  text-align: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

.step-number {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: white;
  font-size: 16px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 10px;
  box-shadow: 0 3px 10px rgba(37,99,235,0.3);
}

.feature-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
  margin-bottom: 3px;
}

.feature-desc {
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 500;
}

/* ── Search Card ── */
.search-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 4px 24px rgba(37,99,235,0.08), 0 1px 3px rgba(0,0,0,0.04);
  overflow: hidden;
  margin-bottom: 16px;
  border: 1.5px solid rgba(37,99,235,0.08);
  animation: fadeSlideUp 0.6s ease 0.3s both;
  transition: box-shadow 0.3s, transform 0.3s;
}

.search-card:hover {
  box-shadow: 0 8px 40px rgba(37,99,235,0.14), 0 2px 8px rgba(0,0,0,0.05);
  transform: translateY(-2px);
}

.search-wrap {
  display: flex;
  align-items: center;
  padding: 10px;
  gap: 0;
}

.phone-prefix {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 10px 14px;
  border-right: 1.5px solid var(--border);
  white-space: nowrap;
  flex-shrink: 0;
}

.flag { font-size: 18px; line-height: 1; }

.prefix-code {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-2);
}

.flag-svg {
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
  flex-shrink: 0;
}

.phone-input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 15px;
  font-family: inherit;
  padding: 10px 14px;
  color: var(--text-1);
  background: transparent;
}

.phone-input::placeholder { color: var(--text-3); }

.btn-check {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
  font-family: inherit;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(37,99,235,0.35);
}

.btn-check:hover {
  background: linear-gradient(135deg, #1d4ed8 0%, #4338ca 100%);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(37,99,235,0.45);
}
.btn-check:active { transform: translateY(0); box-shadow: 0 2px 8px rgba(37,99,235,0.3); }
.btn-check:disabled { background: #93c5fd; cursor: not-allowed; transform: none; box-shadow: none; }

/* Info bar */
.search-info-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1.5px solid var(--bg);
  background: #fafbfc;
}

.info-quota {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--text-2);
}

.info-quota strong { color: var(--text-1); }

.info-price {
  font-size: 13px;
  color: var(--text-2);
}

.info-price strong {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-1);
}

/* ── Stats Row ── */
.stats-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

.stat-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
}

.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-icon.blue  { background: #eff6ff; }
.stat-icon.amber { background: #fffbeb; }

.stat-num {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -0.5px;
}

.stat-label {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 1px;
}

/* ── Tags ── */
.result-tags {
  padding: 20px 24px 28px;
  text-align: center;
}

.tags-section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  text-align: left;
}

.tags-icon-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tags-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.tags-subtitle {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 1px;
}

.tags-chips-wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.tag-chip {
  padding: 6px 16px;
  border-radius: 20px;
  background: white;
  color: var(--text-1);
  font-size: 13px;
  font-weight: 500;
  border: 1.5px solid #d1d5db;
  white-space: nowrap;
  transition: background 0.15s, border-color 0.15s;
}

.tag-chip:hover {
  background: var(--blue-lt);
  border-color: var(--blue);
  color: var(--blue);
}

.tags-empty {
  font-size: 13px;
  color: var(--text-3);
  padding: 16px 0;
}

.tags-count {
  font-size: 12px;
  color: var(--text-3);
  padding: 5px 0;
}

.btn-show-all-tags {
  display: block;
  width: 100%;
  margin-top: 12px;
  padding: 10px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.btn-show-all-tags:hover {
  background: var(--blue-lt);
}

/* ── Transaction ID ── */
.result-order-id {
  padding: 14px 20px;
  border-top: 1.5px solid var(--bg);
  border-bottom: 1.5px solid var(--bg);
  background: #fafbfc;
}

.order-id-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 6px;
}

.order-id-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-id-code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 15px;
  font-weight: 600;
  color: var(--blue);
  background: var(--blue-lt);
  padding: 6px 12px;
  border-radius: 8px;
  letter-spacing: 0.5px;
}

.btn-copy-id {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 6px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-copy-id:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.order-id-hint {
  font-size: 11.5px;
  color: var(--text-3);
  margin-top: 6px;
}

/* ── Lookup Card ── */
.lookup-card {
  background: white;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}

.lookup-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}

.lookup-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-1);
}

.lookup-sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 1px;
}

.lookup-input-row {
  display: flex;
  gap: 8px;
}

.lookup-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
  color: var(--text-1);
  background: var(--bg);
  outline: none;
  transition: border-color 0.15s;
}

.lookup-input:focus {
  border-color: var(--blue);
}

.lookup-input::placeholder {
  color: var(--text-3);
  font-weight: 400;
}

.btn-lookup {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 10px;
  border: none;
  background: var(--blue);
  color: white;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
  white-space: nowrap;
}

.btn-lookup:hover { background: #1d4ed8; }

.lookup-result { margin-top: 12px; }

.lookup-loading {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-2);
  padding: 8px 0;
}

.lookup-found {
  background: var(--bg);
  border-radius: 10px;
  padding: 14px;
}

.lookup-status {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 6px;
}

.lookup-status.paid { color: var(--green); }
.lookup-status.pending { color: var(--amber); }

.lookup-detail {
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 3px;
}

.lookup-error {
  font-size: 13px;
  color: var(--red);
  padding: 8px 0;
}

.btn-lookup-view {
  margin-top: 10px;
  padding: 8px 16px;
  border-radius: 8px;
  border: none;
  background: var(--blue);
  color: white;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s;
}

.btn-lookup-view:hover { background: #1d4ed8; }

/* ── Result Actions ── */
.result-actions {
  display: flex;
  gap: 10px;
  padding: 16px 20px 20px;
  border-top: 1.5px solid var(--bg);
}

.btn-action {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.15s;
  border: none;
}

.btn-download {
  background: white;
  color: var(--blue);
  border: 1.5px solid var(--blue);
}

.btn-download:hover {
  background: var(--blue);
  color: white;
}

.btn-whatsapp {
  background: #25D366;
  color: white;
}

.btn-whatsapp:hover {
  background: #1fb855;
}

/* ── Error / Loading ── */
.error-box {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 10px;
  background: #fef2f2;
  border: 1.5px solid #fecaca;
  color: var(--red);
  font-size: 13.5px;
  margin-top: 14px;
  text-align: left;
}

.loading-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px;
  font-size: 14px;
  color: var(--text-2);
  margin-top: 14px;
}

.spinner-blue {
  width: 20px;
  height: 20px;
  border: 2.5px solid #dbeafe;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Result Card ── */
.result-card {
  background: white;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  margin-top: 20px;
  text-align: left;
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.result-head {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  border-bottom: 1.5px solid var(--bg);
}

.result-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.result-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-1);
}

.result-phone {
  font-size: 13px;
  color: var(--text-3);
  font-family: 'JetBrains Mono', monospace;
  margin-top: 2px;
}

.result-badge {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 6px;
  background: var(--blue-lt);
  color: var(--blue);
  font-size: 12px;
  font-weight: 600;
}

.result-tags {
  padding: 16px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.tag-chip {
  padding: 5px 12px;
  border-radius: 20px;
  background: var(--bg);
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  border: 1.5px solid var(--border);
}

.tags-count {
  font-size: 12px;
  color: var(--text-3);
  padding: 5px 0;
  align-self: center;
}

/* ── Page wrap (history/stats) ── */
.page-wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}

.page-head h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-1);
}

.btn-outline-sm {
  padding: 7px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--border);
  background: white;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-outline-sm:hover { border-color: var(--red); color: var(--red); }

/* ── History List ── */
.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-item {
  background: white;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.history-item:hover { box-shadow: var(--shadow-md); }

.history-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.history-dot.success { background: var(--green); }
.history-dot.failed  { background: var(--red); }

.history-phone {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-1);
  font-weight: 500;
}

.history-name {
  font-size: 13px;
  color: var(--text-2);
}

.history-time {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--text-3);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 48px 0;
  color: var(--text-3);
  font-size: 14px;
}

/* ── Stats Grid ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.stats-card-big {
  background: white;
  border-radius: 14px;
  padding: 24px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-icon-wrap {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}

.stats-icon-wrap.blue  { background: #eff6ff; }
.stats-icon-wrap.green { background: #f0fdf4; }
.stats-icon-wrap.red   { background: #fef2f2; }
.stats-icon-wrap.amber { background: #fffbeb; }

.stats-num {
  font-size: 30px;
  font-weight: 800;
  color: var(--text-1);
  letter-spacing: -1px;
}

.stats-lbl {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}

/* ── Toast ── */
.toast-wrap {
  position: fixed;
  bottom: 24px;
  right: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 9999;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 12px;
  background: #1e293b;
  color: white;
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0,0,0,0.2);
  animation: toastIn 0.3s ease;
  max-width: 320px;
}

.toast.success { background: var(--green); }
.toast.error   { background: var(--red); }

@keyframes toastIn {
  from { opacity: 0; transform: translateX(30px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Payment Modal (QRIS — Clean White) ── */
.pay-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15,23,42,0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.pay-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 390px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.2);
  animation: modalUp 0.28s cubic-bezier(0.34,1.56,0.64,1);
  overflow: hidden;
}

@keyframes modalUp {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.pay-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1.5px solid #f1f5f9;
}

.pay-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text-1);
}

.pay-sub {
  font-size: 12.5px;
  color: var(--text-3);
  margin-top: 2px;
}

.pay-close {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: #f1f5f9;
  color: var(--text-2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s;
  flex-shrink: 0;
}

.pay-close:hover { background: #e2e8f0; }

.pay-total-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 20px;
  background: #f0f7ff;
}

.pay-total-label {
  font-size: 13.5px;
  color: var(--text-2);
  font-weight: 500;
}

.pay-total-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: -0.5px;
}

.pay-qr-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  min-height: 210px;
}

.pay-qr-loading {
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pay-qr-img {
  width: 190px;
  height: 190px;
  border-radius: 8px;
  display: block;
}

.pay-status-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 20px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
  border-top: 1.5px solid #f1f5f9;
}

.pay-status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cbd5e1;
  flex-shrink: 0;
}

.pay-status-dot.waiting {
  background: var(--blue);
  animation: pulseDot 1.2s ease-in-out infinite;
}

.pay-status-dot.paid   { background: var(--green); }
.pay-status-dot.failed { background: var(--red); }

@keyframes pulseDot {
  0%, 100% { box-shadow: 0 0 0 0 rgba(37,99,235,0.4); }
  50%       { box-shadow: 0 0 0 5px rgba(37,99,235,0); }
}

.pay-timer {
  margin-left: auto;
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--text-3);
  font-weight: 600;
}

.pay-timer.urgent { color: var(--red); }

/* Tombol konfirmasi */
.pay-confirm-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1.5px solid #f1f5f9;
}

.btn-paid-confirm {
  flex: 1;
  padding: 11px 16px;
  border-radius: 10px;
  border: none;
  background: var(--green);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.btn-paid-confirm:hover:not(:disabled) {
  background: #15803d;
  transform: translateY(-1px);
}

.btn-paid-confirm:disabled {
  background: #d1fae5;
  color: #6ee7b7;
  cursor: not-allowed;
  transform: none;
}

.btn-lock-timer {
  font-size: 11.5px;
  font-weight: 500;
  opacity: 0.85;
}

.btn-pay-cancel {
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
  transition: var(--transition);
}

.btn-pay-cancel:hover { background: #f8fafc; }

.pay-note {
  padding: 11px 20px 18px;
  font-size: 11.5px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}

/* ── Payment Method Modal ── */
.method-modal {
  background: white;
  border-radius: 20px;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);
  animation: fadeSlideUp 0.3s ease;
  overflow: hidden;
}

.method-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 22px 24px 16px;
}

.method-header h3 {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-1);
  margin-bottom: 2px;
}

.method-phone {
  font-size: 13px;
  color: var(--text-3);
  font-weight: 500;
}

.method-close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: background 0.15s;
}

.method-close:hover { background: #f1f5f9; }

.method-options {
  padding: 0 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.method-option {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1.5px solid #e5e7eb;
  background: white;
  cursor: pointer;
  transition: all 0.2s;
  text-align: left;
  font-family: inherit;
  width: 100%;
}

.method-option:hover {
  border-color: var(--blue);
  background: #f8faff;
  transform: translateX(2px);
}

.method-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.method-icon-qris { background: #eff6ff; }
.method-icon-voucher { background: #f3f0ff; }

.method-info { flex: 1; }

.method-name {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--text-1);
}

.method-desc {
  font-size: 12.5px;
  color: var(--text-3);
  font-weight: 500;
  margin-top: 1px;
}

.method-arrow { flex-shrink: 0; }

/* Voucher input */
.voucher-input-wrap {
  padding: 0 16px 20px;
  display: flex;
  gap: 8px;
}

.voucher-input {
  flex: 1;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1.5px solid #e5e7eb;
  font-size: 14px;
  font-family: 'JetBrains Mono', monospace;
  letter-spacing: 1px;
  text-transform: uppercase;
  outline: none;
  transition: border-color 0.2s;
}

.voucher-input:focus { border-color: #7c3aed; }

.btn-voucher-submit {
  padding: 12px 20px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #7c3aed, #6d28d9);
  color: white;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s;
  white-space: nowrap;
}

.btn-voucher-submit:hover {
  background: linear-gradient(135deg, #6d28d9, #5b21b6);
}

/* ── Spin icon ── */
.spin-icon { animation: spin 0.8s linear infinite; }

/* ── Responsive ── */

/* ── Tablet (max 768px) ── */
@media (max-width: 768px) {
  .hero { padding: 40px 20px 36px; }
  .hero-title { font-size: 30px; letter-spacing: -1px; }
  .hero-sub { font-size: 14px; }
  .navbar-inner { padding: 0 16px; gap: 12px; }
  .btn-history-nav { display: inline-flex; }

  .search-wrap { padding: 8px; }
  .phone-input { font-size: 15px; }
  .btn-check { padding: 11px 18px; font-size: 13px; }

  .features-row { gap: 10px; }
  .feature-card { padding: 16px 10px; }
  .feature-title { font-size: 13px; }
  .feature-desc { font-size: 10.5px; }

  .result-actions { flex-direction: row; gap: 8px; padding: 14px 16px 16px; }

  /* Payment modal */
  .pay-modal-content { margin: 10px; border-radius: 16px; }

  /* Orbs smaller on tablet */
  .orb-1 { width: 200px; height: 200px; }
  .orb-2 { width: 140px; height: 140px; }
  .orb-3 { width: 100px; height: 100px; }
}

/* ── Mobile (max 600px) ── */
@media (max-width: 600px) {
  html { font-size: 14px; }

  /* Navbar */
  .navbar-inner { padding: 0 12px; height: 52px; gap: 8px; }
  .logo-name { font-size: 15px; }
  .logo-icon { width: 30px; height: 30px; }
  .nav-links { display: none; }
  .btn-history-nav { display: inline-flex; font-size: 12px; padding: 5px 12px; }

  /* Hero */
  .hero { padding: 28px 14px 24px; }
  .hero-badge { font-size: 11px; padding: 5px 12px; margin-bottom: 16px; }
  .hero-title { font-size: 24px; letter-spacing: -0.8px; margin-bottom: 10px; }
  .hero-sub { font-size: 13px; margin-bottom: 20px; line-height: 1.6; }
  .hero-sub br { display: none; }

  /* Search Card */
  .search-card { border-radius: 14px; margin-bottom: 12px; }
  .search-wrap { padding: 6px; flex-wrap: wrap; }
  .phone-prefix { padding: 8px 10px; gap: 5px; }
  .prefix-code { font-size: 13px; }
  .phone-input { font-size: 14px; min-width: 0; padding: 8px 6px; }
  .btn-check {
    padding: 10px 14px;
    font-size: 12.5px;
    border-radius: 10px;
    gap: 6px;
  }
  .btn-check svg { width: 14px; height: 14px; }
  .search-info-bar { padding: 8px 12px; font-size: 11.5px; }

  /* How To / Features */
  .how-to-section { margin-top: 16px; }
  .how-to-title { font-size: 11px; letter-spacing: 1.2px; margin-bottom: 10px; }
  .features-row { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .feature-card { padding: 14px 8px; border-radius: 10px; }
  .step-number { width: 30px; height: 30px; font-size: 13px; margin-bottom: 8px; }
  .feature-title { font-size: 11.5px; }
  .feature-desc { font-size: 10px; }

  /* Result Card */
  .result-card { border-radius: 14px; margin: 14px; }
  .result-header { padding: 16px 14px 12px; }
  .result-header h3 { font-size: 16px; }
  .result-info-row { padding: 0 14px; }
  .result-info-row span:first-child { font-size: 12px; }
  .result-info-row span:last-child { font-size: 13px; }
  .result-tags { padding: 10px 14px 14px; }
  .tags-header { font-size: 13px; }
  .tag-chip { font-size: 11.5px; padding: 4px 10px; }

  /* Order ID */
  .result-order-id { padding: 10px 14px; }
  .order-id-label { font-size: 11px; }
  .order-id-value { font-size: 12px; gap: 6px; }

  /* Action buttons */
  .result-actions { padding: 10px 14px 14px; gap: 8px; }
  .btn-action { padding: 10px 12px; font-size: 12px; border-radius: 8px; gap: 6px; }

  /* Error / Loading */
  .error-box { font-size: 12.5px; padding: 10px 12px; margin: 0 14px; }
  .loading-box { margin: 0 14px; font-size: 12.5px; }

  /* History Tab */
  .history-section { padding: 20px 14px; }
  .lookup-card { padding: 16px; border-radius: 12px; }
  .lookup-input { font-size: 13px; padding: 10px 12px; }
  .btn-lookup { padding: 10px 14px; font-size: 13px; }
  .history-list { gap: 8px; }
  .history-card { padding: 14px; border-radius: 12px; }

  /* Payment Modal */
  .pay-overlay { padding: 10px; align-items: flex-end; }
  .pay-modal-content {
    margin: 0;
    border-radius: 16px 16px 0 0;
    max-height: 90vh;
    overflow-y: auto;
  }
  .pay-modal-header { padding: 14px 16px; }
  .pay-modal-header h3 { font-size: 15px; }
  .pay-qr-wrap { padding: 16px; }
  .pay-qr-wrap img { max-width: 200px; }
  .pay-amount { font-size: 20px; }
  .pay-actions { padding: 12px 16px; gap: 8px; }
  .pay-note { padding: 8px 16px 14px; font-size: 10.5px; }

  /* Orbs hidden on mobile */
  .hero-orb { display: none; }

  /* Toast */
  .toast { font-size: 12px; max-width: 90vw; }
}

/* ── Very small mobile (max 380px) ── */
@media (max-width: 380px) {
  .hero-title { font-size: 20px; }
  .hero { padding: 24px 10px 20px; }
  .search-wrap { flex-wrap: wrap; gap: 6px; }
  .btn-check { width: 100%; justify-content: center; }
  .features-row { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .feature-card { padding: 10px 6px; }
  .step-number { width: 26px; height: 26px; font-size: 11px; }
  .feature-title { font-size: 10.5px; }
  .feature-desc { font-size: 9px; }
  .result-actions { flex-direction: column; }
}