/* yellowteam: то, чего нет в pv.css (компоненты Prodviger из ИИ SEO). Цвета — только из токенов. */

/* Меню: проекты под разделами */
.yt-dot-tile { width: 20px; height: 20px; border-radius: 6px; background: var(--pv-sidebar-elevated); color: var(--pv-lime); display: inline-flex;
    align-items: center; justify-content: center; font-size: 11px; font-weight: 700; flex: none; }
.pv-nav-item.active .yt-dot-tile { background: var(--pv-ink); }

/* Доска: пять колонок */
.yt-board { grid-template-columns: repeat(6, minmax(168px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.pv-task { cursor: pointer; }
.pv-task .yt-num { color: var(--pv-text-caption); font: var(--pv-text-mono); font-size: 12px; }
.pv-task .yt-proj { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; }
.pv-task .yt-status { display: flex; align-items: center; gap: 6px; }
.pv-task .foot > .pv-muted { white-space: nowrap; }
.pv-task.done h3 { display: block; }
.pv-avatar.xs { display: inline-flex; align-items: center; justify-content: center; }
.pv-avatar.xs.agent { background: var(--pv-ink); color: var(--pv-lime); }
.yt-who { display: inline-flex; align-items: center; gap: 6px; }
.yt-over { color: var(--pv-critical-fg); font-weight: 600; }

/* Карточка задачи */
.yt-drawer { width: min(620px, 100vw); }
.yt-drawer .dbody > * { flex: none; }                 /* в колонке с прокруткой поля не должны сжиматься в ноль */
.yt-ttl { width: 100%; resize: none; font: inherit; font-size: 18px; font-weight: 600; line-height: 24px; background: none; color: var(--pv-text-primary); overflow: hidden; }
.yt-ttl:disabled { color: var(--pv-text-primary); }
.yt-drawer .grid select, .yt-drawer .grid input { min-width: 220px; max-width: 100%; }
.yt-drawer .pv-textarea { width: 100%; box-sizing: border-box; }
.yt-agent .pv-textarea, .yt-commentbox .pv-textarea { min-height: 56px; height: 64px; }
.yt-agent { border: 1px solid var(--pv-border-default); border-left: 4px solid var(--pv-lime); border-radius: var(--pv-radius-lg); padding: 12px 14px;
    display: flex; flex-direction: column; gap: 10px; background: var(--pv-bg-subtle); }
.yt-agent.review { border-left-color: var(--pv-warning-fg); background: var(--pv-bg-surface); }
.yt-agent.ask { border-left-color: var(--pv-warning-fg); }
.yt-agent .row { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.yt-agent .row .spacer { flex: 1; }
.yt-q { font-size: 14px; line-height: 1.45; white-space: pre-wrap; }
.yt-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.yt-plan { font-size: 13px; line-height: 1.5; }
.yt-plan .lead { font-size: 14px; font-weight: 500; margin: 0 0 8px; }
.yt-plan h4 { margin: 10px 0 4px; font-size: 12px; font-weight: 600; color: var(--pv-text-caption); text-transform: none; }
.yt-plan ol, .yt-plan ul { margin: 0; padding-left: 20px; }
.yt-plan li { margin: 2px 0; }
.yt-plan p { margin: 0; }
.yt-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.yt-ev { padding-left: 10px; border-left: 2px solid var(--pv-border-hairline); }
.yt-ev.plan, .yt-ev.approve { border-left-color: var(--pv-lime); }
.yt-ev.question, .yt-ev.reject { border-left-color: var(--pv-warning-fg); }
.yt-ev.error { border-left-color: var(--pv-critical-fg); }
.yt-ev.error > div:nth-child(2) { color: var(--pv-critical-fg); }
.yt-ev details { margin-top: 4px; }
.yt-comment { white-space: pre-wrap; background: var(--pv-bg-subtle); border-radius: var(--pv-radius-md); padding: 8px 10px; margin-top: 2px; }
.yt-commentbox { display: flex; gap: 8px; align-items: flex-end; margin-top: 12px; }
.yt-commentbox .pv-textarea { flex: 1; min-height: 44px; }

/* Проекты */
.yt-project { min-height: 0; }
.yt-project .desc { font-size: 13px; color: var(--pv-text-secondary); line-height: 1.45; min-height: 38px; overflow-wrap: anywhere; }
.yt-project-grid { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 1100px) { .yt-project-grid { grid-template-columns: 1fr; } }
.yt-kind { width: 32px; height: 32px; border-radius: var(--pv-radius-md); background: var(--pv-bg-muted); display: flex; align-items: center; justify-content: center; flex: none; }
.yt-row-actions { display: flex; gap: 6px; align-items: center; margin-top: 8px; }
.yt-where { overflow-wrap: anywhere; }
.yt-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; cursor: pointer; }
.yt-check input { width: 16px; height: 16px; accent-color: var(--pv-ink); }
select.pv-input { appearance: auto; }

/* Исполнитель */
.yt-flow { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.yt-arrow { color: var(--pv-text-caption); display: inline-flex; }

/* Новый проект и карточка проекта: юрлицо, доступы, ИИ SEO */
.yt-new-project { display: flex; flex-direction: column; gap: 20px; max-width: 980px; }
.yt-legal { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.yt-legal .wide { grid-column: span 3; }
@media (max-width: 900px) { .yt-legal { grid-template-columns: 1fr; } .yt-legal .wide { grid-column: auto; } }
.yt-access-list { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.yt-access-list:empty::before { content: "Доступов пока нет — добавьте сейчас или потом в карточке проекта"; font-size: 13px; color: var(--pv-text-caption); }
.yt-access-item { border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-lg); padding: 14px; display: flex; flex-direction: column; gap: 12px; background: var(--pv-bg-subtle); }
.yt-access-head { display: flex; align-items: center; justify-content: space-between; }
.yt-secret { min-height: 44px; height: 44px; resize: none; }
.yt-secret.key { height: 160px; resize: vertical; }
.yt-sticky-actions { position: sticky; bottom: 0; z-index: 2; display: flex; align-items: center; gap: 10px; justify-content: flex-end;
    padding: 12px 0; background: var(--pv-bg-canvas); border-top: 1px solid var(--pv-border-default); }
.yt-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.yt-seo { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.45; padding: 10px 12px; border-radius: var(--pv-radius-lg); }
.yt-seo + .yt-seo { margin-top: 8px; }
.yt-seo.ok { background: var(--pv-success-bg); }
.yt-seo.ok > svg { color: var(--pv-success-fg); flex: none; margin-top: 2px; }
.yt-seo.none { background: var(--pv-bg-subtle); color: var(--pv-text-secondary); }
.yt-seo.none > svg { flex: none; margin-top: 2px; }

/* Подсказки в пустых полях светлее значений: иначе пример выглядит как заполненное поле */
.pv-input::placeholder, .pv-textarea::placeholder, .yt-ttl::placeholder { color: var(--pv-text-disabled); }
.yt-commands { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; font-size: 12px; color: var(--pv-text-secondary); overflow-wrap: anywhere; }

/* Агент проекта */
.yt-h3 { margin: 18px 0 8px; font-size: 14px; font-weight: 600; }
.yt-modes { display: flex; flex-direction: column; gap: 12px; }
.yt-modes .hint { line-height: 1.4; }
.yt-task-modes summary { font-size: 13px; }

/* Разговор агента */
.yt-conversation { display: flex; flex-direction: column; gap: 10px; }
.yt-msg { border-radius: var(--pv-radius-lg); padding: 10px 12px; font-size: 13px; line-height: 1.5; }
.yt-msg .who { font-size: 12px; color: var(--pv-text-caption); margin-bottom: 4px; }
.yt-msg .txt { white-space: pre-wrap; overflow-wrap: anywhere; }
.yt-msg.user { background: var(--pv-bg-subtle); border: 1px solid var(--pv-border-default); }
.yt-msg.assistant { background: var(--pv-bg-selected); }
.yt-msg.tool { background: var(--pv-bg-surface); border: 1px dashed var(--pv-border-control); }
.yt-msg.tool .txt { font-size: 12px; }
.yt-msg.result { background: var(--pv-bg-surface); border: 1px solid var(--pv-border-hairline); padding: 6px 12px; }
.yt-msg.result summary { cursor: pointer; font-size: 12px; color: var(--pv-text-caption); }
.yt-msg.result .txt { font-size: 12px; max-height: 360px; overflow: auto; margin-top: 6px; }
.yt-msg.result.error summary { color: var(--pv-critical-fg); }
.yt-msg.summary { background: var(--pv-info-bg); }
.yt-general .pv-input { max-width: 420px; }
.yt-key-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.yt-call { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.yt-call-log { margin-top: 12px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px; }
.yt-call-pair { display: flex; flex-direction: column; gap: 4px; }
.yt-call-history { margin-top: 16px; display: flex; flex-direction: column; gap: 6px; }
.yt-call-history h4 { margin: 0 0 4px; }
.yt-call-item summary { cursor: pointer; font-size: 13px; color: var(--pv-text-secondary); }
.yt-call-item .yt-call-line { margin: 4px 0 0 12px; }
.yt-hour { width: auto; min-width: 84px; }
.yt-ring { position: fixed; right: 16px; bottom: 16px; z-index: 1000; display: flex; gap: 10px; align-items: center; max-width: min(520px, calc(100vw - 32px));
  padding: 14px 16px; border-radius: 14px; background: var(--pv-surface, #fff); border: 1px solid var(--pv-border-strong); box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.yt-ring .body { flex: 1; min-width: 0; }
.yt-ring .pv-caption { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.yt-call-line { font-size: 14px; line-height: 1.45; }
.yt-call-line.you b { color: var(--pv-text-caption); }
.yt-key-row .pv-input { flex: 1 1 260px; }

/* Итог агента и дифф правки */
.yt-answer { white-space: pre-wrap; font-size: 13px; line-height: 1.55; background: var(--pv-bg-surface); border: 1px solid var(--pv-border-hairline);
    border-radius: var(--pv-radius-md); padding: 10px 12px; max-height: 480px; overflow: auto; }
.yt-diff { font: var(--pv-text-mono); font-size: 12px; white-space: pre; overflow: auto; max-height: 360px; background: var(--pv-bg-subtle);
    border-radius: var(--pv-radius-md); padding: 8px 10px; margin: 6px 0 0; }

/* Итог проверки доступа */
.yt-check-line { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; line-height: 1.45; margin-top: 6px; color: var(--pv-text-secondary); overflow-wrap: anywhere; }
.yt-check-line svg { flex: none; margin-top: 1px; }
.yt-check-line.ok svg { color: var(--pv-success-fg); }
.yt-check-line.fail { color: var(--pv-critical-fg); }
[data-box][hidden], [data-row][hidden] { display: none !important; }

/* Что агент делает сейчас */
.yt-now { display: flex; flex-direction: column; gap: 4px; font-size: 13px; background: var(--pv-bg-surface); border: 1px solid var(--pv-border-hairline);
    border-radius: var(--pv-radius-md); padding: 8px 10px; overflow-wrap: anywhere; }
.yt-card-now { font-size: 12px; color: var(--pv-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.yt-busy { max-width: 360px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; display: inline-flex; }

.yt-risk { border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-md); padding: 10px 12px; margin: 8px 0 12px; }
.yt-risk .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.yt-risk h4 { margin: 10px 0 4px; }
.yt-blockers { margin: 6px 0 0; padding-left: 18px; }
.yt-asks { display: flex; flex-direction: column; gap: 12px; margin: 8px 0; }
.yt-ask { border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-md); padding: 10px 12px; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.yt-ask legend { font-weight: 600; padding: 0 4px; }
.yt-opt { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-md); cursor: pointer; }
.yt-opt:hover { border-color: var(--pv-border-control); }
.yt-opt:has(input:checked) { border-color: var(--pv-lime); box-shadow: 0 0 0 1px var(--pv-lime) inset; }
.yt-opt input { margin-top: 3px; }
.yt-opt > span { display: flex; flex-direction: column; gap: 2px; }
.yt-opt .d { color: var(--pv-text-secondary, inherit); font-size: 13px; }
.yt-opt .t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.yt-verify { border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-md); padding: 10px 12px; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 6px; }
.yt-verify .row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.yt-findings { margin: 4px 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.yt-files { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.yt-dossier summary { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; cursor: pointer; list-style: none; }
.yt-dossier summary::-webkit-details-marker { display: none; }
.yt-dossier summary h4 { margin: 0; }
.yt-dossier summary h4::before { content: "▸ "; color: var(--pv-text-secondary); }
.yt-dossier[open] summary h4::before { content: "▾ "; }
.yt-facts { display: flex; flex-direction: column; gap: 4px; margin-top: 8px; }
.yt-fact { display: flex; gap: 8px; align-items: flex-start; padding: 6px 8px; border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-md); }
.yt-fact .body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.yt-file { display: flex; gap: 10px; align-items: center; padding: 6px 8px; border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-md); }
.yt-file img { width: 56px; height: 56px; object-fit: cover; border-radius: 6px; display: block; }
.yt-file .ic { width: 56px; display: flex; justify-content: center; color: var(--pv-text-secondary); }
.yt-file .body { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.yt-upload { cursor: pointer; margin-right: 8px; }
.yt-talk { display: flex; flex-direction: column; gap: 10px; margin-bottom: 12px; }
.yt-msg { max-width: 82%; align-self: flex-start; display: flex; flex-direction: column; gap: 4px; }
.yt-msg.me { align-self: flex-end; align-items: flex-end; }
.yt-msg .b { white-space: pre-wrap; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--pv-border-default); background: var(--pv-surface, #fff); }
.yt-msg.me .b { background: color-mix(in srgb, var(--pv-lime) 18%, transparent); border-color: color-mix(in srgb, var(--pv-lime) 50%, transparent); }
.yt-talk-ask { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
.yt-talk-input { display: flex; gap: 8px; align-items: flex-end; }
.yt-talk-input textarea { flex: 1; }
.yt-talk-draft .yt-answer { white-space: pre-wrap; }
.yt-msg .b.yt-inspect { background: var(--pv-surface-muted, #f6f7f9); }
.yt-msg .b .pv-spinner { display: inline-block; vertical-align: -2px; }
.yt-costs { display: grid; grid-template-columns: minmax(160px, 1fr) 2fr 2fr; gap: 24px; align-items: start; }
.yt-cost-total { font-size: 28px; font-weight: 700; margin: 4px 0; }
.pv-segmented { display: flex; gap: 6px; }
@media (max-width: 900px) { .yt-costs { grid-template-columns: 1fr; } }


/* Калькулятор: прайс на месте и оценка */
.yt-price > summary { list-style: none; cursor: pointer; }
.yt-price > summary::-webkit-details-marker { display: none; }
.yt-price > summary .pv-card-head { margin: 0; }
.yt-price > summary .sub::after { content: " ▾"; }
.yt-price[open] > summary .sub::after { content: " ▴"; }
.yt-price-body { margin-top: 12px; }
.yt-price-rule { display: grid; grid-template-columns: 220px 1fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.yt-price-rule .pv-textarea { min-height: 44px; }
.yt-price-tier { display: flex; gap: 8px; align-items: center; margin: 6px 0; font-size: 13px; }
.yt-price-tier .pv-input { width: 120px; }
.yt-price-section { border: 1px solid var(--pv-border-default); border-radius: var(--pv-radius-lg); padding: 10px 12px; margin-top: 12px; background: var(--pv-bg-subtle); }
.yt-price-section-head { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.yt-price-section-head .key { width: 64px; text-transform: uppercase; font-weight: 600; text-align: center; }
.yt-price-section-head [data-title] { flex: 1; font-weight: 600; }
.yt-price-table .pv-input, .yt-price-table .pv-textarea { width: 100%; box-sizing: border-box; font-size: 13px; padding: 4px 8px; min-height: 0; }
.yt-price-table .pv-textarea { height: 44px; resize: vertical; }
.yt-price-table td { vertical-align: top; padding: 4px 4px; }
.yt-price-table th:nth-child(1), .yt-price-table td:nth-child(1) { width: 46%; }
.yt-price-table th:nth-child(2), .yt-price-table td:nth-child(2) { width: 14%; }
.yt-price-table th:nth-child(3), .yt-price-table td:nth-child(3) { width: 18%; }
.yt-price-table tr[data-group] td { background: var(--pv-bg-muted); }
.yt-est-summary { font-size: 14px; line-height: 1.5; white-space: pre-wrap; margin: 0 0 12px; }
.yt-est-total { display: flex; gap: 32px; align-items: flex-start; flex-wrap: wrap; margin-bottom: 12px; }
.yt-est td.num, .yt-est th.num, .yt-est-groups td.num, .yt-est-groups th.num { text-align: right; white-space: nowrap; }
.yt-est tr.ind td { color: var(--pv-text-secondary); }
.yt-est td { vertical-align: top; }
.yt-est-list { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.5; }
.yt-est-list.q li { color: var(--pv-warning-fg); }
.yt-est-wait { margin-bottom: 12px; }
.yt-est-wait ol { margin: 8px 0; padding-left: 20px; display: grid; gap: 6px; }
.yt-est-finding { border: 1px solid var(--pv-border-default); border-radius: 8px; padding: 8px 12px; margin-top: 6px; font-size: 13px; }
.yt-est-finding summary { cursor: pointer; font-weight: 600; }
.yt-est-finding .yt-answer { margin-top: 6px; white-space: pre-wrap; }
/* «Знания агента»: новая редакция на проверку (14.10) */
.yt-kn-draft { margin-top: 10px; display: grid; gap: 8px; }
.yt-kn-draft h4 { margin: 0; }
.yt-dropped { font-size: 13px; }
.yt-dropped ul { margin: 6px 0 0; padding-left: 20px; display: grid; gap: 4px; }
