header.site-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 40px 0;
    position: relative;
}

@media (max-width: 1024px) {
    header.site-header {
        padding: 20px 0;
    }
}

header.site-header .navbar .logo a {
    display: flex;
    color: white;
    text-decoration: none;
    gap: 12px;
    justify-content: space-between;
    align-items: center;
}

header.site-header .navbar .logo a .logo-icon {
    width: 40px;
    height: 40px;
    display: flex;
    justify-content: center;
    border-radius: 50%;
    background-image: url("../images/wallet.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 20px 18px;
}

header.site-header .navbar .logo a span {
    font-weight: 700;
    font-size: 20px;
    line-height: 28px;
}

.navbar {
    display: flex;
    align-items: center;
    gap: 24px;
    justify-content: space-between;
}


.navbar .inner-wrapper {
    display: flex;
    min-width: 862px;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.navbar ul, .cabinet-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 16px;
}

.cabinet-menu {
    justify-content: flex-end;
    margin-top: 52px;
}

.navbar ul li, .cabinet-menu li {
    display: flex;
    align-items: center;
    position: relative;
}

.navbar ul > li > a, .cabinet-menu  li a {
    display: block;
    border-radius: 100px;
    padding: 8px 20px;
    font-size: 16px;
    border-top: solid 1px #ffffff7a;
    border-bottom: solid 1px #ffffff2b;
    text-decoration: none;
    transition: all 0.25s ease;
    background: rgba(90, 90, 103, 0.2);
    color: white;
    line-height: 20px;
    backdrop-filter: blur(6px);
    font-weight: 500;
}

.cabinet-menu li a {
    padding: 12px 20px;
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .navbar ul > li:hover > a, .cabinet-menu li:hover a {
        background: rgba(41, 96, 135, 0.55);
        border-top-color: #ffffffb5;
        border-bottom-color: #ffffff4d;
        transform: translateY(-1px);
    }
}

/* Active для touch устройств */
.navbar ul > li > a:active, .cabinet-menu li a:active {
    background: rgba(41, 96, 135, 0.6);
    border-top-color: #ffffffb5;
    border-bottom-color: #ffffff4d;
    transform: scale(0.98);
}

.navbar ul li.current-menu-item a,
.cabinet-menu li.current-menu-item a,
.navbar ul li.current-menu-parent a,
.cabinet-menu li.current-menu-parent a
{
    background: rgba(41, 96, 135, 0.4);
}

.navbar ul li ul.sub-menu {
    display: none;
    position: absolute;
    width: 238px;
    background: var(--black-footer);
    top: 50px;
    right: 0;
    flex-direction:column;
    gap: 10px;
    z-index: 999;
    border-radius: 20px;
    padding: 20px 20px;
    font-size: 16px;
    border-top: solid 1px #ffffff7a;
    border-bottom: solid 1px #ffffff7a;
    text-decoration: none;
    transition: all 0.25s ease;
    background: rgba(90, 90, 103, 0.2);
    background: rgb(38 65 88);
}

/*.navbar ul li:hover ul.sub-menu {*/
/*    display: flex;*/
/*}*/

.navbar ul li ul.sub-menu:before {
    content: "";
    display: block;
    position: absolute;
    top: -6px;
    right: 20px;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #85919b;
}

.navbar ul li ul.sub-menu.sub-show {
    display: flex;
}


.navbar ul li ul.sub-menu li a {
    background: unset;
    border: unset;
    font-size: 14px;
    padding: 0;
    backdrop-filter: unset;
    display: block;
    width: 100%;
    padding: 5px 15px;
    border-radius: 10px;
    color: var(--grey-text);
    transition: all 0.2s ease;
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .navbar ul li ul.sub-menu li:hover a{
        background: #0f141914;
        color: white;
    }
}

/* Active для touch устройств */
.navbar ul li ul.sub-menu li a:active {
    background: #0f141933;
    color: white;
}


.navbar ul li ul.sub-menu li.current-menu-item a{
    background: #0f141933;
    color: white;
}

.navbar ul li.menu-item-has-children  a {
    background-image: url("../images/caret.svg");
    background-repeat: no-repeat;
    background-position: calc(100% - 20px) center;
    background-size: 11px 6px;
    padding-right: 43px;
}

.cabinet-header {
    background: var(--bg-element);
    padding: 16px 0!important;
}

.cabinet-header .navbar .inner-wrapper {
    min-width: unset !important;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 16px;
}

/* ========================================
   MOBILE BURGER MENU
   ======================================== */

/* Бургер кнопка */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
    position: relative;
}

.burger-menu span {
    display: block;
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* Анимация бургера в крестик */
.burger-menu.is-active span:nth-child(1) {
    transform: translateY(9.5px) rotate(45deg);
}

.burger-menu.is-active span:nth-child(2) {
    opacity: 0;
}

.burger-menu.is-active span:nth-child(3) {
    transform: translateY(-9.5px) rotate(-45deg);
}

/* Мобильное меню */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    z-index: 999;
    
    /* Полностью удаляем из interaction layer когда закрыто */
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.mobile-menu-overlay.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: opacity 0.3s ease, visibility 0s linear 0s;
}

.mobile-menu-container {
    position: fixed;
    top: 0;
    right: -100%;
    width: 85%;
    max-width: 400px;
    height: 100%;
    background: var(--bg-element);
    z-index: 1000;
    overflow-y: auto;
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.5);
    
    /* Полностью удаляем из interaction layer когда закрыто */
    visibility: hidden;
    pointer-events: none;
    transition: right 0.3s ease, visibility 0s linear 0.3s;
}

.mobile-menu-container.is-open {
    right: 0;
    visibility: visible;
    pointer-events: auto;
    transition: right 0.3s ease, visibility 0s linear 0s;
}

.mobile-menu-content {
    padding: 80px 24px 24px;
    display: flex;
    flex-direction: column;
    gap: 32px;
}

/* Мобильное меню - навигация */
.mobile-menu-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.mobile-menu-nav ul li a {
    display: block;
    padding: 14px 20px;
    color: white;
    text-decoration: none;
    border-radius: 12px;
    background: rgba(90, 90, 103, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.25s ease;
    font-size: 16px;
    font-weight: 500;
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .mobile-menu-nav ul li a:hover,
    .mobile-menu-nav ul li.current-menu-item a,
    .mobile-menu-nav ul li.current-menu-parent a {
        background: rgba(41, 96, 135, 0.4);
        border-color: rgba(255, 255, 255, 0.15);
    }
}

/* Active для touch устройств + current states */
.mobile-menu-nav ul li a:active,
.mobile-menu-nav ul li.current-menu-item a,
.mobile-menu-nav ul li.current-menu-parent a {
    background: rgba(41, 96, 135, 0.4);
    border-color: rgba(255, 255, 255, 0.15);
}

/* Подменю в мобильном меню */
.mobile-menu-nav ul li.menu-item-has-children > a {
    position: relative;
    padding-right: 45px;
}

.mobile-menu-nav ul li.menu-item-has-children > a::after {
    content: '';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: translateY(-50%) rotate(45deg);
    transition: transform 0.3s ease;
}

.mobile-menu-nav ul li.menu-item-has-children.submenu-open > a::after {
    transform: translateY(-25%) rotate(-135deg);
}

.mobile-menu-nav ul.sub-menu {
    display: none;
    padding-left: 16px;
    margin-top: 8px;
    gap: 6px;
}

.mobile-menu-nav ul li.submenu-open > ul.sub-menu {
    display: flex;
}

.mobile-menu-nav ul.sub-menu li a {
    padding: 10px 16px;
    font-size: 14px;
    background: rgba(90, 90, 103, 0.1);
}

/* Мобильные действия (кнопки) */
.mobile-menu-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-menu-actions .btn,
.mobile-menu-actions a.btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    display: flex;
    align-items: center;
}

/* Unified glass style for all mobile menu buttons */
.mobile-menu-actions .btn.btn-black {
    background: rgba(90, 90, 103, 0.2);
    border-top: solid 1px rgba(255, 255, 255, 0.1);
    border-bottom: solid 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .mobile-menu-actions .btn.btn-black:hover {
        background: rgba(90, 90, 103, 0.3);
        border-top-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-1px);
    }
}

/* Active для touch устройств */
.mobile-menu-actions .btn.btn-black:active {
    background: rgba(90, 90, 103, 0.35);
    transform: scale(0.98);
}

/* Header help в мобильном меню */
.mobile-menu-actions .header-help-wrapper {
    width: 100%;
}

.mobile-menu-actions .header-help-wrapper .header-auth-link {
    width: 100%;
    height: auto;
    border-radius: 100px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(90, 90, 103, 0.2);
    background-image: none !important; /* Убираем иконку из desktop стилей */
    border-top: solid 1px rgba(255, 255, 255, 0.1);
    border-bottom: solid 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}

.mobile-menu-actions .header-help-wrapper .header-auth-link::before {
    content: '';
    width: 20px;
    height: 20px;
    background-image: url("../images/question.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .mobile-menu-actions .header-help-wrapper .header-auth-link:hover {
        background: rgba(41, 96, 135, 0.4);
        border-top-color: rgba(255, 255, 255, 0.15);
    }
}

/* Active для touch устройств */
.mobile-menu-actions .header-help-wrapper .header-auth-link:active {
    background: rgba(41, 96, 135, 0.5);
    transform: scale(0.98);
}

/* Tooltip в мобильном меню - скрываем, так как не нужен */
.mobile-menu-actions .header-help-wrapper .header-help-tooltip {
    display: none;
}

/* User avatar в мобильном меню */
.mobile-menu-actions .header-user-avatar {
    width: 100%;
    height: auto;
    border-radius: 100px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    background: rgba(90, 90, 103, 0.2); /* Единый стиль как у других кнопок */
    border-top: solid 1px rgba(255, 255, 255, 0.1);
    border-bottom: solid 1px rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
    text-decoration: none;
    transition: all 0.25s ease;
}

.mobile-menu-actions .header-user-avatar span {
    font-size: 16px;
    font-weight: 500;
    color: white;
}

.mobile-menu-actions .header-user-avatar img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

/* Hover только для устройств с мышью */
@media (hover: hover) and (pointer: fine) {
    .mobile-menu-actions .header-user-avatar:hover {
        background: rgba(90, 90, 103, 0.3); /* Единый стиль */
        border-top-color: rgba(255, 255, 255, 0.15);
        transform: translateY(-1px);
    }
}

/* Active для touch устройств */
.mobile-menu-actions .header-user-avatar:active {
    background: rgba(90, 90, 103, 0.35); /* Единый стиль */
    transform: scale(0.98);
}

/* Блокировка скролла при открытом меню */
body.mobile-menu-open {
    overflow: hidden;
}

/* На десктопе полностью убираем мобильное меню */
@media (min-width: 1025px) {
    .burger-menu,
    .mobile-menu-overlay,
    .mobile-menu-container {
        display: none !important;
    }
}

/* Показываем бургер на мобильных */
@media (max-width: 1024px) {
    .burger-menu {
        display: flex;
    }
    
    .mobile-menu-overlay,
    .mobile-menu-container {
        display: block;
    }
    
    /* Скрываем десктопное меню */
    .navbar .inner-wrapper {
        display: none !important;
    }
    
    /* Показываем только логотип и бургер */
    header.site-header .navbar {
        width: 100%;
        justify-content: space-between;
    }
    
    /* Cabinet header на мобильных */
    .cabinet-header .navbar {
        gap: 12px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-container {
        width: 90%;
    }
    
    .mobile-menu-content {
        padding: 70px 20px 20px;
    }
    
    /* Mobile actions */
    .mobile-menu-actions .header-help-wrapper .header-auth-link {
        padding: 10px 18px;
        font-size: 15px;
    }
    
    .mobile-menu-actions .header-help-wrapper .header-auth-link::before {
        width: 18px;
        height: 18px;
    }
    
    .mobile-menu-actions .header-user-avatar {
        padding: 10px 18px;
    }
    
    .mobile-menu-actions .header-user-avatar span {
        font-size: 15px;
    }
    
    .mobile-menu-actions .header-user-avatar img {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .mobile-menu-container {
        width: 100%;
        max-width: 100%;
    }
    
    header.site-header .navbar .logo a span {
        font-size: 18px;
    }
    
    header.site-header .navbar .logo a .logo-icon {
        width: 36px;
        height: 36px;
        background-size: 18px 16px;
    }
    
    .mobile-menu-content {
        padding: 60px 16px 16px;
        gap: 24px;
    }
    
    /* Mobile navigation */
    .mobile-menu-nav ul li a {
        padding: 12px 16px;
        font-size: 15px;
    }
    
    .mobile-menu-nav ul.sub-menu li a {
        padding: 8px 14px;
        font-size: 13px;
    }
    
    /* Mobile actions */
    .mobile-menu-actions {
        gap: 10px;
        padding-top: 14px;
    }
    
    .mobile-menu-actions .btn {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .mobile-menu-actions .header-help-wrapper .header-auth-link {
        padding: 10px 16px;
        font-size: 14px;
    }
    
    .mobile-menu-actions .header-help-wrapper .header-auth-link::before {
        width: 16px;
        height: 16px;
    }
    
    .mobile-menu-actions .header-user-avatar {
        padding: 10px 16px;
    }
    
    .mobile-menu-actions .header-user-avatar span {
        font-size: 14px;
    }
    
    .mobile-menu-actions .header-user-avatar img {
        width: 32px;
        height: 32px;
    }
    
    /* Burger menu */
    .burger-menu {
        width: 26px;
        height: 20px;
    }
    
    .burger-menu span {
        height: 2.5px;
    }
    
    .burger-menu.is-active span:nth-child(1) {
        transform: translateY(8.75px) rotate(45deg);
    }
    
    .burger-menu.is-active span:nth-child(3) {
        transform: translateY(-8.75px) rotate(-45deg);
    }
}


/* ========================================
   ADMIN NOTICE BAR
   ======================================== */

.admin-notice-bar {
    background: var(--bg-element);
    border-bottom: 1px solid var(--stroke2);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 9999;
    backdrop-filter: blur(10px);
}

.admin-notice-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font);
}

.admin-badge svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.admin-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.admin-actions .btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}

.admin-actions .btn svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.admin-logout {
    background: rgba(166, 26, 26, 0.2) !important;
    border-top-color: rgba(244, 71, 71, 0.3) !important;
    border-bottom-color: rgba(166, 26, 26, 0.2) !important;
}

@media (hover: hover) and (pointer: fine) {
    .admin-logout:hover {
        background: rgba(166, 26, 26, 0.35) !important;
        border-top-color: rgba(244, 71, 71, 0.5) !important;
    }
}

.admin-logout:active {
    background: rgba(166, 26, 26, 0.4) !important;
}

@media (max-width: 768px) {
    .admin-notice-bar {
        padding: 8px 0;
    }
    
    .admin-notice-content {
        gap: 12px;
    }
    
    .admin-badge {
        font-size: 12px;
    }
    
    .admin-badge svg {
        width: 14px;
        height: 14px;
    }
    
    .admin-actions {
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .admin-notice-bar {
        padding: 8px 0;
    }
    
    .admin-badge span {
        display: none;
    }
    
    .admin-actions .btn span {
        display: none;
    }
    
    .admin-actions .btn {
        min-width: 44px;
        justify-content: center;
    }
}
