/* ==========================================================================
   CONSULTA DE HORAS - ESTILOS BASE
   ========================================================================== */

.fichaje-consulta-container {
    width: 100%;
    max-width: 100%; /* Elimina la restricción de 900px */
    padding: 0 20px; /* Recomendado: evita que el borde azul toque el extremo absoluto del monitor */
    box-sizing: border-box; /* Asegura que el padding no genere scroll horizontal */
    margin: 0 auto;
    font-family: sans-serif;
}

.fichaje-form-consulta {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    background: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    border: 5px solid #1E90FF;
    align-items: center;
}

.fichaje-select {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    min-width: 150px;
}

.fichaje-form-consulta .fichaje-input-dni {
    margin-bottom: 0;
    flex-grow: 1;
}

.fichaje-resultados {
    margin-top: 20px;
}

.fichaje-total {
    background: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    border-left: 5px solid #007bff;
    margin-bottom: 20px;
    font-size: 18px;
}

.fichaje-total span {
    font-weight: bold;
    color: #007bff;
}

.fichaje-input-fecha {
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
}

.wrap-fecha {
    flex-grow: 1;
    min-width: 150px;
}

/* ==========================================================================
   NAVEGACION DE EMPLEADOS Y EXPORTACION (BLINDADO)
   ========================================================================== */

.fichaje-nav-empleados {
    margin-bottom: 25px;
}

.fichaje-export-nav-bar {
    display: flex !important;
    justify-content: space-between !important; /* Cambiado de center a space-between */
    align-items: center !important;
    margin-bottom: 20px !important;
    width: 100%;
}

/* Botones Anterior / Siguiente */
button.fichaje-btn-nav {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #6c757d !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 20px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    height: 42px !important;
    margin: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

button.fichaje-btn-nav:hover:not(.disabled) {
    background-color: #5a6268 !important;
}

button.fichaje-btn-nav.disabled {
    background-color: #e9ecef !important;
    color: #a6a6a6 !important;
    cursor: not-allowed !important;
}

/* Boton Exportar CSV (Forzando la etiqueta 'a' para que parezca boton) */
a.fichaje-btn-exportar {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #17a2b8 !important;
    color: #ffffff !important;
    border: none !important;
    padding: 0 20px !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    font-weight: bold !important;
    height: 42px !important;
    margin: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

a.fichaje-btn-exportar:hover {
    background-color: #138496 !important;
    color: #ffffff !important;
}

/* Paginacion numerica */
.fichaje-nav-numeros {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 5px !important;
    flex-wrap: wrap !important;
}

button.fichaje-btn-num {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    background-color: #ffffff !important;
    color: #333333 !important;
    border: 1px solid #cccccc !important;
    padding: 0 12px !important;
    border-radius: 4px !important;
    cursor: pointer !important;
    font-size: 14px !important;
    height: 32px !important;
    margin: 0 !important;
    text-decoration: none !important;
}

button.fichaje-btn-num:hover {
    background-color: #e9ecef !important;
}

button.fichaje-btn-num.activo {
    background-color: #007bff !important;
    color: #ffffff !important;
    border-color: #007bff !important;
    font-weight: bold !important;
}

.fichaje-nav-dots {
    color: #666666 !important;
    padding: 0 5px !important;
    font-weight: bold !important;
}

/* ==========================================================================
   BLINDAJE DE LA TABLA
   ========================================================================== */
.fichaje-tabla-container {
	width: 80%;
    margin: 40px auto;
	max-width: 1400px;
}

table.fichaje-tabla {
    width: 100% !important; /* Reemplaza el 1500px fijo */
    border-collapse: collapse !important; 
    background: #ffffff !important; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.1) !important; 
    border: 1px solid #ddd !important; 
    margin-left: auto !important; 
    margin-right: auto !important;
}

table.fichaje-tabla th, 
table.fichaje-tabla td {
    border: 1px solid #1E90FF !important;
    padding: 12px 15px !important;
    text-align: left !important;
    vertical-align: middle !important;
}

table.fichaje-tabla th {
    background-color: #1E90FF !important;
    color: #ffffff !important;
    font-weight: bold !important;
}

table.fichaje-tabla tr:nth-child(even) td {
    background-color: #f8f9fa !important;
}

table.fichaje-tabla tr:hover td {
    background-color: #f1f1f1 !important;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 600px) {
    .fichaje-form-consulta {
        flex-direction: column;
    }
    .fichaje-form-consulta > * {
        width: 100%;
    }
    .fichaje-tabla {
        display: block;
        overflow-x: auto;
    }
    .fichaje-export-nav-bar {
        flex-direction: column !important;
    }
}