/* ============================================================
   navbar-cs2.css — минимал-навбар headlinecs.ru (стиль cs2bgd31)
   Фиолетовая тема. Перебивает родной хедер GameCMS по специфичности.
   Подключать в head.tpl ПОСЛЕ header-fix.css.
   ============================================================ */

/* ---------- сам бар ---------- */
.header {
    background: rgba(15, 18, 42, 0.85) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(155, 109, 255, 0.18) !important;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: padding .25s ease, background .25s ease;
}
.header .container {
    display: flex;
    align-items: center;
    gap: 18px;
    min-height: 64px;
    transition: min-height .25s ease;
}

/* сжатие при скролле */
body.nv-scrolled .header { background: rgba(12, 14, 32, 0.95) !important; }
body.nv-scrolled .header .container { min-height: 52px; }

/* ---------- логотип ---------- */
.header .logo {
    display: inline-flex;
    align-items: center;
    height: 40px;
    min-width: 132px;
    background-image: url('../img/header_logo.png');
    background-repeat: no-repeat;
    background-position: left center;
    background-size: contain;
    flex-shrink: 0;
    margin-right: 6px;
    transition: height .25s ease;
}
body.nv-scrolled .header .logo { height: 34px; }

/* контейнер раскрывающегося меню (десктоп) */
.header #hidden-menu {
    display: flex !important;
    align-items: center;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

/* ---------- горизонтальное меню ---------- */
.header .collapsible-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: wrap;
}
.header .collapsible-menu > li { position: relative; list-style: none; }

/* пункты меню — иконки НЕ трогаем, только обёртка/типографика */
.header .collapsible-menu > li > a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 10px;
    color: #c4c6e0 !important;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    transition: .18s;
    background: transparent;
}
.header .collapsible-menu > li > a:hover {
    color: #fff !important;
    background: rgba(155, 109, 255, 0.14);
}
.header .collapsible-menu > li > a.active,
.header .collapsible-menu > li.active > a {
    color: #fff !important;
    background: rgba(155, 109, 255, 0.22);
}

/* иконки внутри пунктов (если приходят из {menu}) — аккуратный размер */
.header .collapsible-menu > li > a i,
.header .collapsible-menu > li > a svg,
.header .collapsible-menu > li > a img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

/* ---------- выпадающие подменю (если есть вложенный ul) ---------- */
.header .collapsible-menu > li ul {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 200px;
    background: linear-gradient(180deg, #15183a, #0e1024);
    border: 1px solid rgba(155, 109, 255, 0.25);
    border-radius: 12px;
    padding: 6px;
    margin: 0;
    list-style: none;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: .18s;
    z-index: 1001;
}
.header .collapsible-menu > li:hover > ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.header .collapsible-menu > li ul li { list-style: none; }
.header .collapsible-menu > li ul li a {
    display: block;
    padding: 9px 12px;
    border-radius: 8px;
    color: #c4c6e0 !important;
    font-size: 13px;
    text-decoration: none;
    transition: .15s;
}
.header .collapsible-menu > li ul li a:hover {
    background: rgba(155, 109, 255, 0.16);
    color: #fff !important;
}

/* ---------- кнопка «Войти» (гость) ---------- */
.header .auth-in {
    margin-left: auto;
    order: 99;
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    padding: 9px 18px !important;
    border-radius: 10px !important;
    background: linear-gradient(135deg, #9b6dff, #6d3fcc) !important;
    border: none !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 14px !important;
    box-shadow: 0 4px 14px rgba(155, 109, 255, 0.45);
    transition: .2s;
    white-space: nowrap;
}
.header .auth-in:hover {
    background: linear-gradient(135deg, #b794ff, #9b6dff) !important;
    box-shadow: 0 6px 20px rgba(155, 109, 255, 0.6);
    transform: translateY(-1px);
}

/* ---------- бургер (мобилка) ---------- */
.header .menu-trigger {
    display: none;
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(155, 109, 255, 0.12) !important;
    border: 1px solid rgba(155, 109, 255, 0.25) !important;
    position: relative;
    cursor: pointer;
    flex-shrink: 0;
}
.header .menu-trigger::before,
.header .menu-trigger::after,
.header .menu-trigger > span {
    content: '';
    position: absolute;
    left: 11px;
    right: 11px;
    height: 2px;
    background: #b794ff;
    border-radius: 2px;
    transition: .2s;
}
.header .menu-trigger::before { top: 14px; }
.header .menu-trigger > span  { top: 20px; }
.header .menu-trigger::after  { top: 26px; }

/* ---------- адаптив: телефоны/планшеты ---------- */
@media (max-width: 991px) {
    .header .container { flex-wrap: wrap; gap: 10px; min-height: 56px; }
    .header .menu-trigger { display: inline-block; order: 1; }
    .header .logo { order: 2; margin: 0 auto 0 0; }
    .header .auth-in { order: 3; margin-left: 0; }

    /* раскрытие мобильного меню — управляется bootstrap collapse (.show) */
    .header #hidden-menu {
        order: 5;
        flex-basis: 100%;
        display: none !important;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 8px 0;
    }
    .header #hidden-menu.show,
    .header #hidden-menu.in { display: flex !important; }

    .header .collapsible-menu { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
    .header .collapsible-menu > li > a { width: 100%; }

    /* подменю на мобилке — просто вложенный список, без absolute */
    .header .collapsible-menu > li ul {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: rgba(155, 109, 255, 0.06);
        margin: 2px 0 2px 16px;
    }
}

/* ============================================================
   КОЛОКОЛЬЧИК — перебиваем родной градиент на минимал-вид.
   Сам колокольчик вставляется JS-ом из head.tpl, тут только стиль.
   ============================================================ */
.hl-notify-btn.hl-notify-inline {
    width: 42px !important;
    height: 42px !important;
    background: rgba(155, 109, 255, 0.12) !important;
    border: 1px solid rgba(155, 109, 255, 0.28) !important;
    color: #b794ff !important;
    box-shadow: none !important;
    border-radius: 12px !important;
    transition: .2s;
}
.hl-notify-btn.hl-notify-inline:hover {
    background: rgba(155, 109, 255, 0.22) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(155, 109, 255, 0.3) !important;
}

/* профиль-пилюля справа (плашка .user-menu) — минимал-вид */
.hl-notify-wrap {
    margin-left: auto;
    order: 98;
}

/* ============================================================
   ОТСТУПЫ КОНТЕНТА — чтобы контент не налезал под навбар
   ============================================================ */
/* Навбар sticky сверху; даём первому блоку контента воздух сверху */
.header + .container,
.wapper .content > .container:nth-of-type(2) {
    padding-top: 18px;
}

/* Мониторинг серверов (карточки) — отступ сверху */
.monitoring,
.monitoring-table {
    margin-top: 8px !important;
}

/* Профиль-сайдбар (.user-menu) — лёгкое причёсывание под фиолетовую тему */
.user-menu {
    border-radius: 14px;
}

/* Цифра-бейдж колокольчика рядом с профилем — не съезжает */
.hl-notify-wrap { align-items: center; }
