/* Chart Styles */

.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }
}

.chart-container {
    height: 280px;
    position: relative;
}

/* Chart Loading State */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--gray-400);
}

/* Chart Card */
.chart-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow-sm);
}

.chart-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-card-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.chart-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 12px;
}

.chart-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend-color {
    width: 12px;
    height: 12px;
    border-radius: 3px;
}

/* Modal Charts */
.modal-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.modal-chart-container {
    height: 200px;
}

@media (max-width: 600px) {
    .modal-charts {
        grid-template-columns: 1fr;
    }
}

/* Enhanced chart card in main dashboard */
.card .chart-container {
    padding-top: 8px;
}

.card .card-title {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card .card-title svg {
    width: 18px;
    height: 18px;
    color: var(--gray-400);
}

/* Chart tooltip custom styling */
.chartjs-tooltip {
    background: var(--gray-800) !important;
    border-radius: 8px !important;
    padding: 10px 14px !important;
    box-shadow: var(--shadow-lg) !important;
}

/* Responsive chart heights */
@media (max-width: 600px) {
    .chart-container {
        height: 220px;
    }
}

/* Chart placeholder when no data */
.chart-no-data {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--gray-400);
    font-size: 14px;
    gap: 8px;
}

.chart-no-data svg {
    width: 32px;
    height: 32px;
    opacity: 0.5;
}

/* Summary charts grid for full-width charts */
.charts-full-width {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.charts-full-width .chart-container {
    height: 320px;
}
