/* Навигация личного кабинета */
.cabinet-navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(26, 32, 44, 0.25);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    z-index: 1000;
    padding: 0.5rem 1rem;
    overflow: hidden;
    box-sizing: border-box;
}

.cabinet-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    position: relative;
}

/* Левая часть с кнопкой назад */
.cabinet-nav-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cabinet-back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cabinet-back-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-aqua-primary);
    transform: translateX(-3px);
}

.cabinet-back-btn svg {
    width: 20px;
    height: 20px;
}

.cabinet-title {
    font-family: 'Montserrat', 'Inter', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    margin: 0;
}

/* Центральная часть - навигация по вкладкам */
.cabinet-nav-tabs {
    display: flex;
    gap: 0.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.cabinet-nav-tab {
    padding: 0.5rem 1.2rem;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.cabinet-nav-tab:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
    color: white;
    transform: translateY(-2px);
}

.cabinet-nav-tab.active {
    background: linear-gradient(135deg, var(--color-aqua-primary), var(--color-brand-fitness));
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    box-shadow: 0 4px 15px rgba(28, 150, 166, 0.3);
}

/* Правая часть с пользователем */
.cabinet-nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto;
}

.cabinet-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.cabinet-user-name {
    color: white;
    font-weight: 600;
    font-size: 0.95rem;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.cabinet-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-aqua-primary), var(--color-brand-fitness));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cabinet-logout-btn {
    padding: 6px 16px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cabinet-logout-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--color-aqua-primary);
    transform: translateY(-2px);
}

/* Кнопка бургер-меню для мобильных */
.cabinet-mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    margin-left: 15px;
    z-index: 1002;
}

.cabinet-mobile-menu-btn span {
    width: 100%;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Анимация бургера при открытии */
.cabinet-mobile-menu-btn.open span:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.cabinet-mobile-menu-btn.open span:nth-child(2) {
    opacity: 0;
}

.cabinet-mobile-menu-btn.open span:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

/* Мобильное меню */
.cabinet-mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 32, 44, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 1001;
    padding: 80px 2rem 2rem 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.cabinet-mobile-menu.open {
    transform: translateX(0);
}

.cabinet-mobile-menu-header {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 2rem;
    margin-bottom: 2rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cabinet-mobile-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--color-aqua-primary), var(--color-brand-fitness));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cabinet-mobile-user-info h3 {
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
}

.cabinet-mobile-user-info p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

.cabinet-mobile-tab {
    padding: 1rem 0;
    color: white;
    font-weight: 500;
    font-size: 1.1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.cabinet-mobile-tab:last-child {
    border-bottom: none;
}

.cabinet-mobile-tab:hover {
    color: var(--color-aqua-primary);
    padding-left: 1rem;
}

.cabinet-mobile-tab.active {
    color: var(--color-aqua-primary);
    border-left: 3px solid var(--color-aqua-primary);
    padding-left: 1rem;
}

.cabinet-mobile-logout {
    margin-top: 3rem;
    padding: 1rem 0;
    color: #ff6b6b;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    text-align: center;
}

.cabinet-mobile-logout:hover {
    color: #ff4444;
    background: rgba(255, 68, 68, 0.1);
    border-radius: 10px;
}

/* Скрываем старую навигацию по вкладкам */
.cabinet-nav {
    display: none !important;
}

/* Адаптивность для мобильных */
@media (max-width: 768px) {
    .cabinet-nav-tabs {
        display: none; /* Прячем центральное меню на мобильных */
    }

    .cabinet-mobile-menu-btn {
        display: flex; /* Показываем бургер */
    }

    .cabinet-nav-container {
        height: 50px;
    }

    .cabinet-title {
        font-size: 1.1rem;
    }

    .cabinet-user-name {
        font-size: 0.9rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .cabinet-user-avatar {
        width: 32px;
        height: 32px;
        font-size: 1rem;
    }

    .cabinet-logout-btn {
        display: none; /* Прячем кнопку выхода на мобильных */
    }

    .cabinet-back-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .cabinet-title {
        font-size: 1rem;
    }
}

/* Скрываем элементы по умолчанию */
.cabinet-nav-right {
    display: none;
}

.cabinet-nav-right.visible {
    display: flex;
}

.cabinet-mobile-menu {
    display: block; /* Меню всегда в DOM, но скрыто через transform */
}