/* Основные стили */
body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f5f5f5;
    display: flex;
    min-height: 100vh;
}

/* Боковое меню */
.sidebar {
    width: 250px;
    background: #2c3e50;
    color: white;
    transition: all 0.3s;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    padding: 20px;
    background: #1a252f;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-placeholder {
    font-size: 20px;
    font-weight: bold;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: space-between;
    height: 20px;
}

.sidebar-toggle span {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
}

.sidebar-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-nav li {
    padding: 15px 20px;
    border-bottom: 1px solid #34495e;
}

.sidebar-nav li.active {
    background: #34495e;
}

.sidebar-nav a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
}

.sidebar-nav i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    padding: 15px;
    background: #1a252f;
}

.user-info {
    display: flex;
    align-items: center;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #7f8c8d;
    margin-right: 10px;
}

/* Основное содержимое */
.main-content {
    margin-left: 250px;
    flex: 1;
    transition: all 0.3s;
}

.container {
    max-width: 80%;
    margin: 50px auto;
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Остальные стили (из предыдущей версии) */
.view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}

/* ... (остальные стили из предыдущей версии) ... */
h1 {
    text-align: center;
    color: #333;
    margin-bottom: 30px;
}
.controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
}
.control-group {
    display: flex;
    flex-direction: column;
}
.view-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}
.view-toggle button {
    padding: 10px 20px;
    border: none;
    background: #eee;
    cursor: pointer;
    font-size: 16px;
    border-radius: 4px;
    transition: all 0.3s;
}
.view-toggle button.active {
    background: #2196F3;
    color: white;
}
.data-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    gap: 10px;
    flex-wrap: wrap;
}
.data-toggle button {
    padding: 8px 15px;
    border: none;
    background: #e0e0e0;
    cursor: pointer;
    font-size: 14px;
    border-radius: 4px;
    transition: all 0.3s;
}
.data-toggle button.active {
    background: #2196F3;
    color: white;
}
.data-toggle button.costs {
    background: #2196F3;
    color: white;
}
label {
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}
select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    min-width: 150px;
}
.chart-container {
    position: relative;
    height: 500px;
    margin-bottom: 30px;
}
.legend-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
}
.legend-item {
    display: flex;
    align-items: center;
    padding: 5px 10px;
    background: #f9f9f9;
    border-radius: 4px;
}
.legend-color {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    border-radius: 3px;
}
.loading {
    text-align: center;
    padding: 20px;
    font-size: 18px;
    color: #666;
}
.error-message {
    color: #d32f2f;
    text-align: center;
    padding: 15px;
    background: #ffebee;
    border-radius: 4px;
    margin: 20px 0;
}


/*  */
/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 80%;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar-toggle {
        display: flex;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .controls {
        flex-direction: column;
        align-items: center;
    }
    
    .chart-container {
        height: 400px;
    }
    
    .data-toggle {
        flex-direction: column;
        align-items: center;
    }
    
    .data-toggle button {
        width: 100%;
        margin-bottom: 5px;
    }
}