:root {
  color-scheme: light;
  --green: #0f6b48;            /* акцент: текст, ссылки, иконки */
  --green-dark: #0b5539;       /* тёмный акцент для текста на мягком фоне */
  --green-soft: #e7f3ec;
  --green-soft-2: #d9ece2;
  --green-bg: #f0f7f3;
  --accent-bg: #0f6b48;        /* фон основных кнопок (белый текст) */
  --accent-bg-hover: #0b5539;
  --focus-ring: rgba(15, 107, 72, .12);
  --bg: #fff;
  --surface: #fff;             /* карточки, панели, поля */
  --surface-2: #f3f5f7;        /* наведение, нейтральные плашки */
  --surface-3: #eef1f4;
  --chat-bg: #fafbfc;
  --header-bg: rgba(255, 255, 255, .92);
  --ink: #0e1726;
  --text: #1f2937;
  --text-2: #344054;
  --muted: #667085;
  --placeholder: #98a2b3;
  --line: #e4e8ec;
  --line-strong: #d3dbe1;
  --input-border: #d0d5dd;
  --disabled: #c5ccd3;
  --card: var(--surface);
  --star: #f5b301;
  --star-off: #d9dee3;
  --star-soft: #fff6dc;
  --star-ink: #9a6b00;
  --danger: #c0392b;
  --danger-soft: #fdf0ee;
  --danger-line: #f1c7c2;
  --warn: #a86a12;
  --warn-soft: #fff6e5;
  --warn-line: #f1d79f;
  --toast-bg: #0e1726;
  --toast-fg: #fff;
  --backdrop: rgba(14, 23, 38, .45);
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 6px 24px rgba(16, 24, 40, .07);
  --shadow-lg: 0 16px 48px rgba(16, 24, 40, .12);
  --hero-filter: none;
}

/* ---------- Тёмная тема ---------- */
:root[data-theme="dark"] {
  color-scheme: dark;
  --green: #4cc896;
  --green-dark: #86e0b9;
  --green-soft: rgba(76, 200, 150, .14);
  --green-soft-2: rgba(76, 200, 150, .18);
  --green-bg: #121b18;
  --accent-bg: #16885a;
  --accent-bg-hover: #1c9e6a;
  --focus-ring: rgba(76, 200, 150, .22);
  --bg: #0e1318;
  --surface: #161c23;
  --surface-2: #1f262f;
  --surface-3: #27303a;
  --chat-bg: #11161c;
  --header-bg: rgba(14, 19, 24, .88);
  --ink: #eef2f6;
  --text: #d3dae1;
  --text-2: #c3cbd4;
  --muted: #8b97a4;
  --placeholder: #66717e;
  --line: #29313b;
  --line-strong: #3a4450;
  --input-border: #3a4450;
  --disabled: #47515c;
  --star-off: #3a4450;
  --star-soft: rgba(245, 179, 1, .14);
  --star-ink: #f5c84c;
  --danger: #f07467;
  --danger-soft: rgba(240, 116, 103, .1);
  --danger-line: rgba(240, 116, 103, .4);
  --warn: #f0b75a;
  --warn-soft: rgba(240, 183, 90, .12);
  --warn-line: rgba(240, 183, 90, .38);
  --toast-bg: #eef2f6;
  --toast-fg: #0e1726;
  --backdrop: rgba(0, 0, 0, .6);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 6px 24px rgba(0, 0, 0, .35);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, .5);
  --hero-filter: brightness(.68) saturate(.85);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  font-size: 15px;
  transition: background-color .2s, color .2s;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column; min-height: 100vh;
}
main { flex: 1; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 28px; }
.muted { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 24px; border-radius: 10px; border: 1.5px solid transparent;
  font-weight: 600; cursor: pointer; transition: .15s; white-space: nowrap; background: none;
}
.btn--primary { background: var(--accent-bg); color: #fff; }
.btn--primary:hover { background: var(--accent-bg-hover); }
.btn--outline { border-color: var(--green); color: var(--green); background: var(--surface); }
.btn--outline:hover { background: var(--green-soft); }
.btn--ghost { color: var(--muted); }
.btn--ghost:hover { color: var(--ink); background: var(--surface-2); }
.btn--danger { color: var(--danger); border-color: var(--danger-line); background: var(--surface); }
.btn--danger:hover { background: var(--danger-soft); }
.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 9px; }
.btn--block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.plus { font-size: 18px; line-height: 1; font-weight: 500; }
/* Стрелки — собственные рисунки (те же, что icon('arrowRight' | 'arrowLeft' | 'route') в icons.js) */
.arrow, .route-arrow { display: inline-block; flex: none; background: currentColor; vertical-align: -3px;
  -webkit-mask: var(--arrow-img) center / contain no-repeat; mask: var(--arrow-img) center / contain no-repeat; }
.arrow { --arrow-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 12h2.2M8.2 12H19'/%3E%3Cpath d='m13.5 6.5 5.5 5.5-5.5 5.5'/%3E%3C/svg%3E"); width: 18px; height: 18px; transition: transform .18s ease; }
.arrow--back { --arrow-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12h-2.2M15.8 12H5'/%3E%3Cpath d='m10.5 6.5-5.5 5.5 5.5 5.5'/%3E%3C/svg%3E"); }
.btn:hover .arrow, .link:hover .arrow, a:hover > .arrow { transform: translateX(3px); }
.back:hover .arrow--back { transform: translateX(-3px); }
.back { align-items: center; }
.back .arrow { width: 17px; height: 17px; }
.route-arrow { --arrow-img: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 12h1.6M6.6 12h1.6M10.7 12H20'/%3E%3Cpath d='m15.5 7.5 4.5 4.5-4.5 4.5'/%3E%3C/svg%3E"); width: 22px; height: 16px; margin: 0 8px; vertical-align: -2px; color: var(--green); opacity: .9; }
.detail__title .route-arrow { width: 30px; height: 22px; margin: 0 10px; vertical-align: -1px; }
.page-title .route-arrow, h2 .route-arrow { width: 26px; height: 18px; }
.ride__meta .route-arrow, .admin-table .route-arrow, .report__target .route-arrow, .seo-links .route-arrow { width: 16px; height: 12px; margin: 0 5px; vertical-align: -1px; }

/* ---------- Шапка ---------- */
.header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.header.scrolled { border-bottom-color: var(--line); }
.header__inner { display: flex; align-items: center; height: 76px; gap: 40px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-size: 25px; font-weight: 800; color: var(--ink); letter-spacing: -.5px; }
.logo b { color: var(--green); font-weight: 800; }
.logo__car { width: 40px; height: 24px; color: var(--green); }
.logo--small { font-size: 19px; }
.nav { display: flex; gap: 30px; font-size: 15px; font-weight: 500; color: var(--text-2); }
.nav a { white-space: nowrap; }
.nav a:hover, .nav a.active { color: var(--green); }
.header__actions { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.lang { position: relative; }
.lang__btn { display: inline-flex; align-items: center; gap: 4px; background: none; border: 0; cursor: pointer; font-size: 14px; font-weight: 500; color: var(--text-2); padding: 6px 4px; }
.lang__btn svg { width: 14px; height: 14px; color: var(--muted); }
.lang__btn:hover { color: var(--green); }
.lang__drop { position: absolute; right: 0; top: calc(100% + 8px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 160px; display: none; z-index: 60; }
.lang.open .lang__drop { display: block; }
.lang__drop button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; font-size: 14px; }
.lang__drop button:hover { background: var(--surface-2); }
.lang__drop button.active { color: var(--green); font-weight: 600; background: var(--green-soft); }
.user-btn { display: inline-flex; align-items: center; gap: 10px; background: none; border: 0; cursor: pointer; font-weight: 500; padding: 0; }
.user-btn__icon { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-2); display: grid; place-items: center; }
.user-btn__icon svg { width: 18px; height: 18px; }
.user-menu { position: relative; }
.user-menu__drop {
  position: absolute; right: 0; top: calc(100% + 10px); background: var(--surface); border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 190px; display: none;
}
.user-menu.open .user-menu__drop { display: block; }
.user-menu__drop a, .user-menu__drop button { display: block; width: 100%; text-align: left; padding: 10px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; }
.user-menu__drop a:hover, .user-menu__drop button:hover { background: var(--surface-2); }
.nav__offer { display: none; }
.burger { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.burger span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; }
.hero__img {
  position: absolute; top: 0; right: 0; width: 64%; height: 100%;
  background: url('/hero.svg') center / cover no-repeat;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%);
  mask-image: linear-gradient(to right, transparent 0%, #000 30%);
}
.hero__img::after { content: ''; position: absolute; inset: auto 0 0 0; height: 40%; background: linear-gradient(to top, var(--bg), transparent); }
.hero__content { position: relative; padding-top: 54px; padding-bottom: 36px; }
.hero h1 { font-size: clamp(38px, 5.4vw, 72px); line-height: 1.04; letter-spacing: -2px; font-weight: 800; color: var(--ink); margin: 0; max-width: 640px; }
.hero__sub { font-size: 20px; color: var(--muted); margin: 18px 0 40px; }

/* ---------- Форма поиска ---------- */
.search {
  display: flex; align-items: center; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--line); padding: 10px 14px 10px 10px; max-width: 1035px;
}
.search__field { flex: 1; display: flex; align-items: center; gap: 14px; padding: 8px 18px; position: relative; min-width: 0; }
.search__field + .search__field::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 1px; background: var(--line); }
.search__field svg.ico { width: 24px; height: 24px; color: var(--green); flex: none; }
.search__field label { display: block; font-size: 13px; color: var(--muted); line-height: 1.2; }
.search__field input, .search__field select {
  border: 0; outline: 0; padding: 2px 0 0; width: 100%; font-size: 17px; font-weight: 500; color: var(--ink); background: transparent;
  appearance: none; -webkit-appearance: none; cursor: pointer;
}
.search__field input::placeholder { color: var(--placeholder); font-weight: 400; }
.search__field input[type=date]::-webkit-calendar-picker-indicator { opacity: 0; position: absolute; inset: 0; width: 100%; cursor: pointer; }
.search__field .chev { width: 16px; height: 16px; color: var(--muted); flex: none; margin-left: auto; pointer-events: none; }
.search__field .grow { flex: 1; min-width: 0; }
.search .btn { height: 52px; padding: 0 30px; font-size: 16px; margin-left: 8px; }

/* ---------- Секции ---------- */
.section { padding-top: 28px; padding-bottom: 24px; }
.section__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; gap: 16px; }
.section__head h2, .page-title { font-size: 32px; letter-spacing: -.8px; color: var(--ink); margin: 0; font-weight: 800; }
.link { color: var(--green); font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; white-space: nowrap; }
.link:hover { text-decoration: underline; }

/* ---------- Карточки поездок ---------- */
.rides { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.ride {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 16px;
  box-shadow: var(--shadow-sm); transition: .15s; display: flex; flex-direction: column; cursor: pointer;
}
.ride:hover { box-shadow: var(--shadow); border-color: var(--line-strong); transform: translateY(-1px); }
.ride__top { display: flex; justify-content: space-between; gap: 10px; }
.ride__title { font-size: 18px; font-weight: 700; color: var(--ink); }
.ride__title .to { margin: 0 8px; }
.ride__date { color: var(--muted); font-size: 14px; }
.ride__price { font-size: 24px; font-weight: 800; color: var(--green); white-space: nowrap; }
.timeline { margin: 14px 0 14px; position: relative; padding-left: 24px; font-size: 14px; }
.timeline::before { content: ''; position: absolute; left: 5px; top: 9px; bottom: 9px; width: 2px; background: var(--green); }
.timeline__pt { position: relative; margin-bottom: 6px; }
.timeline__pt:last-child { margin-bottom: 0; }
.timeline__pt::before { content: ''; position: absolute; left: -24px; top: 5px; width: 8px; height: 8px; border: 2px solid var(--green); background: var(--surface); border-radius: 50%; }
.timeline__pt.stop::before { width: 6px; height: 6px; left: -23px; top: 6px; background: var(--green); }
.timeline__city { font-weight: 600; color: var(--ink); }
.timeline__time { color: var(--muted); font-size: 13px; }
.ride__bottom { margin-top: auto; border-top: 1px solid var(--line); padding-top: 14px; display: flex; align-items: center; gap: 12px; }
.ride__driver { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.ride__driver-name { font-weight: 600; color: var(--ink); }
.ride__meta { font-size: 13px; color: var(--muted); }
.ride__right { text-align: right; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.ride__seats { font-size: 14px; color: var(--ink); }
.ride__seats.full { color: var(--danger); }
.badge { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; background: var(--green-soft); color: var(--green); }
.badge--gray { background: var(--surface-2); color: var(--muted); }

.avatar { width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 17px; flex: none; }
.avatar--lg { width: 64px; height: 64px; font-size: 24px; }
.avatar--sm { width: 34px; height: 34px; font-size: 13px; }

.empty { text-align: center; padding: 50px 20px; border: 1.5px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty h3 { color: var(--ink); margin: 0 0 6px; }
.empty .btn { margin-top: 16px; }

/* ---------- Преимущества ---------- */
.features { background: var(--green-bg); margin-top: 48px; padding: 44px 0; }
.features__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.feature { display: flex; gap: 20px; align-items: flex-start; }
.feature__ico { width: 58px; height: 58px; border-radius: 50%; background: var(--green-soft-2); display: grid; place-items: center; flex: none; color: var(--green); }
.feature__ico svg { width: 28px; height: 28px; }
.feature h3 { margin: 6px 0 6px; font-size: 16px; color: var(--ink); }
.feature p { margin: 0; color: var(--muted); font-size: 14px; max-width: 250px; }

/* ---------- Страницы ---------- */
.page { padding-top: 36px; padding-bottom: 60px; }
.page .search { margin: 20px 0 30px; box-shadow: var(--shadow); }
.back { display: inline-flex; gap: 6px; color: var(--muted); font-weight: 500; margin-bottom: 18px; }
.back:hover { color: var(--green); }
.results-count { color: var(--muted); margin: -10px 0 18px; }

.detail { display: grid; grid-template-columns: 1fr 360px; gap: 24px; align-items: start; }
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.panel + .panel { margin-top: 16px; }
.panel h3 { margin: 0 0 14px; font-size: 17px; color: var(--ink); }
.detail__title { font-size: 30px; font-weight: 800; letter-spacing: -.6px; color: var(--ink); margin: 0 0 4px; }
.detail .timeline { font-size: 16px; margin: 22px 0 6px; }
.detail .timeline__pt { margin-bottom: 18px; }
.detail .timeline__pt::before { top: 6px; }
.kv { display: grid; grid-template-columns: 140px 1fr; gap: 10px 16px; font-size: 15px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink); font-weight: 500; }
.book__price { font-size: 34px; font-weight: 800; color: var(--green); }
.book__price small { font-size: 15px; color: var(--muted); font-weight: 500; }
.book__row { display: flex; align-items: center; justify-content: space-between; margin: 16px 0; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; }
.stepper button { width: 38px; height: 38px; border: 0; background: none; cursor: pointer; font-size: 20px; color: var(--green); }
.stepper button:disabled { color: var(--disabled); cursor: default; }
.stepper span { min-width: 30px; text-align: center; font-weight: 600; }
.note { font-size: 13px; color: var(--muted); margin-top: 12px; }
.success { background: var(--green-soft); color: var(--green-dark); border-radius: 10px; padding: 12px 14px; font-weight: 500; margin-bottom: 14px; }
.person { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.person + .person { border-top: 1px solid var(--line); }
.person__name { font-weight: 600; color: var(--ink); }
.phone { color: var(--green); font-weight: 600; }
.driver-card { display: flex; gap: 16px; align-items: center; }

/* ---------- Формы ---------- */
.form-card { max-width: 720px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
.form-grid .full { grid-column: 1 / -1; }
.field label { display: block; font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; height: 46px; border: 1px solid var(--input-border); border-radius: 10px; padding: 0 14px; background: var(--surface); outline: 0; transition: .15s;
}
.field textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--focus-ring); }
.field .hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.stops { display: flex; flex-direction: column; gap: 8px; }
.stops__row { display: flex; gap: 8px; }
.stops__row .btn { height: 46px; padding: 0 14px; }
.error { color: var(--danger); font-size: 14px; margin-top: 12px; min-height: 1em; }
.form-actions { display: flex; gap: 12px; margin-top: 22px; align-items: center; }
.price-hint { background: var(--green-bg); border-radius: 10px; padding: 12px 14px; font-size: 14px; color: var(--green-dark); }

/* ---------- Вкладки ---------- */
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 10px; padding: 4px; margin: 18px 0 22px; }
.tabs button { border: 0; background: none; padding: 8px 18px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--muted); }
.tabs button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(16,24,40,.1); }

/* ---------- Как это работает ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 26px; }
.step { background: var(--green-bg); border-radius: var(--radius); padding: 26px; }
.step__n { width: 38px; height: 38px; border-radius: 50%; background: var(--accent-bg); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 14px; }
.step h3 { margin: 0 0 6px; color: var(--ink); }
.step p { margin: 0; color: var(--muted); }
.lead { font-size: 18px; color: var(--muted); max-width: 680px; }

/* ---------- Модалка и тост ---------- */
.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; }
.modal__backdrop { position: absolute; inset: 0; background: var(--backdrop); }
.modal__box { position: relative; background: var(--surface); border-radius: 18px; padding: 30px; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); max-height: 92vh; overflow: auto; }
.modal__box h2 { margin: 0 0 6px; color: var(--ink); font-size: 24px; }
.modal__box .field { margin-top: 14px; }
.modal__close { position: absolute; right: 14px; top: 10px; border: 0; background: none; font-size: 28px; color: var(--muted); cursor: pointer; }
.modal__switch { text-align: center; margin-top: 16px; font-size: 14px; color: var(--muted); }
.modal__switch button { border: 0; background: none; color: var(--green); font-weight: 600; cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--toast-bg); color: var(--toast-fg); padding: 12px 20px; border-radius: 10px; z-index: 200; box-shadow: var(--shadow-lg); font-weight: 500; }

.footer { border-top: 1px solid var(--line); padding: 26px 0; font-size: 14px; }
.footer__inner { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.footer__inner p { margin: 0; }
.footer__inner p:last-child { margin-left: auto; }

.loader { padding: 60px; text-align: center; color: var(--muted); }

/* ---------- Адаптив ---------- */
@media (max-width: 1180px) {
  .nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--surface); flex-direction: column; gap: 0; padding: 8px 20px 16px; border-bottom: 1px solid var(--line); box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; }
  .nav .nav__my[hidden] { display: none !important; }
  .burger { display: block; }
  .nav .nav__offer { display: block; color: var(--green); font-weight: 600; }
  .nav .nav__msgs[hidden] { display: none !important; }
}
@media (max-width: 1080px) {
  .rides { grid-template-columns: repeat(2, 1fr); }
  .detail { grid-template-columns: 1fr; }
  .detail aside { position: static !important; }
  .header__inner { gap: 24px; }
}
@media (max-width: 900px) {
  .search { flex-direction: column; align-items: stretch; padding: 10px; gap: 8px; box-shadow: var(--shadow); }
  .search__field { border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; }
  .search__field + .search__field::before { display: none; }
  .search .btn { margin: 4px 0 0; }
  .hero__img { width: 100%; height: 300px; opacity: .35; -webkit-mask-image: linear-gradient(to bottom, #000 40%, transparent); mask-image: linear-gradient(to bottom, #000 40%, transparent); }
  .features__grid, .steps { grid-template-columns: 1fr; gap: 22px; }
  .header__actions > .btn { display: none; }
  .header__actions { gap: 12px; }
  .user-btn__label { display: none; }
}
@media (max-width: 640px) {
  .container { padding: 0 18px; }
  .header__inner { height: 64px; }
  .nav { top: 64px; }
  .logo { font-size: 21px; }
  .logo__car { width: 32px; }
  .rides { grid-template-columns: 1fr; }
  .hero__content { padding-top: 30px; }
  .hero__sub { font-size: 16px; margin-bottom: 24px; }
  .section__head h2, .page-title { font-size: 24px; }
  .section__head .link .arrow { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .kv dd { margin-bottom: 8px; }
  .footer__inner p:last-child { margin-left: 0; }
}

/* ---------- Рейтинг и отзывы ---------- */
.rating { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; color: var(--ink); white-space: nowrap; }
.rating b { font-weight: 600; }
.rating .star { width: 16px; height: 16px; fill: var(--star); }
.rating--new { color: var(--muted); font-size: 13px; }
.stars { display: inline-flex; gap: 2px; flex: none; }
.stars .star { width: 15px; height: 15px; fill: var(--star-off); }
.stars .on .star { fill: var(--star); }
.stars--lg .star { width: 20px; height: 20px; }
.stars--input { gap: 6px; }
.stars--input button { background: none; border: 0; padding: 2px; cursor: pointer; line-height: 0; transition: transform .1s; }
.stars--input button:hover { transform: scale(1.12); }
.stars--input .star { width: 34px; height: 34px; fill: var(--star-off); }
.stars--input button.on .star { fill: var(--star); }
.badge--star { background: var(--star-soft); color: var(--star-ink); }
.review { padding: 14px 0; }
.review + .review { border-top: 1px solid var(--line); }
.review__head { display: flex; align-items: center; gap: 12px; }
.review__text { margin: 10px 0 0; white-space: pre-line; color: var(--text); }
.driver-card:hover .person__name { color: var(--green); }
.score { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.score__num { font-size: 48px; font-weight: 800; color: var(--ink); letter-spacing: -1px; line-height: 1; }
.dist__row { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 6px 0; }
.dist__row .star { width: 14px; height: 14px; fill: var(--star); }
.dist__row > span:first-child { width: 10px; text-align: right; }
.dist__row > span:last-child { width: 26px; text-align: right; }
.dist__bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.dist__bar i { display: block; height: 100%; background: var(--star); border-radius: 99px; }

/* ---------- Чат ---------- */
.count-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--danger); color: #fff; font-size: 12px; font-weight: 700; margin-left: 6px; line-height: 1; }
.nav__msgs { display: inline-flex; align-items: center; }
.user-btn.has-unread .avatar { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--danger); }
.ask { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; padding: 14px 16px; background: var(--green-bg); border-radius: 10px; font-size: 14px; flex-wrap: wrap; }
.person .btn { margin-left: 10px; }
.conv { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 10px; }
.conv:hover { background: var(--surface-2); }
.conv + .conv { border-top: 1px solid var(--line); }
.conv__main { flex: 1; min-width: 0; }
.conv__top { display: flex; align-items: baseline; gap: 6px; }
.conv__role { font-size: 13px; }
.conv__time { margin-left: auto; font-size: 13px; white-space: nowrap; }
.conv__last { margin-top: 3px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.conv--unread .conv__last { font-weight: 600; color: var(--ink); }
.chat-page { max-width: 860px; }
.chat { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.chat__head { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.chat__body { height: min(60vh, 560px); overflow-y: auto; padding: 18px; background: var(--chat-bg); display: flex; flex-direction: column; gap: 6px; }
.chat__empty { margin: auto; color: var(--muted); }
.chat__day { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface-3); padding: 3px 10px; border-radius: 99px; margin: 8px 0; }
.msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 75%; }
.msg--mine { align-self: flex-end; align-items: flex-end; }
.msg__bubble { background: var(--surface); border: 1px solid var(--line); padding: 9px 13px; border-radius: 16px 16px 16px 4px; white-space: pre-wrap; word-break: break-word; }
.msg--mine .msg__bubble { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; border-radius: 16px 16px 4px 16px; }
.msg__time { font-size: 11px; color: var(--muted); margin: 2px 4px 0; }
.chat__form { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); align-items: flex-end; }
.chat__form textarea { flex: 1; resize: none; border: 1px solid var(--input-border); border-radius: 10px; padding: 12px 14px; min-height: 48px; max-height: 140px; outline: 0; line-height: 1.4; }
.chat__form textarea:focus { border-color: var(--green); box-shadow: 0 0 0 4px var(--focus-ring); }
@media (max-width: 640px) {
  .chat__send-label { display: none; }
  .chat__form .btn { padding: 0 16px; }
  .msg { max-width: 88%; }
  .chat__head .btn { display: none; }
}

/* ---------- Переключатель темы ---------- */
.theme-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--surface-2); color: var(--text-2); display: grid; place-items: center; cursor: pointer; transition: .15s; flex: none; }
.theme-btn:hover { color: var(--green); }
.theme-btn svg { width: 18px; height: 18px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
.hero__img { filter: var(--hero-filter); }
:root[data-theme="dark"] .avatar { filter: saturate(.85); }
@media (max-width: 440px) {
  .header__actions { gap: 6px; }
  .logo { font-size: 19px; gap: 7px; }
  .logo__car { width: 28px; }
  .lang__btn { padding: 6px 2px; }
}

/* =====================================================================
   Новые функции: редактирование, бронь с подтверждением, предпочтения,
   карта, профиль, уведомления, жалобы, админка, PWA, SEO-страницы
   ===================================================================== */
.back { background: none; border: 0; padding: 0; cursor: pointer; font: inherit; }
img.avatar { object-fit: cover; background: var(--surface-2); }
.avatar--xl { width: 84px; height: 84px; font-size: 32px; }
.ico--sm { width: 18px !important; height: 18px !important; vertical-align: -4px; }
.icon-btn { background: none; border: 0; padding: 4px; cursor: pointer; color: var(--muted); line-height: 0; border-radius: 6px; flex: none; }
.icon-btn:hover { color: var(--danger); background: var(--surface-2); }
.icon-btn svg, .link-btn svg, .btn svg:not(.ico) { width: 16px; height: 16px; flex: none; }
.link-btn { background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--green); font-weight: 600; font-size: 14px; display: inline-flex; align-items: center; gap: 6px; font-family: inherit; }
.link-btn:hover { text-decoration: underline; }
.danger, .link-btn.danger, .btn--ghost.danger { color: var(--danger); }
.sep { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }
.narrow { max-width: 820px; }
.alert { background: var(--danger-soft); border: 1px solid var(--danger-line); color: var(--danger); border-radius: 10px; padding: 12px 14px; margin-bottom: 16px; font-weight: 500; }
.alert--info { background: var(--green-bg); border-color: var(--green-soft-2); color: var(--green-dark); font-weight: 400; font-size: 14px; }
.success--wait { background: var(--star-soft); color: var(--star-ink); }
.panel--accent { border-color: var(--star); box-shadow: 0 0 0 3px var(--star-soft); }
.panel--danger { border-color: var(--danger-line); }
.panel--flush { padding: 0; overflow: hidden; }
.rides--past { opacity: .7; }

/* Предпочтения и фильтры */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 4px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 6px 11px; border-radius: 99px; background: var(--surface-2); color: var(--text); border: 1px solid transparent; white-space: nowrap; }
.chip--instant, .chip--womenOnly { background: var(--green-soft); color: var(--green-dark); }
.chip--toggle { cursor: pointer; border-color: var(--line); background: var(--surface); font: inherit; font-size: 14px; }
.chip--toggle:hover { border-color: var(--green); }
.chip--toggle.on { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: -14px 0 26px; }
.pref-icons { display: flex; gap: 8px; margin: -4px 0 12px; font-size: 15px; }
.subscribe { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; background: var(--green-bg); border: 1px solid var(--green-soft-2); border-radius: var(--radius); padding: 16px 18px; margin: 0 0 18px; }
.rides + .subscribe { margin-top: 22px; }

/* Страница поездки */
.ride-head { display: flex; justify-content: space-between; gap: 12px; }
.countdown { color: var(--green); font-weight: 600; }
.ride-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.ride-actions .btn { padding: 0 12px; }
.ride-map { height: 300px; background: var(--surface-2); z-index: 0; }
.meeting { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-top: 1px solid var(--line); }
.meeting .ico { color: var(--green); width: 24px; height: 24px; }
.book-panel { position: sticky; top: 96px; }
.car-photo { margin: 16px 0 0; }
.car-photo img { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; display: block; }
.car-photo figcaption { font-size: 13px; margin-top: 6px; }
.user-ratings { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.user-ratings > span { display: inline-flex; align-items: center; gap: 6px; }
.dropdown { position: relative; display: inline-block; }
.dropdown__menu { position: absolute; left: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; min-width: 200px; display: none; z-index: 30; }
.dropdown.open .dropdown__menu { display: block; }
.dropdown__menu a, .dropdown__menu button { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.dropdown__menu a:hover, .dropdown__menu button:hover { background: var(--surface-2); }
.share-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.share-grid .btn:last-child { grid-column: 1 / -1; }

/* Карта (Leaflet) */
.map-dot { display: block; width: 18px; height: 18px; border-radius: 50%; background: var(--surface); border: 4px solid var(--green); box-shadow: var(--shadow-sm); }
.map-dot--end { background: var(--green); border-color: var(--surface); box-shadow: 0 0 0 2px var(--green); }
.map-pin { display: block; width: 28px; height: 36px; background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 28 36'%3E%3Cpath d='M14 1C7 1 1.5 6.4 1.5 13.3 1.5 22.5 14 35 14 35s12.5-12.5 12.5-21.7C26.5 6.4 21 1 14 1z' fill='%23c0392b' stroke='%23fff' stroke-width='2'/%3E%3Ccircle cx='14' cy='13' r='4.5' fill='%23fff'/%3E%3C/svg%3E"); }
.picker-map { height: 320px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); margin-top: 10px; z-index: 0; }
.meet-tools { display: flex; gap: 16px; align-items: center; margin-top: 10px; }
.leaflet-container { font: inherit; background: var(--surface-2); }
:root[data-theme="dark"] .leaflet-tile-pane { filter: invert(1) hue-rotate(180deg) brightness(.85) contrast(.9); }
:root[data-theme="dark"] .leaflet-control-attribution { background: rgba(22, 28, 35, .8) !important; color: var(--muted); }
:root[data-theme="dark"] .leaflet-control-attribution a { color: var(--green); }
:root[data-theme="dark"] .leaflet-bar a { background: var(--surface); color: var(--ink); border-color: var(--line); }

/* Форма поездки */
.panel .form-section { margin: 30px 0 12px; font-size: 16px; color: var(--ink); padding-top: 22px; border-top: 1px solid var(--line); }
.panel .form-section:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.picker-map + .hint { margin-top: 6px; }
.radio-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.radio-card { display: flex; gap: 10px; align-items: flex-start; border: 1.5px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.radio-card:has(input:checked) { border-color: var(--green); background: var(--green-bg); }
.radio-card input { margin-top: 3px; accent-color: var(--green); }
.radio-card b { display: block; color: var(--ink); }
.radio-card small { color: var(--muted); font-size: 13px; }
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.check { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 99px; padding: 8px 14px; cursor: pointer; font-size: 14px; }
.check:has(input:checked) { border-color: var(--green); background: var(--green-soft); color: var(--green-dark); }
.check input { accent-color: var(--green); }
.check--disabled { opacity: .5; cursor: not-allowed; }
.field input[readonly] { background: var(--surface-2); color: var(--muted); }

/* Уведомления, подписки */
.notif { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 10px; }
.notif + .notif { border-top: 1px solid var(--line); }
.notif:hover { background: var(--surface-2); }
.notif--unread { background: var(--green-bg); }
.notif--unread .notif__text { font-weight: 600; color: var(--ink); }
.notif__ico { font-size: 18px; line-height: 1.3; }
.notif__text { flex: 1; }
.notif__time { font-size: 13px; white-space: nowrap; }
.sub-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; }
.sub-row + .sub-row { border-top: 1px solid var(--line); }
.bell { position: relative; }
.bell__badge { position: absolute; top: -4px; right: -6px; margin: 0; min-width: 18px; height: 18px; font-size: 11px; padding: 0 5px; }

/* Профиль */
.photo-row { display: flex; align-items: center; gap: 18px; }
.photo-pick { position: relative; cursor: pointer; flex: none; }
.photo-pick__badge { position: absolute; right: -2px; bottom: -2px; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-bg); color: #fff; display: grid; place-items: center; border: 2px solid var(--surface); }
.photo-pick__badge svg { width: 16px; height: 16px; }
label.btn { cursor: pointer; }

/* Чат: жалоба на сообщение */
.msg__row { display: flex; align-items: center; gap: 4px; }
.msg--mine .msg__row { flex-direction: row-reverse; }
.msg__flag { opacity: 0; background: none; border: 0; cursor: pointer; color: var(--muted); padding: 4px; line-height: 0; transition: opacity .15s; }
.msg__flag svg { width: 14px; height: 14px; }
.msg:hover .msg__flag, .msg__flag:focus { opacity: 1; }
.msg__flag:hover { color: var(--danger); }
.msg__bubble--hidden { color: var(--muted); font-style: italic; }
@media (hover: none) { .msg__flag { opacity: .6; } }

/* Админ-панель */
.admin-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin: 22px 0 6px; }
.admin-stats .panel { padding: 14px 16px; margin: 0; }
.admin-stats b, .seo-stats b { display: block; font-size: 24px; color: var(--ink); margin-top: 2px; }
.admin-search { display: flex; gap: 10px; margin-bottom: 14px; }
.admin-search input { flex: 1; height: 40px; border: 1px solid var(--input-border); border-radius: 10px; padding: 0 14px; background: var(--surface); outline: 0; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th { text-align: left; color: var(--muted); font-weight: 500; padding: 10px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.admin-table .is-blocked td { background: var(--danger-soft); }
.admin-table .is-past td { color: var(--muted); }
.admin-table a { color: var(--green); font-weight: 600; }
.report__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.report__target { margin-top: 10px; padding: 12px 14px; background: var(--surface-2); border-radius: 10px; }
.report__target a { color: var(--green); font-weight: 600; }
.admin-quote { margin: 10px 0 0; padding-left: 12px; border-left: 3px solid var(--line-strong); white-space: pre-wrap; }
.modal__box--wide { max-width: 560px; }

/* Шапка: колокольчик, тема в меню */
.nav__theme { display: none; }
.footer__links { display: flex; gap: 16px; flex-wrap: wrap; }
.footer__links a { color: var(--muted); }
.footer__links a:hover { color: var(--green); }

/* Правовые страницы */
.legal { max-width: 820px; }
.legal h2 { font-size: 19px; margin: 28px 0 8px; color: var(--ink); }
.legal p { color: var(--text); }

/* SEO-страницы маршрутов */
.seo-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 24px 0 6px; }
.seo-stats .panel { padding: 14px 16px; margin: 0; }
.seo-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 44px; padding-top: 28px; border-top: 1px solid var(--line); }
.seo-links h3 { font-size: 15px; margin: 0 0 10px; color: var(--ink); }
.seo-links a { display: block; color: var(--green); padding: 3px 0; font-size: 14px; }
.seo-langs { display: flex; gap: 4px; }
.seo-langs a { padding: 6px 8px; border-radius: 8px; font-size: 14px; font-weight: 500; color: var(--text-2); }
.seo-langs a.active { background: var(--green-soft); color: var(--green); }
a.ride { color: inherit; }

@media (max-width: 1180px) {
  .nav .nav__theme { display: block; background: none; border: 0; text-align: left; padding: 12px 0; font: inherit; color: var(--text-2); cursor: pointer; }
}
@media (max-width: 1080px) {
  .admin-stats { grid-template-columns: repeat(3, 1fr); }
  .book-panel { position: static; }
}
@media (max-width: 640px) {
  .radio-cards, .seo-links { grid-template-columns: 1fr; }
  .seo-stats { grid-template-columns: 1fr 1fr; }
  .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-table { display: block; overflow-x: auto; white-space: nowrap; }
  .ride-map { height: 230px; }
  .person { flex-wrap: wrap; }
  .seo-hide-sm { display: none; }
}
@media (max-width: 440px) {
  .theme-btn#themeBtn { display: none; }
  .bell { width: 34px; height: 34px; }
}

/* Мобильная панель бронирования внизу экрана */
.book-bar { display: none; }
@media (max-width: 1080px) {
  .book-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 24px rgba(0,0,0,.08); padding: 10px 18px calc(10px + env(safe-area-inset-bottom)); }
  .book-bar b { font-size: 20px; color: var(--green); display: block; line-height: 1.1; }
  .book-bar small { color: var(--muted); font-size: 13px; }
  .has-book-bar { padding-bottom: 76px; }
}

/* Шапка на средних экранах: без имени у аватара, плотнее меню */
@media (max-width: 1360px) {
  .user-menu .user-btn__label { display: none; }
  .nav { gap: 24px; }
  .header__actions { gap: 14px; }
}

/* Автомобиль: цвет и госномер */
.color-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-right: 6px; vertical-align: -1px; box-shadow: inset 0 0 0 1px rgba(0,0,0,.25); }
.plate-input { text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
/* Госномер рисуется как настоящая табличка — белая в обеих темах */
.plate { display: inline-flex; align-items: center; gap: 6px; font-family: 'Inter', sans-serif; font-weight: 700; letter-spacing: .08em;
  background: #fff; color: #111; border: 2px solid #1b1e22; border-radius: 6px; padding: 2px 10px; overflow: hidden; }
.plate--lt { padding-left: 0; }
.plate--lt::before { content: 'LT'; background: #1e4fa8; color: #fff; font-size: 10px; letter-spacing: 0; padding: 4px 4px; align-self: stretch; display: grid; place-items: center; }

/* =====================================================================
   Иконки, выпадающие списки, подсказки, чекбоксы и радиокнопки в стиле сайта
   ===================================================================== */
:root {
  --pi-instant: #d98a00; --pi-manual: #0f6b48; --pi-pets: #a2622d; --pi-nonsmoking: #c8402f; --pi-smoking: #7d6a5a;
  --pi-luggage: #2f6fc4; --pi-music: #8150c2; --pi-womenOnly: #c9457f; --pi-bell: #d98a00;
}
:root[data-theme="dark"] {
  --pi-instant: #f5b544; --pi-manual: #4cc896; --pi-pets: #d99a63; --pi-nonsmoking: #f07467; --pi-smoking: #b8a594;
  --pi-luggage: #6fa6f0; --pi-music: #b48af0; --pi-womenOnly: #f08ab6; --pi-bell: #f5b544;
}
.pi { width: 20px; height: 20px; flex: none; vertical-align: -5px; }
.pi .d { fill: currentColor; fill-opacity: .16; }
.pi--instant { color: var(--pi-instant); } .pi--manual { color: var(--pi-manual); } .pi--pets { color: var(--pi-pets); }
.pi--nonsmoking { color: var(--pi-nonsmoking); } .pi--smoking { color: var(--pi-smoking); } .pi--luggage { color: var(--pi-luggage); }
.pi--music { color: var(--pi-music); } .pi--womenOnly { color: var(--pi-womenOnly); } .pi--bell { color: var(--pi-bell); }
.pi--approved, .pi--ticket, .pi--edit, .pi--pin, .pi--city, .pi--history, .pi--people, .pi--bus, .pi--train, .pi--locate, .pi--lock { color: var(--green); }
.pi--cancelled, .pi--rejected { color: var(--danger); }
.pi--undo { color: var(--muted); }
.chip .pi { width: 18px; height: 18px; }
.pref-icons { gap: 6px; }
.pref-icons > span { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; }
.pref-icons .pi { width: 19px; height: 19px; }
.notif__ico .pi { width: 24px; height: 24px; }
.notif__ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-2); display: grid; place-items: center; flex: none; }
.notif--unread .notif__ico { background: var(--surface); }
.subscribe__text { display: flex; gap: 12px; align-items: flex-start; }
.subscribe__text > .pi { width: 26px; height: 26px; margin-top: 2px; }
.hint--icon { display: flex; gap: 6px; align-items: flex-start; }
.hint--icon .pi { width: 16px; height: 16px; margin-top: 1px; }
.meeting__ico .pi { width: 28px; height: 28px; }
.radio-card b { display: flex; align-items: center; gap: 6px; }
.check .pi { width: 19px; height: 19px; }
.empty > .pi { width: 22px; height: 22px; vertical-align: -5px; }

/* ---------- Выпадающий список ---------- */
.dd { position: relative; }
.dd__native { position: absolute !important; opacity: 0; pointer-events: none; width: 1px !important; height: 1px !important; }
.dd__btn {
  width: 100%; height: 46px; display: flex; align-items: center; gap: 10px; text-align: left; cursor: pointer;
  border: 1px solid var(--input-border); border-radius: 10px; padding: 0 12px 0 14px; background: var(--surface); color: var(--ink); font: inherit; transition: .15s;
}
.dd__btn:hover { border-color: var(--line-strong); }
.dd__btn:focus-visible, .dd.open .dd__btn { outline: 0; border-color: var(--green); box-shadow: 0 0 0 4px var(--focus-ring); }
.dd__btn:disabled { background: var(--surface-2); color: var(--muted); cursor: not-allowed; }
.dd__val { flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px; white-space: nowrap; overflow: hidden; }
.dd__val .dd__text { overflow: hidden; text-overflow: ellipsis; }
.dd__val.is-ph { color: var(--placeholder); }
.dd__chev { width: 16px; height: 16px; color: var(--muted); flex: none; transition: transform .15s; }
.dd.open .dd__chev { transform: rotate(180deg); }
.dd .color-dot, .dd__list .color-dot { width: 14px; height: 14px; margin: 0; flex: none; }

.dd__list {
  position: fixed; z-index: 2000; background: var(--surface); border: 1px solid var(--line); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 6px; overflow-y: auto; overscroll-behavior: contain; max-width: min(460px, calc(100vw - 16px));
  animation: dd-in .12s ease-out;
}
@keyframes dd-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
.dd__opt { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; cursor: pointer; color: var(--text); font-size: 15px; }
.dd__opt.is-act { background: var(--surface-2); }
.dd__opt.is-sel { color: var(--green-dark); font-weight: 600; background: var(--green-soft); }
.dd__opt.is-sel.is-act { background: var(--green-soft-2); }
.dd__opt.is-dis { opacity: .45; cursor: not-allowed; }
.dd__opt .dd__text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dd__opt small { color: var(--muted); font-size: 13px; font-weight: 400; margin-top: 1px; }
.dd__check { width: 16px; height: 16px; color: var(--green); flex: none; }
.dd__opt .pi { width: 20px; height: 20px; }
.dd__opt--ac .pi { width: 22px; height: 22px; }
.dd__group { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); padding: 10px 12px 4px; }
.dd__group:first-child { padding-top: 4px; }
.dd__empty { padding: 14px; color: var(--muted); font-size: 14px; text-align: center; }

/* Выпадающие списки внутри строки поиска — без рамки, как текст */
.search__field .dd__btn { height: auto; border: 0; padding: 2px 0 0; background: transparent; font-size: 17px; font-weight: 500; box-shadow: none !important; }
.search__field .dd__chev { display: none; }
.search__field:has(.dd.open), .search__field:has(input:focus) { background: var(--surface-2); border-radius: 10px; }
.search__field { transition: background .15s; }

/* Время: часы : минуты */
.time-row { display: flex; align-items: center; gap: 8px; }
.time-row .dd { flex: 1; }
.time-row__sep { font-weight: 700; color: var(--muted); }

/* ---------- Чекбоксы и радиокнопки ---------- */
input[type="checkbox"], input[type="radio"] {
  appearance: none; -webkit-appearance: none; margin: 0; flex: none; width: 20px; height: 20px; cursor: pointer;
  border: 1.5px solid var(--input-border); background: var(--surface); display: inline-grid; place-items: center; transition: .15s;
}
input[type="checkbox"] { border-radius: 6px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]::before {
  content: ''; width: 12px; height: 12px; transform: scale(0); transition: transform .12s ease-out; background: #fff;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m4.5 12.5 5 5L19.5 7'/%3E%3C/svg%3E") center / contain no-repeat;
}
input[type="radio"]::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #fff; transform: scale(0); transition: transform .12s ease-out; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--accent-bg); border-color: var(--accent-bg); }
input[type="checkbox"]:checked::before, input[type="radio"]:checked::before { transform: scale(1); }
input[type="checkbox"]:hover:not(:disabled), input[type="radio"]:hover:not(:disabled) { border-color: var(--green); }
input[type="checkbox"]:focus-visible, input[type="radio"]:focus-visible { outline: 0; box-shadow: 0 0 0 4px var(--focus-ring); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { background: var(--surface-2); cursor: not-allowed; }
.radio-card input { margin-top: 2px; }

/* ---------- Место встречи ---------- */
.meet-field { position: relative; }
.meet-field > .pi { position: absolute; left: 13px; top: 13px; width: 20px; height: 20px; pointer-events: none; }
.meet-field input { padding-left: 42px; }
.picker-wrap { position: relative; margin-top: 12px; }
.picker-wrap .picker-map { margin-top: 0; height: 340px; }
.map-btn {
  position: absolute; z-index: 500; right: 10px; top: 10px; display: inline-flex; align-items: center; gap: 6px;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 7px 12px;
  font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; box-shadow: var(--shadow);
}
.map-btn:hover { border-color: var(--green); color: var(--green); }
.map-btn .pi { width: 18px; height: 18px; }
.meet-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 14px; min-height: 26px; }
.meet-status #meetStatus { display: inline-flex; align-items: center; gap: 6px; }
.meet-status .pi { width: 18px; height: 18px; }
@media (max-width: 640px) {
  .picker-wrap .picker-map { height: 280px; }
  .map-btn span { display: none; }
}

/* Доработки: обводка образца цвета (чёрный виден на тёмном фоне), поле поиска шире, ссылки подвала */
.color-dot { box-shadow: inset 0 0 0 1px rgba(0,0,0,.2), 0 0 0 1px var(--line-strong); }
.search__field { padding: 8px 14px; gap: 12px; }
.search__field .dd__val { overflow: visible; }
.footer__links .link-btn { color: var(--muted); font-weight: 400; font-size: inherit; padding: 0; }
.footer__links .link-btn:hover { color: var(--green); }
.page-title .route-arrow { width: 30px; height: 22px; margin: 0 10px; vertical-align: -1px; }

#timeHint { display: flex; align-items: center; gap: 6px; }
#timeHint .pi { width: 16px; height: 16px; }

/* =====================================================================
   Скелетоны, анимации, иллюстрации, календарь, доверие, статистика,
   посадка по пути, быстрые ответы, регулярные поездки, честная цена
   ===================================================================== */
/* Настоящая тёмная карта (CARTO) — инвертирование светлой больше не нужно */
:root[data-theme="dark"] .leaflet-tile-pane { filter: none; }

/* ---------- Скелетоны ---------- */
.sk { background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 45%, var(--surface-2) 65%); background-size: 300% 100%;
  animation: sk 1.3s ease-in-out infinite; border-radius: 8px; }
@keyframes sk { from { background-position: 100% 0; } to { background-position: 0 0; } }
.sk--line { height: 14px; margin: 0 0 10px; }
.sk--thin { height: 10px; }
.sk--title { height: 30px; width: 46%; margin-bottom: 14px; border-radius: 10px; }
.sk--block { height: 70px; margin: 14px 0; border-radius: 12px; }
.sk--tall { height: 180px; }
.sk--circle { width: 46px; height: 46px; border-radius: 50%; flex: none; margin-right: 12px; }
.ride--skeleton { pointer-events: none; }
.ride--skeleton .ride__bottom { border-top: 0; }

/* ---------- Переходы между страницами ---------- */
.page-in > * { animation: page-in .22s ease-out both; }
@keyframes page-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.toast { animation: toast-in .2s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
.ride { transition: transform .15s, box-shadow .15s, border-color .15s; }

/* ---------- Индикатор загрузки на кнопках ---------- */
.btn--primary:disabled { position: relative; color: transparent !important; opacity: 1; }
.btn--primary:disabled > * { visibility: hidden; }
.btn--primary:disabled::after { content: ''; position: absolute; left: 50%; top: 50%; width: 18px; height: 18px; margin: -9px 0 0 -9px;
  border: 2.5px solid rgba(255,255,255,.45); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .sk, .page-in > *, .toast, .btn--primary:disabled::after { animation-duration: 0s !important; animation-iteration-count: 1 !important; }
}

/* ---------- Иллюстрации пустых состояний, 404 ---------- */
.il { width: 190px; max-width: 70%; height: auto; display: block; margin: 0 auto 12px; }
.il-g { fill: var(--surface-2); }
.il-f { fill: var(--green-soft); }
.il-s { stroke: var(--green); fill-opacity: 1; }
.il-s2 { stroke: var(--line-strong); }
.il-sf { fill: var(--green); }
.il-a { fill: var(--star); }
.il .il-s:not(.il-f) { fill: none; }
.il .il-s2:not(.il-g) { fill: none; }
.empty--illus { padding-top: 30px; }
.empty--404 { border: 0; padding: 40px 20px 60px; }
.nf-code { font-size: 64px; font-weight: 800; letter-spacing: -2px; color: var(--green); line-height: 1; margin-bottom: 6px; }
.chat__empty.empty--illus { display: flex; flex-direction: column; align-items: center; }
.chat__empty .il { width: 150px; }

/* ---------- Календарь ---------- */
.cal { padding: 12px; width: 312px; max-width: calc(100vw - 16px); }
.cal__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cal__head b { color: var(--ink); font-size: 15px; }
.cal__nav { width: 34px; height: 34px; border-radius: 10px; border: 0; background: var(--surface-2); color: var(--ink); display: grid; place-items: center; cursor: pointer; }
.cal__nav:hover:not(:disabled) { color: var(--green); }
.cal__nav:disabled { opacity: .35; cursor: default; }
.cal__nav .pi { width: 18px; height: 18px; }
.cal__grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal__wd { text-align: center; font-size: 12px; color: var(--muted); padding: 4px 0 6px; text-transform: lowercase; }
.cal__day { aspect-ratio: 1; border: 0; border-radius: 10px; background: none; cursor: pointer; font: inherit; font-size: 14px; color: var(--text); }
.cal__day:hover:not(:disabled) { background: var(--surface-2); }
.cal__day:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.cal__day.is-today { color: var(--green); font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--green-soft-2); }
.cal__day.is-sel { background: var(--accent-bg); color: #fff; font-weight: 700; }
.cal__day:disabled { color: var(--disabled); cursor: not-allowed; }
.cal__foot { display: flex; gap: 16px; justify-content: flex-end; margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.cal__foot .link-btn:disabled { color: var(--disabled); cursor: default; text-decoration: none; }
.cal-field .dd__val .pi { width: 18px; height: 18px; color: var(--green); }
.search__field .cal-field .dd__val .pi { display: none; }

/* ---------- Доверие и статистика ---------- */
.trust { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.trust__item { display: inline-flex; align-items: center; gap: 5px; font-size: 13px; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--text); }
.trust__item .pi { width: 16px; height: 16px; }
.trust__item--ok { background: var(--green-soft); color: var(--green-dark); }
.trust__item--warn { background: var(--star-soft); color: var(--star-ink); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.stats__tile { background: var(--surface-2); border-radius: 12px; padding: 14px; display: flex; flex-direction: column; gap: 2px; }
.stats__tile .pi { width: 22px; height: 22px; margin-bottom: 4px; }
.stats__tile b { font-size: 22px; color: var(--ink); }
.stats__tile span { font-size: 13px; color: var(--muted); }
.pi--leaf { color: var(--green); } .pi--euro { color: var(--pi-instant); } .pi--road { color: var(--pi-luggage); }
.site-stats { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 26px; margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--green-soft-2); color: var(--green-dark); font-weight: 600; }
.site-stats span { display: inline-flex; align-items: center; gap: 8px; }

/* ---------- Поиск: сортировка, карта, ближайшие даты ---------- */
.results-head { align-items: flex-end; flex-wrap: wrap; }
.results-tools { display: flex; align-items: center; gap: 10px; }
.sort-box { display: flex; align-items: center; gap: 6px; }
.sort-box > .pi { color: var(--muted); }
.sort-box .dd { min-width: 190px; }
.sort-box .dd__btn { height: 38px; font-size: 14px; }
.results-map { height: 380px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); margin-bottom: 18px; z-index: 0; }
.nearby { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 18px; }
.nearby b { color: var(--ink); }
.nearby__list { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 10px; }
.nearby__item { display: flex; flex-direction: column; padding: 10px 14px; border-radius: 12px; border: 1.5px solid var(--green-soft-2); background: var(--green-bg); font-size: 14px; color: var(--muted); transition: .15s; }
.nearby__item:hover { border-color: var(--green); transform: translateY(-1px); }
.nearby__day { font-weight: 700; color: var(--green-dark); font-size: 15px; }

/* ---------- Регулярные поездки ---------- */
.badge--icon { display: inline-flex; align-items: center; gap: 4px; vertical-align: 1px; }
.badge--icon .pi { width: 14px; height: 14px; }
.series-note { display: inline-flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 14px; color: var(--green-dark); background: var(--green-soft); padding: 4px 10px; border-radius: 99px; }
.series-note .pi { width: 16px; height: 16px; }
.repeat { margin-top: 18px; border: 1px dashed var(--line-strong); border-radius: 12px; padding: 14px 16px; }
.repeat__head { display: flex; align-items: center; gap: 8px; color: var(--ink); margin-bottom: 10px; }
.repeat__modes { display: flex; flex-wrap: wrap; gap: 8px; }
.repeat__more { margin-top: 14px; display: flex; flex-direction: column; gap: 12px; }
.repeat__days { display: flex; flex-wrap: wrap; gap: 6px; }
.day-chip input { position: absolute; opacity: 0; pointer-events: none; }
.day-chip span { display: inline-grid; place-items: center; min-width: 46px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--line); cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text); text-transform: capitalize; transition: .15s; }
.day-chip input:checked + span { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.day-chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--focus-ring); }
.repeat__until { max-width: 320px; }
#repeatSummary { display: flex; align-items: center; gap: 6px; }

/* ---------- Честная цена ---------- */
.fair { display: flex; align-items: center; gap: 12px; }
.fair > .pi { width: 26px; height: 26px; flex: none; }
.fair > div { flex: 1; }
.fair b { color: var(--green-dark); }
.fair__warn { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--star-ink); font-size: 14px; }
.fair__warn .pi { width: 18px; height: 18px; color: var(--star-ink); }

/* ---------- Посадка по пути ---------- */
.pickup { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 2px 0 10px 46px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); font-size: 14px; }
.book-panel .pickup, #pickupSel .pickup { margin-left: 0; }
.pickup > .pi { width: 18px; height: 18px; flex: none; }
.pickup__text { flex: 1; min-width: 0; }
.pickup__st { font-weight: 600; }
.pickup--pending .pickup__st { color: var(--star-ink); }
.pickup--accepted { background: var(--green-soft); } .pickup--accepted .pickup__st { color: var(--green-dark); }
.pickup--declined { background: var(--danger-soft); } .pickup--declined .pickup__st { color: var(--danger); }
.pickup__btns { display: flex; gap: 6px; }
.map-pickup { display: block; width: 22px; height: 22px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); background: #d98a00; }
.map-pickup--accepted { background: #0f6b48; } .map-pickup--declined { background: #c0392b; }

/* ---------- Чат: быстрые ответы, геопозиция, «прочитано», предупреждения ---------- */
.quick-bar { display: flex; gap: 6px; padding: 10px 18px 0; overflow-x: auto; scrollbar-width: none; border-top: 1px solid var(--line); }
.quick-bar::-webkit-scrollbar { display: none; }
.quick { flex: none; font-size: 13px; padding: 6px 12px; }
.quick .pi { width: 16px; height: 16px; }
.quick:disabled { opacity: .5; }
.chat__form { border-top: 0; }
.msg__quick { font-weight: 600; }
.msg--quick .msg__bubble { border-radius: 99px; }
.msg__loc { display: flex; align-items: center; gap: 10px; color: inherit; }
.msg__loc .pi { width: 28px; height: 28px; }
.msg--mine .msg__loc .pi { color: #fff; }
.msg__loc small { display: block; opacity: .8; font-size: 12px; }
.msg__link { text-decoration: underline; word-break: break-all; }
.msg__time { display: inline-flex; align-items: center; gap: 3px; }
.msg__state { display: inline-flex; }
.msg__tick { width: 15px; height: 15px; color: var(--muted); }
.msg__tick--read { color: var(--green); }
.msg__warn { display: flex; align-items: flex-start; gap: 8px; max-width: 360px; margin-top: 6px; padding: 8px 12px; border-radius: 10px;
  background: var(--star-soft); color: var(--star-ink); font-size: 13px; line-height: 1.4; }
.msg__warn .pi { width: 18px; height: 18px; flex: none; color: var(--star-ink); }

/* ---------- Админка ---------- */
.admin-actions { display: flex; gap: 6px; justify-content: flex-end; }
.admin-table .badge--icon .pi { color: var(--green); }

@media (max-width: 640px) {
  .results-tools { width: 100%; justify-content: space-between; }
  .sort-box .dd { min-width: 150px; }
  .pickup { margin-left: 0; }
  .results-map { height: 300px; }
}
/* Без анимаций по настройке системы — статичная картинка на главной */
@media (prefers-reduced-motion: reduce) { .hero__img { background-image: url("/hero-static.svg"); } }

/* Календарь — во всю высоту, без прокрутки; приглушённая карта, если тёмные плитки недоступны */
.dd__list.cal { max-height: none !important; overflow: visible; }
:root[data-theme="dark"] .map--dim .leaflet-tile-pane { filter: brightness(.62) contrast(1.15) saturate(.65); }


/* ================= Удобство: мастер, ошибки у полей, онбординг ================= */
/* --- Ошибка у поля --- */
.field--error input, .field--error textarea, .field--error .dd__btn { border-color: var(--danger) !important; box-shadow: 0 0 0 4px var(--danger-soft) !important; }
.field--error > label { color: var(--danger); }
.field-err { display: flex; align-items: flex-start; gap: 6px; color: var(--danger); font-size: 13px; font-weight: 500; margin-top: 6px; animation: errIn .18s ease-out; }
.field-err .pi { width: 16px; height: 16px; flex: 0 0 16px; margin-top: 1px; }
.repeat.field--error, .checks.field--error { border-radius: 12px; box-shadow: 0 0 0 2px var(--danger-line); }
.meet-field.field--error { border-color: var(--danger); }
@keyframes errIn { from { opacity: 0; transform: translateY(-3px); } to { opacity: 1; transform: none; } }

/* --- Пароль: показать/скрыть --- */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px !important; width: 100%; }
.pw-toggle { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 38px; height: 38px; border: 0; background: none; color: var(--muted); border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover { color: var(--green); background: var(--surface-2); }
.pw-toggle .pi { width: 20px; height: 20px; }

/* --- Мастер «Предложить поездку» --- */
.wiz-head { margin: -4px 0 22px; }
.wiz-steps { list-style: none; margin: 0 0 12px; padding: 0; display: flex; gap: 6px; }
.wiz-steps li { flex: 1; min-width: 0; }
.wiz-dot { width: 100%; display: flex; align-items: center; gap: 8px; background: none; border: 0; padding: 6px 4px; cursor: pointer; font: inherit; color: var(--muted); text-align: left; border-radius: 10px; }
.wiz-dot:disabled { cursor: default; opacity: .55; }
.wiz-dot:not(:disabled):hover { background: var(--surface-2); }
.wiz-dot__n { flex: 0 0 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; border: 1.5px solid var(--line); background: var(--surface); color: var(--muted); transition: background .2s, border-color .2s, color .2s; }
.wiz-dot__t { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wiz-dot.is-done .wiz-dot__n { background: var(--green-soft); border-color: var(--green); color: var(--green-dark); }
.wiz-dot.is-cur .wiz-dot__n { background: var(--accent-bg); border-color: var(--accent-bg); color: #fff; }
.wiz-dot.is-cur { color: var(--ink); }
.wiz-bar { height: 6px; border-radius: 6px; background: var(--surface-2); overflow: hidden; }
.wiz-bar span { display: block; height: 100%; width: 0; background: var(--accent-bg); border-radius: 6px; transition: width .3s ease; }
.wiz-count { display: none; font-size: 14px; color: var(--muted); margin-bottom: 8px; }
.wiz-count b { color: var(--ink); }
.wiz-step { animation: page-in .25s ease-out; }
.wiz-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line); }
.wiz-nav__grow { flex: 1; }
.wiz-nav [hidden] { display: none !important; }
.review-list { display: grid; gap: 0; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.review-row { display: grid; grid-template-columns: 170px 1fr auto; gap: 14px; align-items: center; padding: 14px 16px; }
.review-row + .review-row { border-top: 1px solid var(--line); }
.review-row__k { font-size: 13px; color: var(--muted); font-weight: 600; }
.review-row__v { min-width: 0; overflow-wrap: anywhere; }
.review-row__v .pi { width: 17px; height: 17px; vertical-align: -3px; color: var(--green); }
.review-row__v .chip { margin: 2px 0; }
.review-row .link-btn { white-space: nowrap; display: inline-flex; align-items: center; gap: 4px; }
.review-row .link-btn .pi { width: 15px; height: 15px; }
@media (max-width: 640px) {
  .wiz-count { display: block; }
  .wiz-dot__t { display: none; }
  .wiz-dot { justify-content: center; padding: 4px 0; }
  .wiz-steps { gap: 2px; margin-bottom: 10px; }
  .wiz-nav { gap: 8px; }
  .wiz-nav .btn { flex: 1 1 auto; justify-content: center; }
  .wiz-nav__grow { display: none; }
  .review-row { grid-template-columns: 1fr auto; gap: 4px 10px; padding: 12px 14px; }
  .review-row__k { grid-column: 1; }
  .review-row__v { grid-column: 1 / -1; grid-row: 2; }
  .review-row .link-btn { grid-column: 2; grid-row: 1; }
}

/* --- Сводка поиска на телефоне --- */
.search-sum { display: none; }
@media (max-width: 900px) {
  .search-sum { display: flex; align-items: center; gap: 12px; width: 100%; margin: 16px 0 24px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow); font: inherit; color: var(--ink); text-align: left; cursor: pointer; }
  .search-sum > .pi { width: 22px; height: 22px; color: var(--green); flex: 0 0 22px; }
  .search-sum__text { flex: 1; min-width: 0; font-weight: 700; font-size: 15px; line-height: 1.3; }
  .search-sum__meta { display: block; font-weight: 500; font-size: 13px; color: var(--muted); margin-top: 2px; }
  .search-sum__edit { font-size: 14px; font-weight: 600; color: var(--green); white-space: nowrap; }
  .search-wrap:not(.is-collapsed) .search-sum { display: none; }
  .search-wrap.is-collapsed .search { display: none; }
}
.arrow--sm { transform: scale(.8); }

/* --- Фильтры одной строкой на телефоне --- */
@media (max-width: 640px) {
  .filters { flex-wrap: nowrap; overflow-x: auto; margin-left: -18px; margin-right: -18px; padding: 2px 18px 6px; scrollbar-width: none; -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity; scroll-padding: 0 18px; }
  .filters::-webkit-scrollbar { display: none; }
  .filters .chip { flex: 0 0 auto; white-space: nowrap; scroll-snap-align: start; }
}

/* --- Меню «⋯» --- */
.btn--icon { padding-left: 10px; padding-right: 10px; }
.btn--icon .pi { width: 20px; height: 20px; }
.dropdown__menu--right { left: auto; right: 0; }
.dropdown__menu .danger { color: var(--danger); display: flex; align-items: center; gap: 8px; }

/* --- Скоро отправление --- */
.soon-warn { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 14px; border-radius: 12px; background: var(--warn-soft); border: 1px solid var(--warn-line); font-size: 14px; color: var(--text); }
.soon-warn > .pi { width: 22px; height: 22px; flex: 0 0 22px; color: var(--warn); }
.soon-warn b { display: block; color: var(--ink); margin-bottom: 2px; }
.soon-warn .btn { margin-top: 10px; }

/* --- Приветствие после регистрации --- */
.welcome h2 { margin-bottom: 6px; }
.welcome__cards { display: grid; gap: 10px; }
.welcome__card { display: flex; align-items: center; gap: 14px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; color: var(--text); text-decoration: none; transition: border-color .15s, background .15s; }
.welcome__card:hover { border-color: var(--green); background: var(--surface-2); }
.welcome__card > span:nth-child(2) { flex: 1; }
.welcome__card b { display: block; color: var(--ink); }
.welcome__card small { color: var(--muted); font-size: 13px; }
.welcome__ico { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--green-soft); color: var(--green); }
.welcome__ico .pi { width: 24px; height: 24px; }

/* --- «Как это работает» для гостей --- */
.how-strip { margin-top: 28px; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); display: grid; gap: 12px; }
.how-strip__head { display: flex; align-items: center; justify-content: space-between; color: var(--ink); }
.how-strip__close { border: 0; background: none; font-size: 24px; line-height: 1; color: var(--muted); cursor: pointer; width: 34px; height: 34px; border-radius: 8px; }
.how-strip__close:hover { background: var(--surface-2); color: var(--ink); }
.how-strip__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.how-strip__steps li { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text); }
.how-strip__steps .pi { width: 22px; height: 22px; color: var(--green); flex: 0 0 22px; }
.how-strip__n { flex: 0 0 24px; height: 24px; border-radius: 50%; background: var(--green-soft); color: var(--green-dark); font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.how-strip .link { justify-self: start; font-size: 14px; }
@media (max-width: 720px) { .how-strip__steps { grid-template-columns: 1fr; gap: 8px; } }

/* --- Профиль: быстрые ссылки и чек-лист --- */
.pf-nav { position: sticky; top: 76px; z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 16px; padding: 8px 4px; background: var(--bg); }
.pf-nav::-webkit-scrollbar { display: none; }
.pf-nav button { flex: 0 0 auto; border: 1px solid var(--line); background: var(--surface); color: var(--text-2); font: inherit; font-size: 13px; font-weight: 600; padding: 7px 12px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.pf-nav button:hover { border-color: var(--green); color: var(--green); }
.narrow .panel[id] { scroll-margin-top: 140px; }
@media (max-width: 640px) { .pf-nav { top: 64px; } .narrow .panel[id] { scroll-margin-top: 124px; } }
.pf-check__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.pf-check__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.pf-check__list li { display: flex; align-items: center; gap: 12px; }
.pf-check__list li > .pi { width: 22px; height: 22px; flex: 0 0 22px; color: var(--muted); }
.pf-check__list li.is-done > .pi { color: var(--green); }
.pf-check__list li > span { flex: 1; min-width: 0; }
.pf-check__list b { display: block; font-size: 14px; color: var(--ink); }
.pf-check__list li.is-done b { color: var(--muted); text-decoration: line-through; }
.pf-check__list small { color: var(--muted); font-size: 13px; }
#moreMenu { margin-left: auto; }


/* ================= Админка: аналитика ================= */
:root { --chart: #0e7a4f; }                 /* проверено валидатором: светлость, насыщенность, контраст к фону */
:root[data-theme="dark"] { --chart: #16885a; }
.an-filters { margin: 0 0 18px; }
#anBody { transition: opacity .2s; }
#anBody.is-loading { opacity: .5; pointer-events: none; }
.an-tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.an-tiles .panel + .panel { margin-top: 0; }
.an-tile { padding: 16px 18px; }
.an-tile__label { font-size: 14px; color: var(--muted); }
.an-tile__value { font-size: 30px; font-weight: 700; color: var(--ink); margin: 4px 0 2px; letter-spacing: -.01em; }
.an-delta { font-size: 13px; color: var(--text-2); }
.an-delta--up { color: var(--green); }
.an-delta--down { color: var(--danger); }
.an-delta__arr { font-size: 10px; margin-right: 4px; vertical-align: 1px; }
.an-note { font-size: 13px; margin: 10px 0 16px; }
.an-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.an-charts .panel + .panel { margin-top: 0; }
.an-card h3 { margin: 0; font-size: 17px; }
.an-sub { margin: 2px 0 10px; font-size: 13px; }
.an-chart { position: relative; }
.an-plot { width: 100%; min-height: 210px; }
.an-plot svg { display: block; overflow: visible; }
.an-grid { stroke: var(--line); stroke-width: 1; }
.an-axis { stroke: var(--line-strong, var(--line)); stroke-width: 1; }
.an-tick { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.an-val { fill: var(--text); font-size: 12px; font-weight: 600; }
.an-bar { fill: var(--chart); transition: opacity .12s; }
.an-bar.is-hot { opacity: .72; }
.an-hit { fill: transparent; cursor: default; outline: none; }
.an-hit:focus-visible { stroke: var(--green); stroke-width: 1.5; }
.an-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-lg); padding: 7px 10px; white-space: nowrap; }
.an-tip b { display: block; font-size: 16px; color: var(--ink); }
.an-tip span { font-size: 12px; color: var(--muted); }
.an-table { margin-top: 8px; font-size: 13px; }
.an-table summary { cursor: pointer; color: var(--green); font-weight: 600; }
.an-table table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.an-table th, .an-table td { text-align: left; padding: 5px 8px; border-bottom: 1px solid var(--line); }
.an-table td:last-child, .an-table th:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.an-routes { display: grid; margin-top: 12px; }
.an-routes__row { display: grid; grid-template-columns: minmax(160px, 1.3fr) 1.6fr 1fr .7fr .6fr; gap: 14px; align-items: center; padding: 10px 4px; border-top: 1px solid var(--line); font-size: 14px; }
.an-routes__head { border-top: 0; font-size: 12px; font-weight: 600; color: var(--muted); padding-top: 0; }
.an-routes__row:not(.an-routes__head):hover { background: var(--surface-2); }
.an-routes__name { font-weight: 600; min-width: 0; }
.an-routes__name a { color: var(--ink); }
.an-routes__bar { display: flex; align-items: center; gap: 8px; }
.an-hbar { height: 14px; background: var(--chart); border-radius: 0 4px 4px 0; flex: 0 0 auto; max-width: calc(100% - 36px); }
.an-routes__row .pi { width: 15px; height: 15px; vertical-align: -2px; color: var(--muted); }
.an-unmet { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.an-unmet b { display: flex; align-items: center; gap: 6px; color: var(--ink); }
.an-unmet b .pi { width: 18px; height: 18px; color: var(--green); }
.an-unmet p { margin: 4px 0 8px; font-size: 13px; }
.an-unmet ul { margin: 0; padding-left: 18px; font-size: 14px; }
.an-unmet li { margin: 3px 0; }
@media (max-width: 1080px) { .an-tiles { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 900px) { .an-charts { grid-template-columns: 1fr; } }
@media (max-width: 640px) {
  .an-tile__value { font-size: 24px; }
  .an-routes__head { display: none; }
  .an-routes__row { grid-template-columns: 1fr 1fr; gap: 4px 12px; padding: 12px 4px; }
  .an-routes__name, .an-routes__bar { grid-column: 1 / -1; }
  .an-routes__row [data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: 12px; }
}
/* Вкладки не вылезают за экран: прокрутка вбок */
.tabs { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: 0 0 auto; white-space: nowrap; }
@media (max-width: 640px) { .tabs button { padding: 8px 13px; } }


/* ================= Чат: новое оформление ================= */
:root { --chat-dot: #e7ebef; --bubble-mine-meta: rgba(255, 255, 255, .78); --tick-read-mine: #b9f3d6; }
:root[data-theme="dark"] { --chat-dot: #1b222a; --bubble-mine-meta: rgba(255, 255, 255, .72); --tick-read-mine: #c9f7e0; }
.avatar--md { width: 50px; height: 50px; font-size: 18px; }

/* --- список диалогов --- */
.chat-list-page { max-width: 860px; }
.chat-list-head { display: flex; align-items: center; gap: 12px; }
.chat-list-head .page-title { margin: 0; }
.conv-list { margin-top: 20px; padding: 6px; }
.conv { position: relative; display: flex; align-items: center; gap: 4px; padding: 0; border-radius: 12px; transition: background .15s, opacity .2s, transform .2s; }
.conv + .conv { border-top: 0; }
.conv + .conv::before { content: ""; position: absolute; left: 78px; right: 12px; top: 0; border-top: 1px solid var(--line); }
.conv:hover { background: var(--surface-2); }
.conv:hover + .conv::before, .conv:hover::before { opacity: 0; }
.conv--gone { opacity: 0; transform: translateX(-12px); }
.conv__link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 14px; padding: 14px 6px 14px 14px; color: inherit; text-decoration: none; }
.conv__main { flex: 1; min-width: 0; }
.conv__top { display: flex; align-items: baseline; gap: 8px; }
.conv__name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv__role { font-size: 12px; color: var(--muted); background: var(--surface-3); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.conv__time { margin-left: auto; font-size: 12px; color: var(--muted); white-space: nowrap; }
.conv--unread .conv__time { color: var(--green); font-weight: 600; }
.conv__ride { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 13px; color: var(--muted); min-width: 0; }
.conv__ride span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv__ride .pi { width: 15px; height: 15px; flex: none; }
.conv__last { margin-top: 4px; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text-2); }
.conv__last .pi { width: 15px; height: 15px; vertical-align: -2px; }
.conv--unread .conv__last { font-weight: 600; color: var(--ink); }
.conv .count-badge { flex: none; }
.conv__menu { flex: none; margin-right: 8px; }
.conv__more { width: 36px; height: 36px; border: 0; border-radius: 10px; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; opacity: .55; transition: opacity .15s, background .15s; }
.conv:hover .conv__more, .conv__more:focus-visible, .conv__menu.open .conv__more { opacity: 1; }
.conv__more:hover { background: var(--surface-3); color: var(--ink); }
.conv__more .pi { width: 20px; height: 20px; }
.dropdown__menu a, .dropdown__menu button { display: flex; align-items: center; gap: 9px; }
.dropdown__menu .pi, .dropdown__menu svg { width: 17px; height: 17px; flex: none; }

/* --- окно чата --- */
.chat-page { max-width: 880px; padding-top: 24px; padding-bottom: 24px; }
.chat-page .chat { position: relative; height: calc(100vh - 76px - 110px); height: calc(100dvh - 76px - 110px); min-height: 480px; box-shadow: var(--shadow); }
.chat__head { gap: 10px; padding: 10px 12px; background: var(--surface); position: relative; z-index: 2; }
.chat__back { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; flex: none; color: var(--ink); }
.chat__back:hover { background: var(--surface-2); }
.chat__who { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; border-radius: 10px; padding: 2px 6px 2px 0; }
.chat__who .avatar { width: 42px; height: 42px; font-size: 16px; }
.chat__who-text { min-width: 0; display: flex; flex-direction: column; }
.chat__name { font-weight: 700; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__sub { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat__sub .route-arrow, .chat__sub svg { vertical-align: middle; }
.chat__ride { flex: none; gap: 6px; }
.chat__ride .pi { width: 17px; height: 17px; }
.chat__body { flex: 1; height: auto; padding: 14px 18px 18px; gap: 2px; background-color: var(--chat-bg);
  background-image: radial-gradient(var(--chat-dot) 1.2px, transparent 1.3px); background-size: 20px 20px; scroll-behavior: auto; }
.chat__day { position: sticky; top: 6px; z-index: 1; align-self: center; margin: 12px 0 6px; padding: 0; background: none; }
.chat__day span { display: inline-block; font-size: 12px; font-weight: 600; color: var(--text-2); background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); padding: 3px 12px; border-radius: 99px; }
.chat__empty.empty--illus { gap: 4px; text-align: center; max-width: 320px; }
.chat__empty b { color: var(--ink); margin-top: 6px; }
.chat__empty span { font-size: 14px; }

/* сообщения */
.msg { max-width: min(76%, 560px); margin-top: 10px; animation: msgIn .18s ease-out; }
.msg--cont { margin-top: 2px; }
.msg__row { gap: 2px; align-items: center; }
.msg__bubble { position: relative; padding: 8px 12px 7px; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow-sm); line-height: 1.42; font-size: 15px; color: var(--text); }
.msg--theirs:not(.msg--hasnext) .msg__bubble { border-bottom-left-radius: 6px; }
.msg--theirs.msg--cont .msg__bubble { border-top-left-radius: 6px; }
.msg--mine .msg__bubble { background: linear-gradient(160deg, var(--accent-bg), color-mix(in srgb, var(--accent-bg) 82%, #000)); border-color: transparent; color: #fff; border-radius: 18px; }
.msg--mine:not(.msg--hasnext) .msg__bubble { border-bottom-right-radius: 6px; }
.msg--mine.msg--cont .msg__bubble { border-top-right-radius: 6px; }
.msg--quick .msg__bubble { border-radius: 18px; }
.msg__meta { display: inline-flex; align-items: center; gap: 2px; float: right; margin: 7px -3px -3px 12px; font-size: 11px; line-height: 1; color: var(--muted); white-space: nowrap; user-select: none; }
.msg--mine .msg__meta { color: var(--bubble-mine-meta); }
.msg__time { display: none; }
.msg__tick { width: 15px; height: 15px; color: inherit; }
.msg--mine .msg__tick--read { color: var(--tick-read-mine); }
.msg__bubble--hidden { font-style: italic; color: var(--muted); background: var(--surface-2); box-shadow: none; }
.msg--mine .msg__bubble--hidden { background: var(--surface-2); color: var(--muted); }
.msg__loc { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; padding: 2px 0; }
.msg__loc .pi { width: 30px; height: 30px; flex: none; padding: 5px; border-radius: 10px; background: var(--green-soft); color: var(--green); }
.msg--mine .msg__loc .pi { background: rgba(255, 255, 255, .18); color: #fff; }
.msg--active .msg__bubble { box-shadow: 0 0 0 2px var(--focus-ring), var(--shadow-sm); }
.msg__more { flex: none; width: 30px; height: 30px; border: 0; border-radius: 50%; background: none; color: var(--muted); cursor: pointer; display: grid; place-items: center; opacity: 0; transition: opacity .12s, background .12s; }
.msg__more .pi { width: 18px; height: 18px; }
.msg:hover .msg__more, .msg__more:focus-visible, .msg--active .msg__more { opacity: 1; }
.msg__more:hover { background: var(--surface-3); color: var(--ink); }
@media (hover: none) { .msg__more { opacity: .5; } }
.msg__reported { display: inline-flex; align-items: center; gap: 5px; margin: 4px 6px 0; font-size: 12px; color: var(--muted); }
.msg__reported svg { width: 13px; height: 13px; }
.msg__warn { margin-top: 5px; }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .msg { animation: none; } }

/* меню сообщения */
.msg-menu { padding: 6px; min-width: 210px; }
.msg-menu__item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; border: 0; background: none; border-radius: 8px; font: inherit; font-size: 14px; color: var(--text); cursor: pointer; text-align: left; }
.msg-menu__item:hover:not(:disabled), .msg-menu__item:focus-visible { background: var(--surface-2); outline: none; }
.msg-menu__item svg { width: 17px; height: 17px; flex: none; color: var(--muted); }
.msg-menu__item.danger, .msg-menu__item.danger svg { color: var(--danger); }
.msg-menu__item:disabled { color: var(--muted); cursor: default; }

/* кнопка «вниз» */
.chat__down { position: absolute; right: 18px; bottom: 132px; z-index: 3; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; }
.chat__down .pi { width: 22px; height: 22px; }
.chat__down-n { position: absolute; top: -6px; right: -4px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 99px; background: var(--accent-bg); color: #fff; font-size: 11px; font-weight: 700; display: grid; place-items: center; }

/* поле ввода */
.chat__compose { border-top: 1px solid var(--line); background: var(--surface); padding: 10px 14px 12px; }
.chat__compose .quick-bar { padding: 0 0 10px; border-top: 0; }
.chat__form { padding: 0; gap: 8px; align-items: flex-end; }
.chat__form textarea { border-radius: 22px; background: var(--surface-2); border: 1px solid transparent; padding: 12px 16px; min-height: 46px; line-height: 1.35; font: inherit; font-size: 15px; color: var(--text); }
.chat__form textarea:focus { background: var(--surface); border-color: var(--green); outline: none; }
.chat__send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--accent-bg); color: #fff; display: grid; place-items: center; cursor: pointer; transition: transform .12s, opacity .15s; }
.chat__send .pi { width: 21px; height: 21px; margin-left: 2px; }
.chat__send:hover:not(:disabled) { transform: scale(1.05); }
.chat__send:disabled { opacity: .4; cursor: default; }
.chat__error { padding: 0 4px; margin-top: 6px; min-height: 0; }
.chat__error:empty { display: none; }
.chat__hint { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; margin: 12px 0 0; }
.chat__hint .pi { width: 15px; height: 15px; flex: none; }

@media (max-width: 640px) {
  .chat-page { padding: 0; max-width: none; }
  .chat-page .chat { height: calc(100vh - 64px); height: calc(100dvh - 64px); min-height: 0; border-radius: 0; border-left: 0; border-right: 0; box-shadow: none; }
  .chat-page .chat__hint { display: none; }
  .chat__ride span { display: none; }
  .chat__ride { padding: 0 10px; }
  .chat__body { padding: 10px 10px 14px; }
  .msg { max-width: 86%; }
  .chat__compose { padding: 8px 10px 10px; }
  .chat__down { right: 12px; bottom: 120px; }
  .conv-list { padding: 2px; }
  .conv__link { gap: 12px; padding: 12px 4px 12px 10px; }
  .conv + .conv::before { left: 72px; }
  .conv__more { opacity: .7; }
  .chat__head .btn { display: inline-flex; }   /* раньше кнопки в шапке чата на телефоне скрывались */
}


/* ================= Участки маршрута ================= */
.ride__seg { display: inline-flex; align-items: center; gap: 5px; margin-top: 6px; font-size: 13px; font-weight: 600; color: var(--green-dark); background: var(--green-soft); padding: 3px 9px; border-radius: 99px; }
.ride__seg .pi { width: 15px; height: 15px; }
.seg-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.seg-pick .field { margin: 0; }
.seg-pick label { font-size: 13px; }
.seg-none { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--danger); margin: -4px 0 10px; }
.seg-none .pi { width: 17px; height: 17px; }
.book__seg { font-size: 14px; margin-top: 2px; }
.seg-line { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; margin: 0 0 12px; padding: 9px 12px; border-radius: 10px; background: var(--surface-2); }
.seg-line .pi { width: 18px; height: 18px; flex: none; color: var(--green); margin-top: 1px; }
.seg-prices { display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 400 !important; }
.seg-prices b { color: var(--ink); }
.ride__meta .pi { width: 14px; height: 14px; vertical-align: -2px; }
#stopPricesBox .form-section { margin-top: 26px; padding-top: 20px; border-top: 1px solid var(--line); }
.stop-prices { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.stop-price { margin: 0; }
.stop-price__val { height: 48px; display: flex; align-items: center; padding: 0 14px; border-radius: 10px; background: var(--surface-2); font-weight: 700; color: var(--ink); }
#spExample { margin-top: 8px; display: flex; align-items: center; gap: 6px; }
#spExample .pi { width: 16px; height: 16px; color: var(--green); }

/* ================= «Ищу поездку» ================= */
.rq-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.rq-head .lead { margin: 6px 0 0; max-width: 640px; }
.rq-filter { display: flex; align-items: flex-end; gap: 12px; margin: 22px 0 20px; flex-wrap: wrap; }
.rq-filter .field { margin: 0; flex: 1 1 200px; }
.rq-filter .btn { height: 48px; }
.rq-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.rq { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); }
.rq__top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rq__route { font-size: 18px; font-weight: 700; color: var(--ink); }
.rq__when { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 14px; color: var(--text-2); }
.rq__when .pi { width: 17px; height: 17px; color: var(--green); }
.rq__dot { color: var(--muted); margin: 0 2px; }
.rq__comment { margin: 0; font-size: 14px; color: var(--text); background: var(--surface-2); border-radius: 10px; padding: 9px 12px; white-space: pre-line; overflow-wrap: anywhere; }
.rq__bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.rq__user { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; min-width: 0; }
.rq__user b { display: block; color: var(--ink); font-size: 14px; }
.rq__user small { font-size: 12px; color: var(--muted); }
.rq__actions { display: flex; align-items: center; gap: 6px; }
.rq__actions .pi { width: 17px; height: 17px; }
.rq-strip { display: flex; align-items: center; gap: 14px; margin-top: 16px; padding: 14px 18px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); flex-wrap: wrap; }
.rq-strip > .pi { width: 26px; height: 26px; color: var(--green); flex: none; }
.rq-strip > div:nth-child(2) { flex: 1 1 220px; }
.rq-strip--ask { background: var(--green-soft); border-color: transparent; }
.rq-strip__btns { display: flex; gap: 8px; flex-wrap: wrap; }
.rq-strip__btns .pi { width: 17px; height: 17px; }
.my-rq__title { margin: 8px 0 14px; font-size: 20px; }
#myRq .rq-list { margin-bottom: 30px; }
@media (max-width: 640px) {
  .rq-list { grid-template-columns: 1fr; }
  .rq-head .btn { width: 100%; justify-content: center; }
  .rq-filter .btn { width: 100%; }
}

/* ================= Аналитика: поиски и спрос ================= */
.an-tiles { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 1180px) { .an-tiles { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .an-tiles { grid-template-columns: repeat(2, 1fr); } }
.an-demand { margin-top: 16px; }
.an-card h3 .pi { width: 18px; height: 18px; vertical-align: -3px; color: var(--green); }
.an-tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 6px; }
.an-tbl th { text-align: left; font-size: 12px; font-weight: 600; color: var(--muted); padding: 0 8px 8px; }
.an-tbl td { padding: 9px 8px; border-top: 1px solid var(--line); vertical-align: middle; }
.an-tbl td:first-child { font-weight: 600; }
.an-tbl td:first-child a { color: var(--ink); }
.an-tbl th:not(:first-child), .an-tbl td:not(:first-child) { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.an-tbl td:nth-child(2) .an-cellbar { justify-content: flex-end; }
.an-cellbar { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.an-cellbar .an-hbar { height: 10px; }
.an-bad { color: var(--danger); font-weight: 600; }

/* Шапка на средних экранах (1181–1440 px): меню плотнее, «Как это работает» — только в подвале */
@media (min-width: 1181px) and (max-width: 1440px) {
  .header__inner { gap: 24px; }
  .nav { gap: 20px; }
  .header__actions { gap: 14px; }
  .nav a[href="#/how"] { display: none; }
}
/* Графики аналитики сжимаются вместе с карточкой (иначе нарисованный SVG не даёт колонке стать уже) */
.an-charts > .an-card { min-width: 0; }
.an-plot { overflow: hidden; }


/* ================= Короткая ссылка ================= */
.share-link { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 14px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); }
.share-link__url { flex: 1; min-width: 0; font-weight: 600; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.share-link .btn .pi { width: 16px; height: 16px; }
.short-link { display: flex; flex-direction: column; gap: 4px; margin: 0 0 14px; font-size: 13px; }
.short-link__btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 9px 12px; border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--surface-2); color: var(--ink); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; }
.short-link__btn:hover { border-color: var(--green); color: var(--green); }
.short-link__btn .pi { width: 16px; height: 16px; flex: none; color: var(--green); }
.short-link__btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.share-grid .btn { min-width: 0; padding: 0 8px; }
.share-grid .btn:last-child { grid-column: auto; }
@media (max-width: 440px) { .share-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.share-link .btn { flex: none; }
.share-link .btn--icon { width: 40px; height: 40px; padding: 0; justify-content: center; }


/* ================= SEO: города, стоимость дороги, частые вопросы ================= */
.seo-crumbs { font-size: 14px; }
.seo-crumbs a { color: var(--text-2); }
.seo-crumbs a:hover { color: var(--green); }
.seo-h2 { font-size: 22px; margin: 40px 0 14px; color: var(--ink); }
.seo-dests { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.seo-dest { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--text); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.seo-dest:hover { border-color: var(--green); box-shadow: var(--shadow-sm); }
.seo-dest__route { font-weight: 700; color: var(--ink); }
.seo-dest__route .route-arrow { width: 16px; height: 12px; margin: 0 6px; vertical-align: -1px; }
.seo-dest__meta { font-size: 13px; color: var(--muted); }
.seo-dest__price { font-weight: 700; color: var(--green-dark); }
.seo-dest__price small { font-weight: 500; color: var(--muted); }
.seo-dest__now, .seo-city span { font-size: 12px; color: var(--muted); }
.seo-dest__now.is-on, .seo-city span.is-on { color: var(--green); font-weight: 600; }
.seo-cost { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.seo-cost .panel { margin: 0; padding: 16px; }
.seo-cost b { display: block; font-size: 22px; color: var(--ink); margin: 2px 0 6px; }
.seo-cost p { margin: 0; font-size: 13px; color: var(--text-2); }
.seo-note { font-size: 13px; margin: 10px 0 0; }
.seo-faq { margin-top: 40px; }
.seo-faq h2 { font-size: 22px; margin: 0 0 12px; color: var(--ink); }
.seo-faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); padding: 0 16px; }
.seo-faq details + details { margin-top: 8px; }
.seo-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; color: var(--ink); list-style-position: inside; }
.seo-faq summary .route-arrow { width: 16px; height: 12px; margin: 0 5px; vertical-align: -1px; }
.seo-faq p { margin: 0 0 14px; color: var(--text-2); }
.seo-cities { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.seo-city { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink); text-decoration: none; }
.seo-city:hover { border-color: var(--green); }
@media (max-width: 900px) { .seo-cost { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .seo-cost { grid-template-columns: 1fr; } }
@media (min-width: 441px) { .nav .nav__theme { display: none !important; } }   /* в шапке уже есть кнопка темы — в меню не дублируем */


/* ================= «Один из первых водителей» и пост для Facebook-групп ================= */
:root { --gold: #a46a00; --gold-soft: #fff4d6; --gold-line: #f0d48a; }
:root[data-theme="dark"] { --gold: #f2c45a; --gold-soft: rgba(242, 196, 90, .12); --gold-line: rgba(242, 196, 90, .38); }
.trust__item--gold { color: var(--gold); background: var(--gold-soft); border-color: var(--gold-line); }
.trust__item--gold .pi { color: var(--gold); }
.founder-mark { display: inline-flex; vertical-align: -3px; margin-left: 5px; color: var(--gold); }
.founder-mark .pi { width: 17px; height: 17px; }
.founder-promo, .gp-founder { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--gold-soft); border: 1px solid var(--gold-line); color: var(--text); font-size: 14px; margin-top: 14px; }
.founder-promo .pi, .gp-founder .pi { width: 24px; height: 24px; flex: none; color: var(--gold); }
.gp-founder { margin: 0 0 14px; font-weight: 600; }
.gp-done { display: flex; align-items: center; gap: 8px; color: var(--green); margin: 0 0 10px; }
.gp-done .pi { width: 22px; height: 22px; }
.gp-langs { display: flex; gap: 6px; margin-bottom: 10px; }
.gp-text { width: 100%; min-height: 200px; resize: vertical; border: 1px solid var(--input-border); border-radius: 12px; padding: 12px 14px; font: inherit; font-size: 14px; line-height: 1.5; color: var(--text); background: var(--surface-2); }
.gp-text:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 4px var(--focus-ring); background: var(--surface); }
.gp-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.gp-actions .btn .pi { width: 17px; height: 17px; }
@media (max-width: 520px) { .gp-actions .btn { flex: 1 1 100%; justify-content: center; } }


/* ================= «Вы вернёте ≈ X €», часть пути ================= */
.return-calc { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--green-soft); color: var(--text); font-size: 14px; }
.return-calc > .pi { width: 22px; height: 22px; flex: none; color: var(--green); margin-top: 1px; }
.return-calc b { color: var(--ink); }
.return-calc .muted { margin-top: 2px; font-size: 13px; }
.return-calc--sm { align-items: center; margin: 0 0 14px; padding: 9px 12px; }
.money-banner { display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin: 0 0 14px; border-radius: 14px; background: var(--green-soft); }
.money-banner > .pi { width: 30px; height: 30px; flex: none; color: var(--green); }
.money-banner b { display: block; font-size: 17px; color: var(--ink); }
.money-banner span { font-size: 13px; color: var(--text-2); }
.partial-check b { font-weight: 600; color: var(--ink); }
.seg-approve { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); margin: -4px 0 10px; }
.seg-approve .pi { width: 17px; height: 17px; color: var(--green); }


/* ================= Поля с единицей измерения, цены топлива ================= */
.unit-input { position: relative; }
.unit-input input { width: 100%; padding-right: 92px !important; }
.unit-input__unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); font-size: 13px; color: var(--muted); pointer-events: none; white-space: nowrap; }
.fuel-form { max-width: 760px; }
.fair .link-btn { font-size: 13px; padding: 0; margin-left: 4px; }
