:root {
  --bg-deep: #062133;
  --bg-mid: #0c4b63;
  --bg-aqua: #1f8a96;
  --gold: #f5b942;
  --gold-dark: #d9911e;
  --coral: #e76f51;
  --text-main: #f4fbff;
  --text-muted: rgba(226, 246, 255, 0.76);
  --glass-bg: rgba(255, 255, 255, 0.11);
  --glass-bg-strong: rgba(11, 45, 66, 0.76);
  --glass-border: rgba(255, 255, 255, 0.22);
  --glass-shadow: 0 18px 45px rgba(2, 18, 30, 0.35);
  --radius-lg: 26px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

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

html, body {
  min-height: 100%;
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-main);
  background: linear-gradient(145deg, var(--bg-deep) 0%, var(--bg-mid) 48%, #157482 100%);
  background-attachment: fixed;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body {
  padding-top: 86px;
  padding-bottom: 118px;
}

/* Фоновые световые сферы для эффекта глубины и стекла */
.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: -1;
  pointer-events: none;
  opacity: 0.55;
}
.orb-1 { width: 380px; height: 380px; background: #2ec4b6; top: -110px; right: -80px; }
.orb-2 { width: 320px; height: 320px; background: #f5b942; bottom: 80px; left: -120px; opacity: 0.26; }
.orb-3 { width: 290px; height: 290px; background: #0096c7; top: 45%; right: 12%; opacity: 0.3; }

/* Эффект матового стекла */
.glass, .glass-card, .glass-modal, .glass-dock {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}

/* Шапка */
.topbar {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 24px);
  max-width: 1120px;
  border-radius: 22px;
  z-index: 50;
  background: rgba(7, 36, 54, 0.58);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.45);
  box-shadow: 0 4px 14px rgba(0,0,0,0.28);
}

.brand-logo-fallback {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1b8a99, #082b40);
  border: 2px solid rgba(255,255,255,0.45);
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

.brand-text { display: flex; flex-direction: column; }
.brand-name {
  font-family: 'Montserrat', sans-serif;
  font-weight: 800;
  font-size: 1.04rem;
  letter-spacing: 0.2px;
  line-height: 1.15;
}
.brand-sub { font-size: 0.74rem; color: var(--text-muted); }

.lang-switch {
  display: flex;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}

.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 0.75rem;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s;
}
.lang-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #082030;
  box-shadow: 0 4px 12px rgba(245, 185, 66, 0.35);
}

/* Контейнер */
.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 12px 16px;
}

.view { display: none; animation: fadeIn 0.28s ease; }
.view.active { display: block; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero */
.hero {
  border-radius: var(--radius-lg);
  padding: 30px 26px;
  margin-bottom: 26px;
  background: linear-gradient(135deg, rgba(255,255,255,0.16) 0%, rgba(16, 98, 114, 0.28) 100%);
  position: relative;
  overflow: hidden;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(245, 185, 66, 0.2);
  border: 1px solid rgba(245, 185, 66, 0.48);
  color: #ffe29d;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.hero-title {
  font-family: 'Montserrat', sans-serif;
  font-size: clamp(1.55rem, 3.6vw, 2.35rem);
  font-weight: 800;
  line-height: 1.18;
  margin-bottom: 12px;
  max-width: 720px;
}

.hero-desc {
  color: var(--text-muted);
  font-size: 0.98rem;
  line-height: 1.55;
  max-width: 650px;
  margin-bottom: 20px;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stat-chip {
  background: rgba(6, 33, 51, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Заголовки секций и категории */
.section-head { margin-bottom: 14px; }
.section-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}
.section-sub { color: var(--text-muted); font-size: 0.92rem; margin-top: 4px; }

.category-bar {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
  margin-bottom: 18px;
  scrollbar-width: none;
}
.category-bar::-webkit-scrollbar { display: none; }

.cat-pill {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: 0.22s;
}
.cat-pill:hover { background: rgba(255, 255, 255, 0.18); }
.cat-pill.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #062133;
  border-color: transparent;
  box-shadow: 0 8px 22px rgba(245, 185, 66, 0.35);
}

/* Сетка карточек */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.tour-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.tour-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 185, 66, 0.55);
  box-shadow: 0 22px 50px rgba(2, 18, 30, 0.45);
}

.tour-media {
  position: relative;
  height: 195px;
  overflow: hidden;
  background: linear-gradient(135deg, #0d5c75, #28a3a3);
}
.tour-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.tour-price-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: rgba(6, 33, 51, 0.72);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.28);
  color: #ffe29d;
  font-weight: 800;
  font-size: 0.95rem;
  padding: 6px 12px;
  border-radius: 999px;
}
.tour-cat-tag {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(255,255,255,0.18);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.28);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 5px 11px;
  border-radius: 999px;
}

.tour-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.tour-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 8px;
  line-height: 1.28;
}
.tour-desc {
  color: var(--text-muted);
  font-size: 0.87rem;
  line-height: 1.5;
  margin-bottom: 14px;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.tour-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.14);
  font-size: 0.83rem;
}
.tour-cta {
  color: var(--gold);
  font-weight: 800;
}

/* Новости */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}
.news-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.22s ease;
  display: flex;
  flex-direction: column;
}
.news-card:hover { transform: translateY(-4px); }
.news-media { height: 170px; overflow: hidden; background: linear-gradient(135deg, #0b4a62, #1e8a94); }
.news-media img { width: 100%; height: 100%; object-fit: cover; }
.news-body { padding: 18px; flex: 1; display: flex; flex-direction: column; }
.news-date { font-size: 0.76rem; color: var(--gold); font-weight: 700; margin-bottom: 6px; }
.news-title { font-family: 'Montserrat', sans-serif; font-size: 1.05rem; font-weight: 800; margin-bottom: 8px; }
.news-excerpt { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }

/* Аккаунт и блоки */
.block-card {
  border-radius: var(--radius-lg);
  padding: 22px;
  margin-bottom: 18px;
}
.block-title {
  font-family: 'Montserrat', sans-serif;
  font-size: 1.12rem;
  font-weight: 800;
  margin-bottom: 10px;
}
.muted-text { color: var(--text-muted); font-size: 0.88rem; line-height: 1.5; }

.bookings-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.booking-item {
  background: rgba(6, 33, 51, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius-md);
  padding: 15px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}
.booking-code { font-family: 'Montserrat', sans-serif; font-weight: 800; color: var(--gold); font-size: 0.92rem; }
.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}
.status-new { background: rgba(245, 185, 66, 0.22); color: #ffe29d; border: 1px solid rgba(245, 185, 66, 0.45); }
.status-confirmed { background: rgba(46, 204, 113, 0.22); color: #9cf5be; border: 1px solid rgba(46, 204, 113, 0.45); }
.status-cancelled { background: rgba(231, 76, 60, 0.22); color: #ffb3aa; border: 1px solid rgba(231, 76, 60, 0.45); }

/* Формы и кнопки */
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.inline-form .glass-input { flex: 1 1 180px; }

.stack-form { display: flex; flex-direction: column; gap: 12px; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.field-label { display: flex; flex-direction: column; gap: 6px; font-size: 0.82rem; font-weight: 700; color: #dff5ff; }

.glass-input, .glass-select, .glass-textarea {
  width: 100%;
  background: rgba(5, 27, 42, 0.56);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius-sm);
  color: #ffffff;
  font-family: inherit;
  font-size: 0.92rem;
  padding: 11px 14px;
  outline: none;
  transition: border-color 0.2s;
}
.glass-input:focus, .glass-select:focus, .glass-textarea:focus {
  border-color: var(--gold);
}
.glass-textarea { min-height: 88px; resize: vertical; }
.glass-select option { background: #0a2d42; color: #fff; }

.btn-primary, .btn-whatsapp, .btn-ghost, .btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.16s, opacity 0.2s;
}
.btn-primary:active, .btn-whatsapp:active { transform: scale(0.98); }
.btn-primary {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #062133;
  box-shadow: 0 8px 20px rgba(245, 185, 66, 0.3);
}
.btn-whatsapp {
  background: linear-gradient(135deg, #25d366, #128c7e);
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(37, 211, 102, 0.28);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.24);
  color: var(--text-main);
}
.btn-danger {
  background: rgba(231, 76, 60, 0.24);
  border: 1px solid rgba(231, 76, 60, 0.5);
  color: #ffd3ce;
}
.btn-sm { padding: 7px 12px; font-size: 0.78rem; border-radius: 10px; }

.support-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.form-error { color: #ffaba1; font-size: 0.84rem; font-weight: 700; min-height: 18px; }
.lookup-result { margin-top: 14px; }

/* НИЖНИЙ ПЛАВАЮЩИЙ ДОКБАР (ОСТРОВОК) */
.dockbar {
  position: fixed;
  bottom: max(16px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 999px;
  background: rgba(6, 32, 49, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.26);
  box-shadow: 0 18px 40px rgba(0, 12, 22, 0.55);
}

.dock-btn {
  position: relative;
  border: none;
  background: transparent;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.86rem;
  cursor: pointer;
  transition: all 0.22s ease;
}
.dock-btn:hover { color: #fff; }
.dock-btn.active {
  background: linear-gradient(135deg, rgba(245, 185, 66, 0.96), rgba(217, 145, 30, 0.96));
  color: #062133;
  box-shadow: 0 6px 18px rgba(245, 185, 66, 0.38);
}
.dock-icon { font-size: 1.05rem; line-height: 1; }
.dock-badge {
  position: absolute;
  top: 4px;
  right: 8px;
  background: var(--coral);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 800;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* Модальные окна */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 16, 26, 0.72);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  overflow-y: auto;
}
.modal-backdrop.open { display: flex; }

.modal-window {
  position: relative;
  width: 100%;
  max-width: 740px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: var(--radius-lg);
  padding: 24px;
  background: var(--glass-bg-strong);
}
.modal-sm { max-width: 420px; }
.modal-xl { max-width: 960px; }

.modal-close {
  position: sticky;
  top: 0;
  float: right;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(6, 33, 51, 0.8);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  z-index: 5;
}
.modal-close-inline {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.28);
  background: rgba(255,255,255,0.12);
  color: #fff;
  cursor: pointer;
}
.modal-title { font-family: 'Montserrat', sans-serif; font-size: 1.32rem; font-weight: 800; margin-bottom: 10px; }

.detail-cover {
  width: 100%;
  height: 240px;
  object-fit: cover;
  border-radius: var(--radius-md);
  margin-bottom: 16px;
}
.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0 16px; }
.detail-text { color: #e2f5ff; line-height: 1.65; font-size: 0.94rem; white-space: pre-line; margin-bottom: 18px; }
.included-box {
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 20px;
}
.included-box h4 { font-size: 0.9rem; color: var(--gold); margin-bottom: 8px; }
.included-list { padding-left: 18px; color: var(--text-muted); font-size: 0.88rem; line-height: 1.6; }

.booking-box {
  background: rgba(4, 24, 38, 0.56);
  border: 1px solid rgba(245, 185, 66, 0.32);
  border-radius: var(--radius-md);
  padding: 18px;
}
.booking-box h3 { font-family: 'Montserrat', sans-serif; font-size: 1.08rem; margin-bottom: 14px; color: #ffe29d; }

/* Админ-панель */
.admin-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(255,255,255,0.15);
}
.admin-header-actions { display: flex; align-items: center; gap: 10px; }
.admin-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 18px;
}
.admin-tab-btn {
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.08);
  color: var(--text-main);
  padding: 9px 15px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 0.85rem;
  cursor: pointer;
}
.admin-tab-btn.active {
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: #062133;
  border-color: transparent;
}
.admin-card {
  background: rgba(5, 25, 39, 0.55);
  border: 1px solid rgba(255,255,255,0.16);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 14px;
}
.admin-lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.kv-warning {
  background: rgba(245, 185, 66, 0.18);
  border: 1px solid rgba(245, 185, 66, 0.5);
  color: #ffe8ad;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.84rem;
  margin-bottom: 14px;
}
.empty-state {
  text-align: center;
  padding: 36px 18px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Уведомление Toast */
.toast {
  position: fixed;
  top: 88px;
  right: 18px;
  background: rgba(7, 36, 54, 0.92);
  border: 1px solid var(--gold);
  color: #fff;
  padding: 12px 18px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 0.88rem;
  box-shadow: 0 12px 30px rgba(0,0,0,0.4);
  z-index: 200;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  transition: 0.25s;
}
.toast.show { opacity: 1; transform: translateY(0); }

@media (max-width: 600px) {
  .brand-name { font-size: 0.95rem; }
  .hero { padding: 22px 18px; }
  .dock-btn { padding: 10px 14px; font-size: 0.8rem; }
  .modal-window { padding: 18px; }
}
