.header {
  box-shadow: 0 0 10px 0 rgba(23, 53, 245, 0.03), 0 8px 48px 4px rgba(2, 52, 227, 0.04) !important;
}

.header__in {
  min-height: 64px;
  gap: 0;
  padding-top: 12px;
  padding-bottom: 12px;
}

.header:not(.header--nooffset) + * {
  margin-top: 64px;
}

.header .header__logo-link {
  flex-shrink: 0;
  width: 81.584px;
  margin-right: 60px;
}

.header .header__logo {
  display: block;
  width: auto;
  height: 26.786px;
  max-width: 100%;
  max-height: none;
}

.header__group {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
}

.header__nav--main {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 16px;
  font-weight: 400;
}

.header__nav--admin {
  display: flex;
  align-items: center;
  gap: 8px;
}

.header__group > .header__nav:last-child {
  display: flex;
  align-items: center;
  gap: 32px;
  min-height: 40px;
  margin-left: auto;
}

.header__nav .header__link:not(:last-child),
.header__nav .btn:not(:last-child) {
  margin-right: 0;
}

.header__dropdown + .btn {
  margin-left: 0;
}

.header__nav .header__link {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  color: #263043;
  white-space: nowrap;
}
.header__nav .header__link:hover {
  color: var(--ruqi-color-primary, #1735f5);
}
.header__nav .header__link.text-primary,
.header__nav .header__link--active {
  font-weight: 600;
  color: #03123a !important;
}

.header .header__dropdown {
  position: relative;
  display: flex;
  align-items: center;
  align-self: stretch;
  font-size: 16px;
}

.header .single-dropdown__title {
  display: flex;
  align-items: center;
  height: 100%;
  max-width: none;
  padding-right: 0;
  font-weight: 400;
  overflow: visible;
  -webkit-line-clamp: none;
}

.header .single-dropdown__title:not(.single-dropdown__title--notification)::before,
.header .single-dropdown__title:not(.single-dropdown__title--notification)::after,
.header .single-dropdown--active .single-dropdown__title:not(.single-dropdown__title--notification)::before,
.header .single-dropdown--active .single-dropdown__title:not(.single-dropdown__title--notification)::after {
  content: none;
}

.header .single-dropdown__content {
  top: calc(100% + 20px);
  bottom: auto;
  transform: none;
}
.header .single-dropdown--active .single-dropdown__content {
  transform: none;
}

.header__location {
  display: flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.header__location-pin,
.header__location-chevron {
  display: inline-block;
  flex-shrink: 0;
  background-repeat: no-repeat;
  background-position: center;
}
.header__location-pin {
  width: 16px;
  height: 16px;
  background-image: url(../images/figma/header/location.svg);
  background-size: 12px 14px;
}
.header__location-chevron {
  width: 20px;
  height: 20px;
  background-image: url(../images/figma/header/chevron-down.svg);
  background-size: 12px 6.5px;
  transition: transform 0.15s ease;
}
.single-dropdown--active .header__location-chevron {
  transform: rotate(180deg);
}
.header__location-title {
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #1b1b1b;
  white-space: nowrap;
}

.header .header-notifications {
  display: flex;
  align-items: center;
  align-self: stretch;
  gap: 2px;
  margin-left: 0;
  margin-right: 0;
}

.header .header-notifications .single-dropdown__title--notification {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  margin: 0;
  padding: 0;
  border-radius: 36px;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.header .header-notifications .single-dropdown__title--notification:hover {
  background: #f6f8fb;
}

.header .header-notifications .svg-image-mail-full {
  width: 24px;
  height: 24px;
  background-image: url(../images/figma/header/bell.svg) !important;
  background-repeat: no-repeat !important;
  background-position: center !important;
  background-size: contain !important;
}
.header .header-notifications .svg-image-mail-full::before {
  content: none;
}
.header .header-notifications .header-fns-icon {
  width: 28px;
  height: 28px;
  background-size: contain;
}

.header .header-notifications .single-dropdown__title--notification[data-count]::before {
  content: attr(data-count);
  left: 0;
  right: auto;
  top: 0;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  border-radius: 999px;
  background-color: var(--ruqi-color-accent, #ea358c);
}

.header__profile-title {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.header__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #cbd5e1;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.14px;
  line-height: 1.25;
  color: #fff;
}
.header__profile-name {
  max-width: 220px;
  overflow: hidden;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0.1px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #263043;
}

/* Название компании раньше рисовалось псевдоэлементом main-new.css и вставало в один ряд
   с именем; теперь это отдельный узел под именем. */
.header .single-dropdown[data-company]::before {
  content: none;
}

.header__profile-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
}

.header__profile-company {
  max-width: 220px;
  overflow: hidden;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ruqi-color-primary, #1735f5);
}

.header .single-dropdown__content--list {
  min-width: 0;
  width: 240px;
  padding: 8px;
  background: #fff;
  border: 1px solid #eceef3;
  border-radius: 12px;
  box-shadow: 0 0 10px 0 rgba(23, 53, 245, 0.03), 0 8px 48px 4px rgba(2, 52, 227, 0.04);
  gap: 2px;
}

.header .single-dropdown__content--list .single-dropdown__item {
  display: flex;
  align-items: center;
  min-height: 38px;
  margin: 0;
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  line-height: 18px;
  color: #1a1a2e;
  text-decoration: none;
}
.header .single-dropdown__content--list .single-dropdown__item:not(:last-child) {
  margin-bottom: 0;
}
.header .single-dropdown__content--list .single-dropdown__item:hover {
  background: #f6f8fb;
  color: #1a1a2e;
}
.header .single-dropdown__content--list .single-dropdown__item--active {
  background: #f5f7fa;
  color: #1735f5;
}
.header .single-dropdown__content--list .single-dropdown__item--exit,
.header .single-dropdown__content--list .single-dropdown__item--exit:hover,
.header .single-dropdown__content--list .single-dropdown__item--exit .exit-link {
  color: #df2040;
}
.header .single-dropdown__item-sep {
  display: block;
  height: 1px;
  margin: 3.5px 0;
  background: #eceef3;
}

.header .single-dropdown__content--notification {
  width: 400px;
  min-width: 0;
  padding: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid #eceef3;
  border-radius: 16px;
  box-shadow: 0 0 10px 0 rgba(23, 53, 245, 0.03), 0 8px 48px 4px rgba(2, 52, 227, 0.04);
}

.header .notifications-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 20px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}
.header .notifications-head__title {
  font-size: 18px;
  font-weight: 600;
  line-height: 24px;
  color: #111827;
}
.header .notifications-head__counter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--ruqi-color-accent, #ea358c);
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  color: #fff;
}

.header .notifications-list {
  height: auto;
  max-height: 320px;
  margin: 0;
  padding: 0;
  overflow-y: auto;
}
.header .notifications-list .simplebar-track.simplebar-vertical {
  width: 4px;
  right: 4px;
  background: transparent;
}
.header .notifications-list .simplebar-scrollbar::before {
  background-color: #d0d5dd;
  border-radius: 999px;
  opacity: 1;
}

.header .notifications-list__title {
  padding: 12px 24px 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  color: #98a2b3;
}

.header .notification {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 16px 24px;
  border-radius: 0;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  background: transparent;
  transition: background-color 0.15s ease;
}
.header .notification:hover {
  background: #f6f8fb;
}
.header .notification:last-child {
  border-bottom: none;
}

.header .notification__icon {
  flex-shrink: 0;
  width: 12px;
  height: 12px;
  margin: 6px 0 0;
  border-radius: 50%;
  background: var(--ruqi-color-primary, #1735f5);
}
.header .notification__icon > * {
  display: none;
}
.header .notifications-list__title ~ .notification .notification__icon {
  visibility: hidden;
}

.header .notification__main {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.header .notification__meta {
  order: -1;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0.1px;
  color: #666;
}
.header .notification__title {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #000;
}
.header .notification:hover .notification__title {
  color: var(--ruqi-color-primary, #1735f5);
}

.header .notifications-foot {
  padding: 16px 24px;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
}
.header .notifications-list + .notifications-foot {
  margin-top: 0;
}
.header .notifications-foot__link.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 16px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  line-height: 24px;
}

.header .location-dropdown .single-dropdown__content--city-choose {
  width: 380px;
  min-width: 0;
  padding: 20px;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 10px 0 rgba(23, 53, 245, 0.03), 0 8px 48px 4px rgba(2, 52, 227, 0.04);
}

.header .location-dropdown .single-dropdown__content--city-choose > .d-flex {
  gap: var(--ruqi-space-3, 12px);
}

/* легаси main-new.css вешает сюда margin-right: 10px — иначе отступы сложатся */
.header .location-dropdown .single-dropdown__content--city-choose .btn:first-child {
  margin-right: 0;
}

.header .location-dropdown .single-dropdown__content--city-choose .btn {
  white-space: nowrap;
}

.header .location-dropdown .single-dropdown__content--city-list {
  width: 336px;
  min-width: 0;
  padding: 20px;
  gap: 16px;
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 0 10px 0 rgba(23, 53, 245, 0.03), 0 8px 48px 4px rgba(2, 52, 227, 0.04);
}
.location-dropdown__search {
  position: relative;
  display: block;
}
.header .location-dropdown__search input {
  box-sizing: border-box;
  width: 100%;
  height: 40px;
  min-height: 40px;
  padding: 8px 12px 8px 40px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff url(../images/figma/header/search.svg) no-repeat 12px center;
  background-size: 14px 14px;
  font-family: var(--ruqi-font-family);
  font-size: 16px;
  line-height: 22px;
  color: #263043;
}
.header .location-dropdown__search input::placeholder {
  color: #666;
  opacity: 1;
}
.header .location-dropdown__search input:focus {
  outline: none;
  border-color: var(--ruqi-color-primary, #1735f5);
  box-shadow: none;
}
.header .location-dropdown__current {
  display: flex;
  align-items: center;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.25;
  color: #0f172a;
}
.header .location-dropdown .single-dropdown__item {
  display: flex;
  align-items: center;
  width: 100%;
  min-height: 42px;
  margin: 0;
  padding: 10px 12px;
  border: none;
  border-radius: 8px;
  background: transparent;
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  text-align: left;
  color: #0f172a;
  cursor: pointer;
}
.header .location-dropdown .single-dropdown__item:not(:last-child) {
  margin-bottom: 0;
}
.header .location-dropdown .single-dropdown__item:hover {
  background: #eef2ff;
  color: #0f172a;
}
.header .location-dropdown .single-dropdown-cities {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.header__burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.header__burger .header__burger-in {
  position: static;
  display: block;
  width: 20px;
  height: 20px;
  transform: none;
  border-radius: 0;
  background: url(../images/figma/header/burger.svg) no-repeat center;
  background-size: 16px 11px;
}
.header__burger .header__burger-in::before,
.header__burger .header__burger-in::after {
  content: none;
}

@media (min-width: 1180px) and (max-width: 1429.98px) {
  .header__in {
    min-height: 64px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .header:not(.header--nooffset) + * {
    margin-top: 64px;
  }
  .header .header-notifications {
    gap: 2px;
    margin-left: 0;
    margin-right: 0;
  }
  .header .header-notifications .single-dropdown__title--notification {
    width: 40px;
    height: 40px;
    margin-left: 0;
    margin-right: 0;
  }
  .header .header-notifications .header-fns-icon {
    width: 28px;
    height: 28px;
  }
  .header .header-notifications .svg-image-mail-full {
    width: 24px;
    height: 24px;
  }
  .header .single-dropdown__content--list .single-dropdown__item {
    font-size: 14px;
  }
}

@media (max-width: 1429.98px) {
  .header__profile-name,
  .header__profile-company {
    max-width: 188px;
  }
  .header__profile-company {
    font-size: 10px;
    line-height: 14px;
  }
  .header__nav .header__link:not(:last-child),
  .header__nav .btn:not(:last-child) {
    margin-right: 0;
  }
  .header__dropdown + .btn {
    margin-left: 0;
  }
  .header .header__logo-link {
    margin-right: 60px;
  }
  .header .single-dropdown__content--list .single-dropdown__item:not(:last-child),
  .header .location-dropdown .single-dropdown__item:not(:last-child) {
    margin-bottom: 0;
  }

  .header .single-dropdown--active .single-dropdown__content--notification {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: none;
  }
  .header .notifications-head {
    padding: 16px 20px;
  }
  .header .notification {
    padding: 14px 20px;
  }
  .header .notifications-list {
    max-height: calc(100vh - 220px);
  }
  .header .notifications-list__title {
    padding: 12px 20px 4px;
  }
  .header .notifications-foot {
    padding: 12px 20px;
  }
}

@media (max-width: 989.98px) {
  .header__nav .header__link:not(:last-child),
  .header__nav .btn:not(:last-child) {
    margin-right: 0;
  }
  .header .single-dropdown__content--list .single-dropdown__item:not(:last-child),
  .header .location-dropdown .single-dropdown__item:not(:last-child) {
    margin-bottom: 0;
  }
}

@media (max-width: 1179.98px) {
  .header__in {
    min-height: 60px;
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .header:not(.header--nooffset) + * {
    margin-top: 60px;
  }
  .header .header__logo-link {
    width: 73.099px;
    margin-right: 12px;
  }
  .header .header__logo {
    height: 24px;
  }

  .header__nav--main {
    display: none !important;
  }
  .header__nav--admin {
    display: none !important;
  }
  .header__group > .header__nav:last-child {
    gap: 16px;
    min-height: 36px;
  }

  .header .single-dropdown__title {
    display: flex !important;
  }
  .header__profile {
    display: none !important;
  }
  .header__auth-btn {
    display: none !important;
  }
  .header__burger {
    display: inline-flex;
  }

  .header__location-pin {
    display: none;
  }
  .header__location-title {
    font-size: 14px;
    line-height: 22px;
    letter-spacing: 0.1px;
  }
  .header__location-chevron {
    width: 16px;
    height: 16px;
    background-size: 10px 5.5px;
  }

  .header .header-notifications {
    gap: 16px;
    margin: 0;
  }
  .header .header-notifications .single-dropdown__title--notification {
    width: 20px;
    height: 20px;
    margin: 0;
  }
  .header .header-notifications .svg-image-mail-full,
  .header .header-notifications .header-fns-icon,
  .header .header-notifications .single-dropdown__title--notification span {
    width: 20px;
    height: 20px;
  }
  .header .header-notifications .single-dropdown__title--notification[data-count]::before {
    left: -6px;
    right: auto;
    top: -6px;
    min-width: 14px;
    height: 14px;
    padding: 0 3px;
    font-size: 9px;
    line-height: 14px;
  }

  .header .location-dropdown .single-dropdown__item:not(:last-child) {
    margin-bottom: 0;
  }

  .header__mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 30;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
  }
  .header-menu-open .header__mobile-overlay {
    opacity: 1;
    visibility: visible;
  }

  .header__mobile-menu.mobile-menu {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 31;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    height: auto;
    max-height: 86vh;
    padding: 8px 0 12px;
    border-radius: 20px 20px 0 0;
    background: #fff;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(100%);
    opacity: 1;
    visibility: hidden;
    transition: transform 0.24s ease, visibility 0.24s ease;
    flex-direction: column;
    gap: 0;
    overflow-x: hidden;
  }
  .header__mobile-menu--active.mobile-menu {
    transform: translateY(0);
    visibility: visible;
    z-index: 31;
  }

  .mobile-menu__handle {
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 4px;
    margin: 4px auto 20px;
    border-radius: 100px;
    background: #d0d0d0;
  }

  .header__mobile-menu .mobile-menu__in {
    min-width: 0;
    height: auto;
    padding: 0 8px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  .header__mobile-menu .mobile-menu__link {
    display: flex;
    align-items: center;
    min-height: 48px;
    margin: 0;
    padding: 14px 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    line-height: 20px;
    color: #1a1a2e;
    text-decoration: none;
  }
  .header__mobile-menu .mobile-menu__link:hover,
  .header__mobile-menu .mobile-menu__link:active {
    color: #1a1a2e;
  }
  .header__mobile-menu .mobile-menu__link--active {
    background: #f5f7fa;
    color: #1735f5;
  }
  .header__mobile-menu .mobile-menu__link--exit,
  .header__mobile-menu .mobile-menu__link--exit:hover,
  .header__mobile-menu .mobile-menu__link--exit .exit-link {
    color: #df2040;
  }
  .header__mobile-menu .mobile-menu__link-sep {
    display: block;
    height: 1px;
    margin: 0;
    background: #eceef3;
  }

  .header-menu-open {
    overflow: hidden;
  }

  .header .location-dropdown.single-dropdown--active .single-dropdown__content--city-list {
    position: fixed;
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 31;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    max-width: 100vw;
    max-height: 86vh;
    padding: 20px 16px 24px;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
    transform: none;
    overflow-x: hidden;
    overflow-y: auto;
  }
  .header .location-dropdown.single-dropdown--active .single-dropdown__content--city-list::before {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 4px;
    margin: -8px auto 12px;
    border-radius: 100px;
    background: #d0d0d0;
  }
}
