/* ==========================================================================
   DESIGN SYSTEM VARIABLES & IMPORTS
   ========================================================================== */
:root {
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  --color-primary: #4f46e5;
  --color-primary-hover: #4338ca;
  --color-primary-light: #e0e7ff;
  --color-primary-rgb: 79, 70, 229;

  --color-success: #10b981;
  --color-success-hover: #059669;
  --color-success-light: #d1fae5;
  --color-success-rgb: 16, 185, 129;

  --color-error: #ef4444;
  --color-error-light: #fee2e2;
  --color-error-rgb: 239, 68, 68;

  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-warning-rgb: 245, 158, 11;

  --color-text-dark: #0f172a;
  --color-text-muted: #475569;
  --color-border: #e2e8f0;
  --color-border-hover: #cbd5e1;
  --color-bg-light: #f8fafc;
  --color-bg-white: #ffffff;

  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.08), 0 10px 10px -5px rgba(0, 0, 0, 0.03);
  --shadow-card: 0 24px 48px -12px rgba(15, 23, 42, 0.08);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-full: 9999px;

  --transition-fast: 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & GLOBAL STYLES
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  background-color: var(--color-bg-light);
  color: var(--color-text-dark);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-image:
    radial-gradient(at 0% 0%, rgba(99, 102, 241, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(79, 70, 229, 0.03) 0px, transparent 50%),
    radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.01) 0px, transparent 50%);
  background-attachment: fixed;
  padding: 40px 20px;
  min-height: 100vh;
}

/* ==========================================================================
   CONTAINER & HEADER
   ========================================================================== */
.app-container {
  max-width: 800px;
  margin: 0 auto;
}

.app-header {
  text-align: center;
  margin-bottom: 32px;
  animation: fadeInDown var(--transition-slow);
}

.logo-wrapper {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  background: var(--color-primary-light);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(79, 70, 229, 0.1);
}

.header-logo {
  width: 20px;
  height: 20px;
  object-fit: contain;
  border-radius: 4px;
}

.logo-text {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
}

.app-header h1 {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--color-text-dark);
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 8px;
}

.app-header .subtitle {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  max-width: 500px;
  margin: 0 auto;
}

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.main-layout {
  display: block;
  /* Single column container */
  animation: fadeInUp var(--transition-slow);
}

/* ==========================================================================
   FORM CONTAINER CARD
   ========================================================================== */
.form-card-container {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  overflow: hidden;
}

.app-form {
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   TOP STEPPER PROGRESS NAVBAR
   ========================================================================== */
.stepper-wrapper {
  background: var(--color-bg-white);
  padding: 28px 40px;
  border-bottom: 1px solid var(--color-border);
}

.stepper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  width: 100%;
}

.step-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  position: relative;
  z-index: 10;
  cursor: pointer;
}

.step-circle {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-bg-white);
  border: 2px solid var(--color-border);
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
  user-select: none;
}

.step-node.active .step-circle {
  border-color: var(--color-primary);
  background: var(--color-primary-light);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.step-node.completed .step-circle {
  border-color: var(--color-success);
  background: var(--color-success);
  color: var(--color-bg-white);
}

.step-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: var(--transition-normal);
  white-space: nowrap;
}

.step-node.active .step-title {
  color: var(--color-primary);
  font-weight: 700;
}

.step-node.completed .step-title {
  color: var(--color-success);
}

.step-line {
  flex-grow: 1;
  height: 2px;
  background: var(--color-border);
  margin: 0 8px;
  transform: translateY(-13px);
  /* Shift line vertically to center of circle */
  transition: var(--transition-normal);
}

.step-line.completed {
  background: var(--color-success);
}

.step-line.active {
  background: var(--color-primary);
}

/* Mobile Stepper (Hidden on Desktop) */
.mobile-stepper {
  display: none;
  flex-direction: column;
  gap: 8px;
}

.mobile-step-text {
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.mobile-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.mobile-progress-fill {
  height: 100%;
  background: var(--color-primary);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

/* ==========================================================================
   FORM SECTION & PAGES VISIBILITY
   ========================================================================== */
.form-section {
  padding: 40px;
  display: none;
  /* Controlled page states */
  background: var(--color-bg-white);
}

.form-section.active-page {
  display: block;
  animation: slideFadeIn var(--transition-normal) forwards;
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-title-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.section-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--color-primary-light);
  color: var(--color-primary);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
}

.form-section h2 {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-text-dark);
  letter-spacing: -0.01em;
}

.section-desc {
  color: var(--color-text-muted);
  font-size: 0.9rem;
  margin-bottom: 28px;
  padding-left: 44px;
}

/* Grid Layouts */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px 24px;
  padding-left: 44px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

/* ==========================================================================
   INPUTS & LABELS
   ========================================================================== */
label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dark);
  transition: var(--transition-fast);
}

label.required::after {
  content: " *";
  color: var(--color-error);
}

.optional-label {
  font-weight: 400;
  color: var(--color-text-muted);
  font-size: 0.8rem;
}

/* Text Inputs, Select, Textarea */
.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  width: 18px;
  height: 18px;
  color: var(--color-text-muted);
  pointer-events: none;
  transition: var(--transition-fast);
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--color-text-dark);
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: var(--transition-normal);
  box-shadow: var(--shadow-sm);
}

.input-wrapper input,
.input-wrapper select {
  padding-left: 44px;
}

/* Focus States */
input:focus,
select:focus,
textarea:focus {
  border-color: var(--color-primary);
  background: var(--color-bg-white);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

/* Hover States */
input:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  border-color: var(--color-border-hover);
}

textarea {
  resize: vertical;
  min-height: 100px;
}

select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%23475569' stroke-width='2'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19 9l-7 7-7-7'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 40px;
}

.mt-4 {
  margin-top: 16px;
}

.mb-4 {
  margin-bottom: 16px;
}

/* ==========================================================================
   RADIO BUTTONS & CHECKBOXES
   ========================================================================== */
.radio-group-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 8px 0;
}

.radio-label,
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
  user-select: none;
}

.radio-label input,
.checkbox-label input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.custom-radio {
  height: 18px;
  width: 18px;
  background-color: var(--color-bg-white);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-full);
  display: inline-block;
  position: relative;
  transition: var(--transition-normal);
}

.radio-label:hover .custom-radio {
  border-color: var(--color-border-hover);
}

.radio-label input:checked~.custom-radio {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
}

.custom-radio::after {
  content: "";
  position: absolute;
  display: none;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: var(--radius-full);
  background: var(--color-bg-white);
  transform: translate(-50%, -50%);
}

.radio-label input:checked~.custom-radio::after {
  display: block;
}

.custom-checkbox {
  height: 18px;
  width: 18px;
  background-color: var(--color-bg-white);
  border: 1.5px solid var(--color-border);
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: var(--transition-normal);
  color: transparent;
}

.checkbox-label:hover .custom-checkbox {
  border-color: var(--color-border-hover);
}

.checkbox-label input:checked~.custom-checkbox {
  border-color: var(--color-primary);
  background-color: var(--color-primary);
  color: var(--color-bg-white);
}

.checkmark-icon {
  width: 14px;
  height: 14px;
  transform: scale(0.6);
  transition: transform 0.15s cubic-bezier(0.12, 0.4, 0.29, 1.46);
}

.checkbox-label input:checked~.custom-checkbox .checkmark-icon {
  transform: scale(1);
}

.checkbox-text {
  font-size: 0.9rem;
  color: var(--color-text-dark);
}

.declaration-container {
  margin-top: 24px;
  padding: 16px;
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
}

/* ==========================================================================
   CUSTOM FILE UPLOAD DROPZONES
   ========================================================================== */
.uploads-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  padding-left: 0;
  /* Align perfectly with single column width */
}

.upload-dropzone {
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  padding: 24px;
  text-align: center;
  background: var(--color-bg-light);
  cursor: pointer;
  position: relative;
  transition: var(--transition-normal);
  min-height: 160px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.upload-dropzone:hover,
.upload-dropzone.dragover {
  border-color: var(--color-primary);
  background: rgba(79, 70, 229, 0.02);
}

.hidden-file-input {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.dropzone-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: var(--transition-normal);
}

.dropzone-icon {
  width: 36px;
  height: 36px;
  color: var(--color-text-muted);
  transition: var(--transition-normal);
}

.upload-dropzone:hover .dropzone-icon {
  color: var(--color-primary);
  transform: translateY(-2px);
}

.dropzone-text {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

.browse-link {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
}

.dropzone-subtext {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* File Upload Previews */
.file-info-preview {
  display: none;
  width: 100%;
  z-index: 10;
  animation: scaleIn 0.2s ease-out;
}

.file-info-header {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--color-bg-white);
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  width: 100%;
}

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

.file-details {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  overflow: hidden;
  flex-grow: 1;
}

.file-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-dark);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

.file-size {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.remove-file-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.remove-file-btn:hover {
  background: var(--color-error-light);
  color: var(--color-error);
}

.remove-file-btn svg {
  width: 16px;
  height: 16px;
}

/* Photo Preview */
.photo-info-preview {
  display: none;
  z-index: 10;
  animation: scaleIn 0.2s ease-out;
}

.photo-preview-container {
  position: relative;
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  border: 2px solid var(--color-primary);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

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

.remove-photo-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  background: rgba(239, 68, 68, 0.9);
  border: none;
  color: var(--color-bg-white);
  border-radius: var(--radius-full);
  width: 20px;
  height: 20px;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-sm);
  z-index: 10;
}

.remove-photo-btn:hover {
  background: rgba(239, 68, 68, 1);
  transform: scale(1.1);
}

.remove-photo-btn svg {
  width: 12px;
  height: 12px;
}

/* ==========================================================================
   BUTTONS & FOOTER ACTIONS
   ========================================================================== */
.form-actions-footer {
  padding: 24px 40px;
  background: var(--color-bg-light);
  border-top: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.actions-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

/* Button Base Styles */
button,
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  outline: none;
  transition: var(--transition-normal);
  user-select: none;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-bg-white);
  box-shadow: 0 4px 6px -1px rgba(79, 70, 229, 0.2), 0 2px 4px -2px rgba(79, 70, 229, 0.1);
}

.btn-primary:hover:not(:disabled) {
  background: var(--color-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 10px 15px -3px rgba(79, 70, 229, 0.25), 0 4px 6px -2px rgba(79, 70, 229, 0.15);
}

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

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Payment button */
.btn-payment {
  background: linear-gradient(135deg, var(--color-primary), #6366f1);
  position: relative;
  overflow: hidden;
}

.btn-payment::after {
  content: "";
  position: absolute;
  top: 0;
  left: -50%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: skewX(-20deg);
  transition: 0.75s;
}

.btn-payment:hover::after {
  left: 120%;
  transition: 0.75s;
}

.btn-payment.success-paid {
  background: var(--color-success);
  box-shadow: 0 4px 6px -1px rgba(16, 185, 129, 0.2);
}

.btn-payment.success-paid:hover {
  background: var(--color-success-hover);
  box-shadow: 0 10px 15px -3px rgba(16, 185, 129, 0.25);
}

.btn-secondary {
  background: var(--color-bg-white);
  border-color: var(--color-border);
  color: var(--color-text-dark);
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background: var(--color-bg-light);
  border-color: var(--color-border-hover);
  color: var(--color-text-dark);
}

.flex-btn svg,
.btn-primary svg,
.btn-secondary svg {
  width: 18px;
  height: 18px;
}

/* Hidden Utility Class */
.hidden {
  display: none !important;
}

/* Inline payment indicator */
.payment-badge-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-bg-white);
  padding: 8px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
}

.payment-badge-inline.paid-state {
  border-color: rgba(16, 185, 129, 0.25);
  background: rgba(16, 185, 129, 0.04);
}

.status-indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  display: inline-block;
  position: relative;
}

.status-indicator-dot.unpaid {
  background-color: var(--color-warning);
  box-shadow: 0 0 6px var(--color-warning);
  animation: pulse 1.8s infinite;
}

.status-indicator-dot.paid {
  background-color: var(--color-success);
  box-shadow: 0 0 6px var(--color-success);
}

.status-badge-text {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.payment-badge-inline.paid-state .status-badge-text {
  color: var(--color-success);
}

/* ==========================================================================
   VALIDATION FEEDBACK (ERRORS)
   ========================================================================== */
.error-message {
  color: var(--color-error);
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 4px;
  display: none;
  animation: slideDown 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-group.invalid input,
.form-group.invalid select,
.form-group.invalid textarea {
  border-color: var(--color-error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  background-color: rgba(239, 68, 68, 0.01);
}

.form-group.invalid .input-icon {
  color: var(--color-error);
}

.form-group.invalid .error-message {
  display: block;
}

.upload-dropzone.invalid {
  border-color: var(--color-error);
  background-color: rgba(239, 68, 68, 0.02);
}

.declaration-container.invalid {
  border-color: var(--color-error);
  box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
  background-color: rgba(239, 68, 68, 0.01);
}

.declaration-container.invalid .error-message {
  display: block;
}

/* ==========================================================================
   MODAL DIALOGS OVERLAYS
   ========================================================================== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
  padding: 20px;
}

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

/* Payment Modal Card */
.modal-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 440px;
  overflow: hidden;
  transform: scale(0.95) translateY(10px);
  transition: transform var(--transition-normal);
}

.modal-overlay.open .modal-card {
  transform: scale(1) translateY(0);
}

.modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.modal-sub {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.close-modal-btn {
  background: transparent;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 6px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.close-modal-btn:hover {
  background: var(--color-bg-light);
  color: var(--color-text-dark);
}

.close-modal-btn svg {
  width: 18px;
  height: 18px;
}

.modal-body {
  padding: 24px;
}

.modal-body .form-group {
  margin-bottom: 16px;
}

.modal-form-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.modal-input-error {
  color: var(--color-error);
  font-size: 0.75rem;
  font-weight: 500;
  display: none;
  margin-top: 4px;
}

.modal-body .form-group.invalid .modal-input-error {
  display: block;
}

/* UPI Modal Styling */
.upi-tabs {
  display: flex;
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
  padding: 4px;
  gap: 4px;
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.upi-tab-btn {
  flex: 1;
  background: transparent;
  border: none;
  padding: 8px 12px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border-radius: calc(var(--radius-sm) - 4px);
  cursor: pointer;
  transition: var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
}

.upi-tab-btn.active {
  background: var(--color-bg-white);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.upi-tab-btn:hover:not(.active) {
  color: var(--color-text-dark);
  background: rgba(15, 23, 42, 0.03);
}

.qr-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
}

.qr-code-wrapper {
  position: relative;
  width: 180px;
  height: 180px;
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 16px;
  overflow: hidden;
  color: var(--color-text-dark);
}

.qr-code-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.qr-scanner-line {
  position: absolute;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--color-success);
  box-shadow: 0 0 8px var(--color-success);
  animation: scan 2.5s ease-in-out infinite;
}

@keyframes scan {

  0%,
  100% {
    top: 0%;
  }

  50% {
    top: 100%;
  }
}

.qr-instruction {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-align: center;
  max-width: 260px;
  line-height: 1.4;
  margin-bottom: 12px;
}

.upi-app-logos {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 4px;
}

.upi-logo-pill {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--color-text-muted);
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  padding: 3px 8px;
  border-radius: var(--radius-full);
}

.upi-section-content.hidden {
  display: none;
}

.popular-handles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.handle-title {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.handle-chip {
  background: var(--color-bg-white);
  border: 1px solid var(--color-border);
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--color-text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: var(--transition-fast);
}

.handle-chip:hover {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border-color: var(--color-primary);
}

/* Compact Dropzone for UPI screenshot proof */
.compact-dropzone {
  min-height: 100px;
  padding: 16px;
}

.compact-icon {
  width: 28px !important;
  height: 28px !important;
}

.compact-preview-container {
  width: 140px !important;
  height: 80px !important;
}

.amount-strip {
  background: var(--color-bg-light);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  margin-bottom: 20px;
}

.amount-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-dark);
}

.modal-actions {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  margin-top: 24px;
}

/* Spinner icon */
.btn-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--color-bg-white);
  border-radius: var(--radius-full);
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

.btn-spinner.hidden {
  display: none;
}

/* ==========================================================================
   SUCCESS MODAL SCREEN
   ========================================================================== */
.success-card {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-xl);
  border: 1px solid var(--color-border);
  width: 100%;
  max-width: 480px;
  padding: 40px;
  text-align: center;
  transform: scale(0.95);
  transition: transform var(--transition-normal);
  position: relative;
}

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

.success-card h2 {
  font-family: var(--font-heading);
  font-size: 1.8rem;
  font-weight: 800;
  margin: 20px 0 8px 0;
  color: var(--color-text-dark);
}

.success-message {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.success-details-summary {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 20px;
  text-align: left;
  margin-bottom: 32px;
  animation: slideUp 0.3s ease-out 0.2s both;
}

.summary-title {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--color-text-muted);
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 8px;
  margin-bottom: 12px;
}

.summary-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.summary-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.88rem;
}

.summary-label {
  color: var(--color-text-muted);
  font-weight: 500;
}

.summary-value {
  font-weight: 600;
  color: var(--color-text-dark);
  text-align: right;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status-badge-success {
  background: var(--color-success-light);
  color: var(--color-success);
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-weight: 700;
}

/* Success Checkmark SVG Animation */
.success-checkmark {
  width: 80px;
  height: 80px;
  margin: 0 auto;
}

.check-icon {
  width: 80px;
  height: 80px;
  position: relative;
  border-radius: 50%;
  box-sizing: content-box;
  border: 4px solid rgba(16, 185, 129, .2);
}

.check-icon::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  box-shadow: inset 0 0 0 40px var(--color-success);
  transform: scale(0);
  animation: fillCircle .4s ease-in-out .4s forwards;
}

.icon-line {
  height: 5px;
  background-color: var(--color-bg-white);
  display: block;
  border-radius: 2px;
  position: absolute;
  z-index: 10;
}

.icon-line.line-tip {
  width: 19px;
  left: 17px;
  top: 42px;
  transform: rotate(45deg);
  transform-origin: left;
  animation: writeStrokeTip .2s ease-in-out .8s both;
}

.icon-line.line-long {
  width: 35px;
  right: 16px;
  top: 36px;
  transform: rotate(-45deg);
  transform-origin: right;
  animation: writeStrokeLong .2s ease-in-out 1s both;
}

/* ==========================================================================
   TOAST NOTIFICATION COMPONENT
   ========================================================================== */
.toast-container {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 110;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  background: var(--color-bg-white);
  border-radius: var(--radius-md);
  border-left: 4px solid var(--color-primary);
  box-shadow: var(--shadow-lg);
  padding: 16px 20px;
  min-width: 280px;
  max-width: 380px;
  display: flex;
  align-items: center;
  gap: 12px;
  pointer-events: auto;
  animation: slideInRight 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards,
    fadeOut 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275) 4s forwards;
}

.toast.toast-error {
  border-left-color: var(--color-error);
}

.toast.toast-success {
  border-left-color: var(--color-success);
}

.toast-message {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--color-text-dark);
}

/* ==========================================================================
   ANIMATIONS
   ========================================================================== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.4);
  }

  70% {
    box-shadow: 0 0 0 6px rgba(245, 158, 11, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

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

@keyframes fillCircle {
  0% {
    transform: scale(0);
  }

  100% {
    transform: scale(1);
  }
}

@keyframes writeStrokeTip {
  0% {
    width: 0;
  }

  100% {
    width: 19px;
  }
}

@keyframes writeStrokeLong {
  0% {
    width: 0;
  }

  100% {
    width: 35px;
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }

  to {
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
  }
}

/* ==========================================================================
   MEDIA QUERIES (RESPONSIVENESS)
   ========================================================================== */
@media (max-width: 768px) {
  body {
    padding: 20px 12px;
  }

  .stepper {
    display: none;
    /* Hide full stepper node layout on mobile */
  }

  .mobile-stepper {
    display: flex;
    /* Show textual progress bar on mobile */
  }

  .stepper-wrapper {
    padding: 16px 20px;
  }

  .form-section {
    padding: 28px 20px;
  }

  .form-grid {
    grid-template-columns: 1fr;
    padding-left: 0;
    gap: 16px;
  }

  .section-desc {
    padding-left: 0;
    margin-bottom: 20px;
  }

  .section-title-wrapper {
    gap: 8px;
  }

  .uploads-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .form-actions-footer {
    padding: 20px;
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .actions-group {
    flex-direction: column-reverse;
    width: 100%;
  }

  .actions-group button {
    width: 100%;
  }

  .payment-badge-inline {
    width: 100%;
    justify-content: center;
  }
}

/* ==========================================================================
   WELCOME SCREEN STYLES
   ========================================================================== */
.welcome-card-container {
  background: var(--color-bg-white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--color-border);
  padding: 48px;
  text-align: center;
  animation: slideFadeIn var(--transition-slow);
}

.welcome-hero {
  margin-bottom: 40px;
}

.welcome-logo-wrapper {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  border-radius: var(--radius-md);
  background: var(--color-bg-light);
  border: 1.5px solid var(--color-border);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: var(--shadow-md);
  transition: transform var(--transition-normal), border-color var(--transition-normal);
}

.welcome-logo-wrapper:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--color-primary);
}

.welcome-logo {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 6px;
}

.welcome-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.welcome-subtitle {
  font-family: var(--font-body);
  font-size: 1.05rem;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

.welcome-features {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  max-width: 580px;
  margin: 0 auto 40px;
}

.feature-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 24px;
  background: var(--color-bg-light);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  transition: border-color var(--transition-normal), background-color var(--transition-normal), transform var(--transition-fast);
}

.feature-item:hover {
  border-color: rgba(79, 70, 229, 0.25);
  background: rgba(79, 70, 229, 0.02);
  transform: translateY(-2px);
}

.feature-icon-wrapper {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  background: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.feature-svg {
  width: 22px;
  height: 22px;
}

.feature-info h3 {
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--color-text-dark);
  margin-bottom: 4px;
}

.feature-info p {
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--color-text-muted);
  line-height: 1.49;
}

.welcome-actions {
  display: flex;
  justify-content: center;
}

.welcome-btn {
  padding: 14px 36px;
  font-size: 1.05rem;
  font-weight: 700;
  border-radius: var(--radius-md);
  box-shadow: 0 10px 20px -10px rgba(79, 70, 229, 0.4);
}

.welcome-btn .arrow-icon {
  width: 18px;
  height: 18px;
  transition: transform var(--transition-fast);
}

.welcome-btn:hover .arrow-icon {
  transform: translateX(4px);
}

.hidden-section {
  display: none !important;
}

.fade-out-welcome {
  opacity: 0;
  transform: scale(0.96) translateY(-10px);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 768px) {
  .welcome-card-container {
    padding: 32px 20px;
  }

  .welcome-title {
    font-size: 1.65rem;
  }

  .welcome-features {
    margin-bottom: 32px;
  }

  .feature-item {
    padding: 14px 16px;
    gap: 12px;
  }
}

/* ==========================================================================
   COUPON PRINT STYLES (HIDDEN ON SCREEN, DESIGNED FOR PDF GENERATION)
   ========================================================================== */
.coupon-print-container {
  width: 800px;
  min-height: 1050px;
  background: #ffffff;
  color: #000000;
  font-family: 'Inter', 'Outfit', sans-serif;
  padding: 40px 50px;
  box-sizing: border-box;
}

.coupon-header-title {
  font-family: 'Outfit', sans-serif;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
  color: #000000;
  text-transform: uppercase;
}

.coupon-subtitle {
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #000000;
  text-transform: uppercase;
}

.coupon-card-section {
  margin-bottom: 24px;
}

.coupon-section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 16px;
  color: #000000;
}

.coupon-details-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}

.coupon-details-table td {
  padding: 6px 0;
  font-size: 13.5px;
  line-height: 1.5;
  vertical-align: top;
}

.coupon-details-table td.lbl {
  width: 160px;
  font-weight: 700;
  color: #000000;
}

.coupon-details-table td.val {
  color: #000000;
}

.coupon-details-table td.font-bold {
  font-weight: 700;
}

.coupon-instructions-section {
  margin-top: 24px;
  margin-bottom: 24px;
}

.ins-title {
  font-family: 'Outfit', sans-serif;
  font-size: 15px;
  font-weight: 700;
  margin-top: 0;
  margin-bottom: 10px;
  color: #000000;
}

.ins-list {
  margin: 0;
  padding-left: 20px;
}

.ins-list li {
  font-size: 13px;
  line-height: 1.6;
  margin-bottom: 4px;
  color: #000000;
  list-style-type: disc;
}

.coupon-signatures {
  margin-top: 20px;
  font-size: 13px;
  line-height: 1.5;
}

.coupon-signatures p {
  margin: 2px 0;
}

.coupon-divider {
  border: none;
  border-top: 1px solid #cccccc;
  margin: 30px 0;
  width: 100%;
}

.entry-pass-section {
  padding-top: 10px;
}

.entry-pass-desc {
  font-size: 13.5px;
  margin-bottom: 16px;
  color: #000000;
}

.entry-pass-footer {
  margin-top: 30px;
  font-size: 12px;
  font-style: italic;
  color: #000000;
  border-top: 1px solid #eeeeee;
  padding-top: 12px;
}