/* ============================================
   ДПС Инфо — Основные стили
   Glassmorphic UI · Тёмная тема · Адаптивность
   ============================================ */

/* ---------- CSS Переменные ---------- */
:root {
  /* Основная палитра */
  --bg-primary: #121826;
  --bg-secondary: #1a2035;
  --bg-glass: rgba(18, 24, 38, 0.75);
  --bg-glass-hover: rgba(18, 24, 38, 0.85);

  /* Акцентные цвета */
  --accent-blue: #3b82f6;
  --accent-blue-hover: #2563eb;
  --accent-green: #22c55e;
  --accent-green-hover: #16a34a;
  --accent-red: #ef4444;
  --accent-red-hover: #dc2626;
  --accent-orange: #f59e0b;
  --accent-purple: #8b5cf6;

  /* Текст */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Стекло (Glassmorphism) */
  --glass-blur: 16px;
  --glass-border: 1px solid rgba(255, 255, 255, 0.08);
  --glass-border-hover: 1px solid rgba(255, 255, 255, 0.15);
  --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  --glass-radius: 20px;

  /* Размеры */
  --bottom-nav-height: 72px;
  --search-top: 16px;
  --side-panel-width: 380px;

  /* Анимации */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---------- Сброс и база ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  overflow-x: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

body {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  max-width: 100%;
}

/* Запрет скролла страницы (карта скроллится внутри) */
body.map-active {
  overflow: hidden;
}

/* ---------- Карта ---------- */
#map {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

/* Стилизация контролов Leaflet */
.leaflet-control-zoom {
  display: none !important; /* Скрываем стандартные кнопки зума */
}

.leaflet-control-attribution {
  font-family: 'Inter', sans-serif !important;
  font-size: 10px !important;
  background: var(--bg-glass) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: var(--text-muted) !important;
  padding: 4px 10px !important;
  border-radius: 12px !important;
  border: var(--glass-border) !important;
  margin: 8px !important;
}

.leaflet-control-attribution a {
  color: var(--accent-blue) !important;
}

/* ---------- Glass Card (общий класс) ---------- */
.glass-card {
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
  border-radius: var(--glass-radius);
  box-shadow: var(--glass-shadow);
  transition: background var(--transition-normal), border var(--transition-normal), transform var(--transition-fast);
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
}

/* ---------- Счётчик онлайн-пользователей ---------- */
.online-counter {
  position: absolute;
  top: 20px;
  left: 68px; /* Справа от кнопки профиля (16px + 44px + 8px) */
  z-index: 1001; /* Поверх боковой панели */
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  height: 36px;
  font-size: 12px;
  font-weight: 600;
  color: #ffffff;
  border-radius: 20px;
  pointer-events: none;
  user-select: none;
  box-sizing: border-box;
}

/* Пульсирующий индикатор «в сети» */
.online-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-green);
  box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  animation: onlinePulse 2s infinite;
}

@keyframes onlinePulse {
  0% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
  }
  70% {
    box-shadow: 0 0 0 8px rgba(34, 197, 94, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
  }
}

.online-counter .online-label {
  color: var(--text-muted);
  font-weight: 500;
}

/* ---------- Строка поиска ---------- */
.search-container {
  position: absolute;
  top: var(--search-top);
  left: 50%;
  transform: translateX(-50%);
  width: min(92%, 520px);
  z-index: 1000;
  padding: 6px;
  border-radius: 16px;
  overflow: visible;
}

.search-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  height: 48px;
}

.search-icon {
  flex-shrink: 0;
  color: var(--text-muted);
}

.search-bar input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1;
}

.search-bar input::placeholder {
  color: var(--text-muted);
}

.clear-btn {
  flex-shrink: 0;
  display: none;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.clear-btn.visible {
  display: flex;
}

.clear-btn:hover {
  background: rgba(255, 255, 255, 0.2);
}

/* Результаты поиска */
.search-results {
  display: none;
  max-height: 280px;
  overflow-y: auto;
  margin-top: 6px;
  border-radius: 14px;
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
}

.search-results.active {
  display: block;
}

.search-result-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  transition: background var(--transition-fast);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.search-result-item:last-child {
  border-bottom: none;
}

.search-result-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.search-result-item svg {
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--accent-blue);
}

.search-result-item .result-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.search-result-item .result-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* ---------- Кнопки управления ---------- */
.locate-btn,
.theme-btn {
  position: absolute;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform var(--transition-fast), background var(--transition-normal);
}

.locate-btn:hover,
.theme-btn:hover {
  transform: scale(1.05);
  background: var(--bg-glass-hover);
}

.locate-btn:active,
.theme-btn:active {
  transform: scale(0.95);
}

.locate-btn {
  top: 80px;
  right: 16px;
}

.theme-btn {
  top: 136px;
  right: 16px;
}

.theme-btn .icon-sun {
  display: none;
}

.theme-btn .icon-moon {
  display: block;
}

/* Светлая тема (Voyager) */
body.light-theme .theme-btn .icon-sun {
  display: block;
}

body.light-theme .theme-btn .icon-moon {
  display: none;
}

/* ---------- Кнопка "Отметить ДПС" ---------- */
.add-btn {
  position: absolute;
  bottom: calc(var(--bottom-nav-height) + 20px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  cursor: pointer;
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 28px;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.add-btn:hover {
  transform: translateX(-50%) scale(1.04);
  box-shadow: 0 12px 32px rgba(59, 130, 246, 0.45);
}

.add-btn:active {
  transform: translateX(-50%) scale(0.96);
}

.add-btn svg {
  flex-shrink: 0;
}

/* ---------- Нижняя навигация (мобильная) ---------- */
.bottom-nav {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px;
  border-radius: 28px;
  background: rgba(18, 24, 38, 0.85);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 20px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 22px;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.nav-item.active {
  background: rgba(59, 130, 246, 0.2);
  color: var(--accent-blue);
}

.nav-item:hover:not(.active) {
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.05);
}

.nav-item svg {
  flex-shrink: 0;
}

/* ---------- Боковая панель (ПК) ---------- */
.side-panel {
  display: none;
  position: absolute;
  top: 80px;
  left: 16px;
  width: var(--side-panel-width);
  max-height: calc(100vh - 160px);
  z-index: 1000;
  padding: 20px;
  overflow-y: auto;
  border-radius: 24px;
  box-sizing: border-box;
  max-width: calc(100% - 32px);
}

.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.side-panel-header h2 {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}

.event-count {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 8px;
  background: var(--accent-blue);
  color: white;
  font-size: 13px;
  font-weight: 600;
  border-radius: 14px;
}

/* Фильтр радиуса — горизонтальная прокрутка на узких экранах */
.radius-filter {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  overflow-x: auto;
  white-space: nowrap;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}

.radius-filter::-webkit-scrollbar {
  display: none;
}

.pill {
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: transparent;
  color: var(--text-secondary);
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 20px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill:hover {
  border-color: var(--accent-blue);
  color: var(--text-primary);
}

.pill.active {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  color: white;
}

/* Список событий */
.events-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 100%;
  box-sizing: border-box;
}

.event-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  cursor: pointer;
  transition: all var(--transition-fast);
  max-width: 100%;
  box-sizing: border-box;
  word-break: break-word;
}

.event-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.12);
}

.event-card .event-address {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.event-card .event-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.event-card .event-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.event-card .event-distance {
  color: var(--accent-blue);
  font-weight: 600;
}

.event-card .event-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
}

.event-card .event-status.active {
  background: rgba(34, 197, 94, 0.15);
  color: var(--accent-green);
}

.event-card .event-status.confirmed {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

/* ---------- Bottom Sheet ---------- */
.bottom-sheet-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 2000;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.bottom-sheet-overlay.active {
  display: block;
  opacity: 1;
}

.bottom-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2001;
  border-radius: 24px 24px 0 0;
  padding: 12px 20px 32px;
  transform: translateY(100%);
  transition: transform var(--transition-slow);
  max-height: 70vh;
  overflow-y: auto;
}

.bottom-sheet.active {
  transform: translateY(0);
}

.sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 16px;
}

.sheet-content {
  color: var(--text-primary);
}

.sheet-content .sheet-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 4px;
}

.sheet-content .sheet-address {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}

.sheet-content .sheet-stats {
  display: flex;
  gap: 16px;
  margin-bottom: 20px;
}

.sheet-content .stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 20px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
  flex: 1;
}

.sheet-content .stat-value {
  font-size: 20px;
  font-weight: 700;
}

.sheet-content .stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.sheet-content .stat-value.confirm {
  color: var(--accent-green);
}

.sheet-content .stat-value.not-there {
  color: var(--accent-red);
}

.sheet-actions {
  display: flex;
  gap: 10px;
}

.sheet-actions button {
  flex: 1;
  padding: 12px 16px;
  border: none;
  border-radius: 14px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.sheet-actions button:active {
  transform: scale(0.97);
}

.btn-confirm {
  background: var(--accent-green);
  color: white;
}

.btn-confirm:hover {
  background: var(--accent-green-hover);
}

.btn-not-there {
  background: rgba(239, 68, 68, 0.15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, 0.3) !important;
}

.btn-not-there:hover {
  background: rgba(239, 68, 68, 0.25);
}

/* Подсветка активного голоса пользователя (кнопки оценки) */
.rating-btn.like-btn.active-like {
  background: rgba(34, 197, 94, 0.2) !important;
  border-color: rgba(34, 197, 94, 0.6) !important;
  color: #22c55e !important;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.25);
}

.rating-btn.dislike-btn.active-dislike {
  background: rgba(239, 68, 68, 0.2) !important;
  border-color: rgba(239, 68, 68, 0.6) !important;
  color: #ef4444 !important;
  box-shadow: 0 0 12px rgba(239, 68, 68, 0.25);
}

/* ---------- Toast уведомления ---------- */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  z-index: 3000;
  padding: 12px 24px;
  background: var(--bg-glass);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border: var(--glass-border);
  border-radius: 16px;
  color: var(--text-primary);
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--glass-shadow);
  opacity: 0;
  transition: all var(--transition-normal);
  pointer-events: none;
  white-space: nowrap;
}

.toast.active {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.toast.error {
  border-color: rgba(239, 68, 68, 0.4);
  color: var(--accent-red);
}

.toast.success {
  border-color: rgba(34, 197, 94, 0.4);
  color: var(--accent-green);
}

/* ---------- Индикатор загрузки ---------- */
.loading-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 5000;
  background: var(--bg-primary);
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.loading-overlay.active {
  display: flex;
}

.loading-overlay p {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 500;
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Кастомные маркеры Leaflet ---------- */
.dps-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
}

.dps-marker svg {
  width: 36px;
  height: 36px;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.4));
}

/* Пульсация для активных меток */
.dps-marker.pulsing::after {
  content: '';
  position: absolute;
  width: 44px;
  height: 44px;
  background: rgba(59, 130, 246, 0.25);
  border-radius: 50%;
  animation: pulse-ring 2s ease-out infinite;
  z-index: -1;
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.8);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* ---------- Адаптивность ---------- */

/* Планшеты и ПК (ширина > 768px) */
@media (min-width: 768px) {
  .side-panel {
    display: block;
  }

  .bottom-nav {
    display: none;
  }

  .add-btn {
    bottom: 24px;
  }

  .search-container {
    top: 16px;
    left: calc(var(--side-panel-width) + 32px);
    transform: none;
    width: min(calc(100% - var(--side-panel-width) - 80px), 520px);
  }

  .locate-btn {
    top: 80px;
    right: 24px;
  }

  .theme-btn {
    top: 136px;
    right: 24px;
  }

  .toast {
    bottom: 24px;
  }
}

/* Мобильные (ширина < 768px) */
@media (max-width: 767px) {
  .side-panel {
    display: none;
  }

  .bottom-nav {
    display: flex;
  }

  .add-btn {
    bottom: calc(var(--bottom-nav-height) + 16px);
  }

  .search-container {
    width: calc(100% - 32px);
  }

  .locate-btn {
    top: 76px;
    right: 12px;
  }

  .theme-btn {
    top: 132px;
    right: 12px;
  }

  /* Счётчик на мобильных — компактнее, чтобы не перекрывать строку поиска */
  .online-counter {
    top: 68px;
    left: 16px;
    padding: 6px 12px;
    font-size: 12px;
    gap: 6px;
  }

  .online-counter .online-pulse {
    width: 6px;
    height: 6px;
  }
}

/* ---------- Скроллбар ---------- */
::-webkit-scrollbar {
  width: 4px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.25);
}

/* ---------- Анимации появления ---------- */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.search-container,
.locate-btn,
.theme-btn,
.add-btn,
.bottom-nav,
.side-panel {
  animation: fadeInUp 0.4s ease-out;
}

/* ============================================
   МОДАЛЬНОЕ ОКНО «РЕКЛАМОДАТЕЛЯМ»
   ============================================ */
.modal-doc {
  max-width: 640px;
  max-height: 85vh;
  overflow-y: auto;
}

.doc-content {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.7;
}

.doc-content h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
}

.doc-content h3 {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 24px 0 12px;
}

.doc-content p {
  margin: 0 0 12px;
}

.doc-content ul {
  margin: 0 0 16px;
  padding-left: 20px;
}

.doc-content li {
  margin-bottom: 6px;
}

/* Герой-блок */
.advertisers-hero {
  text-align: center;
  padding: 24px 8px 20px;
}

.advertisers-hero-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
  margin-bottom: 16px;
  color: var(--accent-blue);
}

.advertisers-hero h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 12px;
  line-height: 1.3;
}

.advertisers-hero p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  max-width: 480px;
  margin: 0 auto;
}

/* Карточки показателей */
.advertisers-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 24px 0;
}

.advertiser-stat-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 16px;
  text-align: center;
}

.advertiser-stat-card .stat-value {
  font-size: 28px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.1;
}

.advertiser-stat-card .stat-label {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Список преимуществ */
.advertisers-features {
  margin: 16px 0 24px;
  padding: 0;
  list-style: none;
}

.advertisers-features li {
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-secondary);
}

.advertisers-features li:last-child {
  border-bottom: none;
}

.advertisers-features li strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Контакты / Telegram кнопка */
.advertisers-contacts {
  text-align: center;
  padding: 20px 0 8px;
}

.advertisers-contacts p {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.advertisers-telegram-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #2AABEE, #229ED9);
  color: white;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 4px 16px rgba(42,171,238,0.3);
}

.advertisers-telegram-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 24px rgba(42,171,238,0.4);
}

/* Админ-панель: список баннеров */
.admin-ads-list {
  margin-top: 8px;
}

.admin-empty {
  text-align: center;
  padding: 16px;
  color: var(--text-muted);
  font-size: 13px;
}

.ad-item {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
}

.ad-item-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.ad-item-header strong {
  font-size: 13px;
  color: var(--text-primary);
}

.ad-item-stats {
  display: flex;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.ad-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.ad-delete-btn {
  background: none;
  border: none;
  color: var(--accent-red);
  cursor: pointer;
  padding: 4px;
  border-radius: 6px;
  transition: background 0.2s;
}

.ad-delete-btn:hover {
  background: rgba(239,68,68,0.15);
}

.badge-active {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(34,197,94,0.15);
  color: #22c55e;
}

.badge-expired {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(100,116,139,0.15);
  color: #64748b;
}

/* Адаптив для мобильных */
@media (max-width: 600px) {
  .advertisers-stats {
    grid-template-columns: 1fr;
  }

  .advertisers-hero h2 {
    font-size: 18px;
  }

  .modal-doc {
    max-width: 92vw;
    max-height: 80vh;
  }
}

/* ============================================
   УВЕДОМЛЕНИЕ (TOAST)
   ============================================ */

/* Оверлей модального окна */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 4000;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.modal-overlay.active {
  display: flex;
  opacity: 1;
}

/* Карточка модального окна */
.modal {
  position: relative;
  width: min(92%, 440px);
  max-height: 85vh;
  overflow-y: auto;
  padding: 32px 28px 28px;
  border-radius: 24px;
  transform: scale(0.9) translateY(20px);
  transition: transform var(--transition-slow);
}

.modal-overlay.active .modal {
  transform: scale(1) translateY(0);
}

/* Кнопка закрытия */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50%;
  color: var(--text-secondary);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.modal-close:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* Вкладки (Вход / Регистрация) */
.modal-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 24px;
  padding: 4px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
}

.modal-tab {
  flex: 1;
  padding: 10px 16px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 10px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.modal-tab.active {
  background: var(--accent-blue);
  color: white;
}

.modal-tab:hover:not(.active) {
  color: var(--text-secondary);
}

/* Заголовок модального окна */
.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  text-align: center;
}

/* ---------- Формы ---------- */
.auth-form {
  display: none;
  flex-direction: column;
  gap: 16px;
}

.auth-form.active {
  display: flex;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.form-input:focus {
  border-color: var(--accent-blue);
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-select {
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color var(--transition-fast);
}

.form-select:focus {
  border-color: var(--accent-blue);
}

.form-select option {
  background: var(--bg-secondary);
  color: var(--text-primary);
}

.form-error {
  font-size: 13px;
  color: var(--accent-red);
  min-height: 0;
  display: none;
}

.form-error.visible {
  display: block;
}

.form-submit {
  width: 100%;
  padding: 14px 24px;
  border: none;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  color: white;
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast);
}

.form-submit:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}

.form-submit:active {
  transform: scale(0.98);
}

.form-submit.small {
  padding: 10px 16px;
  font-size: 13px;
  width: auto;
}

/* ---------- Профиль ---------- */
.profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.profile-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  border-radius: 50%;
  color: white;
  flex-shrink: 0;
}

.profile-info {
  flex: 1;
  min-width: 0;
}

.profile-name {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-login {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Бейджи */
.profile-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.badge-id {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.badge-role {
  background: rgba(59, 130, 246, 0.15);
  color: var(--accent-blue);
}

.badge-role[data-role="moderator"] {
  background: rgba(139, 92, 246, 0.15);
  color: var(--accent-purple);
}

.badge-role[data-role="admin"] {
  background: rgba(245, 158, 11, 0.15);
  color: var(--accent-orange);
}

/* Статистика профиля */
.profile-stats {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
}

.stat-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 14px;
}

.stat-card .stat-value {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
}

.stat-card .stat-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  text-align: center;
}

/* Кнопка выхода */
.profile-actions {
  margin-bottom: 16px;
}

.btn-logout {
  width: 100%;
  padding: 12px 24px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: var(--accent-red);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 600;
  border-radius: 14px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-logout:hover {
  background: rgba(239, 68, 68, 0.2);
}

/* ---------- Админ-панель ---------- */
.admin-panel {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 16px;
  margin-top: 8px;
}

.admin-section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-orange);
  margin-bottom: 16px;
}

.admin-section {
  margin-bottom: 20px;
}

.admin-subtitle {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.admin-role-form {
  display: flex;
  gap: 8px;
  align-items: center;
}

.admin-ads-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 200px;
  overflow-y: auto;
}

/* Карточка рекламного баннера в админ-панели */
.admin-ad-card {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 14px 16px;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}

.admin-ad-card:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
}

.admin-ad-card .ad-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.admin-ad-card .ad-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.admin-ad-card .ad-title {
  color: var(--text-primary);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}

.admin-ad-card .ad-address {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-ad-card .ad-dates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 11px;
  color: var(--text-muted);
}

.admin-ad-card .ad-dates span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.admin-ad-card .ad-delete-btn {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  background: rgba(239, 68, 68, 0.15);
  border-radius: 8px;
  color: var(--accent-red);
  cursor: pointer;
  transition: background var(--transition-fast);
}

.admin-ad-card .ad-delete-btn:hover {
  background: rgba(239, 68, 68, 0.3);
}

/* Статус активности баннера */
.admin-ad-card .ad-status {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  background: rgba(100, 116, 139, 0.2);
  color: var(--text-muted);
}

.admin-ad-card .ad-status.active {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.admin-ad-card .ad-status.expired {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.admin-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px;
}

/* ---------- Кнопка профиля на карте ---------- */
.profile-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  transition: transform var(--transition-fast), background var(--transition-normal);
}

.profile-btn:hover {
  transform: scale(1.05);
  background: var(--bg-glass-hover);
}

.profile-btn:active {
  transform: scale(0.95);
}

/* Аватарка в кнопке профиля (когда авторизован) */
.profile-btn .profile-btn-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--accent-blue);
}

/* ============================================
   МОДАЛЬНЫЕ ОКНА — ДОКУМЕНТЫ (Соглашение, Политика)
   ============================================ */
.modal-doc {
  max-width: 600px;
  width: 92%;
  max-height: 85vh;
  padding: 28px 24px 24px;
  overflow-y: auto;
}

.modal-doc .modal-title {
  font-size: 22px;
  margin-bottom: 20px;
  text-align: center;
}

.doc-content {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
}

.doc-content h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  margin: 20px 0 10px;
}

.doc-content p {
  margin-bottom: 10px;
}

.doc-content ul {
  margin: 8px 0 12px;
  padding-left: 20px;
}

.doc-content ul li {
  margin-bottom: 6px;
  list-style-type: disc;
}

/* Ссылки на документы в форме регистрации */
.auth-agreement {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  margin-top: -8px;
}

.auth-agreement a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--transition-fast);
}

.auth-agreement a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* Ссылки на документы в профиле */
.profile-docs-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 4px;
  font-size: 12px;
  color: var(--text-muted);
}

.profile-docs-links a {
  color: var(--accent-blue);
  text-decoration: none;
  font-weight: 500;
  transition: opacity var(--transition-fast);
}

.profile-docs-links a:hover {
  opacity: 0.8;
  text-decoration: underline;
}

.docs-separator {
  color: var(--text-muted);
  font-weight: 700;
}

/* ---------- Адаптивность модалок ---------- */
@media (max-width: 480px) {
  .modal {
    padding: 24px 20px 20px;
    width: 95%;
    border-radius: 20px;
  }

  .profile-stats {
    gap: 6px;
  }

  .stat-card {
    padding: 10px 6px;
  }

  .stat-card .stat-value {
    font-size: 18px;
  }

  .admin-role-form {
    flex-direction: column;
  }

  .admin-role-form .form-submit.small {
    width: 100%;
  }
}

@media (min-width: 768px) {
  .profile-btn {
    top: 16px;
    right: 24px;
  }
}

/* ============================================
   Рекламный биллборд (стиль Яндекс Карт)
   ============================================ */
.ad-billboard-container {
    position: relative;
    width: 56px;
    height: 38px;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease;
}

.ad-billboard-container:hover {
    transform: scale(1.1) translateY(-2px);
    z-index: 1000 !important;
}

.ad-billboard-card {
    width: 100%;
    height: 100%;
    background: #1e293b;
    border: 2px solid #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ad-billboard-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ad-billboard-legs {
    position: absolute;
    bottom: -7px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    padding: 0 12px;
    pointer-events: none;
}

.ad-billboard-leg {
    width: 3px;
    height: 7px;
    background: #ffffff;
    border-radius: 0 0 2px 2px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ============================================
   BOTTOM SHEET — ИСТОРИЯ АКТИВНОСТИ
   ============================================ */
.sheet-history {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.history-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.history-loading,
.history-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 12px 0;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.history-item:last-child {
  border-bottom: none;
}

.history-action {
  flex-shrink: 0;
  font-size: 12px;
}

.history-user {
  flex: 1;
  color: var(--text-secondary);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-time {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 11px;
}

/* ============================================
   BOTTOM SHEET — ОЦЕНКА РЕПУТАЦИИ
   ============================================ */
.sheet-rating {
  margin-top: 12px;
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.rating-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.rating-buttons {
  display: flex;
  gap: 8px;
}

.rating-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-family: inherit;
}

.rating-btn:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.2);
}

.rating-btn:active {
  transform: scale(0.96);
}

.like-btn:hover {
  color: var(--accent-green);
  border-color: rgba(34, 197, 94, 0.3);
  background: rgba(34, 197, 94, 0.08);
}

.dislike-btn:hover {
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.08);
}

/* ============================================
   BOTTOM SHEET — АВТОР МЕТКИ
   ============================================ */
.sheet-author {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 4px;
  margin-bottom: 8px;
  padding: 4px 0;
  transition: opacity var(--transition-fast);
}

.sheet-author[data-user-id]:hover {
  opacity: 0.8;
  text-decoration: underline;
}

/* ============================================
   МОДАЛЬНОЕ ОКНО — ПУБЛИЧНЫЙ ПРОФИЛЬ ПОЛЬЗОВАТЕЛЯ
   ============================================ */
.user-profile-modal {
  max-width: 380px;
  width: 90%;
  padding: 24px;
}

.user-profile-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.user-profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: white;
  flex-shrink: 0;
}

.user-profile-info {
  flex: 1;
  min-width: 0;
}

.user-profile-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile-login {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

.user-profile-badges {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.profile-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-secondary);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-badge[data-role="admin"] {
  background: rgba(239, 68, 68, 0.12);
  color: var(--accent-red);
  border-color: rgba(239, 68, 68, 0.2);
}

.profile-badge[data-role="moderator"] {
  background: rgba(139, 92, 246, 0.12);
  color: var(--accent-purple);
  border-color: rgba(139, 92, 246, 0.2);
}

.user-profile-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}

.profile-stat {
  text-align: center;
  padding: 12px 8px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.profile-stat-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.user-profile-activity {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding-top: 12px;
}

.activity-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.activity-loading,
.activity-empty {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding: 16px 0;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 6px 0;
  font-size: 13px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.activity-item:last-child {
  border-bottom: none;
}

.activity-action {
  flex-shrink: 0;
  font-size: 12px;
  white-space: nowrap;
}

.activity-address {
  flex: 1;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-time {
  flex-shrink: 0;
  color: var(--text-muted);
  font-size: 11px;
  white-space: nowrap;
}

/* ---------- PWA Install Banner ---------- */
.pwa-install-banner {
    position: fixed;
    bottom: calc(var(--bottom-nav-height) + 16px);
    left: 50%;
    transform: translateX(-50%);
    width: min(92%, 420px);
    z-index: 2500;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 18px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    animation: fadeInUp 0.4s ease-out;
}

.pwa-banner-content {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.pwa-app-icon img {
    border-radius: 10px;
    display: block;
}

.pwa-banner-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.pwa-banner-text strong {
    font-size: 13px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pwa-banner-text p {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.3;
}

.pwa-install-btn {
    padding: 8px 14px;
    border: none;
    background: var(--accent-blue);
    color: white;
    font-family: inherit;
    font-size: 12px;
    font-weight: 600;
    border-radius: 12px;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--transition-fast);
}

.pwa-install-btn:hover {
    background: var(--accent-blue-hover);
}

.pwa-close-btn {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 22px;
    height: 22px;
    border: none;
    background: rgba(30, 41, 59, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--text-secondary);
    border-radius: 50%;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

@media (min-width: 768px) {
    .pwa-install-banner {
        display: none !important;
    }
}
