/* Модуль «Заявки»: формы на страницах справочника, кабинет получателя, админка. Переменные — из app.css. */

/* Призыв над списком компаний */
.lead-cta { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  background: var(--accent-soft); border: 1px solid #cdd9f5; border-radius: var(--radius); padding: 10px 14px; margin: 0 0 14px; }
.lead-cta p { margin: 0; font-size: .93rem; flex: 1 1 320px; }

/* Компактная форма */
.lead-box { border-top: 3px solid var(--accent); }
.lead-box h2 { margin-bottom: .35em; }
.lead-box-list { margin-top: 18px; }
.lead-box-list .lead-form { max-width: 760px; }
.lead-box-sidebar .lead-details > summary { list-style: none; cursor: pointer; margin: 4px 0 10px; }
.lead-box-sidebar .lead-details > summary::-webkit-details-marker { display: none; }
.lead-box-sidebar .lead-details[open] > summary { display: none; }
.lead-fixed { font-size: .9rem; margin: 0 0 10px; }
.lead-fixed .code { font-family: var(--mono); font-size: .85rem; }
.lead-form .row select { width: 100%; }
.lead-form .grid2 { gap: 0 12px; }
.lead-consents { margin: -6px 0 12px; }
.lead-consents summary { cursor: pointer; color: var(--muted); }
.lead-form .counter { font-size: .78rem; color: var(--muted); text-align: right; }
.lead-form.is-sending button[type=submit] { opacity: .6; pointer-events: none; }

/* Выбор ОКВЭД: поиск точного кода */
.okv-pick { position: relative; margin-bottom: 12px; }
.okv-pick .row { margin-bottom: 6px; }
.okv-search input { width: 100%; padding: 7px 10px; border: 1px dashed #c9d2de; border-radius: 8px; font: inherit; font-size: .88rem; background: #fff; }
.okv-results { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: 8px; background: #fff;
  max-height: 260px; overflow: auto; box-shadow: 0 6px 18px rgba(16, 24, 40, .08); position: relative; z-index: 5; }
.okv-results li button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: 6px 8px; border-radius: 6px;
  font: inherit; font-size: .88rem; cursor: pointer; color: var(--text); }
.okv-results li button:hover, .okv-results li button:focus { background: var(--accent-soft); outline: none; }
.okv-results .code { font-family: var(--mono); color: var(--accent); margin-right: 6px; }
.okv-results .empty { padding: 6px 8px; color: var(--muted); font-size: .85rem; }

/* Сводка заявки */
.lead-summary .lead-title { font-size: 1.15rem; margin: .2em 0 .5em; }
.lead-text { white-space: pre-line; margin: 0 0 12px; line-height: 1.5; }
.lead-link { word-break: break-all; font-size: .9rem; }
.lead-contacts { border-left: 4px solid var(--ok); }
.lead-take { border-left: 4px solid var(--accent); }
.lead-plan p { margin: 0 0 10px; font-size: .93rem; }

/* Список заявок в кабинете */
.lead-list { list-style: none; margin: 0 0 14px; padding: 0; }
.lead-item { display: flex; gap: 12px; justify-content: space-between; align-items: flex-start; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 8px; }
.lead-item.lead-new { border-left: 4px solid var(--accent); }
.lead-item.lead-missed, .lead-item.lead-archived { opacity: .75; }
.lead-item-main { min-width: 0; }
.lead-item-side { text-align: right; flex: none; }
.lead-item .cmeta .code { font-family: var(--mono); font-size: .85rem; }

@media (max-width: 640px) {
  .lead-item { flex-direction: column; }
  .lead-item-side { text-align: left; }
  .lead-form .grid2 { grid-template-columns: 1fr; }
}
