/* Shared conversation workspace; all rules stay inside the AI widget. */
#agent-shell{width:100%;max-width:none;overflow:hidden;color:#192842}
#agent-shell #pane-left{display:grid;grid-template-columns:240px minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;border:0;border-radius:0;box-shadow:none;min-height:0}
#agent-shell #agent-topbar{grid-column:2;grid-row:1;min-height:70px;padding:14px 28px;justify-content:space-between;gap:16px}
.ai-workspace-title{display:flex;flex-direction:column;gap:3px}
.ai-workspace-title>span{font-size:18px;font-weight:700;letter-spacing:-.03em}
.ai-workspace-title small{font-size:11px;color:#8997ac}
#agent-shell #ai-credits-badge-top{border-radius:24px;padding:7px 10px;background:#f1f5ff;color:#2858be;font-size:11px;white-space:nowrap}
#agent-shell #ai-credits-badge-top.bg-red-50{background:#fef2f2;color:#dc2626}
#agent-shell #btn-newchat,#agent-shell #btn-history{display:none}
#agent-shell #chat-history-panel{grid-column:1;grid-row:1/-1;max-height:none;min-height:0;padding:25px 14px;display:flex;flex-direction:column;overflow:hidden;background:#f7f9fd;border-right:1px solid #e8edf5;border-bottom:0}
#agent-shell #chat-history-panel[hidden]{display:none}
#agent-shell #chat-history-panel>div:first-child{padding:0 10px}
#agent-shell #chat-history-panel h2{font-size:16px}
#agent-shell #close-chat-history{display:none}
#agent-shell .ai-new-chat{background:white;border:1px solid #d9e4f8;border-radius:11px;padding:12px 14px;margin:12px 0 26px;text-align:left;color:#2859cf;font-size:12px;font-weight:700}
#agent-shell .ai-history-label{padding:0 10px;color:#8c9bb0;text-transform:uppercase;letter-spacing:.1em;font-size:10px;font-weight:700;margin-bottom:10px}
#agent-shell #chat-history-list{overflow-y:auto;overscroll-behavior:contain;min-height:0;flex:1;color:#8795aa;font-size:12px;line-height:1.7}
#agent-shell .ai-history-item{display:block;width:100%;padding:11px 12px;text-align:left;border-radius:10px;color:#62738e;margin-bottom:4px}
#agent-shell .ai-history-item>span:first-child{font-size:12px}
#agent-shell .ai-history-item>span:last-child{font-size:10px}
#agent-shell .ai-history-item:hover{background:#eef3fa}
#agent-shell .ai-history-item.ai-history-active{background:#e8efff;color:#2654bd}
#agent-shell .ai-history-retry{display:block;color:#275ce6;padding:8px 0}
#agent-shell .ai-history-footer{margin-top:18px;padding:15px 10px 0;border-top:1px solid #e4eaf4;font-size:11px;color:#8a98ac}
#agent-shell .ai-history-footer a{color:#526c95;font-weight:600}
#agent-shell .ai-history-footer p{margin-top:10px;line-height:1.7}
#agent-shell #chat-stream{grid-column:2;grid-row:2;min-height:0;min-width:0;overflow-y:auto;overscroll-behavior:contain;padding:30px max(24px,calc((100% - 240px - 850px)/2));scrollbar-gutter:stable}
#agent-shell #chat-stream>.msg-node,#agent-shell #typing-node{width:100%;max-width:850px;margin:0 auto 26px}
#agent-shell .ai-user-message>div{background:#f1f4f9;color:#344762;border-radius:18px 18px 5px 18px;font-size:13px;box-shadow:none;padding:12px 18px}
#agent-shell .ai-assistant-message>div{border:0;border-radius:0;box-shadow:none;padding:5px 0;background:transparent;min-width:0}
#agent-shell .ai-assistant-message>div>div:first-child{font-size:15px;line-height:1.8}
#agent-shell .ai-query-context{display:flex;flex-wrap:wrap;gap:8px;margin:16px 0}
#agent-shell .ai-query-context:empty{display:none}
#agent-shell .ai-query-context span{background:#edf4ff;color:#315dbb;border-radius:6px;padding:5px 10px;font-size:10px;font-weight:700}
#agent-shell .ai-result-list{border:1px solid #e2e9f3;border-radius:15px;overflow:hidden;margin-top:16px}
#agent-shell .ai-results-heading{display:flex;justify-content:space-between;gap:15px;padding:14px 18px;font-size:11px;border-bottom:1px solid #e9eef5}
#agent-shell .ai-results-heading span{color:#8a98ac}
#agent-shell .company-card{border:0;border-bottom:1px solid #e9eef5;border-radius:0;padding:16px 18px;gap:13px}
#agent-shell .company-card:last-child{border-bottom:0}
#agent-shell .company-card:hover{background:#f8faff}
#agent-shell .ai-company-avatar{display:flex;align-items:center;justify-content:center;width:38px;height:38px;flex:none;border-radius:10px;background:#edf3ff;color:#426bc5;font-size:11px;font-weight:700}
#agent-shell .ai-company-name{flex:1}
#agent-shell .ai-company-name>span:first-child{font-size:12px;line-height:1.5}
#agent-shell .ai-company-name>span:last-child{font-size:11px}
#agent-shell .company-card>span:last-child>span{font-size:11px}
#agent-shell .bulk-control:empty{display:none}
#agent-shell .bulk-control button,#agent-shell .bulk-control a{font-size:12px}
#agent-shell #input-bar{grid-column:2;grid-row:3;padding:14px 24px max(15px,env(safe-area-inset-bottom));border:0;background:white;min-width:0}
#agent-shell #input-bar>div{max-width:850px;margin:auto;background:white;border:1px solid #dce5f1;border-radius:16px;box-shadow:0 6px 24px #223f6209;padding:7px;align-items:flex-end}
#agent-shell #agent-input{color:#243958;font-size:13px;min-width:0;line-height:1.6}
#agent-shell #agent-input::placeholder{color:#96a3b7}
#agent-shell #send-btn{border-radius:11px;box-shadow:none}
#agent-shell #input-bar>p{font-size:10px;color:#95a3b7}
#agent-shell #state-welcome{max-width:750px;margin:auto;padding:32px 12px}
#agent-shell #state-welcome>div:first-child{width:48px;height:48px;border:0;background:#eef4ff;color:#275ce6;box-shadow:none;margin-bottom:22px}
#agent-shell #state-welcome h1{max-width:530px;font-size:clamp(26px,3vw,38px);line-height:1.18;letter-spacing:-.045em}
#agent-shell #state-welcome>p{font-size:13px;line-height:1.8;margin-bottom:18px}
#agent-shell #state-welcome .suggestion-chip{border-radius:12px;box-shadow:none;padding:16px}
#agent-shell #state-welcome .suggestion-chip span{font-size:12px;font-weight:500}
#agent-shell #state-welcome>a:last-child{font-size:10px;text-transform:none;letter-spacing:0}
#agent-shell button:focus-visible,#agent-shell a:focus-visible{outline:2px solid #6595f5;outline-offset:2px}
#agent-shell #history-backdrop{position:absolute;inset:0;background:#162d4a55;z-index:20}
@media(max-width:1100px) and (min-width:901px){#agent-shell #pane-left{grid-template-columns:210px minmax(0,1fr)}#agent-shell .ai-workspace-title small{display:none}#agent-shell #agent-topbar{padding:16px 20px}#agent-shell #chat-stream{padding:25px 20px}}
@media(max-width:900px){
#agent-shell #pane-left{grid-template-columns:minmax(0,1fr)}
#agent-shell #agent-topbar,#agent-shell #chat-stream,#agent-shell #input-bar{grid-column:1}
#agent-shell #agent-topbar{padding:12px 16px;min-height:60px;gap:10px}
#agent-shell .ai-workspace-title small{display:none}
#agent-shell .ai-workspace-title>span{font-size:16px}
#agent-shell .ai-toolbar-actions{gap:8px}
#agent-shell #btn-history,#agent-shell #btn-newchat{display:block;font-size:11px}
#agent-shell #chat-history-panel{position:absolute;inset:0 auto 0 0;width:min(300px,86%);z-index:30;box-shadow:15px 0 50px #152d4a20}
#agent-shell #close-chat-history{display:block}
#agent-shell #chat-stream{padding:24px 16px}
#agent-shell #input-bar{padding:10px 12px max(12px,env(safe-area-inset-bottom))}
#agent-shell .company-card{padding:14px 12px;gap:9px;flex-wrap:wrap}
#agent-shell .ai-company-avatar{width:32px;height:32px;font-size:10px}
#agent-shell .ai-company-name{flex-basis:120px}
#agent-shell .company-card>span:last-child{margin-left:auto}
#agent-shell .ai-results-heading{padding:12px;font-size:10px}
#agent-shell #state-welcome{padding:24px 0}
}
@media(max-width:420px){#agent-shell #agent-topbar{gap:8px;padding:10px 12px}#agent-shell .ai-toolbar-actions{gap:4px}#agent-shell #ai-credits-badge-top{font-size:10px;padding:5px 7px}#agent-shell #btn-newchat{padding:5px}#agent-shell #btn-history{padding:5px}#agent-shell .ai-workspace-title>span{font-size:14px}#agent-shell #agent-input{font-size:12px;padding-left:8px}#agent-shell #input-bar>p{font-size:9px}}
@media(prefers-reduced-motion:reduce){#agent-shell *,#agent-shell *::before,#agent-shell *::after{animation:none!important;transition:none!important}}
/* Floating site shortcuts must not cover the pinned composer. Other dashboard tabs keep them. */
body:has(#agent-shell):not(:has(#tab-ai-search:not(.active))) :is(#chat-fab-wrap,#myspace-fab){display:none!important}
