/* === MÓDULO DE ESTADÍSTICAS === */
#statistics-section {
    display: none;
    flex: 1;
    padding: 20px;
    gap: 20px;
    height: calc(100vh - 80px);
    overflow: hidden;
    animation: fadeInStats 0.4s ease;
}

@keyframes fadeInStats {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Reutilización de Sidebar y Results del Historial */
#statistics-sidebar {
    /* Mismas dimensiones que history-sidebar */
}

/* Dashboard de Estadísticas */
#statistics-dashboard {
    flex: 1;
    background: var(--bg-principal);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border-radius: 15px;
    border: 1px solid var(--border-dark);
}

/* Estilos específicos para los contenedores de gráficos */
.stats-card {
    background: var(--card-bg);
    border: 1px solid var(--border-dark);
    border-radius: 12px;
    padding: 20px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Scroll personalizado para el dashboard */
#statistics-dashboard::-webkit-scrollbar {
    width: 8px;
}

#statistics-dashboard::-webkit-scrollbar-track {
    background: transparent;
}

#statistics-dashboard::-webkit-scrollbar-thumb {
    background: var(--border-dark);
    border-radius: 10px;
}

#statistics-dashboard::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* Animación de carga para los gráficos */
.chart-loading {
    position: relative;
    overflow: hidden;
}

.chart-loading::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    animation: loading-shimmer 1.5s infinite;
}

@keyframes loading-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Waffle Stats */
#waffle-dropdown-stats {
    right: 0;
    top: 45px;
}
