.hosting-agent-layout{display:grid;grid-template-columns:220px minmax(360px,1fr) minmax(300px,.78fr);gap:18px;align-items:start}
.hosting-agent-layout>*{min-width:0}
.hosting-agent-history,.hosting-agent-chat,.hosting-agent-review{background:var(--paper);border:1px solid var(--line);border-radius:16px;box-shadow:0 10px 32px #183b5610}
.hosting-agent-history,.hosting-agent-review{padding:18px}
.hosting-agent-history{overflow:hidden}
.hosting-agent-history h3,.hosting-agent-review>h3{margin:0 0 16px}
.hosting-agent-history-list,.hosting-agent-history>div{display:grid;min-width:0;gap:7px}
.hosting-agent-history button{display:block;width:100%;min-width:0;max-width:100%;overflow:hidden;border:0;background:transparent;color:var(--ink);text-align:left;padding:10px;border-radius:9px;cursor:pointer}
.hosting-agent-history button:hover,.hosting-agent-history button.active{background:#eaf6fb;color:#123047}
.hosting-agent-history button strong,.hosting-agent-history button small{display:block;width:100%;min-width:0;max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hosting-agent-history button small{color:var(--muted);margin-top:3px}
.hosting-agent-history button:hover small,.hosting-agent-history button.active small{color:#527087}
.hosting-agent-chat{min-height:620px;display:flex;flex-direction:column;overflow:hidden}
.hosting-agent-status{min-height:20px;padding:10px 18px 0;color:var(--muted);font-size:13px}
.hosting-agent-status.error{color:#a52b35}
.hosting-agent-status.loading::before{content:"";display:inline-block;width:12px;height:12px;margin-right:8px;border:2px solid #a9ccdc;border-top-color:#168fe8;border-radius:50%;animation:hosting-agent-spin .8s linear infinite}
@keyframes hosting-agent-spin{to{transform:rotate(360deg)}
}
.hosting-agent-welcome{margin:auto;padding:42px 26px;text-align:center;max-width:520px}
.hosting-agent-welcome>span{display:grid;place-items:center;width:58px;height:58px;margin:0 auto 14px;border-radius:18px;background:#e5f7fa;color:#0d91ad;font-size:24px}
.hosting-agent-welcome h3{margin:0 0 8px}
.hosting-agent-welcome p{color:var(--muted);line-height:1.6}
.hosting-agent-chips{display:flex;flex-wrap:wrap;gap:7px;justify-content:center;margin-top:18px}
.hosting-agent-chips button{border:1px solid var(--line);background:var(--paper);color:var(--ink);border-radius:999px;padding:8px 11px;cursor:pointer}
.hosting-agent-messages{display:flex;flex:1;flex-direction:column;gap:12px;overflow:auto;padding:18px}
.hosting-agent-bubble{max-width:82%;padding:11px 14px;border-radius:14px;line-height:1.5;white-space:pre-wrap}
.hosting-agent-bubble.user{align-self:flex-end;background:#147ed1;color:#fff;border-bottom-right-radius:4px}
.hosting-agent-bubble.assistant{align-self:flex-start;background:#edf5f8;color:#123047;border-bottom-left-radius:4px}
.hosting-agent-composer{border-top:1px solid var(--line);padding:16px;display:grid;gap:9px}
.hosting-agent-composer>label:first-child{font-size:11px;font-weight:800;letter-spacing:.06em}
.hosting-agent-composer select,.hosting-agent-composer textarea{width:100%;border:1px solid var(--line);border-radius:10px;background:var(--paper);color:var(--ink);padding:11px;font:inherit}
.hosting-agent-composer textarea{min-height:92px;resize:vertical}
.hosting-agent-composer-actions,.hosting-agent-review-actions{display:flex;justify-content:flex-end;gap:9px}
.hosting-agent-attach.button.secondary{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:108px;overflow:hidden;border:1px solid var(--line);background:transparent;color:var(--muted);box-shadow:none}
.hosting-agent-attach.button.secondary:hover{border-color:#168fe8;background:#168fe812;color:#168fe8}
.hosting-agent-attach:focus-visible{outline:3px solid #168fe855;outline-offset:2px}
.hosting-agent-attach input{position:absolute;inset:0;opacity:0;cursor:pointer}
.hosting-agent-attachment-list{display:flex;flex-wrap:wrap;gap:7px}
.hosting-agent-attachment{display:flex;gap:7px;align-items:center;border:1px solid var(--line);border-radius:999px;padding:5px 9px;font-size:12px}
.hosting-agent-attachment button{border:0;background:none;color:inherit;cursor:pointer}
.hosting-agent-review{position:sticky;top:18px}
.hosting-agent-review section{padding:12px 0;border-top:1px solid var(--line)}
.hosting-agent-review h4{margin:0 0 8px;font-size:12px;text-transform:uppercase;letter-spacing:.07em}
.hosting-agent-review ol,.hosting-agent-review ul{margin:0;padding-left:20px;color:var(--muted);line-height:1.5}
.hosting-agent-review li+li{margin-top:6px}
.hosting-agent-limit{display:flex;justify-content:space-between;gap:12px;margin:5px 0}
.hosting-agent-limit span{color:var(--muted)}
.hosting-agent-secure-input{display:grid;gap:8px}.hosting-agent-secure-input label{display:grid;gap:7px;color:var(--muted);font-size:12px}.hosting-agent-secure-input input{width:100%;height:44px;border:1px solid var(--line);border-radius:9px;background:var(--paper);color:var(--ink);padding:0 11px}.hosting-agent-secure-input small{color:var(--muted);line-height:1.45}
.hosting-agent-changes{display:grid;gap:10px}.hosting-agent-changes article{min-width:0;border:1px solid var(--line);border-radius:10px;overflow:hidden}.hosting-agent-changes article strong{display:block;padding:9px 11px;background:var(--bg);font-size:11px}.hosting-agent-changes pre{max-height:280px;overflow:auto;margin:0;padding:11px;background:#071423;color:#d8ebf8;white-space:pre-wrap;overflow-wrap:anywhere;font:11px/1.5 Consolas,monospace}
#hosting-agent-readonly-notice{padding:10px;border-radius:9px;background:#eaf8f4;color:#237263;font-size:12px}
.hosting-agent-review.approved{border-color:#66c6ad}
.hosting-agent-review-actions{margin-top:14px}
@media(max-width:1100px){.hosting-agent-layout{grid-template-columns:180px 1fr}
.hosting-agent-review{grid-column:1/-1;position:static}
}
@media(max-width:700px){.hosting-agent-layout{grid-template-columns:1fr}
.hosting-agent-history{order:2}
.hosting-agent-chat{min-height:540px}
.hosting-agent-review{grid-column:auto;order:3}
.hosting-agent-bubble{max-width:92%}
.hosting-agent-composer-actions,.hosting-agent-review-actions{flex-wrap:wrap}
.hosting-agent-composer-actions .button,.hosting-agent-review-actions .button{flex:1}
.view[data-panel="hosting-agent"] .page-heading{align-items:flex-start;gap:12px}
.view[data-panel="hosting-agent"] .page-heading>button{width:100%}
}
@media(prefers-reduced-motion:reduce){.hosting-agent-status.loading::before{animation:none}
}
@media(forced-colors:active){.hosting-agent-bubble,.hosting-agent-history,.hosting-agent-chat,.hosting-agent-review{border:1px solid CanvasText}
}
