/* ==== CONTAINER PRINCIPAL ==== */
#medico-cadastro-container {
  margin: 40px auto;
  padding: 40px;
  background: #f7f7f7;
  border-radius: 12px;
  font-family: 'Inter', sans-serif;
  color: #111827;
}

/* ==== WRAPPER ROW (trilha + etapas) ==== */
.stepper-row {
  display: flex;
  align-items: flex-start;
  gap: 40px;
}

/* ==== TRILHA LATERAL ==== */
/* Container da trilha */
.progress-sidebar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 60px; /* distância entre steps */
  padding: 20px 0;
}

/* Linha central */
.progress-sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 2px;
  background: #e5e7eb;
  transform: translateX(-50%);
  z-index: 0; /* linha atrás */
}

/* Step (bolinha) */
.progress-step {
  position: relative;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #d1d5db;
  background: #fff;
  z-index: 1; /* bolinhas acima da linha */
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .3s ease;
}

/* Step ativo (azul) */
.progress-step.active {
  border-color: #2563eb;
}
.progress-step.active::before {
  content: "";
  width: 10px;
  height: 10px;
  background: #2563eb;
  border-radius: 50%;
}

/* Step completado (verde com ✓) */
.progress-step.completed {
  border-color: #1F5C47;
  background: #1F5C47;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
}
.progress-step.completed::before {
  content: "✓";
}

/* ==== FORM WRAPPER (conteúdo à direita) ==== */
.form-steps-wrapper {
  flex: 1;
}

/* ==== ETAPAS ==== */
.form-step {
  display: none;
  animation: fadeIn .4s ease;
}
.form-step:first-child {
  display: block;
}
.form-step h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 4px;
  color: #374151;
}
.form-step strong {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
}
.form-step small {
  display: block;
  margin-bottom: 24px;
  color: #6b7280;
  font-size: .9rem;
}

/* ==== GRID DE INPUTS ==== */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.form-group input,
.form-group select {
  width: 100%;
  padding: 12px 14px;
  font-size: 16px;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  background: #fff;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input::placeholder {
  color: #9ca3af;
}
.form-group input:focus,
.form-group select:focus {
  border-color: #2563eb;
  outline: none;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

/* ==== BOTÕES ==== */
.btn-next, .btn-prev, #finalizar-cadastro, .btn-validar {
  padding: 12px 24px;
  border-radius: 6px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all .3s;
  border: none;
  margin-top: 0px;
}

/* Principal (verde) */
.btn-next,
#finalizar-cadastro {
  background: #1F5C47;
  color: #fff;
}
.btn-next:hover,
#finalizar-cadastro:hover {
  background: #174335;
}

/* Botão validar (azul) */
.btn-validar {
  background: #2563eb;
  color: #fff;
  width: 100%;
}
.btn-validar:hover {
  background: #1d4ed8;
}
.btn-validar:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

/* Voltar (cinza) */
.btn-prev {
  background: #e5e7eb;
  color: #374151;
}
.btn-prev:hover {
  background: #d1d5db;
}

/* Botão finalizar = full width */
#finalizar-cadastro {
  width: 100%;
  justify-content: center;
}

/* ==== RESULTADO VALIDAÇÃO ==== */
#resultado-validacao {
  margin-top: 20px;
  padding: 16px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

.medico-info {
  margin-bottom: 16px;
}

.medico-info p {
  margin: 8px 0;
  font-size: 14px;
  color: #374151;
}

.medico-info strong {
  color: #111827;
  font-weight: 600;
}

/* ==== MENSAGENS ==== */
#mensagens {
  margin-top: 20px;
}
.mensagem {
  padding: 12px 14px;
  border-radius: 6px;
  margin-top: 10px;
  font-weight: 500;
  font-size: .95rem;
}
.mensagem.success {
  background: #d1fae5;
  border: 1px solid #a7f3d0;
  color: #065f46;
}
.mensagem.error {
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

/* ==== ANIMAÇÃO ==== */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==== SEÇÃO DE BUSCA CEP ==== */
.cep-search-section {
  margin-bottom: 24px;
  padding: 20px;
  background: #f9fafb;
  border: 2px dashed #d1d5db;
  border-radius: 8px;
}

.cep-search-section .form-grid {
  margin-bottom: 0;
}

.cep-search-section .btn-validar {
  margin-top: 0;
  height: 46px;
}

#campos-endereco {
  animation: slideDown 0.4s ease;
}

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

/* ==== RESPONSIVO ==== */
@media (max-width: 768px) {
  .stepper-row {
    flex-direction: column;
  }
  .progress-sidebar {
    display: flex;
    flex-direction: row;
    justify-content: center;
    margin-bottom: 20px;
  }
  .progress-sidebar::after { display: none; }
  .progress-step { margin: 0 10px; }
  .form-grid { grid-template-columns: 1fr; }
  .btn-next, .btn-prev, #finalizar-cadastro { width: 100%; }
}