/* Analytics Dashboard Styles */

.analytics-dashboard {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.dashboard-header {
    text-align: center;
    margin-bottom: 40px;
    color: white;
}

.dashboard-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.dashboard-header p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 0;
}

.dashboard-content {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
}

.dashboard-section {
    margin-bottom: 40px;
}

.dashboard-section h2 {
    font-size: 1.8rem;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid #3b82f6;
    display: inline-block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

.stat-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 10px;
    opacity: 0.9;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.chart-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.chart-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-container:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

/* Chart Renderer Styles */
.chart-container {
    position: relative;
    overflow: hidden;
}

.chart-wrapper {
    background: white;
    border-radius: 10px;
    overflow: hidden;
}

.chart-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 20px 0;
    padding: 20px 20px 0 20px;
}

.chart-content {
    padding: 0 20px 20px 20px;
}

.chart-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6b7280;
    font-size: 1.1rem;
}

.chart-error {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #ef4444;
    font-size: 1.1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
}

/* SVG Chart Styles */
.chart-area {
    font-family: 'Inter', sans-serif;
}

.bar {
    transition: opacity 0.3s ease;
}

.bar:hover {
    opacity: 0.8;
}

.bar-label {
    font-size: 12px;
    fill: #6b7280;
    font-weight: 500;
}

.bar-value {
    font-size: 11px;
    fill: #374151;
    font-weight: 600;
}

.pie-slice {
    transition: transform 0.3s ease;
}

.pie-slice:hover {
    transform: scale(1.05);
}

.slice-label {
    font-size: 12px;
    fill: white;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.scatter-point {
    transition: transform 0.3s ease;
}

.scatter-point:hover {
    transform: scale(1.2);
}

.point-label {
    font-size: 11px;
    fill: #374151;
    font-weight: 500;
}

/* Legend Styles */
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    padding: 15px;
    background: #f9fafb;
    border-radius: 8px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #374151;
}

.legend-color {
    width: 16px;
    height: 16px;
    border-radius: 4px;
    border: 2px solid white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.legend-label {
    font-weight: 500;
}

.legend-value {
    font-weight: 600;
    color: #1f2937;
}

/* Loading and Error States */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6b7280;
    font-size: 1.1rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
    color: #dc2626;
}

/* Quick Actions */
.actions-grid {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.action-button {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.action-button:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.action-button:active {
    transform: translateY(0);
}

/* Responsive Design */
@media (max-width: 768px) {
    .analytics-dashboard {
        padding: 10px;
    }
    
    .dashboard-header h1 {
        font-size: 2rem;
    }
    
    .dashboard-content {
        padding: 20px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-container {
        padding: 15px;
    }
    
    .actions-grid {
        flex-direction: column;
    }
    
    .action-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .dashboard-header h1 {
        font-size: 1.8rem;
    }
    
    .dashboard-header p {
        font-size: 1rem;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .chart-title {
        font-size: 1.2rem;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dashboard-section {
    animation: fadeIn 0.6s ease-out;
}

.dashboard-section:nth-child(1) { animation-delay: 0.1s; }
.dashboard-section:nth-child(2) { animation-delay: 0.2s; }
.dashboard-section:nth-child(3) { animation-delay: 0.3s; }
.dashboard-section:nth-child(4) { animation-delay: 0.4s; }
.dashboard-section:nth-child(5) { animation-delay: 0.5s; }

/* Chart Placeholder Styles */
.radar-chart-placeholder,
.heatmap-chart-placeholder,
.generic-chart-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background: #f9fafb;
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    color: #6b7280;
    text-align: center;
}

.radar-chart-placeholder p,
.heatmap-chart-placeholder p,
.generic-chart-placeholder p {
    margin: 5px 0;
    font-size: 14px;
}

/* Custom Scrollbar */
.dashboard-content::-webkit-scrollbar {
    width: 8px;
}

.dashboard-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.dashboard-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.dashboard-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
} 