/* Charts Styling */

/* Styles for stat-card containing charts */
.stat-card .stat-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.stat-card .stat-content {
    flex: none;
}

.stat-card .stat-content h4 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1;
    color: var(--color-text-primary);
    margin: 0;
}

.stat-card .stat-content p {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin: 2px 0 0 0;
}

.stat-card .chart-wrapper {
    margin-top: 12px;
}

.charts-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 1rem;
}

@media (min-width: 1200px) {
    .chart    .chart-empty {
        background: transparent;
        border: none;
        color: #D1D5DB;
    }tainer {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1199px) {
    .charts-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .chart-wrapper:last-child {
        grid-column: 1 / -1;
        max-width: 50%;
        margin: 0 auto;
    }
}

.chart-wrapper {
    background: transparent;
    border: none;
    border-radius: 8px;
    padding: 0;
    box-shadow: none;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
    flex: 1;
}

.chart-wrapper:hover {
    background: transparent;
    transform: none;
}

.chart-wrapper::before {
    display: none;
}

.chart-wrapper h4 {
    display: none;
}

.chart-wrapper canvas {
    max-width: 100%;
    height: 180px !important;
    border-radius: 4px;
}

/* Loading state for charts */
.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: transparent;
    border-radius: 8px;
    border: none;
}

.chart-loading-spinner {
    width: 32px;
    height: 32px;
    border: 2px solid #E5E7EB;
    border-top: 2px solid #3B82F6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.chart-loading-text {
    margin-left: 0.75rem;
    color: #6B7280;
    font-size: 0.875rem;
    font-weight: 500;
}

/* Empty state for charts */
.chart-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 180px;
    background: transparent;
    border-radius: 8px;
    border: none;
    color: #6B7280;
}

.chart-empty-icon {
    font-size: 2rem;
    margin-bottom: 0.75rem;
    opacity: 0.6;
    color: #9CA3AF;
}

.chart-empty-text {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #6B7280;
}

.chart-empty-subtext {
    font-size: 0.75rem;
    opacity: 0.8;
    color: #9CA3AF;
}

/* Chart animation */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chart-wrapper.fade-in {
    animation: chartFadeIn 0.3s ease-out;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .charts-container {
        gap: 1rem;
    }
    
    .chart-wrapper {
        padding: 1rem;
    }
    
    .chart-wrapper canvas {
        height: 150px !important;
    }
    
    .chart-loading,
    .chart-empty {
        height: 150px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .chart-wrapper {
        background: #ffffff;
        border: none;
    }
    
    .chart-wrapper:hover {
        background: #ffffff;
    }
    
    .chart-wrapper h4 {
        color: #F9FAFB;
    }
    
    .chart-loading {
        background: transparent;
        border: none;
    }
    
    .chart-loading-text {
        color: #D1D5DB;
    }
    
    .chart-empty {
        background: #ffffff;
        border-color: #374151;
        color: #D1D5DB;
    }
    
    .chart-empty-icon {
        color: #6B7280;
    }
    
    .chart-empty-text {
        color: #D1D5DB;
    }
    
    .chart-empty-subtext {
        color: #9CA3AF;
    }
}

/* Spinner animation */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
