/* 2.34.0 — телефоны и планшеты: подключается последним на публичных страницах.
   Только узкие экраны — вид на компьютере не меняется. Проверено на ширине 360, 390, 430 и 768 px.
   Замечания владельца со смартфона (23.09.2026): сервисы не листаются, карточки обрезаны,
   переносы в категориях, данные оператора вразнобой, поле даты за краем окна, непонятен вход в кабинет. */

/* Шрифт не раздувается браузером телефона (iOS) — вёрстка остаётся такой, как задумана */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

@media (max-width: 860px) {
  /* ---------- Шапка: вход и кабинет всегда под рукой ---------- */
  .site-header .header-actions { gap: 6px !important; }
  .site-header .lang-trigger #lang-current,
  .site-header .lang-trigger .lang-caret { display: none !important; }
  .site-header .lang-trigger { min-width: 40px !important; padding: 0 10px !important; justify-content: center !important; }
  .site-header .header-actions .btn-login,
  .site-header .header-actions .btn-cabinet { display: none !important; }
  body:not(.gz-signed-in) .site-header .header-actions .btn-login,
  body.gz-signed-in .site-header .header-actions .btn-cabinet {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 40px !important;
    padding: 0 14px !important;
    border-radius: 12px !important;
    background: #0fbf7a !important;
    color: #06231a !important;
    font-weight: 800 !important;
    font-size: 14px !important;
    white-space: nowrap !important;
    text-decoration: none !important;
    border: 0 !important;
  }
  body.gz-signed-in .site-header .header-actions .btn-cabinet::before {
    content: "";
    width: 16px; height: 16px; margin-right: 6px;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 4-6 8-6s8 2 8 6'/></svg>") center / contain no-repeat;
            mask: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'><circle cx='12' cy='8' r='4'/><path d='M4 21c0-4 4-6 8-6s8 2 8 6'/></svg>") center / contain no-repeat;
  }

  /* ---------- Сервисы: лента листается пальцем ---------- */
  body.home-page #services .svc-grid {
    display: flex !important;
    flex-wrap: nowrap !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    scroll-snap-type: x proximity;
    scroll-padding-inline: 16px;
    touch-action: pan-x pan-y;
    gap: 10px !important;
    margin: 0 -16px !important;
    padding: 4px 16px 10px !important;
    width: auto !important;
    max-width: none !important;
    grid-template-columns: none !important;
  }
  body.home-page #services .svc-card {
    scroll-snap-align: start;
    min-height: 0 !important;
  }

  /* ---------- Карточки рынка: высота по содержимому, ничего не обрезается ---------- */
  body :is(#market360-feed, #feed, #svc-feed) {
    align-items: stretch !important;
    scroll-snap-type: x mandatory;
    scroll-padding-inline: 0;
  }
  body :is(#market360-feed, #feed, #svc-feed) > .market-signal-card {
    height: auto !important;
    min-height: 300px !important;
    max-height: none !important;
    overflow: hidden;
    scroll-snap-align: start;
  }
  body :is(#market360-feed, #feed, #svc-feed) .market-signal-card > .market-signal-bottom {
    margin-top: auto !important;
    padding-bottom: 14px !important;
  }
  body :is(#market360-feed, #feed, #svc-feed) .market-signal-card :is(.market-signal-actions, .order-actions) {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body :is(#market360-feed, #feed, #svc-feed) .market-signal-card :is(.market-signal-actions, .order-actions) .btn {
    min-height: 44px !important;
    height: auto !important;
    white-space: normal !important;
    line-height: 1.15 !important;
  }
  body :is(#market360-feed, #feed, #svc-feed) .market-signal-card .market-signal-top {
    flex-wrap: wrap !important;
    row-gap: 6px !important;
  }

  /* ---------- Окна: поля не выходят за край ---------- */
  .modal input, .modal select, .modal textarea { max-width: 100% !important; min-width: 0 !important; box-sizing: border-box !important; }
  .modal input[type="datetime-local"], .modal input[type="date"], .modal input[type="time"] {
    -webkit-appearance: none; appearance: none;
    display: block !important; width: 100% !important;
    text-align: left !important; min-height: 44px;
  }
  .modal input[type="datetime-local"]::-webkit-date-and-time-value { text-align: left; }
  .modal label, .modal .field-wrap { min-width: 0 !important; }

  /* ---------- Подвал: данные оператора ровно, по центру ---------- */
  .site-footer .footer-about, footer .footer-about { text-align: center !important; line-height: 1.55 !important; }
  footer .gz-nowrap, .site-footer .gz-nowrap { white-space: nowrap; }
  footer .footer-bottom, .site-footer .footer-bottom, footer .footer-copy, footer .footer-legal { text-align: center !important; justify-content: center !important; }
}

/* ---------- Категории на телефоне: две колонки, слова без переносов ---------- */
@media (max-width: 520px) {
  body.home-page #directions .dir-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
  }
  body.home-page #directions .dir-grid > .dir-card:last-child:nth-child(odd) { grid-column: 1 / -1 !important; }
  body.home-page #directions .dir-card { height: 120px !important; min-height: 120px !important; }
  body.home-page #directions .dir-title {
    font-size: clamp(14px, 4.1vw, 17px) !important;
    line-height: 1.15 !important;
    -webkit-hyphens: manual !important;
            hyphens: manual !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }
  /* Рынок: следующая карточка чуть видна — понятно, что лента листается */
  body :is(#market360-feed, #feed, #svc-feed) > .market-signal-card {
    flex: 0 0 88% !important;
    width: 88% !important;
  }
  .site-footer .footer-links, footer .footer-links { justify-content: center !important; }
}

@media (max-width: 860px) {
  .site-footer .footer-bottom { display: flex !important; flex-direction: column !important; align-items: center !important; gap: 4px !important; }
  .site-footer .footer-col { text-align: center !important; }
}

/* Направления и услуги: на телефоне лента вертикальная — карточка во всю ширину, по центру */
@media (max-width: 860px) {
  body:is(.direction-page, .service-page) :is(#feed, #svc-feed)[style*="column"],
  body:is(.direction-page, .service-page) :is(#feed, #svc-feed) { align-items: stretch !important; }
}
@media (max-width: 520px) {
  body:is(.direction-page, .service-page) :is(#feed, #svc-feed) > .market-signal-card {
    flex: 0 0 auto !important;
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
  body.home-page #market360-feed > .market-signal-card {
    flex: 0 0 88% !important;
    width: 88% !important;
  }
}
@media (max-width: 520px) {
  /* Вертикальный список карточек — без «окошка» с прокруткой внутри страницы */
  body:is(.direction-page, .service-page) :is(#feed, #svc-feed) {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    scroll-snap-type: none !important;
  }
}

/* ---------- 2.34.1: невысокий экран телефона (панели браузера) и узкий подвал ---------- */
@media (max-width: 860px) {
  /* Блок рынка на главной — по содержимому, а не «ровно в окно»: иначе на iPhone карточка сжималась до 155 px */
  body.home-page #market360,
  body.home-page #market360 > .container,
  body.home-page #market360 .market360-rail,
  body.home-page #market360 #market360-feed {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  body.home-page #market360 #market360-feed > .market-signal-card {
    height: auto !important;
    min-height: 300px !important;
    max-height: none !important;
  }
  body.home-page #market360 #market360-feed .market-signal-photo { max-height: none !important; }
  /* Подвал: данные оператора во всю ширину, каждое — своей строкой */
  .site-footer .footer-grid, .site-footer .footer-col, .site-footer .footer-about { width: 100% !important; max-width: none !important; }
  .site-footer .footer-about .gz-nowrap { display: block !important; white-space: nowrap !important; }
  .site-footer .footer-about .gz-sep { display: none !important; }
}
@media (max-width: 860px) {
  /* «Войти» зелёная и на светлой шапке после прокрутки */
  html body .site-header .header-actions .btn-login:not(.logged),
  html body.gz-signed-in .site-header .header-actions .btn-cabinet { background: #0fbf7a !important; color: #06231a !important; }
}

/* ---------- 2.34.1: плавные размеры — текст и блоки подстраиваются под ширину экрана ---------- */
/* Длинные слова и адреса не распирают блок ни на одном экране */
:is(h1, h2, h3, h4, p, li, .card, .kpi, .footer-about, .market-signal-card h3, .cab-card) { overflow-wrap: break-word; }
@media (max-width: 1100px) {
  body :is(.section-title, .cab-h1) { font-size: clamp(22px, 2.2vw + 14px, 34px) !important; line-height: 1.15 !important; }
  body .hero-title { font-size: clamp(40px, 9vw, 88px) !important; }
  body :is(.gzp-hero-sub, .gzp-lead) { font-size: clamp(14px, 0.6vw + 12px, 18px) !important; }
  body .cab-h2 { font-size: clamp(16px, 0.8vw + 12px, 20px) !important; }
  body .kpi-value { font-size: clamp(22px, 2vw + 14px, 32px) !important; }
}

/* ---------- 2.35.0: окна на телефоне ---------- */
@media (max-width: 760px) {
  /* «Название — значение» одной строкой; длинное значение само переносится ниже */
  body .deal-card-kv {
    flex-direction: row !important;
    flex-wrap: wrap !important;
    align-items: baseline !important;
    column-gap: 12px !important;
    row-gap: 2px !important;
  }
  body .deal-card-kv > span { flex: 1 1 auto; min-width: 0; }
  body .deal-card-kv > strong { flex: 0 1 auto; margin-left: auto; text-align: right !important; max-width: 100%; }
  /* Окна сделки — с теми же отступами от края, что остальные */
  body .modal.modal-deal-card { width: calc(100vw - 24px) !important; margin: 0 auto !important; max-height: 100% !important; border-radius: 16px !important; }
}
@media (max-width: 520px) {
  /* Кнопки внизу окна — по две в строку, последняя растягивается; группы внутри подвала не мешают */
  body .modal-overlay .modal-foot { display: flex !important; flex-wrap: wrap !important; gap: 8px !important; }
  body .modal-overlay .modal-foot > div, body .modal-overlay .modal-foot > span:not(.btn) { display: contents !important; }
  body .modal-overlay .modal-foot :is(button, a.btn, .btn) {
    flex: 1 1 140px !important; width: auto !important; min-width: 0 !important; margin: 0 !important;
    min-height: 44px !important; padding-left: 8px !important; padding-right: 8px !important;
    white-space: normal !important; line-height: 1.15 !important; font-size: 14px !important;
  }
}
@media (max-width: 760px) {
  body.cab-body .modal.modal-deal-card, body.cab-body .modal.modal-deal-composition {
    width: calc(100vw - 24px) !important; max-width: calc(100vw - 24px) !important;
    max-height: 100% !important; margin: 0 auto !important; border-radius: 16px !important;
  }
}
@media (max-width: 760px) {
  /* Любое окно — в пределах свободного места над нижним меню: шапка с крестиком всегда видна,
     лишнее содержимое прокручивается внутри окна (форма заказа уходила вверх на 69 px) */
  body .modal-overlay > .modal {
    height: auto !important;
    max-height: 100% !important;
    display: flex !important;
    flex-direction: column !important;
  }
  body .modal-overlay > .modal > .modal-head,
  body .modal-overlay > .modal > .modal-foot { flex: 0 0 auto !important; }
  body .modal-overlay > .modal > .modal-body,
  body .modal-overlay > .modal > form { flex: 1 1 auto !important; min-height: 0 !important; overflow-y: auto !important; -webkit-overflow-scrolling: touch; }
}

/* ---------- 2.36.0: кнопки в кабинете на телефоне — не меньше 44 px под палец ---------- */
@media (max-width: 760px) {
  body.cab-body .cab-main :is(.btn, button.btn, a.btn):not(.btn-icon):not(.cab-burger) { min-height: 44px !important; }
  body.cab-body #orders-insight-action { min-height: 44px !important; }
}
@media (max-width: 760px) {
  /* Сделка в списке: главное действие — во всю ширину, остальные — по две в ряд */
  body .deal-btns {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 8px !important;
  }
  body .deal-btns > .btn { width: 100% !important; min-width: 0 !important; min-height: 44px !important; margin: 0 !important; white-space: normal !important; }
  body .deal-btns > .btn-cta, body .deal-btns > :only-child, body .deal-btns > :last-child:nth-child(odd):not(.btn-cta) { grid-column: 1 / -1; }
  /* Кнопки в окнах и списках откликов — под палец */
  body .modal-overlay .offer-accept, body .modal-overlay .modal-body .btn { min-height: 44px !important; }
}
@media (max-width: 760px) {
  body.cab-body .cab-view[data-view="deals"] .deal-btns-minimal { display: grid !important; grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  body.cab-body .cab-view[data-view="deals"] .deal-btns-minimal .deal-primary,
  body.cab-body .cab-view[data-view="deals"] .deal-btns-minimal > .btn-cta { grid-column: 1 / -1 !important; }
}
@media (max-width: 760px) {
  /* Документы сделки: на телефоне сразу текущий шаг и главная кнопка, пояснения — компактно */
  body .modal-overlay .deal-doc-intro-minimal { display: none !important; }
  body .modal-overlay .deal-doc-flow-summary p { display: none !important; }
  body .modal-overlay .deal-doc-flow-summary { padding: 8px 12px !important; margin-bottom: 8px !important; }
  body .modal-overlay .deal-edo-disclosure > summary { min-height: 40px !important; padding: 8px 12px !important; }
}
@media (max-width: 760px) {
  /* Сообщения «Сохранено» — вверху экрана, чтобы не закрывать кнопки внизу окна */
  #gz-toasts { top: calc(env(safe-area-inset-top, 0px) + 10px) !important; bottom: auto !important; }
}

/* 2.38.0: ЭТрН у своего оператора — одна понятная форма вместо технических блоков */
.deal-epd-external { display: grid; gap: 10px; width: 100%; margin-top: 4px; }
.deal-epd-external label { display: grid; gap: 4px; font-size: 14px; }
.deal-epd-external label > span { color: var(--muted, #5b6b66); font-weight: 600; }
.deal-epd-external .deal-epd-confirm { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.35; }
.deal-epd-external .deal-epd-confirm input { width: 22px; height: 22px; flex: 0 0 22px; margin: 0; }
.deal-epd-external .deal-epd-confirm span { color: inherit; font-weight: 400; }
.deal-epd-external .btn { justify-self: start; min-height: 44px; }
.deal-epd-external.is-inline { margin: 12px 0; padding: 12px; border-radius: 12px; background: rgba(245, 158, 11, .08); border: 1px solid rgba(245, 158, 11, .35); }
.deal-epd-external.is-inline p { margin: 0; font-size: 14px; }
.deal-doc-current-action:has(.deal-epd-external) { display: block; }
.deal-edo-disclosure.is-specialist { margin-top: 16px; opacity: .85; }
.deal-edo-disclosure.is-specialist > summary { font-size: 14px; }
@media (max-width: 560px) {
  .deal-epd-external .btn { justify-self: stretch; }
}

/* 2.38.0: подсказки при наборе — крупные строки под палец, поверх содержимого формы */
.gz-suggest-host { position: relative; }
.gz-suggest { position: absolute; left: 0; right: 0; top: 100%; z-index: 60; margin-top: 4px; max-height: 280px; overflow-y: auto;
  background: var(--surface, #fff); border: 1px solid rgba(15, 76, 58, .18); border-radius: 12px; box-shadow: 0 12px 28px rgba(15, 40, 32, .18); }
.gz-suggest button { display: block; width: 100%; min-height: 44px; padding: 10px 14px; text-align: left; background: none; border: 0;
  border-bottom: 1px solid rgba(15, 76, 58, .08); font: inherit; font-size: 15px; line-height: 1.3; color: inherit; cursor: pointer; }
.gz-suggest button:last-child { border-bottom: 0; }
.gz-suggest button:hover, .gz-suggest button.is-active { background: rgba(45, 190, 160, .12); }
.deal-epd-paper { margin-top: 6px; border-top: 1px dashed rgba(15, 76, 58, .2); padding-top: 10px; }
.deal-epd-paper > summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 32px; }
.deal-epd-paper[open] { display: grid; gap: 10px; }
.deal-epd-paper p { margin: 0; font-size: 13px; color: var(--muted, #5b6b66); }

/* 2.39.0: учёт груза в госсистемах и напоминание о путевом листе */
.deal-state-tracking { margin: 0 0 12px; padding: 12px; border-radius: 12px; border: 1px solid rgba(15, 76, 58, .16); background: rgba(45, 190, 160, .06); }
.deal-state-tracking.is-attention { border-color: rgba(245, 158, 11, .45); background: rgba(245, 158, 11, .08); }
.deal-state-tracking h4 { margin: 0 0 6px; font-size: 15px; }
.deal-state-tracking p { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.deal-state-list { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 6px; }
.deal-state-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; overflow-wrap: anywhere; }
.deal-state-list .btn { min-width: 40px; min-height: 40px; }
.deal-state-form { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.deal-state-form select, .deal-state-form input { min-height: 44px; min-width: 0; }
.deal-state-form .deal-state-none { grid-column: 1 / -1; justify-self: start; }
.deal-waybill-note { margin: 10px 0; padding: 8px 10px; border-radius: 10px; background: rgba(15, 76, 58, .06); font-size: 14px; line-height: 1.35; }
@media (max-width: 760px) {
  .deal-state-form { grid-template-columns: 1fr; }
  .deal-state-form .btn { width: 100%; min-height: 44px; }
}
.deal-state-more > summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 36px; display: flex; align-items: center; }
.deal-state-more[open] > summary { margin-bottom: 8px; }

/* 2.40.0: бумажные документы по типу сделки — главный блок окна документов */
.deal-paper-forms { margin: 0 0 14px; padding: 14px; border-radius: 14px; border: 1px solid rgba(15, 76, 58, .18); background: var(--surface, #fff); }
.deal-paper-forms h4 { margin: 0 0 4px; font-size: 16px; }
.deal-paper-forms > p { margin: 0 0 10px; font-size: 14px; color: var(--muted, #5b6b66); }
.deal-paper-list { list-style: none; counter-reset: paper; margin: 0; padding: 0; display: grid; gap: 10px; }
.deal-paper-list li { counter-increment: paper; display: grid; gap: 8px; padding: 10px 12px 10px 44px; border-radius: 12px; background: rgba(15, 76, 58, .04); position: relative; }
.deal-paper-list li::before { content: counter(paper); position: absolute; left: 12px; top: 11px; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: rgba(15, 76, 58, .12); }
.deal-paper-list li.is-current { background: rgba(45, 190, 160, .12); outline: 2px solid rgba(45, 190, 160, .55); }
.deal-paper-list li.is-done::before { content: "✓"; background: #1f9d6c; color: #fff; }
.deal-paper-head b { display: block; font-size: 15px; }
.deal-paper-head small { display: block; font-size: 13px; color: var(--muted, #5b6b66); }
.deal-paper-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.deal-paper-actions .btn { min-height: 44px; }
.deal-paper-done { color: #1f7a54; font-weight: 700; display: inline-flex; gap: 6px; align-items: center; }
.deal-epd-alt { width: 100%; margin-top: 4px; }
.deal-epd-alt > summary { cursor: pointer; font-size: 14px; font-weight: 600; min-height: 36px; display: flex; align-items: center; color: var(--muted, #5b6b66); }
.deal-epd-alt[open] > summary { margin-bottom: 8px; }
.deal-epd-note { margin: 0 0 8px; font-size: 13px; color: var(--muted, #5b6b66); }
@media (max-width: 560px) {
  .deal-paper-actions .btn { flex: 1 1 100%; }
}
#docs-list:has(.deal-paper-forms) .deal-doc-flow-summary { display: none; }
.closing-paper-hint { display: block; font-size: 13px; color: var(--muted, #5b6b66); margin-top: 4px; }
.closing-minimal-control { display: grid; gap: 8px; }
.deal-party-check { display: flex; gap: 8px; align-items: flex-start; margin: 0 0 10px; padding: 8px 10px; border-radius: 10px; background: rgba(31, 157, 108, .1); font-size: 13px; line-height: 1.4; }
.deal-party-check .ti { color: #1f9d6c; font-size: 18px; margin-top: 1px; }
.deal-party-check.is-off { background: rgba(245, 158, 11, .1); }
.deal-party-check.is-off .ti { color: #b7791f; }
.deal-party-check.is-risk { background: rgba(220, 38, 38, .08); }
.deal-party-check.is-risk .ti { color: #c0392b; }

/* 2.41.0: единая форма «Данные для документов» и полные типовые документы */
.doc-data { margin: 0 0 14px; border: 1px solid rgba(15, 76, 58, .18); border-radius: 14px; background: var(--surface, #fff); padding: 0 14px; }
.doc-data > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 10px; align-items: center; min-height: 52px; font-weight: 700; font-size: 15px; }
.doc-data > summary small { font-weight: 600; color: #b7791f; font-size: 13px; }
.doc-data[open] { padding-bottom: 14px; }
.doc-data-note { margin: 0 0 10px; font-size: 13px; color: var(--muted, #5b6b66); }
.doc-data-group { border: 0; margin: 0 0 12px; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.doc-data-group legend { font-weight: 700; font-size: 14px; margin-bottom: 6px; padding: 0; }
.doc-field { display: grid; gap: 4px; font-size: 13px; }
.doc-field > span { font-weight: 600; }
.doc-field input, .doc-field select, .doc-field textarea { min-height: 44px; width: 100%; box-sizing: border-box; }
.doc-field small { color: var(--muted, #5b6b66); font-size: 12px; }
.doc-field.is-missing input, .doc-field.is-missing select, .doc-field.is-missing textarea { border-color: #d97706 !important; box-shadow: 0 0 0 2px rgba(217, 119, 6, .15); }
.doc-data-wait { font-size: 13px; color: var(--muted, #5b6b66); margin: 0 0 10px; }
.deal-paper-head small + small { margin-top: 2px; }
.deal-paper-missing { color: #b45309 !important; font-weight: 600; }
.deal-paper-own { color: #1f7a54 !important; }
.deal-paper-opt { font-style: normal; font-weight: 600; font-size: 12px; color: var(--muted, #5b6b66); margin-left: 6px; }
.link-btn { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; cursor: pointer; font: inherit; }
.doc-data-more { margin: 4px 0 12px; }
.doc-data-more > summary { cursor: pointer; font-weight: 600; font-size: 14px; min-height: 40px; display: flex; align-items: center; }
.doc-data-more[open] > summary { margin-bottom: 8px; }
.doc-data-ok { margin: 0 0 10px; color: #1f7a54; font-weight: 600; font-size: 14px; }

/* 2.42.0: данные для документов — пять шагов, рейсы, ошибки ввода */
.doc-data { padding: 14px; }
.doc-data > h4 { margin: 0 0 6px; font-size: 16px; display: flex; flex-wrap: wrap; gap: 8px; align-items: baseline; justify-content: space-between; }
.doc-data > h4 small { font-size: 13px; color: #b45309; font-weight: 600; }
.doc-step { border: 1px solid rgba(15, 76, 58, .16); border-radius: 12px; margin: 0 0 8px; background: var(--surface, #fff); }
.doc-step > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; min-height: 52px; padding: 8px 12px; font-size: 15px; }
.doc-step > summary::-webkit-details-marker { display: none; }
.doc-step > summary span { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.doc-step > summary b { width: 26px; height: 26px; flex: 0 0 26px; border-radius: 50%; display: grid; place-items: center; background: rgba(15, 76, 58, .1); font-size: 13px; }
.doc-step > summary small { font-size: 13px; font-weight: 600; white-space: nowrap; }
.doc-step > summary .is-need { color: #b45309; } .doc-step > summary .is-wait { color: #6b7c75; } .doc-step > summary .is-ok { color: #1f7a54; }
.doc-step[open] > summary { border-bottom: 1px solid rgba(15, 76, 58, .1); }
.doc-step.is-extra > summary { color: #56655f; }
.doc-step-body { padding: 12px; display: grid; gap: 12px; }
.doc-grid, .doc-party { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.doc-party h5, .doc-trip legend { grid-column: 1 / -1; margin: 0; font-size: 14px; }
.doc-party.is-other { background: rgba(15, 76, 58, .04); border-radius: 10px; padding: 10px; }
.doc-read { display: grid; gap: 2px; font-size: 13px; }
.doc-read span { color: var(--muted, #5b6b66); } .doc-read b { font-weight: 600; overflow-wrap: anywhere; }
.doc-read.is-missing b { color: #b45309; }
.doc-check { display: flex; gap: 10px; align-items: center; font-weight: 600; font-size: 14px; min-height: 44px; grid-column: 1 / -1; }
.doc-check input { width: 22px; height: 22px; margin: 0; }
.doc-field.is-error input, .doc-field.is-error select { border-color: #c0392b !important; box-shadow: 0 0 0 2px rgba(192, 57, 43, .15); }
.doc-err { color: #c0392b !important; font-weight: 600; }
.doc-trips { display: grid; gap: 10px; }
.doc-trip { border: 1px dashed rgba(15, 76, 58, .3); border-radius: 12px; padding: 10px 12px 12px; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.doc-trip legend { font-weight: 700; padding: 0 4px; }
.doc-trip h5 { margin: 0; grid-column: 1 / -1; }
.doc-trip-pick { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; background: rgba(45, 190, 160, .08); border-radius: 10px; padding: 8px; }
.doc-trip-pick label { display: grid; gap: 4px; font-size: 13px; font-weight: 600; }
.doc-trip-actions, .doc-step-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.doc-trip-actions .btn, .doc-step-actions .btn { min-height: 44px; }
@media (max-width: 560px) { .doc-step-actions .btn, .doc-trip-actions .btn { flex: 1 1 100%; } }

/* 2.43.0: недостающие данные — по порядку, по одному полю */
.doc-wiz-start { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; margin: 0 0 10px; border-radius: 12px; background: #fff6e0; border: 1px solid #efd28c; }
.doc-wiz-start[hidden], .doc-wiz[hidden] { display: none; }
.doc-wiz-start > div { display: grid; gap: 2px; min-width: 0; flex: 1 1 240px; }
.doc-wiz-start small { color: var(--muted, #5b6b66); font-size: 13px; }
.doc-wiz-start .btn { flex: 0 0 auto; }
.doc-wiz { padding: 14px; margin: 0 0 12px; border-radius: 14px; border: 2px solid var(--accent, #4fd1c5); background: var(--surface, #fff); }
.doc-wiz-top { display: grid; gap: 6px; margin-bottom: 6px; }
.doc-wiz-top small { color: var(--muted, #5b6b66); font-size: 13px; }
.doc-wiz-bar { height: 6px; border-radius: 6px; background: rgba(15, 76, 58, .1); overflow: hidden; }
.doc-wiz-bar i { display: block; height: 100%; background: var(--accent, #4fd1c5); border-radius: 6px; transition: width .2s; }
.doc-wiz .doc-field input, .doc-wiz .doc-field select, .doc-wiz .doc-field textarea { font-size: 17px; min-height: 50px; }
.doc-wiz-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 10px; }
.doc-wiz-actions .btn { min-height: 48px; }
@media (max-width: 767px) {
  .doc-wiz-start .btn, .doc-wiz-actions .btn-cta { width: 100%; justify-content: center; }
}

/* 2.43.0: рейсы по машинам в окне «Исполнение» */
.exec-trips-sum { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; margin: 2px 0 6px; }
.exec-trips-sum span { color: var(--muted, #5b6b66); font-weight: 600; }
.exec-trips-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.exec-trip { border: 1px solid rgba(15, 76, 58, .16); border-radius: 12px; padding: 10px 12px; display: grid; gap: 6px; background: var(--surface, #fff); min-width: 0; }
.exec-trip.is-done { background: #eefaf4; border-color: #9fd9bd; }
.exec-trip header { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.exec-trip header span { color: var(--muted, #5b6b66); overflow-wrap: anywhere; }
.exec-trip > small { color: var(--muted, #5b6b66); overflow-wrap: anywhere; }
.exec-trip-dots { display: flex; gap: 6px; }
.exec-trip-dots i { flex: 1; height: 6px; border-radius: 6px; background: rgba(15, 76, 58, .12); }
.exec-trip-dots i.is-on { background: #1f9d6b; }
.exec-trip-state { font-weight: 600; color: var(--ink, #17231f) !important; }
.exec-trip-warn { color: #9a5b00 !important; }
.exec-trip-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.exec-trip-actions .btn { min-height: 44px; }
.exec-trip-hand { display: grid; grid-template-columns: 2fr 1fr; gap: 8px; }
.exec-trip-hand label { display: grid; gap: 4px; font-size: 13px; }
.exec-trip-linkbox { display: grid; gap: 6px; }
.exec-trip-linkbox small { color: var(--muted, #5b6b66); font-size: 12px; }
@media (max-width: 767px) {
  .exec-trips-list { grid-template-columns: 1fr; }
  .exec-trip-actions .btn { flex: 1 1 100%; justify-content: center; }
}

/* 2.44.0: свои номер и дата документа */
.deal-paper-num { font-weight: 700; }
.deal-paper-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface, #fff); border: 1px solid rgba(15, 76, 58, .16); }
.deal-paper-meta[hidden] { display: none; }
.deal-paper-meta > small, .deal-paper-meta > .deal-paper-actions { grid-column: 1 / -1; }
@media (max-width: 767px) { .deal-paper-meta { grid-template-columns: 1fr; } }

/* 2.45.0: таблица техники и персонала исполнителя, подсказки из неё */
.fleet-table-wrap { margin: 0 0 14px; }
.fleet-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px; align-items: flex-start; margin: 0 0 8px; }
.fleet-head > div:first-child { display: grid; gap: 2px; flex: 1 1 280px; }
.fleet-head small { color: var(--muted, #5b6b66); }
.fleet-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.fleet-actions .btn, .fleet-attach .btn { min-height: 44px; cursor: pointer; }
.fleet-warn { margin: 0 0 8px; padding: 8px 10px; border-radius: 10px; background: #fff3dc; color: #7a4a00; font-size: 13px; }
.fleet-scroll { overflow-x: auto; border: 1px solid rgba(15, 76, 58, .14); border-radius: 12px; }
.fleet-table { border-collapse: collapse; width: 100%; min-width: 1100px; font-size: 13px; }
.fleet-table th { text-align: left; font-weight: 700; padding: 8px 6px; background: rgba(15, 76, 58, .06); vertical-align: bottom; }
.fleet-table td { padding: 6px; border-top: 1px solid rgba(15, 76, 58, .1); vertical-align: top; }
.fleet-table td .field-dark { width: 100%; min-width: 110px; min-height: 40px; font-size: 13px; padding: 6px 8px; }
.fleet-table tr.is-dirty td { background: #fffbef; }
.fleet-table .is-scanned, .doc-trip .is-scanned, .doc-step .is-scanned { outline: 2px solid #4fd1c5; outline-offset: -1px; }
.fleet-docs { display: grid; gap: 4px; min-width: 200px; }
.fleet-doc { font-size: 12px; color: #1f6d4f; }
.fleet-doc.is-pending { color: #7a4a00; }
.fleet-need { font-size: 12px; font-weight: 700; color: #b3261e; }
.fleet-attach { display: grid; gap: 4px; }
.fleet-attach .btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.fleet-row-actions { display: grid; gap: 6px; min-width: 120px; }
.fleet-empty { color: var(--muted, #5b6b66); padding: 14px !important; }
.fleet-suggest button { display: grid; text-align: left; }
.fleet-suggest button small { color: var(--muted, #5b6b66); font-size: 12px; }
@media (max-width: 767px) {
  .fleet-scroll { overflow: visible; border: 0; }
  .fleet-table { min-width: 0; }
  .fleet-table thead { display: none; }
  .fleet-table, .fleet-table tbody, .fleet-table tr, .fleet-table td { display: block; width: 100%; }
  .fleet-table tr { border: 1px solid rgba(15, 76, 58, .16); border-radius: 12px; margin: 0 0 10px; padding: 6px 10px; background: var(--surface, #fff); }
  .fleet-table td { border: 0; padding: 4px 0; }
  .fleet-table td[data-label]::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted, #5b6b66); margin-bottom: 2px; }
  .fleet-table td .field-dark { min-height: 46px; font-size: 16px; }
  .fleet-actions .btn { flex: 1 1 100%; }
}
@media (min-width: 768px) {
  .fleet-table td:first-child .field-dark { min-width: 230px; }
  .fleet-table td .field-dark[type="date"] { min-width: 140px; }
}

/* 2.46.0: машина и водитель рейса — в таблице исполнителя с документами */
.doc-trip-crew { display: grid; gap: 4px; margin: 0 0 8px; font-size: 13px; }
.doc-trip-crew .is-ok { color: #1f6d4f; }
.doc-trip-crew .is-bad { color: #b3261e; font-weight: 600; }

/* 2.47.0: уведомления о сделках — MAX, SMS, push */
#notify-channels-body { display: grid; gap: 12px; }
.nc-row { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid rgba(15, 76, 58, .1); }
.nc-row:first-child { border-top: 0; padding-top: 0; }
.nc-status { display: flex; gap: 6px; align-items: center; font-weight: 600; color: var(--muted, #5b6b66); }
.nc-status.is-on { color: #1f6d4f; }
.nc-actions, .nc-sms { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.nc-sms .doc-field { flex: 1 1 200px; margin: 0; }
.nc-actions .btn, .nc-sms .btn { min-height: 44px; }
@media (max-width: 767px) { .nc-actions .btn, .nc-sms .btn { flex: 1 1 100%; } }
.nc-sms [hidden], #notify-channels-body [hidden] { display: none !important; }

/* 2.48.0: шаблоны договоров компании */
.ct-kinds { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 8px; }
.ct-kind { border: 1px solid rgba(15, 76, 58, .2); background: var(--surface, #fff); border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
.ct-kind.is-on { background: #17735a; color: #fff; border-color: #17735a; }
.ct-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; margin: 8px 0; }
.ct-tools .btn { cursor: pointer; min-height: 40px; }
.ct-fields summary { cursor: pointer; font-weight: 600; padding: 8px 0; }
.ct-field-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ct-field { border: 1px dashed rgba(15, 76, 58, .35); background: #f3fbf8; border-radius: 8px; padding: 5px 9px; font: inherit; font-size: 12px; cursor: pointer; }
.ct-body { min-height: 320px; font-family: "Times New Roman", Times, serif; font-size: 15px; line-height: 1.45; }
.ct-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.deal-contract-src { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 13px; margin-top: 4px; }
.deal-contract-src select { min-height: 38px; font-size: 14px; }
@media (max-width: 767px) { .ct-actions .btn, .ct-tools .btn { flex: 1 1 100%; justify-content: center; } }
/* 2.49.0: роль разместившего на карточке, одна карточка на один груз, фильтр «Кто разместил». */
.market-signal-card .market-signal-source.is-role { font-weight: 700 !important; max-width: 110px !important; }
.market-signal-card .market-signal-source.is-owner { background: #dff5ea !important; color: #0b6b43 !important; }
.market-signal-card .market-signal-source.is-forwarder { background: #e3eefc !important; color: #1d4f91 !important; }
.market-signal-card .market-signal-source.is-broker { background: #fff1d6 !important; color: #8a5a00 !important; }
.market-group-chip { display: inline-flex; align-items: center; gap: 4px; margin-top: 3px; padding: 2px 8px; border: 1px solid var(--gz-line-strong, #d5dcd9); border-radius: 999px; background: transparent; color: inherit; font: inherit; font-size: 11.5px; font-weight: 700; line-height: 1.4; cursor: pointer; white-space: nowrap; }
.market-group-chip:hover, .market-group-chip:focus-visible { border-color: currentColor; }
.market360-role, .filter-role { min-height: 40px; max-width: 210px; font-size: 14px; border-radius: 10px; }
body.home-page #market360 .market360-toolbar .market360-role { flex: 0 0 auto; height: 40px; }
@media (max-width: 620px) {
  body.home-page #market360 .market360-toolbar .market360-role { max-width: 44%; font-size: 13px; padding-left: 8px; padding-right: 4px; }
  .filter-role { max-width: none; flex: 1 1 100%; font-size: 16px; }
}
/* 2.49.0: выбор «Кто разместил» — в той же строке, что поиск и уведомления. */
@media (min-width: 900px) { #market360 .market360-toolbar { grid-template-columns: minmax(240px, 1fr) auto auto auto !important; } }
@media (min-width: 621px) and (max-width: 899px) { #market360 .market360-toolbar { grid-template-columns: 1fr auto auto !important; } }
