/* ModernAttendanceChart Component Styles - ApexCharts Enhanced */
.modern-apex-chart-card {
    border-radius: 16px !important;
    background: linear-gradient(135deg, rgba(255,255,255,0.98) 0%, rgba(250,251,253,0.98) 100%) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    box-shadow: 
        0 10px 40px rgba(0, 0, 0, 0.08),
        0 4px 20px rgba(0, 0, 0, 0.04),
        inset 0 1px 0 rgba(255, 255, 255, 0.7) !important;
    padding: 2rem !important;
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modern-apex-chart-card:hover {
    transform: translateY(-3px);
    box-shadow: 
        0 15px 50px rgba(0, 0, 0, 0.12),
        0 6px 25px rgba(0, 0, 0, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.8) !important;
}

.modern-apex-chart-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 30%, #f093fb 70%, #f5576c 100%);
    opacity: 0.9;
    border-radius: 16px 16px 0 0;
}

/* Header Styles - Enhanced */
.chart-header {
    position: relative;
    z-index: 3;
    margin-bottom: 0.5rem;
}

.chart-title {
    color: #1e293b !important;
    font-weight: 700 !important;
    font-size: 1.25rem !important;
    margin: 0 0 0.5rem 0 !important;
    letter-spacing: -0.025em;
    background: linear-gradient(135deg, #1e293b 0%, #475569 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.chart-subtitle {
    color: #64748b !important;
    margin: 0 !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    opacity: 0.8;
}

.chart-actions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

.refresh-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    border: none !important;
    color: white !important;
    font-weight: 600 !important;
    border-radius: 10px !important;
    transition: all 0.2s ease;
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.3);
    padding: 0.5rem 1rem !important;
}

.refresh-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%) !important;
}

/* ApexChart Container - Enhanced */
.apex-chart-container {
    position: relative;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 250, 252, 0.9) 100%);
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.5);
    backdrop-filter: blur(8px);
    padding: 1rem;
    margin: 0.5rem 0;
    overflow: visible;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.05);
}

/* ApexCharts Global Overrides */
.apex-chart-container .apexcharts-canvas {
    border-radius: 8px;
}

.apex-chart-container .apexcharts-legend {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 500 !important;
    font-size: 0.875rem !important;
}

.apex-chart-container .apexcharts-legend-text {
    color: #374151 !important;
}

.apex-chart-container .apexcharts-tooltip {
    background: rgba(255, 255, 255, 0.95) !important;
    border: 1px solid rgba(226, 232, 240, 0.8) !important;
    border-radius: 8px !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15) !important;
    backdrop-filter: blur(10px);
}

.apex-chart-container .apexcharts-tooltip-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    font-weight: 600 !important;
    margin: 0 !important;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px 8px 0 0 !important;
}

.apex-chart-container .apexcharts-tooltip-series-group {
    padding: 0.5rem 0.75rem !important;
}

/* Donut Chart Enhancements */
.apex-chart-container .apexcharts-pie-label {
    font-weight: 600 !important;
    font-size: 0.9rem !important;
    fill: #1f2937 !important;
}

/* Bar Chart Enhancements */
.apex-chart-container .apexcharts-bar-area {
    transition: all 0.3s ease;
}

/* Line Chart Enhancements */
.apex-chart-container .apexcharts-line {
    stroke-width: 3px;
}

.apex-chart-container .apexcharts-point {
    stroke-width: 4px;
    transition: all 0.2s ease;
}

/* Area Chart Enhancements */
.apex-chart-container .apexcharts-area {
    fill-opacity: 0.3;
    transition: all 0.3s ease;
}

/* Empty State */
.empty-state {
    text-align: center;
    color: #9ca3af;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 1.5rem;
    padding: 3rem;
    background: linear-gradient(135deg, rgba(243, 244, 246, 0.5) 0%, rgba(249, 250, 251, 0.5) 100%);
    border-radius: 12px;
    border: 2px dashed rgba(203, 213, 225, 0.6);
}

.empty-icon {
    font-size: 3.5rem;
    opacity: 0.6;
    background: linear-gradient(135deg, #d1d5db 0%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.empty-text {
    margin: 0;
    color: #6b7280;
    font-weight: 600;
    font-size: 1.1rem;
}

.empty-subtext {
    margin: 0;
    color: #9ca3af;
    font-size: 0.9rem;
    max-width: 300px;
    line-height: 1.5;
}

/* Footer */
.chart-footer {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(229, 231, 235, 0.6);
    background: linear-gradient(90deg, transparent 0%, rgba(249, 250, 251, 0.8) 50%, transparent 100%);
    margin: 1rem -2rem -2rem -2rem;
    padding: 1.5rem 2rem;
    border-radius: 0 0 16px 16px;
}

.footer-text {
    color: #6b7280;
    margin: 0;
    font-style: italic;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Dark Theme Support */
[data-theme="dark"] .modern-apex-chart-card {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.98) 0%, rgba(15, 23, 42, 0.98) 100%) !important;
    border-color: rgba(51, 65, 85, 0.5) !important;
}

[data-theme="dark"] .chart-title {
    background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 50%, #667eea 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="dark"] .chart-subtitle {
    color: #94a3b8 !important;
}

[data-theme="dark"] .apex-chart-container {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.5) 0%, rgba(30, 41, 59, 0.5) 100%);
    border-color: rgba(71, 85, 105, 0.6);
}

[data-theme="dark"] .empty-state {
    background: linear-gradient(135deg, rgba(51, 65, 85, 0.3) 0%, rgba(30, 41, 59, 0.3) 100%);
    border-color: rgba(71, 85, 105, 0.6);
}

/* Responsive Design */
@media screen and (max-width: 768px) {
    .modern-apex-chart-card {
        padding: 1.5rem !important;
        border-radius: 12px !important;
    }
    
    .chart-title {
        font-size: 1.1rem !important;
    }
    
    .chart-actions {
        justify-content: center;
        margin-top: 1rem;
    }
    
    .apex-chart-container {
        padding: 0.75rem;
        margin: 0.25rem 0;
    }
    
    .empty-state {
        padding: 2rem 1rem;
    }
    
    .empty-icon {
        font-size: 2.5rem;
    }
    
    .empty-text {
        font-size: 1rem;
    }
    
    .empty-subtext {
        font-size: 0.8rem;
    }
}

/* Animation Enhancements */
@keyframes chartFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.apex-chart-container > div {
    animation: chartFadeIn 0.6s ease-out;
}

/* Performance Optimizations */
.modern-apex-chart-card {
    will-change: transform;
    transform: translateZ(0);
}

.apex-chart-container {
    contain: layout style paint;
}

/* Gauge Chart */
.gauge-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.custom-gauge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.gauge-label {
    margin-top: 0.5rem;
}

/* Dark theme support */
.dark .modern-apex-chart-card {
    background: linear-gradient(135deg, rgba(30,30,30,0.98) 0%, rgba(40,40,40,0.98) 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}