/* ═════════════════════════════════════════════════════════════════
   J AAICH PAYMENTS — LUXURY FINTECH DESIGN SYSTEM
   ═════════════════════════════════════════════════════════════════ */

:root {
  --bg-dark: #070a12;
  --bg-card: rgba(15, 23, 42, 0.85);
  --bg-card-border: rgba(255, 255, 255, 0.12);
  --bg-tertiary: #111827;
  
  --emerald-500: #10b981;
  --emerald-600: #059669;
  --emerald-glow: rgba(16, 185, 129, 0.35);
  
  --gold-500: #d4a853;
  --gold-600: #b8860b;
  --gold-glow: rgba(212, 168, 83, 0.35);
  
  --blue-500: #3b82f6;
  
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --radius-full: 9999px;
  
  --font-heading: 'Outfit', -apple-system, sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, sans-serif;
  
  --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.7), 0 0 30px rgba(16, 185, 129, 0.1);
  --shadow-glow: 0 0 25px rgba(16, 185, 129, 0.25);
  --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-main);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 20px 16px;
  overflow-x: hidden;
  position: relative;
  -webkit-font-smoothing: antialiased;
}

/* ─── Ambient Glow Effects ─── */
.ambient-glow {
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
  opacity: 0.5;
}

.ambient-glow--emerald {
  width: 350px;
  height: 350px;
  top: -50px;
  left: -50px;
  background: radial-gradient(circle, var(--emerald-500), transparent 70%);
}

.ambient-glow--gold {
  width: 400px;
  height: 400px;
  bottom: -100px;
  right: -50px;
  background: radial-gradient(circle, var(--gold-500), transparent 70%);
}

/* ─── App Container ─── */
.app-container {
  width: 100%;
  max-width: 480px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ─── Header ─── */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  background: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--gold-500);
  box-shadow: 0 0 12px rgba(212, 168, 83, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.brand-badge {
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald-500);
  display: flex;
  align-items: center;
  gap: 4px;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.2);
  padding: 6px 12px;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald-500);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ─── Payment Card ─── */
.payment-card {
  background: var(--bg-card);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* ─── Hero & QR Switcher Section ─── */
.card-hero {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.08) 0%, rgba(15, 23, 42, 0) 100%);
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.tab-switcher {
  display: flex;
  background: rgba(0, 0, 0, 0.4);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: 100%;
  gap: 4px;
}

.tab-btn {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 12px;
  border-radius: var(--radius-full);
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.tab-btn img {
  filter: grayscale(1) brightness(1.5);
  transition: var(--transition);
}

.tab-btn:hover {
  color: var(--text-main);
}

.tab-btn.active {
  background: var(--emerald-600);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.tab-btn.active img {
  filter: none;
}

/* ─── QR Container ─── */
.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: 100%;
}

.qr-box {
  position: relative;
  width: 220px;
  height: 220px;
  background: #ffffff;
  border-radius: var(--radius-lg);
  padding: 14px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6), 0 0 0 2px var(--emerald-500);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.qr-box:hover {
  transform: scale(1.02);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.7), 0 0 20px var(--emerald-glow);
}

#dynamicQrCanvas {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

#dynamicQrCanvas img, #dynamicQrCanvas canvas {
  width: 100% !important;
  height: 100% !important;
  border-radius: 4px;
}

.qr-center-logo {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 38px;
  height: 38px;
  background: var(--bg-dark);
  color: var(--gold-500);
  border: 2px solid var(--gold-500);
  border-radius: 8px;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.qr-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.merchant-vpa {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 13px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.vpa-label {
  color: var(--text-muted);
  font-weight: 600;
}

.vpa-id {
  color: var(--gold-500);
  font-family: monospace;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.upi-pills-row {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
}

.upi-pill {
  flex: 1;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  transition: var(--transition);
}

.upi-pill code {
  color: var(--text-main);
  font-family: monospace;
}

.upi-pill:hover {
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.1);
  color: var(--text-main);
}

.upi-pill.active {
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.2);
  color: var(--emerald-500);
}

.copy-btn {
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text-main);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: var(--transition);
}

.copy-btn:hover {
  background: var(--emerald-500);
  color: #fff;
}

.qr-subtext {
  font-size: 12px;
  color: var(--text-muted);
}

/* ─── Payment Form Body ─── */
.payment-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.currency-tag, .badge-mobile {
  font-size: 11px;
  font-weight: 600;
  color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.12);
  padding: 2px 8px;
  border-radius: var(--radius-sm);
  text-transform: none;
}

/* Amount Input Wrapper */
.amount-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 2px solid var(--bg-card-border);
  border-radius: var(--radius-lg);
  padding: 12px 18px;
  transition: var(--transition);
}

.amount-input-wrapper:focus-within {
  border-color: var(--emerald-500);
  box-shadow: 0 0 20px var(--emerald-glow);
}

.rupee-symbol {
  font-family: var(--font-heading);
  font-size: 28px;
  font-weight: 800;
  color: var(--gold-500);
  margin-right: 8px;
}

.amount-input-wrapper input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-heading);
  font-size: 32px;
  font-weight: 900;
  color: var(--text-main);
  width: 100%;
}

.clear-amount-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  font-size: 18px;
  cursor: pointer;
  transition: var(--transition);
}

.clear-amount-btn:hover {
  color: #ef4444;
}

/* Preset Chips */
.preset-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.preset-chips::-webkit-scrollbar {
  display: none;
}

.chip-btn {
  flex: 1;
  min-width: 72px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
  text-align: center;
}

.chip-btn:hover {
  border-color: var(--emerald-500);
  background: rgba(16, 185, 129, 0.1);
}

.chip-btn.active {
  background: var(--gold-500);
  color: #0f172a;
  border-color: var(--gold-500);
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(212, 168, 83, 0.3);
}

/* Form Group & Note */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.input-with-icon {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: var(--text-dim);
  font-size: 16px;
}

.input-with-icon input {
  width: 100%;
  padding: 12px 14px 12px 40px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.input-with-icon input:focus {
  border-color: var(--emerald-500);
}

/* Main One-Click UPI Launch Button */
.btn-main-upi {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600));
  border-radius: var(--radius-lg);
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-main-upi::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.25) 0%, transparent 60%);
  transform: rotate(30deg);
  pointer-events: none;
}

.btn-main-upi:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(16, 185, 129, 0.55);
}

.btn-main-upi:active {
  transform: translateY(0);
}

.btn-upi-content {
  display: flex;
  align-items: center;
  gap: 14px;
}

.glow-icon {
  font-size: 26px;
  color: var(--gold-500);
  filter: drop-shadow(0 0 8px rgba(212, 168, 83, 0.8));
}

.btn-upi-text {
  display: flex;
  flex-direction: column;
}

.btn-upi-text strong {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.btn-upi-text small {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 500;
}

.btn-arrow {
  font-size: 20px;
  opacity: 0.8;
  transition: var(--transition);
}

.btn-main-upi:hover .btn-arrow {
  transform: translateX(4px);
  opacity: 1;
}

/* Specific App Launch Grid */
.app-launch-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.app-launch-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  transition: var(--transition);
}

.app-launch-btn img {
  height: 22px;
  object-fit: contain;
}

.app-launch-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--emerald-500);
  color: var(--text-main);
  transform: translateY(-2px);
}

/* Action Footer & Secondary Actions */
.action-footer {
  margin-top: 4px;
}

.btn-secondary-action {
  width: 100%;
  padding: 12px;
  background: rgba(212, 168, 83, 0.1);
  border: 1px solid rgba(212, 168, 83, 0.3);
  border-radius: var(--radius-md);
  color: var(--gold-500);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-secondary-action:hover {
  background: rgba(212, 168, 83, 0.2);
  border-color: var(--gold-500);
}

/* Security Banner */
.security-banner {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px;
  background: rgba(0, 0, 0, 0.3);
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin-top: 6px;
}

.sec-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}

.text-emerald { color: var(--emerald-500); }
.text-gold { color: var(--gold-500); }
.text-blue { color: var(--blue-500); }

/* ─── Footer ─── */
.footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 12px;
  color: var(--text-dim);
  padding: 8px 12px;
}

.footer-merchant code {
  color: var(--gold-500);
  background: rgba(212, 168, 83, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

.footer-help {
  margin-top: 4px;
  color: var(--text-muted);
}

.footer-legal {
  font-size: 11px;
}

/* ─── Modal Overlay ─── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.modal-card {
  background: var(--bg-tertiary);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-xl);
  padding: 24px;
  width: 100%;
  max-width: 440px;
  box-shadow: var(--shadow-card);
  transform: scale(0.9);
  transition: var(--transition);
}

.modal-overlay.active .modal-card {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 24px;
  cursor: pointer;
  transition: var(--transition);
}

.modal-close:hover {
  color: var(--text-main);
}

.modal-sub {
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.5;
}

.modal-input {
  width: 100%;
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid var(--bg-card-border);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 14px;
  outline: none;
  transition: var(--transition);
}

.modal-input:focus {
  border-color: var(--emerald-500);
}

.btn-submit-proof {
  width: 100%;
  padding: 14px;
  background: var(--emerald-600);
  border: none;
  border-radius: var(--radius-md);
  color: #fff;
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 10px;
  transition: var(--transition);
}

.btn-submit-proof:hover {
  background: var(--emerald-500);
  box-shadow: 0 4px 16px var(--emerald-glow);
}

/* ─── Toast Notifications ─── */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: max-content;
  max-width: 90vw;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid var(--emerald-500);
  color: var(--text-main);
  padding: 12px 20px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5), 0 0 15px var(--emerald-glow);
  display: flex;
  align-items: center;
  gap: 8px;
  animation: slideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Responsive Overrides */
@media (max-width: 480px) {
  body {
    padding: 12px 8px;
  }
  .payment-body {
    padding: 16px 14px;
  }
  .tab-btn {
    font-size: 12px;
    padding: 8px 6px;
  }
  .app-launch-btn span {
    font-size: 10px;
  }
}
