
/* =====================================
    CHART CONTAINERS & ANIMATIONS
===================================== */
.analytics-charts {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-auto-rows: 1fr;
    gap: 20px;
    max-height: 57vh;
    flex-shrink: 0;
}

.analytics-charts > .chart-container:first-child {
    grid-row: 1 / span 2;
}

.chart-container {
    background-color: var(--card-bg);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1),
                0 2px 4px -1px rgba(0, 0, 0, 0.06),
                inset 0 1px 2px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(224, 224, 224, 0.5);
    min-height: 250px;
    animation: fadeIn 0.8s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-container h2 {
    margin-top: 0;
    font-size: 1.3rem;
    color: var(--text-color-dark);
    margin-bottom: 20px;
    font-weight: 700;
}

.chart-container canvas {
    max-height: 100%;
    width: 100% !important;
    height: 100% !important;
    flex-grow: 1;
}

/* ------------------ Media Queries for better mobile layout ------------------ */
@media (max-width: 992px) {
    .analytics-charts {
        grid-template-columns: 1fr;
        max-height: none;
    }
    .analytics-charts > .chart-container:first-child {
        grid-row: auto;
    }
}