/* ==========================================================
   Катер «Легенда» — стили сайта
   1. Основа и шапка  2. Страницы  3. Бронирование и админка
   ========================================================== */
:root {
  --navy: #0f2635;
  --navy-2: #193d52;
  --gold: #c9a24d;
  --gold-2: #e6c985;
  --teal: #087c68;
  --ink: #15252c;
  --muted: #53636b;
  --soft: #edf2f4;
  --radius: 18px;
}

* { box-sizing: border-box; }

html {
  background-color: var(--navy);
  scroll-behavior: smooth;
  overscroll-behavior-y: none;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: 'Roboto', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background: linear-gradient(rgba(15, 38, 53, 0.3), rgba(15, 38, 53, 0.55)), var(--navy) url('../images/spb-rivers-background.jpg') center / cover no-repeat;
}

@media (max-width: 600px) {
  body::before { background: linear-gradient(rgba(15, 38, 53, 0.3), rgba(15, 38, 53, 0.55)), var(--navy) url('../images/mobile-spb-rivers-background.jpg') center / cover no-repeat; }
}

[hidden] { display: none !important; }
img, video { max-width: 100%; }
a { color: inherit; }

button {
  font: inherit;
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  padding: 10px 18px;
  background: #e9eef0;
  color: var(--ink);
}

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid #d78733;
  outline-offset: 2px;
}

main {
  width: min(100%, 1180px);
  margin: 0 auto;
  padding: 28px clamp(14px, 3vw, 28px) 48px;
}

.page-container {
  flex: 1;
  display: flex;
  flex-direction: column;
  animation: page-in 0.45s ease both;
}

.page-container.fade-out {
  opacity: 0;
  transition: opacity 0.25s ease;
  animation: none;
}

@keyframes page-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

footer {
  padding: 22px 16px;
  color: rgba(255, 255, 255, 0.7);
  background: rgba(15, 38, 53, 0.96);
  font-size: 0.88rem;
  text-align: center;
}

footer p { margin: 0; }

/* ---------- Шапка и меню ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  background: rgba(15, 38, 53, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  transition: box-shadow 0.25s ease;
}

.site-header.is-scrolled { box-shadow: 0 10px 34px rgba(0, 0, 0, 0.38); }

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 20px;
  width: min(100%, 1320px);
  min-height: 68px;
  margin: 0 auto;
  padding: 9px clamp(14px, 3vw, 28px);
}

.brand {
  display: flex;
  flex: none;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(201, 162, 77, 0.55);
}

.brand-text { line-height: 1.1; }

.brand-text strong {
  display: block;
  font-size: 1.28rem;
  letter-spacing: 0.05em;
}

.brand-text small {
  display: block;
  margin-top: 3px;
  color: var(--gold-2);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  flex: 1;
  justify-content: center;
}

.main-nav ul {
  display: flex;
  gap: 2px;
  margin: 0;
  padding: 4px;
  list-style: none;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
}

.main-nav a.nav-link {
  display: block;
  padding: 8px 17px;
  color: rgba(255, 255, 255, 0.84);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.main-nav a.nav-link:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.13);
}

.main-nav a.nav-link.active {
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  font-weight: 700;
}

.nav-extra { display: none; }

.header-actions {
  display: flex;
  flex: none;
  align-items: center;
  gap: 14px;
}

.header-phone {
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.header-phone:hover { color: var(--gold-2); }

.header-social, .nav-extra-social { display: flex; align-items: center; gap: 8px; }
.header-social img { width: 28px; height: 28px; display: block; transition: transform 0.2s ease; }
.header-social a:hover img { transform: translateY(-2px); }

.header-cta {
  padding: 10px 20px;
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  border-radius: 999px;
  box-shadow: 0 6px 18px rgba(201, 162, 77, 0.35);
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.header-cta:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(201, 162, 77, 0.5); }
.header-cta.active { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.35); }

.nav-toggle {
  display: none;
  flex: none;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  position: relative;
}

.nav-toggle span {
  position: absolute;
  left: 12px;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}

.nav-toggle span:nth-child(1) { top: 15px; }
.nav-toggle span:nth-child(2) { top: 21px; }
.nav-toggle span:nth-child(3) { top: 27px; }
.menu-open .nav-toggle span:nth-child(1) { top: 21px; transform: rotate(45deg); }
.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
.menu-open .nav-toggle span:nth-child(3) { top: 21px; transform: rotate(-45deg); }

@media (max-width: 1200px) {
  .header-social { display: none; }
}

@media (max-width: 1040px) {
  .header-phone { display: none; }
}

@media (max-width: 900px) {
  .site-header__bar { gap: 10px; min-height: 62px; }
  .nav-toggle { display: inline-block; }
  .header-actions { margin-left: auto; }
  .header-cta { padding: 9px 16px; }

  .main-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: block;
    max-height: 0;
    overflow: hidden;
    visibility: hidden;
    opacity: 0;
    background: #0f2635;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 24px 40px rgba(0, 0, 0, 0.4);
    transition: max-height 0.35s ease, opacity 0.25s ease, visibility 0s linear 0.35s;
  }

  .menu-open .main-nav {
    max-height: calc(100vh - 62px);
    overflow-y: auto;
    visibility: visible;
    opacity: 1;
    transition: max-height 0.35s ease, opacity 0.25s ease;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px 20px;
    background: none;
    border: 0;
    border-radius: 0;
  }

  .main-nav a.nav-link {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 1.05rem;
  }

  .nav-extra {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 8px;
    padding: 18px 16px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
  }

  .nav-extra-phone {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    text-decoration: none;
  }

  .nav-extra-social img { width: 38px; height: 38px; display: block; }
}

@media (max-width: 440px) {
  .brand-text small { display: none; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-text strong { font-size: 1.15rem; }
  .header-cta { padding: 9px 13px; font-size: 0.85rem; }
}

/* ---------- Заголовки страниц ---------- */
.page-heading {
  margin: 4px 0 6px;
  color: #fff;
  font-size: clamp(1.9rem, 4vw, 2.7rem);
  line-height: 1.15;
  text-shadow: 0 2px 14px rgba(0, 0, 0, 0.55);
}

.page-lead {
  max-width: 700px;
  margin: 0 0 26px;
  color: rgba(255, 255, 255, 0.9);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 16px;
  color: #fff;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.6);
}

.section-title::before {
  content: "";
  width: 5px;
  height: 1.1em;
  background: var(--gold);
  border-radius: 3px;
}

/* ---------- Главная ---------- */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, 0.8fr);
  gap: 22px 40px;
  align-items: center;
  margin: 8px 0 22px;
  padding: clamp(26px, 5vw, 56px);
  color: #fff;
  background: linear-gradient(135deg, rgba(15, 38, 53, 0.9), rgba(15, 38, 53, 0.62));
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 26px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.hero-eyebrow {
  margin: 0 0 10px;
  color: var(--gold-2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.intro h1 {
  margin: 0 0 14px;
  font-size: clamp(2.1rem, 5vw, 3.7rem);
  line-height: 1.08;
  text-wrap: balance;
}

.hero-lead {
  max-width: 560px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
}

.hero-actions { display: grid; gap: 10px; }

.hero-book-button, .hero-routes-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 22px;
  border-radius: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.hero-book-button {
  color: var(--navy);
  background: linear-gradient(135deg, var(--gold-2), var(--gold));
  box-shadow: 0 10px 26px rgba(201, 162, 77, 0.4);
}

.hero-book-button:hover { transform: translateY(-2px); }

.hero-routes-link {
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.hero-routes-link:hover { background: rgba(255, 255, 255, 0.2); }

.hero-highlights {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hero-highlights > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
}

.hero-highlights strong { font-size: 1.1rem; color: var(--gold-2); }
.hero-highlights span { font-size: 0.84rem; color: rgba(255, 255, 255, 0.78); }

.hero-contact {
  grid-column: 1 / -1;
  margin: 0;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.92rem;
}

.hero-contact a { color: #fff; font-weight: 700; }

.home-about {
  margin: 0 0 34px;
  padding: clamp(22px, 4vw, 38px);
  color: var(--navy-2);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.25);
}

.home-about .hero-eyebrow { color: #8a6a22; }
.home-about h2 { margin: 0 0 10px; font-size: clamp(1.5rem, 3vw, 2.2rem); line-height: 1.2; }
.home-about-lead { max-width: 800px; margin: 0; color: var(--muted); }

.home-services {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 18px;
}

.home-services article {
  padding: 18px;
  background: #f4f7f8;
  border: 1px solid #e5ecef;
  border-radius: 14px;
}

.service-number { color: #9a6b30; font-size: 0.78rem; font-weight: 700; letter-spacing: 0.12em; }
.home-services h3 { margin: 6px 0; font-size: 1.05rem; }
.home-services p { margin: 0; color: #64747a; font-size: 0.92rem; line-height: 1.5; }

.home-about-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}

.home-about-link:hover { color: #9a6b30; }

.gallery, .video { margin: 0 0 34px; }

.slider-container { position: relative; }

.slider-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.slider-track::-webkit-scrollbar { display: none; }

.slider-track img {
  flex: 0 0 calc(50% - 6px);
  width: calc(50% - 6px);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  scroll-snap-align: start;
}

.slider-prev, .slider-next {
  position: absolute;
  top: 50%;
  z-index: 5;
  width: 46px;
  height: 46px;
  padding: 0;
  color: var(--navy);
  background: rgba(255, 255, 255, 0.92);
  border-radius: 50%;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
  font-size: 0.9rem;
  transform: translateY(-50%);
}

.slider-prev { left: 10px; }
.slider-next { right: 10px; }

.video video {
  display: block;
  width: auto;
  max-width: 100%;
  max-height: min(78vh, 640px);
  margin: 0 auto;
  background: #000;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

@media (max-width: 760px) {
  .intro { grid-template-columns: 1fr; gap: 18px; padding: 26px 20px; border-radius: 20px; }
  .hero-highlights { gap: 8px; }
  .hero-highlights > div { padding: 11px 10px; }
  .hero-highlights strong { font-size: 0.95rem; line-height: 1.2; }
  .hero-highlights span { font-size: 0.82rem; line-height: 1.3; }
  .home-services { grid-template-columns: 1fr; gap: 10px; }
  .slider-track img { flex-basis: 86%; width: 86%; }
  .slider-prev, .slider-next { display: none; }
  main { padding-top: 18px; }
}

/* ---------- Маршруты и программы ---------- */
.routes-list { display: grid; gap: 24px; }
.routes-message { margin: 0 0 14px; color: #fff; text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6); }

.route-item {
  display: grid;
  grid-template-columns: minmax(260px, 42%) 1fr;
  overflow: hidden;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.3);
}

.route-item:nth-child(even) { grid-template-columns: 1fr minmax(260px, 42%); }
.route-item:nth-child(even) .route-media { order: 2; }

.route-media { min-height: 260px; background: #dbe4e8; }

.route-media img, .route-media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.route-media video { max-height: 560px; object-fit: contain; background: #000; }

.route-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: clamp(20px, 3vw, 32px);
}

.route-item h3 {
  margin: 0;
  color: var(--navy-2);
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.25;
}

.route-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }

.route-meta li {
  padding: 5px 13px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.meta-duration { color: var(--navy-2); background: var(--soft); }
.meta-price { color: #6f5212; background: #f7ecd0; }

.route-text { margin: 0; color: #44555d; line-height: 1.7; }

.route-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 8px; }

.route-book, .toggle-map {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 10px 20px;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

.route-book { color: #fff; background: var(--navy-2); }
.route-book:hover { background: var(--navy); }
.toggle-map { color: var(--navy-2); background: var(--soft); }
.toggle-map:hover { background: #dfe8ec; }

.route-map-content { grid-column: 1 / -1; }
.route-map-content.hidden { display: none; }
.route-map-content iframe { display: block; width: 100%; height: 400px; border: 0; }

@media (max-width: 760px) {
  .route-item, .route-item:nth-child(even) { grid-template-columns: 1fr; border-radius: 18px; }
  .route-item:nth-child(even) .route-media { order: 0; }
  .route-media { min-height: 0; aspect-ratio: 16 / 10; }
  .route-media video { max-height: none; }
  .route-actions > * { flex: 1 1 100%; justify-content: center; }
  .route-map-content iframe { height: 320px; }
}

/* ---------- Условия аренды ---------- */
.conditions {
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 40px);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.28);
}

.conditions h2 { margin: 0 0 12px; color: var(--navy-2); font-size: clamp(1.6rem, 3.4vw, 2.2rem); line-height: 1.2; }
.conditions h3 { margin: 28px 0 10px; color: var(--navy-2); font-size: 1.3rem; }
.conditions h4 { margin: 16px 0 6px; color: var(--muted); font-size: 0.82rem; letter-spacing: 0.1em; text-transform: uppercase; }

.conditions .contact-number {
  display: inline-block;
  margin: 0 0 10px;
  padding: 8px 16px;
  color: var(--navy-2);
  background: var(--soft);
  border-radius: 999px;
  font-weight: 700;
}

.conditions .messengers { display: flex; gap: 10px; }
.conditions .messengers img { width: 40px; height: 40px; display: block; }
.conditions ul { margin: 0; padding-left: 22px; }
.conditions li { margin: 8px 0; color: #34454d; }
.conditions li::marker { color: var(--gold); }
.conditions a { color: var(--teal); font-weight: 700; }


/* ==========  Бронирование, оплата, админка  ========== */
/* Бронирование, оплата и администрирование */
[hidden] {
  display: none !important;
}

.page-heading,
.booking-panel > h1 {
  margin: 0 0 12px;
}

.booking-panel {
  max-width: 1440px;
  margin: 0 auto;
  padding: clamp(20px, 4vw, 42px);
  color: #15252c;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(0, 40, 50, 0.16);
  border-radius: 18px;
  box-shadow: 0 16px 48px rgba(0, 18, 30, 0.2);
}

.booking-panel h1 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
  line-height: 1.15;
}

.eyebrow {
  margin: 0 0 8px;
  color: #0c8b73;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.booking-lead,
.booking-note {
  max-width: 760px;
  color: #53636b;
}

.booking-note {
  margin: 20px 0 0;
  font-size: 0.92rem;
}

.booking-note a,
.back-link {
  color: #087c68;
  font-weight: 700;
}

.week-controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin: 26px 0 18px;
}

.week-controls strong {
  min-width: 250px;
  text-align: center;
  font-size: 1.1rem;
}

.week-controls button {
  width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: #153d49;
  border-radius: 50%;
}

.week-controls button:hover {
  background: #087c68;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
}

.day-card {
  min-width: 0;
  padding: 13px 10px;
  background: #f6f9f8;
  border: 1px solid #dfe9e5;
  border-radius: 12px;
}

.day-heading {
  min-height: 58px;
  margin-bottom: 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid #dfe9e5;
}

.day-heading h2 {
  margin: 0;
  color: #183c45;
  font-size: 0.98rem;
  line-height: 1.25;
}

.day-date {
  color: #78878c;
  font-size: 0.82rem;
}

.time-slots {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 540px;
  overflow: auto;
  padding-right: 2px;
}

.time-slot {
  width: 100%;
  min-height: 37px;
  padding: 6px 3px;
  border: 0;
  border-radius: 7px;
  color: #164b32;
  font-size: 0.84rem;
  font-weight: 700;
  white-space: normal;
}

.slot-available {
  background: #c9f1d8;
}

.slot-available:hover {
  background: #a9e8bf;
}

.slot-pending,
.slot-booked {
  color: #4a3310;
  background: #ffda7a;
  cursor: not-allowed;
  font-size: 0.72rem;
}

.slot-booked {
  color: #fff;
  background: #d54d4d;
}

.day-closed {
  color: #849097;
  font-size: 0.85rem;
  text-align: center;
}

.booking-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 24px;
  margin-top: 20px;
  color: #4d5e64;
  font-size: 0.86rem;
}

.legend-dot {
  display: inline-block;
  width: 11px;
  height: 11px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -1px;
}

.available-dot { background: #69cb88; }
.pending-dot { background: #f3bd40; }
.booked-dot { background: #d54d4d; }

.form-message {
  min-height: 1.3em;
  margin: 9px 0;
  color: #28644e;
  font-size: 0.92rem;
}

.form-message.is-error {
  color: #ae3030;
}

.form-message.is-success {
  color: #28644e;
}

.booking-dialog {
  width: min(520px, calc(100vw - 28px));
  max-height: calc(100vh - 28px);
  padding: 30px;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 22px 80px rgba(0, 0, 0, 0.3);
}

.booking-dialog::backdrop {
  background: rgba(10, 28, 35, 0.65);
  backdrop-filter: blur(3px);
}

.booking-dialog h2 {
  margin: 0 0 8px;
}

.booking-dialog label,
.admin-login label,
.route-admin-form label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 14px 0;
  color: #2e444b;
  font-size: 0.92rem;
  font-weight: 700;
}

.booking-dialog input,
.booking-dialog select,
.admin-panel input,
.admin-panel select,
.admin-panel textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #cbd9d5;
  border-radius: 8px;
  background: #fff;
  color: #18343c;
  font: inherit;
}

.booking-dialog input:focus,
.booking-dialog select:focus,
.admin-panel input:focus,
.admin-panel select:focus,
.admin-panel textarea:focus {
  outline: 2px solid rgba(8, 124, 104, 0.24);
  border-color: #087c68;
}

.selected-slot {
  padding: 11px 13px;
  background: #eef7f3;
  border-radius: 8px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 12px;
  padding: 2px 9px;
  color: #53636b;
  background: transparent;
  font-size: 1.7rem;
}

.primary-button,
.secondary-button,
.danger-button {
  min-height: 42px;
  padding: 10px 16px;
  border: 0;
  border-radius: 8px;
  font-weight: 700;
}

.primary-button {
  color: #fff;
  background: #087c68;
}

.primary-button:hover {
  background: #066553;
}

.secondary-button {
  color: #183c45;
  background: #e7efec;
}

.danger-button {
  color: #fff;
  background: #bd4141;
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.payment-panel {
  max-width: 760px;
}

.payment-demo-notice {
  padding: 12px 14px;
  color: #68460a;
  background: #fff2cc;
  border-radius: 8px;
}

.payment-details {
  margin: 22px 0;
  padding: 16px;
  background: #f5f8f7;
  border-radius: 10px;
}

.payment-details p {
  margin: 6px 0;
}

.payment-actions,
.admin-toolbar,
.admin-form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.back-link {
  display: inline-block;
  margin-top: 20px;
}

.admin-panel {
  max-width: 1240px;
}

.admin-login {
  max-width: 430px;
  margin: 24px 0;
}

.admin-login .primary-button {
  width: 100%;
}

.admin-toolbar {
  justify-content: space-between;
  margin: 18px 0 28px;
  padding: 12px 16px;
  background: #eef7f3;
  border-radius: 10px;
}

.admin-toolbar p {
  margin: 0;
}

.admin-section {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid #dce7e3;
}

.admin-section h2 {
  margin: 0 0 8px;
  color: #183c45;
}

.week-date-label {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 440px;
  margin: 18px 0;
  font-weight: 700;
}

.week-editor {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 8px;
  max-width: 900px;
  margin: 18px 0;
}

.week-editor-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(95px, 0.8fr) 14px minmax(95px, 0.8fr);
  gap: 7px;
  align-items: center;
  padding: 9px;
  background: #f5f8f7;
  border-radius: 8px;
}

.weekday-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.weekday-toggle input {
  width: auto;
  min-height: auto;
}

.week-editor-row select {
  min-height: 37px;
  padding: 6px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.admin-table th,
.admin-table td {
  padding: 10px;
  border-bottom: 1px solid #e0e8e5;
  text-align: left;
  vertical-align: top;
}

.admin-table th {
  color: #31525a;
  white-space: nowrap;
}

.admin-table td:first-child {
  white-space: nowrap;
}

.admin-table .danger-button {
  min-height: 34px;
  padding: 6px 10px;
}

.route-admin-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0 14px;
  max-width: 1000px;
  margin: 18px 0;
}

.route-admin-form label {
  margin: 7px 0 12px;
}

.route-admin-form .field-wide {
  grid-column: 1 / -1;
}

.route-admin-form textarea {
  resize: vertical;
}

.admin-route-list {
  display: grid;
  gap: 9px;
  margin-top: 22px;
}

.admin-route-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  padding: 12px 14px;
  background: #f5f8f7;
  border-radius: 9px;
}

.admin-route-item p {
  margin: 4px 0 0;
  color: #64737a;
}

.routes-message {
  margin-left: 20px;
}

@media (max-width: 1100px) {
  .week-calendar {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .week-calendar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .week-editor {
    grid-template-columns: 1fr;
  }

  .route-admin-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .week-calendar {
    grid-template-columns: 1fr;
  }

  .day-heading {
    min-height: auto;
  }

  .time-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: 340px;
  }

  .time-slot {
    font-size: 0.8rem;
  }

  .slot-pending,
  .slot-booked {
    min-height: 44px;
    font-size: 0.67rem;
  }

  .week-controls {
    gap: 10px;
  }

  .week-controls strong {
    min-width: 0;
    flex: 1;
    font-size: 0.95rem;
  }

  .week-controls button {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .week-editor-row {
    grid-template-columns: minmax(106px, 1fr) minmax(82px, 0.8fr) 10px minmax(82px, 0.8fr);
    gap: 5px;
    padding: 7px;
    font-size: 0.83rem;
  }

  .week-editor-row select {
    font-size: 0.82rem;
  }

  .route-admin-form {
    grid-template-columns: 1fr;
  }

  .route-admin-form .field-wide {
    grid-column: auto;
  }

  .admin-route-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .booking-dialog {
    padding: 25px 20px;
  }
}


.week-controls button:disabled {
  color: #a7b3b8;
  background: #e6ebed;
  cursor: not-allowed;
}

.next-week-link {
  display: block;
  margin: 0 auto 14px;
  color: #193d52;
  background: #edf2f4;
}

.day-picker {
  display: none;
}

.day-editor-row.has-error {
  outline: 2px solid #bd4141;
}

.week-editor-row { grid-template-columns: minmax(120px, 1fr) minmax(80px, 0.8fr) 12px minmax(80px, 0.8fr) auto; }
.week-editor-row.is-all-day { background: #e4f4f1; }
.week-editor-row.is-off { opacity: 0.6; }
.all-day-button { min-height: 34px; padding: 4px 9px; color: var(--navy-2); background: #fff; border: 1px solid #c3ced2; border-radius: 8px; font-size: 0.8rem; font-weight: 700; cursor: pointer; }
.week-editor-row.is-all-day .all-day-button { color: #fff; background: var(--teal); border-color: var(--teal); }
.week-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 0; }
.week-presets button { min-height: 38px; padding: 6px 14px; }
.week-status { margin: 0; color: #6b7c83; font-size: 0.9rem; }
.week-status.is-saved { color: #9a5b12; }
.week-count-label { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; font-weight: 700; }
.week-count-label select { width: auto; min-height: 38px; }
@media (max-width: 560px) { .week-editor-row { grid-template-columns: minmax(96px, 1fr) minmax(70px, 0.8fr) 8px minmax(70px, 0.8fr) auto; } }
.week-editor-row.has-error {
  outline: 2px solid #bd4141;
}

.deposit-hint {
  padding: 11px 13px;
  color: #193d52;
  background: #edf2f4;
  border-radius: 8px;
}

.deposit-settings-form {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 0 12px;
  max-width: 680px;
}

.deposit-settings-form label {
  flex: 0 0 180px;
}

.deposit-settings-form .form-message {
  flex: 1 1 100%;
}

.booking-archive {
  margin-top: 18px;
  border-top: 1px solid #dce7e3;
}

.booking-archive summary {
  padding: 15px 3px;
  color: #193d52;
  font-weight: 700;
  cursor: pointer;
}

.booking-archive[open] summary {
  margin-bottom: 8px;
}

.day-picker-button {
  color: #193d52;
  background: #edf2f4;
}

.day-picker-button.is-selected {
  color: #fff;
  background: #193d52;
}

.day-picker-button.is-selected:hover {
  background: #102f41;
}

.day-picker-button:focus-visible,
.time-slot:focus-visible,
.week-controls button:focus-visible {
  outline: 3px solid #d78733;
  outline-offset: 2px;
}


@media (max-width: 760px) {
  .day-picker {
    display: flex;
    gap: 4px;
    overflow: hidden;
    padding: 4px 0 12px;
  }

  .day-picker-button {
    display: flex;
    flex: 1 1 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    min-width: 0;
    min-height: 46px;
    padding: 4px 1px;
    color: #193d52;
    background: #edf2f4;
    border: 0;
    border-radius: 10px;
    line-height: 1.1;
  }

  .day-picker-button.is-selected {
    color: #fff;
    background: #193d52;
  }

  .day-picker-button span:first-child {
    font-size: 0.72rem;
    text-transform: uppercase;
  }

  .day-picker-button span:last-child {
    font-size: 0.86rem;
    font-weight: 700;
  }

  .week-calendar {
    display: block;
  }

  .day-card {
    display: none;
  }

  .day-card.is-selected {
    display: block;
    padding: 14px;
  }

  .day-card.is-selected .day-heading {
    margin-bottom: 10px;
  }

  .day-card.is-selected .time-slots {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-height: min(52vh, 470px);
    gap: 7px;
    overflow-y: auto;
    padding: 1px 3px 4px 1px;
  }

  .day-card.is-selected .time-slot {
    min-height: 42px;
    font-size: 0.88rem;
  }

  .day-card.is-selected .slot-pending,
  .day-card.is-selected .slot-booked {
    font-size: 0.8rem;
  }

  .day-picker-button.is-empty:not(.is-selected) { opacity: 0.45; }}

.week-calendar { align-items: start; }

a[href^="tel:"] { white-space: nowrap; }

@media (max-width: 420px) {
  .day-card.is-selected .time-slots { max-height: 56vh; }
  .booking-panel { padding: 18px 14px; }
  .week-controls strong { font-size: 0.88rem; }
}

@media (max-width: 330px) {
  .day-card.is-selected .time-slots { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Кнопки и состояния бронирования ---------- */
.primary-button {
  color: #fff;
  background: var(--navy-2);
}

.primary-button:hover { background: var(--navy); }
.secondary-button { color: var(--navy-2); background: var(--soft); }
.secondary-button:hover { background: #dfe8ec; }

.booking-panel { background: rgba(255, 255, 255, 0.96); }
.booking-panel h1 { color: var(--ink); }
.eyebrow { color: var(--teal); }

.slot-gap {
  color: #6f7c82;
  background: #e3e8ea;
  cursor: not-allowed;
  font-weight: 500;
  font-size: 0.84rem;
}

.slot-pending { font-size: 0.7rem; }
.gap-dot { background: #c3ced2; }

.booking-summary {
  min-height: 1.3em;
  margin: 12px 0 0;
  padding: 10px 12px;
  color: var(--navy-2);
  background: var(--soft);
  border-radius: 8px;
  font-size: 0.9rem;
}

.booking-summary:empty { display: none; }
.booking-summary .summary-line { display: block; }
.booking-summary .summary-line + .summary-line { margin-top: 3px; }
.booking-summary .summary-total { margin: 6px 0 4px; font-size: 1.05rem; font-weight: 700; }

/* Выбор программ в заявке */
.program-picker { margin: 12px 0 0; border: 1px solid #c3ced2; border-radius: 8px; background: #fff; }
.program-picker > summary { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 10px 12px; cursor: pointer; font-weight: 700; color: var(--navy-2); list-style: none; }
.program-picker > summary::-webkit-details-marker { display: none; }
.program-picker > summary::after { content: "▾"; transition: transform 0.15s; }
.program-picker[open] > summary::after { transform: rotate(180deg); }
.program-picker-count { flex: 1; text-align: right; color: #6b7c83; font-weight: 400; font-size: 0.85rem; }
.program-picker.has-picked .program-picker-count { color: var(--teal); font-weight: 700; }
.program-picker-list { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; padding: 0 6px 8px; }
.program-picker .program-picker-list label { display: flex; flex-direction: row; align-items: flex-start; gap: 10px; margin: 0; padding: 7px 6px; border-radius: 6px; cursor: pointer; font-weight: 400; }
.program-picker-list label:hover { background: var(--soft); }
.program-picker .program-picker-list input { flex: none; width: 18px; height: 18px; min-height: 0; margin: 2px 0 0; accent-color: var(--teal); }
.program-picker-list span { display: grid; gap: 1px; }
.program-picker-list small { color: #6b7c83; }
.bcard.is-dimmed { background: #f1f3f4; border-left-color: #9aa7ac; opacity: 1; filter: grayscale(1); color: #6b7c83; }
.badge.badge-done { color: #fff; background: #8a979c; }
.bcard-programs { color: #1f5f66; font-size: 0.9rem; overflow-wrap: anywhere; }
.bcard-price { color: var(--navy-2); font-weight: 700; overflow-wrap: anywhere; }
.bcard.is-dimmed .bcard-price { color: inherit; }
.bcard.is-ongoing { border-left-color: #2f9fd8; box-shadow: 0 0 0 2px #9fd3ef; }
.badge.badge-ongoing { color: #fff; background: #2f9fd8; }
.manual-summary { margin: 0; }
.picked-program-note { margin: 0 auto 14px; padding: 10px 14px; max-width: 640px; color: #1f5f66; background: #e4f4f1; border-radius: 10px; text-align: center; font-weight: 500; }
.booking-dialog .field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 520px) { .booking-dialog .field-pair { grid-template-columns: 1fr; } }
.program-picker > summary small { color: #6b7c83; font-weight: 400; }
.program-picker .program-picker-list label.is-disabled { cursor: not-allowed; opacity: 0.55; }
.program-picker .program-picker-list label.is-disabled:hover { background: none; }
.program-too-short { color: #9a5b12; font-size: 0.78rem; font-style: normal; }
.booking-summary .summary-notice { margin-bottom: 6px; color: #9a5b12; }
.admin-route-item.is-hidden-item { opacity: 0.6; }
.hidden-flag { display: inline-block; margin-left: 6px; padding: 1px 7px; color: #fff; background: #8a979c; border-radius: 999px; font-size: 0.72rem; font-weight: 700; vertical-align: middle; }
.program-picker-count { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.booking-day-tools { display: flex; justify-content: flex-end; margin-top: 8px; }
.booking-day-tools button { min-height: 36px; padding: 6px 12px; }
.field-hint { color: #6b7c83; font-size: 0.78rem; font-weight: 400; line-height: 1.3; }
.booking-dialog { position: fixed; overflow-y: auto; }

.payment-timer {
  display: inline-block;
  margin: 4px 0 0;
  padding: 8px 14px;
  color: #68460a;
  background: #fff2cc;
  border-radius: 999px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* ---------- Админ-панель ---------- */
.admin-tabs {
  display: flex;
  gap: 6px;
  margin: 0 0 4px;
  overflow-x: auto;
  border-bottom: 1px solid #dce7e3;
  scrollbar-width: none;
}

.admin-tabs::-webkit-scrollbar { display: none; }

.admin-tab {
  flex: none;
  padding: 12px 18px;
  color: var(--muted);
  background: transparent;
  border-bottom: 3px solid transparent;
  border-radius: 10px 10px 0 0;
  font-weight: 700;
}

.admin-tab:hover { background: #f1f5f4; }

.admin-tab.is-active {
  color: var(--navy-2);
  background: #f1f5f4;
  border-bottom-color: var(--gold);
}

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h2 { margin: 0; }

.route-editor {
  margin: 16px 0;
  padding: 18px;
  background: #f5f8f7;
  border: 1px solid #dce7e3;
  border-radius: 14px;
}

.route-editor h3 { margin: 0 0 6px; color: var(--navy-2); }
.admin-route-item { background: #f5f8f7; border: 1px solid #e3ebe8; }
.admin-route-item strong { color: var(--navy-2); }

.manual-booking {
  margin: 12px 0 18px;
  padding: 4px 14px;
  background: #f5f8f7;
  border-radius: 10px;
}

.manual-booking summary { padding: 10px 0; color: var(--navy-2); font-weight: 700; cursor: pointer; }
.admin-actions-cell { white-space: nowrap; }
.admin-actions-cell button { min-height: 34px; margin: 0 4px 4px 0; padding: 6px 10px; }

/* ---------- Админка: карточки броней, ручная бронь, фото, сортировка ---------- */
.admin-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px;
  overflow: visible;
  border-bottom: 0;
}

.admin-tab {
  padding: 11px 10px;
  text-align: center;
  background: #f1f5f4;
  border-bottom: 3px solid transparent;
  border-radius: 10px;
}

.admin-tab.is-active { color: #fff; background: var(--navy-2); border-bottom-color: var(--gold); }
.admin-tab.is-active:hover { background: var(--navy); }

.booking-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 10px;
  margin: 12px 0;
}

.bcard {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #dfe9e5;
  border-left: 5px solid #69cb88;
  border-radius: 12px;
  font-size: 0.92rem;
  line-height: 1.4;
}

.bcard.status-pending { border-left-color: #f3bd40; }
.bcard.status-cancelled, .bcard.status-expired { border-left-color: #c3ced2; opacity: 0.85; }
.bcard-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.bcard-num { color: var(--navy-2); font-weight: 700; font-size: 1.05rem; }
.bcard-when { flex: 1; font-weight: 700; }
.badge { padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 700; color: #164b32; background: #c9f1d8; white-space: nowrap; }
.badge-pending, .badge-open { color: #4a3310; background: #ffe7a6; }
.badge-cancelled, .badge-expired { color: #53636b; background: #e3e8ea; }
.bcard-client { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.bcard-client a { color: var(--teal); font-weight: 700; }
.bcard-meta { color: #44555d; overflow-wrap: anywhere; }
.bcard-comment { padding: 6px 9px; color: #4a3310; background: #fff6dc; border-radius: 7px; overflow-wrap: anywhere; }
.bcard-sign { color: #7a898f; font-size: 0.8rem; }
.bcard-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
.bcard-actions button { min-height: 36px; padding: 6px 12px; }
.empty-note { color: var(--muted); }
.admin-subheading { margin: 28px 0 6px; color: var(--navy-2); }

.manual-booking { margin: 16px 0 6px; padding: 0; background: #eef7f3; border: 1px solid #cfe5dc; border-radius: 12px; }
.manual-booking > summary { display: flex; align-items: center; gap: 8px; padding: 13px 16px; color: var(--teal); font-size: 1.02rem; list-style: none; }
.manual-booking > summary::-webkit-details-marker { display: none; }
.manual-booking > summary::after { content: "▾"; margin-left: auto; transition: transform 0.2s ease; }
.manual-booking[open] > summary::after { transform: rotate(180deg); }
.manual-booking[open] > summary { border-bottom: 1px solid #cfe5dc; }
.manual-booking .manual-form { padding: 6px 14px 10px; }
.booking-days { display: grid; gap: 6px; }
.booking-day-title { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; color: var(--navy-2); font-size: 1rem; }
.booking-day-title::first-letter { text-transform: uppercase; }
.booking-day-title::after { content: attr(data-count); padding: 1px 8px; color: var(--navy-2); background: var(--soft); border-radius: 999px; font-size: 0.8rem; }
.booking-day.is-today .booking-day-title { color: var(--teal); }
.booking-day-title:not([data-count])::after { display: none; }
.booking-day .booking-cards { margin: 8px 0 0; }
.manual-form { padding-bottom: 8px; }

.admin-me { margin: -4px 0 14px; color: var(--muted); font-size: 0.92rem; }
.tab-badge { display: inline-block; min-width: 20px; margin-left: 6px; padding: 0 6px; color: #4a3310; background: #ffd25e; border-radius: 999px; font-size: 0.78rem; line-height: 20px; }
.new-banner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin: 0 0 12px; padding: 10px 14px; color: #4a3310; background: #fff3c9; border: 1px solid #f3d27a; border-radius: 12px; font-weight: 700; }
.new-banner button { min-height: 38px; padding: 7px 12px; }
#new-banner-text { cursor: pointer; text-decoration: underline dotted; }
.bcard.is-new { background: #fffbea; border-color: #f3d27a; box-shadow: 0 0 0 2px #f3d27a; }
.new-flag { padding: 2px 8px; color: #fff; background: #d9822b; border-radius: 6px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.06em; }

.profile-info { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; max-width: 480px; margin: 12px 0; padding: 12px 14px; background: #f5f8f7; border-radius: 10px; }
.profile-info dt { color: var(--muted); }
.profile-info dd { margin: 0; font-weight: 700; }

.links-list { margin-top: 22px; border-top: 1px solid #dce7e3; }
.links-list > summary { padding: 15px 3px; color: var(--navy-2); font-weight: 700; cursor: pointer; }
.links-filter { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.links-filter button { min-height: 36px; padding: 6px 12px; }
.links-filter button.is-active { color: #fff; background: var(--navy-2); }
.links-items { display: grid; gap: 8px; }
.links-total { margin: 0; font-weight: 700; color: var(--teal); }
.link-item { background: #fff; border: 1px solid #dfe9e5; border-left: 5px solid #f3bd40; border-radius: 12px; }
.link-item.status-paid { border-left-color: #69cb88; }
.link-item.status-cancelled { border-left-color: #c3ced2; }
.link-item > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 10px 12px; cursor: pointer; list-style: none; }
.link-item > summary::-webkit-details-marker { display: none; }
.link-item > summary { position: relative; padding-right: 30px; }
.link-item > summary::after { content: "▾"; position: absolute; top: 10px; right: 12px; color: var(--muted); }
.link-item[open] > summary::after { transform: rotate(180deg); }
.link-amount { flex: 1; font-weight: 700; }
.link-date { flex: 1 1 100%; color: var(--muted); font-size: 0.85rem; }
.links-filter button { padding: 6px 9px; font-size: 0.88rem; }
.link-details { display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; margin: 0; padding: 4px 12px 8px; font-size: 0.9rem; border-top: 1px solid #edf2f0; }
.link-details dt { color: var(--muted); }
.link-details dd { margin: 0; overflow-wrap: anywhere; }
.link-item .bcard-actions { padding: 0 12px 12px; }
.manual-date-row { display: flex; flex-wrap: wrap; align-items: end; gap: 0 10px; }
.manual-date { flex: 0 1 220px; }
.date-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; }
.date-chips button { min-height: 42px; padding: 8px 12px; }
.date-chips button.is-active { color: #fff; background: var(--teal); }
.bcard-head .bcard-when { font-size: 1.05rem; }
.manual-hint { margin: 4px 0 10px; color: var(--muted); font-size: 0.9rem; }
.manual-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.manual-slots .time-slot { min-height: 40px; font-size: 0.85rem; }
.manual-slots .slot-pending, .manual-slots .slot-booked { font-size: 0.78rem; line-height: 1.15; }
.time-slot.is-picked { color: #fff; background: var(--navy-2); box-shadow: 0 0 0 3px var(--gold); }
.manual-legend { justify-content: flex-start; margin: 10px 0 6px; }

.link-result { display: grid; gap: 8px; max-width: 680px; padding: 12px; background: #eef7f3; border-radius: 10px; }
.link-result input { font-size: 0.9rem; }

.roles-help { margin: 12px 0; padding: 10px 14px; background: #f5f8f7; border-radius: 10px; font-size: 0.9rem; }
.roles-help p { margin: 6px 0; }

.photo-field { margin: 7px 0 12px; }
.field-label { display: block; margin-bottom: 7px; color: #2e444b; font-size: 0.92rem; font-weight: 700; }
.photo-preview { display: flex; align-items: center; justify-content: center; width: 220px; max-width: 100%; aspect-ratio: 16 / 10; margin-bottom: 8px; overflow: hidden; color: var(--muted); background: #e9eef0; border-radius: 10px; }
.photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.photo-drop { padding: 14px; text-align: center; background: #fff; border: 2px dashed #b9cbd2; border-radius: 12px; transition: background-color 0.2s ease, border-color 0.2s ease; }
.photo-drop p { margin: 0 0 10px; color: var(--muted); font-size: 0.9rem; }
.photo-drop .admin-form-actions { justify-content: center; }
.photo-drop.is-over { background: #eef7f3; border-color: var(--teal); }

.sort-hint { margin: 16px 0 0; color: var(--muted); font-size: 0.88rem; }
.sortable-item { justify-content: flex-start; }
.admin-item-text { flex: 1; min-width: 0; }
.admin-item-text strong { overflow-wrap: anywhere; }
.drag-handle { flex: none; padding: 6px 4px; color: #8a9aa0; font-size: 1.4rem; line-height: 1; cursor: grab; touch-action: none; user-select: none; }
.sortable-item.is-dragging { position: relative; z-index: 2; background: #fff; box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
.sortable-item.is-dragging .drag-handle { cursor: grabbing; }
.admin-thumb { flex: none; width: 64px; height: 44px; overflow: hidden; background: #e3e8ea; border-radius: 7px; }
.admin-thumb img { width: 100%; height: 100%; object-fit: cover; }
.arrow-button { min-width: 40px; padding: 6px 10px !important; }

@media (max-width: 600px) {
  .admin-panel { padding: 16px 12px; }
  .admin-tabs { display: flex; flex-wrap: wrap; gap: 5px; }
  .admin-tab { flex: 1 1 22%; min-width: 0; padding: 10px 2px; font-size: 0.82rem; }
  .admin-tab .tab-badge { margin-left: 3px; min-width: 18px; padding: 0 4px; line-height: 18px; }
  .admin-panel > h1 { font-size: 1.5rem; margin-bottom: 8px; }
  .admin-panel > .eyebrow { display: none; }
  .admin-toolbar { gap: 6px 10px; margin: 8px 0 12px; padding: 8px 10px; font-size: 0.92rem; }
  .admin-toolbar .admin-form-actions { gap: 6px; }
  .admin-toolbar .admin-form-actions button { min-height: 34px; padding: 5px 10px; font-size: 0.85rem; }
  .admin-section { margin-top: 16px; }
  .manual-booking { padding: 4px 10px; }
  .manual-slots { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .manual-date { flex: 1 1 100%; }
  .date-chips { flex: 1 1 100%; flex-wrap: nowrap; }
  .date-chips button { flex: 1; padding: 8px 4px; font-size: 0.88rem; }
  .sortable-item { flex-direction: row !important; flex-wrap: wrap; align-items: center !important; }
  .sortable-item .admin-item-text { flex: 1 1 calc(100% - 120px); }
  .sortable-item .admin-form-actions { flex: 1 1 100%; flex-wrap: nowrap; gap: 6px; }
  .sortable-item .admin-form-actions button { min-height: 38px; padding: 7px 10px; font-size: 0.88rem; }
  .admin-toolbar .admin-form-actions button { white-space: nowrap; }
  .admin-thumb { width: 52px; height: 38px; }
  .deposit-settings-form label { flex: 1 1 100%; }
}

@media (max-width: 380px) {
  .manual-slots { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
