/* ARS-X 2.5 — ИИ-помощник, агенты и сводка дня */
.ai-screen { display: grid; gap: 16px; }
.ai-screen .screen-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ai-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; align-items: start; }
.ai-grid h3 { margin: 0 0 12px; font-size: 15px; }
.ai-side { display: grid; gap: 16px; }
.ai-side .card p { margin: 10px 0 12px; }
.choice-list { display: grid; gap: 8px; }
.choice { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--surface); transition: border-color .15s, background .15s; }
.choice:hover { border-color: var(--line-strong); }
.choice.on { border-color: var(--accent-line); background: var(--accent-softer); }
.choice input[type=radio] { width: 16px; height: 16px; min-height: 0; flex: none; margin: 3px 0 0; padding: 0; }
.choice span { display: grid; gap: 2px; flex: 1; text-align: left; }
.choice small { color: var(--muted); font-size: 12.5px; line-height: 1.4; }
.ai-usage { display: grid; gap: 6px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.ai-usage b { color: var(--text); }
.log-preview { max-width: 420px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: 12.5px; }
.mcp-help { max-width: 860px; }
.mcp-help ol { padding-left: 20px; line-height: 1.6; }
.mcp-help pre.code-block { white-space: pre; overflow-x: auto; }

/* ИИ-поиск */
.ask-form { display: flex; align-items: center; gap: 10px; padding: 6px 6px 6px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--surface); }
.ask-form .ico { color: var(--brand); flex: none; }
.ask-form input, .ask-form input:focus { flex: 1; border: 0; outline: 0; box-shadow: none; background: transparent; font-size: 15px; min-width: 0; min-height: 0; padding: 6px 0; }
.ask-result { display: grid; gap: 12px; margin-top: 14px; }
.ask-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ask-list { display: grid; gap: 4px; max-height: 46vh; overflow: auto; }
.ask-list .doc-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; }
.ask-list .doc-row > span { flex: 1; min-width: 0; display: grid; }
.ask-list .doc-row small { color: var(--muted); font-size: 12px; }
.ask-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.ask-semantic { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding-top: 10px; border-top: 1px dashed var(--line); }
.ask-semantic > div { width: 100%; }
.ask-hint { margin-top: 14px; }

/* Смета по описанию */
.ai-estimate-btn .ico { color: var(--brand); }
.draft-table { display: grid; gap: 4px; margin-top: 12px; max-height: 52vh; overflow: auto; }
.draft-head, .draft-row { display: grid; grid-template-columns: 24px minmax(140px, 1fr) minmax(220px, 1.6fr) 90px 50px 100px; gap: 8px; align-items: center; }
.draft-head { font-size: 12px; color: var(--muted); padding: 0 6px 4px; position: sticky; top: 0; background: var(--surface); }
.draft-row { padding: 6px; border-radius: var(--radius-sm); border: 1px solid var(--line); }
.draft-row.nomatch { border-style: dashed; }
.draft-row.off { opacity: .5; }
.draft-row select, .draft-row input:not([type=checkbox]) { width: 100%; min-width: 0; }
.draft-src { font-size: 13px; line-height: 1.3; }
.draft-head .num, .draft-row .num { text-align: right; font-variant-numeric: tabular-nums; }

/* Сводка дня */
.digest { display: grid; gap: 8px; }
.digest-ai { display: flex; gap: 10px; align-items: flex-start; }
.digest-ai .ico { color: var(--brand); flex: none; margin-top: 2px; }
.digest-section { position: relative; display: grid; gap: 4px; text-align: left; padding: 12px 36px 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); cursor: pointer; color: var(--text); font: inherit; }
.digest-section:hover { border-color: var(--accent-line); background: var(--accent-softer); }
.digest-section ul { margin: 2px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; }
.digest-section .go { position: absolute; right: 12px; top: 14px; color: var(--muted); }

@media (max-width: 1000px) {
  .ai-grid { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .draft-head { display: none; }
  .draft-row { grid-template-columns: 24px 1fr 72px; }
  .draft-row > .draft-src { grid-column: 2 / 4; }
  .draft-row select { grid-column: 2 / 3; }
  .draft-row input:not([type=checkbox]) { grid-column: 3 / 4; }
  .draft-row > span:nth-last-child(-n+2) { display: none; }
}
html[data-color-scheme] .ask-form input:focus, .ask-form input:focus-visible { outline: none; box-shadow: none; border: 0; }
.ask-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 16%, transparent); }
