/* 
   Quantum AdVision Design System v6.0
   File: 02_layout.css
   Layout: Responsive Carbon Grid
*/

/* --- GLOBAL RESET & CHASSIS --- */
html {
    box-sizing: border-box;
    font-size: 16px;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    background-color: var(--bg-body);
    background-image: var(--bg-carbon-texture);
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    /* Плавный переход при смене темы */
    transition: background 0.3s ease, color 0.3s ease;
}

/* --- SIDEBAR (PANEL) --- */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 18rem;
    padding: 2rem 1.5rem;
    
    background-color: var(--surface-1);
    border-right: 1px solid var(--border-color);
    
    /* Тень, отбрасываемая панелью на контент */
    box-shadow: 10px 0 30px -10px rgba(0,0,0,0.5);
    
    z-index: 1000;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h2 {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin: 0;
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(var(--accent-primary), 0.3);
}

.sidebar-header img {
    filter: drop-shadow(0 0 5px rgba(255,255,255,0.2));
}

/* Навигация */
.nav-pills .nav-link {
    color: var(--text-secondary) !important;
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    
    padding: 1rem 1.2rem;
    margin-bottom: 0.8rem;
    border-radius: 4px;
    border-left: 3px solid transparent;
    
    transition: all 0.2s ease;
}

/* Hover & Active States */
.nav-pills .nav-link:hover {
    color: var(--text-primary) !important;
    background: linear-gradient(90deg, rgba(255,255,255,0.03) 0%, transparent 100%);
    padding-left: 1.5rem; /* Движение при наведении */
}

.nav-pills .nav-link.active {
    color: var(--text-primary) !important;
    background: linear-gradient(90deg, rgba(255,255,255,0.05) 0%, transparent 100%);
    border-left-color: var(--accent-primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.nav-pills .nav-link i {
    width: 24px;
    margin-right: 12px;
    text-align: center;
    font-size: 0.9em;
}

/* --- MAIN CONTENT AREA --- */
.content {
    margin-left: 18rem; /* Ширина сайдбара */
    padding: 2.5rem 3rem;
    transition: margin-left 0.3s ease, padding 0.3s ease;
}

/* --- RESPONSIVE GRID SYSTEM --- */

/* Mobile & Tablet Portrait (< 992px) */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%); /* Скрыть сайдбар за экран */
    }
    
    .sidebar.visible {
        transform: translateX(0);
    }
    
    .content {
        margin-left: 0;
        padding: 1.5rem;
    }
}

/* Mobile Small (< 576px) */
@media (max-width: 575.98px) {
    .content {
        padding: 1rem;
    }
    
    .sidebar-header h2 {
        font-size: 1.1rem;
    }
}
