/* ТВОЯПОЕЗДКА.РФ — основные стили */
:root {
  color-scheme: light;
  --brand: #0a6b5c;
  --brand-dark: #084d42;
  --brand-light: #0d8a76;
  --accent: #e8a317;
  --accent-hover: #d49210;
  --ink: #1a1a1a;
  --muted: #5c6468;
  --surface: #ffffff;
  --line: #e2e8eb;
  --bg: #f8faf9;
  --shadow-sm: 0 4px 16px rgba(10, 107, 92, 0.08);
  --shadow-lg: 0 20px 50px rgba(10, 107, 92, 0.12);
  --radius: 12px;
  --radius-lg: 20px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Inter", "PT Sans", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: inherit;
  text-decoration: none;
}

[hidden] {
  display: none !important;
}

.required {
  color: #c00;
}

/* Объёмные чекбоксы для подробностей поездки */
.trip-detail-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  margin: 6px 8px 6px 0;
  background: linear-gradient(145deg, #fff 0%, #f0f4f3 100%);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 6px rgba(10, 107, 92, 0.08), inset 0 1px 0 rgba(255,255,255,0.8);
}
.trip-detail-checkbox:hover {
  border-color: var(--brand);
  box-shadow: 0 4px 12px rgba(10, 107, 92, 0.15);
}
.trip-detail-checkbox input {
  width: 20px;
  height: 20px;
  accent-color: var(--brand);
  cursor: pointer;
}
.trip-detail-checkbox input:checked + .trip-detail-label {
  color: var(--brand-dark);
  font-weight: 600;
}
.trip-detail-checkbox:has(input:checked) {
  background: linear-gradient(145deg, #e8f5f3 0%, #d4ebe6 100%);
  border-color: var(--brand);
  box-shadow: 0 3px 10px rgba(10, 107, 92, 0.2), inset 0 1px 0 rgba(255,255,255,0.5);
}
.trip-detail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.trip-detail-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  background: linear-gradient(145deg, #e8f5f3 0%, #d4ebe6 100%);
  border-radius: 8px;
  font-size: 13px;
  color: var(--brand-dark);
  font-weight: 500;
  box-shadow: 0 2px 4px rgba(10, 107, 92, 0.12);
}

/* Карточка поездки — новый дизайн */
.trip-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.trip-main { display: flex; flex-direction: column; gap: 20px; }
.trip-hero {
  padding: 0 0 8px;
  border-bottom: 1px solid var(--line);
}
.trip-hero h1 { font-size: 1.5rem; margin: 0 0 6px; line-height: 1.3; }
.trip-meta { margin: 0 0 12px; color: var(--muted); font-size: 15px; }
.trip-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.badge-trip { background: var(--brand); color: #fff; }
.badge-status { font-size: 12px; }
.trip-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}
.trip-card-route .trip-route-row {
  display: flex; align-items: center; justify-content: center; gap: 16px; margin-bottom: 8px;
}
.trip-card-route {
  text-align: center;
}
.trip-card-seats {
  text-align: center;
}
.trip-card-seats h3 { margin: 0 0 4px; font-size: 1rem; }
.trip-route-row {
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 500;
}
.trip-route-seats {
  font-size: 0.95rem;
  margin-top: 10px;
  text-align: center;
}
.trip-route-seats .seats-label { color: var(--muted); }
.trip-route-seats .seats-fraction { font-weight: 700; color: var(--brand); font-size: 1.05em; }
.trip-route-seats .seats-suffix { color: var(--muted); }
.trip-time { font-weight: 600; font-size: 1.05rem; }
.trip-arrow { color: var(--brand); font-size: 1.2rem; }
.trip-conditions-list { margin: 0; padding-left: 20px; }
.trip-conditions-list li { margin: 6px 0; }
.trip-driver-row { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; }
.trip-driver-info { flex: 1; min-width: 0; }
.trip-driver-name { font-weight: 600; margin: 0 0 4px; }
.trip-car-info { margin: 0 0 8px; font-size: 14px; }
.trip-confirmed-badge { color: #22c55e; font-weight: 600; }
.trip-note, .trip-sidebar-note { font-size: 13px; margin: 12px 0 0; }
.trip-car-photos { display: flex; gap: 12px; flex-wrap: wrap; }
.trip-car-photo {
  width: 120px; height: 90px; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line);
}
.trip-card-car .car-photo-grid { margin-top: 8px; }
.trip-card-driver-sidebar {
  text-align: center;
  padding: 16px;
  width: 100%;
  box-sizing: border-box;
}
.trip-driver-avatar-wrap {
  position: relative;
  display: inline-block;
  margin: 0 auto 12px;
}
.trip-driver-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 600;
  color: var(--muted);
  flex-shrink: 0;
}
.user-status-indicator {
  position: absolute;
  bottom: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.user-status-online { background: #22c55e; }
.user-status-offline { background: #94a3b8; }
.trip-driver-name-rating-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.trip-driver-name {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  word-break: break-word;
  text-align: center;
}
.trip-driver-rating {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 0;
}
.account-tab-badge {
  display: none;
  background: var(--brand);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  vertical-align: middle;
  line-height: 20px;
  text-align: center;
}
.account-tab-badge:not(:empty) { display: inline-flex; }
.search-card-driver { display: flex; align-items: center; gap: 8px; margin: 8px 0 4px; }
.search-card-driver-top { margin: 0 0 8px; }
.search-driver-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.search-driver-avatar-placeholder { background: var(--line); }
.search-driver-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.search-driver-status.user-status-online { background: #22c55e; }
.search-driver-status.user-status-offline { background: #94a3b8; }
.booking-passenger-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.booking-passenger-card-inner {
  display: flex;
  width: 100%;
  align-items: flex-start;
  gap: 16px;
}
.booking-passenger-left {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  min-width: 0;
}
.booking-passenger-info {
  flex: 1;
  min-width: 0;
}
.booking-passenger-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  flex-shrink: 0;
}
.booking-passenger-status {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 13px;
}
.booking-passenger-status.user-status-online { background: #22c55e; }
.booking-passenger-status.user-status-offline { background: #94a3b8; }
.booking-passenger-actions { display: flex; flex-wrap: wrap; gap: 8px; width: 100%; }

/* Заявки по поездке — trip-bookings.html */
.trip-bookings-layout { max-width: 640px; padding: 32px 0; }
.trip-bookings-route-card { margin: 12px 0 16px; padding: 16px; }
.trip-bookings-hint { font-size: 13px; margin: 0 0 20px; }
.trip-bookings-list { display: flex; flex-direction: column; gap: 16px; }
.trip-bookings-footer { margin-top: 24px; }
.trip-bookings-back { margin-top: 16px; }

.trip-booking-card {
  display: flex;
  flex-direction: column;
  padding: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.trip-booking-card-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}
.trip-booking-card-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.trip-booking-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-size: cover;
  background-position: center;
  display: block;
}
.trip-booking-avatar-placeholder {
  background: var(--line);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='44' height='44' viewBox='0 0 44 44'><circle cx='22' cy='22' r='22' fill='%23e2e8eb'/><text x='22' y='28' text-anchor='middle' font-size='20' fill='%2394a3b8'>?</text></svg>");
}
.trip-booking-status {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid #fff;
}
.trip-booking-status.user-status-online { background: #22c55e; }
.trip-booking-status.user-status-offline { background: #94a3b8; }
.trip-booking-card-main { flex: 1; min-width: 0; }
.trip-booking-card-name { font-weight: 600; font-size: 1rem; margin-bottom: 4px; }
.trip-booking-card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
}
.trip-booking-badge { font-size: 12px; }
.trip-booking-card-phone { font-size: 13px; margin-top: 4px; }
.trip-booking-card-phone a { color: var(--brand); }
.trip-booking-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid var(--line);
}

.manage-trip-card {
  padding: 16px;
  background: var(--bg);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.manage-trip-card .results-card { margin: 0; padding: 0; background: transparent; border: none; }
.trip-stars-wrap { display: inline-flex; gap: 2px; }
.trip-star {
  color: #ddd;
  font-size: 1.1rem;
  display: inline-block;
  width: 1.1em;
}
.trip-star-full { color: #f0b429; }
.trip-star-empty { color: #ddd; }
.trip-star-partial {
  background: linear-gradient(90deg, #f0b429 0%, #f0b429 calc(var(--fill, 0) * 1%), #ddd calc(var(--fill, 0) * 1%), #ddd 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.trip-rating-num { font-size: 14px; font-weight: 600; margin-left: 4px; }
.trip-reviews-toggle { width: 100%; margin-top: 10px; }
.trip-reviews-list {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.trip-review-item {
  font-size: 14px;
  margin: 6px 0;
}
.trip-review-stars { color: #f0b429; }
.trip-sidebar .trip-card-price { position: sticky; top: 90px; text-align: center; }
.trip-sidebar .trip-card-price h3 { text-align: center; }
.trip-card-price .trip-price { font-size: 1.75rem; font-weight: 700; color: var(--brand); margin: 0 0 4px; display: block; text-align: center; width: 100%; }
.trip-card-price #trip-price-label { display: block; text-align: center; }
.trip-sidebar .btn { width: 100%; margin-top: 8px; }

.container {
  width: min(1140px, 94%);
  margin: 0 auto;
}

main {
  flex: 1 1 auto;
}

/* Шапка */
.site-header {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 50%, var(--brand-light) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.15);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}

.logo {
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.logo-name {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
}

.logo-dot {
  color: var(--accent);
}

.nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}

.nav-toggle {
  display: none;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.4);
  background: transparent;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.nav-toggle-lines {
  width: 18px;
  height: 2px;
  background: #fff;
  position: relative;
  display: inline-block;
}

.nav-toggle-lines::before,
.nav-toggle-lines::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: #fff;
}

.nav-toggle-lines::before { top: -6px; }
.nav-toggle-lines::after { top: 6px; }

.nav a {
  color: rgba(255,255,255,0.92);
  font-weight: 600;
  transition: color 0.2s;
}

.nav a:hover {
  color: #fff;
}
.nav-logout {
  display: none;
}
.nav-login {
  display: none;
}
.nav-account {
  display: none;
}
.profile-title-mobile {
  display: none;
  margin: 0 0 12px;
}
.profile-title-desktop {
  margin: 0 0 12px;
}

.btn {
  padding: 10px 20px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: #1a1a1a;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
  box-shadow: 0 6px 24px rgba(232, 163, 23, 0.35);
}

.btn-outline {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
}

.site-header .btn-outline:hover {
  background: rgba(255,255,255,0.15);
}

/* Кнопка в контенте (не в шапке): серый контур */
.btn-outline-secondary {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--ink);
}
.btn-outline-secondary:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(10, 107, 92, 0.06);
}

.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

/* Hero */
.hero {
  background: linear-gradient(160deg, #e8f5f3 0%, #f0f9f7 50%, #fff 100%);
  padding: 56px 0 72px;
}

/* Карта: ниже шапки */
.leaflet-container,
.leaflet-pane,
.leaflet-control {
  z-index: 1 !important;
}

.hero-copy {
  text-align: center;
  margin-bottom: 32px;
}

.eyebrow {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 12px;
  line-height: 1.2;
}

.hero .muted {
  font-size: 1.05rem;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
}

/* Форма поиска на главной */
.search-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px;
  max-width: 640px;
  margin: 0 auto;
  display: grid;
  gap: 16px;
}

.search-page-title {
  text-align: center;
  margin: 0 0 8px;
}
.search-panel {
  padding-top: 16px;
}
.search-help {
  margin: 6px 0 12px;
  display: none;
}
.search-results-hint {
  margin-top: 8px;
}

.search-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.search-card input,
.search-card select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
}

.search-card .btn-primary {
  margin-top: 8px;
  padding: 14px 24px;
  width: 100%;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.chip-group {
  display: flex;
  gap: 8px;
}

.chip {
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.chip:hover {
  border-color: var(--brand);
  color: var(--brand);
}

.chip-active,
.chip.chip-active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}

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

.card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s;
}

.card:hover {
  box-shadow: var(--shadow-lg);
}

.card h3 {
  margin: 0 0 8px;
  font-size: 1.2rem;
}

.card .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--brand);
  margin-top: 12px;
}

.card .link:hover { color: var(--brand-dark); }

/* Популярные направления */
.popular-routes {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.popular-route-card {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
}

.popular-route-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
  color: var(--brand);
}

/* Секции */
.steps {
  padding: 48px 0;
}

.steps h2 {
  text-align: center;
  margin-bottom: 32px;
  font-size: 1.75rem;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  text-align: center;
}

.step-number {
  display: inline-flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  background: var(--brand);
  color: #fff;
  border-radius: 50%;
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 12px;
}

.steps-grid h4 {
  margin: 0 0 8px;
  font-size: 1.1rem;
}

.cta-band {
  background: linear-gradient(135deg, var(--brand-dark) 0%, var(--brand) 100%);
  color: #fff;
  padding: 40px 0;
}

.cta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cta-band h2 { margin: 0 0 8px; }
.cta-band .muted { color: #fff; opacity: 0.95; margin: 0; }
.cta-band .btn-primary {
  background: var(--accent);
  color: var(--ink);
}

/* Поддержка */
.support {
  padding: 48px 0;
  text-align: center;
}

.support h2 { margin-bottom: 12px; }
.support .muted { margin-bottom: 20px; }
.support a.btn-outline {
  color: var(--ink);
  border-color: var(--line);
}
.support a.btn-outline:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(10, 107, 92, 0.06);
}

/* Футер */
.site-footer {
  background: var(--ink);
  color: rgba(255,255,255,0.8);
  padding: 28px 0;
  margin-top: 48px;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: rgba(255,255,255,0.85);
}
.footer-links a:hover { color: #fff; }

/* Layout поиска */
.layout { padding: 32px 0; }
.panel {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.sbp-panel {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.sbp-logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 120px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.sbp-steps {
  margin: 0;
  padding-left: 18px;
}

.sbp-steps li {
  margin: 0 0 6px;
}

.search-layout {
  display: block;
}

@media (max-width: 800px) {
  .search-layout { grid-template-columns: 1fr; }
}

.filters h4 {
  margin: 0 0 12px;
  font-size: 0.95rem;
  color: var(--muted);
}

.filter-group {
  margin-bottom: 20px;
}

.filter-group label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
}

.results { display: flex; flex-direction: column; gap: 16px; }

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

.search-tabs {
  display: inline-flex;
  gap: 0;
  margin-bottom: 12px;
  flex-wrap: nowrap;
  background: rgba(10, 107, 92, 0.08);
  border: 1px solid rgba(10, 107, 92, 0.2);
  border-radius: 999px;
  padding: 6px;
  overflow-x: auto;
  white-space: nowrap;
}
.tab-btn {
  padding: 12px 22px;
  border-radius: 999px;
  border: none;
  background: transparent;
  font-size: 16px;
  font-weight: 700;
  min-width: 140px;
  white-space: nowrap;
  cursor: pointer;
  color: var(--brand-dark);
  transition: all 0.2s;
}
.tab-btn:hover {
  color: var(--brand);
  background: rgba(10, 107, 92, 0.12);
}
.tab-btn.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff;
  box-shadow: 0 6px 18px rgba(10, 107, 92, 0.2);
}

.filters-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.filters-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  align-items: start;
  margin-bottom: 12px;
}
.filters-row:last-child { margin-bottom: 0; }
.filters-row h4 {
  margin: 4px 0 0;
  font-size: 0.95rem;
  color: var(--muted);
}

.search-compact {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  box-shadow: var(--shadow-sm);
}
.search-compact-text {
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-compact-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 700px) {
  .search-compact {
    flex-direction: column;
    align-items: stretch;
  }
  .search-compact-text {
    white-space: normal;
  }
  .search-compact-actions {
    width: 100%;
  }
  .search-compact-actions .btn {
    width: 100%;
  }
}

.trip-card {
  padding: 18px;
}
.trip-card-main {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 12px;
  align-items: start;
}
.trip-time {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-weight: 700;
  color: var(--ink);
  font-size: 14px;
}
.trip-time-duration {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}
.trip-route-title {
  font-weight: 700;
  font-size: 16px;
  color: var(--ink);
}
.trip-route-meta {
  font-size: 12px;
}
.trip-route-badges {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 6px;
}
.trip-price {
  text-align: right;
  min-width: 90px;
}
.trip-card-footer {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}
.trip-card-footer .btn {
  width: fit-content;
}

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  background: rgba(10, 107, 92, 0.12);
  color: var(--brand);
}
.badge-warning {
  background: #fff4cc;
  color: #8a5b00;
}
.badge-danger {
  background: #dc2626;
  color: #fff;
}
.badge-success {
  background: #dff6e8;
  color: #1f7a4a;
}
.badge-neutral {
  background: #eef2f5;
  color: #3d4b55;
}

.results-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.results-card strong { display: block; margin-bottom: 4px; }
.results-card .muted { font-size: 14px; margin: 4px 0 12px; }
.results-card .price { font-size: 1.25rem; font-weight: 700; color: var(--brand); }
.notice { font-size: 14px; color: var(--muted); margin-top: 8px; }

/* Страница поездки */
.trip-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 24px;
  align-items: start;
}
.trip-layout > section {
  grid-column: 1;
}
.trip-layout > aside {
  grid-column: 2;
}
.trip-layout > .notice-banner {
  grid-column: 1;
}
.trip-layout > .notice-banner + .notice-banner {
  grid-column: 2;
}

@media (max-width: 768px) {
  .trip-layout { grid-template-columns: 1fr; }
  .header-row {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 0;
    flex-wrap: wrap;
  }
  .logo { order: 1; }
  .logo-name { font-size: 1.1rem; }
  .nav-toggle { order: 2; display: inline-flex; }
  .nav {
    order: 3;
    display: none;
    align-items: center;
    gap: 8px;
    width: auto;
    flex-wrap: wrap;
    margin-left: auto;
    margin-right: auto;
  }
  .site-header.nav-open .nav {
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    display: flex;
    background: #fff;
    border-radius: 16px;
    padding: 6px 0;
    box-shadow: var(--shadow-sm);
  }
  .site-header.nav-open .nav a {
    display: flex;
    width: 100%;
    text-align: left;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    color: var(--ink);
    font-weight: 600;
    border-bottom: 1px solid var(--line);
  }
  .site-header.nav-open .nav a::after {
    content: "›";
    color: var(--muted);
    font-size: 18px;
    line-height: 1;
  }
  .site-header.nav-open .nav a:last-child { border-bottom: none; }
  .site-header.nav-open .nav .nav-logout { display: flex; }
  .site-header.nav-open .nav .nav-login { display: flex; }
  .site-header.nav-open .nav .nav-account { display: flex; }
  .header-auth-slot {
    display: none;
  }
  .header-auth-slot .btn { width: auto; }
  .panel { padding: 18px; }
  .results-card { padding: 16px; }
  .search-card { padding: 18px; }
  .account-section-cards { gap: 12px; }
  .account-section-card { padding: 16px; }
  .trip-card-main {
    grid-template-columns: 1fr;
  }
  .trip-time {
    flex-direction: row;
    align-items: center;
    gap: 8px;
  }
  .trip-price {
    text-align: left;
  }
  .trip-card-footer .btn {
    width: 100%;
  }
  .search-tabs {
    width: 100%;
  }
  .tab-btn {
    min-width: 0;
    padding: 10px 14px;
  }
  .search-compact {
    flex-direction: column;
    align-items: flex-start;
  }
  .search-compact {
    padding: 10px 12px;
  }
  .search-compact-text {
    font-size: 14px;
  }
  .search-compact-actions {
    width: 100%;
  }
  .search-compact-actions .btn {
    flex: 1 1 auto;
  }
  .search-compact-text {
    white-space: normal;
  }
  .filters-row {
    grid-template-columns: 1fr;
  }
  .profile-header {
    display: block;
  }
  .profile-side {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    text-align: center;
    justify-content: center;
  }
  .profile-balance-block { text-align: center; }
  .profile-fields {
    align-items: center;
    text-align: center;
  }
  .profile-actions {
    justify-content: center;
  }
  .profile-title-mobile { display: block; }
  .profile-title-desktop { display: none; }
}

@media (max-width: 640px) {
  .hero {
    padding: 32px 0 40px;
  }
  .hero-copy {
    text-align: left;
    margin-bottom: 18px;
  }
  .hero .muted {
    margin: 0;
    max-width: none;
    font-size: 1rem;
  }
  .search-card {
    margin: 0;
    max-width: none;
    padding: 16px;
    border-radius: 16px;
  }
  .cards-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    padding: 28px 0;
  }
  .card {
    padding: 20px;
  }
  .popular-routes {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  .popular-route-card {
    flex: 0 0 auto;
    white-space: nowrap;
  }
  .steps {
    padding: 32px 0;
  }
  .steps h2 {
    text-align: left;
    margin-bottom: 20px;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 16px;
    text-align: left;
  }
  .step-number {
    margin-bottom: 8px;
  }
  .cta-row {
    flex-direction: column;
    align-items: flex-start;
  }
  .cta-band .btn-primary {
    width: 100%;
  }
  .support {
    text-align: left;
    padding: 32px 0;
  }
  .support-centered .support-actions {
    justify-content: flex-start;
  }
  .search-page-title {
    text-align: left;
  }
  .search-help {
    display: block;
  }
  .search-results-hint {
    display: none;
  }
  .profile-grid {
    flex-direction: column;
    align-items: center;
    text-align: left;
    gap: 16px;
  }
  .profile-side {
    order: 1;
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
    padding: 12px;
    margin: 0;
    text-align: left;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-areas:
      "avatar"
      "actions"
      "balance"
      "stats";
    gap: 10px 12px;
    align-items: center;
    justify-items: center;
  }
  .profile-fields { order: 2; width: 100%; }
  .profile-title-mobile { display: none; }
  .profile-title-desktop { display: none; }
  .profile-fields {
    align-items: stretch;
    padding-right: 0;
  }
  .profile-row {
    align-items: stretch;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 12px;
  }
  .profile-row label,
  .profile-row .profile-label,
  .profile-confirm {
    width: 100%;
  }
  .profile-confirm {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 8px;
  }
  .profile-grid .avatar {
    width: 72px;
    height: 72px;
    margin: 0;
  }
  .profile-side .btn {
    width: auto;
    justify-content: center;
  }
  .profile-avatar-block {
    grid-area: avatar;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
  }
  .profile-avatar-block .avatar,
  .profile-avatar-block .muted {
    margin-left: auto;
    margin-right: auto;
  }
  .profile-side #profile-upload-photo { grid-area: actions; justify-self: center; }
  .profile-side .profile-balance-block { grid-area: balance; justify-self: stretch; }
  .profile-side #profile-stats { grid-area: stats; justify-self: center; }

  .trip-layout {
    grid-template-columns: 1fr;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .trip-main,
  .trip-sidebar {
    display: contents;
  }
  .trip-mobile-block {
    width: 100%;
    order: 10;
  }
  .trip-mobile-block[data-trip-order="1"] { order: 1; }
  .trip-mobile-block[data-trip-order="2"] { order: 2; }
  .trip-mobile-block[data-trip-order="3"] { order: 3; }
  .trip-mobile-block[data-trip-order="4"] { order: 4; }
  .trip-mobile-block[data-trip-order="5"] { order: 5; }
  .trip-mobile-block[data-trip-order="6"] { order: 6; }
  .trip-mobile-block .trip-card {
    padding: 12px 14px;
    width: 100%;
  }
  .trip-mobile-block .trip-card h3 {
    margin: 0 0 8px;
    font-size: 1rem;
  }
  .trip-mobile-block .trip-hero {
    padding: 0 0 8px;
  }
  .trip-mobile-block .trip-hero h1 { font-size: 1.25rem; }
  .trip-badges {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 6px;
  }
  .trip-block-route .trip-card-route {
    margin-top: 8px;
  }
  .trip-block-route .trip-card-route .trip-route-row {
    margin-bottom: 4px;
  }
  .trip-card-driver-sidebar {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
  }
  .trip-card-driver-sidebar .trip-driver-avatar-wrap {
    flex-shrink: 0;
    margin: 0;
  }
  .trip-card-driver-sidebar .trip-driver-name-rating-wrap {
    flex: 1;
    min-width: 0;
  }
  .trip-card-driver-sidebar .muted {
    width: 100%;
  }
  .trip-sidebar .trip-card-price { position: static; }

  .car-photo-grid {
    width: 100%;
    max-width: none;
  }
  .car-photo-slot {
    width: 80vw;
    max-width: 320px;
  }
}

/* Формы */
.input-field {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 16px;
}

.input-row {
  display: flex;
  gap: 12px;
  align-items: center;
}

/* Профиль */
.profile-header {
  display: block;
}
.profile-side {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.profile-side .btn {
  width: auto;
}
.profile-side .muted {
  margin-bottom: 0;
}
.profile-balance-block {
  text-align: left;
}
.profile-side .avatar {
  margin: 0;
}
.profile-avatar-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.profile-avatar-block .avatar {
  margin-bottom: 4px;
}
.profile-title-mobile {
  display: none;
  margin: 0 0 12px;
}
.profile-title-desktop {
  margin: 0 0 12px;
}
.profile-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.profile-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.profile-fields .input-field[readonly],
.profile-fields textarea[readonly] {
  background: #f6f7f8;
  color: #3d4b55;
}
.profile-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.profile-row > label {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.profile-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
}
.profile-confirm {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.profile-input-short {
  max-width: 320px;
}

.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: var(--line);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='96' height='96' viewBox='0 0 96 96'><circle cx='48' cy='48' r='48' fill='%23e2e8eb'/><text x='48' y='58' text-anchor='middle' font-size='42' font-family='Arial, sans-serif' fill='%2394a3b8'>?</text></svg>");
  background-repeat: no-repeat;
  background-position: center;
  background-size: cover;
}

.car-photo-grid {
  display: flex;
  gap: 10px;
  max-width: 520px;
  overflow-x: auto;
  flex-wrap: nowrap;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
}
.car-photo-slot {
  width: 160px;
  height: 110px;
  border-radius: 12px;
  background: var(--bg);
  border: 1px dashed var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex: 0 0 auto;
  position: relative;
  transition: transform 0.2s ease;
}
.car-photo-lightbox {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.car-photo-lightbox-img {
  max-width: 95vw;
  max-height: 95vh;
  object-fit: contain;
  pointer-events: none;
}
.car-photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.car-photo-slot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Утилиты */
.muted { color: var(--muted); }
hr { border: none; border-top: 1px solid var(--line); margin: 16px 0; }

.form-error {
  display: block;
  font-size: 13px;
  color: #c53030;
  margin-top: 6px;
}
.form-error[hidden] { display: none !important; }
input.input-field.invalid { border-color: #c53030; }
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.table th,
.table td {
  text-align: left;
  padding: 8px 6px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.support-widget {
  position: fixed;
  right: 20px;
  bottom: 20px;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  z-index: 50;
}
.support-widget-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  font-weight: 700;
}
.support-widget-close {
  border: none;
  background: transparent;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  color: var(--muted);
}
.support-widget-body {
  padding: 12px;
}
.support-widget-messages,
.support-chat-box {
  height: 220px;
  overflow-y: auto;
  background: var(--bg);
  border-radius: 12px;
  padding: 10px;
  border: 1px solid var(--line);
}
.support-widget-input {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}
.support-widget-input .input-field {
  flex: 1;
}
.support-msg {
  display: flex;
  margin-bottom: 8px;
}
.support-msg-user {
  justify-content: flex-end;
}
.support-msg-support {
  justify-content: flex-start;
}
.support-msg-text {
  max-width: 80%;
  padding: 8px 10px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.3;
  background: #eef2f5;
  color: #2b3640;
}
.support-msg-user .support-msg-text {
  background: #dff6e8;
  color: #1f7a4a;
}
.support-widget-rating {
  margin-top: 8px;
  padding: 8px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  background: #fafafa;
}
.support-widget-stars button {
  border: none;
  background: transparent;
  font-size: 18px;
  cursor: pointer;
  color: #f0b429;
}

.notice-banner {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px dashed var(--line);
  background: #fafafa;
  color: #2b3640;
  font-size: 13px;
}

.btn-warning {
  background: #ffd166;
  border-color: #ffd166;
  color: #3b2a00;
}
.btn-warning:hover {
  background: #ffc23d;
  border-color: #ffc23d;
}

.support-centered {
  text-align: center;
}
.support-centered .support-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
}

/* Центр поддержки (support.html) */
.support-dashboard { display: flex; flex-direction: column; gap: 20px; }
.support-dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
}
.support-dashboard-header .badge { margin-left: 8px; }
.support-dashboard-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: start;
}
@media (max-width: 720px) {
  .support-dashboard-top { grid-template-columns: 1fr; }
}
.support-profile-card,
.support-autoreply-card { padding: 16px; }
.support-section-title { margin: 0 0 12px; font-size: 1rem; }
.support-profile-fields { display: flex; flex-direction: column; gap: 12px; }
.support-profile-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 12px;
}
.support-profile-row > label { flex: 1; min-width: 200px; }
.support-profile-row .input-field { width: 100%; max-width: 280px; }
.support-verify-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.support-profile-actions { margin-top: 12px; }
.support-profile-hint { margin: 8px 0 0; font-size: 12px; }
.support-autoreply-card { min-width: 0; }
.support-autoreply-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.support-autoreply-card textarea { margin-bottom: 8px; width: 100%; max-width: 320px; }
.support-dashboard-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 860px) {
  .support-dashboard-main { grid-template-columns: 1fr; }
}
.support-threads-col { display: flex; flex-direction: column; gap: 16px; }
.support-threads-list { max-height: 200px; overflow-y: auto; }
.support-chat-col { min-width: 0; }
.support-chat-box { min-height: 180px; }
.support-reply-area { margin-top: 12px; }
.support-reply-area textarea { width: 100%; margin-bottom: 8px; }
.support-reply-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.cta-text {
  color: #fff4cc;
}

.notice-list {
  margin: 8px 0 0;
  padding-left: 18px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 80;
  padding: 16px;
}
.modal-backdrop.active {
  display: flex;
}
.modal-card {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 720px;
  width: 100%;
  padding: 12px;
  box-shadow: var(--shadow-lg);
}
.verify-modal-card {
  max-width: 420px;
  padding: 20px;
}
.verify-modal-card h3 {
  margin: 0 0 8px;
}
.verify-modal-card .input-field {
  margin: 8px 0 6px;
}
.verify-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.modal-card img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  display: block;
}
.modal-thumbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}
.modal-thumb {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0;
  border-radius: 8px;
  width: 70px;
  height: 50px;
  overflow: hidden;
  cursor: pointer;
}
.modal-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.modal-close {
  position: absolute;
  top: 8px;
  right: 8px;
  border: none;
  background: #fff;
  border-radius: 999px;
  width: 32px;
  height: 32px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

/* Оценка звёздами */
.star-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 1.5rem;
  color: var(--line);
  padding: 0 2px;
}
.star-btn:hover { color: var(--accent); }

/* Личный кабинет: карточки разделов */
.account-section-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin: 24px 0 32px;
}

.account-section-card {
  display: block;
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s, transform 0.2s;
  position: relative;
}

.account-section-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--brand);
  transform: translateY(-2px);
}

/* Личный кабинет: меню как список */
.account-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  margin: 12px 0 16px;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.account-tab-btn {
  background: transparent;
  border: none;
  padding: 10px 4px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}
.account-tab-btn.account-tab-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.account-tab-content {
  display: none;
}
.account-tab-content.account-tab-active {
  display: block;
}
.account-menu {
  display: grid;
  gap: 20px;
}
.account-menu-title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  color: var(--muted);
}
.account-menu-group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.account-menu-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 14px 16px;
  color: var(--ink);
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.account-menu-item::after {
  content: "›";
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.account-menu-item:last-child {
  border-bottom: none;
}
.account-menu-item:hover {
  background: var(--bg);
}

@media (max-width: 640px) {
  .account-layout .results-card {
    width: 100%;
    box-sizing: border-box;
    border-radius: 14px;
  }
  .account-layout .results-card + .results-card {
    margin-top: 12px;
  }
  .account-layout .results-card strong {
    display: block;
  }
  .account-layout .results-card .btn {
    width: 100%;
    justify-content: center;
  }
  .account-layout .results-card .btn + .btn {
    margin-top: 6px;
  }
  .account-layout .results-card .btn-outline-secondary {
    margin-right: 0 !important;
  }
  .account-layout .results-card .muted {
    word-break: break-word;
  }
  .account-tabs {
    gap: 12px;
  }
}

.account-section-card h4 {
  margin: 0 0 8px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
}

.account-section-card .muted {
  font-size: 13px;
  margin: 0;
}

.account-section-card .account-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-hover) 0%, var(--accent) 100%);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(232, 163, 23, 0.35);
}

.account-layout main {
  max-width: 720px;
  margin: 0 auto;
}

/* Красный бейдж непрочитанных сообщений на кнопке «Написать» */
.chat-btn-wrap {
  position: relative;
  display: inline-block;
}
.chat-unread-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #c53030;
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(197, 48, 48, 0.4);
}

html { scroll-behavior: smooth; }

/* Админ: сворачиваемые блоки */
.admin-block { margin-bottom: 16px; }
.admin-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  padding: 4px 0;
  user-select: none;
  border-bottom: 1px solid transparent;
}
.admin-block-header:hover { opacity: 0.9; }
.admin-block-toggle {
  display: inline-block;
  width: 20px;
  height: 20px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%235c6468' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat center;
  transition: transform 0.2s;
}
.admin-block.collapsed .admin-block-toggle { transform: rotate(-90deg); }
.admin-block-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 8px;
}
.admin-block-content {
  margin: 8px 0 12px;
  max-height: 500px;
  overflow-x: hidden;
  overflow-y: auto;
}
.admin-block.collapsed .admin-block-toolbar,
.admin-block.collapsed .admin-block-content { display: none; }
.admin-block-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.admin-block td .btn { margin: 4px 4px 4px 0; }
.admin-user-actions {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
  overflow-x: auto;
  min-width: 0;
}
.admin-user-actions .btn { margin: 0; white-space: nowrap; flex-shrink: 0; }

.admin-user-cards { display: flex; flex-direction: column; gap: 20px; }
.admin-user-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  width: 100%;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}
.admin-user-card-body { padding: 14px 16px; flex: 1; }
.admin-user-card-row { font-size: 13px; margin-bottom: 6px; line-height: 1.4; }
.admin-user-card-row:last-child { margin-bottom: 0; }
.admin-user-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 12px 16px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  width: 100%;
  box-sizing: border-box;
}
.admin-user-card-actions .btn { margin: 0; }

.admin-support-content { display: flex; flex-direction: column; gap: 16px; }
.admin-support-token-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-support-token-row label { flex: 1; min-width: 200px; }
.admin-support-token-row .input-field { width: 100%; }
.admin-support-users-title { font-size: 13px; font-weight: 600; color: var(--muted); margin-top: 8px; }
