/* Contenedor principal */
#historialSolicitudes {
    max-width: 900px; 
    margin: auto;
    background: #fff;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
    animation: fadeIn 0.5s ease-in-out;
}

/* Tabs */
#historialTabs {
    justify-content: center;
    border-bottom: 3px solid #2e7d32;
}

#historialTabs .nav-link {
    color: #2e7d32;
    font-weight: bold;
    transition: all 0.3s ease;
}

#historialTabs .nav-link.active {
    background-color: #2e7d32;
    color: #fff;
    border: none;
}

/* Contenedor de tablas con scroll */
.table-container {
    max-height: 280px; 
    overflow-y: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 10px;
}

/* Tabla */
.table {
    width: 100%;
    margin-bottom: 0;
    border-collapse: collapse;
    table-layout: auto; /* Para que las columnas se ajusten mejor */
}

/* Encabezados de tabla */
.table thead {
    background-color: #2e7d32;
    color: white;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

/* Celdas de encabezados */
.table thead th {
    padding: 14px;
    font-size: 15px;
    font-weight: bold;
}

/* Cuerpo de la tabla */
.table tbody {
    display: table-row-group;
}

/* Filas */
.table tbody tr {
    transition: background-color 0.3s ease-in-out, transform 0.2s ease-in-out;
}

/* Animación al pasar el mouse */
.table tbody tr:hover {
    background-color: #e8f5e9;
    transform: scale(1.02);
}

/* Columnas - Ajuste de espacios */
.table th,
.table td {
    padding: 12px;
    text-align: center;
    vertical-align: middle;
    word-wrap: break-word;
    white-space: normal;
}

/* Aumentar espacio en cada columna para mejorar visibilidad */
.table th:nth-child(1), .table td:nth-child(1) { width: 15%; } /* Fecha */
.table th:nth-child(2), .table td:nth-child(2) { width: 20%; } /* Motivo */
.table th:nth-child(3), .table td:nth-child(3) { width: 15%; } /* Tipo */
.table th:nth-child(4), .table td:nth-child(4) { width: 12%; } /* Horas Permitidas */
.table th:nth-child(5), .table td:nth-child(5) { width: 19%; } /* Aprobación Líder */
.table th:nth-child(6), .table td:nth-child(6) { width: 19%; } /* Aprobación Talento Humano */

/* Botón regresar */
#btnRegresar {
    background: #2e7d32;
    color: #ffffff;
    font-weight: bold;
    border-radius: 8px;
    transition: 0.3s ease;
    padding: 10px 20px;
}

#btnRegresar:hover {
    background: #1b5e20;
    transform: scale(1.05);
}

/* Animación de aparición */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Media query para móviles */
@media (max-width: 768px) {
    #historialSolicitudes {
        max-width: 95%;
        padding: 20px;
    }

    .table-container {
        max-height: 200px;
    }

    .table th,
    .table td {
        font-size: 13px;
        padding: 10px;
    }

    #btnRegresar {
        width: 100%;
    }
}
