:root {
  --color-primary: #000;
  --color-secondary: #0004e3;
  --color-danger: #ff0000;
  --color-warning: #db9900;
  --color-success: #029100;
  --color-info: #0066cc;
  --color-white: #ffffff;
  --color-gray-light: #f8f9fa;
  --color-gray: #6e6e6e;
  --color-gray-dark: #333;
  --color-background: #fff8e9;
  --color-background-alt: #ffeae9;
  --color-background-dark: rgba(0, 0, 0, 0.7);
  --font-size-xs: 12px;
  --font-size-sm: 14px;
  --font-size-md: 16px;
  --font-size-lg: 18px;
  --font-size-xl: 20px;
  --font-size-xxl: 24px;
  --font-size-xxxl: 32px;
  --spacing-xs: 5px;
  --spacing-sm: 10px;
  --spacing-md: 15px;
  --spacing-lg: 20px;
  --spacing-xl: 25px;
  --spacing-xxl: 30px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 15px;
  --radius-xl: 20px;
  --radius-round: 50%;
  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
  --shadow-xl: 0 20px 40px rgba(0, 0, 0, 0.3);
  --transition-fast: 0.2s ease;
  --transition-base: 0.3s ease;
  --transition-slow: 0.5s ease;
}

/* ==================== RESET & BASE STYLES ==================== */
html,
body {
  font-family: "Inter", sans-serif;
  line-height: 1.5;
  color: var(--color-primary);
  height: 100%;
  width: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* ==================== ОБЕРТКА HEADER + SOS ==================== */
.header-sos-wrapper {
  position: fixed;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  width: 95%;
  max-width: 1500px;
  z-index: 1000;
  display: flex;
  align-items: center;
  border-radius: 50%;
  gap: 15px;
  transition: all 0.3s ease;
  background-color: rgba(255, 255, 255, 1);
  border-style: solid;
  border-width: 1px;
  border-color: rgba(0, 0, 0, 0.1);
  box-shadow: 0px 4px 12px 0px rgba(0, 0, 0, 0.15);
}

/* ==================== ОСНОВНОЙ КОНТЕЙНЕР HEADER ==================== */
.account-header {
  flex: 1;
  background: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 0;
  margin: 0;
  border-radius: 20px;
  transition: all 0.3s ease;
}

.account-header__container._container {
  padding: 0;
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
}

::-webkit-scrollbar {
  width: 8px;
  /* Задаем новую ширину */
}

/* Стилизуем сам ползунок (thumb) */
::-webkit-scrollbar-thumb {
  background: #555;
  border-radius: 10px;
  /* Закругляем углы */
}

/* Стилизуем фон трека (дорожку) */
::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.account-header__content {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 8px 15px;
  height: auto;
  min-height: 65px;
  position: relative;
  z-index: 100;
  background-color: rgba(255, 255, 255, 0);
  background: none;
  background-image: none;
  width: 100%;
  box-sizing: border-box;
  flex-wrap: nowrap;
  overflow: visible;
  border-radius: 20px;
  font-family: -apple-system;
  background-clip: unset;
  -webkit-background-clip: unset;
  color: var(--color-background);
}

#settings {
  background: white;
  border: none;
}

/* ==================== СТИЛИ КНОПКИ SOS ==================== */
.sos-btn {
  outline: 8px solid rgba(255, 0, 51, 0.23) !important;
  backdrop-filter: blur(6px);
  box-shadow: inset 0 0 15px rgb(234 25 25 / 28%), 0 10px 30px rgb(0 0 0 / 68%);
  position: relative;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff3366, #ff0033);
  border: none;
  color: white;
  font-weight: bold;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 15px rgba(255, 0, 51, 0.3);
  transition: all 0.3s ease;
  z-index: 1001;
  flex-shrink: 0;
  overflow: hidden;
  margin-left: 10px;
  margin-right: 10px;
  margin-bottom: 15px;
  /* Анимация */
  animation: pulse-shadow 2s infinite ease-in-out;
}

@keyframes pulse-shadow {
  0% {
    box-shadow: inset 0 0 15px rgb(234 25 25 / 28%),
      0 10px 30px rgb(0 0 0 / 68%), 0 4px 15px rgba(255, 0, 51, 0.3);
  }

  50% {
    box-shadow: inset 0 0 25px rgb(234 25 25 / 38%),
      0 15px 40px rgb(0 0 0 / 78%), 0 6px 20px rgba(255, 0, 51, 0.5);
  }

  100% {
    box-shadow: inset 0 0 15px rgb(234 25 25 / 28%),
      0 10px 30px rgb(0 0 0 / 68%), 0 4px 15px rgba(255, 0, 51, 0.3);
  }
}

/* Кнопка HELP в левом верхнем углу */
.sos-btn--fixed-left {
  position: fixed !important;
  top: 28px !important;
  left: 25px !important;
  width: 78px !important;
  height: 78px !important;
  margin: 0 !important;
  z-index: 100 !important;
  display: flex !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
  touch-action: manipulation !important;
}

.sos-btn--fixed-left img {
  pointer-events: none !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent !important;
  -webkit-user-drag: none !important;
  user-drag: none !important;
}

/* Убеждаемся что кнопка HELP не наслаивается на header */
#sosBtnDesktop {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  /* Кнопка находится в левом углу и не должна перекрывать header */
  position: fixed !important;
  z-index: 100 !important;
}

.sos-btn--fixed-left .sos-ring {
  display: none !important;
}

/* Анимированная обводка при удержании кнопки HELP */
#sosBtnDesktop {
  position: relative;
  overflow: visible !important;
}

#sosBtnDesktop::before {
  font-weight: bold;
  content: "";
  position: absolute;
  top: -6px;
  left: -6px;
  right: -6px;
  bottom: -6px;
  border: 10px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: -1;
  box-sizing: border-box;
}

#sosBtnDesktop.holding::before {
  opacity: 1;
  animation: rotateBorder 1.5s linear infinite;
}

@keyframes rotateBorder {
  0% {
    transform: rotate(0deg);
    border-color: rgba(139, 55, 55, 0.9);
    border-top-color: rgba(255, 255, 255, 0.3);
  }

  25% {
    border-right-color: rgba(255, 0, 0, 0.3);
  }

  50% {
    border-bottom-color: rgba(255, 0, 0, 0.3);
  }

  75% {
    border-left-color: rgba(255, 255, 255, 0.3);
  }

  100% {
    transform: rotate(360deg);
    border-color: rgba(255, 255, 255, 0.9);
    border-top-color: rgba(255, 255, 255, 0.3);
  }
}

.sos-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 20px rgba(255, 0, 51, 0.4);
}

.sos-btn:active {
  transform: scale(0.95);
}

.sos-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
  transform-origin: center;
}

/* ==================== ОПТИМИЗИРОВАННАЯ СТРУКТУРА КОЛОНОК ==================== */
.account-header__column {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

/* ЛОГОТИП - фиксированная ширина */
.account-header__column:first-child {
  flex: 0 0 auto;
  width: 60px;
}

/* ПОИСКОВАЯ СТРОКА - занимает всё доступное пространство, но уступает HELP */
.account-header__column:nth-child(2) {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  overflow: hidden;
}

/* GIF-ССЫЛКИ - фиксированная ширина */
.account-header__column:nth-child(3) {
  flex: 0 0 auto;
  width: auto;
}

/* КНОПКА HELP - фиксированная ширина, всегда справа от поиска, приоритет над поиском */
.account-header__help-column {
  flex: 0 0 auto;
  width: auto;
  min-width: 56px;
  order: 3;
  flex-shrink: 0;
  z-index: 10;
}

/* Обертка для кнопки HELP - всегда видна на всех устройствах */
.account-header__help-wrapper {
  display: flex;
  position: relative;
}

.account-header__help-wrapper--desktop {
  position: relative;
  display: flex !important;
  align-items: center;
  flex-shrink: 0;
  margin-left: 15px;
  z-index: 1001;
}

.account-header__help-wrapper--desktop .sos-btn {
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 0;
}

/* Адаптивные размеры для HELP кнопки на разных устройствах */
@media (min-width: 769px) {
  .account-header__help-wrapper--desktop {
    display: flex !important;
  }

  .account-header__help-column {
    display: none !important;
  }
}

/* На мобильных адаптируем размер HELP кнопки */
@media (max-width: 768px) {
  .account-header__help-wrapper--desktop {
    display: flex !important;
    margin-left: 5px;
  }

  .account-header__help-wrapper--desktop .sos-btn {
    width: 50px;
    height: 50px;
    font-size: 11px;
  }

  .account-header__help-wrapper--desktop .sos-ring {
    width: 50px;
    height: 50px;
  }

  .account-header__help-column {
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .account-header__help-wrapper--desktop {
    margin-left: 3px;
  }

  .account-header__help-wrapper--desktop .sos-btn {
    width: 46px;
    height: 46px;
    font-size: 10px;
  }

  .account-header__help-wrapper--desktop .sos-ring {
    width: 46px;
    height: 46px;
  }
}

@media (max-width: 360px) {
  .account-header__help-wrapper--desktop {
    margin-left: 2px;
  }

  .account-header__help-wrapper--desktop .sos-btn {
    width: 42px;
    height: 42px;
    font-size: 9px;
  }

  .account-header__help-wrapper--desktop .sos-ring {
    width: 42px;
    height: 42px;
  }
}

/* GIF-ССЫЛКИ - фиксированная ширина */
.account-header__column:nth-child(4) {
  flex: 0 0 auto;
  width: auto;
  order: 4;
}

/* ПРОФИЛЬ - фиксированная ширина */
.account-header__column:nth-child(5) {
  flex: 0 0 auto;
  width: auto;
  order: 5;
}

/* ==================== АДАПТИВНОСТЬ ==================== */

/* Планшеты */
@media (max-width: 1024px) {
  .header-sos-wrapper {
    width: 57%;
    top: 15px;
    gap: 12px;
  }

  .account-header__content {
    padding: 8px 12px;
    gap: 12px;
  }

  .sos-btn {
    width: 52px;
    height: 52px;
    font-size: 13px;
    margin-left: 10px;
  }

  .sos-ring {
    width: 52px;
    height: 52px;
  }

  .account-header__column:first-child {
    width: 55px;
  }
}

/* Мобильные устройства */
@media (max-width: 768px) {
  .header-sos-wrapper {
    width: 97%;
    top: 15px;
    gap: 10px;
  }

  .account-header__content {
    padding: 8px 10px;
    gap: 10px;
    min-height: 60px;
  }

  .sos-btn {
    width: 48px;
    height: 48px;
    font-size: 12px;
    margin-right: 100px;
    outline: 5px solid rgba(255, 0, 51, 0.23) !important;
  }

  .sos-ring {
    width: 48px;
    height: 48px;
  }

  .account-header__column:first-child {
    width: 50px;
  }

  /* Скрываем GIF-ссылки на очень маленьких экранах */
  @media (max-width: 480px) {
    .account-header__column:nth-child(3) {
      display: none;
    }
  }
}

/* Очень маленькие экраны */
@media (max-width: 480px) {
  .header-sos-wrapper {
    width: 98%;
    top: 10px;
    gap: 8px;
  }

  .account-header {
    border-radius: 15px;
  }

  .account-header__content {
    padding: 6px 8px;
    gap: 8px;
    min-height: 55px;
    border-radius: 15px;
  }

  .sos-btn {
    width: 44px;
    height: 44px;
    font-size: 11px;
  }

  .sos-ring {
    width: 44px;
    height: 44px;
  }

  .account-header__column:first-child {
    width: 45px;
  }
}

/* Ориентация landscape на мобильных */
@media (max-height: 500px) and (orientation: landscape) {
  .header-sos-wrapper {
    top: 10px;
    width: 98%;
    gap: 8px;
  }

  .account-header__content {
    min-height: 50px;
    padding: 5px 10px;
  }

  .sos-btn {
    width: 46px;
    height: 46px;
  }

  .sos-ring {
    width: 46px;
    height: 46px;
  }
}

/* Очень широкие экраны */
@media (min-width: 1920px) {
  .header-sos-wrapper {
    max-width: 1600px;
  }
}

/* ==================== ПОИСКОВАЯ СТРОКА (ОПТИМИЗИРОВАННАЯ) ==================== */
.search-account {
  width: 100%;
  min-width: 0;
  margin: 0;
  display: flex;
  align-items: center;
}

.search-account__rows {
  position: relative;
  width: 100%;
  display: flex;
  align-items: center;
  flex: 1;
}

.search-account__input {
  width: 100%;
  flex: 1;
}

.search-account__input input {
  width: 800px;
  height: 70px !important;
  padding: 12px 50px 12px 50px;
  font-size: 14px;
  box-sizing: border-box;
  background-color: #ededed;
  border-radius: 30px;
  line-height: 1;
  border: 2px solid transparent;
  transition: all var(--transition-base);
  font-family: "Inter", sans-serif;
  outline: none;
  -webkit-appearance: none;
  display: block;
}

/* Поиск теперь полностью адаптивный, без фиксированных ширин */
.search-account__input input:focus {
  border-color: var(--color-secondary);
  background-color: #fff;
  box-shadow: 0 0 0 3px rgba(0, 4, 227, 0.1);
}

.search-account__icon {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  left: 18px;
  z-index: 2;
  pointer-events: none;
  color: #666;
}

.hidden {
  display: none;
}

.search-account__img {
  width: 38px;
  height: 38px;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  right: 8px;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-base);
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
  z-index: 2;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.search-account__img:hover {
  background: #f0f0f0;
  transform: translateY(-50%) scale(1.05);
  border-color: var(--color-secondary);
}

.search-account__img img {
  width: 36px;
  height: 36px;
  object-fit: contain;
}

/* ==================== GIF LINKS ==================== */
.account-header__gif-links {
  display: flex;
  gap: var(--spacing-sm);
  align-items: center;
  flex-shrink: 0;
}

.gif-link {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-round);
  overflow: hidden;
  transition: all var(--transition-base);
  flex-shrink: 0;
  border: 2px solid transparent;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  text-decoration: none;
  position: relative;
}

.gif-link:hover {
  transform: scale(1.1);
  border-color: var(--color-secondary);
  box-shadow: 0 4px 12px rgba(0, 4, 227, 0.2);
}

.gif-link video,
.gif-link img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-round);
}

/* ==================== PROFILE HEADER ==================== */
.profile-account {
  position: relative;
  z-index: 101;
}

.profile-account__top {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 30px;
  transition: all var(--transition-base);
  background: transparent;
  border: 2px solid transparent;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  border: none;
  background: none;
  text-align: left;
  font-family: inherit;
}

.profile-account__top:hover {
  background: rgba(0, 0, 0, 0.05);
  border-color: #e0e0e0;
}

.profile-account__info:not(.info-profile) {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  text-align: right;
}

.profile-account__name {
  font-size: var(--font-size-md);
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  max-width: 130px;
  text-align: right;
  color: var(--color-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-account__role {
  font-size: var(--font-size-xs);
  line-height: 1.2;
  margin: 0;
  color: #6b7280;
  text-align: right;
}

.profile-account__logo {
  flex-shrink: 0;
}

.profile-account__logo img {
  width: 48px;
  height: 48px;
  min-width: 48px;
  border-radius: var(--radius-round);
  border: 2px solid #fff;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-base);
  object-fit: cover;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.profile-account__top:hover .profile-account__logo img {
  transform: scale(1.05);
  box-shadow: var(--shadow-md);
}

/* ==================== КАРТА ==================== */
/* Компенсируем padding-left body для карты, чтобы она занимала всю ширину */
body.map-page #map {
  margin-left: -72px;
  width: calc(100% + 72px);
}

@media (max-width: 768px) {
  body.map-page #map {
    margin-left: -68px;
    width: calc(100% + 68px);
  }
}

#map {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #f0f0f0;
  transition: all 0.3s ease;
}

/* ==================== ПОПАП-УВЕДОМЛЕНИЕ О СОБЫТИИ ==================== */
.event-notification-popup {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: white;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  z-index: 1000;
  max-height: 70vh;
  overflow-y: auto;
  transform: translateY(100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 20px;
  padding-bottom: max(20px, calc(20px + env(safe-area-inset-bottom)));
  -webkit-overflow-scrolling: touch;
}

.event-notification-popup.show {
  transform: translateY(0);
}

.event-notification-popup__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}

.event-notification-popup__title-wrapper {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
}

.event-notification-popup__icon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff0000;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  /* Светло-голубая обводка с эффектом размытия */
  box-shadow: 0 0 0 1.5px rgba(135, 206, 235, 0.6),
    0 0 3px 2px rgba(135, 206, 235, 0.4);
  border: 1px solid rgba(135, 206, 235, 0.8);
}

.event-notification-popup__icon svg {
  width: 14px;
  height: 14px;
  fill: white;
}

/* Альтернативный вариант иконки - просто красный круг */
/* Убираем SVG из иконки, используем простой красный круг */
.event-notification-popup__icon svg {
  display: none;
}

/* Стили для разных цветов иконок с обводкой */
.event-notification-popup__icon.red {
  background: #ff0000;
}

.event-notification-popup__icon.orange {
  background: #ff9800;
}

.event-notification-popup__icon.blue {
  background: #2196f3;
}

.event-notification-popup__title {
  font-size: 18px;
  font-weight: 600;
  color: #000;
  margin: 0;
  line-height: 1.2;
}

.event-notification-popup__close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: color 0.2s ease;
  flex-shrink: 0;
}

.event-notification-popup__close:hover {
  color: #000;
}

.event-notification-popup__close svg {
  width: 20px;
  height: 20px;
}

.event-notification-popup__address {
  font-size: 14px;
  color: #666;
  margin-bottom: 15px;
  line-height: 1.4;
}

.event-notification-popup__image {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 15px;
  background: #f5f5f5;
  aspect-ratio: 16 / 9;
  display: flex;
  align-items: center;
  justify-content: center;
}

.event-notification-popup__image img {
  width: 50%;
  height: 50%;
  object-fit: cover;
}

.event-notification-popup__button {
  width: 100%;
  padding: 14px 20px;
  background: #000;
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
}

.event-notification-popup__button:hover {
  background: #333;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.event-notification-popup__button:active {
  transform: translateY(0);
}

/* Десктоп версия попапа */
@media (min-width: 769px) {
  .event-notification-popup {
    position: fixed;
    bottom: auto;
    top: 50%;
    left: 50%;
    right: auto;
    transform: translate(-50%, -50%) scale(0.9);
    max-width: 450px;
    width: 90%;
    max-height: 80vh;
    border-radius: 20px;
    padding: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  }

  .event-notification-popup.show {
    transform: translate(-50%, -50%) scale(1);
  }

  .event-notification-popup__title {
    font-size: 20px;
  }

  .event-notification-popup__address {
    font-size: 15px;
  }

  .event-notification-popup__image {
    margin-bottom: 20px;
  }

  .event-notification-popup__button {
    padding: 16px 24px;
    font-size: 17px;
  }
}

/* ==================== SOS КНОПКА ==================== */

.sos-ring {
  position: absolute;
  top: 0;
  left: 0;
  width: 56px;
  height: 56px;
}

/* ==================== FAB КНОПКА ==================== */
.fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--color-secondary);
  color: white;
  border: none;
  font-size: 24px;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.fab:hover {
  transform: scale(1.1);
  box-shadow: var(--shadow-xl);
}

.fab-logo {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

/* ==================== КНОПКИ УПРАВЛЕНИЯ ЗУМОМ ==================== */
.m-zoomstack {
  position: fixed;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 10;
}

/* Выравниваем элементы стека по одной ширине (чтобы HELP был по центру относительно +) */
.m-zoomstack .sos-btn--stack,
.m-zoomstack .map-settings,
.m-zoomstack #mLoc {
  width: 56px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.m-zoomstack .map-settings {
  height: 96px;
}

.m-zoomstack #mLoc {
  width: 40px;
  height: 40px !important;
  cursor: pointer;
  transition: transform 0.2s ease;
}

.m-zoomstack #mLoc:hover {
  transform: scale(1.1);
}

.m-zoomstack #mAi,
.m-zoomstack #mFamily {
  cursor: pointer;
  transition: transform 0.2s ease;
}

.m-zoomstack #mAi:hover,
.m-zoomstack #mFamily:hover {
  transform: scale(1.1);
}

.m-zoomstack #mChat,
.m-zoomstack .m-zoomstack-chat {
  cursor: pointer;
  transition: transform 0.2s ease;
  width: 40px;
  height: 40px;
  display: none;
}

.m-zoomstack #mChat:hover,
.m-zoomstack .m-zoomstack-chat:hover {
  transform: scale(1.1);
}

@media (max-width: 768px) {

  .m-zoomstack #mChat,
  .m-zoomstack .m-zoomstack-chat {
    display: block;
  }
}

.m-zoomstack button:not(.sos-btn) {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: white;
  border: none;
  font-size: 20px;
  font-weight: bold;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.m-zoomstack button:not(.sos-btn):hover {
  background: var(--color-secondary);
  color: white;
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 4, 227, 0.3);
}

.m-zoomstack button:not(.sos-btn):active {
  transform: scale(0.95);
}

/* ==================== Подсказки адреса (SOS форма) ==================== */
.address-autocomplete-wrap {
  position: relative;
}

.address-suggest-list {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
  z-index: 10010;
  overflow: hidden;
  max-height: 260px;
  overflow-y: auto;
}

.address-suggest-item {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.25;
  color: #111;
  cursor: pointer;
  user-select: none;
}

.address-suggest-item:hover {
  background: rgba(0, 4, 227, 0.06);
}

#mLoc.loading {
  animation: pulse 1.5s infinite;
}

.cl1 img {
  width: 31px !important;
  height: 23px !important;
}

.cl2 {
  width: 20px;
  height: 32px;
}

.cl3 {
  width: 32px;
  height: 32px;
}

/* Адаптивность для кнопок зума */
@media (max-width: 768px) {
  .m-zoomstack {
    top: auto;
    bottom: 130px;
    /* выше bottom-nav */
    right: 15px;
    transform: none;
    gap: 6px;
  }

  .m-zoomstack button:not(.sos-btn) {
    width: 44px;
    height: 44px;
    font-size: 18px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
}

@media (max-width: 480px) {
  .m-zoomstack {
    top: auto;
    bottom: 40% !important;
    /* выше bottom-nav */
    right: 10px;
    transform: none;
    gap: 5px;
  }

  .m-zoomstack button:not(.sos-btn) {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }
}

/* ==================== ВЫЕЗЖАЮЩАЯ ПАНЕЛЬ (СЛЕВА) ==================== */
.m-side-drawer {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 11;
}

.m-side-drawer__checkbox {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.m-side-drawer__toggle {
  width: 25px;
  height: 56px;
  border-radius: 0 16px 16px 0;
  background: rgba(233, 239, 243, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.m-side-drawer__toggle:focus-visible {
  outline: 2px solid rgba(0, 4, 227, 0.35);
  outline-offset: 2px;
}

.m-side-drawer__toggle svg {
  width: 24px;
  height: 24px;
  transition: transform 0.25s ease;
}

.m-side-drawer__panel {
  position: absolute;
  top: 50%;
  left: calc(36px + 2px);
  width: clamp(200px, 30vw, 500px);
  max-height: calc(100vh - 40px);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  transform: translateY(-50%) translateX(calc(-100% - 24px));
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.25s ease, opacity 0.25s ease, visibility 0.25s ease;
}

.m-side-drawer__panel-inner {
  display: flex;
  flex-direction: column;
  max-height: inherit;
}

.m-side-drawer__title {
  padding: 5px 0px;
  font-family: Inter;
  font-weight: 700;
  font-size: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  text-align: center;
}

.m-side-drawer__content span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  font-weight: bold;
}

.point-news {
  background-color: #000000;
}

.point-news_now {
  background-color: #007bff;
}

.point-orders {
  background-color: orange;
}


.point-signal {
  background-color: red;
}

.now {
  border: 5px solid black;
}


.m-side-drawer__content {
  padding: 16px;
  overflow: auto;
  font-family: Inter;
  font-size: 14px;
}

.m-side-drawer__checkbox:checked~.m-side-drawer__panel {
  transform: translateY(-50%) translateX(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.m-side-drawer__checkbox:checked+.m-side-drawer__toggle svg {
  transform: rotate(180deg);
}

@keyframes pulse {
  0% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }

  100% {
    opacity: 1;
  }
}

/* ==================== АДАПТИВНЫЕ СТИЛИ ==================== */

/* Планшеты (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .account-header {
    width: 98%;
    left: 1%;
    transform: none;
  }

  .account-header__content {
    padding: 10px 20px;
    gap: 15px;
  }

  .account-header__column:first-child {
    width: 50px;
  }

  .account-header__gif-links {
    gap: 8px;
  }

  .gif-link {
    width: 40px;
    height: 40px;
  }

  .profile-account__name {
    max-width: 110px;
  }
}

/* Мобильные устройства (до 768px) */
@media (max-width: 768px) {
  .header-sos-wrapper {
    top: 10px;
    width: calc(100% - 20px);
    left: 10px;
    right: 10px;
    transform: none;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }

  .account-header {
    border-radius: 15px;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .account-header__content {
    padding: 8px 12px;
    min-height: auto;
    gap: 10px;
  }

  /* На мобильных скрываем логотип, GIF-ссылки и профиль, но оставляем HELP */
  .account-header__column:first-child,
  .account-header__column:nth-child(4),
  .account-header__column:nth-child(5) {
    display: none !important;
  }

  /* Поиск адаптивный, уступает место HELP */
  .account-header__column:nth-child(2) {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 66px);
    /* Оставляем место для HELP (50px + отступы) */
    overflow: hidden;
  }

  /* HELP всегда видна, фиксированного размера */
  .account-header__help-column {
    flex: 0 0 50px !important;
    min-width: 50px !important;
    display: flex !important;
    order: 3;
    flex-shrink: 0;
  }

  .search-account__input input {
    height: 50px;
    padding: 10px 40px 10px 40px;
    font-size: 14px;
    width: 100% !important;
    max-width: 100%;
  }

  .search-account__img {
    right: 4px;
    width: 32px;
    height: 32px;
  }

  .search-account__icon {
    left: 15px;
  }

  .search-account__img {
    right: 6px;
    width: 36px;
    height: 36px;
  }

  .search-account__img img {
    width: 20px;
    height: 20px;
  }

  /* Карта подстраивается под высоту */
  #map {
    height: calc(100% - 70px);
    bottom: 60px;
  }

  /* Кнопка SOS - теперь внутри хедера */
  .sos-btn {
    width: 50px;
    height: 50px;
    font-size: 12px;
    margin-left: 8px;
    margin-right: 10px;
    margin-bottom: 0;
  }

  .sos-ring {
    width: 50px;
    height: 50px;
  }

  .sos-ring {
    width: 50px;
    height: 50px;
  }

  /* Кнопки зума */
  .m-zoomstack {
    bottom: 130px;
    right: 15px;
    gap: 6px;
  }

  .m-zoomstack button {
    width: 44px;
    height: 44px;
    font-size: 18px;
  }
}

@media (max-width: 552px) {
  .search-account__input input {
    width: 400px !important;
  }
}

@media (max-width: 452px) {
  .search-account__input input {
    width: 300px !important;
  }
}

/* Маленькие мобильные (до 480px) */
@media (max-width: 480px) {
  .header-sos-wrapper {
    top: 8px;
    width: calc(100% - 16px);
    left: 8px;
    right: 8px;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }

  .account-header {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .account-header__content {
    padding: 6px 8px;
    min-height: auto;
    gap: 6px;
  }

  /* Поиск адаптивный, HELP фиксированная */
  .account-header__column:nth-child(2) {
    flex: 1;
    min-width: 0;
    max-width: calc(100% - 60px);
    /* Оставляем место для HELP */
  }

  .search-account__input input {
    height: 40px;
    padding: 8px 35px 8px 35px;
    font-size: 13px;
  }

  .search-account__icon {
    left: 12px;
  }

  .search-account__img {
    right: 3px;
    width: 30px;
    height: 30px;
  }

  .search-account__img img {
    width: 16px;
    height: 16px;
  }

  #map {
    height: calc(100% - 66px);
  }

  /* HELP всегда видна, фиксированного размера */
  .account-header__help-column {
    flex: 0 0 46px !important;
    min-width: 46px !important;
    display: flex !important;
  }

  .sos-btn {
    width: 46px;
    height: 46px;
    font-size: 11px;
    margin-left: 4px;
  }

  .sos-ring {
    width: 46px;
    height: 46px;
  }

  .m-zoomstack {
    bottom: 125px;
    right: 10px;
  }

  .m-zoomstack button {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  .event-notification-popup {
    padding: 16px;
  }

  .event-notification-popup__title {
    font-size: 16px;
  }

  .event-notification-popup__address {
    font-size: 13px;
  }
}

/* Очень маленькие экраны (до 320px) */
@media (max-width: 320px) {
  .header-sos-wrapper {
    top: 6px;
    width: calc(100% - 12px);
    left: 6px;
    right: 6px;
    background-color: transparent;
    border: none;
    box-shadow: none;
  }

  .global-btn a::before {
    background-color: none;
  }

  .account-header {
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .account-header__content {
    padding: 5px 8px;
    min-height: auto;
  }

  .search-account__input input {
    height: 36px;
    padding: 6px 35px 6px 35px;
    font-size: 12px;
  }

  .sos-btn {
    width: 42px;
    height: 42px;
    font-size: 10px;
    margin-left: 5px;
  }

  .sos-ring {
    width: 42px;
    height: 42px;
  }

  .m-zoomstack {
    bottom: 120px;
    right: 8px;
  }

  .m-zoomstack button {
    width: 38px;
    height: 38px;
    font-size: 14px;
  }

  .event-notification-popup {
    padding: 14px;
  }

  .event-notification-popup__title {
    font-size: 15px;
  }

  .bottom-nav {
    padding: 8px 3px calc(12px + env(safe-area-inset-bottom));
  }

  .bottom-nav-icon {
    width: 24px;
    height: 24px;
    font-size: 18px;
  }

  /* Иконки новостей, заказов, сигналов и избранного на маленьких экранах */
  .bottom-nav-item[data-page="news"] .bottom-nav-icon,
  .bottom-nav-item[data-page="orders"] .bottom-nav-icon,
  .bottom-nav-item[data-page="signals"] .bottom-nav-icon,
  .bottom-nav-item[data-page="favorites"] .bottom-nav-icon {
    width: 30px;
    height: 30px;
  }

  .bottom-nav-item[data-page="news"] .bottom-nav-icon img,
  .bottom-nav-item[data-page="orders"] .bottom-nav-icon img,
  .bottom-nav-item[data-page="signals"] .bottom-nav-icon img,
  .bottom-nav-item[data-page="favorites"] .bottom-nav-icon img {
    width: 30px;
    height: 30px;
  }

  .bottom-nav-label {
    font-size: 9px;
  }
}

/* Десктоп (1025px и больше) */
@media (min-width: 1025px) {
  .header-sos-wrapper {
    top: 30px;
    max-width: 1800px;
  }

  .account-header__content {
    padding: 12px 25px;
    gap: 20px;
  }

  .search-account__input input {
    height: 50px;
    width: 1220px;
    padding: 13px 52px 13px 52px;
    font-size: 15px;
  }

  .account-header__column:first-child {
    width: 70px;
  }

  .m-zoomstack {
    bottom: 200px;
    right: 30px;
  }

  .m-zoomstack button {
    width: 48px;
    height: 48px;
    font-size: 20px;
  }

  .sos-btn {
    width: 54px;
    height: 54px;
    font-size: 20px;
  }
}

/* ==================== ДОПОЛНИТЕЛЬНЫЕ СТИЛИ ==================== */
.drawer {
  position: fixed;
  top: 0;
  right: -350px;
  width: 350px;
  height: 100%;
  background: white;
  box-shadow: -2px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 1002;
  transition: right 0.3s ease;
  overflow-y: auto;
}

.drawer.open {
  right: 0;
}

.modal {
  position: fixed;
  padding: 36px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  background: white;
  z-index: 10004;
  /*padding: 24px;*/
  border-radius: 16px;
  box-shadow: var(--shadow-xl);
  z-index: 10002;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  max-width: 100%;
  width: 505px;
  height: auto;
}

.modal.show {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, -50%) scale(1);
}

/* Стили для select reg_сity - черный цвет текста для option */
#reg_сity option {
  color: #000000;
  background-color: #ffffff;
}

/* Убираем эффект "модалка в модалке" для sosFormModal */
#sosFormModal {
  background: rgba(0, 0, 0, 0.3);
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  width: 90% !important;
  max-width: 600px !important;
}

#sosFormModal .popup-info__content {
  background: #f3f3f3;
  border-radius: 20px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
  width: 100%;
  max-width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
}

/* Стили для скроллбара в sosFormModal */
#sosFormModal .popup-info__content::-webkit-scrollbar {
  width: 8px;
}

#sosFormModal .popup-info__content::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

#sosFormModal .popup-info__content::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

#sosFormModal .popup-info__content::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

#sosFormModal .popup-info__top {
  /* Липкая шапка, прижатая к самому верху модалки */
  position: sticky;
  top: -28px; /* компенсируем внутренний отступ .popup-info__content (padding: 28px) */
  z-index: 10;

  /* Растягиваем фон шапки на всю ширину модалки */
  margin: 0 -28px 24px;
  padding: 16px 28px 16px;
  background: #f3f3f3;
  border-radius: 20px 20px 0 0;

  /* Сохраняем нормальное поведение вложенных элементов (подсказка и т.п.) */
  overflow: visible !important;
}

#sosFormModal .popup-info__actions {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  overflow: visible !important;
}

#sosFormModal .popup-info__title {
  font-size: 22px;
  font-weight: 700;
  color: #111827;
}


/* Кнопка подсказки */
#sosFormModal .popup-info__help-btn {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  padding: 0;
  margin: 0;
  outline: none;
  z-index: 1;
  overflow: visible !important;
}

#sosFormModal .popup-info__help-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
  z-index: 100000 !important;
}

#sosFormModal .popup-info__help-btn .help-icon {
  font-size: 18px;
  font-weight: 700;
  color: #6b7280;
  line-height: 1;
}

#sosFormModal .popup-info__help-btn:hover .help-icon {
  color: #374151;
}

#sosFormModal .popup-info__help-btn .help-tooltip {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #1f2937;
  color: white;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  z-index: 999999 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  display: block !important;
}

#sosFormModal .popup-info__help-btn .help-tooltip::after {
  content: '';
  position: absolute;
  left: 100%;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #1f2937;
}

#sosFormModal .popup-info__help-btn:hover .help-tooltip {
  opacity: 1 !important;
  visibility: visible !important;
}

#sosFormModal .popup-info__close {
  transition: transform 0.2s ease;
}

#sosFormModal .popup-info__close:hover {
  transform: rotate(90deg);
}

/* Боттомшит выбора времени жизни (адаптив) — поверх модалки формы */
.sos-lifetime-sheet-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10005;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sos-lifetime-sheet-overlay.show {
  opacity: 1;
}

.sos-lifetime-sheet {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10006;
  pointer-events: none;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1);
}

.sos-lifetime-sheet.show {
  pointer-events: auto;
  transform: translateY(0);
}

.sos-lifetime-sheet__content {
  background: #fff;
  border-radius: 20px 20px 0 0;
  padding: 16px 20px calc(20px + env(safe-area-inset-bottom, 0));
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.sos-lifetime-sheet__handle {
  width: 40px;
  height: 4px;
  background: #ddd;
  border-radius: 2px;
  margin: 0 auto 16px;
  flex-shrink: 0;
}

.sos-lifetime-sheet__title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 600;
  color: #333;
  flex-shrink: 0;
}

.sos-lifetime-sheet__fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

/* На мобильных нативные date/time часто открываются модально; ограничиваем высоту боттомшита,
   чтобы поля были в верхней части экрана и выпадающий пикер (если есть) не уходил за край */
.sos-lifetime-sheet__fields .form-popup__input input {
  width: 100%;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 16px;
  box-sizing: border-box;
}

.sos-lifetime-sheet__btn {
  width: 100%;
  padding: 14px;
  background: #0004E3;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
}

.sos-lifetime-sheet__btn:hover {
  opacity: 0.9;
}

@media (min-width: 769px) {

  .sos-lifetime-sheet-overlay,
  .sos-lifetime-sheet {
    display: none !important;
  }
}

.sos-lifetime-input-wrap {
  position: relative;
}

/* Плейсхолдер только в адаптиве (на десктопе видна маска datetime-local) */
.sos-lifetime-placeholder {
  display: none;
}

@media (max-width: 768px) {
  .sos-lifetime-placeholder {
    display: block;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    pointer-events: none;
    font-size: 14px;
    white-space: nowrap;
  }

  .sos-lifetime-placeholder.hidden {
    display: none;
  }
}

/* Стили для инпута с иконкой локации */
#sosFormModal .form-popup__input--with-icon {
  position: relative;
}

#sosFormModal .form-popup__input--with-icon input {
  padding-right: 45px;
}

#sosFormModal .form-popup__location-icon {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  transition: color 0.2s ease;
  z-index: 1;
}

#sosFormModal .form-popup__location-icon:hover {
  color: #0ea5a4;
}

#sosFormModal .form-popup__location-icon:active {
  color: #0c8a89;
}

#sosFormModal .form-popup__location-icon svg {
  width: 20px;
  height: 20px;
  display: block;
}

/* Стили для инпута с иконкой рубля */
.form-popup__input--with-icon {
  position: relative;
}

.form-popup__input--with-icon input {
  padding-right: 40px;
}

.form-popup__ruble-icon {
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  font-size: 18px;
  font-weight: 500;
  pointer-events: none;
  z-index: 1;
  line-height: 1;
}

@media (max-width: 768px) {
  #sosFormModal {
    width: 95% !important;
  }

  #sosFormModal .popup-info__content {
    padding: 20px;
    border-radius: 16px;
  }

  #sosFormModal .popup-info__title {
    font-size: 20px;
  }
}

.backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10003;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10001;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
}

.backdrop.show {
  opacity: 1;
  visibility: visible;
}

/* ==================== PROFILE DROPDOWN ==================== */
.info-profile {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  z-index: 10002 !important;
  transform: translateY(10px) !important;
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  max-height: 80vh !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  display: block !important;
  background-color: #ffffff !important;
  border-radius: 20px !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
  min-width: 380px !important;
  max-width: 400px !important;
  margin-top: 8px !important;
  border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.profile-account.open .info-profile {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: all !important;
  transform: translateY(0) !important;
}

@media (max-width: 800px) {
  .info-profile {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 15px !important;
    right: 15px !important;
    width: calc(100% - 30px) !important;
    max-width: calc(100% - 30px) !important;
    min-width: auto !important;
    max-height: 85vh !important;
    border-radius: 20px 20px 0 0 !important;
    transform: translateY(100%) !important;
    margin: 0 !important;
  }

  .profile-account.open .info-profile {
    transform: translateY(0) !important;
  }
}

/* ==================== НИЖНЯЯ НАВИГАЦИЯ ДЛЯ МОБИЛЬНЫХ ==================== */
.map {
  height: 110% !important;
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  touch-action: manipulation;
  left: 0;
  right: 0;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 10px 8px max(15px, env(safe-area-inset-bottom));
  box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  border-top-left-radius: 20px;
  border-top-right-radius: 20px;
  min-height: 60px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom));
  color: var(--color-background-alt);
  gap: 0;
}

/* Белый фон для мобильных - переопределяем базовые стили */
@media (max-width: 768px) {

  .bottom-nav,
  #bottomNav.bottom-nav {
    background-color: #ffffff !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    display: flex;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  color: #666;
  padding: 5px 0;
  flex: 1;
  min-width: 0;
  margin: 0;
}

/* HELP (SOS) внутри m-zoomstack на мобильных */
.sos-btn--stack {
  display: none;
  margin: 0 !important;
  margin-bottom: 8px !important;
  padding: 0 !important;
  width: 56px !important;
  height: 56px !important;
  font-size: 14px !important;
  /* В style.css у .sos-btn стоит position:fixed (ломает стек) */
  position: static !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  transform: none !important;
}

/* style.css на мобилках задаёт .m-zoomstack button белым прямоугольником.
   Возвращаем SOS-кнопке её родной вид внутри стека. */
.m-zoomstack button.sos-btn.sos-btn--stack {
  position: relative !important;
  /* якорь для абсолютного .sos-ring */
  border-radius: 50% !important;
  background: linear-gradient(135deg, #ff3366, #ff0033) !important;
  border: none !important;
  box-shadow: 0 4px 15px rgba(255, 0, 51, 0.3) !important;
  color: #fff !important;
  font-weight: bold !important;
  overflow: hidden !important;
}

.m-zoomstack button.sos-btn.sos-btn--stack:hover {
  transform: none !important;
}

.m-zoomstack button.sos-btn.sos-btn--stack .sos-ring {
  width: 100% !important;
  height: 100% !important;
}

.sos-btn--fixed-left svg {
  width: 75px !important;
  height: 75px !important;
}

/* показываем над кнопками зума только на мобильных (<=768px) */
/* Адаптация для планшетов */
@media (min-width: 769px) and (max-width: 1024px) {
  .sos-btn--fixed-left {
    top: 20px !important;
    left: 14px !important;
    /* Выровнено по центру header на планшетах: header top (15px) + header height/2 (40px) - кнопка height/2 (24px) = 31px */
  }
}

@media (max-width: 768px) {
  .m-zoomstack .sos-btn--stack {
    display: flex;
  }

  /* на мобильных скрываем desktop-HELP в шапке, но оставляем фиксированную кнопку */
  .sos-btn--desktop:not(.sos-btn--fixed-left),
  .account-header__help-wrapper--desktop {
    display: none !important;
  }

  /* На мобильных уменьшаем размер фиксированной кнопки */
  .sos-btn--fixed-left {
    width: 48px !important;
    height: 48px !important;
    top: 25px !important;
    /* Выровнено по центру header на мобильных: header top (12px) + header height/2 (35px) - кнопка height/2 (24px) = 23px */
    left: 15px !important;
    z-index: 100 !important;
  }

  .sos-btn--fixed-left svg {
    width: 50px !important;
    height: 50px !important;
  }

  .sos-btn--fixed-left .sos-ring {
    display: none !important;
  }
}

/* На десктопе (>=769px) HELP в m-zoomstack никогда не показываем */
@media (min-width: 769px) {
  #sosBtn.sos-btn--stack {
    display: none !important;
  }
}

@media (max-width: 480px) {
  .sos-btn--fixed-left {
    top: 17px !important;
    left: 8px !important;
  }

  .sos-btn--fixed-left svg {
    width: 50px !important;
    height: 50px !important;
  }

  .sos-btn--stack {
    width: 46px !important;
    height: 46px !important;
    font-size: 11px !important;
  }

  .m-zoomstack .sos-btn--stack .sos-ring {
    width: 46px !important;
    height: 46px !important;
  }
}

@media (max-width: 360px) {
  .sos-btn--stack {
    width: 42px !important;
    height: 42px !important;
    font-size: 10px !important;
  }

  .m-zoomstack .sos-btn--stack .sos-ring {
    width: 42px !important;
    height: 42px !important;
  }
}

.bottom-nav-icon {
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: transform 0.2s ease;
}

.bottom-nav-icon img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

/* Иконки новостей, заказов, сигналов и избранного - без border-radius и с правильным размером */
.bottom-nav-item[data-page="news"] .bottom-nav-icon,
.bottom-nav-item[data-page="orders"] .bottom-nav-icon,
.bottom-nav-item[data-page="signals"] .bottom-nav-icon,
.bottom-nav-item[data-page="favorites"] .bottom-nav-icon {
  width: 35px;
  height: 35px;
}

.bottom-nav-item[data-page="news"] .bottom-nav-icon img,
.bottom-nav-item[data-page="orders"] .bottom-nav-icon img,
.bottom-nav-item[data-page="signals"] .bottom-nav-icon img,
.bottom-nav-item[data-page="favorites"] .bottom-nav-icon img {
  border-radius: 0;
  object-fit: contain;
  width: 35px;
  height: 35px;
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: scale(1.1);
}

.bottom-nav-label {
  font-size: 10px;
  font-weight: 500;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.bottom-nav-item.active {
  color: transparent;
  background-image: linear-gradient(90deg,
      rgba(255, 248, 233, 1) 0%,
      rgba(0, 0, 0, 1) 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

/* Стили для иконки P в круге */
.bottom-nav-item[data-page="orders"] .bottom-nav-icon {
  font-family: "Inter", sans-serif;
}

.bottom-nav-item.active[data-page="orders"] .bottom-nav-icon {
  background: var(--color-secondary) !important;
  transform: scale(1.15);
}

/* Стили для активного состояния VEXS логотипа */
.bottom-nav-item.active[data-page="map"] .bottom-nav-icon img {
  filter: brightness(0.8);
  transform: scale(1.1);
}

/* Плавные переходы для всех элементов навигации */
.bottom-nav-item {
  transition: all 0.2s ease;
}

.bottom-nav-item:active {
  transform: scale(0.95);
}

/* Стили для кнопок внутри bottom-nav (news-btn, orders-btn, signals-btn) */
.bottom-nav .news-btn,
.bottom-nav .orders-btn,
.bottom-nav .signals-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 8px 0;
  margin: 0;
  min-width: 0;
}

/* Показываем нижнюю навигацию только на мобильных */
@media (max-width: 768px) {
  .bottom-nav {
    display: flex;
  }

  .header-map__logo {
    display: none;
  }

  #map {
    height: calc(100% - 60px);
  }

  /* Учитываем нижнюю навигацию для попапов */
  .event-notification-popup {
    bottom: 60px;
    max-height: calc(70vh - 60px);
  }
}

/* Скрываем нижнюю навигацию на десктопе */
@media (min-width: 769px) {
  .bottom-nav {
    display: none !important;
  }

  .account-header__column:first-child,
  .account-header__column:nth-child(2),
  .account-header__column:nth-child(3),
  .account-header__column:nth-child(4) {}
}

/* ==================== ПРОФИЛЬНОЕ ВЫПАДАЮЩЕЕ МЕНЮ ==================== */

/* Контейнер профиля */
.profile-account__info.info-profile {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border-radius: 20px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 380px;
  max-width: 90vw;
  max-height: 85vh;
  overflow-y: auto;
  z-index: 1000;
  margin-top: 10px;
  display: none;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.profile-account__info.info-profile[hidden] {
  display: none !important;
}

.profile-account.open .profile-account__info.info-profile {
  display: block;
  opacity: 1;
  transform: translateY(0);
}

/* Шапка профиля */
.info-profile__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #f0f0f0;
}

.info-profile__name-rec {
  display: flex;
  align-items: center;
  gap: 10px;
}

.info-profile__name {
  font-size: 18px;
  font-weight: 600;
  color: var(--color-primary);
}

.info-profile__edit-icon {
  background: none;
  border: none;
  color: var(--color-secondary);
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.info-profile__edit-icon:hover {
  background-color: rgba(0, 4, 227, 0.1);
}

.info-profile__close {
  background: none;
  border: none;
  color: #666;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.info-profile__close:hover {
  background-color: rgba(0, 0, 0, 0.05);
  color: var(--color-primary);
}

/* Основной контент профиля */
.profile-account__content {
  padding: 0 20px 20px;
}

/* Информация пользователя */
.info-profile__info {
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-profile__elem {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 14px;
}

.info-profile__elem:last-child {
  margin-bottom: 0;
}

.info-profile__text {
  color: #000;
  font-variant-numeric: lining-nums proportional-nums;
  font-family: Raleway;
  font-size: 16px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
}

.info-profile__value {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--color-primary);
  font-weight: 500;
}

.email-value {
  max-width: 200px;
  overflow: hidden;
}

.email-responsive {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

.edit-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 2px;
  border-radius: 4px;
  transition: background-color 0.2s;
  flex-shrink: 0;
}

.edit-button:hover {
  background-color: rgba(0, 4, 227, 0.1);
}

.edit-button img {
  display: block;
}

/* Навигация профиля */
.info-profile__navigation {
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.radio-butuon__rows {
  margin-bottom: 8px;
}

.info-profile__nav-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  text-decoration: none;
  color: var(--color-primary);
  border-radius: 10px;
  transition: background-color 0.2s;
}

.info-profile__nav-link:hover {
  background-color: rgba(0, 4, 227, 0.05);
}

.radio-butuon__image {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.radio-butuon__image video,
.radio-butuon__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.radio-butuon__name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
}

/* Новости */
.info-profile__news {
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.info-profile__news-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.info-profile__news-title h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--color-primary);
}

.info-profile__news-view-all {
  font-size: 12px;
  color: var(--color-secondary);
  text-decoration: none;
  font-weight: 500;
}

.info-profile__news-view-all:hover {
  text-decoration: underline;
}

.info-profile__news-item {
  padding: 10px 0;
  cursor: pointer;
  transition: background-color 0.2s;
  border-radius: 8px;
  padding: 8px;
}

.info-profile__news-item:hover {
  background-color: rgba(0, 4, 227, 0.05);
}

.info-profile__news-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}

.info-profile__news-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-primary);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.info-profile__news-date {
  font-size: 12px;
  color: #666;
  margin-left: 10px;
  flex-shrink: 0;
}

/* Переключатели */
.info-profile__radio {
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.radio-butuon__rows {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 15px;
  border-radius: 10px;
  margin-bottom: 8px;
  transition: background-color 0.2s;
}

.radio-butuon__rows:hover {
  background-color: rgba(0, 4, 227, 0.05);
}

.radio-butuon__image {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.radio-butuon__image video,
.radio-butuon__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.radio-butuon__name {
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-primary);
}

.radio-butuon__name p {
  margin: 0;
}

.user-true {
  display: block;
}

.user-false {
  display: none;
}

.radio-butuon__rows.active .user-true {
  display: none;
}

.radio-butuon__rows.active .user-false {
  display: block;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

input:checked+.toggle-slider {
  background-color: var(--color-secondary);
}

input:checked+.toggle-slider:before {
  transform: translateX(20px);
}

/* Кнопки профиля */
.info-profile__btns {
  padding: 20px 0 0;
  display: flex;
  gap: 10px;
}

.info-profile__btn {
  flex: 1;
}

.btn-grey {
  background: #f5f5f5;
  border: none;
  padding: 12px 20px;
  border-radius: 10px;
  font-weight: 500;
  font-size: 14px;
  color: var(--color-primary);
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
  text-decoration: none;
  display: block;
}

.btn-grey a {
  color: inherit;
  text-decoration: none;
  display: block;
}

.btn-grey:hover {
  background: #e0e0e0;
  transform: translateY(-1px);
}

/* Мобильная версия профиля */
@media (max-width: 768px) {
  .profile-account__info.info-profile {
    position: fixed;
    top: auto;
    bottom: 0;
    left: 15px;
    right: 15px;
    width: calc(100% - 30px);
    max-width: calc(100% - 30px);
    border-radius: 20px 20px 0 0;
    transform: translateY(100%);
    margin: 0;
  }

  .profile-account.open .profile-account__info.info-profile {
    transform: translateY(0);
  }

  .profile-account__content {
    padding-bottom: 30px;
    /* Добавляем отступ для безопасной зоны на iOS */
  }

  .info-profile__top {
    padding: 20px 20px 15px;
  }

  /* Оверлей для мобильной версии */
  .profile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
  }

  .profile-account.open+.profile-overlay {
    display: block;
  }
}

/* Десктоп версия */
@media (min-width: 769px) {
  .profile-account__info.info-profile {
    min-width: 380px;
  }
}

/* ==================== НИЖНЕЕ МЕНЮ ==================== */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: rgba(255, 255, 255, 0);
  background: none;
  background-image: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding: 10px 8px;
  z-index: 10001;
}

/* Белый фон для мобильных устройств - переопределяем все предыдущие стили */
@media (max-width: 768px) {

  .bottom-nav,
  #bottomNav.bottom-nav,
  #bottomNav {
    background-color: #ffffff !important;
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--color-gray);
  flex: 1;
  padding: 8px 0;
  transition: all 0.2s ease;
  background: none;
  border: none;
  cursor: pointer;
  margin: 0;
}

.bottom-nav-item.active {
  color: transparent;
  background-image: linear-gradient(90deg,
      rgba(255, 248, 233, 1) 0%,
      rgba(0, 0, 0, 1) 100%);
  background-clip: text;
  -webkit-background-clip: text;
}

.bottom-nav-item.active .bottom-nav-icon {
  transform: translateY(1px);
}

.bottom-nav-icon {
  font-size: 20px;
  margin-bottom: 4px;
  transition: transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
}

.bottom-nav-label {
  font-size: 10px;
  font-weight: 500;
}

/* ==================== МОДАЛЬНОЕ ОКНО ДЛЯ СТРАНИЦ ==================== */
.page-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* затемнение, но карта должна быть хорошо видна */
  background: rgba(0, 0, 0, 0.18);
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(1px);
  -webkit-backdrop-filter: blur(1px);
}

.page-modal-overlay.active {
  display: block;
  opacity: 1;
}

.page-modal-container {
  position: fixed;
  top: calc(88px + 20px);
  left: 53%;
  bottom: 90px;
  max-width: 1739px;
  width: calc(100% - 60px);
  /* Та же ширина, что и у header-map */
  margin: 0 auto;
  background: transparent;
  border-radius: 0 0 20px 20px;
  /* Убираем верхнее скругление, чтобы плавно переходить от header-map */
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  z-index: 10003;
  transform: translateX(-50%) translateY(120%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
}

.page-modal-container.active {
  transform: translateX(-50%) translateY(0) !important;
}

/* Убираем нижнее скругление у header-map, когда открыт pageModalContainer */
body:has(#pageModalContainer.active) header.header-map,
body.page-modal-open header.header-map,
header.header-map:has(+ #pageModalContainer.active) {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-radius: 40px 40px 0 0;
  /* Делаем header-map и pageModalContainer единым целым */
}

/* Правый нижний скругление header-map убираем, когда открыт сайдбар новостей */
body.news-modal-open header.header-map {
  border-bottom-right-radius: 0;
}

/* Развёрнутая модалка новости (Показать всё) — под header-map, height 583px */
.news-expanded-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10002;
  opacity: 0;
  transition: opacity 0.3s ease-out;
}

.news-expanded-overlay.news-expanded-overlay--visible {
  opacity: 1;
}

.news-expanded-container {
  display: none;
  position: fixed;
  top: 0;
  left: 53%;
  height: 583px;
  box-sizing: border-box;
  transform: translateX(-50%) translateY(-28px) scale(0.96);
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  border-radius: 0 0 20px 20px;
  flex-direction: column;
  overflow: hidden;
  z-index: 10003;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.35s ease-out;
}

.news-expanded-container.news-expanded-anim-in {
  opacity: 1;
  transform: translateX(-50%) translateY(0) scale(1);
}

body.news-expanded-open header.header-map {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-radius: 40px 40px 0 0;
}

.news-expanded-container .news-expanded-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 2;
  color: #333;
}

.news-expanded-container .news-expanded-close:hover {
  background: rgba(0, 0, 0, 0.05);
  border-radius: 50%;
}

.news-expanded-actions {
  flex-shrink: 0;
  padding: 12px 24px 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.6);
}

.news-expanded-hide {
  display: block;
  width: 100%;
  padding: 10px 16px;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: #007bff;
  background: transparent;
  border: 1px solid #007bff;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.news-expanded-hide:hover {
  background: rgba(0, 123, 255, 0.08);
  color: #0056b3;
}

.news-expanded-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px 24px;
  font-family: 'Inter', sans-serif;
}

.news-expanded-inner {
  max-width: 100%;
}

.news-expanded-title {
  margin: 0 0 12px 0;
  font-size: 22px;
  color: #333;
  font-weight: 600;
  line-height: 1.3;
}

.news-expanded-meta {
  margin-bottom: 8px;
}

.news-expanded-tag {
  display: inline-block;
  padding: 4px 10px;
  color: white;
  border-radius: 4px;
  font-size: 12px;
}

.news-expanded-date {
  font-size: 13px;
  color: #666;
  margin-bottom: 16px;
}

.news-expanded-img {
  width: 100%;
  max-width: 100%;
  max-height: 280px;
  object-fit: contain;
  border-radius: 8px;
  margin-bottom: 16px;
  cursor: pointer;
}

.news-expanded-body {
  font-size: 15px;
  color: #444;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
}

.news-expanded-footer {
  display: flex;
  gap: 16px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
  font-size: 13px;
  color: #666;
}

/* Ручка боттомшита — видна только на мобилке */
.news-expanded-sheet-handle {
  display: none;
}

/* На мобилке развёрнутая новость — боттомшит */
@media (max-width: 768px) {
  .news-expanded-sheet-handle {
    display: block;
    flex-shrink: 0;
    width: 40px;
    height: 4px;
    margin: 10px auto 6px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
    pointer-events: none;
  }

  .news-expanded-container {
    top: auto !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    max-height: 90vh;
    min-height: 40vh;
    border-radius: 20px 20px 0 0;
    transform: translateX(0) translateY(100%);
    transition: transform 0.35s cubic-bezier(0.32, 0.72, 0, 1), opacity 0.3s ease-out;
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  .news-expanded-container.news-expanded-anim-in {
    transform: translateX(0) translateY(0) scale(1);
  }

  .news-expanded-container .news-expanded-close {
    top: 12px;
    right: 12px;
  }

  .news-expanded-content {
    padding: 12px 16px 16px;
  }

  .news-expanded-title {
    font-size: 18px;
  }

  .news-expanded-actions {
    padding: 12px 16px calc(16px + env(safe-area-inset-bottom, 0));
  }
}

/* ЗАГОЛОВОК МОДАЛЬНОГО ОКНА */
.page-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  /* Полупрозрачный фон, чтобы карта просвечивала */
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  position: relative;
  z-index: 10;
}

.header_popap {
  position: absolute;
  top: calc(100% - 2px);
  left: 50%;
  transform: translateX(-50%);
  width: min(333px, calc(100% - 28px));
  min-height: 40px;
  height: auto;
  background-color: #fff;
  border-radius: 0 0 20px 20px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.10);
  box-sizing: border-box;
  z-index: 13;
}

.swiper {
  width: 600px;
  height: 40px;
}

.swiper-slide {
  display: flex;
  align-items: center;
  justify-content: center;
}

.swiper-slide span {
  margin-left: 5px;
}

.page-modal-title {
  color: #036;
  text-align: center;
  font-family: Raleway;
  font-size: 32px;
  font-style: normal;
  margin: 0 auto;
  font-weight: 700;
  line-height: 118.2%;
  /* 37.824px */
}

.page-modal-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  position: absolute;
  right: 16px;
}

.page-modal-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

.page-modal-close svg {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
}

/* ИНДИКАТОР ПЕРЕТАСКИВАНИЯ */
.page-modal-drag-indicator {
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 5px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}

/* ОСНОВНОЙ КОНТЕНТ С ПРОКРУТКОЙ */
.page-modal-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
  /* Полупрозрачный фон вместо белого */
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  padding: 0;
  margin: 0;
  width: 100%;
  height: 100%;
  /* Ограничиваем максимальную ширину контента, чтобы он не растягивался слишком широко */
  max-width: 100%;
  box-sizing: border-box;
}

/* Стили для iframe в модальном окне */
.page-modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  /* iframe тоже не должен давать белую “подложку” */
  background: transparent;
}

/* Кнопки навигации внутри iframe */
.modal-page-close-btn {
  position: fixed !important;
  top: 15px !important;
  right: 15px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.1) !important;
  border: none !important;
  font-size: 24px !important;
  color: #333 !important;
  cursor: pointer !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
}

.modal-page-close-btn:hover {
  background: rgba(0, 0, 0, 0.2) !important;
}

.modal-page-back-btn {
  position: fixed !important;
  top: 15px !important;
  left: 15px !important;
  width: 40px !important;
  height: 40px !important;
  border-radius: 50% !important;
  background: rgba(0, 0, 0, 0.1) !important;
  border: none !important;
  font-size: 20px !important;
  color: #333 !important;
  cursor: pointer !important;
  z-index: 10000 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
}

.modal-page-back-btn:hover {
  background: rgba(0, 0, 0, 0.2) !important;
}

/* Контейнер для стилей */
#modal-styles-container {
  display: none;
}

/* Контейнер контента */
.modal-page-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  padding: 20px;
  padding-top: 60px;
}

/* ЭФФЕКТ ПРИ ОТКРЫТИИ */
body.page-modal-open {
  overflow: hidden;
}

body.page-modal-open .page-container {
  filter: blur(2px);
  pointer-events: none;
}

/* ДЛЯ ОТОБРАЖЕНИЯ MAP.PHP В ФОНЕ */
.map-background {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  display: none;
}

.map-background iframe {
  width: 100%;
  height: 100%;
  border: none;
  opacity: 0.7;
}

/* АДАПТАЦИЯ ДЛЯ РАЗНЫХ ЭКРАНОВ */
/* Ширина соответствует header на разных разрешениях */
@media (min-width: 769px) {
  .page-modal-container {
    max-width: clamp(0px, calc(1.08 * 100vw - 258px), 1739px);
    /* Та же логика ширины, что и у header-map */
  }
}

@media (max-width: 768px) {
  .page-modal-container {
    /* Та же позиция, что и у header-map */
    bottom: 0 !important;
    /* чтобы не перекрывать bottom-nav */
    left: 0 !important;
    /* Та же позиция left, что и у header-map на мобильных */
    max-width: 1739px !important;
    width: 100% !important;
    /* Та же ширина, что и у header-map */
    padding: 0 !important;
    border-radius: 20px 20px 0 0 !important;
    transform: translateX(0) translateY(120%) !important;

    .page-modal-header {
      padding: 18px 20px;
    }

    .page-modal-title {
      font-size: 17px;
    }

    .page-modal-drag-indicator {
      background: rgba(0, 0, 0, 0.3) !important;
    }
  }

  .page-modal-container.active {
    transform: translateX(0) translateY(0) !important;
    left: 0 !important;
  }

  @media (max-width: 500px) {
    .page-modal-container {
      left: calc(50% + 36px) !important;
      /* Та же логика позиционирования, что и у header-map на очень маленьких экранах */
    }
  }

  @media (max-width: 480px) {
    .page-modal-container {
      border-radius: 16px;
      /* border-top-left-radius: 0 !important; */
      /* border-top-right-radius: 0 !important; */
    }

    .page-modal-header {
      padding: 16px;
    }

    .page-modal-title {
      font-size: 16px;
    }
  }

  /* ЛАНДШАФТНАЯ ОРИЕНТАЦИЯ */
  @media (max-width: 768px) and (orientation: landscape) {
    .page-modal-container {
      top: calc(88px + 20px);
      bottom: 12px;
      border-radius: 0 0 16px 16px;
      border-top-left-radius: 0 !important;
      border-top-right-radius: 0 !important;
    }
  }

  /* АНИМАЦИЯ ОТКРЫТИЯ/ЗАКРЫТИЯ */
  @keyframes slideInUp {
    from {
      transform: translateY(100%);
    }

    to {
      transform: translateY(0);
    }
  }

  @keyframes slideOutDown {
    from {
      transform: translateY(0);
    }

    to {
      transform: translateY(100%);
    }
  }
}

/* ==================== FAB КНОПКА ЧАТА ==================== */
.chat-fab {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 196px;
  height: 35px;
  border-radius: 50px;
  border: none;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 8px 0 16px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 6px 20px #0086B347;
}

.chat-fab:hover {
  box-shadow: 0 6px 20px #0086B347;
  transform: translateY(-2px);
}

.chat-fab:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.chat-fab-text {
  font-size: 16px;
  font-weight: 500;
  color: #28293D;
  white-space: nowrap;
  flex: 1;
}

.chat-fab-icon {
  width: 25px;
  height: 26px;
  flex-shrink: 0;
  margin-left: 8px;
}

/* Адаптивность для FAB кнопки */
@media (max-width: 768px) {
  .chat-fab-icon {
    margin-left: 0px;
  }

  .chat-fab {
    display: none !important;
  }

  .chat-fab-text {
    display: none;
  }
}

@media (max-width: 480px) {
  .chat-fab {
    display: none !important;
  }

  .chat-fab-text {
    display: none;
  }
}

/* ==================== МОДАЛЬНОЕ ОКНО ЧАТА ==================== */
.chat-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10003;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.chat-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.chat-modal {
  width: 636px;
  height: 770px;
  border-radius: 13.4px;
  border-width: 0.64px;
  border-style: solid;
  border-color: rgb(204, 204, 204);
  position: fixed;
  inset: auto 0px 0px auto !important;
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  display: flex;
  transition: transform 0.3s ease-out, opacity 0.3s ease-out;
  transform: translateY(100%);
}

.chat-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translateY(0) !important;
  display: flex !important;
  pointer-events: auto !important;
  z-index: 10005 !important;
}

.chat-modal__content {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-height: 85vh;
}

.chat-modal__close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: #333;
}

.chat-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.LogoOfMap {
  margin: 0 20px 0 10px;
}

.chat-modal__body {
  flex: 1;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
}

/* Адаптация стилей чата для модального окна */
.chat-modal__body {
  /* Переопределяем стили body из chat_view.php */
  font-family: "Inter", sans-serif !important;
  background: transparent !important;
  margin: 0 !important;
  display: flex !important;
  height: 100% !important;
  overflow: hidden !important;
}

.chat-modal__body .chat {
  height: 100% !important;
  max-height: 85vh !important;
  border-radius: 20px;
  overflow: hidden;
  background: white;
}

.chat-modal__body .header {
  border-radius: 20px 20px 0 0;
  padding: 15px 20px;
  background: #007bff;
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-modal__body .header h2 {
  margin: 0;
  font-size: 18px;
}

.chat-modal__body .header a {
  display: none;
  /* Скрываем кнопку "Назад" в модальном окне */
}

.chat-modal__body .messages {
  flex: 1;
  overflow-y: clip;
  padding: 15px;
  display: flex;
  flex-direction: column;
  scroll-behavior: smooth;
}

.chat-modal__body .message {
  margin-bottom: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  word-wrap: break-word;
  max-width: 80%;
  line-height: 1.4;
  font-size: 15px;
}

.chat-modal__body .message.user {
  background: #007bff;
  color: white;
  align-self: flex-end;
  border-bottom-right-radius: 0;
}

.chat-modal__body .message.operator {
  background: #e5e5e5;
  color: #222;
  align-self: flex-start;
  border-bottom-left-radius: 0;
}

.chat-modal__body form {
  border-top: 1px solid #e0e0e0;
  padding: 12px 15px;
  background: #f9f9f9;
  display: flex;
}

.chat-modal__body input[name="message"] {
  flex: 1;
  padding: 10px;
  border: 1px solid #ccc;
  border-radius: 20px;
  font-size: 15px;
  outline: none;
}

.chat-modal__body button[type="submit"] {
  padding: 10px 16px;
  margin-left: 8px;
  background: #007bff;
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.2s;
}

.chat-modal__body button[type="submit"]:hover {
  background: #0056b3;
}

/* Sidebar теперь отображается для оператора через inline стили в chat_view.php */

.chat-modal__body .badge {
  background: red;
  color: white;
  border-radius: 10px;
  padding: 2px 6px;
  font-size: 12px;
}

/* Адаптивность модального окна чата */
@media (max-width: 768px) {
  .chat-modal {
    width: 100%;
    max-width: 100%;
    height: 100%;
    max-height: 100vh;
    top: 0;
    left: 0;
    transform: translateY(100%);
    border-radius: 20px 20px 0 0;
  }

  .chat-modal.active {
    transform: translateY(0);
  }

  .chat-modal__content {
    max-height: 100vh;
  }

  .chat-modal__body .chat {
    max-height: 100vh;
    border-radius: 20px 20px 0 0;
  }

  .chat-modal__body .header {
    border-radius: 20px 20px 0 0;
  }

  .chat-modal__close {
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
  }
}

@media (max-width: 480px) {
  .chat-modal {
    border-radius: 16px 16px 0 0;
  }

  .chat-modal__body .chat {
    border-radius: 16px 16px 0 0;
  }

  .chat-modal__body .header {
    border-radius: 16px 16px 0 0;
    padding: 12px 15px;
  }

  .chat-modal__body .messages {
    padding: 12px;
  }

  .chat-modal__body form {
    padding: 10px 12px;
  }
}

/* Ландшафтная ориентация */
@media (max-width: 768px) and (orientation: landscape) {
  .chat-modal {
    top: 5%;
    bottom: 5%;
    transform: translateY(120%);
    border-radius: 16px;
  }

  .chat-modal.active {
    transform: translateY(0);
  }

  .chat-modal__content {
    max-height: 90vh;
  }

  .chat-modal__body .chat {
    max-height: 90vh;
  }
}

/* ==================== МОДАЛЬНОЕ ОКНО "В РАЗРАБОТКЕ" ==================== */
.development-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.development-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.development-modal {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 40px 30px;
  max-width: 90%;
  width: 400px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.development-modal-overlay.show .development-modal {
  transform: scale(1) translateY(0);
}

.development-modal__icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  color: white;
  box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.development-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0 0 12px;
  line-height: 1.3;
}

.development-modal__message {
  font-size: 16px;
  color: #666;
  margin: 0 0 30px;
  line-height: 1.5;
}

.development-modal__button {
  width: 100%;
  padding: 14px 24px;
  background: var(--color-secondary);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: "Inter", sans-serif;
}

.development-modal__button:hover {
  background: #0003cc;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 4, 227, 0.3);
}

.development-modal__button:active {
  transform: translateY(0);
}

/* Адаптивность для модального окна */
@media (max-width: 480px) {
  .development-modal {
    padding: 30px 20px;
    width: calc(100% - 40px);
    border-radius: 16px;
  }

  .development-modal__icon {
    width: 60px;
    height: 60px;
    font-size: 30px;
    margin-bottom: 16px;
  }

  .development-modal__title {
    font-size: 20px;
    margin-bottom: 10px;
  }

  .development-modal__message {
    font-size: 14px;
    margin-bottom: 24px;
  }

  .development-modal__button {
    padding: 12px 20px;
    font-size: 15px;
  }
}

/* =========================
   МОДАЛЬНОЕ ОКНО "ПОИСК В РАЗРАБОТКЕ"
   ========================= */
.search-development-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-development-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.search-development-modal {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 36px;
  max-width: 90%;
  width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.search-development-modal-overlay.show .search-development-modal {
  transform: scale(1) translateY(0);
}

.search-development-modal__icon {
  width: 36px;
  height: 36px;
  margin: 0 auto;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 0 42px 0;
}

.search-development-modal__icon img {
  width: 36px;
  height: 36px;
}

.search-development-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: #003366;
  line-height: 1.3;
}

.search-development-modal__message {
  font-size: 17px;
  color: #666;
  line-height: 1.6;
}

.search-development-modal__message-bold {
  font-size: 17px;
  font-weight: 600;
  color: #333;
  margin: 0;
  line-height: 1.6;
}

.search-development-modal__close {
  position: absolute;
  top: 40px;
  right: 35px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

/* Адаптивность для модального окна поиска */
@media (max-width: 480px) {
  .search-development-modal {
    padding: 40px 25px;
    width: calc(100% - 40px);
    border-radius: 16px;
  }

  .search-development-modal__icon {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
    padding: 16px;
  }

  .search-development-modal__title {
    font-size: 24px;
    margin-bottom: 18px;
  }

  .search-development-modal__message {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .search-development-modal__message-bold {
    font-size: 15px;
  }

  .search-development-modal__close {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
  }

  .search-development-modal__close svg {
    width: 20px;
    height: 20px;
  }
}

/* =========================
   МОДАЛЬНОЕ ОКНО ИНСТРУКЦИИ ДЛЯ КНОПКИ HELP
   ========================= */
.help-instruction-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10005;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.help-instruction-modal-overlay.show {
  opacity: 1;
  visibility: visible;
}

.help-instruction-modal {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 36px 36px 15px 36px;
  max-width: 90%;
  width: 480px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  transform: scale(0.9) translateY(20px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
}

.help-instruction-modal-overlay.show .help-instruction-modal {
  transform: scale(1) translateY(0);
}

.help-instruction-modal__icon {
  width: 51px;
  height: 51px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}

.help-instruction-modal__icon img {
  width: 90px;
  height: 90px;
}

.help-instruction-modal__icon svg {
  width: 100%;
  height: 100%;
}

.help-instruction-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: #003366;
  line-height: 1.3;
  margin-bottom: 10px;
}

.help-instruction-modal__message {
  font-size: 17px;
  color: #003366;
  line-height: 1.3;
  margin-bottom: 15px;
}

.help-instruction-modal__message-bold {
  font-weight: 700;
  color: #003366;
}

.help-instruction-modal__message-red {
  font-size: 17px;
  color: #FF0000;
  line-height: 1.6;
  font-weight: bold;
}

.help-instruction-modal__close {
  position: absolute;
  top: 40px;
  right: 50px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  z-index: 10;
}

/*.help-instruction-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}*/

.help-instruction-modal__close img {
  width: 15px;
  height: 15px;
  color: var(--color-primary);
}

/* Адаптивность для модального окна инструкции HELP */
@media (max-width: 480px) {
  .help-instruction-modal {
    padding: 40px 25px;
    width: calc(100% - 40px);
    border-radius: 16px;
  }

  .help-instruction-modal__icon {
    width: 80px;
    height: 80px;
    margin-bottom: 24px;
  }

  .help-instruction-modal__title {
    font-size: 24px;
    margin-bottom: 18px;
    color: #003366;
  }

  .help-instruction-modal__message {
    font-size: 15px;
    margin-bottom: 14px;
  }

  .help-instruction-modal__message-red {
    font-size: 15px;
  }

  .help-instruction-modal__close {
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
  }

  .help-instruction-modal__close svg {
    width: 20px;
    height: 20px;
  }
}

/* Адаптивность для ктопки отправки смс */
@media (max-width: 435px) {
  .btn-send-code {
    width: 130px !important;
  }

  .input-send-code {
    width: 100% !important;
  }

  .container-send-code {
    display: block !important;
  }
}

/* ==================== МОДАЛЬНОЕ ОКНО ГЕОЛОКАЦИИ ==================== */
.location-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10003;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.location-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.location-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10004;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  pointer-events: none;
}

.location-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
  z-index: 10005 !important;
}

.location-modal__content {
  position: relative;
  padding: 0;
}

.location-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: #333;
}

.location-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.location-modal__body {
  padding: 40px 30px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.location-modal__icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  margin-bottom: 10px;
  box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(102, 126, 234, 0.5);
  }
}

.location-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}

.location-modal__description {
  font-size: 16px;
  color: #666;
  margin: 0;
  line-height: 1.5;
  max-width: 400px;
}

.location-modal__actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 300px;
  margin-top: 10px;
}

.location-modal__btn {
  padding: 14px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

.location-modal__btn--primary {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.location-modal__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.location-modal__btn--primary:active {
  transform: translateY(0);
}

.location-modal__btn--secondary {
  background: #f5f5f5;
  color: #666;
}

.location-modal__btn--secondary:hover {
  background: #e8e8e8;
  color: #333;
}

.location-modal__info {
  margin-top: 20px;
  padding: 16px;
  border-radius: 12px;
  background: #f8f9fa;
  width: 100%;
  max-width: 300px;
}

.location-modal__status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 14px;
}

.location-modal__status-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.location-modal__status-icon.loading {
  background: #667eea;
  animation: spin 1s linear infinite;
}

.location-modal__status-icon.success {
  background: #10b981;
}

.location-modal__status-icon.error {
  background: #ef4444;
}

.location-modal__status-icon.success::after,
.location-modal__status-icon.error::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

.location-modal__status-text {
  color: #333;
  font-weight: 500;
}

/* Адаптивность для модального окна геолокации */
@media (max-width: 768px) {
  .location-modal {
    width: 95%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 100%) scale(1);
  }

  .location-modal.active {
    transform: translate(-50%, 0) scale(1) !important;
  }

  .location-modal__body {
    padding: 30px 20px;
  }

  .location-modal__title {
    font-size: 20px;
  }

  .location-modal__description {
    font-size: 14px;
  }
}

@media (max-width: 480px) {
  .location-modal__body {
    padding: 25px 15px;
  }

  .location-modal__icon {
    width: 64px;
    height: 64px;
  }

  .location-modal__title {
    font-size: 18px;
  }
}

/* ==================== МОДАЛЬНОЕ ОКНО AI ИНФОРМАЦИИ ==================== */
.ai-info-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10003;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.ai-info-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.ai-info-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10004;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  pointer-events: none;
}

.ai-info-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
  z-index: 10005 !important;
}

.ai-info-modal__content {
  position: relative;
  padding: 0;
}

.ai-info-modal__close {
  position: absolute;
  top: 40px;
  right: 35px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}


.ai-info-modal__body {
  padding: 50px 40px 40px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.ai-info-modal__image {
  width: 53px;
  height: 53px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-info-modal__image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ai-info-modal__title {
  font-size: 24px;
  font-weight: 700;
  color: #003366;
  margin: 0;
  line-height: 1.3;
}

.ai-info-modal__text {
  font-size: 18px;
  color: #666;
  margin: 0;
  line-height: 1.3;
  max-width: 456px;
  text-align: center;
}

/* Адаптивность для модального окна AI информации */
@media (max-width: 768px) {
  .ai-info-modal {
    width: 95%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 100%) scale(1);
  }

  .ai-info-modal.active {
    transform: translate(-50%, 0) scale(1) !important;
  }

  /* Специфичные стили для aiSearchModal - остается по центру на мобильных */
  #aiSearchModal {
    top: 50% !important;
    bottom: auto !important;
    border-radius: 24px !important;
    transform: translate(-50%, -50%) scale(0.9) !important;
  }

  #aiSearchModal.active {
    transform: translate(-50%, -50%) scale(1) !important;
  }

  .ai-info-modal__body {
    padding: 40px 25px 30px;
    gap: 20px;
  }

  .ai-info-modal__title {
    font-size: 24px;
  }

  .ai-info-modal__text {
    font-size: 15px;
  }
}

@media (max-width: 480px) {
  .ai-info-modal__body {
    padding: 35px 20px 25px;
    gap: 18px;
  }

  .ai-info-modal__image {
    width: 100px;
    height: 100px;
  }

  .ai-info-modal__title {
    font-size: 22px;
  }

  .ai-info-modal__text {
    font-size: 14px;
  }
}

/* ==================== МОДАЛЬНОЕ ОКНО МОЯ СЕМЬЯ ==================== */
.family-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10003;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.family-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}


.family-modal__subtitle {
  font-size: 16px;
  margin: 12px 0 0 0;
  line-height: 1.6;
  text-align: center;
  max-width: 400px;
}

.family-modal__buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.family-modal__button {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.family-modal__button-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #667eea;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-modal__button-icon img {
  width: 45px;
  height: 45px;
  margin-right: 10px;
}

.family-modal__button-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  transition: color 0.3s ease;
}

.family-modal__members-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.family-modal__member-item {
  cursor: default;
  position: relative;
  padding: 0 20px;
}

.family-modal__member-item .family-modal__button-icon {
  margin-right: 0;
}

.family-modal__member-item .family-modal__button-icon img {
  margin-right: 0;
}

.family-modal__member-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

.family-modal__member-item .family-modal__button-text {
  flex: 1;
  margin-right: 12px;
}

.family-modal__member-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  margin-left: auto;
}

.family-modal__member-family-icon {
  width: 45px;
  height: 45px;
  flex-shrink: 0;
}

.family-modal__member-delete {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #dc3545;
  transition: color 0.3s ease, transform 0.2s ease;
  flex-shrink: 0;
}

.family-modal__member-delete:hover {
  color: #c82333;
  transform: scale(1.1);
}

.family-modal__member-delete:active {
  transform: scale(0.95);
}

.family-modal__member-delete svg {
  width: 20px;
  height: 20px;
}

.family-modal__section {
  width: 100%;
  margin-top: 20px;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.family-modal__section-title {
  font-size: 28px;
  font-weight: 700;
  color: #003366;
  margin: 0;
  line-height: 0;
  text-align: center;
}

.family-modal__section-text {
  font-size: 16px;
  margin: 12px 0 0 0;
  line-height: 1.6;
  text-align: center;
  max-width: 400px;
}


/* Адаптивность для модального окна Моя семья */
/* @media (max-width: 1920px) { */
.family-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10004;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  pointer-events: none;
}

.family-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
  z-index: 10005 !important;
}

.family-modal__content {
  position: relative;
  padding: 0;
}

.family-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: #333;
}

.family-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.family-modal__body {
  padding: 50px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
  max-height: 85vh;
  overflow-y: auto;
}

/* ==================== МОДАЛЬНОЕ ОКНО РЕФЕРАЛЬНОЙ ССЫЛКИ ==================== */
.referral-link-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10006;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.referral-link-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.referral-link-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 90%;
  max-width: 520px;
  background: #fff;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10007;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  pointer-events: none;
}

.referral-link-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
}

.referral-link-modal__content {
  position: relative;
  padding: 0;
}

.referral-link-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: #333;
}

.referral-link-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.referral-link-modal__body {
  padding: 50px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

.referral-link-modal__icon {
  width: 75px;
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.referral-link-modal__icon img {
  width: 75px;
  height: 75px;
}

.referral-link-modal__title {
  font-size: 28px;
  font-weight: 800;
  color: #003366;
  margin: 0;
  text-align: center;
}

.referral-link-modal__text {
  font-size: 16px;
  line-height: 1.6;
  text-align: center;
  margin: 0;
  max-width: 440px;
}

.referral-link-modal__field {
  width: 100%;
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

.referral-link-modal__input {
  flex: 1;
  height: 48px;
  border-radius: 12px;
  border: 1px solid #e9ecef;
  background: #f7f7f9;
  padding: 0 14px;
  font-size: 14px;
  color: #111;
  outline: none;
}

.referral-link-modal__copy-btn {
  height: 48px;
  padding: 0 16px;
  border-radius: 12px;
  border: none;
  cursor: pointer;
  background: #0004e3;
  color: #fff;
  font-weight: 600;
  transition: transform 0.15s ease, opacity 0.15s ease;
  flex-shrink: 0;
}

.referral-link-modal__copy-btn:hover {
  opacity: 0.92;
}

.referral-link-modal__copy-btn:active {
  transform: scale(0.98);
}

.referral-link-modal__hint {
  min-height: 18px;
  font-size: 14px;
  color: #2e7d32;
}

@media (max-width: 480px) {
  .referral-link-modal__body {
    padding: 45px 20px 25px;
  }

  .referral-link-modal__title {
    font-size: 22px;
  }

  .referral-link-modal__field {
    flex-direction: column;
  }

  .referral-link-modal__copy-btn {
    width: 100%;
  }
}

.family-modal__icon {
  width: 83px;
  height: 83px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0px;
}

.family-modal__icon img {
  width: 100%;
  height: 100%;
}

.family-modal__title {
  font-size: 28px;
  font-weight: 700;
  color: #003366;
  margin: 0;
  line-height: 0;
  text-align: center;
}

.family-modal__subtitle {
  font-size: 16px;
  margin: 12px 0 0 0;
  line-height: 1.6;
  text-align: center;
  max-width: 400px;
}

.family-modal__buttons {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 10px;
}

.family-modal__button {
  width: 100%;
  padding: 16px 20px;
  background: none;
  border: none;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 16px;
  text-align: left;
}

.family-modal__button-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  color: #667eea;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.family-modal__button-icon img {
  width: 45px;
  height: 45px;
  margin-right: 10px;
}

.family-modal__button-text {
  flex: 1;
  font-size: 16px;
  font-weight: 500;
  color: #333;
  transition: color 0.3s ease;
}

.family-modal__section {
  width: 100%;
  margin-top: 20px;
  padding-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.family-modal__section-title {
  font-size: 28px;
  font-weight: 700;
  color: #003366;
  margin: 0;
  line-height: 0;
  text-align: center;
}

.family-modal__section-text {
  font-size: 16px;
  margin: 12px 0 0 0;
  line-height: 1.6;
  text-align: center;
  max-width: 400px;
}

/* Адаптивность для модального окна Моя семья */
@media (max-width: 768px) {
  .family-modal {
    width: 95%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 100%) scale(1);
  }

  .family-modal.active {
    transform: translate(-50%, 0) scale(1) !important;
  }

  .family-modal__body {
    padding: 40px 25px 30px;
    gap: 20px;
  }

  .family-modal__title {
    font-size: 24px;
  }

  .family-modal__subtitle {
    font-size: 15px;
  }

  .family-modal__icon {
    width: 100px;
    height: 100px;
  }
}

@media (max-width: 480px) {
  .family-modal__body {
    padding: 35px 20px 25px;
    gap: 18px;
  }

  .family-modal__icon {
    width: 80px;
    height: 80px;
  }

  .family-modal__title {
    font-size: 22px;
  }

  .family-modal__subtitle {
    font-size: 14px;
  }

  .family-modal__button {
    padding: 14px 16px;
  }

  .family-modal__button-text {
    font-size: 15px;
  }
}

/* ==================== МОДАЛЬНОЕ ОКНО ДОБАВЛЕНИЯ ЧЛЕНА СЕМЬИ ==================== */
.add-family-member-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10006;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.add-family-member-modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.add-family-member-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  width: 90%;
  max-width: 500px;
  max-height: 90vh;
  background: white;
  border-radius: 24px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  z-index: 10007;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  pointer-events: none;
}

.add-family-member-modal.active {
  opacity: 1 !important;
  visibility: visible !important;
  transform: translate(-50%, -50%) scale(1) !important;
  pointer-events: auto !important;
  z-index: 10008 !important;
}

.add-family-member-modal__content {
  position: relative;
  padding: 0;
  max-height: 90vh;
  overflow-y: auto;
}

.add-family-member-modal__close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all 0.2s ease;
  color: #333;
}

.add-family-member-modal__close:hover {
  background: rgba(0, 0, 0, 0.1);
  transform: rotate(90deg);
}

.add-family-member-modal__body {
  padding: 50px 40px 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.add-family-member-modal__icon {
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.add-family-member-modal__title {
  font-size: 28px;
  font-weight: 700;
  color: #003366;
  margin: 0;
  line-height: 0;
  text-align: center;
}

.add-family-member-modal__text {
  font-size: 16px;
  margin: 0;
  line-height: 1.6;
  text-align: center;
  max-width: 400px;
}

.add-family-member-modal__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 10px;
}

.add-family-member-modal__form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.add-family-member-modal__label {
  font-size: 18px;
  font-weight: 700;
  color: #28293D;
}

.add-family-member-modal__input {
  width: 100%;
  padding: 20px 16px;
  border: 1px solid #28293D99;
  border-radius: 12px;
  font-size: 16px;
  color: #28293D;
  background: #fff;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.add-family-member-modal__input:focus {
  outline: none;
  border-color: #667eea;
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.add-family-member-modal__input::placeholder {
  color: #999;
}

.add-family-member-modal__checkbox-group {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}

.add-family-member-modal__checkbox {
  width: 20px;
  height: 20px;
  cursor: pointer;
  accent-color: #667eea;
}

.add-family-member-modal__checkbox-label {
  font-size: 16px;
  color: #28293D;
  cursor: pointer;
  user-select: none;
}

.add-family-member-modal__actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  width: 100%;
}

.add-family-member-modal__btn {
  flex: 1;
  padding: 20px 24px;
  border-radius: 12px;
  font-size: 16px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  text-align: center;
}

.add-family-member-modal__btn--primary {
  background: linear-gradient(90deg, rgb(0, 51, 102), rgb(51, 204, 255));
  ;
  color: white;
  box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.add-family-member-modal__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

.add-family-member-modal__btn--primary:active {
  transform: translateY(0);
}

.add-family-member-modal__btn--secondary {
  background: #f5f5f5;
  color: #666;
}

.add-family-member-modal__btn--secondary:hover {
  background: #e8e8e8;
  color: #333;
}

/* Адаптивность для модального окна добавления члена семьи */
@media (max-width: 768px) {
  .add-family-member-modal {
    width: 95%;
    max-width: none;
    border-radius: 20px 20px 0 0;
    top: auto;
    bottom: 0;
    transform: translate(-50%, 100%) scale(1);
  }

  .add-family-member-modal.active {
    transform: translate(-50%, 0) scale(1) !important;
  }

  .add-family-member-modal__body {
    padding: 40px 25px 30px;
    gap: 20px;
  }

  .add-family-member-modal__title {
    font-size: 24px;
  }

  .add-family-member-modal__icon {
    width: 64px;
    height: 64px;
  }
}

@media (max-width: 480px) {
  .add-family-member-modal__body {
    padding: 35px 20px 25px;
    gap: 18px;
  }

  .add-family-member-modal__icon {
    width: 56px;
    height: 56px;
  }

  .add-family-member-modal__title {
    font-size: 22px;
  }

  .add-family-member-modal__actions {
    flex-direction: column;
  }

  .add-family-member-modal__btn {
    width: 100%;
  }
}

@media(max-width: 768px) {

  /* Стили для модального окна информации об уровнях */
  #levelInfoModal {
    animation: fadeIn 0.3s ease-out;
  }

  #levelInfoModal>div {
    animation: slideUp 0.3s ease-out;
  }

  @keyframes fadeIn {
    from {
      opacity: 0;
    }

    to {
      opacity: 1;
    }
  }

  @keyframes slideUp {
    from {
      opacity: 0;
      transform: translateY(20px);
    }

    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  #levelInfoModal .level-info-modal-close:hover {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #333 !important;
  }

  #levelInfoModal .btn.btn-black:hover {
    background: #004080 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
  }

  .profile-level-indicators-horizontal {
    min-height: 50px;
    position: relative;
  }

  .profile-level-indicator-horizontal {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border: 2px solid #e4e4f7;
    transition: all 0.3s ease;
  }

  .profile-level-indicator-horizontal.active {
    border-color: #33ccff;
    box-shadow: 0 0 0 2px rgba(51, 204, 255, 0.2);
  }

  .profile-level-indicator-horizontal.current {
    border-color: #003366;
    box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.3);
    transform: scale(1.1);
  }
}

/* ==================== ЛЕВАЯ ПАНЕЛЬ ==================== */
.left-panel-toggle {
  position: fixed;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 43px;
  height: 39px;
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-left: none;
  border-radius: 0 12px 12px 0;
  box-shadow: 0px 2.95px 6.35px 0px rgba(0, 0, 0, 1), 0px 0px 33.85px 0px rgba(0, 134, 179, 1);
  cursor: pointer;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  transition: all 0.3s ease;
}

.left-panel-toggle__burger {
  flex-shrink: 0;
}

.left-panel-toggle:hover {
  background: var(--color-gray-light);
  box-shadow: 0px 2.95px 6.35px 0px rgba(0, 0, 0, 1), 0px 0px 33.85px 0px rgba(0, 134, 179, 1);
}

.left-panel-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.left-panel-toggle.left-drawer-open {
  top: 50%;
  transform: translateY(-50%);
}

.left-panel-toggle.left-drawer-open:active {
  transform: translateY(-50%) scale(0.95);
}

.left-drawer {
  position: fixed;
  top: 50%;
  left: -432px;
  width: 432px;
  height: auto;
  transform: translateY(-50%);
  background: white;
  box-shadow: 2px 0 20px rgba(0, 0, 0, 0.1);
  z-index: 10002;
  transition: left 0.3s ease, transform 0.3s ease;
  overflow: visible;
  border-radius: 0 24px 24px 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.left-drawer.open {
  left: 0;
}

.left-drawer-header {
  flex-shrink: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 20px 16px 20px;
  background: white;
  border-bottom: none;
  box-sizing: border-box;
  border-radius: 0 24px 0 0;
}

.left-drawer-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
}

.left-drawer-stat-icon {
  color: rgba(0, 51, 102, 1);
  width: 24px;
  height: 24px;
}

.left-drawer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  font-size: 40px;
  color: #888;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  z-index: 10;
  color: #003366;
}

/*.left-drawer-close:hover {
  background: rgba(0, 0, 0, 0.06);
  color: rgba(0, 51, 102, 1);
}*/

.left-drawer-body {
  flex: 1;
  min-height: 0;
  padding: 0 23px 20px 23px;
  overflow-y: auto;
  overflow-x: visible;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  border-radius: 0 0 24px 0;
}

.info-loading {
  display: none !important;
}

.info-content {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  overflow-x: visible;
  flex: 1;
}

.left-drawer-title {
  font-family: "SF Pro Display", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 700;
  font-style: normal;
  font-size: 24px;
  line-height: 118%;
  letter-spacing: 0;
  text-align: center;
  color: rgba(0, 51, 102, 1);
  margin-bottom: 8px;
}

/* Блоки статистики */
.stat-block {
  width: 386px;
  height: auto;
  border-radius: 12px;
  padding: 16px;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: relative;
}

.stat-block-orders {
  background: linear-gradient(to right, #1F1F1F 0%, #626262 100%);
}

.stat-block-warning {
  background: linear-gradient(to right, #D59400 0%, #F6C24D 100%);
}

.stat-block-danger {
  background: linear-gradient(to right, #610013 0%, #C70028 100%);
}

.stat-block-users-news {
  width: 386px;
  height: auto;
  background: #F1F5F7;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 16px;
  gap: 20px;
}

.stat-block-left {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.stat-block-title {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.2;
  color: #FFFFFF;
  margin-bottom: 4px;
}

.stat-block-warning .stat-block-title,
.stat-block-danger .stat-block-title {
  color: #FFFFFF;
}

.stat-block-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  line-height: 1.2;
}

.stat-block-label {
  color: #FFFFFF;
  font-weight: 400;
}

.stat-block-warning .stat-block-label,
.stat-block-danger .stat-block-label {
  color: #FFFFFF;
}

.stat-block-value {
  color: #FFFFFF;
  font-weight: 600;
}

.stat-block-warning .stat-block-value,
.stat-block-danger .stat-block-value {
  color: #FFFFFF;
}

.stat-block-percent {
  color: #FFFFFF;
  font-weight: 500;
  font-size: 14px;
}

.stat-block-right {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stat-progress-circle {
  width: 93px;
  height: 93px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.progress-ring {
  transform: rotate(-90deg);
}

.progress-ring-circle {
  transition: stroke-dasharray 0.5s ease;
}

.progress-ring-fill {
  stroke-dasharray: 0 238.76;
}

.progress-percent {
  position: absolute;
  width: 47px;
  height: 27px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 22px;
  color: #FFFFFF;
  text-align: center;
}

.stat-block-users,
.stat-block-news {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stat-block-icon-text {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.stat-block-icon {
  width: 28px;
  height: 16px;
  flex-shrink: 0;
}

.stat-block-section-title {
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.2;
  color: #003366;
}

.stat-block-users-news .stat-block-label {
  color: #003366;
  font-weight: 500;
}

.stat-block-users-news .stat-block-value {
  color: #003366;
  font-weight: 600;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 24px;
  overflow: visible;
  min-height: 34px;

  @media (max-width: 767px) {
    gap: 16px;
    min-height: unset;
  }
}

.stat-item .stat-param {
  display: flex;
  justify-content: space-between;
  flex: 1;
  padding: 10px;
  margin: -10px;
  border-radius: 10px;
}

.stat-item .stat-label {
  flex: 1;
  min-width: 0;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-style: normal;
  font-size: 17px;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: bottom;
  color: #333;
  word-wrap: break-word;
  white-space: normal;
}

.stat-item .stat-value {
  flex-shrink: 0;
  width: 60px;
  margin-left: 13px;
  text-align: right;
  font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 500;
  font-size: 17px;
  line-height: 100%;
  letter-spacing: 0;
  vertical-align: bottom;
  color: #000;
}

.stat-circle {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;

  @media (max-width: 767px) {
    width: 20px;
    height: 20px;
  }
}

.stat-circle-user {
  background: var(--color-gray-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

.stat-user-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

/* Цвет SVG человечка rgba(0, 51, 102, 1) */
.stat-circle-user img.stat-user-icon {
  filter: invert(13%) sepia(92%) saturate(1200%) hue-rotate(180deg);
}

.stat-circle-black {
  background: #000000;
}

.stat-circle-done {
  border: 3px solid rgba(2, 145, 0, 1);
  box-shadow: 0px 0px 17.1px 0px rgba(2, 145, 0, 1);
}

.stat-circle-danger {
  background: rgba(255, 0, 51, 1);
}

.stat-circle-danger.stat-circle-done {
  background: rgba(255, 0, 51, 1);
  border: 3px solid rgba(2, 145, 0, 1);
  box-shadow: 0px 0px 17.1px 0px rgba(2, 145, 0, 1);
}

.stat-circle-warning {
  background: rgba(219, 153, 0, 1);
}

.stat-circle-warning.stat-circle-done {
  background: rgba(219, 153, 0, 1);
  border: 3px solid rgba(2, 145, 0, 1);
  box-shadow: 0px 0px 17.1px 0px rgba(2, 145, 0, 1);
}

.stat-circle-news {
  background: rgba(37, 99, 235, 1);
}


/* Адаптив: дровер на мобильных выезжает снизу над мобильной навигацией */
@media (max-width: 768px) {

  /* Поисковик должен быть виден сверху */
  header.header-map {
    z-index: 10003 !important;
    /* Выше left-drawer (10002) */
  }

  /* Убираем затемнение фона (backdrop) для leftDrawer на мобильных */
  .left-drawer.open~* .backdrop.show,
  .backdrop.show:has(~ .left-drawer.open) {
    opacity: 0 !important;
    visibility: hidden !important;
    display: none !important;
  }

  .left-drawer {
    top: 156px;
    /* Расстояние от верха экрана */
    left: 0;
    right: 0;
    bottom: 60px;
    /* Впритык к bottom-nav (высота bottom-nav) */
    width: 100%;
    max-width: 100%;
    height: calc(100vh - 156px - 60px);
    /* Высота = экран минус top минус bottom */
    max-height: calc(100vh - 156px - 60px);
    transform: translateY(100%);
    border-radius: 24px 24px 0 0;
    transition: transform 0.3s ease, visibility 0.3s ease;
    z-index: 9999;
    /* Ниже bottom-nav (10001) когда закрыта */
    display: flex;
    flex-direction: column;
    visibility: hidden;
    /* Скрываем когда закрыта */
    pointer-events: none;
    /* Отключаем взаимодействие когда закрыта */
    box-shadow: none !important;
    /* Убираем box-shadow на мобильных */
  }

  .left-drawer.open {
    transform: translateY(0);
    z-index: 10002;
    /* Выше bottom-nav (10001) когда открыта */
    visibility: visible;
    /* Показываем когда открыта */
    pointer-events: auto;
    /* Включаем взаимодействие когда открыта */
    border-radius: 24px 24px 0 0;
    /* Закругления только сверху */
  }

  /* Убираем закругления у bottom-nav когда leftDrawer открыта */
  .left-drawer.open~.bottom-nav,
  .left-drawer.open~#bottomNav,
  body:has(.left-drawer.open) .bottom-nav,
  body:has(.left-drawer.open) #bottomNav,
  .bottom-nav.left-drawer-active,
  #bottomNav.left-drawer-active {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;
  }

  .left-drawer-header {
    padding: 8px 16px 8px 16px;
    border-radius: 24px 24px 0 0;
    flex-shrink: 0;
    min-height: auto;
  }

  .left-drawer-close {
    top: 12px;
    right: 12px;
    width: 28px;
    height: 28px;
    font-size: 32px;
  }

  .left-drawer-body {
    padding: 4px 16px 16px 16px;
    height: 100%;
    overflow: hidden;
    /* Убираем скролл */
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    justify-content: flex-start;
    /* Начинаем с верха */
  }

  .info-content {
    gap: 6px;
    /* Минимальные отступы между блоками */
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    justify-content: space-evenly;
    /* Равномерно распределяем блоки с равными отступами */
    flex: 1;
  }

  /* В боттомшите перенос текста только целыми словами */
  .left-drawer .stat-item .stat-label,
  .left-drawer .left-drawer-title {
    hyphens: none;
    word-break: normal;
    overflow-wrap: normal;
  }

  /* Уменьшаем заголовок */
  .left-drawer .left-drawer-title {
    font-size: 18px;
    margin-bottom: 4px;
    margin-top: 0;
  }

  /* Адаптация блоков статистики для мобильных */
  .left-drawer .stat-block {
    width: 100%;
    max-width: 100%;
    padding: 8px;
    /* Уменьшаем padding */
    border-radius: 10px;
    margin-bottom: 0;
    min-height: auto;
    flex: 1 1 auto;
    /* Блоки растягиваются равномерно */
    display: flex;
    align-items: center;
  }

  .left-drawer .stat-block-left {
    gap: 6px;
  }

  .left-drawer .stat-block-right {
    flex-shrink: 0;
  }

  /* Уменьшаем размеры текста в блоках статистики */
  .left-drawer .stat-block-title {
    font-size: 14px;
    margin-bottom: 6px;
  }

  .left-drawer .stat-block-row {
    font-size: 12px;
    gap: 6px;
  }

  .left-drawer .stat-block-label,
  .left-drawer .stat-block-value,
  .left-drawer .stat-block-percent {
    font-size: 12px;
  }

  /* Уменьшаем размеры кругов прогресса */
  .left-drawer .stat-progress-circle {
    width: 60px;
    height: 60px;
  }

  .left-drawer .stat-progress-circle svg {
    width: 60px;
    height: 60px;
  }

  .left-drawer .stat-progress-circle .progress-ring circle {
    r: 24;
    cx: 30;
    cy: 30;
    stroke-width: 7;
  }

  .left-drawer .progress-percent {
    font-size: 14px;
    width: 35px;
    height: 20px;
  }

  /* Уменьшаем блок пользователей и новостей */
  .left-drawer .stat-block-users-news {
    padding: 8px;
    gap: 8px;
    flex: 1 1 auto;
    /* Блок растягивается равномерно */
  }

  .left-drawer .stat-block-section-title {
    font-size: 14px;
  }

  .left-drawer .stat-block-icon {
    width: 20px;
    height: 12px;
  }

  .left-drawer .stat-block-users,
  .left-drawer .stat-block-news {
    gap: 6px;
  }

  .left-panel-toggle {
    left: 0;
    top: 50%;
    bottom: auto;
    width: 36px;
    height: 50px;
    transform: translateY(-50%);
    padding-right: 0;
    border-radius: 0 12px 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 36px;
    min-width: 36px;
  }

  /* Кнопка не двигается при открытом дровере */
  .left-panel-toggle.left-drawer-open {
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
  }

  .left-panel-toggle:active {
    transform: translateY(-50%) scale(0.95);
  }

  .left-panel-toggle.left-drawer-open:active {
    transform: translateY(-50%) scale(0.95);
  }

  .left-panel-toggle__burger {
    width: 16px;
    height: 12px;
  }
}