/* 
   All styles here are scoped to #analyticsSection to prevent 
   conflicts with the main Dashboard components.
*/

#analyticsSection .analytics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 20px;
}

@media (max-width: 1024px) {
    #analyticsSection .analytics-grid {
        grid-template-columns: 1fr;
    }
}

#analyticsSection .full-width {
    grid-column: span 2;
}

@media (max-width: 1024px) {
    #analyticsSection .full-width {
        grid-column: span 1;
    }
}

#analyticsSection .kpi-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    #analyticsSection .kpi-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* 
   FORBIDDEN ZONE - DO NOT CHANGE WITHOUT EXPLICIT USER PERMISSION
   KPI Widget background and primary appearance must match main styles.css
*/
#analyticsSection .kpi-card {
    background: var(--bg-card);
    padding: 15px;
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: transform 0.2s;
    /* Reset any potential flex-direction overrides if needed, 
       but primarily we just want to ensure we don't block styles.css classes 
       from working if they are also applied. However, analytics.css 
       Redefines .kpi-card entirely, so we scope it.
    */
    display: flex;
    flex-direction: column;
}
/* END FORBIDDEN ZONE */

#analyticsSection .kpi-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--accent-secondary);
}

#analyticsSection .kpi-title {
    font-size: 0.85rem;
    color: var(--text-secondary, #a1a1aa);
    margin-bottom: 5px;
}

#analyticsSection .kpi-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-primary, #ffffff);
}

#analyticsSection .chart-container {
    background: var(--bg-card);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid var(--border-color);
    min-height: 350px;
    display: flex;
    flex-direction: column;
}

#analyticsSection .chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    min-height: 32px;
}

#analyticsSection .chart-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary, #fff);
}
