/* Основной контейнер меню с исправленными стилями */
.dashboard_sidebar-menu {
    position: fixed;
    left: 80px;
    top: 0;
    width: 320px;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    padding: 24px 0 24px 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 11;
    overflow-y: auto;
    overflow-x: hidden;
    box-shadow: 2px 0 20px rgba(0, 0, 0, 0.15);
    border-radius: 0 16px 16px 0;
}

.dashboard_sidebar-menu.dashboard_open {
    transform: translateX(0);
}

/* Исправлена логика отображения меню */
.dashboard_sidebar-menu.dashboard_pinned {
    transform: translateX(0) !important;
    transition: none;
    box-shadow: 2px 0 30px rgba(0, 0, 0, 0.2);
}

/* Триггер для открытия меню на PC - улучшенный дизайн */
.dashboard_menu-trigger {
    position: fixed;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 80px;
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.9) 0%, rgba(37, 68, 240, 0.9) 100%);
    border-radius: 0 12px 12px 0;
    cursor: pointer;
    z-index: 15;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    box-shadow: 2px 0 10px rgba(15, 51, 239, 0.3);
}

.dashboard_menu-trigger:hover {
    width: 28px;
    opacity: 1;
    box-shadow: 4px 0 20px rgba(15, 51, 239, 0.5);
    transform: translateY(-50%) translateX(2px);
}

.dashboard_menu-trigger::after {
    content: '▶';
    color: white;
    font-size: 14px;
    font-weight: bold;
    transform: rotate(0deg);
    transition: transform 0.3s ease;
}

.dashboard_menu-trigger.dashboard_active::after {
    transform: rotate(180deg);
}

/* Кнопка закрепления меню - улучшенный дизайн */
.dashboard_pin-button {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    background: rgba(15, 51, 239, 0.1);
    border: 2px solid rgba(15, 51, 239, 0.2);
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
}

.dashboard_pin-button:hover {
    background: rgba(15, 51, 239, 0.15);
    border-color: rgba(15, 51, 239, 0.4);
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(15, 51, 239, 0.2);
}

.dashboard_pin-button::after {
    content: '📌';
    font-size: 16px;
    transition: transform 0.3s ease;
}

.dashboard_pin-button.dashboard_pinned {
    background: rgba(15, 51, 239, 0.2);
    border-color: rgba(15, 51, 239, 0.6);
}

.dashboard_pin-button.dashboard_pinned::after {
    transform: rotate(45deg);
}

/* Скрытие элементов на мобильных устройствах */
@media screen and (max-width: 768px) {
    .dashboard_menu-trigger {
        /* display: none; */
        margin-left: 48px;
    }
    
    .dashboard_pin-button {
        display: none;
    }
}

/* Hover эффекты для PC - исправленная логика */
@media screen and (min-width: 769px) {
    .dashboard_sidebar::before {
        content: '';
        position: absolute;
        right: -15px;
        top: 0;
        width: 15px;
        height: 100%;
        background: transparent;
        z-index: 5;
    }
    
    .dashboard_sidebar:hover + .dashboard_sidebar-menu,
    .dashboard_sidebar-menu:hover {
        transform: translateX(0);
    }
    
    .dashboard_sidebar-menu:not(.dashboard_pinned) {
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) 0.2s;
    }
    
    .dashboard_sidebar:hover + .dashboard_sidebar-menu,
    .dashboard_sidebar-menu:hover,
    .dashboard_sidebar-menu.dashboard_open,
    .dashboard_sidebar-menu.dashboard_pinned {
        transition-delay: 0s;
    }
}

/* Адаптивность для различных экранов */
@media screen and (max-width: 1024px) {
    .dashboard_sidebar-menu {
        width: 280px;
        left: 60px;
    }
}

@media screen and (max-width: 768px) {
    .dashboard_sidebar-menu {
        left: 50px;
        width: 240px;
        padding: 16px;
        border-radius: 0 12px 12px 0;
    }
}

/* Мобильная версия с улучшениями */
@media screen and (max-width: 480px) {
    .dashboard_sidebar-menu {
        left: 0;
        width: 100%;
        padding: 20px;
        z-index: 1000;
        background-color: rgba(255, 255, 255, 0.98);
        backdrop-filter: blur(30px);
        border-radius: 0;
        box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    }
    
    .dashboard_sidebar-menu.dashboard_open {
        transform: translateX(0);
    }
    
    .dashboard_logo-text {
        font-size: 14px;
    }
    
    .dashboard_stat-title, .dashboard_rec-title, .dashboard_update-title, .dashboard_update-message {
        font-size: 12px;
    }
    
    .dashboard_stat-value, .dashboard_rec-count {
        font-size: 20px;
    }
    
    .dashboard_menu-text {
        font-size: 14px;
    }
}

@media screen and (max-width: 360px) {
    .dashboard_sidebar-menu {
        padding: 16px;
    }
    
    .dashboard_user-icon {
        width: 32px;
        height: 32px;
        padding: 6px;
    }
    
    .dashboard_logo-text {
        font-size: 12px;
    }
    
    .dashboard_stat-title, .dashboard_rec-title, .dashboard_update-title, .dashboard_update-message {
        font-size: 11px;
    }
    
    .dashboard_stat-value, .dashboard_rec-count {
        font-size: 18px;
    }
    
    .dashboard_menu-text {
        font-size: 12px;
    }
}

/* Заголовок меню */
.dashboard_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 8px;
    position: relative;
    padding-right: 40px; /* Место для pin-button */
}

.dashboard_user-info {
    display: flex;
    align-items: center;
    padding: 0 24px 0 24px;
    gap: 16px;
}

.dashboard_user-icon {
    width: 40px;
    height: 40px;
    border: 2px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.05) 0%, rgba(15, 51, 239, 0.1) 100%);
}

.dashboard_user-icon:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(15, 51, 239, 0.3);
    border-color: var(--primary-color);
}

.dashboard_user-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) saturate(100%) invert(12%) sepia(90%) saturate(5137%) hue-rotate(226deg) brightness(91%) contrast(98%);
}

.dashboard_logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 14px;
    color: var(--black-color);
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, var(--primary-color), #4D68F3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard_logo-text:hover {
    transform: scale(1.05);
    filter: brightness(1.2);
}

/* Статистические карточки с улучшенным дизайном */
.dashboard_stat-cards {
    display: flex;
    flex-direction: column;
    /* gap: 8px; */
    width: 100%;
}

.dashboard_stat-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(15, 51, 239, 0.15);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.8) 100%);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dashboard_stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15, 51, 239, 0.05), transparent);
    transition: left 0.5s ease;
}

.dashboard_stat-card:hover::before {
    left: 100%;
}

.dashboard_stat-card:hover {
    /* transform: translateY(-3px); */
    transform: none;
    box-shadow: 0 12px 30px rgba(15, 51, 239, 0.2);
    border-color: rgba(15, 51, 239, 0.3);
}

.dashboard_stat-card:active {
    /* transform: translateY(-1px); */
    box-shadow: 0 8px 20px rgba(15, 51, 239, 0.15);
}

.dashboard_stat-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--black-color);
    transition: color 0.2s ease;
    max-width: 160px;
    line-height: 1.3;
}

.dashboard_stat-value {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: var(--primary-color);
    transition: all 0.3s ease;
    min-width: 30px;
    text-align: right;
}

.dashboard_stat-card:hover .dashboard_stat-value {
    transform: scale(1.1);
    filter: brightness(1.2);
}

/* Рекомендационная карточка */
.dashboard_recommendation-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 14px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.85) 100%);
    backdrop-filter: blur(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.dashboard_recommendation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(16, 185, 129, 0.05), transparent);
    transition: left 0.5s ease;
}

.dashboard_recommendation-card:hover::before {
    left: 100%;
}

.dashboard_recommendation-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 30px rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.3);
}

.dashboard_rec-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard_rec-info img {
    transition: transform 0.3s ease;
    width: 20px;
    height: 20px;
}

.dashboard_recommendation-card:hover .dashboard_rec-info img {
    transform: scale(1.15) rotate(5deg);
}

.dashboard_rec-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--black-color);
    max-width: 180px;
    line-height: 1.3;
}

.dashboard_rec-count {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 22px;
    color: #10B981;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1) 0%, rgba(16, 185, 129, 0.2) 100%);
    border-radius: 50%;
    transition: all 0.3s ease;
    min-width: 36px;
}

.dashboard_recommendation-card:hover .dashboard_rec-count {
    transform: scale(1.2);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(16, 185, 129, 0.3) 100%);
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

/* Ссылки меню с улучшенными эффектами */
.dashboard_menu-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
}

.dashboard_menu-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    text-decoration: none;
    padding: 12px 12px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    background: transparent;
}

.dashboard_menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(15, 51, 239, 0.08), transparent);
    transition: left 0.6s ease;
}

.dashboard_menu-item:hover::before {
    left: 100%;
}

.dashboard_menu-item:hover {
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.05) 0%, rgba(15, 51, 239, 0.08) 100%);
    transform: translateX(6px);
    box-shadow: 0 6px 20px rgba(15, 51, 239, 0.15);
    border-left: 3px solid var(--primary-color);
    padding-left: 9px;
}

.dashboard_menu-item:active {
    transform: translateX(3px) scale(0.98);
}

.dashboard_menu-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(15, 51, 239, 0.2), transparent);
    margin: 6px 0;
    opacity: 0.6;
}

.dashboard_menu-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: var(--primary-color);
    transition: all 0.3s ease;
    flex: 1;
    padding-right: 10px;
}

.dashboard_menu-item:hover .dashboard_menu-text {
    color: var(--primary-color);
    font-weight: 700;
    transform: translateX(2px);
}

.dashboard_arrow-icon {
    width: 18px;
    height: 18px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.7;
    flex-shrink: 0;
}

.dashboard_menu-item:hover .dashboard_arrow-icon {
    transform: translateX(4px);
    opacity: 1;
    filter: brightness(1.2);
}

/* Выпадающие подменю с улучшенной анимацией */
.dashboard_menu-item-dropdown {
    position: relative;
    width: 100%;
}

.dashboard_menu-item-dropdown.dashboard_active .dashboard_menu-item {
    background: linear-gradient(135deg, #0F33EF 0%, #2544F0 100%);
    color: white;
    transform: translateX(6px);
    box-shadow: 0 8px 25px rgba(15, 51, 239, 0.4);
    border-left: 3px solid rgba(255, 255, 255, 0.8);
}

.dashboard_menu-item-dropdown.dashboard_active .dashboard_menu-text {
    color: #FFFFFF;
    font-weight: 700;
}

.dashboard_menu-item-dropdown.dashboard_active .dashboard_arrow-icon {
    filter: brightness(0) invert(1);
    transform: rotate(180deg);
}

.dashboard_submenu {
    display: none;
    flex-direction: column;
    gap: 2px;
    padding: 8px 0 8px 24px;
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.02) 0%, rgba(15, 51, 239, 0.05) 100%);
    border-radius: 0 0 8px 8px;
    margin-top: 4px;
    border-left: 2px solid rgba(15, 51, 239, 0.2);
    animation: dashboard_slideDown 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.dashboard_submenu.dashboard_active {
    display: flex;
}

@keyframes dashboard_slideDown {
    from {
        opacity: 0;
        transform: translateY(-15px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 300px;
    }
}

.dashboard_submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    padding: 0px 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    margin: 1px 0;
}

.dashboard_submenu-item:hover {
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.08) 0%, rgba(15, 51, 239, 0.12) 100%);
    /* transform: translateX(6px); */
    box-shadow: 0 3px 10px rgba(15, 51, 239, 0.1);
}

.dashboard_submenu-item:active {
    transform: translateX(3px) scale(0.98);
}

.dashboard_bullet {
    font-size: 16px;
    color: var(--primary-color);
    transition: all 0.3s ease;
    width: 16px;
    text-align: center;
}

.dashboard_submenu-item:hover .dashboard_bullet {
    color: var(--primary-color);
    transform: scale(1.3);
    text-shadow: 0 0 8px rgba(15, 51, 239, 0.5);
}

.dashboard_submenu-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: #666666;
    transition: all 0.3s ease;
}

.dashboard_submenu-item:hover .dashboard_submenu-text {
    color: var(--primary-color);
    font-weight: 600;
}

/* Блок обновления данных с улучшенным дизайном */
.dashboard_data-update {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 95%;
    margin-top: auto;
    margin-left: 10px;
    padding: 16px;
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.05) 0%, rgba(15, 51, 239, 0.1) 100%);
    border-radius: 12px;
    border: 1px solid rgba(15, 51, 239, 0.15);
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.dashboard_data-update:hover {
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.08) 0%, rgba(15, 51, 239, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(15, 51, 239, 0.2);
    border-color: rgba(15, 51, 239, 0.3);
}

.dashboard_update-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.dashboard_refresh-icon {
    color: var(--primary-color);
    transition: transform 0.3s ease;
    width: 16px;
    height: 16px;
}

.dashboard_data-update:hover .dashboard_refresh-icon {
    transform: rotate(180deg);
}

.dashboard_update-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 12px;
    color: var(--black-color);
}

.dashboard_update-message {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 12px;
    color: var(--gray-color);
    line-height: 1.4;
}

.dashboard_highlight {
    color: var(--primary-color);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    padding: 2px 4px;
    border-radius: 4px;
    position: relative;
}

.dashboard_highlight:hover {
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.1) 0%, rgba(15, 51, 239, 0.15) 100%);
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(15, 51, 239, 0.2);
}

/* Интерактивные элементы */
.dashboard_menu-interactive {
    transition: all 0.3s ease;
}

.dashboard_menu-interactive:hover {
    transform: translateY(-1px);
}

/* Улучшенные анимации */
@keyframes dashboard_pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.02);
    }
}

.dashboard_stat-value {
    animation: dashboard_pulse 3s infinite;
}

/* Оптимизация для touch устройств */
@media (hover: none) and (pointer: coarse) {
    .dashboard_menu-item:hover {
        transform: none;
        background: rgba(15, 51, 239, 0.05);
    }
    
    .dashboard_menu-item:active {
        transform: scale(0.98);
        background: rgba(15, 51, 239, 0.1);
    }
    
    .dashboard_sidebar:hover + .dashboard_sidebar-menu {
        transform: translateX(-100%);
    }
    
    .dashboard_stat-card:hover {
        transform: none;
    }
    
    .dashboard_stat-card:active {
        transform: scale(0.98);
    }

    .dashboard_icon-container::before {
        display: none !important;
    }

    .dashboard_icon-container:hover {
        animation: none !important;
    }

    .dashboard_icon-container:hover::before {
        animation: none !important;
    }
}

/* Улучшенный скроллбар для меню */
.dashboard_sidebar-menu::-webkit-scrollbar {
    width: 6px;
}

.dashboard_sidebar-menu::-webkit-scrollbar-track {
    background: rgba(15, 51, 239, 0.05);
    border-radius: 3px;
}

.dashboard_sidebar-menu::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.3) 0%, rgba(15, 51, 239, 0.5) 100%);
    border-radius: 3px;
}

.dashboard_sidebar-menu::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, rgba(15, 51, 239, 0.5) 0%, rgba(15, 51, 239, 0.7) 100%);
}

@media (min-width: 768px) {
    .hidden-on-desktop {
        display: none; /* или другой подходящий тип отображения, например, 'flex', 'grid' и т.д. */
    }
}
