/* =========================================================
   ОЦЕНЩИК PRO — CRM для оценочных компаний Казахстана
   Дизайн: графитовая тёмная база, акцент — тёмное золото
   ========================================================= */

:root {
  --bg: #141416;
  --bg-alt: #1B1B1E;
  --surface: #222226;
  --surface-2: #2A2A2F;
  --line: #35353B;
  --text: #F2EFE7;
  --text-dim: #B4B0A5;
  --accent: #B8860B;
  --accent-bright: #D9A514;
  --accent-soft: rgba(184, 134, 11, 0.14);
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

/* Длинные заголовки и тексты не ломают вёрстку на узких экранах */
h1, h2, h3, p, a, td, th, dd, dt { overflow-wrap: break-word; }

img { max-width: 100%; height: auto; }

[hidden] { display: none !important; }

a { color: var(--accent-bright); text-decoration: none; }
a:hover { color: var(--accent); }

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.2px;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease,
              transform 0.15s ease, box-shadow 0.25s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }

.btn--accent {
  background: var(--accent);
  color: #141414;
}
.btn--accent:hover {
  background: var(--accent-bright);
  color: #141414;
  box-shadow: 0 6px 20px rgba(184, 134, 11, 0.35);
}

.btn--outline {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent-bright);
}
.btn--outline:hover {
  background: var(--accent-soft);
  color: var(--accent-bright);
}

.btn--ghost {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--line);
}
.btn--ghost:hover { color: var(--text); border-color: var(--text-dim); }

.btn--sm { padding: 8px 16px; font-size: 13px; }
.btn--lg { padding: 15px 32px; font-size: 16px; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; pointer-events: none; }

/* ---------- Шапка ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(20, 20, 22, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand__name { font-size: 17px; letter-spacing: 1px; font-weight: 400; white-space: nowrap; }
.brand__name b { color: var(--accent-bright); font-weight: 700; }

.nav { display: flex; gap: 26px; }
.nav a {
  color: var(--text-dim);
  font-size: 15px;
  transition: color 0.2s ease;
}
.nav a:hover { color: var(--accent-bright); }

/* Пункты «телефон» и «Вход для сотрудников» — только внутри мобильного бургер-меню */
.nav__phone, .nav__login { display: none; }

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

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.burger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.burger.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger.is-open span:nth-child(2) { opacity: 0; }
.burger.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
/* Дети grid/flex могут сжиматься — защита от горизонтального overflow */
.hero__inner > *, .calc > *, .grid > *, .contacts > *, .footer__inner > * { min-width: 0; }

.hero {
  padding: 84px 0 96px;
  background:
    radial-gradient(600px 320px at 85% 10%, rgba(184, 134, 11, 0.10), transparent 65%),
    var(--bg);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero__eyebrow {
  color: var(--accent-bright);
  text-transform: uppercase;
  letter-spacing: 2.5px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 16px;
}
.hero__title {
  font-size: clamp(32px, 5vw, 52px);
  line-height: 1.15;
  margin: 0 0 20px;
  font-weight: 700;
}
.hero__sub {
  font-size: 18px;
  color: var(--text-dim);
  margin: 0 0 32px;
  max-width: 560px;
}
.hero__cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 32px; }
.hero__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  color: var(--text-dim);
  font-size: 14px;
}
.hero__points li { position: relative; padding-left: 20px; }
.hero__points li::before {
  content: "";
  position: absolute;
  left: 0; top: 7px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.hero-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow);
}
.hero-card__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 18px;
}
.hero-card__head strong { display: block; font-size: 16px; }
.hero-card__head span { font-size: 13px; color: var(--text-dim); }
.badge {
  margin-left: auto;
  font-style: normal;
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 20px;
  background: var(--accent-soft);
  color: var(--accent-bright);
  border: 1px solid var(--accent);
}
.hero-card__row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 7px 0;
  color: var(--text-dim);
}
.hero-card__row b { color: var(--text); }
.hero-card__progress {
  height: 6px;
  background: var(--surface-2);
  border-radius: 3px;
  margin: 16px 0 12px;
  overflow: hidden;
}
.hero-card__progress i {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 3px;
}
.hero-card__foot { font-size: 13px; color: var(--text-dim); display: flex; align-items: center; gap: 8px; }
.tg-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #4CAF50;
  flex: none;
}

/* ---------- Секции ---------- */
.section { padding: 88px 0; }
.section--alt { background: var(--bg-alt); }
.section__title {
  font-size: clamp(26px, 3.5vw, 38px);
  margin: 0 0 12px;
  font-weight: 700;
}
.section__title::after {
  content: "";
  display: block;
  width: 56px;
  height: 3px;
  background: var(--accent);
  margin-top: 14px;
  border-radius: 2px;
}
.section__sub { color: var(--text-dim); font-size: 17px; margin: 14px 0 44px; max-width: 640px; }

/* ---------- Карточки ---------- */
.grid { display: grid; gap: 22px; }
.grid--features { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.grid--audience { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); margin-bottom: 56px; }
.grid--plans { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.card__icon {
  width: 46px;
  height: 46px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-bright);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 18px;
  border: 1px solid rgba(184, 134, 11, 0.35);
}
.card h3 { margin: 0 0 10px; font-size: 18px; }
.card p { margin: 0; color: var(--text-dim); font-size: 14.5px; }

/* ---------- Timeline ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 22px;
  counter-reset: step;
}
.timeline__item {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 24px 24px;
  transition: border-color 0.25s ease, transform 0.25s ease;
}
.timeline__item:hover { border-color: var(--accent); transform: translateY(-3px); }
.timeline__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent);
  color: #141414;
  font-weight: 700;
  font-size: 17px;
  margin-bottom: 16px;
}
.timeline__item h3 { margin: 0 0 8px; font-size: 17px; }
.timeline__item p { margin: 0; font-size: 14px; color: var(--text-dim); }

@media (min-width: 900px) {
  .timeline { grid-template-columns: repeat(7, 1fr); gap: 14px; }
  .timeline__item { padding: 20px 16px; }
  .timeline__item h3 { font-size: 15px; }
  .timeline__item p { font-size: 13px; }
  .timeline__item:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 40px;
    right: -14px;
    width: 14px;
    height: 2px;
    background: var(--accent);
    opacity: 0.5;
  }
}

/* ---------- Калькулятор ---------- */
.calc {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: start;
}
.calc__form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: grid;
  gap: 20px;
}
.calc__result {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 30px;
  position: sticky;
  top: 92px;
}
.calc__lines { margin: 0 0 20px; }
.calc__line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
  font-size: 14.5px;
}
.calc__line dt { color: var(--text-dim); margin: 0; }
.calc__line dd { margin: 0; font-weight: 600; text-align: right; }
.calc__total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 16px 0 6px;
  font-size: 17px;
}
.calc__total strong {
  font-size: 32px;
  color: var(--accent-bright);
  font-weight: 700;
  white-space: nowrap;
}
.calc__note {
  font-size: 12.5px;
  color: var(--text-dim);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  margin: 14px 0 22px;
}
.calc__submit { width: 100%; }

/* ---------- Поля форм ---------- */
.field { display: grid; gap: 8px; }
.field label { font-size: 14px; font-weight: 600; color: var(--text); }
.field label i { color: var(--accent-bright); font-style: normal; }
.field label small { color: var(--text-dim); font-weight: 400; }
.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 12px 14px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field textarea { resize: vertical; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.field input::placeholder,
.field textarea::placeholder { color: #6d6a62; }
.field select:disabled { opacity: 0.5; }
.field input.is-invalid { border-color: #C0392B; }

/* ---------- Тарифная таблица ---------- */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.tariff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.5px;
  min-width: 640px;
}
.tariff-table th,
.tariff-table td {
  text-align: left;
  padding: 13px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tariff-table thead th {
  background: var(--surface-2);
  color: var(--accent-bright);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.tariff-table tbody tr:hover td { background: rgba(255, 255, 255, 0.02); }
.tariff-table .tariff-cat td {
  background: var(--accent-soft);
  color: var(--accent-bright);
  font-weight: 700;
  letter-spacing: 0.4px;
  font-size: 13.5px;
}
.tariff-table td:nth-child(2) { white-space: nowrap; font-weight: 600; }
.tariff-table td:nth-child(3) { white-space: nowrap; color: var(--text-dim); }
.tariff-note {
  margin-top: 18px;
  font-size: 13px;
  color: var(--text-dim);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

/* ---------- Планы ---------- */
.plan {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.plan:hover { transform: translateY(-4px); border-color: var(--accent); }
.plan--accent { border-color: var(--accent); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 45%); }
.plan h3 { margin: 0 0 6px; font-size: 21px; }
.plan__price { margin: 0 0 18px; color: var(--accent-bright); font-size: 14px; font-weight: 600; }
.plan ul { margin: 0; padding-left: 20px; color: var(--text-dim); font-size: 14.5px; }
.plan li { margin-bottom: 8px; }
.plan li::marker { color: var(--accent); }

/* ---------- Форма заявки ---------- */
.lead-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 24px;
  max-width: 860px;
}
.field--full { grid-column: 1 / -1; }
.lead-form__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.lead-form__hint { margin: 0; font-size: 12.5px; color: var(--text-dim); max-width: 340px; }

.calc-summary {
  grid-column: 1 / -1;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
}
.calc-summary h3 { margin: 0 0 6px; font-size: 15px; color: var(--accent-bright); }
.calc-summary p { margin: 0; font-size: 14.5px; }

.lead-success { max-width: 860px; }
.lead-success__box {
  background: var(--surface);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.lead-success__box h3 { margin: 0 0 10px; font-size: 24px; color: var(--accent-bright); }
.lead-success__box p { color: var(--text-dim); margin: 0 auto 22px; max-width: 460px; }

/* ---------- Контакты ---------- */
.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 22px;
}
.contacts__item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.contacts__item h3 {
  margin: 0 0 8px;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--accent-bright);
}
.contacts__item p { margin: 0; font-size: 16px; }
.contacts__item a { color: var(--text); }
.contacts__item a:hover { color: var(--accent-bright); }

/* ---------- Футер ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 44px 0;
  background: var(--bg-alt);
}
.footer__inner {
  display: grid;
  gap: 14px;
  justify-items: start;
}
.footer__text { margin: 0; color: var(--text-dim); font-size: 14px; }
.footer__copy { margin: 0; color: #6d6a62; font-size: 13px; }
.footer__version { margin-left: 8px; color: #55524b; font-size: 12px; }

/* ---------- Переключатель языка (dropdown) ---------- */
.lang-switch {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.lang-switch button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}
.lang-switch button:hover { color: var(--text); }
.lang-dd__current {
  min-width: 64px;
}
.lang-dd__menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  min-width: 150px;
  background: var(--bg-card, #232326);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.lang-dd__menu[hidden] { display: none; }
.lang-dd__menu button {
  text-align: left;
  padding: 10px 12px;
  border-radius: 0;
}
.lang-dd__menu button + button { border-top: 1px solid var(--line); }
.lang-dd__menu button.is-active {
  background: var(--accent);
  color: #1a1a1d;
}

/* ---------- Страница входа ---------- */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(500px 300px at 50% 0%, rgba(184, 134, 11, 0.08), transparent 70%),
    var(--bg);
}
.login-box {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 40px 36px;
  box-shadow: var(--shadow);
}
.login-box__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: center;
  margin-bottom: 8px;
  color: var(--text);
}
.login-box h1 { font-size: 22px; text-align: center; margin: 10px 0 6px; }
.login-box__sub { text-align: center; color: var(--text-dim); font-size: 14px; margin: 0 0 28px; }
.login-box form { display: grid; gap: 18px; }
.login-error {
  display: none;
  background: rgba(192, 57, 43, 0.12);
  border: 1px solid #C0392B;
  color: #E74C3C;
  font-size: 13.5px;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
}
.login-error.is-visible { display: block; }
.login-box__back {
  display: block;
  text-align: center;
  margin-top: 22px;
  font-size: 13.5px;
  color: var(--text-dim);
}
.login-box__back:hover { color: var(--accent-bright); }

/* ---------- Адаптив ---------- */
@media (max-width: 960px) {
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }
  .hero__card { max-width: 480px; }
  .calc { grid-template-columns: 1fr; }
  .calc__result { position: static; }
}

@media (max-width: 760px) {
  .nav {
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: none; }
  .burger { display: flex; }
  .header .btn--ghost { display: none; }

  .section { padding: 60px 0; }
  .hero { padding: 56px 0 64px; }
  .lead-form { grid-template-columns: 1fr; padding: 26px 20px; }
  .calc__form, .calc__result { padding: 24px 20px; }
  .calc__total strong { font-size: 26px; white-space: normal; text-align: right; }
}

/* ---------- Шапка: телефон и WhatsApp ---------- */
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.header__phone:hover { color: var(--accent-bright); }
.header__phone-icon { color: var(--accent-bright); flex: none; }

.header__wa {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #25D366;
  color: #fff;
  flex: none;
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.header__wa:hover {
  background: #1EBE5B;
  color: #fff;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.4);
}

/* ---------- Прайс: аккордеон полного тарифа ---------- */
.tariff-full-hint {
  margin: 18px 0 12px;
  font-size: 14px;
  color: var(--text-dim);
}
.tariff-toggle { margin-bottom: 4px; }
.tariff-all {
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s ease;
}
.tariff-all .table-wrap { margin-top: 18px; }

/* ---------- Контакты: подпись ---------- */
.contacts__note {
  margin-top: 6px !important;
  font-size: 13px !important;
  color: var(--text-dim);
}

/* ---------- Чат-виджет ИИ ---------- */
.chat-widget { position: relative; z-index: 900; }

.chat-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 1001;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: #141414;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(184, 134, 11, 0.45);
  transition: background 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}
.chat-fab:hover {
  background: var(--accent-bright);
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(217, 165, 20, 0.5);
}
.chat-fab.is-open { background: var(--accent-bright); }

.chat-window {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 1000;
  width: 360px;
  max-width: calc(100vw - 32px);
  max-height: min(560px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.chat-window__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
}
.chat-window__head-text { display: grid; gap: 2px; }
.chat-window__head-text strong { font-size: 15px; color: var(--accent-bright); }
.chat-window__head-text span { font-size: 12px; color: var(--text-dim); line-height: 1.4; }
.chat-window__close {
  appearance: none;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  transition: color 0.2s ease;
}
.chat-window__close:hover { color: var(--text); }

.chat-window__alert {
  padding: 10px 16px;
  font-size: 13px;
  color: var(--accent-bright);
  background: var(--accent-soft);
  border-bottom: 1px solid var(--accent);
}

.chat-window__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 160px;
}

.chat-msg {
  max-width: 85%;
  padding: 9px 13px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-msg--user {
  align-self: flex-end;
  background: var(--accent);
  color: #141414;
  border-bottom-right-radius: 4px;
}
.chat-msg--bot {
  align-self: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  color: var(--text);
  border-bottom-left-radius: 4px;
}
.chat-msg--typing {
  color: var(--text-dim);
  font-style: italic;
  animation: chatTypingBlink 1.2s ease-in-out infinite;
}
@keyframes chatTypingBlink {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 1; }
}

.chat-window__form {
  display: flex;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-2);
}
.chat-window__form input {
  flex: 1;
  min-width: 0;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--text);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
}
.chat-window__form input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.chat-window__send {
  appearance: none;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #141414;
  font-weight: 600;
  font-size: 14px;
  padding: 10px 16px;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.2s ease;
}
.chat-window__send:hover { background: var(--accent-bright); }
.chat-window__send[disabled] { opacity: 0.45; cursor: not-allowed; }

/* ---------- Адаптив: шапка и чат ---------- */
@media (max-width: 1160px) {
  /* Телефон — только иконка, кнопку входа прячем: шапка не ломается на планшете */
  .header__phone-num { display: none; }
  .header__phone {
    width: 34px;
    height: 34px;
    justify-content: center;
    border: 1px solid var(--line);
    border-radius: 50%;
  }
  .header .btn--ghost { display: none; }
  .nav { gap: 18px; }
}

@media (max-width: 1160px) {
  /* Мобильная навигация с бургером — раньше, т.к. в шапке появились контакты */
  .nav {
    position: fixed;
    top: 68px;
    left: 0; right: 0;
    background: var(--bg-alt);
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
    border-bottom: 1px solid var(--line);
    display: none;
  }
  .nav.is-open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:last-child { border-bottom: none; }
  .burger { display: flex; }

  /* В бургер-меню показываем телефон и вход для сотрудников */
  .nav__phone, .nav__login { display: block; }
  .nav__phone { color: var(--text); font-weight: 600; }
  .nav__login { color: var(--accent-bright); font-weight: 600; }
}

@media (max-width: 480px) {
  /* Совсем узкие экраны: телефон-иконку прячем (есть WhatsApp и блок контактов) */
  .header__phone { display: none; }
  .header .container { padding: 0 12px; }
  .header__inner { gap: 6px; }
  .header__actions { gap: 6px; }
  .brand { min-width: 0; flex-shrink: 1; gap: 8px; }
  .brand__logo { width: 32px; height: 32px; flex: none; }
  .brand__name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
  .lang-switch button { padding: 6px 5px; font-size: 11px; }
  .burger { padding: 6px; flex: none; }
}

@media (max-width: 340px) {
  .brand__name { font-size: 12px; }
  .lang-switch button { padding: 6px 5px; font-size: 11px; }
}

@media (max-width: 760px) {
  .header__actions { gap: 8px; }

  /* FAB не перекрывает форму заявки: поднимаем выше */
  .chat-fab { right: 16px; bottom: 84px; }
  .chat-window {
    right: 12px;
    left: 12px;
    bottom: 152px;
    width: auto;
    max-width: none;
    max-height: calc(100vh - 230px);
  }
}
