﻿:root {
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --success-gradient: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    --danger-gradient: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    --warning-gradient: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --dark-bg: #1a1d29;
    --card-bg: #252837;
    --border-color: #3d4465;
    --text-light: #a8b3cf;
    --text-white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background: var(--dark-bg);
    color: var(--text-white);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    min-height: 100vh;
    padding: 2rem;
}

.main-container {
    background: var(--card-bg);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-color);
    margin: 0 auto;
    max-width: 1400px;
    overflow: hidden;
}

.header-section {
    background: var(--primary-gradient);
    padding: 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .header-section::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
        opacity: 0.3;
    }

.header-content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.date-time {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 500;
}

.stats-section {
    padding: 2rem;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid var(--border-color);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.stat-card {
    background: rgba(255,255,255,0.05);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

    .stat-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        background: rgba(255,255,255,0.08);
    }

    .stat-card::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: var(--primary-gradient);
    }

    .stat-card.success::before {
        background: var(--success-gradient);
    }

    .stat-card.danger::before {
        background: var(--danger-gradient);
    }

    .stat-card.warning::before {
        background: var(--warning-gradient);
    }

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.success .stat-value {
    background: var(--success-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.danger .stat-value {
    background: var(--danger-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-card.warning .stat-value {
    background: var(--warning-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-light);
    font-weight: 500;
}

.charts-section {
    padding: 2rem;
}

.section-title {
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.charts-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.charts-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.chart-container {
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

    .chart-container:hover {
        background: rgba(255,255,255,0.05);
        border-color: #667eea;
    }

.chart-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-white);
    margin-bottom: 1rem;
    text-align: center;
}

.chart-wrapper {
    position: relative;
    height: 350px;
}

    .chart-wrapper.large {
        height: 400px;
    }

.loading-chart {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-light);
    font-size: 1.1rem;
}

.loading-spinner {
    width: 30px;
    height: 30px;
    border: 3px solid rgba(102, 126, 234, 0.2);
    border-left: 3px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.recent-activity {
    background: rgba(255,255,255,0.03);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    margin-top: 2rem;
}

.activity-item {
    display: flex;
    align-items: center;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

    .activity-item:hover {
        background: rgba(255,255,255,0.05);
        border-color: var(--border-color);
    }

.activity-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--primary-gradient);
    margin-right: 1rem;
    flex-shrink: 0;
}

.activity-text {
    color: var(--text-light);
    flex: 1;
    font-weight: 500;
}

.activity-time {
    color: var(--text-light);
    font-size: 0.875rem;
    opacity: 0.7;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-card, .chart-container, .recent-activity {
    animation: fadeIn 0.6s ease-out forwards;
}

@media (max-width: 768px) {
    body {
        padding: 1rem;
    }

    .main-container {
        border-radius: 15px;
    }

    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    .header-title {
        font-size: 2rem;
    }

    .stats-section, .charts-section {
        padding: 1rem;
    }

    .charts-grid-2 {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 1rem;
    }
}
