:root {
  --bg-page: #ffffff;
  --bg-input: #f4f4f5;
  --bg-input-focus: #ffffff;
  
  --border-input: #e4e4e7;
  --border-focus: #d4d4d8;

  --text-main: #18181b;
  --text-label: #52525b;
  --text-muted: #8e8e93;

  --btn-orange: #ff5500;
  --btn-orange-hover: #e64a00;
  --btn-orange-glow: rgba(255, 85, 0, 0.38);

  --radius-pill: 40px;
  --radius-input: 12px;
  --radius-card: 20px;

  --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

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

html, body {
  height: 100%;
  width: 100%;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-page);
  color: var(--text-main);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden !important;
  touch-action: none;
}

/* Minimalist App Container */
.minimal-app-container {
  width: 100%;
  max-width: 400px;
  margin: auto;
}

/* Form Card */
.minimal-card {
  background-color: #ffffff;
  padding: 10px 4px;
}

.card-header {
  text-align: center;
  margin-bottom: 22px;
}

.form-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: -0.3px;
}

.security-icon {
  font-size: 18px;
  color: #10b981;
}

.form-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.field-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-label);
}

.currency-tag {
  font-size: 11px;
  font-weight: 600;
  color: #71717a;
  background-color: #f4f4f5;
  padding: 2px 7px;
  border-radius: 6px;
}

/* Input Fields */
.minimal-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.minimal-input-wrapper input {
  width: 100%;
  background-color: var(--bg-input);
  border: 1px solid transparent;
  border-radius: var(--radius-input);
  padding: 14px 44px 14px 16px;
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-main);
  outline: none;
  transition: all 0.2s ease;
}

.minimal-input-wrapper input:focus {
  background-color: var(--bg-input-focus);
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.04);
}

.minimal-input-wrapper input::placeholder {
  color: #a1a1aa;
}

.currency-indicator,
.field-icon {
  position: absolute;
  right: 16px;
  font-size: 15px;
  font-weight: 600;
  color: #71717a;
  pointer-events: none;
  user-select: none;
}

/* Quick Selection Chips */
.quick-amounts-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  margin-top: 4px;
}

.minimal-chip {
  background-color: #f4f4f5;
  border: 1px solid transparent;
  color: #52525b;
  padding: 7px 2px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  text-align: center;
}

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

.minimal-chip.active {
  background-color: var(--text-main);
  color: #ffffff;
}

/* Supported Methods Row */
.supported-methods-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background-color: #fafafa;
  border: 1px solid #f4f4f5;
  border-radius: var(--radius-input);
}

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

.methods-icons {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #52525b;
  font-size: 15px;
}

/* Disclaimer text (Matches reference image) */
.terms-disclaimer {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
  text-align: left;
  margin-top: -4px;
  margin-bottom: 4px;
}

/* Main Action Button (Exact match for reference image orange pill button) */
.button-wrapper {
  display: flex;
  justify-content: center;
  margin-top: 6px;
}

.pay-button {
  width: 100%;
  max-width: 240px;
  background: var(--btn-orange);
  color: #ffffff;
  border: none;
  border-radius: var(--radius-pill);
  padding: 14px 28px;
  font-family: var(--font-family);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 10px 22px -4px var(--btn-orange-glow);
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.pay-button:hover {
  background: var(--btn-orange-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 26px -4px rgba(255, 85, 0, 0.5);
}

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

/* Spinner */
.spinner {
  width: 20px;
  height: 20px;
  border: 2.5px solid rgba(255, 255, 255, 0.3);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.hidden {
  display: none !important;
}

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

/* Modal Overlay & Modal Cards */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 1000;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 16px;
  overflow-y: auto;
  animation: fadeIn 0.2s ease;
}

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

.modal-card {
  position: relative;
  background-color: #ffffff;
  border-radius: var(--radius-card);
  padding: 28px 24px;
  width: 100%;
  max-width: 400px;
  max-height: 90vh;
  overflow-y: auto;
  text-align: center;
  box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.15);
  animation: slideUp 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.close-btn {
  position: absolute;
  top: 14px;
  right: 16px;
  background: #f4f4f5;
  border: none;
  color: var(--text-muted);
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.close-btn:hover {
  background: #e4e4e7;
  color: var(--text-main);
}

.modal-header {
  margin-bottom: 16px;
}

.status-indicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #ecfdf5;
  color: #059669;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  background-color: #10b981;
  border-radius: 50%;
}

.modal-header h2 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-main);
}

.display-amount {
  font-size: 32px;
  font-weight: 800;
  color: var(--text-main);
  margin: 4px 0;
}

.qr-timer-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #d97706;
  background-color: #fffbe6;
  padding: 4px 12px;
  border-radius: 12px;
}

/* QR Box */
.qr-display-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 16px 0;
}

.qr-frame {
  background-color: #ffffff;
  padding: 12px;
  border: 1px solid #e4e4e7;
  border-radius: 16px;
}

.qr-frame img {
  width: 190px;
  height: 190px;
  display: block;
}

.qr-instruction {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

.pay-now-direct-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
  width: 100%;
  background-color: #10b981;
  color: #ffffff;
  padding: 12px;
  border-radius: var(--radius-input);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 0.15s ease;
}

.pay-now-direct-btn:hover {
  background-color: #059669;
}

/* Modal Action Buttons */
.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
}

.btn-secondary {
  background-color: #f4f4f5;
  border: none;
  color: var(--text-main);
  padding: 10px;
  border-radius: var(--radius-input);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.15s ease;
}

.btn-secondary:hover {
  background-color: #e4e4e7;
}

.btn-done {
  width: 100%;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 10px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

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

/* Receipt Modal */
.receipt-card {
  max-width: 400px;
}

.receipt-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 14px;
}

.success-icon-badge {
  font-size: 44px;
  color: #10b981;
  margin-bottom: 4px;
}

.receipt-header h2 {
  font-size: 22px;
}

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

.receipt-amount-display {
  font-size: 32px;
  font-weight: 800;
  color: #10b981;
  margin-top: 4px;
}

.receipt-body {
  background-color: #fafafa;
  border: 1px solid #f4f4f5;
  border-radius: var(--radius-input);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.receipt-divider {
  height: 1px;
  border-top: 1px dashed #e4e4e7;
  margin: 4px 0;
}

.receipt-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
}

.receipt-row .lbl {
  color: var(--text-muted);
}

.receipt-row .val {
  font-weight: 600;
}

.highlight-utr {
  font-family: monospace;
  color: #0284c7 !important;
  background-color: #f0f9ff;
  padding: 2px 6px;
  border-radius: 4px;
}

.status-paid-badge {
  color: #10b981 !important;
  font-weight: 700;
}

.receipt-footer-stamp {
  font-size: 11px;
  color: #10b981;
  text-align: center;
  font-weight: 600;
}

@media (max-width: 480px) {
  body {
    padding: 16px 12px;
  }
  
  .minimal-app-container {
    max-width: 100%;
  }

  .pay-button {
    max-width: 100%;
  }
}