#view-bot {max-width:1280px}
.bot-intro{max-width:760px;color:var(--muted);line-height:1.6;margin:0 0 24px}
.bot-runtime{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:20px 0;margin-bottom:24px;border-top:1px solid var(--line);border-bottom:1px solid var(--line)}
.bot-runtime>div{flex:1;min-width:200px}.bot-runtime h2{font-size:20px;margin:0 0 8px}.bot-runtime p{margin:0;color:var(--muted);line-height:1.6;overflow-wrap:anywhere}
.bot-load{display:flex;gap:12px;align-items:end;margin:0 0 24px;flex-wrap:wrap}
.bot-load label{display:grid;gap:8px;flex:1;min-width:0;max-width:360px}
.bot-load .primary{width:auto;flex:0 0 auto}
.bot-layout{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(320px,.85fr);gap:24px;align-items:start}
.bot-settings,.bot-test{padding:24px;border:1px solid var(--line);border-radius:14px;background:var(--surface)}
.bot-settings h2,.bot-test h2{margin:0 0 12px;font-size:20px}
.bot-settings label{display:grid;gap:8px;margin:18px 0;font-size:14px}
.bot-settings small,.bot-test>p,.bot-message small{color:var(--muted);line-height:1.5}
#view-bot input,#view-bot select,#view-bot textarea{width:100%;min-width:0;padding:12px;border:1px solid var(--line);border-radius:9px;background:#111621;color:var(--text);font:inherit;caret-color:var(--accent2)}
#view-bot textarea{resize:vertical;line-height:1.5}
#view-bot ::placeholder{color:var(--muted);opacity:1}
#view-bot button{min-height:44px;padding:10px 16px;cursor:pointer}
#view-bot button:disabled{opacity:.5;cursor:not-allowed}
#view-bot[aria-busy="true"] button:disabled{cursor:wait}
#view-bot :focus-visible{outline:2px solid var(--accent2);outline-offset:3px}
.bot-row{display:grid;grid-template-columns:1fr 1fr;gap:14px}
.bot-test{position:sticky;top:24px}
.bot-test-head{display:flex;justify-content:space-between;gap:12px;align-items:start}
.bot-transcript{height:360px;overflow:auto;scrollbar-color:var(--line) transparent;padding:12px 0}
.bot-transcript:empty::before{content:'Начните тест и напишите как посетитель: «Здравствуйте, хочу узнать подробнее». Без ИИ проверяются приветствие и передача; ответы по базе знаний требуют подключения ИИ.';display:block;color:var(--muted);line-height:1.7;margin:60px 12px}
.bot-message{padding:14px 0;border-bottom:1px solid var(--line)}
.bot-message p{margin:6px 0 0;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6}
.bot-user{padding-left:18px}
.bot-assistant small{color:var(--accent2)}
.bot-chat{display:flex;gap:10px;margin-top:16px;align-items:end}
.bot-chat label{flex:1;min-width:0}.bot-chat textarea{min-height:76px}
.bot-chat .primary{width:auto;flex:0 0 auto}
.bot-handoff{margin-top:18px;padding-top:18px;border-top:1px solid var(--line);line-height:1.6}
.bot-handoff p{color:var(--muted)}
.bot-notice{min-height:24px;color:var(--accent2);line-height:1.5;margin:18px 0}
.bot-error{color:#ffacb7}
@media(max-width:1100px){.bot-layout{grid-template-columns:1fr}.bot-test{position:static}}
@media(max-width:560px){.bot-settings,.bot-test{padding:16px}.bot-row{grid-template-columns:1fr}.bot-chat{flex-wrap:wrap}.bot-chat label{flex-basis:100%}.bot-transcript{height:300px}.bot-load label{flex-basis:100%;max-width:none}.bot-load .primary{width:100%}}
