/*
   Quantum AdVision Design System v7.0 (High Contrast)
   File: 02_layout.css
   Responsibility: Sidebar Structure, Blur Effects, Grid
*/

/* --- GLOBAL RESET --- */
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);
    background-attachment: fixed;
    background-size: cover;
    color: var(--text-primary);
    font-family: var(--font-body);
    margin: 0; padding: 0;
    min-height: 100vh;
    overflow-x: hidden;
    transition: color 0.3s ease;
}

/* --- SIDEBAR: LIGHTER SLATE AEROGEL --- */
.sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 18rem;
    padding: 2rem 1.5rem;

    /* ФОН: Светлый Сланец (Slate Grey) */
    background: linear-gradient(
        165deg,
        rgba(105, 115, 125, 0.95) 0%,
        rgba(85, 95, 105, 0.85) 100%
    ) !important;

    /* BLUR */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    border-right: 1px solid rgba(255, 255, 255, 0.15);

    box-shadow:
        20px 0 50px rgba(0,0,0,0.4),
        inset 1px 1px 0 rgba(255,255,255,0.1);

    z-index: 1000;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex; flex-direction: column; align-items: center; text-align: center;
    margin-bottom: 3rem; padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.sidebar-header img {
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 15px rgba(var(--accent-primary-rgb), 0.5));
}

/* --- BRANDING (HIGH CONTRAST UPDATE) --- */
.sidebar-header h2 {
    font-family: var(--font-heading);
    font-weight: 800; /* Extra Bold */
    font-size: 1.5rem;
    letter-spacing: 0.12em; line-height: 1.2;
    text-transform: uppercase; margin: 0;
    color: #ffffff !important; /* Force White */
    /* Тройная тень для максимального отрыва от фона */
    text-shadow: 
        0 2px 4px rgba(0,0,0,0.9),       /* Жесткая тень снизу */
        0 0 10px rgba(0,0,0,0.5),        /* Облако вокруг */
        0 0 20px rgba(255,255,255,0.2);  /* Легкое свечение */
}

.sidebar-header span.sub-brand {
    font-family: var(--font-body);
    font-weight: 600; /* Semi Bold */
    font-size: 0.75rem;
    letter-spacing: 0.2em; 
    color: #ffffff !important; /* Force White */
    text-transform: uppercase; margin-top: 0.5rem; display: block;
    text-shadow: 0 1px 3px rgba(0,0,0,0.9); /* Контурная тень */
    opacity: 0.9;
}

/* --- NAV PILLS --- */
.nav-pills { display: flex; flex-direction: column; gap: 0.5rem; }

.nav-pills .nav-link {
    color: rgba(255, 255, 255, 0.85) !important; /* Повышена яркость */
    font-family: var(--font-heading); font-weight: 600; font-size: 1rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    padding: 1rem 1.2rem;
    border-radius: 6px;
    border: 1px solid transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5); /* Тень для читаемости */
}

.nav-pills .nav-link:hover {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateX(5px);
}

.nav-pills .nav-link.active {
    color: var(--accent-primary) !important;
    background: linear-gradient(90deg, rgba(var(--accent-primary-rgb), 0.15) 0%, transparent 100%);
    border-left: 3px solid var(--accent-primary);
    box-shadow:
        0 4px 20px rgba(0,0,0,0.15),
        inset 2px 0 10px rgba(var(--accent-primary-rgb), 0.1);
    text-shadow: 0 0 10px rgba(var(--accent-primary-rgb), 0.4);
}

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

/* --- FOOTER (HIGH CONTRAST UPDATE) --- */
.sidebar-footer {
    margin-top: auto; padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.3); /* Более яркая линия */
    text-align: center;
}

/* Принудительно перебиваем стили Bootstrap (text-muted) и инлайны */
.sidebar-footer p, 
.sidebar-footer span, 
.sidebar-footer a,
.sidebar-footer .text-muted { 
    font-family: var(--font-mono); 
    font-size: 0.7rem;
    color: #ffffff !important; 
    opacity: 0.85 !important;
    text-shadow: 0 1px 2px rgba(0,0,0,0.9);
}

.sidebar-footer a:hover {
    color: var(--accent-primary) !important;
    opacity: 1 !important;
    text-decoration: none;
}

/* --- CONTENT AREA --- */
.content {
    margin-left: 18rem;
    padding: 3rem 3.5rem;
    position: relative; z-index: 1;
}

/* --- RESPONSIVE --- */
@media (max-width: 991.98px) {
    .sidebar { transform: translateX(-100%); backdrop-filter: blur(20px); }
    .content { margin-left: 0; padding: 1.5rem; }
}
