    :root {
      --dp-sbw: calc(100vw - 100%);
      --notif-item-h: 72px;
    }

    .navbar>.container {
      padding-right: var(--dp-sbw);
    }

    /* ───────── Левые дропдауны: Allow Popper to position (без top/left) ───────── */
    .navbar .nav-item.dropdown {
      position: relative;
    }

    .navbar .dropdown-menu[data-bs-popper] {
      margin-top: .5rem !important;
    }

    /* ───────── Правый объединённый блок ───────── */
    #navbarRight {
      gap: .5rem;
    }

    #navbarRight .navbar-tools {
      gap: .5rem;
      flex-wrap: nowrap;
    }

    #navbarRight .navbar-tools>* {
      flex: 0 0 auto;
    }

    /* Колокольчик/язык/прочие правые меню — фиксируем у правого края */
    #navbarRight .dropdown {
      position: relative;
    }

    #navbarRight .dropdown .dropdown-menu {
      position: absolute !important;
      top: calc(100% + .5rem) !important;
      right: 0 !important;
      left: auto !important;
      transform: none !important;
      margin: 0 !important;
      min-width: max(12rem, 100%);
      max-height: calc(100vh - 80px);
      overflow: auto;
      overscroll-behavior: contain;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
      border-radius: .75rem;
      z-index: 1080;
    }

    #navbarRight .dropdown .dropdown-menu[data-bs-popper] {
      top: calc(100% + .5rem) !important;
      right: 0 !important;
      left: 1 !important;
      margin-top: 0 !important;
      transform: none !important;
    }


    /* Перенос правого блока на новую строку в навбаре */
    @media (max-width:991.98px) {
      #mainNavbar .navbar-tools {
        width: 100%;
        justify-content: flex-start;
        /* ваш фикс */
        padding-top: .35rem;
      }
    }

    /* ───────── Внешний вид кнопок/иконок ───────── */
    .btn-icon {
      width: 36px;
      height: 36px;
      padding: 0;
      display: grid;
      place-items: center;
    }

    .flag-icon {
      width: 18px;
      height: 12px;
      object-fit: cover;
      border-radius: 2px;
      box-shadow: 0 0 0 1px rgba(0, 0, 0, .1);
    }

    /* ───────── Меню уведомлений ───────── */
    #notifyRoot .dropdown-menu.notif-menu {
      width: min(360px, calc(100vw - 24px));
    }

    #notifyRoot .notif-list {
      max-height: calc(var(--notif-item-h) * 5);
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      overscroll-behavior: contain;
      scrollbar-gutter: stable;
    }

    #notifyRoot .notif-item {
      display: flex;
      align-items: flex-start;
      width: 100%;
      text-align: left;
      background: transparent;
      border: 0;
      cursor: pointer;
      padding: .6rem .75rem;
      border-bottom: 1px solid rgba(0, 0, 0, .06);
      min-height: var(--notif-item-h);
      color: inherit;
      text-decoration: none;
    }

    #notifyRoot .notif-item:hover,
    #notifyRoot .notif-item:focus {
      background: rgba(0, 0, 0, .03);
      outline: none;
    }

    #notifyRoot .notif-item.is-unread {
      background: rgba(13, 110, 253, .10);
    }

    #notifyRoot .notif-item.is-unread .title {
      font-weight: 600;
    }

    #notifyRoot .icon-wrap {
      position: relative;
      width: 28px;
      height: 28px;
      display: grid;
      place-items: center;
      flex: 0 0 28px;
    }

    #notifyRoot .icon-wrap .dot-unread {
      position: absolute;
      right: -2px;
      top: -2px;
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #0d6efd;
      box-shadow: 0 0 0 2px var(--bs-body-bg, #fff);
    }

    #notifyRoot .text-truncate-2 {
      display: -webkit-box;
      -webkit-box-orient: vertical;
      -webkit-line-clamp: 2;
      line-clamp: 2;
      overflow: hidden;
    }

    #notifyRoot .xsmall {
      font-size: .75rem;
    }

    /* ───────── Нав-ссылки в левом меню ───────── */
    .navbar .nav-link {
      display: flex;
      align-items: center;
      gap: .5rem;
      padding: .45rem .65rem;
      border-radius: 999px;
    }

    .navbar .nav-link .bi {
      font-size: 1.05rem;
      opacity: .9;
    }

    .navbar .nav-link.active {
      background: rgba(13, 110, 253, .1);
      color: var(--bs-primary) !important;
    }

    .navbar .nav-link:hover {
      background: rgba(0, 0, 0, .05);
    }

    .dp-ann-badge {
      font-size: .65rem;
      vertical-align: middle;
    }

    .dropdown-menu .dropdown-item .bi {
      opacity: .85;
    }

    /* Тема тёмная: фон меню */
    [data-bs-theme="dark"] .dropdown-menu {
      background-color: var(--dp-surface, #171a23);
      border-color: var(--dp-border, rgba(255, 255, 255, .12));
    }

    /* ==== FIX: выравнивание дропдауна колокольчика на < 768px ==== */
    @media (max-width: 767.98px) {

      /* якорь — сам колокольчик */
      #navbarRight #notifyRoot {
        position: relative !important;
      }

      #navbarRight #notifyRoot .dropdown-menu,
      #navbarRight #notifyRoot .dropdown-menu[data-bs-popper] {
        position: absolute !important;
        top: calc(100% + .5rem) !important;
        right: 0 !important;
        margin-top: 0 !important;
        transform: none !important;
        width: min(360px, calc(100vw - 24px));
        overflow: auto;
        overscroll-behavior: contain;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
        border-radius: .75rem;
        z-index: 1080;
        left: 1 !important;
      }
    }

    /* === Правый блок и колокольчик: стабильное выравнивание на всех брейкпоинтах === */

    /* правый блок как есть */
    #navbarRight {
      gap: .5rem;
    }

    #navbarRight .navbar-tools {
      gap: .5rem;
      flex-wrap: nowrap;
    }

    #navbarRight .navbar-tools>* {
      flex: 0 0 auto;
    }

    /* 1) якорь: сам колокольчик всегда position:relative */
    #navbarRight #notifyRoot {
      position: relative !important;
    }

    /* 2) отменяем «static» в navbar только для этого дропдауна и
      принудительно прижимаем к правому краю */
    .navbar #notifyRoot .dropdown-menu {
      position: absolute !important;
      top: calc(100% + .5rem) !important;
      right: 0 !important;
      left: auto !important;
      transform: none !important;
      /* гасим translate от Popper */
      margin: 0 !important;
      min-width: max(12rem, 100%);
      width: min(360px, calc(100vw - 24px));
      max-height: calc(100vh - 80px);
      overflow: auto;
      overscroll-behavior: contain;
      box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
      border-radius: .75rem;
      z-index: 1080;
    }

    /* если Bootstrap добавит [data-bs-popper] — дублируем координаты */
    .navbar #notifyRoot .dropdown-menu[data-bs-popper] {
      top: calc(100% + .5rem) !important;
      right: 0 !important;
      left: auto !important;
      margin-top: 0 !important;
      transform: none !important;
    }


    /* 4) когда инструменты переносятся под меню, выравниваем влево (ваш фикс) */
    @media (max-width: 991.98px) {
      #mainNavbar .navbar-tools {
        width: 100%;
        justify-content: flex-start;
        padding-top: .35rem;
      }
    }
