/* Основные стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0f0f0f 100%);
    color: #ffffff;
    min-height: 100vh;
    overflow-x: hidden;
}

.analytics-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Заголовок */
.analytics-header {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 20px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(76, 175, 80, 0.3);
}

.header-icon i {
    font-size: 36px;
    color: #ffffff;
}

.header-text h1 {
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 8px;
    background: linear-gradient(45deg, #ffffff, #cccccc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-text p {
    color: #cccccc;
    font-size: 16px;
}

/* Метрики */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.metric-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
}

.metric-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.metric-icon i {
    font-size: 24px;
    color: #ffffff;
}

.metric-content h3 {
    font-size: 14px;
    color: #cccccc;
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 5px;
}

.metric-change {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 600;
}

.metric-change.positive {
    color: #4caf50;
}

.metric-change.negative {
    color: #f44336;
}

.metric-change i {
    font-size: 10px;
}

/* Графики */
.charts-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.chart-container {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.chart-controls {
    display: flex;
    gap: 10px;
}

.chart-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #cccccc;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 12px;
}

.chart-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
}

.chart-btn.active {
    background: #4caf50;
    color: #ffffff;
    border-color: #4caf50;
}

.chart-wrapper {
    position: relative;
    height: 300px;
}

/* Последние действия */
.recent-activity {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.section-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: #ffffff;
}

.refresh-btn {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border: none;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
}

.refresh-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(76, 175, 80, 0.3);
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.activity-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(5px);
}

.activity-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-icon i {
    font-size: 16px;
    color: #ffffff;
}

.activity-content h4 {
    font-size: 14px;
    color: #ffffff;
    margin-bottom: 5px;
}

.activity-content p {
    font-size: 12px;
    color: #cccccc;
}

.activity-time {
    margin-left: auto;
    font-size: 12px;
    color: #888888;
}

/* Фильтры */
.filters-section {
    background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
    border-radius: 15px;
    padding: 25px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.filter-group label {
    font-size: 14px;
    color: #cccccc;
    font-weight: 500;
}

.filter-group select {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-group select:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.filter-group select:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* Адаптивность */
@media (max-width: 768px) {
    .analytics-container {
        padding: 15px;
    }
    
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .header-icon {
        width: 60px;
        height: 60px;
    }
    
    .header-icon i {
        font-size: 28px;
    }
    
    .header-text h1 {
        font-size: 24px;
    }
    
    .metrics-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .charts-section {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .chart-wrapper {
        height: 250px;
    }
    
    .filters-section {
        flex-direction: column;
        gap: 20px;
    }
    
    .chart-controls {
        flex-wrap: wrap;
    }
    
    .chart-btn {
        font-size: 11px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .analytics-header {
        padding: 20px;
    }
    
    .metric-card {
        padding: 20px;
    }
    
    .chart-container {
        padding: 20px;
    }
    
    .recent-activity {
        padding: 20px;
    }
    
    .filters-section {
        padding: 20px;
    }
}

/* Анимации */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.chart-container,
.recent-activity,
.filters-section {
    animation: fadeIn 0.6s ease-out;
}

/* Скроллбар */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
} 