/* =========================================================
   PÁGINAS DE LOGIN / REGISTRO
========================================================= */
.login-page,
.register-page {
  background-color: #31444b !important;
}

/* =========================================================
   CONTENEDORES Y ELEMENTOS BÁSICOS
========================================================= */
.container {
  max-width: 600px;
  margin: 50px auto;
  text-align: center;
}

.drop-zone {
  border: 2px dashed #ccc;
  padding: 20px;
  background-color: #eaf1fb;
}

/* =========================================================
   BOTÓN DE CARGA DE ARCHIVOS
========================================================= */
.custom-file-upload {
  border: 2px dashed #ccc;
  display: inline-block;
  padding: 8px 12px;
  cursor: pointer;
  border-radius: 4px;
  background-color: #f8f8f8;
  font-weight: bold;
  color: #333;
  transition: all 0.3s ease;
  margin-bottom: 20px;
}

.custom-file-upload:hover {
  background-color: #dcdbdb;
}

#fileInput,
#fileInput_carga {
  display: none;
}

/* =========================================================
   VISIBILIDAD SEGÚN DISPOSITIVO
========================================================= */
@media (max-width: 1024px) {
  .desktop-only {
    display: none;
  }
}

/* =========================================================
   TABLAS CENTRADAS
========================================================= */
.table-container {
  display: flex;
  justify-content: center;
  margin: 0 auto;
  width: 80%;
}

.tablaCentrada {
  max-width: 600px;
  width: 100%;
}

@media (min-width: 992px) {
  .table-container {
    width: 60%;
  }
}

/* =========================================================
   PRE-LOADER
========================================================= */
#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1001;
  background: #fff;
}

#loader-wrapper .loader-section {
  position: fixed;
  top: 0;
  width: 50%;
  height: 100%;
  background: #fff;
  z-index: 1000;
  transform: translateX(0);
  will-change: transform;
}

#loader-wrapper .loader-section.section-left {
  left: 0;
}

#loader-wrapper .loader-section.section-right {
  right: 0;
}

#loader {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 150px;
  height: 150px;
  margin: -75px 0 0 -75px;
  border-radius: 50%;
  border: 3px solid transparent;
  border-top-color: #d1d30e;
  animation: spin 2s linear infinite;
  z-index: 99999;
}

#loader:before,
#loader:after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 3px solid transparent;
}

#loader:before {
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border-top-color: #cdc9c0;
  animation: spin 3s linear infinite;
}

#loader:after {
  top: 15px;
  left: 15px;
  right: 15px;
  bottom: 15px;
  border-top-color: #3d5158;
  animation: spin 1.5s linear infinite;
}

/* Estado de carga */
.loaded #loader-wrapper {
  visibility: hidden;
  transform: translateY(-100%);
  transition: all 0.3s 1s ease-out;
}

.loaded #loader-wrapper .loader-section.section-left {
  transform: translateX(-100%);
  transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.loaded #loader-wrapper .loader-section.section-right {
  transform: translateX(100%);
  transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
}

.loaded #loader {
  opacity: 0;
  transition: all 0.3s ease-out;
}

/* Animación del loader */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* =========================================================
   SECCIÓN EVATIX
========================================================= */
body {
  background-color: #f8fafc;
}

/* Cabecera con logo */
.header-evatix {
  text-align: center;
  background-color: #ffffff;
  border-radius: 12px;
  padding: 30px 20px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.evatix-logo {
  max-width: 220px;
  height: auto;
  display: block;
  margin: 0 auto 10px auto;
}

/* Loader interno */
.loader {
  width: 40px;
  height: 40px;
  border: 3px solid #e0e0e0;
  border-top: 3px solid #007bff;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

/* Botones */
button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

button:hover:not(:disabled) {
  transform: translateY(-1px);
  transition: all 0.2s ease-in-out;
}

button i {
  transition: transform 0.2s ease;
}

button:hover i {
  transform: scale(1.1);
}

/* Tarjetas de información */
.perfil-card {
  background: #f5f8fa;
  border: 1px solid #e6ecf0;
  border-radius: 12px;
  padding: 15px 20px;
  margin: 0 auto 25px auto;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.perfil-card p {
  margin-bottom: 6px;
}

/* Estados */
.status-badge {
  display: inline-block;
  padding: 0.45rem 1rem;
  border-radius: 20px;
  font-weight: 600;
  font-size: 0.9rem;
}

.status-completed { background-color: #d1e7dd; color: #0f5132; }
.status-inprogress { background-color: #fff3cd; color: #664d03; }
.status-error { background-color: #f8d7da; color: #842029; }

/* Recomendaciones */
.recomendacion-card {
  border: 1px solid #eaeaea;
  border-radius: 10px;
  padding: 15px;
  margin-bottom: 12px;
  transition: all 0.2s ease-in-out;
}

.recomendacion-card:hover {
  background-color: #f8f9fa;
  transform: translateY(-2px);
}

/* ============================
   BOTONES EVATIX (nuevo.php)
   ============================ */

/* Contenedor */
#btnGenerarWORD,
#btnGenerarPDF,
#btnDescargarJSON {
  font-family: 'Comfortaa', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 40px;
  padding: 0.55rem 1.6rem;
  transition: all 0.25s ease;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.08);
  border: none;
}

/* Botón principal (PDF) - color del logo morado-rosado */
#btnInformeWeb {
  background: linear-gradient(90deg, #b54aff 0%, #f875d6 100%);
  color: #fff;
}
#btnInformeWeb:hover {
  background: linear-gradient(90deg, #a13ee0 0%, #e35ec1 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(181, 74, 255, 0.3);
}

/* Botón Word (azul neutro suave) */
#btnGenerarWORD {
  background: linear-gradient(90deg, #4d7cff 0%, #6ba7ff 100%);
  color: #fff;
}
#btnGenerarWORD:hover {
  background: linear-gradient(90deg, #3a6ff0 0%, #5a9bff 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(77, 124, 255, 0.3);
}

/* Botón JSON (gris neutro con toques lilas suaves) */
#btnDescargarJSON {
  background: linear-gradient(90deg, #9e9e9e 0%, #c2c2c2 100%);
  color: #fff;
}
#btnDescargarJSON:hover {
  background: linear-gradient(90deg, #7b7b7b 0%, #adadad 100%);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(160, 160, 160, 0.3);
}

/* Espaciado entre botones */
#btnGenerarWORD + #btnInformeWeb,
#btnInformeWeb + #btnDescargarJSON {
  margin-left: 0.75rem;
}

/* Estado deshabilitado */
#btnGenerarWORD:disabled,
#btnInformeWeb:disabled,
#btnDescargarJSON:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.btn-group .dropdown-menu {
  min-width: 220px;
  font-family: 'Comfortaa', sans-serif;
  font-size: 0.9rem;
}

.btn-group .dropdown-item:hover {
  background-color: #f1e8ff;
  color: #6f42c1;
}


/* ============================
   RESPONSIVE
   ============================ */
@media (max-width: 768px) {
  #btnGenerarWORD,
  #btnGenerarPDF,
  #btnDescargarJSON {
    font-size: 0.85rem;
    padding: 0.45rem 1.2rem;
    margin-bottom: 0.6rem;
  }
}

/* ============================
   MODAL - MEDPREV
   ============================ */

.risk-card {
  border-left: 6px solid #ccc;
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 6px;
  background: #f8f9fa;
  font-size: 14px;
}

.risk-high {
  border-left-color: #dc3545;
  background: #fff5f5;
}

.risk-medium {
  border-left-color: #fd7e14;
  background: #fff8f2;
}

.risk-low {
  border-left-color: #28a745;
  background: #f4fff6;
}

.section-title {
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 10px;
}

.medprev-modal{
    border: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 18px 45px rgba(0,0,0,.18);
  }

  .medprev-modal .modal-header{
    background: linear-gradient(135deg, #ffffff 0%, #f7f9fc 100%);
    padding: 22px 24px 12px 24px;
  }

  .medprev-modal .modal-body{
    padding: 10px 24px 24px 24px;
    background: #fbfcfe;
  }

  .medprev-section-title{
    font-size: 1.05rem;
    font-weight: 700;
    color: #2b2f33;
    margin-bottom: 14px;
  }

  .medprev-grid{
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
  }

  @media (min-width: 992px){
    .medprev-grid{
      grid-template-columns: 1fr 1fr;
    }
  }

  .medprev-card{
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
    border-left: 6px solid #dbe3ea;
  }

  .medprev-card-title{
    font-size: 1rem;
    font-weight: 700;
    color: #222;
    margin-bottom: 6px;
  }

  .medprev-card-subtitle{
    font-size: .90rem;
    color: #6c757d;
    margin-bottom: 8px;
  }

  .medprev-card ul{
    margin: 8px 0 0 0;
    padding-left: 18px;
  }

  .medprev-card li{
    font-size: .92rem;
    color: #495057;
    margin-bottom: 4px;
  }

  .badge-priority{
    display: inline-block;
    font-size: .78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    margin-bottom: 10px;
  }

  .priority-high{
    border-left-color: #dc3545;
    background: #fff5f5;
  }

  .priority-high .badge-priority{
    background: #dc3545;
    color: #fff;
  }

  .priority-medium{
    border-left-color: #f0ad4e;
    background: #fffaf2;
  }

  .priority-medium .badge-priority{
    background: #f0ad4e;
    color: #fff;
  }

  .priority-low{
    border-left-color: #28a745;
    background: #f4fcf6;
  }

  .priority-low .badge-priority{
    background: #28a745;
    color: #fff;
  }

  .empty-state{
    background: #fff;
    border-radius: 14px;
    padding: 16px 18px;
    color: #6c757d;
    box-shadow: 0 6px 18px rgba(0,0,0,.05);
    border-left: 6px solid #ced4da;
  }
/* ============================
   MEDPREV - RESPUESTAS PACIENTE
   ============================ */

.medprev-answers-grid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

@media (min-width: 992px){
  .medprev-answers-grid{
    grid-template-columns: 1fr 1fr;
  }
}

.medprev-answer-card{
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  border-left: 5px solid #17a2b8;
  box-shadow: 0 6px 18px rgba(0,0,0,.05);
}

.medprev-answer-question{
  font-size: .92rem;
  font-weight: 700;
  color: #2b2f33;
  margin-bottom: 6px;
}

.medprev-answer-response{
  font-size: .92rem;
  color: #495057;
  word-break: break-word;
}

.medprev-answer-response ul{
  margin: 6px 0 0 0;
  padding-left: 18px;
}

.medprev-answer-response li{
  margin-bottom: 4px;
}
