/* ==================== БОКОВОЕ МЕНЮ ==================== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: 80px;
    height: 100vh;
    background: linear-gradient(180deg, #1e3a5f 0%, #2c5f8d 100%);
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.1);
    transition: width 0.3s ease;
    overflow: hidden;
    z-index: 1000;
}

.sidebar:hover {
    width: 280px;
}

.sidebar-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    height: 70px;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container {
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ffffff;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.sidebar:hover .logo-container {
    width: 100%;
}

.sidebar-logo {
    width: 25px;
    height: 25px;
    object-fit: contain;
}

.sidebar:hover .sidebar-logo {
    width: auto;
    max-width: 180px;
    height: 30px;
}

/* Меню */
.sidebar-menu {
    list-style: none;
    padding: 10px 0;
    overflow-y: auto;
    overflow-x: hidden;
    height: calc(100vh - 70px);
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
    scroll-behavior: smooth;
}

/* Кастомный скроллбар для webkit браузеров */
.sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.sidebar-menu::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.menu-item {
    margin: 2px 0;
}

.menu-link {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #ffffff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.menu-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: #4a90e2;
    transform: scaleY(0);
    transition: all 0.3s ease;
}

.menu-link:hover::before,
.menu-link.active::before {
    transform: scaleY(1);
}

.menu-link:hover {
    background: rgba(255, 255, 255, 0.1);
}

.menu-link.active {
    background: rgba(74, 144, 226, 0.2);
}

.menu-link i {
    font-size: 1.2rem;
    min-width: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    flex-shrink: 0;
}

.menu-text {
    white-space: nowrap;
    opacity: 0;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    margin-left: 8px;
    font-size: 0.9rem;
    color: #ffffff;
}

.sidebar:hover .menu-text {
    opacity: 1;
    transform: translateX(0);
}

/* Кнопка бургер-меню */
.burger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    background: #1e3a5f;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    z-index: 1001;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.burger-btn:hover {
    background: #2c5f8d;
}

.burger-btn span {
    width: 25px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.burger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.burger-btn.active span:nth-child(2) {
    opacity: 0;
}

.burger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Оверлей для мобильных */
.menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
}

.menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

/* Планшеты и мобильные */
@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    .sidebar:hover {
        width: 280px;
    }
    
    .sidebar .menu-text {
        opacity: 1;
        transform: translateX(0);
    }
    
    .sidebar .logo-container {
        width: 100%;
    }
    
    .sidebar .sidebar-logo {
        width: auto;
        max-width: 180px;
        height: 30px;
    }
    
    .sidebar .sidebar-menu {
        height: calc(100vh - 70px);
        padding-bottom: 20px;
    }
    
    .burger-btn {
        display: flex;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 260px;
    }
    
    .burger-btn {
        width: 45px;
        height: 45px;
        gap: 5px;
    }
    
    .burger-btn span {
        width: 22px;
    }
}

