/* ===== SIDEBAR STYLES ===== */
/*
 * Стили для боковой панели дашборда
 * 
 * Содержит:
 * - Основная структура сайдбара
 * - Селектор кабинетов с dropdown
 * - Навигационное меню
 * - Профиль пользователя и поддержка
 * - Мобильная адаптивность сайдбара
 */

/* ===== САЙДБАР ===== */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: #1a1a2e;
    border-right: 1px solid var(--border);
    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    padding: 0 1.25rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--primary), var(--secondary-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
    text-decoration: none;
    transition: all 0.3s ease;
}

.sidebar-brand:hover {
    text-decoration: none;
    transform: scale(1.05);
    text-shadow: 0 0 20px rgba(102, 126, 234, 0.5);
}

.sidebar-brand i {
    background: linear-gradient(45deg, var(--primary), var(--secondary-alt));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-right: 0.5rem;
    animation: sidebar-brand-spin 3s linear infinite;
}

@keyframes sidebar-brand-spin {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

.brand-text {
    font-weight: 700;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    margin-right: 0.5rem;
    transition: all 0.3s ease;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

/* ===== СЕЛЕКТОР КАБИНЕТОВ ===== */
.cabinet-selector {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border);
}

.cabinet-selector-header {
    margin-bottom: 0.75rem;
}

.cabinet-selector-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cabinet-selector .dropdown {
    width: 100%;
    /* Убираем position: relative чтобы не мешать Bootstrap позиционированию */
}

.cabinet-selector-btn {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 0.875rem 1rem;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
    font-size: 0.875rem;
    text-align: left;
    position: relative;
    overflow: hidden;
}

.cabinet-selector-btn:hover,
.cabinet-selector-btn:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: var(--border-light);
    color: var(--text-primary);
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.2);
}

.cabinet-selector-btn[aria-expanded="true"] {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 1px rgba(102, 126, 234, 0.3);
}

.cabinet-selector-content {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.cabinet-avatar {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
    font-size: 0.875rem;
    color: white;
    position: relative;
    overflow: hidden;
}

.cabinet-avatar::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: var(--transition);
    opacity: 0;
}

.cabinet-selector-btn:hover .cabinet-avatar::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

@keyframes shimmer {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    100% { transform: translateX(100%) translateY(100%) rotate(45deg); }
}

.cabinet-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cabinet-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    flex: 1;
    min-width: 0;
}

.cabinet-status {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    flex: 1;
    min-width: 0;
}

.cabinet-selector-arrow {
    color: var(--text-secondary);
    font-size: 0.75rem;
    transition: var(--transition);
    margin-left: 0.5rem;
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.cabinet-selector-btn[aria-expanded="true"] .cabinet-selector-arrow {
    transform: rotate(180deg);
    color: var(--primary);
}

/* Dropdown меню для кабинетов */
.cabinet-dropdown {
    background: #1a1a2e !important;
    border: 1px solid var(--border) !important;
    border-radius: var(--radius-lg) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4) !important;
    padding: 0.5rem 0 !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    backdrop-filter: blur(10px) !important;
    z-index: 1050 !important;
    
    /* Увеличенные размеры для десктопа */
    width: 350px !important;
    min-width: 320px !important;
    
    /* Убираем стандартные стили Bootstrap dropdown */
    font-size: inherit !important;
    color: var(--text-primary) !important;
}

/* Дополнительные стили для предотвращения overflow */
.cabinet-selector {
    overflow: visible;
}

.sidebar {
    overflow-x: visible;
}

/* Адаптивные стили для статус-текста */
.cabinet-status .status-text,
.cabinet-option-details .status-text {
    word-break: break-word;
    hyphens: auto;
}

/* Для особо длинных статусов на очень маленьких экранах */
@media (max-width: 320px) {
    .status-text {
        font-size: 0.55rem;
        line-height: 1.1;
    }
    
    .cabinet-option-details .status-text {
        font-size: 0.6rem;
    }
}


/* Класс для мобильного позиционирования */
.cabinet-dropdown.mobile-positioned {
    position: fixed !important;
    z-index: 9999 !important;
}

.cabinet-dropdown::-webkit-scrollbar {
    width: 6px;
}

.cabinet-dropdown::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.cabinet-dropdown::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}

.cabinet-dropdown::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}

.cabinet-dropdown .dropdown-header {
    padding: 0.75rem 1rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
}

.cabinet-dropdown .dropdown-divider {
    margin: 0.5rem 0;
    border-color: var(--border);
}

/* Опции кабинетов */
.cabinet-option {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    transition: var(--transition);
    position: relative;
    display: block;
}

.cabinet-option:hover {
    background: rgba(255, 255, 255, 0.06);
}

.cabinet-option.active {
    background: rgba(102, 126, 234, 0.1);
    border-left: 3px solid var(--primary);
}

.cabinet-option.active:hover {
    background: rgba(102, 126, 234, 0.15);
}

.cabinet-option-content {
    display: flex;
    align-items: center;
    position: relative;
}

.cabinet-option-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
    font-size: 0.75rem;
    color: white;
    transition: var(--transition);
}

.cabinet-option-avatar.inactive {
    background: #6b7280;
}

.cabinet-option-avatar.error {
    background: var(--danger);
}

/* Стили для разных маркетплейсов */
.cabinet-avatar.marketplace-wb,
.cabinet-option-avatar.marketplace-wb {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
}

.cabinet-avatar.marketplace-ozon,
.cabinet-option-avatar.marketplace-ozon {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
}

/* Заголовки групп маркетплейсов */
.marketplace-header {
    color: var(--text-primary) !important;
    font-weight: 700;
    font-size: 0.8rem !important;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

/* Дополнительная информация о маркетплейсе */
.cabinet-marketplace {
    color: var(--text-muted);
    font-size: 0.65rem;
    margin-left: auto;
    padding-left: 0.5rem;
    border-left: 1px solid var(--border);
    opacity: 0.8;
}

.cabinet-option:hover .cabinet-option-avatar {
    transform: scale(1.05);
}

.cabinet-option-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cabinet-option-name {
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    font-size: 0.875rem;
    flex: 1;
    min-width: 0;
}

.cabinet-option-details {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.75rem;
    flex: 1;
    min-width: 0;
}

.cabinet-option-check {
    color: var(--primary);
    font-size: 0.875rem;
    margin-left: 0.5rem;
    opacity: 0;
    transition: var(--transition);
    flex-shrink: 0;
    width: 20px;
    text-align: center;
}

.cabinet-option.active .cabinet-option-check {
    opacity: 1;
}

/* Состояние пустого списка кабинетов */
.cabinet-empty-state {
    padding: 1.5rem 1rem;
    text-align: center;
    color: var(--text-secondary);
}

.cabinet-empty-icon {
    font-size: 2rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
    opacity: 0.6;
}

.cabinet-empty-text p {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.cabinet-empty-text small {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Кнопка добавления кабинета */
.cabinet-add {
    width: 100%;
    background: none;
    border: none;
    padding: 0.75rem 1rem;
    text-align: left;
    transition: var(--transition);
    color: var(--text-secondary);
}

.cabinet-add:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.cabinet-add-content {
    display: flex;
    align-items: center;
}

.cabinet-add-icon {
    width: 32px;
    height: 32px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    transition: var(--transition);
    font-size: 0.75rem;
}

.cabinet-add:hover .cabinet-add-icon {
    background: rgba(102, 126, 234, 0.1);
    border-color: var(--primary);
    color: var(--primary);
}

.cabinet-add-text {
    font-weight: 500;
    font-size: 0.875rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    flex-shrink: 0;
    animation: pulse 2s infinite;
    margin-right: 2px;
}

.status-dot.active {
    background: var(--success);
}

.status-dot.inactive {
    background: #6b7280;
    animation: none;
}

.status-dot.error {
    background: var(--danger);
}

.status-dot.loading {
    background: #fbbf24;
    animation: pulse 1.5s infinite;
}

.status-text {
    font-size: 0.65rem;
    color: var(--text-secondary);
    line-height: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
    min-width: 0;
}



/* ===== НАВИГАЦИЯ ===== */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.sidebar-nav .nav {
    padding: 0 1rem;
}

.sidebar-nav .nav-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 0.25rem;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    transform: translateX(3px);
}

.sidebar-nav .nav-link.active {
    background: rgba(102, 126, 234, 0.15);
    color: var(--primary);
    transform: translateX(3px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.sidebar-nav .nav-link:hover i,
.sidebar-nav .nav-link.active i {
    transform: scale(1.1);
}

/* ===== НИЖНЯЯ ЧАСТЬ САЙДБАРА ===== */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.02);
}

/* ===== ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ В САЙДБАРЕ ===== */
.sidebar-footer .user-profile-sidebar {
    margin-bottom: 1rem;
}

.sidebar-footer .user-profile-btn-sidebar {
    width: 100%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    height: auto;
    text-align: left;
}


.sidebar-footer .user-profile-btn-sidebar:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.sidebar-footer .user-profile-btn-sidebar[aria-expanded="true"] {
    background: rgba(102, 126, 234, 0.08);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
}

.sidebar-footer .user-profile-btn-sidebar .user-dropdown-arrow {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: transform 0.3s ease;
}

.sidebar-footer .user-profile-btn-sidebar[aria-expanded="true"] .user-dropdown-arrow {
    transform: translateY(-50%) rotate(180deg);
}

.sidebar-footer .user-avatar-sidebar {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    position: relative;
    transition: all 0.3s ease;
}

.sidebar-footer .user-profile-btn-sidebar:hover .user-avatar-sidebar {
    transform: scale(1.05);
}

.sidebar-footer .user-avatar-sidebar::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    border: 2px solid #1a1a2e;
    animation: pulse 2s infinite;
}

.sidebar-footer .user-info-sidebar {
    flex: 1;
    overflow: hidden;
    padding-right: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 40px;
}

.sidebar-footer .user-name-sidebar {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
    display: block;
}

.sidebar-footer .user-status-sidebar {
    font-size: 0.7rem;
    color: var(--success);
    display: flex;
    align-items: center;
    gap: 0.25rem;
    line-height: 1;
    margin: 0;
    padding: 0;
}

.sidebar-footer .user-status-sidebar::before {
    content: '';
    width: 6px;
    height: 6px;
    min-width: 6px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s infinite;
    flex-shrink: 0;
    display: inline-block;
}

/* ===== КНОПКИ В ФУТЕРЕ САЙДБАРА ===== */
.sidebar-footer .support-section {
    margin: 0 0 0.75rem 0;
}

/* Кнопка инструкций */
.sidebar-footer .support-section:first-of-type {
    margin-bottom: 0.75rem;
}

.sidebar-footer .support-section:last-of-type {
    margin-bottom: 0;
}

.sidebar-footer .support-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
    position: relative;
    transition: all 0.3s ease;
}

.sidebar-footer .support-btn:hover {
    background: rgba(16, 185, 129, 0.15);
    color: var(--text-primary);
    border-color: var(--success);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.15);
}

.sidebar-footer .support-icon {
    width: 32px;
    height: 32px;
    min-width: 32px;
    background: var(--success);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 0.9rem;
    margin-right: 0.75rem;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.sidebar-footer .support-btn:hover .support-icon {
    transform: scale(1.05);
}

.sidebar-footer .support-text {
    flex: 1;
    overflow: hidden;
    padding-right: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 32px;
}

.sidebar-footer .support-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.1;
    margin: 0;
    padding: 0;
}

.sidebar-footer .support-arrow {
    color: var(--text-secondary);
    font-size: 0.8rem;
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.sidebar-footer .support-btn:hover .support-arrow {
    color: var(--success);
    transform: translateY(-50%) scale(1.1);
}

/* Специальные стили для кнопки инструкций */
.sidebar-footer .instructions-section .instructions-btn {
    background: rgba(6, 182, 212, 0.1);
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.sidebar-footer .instructions-section .instructions-btn:hover {
    background: rgba(6, 182, 212, 0.15);
    border-color: #06b6d4;
    box-shadow: 0 8px 25px rgba(6, 182, 212, 0.15);
}

.sidebar-footer .instructions-section .support-icon {
    background: #06b6d4;
}

.sidebar-footer .instructions-section .instructions-btn:hover .support-arrow {
    color: #06b6d4;
}

/* ===== USER DROPDOWN ===== */
.sidebar-footer .user-dropdown {
    background: rgba(26, 26, 46, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    margin-top: 0.5rem;
    z-index: 1050;
    padding: 0.5rem 0;
    width: 100%;
    position: absolute;
    left: 0;
    right: 0;
    overflow: hidden; /* чтобы hover-фон и границы не вылезали за скругления */
}

.sidebar-footer .user-dropdown .dropdown-divider {
    margin: 0.25rem 0;
    opacity: 0.1;
}

.sidebar-footer .user-dropdown .dropdown-item {
    padding: 0.6rem 1rem;
    border-radius: 6px;
    margin: 0.15rem 0.5rem;
    color: var(--text-primary);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    font-size: 0.85rem;
}

.sidebar-footer .user-dropdown .dropdown-item:hover {
    background: rgba(102, 126, 234, 0.1);
    color: var(--primary);
    padding-left: 1.1rem; /* мягкий эффект без сдвига контейнера */
}

.sidebar-footer .user-dropdown .dropdown-item.text-danger:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.sidebar-footer .user-dropdown .dropdown-item i {
    margin-right: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.sidebar-footer .user-dropdown .dropdown-item:hover i {
    color: var(--primary);
    transform: scale(1.1);
}

.sidebar-footer .user-dropdown .dropdown-item.text-danger:hover i {
    color: var(--danger);
    transform: scale(1.1);
}

/* ===== МОБИЛЬНАЯ АДАПТИВНОСТЬ САЙДБАРА ===== */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

.sidebar-open {
    overflow: hidden;
}

@media (max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    /* Чуть увеличиваем высоту хедера и зоны клика на планшетах */
    .sidebar-header {
        height: 100px;
        padding: 0 1rem;
        gap: 0.5rem;
    }
    
    .sidebar-brand {
        font-size: 1.1rem;
        max-width: calc(100% - 48px); /* оставляем место под кнопку */
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }
    
    .sidebar-toggle {
        font-size: 1.25rem;
        padding: 0.6rem;
        flex: 0 0 auto; /* не сжимать кнопку */
    }
    
    .sidebar.active {
        transform: translateX(0);
    }
    
    /* Переопределяем анимации для мобильных устройств */
    .sidebar.animation-sidebar-enter {
        animation: none;
        transform: translateX(0);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .sidebar.animation-sidebar-exit {
        animation: none;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        max-width: 320px;
    }
    
    /* Адаптация селектора кабинетов для планшетов */
    .cabinet-dropdown {
        width: 300px !important;
        max-width: calc(100vw - 40px) !important;
        max-height: 60vh;
        
        /* Позиционирование для планшетов */
        position: fixed !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        top: auto !important;
        margin-top: 8px !important;
    }
    
    /* Убираем ограничения по ширине для планшетов */
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        max-width: none;
    }
    
    /* Адаптация селектора кабинетов для мобильных */
    .cabinet-selector {
        padding: 0.875rem 1rem;
    }
    
    .cabinet-selector-btn {
        padding: 0.75rem 0.875rem;
        font-size: 0.8rem;
    }
    
    .cabinet-avatar {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
        margin-right: 0.625rem;
    }
    
    .cabinet-name {
        font-size: 0.875rem;
        /* Убираем max-width - пусть название занимает доступное место */
    }
    
    .cabinet-status {
        gap: 0.25rem;
        /* Используем flexbox для оптимального распределения места */
        justify-content: flex-start;
    }
    
    .status-text {
        font-size: 0.6rem;
        /* Убираем max-width - пусть статус занимает доступное место */
    }
    
    .cabinet-dropdown {
        width: calc(100vw - 32px) !important;
        min-width: auto !important;
        max-height: 50vh;
        max-width: none !important;
        
        /* Позиционирование для мобильных */
        position: fixed !important;
        left: 16px !important;
        right: 16px !important;
        top: auto !important;
        transform: none !important;
        margin-top: 8px !important;
    }
    
    .cabinet-option {
        padding: 0.625rem 0.875rem;
    }
    
    .cabinet-option-avatar {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        margin-right: 0.625rem;
    }
    
    .cabinet-option-name {
        font-size: 0.8rem;
        /* Убираем max-width - пусть название занимает доступное место */
    }
    
    .cabinet-option-details {
        font-size: 0.65rem;
        gap: 0.25rem;
        /* Оптимизация распределения места на мобильных */
        justify-content: flex-start;
        align-items: center;
    }
    
    /* Убираем ограничения для статус-текста в опциях кабинета */
    
    .cabinet-add {
        padding: 0.625rem 0.875rem;
    }
    
    .cabinet-add-icon {
        width: 28px;
        height: 28px;
        font-size: 0.7rem;
        margin-right: 0.625rem;
    }
    
    .cabinet-add-text {
        font-size: 0.8rem;
    }
}

/* Дополнительные стили для очень маленьких экранов */
@media (max-width: 375px) {
    /* Для очень маленьких экранов тоже убираем ограничения */
    
    .cabinet-dropdown {
        width: calc(100vw - 16px) !important;
        left: 8px !important;
        right: 8px !important;
        position: fixed !important;
        top: auto !important;
        transform: none !important;
        margin-top: 8px !important;
    }
} 