/* Reset general */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
}


/* Encabezado Fijo Principal */
        .header-home-titulo {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            z-index: 1000;
            background-color: #ffffff;
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding: 5px 5px;
            box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
            box-sizing: border-box;
        }

        /* Logo y Título */
        .header-logo-titulo {
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .login-icono {
            height: 40px;
            width: auto;
        }

        .header-logo-titulo h2 {
            margin: 0;
            font-size: 1.2rem;
            color: #1e293b;
            white-space: nowrap;
        }

        /* Menú de Navegación */
        .menu-navegacion {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        /* Estilo de los enlaces */
        .nav-link {
            text-decoration: none;
            color: #475569;
            font-weight: 500;
            font-size: 0.9rem;
            padding: 8px 12px;
            border-radius: 6px;
            transition: background-color 0.2s ease, color 0.2s ease;
            white-space: nowrap;
        }

        .nav-link:hover {
            background-color: #f1f5f9;
            color: #0f172a;
        }

        /* Estado Activo: resalta la pestaña de la página donde estás parado */
        .nav-link.active {
            background-color: #2563eb;
            color: #ffffff;
        }

        /* Compensación para que el contenido de la página no quede tapado */
        body {
            margin: 0;
            padding-top: 95px; 
            font-family: system-ui, -apple-system, sans-serif;
        }
        
        /* Control del tamaño de las imágenes del menú */
        .nav-icono-img {
            width: 30px;          /* Ancho del ícono */
            height: 30px;         /* Alto del ícono */
            object-fit: contain;  /* Mantiene la proporción de la imagen sin deformarla */
            display: block;
        }
        
        /* Adaptación para pantallas de celulares */
        @media (max-width: 600px) {
            .header-home-titulo {
                flex-direction: column;
                align-items: flex-start;
                padding: 10px;
            }

            .menu-navegacion {
                width: 100%;
                overflow-x: auto;
                padding-top: 8px;
                -webkit-overflow-scrolling: touch;
            }
            
            body {
                padding-top: 120px;
            }
        }
body {
    display: flex;
    justify-content: center;
    /*align-items: center;*/
    /*min-height: 100vh;*/
    background-color: #f4f6f9;
    padding-top: 90px; /* Ajusta este valor según la altura de tu header */
    /*box-sizing: border-box; /* Incluye el padding dentro del 100vh */
}

/* Contenedor principal centrado */
.login-container {
    background-color: #e9ecef; /* Fondo gris suave */
    border: 2px solid #2563eb;   /* Contorno azul */
    border-radius: 16px;         /* Bordes redondeados */
    padding: 20px 15px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login-container600 {
    max-width: 600px;
}


/* Contenedor padre para centrar y apilar verticalmente */
.page-layout {
    width: 100%;
    /*max-width: 500px;*/
    display: flex;
    flex-direction: column;
    align-items: center;    /* Centra los contenedores horizontalmente */
    /*justify-content: center;*/
    gap: 24px;              /* Separa el primer contenedor del segundo */
    min-height: 100vh;      /* Opcional: centra todo verticalmente en la pantalla */
    padding: 10px;
}

/* Logo 100x100 px */
.login-logo {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}

.login-icono {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 10px;
}

h2 {
    color: #1e293b;
    margin-bottom: 24px;
    font-size: 1.5rem;
}

.header-bar {
            width: 100%;
            max-width: 600px;
            display: flex;
            /*flex-direction: column;*/
            justify-content: space-between;
            /*align-items: center;*/
            margin-bottom: 10px;
            padding: 10px 10px;
            background-color: #ffffff;
            border-radius: 12px;
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
        }

.header-home {
    width: 100%;
    max-width: 600px;
    display: flex;
    /*flex-direction: column;*/
    justify-content: space-between;
    align-items: center;
    /*margin-bottom: 20px;*/
    padding: 5px 20px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}
        
.login-form {
    width: 100%;
}

.input-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 6px;
}

.input-group input {
    padding: 12px 14px;
    border: 1.5px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-group input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.2);
}

.btn-submit {
    width: 100px;
    padding: 12px;
    background-color: #2563eb;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin-top: 10px;
    display: block;
            margin-left: auto;
             margin-right: auto;
}

.btn-submit:hover {
    background-color: #1d4ed8;
}

.panel-container {
        max-width: none;
        width: 100%;
        }

/* En pantallas grandes (mayores a 600px): ocupa todo el ancho */
@media (max-width:768px) {
  .panel-container  {
        max-width: 600px;
  }
}

.resultado-card {
            width: 100%;
            margin-top: 25px;
            background-color: #ffffff;
            border: 1.5px solid #cbd5e1; 
            border-radius: 10px;
            padding: 10px;
            max-width: 800px;
            overflow-x: auto;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }

        .resultado-card h3 {
            color: #FFFFFF;
            background-color: #2563eb; 
            border-radius: 10px;
            font-size: 1.3rem;
            padding: 12px 20px;
            margin-bottom: 15px;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08);
            
            /*margin-bottom: 15px;
            border-bottom: 2px solid #e2e8f0;
            padding-bottom: 8px;
            font-size: 1.5rem;
            box-shadow: 4px 4px 6px rgba(0, 0, 0, 0.1);
            
            
            color: #1e40af;                  /* Azul más oscuro para buen contraste de lectura */
            /*background-color: #eff6ff;       /* Fondo azul suave moderno #D1DBE5*/
            /*margin-bottom: 15px;
            padding: 12px 20px;              /* Espaciado interno general */
            /*border-radius: 10px;             /* Vértices redondeados */
            /*font-size: 1.3rem;
            font-weight: 600;
            box-shadow: 0 4px 12px rgba(37, 99, 235, 0.08); /* Sombra suave teñida de azul */
            
            /* Opcional: Borde muy sutil para dar más definición */
            /*border: 1px solid #dbeafe;*/
        }

.paciente-grid {
    display: grid;
    /*grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));*/
    gap: 12px;
}

.paciente-item {
    font-size: 0.95rem;
    color: #334155;
}

.paciente-item strong {
    color: #104BC1;
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.btn-logout {
            padding: 8px 14px;
            background-color: #ef4444;
            color: white;
            text-decoration: none;
            border-radius: 6px;
            font-size: 0.9rem;
            font-weight: 600;
            transition: background-color 0.2s ease;
            display: block;
            margin-left: auto;
             margin-right: auto;
        }
.btn-logout:hover {
            background-color: #dc2626;
        }


/* Alerta de error */
.alert-error {
    background-color: #fee2e2;
    color: #991b1b;
    border: 1px solid #f87171;
    padding: 10px;
    border-radius: 8px;
    width: 100%;
    margin-bottom: 20px;
    font-size: 0.875rem;
    text-align: center;

}

.tabla-turnos {
    overflow-x: auto;
  width: 100%;
  max-width: 800px;
  border-collapse: collapse;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden; /* Mantiene los bordes redondeados */
  margin-bottom: 20px;
  
}

/* Encabezado */
.tabla-turnos th {
  /*background-color: #2563eb;*/ 
  background-color: #EDD29B; 
  /*color: #ffffff;*/
  color: #3C3F42;
  font-weight: bold;
  text-align: left;
  padding: 12px 16px;
}

/* Celdas de datos */
.tabla-turnos td {
  padding: 12px 16px;
  border-bottom: 1px solid #e0e0e0;
  font-size: 0.875rem;
  word-wrap: break-word;
}




.tabla-fija {
    width: 100%; /* La tabla ocupará todo el ancho disponible */
    max-width: 800px;
    table-layout: fixed; /* Fuerza a todas las columnas a tener exactamente el mismo ancho */
    border-collapse: collapse; /* Une los bordes para un acabado más limpio */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden; /* Mantiene los bordes redondeados */
    margin-bottom: 20px;
}

.tabla-fija th {
    background-color: #e9ecef;
    font-weight: bold;
    text-align: center; /* Centra el texto horizontalmente */
    vertical-align: middle; /* Centra el texto verticalmente */
    padding: 5px 15px; /* Espaciado interno para mejorar la legibilidad */
    /*word-wrap: break-word; /* Rompe palabras muy largas para que no fuercen el ancho de la celda */
    font-size: 0.875rem;
}

.tabla-fija td {
    text-align: center; /* Centra el texto horizontalmente */
    vertical-align: middle; /* Centra el texto verticalmente */
    padding: 5px; /* Espaciado interno para mejorar la legibilidad */
    border-bottom: 1px solid #e0e0e0;
}

/* ==========================================
   ESTILOS PARA EL MODAL DE PACIENTES
   ========================================== */

/* Fondo oscuro transparente */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

/* Estado activo para mostrar el modal */
.modal-overlay.active {
    display: flex;
}

/* Tarjeta principal del modal */
.modal-content {
    background: #ffffff;
    padding: 24px;
    border-radius: 10px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Lista scrolleable de pacientes */
.modal-list {
    list-style: none;
    padding: 0;
    margin: 15px 0;
    max-height: 250px;
    overflow-y: auto;
}

.modal-list-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-list-item:hover {
    background-color: #f8f9fa;
}

/* Botón de selección */
/* Ajuste del botón con imagen */
.btn-select {
    background: transparent;
    border: none;
    padding: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

/* Efecto hover suave al pasar el mouse */
.btn-select:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* Tamaño de la imagen dentro del botón */
.btn-select .icon-btn {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

/* Botón de cierre / cancelar */
.btn-close-modal {
    background: #6c757d;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.btn-close-modal:hover {
    background: #5a6268;
}

/* Contenedor relativo */
.modal-content {
    position: relative;
}

/* Botón de cierre en la esquina superior derecha */
.modal-close-x {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close-x:hover {
    background-color: rgba(0, 0, 0, 0.08);
}

/* Tamaño de la imagen de cierre */
.modal-close-x .icon-close {
    width: 24px;
    height: 24px;
    object-fit: contain;
}

.foto-historial {
    width: 100%;           /* Ocupa el 100% del contenedor disponible */
    max-width: 100%;       /* Asegura que no sobrepase el ancho de la pantalla/contenedor */
    height: auto;          /* Mantiene la proporción original de la imagen sin deformarla */
    border-radius: 8px;    /* Bordes redondeados */
    border: 1px solid #ccc;
    display: block;
    box-sizing: border-box; /* Incluye bordes y padding dentro del cálculo del ancho */
}
.escala-container {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    font-family: Arial, sans-serif;
    position: relative;
}

/* Valor mostrado en la parte superior central */
.valor-superior {
    text-align: center;
    font-size: 18px;
    color: #0078d4;
    margin-bottom: 15px;
}

/* Línea principal horizontal */
.linea-base {
    height: 6px;
    background-color: #e1e1e1;
    border: 1px solid #d0d0d0;
    border-radius: 3px;
    position: relative;
    margin: 10px 0;
}


/* Marcas delgadas (ticks) */
.ticks-container {
    display: flex;
    justify-content: space-between;
    padding: 0 1px;
    margin-top: 4px;
}

.tick {
    width: 1px;
    height: 5px;
    background-color: #a0a0a0;
}

/* Números del 0 al 10 en la parte inferior */
.numeros-container {
    display: flex;
    justify-content: space-between;
    margin-top: 6px;
}

.numero {
    color: #0078d4;
    font-size: 14px;
    width: 20px;
    text-align: center;
}