/* ----------------------- */
/* Общие стили */
/* ----------------------- */
body {
    display: flex;
    min-height: 100vh;
    font-family: 'Oswald', sans-serif;
    font-size: 18px;
    margin: 0;
    background-color: #121212; /* Тёмный фон */
    color: #e0e0e0; /* светлый текст */
}

/* ----------------------- */
/* Сайдбар */
/* ----------------------- */
.sidebar {
    width: 250px;
    background: #1f1f1f;
    color: #e0e0e0;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    transition: all 0.3s;
    position: fixed; /* фиксируем сайдбар */
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto; /* прокрутка, если много пунктов */
    border-right: 1px solid #333;
    z-index: 1000;
}

.sidebar .sidebar-header {
    padding: 20px;
    font-size: 1.8em;
    text-align: center;
    background: #111;
    border-bottom: 1px solid #333;
}

.sidebar .nav-link {
    color: #cfd8dc;
    padding: 15px 20px;
    transition: all 0.3s;
}

.sidebar .nav-link:hover {
    background: #333;
    color: #fff;
}

.sidebar .nav-link.active {
    background: #007bff;
    color: #fff;
}

/* ----------------------- */
/* Основной контент */
/* ----------------------- */
.content {
    margin-left: 250px; /* отступ от фиксированного сайдбара */
    padding: 40px;
    background: #121212; /* тёмный фон */
    flex-grow: 1;
    min-height: 100vh;
}

/* Заголовки */
.content h1, .content h2, .content h3, .content h4 {
    color: #e0e0e0;
}

/* Карточки */
.card {
    background: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #333;
}

/* Ссылки внутри контента */
a {
    color: #64b5f6;
    text-decoration: none;
}

a:hover {
    color: #42a5f5;
    text-decoration: underline;
}

/* Кнопки */
.btn-warning {
    background-color: #f9a825;
    border-color: #f9a825;
    color: #121212;
}

.btn-outline-secondary {
    color: #e0e0e0;
    border-color: #555;
}

.btn-outline-secondary:hover {
    background-color: #333;
    color: #fff;
}

/* Таблицы и списки */
.list-group-item {
    background: #1f1f1f;
    color: #e0e0e0;
    border: 1px solid #333;
}

/* Прокрутка */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
}

::-webkit-scrollbar-track {
    background: #1f1f1f;
}

/* ===================================== */
/* 📱 MOBILE ADAPTIVE PREMIUM SIDEBAR */
/* ===================================== */

@media (max-width: 768px) {

    body {
        flex-direction: column;
    }

    /* Скрываем sidebar по умолчанию */
    .sidebar {
        margin-left: -250px;
        box-shadow: none;
    }

    /* Когда открыт */
    .sidebar.show {
        margin-left: 0;
        box-shadow: 5px 0 25px rgba(0,0,0,0.6);
        animation: sidebarSlide 0.35s cubic-bezier(.25,.8,.25,1);
    }

    /* Контент без отступа */
    .content {
        margin-left: 0;
        padding: 25px;
    }
}

/* Затемнение фона */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(0,0,0,0.65);
    z-index: 999;
}

/* Плавная анимация */
@keyframes sidebarSlide {
    from {
        transform: translateX(-20px);
        opacity: 0.9;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Premium hover эффект */
.sidebar .nav-link {
    position: relative;
    overflow: hidden;
}

.sidebar .nav-link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 0;
    background: #007bff;
    transition: width 0.3s ease;
}

.sidebar .nav-link:hover::after {
    width: 100%;
}

/* Более мягкий active */
.sidebar .nav-link.active {
    background: linear-gradient(90deg, #007bff, #0056b3);
    box-shadow: inset 3px 0 0 #fff;
}

