.modal {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.modelo-contenido {
  background: #fff;
  border-radius: 12px;
  padding: 30px 20px;
  max-width: 900px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

.modal-contenido {
  background: #fff;
  border-radius: 12px;
  padding: 30px 20px;
  max-width: 400px;
  width: 90%;
  text-align: center;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

.modal-contenido h2 {
  margin-top: 15px;
  font-size: 1.5em;
  color: #333;
}

.modal-contenido p {
  margin: 10px 0 20px;
  color: #666;
}

.modal-botones {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.btn {
  padding: 10px 20px;
  font-size: 0.95em;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.btn.eliminar {
  background-color: #dc3545;
  color: white;
}

.btn.eliminar:hover {
  background-color: #c82333;
}

.btn.cancelar {
  background-color: #6c757d;
  color: white;
}

.btn.cancelar:hover {
  background-color: #5a6268;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Modal para Crear Persona */

#modalCrearPersona .modal-contenido {
    max-width: 500px;
    padding: 30px;
  }
  
  .modal-contenido h2 {
    font-size: 1.8em;
    color: #2c3e50;
    margin-bottom: 20px;
  }
  
  .form-group {
    margin-bottom: 15px;
    text-align: left;
  }
  
  .form-group label {
    display: block;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
  }
  
  .form-group input,
  .form-group textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
  }
  
  .form-group input:focus,
  .form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 5px rgba(52, 152, 219, 0.4);
  }
  
  #formCrearPersona .btn {
    width: calc(50% - 10px);
    margin-top: 10px;
  }
  
  #formCrearPersona .btn.cancelar {
    background-color: #bdc3c7;
  }
  
  #formCrearPersona .btn.cancelar:hover {
    background-color: #95a5a6;
  }

  .form-group {
    position: relative;
    margin-bottom: 15px;
    text-align: left;
  }
  
  .form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
  }
  
  .form-group input,
  .form-group select,
  .form-group textarea,
  .form-froup .sugerencias-lista {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
  }

  .sugerencias-lista {
  position: absolute;
  top: 100%; /* justo debajo del input */
  left: 0;
  width: 100%; /* se adapta al input */
  background: white;
  border: 1px solid #ccc;
  border-radius: 6px;
  max-height: 150px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.sugerencias-lista div {
  padding: 8px;
  cursor: pointer;
}

.sugerencias-lista div:hover {
  background-color: #f0f0f0;
}


  #modalFiltros .modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
  }
  
  #modalFiltros .modal-contenido {
    background: #fff;
    border-radius: 12px;
    padding: 30px 20px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
  }
  
  #modalFiltros .modal-contenido h2 {
    margin-top: 15px;
    font-size: 1.5em;
    color: #333;
  }
  
  #modalFiltros .filtros label {
    display: block;
    text-align: left;
    margin-top: 15px;
    margin-bottom: 5px;
    color: #444;
    font-weight: 500;
  }
  
  #modalFiltros .filtros input,
  .filtros select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-sizing: border-box;
  }
  #modalFiltros .modal-botones {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 25px;
  }
  
  @keyframes fadeIn {
    from {
      opacity: 0;
      transform: scale(0.95);
    }
    to {
      opacity: 1;
      transform: scale(1);
    }
  }

/* Estilo general del modal */
#modalFiltrosDiagnostico {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

/* Contenido centrado */
#modalFiltrosDiagnostico .modal-contenido {
  background-color: #ffffff;
  padding: 30px 25px;
  border-radius: 12px;
  width: 90%;
  max-width: 500px;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.25);
  text-align: center;
}

/* Título */
#modalFiltrosDiagnostico .modal-contenido h2 {
  margin-bottom: 20px;
  color: #333;
  font-size: 1.8em;
}

/* Estilo para etiquetas */
#modalFiltrosDiagnostico label {
  display: block;
  text-align: left;
  margin-top: 15px;
  margin-bottom: 5px;
  color: #444;
  font-weight: 500;
}

/* Inputs y selects */
#modalFiltrosDiagnostico input,
#modalFiltrosDiagnostico select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1em;
  box-sizing: border-box;
  transition: border-color 0.3s;
}

#modalFiltrosDiagnostico input:focus,
#modalFiltrosDiagnostico select:focus {
  border-color: #007bff;
  outline: none;
}

/* Botones del modal */
#modalFiltrosDiagnostico .modal-botones {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 25px;
  flex-wrap: wrap;
}

/* Animación de entrada */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.boton-enlace {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background-color: #bdc3c7;
  color: white;
  padding: 10px 18px;
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  transition: background-color 0.25s ease, transform 0.1s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.boton-enlace:hover {
  background-color: #6c757d;
  transform: translateY(-1px);
  color: white;
}

/* Modal doble de Historial */

#modalEditarHistorial {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease-in-out;
}

#modalEditarHistorial .modelo-contenido {
  background: #fff;
  border-radius: 12px;
  padding: 30px 30px;
  width: 95%;
  max-width: 900px;
  display: flex;
  gap: 40px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.3s ease-in-out;
}

/* Columna: Editar historial */
#modalEditarHistorial .modelo-contenido form {
  display: flex;
  flex: 1.5;
  min-width: 350px;
  flex-direction: column;
  gap: 15px;
}

#modalEditarHistorial .modelo-contenido h2 {
  font-size: 1.5em;
  color: #2c3e50;
  margin-bottom: 15px;
}

#modalEditarHistorial .form-group {
  text-align: left;
}

#modalEditarHistorial .form-group label {
  display: block;
  font-weight: 600;
  color: #333;
  margin-bottom: 5px;
}

#modalEditarHistorial .form-group input,
#modalEditarHistorial .form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  font-size: 1em;
  box-sizing: border-box;
}

#modalEditarHistorial .form-group input:focus,
#modalEditarHistorial .form-group textarea:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 5px rgba(52, 152, 219, 0.4);
}

/* Botones dentro del formulario */
#modalEditarHistorial .modal-botones {
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
  margin-top: 15px;
}

/* Columna: Información de la Persona */
#modalEditarHistorial .info-persona {
  background-color: #f5f5f5;
  padding: 20px;
  border-radius: 10px;
  flex: 1;
  min-width: 300px;
}

#modalEditarHistorial .info-persona h2 {
  font-size: 1.4em;
  color: #34495e;
  margin-bottom: 15px;
}

#modalEditarHistorial .info-persona .form-group {
  margin-bottom: 10px;
}

#modalEditarHistorial .info-persona .form-group p {
  color: #555;
  margin-top: 4px;
}