/**
 * Единые стили для внутренних элементов сайдбаров
 * Этап 3: Унификация сайдбаров
 * 
 * ВАЖНО: Размеры sidebar НЕ МЕНЯТЬ!
 * Унифицируются только внутренние элементы (отступы, заголовки, стили)
 */

/* ==================== БАЗОВЫЙ СТИЛЬ САЙДБАРА ==================== */

.sidebar {
    background: rgba(26, 26, 26, 0.6);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

/* ==================== ЕДИНЫЕ ОТСТУПЫ МЕЖДУ СЕКЦИЯМИ ==================== */

.sidebar-section {
    margin-bottom: 1.5rem; /* mb-6 */
}

.sidebar-section:last-child {
    margin-bottom: 0;
}

/* ==================== ЕДИНЫЕ РАЗМЕРЫ ЗАГОЛОВКОВ ==================== */

.sidebar-title,
.sidebar-heading {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600; /* font-semibold */
    color: white;
    margin-bottom: 1rem;
}

.sidebar-subtitle {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.25rem;
}

/* ==================== ЕДИНЫЕ СТИЛИ ВИДЖЕТОВ ==================== */

.sidebar-widget {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.05) 0%, 
        rgba(255, 255, 255, 0.02) 100%
    );
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 1rem; /* p-4 */
    transition: all 0.3s ease;
}

.sidebar-widget:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
}

.sidebar-widget-lg {
    padding: 1.5rem; /* p-6 */
}

/* ==================== ЕДИНЫЕ ОТСТУПЫ ДЛЯ СПИСКОВ ==================== */

.sidebar-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* space-y-2 */
}

.sidebar-list-spaced {
    gap: 0.75rem; /* space-y-3 */
}

.sidebar-list-item {
    padding: 0.75rem;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-list-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-list-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    border: 1px solid rgba(102, 126, 234, 0.3);
}

/* ==================== ЕДИНЫЕ СТИЛИ ДЛЯ QUICK ACTIONS ==================== */

.quick-action-btn {
    position: relative;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, rgba(6, 182, 212, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    border: 1px solid rgba(6, 182, 212, 0.2);
    border-radius: 12px;
    color: white;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    overflow: hidden;
}

.quick-action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.quick-action-btn:hover::before {
    left: 100%;
}

.quick-action-btn:hover {
    transform: translateX(5px) scale(1.02);
    border-color: rgba(6, 182, 212, 0.4);
    box-shadow: 0 10px 30px rgba(6, 182, 212, 0.3);
}

.quick-action-btn:active {
    transform: translateX(3px) scale(1);
}

/* ==================== ЕДИНЫЕ PADDING ВНУТРИ СЕКЦИЙ ==================== */

.sidebar-section-content {
    padding: 1rem; /* p-4 */
}

.sidebar-section-content-lg {
    padding: 1.5rem; /* p-6 */
}

/* ==================== ЕДИНЫЕ СТИЛИ СКРОЛЛБАРОВ ==================== */

.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px;
    transition: background 0.3s ease;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #7c8ef5 0%, #8a5fd4 100%);
}

/* Для Firefox */
.sidebar {
    scrollbar-width: thin;
    scrollbar-color: #667eea rgba(0, 0, 0, 0.2);
}

/* ==================== НАВИГАЦИОННЫЕ ЭЛЕМЕНТЫ САЙДБАРА ==================== */

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7);
    transition: all 0.3s ease;
    cursor: pointer;
    margin-bottom: 0.25rem;
}

.sidebar-nav-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: white;
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
    color: white;
    border-left: 3px solid #667eea;
}

.sidebar-icon {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ==================== ФИЛЬТРЫ И ЧЕКБОКСЫ ==================== */

.sidebar-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.sidebar-filter:hover {
    background: rgba(255, 255, 255, 0.05);
}

.sidebar-filter input[type="checkbox"],
.sidebar-filter input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* ==================== СТАТИСТИКА В САЙДБАРЕ ==================== */

.sidebar-stat {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.03);
    margin-bottom: 0.5rem;
}

.sidebar-stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.6);
}

.sidebar-stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: -100%;
        transition: left 0.3s ease;
        z-index: 50;
    }
    
    .sidebar.open {
        left: 0;
    }
    
    .sidebar-section-content {
        padding: 0.75rem;
    }
    
    .sidebar-title {
        font-size: 1rem;
    }
}

