@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");

/* ===== ELDERLY-FRIENDLY FONT SETTINGS ===== */
:root {
  --primary: #1b5e20;
  --secondary: #2e7d32;
  --dark: #1a3c34;
  --darker: #0a1f1b;
  --light: #f8fafc;
  --pending: #ef5350;
  --active: #1b5e20;
  --completed: #2e7d32;
  --textbased: #060606;
  --bg: #e2e8f0;
  --side: #1e293b;
  --bgside: #1a3c34;
  --green1: #1b5e20;
  --green2: #2e7d32;
  --yellow: #fbc02d;
  --rejected: #d32f2f;
  --approved: #1b5e20;
  --failed: #f4511e;
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  --border-radius: 4px;
  --transition: all 0.3s ease;

  /* Elderly-friendly base font sizes */
  --font-base: 18px;
  --font-large: 20px;
  --font-xlarge: 24px;
  --font-label: 16px;
  --font-help: 15px;
  --line-height-base: 1.8;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: url("../IMAGE/Login-Bg.png") no-repeat center center/cover;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px;

  /* Elderly-friendly base settings */
  font-size: var(--font-base);
  line-height: var(--line-height-base);
  color: #2c3e50;
}

.container_registration {
  max-width: 850px;
  width: 95%;
  margin: 20px auto;
  padding: 40px;
  background: var(--light);
  border-radius: 12px;
  box-shadow: var(--shadow);
  background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

h2 {
  text-align: center;
  font-size: 32px;
  margin-bottom: 25px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  font-weight: 700;
  color: var(--dark);
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1.4;
}

h3 {
  font-size: 26px;
  margin: 25px 0 18px;
  color: var(--dark);
  font-weight: 700;
  padding-left: 12px;
  border-left: 4px solid var(--primary);
  letter-spacing: 0.3px;
  line-height: 1.4;
}

h4 {
  font-size: 18px;
  margin: 10px 0 8px;
  color: var(--dark);
  font-weight: 600;
  line-height: 1.4;
}

.progress-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(27, 94, 32, 0.05),
    rgba(46, 125, 50, 0.05)
  );
  border-radius: 12px;
  border: 1px solid rgba(27, 94, 32, 0.1);
}

.progress-container .progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  min-width: 90px;
  flex-shrink: 0;
  text-align: center;
}

.progress-circle {
  width: 40px;
  height: 40px;
  background-color: var(--bg);
  color: var(--textbased);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 16px;
  line-height: 40px;
  transition: var(--transition);
  z-index: 2;
  border: 2px solid transparent; /* Temporary for debugging */
}

.progress-step.active .progress-circle {
  background-color: var(--active);
  color: var(--light);
}

.progress-step.completed .progress-circle {
  background-color: var(--completed);
  color: var(--light);
}

/* Step Description */
.step-description {
  background: linear-gradient(
    135deg,
    rgba(27, 94, 32, 0.08),
    rgba(46, 125, 50, 0.08)
  );
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 28px;
  font-size: var(--font-label);
  color: var(--dark);
  line-height: 1.6;
}

.step-description p {
  margin: 0;
  font-weight: 500;
}

.progress-label {
  font-size: 12px;
  margin-top: 8px;
  color: var(--textbased);
  max-width: 80px;
  word-wrap: break-word;
  text-align: center;
  line-height: 1.2;
}

.progress-container .progress-line {
  flex-grow: 1;
  height: 4px;
  min-width: 20px;
  max-width: 40px;
  background-color: var(--bg);
  margin: 0;
  z-index: 1;
}

.progress-container .progress-line.completed {
  background-color: var(--completed);
}

/* Form Elements */
form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

label {
  display: block;
  font-weight: 600;
  color: var(--darker);
  font-size: var(--font-label);
  margin-bottom: 8px;
  text-align: left;
  transition: color 0.2s ease;
  line-height: 1.6;
}

label.required::after,
label.spouse-required::after {
  content: " *";
  color: #dc3545;
  font-size: 18px;
  margin-left: 6px;
  font-weight: 700;
}

label.required {
  color: var(--dark);
  font-weight: 700;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  width: 100%;
  padding: 14px 16px;
  border: 2px solid #d0d0d0;
  border-radius: 8px;
  font-size: var(--font-base);
  background: #ffffff;
  color: var(--textbased);
  transition: all 0.3s ease;
  outline: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  font-family: "Poppins", sans-serif;
  line-height: 1.6;
  min-height: 48px;
  letter-spacing: 0.3px;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder,
input[type="number"]::placeholder,
input[type="date"]::placeholder,
textarea::placeholder {
  color: #999;
  font-size: var(--font-base);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(27, 94, 32, 0.1), 0 2px 8px rgba(0, 0, 0, 0.1);
  outline: none;
  background: #fafbfc;
}

/* Hover states for better UX */
input[type="text"]:hover:not(:focus),
input[type="email"]:hover:not(:focus),
input[type="password"]:hover:not(:focus),
input[type="number"]:hover:not(:focus),
input[type="date"]:hover:not(:focus),
select:hover:not(:focus),
textarea:hover:not(:focus) {
  border-color: #bdbdbd;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

input.error,
select.error,
input.is-invalid,
select.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.15),
    0 4px 8px rgba(220, 53, 69, 0.2);
  background: rgba(220, 53, 69, 0.05);
  animation: shake 0.5s ease-in-out;
}

/* Shake animation for invalid inputs */
@keyframes shake {
  0%,
  20%,
  40%,
  60%,
  80% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-3px);
  }
}

input.warning,
select.warning {
  border-color: var(--yellow);
  box-shadow: 0 0 6px rgba(251, 192, 45, 0.3);
}

input.success,
select.success {
  border-color: var(--active);
  box-shadow: 0 0 6px rgba(27, 94, 32, 0.3);
}

input[type="checkbox"] {
  cursor: pointer;
  accent-color: var(--active);
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

/* Form Grid */
.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 24px;
}

.form-grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-grid.address-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

/* Helper text styling */
.field-help-text {
  font-size: 12px;
  color: #6c757d;
  margin-top: 6px;
  font-weight: 400;
  line-height: 1.4;
}

.field-help-text.info {
  color: #0c5460;
  background: rgba(23, 162, 184, 0.1);
  padding: 8px 12px;
  border-radius: 6px;
  border-left: 3px solid #17a2b8;
}

.form-grid .full-width {
  grid-column: 1 / -1;
}

/* Financial Section */
.financial-section {
  background: var(--bg);
  padding: 15px;
  margin: 15px 0;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  box-shadow: var(--shadow);
}

.financial-table {
  display: grid;
  gap: 12px;
  padding: 10px;
  background: var(--light);
  border-radius: var(--border-radius);
}

.financial-table.income-table {
  border-left: 3px solid var(--green1);
}

.financial-table.expenditure-table {
  border-left: 3px solid var(--yellow);
}

.financial-row {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  align-items: center;
  gap: 12px;
  padding: 8px;
  border-bottom: 1px solid #eee;
  transition: var(--transition);
}

.financial-row:hover {
  background: rgba(0, 0, 0, 0.02);
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.checkbox-item label {
  font-size: 14px;
  color: var(--darker);
  cursor: pointer;
}

.financial-input {
  display: flex;
  align-items: center;
  background: var(--light);
  padding: 5px;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  transition: var(--transition);
}

.financial-input:not(.hidden) {
  border-color: var(--active);
  background: rgba(27, 94, 32, 0.05); /* Subtle green tint when active */
}

.financial-input.hidden {
  display: none;
}

.financial-input input {
  border: none;
  background: transparent;
}

.financial-input input:focus {
  border: none;
  box-shadow: none;
}

.total-section {
  background: var(--bg);
  padding: 12px;
  margin: 15px 0;
  border-radius: var(--border-radius);
  border: 1px solid #ddd;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
}

.financial-summary {
  margin-top: 20px;
}

/* Buttons */
.button-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 30px;
  padding-top: 20px;
  flex-wrap: wrap;
  border-top: 1px solid #e0e0e0;
}

.button-container > .btn {
  flex: 1;
  min-width: 140px;
}

/* Removed .step-indicator to eliminate duplicate */

.btn {
  flex: 1;
  min-width: 160px;
  padding: 16px 28px;
  border: none !important;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  letter-spacing: 0.5px;
  line-height: 1.6;
}

.btn-primary {
  background: linear-gradient(135deg, var(--green2), var(--primary));
  color: var(--light);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary), var(--green2));
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(27, 94, 32, 0.3);
}

.btn-primary:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(27, 94, 32, 0.2);
}

.btn-secondary {
  background: linear-gradient(135deg, var(--side), var(--dark));
  color: var(--light);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-secondary:hover {
  background: linear-gradient(135deg, var(--dark), var(--side));
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-secondary:active {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary {
  background: transparent;
  color: var(--dark);
  border: 2px solid var(--dark) !important;
  text-decoration: none;
}

.btn-outline-secondary:hover {
  background: var(--dark);
  color: var(--light);
  transform: translateY(-3px);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.btn-outline-secondary:active {
  transform: translateY(-1px);
}

.btn-success {
  background: linear-gradient(135deg, #4caf50, #45a049);
  color: var(--light);
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
  background: linear-gradient(135deg, #45a049, #3d8b40);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(76, 175, 80, 0.4);
}

.btn-success:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

/* Alerts */
.success-message,
.error-message.alert {
  padding: 18px 20px;
  margin: 18px 0;
  border-radius: 8px;
  font-size: 16px;
  text-align: left;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  animation: slideInDown 0.4s ease-out;
  line-height: 1.8;
  font-weight: 500;
}

.success-message {
  background: linear-gradient(135deg, #d4edda, #c3e6cb);
  color: #155724;
  border: 1px solid #b1dfbb;
  border-left: 4px solid #28a745;
}

.error-message.alert {
  background: linear-gradient(135deg, #f8d7da, #f5c6cb);
  color: #721c24;
  border: 1px solid #f1b0b7;
  border-left: 4px solid #dc3545;
}

@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.error-message:not(.alert) {
  color: #dc3545;
  font-size: 13px;
  margin-top: 6px;
  margin-left: 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: rgba(220, 53, 69, 0.08);
  border-left: 4px solid #dc3545;
  font-weight: 500;
  line-height: 1.4;
  display: block;
}

/* Error icon for better visual feedback */
.error-message:not(.alert):before {
  content: "⚠ ";
  margin-right: 4px;
  font-weight: 700;
}

/* Hide empty error messages */
.error-message:empty {
  display: none !important;
}

.error-message {
  color: var(--pending);
  font-size: 12px;
  margin-top: 6px;
  display: block;
  line-height: 1.4;
  min-height: 18px;
}

.success-message {
  color: var(--active);
}

/* Success validation message for field-level validations */
.validation-success {
  color: var(--active);
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  font-weight: 500;
}

.validation-success::before {
  content: "✓ ";
  margin-right: 4px;
  font-weight: bold;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container_registration {
    max-width: 100%;
    width: 100%;
    margin: 10px 0;
    padding: 15px;
  }

  .progress-container {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
  }

  .progress-container .progress-step {
    min-width: 70px;
    width: 70px;
  }

  .progress-circle {
    width: 36px;
    height: 36px;
    font-size: 14px;
    line-height: 36px;
  }

  .progress-label {
    font-size: 10px;
    max-width: 60px;
    margin-top: 6px;
  }

  .progress-container .progress-line {
    height: 3px;
    min-width: 15px;
    max-width: 30px;
    flex-grow: 0;
  }

  .form-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .form-grid.address-grid {
    grid-template-columns: 1fr;
  }

  .financial-row {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .financial-table {
    gap: 10px;
    padding: 8px;
  }

  .financial-section {
    padding: 10px;
    margin: 10px 0;
  }

  .total-section {
    flex-direction: column;
    gap: 8px;
    padding: 10px;
  }

  .button-container {
    flex-direction: column;
    gap: 8px;
  }

  .btn {
    width: 100%;
    padding: 12px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select {
    font-size: 16px;
    padding: 10px;
  }

  .checkbox-item {
    flex-direction: row;
    align-items: center;
    gap: 6px;
  }

  .checkbox-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }
}

@media (max-width: 480px) {
  .container_registration {
    padding: 10px;
  }

  .progress-container {
    gap: 6px;
  }

  .progress-container .progress-step {
    min-width: 60px;
    width: 60px;
  }

  .progress-circle {
    width: 32px;
    height: 32px;
    font-size: 12px;
    line-height: 32px;
  }

  .progress-label {
    font-size: 9px;
    max-width: 50px;
    margin-top: 5px;
  }

  .progress-container .progress-line {
    height: 3px;
    min-width: 10px;
    max-width: 20px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
  }

  h4 {
    font-size: 14px;
  }

  .financial-section {
    padding: 8px;
  }

  .financial-table {
    gap: 8px;
  }

  .financial-row {
    padding: 6px;
  }

  .checkbox-item label {
    font-size: 13px;
  }
}

/* ===== EMAIL REAL-TIME VALIDATION STYLES ===== */

.email-feedback {
  display: none;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: var(--border-radius);
  font-size: 12px;
  line-height: 1.5;
  animation: slideDown 0.3s ease-out;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  border: 1px solid transparent;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.email-feedback.text-success {
  background-color: rgba(46, 125, 50, 0.1);
  border: 1px solid var(--active);
  color: var(--active);
}

.email-feedback.text-danger {
  background-color: rgba(239, 83, 80, 0.1);
  border: 1px solid var(--pending);
  color: var(--pending);
}

.email-feedback.text-info {
  background-color: rgba(33, 150, 243, 0.1);
  border: 1px solid #2196f3;
  color: #1976d2;
}

.email-feedback .material-icons {
  flex-shrink: 0;
  font-size: 18px;
  line-height: 1;
}

.email-feedback .spinner-border-sm {
  animation: spin 1s linear infinite;
}

/* Input validation states */
input[type="email"].is-valid {
  border-color: #28a745;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  padding-right: calc(1.5em + 0.75rem);
}

input[type="email"].is-invalid {
  border-color: #dc3545;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23dc3545' viewBox='0 0 12 12'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath stroke-linejoin='round' d='M5.8 3.6h.4L6 6.5z'/%3e%3ccircle cx='6' cy='8.2' r='.6' fill='%23dc3545' stroke='none'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  padding-right: calc(1.5em + 0.75rem);
}

input[type="email"].is-validating {
  border-color: #0066cc;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3e%3cstyle%3e.spinner %7B animation: spin 1s linear infinite; transform-origin: center; %7D @keyframes spin %7B from %7B transform: rotate(0deg); %7D to %7B transform: rotate(360deg); %7D %7D%3c/style%3e%3ccircle class='spinner' cx='12' cy='12' r='10' fill='none' stroke='%230066cc' stroke-width='2'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right calc(0.375em + 0.1875rem) center;
  background-size: calc(0.75em + 0.375rem) calc(0.75em + 0.375rem);
  padding-right: calc(1.5em + 0.75rem);
}

/* Spinner animation for loading state */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
  border-width: 0.25em;
}

.spinner-border {
  display: inline-block;
  vertical-align: text-bottom;
}

/* Enhanced Real-Time Validation Styles */

/* Character counter for text fields */
/* Character counter - CONSOLIDATED - now defined at line 1302 with complete styling */
/* .char-counter removed (duplicate at line 807 - consolidated with complete definition) */

/* Input field with error state styling */
input.error,
textarea.error,
select.error {
  border-color: #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.03) !important;
}

input.error:focus,
textarea.error:focus,
select.error:focus {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Success state for valid fields */
input.valid,
textarea.valid,
select.valid {
  border-color: var(--active) !important;
  background-color: rgba(27, 94, 32, 0.03) !important;
}

input.valid:focus,
textarea.valid:focus,
select.valid:focus {
  border-color: var(--active) !important;
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.15) !important;
}

/* Validation message styling improvements */
.error-message.field-error {
  color: #dc3545;
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  animation: slideInError 0.3s ease-out;
}

.error-message.field-error::before {
  content: "⚠ ";
  margin-right: 4px;
  font-weight: bold;
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Required field indicator */
.required::after {
  content: " *";
  color: #dc3545;
  font-weight: bold;
}

/* Form section with validation summary */
.validation-summary {
  background-color: #f8f9fa;
  border-left: 4px solid #0066cc;
  padding: 12px 16px;
  border-radius: 4px;
  margin-bottom: 20px;
  font-size: 12px;
  color: #333;
}

.validation-summary.error {
  background-color: rgba(220, 53, 69, 0.1);
  border-color: #dc3545;
}

.validation-summary.success {
  background-color: rgba(27, 94, 32, 0.1);
  border-color: var(--active);
}

/* Field group with better spacing */
.form-group-validation {
  margin-bottom: 1.5rem;
}

.form-group-validation label {
  font-weight: 500;
  margin-bottom: 0.5rem;
  display: block;
}

/* Tooltip for field help text */
.field-help-text {
  font-size: 11px;
  color: #999;
  margin-top: 2px;
  display: block;
}

/* Real-time validation indicator dot */
.validation-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 4px;
  vertical-align: middle;
  animation: pulse 1s infinite;
}

.validation-indicator.valid {
  background-color: var(--active);
  animation: none;
}

.validation-indicator.invalid {
  background-color: #dc3545;
  animation: none;
}

.validation-indicator.validating {
  background-color: #ffa500;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* =====================================================
   ENHANCED REAL-TIME VALIDATION STYLES
   ===================================================== */

/* Field validation states */
input.is-valid,
select.is-valid,
textarea.is-valid {
  border: 2px solid #1b5e20 !important;
  background-color: rgba(27, 94, 32, 0.02) !important;
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.15) !important;
}

input.is-invalid,
select.is-invalid,
textarea.is-invalid {
  border: 2px solid #dc3545 !important;
  background-color: rgba(220, 53, 69, 0.02) !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.15) !important;
}

/* Field feedback messages */
.field-feedback {
  margin-top: 4px;
  font-size: 0.875rem;
  line-height: 1.5;
  min-height: 20px;
  transition: all 0.3s ease;
}

.field-feedback.error-message {
  color: #dc3545;
  font-weight: 500;
  display: flex;
  align-items: center;
  animation: slideInError 0.3s ease-out;
}

@keyframes slideInError {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Success feedback */
.field-feedback.success-message {
  color: #1b5e20;
  font-weight: 500;
  display: flex;
  align-items: center;
  animation: slideInSuccess 0.3s ease-out;
}

@keyframes slideInSuccess {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form group styling */
.form-group {
  position: relative;
  margin-bottom: 1.5rem;
  transition: all 0.3s ease;
}

/* Enhanced validation feedback styling - CONSOLIDATED with line 518 */
/* .validation-success removed (duplicate - consolidated with main definition at line 518)
   Original duplicated styling for badge/icon - now using flexbox approach from line 518 */

@keyframes popIn {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  70% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Enhanced error message with suggestions */
.error-message strong {
  color: #dc3545;
  display: block;
  margin-bottom: 4px;
  font-weight: 600;
}

.error-message small {
  color: #6c757d;
  display: block;
  line-height: 1.4;
  margin-top: 4px;
  font-size: 0.8rem;
}

/* Field input state transitions */
input:focus.is-valid,
select:focus.is-valid,
textarea:focus.is-valid {
  border-color: #1b5e20 !important;
  box-shadow: 0 0 0 0.3rem rgba(27, 94, 32, 0.25) !important;
}

input:focus.is-invalid,
select:focus.is-invalid,
textarea:focus.is-invalid {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.3rem rgba(220, 53, 69, 0.25) !important;
}

/* Validation tooltip styling */
.validation-tooltip {
  position: absolute;
  top: 100%;
  left: 0;
  background: #f8d7da;
  color: #721c24;
  padding: 8px 12px;
  border-radius: 4px;
  border-left: 4px solid #dc3545;
  font-size: 0.875rem;
  margin-top: 4px;
  z-index: 1000;
  max-width: 300px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: tooltipSlideIn 0.3s ease-out;
}

@keyframes tooltipSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Progress time estimate styling */
.progress-time-estimate {
  margin-top: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-radius: 8px;
  border-left: 4px solid #1b5e20;
  animation: slideInUp 0.4s ease-out;
}

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.time-estimate-info {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}

.estimate-label {
  font-size: 0.85rem;
  color: #6c757d;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.estimate-time {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 1.5rem;
  font-weight: 700;
  color: #1b5e20;
}

.estimate-time i {
  font-size: 1.2rem;
  animation: clockTick 2s infinite;
}

@keyframes clockTick {
  0%,
  100% {
    transform: rotate(0deg);
  }
  25% {
    transform: rotate(-5deg);
  }
  75% {
    transform: rotate(5deg);
  }
}

.progress-bar-container {
  flex: 1;
  min-width: 150px;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #1b5e20 0%, #2e7d32 100%);
  transition: width 0.5s ease;
  border-radius: 4px;
}

/* Mobile optimization for time estimate */
@media (max-width: 768px) {
  .progress-time-estimate {
    margin-top: 15px;
    padding: 12px;
  }

  .time-estimate-info {
    flex-direction: column;
    gap: 12px;
  }

  .progress-bar-container {
    width: 100%;
  }

  .estimate-time {
    font-size: 1.2rem;
  }
}

.form-group.has-error {
  animation: shake 0.3s ease-in-out;
}

.form-group.has-success {
  opacity: 1;
}

/* Validation status bar */
.validation-status-bar {
  margin-bottom: 1.5rem;
  padding: 12px 16px;
  background: #f8f9fa;
  border-radius: 4px;
  border-left: 4px solid #ffc107;
  transition: all 0.3s ease;
}

.validation-status-bar.success {
  border-left-color: #1b5e20;
  background-color: rgba(27, 94, 32, 0.05);
}

.validation-progress {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.875rem;
  color: #495057;
}

.validation-progress.complete {
  color: #1b5e20;
  font-weight: 600;
}

.progress {
  flex-grow: 1;
  height: 4px;
  background-color: #e9ecef;
  border-radius: 2px;
  margin: 0 10px;
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, #1b5e20 0%, #2e7d32 100%);
  height: 100%;
  transition: width 0.3s ease;
  border-radius: 2px;
}

/* Input focus styles */
input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: #1b5e20 !important;
  box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.1) !important;
}

/* Disabled field styles */
input:disabled,
select:disabled,
textarea:disabled {
  background-color: #f8f9fa;
  color: #6c757d;
  cursor: not-allowed;
  opacity: 0.65;
}

/* Character counter */
.char-counter {
  font-size: 0.75rem;
  color: #6c757d;
  margin-top: 2px;
  text-align: right;
}

.char-counter.warning {
  color: #ffc107;
  font-weight: 600;
}

.char-counter.error {
  color: #dc3545;
  font-weight: 600;
}

/* Validation tooltip */
.validation-tooltip {
  display: inline-block;
  max-width: 100%;
  padding: 0.25rem 0.5rem;
  margin-top: 0.1rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: #fff;
  background-color: rgba(220, 53, 69, 0.9);
  border-radius: 0.25rem;
  opacity: 1;
}

/* Icon indicators next to fields */
.field-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.field-icon.valid {
  color: #1b5e20;
}

.field-icon.invalid {
  color: #dc3545;
}

/* Responsive validation styles */
@media (max-width: 768px) {
  .field-feedback {
    font-size: 0.8125rem;
  }

  .validation-status-bar {
    font-size: 0.8125rem;
  }

  .progress {
    margin: 0 5px;
  }
}

/* Animation for real-time validation */
@keyframes validatePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(27, 94, 32, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(27, 94, 32, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(27, 94, 32, 0);
  }
}

input.validating,
select.validating,
textarea.validating {
  animation: validatePulse 0.5s ease-in-out;
}

/* Loading Indicator Styles - Enhanced & Unified */
.loading-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in;
}

.loading-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.4) 0%,
    rgba(0, 0, 0, 0.6) 100%
  );
  backdrop-filter: blur(4px);
  animation: overlayFadeIn 0.3s ease-in;
}

.loading-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  z-index: 10000;
  background: white;
  padding: 40px;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  min-width: 300px;
}

/* Modern Unified Spinner */
.spinner {
  width: 60px;
  height: 60px;
  margin: 0 auto 25px;
  position: relative;
  display: inline-block;
}

.spinner::before {
  content: "";
  width: 100%;
  height: 100%;
  border: 3px solid rgba(46, 125, 50, 0.15);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: none;
}

.spinner::after {
  content: "";
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid var(--secondary);
  border-right: 3px solid var(--primary);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: spinnerRotate 1s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

@keyframes spinnerRotate {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes overlayFadeIn {
  from {
    opacity: 0;
    backdrop-filter: blur(0px);
  }
  to {
    opacity: 1;
    backdrop-filter: blur(4px);
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translate(-50%, -40%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

.loading-content p {
  color: var(--dark);
  font-size: 18px;
  font-weight: 500;
  margin: 0 0 15px 0;
  letter-spacing: 0.5px;
}

.loading-content .loading-subtitle {
  color: #999;
  font-size: 14px;
  margin-top: 10px;
  font-weight: 400;
}

/* Loading Progress Bar */
.loading-progress {
  width: 100%;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-top: 20px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--secondary) 0%,
    var(--primary) 50%,
    var(--secondary) 100%
  );
  background-size: 200% 100%;
  border-radius: 2px;
  animation: loadingProgress 3s ease-in-out infinite;
}

@keyframes loadingProgress {
  0% {
    width: 0%;
    background-position: 0% 0%;
  }
  50% {
    width: 85%;
    background-position: 100% 0%;
  }
  100% {
    width: 100%;
    background-position: 200% 0%;
  }
}

/* Button Loading State - Modern Enhanced */
.btn-loading {
  position: relative;
  color: transparent !important;
  pointer-events: none;
  opacity: 0.85;
}

.btn-loading::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-right-color: currentColor;
  border-radius: 50%;
  animation: buttonSpinnerRotate 0.8s cubic-bezier(0.68, -0.55, 0.265, 1.55)
    infinite;
}

@keyframes buttonSpinnerRotate {
  0% {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Enhanced Page Loading - LoadingManager */
.enhanced-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.98) 0%,
    rgba(246, 247, 248, 0.98) 100%
  );
  z-index: 9999;
  backdrop-filter: blur(8px);
  animation: fadeIn 0.3s ease-in;
  opacity: 1;
  transition: opacity 0.3s ease-out;
}

.enhanced-loading .spinner-container {
  position: relative;
  width: 80px;
  height: 80px;
  margin-bottom: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Unified modern loader animation */
.enhanced-loading .spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid rgba(46, 125, 50, 0.15);
  border-radius: 50%;
}

.enhanced-loading .spinner-ring:nth-child(1) {
  border-top: 3px solid var(--secondary);
  border-right: 3px solid var(--primary);
  animation: spin 1.5s linear infinite;
}

.enhanced-loading .spinner-ring:nth-child(2) {
  width: 65%;
  height: 65%;
  top: 17.5%;
  left: 17.5%;
  border-top: 3px solid var(--primary);
  border-right: 3px solid #4caf50;
  animation: spin 2s linear infinite reverse;
  animation-delay: -0.5s;
}

.enhanced-loading .spinner-ring:nth-child(3) {
  width: 45%;
  height: 45%;
  top: 27.5%;
  left: 27.5%;
  border-top: 3px solid #4caf50;
  border-right: 3px solid var(--secondary);
  animation: spin 2.5s linear infinite;
  animation-delay: -1s;
}

.enhanced-loading .loading-text {
  font-size: 22px;
  color: var(--dark);
  text-align: center;
  font-weight: 600;
  margin-bottom: 15px;
  letter-spacing: 0.3px;
  animation: textFadeIn 0.5s ease-in 0.2s both;
}

.enhanced-loading .loading-progress {
  width: 250px;
  height: 6px;
  background: rgba(46, 125, 50, 0.1);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
  animation: textFadeIn 0.5s ease-in 0.3s both;
}

.enhanced-loading .loading-progress-bar {
  height: 100%;
  background: linear-gradient(
    90deg,
    var(--secondary),
    var(--primary),
    var(--secondary)
  );
  background-size: 200% 100%;
  border-radius: 3px;
  animation: loadingProgress 2.5s ease-in-out infinite;
  box-shadow: 0 0 10px rgba(46, 125, 50, 0.3);
}

@keyframes textFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile responsive loading screen */
@media (max-width: 768px) {
  .loading-content {
    width: 85%;
    max-width: 280px;
    padding: 30px 20px;
  }

  .spinner {
    width: 60px;
    height: 60px;
    margin: 0 auto 20px;
  }

  .spinner::before {
    width: 60px;
    height: 60px;
  }

  .spinner::after {
    width: 45px;
    height: 45px;
  }

  .loading-content p {
    font-size: 16px;
  }

  .enhanced-loading .spinner-container {
    width: 80px;
    height: 80px;
    margin-bottom: 25px;
  }

  .enhanced-loading .loading-text {
    font-size: 18px;
  }

  .enhanced-loading .loading-progress {
    width: 200px;
  }
}

/* ===== ENHANCED FORM IMPROVEMENTS ===== */

/* Form grid improvements */
/* Form grid consolidated - using main definition from line 286 */
/* .form-grid removed (duplicate at line 1729 - consolidated with main enhanced definition) */

/* Success state styling */
input.is-valid,
select.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.15);
  background: rgba(40, 167, 69, 0.05);
}

/* Button styles consolidated in primary .btn definition */

/* Button container styles consolidated in primary .button-container definition */

/* Validation success message styles consolidated in primary .validation-success definition */

/* Field help text styling */
.field-help-text {
  font-size: 12px;
  color: #6c757d;
  margin-top: 4px;
  font-style: italic;
  line-height: 1.4;
}

/* Progress container improvements */
.progress-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  gap: 15px;
  width: 100%;
  padding: 20px;
  background: rgba(27, 94, 32, 0.05);
  border-radius: 12px;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100px;
  min-width: 100px;
  flex-shrink: 0;
  text-align: center;
}

.progress-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #e0e0e0;
  color: #666;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 16px;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.progress-step.active .progress-circle {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 8px rgba(27, 94, 32, 0.3);
  transform: scale(1.1);
}

.progress-label {
  font-size: 12px;
  color: #666;
  font-weight: 500;
  line-height: 1.3;
  max-width: 80px;
}

.progress-step.active .progress-label {
  color: var(--primary);
  font-weight: 600;
}

/* Password Strength Meter Styles */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.password-input-wrapper input {
  width: 100%;
}

.toggle-password-btn {
  position: absolute;
  right: 12px;
  background: none;
  border: none;
  color: #999;
  cursor: pointer;
  font-size: 18px;
  padding: 0;
  transition: color 0.3s ease;
}

.toggle-password-btn:hover {
  color: #1b5e20;
}

.password-strength {
  margin-top: 8px;
}

.strength-bar {
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 4px;
}

.strength-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
}

.strength-weak {
  background: #dc3545;
}

.strength-medium {
  background: #ffc107;
}

.strength-strong {
  background: #28a745;
}

.strength-text {
  font-size: 12px;
  color: #666;
}

.requirement-checklist {
  background: #f9f9f9;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 15px;
  margin: 20px 0;
}

.requirement {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
  color: #999;
  font-size: 12px;
}

.requirement:last-child {
  margin-bottom: 0;
}

.requirement-icon {
  width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 8px;
  color: #999;
}

.requirement.met {
  color: #28a745;
}

.requirement.met .requirement-icon {
  color: #28a745;
}

/* ===== ENHANCED MOBILE RESPONSIVENESS ===== */

/* Extra small devices: phones (320px to 360px) */
@media (max-width: 360px) {
  body {
    padding: 5px;
  }

  .container_registration {
    width: 100%;
    margin: 5px auto;
    padding: 8px;
    border-radius: 4px;
  }

  h2 {
    font-size: 18px;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
  }

  h3 {
    font-size: 16px;
    margin: 12px 0 8px;
  }

  h4 {
    font-size: 13px;
    margin: 8px 0 6px;
  }

  .progress-container {
    gap: 4px;
    margin-bottom: 12px;
  }

  .progress-container .progress-step {
    min-width: 50px;
    width: 50px;
  }

  .progress-circle {
    width: 28px;
    height: 28px;
    font-size: 10px;
    line-height: 28px;
  }

  .progress-label {
    font-size: 8px;
    max-width: 45px;
    margin-top: 4px;
  }

  .progress-container .progress-line {
    height: 2px;
    min-width: 8px;
    max-width: 15px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 14px !important;
    padding: 8px !important;
    margin-bottom: 8px;
    min-height: 36px;
  }

  .form-grid {
    gap: 6px;
  }

  .form-grid > div {
    margin-bottom: 4px;
  }

  .btn {
    padding: 10px 8px;
    font-size: 12px;
    min-height: 40px;
    border-radius: 4px;
  }

  .checkbox-item {
    gap: 4px;
    margin-bottom: 6px;
  }

  .checkbox-item label {
    font-size: 12px;
    margin-bottom: 0;
  }

  .button-container {
    gap: 6px;
    margin-top: 12px;
  }

  .modal-body {
    padding: 15px;
  }

  .modal-body p {
    margin-bottom: 10px;
    font-size: 14px;
  }

  .modal-body ul,
  .modal-body ol {
    font-size: 13px;
  }

  .success-message,
  .error-message {
    padding: 8px;
    font-size: 12px;
    margin-bottom: 10px;
  }

  .field-help-text {
    font-size: 11px;
    margin-top: 3px;
  }

  label {
    font-size: 13px;
  }

  label.required::after {
    margin-left: 2px;
  }
}

/* Small devices: phones (361px to 480px) */
@media (min-width: 361px) and (max-width: 480px) {
  body {
    padding: 8px;
  }

  .container_registration {
    width: 100%;
    padding: 10px;
    margin: 8px auto;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
    margin: 12px 0 8px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px !important;
    padding: 10px !important;
    min-height: 44px;
  }

  .form-grid {
    gap: 8px;
  }

  .checkbox-item label {
    font-size: 14px;
  }

  .modal-body {
    padding: 20px;
  }

  label {
    font-size: 14px;
  }
}

/* Tablets and small laptops (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .container_registration {
    max-width: 100%;
    padding: 15px;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .form-grid.address-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h2 {
    font-size: 24px;
  }

  h3 {
    font-size: 20px;
  }

  .progress-container {
    gap: 10px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 14px;
    padding: 10px;
    min-height: 40px;
  }

  .button-container {
    flex-wrap: wrap;
    gap: 10px;
  }

  .btn {
    flex: 1;
    min-width: 120px;
  }
}

/* Medium devices (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .container_registration {
    max-width: 95%;
    padding: 25px;
  }

  .form-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }

  .form-grid.address-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .progress-container {
    gap: 15px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 15px;
    padding: 12px;
  }

  .button-container {
    flex-direction: row;
    gap: 12px;
  }

  .btn {
    padding: 12px 24px;
    font-size: 15px;
  }
}

/* Large desktops (1025px and up) */
@media (min-width: 1025px) {
  .container_registration {
    max-width: 1200px;
    padding: 30px;
  }

  .form-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
  }

  .form-grid.address-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 22px;
  }

  .progress-container {
    gap: 20px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 16px;
    padding: 12px;
  }

  .button-container {
    flex-direction: row;
    gap: 15px;
    justify-content: flex-end;
  }

  .btn {
    padding: 12px 32px;
    font-size: 16px;
    min-width: 120px;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea,
  .btn {
    min-height: 44px;
    min-width: 44px;
  }

  .checkbox-item input[type="checkbox"] {
    min-width: 24px;
    min-height: 24px;
  }

  .checkbox-item input[type="radio"] {
    min-width: 24px;
    min-height: 24px;
  }

  .btn {
    padding: 14px 16px;
    font-size: 16px;
  }

  /* Smooth scrolling for touch devices */
  body {
    -webkit-overflow-scrolling: touch;
  }

  /* Visual feedback on tap */
  * {
    -webkit-tap-highlight-color: rgba(45, 125, 50, 0.2);
  }
}

/* Landscape orientation adjustments */
@media (max-height: 500px) and (orientation: landscape) {
  .container_registration {
    padding: 12px;
    margin: 5px auto;
  }

  h2 {
    margin-bottom: 8px;
    font-size: 20px;
  }

  h3 {
    margin: 8px 0 6px;
    font-size: 16px;
  }

  .progress-container {
    margin-bottom: 10px;
  }

  .form-grid {
    gap: 8px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    padding: 8px;
    min-height: 36px;
  }

  .button-container {
    gap: 8px;
    margin-top: 10px;
  }

  .btn {
    padding: 10px 12px;
    font-size: 14px;
  }
}

/* High DPI displays (retina screens) */
@media (min-resolution: 192dpi) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    -webkit-appearance: none;
    appearance: none;
  }

  .btn {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  }
}

/* Focus and accessibility improvements */
input:focus,
textarea:focus,
select:focus,
.btn:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(45, 125, 50, 0.2);
}

/* Print styles */
@media print {
  body {
    background: white;
    padding: 0;
  }

  .container_registration {
    max-width: 100%;
    box-shadow: none;
    padding: 0;
  }

  .button-container,
  .progress-container {
    display: none;
  }

  input,
  select,
  textarea {
    border: 1px solid #ccc;
  }
}

/* Enhanced Mobile Optimization */
@media (max-width: 768px) {
  /* Touch-friendly input sizes */
  input[type="text"],
  input[type="email"],
  input[type="tel"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    min-height: 48px; /* WCAG touch target minimum */
    font-size: 16px; /* Prevents iOS auto-zoom */
    padding: 12px !important;
    border-radius: 6px;
    line-height: 1.5;
  }

  /* Better spacing for labels */
  label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 14px;
  }

  /* Improved form group spacing */
  .form-group {
    margin-bottom: 1.8rem;
  }

  /* Touch-friendly buttons */
  button,
  input[type="submit"],
  input[type="button"],
  .btn {
    min-height: 48px !important;
    min-width: 48px !important;
    padding: 14px 20px !important;
    font-size: 16px;
    border-radius: 6px;
    touch-action: manipulation;
    -webkit-appearance: none;
    appearance: none;
  }

  /* Improve select dropdown appearance */
  select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 20px;
    padding-right: 36px;
  }

  /* Optimize validation messages */
  .error-message,
  .field-feedback,
  .validation-tooltip {
    padding: 10px !important;
    margin-top: 8px !important;
    font-size: 14px;
    min-height: 20px;
  }

  /* Better error message styling */
  .error-message strong {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
  }

  .error-message small {
    display: block;
    font-size: 12px;
    line-height: 1.6;
    margin-top: 6px;
  }

  /* Improve progress container for mobile */
  .progress-container {
    margin-bottom: 25px;
    gap: 10px;
    flex-wrap: wrap;
  }

  .progress-step {
    min-width: 70px;
    flex: 1;
  }

  .progress-circle {
    width: 40px;
    height: 40px;
    font-size: 14px;
  }

  /* Improve form container padding */
  .container_registration {
    padding: 15px;
    margin: 10px auto;
    width: calc(100% - 20px);
  }

  /* Better focus states for keyboard navigation */
  input:focus,
  select:focus,
  textarea:focus,
  button:focus {
    outline: 3px solid #4caf50;
    outline-offset: 2px;
  }

  /* Improve checkbox and radio spacing */
  .checkbox-item,
  .radio-item {
    padding: 12px;
    min-height: 48px;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .checkbox-item input[type="checkbox"],
  .radio-item input[type="radio"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    min-height: unset;
  }

  /* Optimize validation success icon */
  .validation-success {
    width: 30px !important;
    height: 30px !important;
    right: 8px !important;
  }

  /* Better button layout on mobile */
  .button-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
  }

  .button-container button,
  .button-container input[type="submit"] {
    width: 100%;
  }

  /* Improve fieldset styling */
  fieldset {
    padding: 15px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    margin-bottom: 20px;
  }

  fieldset legend {
    padding: 0 8px;
    font-weight: 600;
    font-size: 15px;
  }

  /* Better spacing for form sections */
  .form-section {
    margin-bottom: 20px;
  }

  .form-section h3 {
    font-size: 16px;
    margin-bottom: 15px;
  }
}

/* Extra small devices (< 480px) */
@media (max-width: 480px) {
  /* Extremely large touch targets */
  button,
  input[type="submit"],
  input[type="button"],
  .btn {
    min-height: 54px !important;
    padding: 16px 16px !important;
    font-size: 15px;
  }

  /* Larger text for readability */
  body {
    font-size: 15px;
  }

  .container_registration {
    padding: 12px;
    margin: 8px auto;
  }

  /* Single column layout */
  .form-grid {
    grid-template-columns: 1fr !important;
  }

  /* Full-width progress */
  .progress-container {
    flex-direction: column;
  }

  .progress-step {
    min-width: 100%;
  }

  .progress-line {
    display: none;
  }
}

/* ===== ENHANCED CONTACT FIELD STYLING ===== */

/* Contact input field improvements */
.contact-input {
  font-size: 1.1rem !important;
  letter-spacing: 0.05em;
  font-weight: 500;
  font-family: "Courier New", monospace;
}

.contact-input::placeholder {
  color: #999;
  font-family: "Poppins", sans-serif;
  font-weight: 400;
  letter-spacing: normal;
}

.contact-input:focus {
  font-size: 1.1rem !important;
  letter-spacing: 0.05em;
}

/* Input group styling for phone field */
.input-group .input-group-text {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  color: #666;
  font-size: 1.2rem;
  padding: 0.75rem 1rem;
  font-weight: 500;
}

.input-group-text {
  min-width: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Validation feedback styling */
.validation-feedback {
  color: #dc3545;
  font-size: 13px;
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(220, 53, 69, 0.1);
  border-left: 4px solid #dc3545;
  display: none;
  font-weight: 500;
  line-height: 1.5;
}

.validation-feedback:not(:empty) {
  display: block;
}

.validation-feedback strong {
  color: #dc3545;
  font-weight: 600;
  display: block;
  margin-bottom: 4px;
}

.validation-feedback small {
  display: block;
  color: #666;
  font-size: 12px;
  margin-top: 4px;
}

/* Help text for contact field */
.form-text.text-muted {
  font-size: 13px;
  color: #6c757d !important;
  font-style: italic;
  margin-top: 6px !important;
}

/* Contact field valid state */
.contact-input.valid {
  border-color: var(--active) !important;
}

.contact-input.valid ~ .input-group-text {
  border-color: var(--active);
  background-color: rgba(27, 94, 32, 0.05);
  color: var(--active);
}

/* Contact field error state */
.contact-input.error {
  border-color: #dc3545 !important;
}

.contact-input.error ~ .input-group-text {
  border-color: #dc3545;
  background-color: rgba(220, 53, 69, 0.05);
  color: #dc3545;
}

/* Ensure input group has correct styling */
.input-group {
  position: relative;
}

.input-group .form-control {
  position: relative;
  z-index: 1;
}

.input-group .form-control:focus {
  z-index: 2;
}

/* Mobile optimization for contact field */
@media (max-width: 576px) {
  .contact-input {
    font-size: 16px !important; /* Prevents iOS zoom on input focus */
  }

  .input-group .input-group-text {
    font-size: 1rem;
    padding: 0.65rem 0.75rem;
    min-width: 40px;
  }
}

/* ===== ELDERLY-FRIENDLY FORM ENHANCEMENTS ===== */

/* Form helper text and instructions */
.form-text,
.field-help-text,
.helper-text,
.form-helper-text {
  font-size: var(--font-help);
  color: #555;
  margin-top: 6px;
  line-height: 1.8;
  font-weight: 400;
  display: block;
}

.form-text.text-muted {
  color: #666 !important;
  font-weight: 500;
}

/* Field instructions with icons */
.field-instruction {
  background: rgba(27, 94, 32, 0.05);
  border-left: 4px solid var(--primary);
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 8px;
  font-size: var(--font-help);
  color: #333;
  line-height: 1.7;
}

.field-instruction::before {
  content: "ℹ️ ";
  margin-right: 8px;
  font-weight: bold;
}

/* Progress indicator improvements */
.progress-container {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
  gap: 12px;
  width: 100%;
  max-width: 100%;
  padding: 20px;
  background: linear-gradient(
    135deg,
    rgba(27, 94, 32, 0.05),
    rgba(46, 125, 50, 0.05)
  );
  border-radius: 12px;
  border: 1px solid rgba(27, 94, 32, 0.1);
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 90px;
  min-width: 90px;
  flex-shrink: 0;
  text-align: center;
}

.progress-circle {
  width: 50px;
  height: 50px;
  background-color: var(--bg);
  color: var(--textbased);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  line-height: 50px;
  transition: var(--transition);
  z-index: 2;
  border: 2px solid transparent;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-step.active .progress-circle {
  background-color: var(--active);
  color: var(--light);
  box-shadow: 0 4px 12px rgba(27, 94, 32, 0.3);
  transform: scale(1.1);
}

.progress-step.completed .progress-circle {
  background-color: var(--completed);
  color: var(--light);
}

.progress-label {
  font-size: 14px;
  font-weight: 600;
  margin-top: 10px;
  color: var(--textbased);
  max-width: 80px;
  word-wrap: break-word;
  text-align: center;
  line-height: 1.4;
}

/* Form section headers */
.form-section-header {
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: white;
  padding: 16px 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: var(--font-label);
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Field grouping */
.form-field-group {
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid #e5e7eb;
}

.form-field-group label {
  margin-top: 0;
}

/* Required field indicator */
.required-indicator {
  color: #dc3545;
  font-weight: 700;
  font-size: 18px;
  margin-left: 4px;
}

/* Accessibility improvements for elderly users */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Larger touch targets for elderly users */
@media (max-width: 768px) {
  .btn {
    min-height: 56px;
    font-size: 17px;
    padding: 18px 30px;
  }

  label {
    font-size: 17px;
  }

  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  select,
  textarea {
    font-size: 18px;
    min-height: 52px;
    padding: 16px 18px;
  }

  .container_registration {
    padding: 25px;
  }

  h2 {
    font-size: 28px;
  }

  h3 {
    font-size: 22px;
  }
}

/* ===== CONSOLIDATED GLOBAL STYLES ===== */
/* Improved focus management */
*:focus {
  outline: 2px solid var(--secondary);
  outline-offset: 2px;
}

/* Skip link for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--primary);
  color: white;
  padding: 8px;
  text-decoration: none;
  z-index: 1000;
  border-radius: 4px;
}

.skip-link:focus {
  top: 6px;
}

/* Language Selector Styles */
.language-selector {
  position: fixed;
  top: 15px;
  right: 15px;
  z-index: 1000;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-selector select {
  border: none;
  background: transparent;
  font-family: "Poppins", sans-serif;
  font-size: 14px;
  cursor: pointer;
  color: var(--dark);
  padding: 4px 8px;
  font-weight: 500;
}

.language-selector select:focus {
  outline: none;
}

.language-selector select option {
  padding: 10px;
}

@media (max-width: 768px) {
  .language-selector {
    top: 10px;
    right: 10px;
    padding: 6px 10px;
  }

  .language-selector select {
    font-size: 12px;
  }
}

/* Enhanced button accessibility */
.btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.3);
}

/* Touch device base improvements */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="date"],
select,
textarea {
  -webkit-appearance: none;
  appearance: none;
  border-radius: 4px;
  border: 1px solid #ddd;
}

input[type="checkbox"],
input[type="radio"] {
  cursor: pointer;
  min-width: 18px;
  min-height: 18px;
}

/* Additional Modal Styling */
.modal-content {
  border-radius: 8px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.modal-header {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  color: white;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
}

.modal-header .modal-title {
  font-weight: 600;
}

.modal-body {
  padding: 30px;
  line-height: 1.8;
}

.modal-body p {
  margin-bottom: 15px;
  color: #333;
}

.modal-body a {
  color: #1b5e20;
  font-weight: 500;
  text-decoration: underline;
}

.modal-body a:hover {
  color: #2e7d32;
}

.modal-footer {
  padding: 20px 30px;
  border-top: 1px solid #e0e0e0;
}

.modal-footer .btn {
  padding: 10px 30px;
  font-weight: 500;
  border-radius: 4px;
}

.modal-footer .btn-secondary {
  background-color: #6c757d;
  border: none;
}

.modal-footer .btn-secondary:hover {
  background-color: #5a6268;
}

.modal-footer .btn-primary {
  background: linear-gradient(135deg, #2e7d32, #1b5e20);
  border: none;
}

.modal-footer .btn-primary:hover {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  box-shadow: 0 4px 8px rgba(27, 94, 32, 0.3);
}

/* Loading States & Animations */
.form-field-loading {
  position: relative;
}

.form-field-loading::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid var(--secondary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: translateY(-50%) rotate(0deg);
  }
  100% {
    transform: translateY(-50%) rotate(360deg);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.form-step {
  animation: fadeInUp 0.6s ease-out;
}

.validation-success {
  animation: slideInRight 0.4s ease-out;
}

.progress-step.active {
  animation: pulse 0.6s ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
  100% {
    transform: scale(1);
  }
}

/* Enhanced Loading Spinner */
.enhanced-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.95);
  z-index: 9999;
  backdrop-filter: blur(5px);
}

.spinner-container {
  position: relative;
  width: 60px;
  height: 60px;
  margin-bottom: 20px;
}

.spinner-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border: 3px solid transparent;
  border-top: 3px solid var(--secondary);
  border-radius: 50%;
  animation: spin 1.2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
}

.spinner-ring:nth-child(2) {
  animation-delay: 0.1s;
  border-top-color: var(--primary);
}

.spinner-ring:nth-child(3) {
  animation-delay: 0.2s;
  border-top-color: #4caf50;
}

.loading-text {
  font-size: 16px;
  color: var(--dark);
  text-align: center;
  font-weight: 500;
}

.loading-progress {
  width: 200px;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  margin-top: 10px;
  overflow: hidden;
}

.loading-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--secondary), var(--primary));
  border-radius: 2px;
  animation: loadingProgress 3s ease-in-out infinite;
}

@keyframes loadingProgress {
  0% {
    width: 0%;
  }
  50% {
    width: 70%;
  }
  100% {
    width: 100%;
  }
}

/* Overlay for declined state */
.form-disabled-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.form-disabled-overlay.active {
  display: block;
}

/* Form transition animations */
input,
select,
textarea {
  transition: border-color 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(46, 125, 50, 0.15);
}

/* Occupation dropdown styling */
#customOccupationField,
#customSpouseOccupationField {
  transition: all 0.3s ease;
}

#occupation_custom,
#spouse_occupation_custom {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  font-size: 14px;
  width: 100%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#occupation_custom:focus,
#spouse_occupation_custom:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
  outline: none;
}

#occupation_custom.error,
#spouse_occupation_custom.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

#occupation_custom.is-valid,
#spouse_occupation_custom.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

/* Residency dropdown styling */
#customResidencyField {
  transition: all 0.3s ease;
}

#year_resident_custom {
  border: 1px solid #ddd;
  border-radius: 4px;
  padding: 10px;
  font-size: 14px;
  width: 100%;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

#year_resident_custom:focus {
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(46, 125, 50, 0.1);
  outline: none;
}

#year_resident_custom.error {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.1);
}

#year_resident_custom.is-valid {
  border-color: #28a745;
  box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}
/* ===== MOBILE PROGRESS BAR ===== */
@media (max-width: 768px) {
  .progress-container {
    flex-direction: column;
    padding: 16px;
    margin-bottom: 24px;
  }

  /* Linear progress bar on mobile */
  .progress-container::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 6px;
    background: linear-gradient(
      90deg,
      var(--primary) 0%,
      var(--completed) 100%
    );
    border-radius: 12px 12px 0 0;
    width: calc(
      ((var(--current-step, 1) - 1) / (var(--max-steps, 5) - 1)) * 100%
    );
    transition: width 0.3s ease;
  }

  .progress-container .progress-step {
    width: 100%;
    margin: 12px 0;
    flex-direction: row;
    gap: 12px;
    align-items: flex-start;
  }

  .progress-circle {
    width: 36px;
    height: 36px;
    font-size: 14px;
    min-width: 36px;
    flex-shrink: 0;
  }

  .progress-label {
    text-align: left;
    margin-top: 0;
    font-size: 14px;
    max-width: none;
  }

  .progress-container .progress-line {
    display: none;
  }

  .button-container {
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
  }

  .button-container > .btn {
    width: 100%;
    flex: none;
    min-width: 100%;
    padding: 14px 20px;
  }
}

@media (max-width: 480px) {
  .progress-circle {
    width: 32px;
    height: 32px;
    font-size: 12px;
  }

  .progress-label {
    font-size: 12px;
  }

  .btn {
    padding: 12px 16px;
    font-size: 14px;
  }
}

/* Screen reader only content */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}
