/**
 * Loan Application Form - Enhanced CSS
 * Modern, professional design with improved usability
 */

/* Import Poppins font for a modern look */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

/* Enhanced 7-Step Progress Bar */
.lf-form-progress,
.form-progress {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 2rem 0 3rem;
  padding: 0 1rem;
  position: relative;
}

/* Hide universal progress bar in standalone mode */
.laf-standalone-wrapper .lf-form-progress,
.laf-style-standalone .lf-form-progress {
  display: none !important;
}

/* Hide standard progress bar in universal mode */
.lf-container .form-progress,
.laf-style-universal .form-progress {
  display: none !important;
}

/* Force hide duplicate progress bars - more aggressive approach */
.lf-form-progress + .form-progress,
.form-progress + .lf-form-progress {
  display: none !important;
}

/* Ensure only one progress bar shows at a time */
body:has(.lf-form-progress) .form-progress {
  display: none !important;
}

body:has(.form-progress) .lf-form-progress:not(:first-of-type) {
  display: none !important;
}

.lf-form-progress::before,
.form-progress::before {
  content: '';
  position: absolute;
  top: 20px;
  left: 8%;
  right: 8%;
  height: 3px;
  background: linear-gradient(90deg, #e9ecef 0%, #e9ecef 100%);
  z-index: 1;
  border-radius: 2px;
}

.lf-form-progress-step,
.form-progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  z-index: 2;
  min-width: 80px;
  text-align: center;
}

.lf-form-progress-number,
.form-progress-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e9ecef;
  color: #6c757d;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
  transition: all 0.3s ease;
  border: 3px solid transparent;
}

.lf-form-progress-title,
.form-progress-title {
  font-size: 0.8rem;
  font-weight: 500;
  color: #6c757d;
  transition: all 0.3s ease;
  text-align: center;
  line-height: 1.2;
}

/* Active step styling */
.lf-form-progress-step.active .lf-form-progress-number,
.form-progress-step.active .form-progress-number {
  background: linear-gradient(135deg, #3a7bd5, #764ba2);
  color: white;
  border-color: #3a7bd5;
  transform: scale(1.1);
  box-shadow: 0 4px 15px rgba(58, 123, 213, 0.4);
}

.lf-form-progress-step.active .lf-form-progress-title,
.form-progress-step.active .form-progress-title {
  color: #3a7bd5;
  font-weight: 600;
}

/* Completed step styling */
.lf-form-progress-step.completed .lf-form-progress-number,
.form-progress-step.completed .form-progress-number {
  background: #28a745;
  color: white;
  border-color: #28a745;
}

.lf-form-progress-step.completed .lf-form-progress-number::after,
.form-progress-step.completed .form-progress-number::after {
  content: '✓';
  font-weight: bold;
  font-size: 1.2rem;
}

.lf-form-progress-step.completed .lf-form-progress-title,
.form-progress-step.completed .form-progress-title {
  color: #28a745;
  font-weight: 500;
}

/* Progress line update for completed steps */
.lf-form-progress-step.completed ~ .lf-form-progress-step:not(.completed):not(.active)::before,
.form-progress-step.completed ~ .form-progress-step:not(.completed):not(.active)::before {
  background: #28a745;
}

/* Mobile responsive progress bar */
@media (max-width: 768px) {
  .lf-form-progress,
  .form-progress {
    overflow-x: auto;
    padding: 0 0.5rem;
    justify-content: flex-start;
    gap: 1rem;
  }
  
  .lf-form-progress::before,
  .form-progress::before {
    display: none;
  }
  
  .lf-form-progress-step,
  .form-progress-step {
    min-width: 60px;
    flex-shrink: 0;
  }
  
  .lf-form-progress-number,
  .form-progress-number {
    width: 35px;
    height: 35px;
    font-size: 0.9rem;
  }
  
  .lf-form-progress-title,
  .form-progress-title {
    font-size: 0.7rem;
  }
}

/* Enhanced step content styling */
.lf-form-step,
.form-step {
  background: white;
  border-radius: 15px;
  padding: 2rem;
  margin-bottom: 2rem;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.lf-form-step.active,
.form-step.active {
  border-color: #3a7bd5;
  box-shadow: 0 8px 30px rgba(58, 123, 213, 0.15);
}

/* Enhanced section headings */
.lf-section-heading,
.form-section-heading {
  color: #2c3e50;
  font-weight: 700;
  font-size: 1.8rem;
  margin-bottom: 1rem;
  position: relative;
  padding-bottom: 0.5rem;
}

.lf-section-heading::after,
.form-section-heading::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(135deg, #3a7bd5, #764ba2);
  border-radius: 2px;
}

/* Enhanced navigation buttons */
.lf-step-navigation,
.step-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid #e9ecef;
}

.lf-btn,
.btn {
  border-radius: 25px;
  padding: 0.75rem 2rem;
  font-weight: 600;
  text-transform: none;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.lf-btn-primary,
.btn-primary {
  background: linear-gradient(135deg, #3a7bd5, #764ba2);
  color: white;
  box-shadow: 0 4px 15px rgba(58, 123, 213, 0.3);
}

.lf-btn-primary:hover,
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(58, 123, 213, 0.4);
}

.lf-btn-outline-primary,
.btn-outline-primary {
  background: transparent;
  color: #3a7bd5;
  border: 2px solid #3a7bd5;
}

.lf-btn-outline-primary:hover,
.btn-outline-primary:hover {
  background: #3a7bd5;
  color: white;
  transform: translateY(-2px);
}

.lf-btn-success,
.btn-success {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
  box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
}

.lf-btn-lg,
.btn-lg {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}

/* Enhanced form inputs */
.lf-form-control,
.form-control {
  border: 2px solid #e9ecef;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
  background: #f8f9fa;
}

.lf-form-control:focus,
.form-control:focus {
  border-color: #3a7bd5;
  box-shadow: 0 0 0 0.2rem rgba(58, 123, 213, 0.25);
  background: white;
}

.lf-form-label,
.form-label {
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

/* Enhanced cards */
.lf-card,
.card {
  border: none;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  transition: all 0.3s ease;
}

.lf-card:hover,
.card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.lf-card-header,
.card-header {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-bottom: 1px solid #dee2e6;
  padding: 1.5rem;
  font-weight: 600;
  color: #2c3e50;
}

.lf-card-body,
.card-body {
  padding: 1.5rem;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .lf-container,
  .laf-standalone-wrapper {
    margin: 1rem;
    padding: 0;
  }
  
  .lf-form-step,
  .form-step {
    padding: 1.5rem;
    margin-bottom: 1rem;
  }
  
  .lf-section-heading,
  .form-section-heading {
    font-size: 1.5rem;
  }
  
  .lf-step-navigation,
  .step-navigation {
    flex-direction: column;
    gap: 1rem;
  }
  
  .lf-btn,
  .btn {
    width: 100%;
    text-align: center;
  }
  
  .lf-row,
  .row {
    margin: 0;
  }
  
  .lf-col,
  [class*="col-"] {
    padding: 0.5rem;
  }
}

/* Ultra-mobile (small phones) */
@media (max-width: 480px) {
  .lf-container,
  .laf-standalone-wrapper {
    margin: 0.5rem;
  }
  
  .lf-form-step,
  .form-step {
    padding: 1rem;
  }
  
  .lf-section-heading,
  .form-section-heading {
    font-size: 1.3rem;
  }
  
  .lf-form-control,
  .form-control {
    font-size: 16px; /* Prevents zoom on iOS */
  }
}

/* ----------------------
 * Contextual Help System
 * --------------------- */
.help-tooltip {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
  cursor: help;
  color: #007cba;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.help-tooltip:hover {
  color: #005a8c;
  transform: scale(1.1);
}

.help-tooltip::before {
  content: '';
  position: absolute;
  top: 125%;
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-bottom-color: #2c3e50;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
}

.help-tooltip::after {
  content: attr(data-tooltip);
  position: absolute;
  top: 135%;
  left: 50%;
  transform: translateX(-50%);
  background: #2c3e50;
  color: white;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  max-width: 250px;
  white-space: normal;
  line-height: 1.4;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1000;
}

.help-tooltip:hover::before,
.help-tooltip:hover::after {
  opacity: 1;
  visibility: visible;
}

/* Help tooltips for mobile */
@media (max-width: 768px) {
  .help-tooltip::after {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 280px;
    z-index: 9999;
  }
  
  .help-tooltip::before {
    display: none;
  }
}

/* ----------------------
 * Progress Indicators
 * --------------------- */
.form-progress-percentage {
  margin-bottom: 1.5rem;
  text-align: center;
}

.progress-indicator {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 20px;
  padding: 0.75rem 1.5rem;
  display: inline-block;
  font-weight: 600;
  color: #2c3e50;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border: 2px solid #e9ecef;
  transition: all 0.3s ease;
}

.progress-indicator:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.progress-indicator .step-number {
  color: #3a7bd5;
  font-weight: 700;
}

.progress-indicator .percentage {
  color: #28a745;
  font-weight: 700;
}

/* Step completion badges */
.step-completion-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #f8f9fa;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  border: 1px solid #e9ecef;
  transition: all 0.3s ease;
}

.step-completion-badge.completed {
  background: #d4edda;
  color: #155724;
  border-color: #c3e6cb;
}

.step-completion-badge.active {
  background: #cce5ff;
  color: #0056b3;
  border-color: #99ccff;
}

.step-completion-badge .badge-icon {
  font-size: 1rem;
}

/* ----------------------
 * Enhanced Form Feedback
 * --------------------- */
.form-field-status {
  position: absolute;
  right: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  pointer-events: none;
  opacity: 0;
  transition: all 0.3s ease;
}

.lf-form-control,
.form-control {
  position: relative;
  padding-right: 2.5rem;
}

.lf-form-control.is-valid,
.form-control.is-valid {
  border-color: #28a745;
  background-color: #f8fff9;
}

.lf-form-control.is-valid + .form-field-status {
  color: #28a745;
  opacity: 1;
}

.lf-form-control.is-invalid,
.form-control.is-invalid {
  border-color: #dc3545;
  background-color: #fff5f5;
}

.lf-form-control.is-invalid + .form-field-status {
  color: #dc3545;
  opacity: 1;
}

/* Enhanced validation messages */
.invalid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #dc3545;
  background: #f8f9fa;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid #dc3545;
}

.valid-feedback {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: #28a745;
  background: #f8fff9;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  border-left: 3px solid #28a745;
}

/* ----------------------
 * Step Navigation Enhancements
 * --------------------- */
.step-navigation-helper {
  text-align: center;
  margin-bottom: 1rem;
  color: #6c757d;
  font-size: 0.9rem;
}

.keyboard-shortcut-hint {
  background: #f8f9fa;
  border: 1px solid #e9ecef;
  border-radius: 15px;
  padding: 0.75rem 1rem;
  margin-top: 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #6c757d;
}

.keyboard-shortcut-hint .shortcut-key {
  background: #e9ecef;
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  font-weight: 600;
  margin: 0 0.2rem;
}

/* ----------------------
 * Loading States
 * --------------------- */
.form-loading {
  position: relative;
  overflow: hidden;
}

.form-loading::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, #3a7bd5, transparent);
  animation: loading-slide 1.5s infinite;
  z-index: 1000;
}

@keyframes loading-slide {
  0% { left: -100%; }
  100% { left: 100%; }
}

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ----------------------
 * Success States
 * --------------------- */
.step-success-animation {
  position: relative;
  overflow: hidden;
}

.step-success-animation::after {
  content: '✓';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 3rem;
  color: #28a745;
  font-weight: bold;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: success-pop 0.6s ease-out forwards;
  z-index: 1000;
  box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

@keyframes success-pop {
  0% {
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.2);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
}

/* ----------------------
 * Mobile Enhancements
 * --------------------- */
@media (max-width: 768px) {
  .help-tooltip {
    font-size: 1.2rem;
    margin-left: 0.75rem;
  }
  
  .progress-indicator {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }
  
  .keyboard-shortcut-hint {
    display: none; /* Hide on mobile */
  }
  
  .step-completion-badge {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }
}

/* ----------------------
 * Core Variables
 * --------------------- */
:root {
  /* Updated color scheme - rich blue/purple gradient theme */
  --laf-primary: #3a7bd5;
  --laf-primary-dark: #3055a3;
  --laf-primary-light: #eaf0ff;
  --laf-primary-lighter: #f4f8ff;
  --laf-secondary: #6c757d;
  --laf-success: #00a67e;
  --laf-danger: #e63946;
  --laf-warning: #ffc107;
  --laf-info: #00b4d8;
  --laf-light: #f8f9fa;
  --laf-dark: #2d3748;
  
  /* Modern gradient colors */
  --laf-gradient-primary: linear-gradient(135deg, #3a7bd5, #3055a3);
  --laf-gradient-secondary: linear-gradient(135deg, #24243e, #0f0c29);
  --laf-gradient-success: linear-gradient(135deg, #00a67e, #00705a);
  
  /* Updated grayscale */
  --laf-gray-100: #f8f9fa;
  --laf-gray-200: #edf2f7;
  --laf-gray-300: #e2e8f0;
  --laf-gray-400: #cbd5e0;
  --laf-gray-500: #a0aec0;
  --laf-gray-600: #718096;
  --laf-gray-700: #4a5568;
  --laf-gray-800: #2d3748;
  --laf-gray-900: #1a202c;
  
  /* Design system */
  --laf-transition: all 0.3s ease;
  --laf-box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  --laf-box-shadow-hover: 0 8px 30px rgba(0, 0, 0, 0.15);
  --laf-border-radius: 14px;
  --laf-border-radius-lg: 20px;
  --laf-border-radius-sm: 8px;
  --laf-font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* ----------------------
 * Master Reset Container
 * --------------------- */
.laf-container, .laf-standalone-wrapper {
  /* Clear any inherited styles */
  all: revert;
  
  /* Setting our own base */
  font-family: var(--laf-font-family);
  color: var(--laf-gray-800);
  line-height: 1.5;
  font-size: 16px;
  max-width: 1200px; /* Increased from 900px for a wider form */
  margin: 40px auto;
  padding: 0;
  background: transparent;
  box-sizing: border-box;
}

/* Apply box-sizing to all elements */
.laf-container *, .laf-standalone-wrapper * {
  box-sizing: border-box;
}

/* ----------------------
 * Premium Header with Dramatic Hero Design
 * --------------------- */
.laf-container .header-gradient,
.laf-standalone-wrapper .header-gradient {
  background: linear-gradient(135deg, #3a7bd5, #24243e);
  color: white;
  padding: 60px 40px 80px;
  border-radius: var(--laf-border-radius-lg) var(--laf-border-radius-lg) 0 0;
  position: relative;
  border: none;
  overflow: hidden;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

/* Animated background patterns */
.laf-container .header-gradient:before,
.laf-standalone-wrapper .header-gradient:before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.1) 0%, transparent 12%),
    radial-gradient(circle at 80% 60%, rgba(255, 255, 255, 0.08) 0%, transparent 15%),
    radial-gradient(circle at 40% 80%, rgba(255, 255, 255, 0.06) 0%, transparent 10%),
    radial-gradient(circle at 70% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 8%);
  z-index: 1;
  opacity: 0.8;
  animation: shimmer 60s infinite linear;
}

@keyframes shimmer {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

/* Large, prominent icon */
.laf-container .header-icon,
.laf-standalone-wrapper .header-icon {
  position: absolute;
  top: 50%;
  right: 60px;
  transform: translateY(-50%);
  font-size: 6.5rem;
  color: white;
  z-index: 2;
  opacity: 0.25;
  animation: float 6s infinite ease-in-out;
}

@keyframes float {
  0% { transform: translateY(-50%) translateX(0) rotate(0); }
  50% { transform: translateY(-55%) translateX(5px) rotate(2deg); }
  100% { transform: translateY(-50%) translateX(0) rotate(0); }
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.6; }
  50% { transform: scale(1.05); opacity: 0.8; }
  100% { transform: scale(1); opacity: 0.6; }
}

/* Enhanced wave transition */
.laf-container .wave-bottom,
.laf-standalone-wrapper .wave-bottom {
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 35px;
  background: white;
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
  z-index: 5;
  box-shadow: 0 -5px 15px rgba(0, 0, 0, 0.03);
}

/* Premium typography */
.laf-container .header-gradient h3,
.laf-standalone-wrapper .header-gradient h3 {
  font-size: 2.8rem;
  margin: 0;
  font-weight: 800;
  color: white;
  position: relative;
  z-index: 10;
  letter-spacing: -0.5px;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  max-width: 70%;
}

.laf-container .header-gradient p,
.laf-standalone-wrapper .header-gradient p {
  font-size: 1.2rem;
  margin-top: 15px;
  opacity: 0.9;
  font-weight: 300;
  position: relative;
  z-index: 10;
  max-width: 70%;
  line-height: 1.6;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Enhanced badge */
.laf-container .header-badge,
.laf-standalone-wrapper .header-badge {
  position: absolute;
  top: 25px;
  left: 25px;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 30px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  z-index: 10;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  animation: pulse 3s infinite;
}

/* ----------------------
 * Enhanced Progress Steps
 * --------------------- */
.laf-container .form-progress,
.laf-container .lf-form-progress,
.laf-standalone-wrapper .form-progress,
.laf-standalone-wrapper .lf-form-progress {
  display: flex;
  margin: -25px auto 60px;
  max-width: 90%;
  overflow: visible;
  counter-reset: step;
  position: relative;
  z-index: 10;
  background: white;
  padding: 25px 30px;
  border-radius: 16px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(226, 232, 240, 0.6);
}

.laf-container .form-progress-step,
.laf-container .lf-form-progress-step,
.laf-standalone-wrapper .form-progress-step,
.laf-standalone-wrapper .lf-form-progress-step {
  position: relative;
  flex: 1;
  text-align: center;
  padding: 0 10px;
}

.laf-container .form-progress-step:before,
.laf-container .lf-form-progress-step:before,
.laf-standalone-wrapper .form-progress-step:before,
.laf-standalone-wrapper .lf-form-progress-step:before {
  content: counter(step);
  counter-increment: step;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  background: var(--laf-gray-200);
  border-radius: 50%;
  margin: 0 auto 12px auto;
  color: var(--laf-gray-700);
  font-weight: 700;
  box-shadow: 0 4px 15px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  font-size: 1.25rem;
  border: 4px solid #fff;
  position: relative;
  z-index: 2;
}

.laf-container .form-progress-step.active:before,
.laf-container .lf-form-progress-step.active:before,
.laf-standalone-wrapper .form-progress-step.active:before,
.laf-standalone-wrapper .lf-form-progress-step.active:before {
  background: linear-gradient(135deg, #3a7bd5, #24243e);
  color: white;
  box-shadow: 0 8px 20px rgba(58, 123, 213, 0.35);
  transform: scale(1.2);
  animation: pulse-circle 3s infinite;
}

@keyframes pulse-circle {
  0% { box-shadow: 0 0 0 0 rgba(58, 123, 213, 0.4); }
  50% { box-shadow: 0 0 0 12px rgba(58, 123, 213, 0); }
  100% { box-shadow: 0 0 0 0 rgba(58, 123, 213, 0); }
}

.laf-container .form-progress-step.completed:before,
.laf-container .lf-form-progress-step.completed:before,
.laf-standalone-wrapper .form-progress-step.completed:before,
.laf-standalone-wrapper .lf-form-progress-step.completed:before {
  background: linear-gradient(135deg, var(--laf-success), #00866a);
  color: white;
  content: '✓';
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(0, 166, 126, 0.25);
}

.laf-container .form-progress-step:after,
.laf-container .lf-form-progress-step:after,
.laf-standalone-wrapper .form-progress-step:after,
.laf-standalone-wrapper .lf-form-progress-step:after {
  content: '';
  position: absolute;
  top: 28px;
  width: 100%;
  height: 4px;
  background: var(--laf-gray-200);
  left: -50%;
  z-index: 1;
  border-radius: 4px;
}

.laf-container .form-progress-step:first-child:after,
.laf-container .lf-form-progress-step:first-child:after,
.laf-standalone-wrapper .form-progress-step:first-child:after,
.laf-standalone-wrapper .lf-form-progress-step:first-child:after {
  display: none;
}

.laf-container .form-progress-step.completed:after,
.laf-container .lf-form-progress-step.completed:after,
.laf-standalone-wrapper .form-progress-step.completed:after,
.laf-standalone-wrapper .lf-form-progress-step.completed:after {
  background: linear-gradient(90deg, var(--laf-success), var(--laf-primary));
  box-shadow: 0 2px 8px rgba(58, 123, 213, 0.2);
}

.laf-container .form-progress-title,
.laf-container .lf-form-progress-title,
.laf-standalone-wrapper .form-progress-title,
.laf-standalone-wrapper .lf-form-progress-title {
  font-size: 1.15rem;
  color: var(--laf-gray-700);
  margin-top: 12px;
  font-weight: 600;
  transition: all 0.3s ease;
}

/* ----------------------
 * Card Components 
 * --------------------- */
.laf-container .card,
.laf-standalone-wrapper .card {
  border: none;
  border-radius: var(--laf-border-radius-lg);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  transition: var(--laf-transition);
  overflow: hidden;
  margin-bottom: 2.5rem;
  background-color: #fff;
}

.laf-container .card-body,
.laf-standalone-wrapper .card-body {
  padding: 35px;
  position: relative;
  z-index: 2;
  background-color: #fff;
}

/* ----------------------
 * Form Elements
 * --------------------- */
.laf-container input,
.laf-container select,
.laf-container textarea,
.laf-container button,
.laf-container optgroup,
.laf-standalone-wrapper
.laf-standalone-wrapper select,
.laf-standalone-wrapper textarea,
.laf-standalone-wrapper button,
.laf-standalone-wrapper optgroup {
  margin: 0;
  padding: 14px 20px;
  border: 2px solid var(--laf-gray-300);
  font-family: var(--laf-font-family);
  font-size: 16px;
  line-height: 1.5;
  color: var(--laf-gray-800);
  background-color: #fff;
  border-radius: var(--laf-border-radius-sm);
  transition: var(--laf-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
  outline: none;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
}



.laf-container .form-control, 
.laf-standalone-wrapper .form-control {
  display: block;
  width: 100%;
  height: auto;
  padding: 16px 20px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--laf-gray-800);
  background-color: #fff;
  background-clip: padding-box;
  border: 2px solid var(--laf-gray-300);
  border-radius: var(--laf-border-radius-sm);
  transition: var(--laf-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

.laf-container .form-select,
.laf-standalone-wrapper .form-select {
  display: block;
  width: 100%;
  padding: 16px 20px;
  font-size: 1rem;
  line-height: 1.5;
  color: var(--laf-gray-800);
  background-color: #fff;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%233a7bd5' stroke-linecap='round' stroke-linejoin='round' stroke-width='2.5' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 16px 12px;
  border: 2px solid var(--laf-gray-300);
  border-radius: var(--laf-border-radius-sm);
  appearance: none;
  transition: var(--laf-transition);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.03);
}

/* ----------------------
 * Buttons
 * --------------------- */
.laf-container .btn,
.laf-standalone-wrapper .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  vertical-align: middle;
  user-select: none;
  border: none;
  padding: 14px 30px;
  font-size: 0.95rem;
  line-height: 1.5;
  border-radius: 50px;
  transition: var(--laf-transition);
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  min-width: 200px;
  font-family: var(--laf-font-family);
}

.laf-container .btn-primary,
.laf-standalone-wrapper .btn-primary {
  background: var(--laf-gradient-primary);
  color: white;
  box-shadow: 0 6px 15px rgba(58, 123, 213, 0.25);
}

.laf-container .btn-primary:hover,
.laf-container .btn-primary:focus,
.laf-standalone-wrapper .btn-primary:hover,
.laf-standalone-wrapper .btn-primary:focus {
  background: linear-gradient(135deg, #3055a3, #3a7bd5);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(58, 123, 213, 0.35);
  color: white;
}

.laf-container .btn-outline-primary,
.laf-standalone-wrapper .btn-outline-primary {
  color: var(--laf-primary-dark);
  border: 2px solid var(--laf-primary);
  background: transparent;
  box-shadow: 0 4px 10px rgba(58, 123, 213, 0.1);
}

.laf-container .loan-submit-button,
.laf-container .btn-success,
.laf-standalone-wrapper .loan-submit-button,
.laf-standalone-wrapper .btn-success {
  background: var(--laf-gradient-success);
  color: white;
  min-width: 240px;
  font-weight: 700;
  box-shadow: 0 6px 15px rgba(0, 166, 126, 0.25);
}

/* ----------------------
 * Form Labels & Controls
 * --------------------- */
.laf-container .form-label,
.laf-standalone-wrapper .form-label {
  display: block;
  margin-bottom: 0.75rem;
  font-weight: 600;
  color: var(--laf-gray-700);
  font-size: 0.95rem;
}

.laf-container .form-row,
.laf-standalone-wrapper .form-row {
  margin-bottom: 2rem;
}

/* ----------------------
 * Responsive Adjustments
 * --------------------- */
@media (max-width: 768px) {
  .laf-container,
  .laf-standalone-wrapper {
    margin: 20px auto;
    padding: 0 15px;
  }
  
  .laf-container .header-gradient h3,
  .laf-standalone-wrapper .header-gradient h3 {
    font-size: 2rem;
    max-width: 100%;
  }
  
  .laf-container .header-icon,
  .laf-standalone-wrapper .header-icon {
    top: 20px;
    right: 20px;
    transform: none;
    font-size: 3rem;
  }
  
  .laf-container .card-body,
  .laf-standalone-wrapper .card-body {
    padding: 20px 15px;
  }
  
  .laf-container .form-progress-step:before,
  .laf-container .lf-form-progress-step:before,
  .laf-standalone-wrapper .form-progress-step:before,
  .laf-standalone-wrapper .lf-form-progress-step:before {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .laf-container .form-progress-title,
  .laf-container .lf-form-progress-title,
  .laf-standalone-wrapper .form-progress-title,
  .laf-standalone-wrapper .lf-form-progress-title {
    font-size: 0.8rem;
  }
}
/* Modern Radio Button Styles */
.form-check-input[type="radio"] {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 0.2em;
  margin-right: 0.5rem;
  vertical-align: top;
  background-color: #fff;
  border: 2px solid var(--laf-gray-300);
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  position: relative;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}

.form-check-input[type="radio"]:checked {
  background-color: #fff;
  border-color: var(--laf-primary);
}

.form-check-input[type="radio"]:checked::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 0.75rem;
  height: 0.75rem;
  background: var(--laf-primary);
  border-radius: 50%;
  animation: radioScale 0.2s ease-in-out;
}

@keyframes radioScale {
  0% {
    transform: translate(-50%, -50%) scale(0);
  }
  100% {
    transform: translate(-50%, -50%) scale(1);
  }
}



p.mt-2.mb-0 {
  color: white;
}

/* Validation styles for card selectors */
.revenue-selector.is-invalid {
  border: 2px solid #dc3545 !important;
  border-radius: 8px;
  padding: 10px;
  background-color: rgba(220, 53, 69, 0.05);
  animation: shake 0.5s ease-in-out;
}

.time-in-business-grid.is-invalid {
  border: 2px solid #dc3545 !important;
  border-radius: 8px;
  padding: 10px;
  background-color: rgba(220, 53, 69, 0.05);
  animation: shake 0.5s ease-in-out;
}

.revenue-selector.is-invalid::after {
  content: 'Please select your annual revenue range';
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 8px;
  font-weight: 500;
}

.time-in-business-grid.is-invalid::after {
  content: 'Please select how long your business has been operating';
  display: block;
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 8px;
  font-weight: 500;
}

@keyframes shake {
  0%, 100% {
    transform: translateX(0);
  }
  10%, 30%, 50%, 70%, 90% {
    transform: translateX(-2px);
  }
  20%, 40%, 60%, 80% {
    transform: translateX(2px);
  }
}

/* Light Placeholder Text Styling */
.form-control::placeholder,
.form-select::placeholder,
input::placeholder,
textarea::placeholder {
  color: #adb5bd !important;
  opacity: 0.7 !important;
  font-weight: 300 !important;
  font-style: italic;
}

/* ----------------------
 * Inline Validation Messages (Enhanced UX)
 * --------------------- */

/* Field-level feedback container */
.field-feedback {
  margin-top: 0.5rem;
  padding: 0.75rem 1rem;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  line-height: 1.4;
  opacity: 0;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  max-height: 0;
  overflow: hidden;
}

.field-feedback.show {
  opacity: 1;
  transform: translateY(0);
  max-height: 100px;
}

/* Success feedback */
.field-feedback.success {
  background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
  border: 1px solid #c3e6cb;
  color: #155724;
}

.field-feedback.success .feedback-icon {
  color: #28a745;
  font-size: 1.1rem;
}

/* Warning feedback */
.field-feedback.warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border: 1px solid #ffeaa7;
  color: #856404;
}

.field-feedback.warning .feedback-icon {
  color: #ffc107;
  font-size: 1.1rem;
}

/* Error feedback */
.field-feedback.error {
  background: linear-gradient(135deg, #f8d7da 0%, #f1c2c7 100%);
  border: 1px solid #f1c2c7;
  color: #721c24;
}

.field-feedback.error .feedback-icon {
  color: #dc3545;
  font-size: 1.1rem;
}

/* Feedback content */
.feedback-content {
  flex: 1;
}

.feedback-message {
  font-weight: 500;
  margin-bottom: 0.25rem;
}

.feedback-suggestion {
  font-size: 0.8rem;
  opacity: 0.8;
  font-style: italic;
}

/* Step validation summary */
.step-validation-summary {
  background: linear-gradient(135deg, #e9ecef 0%, #f8f9fa 100%);
  border: 1px solid #dee2e6;
  border-radius: 10px;
  padding: 1rem 1.25rem;
  margin: 1.5rem 0;
  display: flex;
  align-items: center;
  gap: 1rem;
  transition: all 0.3s ease;
  transform: translateY(-10px);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
}

.step-validation-summary.show {
  opacity: 1;
  transform: translateY(0);
  max-height: 200px;
}

.step-validation-summary.error {
  background: linear-gradient(135deg, #f8d7da 0%, #f1c2c7 100%);
  border-color: #f1c2c7;
  color: #721c24;
}

.step-validation-summary.warning {
  background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
  border-color: #ffeaa7;
  color: #856404;
}

.step-validation-summary .summary-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.step-validation-summary .summary-content {
  flex: 1;
}

.summary-title {
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.5rem;
}

.summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.summary-list li {
  padding: 0.25rem 0;
  position: relative;
  padding-left: 1.5rem;
}

.summary-list li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: currentColor;
  font-weight: bold;
}

/* Field state indicators */
.form-group {
  position: relative;
}

.field-state-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.1rem;
  opacity: 0;
  transition: all 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.field-state-icon.show {
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}

.field-state-icon.success {
  color: #28a745;
}

.field-state-icon.error {
  color: #dc3545;
}

.field-state-icon.warning {
  color: #ffc107;
}

/* Enhanced field states */
.form-control.field-success,
.form-select.field-success {
  border-color: #28a745;
  background-color: rgba(40, 167, 69, 0.05);
  box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.form-control.field-warning,
.form-select.field-warning {
  border-color: #ffc107;
  background-color: rgba(255, 193, 7, 0.05);
  box-shadow: 0 0 0 0.2rem rgba(255, 193, 7, 0.15);
}

.form-control.field-error,
.form-select.field-error,
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.05);
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15);
}

/* Progress completion indicator */
.step-progress-indicator {
  background: white;
  border: 2px solid #e9ecef;
  border-radius: 8px;
  padding: 0.75rem 1rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
}

.step-progress-indicator.improved {
  border-color: #28a745;
  background: linear-gradient(135deg, rgba(40, 167, 69, 0.05) 0%, rgba(40, 167, 69, 0.1) 100%);
}

.progress-text {
  font-weight: 500;
  color: #2c3e50;
}

.progress-bar-mini {
  width: 100px;
  height: 6px;
  background: #e9ecef;
  border-radius: 3px;
  overflow: hidden;
  margin-left: 1rem;
}

.progress-bar-mini .progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #28a745, #20c997);
  border-radius: 3px;
  transition: width 0.5s ease;
  width: 0%;
}

/* Mobile responsive validation messages */
@media (max-width: 768px) {
  .field-feedback {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    gap: 0.5rem;
  }
  
  .step-validation-summary {
    padding: 0.75rem 1rem;
    gap: 0.75rem;
  }
  
  .summary-title {
    font-size: 0.9rem;
  }
  
  .field-state-icon {
    right: 8px;
    font-size: 1rem;
  }
  
  .step-progress-indicator {
    padding: 0.5rem 0.75rem;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }
  
  .progress-bar-mini {
    width: 100%;
    margin-left: 0;
  }
}

.form-control::-webkit-input-placeholder,
.form-select::-webkit-input-placeholder,
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
  color: #adb5bd !important;
  opacity: 0.7 !important;
  font-weight: 300 !important;
  font-style: italic;
}

.form-control::-moz-placeholder,
.form-select::-moz-placeholder,
input::-moz-placeholder,
textarea::-moz-placeholder {
  color: #adb5bd !important;
  opacity: 0.7 !important;
  font-weight: 300 !important;
  font-style: italic;
}

.form-control:-ms-input-placeholder,
.form-select:-ms-input-placeholder,
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
  color: #adb5bd !important;
  opacity: 0.7 !important;
  font-weight: 300 !important;
  font-style: italic;
}



