.content-shell:has(#chatHub.active) { padding:0 !important; overflow:hidden !important; background:#102832 !important; }
.chat-hub-view { min-width:0; }
.chat-hub-view.active { height:100%; min-height:0; overflow:hidden; }
body:has(#chatHub.active) :is(#assistantToggle,#openPilotFeedbackButton,#microsoftConnectionIndicator) { display:none !important; }
.chat-hub-view,.chat-hub-dialog { --ch-bg:#fff; --ch-soft:#f5f8fa; --ch-ink:#173247; --ch-muted:#526c79; --ch-line:#d7e3e8; --ch-accent:#087b73; color:var(--ch-ink); }
html[data-theme="dark"] .chat-hub-view,html[data-theme="dark"] .chat-hub-dialog { --ch-bg:#102832; --ch-soft:#0c222b; --ch-ink:#e9f4f5; --ch-muted:#afc5ce; --ch-line:#33505b; --ch-accent:#7bd9c9; }
html[data-ui="operations"][data-theme="light"] .chat-hub-view,html[data-ui="operations"][data-theme="light"] .chat-hub-dialog { --ch-bg:#fff; --ch-soft:#f5f8fa; --ch-ink:#173247; --ch-muted:#526c79; --ch-line:#d7e3e8; --ch-accent:#087b73; }
.chat-hub-shell { height:100%; min-height:0; display:grid; grid-template-columns:minmax(300px,375px) minmax(0,1fr); border:0; border-radius:0; background:var(--ch-bg); overflow:hidden; }
.chat-hub-sidebar { min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; border-right:1px solid var(--ch-line); }
.chat-hub-sidebar-head { display:flex; align-items:center; justify-content:space-between; gap:8px; padding:15px; }
.chat-hub-sidebar-head strong { font-size:16px; }
.chat-hub-sidebar-head button { min-height:40px; padding:8px 11px; font-size:12px; }
.chat-hub-search-label { display:grid; gap:6px; padding:0 15px 12px; color:var(--ch-muted); font-size:12px; font-weight:600; }
.chat-hub-search-label input,.chat-hub-dialog input { width:100%; min-height:42px; border:1px solid var(--ch-line); border-radius:8px; padding:9px 11px; background:var(--ch-bg); color:var(--ch-ink); font:inherit; font-size:14px; }
.chat-hub-filters { display:flex; gap:4px; padding:0 15px 13px; border-bottom:1px solid var(--ch-line); }
.chat-hub-filters button { min-height:35px; padding:6px 11px; border:1px solid transparent; border-radius:7px; color:var(--ch-muted); background:transparent; font:inherit; font-size:12px; font-weight:700; cursor:pointer; }
.chat-hub-filters button[aria-pressed="true"] { color:var(--ch-accent); border-color:var(--ch-line); background:var(--ch-soft); }
.chat-hub-list { flex:1; min-height:0; max-height:none; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; }
.chat-hub-row { width:100%; padding:13px 14px; display:grid; grid-template-columns:38px minmax(0,1fr); gap:11px; align-items:center; text-align:left; border:0; border-bottom:1px solid var(--ch-line); background:transparent; color:var(--ch-ink); cursor:pointer; }
.chat-hub-row:hover,.chat-hub-row[aria-current="true"] { background:var(--ch-soft); }
.chat-hub-row[aria-current="true"] { box-shadow:inset 3px 0 var(--ch-accent); }
.chat-hub-row-icon { width:38px; height:38px; display:grid; place-items:center; border-radius:10px; background:#e1f2ef; color:#086e69; font-size:13px; font-weight:800; }
.chat-hub-row[data-kind="project"] .chat-hub-row-icon { background:#e6eff7; color:#17618a; }
.chat-hub-row-body { min-width:0; display:grid; gap:3px; }
.chat-hub-row-head { display:flex; align-items:baseline; justify-content:space-between; gap:6px; }
.chat-hub-row-head strong { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
.chat-hub-row-head time { flex:none; color:var(--ch-muted); font-size:11px; }
.chat-hub-row small { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; color:var(--ch-muted); font-size:12px; }
.chat-hub-empty { padding:22px 16px; color:var(--ch-muted); font-size:13px; line-height:1.5; }
.chat-hub-detail { min-width:0; min-height:0; display:flex; flex-direction:column; overflow:hidden; background:var(--ch-bg); }
.chat-hub-welcome { min-height:350px; margin:auto; padding:25px; text-align:center; color:var(--ch-muted); }
.chat-hub-welcome>span { display:grid; place-items:center; width:56px; height:56px; margin:0 auto 16px; border-radius:15px; background:var(--ch-soft); color:var(--ch-accent); font-size:28px; }
.chat-hub-welcome h2 { color:var(--ch-ink); font-size:20px; }
.chat-hub-welcome p { max-width:380px; line-height:1.5; }
.chat-hub-thread-head { display:flex; align-items:center; gap:12px; padding:17px 20px; border-bottom:1px solid var(--ch-line); }
.chat-hub-thread-head h2 { margin:0; color:var(--ch-ink); font-size:17px; }
.chat-hub-thread-head p { margin:3px 0 0; color:var(--ch-muted); font-size:12px; }
.chat-hub-back { display:none; min-width:38px; min-height:38px; border:1px solid var(--ch-line); border-radius:8px; background:var(--ch-bg); color:var(--ch-ink); font-size:20px; }
.chat-hub-messages { flex:1; min-height:0; max-height:none; padding:18px; display:flex; flex-direction:column; gap:12px; overflow-y:auto; overscroll-behavior:contain; scrollbar-gutter:stable; background:var(--ch-soft); }
.chat-hub-message { max-width:min(75%,620px); align-self:flex-start; padding:11px 13px; border:1px solid var(--ch-line); border-radius:12px 12px 12px 3px; background:var(--ch-bg); }
.chat-hub-message.own { align-self:flex-end; border-color:#86cbbf; border-radius:12px 12px 3px 12px; background:#e1f5ef; color:#183c3d; }
.chat-hub-message header { display:flex; gap:13px; justify-content:space-between; font-size:11px; }
.chat-hub-message time { opacity:.8; }
.chat-hub-message p { margin:5px 0 0; white-space:pre-wrap; overflow-wrap:anywhere; font-size:14px; }
.chat-hub-compose { flex:0 0 auto; display:flex; align-items:end; gap:8px; padding:13px; border-top:1px solid var(--ch-line); background:var(--ch-bg); }
.chat-hub-compose textarea { flex:1; min-width:0; min-height:47px; max-height:150px; resize:vertical; padding:10px 12px; border:1px solid var(--ch-line); border-radius:8px; background:var(--ch-bg); color:var(--ch-ink); font:inherit; font-size:14px; }
.chat-hub-compose button { min-height:47px; padding:10px 15px; border:0; border-radius:8px; background:#087b73; color:#fff; font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.chat-hub-compose button:disabled { opacity:.55; }
.chat-hub-project-chat { width:100%; max-width:none; flex:1; min-height:0; margin:0; display:grid; grid-template-rows:minmax(0,1fr) auto; overflow:hidden; border:0; border-radius:0; background:var(--ch-bg); box-shadow:none; }
.chat-hub-project-chat .project-chat-messages { min-height:0; max-height:none; overscroll-behavior:contain; scrollbar-gutter:stable; background:var(--ch-soft); }
.chat-hub-project-chat .project-chat-compose { margin-top:auto; }
.chat-hub-project-chat .project-chat-recipient { display:none; }
.chat-hub-project-chat .project-chat-compose textarea { min-height:48px; font-size:14px; }
.chat-hub-project-chat .project-chat-send,.chat-hub-project-chat .project-chat-file { font-size:12px; }
html[data-theme="dark"] .chat-hub-project-chat,
html[data-theme="dark"] .chat-hub-project-chat .project-chat-compose { background:var(--ch-bg); }
html[data-theme="dark"] .chat-hub-project-chat .project-chat-messages { background:var(--ch-soft); }
html[data-theme="dark"] .chat-hub-project-chat .project-chat-message > div { background:#173944; }
html[data-theme="dark"] .chat-hub-project-chat .project-chat-message.own > div { background:linear-gradient(120deg,#72d3df,#8adeca); }
.chat-hub-dialog { width:min(520px,calc(100vw - 24px)); max-height:min(680px,calc(100vh - 24px)); padding:0; border:1px solid var(--ch-line); border-radius:12px; background:var(--ch-bg); box-shadow:0 25px 70px #071c2a55; }
.chat-hub-dialog::backdrop { background:#061a2799; }
.chat-hub-dialog header { display:flex; align-items:start; justify-content:space-between; gap:12px; padding:20px 20px 0; }
.chat-hub-dialog h2 { margin:2px 0; color:var(--ch-ink); font-size:19px; }
.chat-hub-dialog header button { width:36px; height:36px; border:1px solid var(--ch-line); border-radius:7px; background:var(--ch-bg); color:var(--ch-ink); font-size:23px; cursor:pointer; }
.chat-hub-dialog>p { margin:8px 20px 20px; color:var(--ch-muted); font-size:13px; line-height:1.45; }
.chat-hub-dialog>label { display:grid; gap:6px; margin:0 20px 12px; color:var(--ch-muted); font-size:12px; font-weight:700; }
.chat-hub-people { max-height:400px; overflow:auto; border-top:1px solid var(--ch-line); }
.chat-hub-people button { width:100%; display:grid; gap:3px; padding:13px 20px; border:0; border-bottom:1px solid var(--ch-line); text-align:left; background:var(--ch-bg); color:var(--ch-ink); cursor:pointer; }
.chat-hub-people button:hover { background:var(--ch-soft); }
.chat-hub-people small { color:var(--ch-muted); font-size:12px; }
.chat-hub-view :is(button,input,textarea):focus-visible,.chat-hub-dialog :is(button,input):focus-visible { outline:3px solid #1a9fc3; outline-offset:2px; }
@media (min-width:801px) {
  body.workspace-mode:has(#chatHub.active) #mainContent { height:calc(100dvh - 64px); }
}
@media (max-width:800px) {
  .content-shell:has(#chatHub.active) { height:calc(100dvh - 64px); min-height:0; box-sizing:border-box; }
}
@media (max-width:700px) {
  .chat-hub-shell { grid-template-columns:minmax(0,1fr); }
  .chat-hub-sidebar { border-right:0; }
  .chat-hub-detail { display:none; }
  .chat-hub-shell.thread-open .chat-hub-sidebar { display:none; }
  .chat-hub-shell.thread-open .chat-hub-detail { display:flex; min-height:0; }
  .chat-hub-shell.thread-open .chat-hub-messages,.chat-hub-shell.thread-open .project-chat-messages { min-height:0; max-height:none; }
  .chat-hub-back { display:block; }
  .chat-hub-message { max-width:88%; }
  body.worker-mode .content-shell:has(#chatHub.active) { padding-bottom:calc(84px + env(safe-area-inset-bottom,0px)) !important; }
  body.worker-mode #workerMessagesButton { display:none !important; }
  body.worker-mode .worker-mobile-nav:not(.hidden) { grid-template-columns:repeat(5,minmax(0,1fr)); }
}
