/* «Передача в ЛК» (Сабина 23.11.2026, Izi.CRM #5134) — окно lead-handoff.js (window.LHO) поверх «Продаж»: шаги, поля
   с подсказками ИИ (красные до подтверждения, зелёные с галочкой после), файлы переписки, окно фото к задаче
   «Сфоткаться с клиентом», плашка в карточке лида и строка «Не переданы в ЛК» в «Команде».
   Метки слева у плашек — ровной планкой внутри (::before), без border-left. Тёмная тема — body[data-theme="dark"]. */
.lho-ov {
    --lho-bg: var(--card-bg, #fff); --lho-ink: var(--text-color, #0f172a); --lho-mute: var(--text-muted, #64748b);
    --lho-bd: var(--border-light, #e8eaed); --lho-bd2: var(--border-color, #d8dee6); --lho-soft: var(--surface-bg, #f8fafc);
    --lho-input: #fff; --lho-acc: #2563eb; --lho-acc-glow: rgba(37, 99, 235, .16); --lho-acc-soft: #eff6ff;
    --lho-red: #dc2626; --lho-red-bg: #fef2f2; --lho-red-bg2: #fff7f7;
    --lho-green: #16a34a; --lho-green-bg: #ecfdf3; --lho-green-bd: #86d6a4;
    --lho-amber: #d97706; --lho-amber-ink: #b45309; --lho-amber-bg: #fff8eb; --lho-amber-glow: rgba(217, 119, 6, .18);
    position: fixed; inset: 0; z-index: 1150; display: flex; align-items: center; justify-content: center;
    padding: 20px; background: rgba(15, 23, 42, .5);
    font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
body[data-theme="dark"] .lho-ov {
    --lho-input: #111827; --lho-acc: #60a5fa; --lho-acc-glow: rgba(96, 165, 250, .22); --lho-acc-soft: rgba(96, 165, 250, .12);
    --lho-red: #f87171; --lho-red-bg: rgba(248, 113, 113, .14); --lho-red-bg2: rgba(248, 113, 113, .07);
    --lho-green: #34d399; --lho-green-bg: rgba(52, 211, 153, .13); --lho-green-bd: rgba(52, 211, 153, .55);
    --lho-amber: #fbbf24; --lho-amber-ink: #fcd34d; --lho-amber-bg: rgba(251, 191, 36, .12); --lho-amber-glow: rgba(251, 191, 36, .2);
    --lho-soft: #182131; --lho-bd: #2b3646; --lho-bd2: #3a4658;
    background: rgba(2, 6, 23, .66);
}
.lho-ov--photo { z-index: 1210; }
.lho {
    width: 100%; max-width: 820px; max-height: min(92vh, 940px); display: flex; flex-direction: column;
    background: var(--lho-bg); color: var(--lho-ink); border-radius: 14px; overflow: hidden;
    box-shadow: 0 24px 60px rgba(15, 23, 42, .3), 0 2px 8px rgba(15, 23, 42, .12);
}
.lho svg { flex: none; }
.lho-loading { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 56px 24px; font-size: 13.5px; color: var(--lho-mute); }
.lho-loading.is-err { flex-direction: column; color: var(--lho-red); }
.lho-spin {
    display: inline-block; width: 15px; height: 15px; border-radius: 50%; flex: none;
    border: 2px solid currentColor; border-right-color: transparent; animation: lhoSpin .7s linear infinite; opacity: .8;
}
@keyframes lhoSpin { to { transform: rotate(360deg); } }
.lho-spin.is-sm { width: 11px; height: 11px; border-width: 1.6px; vertical-align: -1px; margin-right: 6px; }
/* логин ККМ из кабинета Салыка (Ханзада 26.11.2026, #5255): строка под полем, пока идёт запрос */
.lho-f-src .lho-kkm-wait { display: inline-flex; align-items: center; color: var(--lho-acc); }
.lho-f-src .lho-link { font-size: 11.5px; margin-left: 4px; }
/* кабинет Салыка клиента (Ханзада 26.11.2026, #5299): под логином и паролем — что нашлось (ФЛ / ЮЛ с ИНН), идёт запрос или ошибка */
.lho-sk { font-size: 11.5px; line-height: 1.5; color: var(--lho-mute); margin: -4px 0 0; overflow-wrap: anywhere; }
.lho-sk:empty { display: none; }
.lho-sk svg { vertical-align: -2px; margin-right: 4px; color: var(--lho-green); }
.lho-sk b { font-weight: 700; color: var(--lho-ink); }
.lho-sk .is-err, .lho-sk .is-err svg { color: var(--lho-amber-ink); }
.lho-sk .lho-link { font-size: 11.5px; margin-left: 4px; }
.lho-sk-wait { display: inline-flex; align-items: center; color: var(--lho-acc); }

/* Шапка и шаги */
.lho-head { display: flex; align-items: center; gap: 12px; padding: 16px 20px 12px; }
.lho-head-ic {
    flex: none; width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    background: var(--lho-acc-soft); color: var(--lho-acc);
}
.lho-head-ic.is-cam { background: var(--lho-green-bg); color: var(--lho-green); }
.lho-head-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lho-head-t b { font-size: 16px; font-weight: 650; }
.lho-head-t span { font-size: 12.5px; color: var(--lho-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lho-x {
    flex: none; width: 34px; height: 34px; border: none; border-radius: 9px; background: transparent; color: var(--lho-mute);
    display: flex; align-items: center; justify-content: center; cursor: pointer;
}
.lho-x:hover { background: var(--hover-bg, #f1f3f4); color: var(--lho-ink); }
.lho-steps { display: flex; align-items: center; gap: 8px; list-style: none; margin: 0; padding: 0 20px 14px; border-bottom: 1px solid var(--lho-bd); }
.lho-steps li { display: flex; align-items: center; min-width: 0; }
.lho-steps li button {
    display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 2px; border: none; background: none; border-radius: 8px;
    font-weight: 600; font-size: 12.5px; line-height: 1.2; font-family: inherit; color: var(--lho-mute); cursor: pointer; white-space: nowrap;
}
.lho-steps li button:disabled { cursor: default; }
.lho-steps li button:not(:disabled):hover .lho-step-t { color: var(--lho-ink); text-decoration: underline; }
.lho-step-n {
    flex: none; width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    border: 1.5px solid var(--lho-bd2); font-size: 11.5px; font-weight: 700; color: var(--lho-mute); background: var(--lho-bg);
}
.lho-steps li.is-cur .lho-step-n { background: var(--lho-acc); border-color: var(--lho-acc); color: #fff; }
.lho-steps li.is-cur .lho-step-t { color: var(--lho-ink); }
.lho-steps li.is-done .lho-step-n { background: var(--lho-green-bg); border-color: var(--lho-green); color: var(--lho-green); }
.lho-step-sep { flex: 1 1 24px; max-width: 72px; height: 1.5px; background: var(--lho-bd2); border-radius: 2px; }

/* Тело и низ */
.lho-body { flex: 1; min-height: 120px; overflow-y: auto; padding: 16px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.lho-foot { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 20px; border-top: 1px solid var(--lho-bd); background: var(--lho-soft); }
.lho-foot-hint { flex: 1; min-width: 0; font-size: 12.5px; color: var(--lho-mute); line-height: 1.4; }
.lho-miss, .lho-ready { display: inline-flex; align-items: flex-start; gap: 6px; }
.lho-miss svg, .lho-ready svg { margin-top: 2px; }
.lho-ready { color: var(--lho-green); font-weight: 600; }
.lho-btn {
    flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 15px;
    border-radius: 9px; border: 1px solid var(--lho-bd2); background: var(--lho-bg); color: var(--lho-ink);
    font-weight: 600; font-size: 13px; line-height: 1; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s, opacity .15s;
}
.lho-btn:hover { border-color: var(--lho-mute); }
.lho-btn.is-pri { background: var(--lho-acc); border-color: var(--lho-acc); color: #fff; }
.lho-btn.is-pri:hover { filter: brightness(1.06); }
.lho-btn.is-blocked { opacity: .5; }
.lho-btn:disabled { opacity: .5; cursor: default; }
.lho-link { border: none; background: none; padding: 0; color: var(--lho-acc); font-weight: 600; font-size: 12.5px; line-height: 1.3; font-family: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.lho-link:hover { text-decoration: underline; }
.lho-link:disabled { color: var(--lho-mute); cursor: default; text-decoration: none; }
.lho-empty { padding: 10px 2px; font-size: 13px; color: var(--lho-mute); }

/* Плашки: ровная планка внутри слева, цвет — --bar */
.lho-note, .lho-ai {
    --bar: var(--lho-acc); position: relative; display: flex; gap: 10px; align-items: flex-start;
    padding: 11px 14px 11px 18px; border-radius: 11px; font-size: 13px; line-height: 1.45; background: var(--lho-acc-soft);
}
.lho-note::before, .lho-ai::before {
    content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3.5px; border-radius: 0 4px 4px 0; background: var(--bar); pointer-events: none;
}
.lho-note > svg, .lho-ai > svg { margin-top: 2px; color: var(--bar); }
.lho-note p { margin: 4px 0 0; color: var(--lho-mute); }
.lho-note.is-info { --bar: var(--lho-acc); }
.lho-note.is-ok { --bar: var(--lho-green); background: var(--lho-green-bg); }
.lho-note.is-warn { --bar: var(--lho-amber); background: var(--lho-amber-bg); }
.lho-tag { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--lho-bg); color: var(--lho-mute); margin-left: 4px; }
.lho-ai { align-items: center; }
.lho-ai.is-todo { --bar: var(--lho-red); background: var(--lho-red-bg); }
.lho-ai.is-ok { --bar: var(--lho-green); background: var(--lho-green-bg); }
.lho-ai.is-busy { --bar: var(--lho-acc); color: var(--lho-acc); }
.lho-ai.is-err { --bar: var(--lho-amber); background: var(--lho-amber-bg); }
.lho-ai-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; color: var(--lho-ink); }
.lho-ai-t b { font-size: 13.5px; font-weight: 650; }
.lho-ai-t span { font-size: 12.5px; color: var(--lho-mute); }
.lho-ai-docs { margin-top: 3px; }
.lho-ai-acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.lho-ai-acts .lho-btn { height: 34px; padding: 0 12px; font-size: 12.5px; }
.lho-diffs { margin-top: 8px; display: flex; flex-direction: column; gap: 6px; }
.lho-diffs-h { font-size: 12.5px; font-weight: 600; color: var(--lho-ink); }

/* Разделы и сетка полей */
.lho-sec { border: 1px solid var(--lho-bd); border-radius: 12px; padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 12px; }
.lho-sec h4 { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13.5px; font-weight: 650; color: var(--lho-ink); flex-wrap: wrap; }
.lho-sec h4 > svg { color: var(--lho-mute); }
.lho-h-sub { font-size: 12px; font-weight: 500; color: var(--lho-mute); }
.lho-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; align-items: start; }
.lho-gap { display: block; }
.lho-f { display: flex; flex-direction: column; gap: 5px; min-width: 0; border-radius: 10px; }
.lho-f[hidden] { display: none; }
.lho-f-lbl { display: flex; align-items: center; gap: 8px; min-height: 22px; }
.lho-f-lbl label { font-size: 12.5px; font-weight: 600; color: var(--lho-mute); }
.lho-req { color: var(--lho-red); margin-left: 2px; font-weight: 700; }
.lho-f-badge { margin-left: auto; display: inline-flex; }
.lho-b { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.lho-b.is-ai { background: var(--lho-red-bg); color: var(--lho-red); }
.lho-b.is-ok { background: var(--lho-green-bg); color: var(--lho-green); }
.lho-f-box { display: flex; align-items: stretch; gap: 6px; min-width: 0; }
.lho-in {
    flex: 1; min-width: 0; width: 100%; box-sizing: border-box; height: 40px; padding: 0 12px;
    border: 1px solid var(--lho-bd2); border-radius: 9px; background: var(--lho-input); color: var(--lho-ink);
    font-weight: 400; font-size: 13.5px; line-height: 1.3; font-family: inherit; outline: none; transition: border-color .15s, box-shadow .15s, background .15s;
}
textarea.lho-in { height: auto; min-height: 64px; padding: 9px 12px; line-height: 1.45; resize: vertical; }
.lho-in.is-mono { font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 13px; letter-spacing: .01em; }
.lho-in::placeholder { color: var(--lho-mute); opacity: .7; }
.lho-in:focus { border-color: var(--lho-acc); box-shadow: 0 0 0 3px var(--lho-acc-glow); }
.lho-in:disabled { opacity: .5; }
.lho-in[readonly] { background: var(--lho-soft); }
.lho-f.is-ai .lho-in { border-color: var(--lho-red); background: var(--lho-red-bg2); }
.lho-f.is-ai .lho-in:focus { box-shadow: 0 0 0 3px var(--lho-red-bg); }
.lho-f.is-ok .lho-in { border-color: var(--lho-green-bd); }
.lho-f.is-bad .lho-in { border-color: var(--lho-amber); }
.lho-f.is-miss .lho-in, .lho-f.is-miss .lho-chips { border-color: var(--lho-amber); box-shadow: 0 0 0 3px var(--lho-amber-glow); }
.lho-f.is-off .lho-f-lbl label { opacity: .55; }
.lho-f.is-shake { animation: lhoShake .45s ease; }
@keyframes lhoShake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }
.lho-f-ok {
    display: none; flex: none; align-items: center; gap: 5px; padding: 0 12px; border-radius: 9px;
    border: 1px solid var(--lho-red); background: var(--lho-bg); color: var(--lho-red);
    font-weight: 650; font-size: 12.5px; line-height: 1; font-family: inherit; cursor: pointer; white-space: nowrap;
}
.lho-f.is-ai .lho-f-ok { display: inline-flex; }
.lho-f-ok:hover { background: var(--lho-green); border-color: var(--lho-green); color: #fff; }
.lho-f.is-area .lho-f-ok { align-self: flex-start; height: 36px; }
.lho-f-src { font-size: 11.5px; line-height: 1.4; color: var(--lho-mute); }
.lho-f-src:empty { display: none; }
.lho-f-src span { display: inline; }
.lho-f-src svg { vertical-align: -2px; margin-right: 4px; }
.lho-f-src a { color: var(--lho-acc); font-weight: 600; text-decoration: none; }
.lho-f-src a:hover { text-decoration: underline; }
.lho-f.is-ai .lho-f-src { color: var(--lho-red); }
/* Расхождение с другими источниками (Сабина #5171): «в карточке лида, в почте: Белек» — кнопка-значение, клик берёт его */
.lho-f-alts { font-size: 11.5px; line-height: 1.5; color: var(--lho-amber-ink); }
.lho-f-alts:empty { display: none; }
.lho-f-alts svg { vertical-align: -2px; margin-right: 4px; }
.lho-alt {
    display: inline-flex; align-items: center; height: 20px; padding: 0 8px; margin: 1px 0; border-radius: 999px;
    border: 1px solid var(--lho-amber); background: var(--lho-amber-bg); color: var(--lho-amber-ink);
    font: inherit; font-weight: 700; cursor: pointer; transition: background .12s, color .12s;
}
.lho-alt:hover { background: var(--lho-amber); color: #fff; }
.lho-done-acts { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; align-self: center; gap: 8px 18px; }
.lho-done-acts:empty { display: none; }
.lho-f-err { font-size: 11.5px; color: var(--lho-amber-ink); font-weight: 600; }
.lho-f-err:empty { display: none; }
.lho-f-hint { font-size: 11.5px; color: var(--lho-mute); }
.lho-chips { flex: 1; display: flex; flex-wrap: wrap; gap: 6px; padding: 3px; border: 1px solid transparent; border-radius: 11px; }
.lho-chip {
    height: 34px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--lho-bd2); background: var(--lho-input); color: var(--lho-ink);
    font-weight: 500; font-size: 13px; line-height: 1; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background .15s, border-color .15s;
}
.lho-chip:hover:not(:disabled) { border-color: var(--lho-acc); }
.lho-chip.on { background: var(--lho-acc); border-color: var(--lho-acc); color: #fff; font-weight: 650; }
.lho-f.is-ai .lho-chips { border-color: var(--lho-red); background: var(--lho-red-bg2); }
.lho-f.is-ai .lho-chip.on { background: var(--lho-red); border-color: var(--lho-red); }
.lho-check { display: flex; align-items: flex-start; gap: 9px; font-size: 13px; line-height: 1.4; color: var(--lho-ink); cursor: pointer; }
.lho-check input { margin-top: 2px; flex: none; }

/* Голосовой ввод */
.lho-mic {
    display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px;
    border: 1px solid var(--lho-bd2); background: var(--lho-bg); color: var(--lho-mute);
    font-weight: 600; font-size: 11.5px; line-height: 1; font-family: inherit; cursor: pointer;
}
.lho-mic:hover:not(:disabled) { color: var(--lho-acc); border-color: var(--lho-acc); }
.lho-mic:disabled { opacity: .5; cursor: default; }
.lho-mic.is-rec { color: #fff; background: var(--lho-red); border-color: var(--lho-red); }
.lho-mic.is-rec i { width: 7px; height: 7px; border-radius: 50%; background: #fff; animation: lhoBlink 1s ease-in-out infinite; }
.lho-mic.is-busy { color: var(--lho-acc); }
.lho-mic .lho-spin { width: 11px; height: 11px; }
@keyframes lhoBlink { 50% { opacity: .25; } }

/* Файлы из переписки */
.lho-media { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.lho-m {
    position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--lho-bd2); border-radius: 11px;
    overflow: hidden; background: var(--lho-bg); cursor: pointer; transition: border-color .15s, box-shadow .15s;
}
.lho-m:hover { border-color: var(--lho-acc); }
.lho-m.on { border-color: var(--lho-acc); box-shadow: 0 0 0 2px var(--lho-acc-glow); }
.lho-m > input { position: absolute; top: 8px; left: 8px; z-index: 2; margin: 0; }
.lho-m-th { position: relative; display: flex; align-items: center; justify-content: center; height: 84px; background: var(--lho-soft); color: var(--lho-mute); }
.lho-m-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lho-m-ic { display: flex; }
.lho-m-tag {
    position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 3px; padding: 2px 6px; border-radius: 6px;
    background: rgba(15, 23, 42, .72); color: #fff; font-size: 10.5px; font-style: normal; font-weight: 600;
}
.lho-m-cap { display: flex; flex-direction: column; gap: 1px; padding: 6px 8px 7px; min-width: 0; }
.lho-m-cap b { font-size: 12px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lho-m-cap i { font-style: normal; font-size: 11px; color: var(--lho-mute); }
.lho-m-open {
    position: absolute; top: 6px; right: 6px; z-index: 2; width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, .6); color: #fff; opacity: 0; transition: opacity .15s;
}
.lho-m:hover .lho-m-open, .lho-m-open:focus-visible { opacity: 1; }

/* Шаг «Группа» и «Готово» */
.lho-gcard {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--lho-bd2); border-radius: 11px; background: var(--lho-soft);
}
.lho-gcard > svg:first-child { color: #22a35a; }
.lho-gcard > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lho-gcard b { font-size: 13.5px; }
.lho-gcard span { font-size: 12.5px; color: var(--lho-mute); line-height: 1.4; }
.lho-gcard.is-ok { border-color: var(--lho-green-bd); background: var(--lho-green-bg); }
.lho-gcard.is-ok > svg:last-child { color: var(--lho-green); }
.lho-gacts { display: flex; gap: 8px; flex-wrap: wrap; }
.lho-final { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; padding: 14px 10px 6px; }
.lho-final-ic { width: 58px; height: 58px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--lho-amber-bg); color: var(--lho-amber); margin-bottom: 6px; }
.lho-final.is-ok .lho-final-ic { background: var(--lho-green-bg); color: var(--lho-green); }
.lho-final b { font-size: 17px; font-weight: 700; }
.lho-final span { font-size: 13px; color: var(--lho-mute); }
.lho-sum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; border: 1px solid var(--lho-bd); border-radius: 12px; overflow: hidden; }
.lho-sum li { display: flex; align-items: flex-start; gap: 10px; padding: 10px 14px; background: var(--lho-bg); }
.lho-sum li + li { border-top: 1px solid var(--lho-bd); }
.lho-sum li > svg { margin-top: 1px; }
.lho-sum li.is-ok > svg { color: var(--lho-green); }
.lho-sum li.is-wait > svg { color: var(--lho-amber); }
.lho-sum li div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lho-sum b { font-size: 13px; font-weight: 600; }
.lho-sum span { font-size: 12px; color: var(--lho-mute); }
.lho-open-lk { align-self: center; }

/* Окно фото к задаче */
.lho-photo { max-width: 520px; }
.lho-photo .lho-head-t span, .lho-pend .lho-head-t span { white-space: normal; }
.lho-drop {
    display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 28px 18px; text-align: center;
    border: 1.5px dashed var(--lho-bd2); border-radius: 12px; background: var(--lho-soft); cursor: pointer; transition: border-color .15s, background .15s;
}
.lho-drop[hidden] { display: none; }
.lho-drop:hover, .lho-drop.is-over { border-color: var(--lho-acc); background: var(--lho-acc-soft); }
.lho-drop-ic { width: 54px; height: 54px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--lho-bg); color: var(--lho-acc); margin-bottom: 4px; }
.lho-drop b { font-size: 14px; }
.lho-drop span { font-size: 12.5px; color: var(--lho-mute); max-width: 340px; }
.lho-photo-prev { display: flex; gap: 14px; align-items: center; }
.lho-photo-prev[hidden] { display: none; }
.lho-photo-prev img { width: 150px; height: 150px; object-fit: cover; border-radius: 12px; border: 1px solid var(--lho-bd2); }
.lho-photo-prev div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.lho-photo-prev b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lho-photo-prev span { font-size: 12px; color: var(--lho-mute); }
/* «Оплатил без встречи» вместо фото (Сабина 25.11.2026, #5240): ссылка под зоной фото, раскрывается в причину */
.lho-nm { margin-top: 12px; }
.lho-nm .lho-link[hidden] { display: none; }
.lho-nm-box { position: relative; display: flex; flex-direction: column; gap: 9px; padding: 13px 14px 14px 18px; border-radius: 12px; background: var(--lho-amber-bg); }
.lho-nm-box[hidden] { display: none; }
.lho-nm-box::before { content: ''; position: absolute; left: 0; top: 22%; bottom: 22%; width: 3px; border-radius: 0 3px 3px 0; background: var(--lho-amber); }
.lho-nm-t { display: flex; align-items: center; gap: 7px; color: var(--lho-amber-ink); }
.lho-nm-t b { font-size: 13.5px; color: var(--lho-ink); flex: 1; min-width: 0; }
.lho-nm-sub { font-size: 12.5px; color: var(--lho-mute); line-height: 1.4; }
.lho-nm .lho-chips { padding: 0; }
.lho-nm .lho-chip { height: 30px; padding: 0 11px; font-size: 12.5px; }
.lho-nm textarea.lho-in { min-height: 58px; }

/* Список «не переданы в ЛК» */
.lho-pend { max-width: 560px; }
.lho-plist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lho-plist button {
    width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; border: 1px solid var(--lho-bd2);
    border-radius: 11px; background: var(--lho-bg); color: var(--lho-ink); font-family: inherit; cursor: pointer;
}
.lho-plist button:hover { border-color: var(--lho-acc); }
.lho-plist button > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.lho-plist b { font-size: 13.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lho-plist span { font-size: 12px; color: var(--lho-mute); }
.lho-plist em { font-style: normal; font-size: 12px; font-weight: 600; color: var(--lho-amber-ink); white-space: nowrap; }

/* Плашка «Передача в ЛК» в карточке лида (страница и Inbox): планка слева по статусу */
#salesTab .lho-card { --bar: var(--lho-c, #dc2626); position: relative; padding-left: 19px; display: flex; flex-direction: column; gap: 8px; }
#salesTab .lho-card::before { content: ''; position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px; border-radius: 0 4px 4px 0; background: var(--bar); pointer-events: none; }
#salesTab .lho-card.is-bad { --lho-c: #dc2626; }
#salesTab .lho-card.is-warn { --lho-c: #d97706; }
#salesTab .lho-card.is-ok { --lho-c: #16a34a; }
/* Оплата до правила (24.11.2026) и клиента в ЛК не нашли — передача по желанию, серым (Сабина #5172) */
#salesTab .lho-card.is-mute { --lho-c: #94a3b8; }
#salesTab .lho-card-top { display: flex; align-items: center; gap: 8px; }
#salesTab .lho-card-top h4 { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--s-ink); }
#salesTab .lho-card-top svg { color: var(--s-meta); }
#salesTab .lho-pill { margin-left: auto; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }
#salesTab .lho-pill.is-bad { background: #fef2f2; color: #b91c1c; }
#salesTab .lho-pill.is-warn { background: #fff8eb; color: #b45309; }
#salesTab .lho-pill.is-ok { background: #ecfdf3; color: #15803d; }
#salesTab .lho-pill.is-mute { background: #f1f5f9; color: #64748b; }
body[data-theme="dark"] #salesTab .lho-pill.is-mute { background: rgba(148, 163, 184, .14); color: #cbd5e1; }
#salesTab .lho-card-txt { font-size: 12.5px; line-height: 1.45; color: var(--s-mut, #64748b); }
/* Клиент ещё не вступил в группу по ссылке-приглашению (#5383): не отправлена — янтарём, отправлена — спокойно */
#salesTab .lho-card-inv { display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.45; color: var(--s-mut, #64748b); }
#salesTab .lho-card-inv svg { flex: none; margin-top: 2px; color: var(--s-meta, #94a3b8); }
#salesTab .lho-card-inv.is-todo { color: #b45309; font-weight: 600; }
#salesTab .lho-card-inv.is-todo svg { color: #d97706; }
body[data-theme="dark"] #salesTab .lho-card-inv.is-todo { color: #fcd34d; }
body[data-theme="dark"] #salesTab .lho-card-inv.is-todo svg { color: #fbbf24; }
#salesTab .lho-card-btn {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 13px; border-radius: 8px;
    border: 1px solid var(--s-bd, #d8dee6); background: transparent; color: var(--s-ink); font-weight: 600; font-size: 12.5px; line-height: 1; font-family: inherit; cursor: pointer;
}
#salesTab .lho-card-btn.is-pri { background: #2563eb; border-color: #2563eb; color: #fff; }
#salesTab .lho-card-btn:hover { filter: brightness(1.05); }
body[data-theme="dark"] #salesTab .lho-pill.is-bad { background: rgba(248, 113, 113, .15); color: #fca5a5; }
body[data-theme="dark"] #salesTab .lho-pill.is-warn { background: rgba(251, 191, 36, .14); color: #fcd34d; }
body[data-theme="dark"] #salesTab .lho-pill.is-ok { background: rgba(52, 211, 153, .14); color: #6ee7b7; }
body[data-theme="dark"] #salesTab .lho-card-btn.is-pri { background: #3b82f6; border-color: #3b82f6; }

/* Задача «Сфоткаться с клиентом» в карточке лида */
.lho-tphoto { display: inline-flex; align-items: center; gap: 8px; margin-top: 6px; text-decoration: none; color: inherit; font-size: 11.5px; }
.lho-tphoto img { width: 46px; height: 46px; object-fit: cover; border-radius: 8px; border: 1px solid var(--s-bd, #e2e8f0); }
.lho-tphoto span { color: #15803d; font-weight: 600; }
.lho-tneed { display: inline-flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 11.5px; color: #b45309; font-weight: 600; }
.lho-tnomeet { display: flex; align-items: flex-start; gap: 5px; margin-top: 5px; font-size: 11.5px; line-height: 1.4; color: #475569; }
.lho-tnomeet svg { margin-top: 1px; color: #15803d; }
.lho-tnomeet b { color: #15803d; font-weight: 600; }
body[data-theme="dark"] .lho-tphoto span { color: #6ee7b7; }
body[data-theme="dark"] .lho-tneed { color: #fcd34d; }
body[data-theme="dark"] .lho-tnomeet { color: #cbd5e1; }
body[data-theme="dark"] .lho-tnomeet svg, body[data-theme="dark"] .lho-tnomeet b { color: #6ee7b7; }

/* «Команда»: строка «Не переданы в ЛК» и ожидание передачи на полосе «До премии» */
#salesTab .lho-trow b { color: #b45309; display: inline-flex; align-items: center; gap: 4px; }
body[data-theme="dark"] #salesTab .lho-trow b { color: #fcd34d; }
#salesTab .tmc-plan-bar.has-wait { display: flex; }
#salesTab .tmc-plan-bar.has-wait > i { flex: none; border-radius: 999px 0 0 999px; }
#salesTab .tmc-plan-bar .tmc-plan-wait {
    flex: none; display: block; height: 100%;
    background: repeating-linear-gradient(135deg, rgba(217, 119, 6, .55) 0 4px, rgba(217, 119, 6, .2) 4px 8px);
}
#salesTab .tmc-plan-waitnote { margin-top: 4px; font-size: 11.5px; color: #b45309; }
body[data-theme="dark"] #salesTab .tmc-plan-waitnote { color: #fcd34d; }

/* Телефон */
@media (max-width: 640px) {
    .lho-ov { padding: 0; align-items: stretch; }
    .lho { max-width: none; max-height: none; height: 100%; border-radius: 0; }
    .lho-head { padding: 12px 16px 10px; }
    .lho-steps { padding: 0 16px 10px; gap: 6px; }
    .lho-steps li:not(.is-cur) .lho-step-t { display: none; }
    .lho-step-sep { max-width: 28px; }
    .lho-body { padding: 12px 16px 16px; }
    .lho-grid { grid-template-columns: 1fr; }
    .lho-gap { display: none; }
    .lho-sec { padding: 12px 12px 14px; }
    .lho-foot { flex-wrap: wrap; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); }
    .lho-foot-hint { flex-basis: 100%; }
    .lho-foot .lho-btn { flex: 1; }
    .lho-ai { flex-wrap: wrap; }
    .lho-ai-acts { width: 100%; justify-content: flex-start; }
    .lho-media { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lho-photo-prev { flex-direction: column; align-items: flex-start; }
}

/* Шаг «Группа и сообщения» (lead-handoff-group.js, window.LHG — Сабина #5134, часть 2): группа номером бухгалтерии,
   шаблоны «Чата» ЛК и оферта по очереди. Метка слева у карточек — ровная планка внутри (::before), без border-left. */
.lhg-pts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.lhg-pt {
    display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 4px 11px; border-radius: 999px;
    border: 1px solid var(--lho-bd2); background: var(--lho-bg); font-size: 12.5px; line-height: 1.3; color: var(--lho-ink);
}
.lhg-pt > svg { color: var(--lho-mute); }
.lhg-pt b { font-weight: 650; }
.lhg-pt span { color: var(--lho-mute); }
.lhg-pt.is-ok { border-color: var(--lho-green-bd); background: var(--lho-green-bg); }
.lhg-pt.is-ok > svg { color: var(--lho-green); }
.lhg-pt.is-warn { border-color: var(--lho-amber); background: var(--lho-amber-bg); }
.lhg-pt.is-warn > svg { color: var(--lho-amber); }
.lhg-pt.is-bad { border-color: var(--lho-red); background: var(--lho-red-bg2); }
.lhg-pt.is-bad > svg { color: var(--lho-red); }
.lhg-who { display: flex; align-items: center; gap: 8px 10px; flex-wrap: wrap; font-size: 12.5px; color: var(--lho-mute); }
.lhg-add2 { margin-top: 2px; align-self: flex-start; }
.lhg-wait { align-items: center; }
.lhg-wait .lho-spin { width: 20px; height: 20px; color: var(--lho-acc); }
.lhg-inv > div { flex: 1; min-width: 0; }
.lhg-inv-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.lhg-inv-row code {
    flex: 1 1 220px; min-width: 0; padding: 8px 10px; border-radius: 8px; background: var(--lho-bg); border: 1px solid var(--lho-bd2);
    font-family: 'JetBrains Mono', ui-monospace, Menlo, monospace; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lho-note .lho-btn { margin-top: 8px; }
.lhg-inv-row .lho-btn { margin-top: 0; }
/* Ссылка-приглашение отправлена клиенту / не ушла (Ханзада 30.11.2026, #5383) */
.lhg-inv-sent { display: flex; align-items: center; gap: 6px; margin-top: 5px; font-size: 13px; font-weight: 650; color: var(--lho-green); }
.lhg-inv-sent span { color: var(--lho-ink); }
.lhg-inv-err {
    display: flex; align-items: flex-start; gap: 6px; margin-top: 8px; padding: 8px 10px; border-radius: 8px; font-size: 12.5px; line-height: 1.4;
    background: var(--lho-red-bg); color: var(--lho-red);
}
.lhg-inv-err svg { margin-top: 1px; flex: none; }
.lhg-inv-err span { color: var(--lho-ink); }
.lho-sum span .lho-link { font-size: 12px; margin-left: 4px; vertical-align: baseline; }

/* Выбор готовой группы и поиск */
.lhg-pick { display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--lho-bd); border-radius: 12px; background: var(--lho-soft); }
.lhg-search { position: relative; display: flex; align-items: center; }
.lhg-search > svg { position: absolute; left: 11px; color: var(--lho-mute); pointer-events: none; }
.lhg-search .lho-in { padding-left: 34px; height: 36px; }
.lhg-glist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.lhg-glist button {
    width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 12px; text-align: left; border: 1px solid var(--lho-bd2);
    border-radius: 10px; background: var(--lho-bg); color: var(--lho-ink); font-family: inherit; cursor: pointer;
}
.lhg-glist button:hover:not(:disabled) { border-color: var(--lho-acc); }
.lhg-glist button:disabled { opacity: .55; cursor: default; }
.lhg-glist button > svg:first-child { color: #22a35a; }
.lhg-glist button > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lhg-glist b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lhg-glist span { font-size: 11.5px; color: var(--lho-mute); }

/* Пункты очереди: шаблон / оферта */
.lhg-items, .lhg-run { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lhg-item {
    --bar: var(--lho-acc); position: relative; display: flex; flex-direction: column; gap: 8px; padding: 11px 12px 12px 17px;
    border: 1px solid var(--lho-bd2); border-radius: 12px; background: var(--lho-bg);
}
.lhg-item::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3.5px; border-radius: 0 4px 4px 0; background: var(--bar); pointer-events: none; }
.lhg-item.is-ai { --bar: var(--lho-red); border-color: var(--lho-red); background: var(--lho-red-bg2); }
.lhg-item.is-bad { --bar: var(--lho-amber); }
.lhg-item-top { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: wrap; }
.lhg-n {
    flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
    background: var(--lho-acc-soft); color: var(--lho-acc); font-size: 11.5px; font-weight: 700;
}
.lhg-ttl { font-size: 13.5px; font-weight: 650; }
.lhg-tsel {
    display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 11px; border-radius: 8px; max-width: 100%;
    border: 1px solid var(--lho-bd2); background: var(--lho-input); color: var(--lho-ink); font-weight: 650; font-size: 13px; line-height: 1;
    font-family: inherit; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lhg-tsel:hover { border-color: var(--lho-acc); }
.lhg-tsel span { overflow: hidden; text-overflow: ellipsis; }
.lhg-tsel svg { color: var(--lho-mute); transform: rotate(90deg); }
.lhg-sp { flex: 1; }
.lhg-ib {
    flex: none; width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; background: transparent; color: var(--lho-mute);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.lhg-ib:hover:not(:disabled) { border-color: var(--lho-bd2); color: var(--lho-ink); background: var(--lho-soft); }
.lhg-ib:disabled { opacity: .35; cursor: default; }
.lhg-text { min-height: 52px; }
.lhg-item.is-ai .lhg-text { border-color: var(--lho-red); }
.lhg-files { display: flex; flex-wrap: wrap; gap: 6px; }
.lhg-file {
    display: inline-flex; align-items: center; gap: 6px; max-width: 100%; height: 30px; padding: 0 11px; border-radius: 8px;
    background: var(--lho-soft); border: 1px solid var(--lho-bd); color: var(--lho-ink); font-size: 12.5px; text-decoration: none;
}
.lhg-file span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lhg-file svg { color: var(--lho-acc); }
.lhg-file:hover { border-color: var(--lho-acc); }
.lhg-item .lho-f-src { color: var(--lho-mute); }
.lhg-item.is-ai .lho-f-src { color: var(--lho-red); }
.lhg-ok-row { display: flex; }
.lhg-okbtn { display: inline-flex; height: 34px; }
.lhg-addrow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lhg-addrow .lho-link { text-decoration: none; }

/* Рисованное меню шаблонов: радиус 12, тень, выбранный — с галочкой, поиск от 8 шаблонов */
.lhg-menu {
    display: flex; flex-direction: column; gap: 4px; padding: 8px; border-radius: 12px; border: 1px solid var(--lho-bd);
    background: var(--lho-bg); box-shadow: 0 12px 32px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .08); max-height: 320px; overflow-y: auto;
}
.lhg-menu ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.lhg-mh { padding: 6px 8px 2px; font-size: 11px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--lho-mute); }
.lhg-menu button {
    width: 100%; display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: none; border-radius: 8px; background: transparent;
    text-align: left; color: var(--lho-ink); font-family: inherit; cursor: pointer;
}
.lhg-menu button:hover { background: var(--lho-soft); }
.lhg-menu button.on { background: var(--lho-acc-soft); }
.lhg-menu button.on > svg { color: var(--lho-acc); }
.lhg-mt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.lhg-mt b { font-size: 13px; font-weight: 600; }
.lhg-mt i { font-style: normal; font-size: 11.5px; color: var(--lho-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lhg-menu em { flex: none; display: inline-flex; align-items: center; gap: 2px; font-style: normal; font-size: 11px; color: var(--lho-mute); }

/* Отправка и ход очереди */
.lhg-send { display: flex; align-items: center; gap: 12px; padding-top: 4px; border-top: 1px dashed var(--lho-bd2); padding-top: 12px; }
.lhg-send-t { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 7px; font-size: 12.5px; line-height: 1.4; color: var(--lho-mute); }
.lhg-send-t svg, .lhg-send-t .lho-spin { margin-top: 1px; flex: none; }
.lhg-ritem {
    --bar: var(--lho-bd2); position: relative; display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px 10px 17px;
    border: 1px solid var(--lho-bd); border-radius: 11px; background: var(--lho-bg);
}
.lhg-ritem::before { content: ''; position: absolute; left: 0; top: 11px; bottom: 11px; width: 3.5px; border-radius: 0 4px 4px 0; background: var(--bar); pointer-events: none; }
.lhg-ritem.is-sent { --bar: var(--lho-green); }
.lhg-ritem.is-sending { --bar: var(--lho-acc); }
.lhg-ritem.is-error, .lhg-ritem.is-unconfirmed { --bar: var(--lho-amber); background: var(--lho-amber-bg); }
.lhg-ritem > div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.lhg-ritem b { font-size: 13px; font-weight: 650; }
.lhg-ri { flex: none; display: inline-flex; margin-top: 1px; color: var(--lho-mute); }
.lhg-ritem.is-sent .lhg-ri { color: var(--lho-green); }
.lhg-ritem.is-sending .lhg-ri { color: var(--lho-acc); }
.lhg-ritem.is-error .lhg-ri, .lhg-ritem.is-unconfirmed .lhg-ri { color: var(--lho-amber); }
.lhg-parts { display: flex; flex-wrap: wrap; gap: 6px; }
.lhg-part {
    display: inline-flex; align-items: center; gap: 5px; max-width: 100%; padding: 3px 9px; border-radius: 999px; font-size: 11.5px;
    background: var(--lho-soft); color: var(--lho-mute); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.lhg-part.is-sent { background: var(--lho-green-bg); color: var(--lho-green); }
.lhg-part.is-error, .lhg-part.is-unconfirmed { background: var(--lho-amber-bg); color: var(--lho-amber-ink); }
.lhg-part.is-sending { background: var(--lho-acc-soft); color: var(--lho-acc); }

@media (max-width: 640px) {
    .lhg-send { flex-direction: column; align-items: stretch; }
    .lhg-send .lho-btn { width: 100%; }
    .lhg-item { padding-left: 14px; }
    .lhg-tsel { max-width: calc(100% - 140px); }
    .lhg-addrow .lho-btn { flex: 1; }
    .lhg-inv-row code { flex-basis: 100%; }
    .lhg-inv-row .lho-btn { flex: 1 1 auto; }
}
