:root {
  --go-green: #00aa13;
  --go-green-dark: #00880f;
  --go-teal: #0081a0;
  --go-bg: #f4f6f8;
  --surface: #ffffff;
  --border: #e5e7eb;
  --text-main: #111827;
  --text-muted: #6b7280;
  --danger: #ef4444;
  --shadow: 0 6px 20px rgba(0, 0, 0, 0.06);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  background: #e5e7eb;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  -webkit-font-smoothing: antialiased;
}

#app-loader {
  position: fixed; inset: 0; z-index: 9999;
  background: var(--go-green);
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#app-loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }
.go-spinner {
  width: 40px; height: 40px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,0.3); border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Mobile Super-App Shell */
.go-app {
  width: 100%; max-width: 440px; min-height: 100vh;
  background: var(--go-bg);
  position: relative; padding-bottom: 78px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.12);
}
.go-app.centered {
  display: flex; align-items: center; justify-content: center; padding: 20px 16px;
}

/* Signature Green Top Bar */
.go-header {
  background: linear-gradient(180deg, #00aa13 0%, #009210 100%);
  color: #ffffff;
  padding: 14px 16px 18px;
  border-radius: 0 0 22px 22px;
}
.go-topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-bottom: 12px;
}
.go-search-pill {
  flex: 1;
  background: #ffffff; color: var(--text-main);
  border-radius: 9999px; padding: 8px 14px;
  display: flex; align-items: center; gap: 8px;
  min-width: 0;
}
.go-search-pill img { width: 22px; height: 22px; object-fit: contain; flex-shrink: 0; }
.go-search-title { font-size: 0.86rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.go-help-btn {
  width: 36px; height: 36px; border-radius: 50%; border: none;
  background: rgba(255,255,255,0.22); color: #ffffff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; cursor: pointer; flex-shrink: 0;
}

/* GoPay-style Teal Status Card */
.gopay-card {
  background: linear-gradient(135deg, #0081a0 0%, #006680 100%);
  border-radius: 16px; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.16);
}
.gopay-left {
  background: #ffffff; color: var(--text-main);
  border-radius: 12px; padding: 8px 12px; min-width: 145px;
}
.gopay-lbl { font-size: 0.68rem; font-weight: 800; color: var(--go-teal); display: flex; align-items: center; gap: 4px; }
.gopay-val { font-size: 0.96rem; font-weight: 900; margin-top: 1px; }
.gopay-actions { display: flex; align-items: center; gap: 12px; }
.gopay-act-btn {
  border: none; background: transparent; color: #ffffff;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  font-size: 0.68rem; font-weight: 700; cursor: pointer; text-decoration: none;
}
.gopay-act-ico {
  width: 30px; height: 30px; border-radius: 9px;
  background: rgba(255,255,255,0.92); color: var(--go-teal);
  display: flex; align-items: center; justify-content: center; font-size: 0.88rem;
}

/* Centered Quick Mode Strip */
.go-quick-strip {
  margin: 12px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 12px 8px;
  display: flex; justify-content: center; align-items: flex-start; gap: 8px;
  box-shadow: var(--shadow);
}
.go-quick-item {
  flex: 1; max-width: 100px; border: none; background: transparent; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 6px 2px; border-radius: 12px; text-decoration: none; color: var(--text-main);
}
.go-quick-item.active { background: rgba(0, 170, 19, 0.08); }
.go-quick-ico {
  width: 44px; height: 44px; border-radius: 16px;
  background: rgba(0, 170, 19, 0.12); color: var(--go-green);
  display: flex; align-items: center; justify-content: center; font-size: 1.15rem;
}
.go-quick-item.active .go-quick-ico { background: var(--go-green); color: #ffffff; }
.go-quick-lbl { font-size: 0.72rem; font-weight: 700; text-align: center; }

/* Main Content */
.go-section { padding: 0 14px 14px; }
.go-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 18px; padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px;
}
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.card-title { font-size: 0.96rem; font-weight: 800; }

.go-field { margin-bottom: 12px; }
.go-label { display: block; font-size: 0.76rem; font-weight: 700; color: var(--text-muted); margin-bottom: 5px; }
.go-input-wrap { position: relative; display: flex; align-items: center; }
.go-input-icon { position: absolute; left: 13px; color: var(--go-green); font-size: 0.9rem; pointer-events: none; }
.go-input, .go-select, .go-textarea {
  width: 100%; background: #f9fafb; border: 1.5px solid var(--border);
  color: var(--text-main); border-radius: 12px; padding: 11px 14px 11px 38px;
  font-size: 0.9rem; font-family: inherit; outline: none;
}
.go-select, .go-textarea { padding-left: 12px; }
.go-textarea { min-height: 68px; resize: vertical; }
.go-input:focus, .go-select:focus, .go-textarea:focus { border-color: var(--go-green); background: #ffffff; }
.go-eye-btn { position: absolute; right: 10px; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 6px; }

.btn-go {
  width: 100%; border: none; border-radius: 9999px; padding: 12px 16px;
  background: var(--go-green); color: #ffffff;
  font-size: 0.9rem; font-weight: 800; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 16px rgba(0, 170, 19, 0.28);
}
.btn-go-outline {
  width: 100%; border: 1.5px solid var(--go-green); border-radius: 9999px; padding: 10px 14px;
  background: rgba(0, 170, 19, 0.06); color: var(--go-green);
  font-size: 0.84rem; font-weight: 800; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.btn-go-danger {
  width: 100%; border: 1px solid rgba(239,68,68,0.35); border-radius: 9999px; padding: 11px 14px;
  background: rgba(239,68,68,0.10); color: var(--danger); font-size: 0.88rem; font-weight: 700;
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}

.go-error {
  display: flex; align-items: center; gap: 8px;
  background: #fef2f2; border: 1px solid #fecaca; color: #dc2626;
  padding: 10px 12px; border-radius: 12px; font-size: 0.8rem; margin-bottom: 12px;
}

.go-scanner { text-align: center; padding: 16px; background: #f9fafb; border: 1.5px dashed var(--go-green); border-radius: 14px; margin-bottom: 12px; }
.go-viewfinder { width: 100px; height: 100px; margin: 0 auto 8px; border: 2px solid var(--go-green); border-radius: 14px; display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden; }
.go-laser { position: absolute; left: 0; right: 0; height: 2px; background: var(--go-green); animation: scanline 2s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { top: 12%; } 50% { top: 88%; } }

.go-meta { margin-top: 12px; background: #f9fafb; border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px; }
.meta-row { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; font-size: 0.78rem; color: var(--text-muted); }
.meta-row + .meta-row { border-top: 1px solid var(--border); }
.meta-row strong { color: var(--text-main); font-family: ui-monospace, monospace; }

/* Packages */
.pkg-list { display: grid; gap: 10px; }
.pkg-item {
  background: #f9fafb; border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer;
}
.pkg-item:hover { border-color: var(--go-green); background: rgba(0, 170, 19, 0.04); }
.pkg-left { min-width: 0; flex: 1; }
.pkg-right { flex-shrink: 0; text-align: right; white-space: nowrap; }
.pkg-price { font-size: 0.98rem; font-weight: 800; color: var(--go-green); white-space: nowrap; }
.pkg-buy-pill {
  display: inline-block; margin-top: 4px; padding: 3px 10px; border-radius: 9999px;
  background: var(--go-green); color: #ffffff; font-size: 0.68rem; font-weight: 700;
}
.pkg-tag {
  display: inline-block; font-size: 0.64rem; font-weight: 800; padding: 2px 7px;
  border-radius: 9999px; background: rgba(0, 170, 19, 0.12); color: var(--go-green); margin-bottom: 4px;
}

.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 8px; overflow: hidden; background: #f9fafb; }
.faq-btn { width: 100%; background: none; border: none; color: var(--text-main); padding: 11px 13px; text-align: left; font-size: 0.82rem; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.faq-ans { display: none; padding: 0 13px 11px; font-size: 0.78rem; color: var(--text-muted); }
.faq-item.open .faq-ans { display: block; }

/* Bottom Nav */
.go-bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 440px; height: 62px; z-index: 100;
  background: #ffffff; border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
}
.nav-btn {
  border: none; background: transparent; color: var(--text-muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.68rem; font-weight: 700; cursor: pointer; padding: 6px 0;
}
.nav-btn i { font-size: 1.08rem; }
.nav-btn.active { color: var(--go-green); }

.modal-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(17, 24, 39, 0.65); backdrop-filter: blur(4px);
  display: none; align-items: flex-end; justify-content: center; padding: 12px;
}
.modal-backdrop.open { display: flex; }
@media (min-width: 520px) { .modal-backdrop { align-items: center; } }
.modal-go {
  width: 100%; max-width: 390px; background: #ffffff;
  border-radius: 22px; padding: 20px; text-align: center;
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.25);
}
.qris-white { background: #ffffff; padding: 10px; border-radius: 14px; border: 1px solid var(--border); display: inline-block; margin: 12px 0; }
.qris-white img { width: 185px; height: 185px; object-fit: contain; display: block; }
