:root {
  --navy: #071a3c;
  --navy-2: #0b224d;
  --blue: #2f7cf6;
  --blue-dark: #1d63d8;
  --blue-soft: #e8f1ff;
  --green: #1faa45;
  --green-dark: #178c38;
  --bg: #e7eef6;
  --card: #ffffff;
  --text: #16283f;
  --muted: #5d6e86;
  --line: #e4ebf3;
  --line-strong: #d5e0ec;
  --shadow: 0 10px 28px rgba(16, 40, 80, 0.08);
  --header: 74px;
  --sidebar: 252px;
  --radius: 16px;
  font-family: Inter, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: inherit;
  padding-top: var(--header);
}
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue-dark); }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 3px solid #8cbcff; outline-offset: 2px; }
.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 12px;
  border-radius: 8px;
  z-index: 80;
}
.skip:focus { left: 12px; }

.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; vertical-align: -2px; }
.pin { color: var(--blue); }

.file-warning {
  position: fixed;
  top: var(--header);
  left: 0;
  right: 0;
  z-index: 45;
  background: #fff6e0;
  color: #7a5410;
  border-bottom: 1px solid #f0ddb0;
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 600;
}
.file-warning[hidden] { display: none; }
.need-letterhead {
  margin: 0 0 14px;
  background: #fff6e0;
  color: #7a5410;
  border: 1px solid #f0ddb0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 700;
  line-height: 1.45;
}
.need-letterhead a { color: #1f66e0; }
.letterhead-box { display: flex; flex-direction: column; gap: 8px; }
.letterhead-drop {
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  border: 1.5px dashed #9eb6d4;
  border-radius: 12px;
  padding: 14px;
  background: #f7fbff;
  cursor: pointer;
}
.letterhead-drop input { max-width: 100%; }
.letterhead-title { font-weight: 800; }
.letterhead-sub { color: var(--muted); font-size: 13px; font-weight: 600; line-height: 1.4; }
.letterhead-preview img {
  display: block;
  max-width: 100%;
  max-height: 220px;
  object-fit: contain;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
.letterhead-file {
  padding: 10px 12px;
  border-radius: 10px;
  background: #eef5ff;
  font-weight: 700;
}

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header);
  z-index: 50;
  background: var(--navy);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 18px 0 14px;
  gap: 8px;
}
.brand {
  width: var(--sidebar);
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  flex: 0 0 auto;
  padding-right: 8px;
}
.brand > span { display: flex; flex-direction: column; min-width: 0; }
.logo-truck { width: 42px; height: 28px; }
.brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
}
.brand-sub {
  margin-top: 4px;
  color: #a9bddc;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.topnav {
  display: flex;
  align-items: stretch;
  gap: 2px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.top-actions { flex-shrink: 0; }
.topnav a, .service-link {
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 14.5px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}
.topnav a.is-active, .service-link.is-active { border-bottom-color: #4c94ff; }
.topnav a:hover, .service-link:hover { color: #d6e6ff; }
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
}
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #fff;
}
.icon-btn {
  position: relative;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: #fff;
  display: grid;
  place-items: center;
}
.icon-btn:hover { background: rgba(255, 255, 255, 0.08); }
.dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 9px;
  height: 9px;
  background: #ff3b30;
  border-radius: 50%;
  box-shadow: 0 0 0 2px var(--navy);
}
.notify-wrap { position: relative; }
.notify-panel {
  position: absolute;
  right: 0;
  top: 52px;
  width: min(360px, 80vw);
  background: #fff;
  color: var(--text);
  border-radius: 14px;
  box-shadow: 0 18px 50px rgba(7, 20, 50, 0.22);
  overflow: hidden;
  z-index: 60;
}
.notify-panel[hidden] { display: none; }
.notify-panel h2 {
  padding: 14px 16px 10px;
  font-size: 15px;
}
.notify-panel a {
  display: block;
  padding: 12px 16px;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--line);
}
.notify-panel a:hover { background: #f5f8fc; }
.notify-panel strong { display: block; font-size: 14px; }
.notify-panel span { display: block; color: var(--muted); font-size: 13px; margin-top: 3px; }
.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  text-decoration: none;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
  margin-left: 6px;
}
.account-chip:hover { background: #4690ff; }
.account-chip span {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #5aa0ff;
  display: grid;
  place-items: center;
}

.sidebar {
  position: fixed;
  top: var(--header);
  left: 0;
  bottom: 0;
  width: var(--sidebar);
  background: linear-gradient(180deg, #0a2252 0%, #071a3c 62%, #061433 100%);
  color: #fff;
  z-index: 40;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 0;
  overflow: auto;
}
.side-link, .logout-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  color: #e8eefc;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 14.5px;
  margin-bottom: 2px;
}
.side-link:hover, .logout-btn:hover { background: rgba(255, 255, 255, 0.06); }
.side-link.is-active {
  background: #2f6fe4;
  box-shadow: 0 8px 16px rgba(18, 70, 180, 0.28);
}
.sidebar-bottom {
  margin-top: auto;
  position: relative;
  padding-top: 12px;
}
.side-donate {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #ffc439;
  color: #003087;
  text-decoration: none;
  font-weight: 800;
  font-size: 14.5px;
}
.side-donate:hover { background: #ffb700; }
.donate-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  background: #fff;
  border: 1px solid #d6e4f7;
  border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 16px;
  text-decoration: none;
  color: var(--text);
}
.donate-card:hover { border-color: #003087; }
.donate-kicker {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #003087;
}
.donate-card strong { font-size: 18px; letter-spacing: -0.02em; }
.donate-text {
  color: var(--muted);
  font-size: 13.5px;
  line-height: 1.45;
  font-weight: 600;
}
.donate-btn {
  margin-top: 6px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  background: #ffc439;
  color: #003087;
  font-weight: 800;
}
.donate-card:hover .donate-btn { background: #ffb700; }
.donate-wrap { margin-top: 22px; max-width: 360px; }
.tire-track {
  width: 100%;
  height: 150px;
  display: block;
  opacity: 0.2;
  pointer-events: none;
}
.nav-backdrop {
  display: none;
  position: fixed;
  inset: var(--header) 0 0 0;
  background: rgba(5, 16, 40, 0.45);
  z-index: 35;
}
body.nav-open .nav-backdrop { display: block; }

.workspace {
  margin-left: var(--sidebar);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 292px;
  gap: 16px;
  padding: 16px;
  align-items: start;
}
.workspace.no-rail { grid-template-columns: minmax(0, 1fr); }
.panel {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 14px;
  min-width: 0;
}
.panel.page { padding: 22px 22px 28px; }
.rail { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

.hero {
  position: relative;
  min-height: 262px;
  border-radius: 16px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(8, 22, 52, 0.78) 0%, rgba(8, 22, 52, 0.42) 46%, rgba(8, 22, 52, 0.05) 70%),
    url("../assets/hero.svg") center / cover no-repeat,
    #e08a45;
  display: flex;
  align-items: center;
  padding: 36px 40px;
}
.hero h1 {
  color: #fff;
  font-size: 40px;
  line-height: 1.12;
  letter-spacing: -0.035em;
  max-width: 560px;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.25);
}
.ribbon {
  margin-top: 16px;
  display: inline-block;
  max-width: 470px;
  background: #1f66e0;
  color: #fff;
  padding: 10px 14px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 15px;
  line-height: 1.35;
  box-shadow: 0 8px 18px rgba(10, 40, 110, 0.25);
}

.cats {
  margin-top: 16px;
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 12px;
}
.cat {
  display: block;
  background: #fff;
  border: 1px solid #e7eef6;
  border-radius: 14px;
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  color: #1b304c;
  font-weight: 700;
  font-size: 13.5px;
  box-shadow: 0 4px 14px rgba(20, 40, 80, 0.04);
}
.cat img { height: 74px; width: 100%; object-fit: cover; background: #eef2f6; }
.cat span { display: block; padding: 8px 4px 10px; }
.cat:hover { transform: translateY(-2px); border-color: #c9dbf5; }

.search-block { margin-top: 18px; }
.search-block h2, .list-head h2, .page-head h1 { letter-spacing: -0.03em; }
.search-block h2 { font-size: 20px; margin-bottom: 10px; }
.search-grid {
  display: grid;
  grid-template-columns: 1.15fr 1.15fr 0.85fr 0.9fr auto;
  gap: 10px;
}
.field {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  height: 46px;
  min-width: 0;
  width: 100%;
  color: #7d8da3;
}
.field input, .field select, .field textarea {
  border: 0;
  outline: none;
  width: 100%;
  background: transparent;
  color: var(--text);
  min-width: 0;
}
.field textarea { height: auto; padding: 8px 0; resize: vertical; }
.field:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 124, 246, 0.15);
}
.field-date { position: relative; }
.field-date .date-label {
  position: absolute;
  left: 40px;
  color: #8aa0b5;
  pointer-events: none;
  font-size: 14.5px;
}
.field-date.has-value .date-label,
.field-date:focus-within .date-label { opacity: 0; }
.field-date:not(.has-value) input[type="date"] { color: transparent; }
.field-date:not(.has-value) input[type="date"]:focus { color: var(--text); }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  text-decoration: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 700;
  line-height: 1;
}
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-dark); }
.btn-green, .rail-cta {
  background: linear-gradient(#2fbe55, #1ea34a);
  color: #fff;
}
.btn-green:hover, .rail-cta:hover { background: var(--green-dark); }
.btn-ghost {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { background: #f5f8fc; }
.btn-danger { background: #fdecec; color: #9f1d1d; }
.btn[disabled] { opacity: 0.6; cursor: not-allowed; }
.btn-search { height: 46px; padding: 0 18px; white-space: nowrap; }

.rail-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
  border-radius: 12px;
  min-height: 64px;
  font-size: 20px;
  font-weight: 800;
  box-shadow: 0 10px 18px rgba(20, 140, 50, 0.22);
}
.plus-bubble {
  width: 28px;
  height: 28px;
  border: 2px solid #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 20px;
  line-height: 1;
}
.quick, .promo {
  background: #fff;
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.quick h2 {
  background: #eef5ff;
  padding: 13px 16px;
  font-size: 18px;
  color: #1e3a5f;
}
.quick a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  color: #24344d;
  text-decoration: none;
  border-top: 1px solid #f1f5f9;
  font-weight: 700;
  font-size: 14.5px;
}
.quick a:hover { background: #f7fbff; }
.promo {
  position: relative;
  min-height: 250px;
  display: flex;
  align-items: flex-end;
  text-decoration: none;
  color: #fff;
  background: url("../assets/promo.svg") center / cover no-repeat, #e39a62;
}
.promo-copy { padding: 20px 18px 18px; text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35); }
.promo strong {
  display: block;
  font-size: 28px;
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 800;
}
.swoosh {
  margin-top: 10px;
  height: 7px;
  width: 92px;
  background: #3dde6a;
  border-radius: 8px;
  transform: rotate(-8deg);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}

.list-head {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 10px;
}
.list-head h2 { font-size: 22px; }
.list-head a { text-decoration: none; }
.sort { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; font-weight: 600; white-space: nowrap; }
.sort select {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 10px;
  padding: 8px 12px;
  font-weight: 700;
  color: #1c314f;
}
.freight {
  display: grid;
  grid-template-columns: 64px minmax(150px, 1fr) minmax(230px, 1.35fr) auto auto 36px;
  gap: 8px 14px;
  align-items: center;
  padding: 14px 6px;
  border-top: 1px solid #edf1f6;
}
.freight:hover { background: #f8fbfe; }
.thumb { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; background: #eef2f6; }
.freight h3 { font-size: 16px; letter-spacing: -0.02em; }
.muted { color: var(--muted); font-size: 13.5px; margin-top: 4px; display: flex; align-items: center; gap: 6px; }
.freight-route p:first-child { font-weight: 700; font-size: 14.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.arrow { color: var(--muted); font-weight: 700; }
.freight-km { color: #4e6078; font-weight: 800; white-space: nowrap; }
.star {
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #8aa0bb;
  border-radius: 8px;
  display: grid;
  place-items: center;
}
.star svg { width: 20px; height: 20px; fill: none; stroke: currentColor; }
.star.is-on { color: #e0a100; }
.star.is-on svg { fill: currentColor; }

.page-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-end; margin-bottom: 18px; }
.page-head h1 { font-size: 30px; letter-spacing: -0.035em; }
.crumb { color: var(--muted); font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.crumb a { color: var(--muted); text-decoration: none; }
.lede { color: var(--muted); margin-top: 6px; max-width: 680px; line-height: 1.5; }

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.filters .span-2 { grid-column: span 2; }
.stack-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; color: #31475f; }
.stack-field .field { height: 44px; }
.checkline { display: block; font-weight: 600; color: var(--text); line-height: 1.45; }
.checkline input { width: auto; height: auto; margin: 0 8px 0 0; vertical-align: -2px; }
.filter-actions { display: flex; gap: 8px; align-items: end; }

.pager { display: flex; gap: 6px; justify-content: center; padding: 16px 0 4px; flex-wrap: wrap; }
.page-btn {
  min-width: 36px;
  height: 36px;
  border-radius: 9px;
  border: 1px solid var(--line-strong);
  background: #fff;
  font-weight: 700;
}
.page-btn.is-on { background: var(--blue); color: #fff; border-color: var(--blue); }

.banner {
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  font-weight: 600;
  line-height: 1.45;
}
.banner[hidden] { display: none; }
.banner.ok { background: #e9f8ee; color: #146c36; border: 1px solid #b7ebc9; }
.banner.warn { background: #fff6e8; color: #8a5a10; border: 1px solid #f3ddb0; }
.banner.err { background: #fdecec; color: #9f1d1d; border: 1px solid #f6c7c7; }
.banner.info { background: var(--blue-soft); color: #1d4e9a; border: 1px solid #c9ddfb; }
.banner a { font-weight: 800; }

.empty { padding: 28px 12px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: #17304f; font-size: 18px; margin-bottom: 6px; }

.form-layout { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 22px; align-items: start; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid .full { grid-column: 1 / -1; }
.stack-field textarea.field, textarea.field { height: auto; min-height: 110px; align-items: flex-start; padding-top: 10px; }
.help { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.req::after { content: " *"; color: #d92d20; }
.form-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 6px; }
.preview-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #f8fbfe;
  position: sticky;
  top: 90px;
}
.preview-card h2 { font-size: 16px; margin-bottom: 8px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 700;
  background: #fff;
}
.chip input { accent-color: var(--blue); }
.chip:has(input:checked) { background: var(--blue-soft); border-color: var(--blue); color: #1d4e9a; }

.gate {
  text-align: center;
  padding: 28px 12px 12px;
}
.gate h2 { font-size: 26px; margin-bottom: 8px; }
.gate p { color: var(--muted); margin-bottom: 16px; }
.gate-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.mine-card, .offer-card, .partner-card, .vehicle-card, .thread, .news-card, .stat {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  background: #fff;
}
.mine-list, .offer-list, .card-grid, .thread-list, .news-list { display: flex; flex-direction: column; gap: 10px; }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.mine-card { display: grid; grid-template-columns: 58px 1.3fr 1.2fr auto; gap: 12px; align-items: center; }
.mine-actions, .offer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
  background: var(--blue-soft);
  color: #1d4e9a;
}
.pill.ok { background: #e5f8ec; color: #147a38; }
.pill.muted { background: #eef2f6; color: #5c6d84; }
.pill.warn { background: #fff4df; color: #8a5a10; }
.chat {
  margin: 4px 0 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.chat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #071a3c;
  color: #fff;
}
.chat-head h2 { font-size: 18px; }
.chat-head p { color: #c5d4ee; font-size: 13px; font-weight: 600; margin-top: 2px; }
.chat-live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}
.chat-live::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #3dde6a;
}
.chat-log {
  height: 360px;
  overflow-y: auto;
  padding: 16px;
  background: #f4f7fb;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.chat-msg { display: flex; gap: 8px; max-width: min(78%, 560px); align-items: flex-end; }
.chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.chat-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #1e4f9a;
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 12px;
  flex-shrink: 0;
}
.chat-msg.mine .chat-avatar { background: #1ea34a; }
.chat-bubble {
  background: #fff;
  border-radius: 14px 14px 14px 4px;
  padding: 8px 12px;
  box-shadow: 0 1px 2px rgba(7, 26, 60, 0.06);
}
.chat-msg.mine .chat-bubble { background: #e7f0ff; border-radius: 14px 14px 4px 14px; }
.chat-name { font-size: 12px; font-weight: 800; color: #1e4f9a; }
.chat-msg.mine .chat-name { text-align: right; color: #146b32; }
.chat-bubble p { margin-top: 2px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-time { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); font-weight: 600; }
.chat-msg.mine .chat-time { text-align: right; }
.chat-form {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: #fff;
}
.chat-input {
  flex: 1;
  min-width: 0;
  height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
}
.chat-input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(47, 124, 246, 0.15); }
.chat-hint { padding: 0 14px 12px; color: var(--muted); font-size: 12.5px; font-weight: 600; line-height: 1.45; }
.chat-hint a { color: var(--blue); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.split h2 { font-size: 18px; margin-bottom: 10px; }
.offer-card header { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.offer-card .price { font-size: 20px; letter-spacing: -0.03em; }
.offer-card .msg { margin: 8px 0; color: #31475f; line-height: 1.45; }
.partner-card h3, .vehicle-card h3, .thread h3, .news-card h3 { font-size: 17px; letter-spacing: -0.02em; }
.meta-line { color: var(--muted); font-size: 13.5px; margin-top: 4px; }
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin: 8px 0; }
.tag { background: #f3f6fa; border-radius: 999px; padding: 3px 8px; font-size: 12px; font-weight: 700; color: #31475f; }
.stars { color: #e0a100; font-weight: 800; letter-spacing: 0.04em; }
.summary {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px;
  margin-bottom: 16px;
  background: #f8fbfe;
}
.summary img { width: 88px; height: 88px; border-radius: 12px; object-fit: cover; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 6px 10px; margin-top: 8px; font-size: 14.5px; }
.kv dt { color: var(--muted); font-weight: 700; }
.auth-panel { max-width: 480px; margin: 12px auto; padding: 28px; }
.register-panel, .legal-panel, .wide-panel { max-width: 1040px; margin: 0 auto; }
.legal-panel { max-width: 860px; padding: 32px 36px 48px; }
.demo-box {
  margin-top: 16px;
  background: #f5f8fc;
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 14px;
}
.demo-box code { font-weight: 800; }
.prose h2 { font-size: 20px; margin: 26px 0 8px; }
.prose h3 { font-size: 16px; margin: 18px 0 6px; }
.prose p, .prose li { line-height: 1.6; color: #24384f; }
.prose p { margin-bottom: 10px; }
.prose ul, .prose ol { margin: 0 0 12px 1.2em; }
.faq details {
  border-top: 1px solid var(--line);
  padding: 12px 0;
}
.faq summary { cursor: pointer; font-weight: 800; }
.faq p { margin-top: 8px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin: 16px 0; }
.stat strong { display: block; font-size: 28px; letter-spacing: -0.04em; }
.stat span { color: var(--muted); font-weight: 600; font-size: 13px; }
.stat { text-decoration: none; color: inherit; }
.stat:hover { border-color: #b9d2f6; }
.thread-body, .news-card p { margin-top: 8px; line-height: 1.5; color: #24384f; }
.reply { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line); }
.reply-form { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.reply-form[hidden] { display: none; }
dialog {
  border: 0;
  border-radius: 16px;
  padding: 20px;
  width: min(480px, calc(100vw - 32px));
  box-shadow: 0 24px 60px rgba(7, 20, 50, 0.28);
}
dialog::backdrop { background: rgba(6, 18, 40, 0.55); }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  background: #10284d;
  color: #fff;
  padding: 12px 14px;
  border-radius: 12px;
  z-index: 70;
  box-shadow: var(--shadow);
  font-weight: 700;
}
.toast[hidden] { display: none; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

@media (max-width: 1280px) {
  .freight { grid-template-columns: 56px minmax(0, 1fr) auto 36px; }
  .freight-route { grid-column: 2 / 3; }
  .freight-km { grid-column: 2 / 3; }
  .cats { gap: 8px; }
  .hero h1 { font-size: 34px; }
}
@media (max-width: 1100px) {
  .workspace { grid-template-columns: 1fr; }
  .rail { display: grid; grid-template-columns: 1fr 1fr; }
  .rail-cta, .rail > .donate-card { grid-column: 1 / -1; }
  .brand { width: auto; }
  .brand-sub { display: none; }
  .filters { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .menu-toggle { display: inline-flex; }
  .topnav { display: none; }
  .sidebar { transform: translateX(-105%); transition: transform 0.2s ease; }
  body.nav-open .sidebar { transform: none; }
  .workspace { margin-left: 0; padding: 12px; }
  .hero { padding: 24px 18px; min-height: 220px; }
  .hero h1 { font-size: 28px; }
  .cats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .search-grid, .form-grid, .split, .card-grid, .form-layout, .mine-card { grid-template-columns: 1fr; }
  .rail { grid-template-columns: 1fr; }
  .service-link span { display: none; }
  .page-head { flex-direction: column; align-items: flex-start; }
  .legal-panel { padding: 22px 16px 32px; }
}
@media (max-width: 560px) {
  .cats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .account-chip span { max-width: 90px; }
  .filters { grid-template-columns: 1fr; }
  .filters .span-2 { grid-column: auto; }
  .chat-form { flex-wrap: wrap; }
  .chat-form .btn { width: 100%; }
  .chat-msg { max-width: 92%; }
  .freight { grid-template-columns: 52px minmax(0, 1fr); }
  .freight .btn, .star, .freight-km { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sidebar { transition: none; }
}
