/* ==========================================================================
   Pay Kishan Dobariya - Clean, User-Friendly Light Design System
   ========================================================================== */

:root {
  --font-primary: 'Plus Jakarta Sans', system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: 'Outfit', system-ui, sans-serif;

  /* Light Color Palette */
  --bg-main: #f8fafc;
  --bg-surface: #ffffff;
  --bg-surface-alt: #f1f5f9;
  --bg-input: #ffffff;
  
  --primary-color: #4f46e5;
  --primary-hover: #4338ca;
  --primary-light: #eef2ff;
  --primary-gradient: linear-gradient(135deg, #4f46e5 0%, #3b82f6 100%);
  --secondary-accent: #0ea5e9;
  
  --success-color: #10b981;
  --success-light: #ecfdf5;
  --success-border: #a7f3d0;

  --text-main: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --text-light: #94a3b8;

  --border-subtle: #e2e8f0;
  --border-medium: #cbd5e1;
  --border-focus: #818cf8;

  --radius-xs: 8px;
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
  --shadow-card: 0 20px 40px -15px rgba(15, 23, 42, 0.07), 0 0 1px 1px rgba(15, 23, 42, 0.05);
  --shadow-btn: 0 8px 20px -4px rgba(79, 70, 229, 0.35);
}

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

body {
  font-family: var(--font-primary);
  background-color: var(--bg-main);
  background-image: 
    radial-gradient(at 10% 20%, rgba(79, 70, 229, 0.05) 0px, transparent 50%),
    radial-gradient(at 90% 10%, rgba(14, 165, 233, 0.06) 0px, transparent 50%),
    radial-gradient(at 50% 90%, rgba(99, 102, 241, 0.04) 0px, transparent 50%);
  background-attachment: fixed;
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2.5rem 1rem;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page Container */
.page-container {
  width: 100%;
  max-width: 520px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
}

/* Header & Profile */
.profile-header {
  text-align: center;
  margin-bottom: 1.5rem;
}

.avatar-wrapper {
  position: relative;
  display: inline-block;
  margin-bottom: 0.75rem;
}

.avatar-ring {
  width: 82px;
  height: 82px;
  border-radius: 50%;
  padding: 3px;
  background: var(--primary-gradient);
  box-shadow: 0 8px 20px -4px rgba(79, 70, 229, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-content {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-initials {
  font-family: var(--font-display);
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--primary-color);
}

.verified-badge {
  position: absolute;
  bottom: 0px;
  right: 0px;
  width: 26px;
  height: 26px;
  background: #2563eb;
  border-radius: 50%;
  border: 2.5px solid #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(37, 99, 235, 0.4);
}

.badge-icon {
  width: 15px;
  height: 15px;
}

.profile-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
  margin-bottom: 0.35rem;
}

.profile-role {
  font-size: 0.92rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.dot-separator {
  color: var(--border-medium);
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: #047857;
  background: var(--success-light);
  border: 1px solid var(--success-border);
  padding: 0.15rem 0.65rem;
  border-radius: var(--radius-full);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success-color);
  box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.3);
}

/* Social & Contact Pills Bar */
.social-links-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.social-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.8rem;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.social-pill svg {
  width: 14px;
  height: 14px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.social-pill:hover {
  background: var(--primary-light);
  color: var(--primary-color);
  border-color: #c7d2fe;
  transform: translateY(-1px);
}

/* Main Clean White Payment Card */
.payment-card {
  position: relative;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-card);
}

/* Card Sections */
.card-section {
  margin-bottom: 1.5rem;
}

.section-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.65rem;
}

.section-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.currency-tag {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--primary-color);
  background: var(--primary-light);
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-xs);
  border: 1px solid #c7d2fe;
}

/* Amount Input Box */
.amount-input-box {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-input);
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.65rem 1rem;
  transition: all 0.2s ease;
}

.amount-input-box:focus-within {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.currency-symbol {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-right: 0.4rem;
  user-select: none;
}

.amount-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-display);
  font-size: 2.1rem;
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.5px;
}

.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.amount-input[type=number] {
  -moz-appearance: textfield;
}

.clear-input-btn {
  background: #f1f5f9;
  border: none;
  color: var(--text-muted);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.clear-input-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.clear-input-btn:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

.clear-input-btn svg {
  width: 14px;
  height: 14px;
}

/* Quick Amount Buttons */
.quick-amounts-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.6rem;
  margin-top: 0.85rem;
}

.preset-pill {
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  padding: 0.65rem 0.25rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.preset-pill:hover {
  background: #f1f5f9;
  border-color: var(--border-medium);
  color: var(--text-main);
  transform: translateY(-1px);
}

.preset-pill.active {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Purpose Note Section */
.note-section {
  margin-bottom: 1.5rem;
}

.purpose-chips {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.purpose-chip {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 0.38rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.purpose-chip:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.purpose-chip.active {
  background: var(--primary-light);
  border-color: var(--primary-color);
  color: var(--primary-color);
}

.custom-note-wrap {
  width: 100%;
}

.note-input {
  width: 100%;
  background: var(--bg-input);
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.95rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: var(--font-primary);
  outline: none;
  transition: all 0.2s ease;
}

.note-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.note-input::placeholder {
  color: var(--text-light);
}

/* Card Divider */
.card-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 1.6rem 0 1.4rem;
}

.card-divider::before,
.card-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1.5px solid var(--border-subtle);
}

.divider-text {
  padding: 0 1rem;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  font-weight: 700;
  color: var(--text-muted);
}

/* QR Code Section */
.qr-showcase-section {
  text-align: center;
  margin-bottom: 1.6rem;
}

.qr-frame-outer {
  position: relative;
  display: inline-block;
  padding: 16px;
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: 20px;
  box-shadow: 0 10px 25px -5px rgba(15, 23, 42, 0.08);
  margin-bottom: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.qr-frame-outer:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 30px -5px rgba(15, 23, 42, 0.12);
}

/* Corner Reticle Accents */
.corner-reticle {
  position: absolute;
  width: 16px;
  height: 16px;
  border-color: var(--primary-color);
  border-style: solid;
  pointer-events: none;
}

.corner-reticle.top-left {
  top: 8px;
  left: 8px;
  border-width: 3px 0 0 3px;
  border-top-left-radius: 6px;
}

.corner-reticle.top-right {
  top: 8px;
  right: 8px;
  border-width: 3px 3px 0 0;
  border-top-right-radius: 6px;
}

.corner-reticle.bottom-left {
  bottom: 8px;
  left: 8px;
  border-width: 0 0 3px 3px;
  border-bottom-left-radius: 6px;
}

.corner-reticle.bottom-right {
  bottom: 8px;
  right: 8px;
  border-width: 0 3px 3px 0;
  border-bottom-right-radius: 6px;
}

.qr-canvas-container {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
  min-height: 220px;
}

.qr-canvas-container canvas,
.qr-canvas-container img {
  display: block;
  border-radius: 6px;
}

.qr-center-emblem {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 44px;
  height: 44px;
  background: white;
  border-radius: 10px;
  padding: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.upi-emblem-svg {
  width: 100%;
  height: 100%;
}

.qr-live-summary {
  margin-bottom: 0.9rem;
}

.paying-amount-display {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  background: var(--primary-light);
  border: 1px solid #c7d2fe;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  margin-bottom: 0.5rem;
}

.pay-amount-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.pay-amount-val {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary-color);
}

.scan-instructions {
  font-size: 0.88rem;
  color: var(--text-secondary);
  max-width: 320px;
  margin: 0 auto;
  line-height: 1.4;
  font-weight: 500;
}

/* Supported UPI Apps Row */
.upi-partners-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  margin-top: 1rem;
}

.partner-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
}

.partner-svg {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease;
}

.partner-badge:hover .partner-svg {
  transform: translateY(-2px);
}

/* UPI ID Copy Box */
.upi-copy-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.85rem;
  transition: border-color 0.2s ease;
}

.upi-copy-box:hover {
  border-color: var(--border-medium);
}

.upi-id-display {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  overflow: hidden;
}

.key-icon {
  width: 20px;
  height: 20px;
  color: var(--primary-color);
  flex-shrink: 0;
}

.upi-text {
  font-family: monospace;
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  letter-spacing: 0.3px;
}

.copy-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}

.copy-action-btn:hover {
  background: var(--primary-light);
  border-color: #c7d2fe;
  color: var(--primary-color);
}

.copy-action-btn.copied {
  background: var(--success-light);
  border-color: var(--success-border);
  color: #047857;
}

.copy-icon {
  width: 14px;
  height: 14px;
}

/* Action Buttons Group */
.action-buttons-group {
  margin: 1.6rem 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.primary-pay-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.25rem;
  background: var(--primary-gradient);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: #ffffff;
  box-shadow: var(--shadow-btn);
  overflow: hidden;
  transition: all 0.25s ease;
}

.primary-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 24px -4px rgba(79, 70, 229, 0.45);
}

.primary-pay-btn:active {
  transform: translateY(0);
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  transform: skewX(-20deg);
  animation: shineSweep 4s infinite;
}

@keyframes shineSweep {
  0% { left: -100%; }
  20%, 100% { left: 200%; }
}

.btn-svg {
  width: 18px;
  height: 18px;
  margin-bottom: 2px;
}

.btn-main-label {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.btn-sub-label {
  font-size: 0.75rem;
  opacity: 0.92;
  letter-spacing: 0.3px;
  margin-top: 1px;
}

.secondary-actions-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
}

.secondary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: #ffffff;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
}

.secondary-btn svg {
  width: 16px;
  height: 16px;
  color: var(--primary-color);
}

.secondary-btn:hover {
  background: #f8fafc;
  color: var(--text-main);
  border-color: var(--border-medium);
  transform: translateY(-1px);
}

/* Card Footer Trust Badges */
.card-footer-info {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding-top: 1.4rem;
  border-top: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.trust-badge-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.trust-badge-item svg {
  width: 15px;
  height: 15px;
  color: var(--success-color);
}

/* Page Footer */
.page-footer {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.page-footer a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.page-footer a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.copyright {
  margin-top: 0.5rem;
  font-size: 0.8rem;
  color: var(--text-light);
}

/* Toast Notification */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: #0f172a;
  border: 1px solid #1e293b;
  color: #ffffff;
  padding: 0.75rem 1.4rem;
  border-radius: var(--radius-full);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.25);
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.88rem;
  font-weight: 600;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

.toast-icon {
  width: 18px;
  height: 18px;
  color: #34d399;
}

/* Responsive */
@media (max-width: 480px) {
  body {
    padding: 1.5rem 0.75rem;
  }

  .profile-name {
    font-size: 1.6rem;
  }

  .payment-card {
    padding: 1.4rem 1.15rem;
    border-radius: var(--radius-md);
  }

  .amount-input {
    font-size: 1.85rem;
  }

  .quick-amounts-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .card-footer-info {
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
  }

  .secondary-actions-row {
    grid-template-columns: 1fr;
  }
}
