@font-face {
  font-family: golos;
  src: url('fonts/golos-text.woff2') format('woff2');
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  background: #1c1c1c;
  color: #fff;
  font-family: 'Golos Text', golos, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.4;
  overscroll-behavior: none;
  scrollbar-width: none;
}
body::-webkit-scrollbar { display: none; }
* { scrollbar-width: none; }
*::-webkit-scrollbar { display: none; }

img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* ===== APP ===== */
.app {
  max-width: 520px;
  margin: 0 auto;
  min-height: 100%;
  position: relative;
  overflow: hidden;
}

/* Desktop wrapper */
@media (min-width: 700px) {
  body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
  }

}

/* ===== LOGO ===== */
.logo-badge-wrap {
  background: #ffb81c;
  border-radius: 5px;
  padding: 3px 10px 4px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
}
.logo-badge-top {
  font-size: 8px;
  font-weight: 700;
  color: rgba(30,20,0,0.55);
  letter-spacing: 0.2em;
  line-height: 1.4;
  display: block;
}
.logo-badge-go {
  font-size: 26px;
  font-weight: 900;
  color: #1a1200;
  letter-spacing: -0.01em;
  line-height: 1;
  font-style: italic;
  display: block;
}

/* ===== INTRO ===== */
.intro {
  min-height: 100vh;
  min-height: 100dvh;
  background: url('images/main-background.jpg') center top / cover no-repeat, #4a7030;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.intro::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0,0,0,0) 37%, #1c1c1c 93%);
  pointer-events: none;
}
.intro-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 24px 44px;
}
.intro-content h1 {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 14px;
}
.intro-content p {
  color: #9ba1a9;
  font-size: 16px;
  margin-bottom: 36px;
}

/* ===== BUTTONS ===== */
.btn-primary {
  width: 100%;
  border: none;
  border-radius: 10px;
  background: #ffb81c;
  color: #111;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 24px;
  transition: opacity 0.15s, transform 0.1s;
}
.btn-primary:active { opacity: 0.85; transform: scale(0.99); }
.btn-primary.muted {
  background: #555;
  color: #888;
  cursor: not-allowed;
}
.btn-primary.active {
  background: #ffb81c;
  color: #111;
  cursor: pointer;
}

/* ===== BOOKING ===== */
.booking { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.booking.hidden { display: none !important; }

/* TOP BAR */
.top-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 65px 20px 14px;
  background: #1c1c1c;
}

/* Inline fallback logo shown when image fails */
.top-bar-logo-text {
  display: none;
  flex-direction: column;
  align-items: center;
}
.top-bar-logo-text .logo-sup {
  font-size: 9px;
  font-weight: 700;
  color: rgba(30,20,0,0.6);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1;
  margin-bottom: 2px;
}
.top-bar-logo-text .logo-main {
  font-size: 34px;
  font-weight: 900;
  font-style: italic;
  color: #1a1200;
  line-height: 1;
  letter-spacing: -0.01em;
}

/* Logo image itself */
.top-logo {
  height: 54px;
  object-fit: contain;
}

/* ===== MAP ===== */
.map-wrap {
  margin: 0 16px;
  border-radius: 14px;
  overflow: hidden;
  height: 160px;
  position: relative;
  background: #e8dfc8;
  flex-shrink: 0;
}
.map-canvas { width: 100%; height: 100%; }

/* Yandex iframe map */
.map-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.map-link-btn {
  position: absolute;
  bottom: 8px;
  left: 8px;
  background: rgba(255,255,255,0.92);
  border: none;
  border-radius: 6px;
  padding: 5px 10px;
  font-size: 12px;
  color: #333;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: 500;
  z-index: 2;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}
.map-yandex {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 11px;
  color: #c00;
  font-weight: 600;
  pointer-events: none;
  z-index: 2;
  background: rgba(255,255,255,0.82);
  border-radius: 4px;
  padding: 2px 6px;
}

/* BOOKING BODY */
.booking-body {
  flex: 1;
  padding: 4px 16px 28px;
  display: flex;
  flex-direction: column;
}

.section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  margin: 16px 0 10px;
}

.place-btn {
  width: 100%;
  background: #2a2a2a;
  border: none;
  border-radius: 10px;
  color: #fff;
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 11px 14px;
  margin-bottom: 8px;
  position: relative;
  min-height: 58px;
  justify-content: center;
  transition: background 0.12s;
}
.place-btn:hover { background: #333; }
.place-btn small { font-size: 12px; color: #9a9a9a; margin-bottom: 3px; }
.place-btn b { font-size: 15px; font-weight: 500; }
.place-btn .chevron {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #9a9a9a;
  font-size: 22px;
  font-style: normal;
  line-height: 1;
}

/* ===== TARIFFS ===== */
.tariffs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding-bottom: 6px;
  margin-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.tariffs::-webkit-scrollbar { display: none; }

.tariff {
  flex: 0 0 150px;
  min-width: 150px;
  background: #202020;
  border: 1.5px solid #353535;
  border-radius: 10px;
  padding: 10px 9px 8px;
  cursor: pointer;
  transition: border-color 0.15s;
  position: relative;
  height: 105px;
  text-align: left;
  scroll-snap-align: start;
}
.tariff.active { border-color: #ffb81c; }
.tariff:hover { border-color: #555; }
.tariff-top {
  display: flex;
  top: -23px;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 1;
}
.tariff b { font-size: 17px; font-weight: 700; color: #fff; }
.tariff em {
  font-size: 12px;
  font-style: normal;
  color: #9a9a9a;
  display: flex;
  align-items: center;
  gap: 3px;
}
.tariff small {
  top: -20px;
  display: block;
  font-size: 12px;
  color: #9a9a9a;
  margin-top: 3px;
  position: relative;
  z-index: 1;
}
.tariff img {
  position: absolute;
  bottom: -20px;
  left: 0;
  width: 148px;
  height: 82px;
  object-fit: contain;
  object-position: bottom center;
}
.people-icon { display: block; }

#calcBtn { margin-top: 20px; }

/* ===== BACKDROP ===== */
.sheet-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 20;
}
.sheet-backdrop.visible { display: block; animation: fadeIn 0.2s ease; }

/* ===== SHEET ===== */
.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(100%);
  width: min(520px, 100%);
  max-height: calc(100vh - 60px);
  max-height: calc(100dvh - 60px);
  background: #1f1f1f;
  border-radius: 20px 20px 0 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  z-index: 30;
  padding: 18px 18px 32px;
  transition: transform 0.32s cubic-bezier(0.2,0.9,0.2,1);
  box-shadow: 0 -8px 40px rgba(0,0,0,0.4);
}
.sheet::-webkit-scrollbar { display: none; }
.sheet.open { transform: translateX(-50%) translateY(0); }
.sheet.hidden { display: block !important; pointer-events: none; visibility: hidden; opacity: 0; }
.sheet.open.hidden { display: block !important; pointer-events: auto; visibility: visible; opacity: 1; }

.sheet-close-row { display: flex; justify-content: flex-end; margin-bottom: 6px; }
.close-btn {
  background: none;
  border: none;
  color: #3a7bff;
  font-size: 15px;
  font-family: inherit;
  padding: 4px 0;
}

/* SEARCH */
.search-field {
  width: 100%;
  background: #2a2a2a;
  border: 1.5px solid #444;
  border-radius: 8px;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  padding: 11px 13px;
  outline: none;
  margin-bottom: 8px;
  transition: border-color 0.15s;
}
.search-field:focus { border-color: #ffb81c; }
.search-hint { font-size: 13px; color: #3a7bff; margin-bottom: 12px; }

.suggestion {
  width: 100%;
  background: #2a2a2a;
  border: none;
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 6px;
  text-align: left;
  color: #fff;
  font-family: inherit;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.12s;
}
.suggestion:hover { background: #333; }
.suggestion b { display: block; font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.suggestion small { display: block; font-size: 12px; color: #9a9a9a; }
.suggestion .sug-arrow { color: #9a9a9a; font-size: 20px; flex-shrink: 0; }

/* TELEGRAM ROW */
.tg-row {
  background: #2a2a2a;
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.tg-label { font-size: 14px; color: #9a9a9a; }
.tg-right { display: flex; align-items: center; gap: 8px; }
.tg-input {
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 14px;
  text-align: right;
  outline: none;
  width: 120px;
}

/* QUOTE ROUTE */
.quote-route {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0;
}

/* QUOTE */
.quote-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.quote-price { font-size: 22px; font-weight: 800; color: #ffb81c; }
.quote-price small { display: block; font-size: 13px; color: #9a9a9a; font-weight: 400; margin-top: 2px; }
.quote-car { width: 90px; height: 48px; object-fit: contain; }

.quote-stats { display: flex; gap: 20px; margin: 10px 0 14px; font-size: 14px; color: #9a9a9a; }
.quote-stats b { display: block; font-size: 18px; font-weight: 700; color: #fff; }

.warning-box {
  background: rgba(255,184,28,0.08);
  border: 1px solid rgba(255,184,28,0.2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  display: flex;
  gap: 8px;
}
.warning-box .wi { color: #ffb81c; font-size: 15px; flex-shrink: 0; margin-top: 1px; }
.warning-box p { font-size: 13px; color: #9a9a9a; line-height: 1.45; }

/* FORM ROWS */
.form-row {
  background: #2a2a2a;
  border-radius: 10px;
  padding: 13px 14px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-row-label { font-size: 14px; color: #9a9a9a; }
.form-row-val { font-size: 14px; color: #fff; display: flex; align-items: center; gap: 6px; }

.form-field {
  background: #2a2a2a;
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 10px 14px 12px;
}
.form-field label { font-size: 12px; color: #9a9a9a; display: block; margin-bottom: 4px; }
.form-field input {
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  padding: 0;
  outline: none;
  width: 100%;
}
.form-field input::placeholder { color: #9a9a9a; }

.date-row {
  background: #2a2a2a;
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 10px 14px 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}
.date-row label { font-size: 12px; color: #e05555; display: block; margin-bottom: 4px; cursor: pointer; }
.date-row .date-val { font-size: 15px; }

.promo-row {
  background: #2a2a2a;
  border-radius: 10px;
  margin-bottom: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
}
.promo-row input {
  background: none;
  border: none;
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  flex: 1;
  outline: none;
}
.promo-row input::placeholder { color: #9a9a9a; }
.promo-apply { background: none; border: none; color: #ffb81c; font-family: inherit; font-size: 15px; font-weight: 600; }

/* CALENDAR */
.cal-pop {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0;
  background: #2a2a2a;
  border-radius: 10px;
  padding: 14px;
  z-index: 5;
  box-shadow: 0 8px 32px rgba(0,0,0,0.5);
  animation: fadeIn 0.15s ease;
}
.cal-pop.open { display: block; }
.cal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.cal-nav { background: none; border: none; color: #9a9a9a; font-size: 22px; padding: 4px 10px; cursor: pointer; }
.cal-month-label { font-size: 16px; font-weight: 600; }
.cal-grid { display: grid; grid-template-columns: repeat(7,1fr); gap: 2px; }
.cal-dow { text-align: center; font-size: 12px; color: #9a9a9a; padding: 4px 0; font-weight: 500; }
.cal-dow.we { color: #e05555; }
.cal-day {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  border-radius: 50%;
  cursor: pointer;
  border: none;
  background: none;
  color: #fff;
  font-family: inherit;
  transition: background 0.1s;
}
.cal-day:hover:not(:disabled) { background: #3a3a3a; }
.cal-day.today { border: 1.5px solid #ffb81c; }
.cal-day.selected { background: #ffb81c !important; color: #111; font-weight: 700; }
.cal-day:disabled { color: #555; cursor: default; }
.cal-day.dim { color: #555; }
.cal-day.we { color: #e05555; }
.cal-day.we.selected { color: #111; }

/* SUCCESS */
.success { text-align: center; padding-top: 36px; }
.success-tick { font-size: 72px; color: #1db448; margin-bottom: 16px; animation: popIn 0.4s cubic-bezier(0.2,1.4,0.4,1); }
.success h2 { font-size: 24px; font-weight: 800; line-height: 1.2; margin-bottom: 12px; }
.success p { color: #9a9a9a; font-size: 14px; line-height: 1.6; margin-bottom: 28px; }
.price-box { background: #2a2a2a; border-radius: 12px; padding: 22px; margin: 0 auto 28px; max-width: 240px; }
.price-box b { display: block; font-size: 22px; font-weight: 800; }
.price-box small { color: #9a9a9a; font-size: 13px; margin-top: 4px; display: block; }

/* ADMIN */
.admin { background: #f6f7fb; color: #1e2330; min-height: 100vh; }
.admin header { background: #202020; color: #fff; display: flex; align-items: center; justify-content: space-between; padding: 18px max(18px,calc((100% - 1180px)/2)); gap: 20px; }
.admin header small { display: block; color: #b5b5b5; margin-top: 3px; }
.admin header .btn-primary { width: auto; }
.dashboard { max-width: 1180px; margin: 25px auto; padding: 0 18px; }
.cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 14px; }
.card,.panel { background: #fff; border-radius: 12px; padding: 18px; box-shadow: 0 1px 2px rgba(0,0,0,.06); }
.card span { color: #777; font-size: 13px; }
.card b { display: block; font-size: 26px; margin-top: 8px; }
.grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 16px; margin-top: 16px; }
.panel h2 { margin-top: 0; }
.table-wrap { overflow: auto; }
.admin table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin th,.admin td { text-align: left; padding: 10px 7px; border-bottom: 1px solid #eee; white-space: nowrap; }
.admin input { border: 1px solid #e0e2e8; border-radius: 6px; padding: 7px; width: 100%; font: inherit; }
.settings label { display: block; font-size: 13px; margin: 10px 0 3px; color: #555; }

/* HIDDEN */
.hidden { display: none !important; }

/* ANIMATIONS */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { transform: scale(0.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }

@media (max-width: 700px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .grid { grid-template-columns: 1fr; }
  .admin header { padding: 13px; }
  .admin header .btn-primary { padding: 10px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .sheet { transition: none; }
  * { animation-duration: 0.01ms !important; }
}
