/* ========================================
   ANALYTICS CHARTS - STYLING
   ======================================== */

.analytics-chart-container {
    width: 100%;
    height: 100%;
}

.chart-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.chart-card:hover {
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* ========== CHART HEADER ========== */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 2px solid #e9ecef;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.chart-header h3 {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chart-header h3 i {
    color: #667eea;
    font-size: 1.25rem;
}

.btn-refresh-chart {
    background: transparent;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #6c757d;
}

.btn-refresh-chart:hover {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: rotate(90deg);
}

/* ========== CHART BODY ========== */
.chart-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 250px;
    position: relative;
}

.chart-body canvas {
    width: 100% !important;
    height: auto !important;
}

/* ========== CHART LOADING ========== */
.chart-loading {
    text-align: center;
    padding: 3rem 1rem;
}

.spinner-chart {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.chart-loading p {
    margin: 0;
    color: #6c757d;
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========== CHART FOOTER ========== */
.chart-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.chart-footer p {
    margin: 0;
    color: #6c757d;
    font-size: 0.875rem;
    line-height: 1.5;
}

/* ========== RESPONSIVE DESIGN ========== */
@media (max-width: 768px) {
    .chart-header {
        padding: 1rem;
    }

    .chart-header h3 {
        font-size: 1rem;
    }

    .chart-body {
        padding: 1rem;
        min-height: 200px;
    }

    .chart-footer {
        padding: 0.75rem 1rem;
    }
}

/* ========== ANIMATIONS ========== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.chart-card {
    animation: fadeIn 0.5s ease-out;
}
