:root {
  --bg: #f6f4ef;
  --card: #ffffff;
  --ink: #1b2430;
  --muted: #6b7380;
  --line: #e4e0d6;
  --brand: #00a3c4;      /* небесно-голубой */
  --brand-dark: #00799a;
  --gold: #f2b705;       /* золото степи */
  --ok: #1f9d55;
  --bad: #d64545;
  --radius: 14px;
}
* { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: 'Manrope', system-ui, sans-serif; line-height: 1.5;
}
a { color: var(--brand-dark); }
img { max-width: 100%; }

.topbar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 20px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 10; flex-wrap: wrap;
}
.logo { font-weight: 800; font-size: 26px; text-decoration: none; color: var(--ink); letter-spacing: -0.5px; }
.logo span { color: var(--brand); }
#nav { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
#nav a { text-decoration: none; color: var(--ink); font-weight: 600; padding: 6px 10px; border-radius: 8px; }
#nav a:hover { background: var(--bg); }
#nav img { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; vertical-align: middle; }

.container { max-width: 960px; margin: 0 auto; padding: 24px 16px 60px; }
.footer { text-align: center; color: var(--muted); font-size: 13px; padding: 20px 16px 40px; }

.hero {
  background: linear-gradient(135deg, var(--brand) 0%, #0a6e8a 100%);
  color: #fff; border-radius: 20px; padding: 36px 28px; margin-bottom: 24px;
}
.hero h1 { margin: 0 0 8px; font-size: clamp(26px, 5vw, 40px); line-height: 1.15; }
.hero p { margin: 0 0 20px; opacity: .92; max-width: 560px; }
.hero .search { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; }
.hero input { border: none; }
@media (max-width: 620px) { .hero .search { grid-template-columns: 1fr; } }

.card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; margin-bottom: 16px;
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }

.trip { display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .12s, box-shadow .12s; }
.trip:hover { transform: translateY(-2px); box-shadow: 0 8px 22px rgba(0,0,0,.07); }
.route { font-weight: 800; font-size: 18px; }
.route .arrow { color: var(--brand); margin: 0 6px; }
.meta { display: flex; gap: 8px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.price { font-weight: 800; color: var(--ink); font-size: 18px; }

.user { display: flex; align-items: center; gap: 10px; }
.user img, .avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--line); }
.avatar.big { width: 96px; height: 96px; }
.user .name { font-weight: 700; }
.badge {
  display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px;
  border-radius: 999px; background: #e7f7ee; color: var(--ok);
}
.badge.gold { background: #fff5d6; color: #a07800; }
.badge.grey { background: #eee; color: var(--muted); }
.badge.red { background: #fde8e8; color: var(--bad); }
.stars { color: var(--gold); font-weight: 700; }

label { display: block; font-weight: 600; font-size: 14px; margin: 12px 0 4px; }
input, select, textarea {
  width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px;
  font: inherit; background: #fff; color: var(--ink);
}
textarea { min-height: 90px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 620px) { .row { grid-template-columns: 1fr; } }

.btn {
  display: inline-block; border: none; cursor: pointer; font: inherit; font-weight: 700;
  padding: 11px 18px; border-radius: 10px; background: var(--brand); color: #fff; text-decoration: none;
}
.btn:hover { background: var(--brand-dark); }
.btn.gold { background: var(--gold); color: var(--ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.small { padding: 6px 12px; font-size: 14px; }
.btn.bad { background: var(--bad); }
.btn:disabled { opacity: .5; cursor: default; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

.muted { color: var(--muted); }
.notice { background: #fff5d6; border: 1px solid #f2d27a; padding: 12px 14px; border-radius: 10px; margin-bottom: 16px; }
h2 { margin: 0 0 14px; }

.tabs { display: flex; gap: 8px; margin-bottom: 16px; }
.tabs button { background: var(--card); border: 1px solid var(--line); padding: 8px 14px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; }
.tabs button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.chat { display: flex; flex-direction: column; gap: 8px; max-height: 55vh; overflow-y: auto; padding: 4px; margin-bottom: 12px; }
.msg { max-width: 75%; padding: 9px 13px; border-radius: 14px; background: var(--bg); white-space: pre-wrap; word-wrap: break-word; }
.msg.mine { align-self: flex-end; background: var(--brand); color: #fff; }
.msg time { display: block; font-size: 11px; opacity: .7; margin-top: 2px; }
.chat-form { display: flex; gap: 8px; }

.review { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 12px; }
.steps { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); margin: 24px 0; }
.steps .card b { display: block; font-size: 28px; color: var(--brand); }

.toast {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 10px; z-index: 50;
  max-width: 90vw;
}
