/* Dashboard Sidebar Styles */

/* Layout container for sidebar + content */
.dashboard-layout {
    display: flex;
    min-height: calc(100vh - 80px); /* вычитаем высоту header */
    position: relative;
    z-index: 1; /* базовый z-index для всего layout */
}

.dashboard-sidebar {
    width: 260px;
    min-width: 260px;
    background: transparent;
    display: flex;
    flex-direction: column;
    padding-top: 20px;
    z-index: 10; /* sidebar поверх контента, но ниже модалов */
    position: relative; /* для z-index */
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-nav {
    flex: 1;
    padding: 15px 0;
}

.sidebar-nav-items {
    border: solid 1px #22c55e;
    border-radius: 12px;
    margin: 0 10px;
    padding: 5px 0;
    box-shadow: 0 0 10px rgba(34, 197, 94, 0.3);
}

.sidebar-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    margin: 2px 5px;
    color: #bbb6bf;
    text-decoration: none;
    transition: all 0.2s ease;
    border-radius: 4px;
    position: relative;
    cursor: pointer;
    z-index: 11; /* ссылки поверх всего в sidebar */
    pointer-events: auto; /* ВАЖНО: явно разрешаем клики */
}

.sidebar-item:hover {
    background: transparent;
    color: #fff;
    text-decoration: none;
}

.sidebar-item.active {
    background: transparent;
    color: #22c55e;
    margin-left: 5px;
    padding-left: 15px;
}

.sidebar-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #22c55e;
    border-radius: 0 3px 3px 0;
}

.sidebar-icon {
    font-size: 18px;
    min-width: 24px;
    margin-right: 12px;
    text-align: center;
}

.sidebar-text {
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.sidebar-upgrade {
    display: flex;
    align-items: center;
    padding: 15px;
    margin: 15px 10px 10px 10px;
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%);
    border-radius: 10px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(34, 197, 94, 0.2);
}

.sidebar-upgrade:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.3);
    text-decoration: none;
    color: #fff;
}

.sidebar-upgrade .sidebar-icon {
    font-size: 24px;
    margin-right: 12px;
    color: #ffd700;
}

.upgrade-content {
    display: flex;
    flex-direction: column;
}

.upgrade-title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 2px;
}

.upgrade-description {
    font-size: 11px;
    opacity: 0.9;
}

/* Main content area */
.dashboard-main-content {
    flex: 1;
    min-width: 0; /* важно для flexbox */
    max-width: 1400px; /* ограничение ширины */
    padding: 0 20px 0 30px; /* отступы: сверху справа снизу слева */
    position: relative;
    z-index: 5; /* контент ниже sidebar, но выше фона */
}

.dashboard-main-content .container {
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
}

/* Убираем перекрытие для кликабельности */
.dashboard-main-content > * {
    pointer-events: auto;
}

/* Responsive */
@media (max-width: 992px) {
    .dashboard-layout {
        flex-direction: column;
    }
    
    .dashboard-sidebar {
        width: 100%;
        height: auto;
        position: relative;
    }
    
    .dashboard-main-content {
        margin-left: 0;
    }
}

/* Scrollbar styling for sidebar */
.sidebar-content::-webkit-scrollbar {
    width: 6px;
}

.sidebar-content::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-content::-webkit-scrollbar-thumb {
    background: #2d2c37;
    border-radius: 3px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: #3d3c47;
}
