:root {
  color: #1c2a23;
  background: #f7f8f6;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
button, input { font: inherit; }
button { cursor: pointer; }
.app-layout { min-height: 100vh; display: flex; }

/* Сайдбар не уезжает при скролле страницы: sticky + высота во весь экран.
   Меню внутри скроллится само, чтобы длинный список пунктов не ломал вёрстку
   и не отрезал блок пользователя снизу. */
.sidebar { position: sticky; top: 0; z-index: 30; display: flex; flex-direction: column; width: 228px; flex: 0 0 228px; height: 100vh; padding: 22px 15px; color: #d7e4da; background: #173527; transition: width .18s ease, flex-basis .18s ease; }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 4px 0 12px; margin-bottom: 28px; }
.brand { display: block; color: #f4faf5; font-size: 21px; font-weight: 750; letter-spacing: -.05em; text-decoration: none; white-space: nowrap; }
.brand-short { display: none; }
.sidebar-collapse { width: 26px; height: 26px; flex: 0 0 26px; padding: 0; border: 0; border-radius: 7px; color: #8fae99; background: transparent; font-size: 16px; line-height: 1; }
.sidebar-collapse:hover { color: #eef7f0; background: rgba(255,255,255,.09); }

.sidebar-nav { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 5px; }
.sidebar-nav::-webkit-scrollbar { width: 6px; }
.sidebar-nav::-webkit-scrollbar-thumb { border-radius: 3px; background: rgba(255,255,255,.14); }
.tab { width: 100%; padding: 11px 12px; border: 0; border-radius: 8px; display: flex; align-items: center; gap: 10px; color: #a9c0af; background: transparent; font-size: 13px; text-align: left; white-space: nowrap; }
/* Эти элементы раньше были <button>, а после перехода на отдельные страницы
   стали ссылками — браузер тут же подчеркнул их по умолчанию. */
.tab, .back-link, .history-open, .cold-history-row, a.button { text-decoration: none; }
/* <button> центрирует содержимое сам (так браузер рендерит этот тег), а
   <a class="button"> — обычный блочный элемент, текст в нём липнет к
   верхнему краю. Единственная кнопка-ссылка в проекте — «+ Шаблон». */
a.button { display: flex; align-items: center; justify-content: center; }
.tab:hover { color: #eef7f0; background: rgba(255,255,255,.07); }
.tab.is-active { color: #f0f8f2; background: #2c5940; font-weight: 650; }
.nav-icon { width: 17px; flex: 0 0 17px; color: #92c9a1; font-size: 17px; text-align: center; }

/* Свёрнутое состояние: остаются только иконки. */
.sidebar.is-collapsed { width: 66px; flex-basis: 66px; padding-left: 10px; padding-right: 10px; }
.sidebar.is-collapsed .sidebar-head { justify-content: center; padding: 0; }
.sidebar.is-collapsed .brand-full { display: none; }
.sidebar.is-collapsed .brand-short { display: block; }
.sidebar.is-collapsed .sidebar-collapse { position: absolute; top: 62px; right: 10px; transform: rotate(180deg); }
.sidebar.is-collapsed .nav-label { display: none; }
.sidebar.is-collapsed .tab { justify-content: center; padding: 11px 0; }
.sidebar.is-collapsed .user-login { display: none; }
.sidebar.is-collapsed .user-bar button { justify-content: center; padding: 9px 0; }
.container { min-width: 0; flex: 1 1 auto; width: auto; margin: 0; padding: 52px clamp(32px, 5vw, 72px) 80px; }
.view { display: none; }.view.is-visible { display: block; }
.heading { margin-bottom: 30px; }.heading h1 { margin: 0; color: #1c2a23; font-size: clamp(28px, 4vw, 38px); letter-spacing: -.055em; line-height: 1.1; }.heading p { margin: 9px 0 0; color: #7f8c84; font-size: 14px; }
.transcription-tabs { display: flex; gap: 22px; margin: -8px 0 20px; border-bottom: 1px solid #e1e7e2; }.transcription-tab { position: relative; padding: 0 1px 11px; border: 0; color: #8a978f; background: transparent; font-size: 13px; font-weight: 600; }.transcription-tab:hover { color: #426951; }.transcription-tab.is-active { color: #1d5135; }.transcription-tab.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: #347a4e; }.transcription-panel { display: none; }.transcription-panel.is-visible { display: block; }
.result-tabs { display: flex; gap: 22px; margin: 4px 0 18px; border-bottom: 1px solid #e1e7e2; }.result-tab { position: relative; padding: 0 1px 11px; border: 0; color: #8a978f; background: transparent; font-size: 13px; font-weight: 600; }.result-tab:not(:disabled):hover { color: #426951; }.result-tab.is-active { color: #1d5135; }.result-tab:disabled { color: #c3cac5; cursor: not-allowed; }.result-tab.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: #347a4e; }.result-panel { display: none; }.result-panel.is-visible { display: block; }
#lpr-report-controls { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }#lpr-report-controls .field-label { margin: 0; }#lpr-template-select { flex: 1; min-width: 0; height: 43px; }#lpr-report-controls .button { width: auto; flex: 0 0 auto; margin-top: 0; white-space: nowrap; }#lpr-report-body { line-height: 1.55; }
.lpr-report-toolbar { display: flex; align-items: center; gap: 4px; margin-bottom: 12px; padding: 6px; border: 1px solid #e3ebe5; border-radius: 9px; background: #fafcfa; }.lpr-report-toolbar button[data-md-cmd], .lpr-report-toolbar button[data-md-block] { min-width: 30px; height: 28px; padding: 0 7px; border: 0; border-radius: 6px; color: #46614f; background: transparent; font-size: 12px; font-weight: 650; cursor: pointer; }.lpr-report-toolbar button[data-md-cmd]:hover, .lpr-report-toolbar button[data-md-block]:hover { color: #1e6138; background: #e7f3e9; }.lpr-toolbar-sep { width: 1px; height: 18px; margin: 0 3px; background: #e0e7e2; }.lpr-toolbar-spacer { flex: 1; }.lpr-toolbar-hint { color: #8d9991; font-size: 11px; }
/* Окно отчёта редактируется прямо на месте — рамка появляется только в фокусе,
   чтобы в режиме чтения это оставалось просто текстом. */
#lpr-report-body.is-editable { padding: 12px 14px; border: 1px solid transparent; border-radius: 9px; }#lpr-report-body.is-editable:hover { border-color: #e3ebe5; }#lpr-report-body.is-editable:focus { outline: none; border-color: #7fb08d; box-shadow: 0 0 0 2px rgba(57,126,82,.12); }#lpr-report-body h1, #lpr-report-body h2, #lpr-report-body h3, #lpr-report-body h4 { margin: 18px 0 8px; color: #26362d; line-height: 1.3; }#lpr-report-body h1 { font-size: 19px; }#lpr-report-body h2 { font-size: 17px; }#lpr-report-body h3 { font-size: 15px; }#lpr-report-body h4 { font-size: 13.5px; }#lpr-report-body p { margin: 0 0 10px; }#lpr-report-body ul, #lpr-report-body ol { margin: 0 0 10px; padding-left: 22px; }#lpr-report-body li { margin-bottom: 4px; }#lpr-report-body > *:first-child { margin-top: 0; }
.lpr-report-download { position: relative; }.lpr-report-download-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 5; min-width: 150px; padding: 6px; border: 1px solid #e0e7e2; border-radius: 10px; background: white; box-shadow: 0 8px 24px rgba(22,45,32,.1); display: flex; flex-direction: column; gap: 2px; }.lpr-report-download-menu a { padding: 8px 10px; border-radius: 6px; color: #26362d; font-size: 13px; text-decoration: none; }.lpr-report-download-menu a:hover { background: #f0f9f2; color: #1e6138; }
.card, .job-card { border: 1px solid #e0e7e2; border-radius: 14px; background: white; box-shadow: 0 8px 24px rgba(22, 45, 32, .035); }
.upload-card { padding: 22px; }.drop-zone { min-height: 214px; padding: 28px; border: 1.5px dashed #a9c5b1; border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: #697a70; background: #f8fcf8; transition: background .2s, border-color .2s; cursor: pointer; }.drop-zone:hover, .drop-zone.is-dragover { border-color: #4e9b69; background: #f0f9f2; }.drop-zone.is-disabled { border-color: #dfe5e1; background: #f4f6f5; cursor: not-allowed; pointer-events: none; }.drop-zone.is-disabled strong { color: #9aa5a0; }.drop-zone.is-disabled span { color: #b2bab6; }.drop-zone strong { color: #347a4e; font-size: 14px; }.drop-zone span { margin-top: 8px; color: #98a39d; font-size: 12px; }
.file-row { margin-top: 14px; padding: 12px 13px; border: 1px solid #e3ebe5; border-radius: 9px; display: flex; align-items: center; gap: 11px; }.file-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; color: #397e52; background: #e7f3e9; font-size: 11px; }.file-row div { min-width: 0; flex: 1; }.file-row strong, .file-row span { display: block; }.file-row strong { overflow: hidden; color: #405147; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.file-row div span { margin-top: 3px; color: #98a39d; font-size: 11px; }.text-button { border: 0; padding: 0; color: #397e52; background: transparent; font-size: 12px; font-weight: 650; text-decoration: none; }.text-button:hover { color: #1e6138; text-decoration: underline; text-underline-offset: 3px; }
.button { width: 100%; min-height: 43px; margin-top: 14px; border: 0; border-radius: 9px; color: #f5fbf6; background: #1c4a31; font-size: 13px; font-weight: 650; }.button:hover:not(:disabled) { background: #27623f; }.button:disabled { color: #9daaa2; background: #e3e8e4; cursor: not-allowed; }
.job-card { margin-top: 18px; padding: 17px 19px; }.job-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; }.job-heading strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.job-status { padding: 4px 7px; border-radius: 5px; color: #557261; background: #edf5ef; font-size: 11px; white-space: nowrap; }.job-status.running { color: #826426; background: #faf2db; }.job-status.running::before { content: ""; width: 8px; height: 8px; margin: 0 5px -1px 0; display: inline-block; border: 1.5px solid #c9a856; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }.job-status.failed { color: #a44f4b; background: #fdecec; }.job-card p { margin: 8px 0 0; color: #839087; font-size: 12px; line-height: 1.5; }.job-progress { position: relative; height: 5px; margin-top: 13px; overflow: hidden; border-radius: 999px; background: #e7ece8; }.job-progress span { position: relative; z-index: 1; display: block; width: 0; height: 100%; border-radius: inherit; background: #4d9866; transition: width .35s ease; }.job-progress.is-pending::after { content: ""; position: absolute; z-index: 2; top: 0; bottom: 0; width: 28%; border-radius: inherit; background: linear-gradient(90deg, transparent, rgba(255,255,255,.86), transparent); animation: pending-sweep 1.45s ease-in-out infinite; }.stage-progress { margin-top: 12px; }.stage-progress-meta { display: flex; justify-content: space-between; gap: 12px; color: #839087; font-size: 11px; }.stage-progress-meta span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.stage-progress-meta span:last-child { color: #587064; font-variant-numeric: tabular-nums; white-space: nowrap; }.stage-progress-track { height: 4px; margin-top: 6px; overflow: hidden; border-radius: 999px; background: #e8eeea; }.stage-progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: #b99135; transition: width .35s ease; }@keyframes spin { to { transform: rotate(360deg); } }@keyframes pending-sweep { from { left: -30%; } to { left: 105%; } }
.transcript { margin-top: 18px; padding: 25px; }.transcript-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 19px; border-bottom: 1px solid #edf0ee; }.transcript h2 { margin: 0; color: #26362d; font-size: 18px; letter-spacing: -.035em; }.transcript-header p { margin: 6px 0 0; color: #8d9991; font-size: 11px; }.template-export-links { display: flex; gap: 12px; flex-shrink: 0; }#template-editor-drop-zone { margin-top: 14px; }.notice { margin: 16px 0 0; padding: 10px 12px; border-radius: 8px; color: #896c2e; background: #fbf4df; font-size: 12px; line-height: 1.45; }
.segment { display: grid; grid-template-columns: 73px 100px 1fr; gap: 12px; padding: 15px 0; border-bottom: 1px solid #edf0ee; }.segment:last-child { border-bottom: 0; }.timestamp { padding-top: 3px; color: #92a097; font-variant-numeric: tabular-nums; font-size: 11px; }.speaker { width: fit-content; height: fit-content; padding: 4px 6px; border-radius: 5px; color: #527e60; background: #e9f4eb; font-size: 10px; font-weight: 650; }.speaker-button { border: 0; cursor: pointer; }.speaker-button:hover { color: #28613c; background: #dceee0; }.speaker-button:focus-visible { outline: 2px solid #8bb99a; outline-offset: 2px; }.speaker-input { width: 100px; height: 25px; padding: 3px 6px; border: 1px solid #7fb08d; border-radius: 5px; color: #365242; background: white; font-size: 11px; outline: none; }.speaker-input:focus { border-color: #397e52; box-shadow: 0 0 0 2px rgba(57,126,82,.12); }.segment p { margin: 0; color: #56655c; font-size: 13px; line-height: 1.55; }
.validation { margin-top: 24px; padding-top: 22px; border-top: 1px solid #edf0ee; }.validation h3 { margin: 0; color: #26362d; font-size: 14px; letter-spacing: -.02em; }.validation-hint { margin: 6px 0 16px; color: #8d9991; font-size: 11px; line-height: 1.5; }
.validation-item { display: grid; grid-template-columns: 73px 100px 1fr; gap: 12px; padding: 13px 12px; border-radius: 8px; background: #fffaf0; }.validation-item + .validation-item { margin-top: 8px; }.validation-item .timestamp { padding-top: 1px; }.validation-item .quote { margin: 0; color: #4a3f24; font-size: 13px; font-style: italic; line-height: 1.5; }.validation-item .concern { margin: 4px 0 0; color: #896c2e; font-size: 11px; line-height: 1.4; }
.validation-item.is-skipped { background: #fdecec; }.validation-item.is-skipped .quote { color: #7a3937; }.validation-item.is-skipped .concern { color: #a44f4b; }
.validation-item .corrected { color: #1e6138; font-style: normal; font-weight: 650; }
.applied-badge { display: inline-block; margin-top: 6px; padding: 3px 9px; border: 0; border-radius: 999px; font: inherit; font-size: 10px; font-weight: 650; cursor: pointer; }.applied-badge.is-applied { color: #1e6138; background: #e1f1e5; }.applied-badge.is-applied:hover { background: #cfe8d5; }.applied-badge.is-missed { color: #896c2e; background: #f6ecd4; }.applied-badge.is-missed:hover { background: #efe0b8; }
.validation-clean { padding: 4px 0; color: #557261; font-size: 13px; }
.validation-error { padding: 11px 13px; border-radius: 8px; color: #a44f4b; background: #fdecec; font-size: 12px; line-height: 1.5; }
.report-list { overflow: hidden; }.report-row { padding: 17px 19px; border-bottom: 1px solid #e9eeeb; display: flex; align-items: center; gap: 16px; }.report-row:last-child { border-bottom: 0; }.report-row div { min-width: 0; flex: 1; }.report-row strong, .report-row span { display: block; }.report-row strong { overflow: hidden; color: #405147; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.report-row span { margin-top: 4px; color: #99a49e; font-size: 11px; }.empty { padding: 35px 20px; color: #8d9991; font-size: 13px; text-align: center; }
.history-list { overflow: hidden; }.history-row { margin: 0; padding: 0 10px 0 0; border-bottom: 1px solid #e9eeeb; display: flex; align-items: center; gap: 2px; background: white; }.history-row:last-child { border-bottom: 0; }.history-row:hover { background: #fafcf9; }.history-open { min-width: 0; flex: 1; padding: 15px 8px 15px 18px; border: 0; display: flex; align-items: center; gap: 14px; color: inherit; background: transparent; text-align: left; }.history-open div { min-width: 0; flex: 1; }.history-open strong, .history-open span { display: block; }.history-open strong { overflow: hidden; color: #405147; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }.history-open div span { margin-top: 4px; color: #99a49e; font-size: 11px; }.history-state { flex: 0 0 auto; padding: 4px 7px; border-radius: 5px; color: #557261; background: #edf5ef; font-size: 11px; }.history-state.running { color: #826426; background: #faf2db; }.history-state.queued { color: #667075; background: #edf0f1; }.history-state.failed { color: #a44f4b; background: #fdecec; }.history-delete { width: 32px; height: 32px; flex: 0 0 32px; padding: 7px; border: 0; border-radius: 7px; color: #bc4a47; background: transparent; }.history-delete:hover { color: #a13b38; background: #fdecea; }.history-delete svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.toast { position: fixed; right: 20px; bottom: 20px; max-width: min(360px, calc(100vw - 40px)); padding: 11px 13px; border: 1px solid #dae8dd; border-radius: 8px; color: #476951; background: #f0f8f1; box-shadow: 0 8px 24px rgba(22,45,32,.12); font-size: 12px; opacity: 0; pointer-events: none; transform: translateY(6px); transition: .2s; }.toast.is-visible { opacity: 1; transform: translateY(0); }

.field-label { display: block; margin: 14px 0 6px; color: #557261; font-size: 12px; font-weight: 650; }
.field-divider { margin: 12px 0; color: #99a49e; font-size: 11px; text-align: center; text-transform: uppercase; letter-spacing: .04em; }
select, textarea,
input[type="text"], input[type="email"], input[type="password"], input[type="url"] {
  width: 100%; padding: 10px 12px; border: 1px solid #dbe4dd; border-radius: 8px;
  color: #26362d; background: white; font: inherit; font-size: 13px;
}
select:focus, textarea:focus,
input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus, input[type="url"]:focus {
  outline: none; border-color: #7fb08d; box-shadow: 0 0 0 2px rgba(57,126,82,.12);
}
textarea { resize: vertical; }
select:disabled { color: #8a978f; background: #f2f5f3; cursor: not-allowed; }
/* Кандидат/вакансия в форме загрузки — короткие поля: растянутые во всю
   ширину карточки они выглядели как поля ввода текста, хотя это выбор из
   короткого списка. */
.upload-select { max-width: 440px; }
#vacancy-form .button { width: auto; padding: 0 20px; }

.candidate-report { margin-top: 24px; padding-top: 22px; border-top: 1px solid #edf0ee; }
.candidate-report h3 { margin: 0 0 14px; color: #26362d; font-size: 14px; letter-spacing: -.02em; }
.report-candidate-name { margin: 0 0 14px; color: #1c4a31; font-size: 14px; }
.report-section + .report-section { margin-top: 18px; }
.report-section h4 { margin: 0 0 8px; color: #557261; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.report-section p { margin: 0; color: #435049; font-size: 13px; line-height: 1.55; white-space: pre-line; }
.report-item { padding: 11px 13px; border-radius: 8px; background: #f7faf7; }
.report-item + .report-item { margin-top: 8px; }
.report-item-title { margin: 0 0 4px; color: #26362d; font-size: 13px; font-weight: 650; }
.report-item-detail { margin: 4px 0 0; color: #7f8c84; font-size: 11px; line-height: 1.5; }
.report-item-quote { margin: 4px 0 0; color: #557261; font-size: 12px; font-style: italic; }
.report-bullets { margin: 0; padding-left: 18px; color: #435049; font-size: 13px; line-height: 1.6; }

.vacancies-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.vacancies-heading .button { flex: 0 0 auto; width: auto; margin-top: 0; padding: 0 18px; }
.vacancy-card-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 18px; }
.vacancy-card-actions .button { width: auto; margin-top: 0; padding: 0 18px; }

.vacancy-link-field { display: flex; gap: 8px; }
.vacancy-link-field input:first-child { flex: 0 0 38%; }
.vacancy-link-field input:last-child { flex: 1; min-width: 0; }

.vacancies-panel { display: none; }
.vacancies-panel.is-visible { display: block; }

.vacancy-table-card { margin-top: 14px; overflow: visible; }
.table-scroll { overflow-x: auto; }
.vacancy-table { width: 100%; border-collapse: collapse; }
.vacancy-table thead th { padding: 12px 16px; border-bottom: 1px solid #e4eae6; color: #557261; font-size: 11px; font-weight: 650; text-align: left; text-transform: uppercase; letter-spacing: .03em; white-space: nowrap; }
.vacancy-table th.col-name { width: 25%; }
.vacancy-table th.col-count { width: 120px; }
.vacancy-table th.col-actions { width: 160px; }
.vacancy-table tbody tr { border-bottom: 1px solid #eef2ef; }
.vacancy-table tbody tr:last-child { border-bottom: 0; }
.vacancy-table td { padding: 12px 16px; vertical-align: top; }
.vacancy-table td.col-name strong { display: block; color: #26362d; font-size: 13px; }
.vacancy-table td.col-link { color: #99a49e; font-size: 12px; white-space: nowrap; }
.vacancy-table td.col-link a { color: #397e52; font-weight: 650; text-decoration: none; }
.vacancy-table td.col-link a:hover { color: #1e6138; text-decoration: underline; }
.vacancy-table tbody tr.is-clickable { cursor: pointer; }
.vacancy-table tbody tr.is-clickable:hover { background: #fafcf9; }
.vacancy-table td.col-actions { text-align: right; white-space: nowrap; }
.vacancy-table td.col-actions .text-button + .text-button { margin-left: 14px; }

.modal-overlay { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(23, 53, 39, .32); }
/* Профиль должности — длинный текст, ему узкая модалка тесна. */
.modal.is-wide { max-width: 860px; }
.modal { width: 100%; max-width: 560px; max-height: calc(100vh - 40px); overflow-y: auto; padding: 22px 24px; border-radius: 14px; background: white; box-shadow: 0 20px 48px rgba(22, 45, 32, .22); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.modal-head h2 { margin: 0; color: #1c2a23; font-size: 18px; letter-spacing: -.02em; }
.modal-close { flex: 0 0 auto; width: 28px; height: 28px; padding: 0; border: 0; border-radius: 8px; color: #7f8c84; background: transparent; font-size: 18px; line-height: 1; }
.modal-close:hover { color: #26362d; background: #eef2ef; }

.candidates-panel { display: none; }
.candidates-panel.is-visible { display: block; }
.reports-panel { display: none; }
.reports-panel.is-visible { display: block; }
.templates-panel { display: none; }
.templates-panel.is-visible { display: block; }

.candidate-toolbar { padding: 14px 16px; }
.filter-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.filter-row input[type="text"] { flex: 1 1 220px; width: auto; }
.filter-row .button { flex: 0 0 auto; width: auto; margin-top: 0; padding: 0 16px; min-height: 39px; }
.candidate-view-toggle { flex: 0 0 auto; display: inline-flex; padding: 3px; border: 1px solid #dbe4dd; border-radius: 9px; background: #f7faf8; }
.candidate-view-button { min-height: 31px; padding: 0 11px; border: 0; border-radius: 6px; color: #6f7d75; background: transparent; font: inherit; font-size: 12px; font-weight: 650; }
.candidate-view-button:hover { color: #365242; }
.candidate-view-button.is-active { color: #1c4a31; background: white; box-shadow: 0 1px 3px rgba(22, 45, 32, .12); }

.candidate-new { margin-top: 14px; padding: 20px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.form-grid .field-label { margin-top: 0; }
.form-actions { display: flex; align-items: center; gap: 16px; margin-top: 18px; }
.form-actions .button { width: auto; margin-top: 0; padding: 0 22px; }

/* --- Таблица-превью --- */
.candidate-table-card { margin-top: 14px; overflow: visible; }
.candidate-table { width: 100%; border-collapse: collapse; }
.candidate-table thead th { position: relative; padding: 12px 16px; border-bottom: 1px solid #e4eae6; color: #557261; font-size: 11px; font-weight: 650; text-align: left; text-transform: uppercase; letter-spacing: .03em; }
.candidate-table th.col-name { width: 55%; }
.candidate-table th.col-filter { width: 22.5%; padding: 6px 10px; }
.filter-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border: 0; border-radius: 7px; color: #557261; background: transparent; font: inherit; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.filter-toggle:hover { color: #26362d; background: #eef4f0; }
.filter-toggle.is-filtered { color: #1e6138; background: #e1f1e5; }
.filter-caret { font-size: 9px; }
/* Значок воронки — виден, только когда часть значений скрыта фильтром. */
.filter-icon { display: none; width: 11px; height: 11px; }
.filter-toggle.is-filtered .filter-icon { display: inline-flex; }
.filter-icon svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.filter-panel { position: absolute; z-index: 20; top: calc(100% - 4px); left: 8px; min-width: 210px; padding: 10px; border: 1px solid #dbe4dd; border-radius: 10px; background: white; box-shadow: 0 12px 28px rgba(22,45,32,.14); }
.filter-panel-actions { display: flex; gap: 14px; padding-bottom: 9px; margin-bottom: 8px; border-bottom: 1px solid #eef2ef; }
.filter-panel-options { display: flex; flex-direction: column; gap: 2px; max-height: 260px; overflow-y: auto; }
.filter-option { display: flex; align-items: center; gap: 8px; padding: 5px 6px; border-radius: 6px; color: #435049; font-size: 12px; font-weight: 400; text-transform: none; letter-spacing: 0; }
.filter-option:hover { background: #f5f9f6; }
.filter-option input { width: auto; margin: 0; }

.candidate-table tbody tr { border-bottom: 1px solid #eef2ef; cursor: pointer; }
.candidate-table tbody tr:last-child { border-bottom: 0; }
.candidate-table tbody tr:hover { background: #fafcf9; }
.candidate-table td { padding: 12px 16px; vertical-align: middle; }
.candidate-table td.col-name strong { display: block; color: #26362d; font-size: 13px; }
.candidate-table td.col-name span { display: block; margin-top: 3px; color: #99a49e; font-size: 11px; }
.candidate-row.is-rejected td.col-name strong { color: #97a29a; text-decoration: line-through; text-decoration-color: #ccd5cf; }

.pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.pill-status { color: #1e6138; background: #e4f2e8; }
.pill-status.is-rejected { color: #a44f4b; background: #fbeceb; }
.pill-stage { color: #6a5a2a; background: #f6f0dc; }

/* Канбан воронки: десять этапов идут двумя ровными рядами по пять колонок.
   Доска остаётся широкой и на небольших экранах скроллится внутри карточки,
   а не сжимает колонки до нечитаемого состояния. */
.candidate-kanban { margin-top: 14px; padding: 16px; overflow-x: auto; }
.candidate-kanban-board { min-width: 850px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kanban-stage { min-width: 0; display: flex; flex-direction: column; min-height: 190px; border: 1px solid #e3ebe5; border-radius: 11px; background: #f8faf8; }
.kanban-stage-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 11px 10px; border-bottom: 1px solid #e8eeea; }
.kanban-stage-title { overflow: hidden; color: #496255; font-size: 11px; font-weight: 700; letter-spacing: .02em; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
.kanban-stage-count { flex: 0 0 auto; min-width: 20px; padding: 2px 6px; border-radius: 999px; color: #62816d; background: #e5f0e7; font-size: 10px; font-weight: 700; text-align: center; }
/* Высота фиксирована на 4 карточки — не только потолок для длинных этапов,
   но и пол для коротких: flex:1 раньше давал этапу ужаться, если карточек
   мало, потому что тянуться было некуда (высота .kanban-stage не задана).
   Явный height, а не flex-grow, держит размер одинаковым всегда. */
.kanban-stage-body { flex: 0 0 auto; height: 260px; overflow-y: auto; padding: 8px; transition: background .12s ease, outline-color .12s ease; }
.kanban-stage-body.is-dragover { border-radius: 0 0 10px 10px; outline: 2px dashed #78a989; outline-offset: -5px; background: #eef7f0; }
.candidate-kanban-chip { width: 100%; padding: 10px 11px; border: 1px solid #dce7df; border-radius: 8px; color: #26362d; background: white; box-shadow: 0 2px 5px rgba(22, 45, 32, .05); font: inherit; text-align: left; cursor: grab; transition: border-color .12s ease, box-shadow .12s ease, transform .12s ease; }
.candidate-kanban-chip + .candidate-kanban-chip { margin-top: 7px; }
.candidate-kanban-chip:hover { border-color: #aac6b1; box-shadow: 0 4px 10px rgba(22, 45, 32, .08); transform: translateY(-1px); }
.candidate-kanban-chip:active { cursor: grabbing; }
.candidate-kanban-chip.is-dragging { opacity: .45; }
.candidate-kanban-chip strong, .candidate-kanban-chip time { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.candidate-kanban-chip strong { color: #304338; font-size: 12px; font-weight: 650; }
.candidate-kanban-chip time { margin-top: 5px; color: #99a49e; font-size: 10px; }

/* --- Карточка кандидата --- */
.back-link { padding: 0; margin-bottom: 18px; border: 0; color: #397e52; background: transparent; font: inherit; font-size: 12px; font-weight: 650; }
.back-link:hover { color: #1e6138; }

/* Шапка — только про то, кто перед нами. Позиция, этап и статус относятся
   к процессу и переехали в «Профиль». */
.cand-header { padding: 20px 24px; margin-bottom: 18px; }
.cand-identity { display: flex; align-items: center; gap: 16px; }
.cand-avatar { width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center; border-radius: 50%; color: #f4faf5; background: linear-gradient(140deg, #2c5940, #1c4a31); font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.card-title { width: 100%; padding: 4px 10px; margin-left: -10px; border: 1px solid transparent; border-radius: 9px; color: #1c2a23; background: transparent; font: inherit; font-size: clamp(22px, 3vw, 30px); font-weight: 700; letter-spacing: -.04em; }
.card-title:hover { border-color: #e4eae6; }
.card-title:focus { border-color: #7fb08d; background: white; box-shadow: 0 0 0 2px rgba(57,126,82,.12); outline: none; }
/* Название записи в шапке отчёта — тот же приём инлайн-правки, что у ФИО
   кандидата, но размер как у исходного <h2>: 18px, не 22-30px. */
/* Название записи — обычный текст, пока по нему не кликнут (см.
   initClickToRename в common.js); рамка/фон появляются только на hover,
   чтобы не выглядеть постоянно как поле ввода. */
.click-to-rename { display: inline-block; padding: 3px 8px; margin-left: -8px; border-radius: 7px; cursor: pointer; }
.click-to-rename:hover { background: #f2f5f3; }
.report-title-input, .candidate-report-title { font-size: 18px; letter-spacing: -.035em; }
.candidate-report-title { margin-top: 0; margin-bottom: 8px; color: #26362d; }

.decision-pill { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 11.5px; font-weight: 650; }

/* Список «подпись: значение». Карандаш появляется на наведении, чтобы
   строчки читались спокойно и не пестрили иконками. */
.info-list { display: flex; flex-direction: column; }
.info-row { display: grid; grid-template-columns: 168px minmax(0, 1fr); align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid #f0f4f1; }
.info-row:last-child { border-bottom: 0; }
.info-label { color: #8d9991; font-size: 12.5px; }
.info-value { min-width: 0; display: flex; align-items: center; gap: 8px; overflow: hidden; color: #26362d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.info-value a { color: #397e52; text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.info-value a:hover { text-decoration: underline; text-underline-offset: 3px; }
.info-empty { color: #b9c2bc; font-style: italic; }
.info-copy { flex: 0 0 auto; padding: 2px 5px; border: 0; border-radius: 5px; color: #a3ada7; background: transparent; font-size: 12px; }
.info-copy:hover { color: #397e52; background: #eef5f0; }

/* Карандаш один на блок: правят обычно не одно поле, а «сажусь и заполняю». */
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.section-head h3 { margin: 0; }
.section-edit { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border: 1px solid #e4eae6; border-radius: 7px; color: #7f8c84; background: white; font: inherit; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.section-edit:hover { color: #397e52; border-color: #b9cdc0; background: #f6faf7; }
.card-section.is-editing .section-edit { color: #1e6138; border-color: #8cc3a2; background: #eef7f1; }

/* Читаем — строчками; правим — полями. Одновременно только одно из двух. */
.info-editor { display: none; }
.info-editor select, .info-editor input { width: 100%; padding: 7px 10px; font-size: 13px; }
.card-section.is-editing .info-row:not(.is-computed) .info-value { display: none; }
.card-section.is-editing .info-row:not(.is-computed) .info-editor { display: block; }
.card-section.is-editing .info-row { padding: 6px 0; }
.decision-pill.is-ok { color: #1e6138; background: #e4f2e8; }
.decision-pill.is-bad { color: #a44f4b; background: #fbeceb; }
.decision-pill.is-neutral { color: #7f8c84; background: #f0f3f1; }

.card-tabs { display: flex; gap: 22px; margin-bottom: 20px; border-bottom: 1px solid #e1e7e2; }
.card-tab { position: relative; padding: 0 1px 11px; border: 0; color: #8a978f; background: transparent; font: inherit; font-size: 13px; font-weight: 600; }
.card-tab:hover { color: #426951; }
.card-tab.is-active { color: #1d5135; }
.card-tab.is-active::after { content: ""; position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; border-radius: 2px 2px 0 0; background: #347a4e; }
.card-pane { display: none; }
.card-pane.is-visible { display: block; }

/* Заглушки разделов «Обучение» и «Адаптация». */
.pane-note { margin: 0; color: #7f8c84; font-size: 13px; line-height: 1.5; }
/* Вкладка «Отчёты» карточки кандидата — список записей слева, отчёт ЛПР
   выбранной записи справа (открывается на месте, без перехода на /reports). */
.candidate-report-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 0; padding: 0; overflow: hidden; }
.candidate-report-list-col { min-width: 0; padding: 20px; border-right: 1px solid #e6ebe7; overflow-x: hidden; overflow-y: auto; }
.candidate-report-detail-col { min-width: 0; padding: 22px 26px; overflow-y: auto; }
.candidate-report-detail-head { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-bottom: 12px; }
.candidate-report-download-button { width: auto; min-height: 32px; margin-top: 0; padding: 0 14px; font-size: 12px; }
@media (max-width: 900px) { .candidate-report-layout { grid-template-columns: 1fr; } .candidate-report-list-col { border-right: 0; border-bottom: 1px solid #e6ebe7; } }
.candidate-reports { margin-top: 14px; min-width: 0; }.candidate-report-row + .candidate-report-row { border-top: 1px solid #edf0ee; }.candidate-report-open { display: block; width: 100%; min-width: 0; padding: 12px 4px; border: 0; border-radius: 8px; background: transparent; text-align: left; cursor: pointer; }.candidate-report-open:hover { background: #f7faf8; }.candidate-report-open.is-active { background: #e9f3ec; }.candidate-report-open div { min-width: 0; }
/* Название отчёта у записей с прямой ссылкой (Яндекс.Диск и т.п.) — это
   URL без единого пробела, браузер не может перенести его по словам и без
   явного text-overflow распирает узкую колонку списка в горизонтальный
   скролл вместо аккуратного обрезания «…». */
.candidate-report-open strong { display: block; overflow: hidden; color: #26362d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.candidate-report-open span { display: block; margin-top: 3px; color: #8d9991; font-size: 11px; }
/* Пустой Telegram в карточке — бот не привяжется, подсвечиваем. */
.tg-missing { color: #d92d20; font-weight: 800; cursor: help; }
.sync-list { display: flex; flex-direction: column; gap: 8px; }
.sync-item { border: 1px solid #e6ebe7; border-radius: 10px; background: white; overflow: hidden; }
/* Строка синхронизации ведёт себя как строка шага воронки: вся — кнопка. */
.sync-head { display: flex; align-items: center; gap: 14px; padding: 10px 14px; }
.sync-head.is-expandable { cursor: pointer; }
.sync-head.is-expandable:hover { background: #f7faf8; }
.sync-head.is-open { background: #f5f9f6; }
.sync-head.is-open .step-caret { transform: rotate(180deg); }
.sync-title { flex: 1; min-width: 0; color: #26362d; font-size: 13px; font-weight: 650; }
.sync-date { flex: 0 0 auto; color: #8d9991; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sync-body { display: flex; flex-direction: column; gap: 12px; padding: 12px 14px 14px; border-top: 1px solid #f0f4f1; }
.sync-field { display: flex; flex-direction: column; gap: 3px; }
.sync-label { color: #98a39d; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.sync-value { color: #435049; font-size: 13px; }
/* Четвёртый статус синхронизации — сотрудник не ответил боту. */
.step-badge.is-noanswer { color: #9c3d3d; background: #f7e6e4; }

/* Здоровье доступа к hh.ru на странице холодного поиска — код и текст
   ошибки прямо на странице, чтобы менеджер сразу видел, что сообщать. */
.banner { padding: 12px 16px; border-radius: 10px; font-size: 13px; line-height: 1.5; margin-bottom: 14px; }
.banner-warn { background: #fdf3ea; border: 1px solid #f3d9b8; color: #8a5a1e; }
.banner-warn strong { color: #6b4413; }
.hh-health-badge { font-size: 12px; padding: 5px 10px; border-radius: 999px; background: #eef1ef; color: #6b756f; white-space: nowrap; }
.hh-health-badge.is-ok { background: #e6f4ea; color: #2c7a43; }
.hh-health-badge.is-error { background: #f7e6e4; color: #9c3d3d; }

/* --- Чат-бот --- */
/* Двухколоночный макет как в мессенджере: список диалогов слева, лента по
   центру. Карточка общая, поэтому убираем её отступы и режем внутри. */
.chatbot { display: grid; grid-template-columns: 300px minmax(0, 1fr); height: calc(100vh - 240px); min-height: 460px; padding: 0; overflow: hidden; }
.chat-list { overflow-y: auto; border-right: 1px solid #e6ebe7; }
.chat-list-item { display: flex; align-items: center; gap: 10px; padding: 10px 14px; cursor: pointer; }
.chat-list-item:hover { background: #f7faf8; }
.chat-list-item.is-active { background: #e9f3ec; }
.chat-avatar { flex: 0 0 auto; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: white; background: #4d9866; font-size: 13px; font-weight: 650; }
.chat-item-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.chat-item-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chat-item-name { overflow: hidden; color: #26362d; font-size: 13.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.chat-item-time { flex: 0 0 auto; color: #a3ada7; font-size: 11px; }
.chat-item-preview { overflow: hidden; color: #7f8c84; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
/* min-height: 0 — grid-ячейка по умолчанию сама тянется под контент своих
   детей (как и flex-элемент), а не под высоту строки грида; без этого
   .chat-window растёт под всю переписку, и min-height:0 у .chat-messages
   ниже не срабатывает, потому что упирается в уже разросшегося родителя. */
.chat-window { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.chat-window-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 18px; border-bottom: 1px solid #e6ebe7; }
.chat-window-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.chat-window-head strong { color: #1c2a23; font-size: 14px; }
.chat-window-meta { color: #8d9991; font-size: 12px; }
.chat-join { flex: 0 0 auto; padding: 7px 14px; border: 1px solid #9fc5ae; border-radius: 8px; color: #1e6138; background: #f2f9f4; font: inherit; font-size: 12px; font-weight: 650; white-space: nowrap; }
.chat-join:hover:not(:disabled) { border-color: #7fb08d; background: #e4f2e8; }
.chat-join:disabled { color: #98a39d; border-color: #e0e7e2; background: #f5f8f6; cursor: default; }
.chat-sys { align-self: center; padding: 3px 10px; border-radius: 999px; color: #8d9991; background: #e8eeea; font-size: 11.5px; }
/* min-height: 0 обязателен: без него flex-элемент с overflow-y:auto растёт
   под весь текст переписки вместо внутреннего скролла и вжимает строку
   ввода далеко за пределы видимой области — тем сильнее, чем длиннее
   история чата (незаметно на короткой переписке, критично на длинной). */
.chat-messages { flex: 1; min-height: 0; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 18px; background: #f2f6f3; }
.chat-msg { max-width: 70%; padding: 8px 12px 6px; border-radius: 12px; font-size: 13px; line-height: 1.45; }
.chat-msg p { margin: 0; }
.chat-msg.is-user { align-self: flex-start; border: 1px solid #e6ebe7; border-bottom-left-radius: 4px; background: white; }
.chat-msg.is-bot { align-self: flex-end; border-bottom-right-radius: 4px; background: #d9edde; }
.chat-time { display: block; margin-top: 2px; color: #98a39d; font-size: 10.5px; text-align: right; }
.chat-input-bar { padding: 12px 18px; border-top: 1px solid #e6ebe7; }
.chat-input-bar:empty { display: none; }
.chat-send-form { display: flex; gap: 8px; }
.chat-send-form input { flex: 1; }
.chat-send-form button { flex: 0 0 auto; padding: 8px 16px; border: none; border-radius: 8px; color: white; background: #1e6138; font: inherit; font-size: 13px; font-weight: 650; }
.chat-send-form button:disabled { background: #a9b8ae; }
@media (max-width: 900px) { .chatbot { grid-template-columns: 240px minmax(0, 1fr); } }

/* Холодный поиск: сначала витрина истории (клик по строке или «+ Новый
   поиск» открывает чат), внутри чата — как в Клоде: лента посередине,
   справа пронумерованные найденные резюме. Панели переключаются видимостью,
   а не роутом — истории не место в адресной строке. */
.cold-panel { display: none; }
.cold-panel.is-visible { display: block; }

.cold-history-list { padding: 0; }
.cold-history-row { width: 100%; padding: 14px 19px; border: 0; border-bottom: 1px solid #e9eeeb; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: transparent; font: inherit; text-align: left; cursor: pointer; }
.cold-history-row:last-child { border-bottom: 0; }
.cold-history-row:hover { background: #fafcf9; }
.cold-history-row div { min-width: 0; }
.cold-history-row strong { display: block; overflow: hidden; color: #26362d; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.cold-history-row span { display: block; margin-top: 3px; color: #99a49e; font-size: 11.5px; }
.cold-history-time { flex: 0 0 auto; color: #a3ada7; font-size: 11.5px; }

.cold-chat-card { padding: 0; overflow: hidden; height: calc(100vh - 200px); min-height: 500px; display: flex; flex-direction: column; }
.cold-chat-head { display: flex; align-items: center; gap: 16px; padding: 12px 20px; border-bottom: 1px solid #e6ebe7; }
.cold-chat-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cold-chat-title strong { overflow: hidden; color: #1c2a23; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.cold-chat-title span { color: #8d9991; font-size: 12px; }

/* Остаток лимита подписки, на которой работает агент — 5-часовое окно и
   недельное. Точное время сброса и сколько осталось — в title (тултип). */
.cold-usage-rings { display: flex; flex: 0 0 auto; align-items: center; gap: 10px; margin-left: auto; }
.cold-usage-ring { position: relative; width: 34px; height: 34px; }
.cold-usage-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.cold-usage-ring-track { fill: none; stroke: #e4eae6; stroke-width: 3; }
.cold-usage-ring-value { fill: none; stroke: #397e52; stroke-width: 3; stroke-linecap: round; transition: stroke-dashoffset .3s ease; }
.cold-usage-ring.is-high .cold-usage-ring-value { stroke: #c9a856; }
.cold-usage-ring.is-critical .cold-usage-ring-value { stroke: #bc4a47; }
.cold-usage-ring-label { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #557261; font-size: 9px; font-weight: 700; }

.cold-chat-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; }
.cold-chat-window { min-width: 0; min-height: 0; display: flex; flex-direction: column; border-right: 1px solid #e6ebe7; }
.cold-messages { flex: 1; min-height: 0; overflow-y: auto; padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; background: #fbfcfb; }

/* Как в Клоде: реплика пользователя — тёмная плашка справа, ответ агента —
   просто текст слева без пузыря, это не мессенджер с двумя собеседниками. */
.cold-msg { max-width: 74%; min-width: 0; overflow-wrap: break-word; color: #33443a; font-size: 13.5px; line-height: 1.55; white-space: pre-wrap; }
.cold-msg.is-user { align-self: flex-end; padding: 10px 14px; border-radius: 14px 14px 4px 14px; color: #f5fbf6; background: #1c4a31; }
.cold-msg.is-assistant { align-self: flex-start; max-width: 86%; }
.cold-msg-time { display: block; margin-top: 4px; opacity: .6; font-size: 10.5px; }
.cold-msg.is-assistant .cold-msg-time { color: #99a49e; opacity: 1; }

.cold-send-form { display: flex; align-items: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid #e6ebe7; }
.cold-send-form textarea { flex: 1; min-height: 41px; max-height: 200px; overflow-y: auto; resize: none; line-height: 1.4; }
.cold-send-form button { flex: 0 0 auto; height: 41px; padding: 0 18px; border: none; border-radius: 8px; color: white; background: #1c4a31; font: inherit; font-size: 13px; font-weight: 650; }
.cold-send-form button:hover:not(:disabled) { background: #27623f; }
.cold-send-form button:disabled { background: #a9b8ae; }

.cold-results { min-width: 0; min-height: 0; padding: 20px 18px; overflow-y: auto; background: #f7faf8; }
.cold-results-title { margin: 0 0 12px; color: #55645b; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.cold-results-loading { margin: 0; padding: 20px 0; color: #8d9991; font-size: 12.5px; text-align: center; }
.cold-loading-dots span { animation: cold-dot-blink 1.4s infinite; opacity: 0; }
.cold-loading-dots span:nth-child(2) { animation-delay: .2s; }
.cold-loading-dots span:nth-child(3) { animation-delay: .4s; }
@keyframes cold-dot-blink { 0%, 80%, 100% { opacity: 0; } 40% { opacity: 1; } }
.cold-results-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 9px; }
.cold-result-item { display: flex; align-items: baseline; gap: 8px; }
.cold-result-index { flex: 0 0 auto; color: #6f9c81; font-size: 12px; font-weight: 700; }
.cold-result-link { min-width: 0; overflow: hidden; color: #2f7a4d; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
/* Кнопка «в воронку» рядом с найденным резюме; is-taken — кандидат уже
   заведён, ведёт к его карточке вместо повторного добавления. */
.cold-result-link { flex: 1; }.cold-result-add { flex: 0 0 auto; padding: 4px 9px; border: 1px solid #cfe0d4; border-radius: 6px; color: #2f7a4d; background: white; font-size: 11px; font-weight: 650; white-space: nowrap; text-decoration: none; cursor: pointer; }.cold-result-add:hover:not(:disabled):not(.is-taken) { color: #1e6138; border-color: #7fb08d; background: #f0f9f2; }.cold-result-add:disabled { color: #9daaa2; border-color: #e3e8e4; background: #f4f6f5; cursor: default; }.cold-result-add.is-taken { color: #8a978f; border-color: #e3e8e4; background: #f4f6f5; cursor: help; }
.cold-result-link:hover { text-decoration: underline; }
@media (max-width: 900px) {
  .cold-chat-body { grid-template-columns: minmax(0, 1fr); }
  .cold-chat-window { border-right: 0; border-bottom: 1px solid #e6ebe7; }
}

/* Воронка занимает всю ширину — контакты и прочее переехали в «Профиль». */
.profile-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
@media (max-width: 1100px) { .profile-layout { grid-template-columns: minmax(0, 1fr); } }
.profile-aside { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }

/* --- Воронка --- */
.funnel-bar { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.funnel-progress { display: flex; align-items: center; gap: 12px; flex: 1 1 260px; min-width: 0; }
.funnel-progress-track { flex: 1; height: 6px; overflow: hidden; border-radius: 999px; background: #e7ece8; }
.funnel-progress-track span { display: block; height: 100%; border-radius: inherit; background: #4d9866; transition: width .3s ease; }
.funnel-progress-label { flex: 0 0 auto; color: #7f8c84; font-size: 12px; font-weight: 650; white-space: nowrap; }

.funnel { position: relative; padding-left: 4px; }
.funnel-step { position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 12px; padding-bottom: 8px; }
.funnel-step::before { content: ""; position: absolute; top: 34px; bottom: -2px; left: 16px; width: 2px; background: #e6ebe7; }
.funnel-step:last-child::before { display: none; }
.step-marker { position: relative; z-index: 1; width: 32px; height: 32px; margin-top: 5px; display: grid; place-items: center; border-radius: 50%; color: white; background: #c7d1ca; font-size: 13px; }
.funnel-step.is-done .step-marker.tone-call, .funnel-step.is-done .step-marker { background: #3f9d63; }
.funnel-step.is-current .step-marker { background: #1c4a31; box-shadow: 0 0 0 4px rgba(60,140,90,.16); }
.funnel-step.is-waiting .step-marker { color: #8b968f; background: #eef1ef; }
.step-marker.tone-talk { background: #3d7fd6; }
.funnel-step.is-waiting .step-marker.tone-talk { background: #eef1ef; }
.step-marker.tone-hrd { background: #7a5cc4; }
.funnel-step.is-waiting .step-marker.tone-hrd { background: #eef1ef; }
.step-marker.tone-rec { background: #e0932c; }
.funnel-step.is-waiting .step-marker.tone-rec { background: #eef1ef; }
.step-marker.tone-adapt { background: #2c9aa0; }
.funnel-step.is-waiting .step-marker.tone-adapt { background: #eef1ef; }

.step-card { padding: 0; border: 1px solid #e6ebe7; border-radius: 12px; background: white; overflow: hidden; }
.funnel-step.is-current .step-card { border-color: #8cc3a2; box-shadow: 0 0 0 3px rgba(60,140,90,.10); }
.funnel-step.is-waiting .step-card { background: #fbfcfb; }
/* Свёрнутый шаг — ровно одна строка: номер, название, дата, статус. */
.step-head { display: flex; align-items: center; gap: 12px; padding: 11px 16px; }
.step-head h4 { margin: 0; flex: 1; min-width: 0; overflow: hidden; color: #26362d; font-size: 13.5px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
.step-date-preview { flex: 0 0 auto; color: #8d9991; font-size: 12px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.step-body { padding: 0 16px 14px; border-top: 1px solid #f0f4f1; }
.step-num { color: #98a39d; }
.step-date { width: auto; max-width: 152px; padding: 6px 9px; border-color: #eef2ef; background: white; color: #435049; font-size: 12px; }
.step-date:hover { border-color: #c3d4c9; }
.step-badge { flex: 0 0 auto; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 650; white-space: nowrap; }
.step-badge.is-done { color: #1e6138; background: #e4f2e8; }
.step-badge.is-current { color: #1e6138; background: #cfe9d8; }
.step-badge.is-waiting { color: #8b968f; background: #f0f3f1; }
/* Вся строка шага — кнопка раскрытия. */
.step-head.is-expandable { cursor: pointer; }
.step-head.is-expandable:hover { background: #f7faf8; }
.step-head.is-open { background: #f5f9f6; }
/* Точка = внутри уже есть текст, иначе непонятно, стоит ли раскрывать. */
.step-dot { display: inline-block; width: 6px; height: 6px; margin-left: 6px; border-radius: 50%; background: #4d9866; vertical-align: middle; }
.step-caret { flex: 0 0 auto; color: #a3ada7; font-size: 10px; transition: transform .15s ease; }
.step-head.is-open .step-caret { transform: rotate(180deg); }

/* Даты, отметка и перевод этапа — в одну строку под заголовком шага. */
.step-details { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 10px 18px; margin-top: 14px; }
.step-date-field { display: flex; flex-direction: column; gap: 3px; }
.step-date-field label { color: #98a39d; font-size: 10.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }
.step-flag { display: flex; align-items: center; gap: 7px; padding-bottom: 7px; color: #435049; font-size: 12px; white-space: nowrap; }
.step-flag input { width: auto; margin: 0; }
.step-advance { margin-left: auto; padding: 6px 12px; border: 1px dashed #c3d4c9; border-radius: 7px; color: #557261; background: transparent; font: inherit; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.step-advance:hover { color: #1e6138; border-color: #7fb08d; border-style: solid; background: #f2f9f4; }

/* Бот адаптации: статус текстом + кнопка подключения/отключения. */
.step-bot { display: flex; align-items: center; gap: 10px; padding-bottom: 4px; }
.step-bot-status { color: #435049; font-size: 12px; }
.step-bot-btn { padding: 6px 12px; border: 1px solid #9fc5ae; border-radius: 7px; color: #1e6138; background: #f2f9f4; font: inherit; font-size: 11.5px; font-weight: 650; white-space: nowrap; }
.step-bot-btn:hover { border-color: #7fb08d; background: #e4f2e8; }

.step-comment-wrap { margin-top: 11px; }
.step-comment-wrap .field-label { margin-top: 0; }
.step-comment { border-color: #eef2ef; background: #fbfdfb; font-size: 12.5px; line-height: 1.55; overflow-y: auto; resize: vertical; }
.step-comment:focus { background: white; }
.step-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.step-actions .button { width: auto; margin-top: 0; padding: 0 20px; min-height: 38px; }
.ghost-button { padding: 0 20px; min-height: 38px; border: 1px solid #dbe4dd; border-radius: 9px; color: #435049; background: white; font: inherit; font-size: 13px; font-weight: 650; }
.ghost-button:hover { border-color: #b9cdc0; background: #f6faf7; }

/* --- Правая колонка --- */
.aside-block { padding: 16px 18px; }
.aside-block h3 { margin: 0 0 12px; color: #26362d; font-size: 13px; font-weight: 650; }
.aside-empty { color: #a3ada7; font-size: 12px; }
.aside-meta { display: grid; grid-template-columns: auto 1fr; gap: 9px 14px; margin: 0; }
.aside-meta dt { color: #8d9991; font-size: 12px; }
.aside-meta dd { margin: 0; color: #26362d; font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; }

.quick-actions { display: flex; flex-direction: column; gap: 2px; }
.quick-action { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 9px; border: 0; border-radius: 8px; color: #435049; background: transparent; font: inherit; font-size: 12.5px; text-align: left; text-decoration: none; }
.quick-action:hover { background: #f2f7f3; }
.quick-action span { width: 16px; color: #8fa397; text-align: center; }
.quick-action.is-danger { color: #a44f4b; }
.quick-action.is-danger span { color: #c98b88; }
.quick-action.is-danger:hover { background: #fdf1f0; }

.note-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.note-form textarea { font-size: 12.5px; }
.note-form .button { width: auto; align-self: flex-start; margin-top: 0; padding: 0 16px; min-height: 34px; font-size: 12px; }
.note-list { display: flex; flex-direction: column; gap: 10px; }
.note { padding: 10px 12px; border-radius: 9px; background: #f7faf8; }
.note p { margin: 0; color: #3b4841; font-size: 12.5px; line-height: 1.5; }
.note footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; color: #a3ada7; font-size: 11px; }
.note-delete { padding: 0 5px; border: 0; border-radius: 5px; color: #b9c2bc; background: transparent; font-size: 15px; line-height: 1; }
.note-delete:hover { color: #a44f4b; background: #fbeceb; }

.card-section { padding: 20px; margin-bottom: 14px; }
.card-section h3 { margin: 0 0 14px; color: #557261; font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .03em; }

.candidate-flags { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 16px; }
.candidate-flag { display: flex; align-items: center; gap: 7px; color: #435049; font-size: 12px; }
.candidate-flag input { width: auto; margin: 0; }
.candidate-no-interview { color: #99a49e; font-size: 12px; }

/* --- База знаний --- */
.kb-hint { margin: 12px 0 0; color: #8d9991; font-size: 11.5px; line-height: 1.5; }
.ghost-upload { flex: 0 0 auto; width: auto; margin-top: 0; padding: 0 16px; min-height: 39px; display: inline-flex; align-items: center; border: 1px solid #dbe4dd; color: #435049; background: white; cursor: pointer; }
.ghost-upload:hover { border-color: #b9cdc0; background: #f6faf7; }

/* Хлебные крошки: где мы в дереве и как вернуться назад. */
.breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 18px 0 14px; }
.crumb { padding: 0; border: 0; color: #397e52; background: transparent; font: inherit; font-size: 12.5px; font-weight: 650; }
.crumb:hover { color: #1e6138; text-decoration: underline; text-underline-offset: 3px; }
.crumb.is-current { color: #26362d; font-weight: 650; }
.crumb-sep { color: #c2cbc5; font-size: 12px; }

.kb-title { margin: 0 0 16px; color: #1c2a23; font-size: clamp(20px, 2.6vw, 26px); font-weight: 700; letter-spacing: -.04em; }

/* Подпись раздела на верхнем экране («Шаблоны», «Вакансии») — это не
   название текущей папки (там .kb-title), а просто ярлык над сеткой чипов. */
.kb-section-title { margin: 24px 0 12px; color: #55645b; font-size: 12.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kb-section-title:first-of-type { margin-top: 4px; }

/* Чипы сеткой в 3 колонки, как в облачном хранилище: элементы одного
   раздела охватывают взглядом все разом, а не читают по одному в столбик. */
.kb-chip-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.kb-chip { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 9px 12px; border: 1px solid #e1e8e3; border-radius: 12px; background: white; font: inherit; text-align: left; cursor: pointer; transition: border-color .12s ease, background .12s ease; }
.kb-chip:hover { border-color: #b9cdc0; background: #f6faf7; }
.kb-chip .kb-icon { width: 26px; height: 26px; flex: 0 0 26px; font-size: 13px; }
.kb-chip-label { min-width: 0; overflow: hidden; color: #26362d; font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.kb-chip-count { flex: 0 0 auto; margin-left: auto; padding: 1px 7px; border-radius: 999px; color: #6f9c81; background: #eef5f0; font-size: 11px; font-weight: 650; }

/* Шаблоны на верхнем экране — те же файлы, что и глубже в дереве, но
   в сетке 3 колонки, а не списком: они там не хвост, а сами элементы
   раздела, так что оформление подчёркивает это, а не список. */
.kb-chip-grid .kb-row { border: 1px solid #e1e8e3; border-radius: 12px; background: white; }
.kb-chip-grid .kb-row + .kb-row { box-shadow: none; }
.kb-chip-grid .kb-row:hover { border-color: #b9cdc0; }

/* Файлы — списком как в файловом менеджере: одной строкой одинаковой
   высоты, так взгляд идёт по колонке, а не скачет по плиткам разного размера. */
.kb-listing { padding: 6px 8px; }
.kb-row { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: transparent; font: inherit; text-align: left; }
.kb-row + .kb-row { box-shadow: inset 0 1px 0 #f2f5f3; }
.kb-row:hover { background: #f7faf8; box-shadow: none; }
.kb-row:hover + .kb-row { box-shadow: none; }
.kb-row-main { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.kb-file-name { min-width: 0; overflow: hidden; color: #26362d; font-size: 13px; font-weight: 600; text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
a.kb-file-name { color: #2f7a4d; }
a.kb-file-name:hover { text-decoration: underline; text-underline-offset: 3px; }
/* Документ без ссылки — открывать нечего, и это видно сразу, а не по клику. */
.kb-file-name.is-plain { color: #8a958e; }
.kb-row-meta { color: #a3ada7; font-size: 11px; }

.kb-icon { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; font-size: 14px; }
.kb-icon.tone-folder { color: #b8912f; background: #fbf3dd; }
.kb-icon.tone-sheet { color: #2f7a4d; background: #e6f4ea; }
.kb-icon.tone-doc { color: #2f5fa8; background: #e7eefa; }
.kb-icon.tone-slides { color: #b06a25; background: #fbeee0; }
.kb-icon.tone-search { color: #6a5a9c; background: #eeebf8; }
.kb-icon.tone-link { color: #557261; background: #eef4f0; }
.kb-icon.tone-none { color: #b9c2bc; background: #f2f5f3; }

.kb-row-action { width: 24px; height: 24px; padding: 0; border: 0; border-radius: 6px; color: #b9c2bc; background: transparent; font-size: 12px; opacity: 0; transition: opacity .12s ease; }
.kb-row:hover .kb-row-action { opacity: 1; }
.kb-row-action:hover { color: #397e52; background: #eef5f0; }
.kb-row-action.is-danger { font-size: 15px; }
.kb-row-action.is-danger:hover { color: #a44f4b; background: #fbeceb; }
.kb-file { grid-template-columns: 34px minmax(0, 1fr) 24px 24px; }

/* Результат поиска — с путём над файлом, чтобы было видно, из какой он папки. */
.kb-found { padding: 6px 0; }
.kb-found + .kb-found { box-shadow: inset 0 1px 0 #f2f5f3; }
.kb-found-path { display: block; margin: 0 0 2px 58px; padding: 0; border: 0; color: #a3ada7; background: transparent; font: inherit; font-size: 11px; text-align: left; }
.kb-found-path:hover { color: #397e52; text-decoration: underline; text-underline-offset: 3px; }

.user-list { margin-top: 18px; overflow: hidden; }
.user-row { padding: 14px 19px; border-bottom: 1px solid #e9eeeb; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.user-row:last-child { border-bottom: 0; }
.user-row strong { display: block; color: #26362d; font-size: 13px; }
.user-row span { display: block; margin-top: 3px; color: #99a49e; font-size: 11px; }
.user-row.is-disabled strong, .user-row.is-disabled span { color: #b7bfb9; }
.user-row .text-button { flex: 0 0 auto; }

.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: #f7f8f6; }
.login-card { width: min(380px, calc(100vw - 40px)); padding: 40px 32px 32px; text-align: center; }
.login-card .login-mark { width: 46px; height: 46px; margin: 0 auto 18px; border-radius: 12px; display: grid; place-items: center; color: #f4faf5; background: #1c4a31; font-size: 19px; font-weight: 750; letter-spacing: -.05em; }
.login-card h1 { margin: 0 0 4px; color: #1c2a23; font-size: 21px; letter-spacing: -.05em; }
.login-card .login-subtitle { margin: 0 0 26px; color: #8d9991; font-size: 12.5px; }
.login-card form { text-align: left; }
.login-card .field-label:first-of-type { margin-top: 0; }
.login-card .button { margin-top: 22px; }
.login-error { margin: 0 0 18px; padding: 9px 11px; border-radius: 8px; color: #a44f4b; background: #fdecec; font-size: 12px; text-align: left; }

.user-bar { flex: 0 0 auto; margin-top: 14px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.user-login { display: block; padding: 0 4px; overflow: hidden; color: #a9c0af; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.user-bar button { width: 100%; margin-top: 8px; padding: 9px 10px; border: 0; border-radius: 7px; display: flex; align-items: center; gap: 10px; color: #a9c0af; background: transparent; font-size: 12px; text-align: left; white-space: nowrap; }
.user-bar button:hover { color: #eef7f0; background: rgba(255,255,255,.07); }
@media (max-width: 720px) { .app-layout { display: block; }.sidebar { width: 100%; min-height: 0; padding: 16px; display: flex; align-items: center; gap: 22px; }.brand { padding: 0; font-size: 19px; }.sidebar-nav { flex: 1; flex-direction: row; justify-content: flex-end; }.tab { width: auto; padding: 8px 9px; font-size: 12px; }.tab.is-active { background: #2c5940; }.nav-icon { display: none; }.container { width: auto; padding: 35px 16px 48px; }.upload-card, .transcript { padding: 16px; }.segment { grid-template-columns: 62px 1fr; gap: 9px; }.segment p { grid-column: 2; }.segment .timestamp { grid-row: span 2; }.speaker { font-size: 9px; } }
