/* ===== Гиды Заполярья — стили ===== */

:root {
  --navy: #0d2137;
  --navy-2: #12314f;
  --teal: #17a2a2;
  --teal-dark: #0f7f7f;
  --aurora1: #35d0ba;
  --aurora2: #4f9cf9;
  --bg: #f4f7fa;
  --bg-soft: #eef3f8;
  --card: #ffffff;
  --text: #1c2b3a;
  --muted: #64748b;
  --border: #e2e8f0;
  --star: #f5a623;
  --danger: #e5484d;
  --radius: 14px;
  --shadow: 0 2px 10px rgba(13, 33, 55, 0.08);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* Атрибут hidden обязан побеждать любые display-правила классов
   (иначе flex-строки форм остаются видимыми). */
[hidden] { display: none !important; }

body {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  padding-bottom: 90px; /* место под панель сравнения */
}

.container { max-width: 1180px; margin: 0 auto; padding: 0 20px; }

/* ===== Шапка ===== */
.header {
  background: var(--navy);
  color: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.logo { display: flex; align-items: center; gap: 12px; }
.logo-icon { font-size: 30px; }
.logo-icon-img {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: block;
}
.logo-title { font-weight: 700; font-size: 19px; letter-spacing: .3px; }
.logo-sub { font-size: 12px; color: #9fc3e2; }

.demo-badge {
  font-size: 11px;
  letter-spacing: 1px;
  color: #ffd66b;
  border: 1px solid rgba(255, 214, 107, .5);
  border-radius: 20px;
  padding: 4px 12px;
}

/* ===== Герой ===== */
.hero {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(53, 208, 186, .35), transparent 55%),
    radial-gradient(ellipse at 80% 10%, rgba(79, 156, 249, .35), transparent 50%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 100%);
  color: #fff;
  padding: 44px 0 40px;
}
.hero h1 { font-size: 30px; line-height: 1.25; max-width: 700px; }
.hero-text { margin-top: 12px; color: #cfe3f2; max-width: 620px; }

/* ===== Фильтры ===== */
.filters {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin: -22px auto 0;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.filters-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; }
.filters-controls { gap: 22px; }
.filter-block { display: flex; flex-direction: column; gap: 6px; }
.filter-label { font-size: 13px; color: var(--muted); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  border-radius: 20px;
  padding: 6px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all .15s;
}
.chip:hover { border-color: var(--teal); }
.chip.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

select, input[type="range"] { accent-color: var(--teal); }
select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card);
  font-size: 14px;
  min-width: 140px;
}
.btn-reset {
  margin-left: auto;
  border: none;
  background: none;
  color: var(--danger);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 4px;
}
.btn-reset:hover { text-decoration: underline; }

/* ===== Результаты и сетка ===== */
.results-info {
  margin: 22px 0 14px;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .15s, box-shadow .15s;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(13, 33, 55, .14);
}

.card-banner {
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 54px;
  position: relative;
}
.card-banner .banner-tags {
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.card-banner .cat-tag {
  background: rgba(13, 33, 55, .75);
  color: #fff;
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 12px;
  backdrop-filter: blur(4px);
}
/* Оранжевый бейдж «Демо» на тестовых гидах/турах и на демо-страницах
   /gid//tour (ROADMAP Фаза 1). Спрятать целиком — одна строка:
   .demo-tag { display: none; } */
.demo-tag {
  background: #e8790a;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
}

.card-body { padding: 16px 16px 12px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.card-title-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.card-name { font-size: 17px; font-weight: 700; cursor: pointer; }
.card-name:hover { color: var(--teal-dark); }
/* карточка тура: баннер и название — ссылки на страницу тура */
.card-banner-link { display: block; text-decoration: none; color: inherit; }
.card-name-link { color: inherit; text-decoration: none; }
.card-name-link:hover { color: var(--teal-dark); }
.rating { white-space: nowrap; font-size: 14px; }
.rating .star { color: var(--star); }
.rating .reviews { color: var(--muted); font-size: 12px; }

.card-desc { font-size: 13.5px; color: var(--muted); flex: 1; }

.card-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  font-size: 11.5px;
  background: var(--soft-accent);
  color: var(--teal-dark);
  border-radius: 6px;
  padding: 3px 8px;
}

.card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
}
.price { font-weight: 700; font-size: 16px; }
.price small { color: var(--muted); font-weight: 400; font-size: 12px; }

.compare-check {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}
.compare-check input { accent-color: var(--teal); width: 16px; height: 16px; cursor: pointer; }

/* ===== Пустое состояние ===== */
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty-icon { font-size: 48px; margin-bottom: 10px; }
.empty-hint { font-size: 13px; margin-top: 6px; }

/* ===== Панель сравнения ===== */
.compare-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--navy);
  color: #fff;
  box-shadow: 0 -4px 18px rgba(0,0,0,.3);
  z-index: 60;
  animation: slideUp .25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.compare-bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 20px;
  flex-wrap: wrap;
}
.compare-selected { display: flex; gap: 8px; flex-wrap: wrap; }
.compare-pill {
  background: rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 5px 8px 5px 12px;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.compare-pill button {
  border: none;
  background: rgba(255,255,255,.2);
  color: #fff;
  width: 18px; height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}
.compare-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  border: none;
  border-radius: 8px;
  padding: 10px 22px;
  font-size: 14px;
  cursor: pointer;
}
.btn-primary { background: var(--teal); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--teal-dark); }
.btn-primary:disabled { background: #5c7a8a; cursor: not-allowed; }
.btn-ghost {
  background: none;
  border: none;
  color: #9fc3e2;
  cursor: pointer;
  font-size: 13px;
}
.btn-ghost:hover { color: #fff; }

/* ===== Модалки ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 33, 55, .6);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.modal-overlay[hidden] { display: none; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  max-width: 560px;
  width: 100%;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: pop .18s ease;
}
.modal-wide { max-width: 960px; }
@keyframes pop { from { transform: scale(.96); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 22px;
  border-bottom: 1px solid var(--border);
}
.modal-head h2 { font-size: 19px; }
.modal-close {
  border: none;
  background: var(--soft);
  width: 32px; height: 32px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
}
.modal-close:hover { background: #e2e8f0; }
.modal-body { padding: 20px 22px; overflow-y: auto; overflow-x: hidden; }

/* ===== Таблица сравнения ===== */
.table-scroll { overflow-x: auto; }
.compare-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.compare-table th, .compare-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.compare-table thead th {
  background: var(--navy);
  color: #fff;
  font-size: 15px;
  position: sticky;
  top: 0;
}
.compare-table td:first-child, .compare-table th:first-child {
  background: var(--soft);
  font-weight: 600;
  white-space: nowrap;
}
.compare-table .good { color: #0d8a4f; font-weight: 600; }

/* ===== Профиль гида ===== */
.profile-top {
  display: flex;
  gap: 18px;
  align-items: center;
  margin-bottom: 16px;
}
.profile-avatar {
  width: 84px; height: 84px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  flex-shrink: 0;
}
.profile-stats { display: flex; gap: 16px; flex-wrap: wrap; margin: 14px 0; }
.stat {
  background: var(--soft);
  border-radius: 10px;
  padding: 10px 16px;
  text-align: center;
  min-width: 90px;
}
.stat b { display: block; font-size: 17px; }
.stat span { font-size: 12px; color: var(--muted); }
.profile-section { margin-top: 16px; }
.profile-section h3 { font-size: 15px; margin-bottom: 8px; color: var(--heading); }
.profile-section ul { padding-left: 20px; color: var(--muted); font-size: 14px; }
.profile-contact {
  margin-top: 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.btn-outline {
  border: 1.5px solid var(--teal);
  background: var(--card);
  color: var(--teal-dark);
  border-radius: 8px;
  padding: 9px 18px;
  font-size: 14px;
  cursor: pointer;
  text-decoration: none;
}
.btn-outline:hover { background: var(--soft-accent); }

/* ===== Подвал ===== */
.footer {
  margin-top: 60px;
  background: var(--navy);
  color: #9fc3e2;
  padding: 26px 0;
  font-size: 14px;
}
.footer-note { font-size: 12px; margin-top: 6px; color: #6d8fae; }

/* ===== Адаптив ===== */
@media (max-width: 640px) {
  .hero h1 { font-size: 22px; }
  .filters-controls { gap: 14px; }
  .filter-block { flex: 1 1 45%; }
  .btn-reset { margin-left: 0; flex-basis: 100%; text-align: left; }
  .compare-actions { width: 100%; justify-content: space-between; }
  .modal-head h2 { font-size: 16px; }
  .header-inner { flex-wrap: wrap; gap: 10px; }
  /* на телефоне шапка в 3 ряда ≈168px — липкой её не оставляем: +20% контента на экране */
  .header { position: static; }
}

/* ===== Переключатель языка ===== */
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.lang-switch {
  display: inline-flex;
  gap: 2px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  padding: 3px;
}
.lang-switch button {
  border: none;
  background: transparent;
  color: #cfe3f2;
  font-size: 12.5px;
  padding: 5px 11px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.lang-switch button:hover { color: #fff; }
.lang-switch button.active { background: var(--teal); color: #fff; font-weight: 600; }

/* ===== Слайдеры цены ===== */
.price-range {
  display: flex;
  align-items: flex-end;
  gap: 22px;
  flex-wrap: wrap;
}
.price-range .filter-block input[type="range"] { width: 150px; }

/* ===== Бейдж базы отдыха / турагентства ===== */
.card-base { margin-top: -2px; }
.base-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--navy-2);
  background: rgba(79, 156, 249, .12);
  border-radius: 6px;
  padding: 3px 8px;
  width: fit-content;
}
/* в тёмной теме navy-2 не читается на полупрозрачном синем фоне */
[data-theme="dark"] .base-badge { color: var(--text); }

/* ===== Кнопка бронирования в карточке ===== */
.card-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.btn-book {
  border: none;
  background: var(--teal);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
  white-space: nowrap;
}
.btn-book:hover { background: var(--teal-dark); }

/* ===== Бронирование (модалка) ===== */
.modal-narrow { max-width: 460px; }
.booking-guide { display: flex; align-items: center; gap: 12px; padding: 2px 0 14px; }
.booking-avatar {
  width: 52px; height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  flex-shrink: 0;
}
.booking-name { font-weight: 700; font-size: 16px; }
.booking-price { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

.booking-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}
.booking-form input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
}
.booking-form input:focus {
  outline: 2px solid rgba(23, 162, 162, .3);
  border-color: var(--teal);
}
.form-hint { font-size: 12px; color: var(--muted); }
.form-error { color: var(--danger); font-size: 13px; margin-bottom: 10px; }
.booking-total {
  display: flex;
  justify-content: flex-end;
  align-items: baseline;
  gap: 6px;
  font-size: 15px;
  margin: 4px 0 14px;
}
.booking-total b { font-size: 18px; }
.btn-wide { width: 100%; }

.booking-success { text-align: center; padding: 8px 0 4px; }
.success-icon {
  width: 54px; height: 54px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(53, 208, 186, .15);
  color: var(--teal-dark);
  font-size: 26px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.booking-success h3 { font-size: 18px; color: var(--heading); }
.success-no { color: var(--muted); font-size: 13px; margin: 4px 0 12px; }
.success-summary {
  list-style: none;
  text-align: left;
  margin: 0 auto 14px;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.success-summary li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 14px;
  border-bottom: 1px dashed var(--border);
  padding-bottom: 6px;
}
.success-summary span { color: var(--muted); }

/* ===== Страницы входа и кабинета ===== */
.auth-page { padding-bottom: 40px; }

.logo-link { text-decoration: none; color: #fff; }

.btn-back {
  color: #cfe3f2;
  font-size: 13.5px;
  text-decoration: none;
  white-space: nowrap;
}
.btn-back:hover { color: #fff; }

.btn-guides-link {
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .22);
  font-size: 13px;
  padding: 6px 14px;
  border-radius: 20px;
  text-decoration: none;
  transition: background .15s;
}
.btn-guides-link:hover { background: var(--teal); border-color: var(--teal); }

.auth-wrap { max-width: 640px; padding-top: 34px; }
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 26px 28px;
  margin-bottom: 24px;
}
.auth-title { font-size: 24px; color: var(--heading); }
.auth-subtitle { color: var(--muted); font-size: 14px; margin: 8px 0 18px; }

.tabs {
  display: flex;
  gap: 4px;
  background: var(--soft);
  border-radius: 10px;
  padding: 4px;
  margin-bottom: 18px;
}
.tab {
  flex: 1;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.tab.active { background: var(--card); color: var(--teal-dark); box-shadow: 0 1px 4px rgba(0,0,0,.1); }

.auth-form .form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 13px;
}
.auth-form input, .auth-form select, .auth-form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  width: 100%;
}
.auth-form input:focus, .auth-form select:focus, .auth-form textarea:focus {
  outline: 2px solid rgba(23, 162, 162, .3);
  border-color: var(--teal);
}
.auth-form textarea { resize: vertical; }
.two-cols { flex-direction: row; gap: 12px; }
.two-cols > div { flex: 1; display: flex; flex-direction: column; gap: 6px; }

.link-switch {
  display: block;
  width: 100%;
  margin-top: 12px;
  border: none;
  background: none;
  color: var(--teal-dark);
  font-size: 13.5px;
  cursor: pointer;
}
.link-switch:hover { text-decoration: underline; }

.server-error {
  background: #fdecec;
  border: 1px solid #f5c2c2;
  color: #a33;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13.5px;
  margin-bottom: 14px;
}

.auth-success { text-align: center; padding: 16px 0 8px; }
.auth-success h3 { font-size: 18px; color: var(--heading); margin-bottom: 6px; }
.auth-success .btn { margin-top: 14px; }

/* ===== Кабинет ===== */
.cabinet-note {
  text-align: center;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 40px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-top: 34px;
  color: var(--muted);
}
.cabinet-note a { text-decoration: none; display: inline-block; }

.cabinet-profile h2, .auth-card > h2 { font-size: 17px; color: var(--heading); margin-bottom: 14px; }

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.profile-cell {
  background: var(--soft);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.profile-cell span { font-size: 12px; color: var(--muted); }
.profile-cell b { font-size: 14.5px; font-weight: 600; word-break: break-word; }

.btn-ghost-dark {
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--muted);
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 13.5px;
  cursor: pointer;
}
.btn-ghost-dark:hover { color: var(--danger); border-color: var(--danger); }

.status-badge {
  display: inline-flex;
  align-items: center;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 12px;
  padding: 3px 10px;
  background: #e2e8f0;
  color: var(--muted);
  white-space: nowrap;
}
.status-badge.ok { background: #e0f4ea; color: #0d8a4f; }
.status-badge.wait { background: #fff3d6; color: #b07a0e; }
.status-badge.bad { background: #fdecec; color: var(--danger); }

.cabinet-table th { white-space: nowrap; }
.cabinet-table td { font-size: 13.5px; }
.cabinet-table .btn-book { margin-top: 6px; font-size: 11.5px; padding: 5px 10px; }
.cabinet-table small { color: var(--muted); }

.cabinet-empty { padding: 18px 0; }
.pay-demo-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--muted);
  background: var(--soft);
  border-radius: 8px;
  padding: 10px 12px;
}
/* ===== Tour Cards ===== */
.tour-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.tour-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.tour-card-name {
  font-weight: 600;
  font-size: 1rem;
  color: var(--text);
}
.tour-card-price {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--teal-dark);
  white-space: nowrap;
}
.tour-card-desc {
  margin: 0 0 10px;
  font-size: 0.9rem;
  color: var(--muted);
  line-height: 1.4;
}
.tour-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}
.tour-includes {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.tour-include-item {
  display: inline-block;
  background: var(--bg);
  border-radius: 6px;
  padding: 2px 8px;
  margin: 2px 4px 2px 0;
  font-size: 0.82rem;
}
.tour-card .btn-book-tour {
  margin-top: 8px;
  width: 100%;
}
@media (max-width: 640px) {
  .auth-wrap { padding: 20px 14px 0; }
  .auth-card { padding: 20px 16px; }
  .two-cols { flex-direction: column; gap: 0; }
  .profile-grid { grid-template-columns: 1fr; }
}

/* ===== Выбор роли на странице регистрации ===== */
.role-tabs { margin-bottom: 4px; }

/* ===== Кнопки подтверждения/отклонения в таблицах ===== */
.btn-book.ok { background: #0d8a4f; }
.btn-book.ok:hover { background: #0a6b3f; }
.btn-book.bad { background: var(--danger); }
.btn-book.bad:hover { background: #c93a3f; }

/* ===== Календарь занятости ===== */
.cal-hint { margin-bottom: 12px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-size: 15px; color: var(--heading); text-transform: capitalize; }
.cal-nav {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  width: 32px; height: 32px;
  cursor: pointer;
  font-size: 16px;
  color: var(--text);
}
.cal-nav:hover { border-color: var(--teal); color: var(--teal-dark); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-weekday { text-align: center; font-size: 11.5px; color: var(--muted); padding-bottom: 4px; }
.cal-cell {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 8px;
  font-size: 13px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  min-height: 38px;
  font-family: inherit;
  transition: border-color .15s, background .15s;
}
.cal-cell.empty { border: none; background: none; cursor: default; }
.cal-cell.free:hover { border-color: var(--teal); }
.cal-cell.blocked { background: var(--soft); color: var(--muted); text-decoration: line-through; }
.cal-cell.booked { background: #fff3d6; border-color: #f0d48a; color: #b07a0e; cursor: default; font-weight: 600; }
.cal-cell.past { opacity: .45; cursor: default; }
.cal-cell.has-slots { background: #e8f1fb; border-color: #9fc3e2; }
.cal-cell.selected { outline: 2px solid var(--teal); outline-offset: 1px; }
.cal-legend i.has-slots { background: #e8f1fb; border-color: #9fc3e2; }

/* ===== Панель дня календаря (слоты) ===== */
.day-panel {
  margin-top: 14px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
}
.day-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.day-panel-head b { font-size: 15px; color: var(--heading); text-transform: capitalize; }
.day-slots { display: flex; flex-direction: column; gap: 8px; }
.slot-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--teal);
  background: var(--card);
  color: var(--teal-dark);
  border-radius: 20px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
}
.slot-chip.booked {
  background: #fff3d6;
  border-color: #f0d48a;
  color: #b07a0e;
}
.slot-chip button {
  border: none;
  background: rgba(229, 72, 77, .12);
  color: var(--danger);
  width: 18px; height: 18px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 11px;
  line-height: 1;
}
.slot-add { display: flex; gap: 10px; align-items: center; }
.slot-add input[type="time"] {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
}
.cal-legend { display: flex; gap: 16px; margin-top: 12px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; border: 1px solid var(--border); }
.cal-legend i.free { background: var(--card); }
.cal-legend i.blocked { background: var(--soft); }
.cal-legend i.booked { background: #fff3d6; border-color: #f0d48a; }

@media (max-width: 640px) {
  .cal-grid { gap: 4px; }
  .cal-cell { min-height: 34px; font-size: 12px; border-radius: 6px; }
  .cal-legend { gap: 10px; }
}

/* ===== Фото на витрине ===== */
.card-banner.has-photo {
  background-size: cover;
  background-position: center;
}
.card-banner .banner-emoji {
  position: absolute;
  right: 10px; bottom: 8px;
  font-size: 34px;
  background: rgba(13, 33, 55, .55);
  border-radius: 12px;
  padding: 4px 8px;
  backdrop-filter: blur(4px);
}
.rating-new {
  font-size: 12px;
  color: var(--teal-dark);
  background: #e0f4ea;
  border-radius: 12px;
  padding: 3px 10px;
  white-space: nowrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: 8px;
}
.gallery-item {
  border: none;
  padding: 0;
  border-radius: 10px;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  background: var(--soft);
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .2s;
}
.gallery-item:hover img { transform: scale(1.05); }

.tour-photos {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  margin-bottom: 10px;
  padding-bottom: 4px;
}
.tour-photos img {
  height: 84px;
  width: 118px;
  object-fit: cover;
  border-radius: 8px;
  cursor: zoom-in;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

/* ===== Лайтбокс ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(9, 18, 30, .92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 50px rgba(0, 0, 0, .5);
}
.lightbox-close {
  position: absolute;
  top: 18px; right: 18px;
  width: 40px; height: 40px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 17px;
  cursor: pointer;
}
.lightbox-close:hover { background: rgba(255, 255, 255, .25); }
.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px; height: 56px;
  border: none;
  border-radius: 12px;
  background: rgba(255, 255, 255, .12);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}
.lightbox-nav:hover { background: rgba(255, 255, 255, .25); }
.lightbox-nav.prev { left: 18px; }
.lightbox-nav.next { right: 18px; }

/* ===== Редактор экскурсий в кабинете ===== */
.tour-edit {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 12px;
}
.tour-edit h3 { font-size: 14px; color: var(--heading); margin-bottom: 10px; }
.tour-edit-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 10px;
}
.tour-edit label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.tour-edit input, .tour-edit textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
  color: var(--text);
  width: 100%;
}
.tour-edit input:focus, .tour-edit textarea:focus {
  outline: 2px solid rgba(23, 162, 162, .3);
  border-color: var(--teal);
}
.tour-edit input:disabled { background: var(--soft); color: var(--muted); }
.tour-edit-wide { margin-bottom: 10px; }
.tour-edit-wide textarea { resize: vertical; }
.tour-edit-actions { display: flex; gap: 10px; }
.btn-ghost-dark.danger:hover { color: var(--danger); border-color: var(--danger); background: #fff5f5; }
.demo-tours-title { font-size: 15px; color: var(--heading); margin: 18px 0 8px; }

.photo-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.photo-thumb {
  position: relative;
  width: 104px;
  height: 78px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.photo-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.photo-ctrl {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  display: flex;
  justify-content: space-between;
  background: rgba(13, 33, 55, .65);
  opacity: 0;
  transition: opacity .15s;
}
.photo-thumb:hover .photo-ctrl { opacity: 1; }
.photo-ctrl button {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 11px;
  padding: 4px 6px;
  cursor: pointer;
}
.photo-ctrl button:hover { color: #ffd66b; }
.photo-add {
  width: 104px;
  height: 78px;
  border: 2px dashed #b6c6d4;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
  transition: border-color .15s, color .15s;
}
.photo-add:hover { border-color: var(--teal); color: var(--teal-dark); }

/* ===== Переключатель вида: Гиды / Экскурсии ===== */
.view-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px;
  margin: 0;
}
.view-tab {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 7px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.view-tab:hover { color: var(--teal-dark); }
.view-tab.active { background: var(--teal); color: #fff; }

/* Карточка экскурсии в сетке */
.tour-card-view .card-name { font-size: 16px; }
.tour-guide-link {
  display: inline-block;
  width: fit-content;
  font-size: 13px;
  color: var(--teal-dark);
  cursor: pointer;
  border-bottom: 1px dashed rgba(15, 127, 127, .4);
}
.tour-guide-link:hover { color: var(--heading); }
.tour-card-view .price { display: inline-flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .view-tabs { width: 100%; }
  .view-tab { flex: 1; padding: 8px 0; }
}

/* ===== Планшетная точка ===== */
@media (min-width: 641px) and (max-width: 1024px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters-controls { gap: 14px; }
  .price-range { gap: 12px; }
  .price-range .filter-block input[type="range"] { width: 120px; }
  .hero h1 { font-size: 26px; }
  .modal-wide { max-width: 94vw; }
  .tour-edit-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .tour-edit-grid { grid-template-columns: 1fr; }
}

/* ===== Карта региона ===== */
.map-section { margin: 44px 0 10px; }
.map-section h2 { font-size: 22px; color: var(--heading); margin-bottom: 4px; }
.map-section .empty-hint { margin-bottom: 12px; }
#mapBox, #basePickMap {
  height: 420px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  /* position обязателен: без него z-index мёртв, и попапы Leaflet
     вылезают за блок карты под заголовок секции и соседние блоки */
  position: relative;
  z-index: 1;
}
#basePickMap { height: 260px; margin-bottom: 10px; }
.map-pin {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px; height: 34px;
  font-size: 20px;
  background: var(--card);
  border: 2px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(13, 33, 55, .3);
}
.leaflet-container { font: inherit; }

/* ===== Переключатель валюты ===== */
.cur-switch { margin-right: 2px; }
.cur-switch button { min-width: 34px; }

/* ===== Промокод в форме брони ===== */
.promo-row .promo-input { display: flex; gap: 8px; }
.promo-input input {
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  flex: 1;
  text-transform: uppercase;
}
.promo-hint { display: block; margin-top: 6px; }
.booking-old { color: var(--muted); font-size: 0.9em; margin-right: 4px; }
.booking-cancel-policy { margin: -6px 0 12px; }
.tour-card-prices { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.tour-card-old { color: var(--muted); font-size: 0.85em; }

/* ===== Отзывы ===== */
.review-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.review-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-head .stars { color: var(--star); letter-spacing: 2px; }
.review-head b { font-size: 14px; }
.review-head small { color: var(--muted); margin-left: auto; }
.review-text { margin: 8px 0 0; font-size: 14px; }
.review-reply {
  margin-top: 8px;
  background: var(--soft-accent);
  border-left: 3px solid var(--teal);
  border-radius: 0 8px 8px 0;
  padding: 8px 10px;
  font-size: 13.5px;
}
.reply-form { margin-top: 8px; display: flex; flex-direction: column; gap: 8px; }
.reply-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13.5px;
  font-family: inherit;
  resize: vertical;
}
.reply-form textarea:focus { outline: 2px solid rgba(23, 162, 162, .3); border-color: var(--teal); }
.reply-form .btn-book { align-self: flex-start; }

/* Форма отзыва в кабинете туриста */
.review-form {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  padding: 6px 2px;
}
.review-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.review-form select, .review-form textarea {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.review-form .rf-text { flex: 1 1 260px; }
.review-form textarea { width: 100%; resize: vertical; }
.review-form-row td { background: var(--bg); }

/* ===== Мои базы в кабинете ===== */
.my-base-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 14px;
  margin-bottom: 8px;
  font-size: 14px;
}
.my-base-row .base-type {
  color: var(--muted);
  background: var(--soft-accent);
  border-radius: 6px;
  padding: 2px 8px;
  margin-left: 6px;
}
.my-base-row .btn-ghost-dark { padding: 6px 12px; font-size: 12.5px; }

/* ===== Группа B: статистика, чекбоксы included, выплаты ===== */
.auth-card .profile-stats { margin: 6px 0 10px; }
.balance-row {
  background: var(--soft-accent);
  border: 1px solid var(--teal);
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 15px;
  margin-bottom: 8px;
}
.includes-box { margin: 8px 0; }
.includes-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin: 6px 0;
}
.check-row {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  cursor: pointer;
}
.check-row input { accent-color: var(--teal); }
.inc-other {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
  box-sizing: border-box;
}
.payout-field {
  border: none;
  margin: 10px 0;
  padding: 0;
}
.payout-field legend {
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  padding: 0;
}
.payout-field .check-row { display: flex; margin-bottom: 4px; }

/* ===== Группа C: попап экскурсий на карте ===== */
/* пункт попапа — ссылка на страницу экскурсии (правка владельца 2026-09-07) */
.map-exc-item {
  display: block;
  padding: 4px 0;
  font-size: 13.5px;
  border-bottom: 1px solid #e2e8f0;
  text-decoration: none;
  color: inherit;
}
.map-exc-item:hover { color: var(--teal-dark); }
.map-exc-item:last-of-type { border-bottom: none; }
.map-exc-title { display: block; font-weight: 600; margin-bottom: 4px; }
/* много экскурсий в одном месте — список скроллится внутри попапа, не выпадая из карты */
#mapBox .leaflet-popup-content { max-height: 300px; overflow-y: auto; }

/* ===== Админ-панель (admin.html) ===== */
.admin-key-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}
.admin-key-row input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}
.admin-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.admin-head h2 { margin: 0; }
.admin-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.admin-controls select {
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--card);
}
.admin-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}
.admin-status.st-pending { background: #fff4d6; color: #8a6100; }
.admin-status.st-active { background: #dcf7ea; color: #0c7a4d; }
.admin-status.st-blocked { background: #fde2e2; color: #b42318; }

/* ===== Фото в кабинете: счётчик и обложка ===== */
.photo-count {
  align-self: center;
  font-size: 12.5px;
  color: var(--muted);
  white-space: nowrap;
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
}
.photo-thumb { position: relative; }
.photo-cover-badge {
  position: absolute;
  left: 4px;
  top: 4px;
  background: rgba(13, 33, 55, 0.85);
  color: #ffd66b;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  pointer-events: none;
}
.photo-thumb.is-cover img { outline: 2px solid #f5a623; outline-offset: -2px; }
.photo-ctrl button[data-cover] { color: #b8860b; font-size: 13px; }

/* ===== Бейдж лицензии и блок лицензии в кабинете ===== */
.license-badge {
  display: inline-block;
  background: #dcf7ea;
  color: #0c7a4d;
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  margin-top: 4px;
}
.license-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 6px;
}
.license-controls input[type="text"] {
  flex: 1;
  min-width: 200px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
}
.license-upload-btn { cursor: pointer; }
.license-photo-link { font-size: 13.5px; }

/* Подсказка режима «только по слотам» в календаре */
.manual-mode-hint {
  background: #fff4d6;
  border: 1px solid #f0d48a;
  border-radius: 8px;
  padding: 8px 12px;
}

/* Баннер «профиль на модерации» в кабинете */
.moderation-banner {
  background: #e8f1fb;
  border: 1px solid #b7d3f0;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.moderation-banner p { margin: 0; color: #1b4f8a; }

/* Строка Telegram в редактировании профиля */
.telegram-note { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.telegram-note .btn-ghost-dark { flex-shrink: 0; }

/* ===== Блог (blog.html) и виджет на витрине ===== */
.blog-item {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.blog-item:last-child { border-bottom: none; }
.blog-item-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark, #0d2137);
  text-decoration: none;
}
.blog-item-title:hover { text-decoration: underline; }
.blog-item-excerpt { margin: 6px 0 4px; color: var(--muted); font-size: 14px; }
.blog-date { color: var(--muted); font-size: 12.5px; margin: 4px 0 0; }
.blog-article .blog-back a { text-decoration: none; font-size: 14px; }
.blog-article .blog-title { margin: 8px 0 2px; }
.blog-content { margin-top: 14px; line-height: 1.65; }
.blog-content h3 { margin: 20px 0 8px; }
.blog-content h4 { margin: 16px 0 6px; }
.blog-content ul { padding-left: 22px; }

.blog-widget { margin: 26px 0; }
.blog-widget > h2 { margin-bottom: 10px; }
.blog-widget-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}
.blog-widget-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  text-decoration: none;
  color: inherit;
}
.blog-widget-card:hover { border-color: var(--teal, #35d0ba); }
.blog-widget-excerpt { color: var(--muted); font-size: 13.5px; }
.blog-widget-more { color: var(--teal, #1b6fa8); font-size: 13.5px; font-weight: 600; }

/* Строки статей в админке */
.article-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.article-row:last-child { border-bottom: none; }

/* ===== Карты маршрута: редактор в кабинете и показ на витрине ===== */
#routeMapBox, #routeShowMap {
  height: 420px;
  border-radius: 12px;
  border: 1px solid var(--border);
}
.route-editor-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}
.route-points-counter {
  font-size: 13px;
  color: var(--muted);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
}
.tour-card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin-top: 10px;
}

/* Нумерованные перетаскиваемые точки маршрута (редактор в кабинете) */
.route-point {
  background: none;
}
.route-point span {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #0d2137;
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  border: 2px solid #35d0ba;
  box-shadow: 0 1px 4px rgba(0,0,0,0.4);
  cursor: grab;
}
.route-point span:active { cursor: grabbing; }

/* ===== Волна UX: онбординг, бейдж заявок, пагинация ===== */
.onboarding-hint {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #eefaf3;
  border: 1px solid #b9e6cd;
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 14px;
}
.onboarding-hint p { margin: 0; color: #14683f; }

.bookings-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.bookings-head h2 { margin: 0; }
.new-bookings-badge {
  display: inline-block;
  min-width: 22px;
  text-align: center;
  background: #e5484d;
  color: #fff;
  font-size: 12.5px;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 7px;
  vertical-align: middle;
}

.show-more-btn {
  display: block;
  margin: 18px auto 6px;
}

/* Обязательные поля: красная звёздочка */
.req::after {
  content: " *";
  color: #e5484d;
  font-weight: 700;
}

/* Теги «не включено» на витрине */
.tag.tag-notinc {
  background: #fdecec;
  color: #b42318;
}

/* Волна A: чекбокс показа маршрута, «не включено» в профиле */
.route-show-check { margin: 10px 0 0; }
.tour-not-included { color: #b42318; }

/* Волна B: слоты по турам в панели дня */
.slot-add { flex-wrap: wrap; }
.slot-add select { max-width: 220px; }
.slot-add input[type="search"] { max-width: 150px; }
.slot-tour-badge {
  font-size: 11px;
  color: #1b4f8a;
  background: #e8f1fb;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
  white-space: nowrap;
}

/* ===== Волна 1: hero с фото, «почему мы», «популярно зимой» ===== */
.hero-photo {
  position: relative;
  min-height: 380px;
  display: flex;
  align-items: center;
  overflow: hidden;
  color: #fff;
}
.hero-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(180deg, rgba(13,33,55,0.30) 0%, rgba(13,33,55,0.55) 60%, rgba(13,33,55,0.85) 100%);
}
.hero-content { position: relative; z-index: 2; padding-top: 26px; padding-bottom: 26px; }
.hero-photo h1 { text-shadow: 0 2px 14px rgba(0,0,0,0.55); }
.hero-photo .hero-text { color: #e8eef5; text-shadow: 0 1px 8px rgba(0,0,0,0.6); }
.hero-photo .view-tab { background: rgba(255,255,255,0.14); color: #fff; border: 1px solid rgba(255,255,255,0.35); }
.hero-photo .view-tab.active { background: var(--card); color: #0d2137; border-color: #fff; }

.why-us { padding: 12px 0 2px; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.why-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card);
}
.why-card b { font-size: 14px; }
.why-card span:last-child { font-size: 12.5px; }
.why-icon { font-size: 26px; }
.why-card span:last-child { color: var(--muted); font-size: 13.5px; line-height: 1.45; }

.popular { padding: 18px 0 4px; }
.popular h2 { margin-bottom: 10px; }
.popular-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; }
.popular-tile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 14px;
  text-decoration: none;
  color: #fff;
  background: linear-gradient(130deg, #12314f, #1b6fa8);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.popular-tile:nth-child(2) { background: linear-gradient(130deg, #0f5c5a, #35d0ba); }
.popular-tile:nth-child(3) { background: linear-gradient(130deg, #4a2f7b, #a78bfa); }
.popular-tile:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(13,33,55,0.25); }
.popular-emoji { font-size: 28px; }
.popular-tile span:last-child { font-size: 13px; opacity: 0.85; }

/* Мобильные карточки вместо широкой таблицы заявок */
@media (max-width: 720px) {
  .cabinet-table thead { display: none; }
  .cabinet-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px 10px;
    padding: 10px 12px;
    margin-bottom: 10px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg);
  }
  .cabinet-table td {
    display: flex;
    flex-direction: column;
    border: none;
    padding: 2px 0;
    font-size: 13.5px;
  }
  .cabinet-table td::before {
    content: attr(data-col);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--muted);
  }
  .cabinet-table td:last-child,
  .cabinet-table td:nth-last-child(2) { grid-column: 1 / -1; }
}

/* Поиск по витрине */
.filter-search input[type="search"] {
  width: 100%;
  max-width: 340px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
}

/* ===== Волна 2: мобильный UX ===== */

/* Описание в карточке — 3 строки, полное на странице тура */
.card-desc {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Кнопка-переключатель фильтров (только мобильная) */
.btn-filters-toggle { display: none; }

@media (max-width: 640px) {
  /* Одна колонка карточек — и фикс горизонтального скролла на узких экранах */
  .grid { grid-template-columns: 1fr; gap: 14px; }

  /* Баннер карточки выше — фото видно лучше */
  .card-banner { height: auto; aspect-ratio: 16 / 9; }

  /* Тап-зоны по рекомендации — от 44px */
  .btn-book { min-height: 44px; font-size: 14px; padding: 10px 18px; }
  .compare-check { padding: 8px 4px; min-height: 44px; display: inline-flex; align-items: center; }
  .btn-reset { min-height: 44px; }
  .filter-search input[type="search"] { min-height: 44px; }
  select { min-height: 44px; }

  /* Hero компактнее — до карточек меньше скролла */
  .hero-photo { min-height: 260px; }
  .hero-content { padding-top: 20px; padding-bottom: 20px; }
  .hero-text { font-size: 14px; }
  .why-grid { grid-template-columns: 1fr; gap: 10px; }
  .popular-grid { grid-template-columns: 1fr; }

  /* Сворачиваемые фильтры: всё, кроме поиска, скрыто за кнопкой */
  .btn-filters-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    justify-content: center;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 600;
    cursor: pointer;
    margin-bottom: 10px;
  }
  .btn-filters-toggle::before { content: "⚙️"; }
  .filters-collapsed .filters-row > *:not(.filter-search) { display: none; }
  .filters-collapsed #tourFilters { display: none; }
  .filters-collapsed .filters-row .filter-block:not(.filter-search) { display: none; }
  .filters-collapsed .filter-search { flex-basis: 100%; }
  .filters-count {
    background: var(--teal);
    color: #fff;
    border-radius: 999px;
    font-size: 12px;
    padding: 1px 8px;
  }
}

.tag-more { background: #eef4fa; color: var(--muted); cursor: help; white-space: nowrap; }

/* ===== Тосты (toast.js) ===== */
#toast-host {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(94vw, 420px);
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #0d2137;
  color: #fff;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 10px 26px rgba(13, 33, 55, .35);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .22s ease, transform .22s ease;
  cursor: pointer;
  word-break: break-word;
}
.toast-in { opacity: 1; transform: translateY(0); }
.toast-out { opacity: 0; transform: translateY(6px); }
.toast-ok { border-left: 4px solid #35d0ba; }
.toast-err { border-left: 4px solid #e5484d; background: #3d1420; }
.toast-close {
  margin-left: auto;
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
}

/* Согласие на обработку ПДн (форма брони и регистрации) */
.consent-row { display: flex; gap: 10px; align-items: flex-start; margin: 8px 0; }
.consent-row input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; }
.consent-row span { font-size: 13px; color: var(--muted); line-height: 1.45; }
.consent-row a { color: var(--teal-dark); }

/* ===== Онбординг-чеклист в кабинете гида ===== */
.onboarding-card { border-left: 4px solid var(--teal); }
.ob-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.ob-head h2 { font-size: 18px; margin: 0 0 10px; }
.ob-close {
  border: none; background: transparent; font-size: 20px; line-height: 1;
  color: var(--muted); cursor: pointer; padding: 4px 8px; border-radius: 8px;
}
.ob-close:hover { background: #eef4fa; color: var(--heading); }
.ob-progress { height: 10px; background: #e6edf5; border-radius: 999px; overflow: hidden; }
.ob-bar { height: 100%; width: 0; background: linear-gradient(90deg, #35d0ba, #1b6fa8); transition: width .4s ease; border-radius: 999px; }
.ob-percent { display: inline-block; margin: 6px 0 10px; color: var(--teal-dark); font-size: 14px; }
.ob-list { list-style: none; margin: 0; padding: 0; }
.ob-list li {
  display: flex; align-items: center; gap: 10px; padding: 9px 0;
  border-top: 1px solid var(--border); flex-wrap: wrap;
}
.ob-list li:first-child { border-top: none; }
.ob-mark {
  width: 26px; height: 26px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: #eef4fa; color: var(--muted);
}
.ob-done .ob-mark { background: var(--teal); color: #fff; }
.ob-done .ob-label { color: var(--muted); text-decoration: line-through; }
.ob-label { flex: 1; font-size: 14.5px; }
.ob-go { min-height: 36px; font-size: 13px; }
@media (max-width: 640px) { .ob-go { width: 100%; } }

/* ===== Панель массового открытия слотов ===== */
.batch-panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  margin: 12px 0;
  background: #f8fbfe;
}
.batch-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.batch-days { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.batch-fields { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.batch-fields label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.batch-fields input { border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: inherit; }
#batchTimes { min-width: 160px; }
.batch-fields .btn { min-height: 40px; }
@media (max-width: 640px) { .batch-fields .btn { width: 100%; } .batch-fields input { min-height: 40px; } }

/* ===== ИИ-кнопки в формах и профильные действия ===== */
.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 10px 0; }
.ics-box { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ics-link { font-size: 13px; color: var(--teal-dark); }
.ai-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.ai-btn { min-height: 36px; font-size: 13px; }
.ai-badge { font-size: 12px; color: var(--teal-dark); font-weight: 700; }

/* ===== Плавающий помощник туриста (assistant.js) ===== */
.asst-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(130deg, #1b6fa8, #35d0ba);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(13, 33, 55, .35);
  z-index: 110;
  transition: transform .15s ease;
}
.asst-fab:hover { transform: scale(1.06); }
.asst-panel {
  position: fixed;
  right: 16px;
  bottom: 80px;
  width: min(94vw, 360px);
  height: min(70vh, 480px);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(13, 33, 55, .3);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 111;
}
.asst-head {
  display: flex; justify-content: space-between; align-items: center;
  background: #0d2137; color: #fff; padding: 10px 14px; font-size: 14.5px;
}
.asst-close { border: none; background: transparent; color: #fff; font-size: 18px; cursor: pointer; }
.asst-body { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.asst-msg { max-width: 85%; padding: 8px 12px; border-radius: 12px; font-size: 14px; line-height: 1.45; word-break: break-word; }
.asst-msg p { margin: 0 0 6px; } .asst-msg p:last-child { margin-bottom: 0; }
.asst-msg ul { margin: 4px 0; padding-left: 18px; }
.asst-user { align-self: flex-end; background: #0d2137; color: #fff; border-bottom-right-radius: 4px; }
.asst-assistant { align-self: flex-start; background: var(--card); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.asst-wait { color: var(--muted); letter-spacing: 3px; }
.asst-chips { display: flex; flex-wrap: wrap; gap: 6px; align-self: flex-start; max-width: 95%; }
.asst-chip {
  border: 1px solid var(--border); background: var(--card); color: var(--text);
  border-radius: 14px; padding: 6px 11px; font-size: 12.5px; font-family: inherit; cursor: pointer;
}
.asst-chip:hover { border-color: var(--teal); color: var(--teal); }
.asst-feedback { display: flex; gap: 2px; align-self: flex-start; margin-top: -4px; }
.asst-feedback button {
  border: none; background: transparent; font-size: 13px; cursor: pointer;
  opacity: .55; padding: 2px 5px; border-radius: 6px;
}
.asst-feedback button:hover:not(:disabled) { opacity: 1; background: var(--bg-soft); }
.asst-feedback button:disabled { cursor: default; opacity: .5; }
.asst-feedback button.voted { opacity: 1; background: var(--bg-soft); }
.asst-input-row { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--border); background: var(--card); }
.asst-input { flex: 1; border: 1px solid var(--border); border-radius: 10px; padding: 9px 12px; font-family: inherit; font-size: 14px; min-height: 42px; }
.asst-send { border: none; background: var(--teal); color: #fff; border-radius: 10px; padding: 0 14px; min-height: 42px; font-weight: 600; cursor: pointer; }
.asst-send:disabled { opacity: .6; }
@media (max-width: 640px) { .asst-panel { right: 8px; left: 8px; width: auto; } }

/* ===== Визард регистрации ===== */
.wiz-progress { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.wiz-step-dot {
  width: 28px; height: 28px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; background: #e6edf5; color: var(--muted);
}
.wiz-step-dot.active { background: var(--teal); color: #fff; }
.wiz-step-dot.passed { background: #bfe9e1; color: var(--teal-dark); }
.wiz-line { flex: 1; height: 2px; background: #e6edf5; }
.wiz-label { margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.wiz-actions { display: flex; gap: 10px; justify-content: space-between; margin-top: 6px; }
.wiz-actions .btn { flex: 1; min-height: 46px; }
.pw-meter { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.pw-meter i { display: block; height: 6px; flex: 1; border-radius: 999px; background: #e6edf5; position: relative; overflow: hidden; }
.pw-meter i::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 25%; border-radius: 999px; transition: width .3s ease, background .3s ease; }
.pw-meter[data-level="0"] i::after { width: 25%; background: #e5484d; }
.pw-meter[data-level="1"] i::after { width: 50%; background: #f5a623; }
.pw-meter[data-level="2"] i::after { width: 75%; background: #8bc34a; }
.pw-meter[data-level="3"] i::after { width: 100%; background: var(--teal); }
.pw-meter span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.next-steps { text-align: left; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; margin: 12px 0; }
.next-steps ol { margin: 8px 0 0; padding-left: 20px; }
.next-steps li { margin: 6px 0; font-size: 14px; }

/* ===== Timeline брони (кабинет гостя) ===== */
.timeline-row td { padding-top: 0; background: #fafcff; }
.bk-timeline { padding: 6px 2px; }
.tl-steps { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tl-step {
  font-size: 12px; padding: 4px 10px; border-radius: 999px;
  background: #eef4fa; color: var(--muted); border: 1px solid var(--border);
}
.tl-step.tl-ok { background: var(--teal); border-color: var(--teal); color: #fff; font-weight: 600; }
.tl-arrow { color: var(--muted); font-size: 12px; }
.tl-hint { display: block; margin-top: 6px; color: var(--teal-dark); font-size: 12.5px; }
.bk-timeline.declined { color: #b3392f; font-size: 13px; }

.coords-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.coords-row input { width: 110px; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-family: inherit; }

/* ===== Виджет погоды и сияния (страница тура) ===== */
.tp-weather { padding: 14px 16px; }
.wx-current { display: flex; gap: 14px; align-items: center; }
.wx-emoji { font-size: 30px; }
.wx-emoji.big { font-size: 44px; }
.wx-temp { font-size: 24px; font-weight: 800; }
.wx-line { color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.wx-forecast { margin-top: 12px; }
.wx-days { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 6px; }
.wx-day {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; padding: 8px;
  font-size: 13px;
}
.wx-day b { font-size: 12px; color: var(--muted); }
.wx-aurora {
  margin-top: 12px; padding: 10px 12px; border-radius: 10px;
  background: #eef6ff; border-left: 4px solid #4f9cf9; font-size: 14px;
}
.wx-aurora p { margin: 4px 0 0; color: #3c4c5e; font-size: 13px; }
.wx-aurora.prob-high { background: #e9f9f4; border-color: #0c7a4d; }
.wx-aurora.prob-medium { background: #eef6ff; border-color: #4f9cf9; }
.wx-aurora.prob-low { background: #fdf3e7; border-color: #f5a623; }
.wx-aurora.prob-none { background: #f4f5f7; border-color: #9aa7b5; }
.wx-prob { display: inline-block; margin-left: 8px; font-weight: 700; }
.wx-aurora small { display: inline-block; margin-left: 8px; color: var(--muted); }
.wx-source { display: block; margin-top: 10px; color: var(--muted); font-size: 11px; }
[data-theme="dark"] .wx-day { background: #16283c; }
[data-theme="dark"] .wx-aurora { background: #16283c; }
[data-theme="dark"] .wx-aurora.prob-high { background: #0e2e24; }
[data-theme="dark"] .wx-aurora.prob-medium { background: #0f2337; }
[data-theme="dark"] .wx-aurora.prob-low { background: #2e2410; }
[data-theme="dark"] .wx-aurora.prob-none { background: #1d2530; }

/* ----- Kp-прогноз: ячейки в виджете погоды и карточка на витрине ----- */
.wx-kp-strip { margin-top: 8px; }
.wx-kp-title { display: block; margin: 0 0 2px; color: var(--muted); font-size: 11px; }
.wx-kp { font-weight: 700; font-size: 15px; }
.wx-kp.kp-high { color: #0c7a4d; }
.wx-kp.kp-medium { color: #2f7fd0; }
.wx-kp.kp-low { color: #e08c00; }
.wx-kp.kp-none, .wx-kp.kp-unknown { color: var(--muted); }
.aurora-section { margin: 0 0 18px; }
.aurora-card {
  padding: 14px 16px; border-radius: 12px; background: var(--card);
  border: 1px solid var(--border); border-left: 4px solid #4f9cf9; box-shadow: var(--shadow);
}
.aurora-card.prob-high { border-left-color: #0c7a4d; }
.aurora-card.prob-medium { border-left-color: #4f9cf9; }
.aurora-card.prob-low { border-left-color: #f5a623; }
.aurora-card.prob-none, .aurora-card.prob-unknown { border-left-color: #9aa7b5; }
.aurora-head {
  display: flex; gap: 8px 14px; flex-wrap: wrap;
  align-items: baseline; justify-content: space-between;
}
.aurora-head span { color: var(--muted); font-size: 13px; }
.aurora-days { margin-top: 10px; }
[data-theme="dark"] .wx-kp.kp-high { color: #4fd1a5; }
[data-theme="dark"] .wx-kp.kp-medium { color: #7db8ff; }
[data-theme="dark"] .wx-kp.kp-low { color: #ffb84f; }
[data-theme="dark"] .aurora-card .wx-day { background: var(--bg-soft); }

/* ===== Тёмная тема (переключатель ☀️/🌙, theme.js) ===== */
[data-theme="dark"] {
  --bg: #0b1420;
  --bg-soft: #0e1b2a;
  --card: #121f30;
  --text: #dce7f2;
  --muted: #8fa3b8;
  --border: #24344a;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
  color-scheme: dark;
}
[data-theme="dark"] body { background: var(--bg); }
[data-theme="dark"] .card,
[data-theme="dark"] .auth-card,
[data-theme="dark"] .modal,
[data-theme="dark"] .filters,
[data-theme="dark"] .why-card,
[data-theme="dark"] .review-item,
[data-theme="dark"] .batch-panel,
[data-theme="dark"] .onboarding-card,
[data-theme="dark"] .next-steps,
[data-theme="dark"] .article-row,
[data-theme="dark"] .blog-card,
[data-theme="dark"] .tour-edit { background: var(--card); }
[data-theme="dark"] .filter-search input[type="search"],
[data-theme="dark"] select,
[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="number"],
[data-theme="dark"] input[type="tel"],
[data-theme="dark"] input[type="email"],
[data-theme="dark"] input[type="date"],
[data-theme="dark"] input[type="time"],
[data-theme="dark"] input[type="search"],
[data-theme="dark"] textarea { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .chip,
[data-theme="dark"] .btn-ghost-dark,
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .tab.active,
[data-theme="dark"] .wiz-step-dot,
[data-theme="dark"] .ob-mark,
[data-theme="dark"] .cal-cell,
[data-theme="dark"] .tag,
[data-theme="dark"] .wx-day,
[data-theme="dark"] .tp-free-slot { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .tab.active,
[data-theme="dark"] .chip.active { background: var(--teal); color: #fff; border-color: var(--teal); }
[data-theme="dark"] .tl-step { background: var(--bg-soft); color: var(--muted); border-color: var(--border); }
[data-theme="dark"] .tl-step.tl-ok { background: var(--teal); color: #fff; }
[data-theme="dark"] .rating { color: var(--text); }
[data-theme="dark"] .card-desc,
[data-theme="dark"] .profile-cell span,
[data-theme="dark"] .empty-hint,
[data-theme="dark"] .form-hint { color: var(--muted); }
[data-theme="dark"] .status-badge { background: var(--bg-soft); }
[data-theme="dark"] .cal-day-today { outline-color: var(--teal); }
[data-theme="dark"] .asst-panel { background: var(--card); }
[data-theme="dark"] .asst-body { background: var(--bg-soft); }
[data-theme="dark"] .asst-assistant { background: var(--card); color: var(--text); }
[data-theme="dark"] .asst-input { background: var(--bg-soft); color: var(--text); border-color: var(--border); }
[data-theme="dark"] .consent-row span { color: var(--muted); }

/* Переключатель темы в шапке */
.theme-toggle {
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .08);
  border-radius: 10px;
  padding: 4px 9px;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.4;
}
.theme-toggle:hover { background: rgba(255, 255, 255, .16); }

/* ===== Волна 3: визуальная полировка (в духе современных лендингов) ===== */

/* Стикеры-аннотации на hero */
.hero-stickers {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 16px;
}
.sticker {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  transform: rotate(-1.5deg);
  box-shadow: 0 4px 14px rgba(13, 33, 55, .3);
}
.sticker:nth-child(2) { transform: rotate(1.2deg); }
.sticker:nth-child(3) { transform: rotate(-0.8deg); }
.st-pink { background: #f472d0; color: #4a0f38; }
.st-teal { background: #35d0ba; color: #053b33; }

/* Pill-кнопки */
.btn,
.btn-primary,
.btn-book,
.btn-guides-link,
.view-tab,
.chip,
.tab {
  border-radius: 999px;
}
.btn-ghost-dark { border-radius: 999px; }

/* Карточки: крупнее радиус + hover-подъём */
.card {
  border-radius: 18px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(13, 33, 55, .18);
}
[data-theme="dark"] .card:hover { box-shadow: 0 14px 30px rgba(0, 0, 0, .5); }

/* «Популярно зимой» — горизонтальная карусель */
.popular-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(240px, 1fr);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 14px;
  padding-bottom: 8px;
}
.popular-tile { scroll-snap-align: start; }
.popular-grid::-webkit-scrollbar { height: 8px; }
.popular-grid::-webkit-scrollbar-thumb { background: var(--border); border-radius: 999px; }
@media (max-width: 640px) {
  .popular-grid { grid-auto-columns: 82%; }
  .hero-stickers .sticker { font-size: 12px; padding: 5px 11px; }
}

.admin-ai-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); flex: 1; min-width: 220px; }

/* Активная вкладка на hero: явное состояние поверх .hero-photo .view-tab */
.hero-photo .view-tab.active {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
}
.hero-photo .view-tab.active:hover { color: #fff; }

/* Оверлей hero: плотный только слева под заголовок, справа радуга читается */
.hero-photo .hero-overlay {
  background: linear-gradient(90deg, rgba(13, 33, 55, .72) 0%, rgba(13, 33, 55, .38) 55%, rgba(13, 33, 55, .22) 100%);
}

/* Hero: держим в кадре радугу (она в верхней левой части фото) */
.hero-photo .hero-bg { object-position: 18% 30%; }

/* ===== Цветовая гигиена: hero-осень, спокойные плитки, контрасты тем ===== */

/* Hero: осенний кадр, фокус на золотой долине, высота скромнее */
.hero-photo .hero-bg { object-position: center 70%; }
.hero-photo { min-height: 340px; }

/* Убираем стикеры (решено: дублируют «Почему мы») */
.hero-stickers, .sticker { display: none; }

/* Плитки «Популярно зимой»: спокойные градиенты одной гаммы */
.popular-tile:first-child { background: linear-gradient(130deg, #16324f, #2a6488); }
.popular-tile:nth-child(2) { background: linear-gradient(130deg, #12444a, #1f8f80); }
.popular-tile:nth-child(3) { background: linear-gradient(130deg, #35315e, #6c5fa8); }
.popular-tile:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(0, 0, 0, 0.30); }

/* Переменные контраста: заголовки и мягкие фоны управляются темой */
:root {
  --heading: #0d2137;
  --soft: #f1f5f9;
  --soft-accent: #eef6f6;
}
[data-theme="dark"] {
  --heading: #dce7f2;
  --soft: #0e1b2a;
  --soft-accent: #0f2622;
}

/* Тёмная тема: семантические плашки (ожидание/проверка) и опасные hover */
[data-theme="dark"] .status-badge.wait,
[data-theme="dark"] .cal-cell.booked,
[data-theme="dark"] .cal-legend i.booked,
[data-theme="dark"] .admin-status.st-pending { background: #2e2510; color: #d9b96a; border-color: #4a3d1a; }
[data-theme="dark"] .btn-ghost-dark.danger:hover { background: #33161a; }
[data-theme="dark"] .admin-status.st-active { background: #0e2e24; }
[data-theme="dark"] .review-form textarea,
[data-theme="dark"] .rf-text-input { background: var(--bg-soft); color: var(--text); }

/* why-card: иконка + текст колонкой */
.why-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.why-text b { font-size: 13.5px; }
.why-text span { font-size: 12px; color: var(--muted); line-height: 1.35; }
.why-icon { font-size: 22px; flex-shrink: 0; }

/* ===== Кабинет: приветствие и якорная навигация ===== */
.cabinet-greet { margin: 4px 0 14px; color: var(--muted); font-size: 15px; }
.cabinet-greet b { color: var(--heading); }
.cabinet-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  gap: 6px;
  overflow-x: auto;
  background: var(--bg);
  padding: 10px 2px;
  margin: 0 -2px 6px;
  border-bottom: 1px solid var(--border);
}
.cabinet-nav a {
  flex-shrink: 0;
  text-decoration: none;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card);
  white-space: nowrap;
}
.cabinet-nav a:hover { color: var(--teal-dark); border-color: var(--teal); }
.auth-wrap section[id] { scroll-margin-top: 64px; }
.auth-wrap > #cabinetContent > section { margin-bottom: 18px; }
.auth-wrap > #cabinetContent > section h2 { font-size: 16.5px; }

/* ===== Календарь: удобства ===== */
.cal-cell { position: relative; }
.cal-cell.today { outline: 2px solid var(--teal); outline-offset: -2px; font-weight: 800; }
.cal-cell.past { opacity: .45; }
.cal-badge {
  position: absolute;
  top: 2px;
  right: 3px;
  font-size: 9.5px;
  font-style: normal;
  font-weight: 700;
  background: var(--teal);
  color: #fff;
  border-radius: 999px;
  padding: 0 5px;
  line-height: 1.5;
}
.cal-cell.booked .cal-badge { background: var(--star); }
.day-hint { margin: 6px 0 2px; }
.day-quick { margin-top: 8px; }
.day-quick .chip { cursor: pointer; }

/* SVG-иконки (вместо эмодзи) */
.ic {
  width: 18px;
  height: 18px;
  vertical-align: -3.5px;
  flex-shrink: 0;
}
.auth-card > h2 .ic { width: 20px; height: 20px; vertical-align: -4px; margin-right: 2px; }
.cabinet-nav .ic { width: 15px; height: 15px; vertical-align: -2.5px; margin-right: 4px; }
.profile-actions .ic { vertical-align: -3px; margin-right: 5px; }
/* контейнерные иконки: бейдж базы, баннер карточки, маркеры карты, аватары, плитки */
.base-badge .ic { width: 14px; height: 14px; vertical-align: -2.5px; }
.banner-emoji .ic { width: 22px; height: 22px; vertical-align: 0; }
.map-pin .ic { width: 18px; height: 18px; }
.map-pin-base .ic { width: 15px; height: 15px; }
.profile-avatar .ic, .booking-avatar .ic, .gp-avatar .ic { width: 32px; height: 32px; }
.popular-emoji .ic { width: 26px; height: 26px; vertical-align: 0; }

/* ===== FAQ (нативные details/summary) ===== */
.faq-wrap { max-width: 820px; }
.faq-wrap h1 { font-size: 30px; margin: 18px 0 6px; }
.faq-intro { color: var(--muted); margin-bottom: 18px; }
.faq-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0 18px;
  margin: 10px 0;
}
.faq-item summary {
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  font-size: 15.5px;
  padding: 14px 34px 14px 0;
  position: relative;
  min-height: 20px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 20px;
  font-weight: 700;
  color: var(--teal);
  transition: transform .15s ease;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item summary:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 8px; }
.faq-a { padding: 0 0 14px; }
.faq-a p { font-size: 14.5px; line-height: 1.6; color: var(--text); margin: 6px 0; }
.faq-cta { text-align: center; margin: 22px 0; }
.faq-cta p { color: var(--muted); margin-bottom: 8px; }

/* ===== Видимый фокус для клавиатуры (все темы) ===== */
:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
.btn:focus-visible, .btn-book:focus-visible { outline-offset: 3px; }

/* ===== «Как это работает» (витрина) ===== */
.how-block { padding: 26px 0 8px; }
.how-block h2 { font-size: 22px; margin-bottom: 16px; }
.how-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.how-step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px;
}
.how-num {
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--teal); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.how-step b { font-size: 15.5px; }
.how-step p { font-size: 13.5px; color: var(--muted); line-height: 1.5; }
.how-more { display: inline-block; margin-top: 14px; color: var(--teal-dark); font-weight: 600; text-decoration: none; }
.how-more:hover { text-decoration: underline; }
@media (max-width: 640px) {
  .how-grid { grid-template-columns: 1fr; gap: 10px; }
  .faq-wrap h1 { font-size: 24px; }
}

/* ===== A11y: видимый фокус (клавиатура) — обе темы ===== */
.btn:focus-visible,
.btn-primary:focus-visible,
.btn-book:focus-visible,
.btn-ghost-dark:focus-visible,
.chip:focus-visible,
.tab:focus-visible,
.view-tab:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.theme-toggle:focus-visible,
.cabinet-nav a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; border-radius: 4px; }
[data-theme="dark"] :is(a, button, input, select, textarea, summary):focus-visible { outline-color: var(--aurora1); }

/* ===== Полоса доверия (товар сразу) ===== */
.trust-strip {
  border-bottom: 1px solid var(--border);
  background: var(--card);
}
.trust-inner {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 26px;
  padding: 10px 20px;
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.trust-item .ic { color: var(--teal-dark); }
[data-theme="dark"] .trust-item .ic { color: var(--aurora1); }

/* На ширинах ≤1024px полоса доверия переносится на 2 строки: базовая подтяжка
   фильтров -22px рассчитана на одну строку и накрывает текст второй */
@media (max-width: 1024px) {
  .filters { margin-top: -6px; }
}

/* «Как это работает» внизу страницы — скромнее */
.how-bottom { padding: 30px 0 10px; }
.how-bottom h2 { text-align: center; }
.how-bottom .how-more { display: none; }
