/* Register page layout */
.es-register-main {
  min-height: calc(100vh - 64px);
  background: #f5f7fa;
  background-image: linear-gradient(135deg, transparent 0%, transparent 60%, rgba(15, 122, 58, 0.03) 100%);
}

.es-register-step-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.es-register-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a1f2b;
  margin-bottom: 0.25rem;
}

.es-register-subtitle {
  color: #4a5563;
  margin-bottom: 1.5rem;
}

/* Residency cards (Step 1) */
.es-residency-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.5rem;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.es-residency-card:hover {
  border-color: #0f7a3a;
  box-shadow: 0 4px 12px rgba(15, 122, 58, 0.15);
}

.es-residency-icon {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: #0f7a3a;
}

.es-flag-ph {
  display: inline-block;
  width: 48px;
  height: 32px;
  background: linear-gradient(180deg, #0032A0 0%, #0032A0 50%, #BF0D3E 50%, #BF0D3E 100%);
  position: relative;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1);
}

.es-flag-ph::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 16px 0 16px 18px;
  border-color: transparent transparent transparent #fff;
}

/* Buttons */
.es-btn-secondary {
  background-color: #e2e8f0;
  border-color: #e2e8f0;
  color: #1a1f2b;
}

.es-btn-secondary:hover {
  background-color: #cbd5e1;
  border-color: #cbd5e1;
  color: #1a1f2b;
}

/* Form field status (check / error) */
.es-field-status {
  width: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid #dee2e6;
  border-left: none;
  border-radius: 0 0.375rem 0.375rem 0;
}

.input-group .form-control.is-valid + .es-field-status,
.input-group .form-control:valid + .es-field-status {
  color: #0f7a3a;
}

.input-group .form-control.is-invalid + .es-field-status {
  color: #dc3545;
}

.es-password-rules {
  color: #6b7280;
}

.es-password-rules .valid {
  color: #0f7a3a;
}

.es-password-rules .invalid {
  color: #dc3545;
}

/* OTP timers */
.es-otp-timer {
  font-size: 0.875rem;
  background: #fef3c7;
  color: #92400e;
  white-space: nowrap;
}

/* Panels (steps 5-8) */
.es-panel {
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e2e8f0;
}

.es-panel:last-of-type {
  border-bottom: none;
}

.es-panel-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: #1a1f2b;
  margin-bottom: 1rem;
}

/* Progress sidebar */
.es-register-progress {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 1.5rem;
  position: sticky;
  top: 1rem;
}

.es-progress-title {
  font-size: 1rem;
  font-weight: 600;
  color: #1a1f2b;
  margin-bottom: 0.75rem;
}

.es-progress-instructions {
  font-size: 0.875rem;
  color: #4a5563;
  margin-bottom: 1.25rem;
}

.es-progress-instructions p {
  margin-bottom: 0.35rem;
}

.es-progress-steps {
  list-style: none;
  padding: 0;
  margin: 0;
}

.es-progress-step {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.9rem;
  color: #64748b;
}

.es-progress-step.completed .es-progress-dot {
  background: #0f7a3a;
  border-color: #0f7a3a;
}

.es-progress-step.completed .es-progress-dot::after {
  content: "\F26B";
  font-family: "bootstrap-icons";
  font-size: 0.65rem;
  color: #fff;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.es-progress-step.active .es-progress-dot {
  background: #0f7a3a;
  border-color: #0f7a3a;
  box-shadow: 0 0 0 3px rgba(15, 122, 58, 0.25);
}

.es-progress-step.active {
  color: #1a1f2b;
  font-weight: 600;
}

.es-progress-dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  flex-shrink: 0;
  position: relative;
  transition: background 0.2s, border-color 0.2s;
}

/* Modal */
.es-modal-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 50%;
  border: 2px solid #f59e0b;
  color: #f59e0b;
  font-size: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.es-modal-icon-success {
  border-color: #22c55e;
  color: #22c55e;
  background-color: rgba(34, 197, 94, 0.1);
}

#modal-confirm-residency .modal-content,
#modal-registration-success .modal-content {
  border: none;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

@media (max-width: 991.98px) {
  .es-register-progress {
    position: static;
    margin-top: 1rem;
  }
}
