.header {
    height: 64px;
    background: linear-gradient(90deg, #000000, #000000);

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 32px;

    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    border-bottom: 1px solid #95b8f3;
}

.header-left .logo {
    font-size: 18px;
    font-weight: 700;
    color: #ffffff;
}

.logo span {
    color: #2f8cff;
}

.nav {
    display: flex;
    gap: 28px;
}

.nav-link {
    color: #8a96a3;
    text-decoration: none;
    font-size: 14px;
    transition: 0.2s;
}

.nav-link:hover {
    color: #ffffff;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.admin-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 14px;
}

.notification {
    position: relative;
    cursor: pointer;
}

.bell {
    font-size: 18px;
}

.badge {
    position: absolute;
    top: -6px;
    right: -8px;
    background: red;
    color: #fff;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 50%;
}

.avatar img {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #1f2a36;
}

.logo-link {
    text-decoration: none;
    display: inline-block;
}

.logo-link:hover {
    opacity: 0.85;
}


@media (max-width: 768px) {
    .header {
        position: fixed;
        width: 100%;
        height: 56px;
        padding: 0 16px;
        justify-content: center;
        top: 0;
        left: 0;
    }

    .nav {
        display: none;
    }

    .header-right {
        display: none;
    }

    .header-left {
        width: 100%;
        display: flex;
        justify-content: center;
    }

    .logo {
        font-size: 16px;
    }
}


.notification-dropdown {
    position: absolute;
    top: 30px;
    right: 0;

    width: 320px;
    max-width: min(320px, calc(100vw - 24px));
    background: #0d1117;
    border: 1px solid #1f2a36;
    border-radius: 10px;

    display: none;
    flex-direction: column;
    padding: 10px;
    z-index: 1000;
}

.notification-dropdown.active {
    display: flex;
}

.notification-item {
    padding: 8px;
    font-size: 13px;
    color: #c9d1d9;
    border-bottom: 1px solid #1f2a36;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.unread {
    background: rgba(47, 140, 255, 0.08);
}

.notification-item:hover {
    background: #161b22;
}

.notification-text {
    line-height: 1.4;
    white-space: normal;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.notification-time {
    font-size: 11px;
    color: #7f8a96;
}

.notification-empty {
    padding: 10px 8px;
    color: #8a96a3;
    font-size: 13px;
}

.avatar {
    position: relative;
    cursor: pointer;
}

.avatar-dropdown {
    position: absolute;
    top: 45px;
    right: 0;

    width: 180px;
    background: #0d1117;
    border: 1px solid #1f2a36;
    border-radius: 10px;

    display: none;
    flex-direction: column;
    padding: 8px;

    z-index: 1000;
}

.avatar-dropdown a {
    padding: 10px;
    text-decoration: none;
    color: #c9d1d9;
    font-size: 14px;
    border-radius: 6px;
}

.avatar-dropdown a:hover {
    background: #161b22;
}

.login-btn {
    color: #fff;
    background: #2f8cff;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
}

.avatar-dropdown .logout-btn {
    color: #cf2b2b;
}

.avatar-dropdown.active {
    display: flex;
}

body[data-site-theme="white"] .header {
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    color: #111827;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body[data-site-theme="white"] .logo {
    color: #111827;
}

body[data-site-theme="white"] .logo span {
    color: #2563EB;
}

body[data-site-theme="white"] .nav-link {
    color: #4B5563;
}

body[data-site-theme="white"] .nav-link:hover {
    color: #2563EB;
    background: rgba(37, 99, 235, 0.08);
}

body[data-site-theme="white"] .nav-link.active,
body[data-site-theme="white"] .nav-link.is-active {
    color: #2563EB;
    background: rgba(37, 99, 235, 0.10);
}

body[data-site-theme="white"] .bell {
    color: #374151;
}

body[data-site-theme="white"] .avatar img {
    border-color: #D1D5DB;
}


/* Меню профиля */
body[data-site-theme="white"] .avatar-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #E5E7EB;
    color: #111827;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body[data-site-theme="white"] .avatar-dropdown a {
    color: #374151;
}

body[data-site-theme="white"] .avatar-dropdown a:hover {
    background: #F3F4F6;
    color: #2563EB;
}

body[data-site-theme="white"] .avatar-dropdown .logout-btn {
    color: #DC2626;
    border-top-color: #E5E7EB;
}

body[data-site-theme="white"] .avatar-dropdown .logout-btn:hover {
    background: rgba(220, 38, 38, 0.08);
    color: #B91C1C;
}


/* Выпадающее меню уведомлений */
body[data-site-theme="white"] .notification-dropdown {
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #E5E7EB;
    color: #111827;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

body[data-site-theme="white"] .notification-dropdown a,
body[data-site-theme="white"] .notification-dropdown button,
body[data-site-theme="white"] .notification-dropdown div,
body[data-site-theme="white"] .notification-dropdown span,
body[data-site-theme="white"] .notification-dropdown p {
    color: #374151;
}

body[data-site-theme="white"] .notification-dropdown a:hover,
body[data-site-theme="white"] .notification-dropdown button:hover {
    background: #F3F4F6;
    color: #2563EB;
}


/* Кнопка входа */
body[data-site-theme="white"] .login-btn {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
}

body[data-site-theme="white"] .login-btn:hover {
    background: #1D4ED8;
    border-color: #1D4ED8;
}

/* Уведомления в светлой теме */
body[data-site-theme="white"] .notification-dropdown .notification-item {
    background: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    color: #111827;
    transition: background 0.18s ease;
}

body[data-site-theme="white"] .notification-dropdown .notification-item:last-child {
    border-bottom: none;
}

body[data-site-theme="white"] .notification-dropdown .notification-item:hover {
    background: #F3F4F6;
}

body[data-site-theme="white"] .notification-dropdown .notification-text {
    color: #111827 !important;
}

body[data-site-theme="white"] .notification-dropdown .notification-time {
    color: #6B7280 !important;
}

body[data-site-theme="white"] .notification-dropdown .notification-item:hover .notification-text {
    color: #2563EB !important;
}

body[data-site-theme="white"] .notification-dropdown .notification-item:hover .notification-time {
    color: #4B5563 !important;
}