html,
body,
#map {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
    Ubuntu, Cantarell, sans-serif;
}

.fab {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: radial-gradient(circle at center, #ffffff 40%, #d4f9ff 100%);
  box-shadow: 0 0 20px rgba(0, 255, 255, 0.5),
    0 0 40px rgba(0, 255, 255, 0.25) inset;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  animation: fabPulse 2s infinite ease-in-out,
    fabWiggle 3.5s infinite ease-in-out;
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.fab:hover {
  transform: scale(1.15) rotate(5deg);
  box-shadow: 0 0 40px rgba(0, 255, 255, 0.9),
    0 0 60px rgba(0, 255, 255, 0.4) inset;
}

.fab-logo {
  width: 70%;
  height: 70%;
  object-fit: contain;
  filter: drop-shadow(0 0 10px rgba(0, 255, 255, 0.9));
  animation: fabGlow 1.8s infinite alternate ease-in-out;
}

@keyframes fabPulse {
  0% {
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
  }
  50% {
    box-shadow: 0 0 35px rgba(0, 255, 255, 0.9);
  }
  100% {
    box-shadow: 0 0 10px rgba(0, 255, 255, 0.4);
  }
}

@keyframes fabGlow {
  0% {
    filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.4));
  }
  50% {
    filter: drop-shadow(0 0 14px rgba(0, 255, 255, 1));
  }
  100% {
    filter: drop-shadow(0 0 4px rgba(0, 255, 255, 0.4));
  }
}

@keyframes fabWiggle {
  0%,
  100% {
    transform: rotate(0deg);
  }
  10% {
    transform: rotate(10deg);
  }
  20% {
    transform: rotate(-10deg);
  }
  30% {
    transform: rotate(6deg);
  }
  40% {
    transform: rotate(-6deg);
  }
  50% {
    transform: rotate(3deg);
  }
  60% {
    transform: rotate(-3deg);
  }
  70% {
    transform: rotate(1deg);
  }
  80%,
  90% {
    transform: rotate(0deg);
  }
}

.drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(380px, 92vw);
  background: #fff;
  transform: translateX(-100%);
  transition: transform 0.5s cubic-bezier(0.25, 0.8, 0.25, 1);
  z-index: 1100;
  display: flex;
  flex-direction: column;
  box-shadow: 20px 0 40px rgba(0, 0, 0, 0.18);
  overflow: hidden;
  will-change: transform;
}

.drawer.open {
  transform: translateX(0);
}

.drawer-header {
  display: flex;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  position: relative;
}

.drawer-title {
  font-weight: 700;
  font-size: 18px;
  color: #333;
  margin-left: 10px;
}

.drawer-close {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: background 0.2s;
}

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

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}

.auth-btn {
  flex: 1;
  padding: 10px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid transparent;
  font-family: "Inter", sans-serif;
}

.auth-login {
  background: #0ea5a4;
  color: #fff;
  border-color: #0ea5a4;
}

.auth-login:hover {
  background: #fff;
  color: #0ea5a4;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14, 165, 164, 0.3);
}

.auth-register {
  background: #fff;
  color: #0ea5a4;
  border-color: #0ea5a4;
}

.auth-register:hover {
  background: #0ea5a4;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14, 165, 164, 0.3);
}

.auth-modal {
  width: 400px;
  max-width: 90%;
  padding: 20px 24px;
  border-radius: 14px;
  background: #f9fafb;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
  z-index: 10003 !important;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.95);
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.auth-modal h2 {
  color: #0086b3;
  font-size: 24px;
  margin-bottom: 10px;
  text-align: center;
}

.register-confirm-code-modal__text {
  text-align: center;
}

register-confirm-code-modal__title {
  text-align: center;
}

.auth-modal label {
  font-size: 18px;
  font-weight: 700;
  color: #28293d;
}

.auth-modal input {
  width: 100%;
  height: 68px;
  padding: 10px 12px;
  margin-top: 8px;
  margin-bottom: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 18px;
}

.auth-modal button {
  width: 100%;
  height: 68px;
  padding: 10px;
  background: linear-gradient(90deg, #003366, #33ccff);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.auth-modal button:hover {
  background: linear-gradient(90deg, #003366, #33ccff);
  transform: translateY(-2px);
}

.auth-modal .close {
  position: absolute;
  top: 36px;
  right: 36px;
  font-size: 22px;
  color: #28293d;
  cursor: pointer;
}

.logout-btn {
  display: inline-block;
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 700;
  border-radius: 10px;
  background-color: #0ea5a4;
  color: #fff;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.logout-btn:hover {
  background: #fff;
  color: #0ea5a4;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(14, 165, 164, 0.3);
}

.register-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  width: 400px;
  max-width: 90%;
  padding: 0;
  z-index: 1250;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.register-modal.show {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.register-modal .modal-content h2 {
  color: #0ea5a4;
  font-size: 20px;
  margin-bottom: 16px;
}

.register-modal .modal-content input {
  width: 100%;
  height: 68px;
  padding: 10px 12px;
  margin-top: 8px;
  margin-bottom: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 16px;
}

.register-modal .modal-content button {
  width: 100%;
  height: 68px;
  padding: 10px;
  background: linear-gradient(90deg, #003366, #33ccff) !important;
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.register-modal .modal-content button:hover {
  background: linear-gradient(90deg, #003366, #33ccff);
  transform: translateY(-2px);
}

.register-modal .modal-content {
  max-height: 600px;
  overflow-y: auto;
  padding: 36px;
}

.register-modal .modal-content .close {
  position: absolute;
  top: 20px;
  right: 16px;
  font-size: 22px;
  color: #475569;
  cursor: pointer;
}

.register-modal .register-modal__field {
  margin-bottom: 15px;
}

.register-modal .register-modal__field label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #303030;
  margin-bottom: 6px;
}

.register-confirm-code-modal .modal-content {
  position: relative;
}

.register-confirm-code-modal .modal-content .close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 15px;
  height: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  color: #475569;
}

.register-confirm-code-modal .modal-content .close:hover {
  color: #0ea5a4;
}

@media (max-width: 768px) {
  .logout-btn {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 8px;
  }
}

.modal-content__title {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.modal-content__title img {
  width: 78px;
  height: 46px;
  margin-bottom: 13px;
  text-align: center;
}

.modal-content__title h2 {
  color: #0086b3 !important;
}

.register-modal .btn-send-code {
  font-size: 14px !important;
  margin-top: 8px !important;
}

/* Fix overflow in register modal (MacBook widths) */
#registerModal .modal-content input,
#registerModal .modal-content select,
#registerModal .modal-content button {
  box-sizing: border-box;
  max-width: 100%;
}



/* Inline styles set width:100% + padding; ensure it doesn't exceed container */
#registerModal #registerSubmitBtnMap {
  box-sizing: border-box;
}

/* The phone+code row uses % widths + gap → can exceed 100%. Make it flexible. */
#registerModal .container-send-code {
  flex-wrap: wrap;
}

#registerModal .container-send-code .input-send-code {
  width: auto !important;
  flex: 1 1 240px !important;
  min-width: 0;
  box-sizing: border-box;
}

#registerModal .container-send-code .btn-send-code {
  width: auto !important;
  flex: 0 0 auto !important;
  box-sizing: border-box;
}

.search-container {
  padding: 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

/* Стили для модального окна восстановления пароля */
.password-recovery-modal {
  position: relative;
}

.password-recovery-modal__header {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  margin-bottom: 20px;
}

.password-recovery-modal__logo {
  display: flex;
  justify-content: center;
  align-items: center;
}

.password-recovery-modal__logo img {
  width: 78px;
  height: 46px;
}

.password-recovery-modal .close {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 22px;
  color: #28293d;
  cursor: pointer;
  z-index: 1;
}

.password-recovery-modal__back-btn {
  left: 0;
  right: auto;
}

.password-recovery-modal__body {
  text-align: center;
}

.password-recovery-modal__title {
  color: #0086b3 !important;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 16px;
  text-align: center;
}

.password-recovery-modal__description {
  color: #28293D;
  font-size: 18px !important;
  line-height: 1.5;
  margin-bottom: 10px;
  text-align: center;
  font-weight: 400;
  padding: 0 10px;
}

.password-recovery-modal__input-group {
  text-align: left;
}

.password-recovery-modal__input-group label {
  display: block;
  font-size: 18px;
  font-weight: 700;
  color: #303030;
}

.password-recovery-modal__input-group input {
  width: 100%;
  height: 68px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 18px;
  box-sizing: border-box;
}

.password-recovery-modal__input-group input:focus {
  outline: none;
  border-color: #0086b3;
  box-shadow: 0 0 0 3px rgba(0, 134, 179, 0.1);
}

.password-recovery-modal__submit-btn {
  width: 100%;
  height: 50px;
  padding: 10px;
  background: linear-gradient(90deg, #003366, #33ccff);
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 50px;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  margin-top: 10px;
}

.password-recovery-modal__submit-btn:hover {
  background: linear-gradient(90deg, #003366, #33ccff);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 51, 102, 0.3);
}

.password-recovery-modal__submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.password-recovery-modal #passwordRecoveryErrors,
.password-recovery-modal #passwordRecoveryCodeErrors {
  color: #f44336;
  font-size: 14px;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  background-color: #ffebee;
}

.search-box {
  display: flex;
  align-items: center;
  background: #f5f5f5;
  border-radius: 12px;
  padding: 10px 14px;
  transition: all 0.2s;
}

.search-box:focus-within {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
}

.search-icon {
  margin-right: 10px;
  color: #666;
}

.search-input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  font-size: 16px;
}

.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 12px;
  padding: 16px;
}

.category-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 12px 8px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  cursor: pointer;
  transition: all 0.2s;
}

.category-item:hover {
  background: #f9f9f9;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.category-icon {
  width: 32px;
  height: 32px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.category-name {
  font-size: 12px;
  text-align: center;
  color: #333;
  font-weight: 500;
}

.divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.08);
  margin: 8px 16px;
}

.ad-container {
  margin: 16px;
  padding: 16px;
  background: #f0f7ff;
  border-radius: 12px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-family: "Lora", serif;
}

.ad-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  color: #333;
}

.ad-description {
  font-size: 14px;
  color: #666;
  margin-bottom: 12px;
  line-height: 1.4;
}

.ad-disclaimer {
  font-size: 12px;
  color: #999;
  font-style: italic;
}

.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(2px);
  z-index: 1090;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.backdrop.show {
  display: block;
  opacity: 1;
}

.modal {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) scale(0.95);
  background: #fff;
  border-radius: 12px;
  padding: 18px 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  z-index: 1200;
  width: 420px;
  max-width: calc(100% - 32px);
  display: none;
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

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

.modal h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #111827;
}

.modal p {
  color: #475569;
  font-size: 14px;
  line-height: 1.35;
}

.modal .modal-actions {
  margin-top: 14px;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.btn {
  appearance: none;
  border: 0;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

.btn-close {
  background: #e5e7eb;
  color: #0f172a;
}

.btn-ok {
  background: #0ea5a4;
  color: #fff;
}

.sos-btn {
  position: fixed;
  top: 0px;
  right: 0px;
  z-index: 1050;
  width: 56px;
  height: 56px;
  background: #e02424;
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  border: none;
  border-radius: 50%;
  box-shadow: 0 8px 20px rgba(224, 36, 36, 0.5);
  cursor: pointer;
  overflow: visible;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sos-ring {
  position: absolute;
  top: 0;
  left: 0;
  transform: rotate(-90deg);
  pointer-events: none;
}

.sos-ring circle {
  transition: stroke-dashoffset 0.05s linear;
}

@media (max-width: 480px) {
  .modal {
    width: calc(100% - 28px);
    padding: 16px;
    border-radius: 10px;
  }

  .modal h3 {
    font-size: 16px;
  }

  .modal p {
    font-size: 13px;
  }
}

.m-zoomstack,
.m-chips,
.m-search,
.m-tabbar {
  display: none;
}

@media (max-width: 768px) {
  .fab {
    width: 44px;
    height: 44px;
    font-size: 20px;
    top: 12px;
    left: 12px;
  }

  .m-zoomstack {
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: fixed;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1000;
  }

  .m-zoomstack button {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
    font-size: 22px;
    font-weight: 700;
  }

  .m-chips {
    display: flex;
    gap: 10px;
    justify-content: space-between;
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 120px;
    z-index: 1000;
  }

  .m-chips button {
    flex: 1;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    background: #fff;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    font-weight: 700;
  }

  .m-search {
    display: flex;
    gap: 10px;
    background: #fff;
    border-radius: 12px;
    padding: 2px 4px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.15);
    position: fixed;
    left: 12px;
    right: 12px;
    bottom: 65px;
    z-index: 1000;
  }

  .m-search input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 14px;
    line-height: 1;
  }

  .m-search button {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
  }

  .m-search button img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
  }

  .m-tabbar {
    display: flex;
    gap: 8px;
    justify-content: space-evenly;
    padding: 8px 10px;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 16px;
    z-index: 1000;
  }

  .m-tabbar button {
    flex: 1;
    border: 0;
    background: #fff;
    border-radius: 12px;
    padding: 10px 6px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    font-size: 12px;
    font-weight: 700;
    border: 1px solid rgba(0, 0, 0, 0.08);
    color: #0f172a;
    opacity: 0.85;
  }

  .m-tabbar .on {
    background: #e9f6e9;
    border-color: #bfe6c5;
  }

  .leaflet-control-zoom {
    display: none !important;
  }

  .sos-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 1050;
    width: 56px;
    height: 56px;
    background: #e02424;
    color: #fff;
    font-weight: 800;
    font-size: 16px;
    border: none;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(224, 36, 36, 0.5);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }

  .sos-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 25px rgba(224, 36, 36, 0.6);
  }

  .m-chips .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #007aff;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
    animation: backPulse 2s infinite ease-in-out;
    transition: transform 0.2s;
    font-size: 14px;
    padding: 8px 12px;
    text-decoration: none;
  }

  @keyframes backPulse {
    0%,
    100% {
      transform: scale(1);
      box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
    }
    50% {
      transform: scale(1.08);
      box-shadow: 0 0 20px rgba(0, 122, 255, 0.8);
    }
  }

  .m-chips .back-btn:active {
    transform: scale(1.1);
  }
}

.leaflet-control-attribution {
  display: none !important;
}

@media (min-width: 769px) {
  .leaflet-top.leaflet-left {
    top: 50% !important;
    left: auto !important;
    right: 20px !important;
    transform: translateY(-50%);
  }

  .leaflet-control-zoom {
    box-shadow: none !important;
    border: none !important;
    background: transparent !important;
  }

  .leaflet-control-zoom a {
    display: block;
    background: #fff !important;
    color: #333 !important;
    font-weight: bold;
    width: 36px;
    height: 36px;
    line-height: 34px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.2);
    border-radius: 0 !important;
    margin-bottom: 10px;
    transition: transform 0.2s, background 0.2s;
  }

  .leaflet-control-zoom a:hover {
    transform: scale(1.1);
    background: #f5f5f5 !important;
  }

  .leaflet-control-zoom a:last-child {
    margin-bottom: 0;
  }
}

.m-tabbar .back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background-color: #007aff;
  color: #fff;
  font-weight: 700;
  border-radius: 12px;
  border: none;
  box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
  animation: backPulse 2s infinite ease-in-out;
  transition: transform 0.2s;
  font-size: 14px;
  padding: 8px 12px;
  text-decoration: none;
}

@media (min-width: 769px) {
  .pc-search,
  .pc-tabbar {
    display: flex;
    gap: 8px;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
  }

  .pc-search {
    bottom: 80px;
    width: 400px;
    background: #fff;
    padding: 6px 10px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
  }

  .pc-search button {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  .pc-search input {
    flex: 1;
    border: 0;
    outline: 0;
    font-size: 14px;
    padding: 6px 8px;
    background: transparent;
  }

  .pc-tabbar {
    bottom: 16px;
    justify-content: center;
    background: #fff;
    padding: 8px 12px;
    border-radius: 16px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    gap: 12px;
  }

  .pc-tabbar button {
    flex: none;
    min-width: 180px;
    max-width: 200px;
    padding: 10px 12px;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: none;
    background: #f3f4f6;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    transition: all 0.2s;
  }

  .pc-tabbar button:hover {
    background: #e0f2fe;
    transform: translateY(-2px);
  }

  .pc-tabbar .back-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background-color: #007aff;
    color: #fff;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    box-shadow: 0 0 10px rgba(0, 122, 255, 0.5);
    font-size: 14px;
    padding: 8px 20px;
    text-decoration: none;
    animation: backPulse 2s infinite ease-in-out;
    transition: transform 0.2s, box-shadow 0.2s;
    white-space: nowrap;
    max-width: 100%;
    box-sizing: border-box;
  }

  .pc-tabbar .back-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 0 20px rgba(0, 122, 255, 0.8);
  }

  .pc-tabbar .back-btn:active {
    transform: scale(1.1);
  }
}

body.role-executor .fab {
  background: radial-gradient(
    circle at center,
    #d8b4fe 40%,
    #c084fc 100%
  ) !important;
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.5),
    0 0 40px rgba(168, 85, 247, 0.25) inset !important;
}

body.role-executor .pc-tabbar {
  background: #d8b4fe !important;
  box-shadow: 0 6px 20px rgba(168, 85, 247, 0.3) !important;
}

body.role-executor .m-chips button,
body.role-executor .m-tabbar button {
  background: #d8b4fe !important;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 6px 18px rgba(168, 85, 247, 0.25) !important;
}

@media (max-width: 768px) {
  .pc-search,
  .pc-tabbar {
    display: none !important;
  }
}

body:not(.role-executor):not(.logged-in) .m-search,
body:not(.role-executor):not(.logged-in) .pc-search {
  margin-top: 80px;
}

@media (max-width: 768px) {
  body:not(.role-executor):not(.logged-in) .m-search {
    margin-top: 100px;
  }
}

.sos-wrapper {
  position: relative;
  width: 50px;
  height: 50px;
  overflow: visible;
}

.sos-pulse-icon {
  position: relative;
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.sos-pulse-icon img {
  width: 40px;
  height: 40px;
  position: relative;
  z-index: 2;
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.2);
  }
  50% {
    transform: scale(1);
  }
  75% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.sos-pulse-icon .pulse {
  position: absolute;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 0, 0, 0.3);
  animation: ring 1.5s infinite;
  z-index: 1;
}

@keyframes ring {
  0% {
    transform: scale(1);
    opacity: 0.7;
  }
  70% {
    transform: scale(2.5);
    opacity: 0;
  }
  100% {
    transform: scale(2.5);
    opacity: 0;
  }
}

.premium-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

.premium-toggle input {
  display: none;
}

.premium-toggle .slider {
  position: relative;
  width: 50px;
  height: 26px;
  background-color: #ccc;
  border-radius: 13px;
  transition: 0.3s;
  flex-shrink: 0;
}

.premium-toggle .slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 2px;
  top: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

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

.premium-toggle input:checked + .slider {
  background-color: #4caf50;
}

.premium-toggle .label-text {
  font-size: 14px;
  font-weight: 500;
  color: #333;
  flex-shrink: 0;
}

.favorite-star {
  cursor: pointer;
  font-size: 28px;
  transition: all 0.3s ease;
  user-select: none;
}

.favorite-star:hover {
  transform: scale(1.4) rotate(15deg);
}

.favorite-star.favorited {
  color: gold !important;
  text-shadow: 0 0 12px gold, 0 0 20px orange;
  animation: shine 2s infinite;
}

@keyframes shine {
  0%,
  100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.5);
  }
}

.leaflet-container {
  background: #000 !important;
}

.leaflet-control-zoom a {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.2) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.leaflet-control-attribution {
  display: none !important;
}
body:not(.logged-in) .pc-tabbar,
body:not(.logged-in) .m-chips,
body:not(.logged-in) .m-tabbar {
  display: none !important;
}

body:not(.logged-in) .premium-toggle,
body:not(.logged-in) .logout-btn,
body:not(.logged-in) .username {
  display: none !important;
}

@media (max-width: 768px) {
  body:not(.logged-in) .m-search {
    bottom: 20px !important; /* вместо 65px */
  }
}

@media (min-width: 769px) {
  body:not(.logged-in) .pc-search {
    bottom: 30px !important; /* вместо 80px */
  }
}

.recording-section {
  margin-bottom: 20px;
}

.recording-controls {
  display: flex;
  gap: 20px;
  margin-bottom: 15px;
  justify-content: center;
  align-items: center;
}

.recording-btn {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.record-start {
  background: #ff0000;
  color: white;
}

.record-stop {
  background: #6c757d;
  color: white;
}

.recording-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.recording-status {
  text-align: center;
  padding: 10px;
  background: #f8f9fa;
  border-radius: 8px;
  margin-bottom: 10px;
  display: none;
}

.recording-preview {
  display: none;
  text-align: center;
}

.recording-preview audio {
  width: 100%;
  margin-top: 10px;
}

.form-popup__field {
  margin-bottom: 15px;
}

.form-popup__label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-popup__input input,
.form-popup__input textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  resize: vertical;
}

.form-popup__btns {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

.form-popup__btn {
  flex: 1;
}

.warning-btn {
  background: #facc15;
  color: #000;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

.danger-btn {
  background: #dc2626;
  color: #fff;
  padding: 12px;
  border: none;
  border-radius: 8px;
  font-weight: bold;
  cursor: pointer;
  width: 100%;
}

.doc-config {
  border: 2px dashed #6e6e6e;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.3s ease;
  background: #f8f9fa;
  position: relative;
}

.doc-config input {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  opacity: 0;
  cursor: pointer;
}

.map-locate-btn {
  background: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  z-index: 1000;
}

#sosMapContainer {
  position: relative;
}
#sosMapContainer .map-locate-btn {
  position: absolute;
  top: 10px;
  right: 10px;
  left: auto;
}

.map-locate-btn:hover {
  background: #f0f0f0;
  transform: scale(1.1);
}

.popup-info__content {
  background: white;
  border-radius: 20px;
  padding: 20px;
}

.popup-info__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 15px;
}

.popup-info__title {
  font-size: 20px;
  font-weight: 700;
  color: #000;
  margin: 0;
}

.popup-info__close {
  width: 30px;
  height: 30px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  border-radius: 50%;
}

.popup-info__close:hover {
  background: #f5f5f5;
}

.recording-indicator-dot {
  width: 10px;
  height: 10px;
  background: #ff0000;
  border-radius: 50%;
  animation: pulse 1.5s infinite;
  margin-right: 8px;
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

.level-indicators {
  display: flex;
  flex-direction: row;
  gap: 1px;
  position: relative;
  padding: 0;
  align-items: center;
  width: 70%;
  margin: 0 auto;
  flex-shrink: 0;
  height: 50px;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-between;
}
.level-track {
  position: absolute;
  left: 8px;
  top: 15px;
  bottom: 15px;
  width: 97%;
  height: 20px;
  background: #e4e4f7;
  border-radius: 12px;
  z-index: 1;
}
.level-fill__modal {
  position: absolute;
  left: 8px;
  top: 15px;
  width: 14px;
  background: linear-gradient(90deg, #003366, #33ccff);
  border-radius: 12px;
  z-index: 2;
  transition: height 1.2s ease-out;
  height: 20px;
}
.level-indicator {
  width: 42px;
  height: 42px;
  border-radius: 30px;
  background-color: var(--color-white);
  border: 2px solid #e4e4f7;
  position: relative;
  z-index: 3;
  transition: all var(--transition-fast);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.level-indicator img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.level-indicator.active {
  border: 2px solid #00cc33;
  background-color: var(--color-white);
  box-shadow: 0 0 0 2px rgba(0, 204, 51, 0.2);
}

.level-indicator.current {
  border: 3px solid #00cc33;
  background-color: var(--color-white);
  box-shadow: 0 0 0 3px rgba(0, 204, 51, 0.3);
  transform: scale(1.1);
}

.profile-dropdown__head {
  display: flex;
  position: relative;
  justify-content: center;
  align-items: center;
  width: 100%;
}
.profile-dropdown__head span {
  text-align: center;
}
.profile__level-links {
  max-width: 360px !important;
  width: 100%;
  height: 60px;
  background: linear-gradient(90deg, #003366, #33ccff);
  border-radius: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 15px;
  font-size: 18px;
  margin: 0 auto;
}
.profile__level-link {
  text-decoration: none;
  font-size: 18px;
  color: #fff;
}

/* Стили для чекбокса политики конфиденциальности */
#privacyPolicyCheckboxMap {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #0ea5a4;
  flex-shrink: 0;
}

#privacyPolicyCheckboxMap:checked {
  accent-color: #0ea5a4;
}

#privacyPolicyLinkMap {
  color: #0ea5a4;
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.2s ease, text-decoration-color 0.2s ease;
}

#privacyPolicyLinkMap:hover {
  color: #0d8d8c;
  text-decoration-color: #0d8d8c;
}

/* Стили для модального окна политики конфиденциальности */
#privacyPolicyModal .modal-content {
  max-width: 700px;
  max-height: 80vh;
  overflow-y: auto;
}

#privacyPolicyModal .modal-content h3 {
  color: #0ea5a4;
  font-size: 20px;
  margin-top: 25px;
  margin-bottom: 15px;
  font-weight: 600;
}

#privacyPolicyModal .modal-content h4 {
  color: #28293D;
  font-size: 18px;
  margin-top: 20px;
  margin-bottom: 10px;
  font-weight: 600;
}

#privacyPolicyModal .modal-content p {
  margin-bottom: 15px;
  line-height: 1.8;
  color: #333;
}

@media (max-width: 768px) {
  #privacyPolicyModal .modal-content {
    max-width: 95%;
    padding: 20px;
  }
  
  #privacyPolicyModal .modal-content h3 {
    font-size: 18px;
  }
  
  #privacyPolicyModal .modal-content h4 {
    font-size: 16px;
  }
  
  #privacyPolicyModal .modal-content p {
    font-size: 14px;
  }
}

#registerModal {
  padding: 0;
  overflow: hidden;
}