/* Shared collaboration surfaces. External CSS deliberately preserves the CSP. */
:root{--collab-surface:#fff;--collab-soft:#f5f7fb;--collab-user:#eaf0fc;--collab-selected:#e8eefb}
:root[data-theme="dark"]{--collab-surface:#282936;--collab-soft:#22232e;--collab-user:#2c3c57;--collab-selected:#35415a}
.assistant-bar{margin:0 0 14px;padding:8px 12px;border:1px solid var(--line);border-radius:12px;background:var(--collab-surface);display:grid;gap:8px}
.assistant-bar-main{display:flex;gap:6px 12px;align-items:center;flex-wrap:wrap}.assistant-bar-review{font-weight:650;min-height:34px;padding:6px 12px}.assistant-bar-more{margin-left:auto;font-size:13px}.assistant-bar-more>summary{cursor:pointer;color:var(--blue);padding:4px 2px}.assistant-bar-more[open]{flex-basis:100%;margin-left:0}.assistant-bar-more[open]>summary{margin-bottom:6px}.metric>.assistant-chip[data-action="assistant-metric-ask"]{margin-top:6px;padding:2px 8px;min-height:0;font-size:11px;border-radius:7px;opacity:0;transition:opacity .15s}.metric:hover>.assistant-chip[data-action="assistant-metric-ask"],.metric:focus-within>.assistant-chip[data-action="assistant-metric-ask"]{opacity:1}@media(hover:none){.metric>.assistant-chip[data-action="assistant-metric-ask"]{opacity:1}}
.assistant-bar-note{color:var(--muted);font-size:13px;line-height:1.5}.assistant-bar-chips{display:flex;gap:8px;flex-wrap:wrap}
.assistant-chip{font:inherit;font-size:13px;line-height:1.45;padding:8px 12px;min-height:36px;border-radius:10px;border:1px solid var(--line);background:var(--collab-soft);color:var(--ink);cursor:pointer;text-align:left}
.assistant-chip:hover{border-color:var(--blue);background:var(--collab-selected)}.assistant-chip:focus-visible{outline:2px solid var(--blue);outline-offset:3px}
.assistant-chip:disabled,.assistant-bar button:disabled{opacity:.55;cursor:progress}
.assistant-shell{display:grid;grid-template-columns:minmax(230px,290px) minmax(0,1fr);height:clamp(420px,calc(100dvh - 310px),920px);border:1px solid var(--line);border-radius:18px;background:var(--collab-surface);overflow:hidden;box-shadow:var(--shadow)}
main[data-current-view="assistant"]>.workflow-guide{display:none}
.assistant-shell>.assistant-chat-sidebar{position:static;top:auto;height:auto;width:auto;min-width:0;margin:0;padding:16px 12px;border:0;border-right:1px solid var(--line);border-radius:0;box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none;background:var(--collab-soft);display:flex;flex-direction:column;gap:12px;z-index:auto;overflow:hidden}
.assistant-sidebar-heading{display:flex;justify-content:space-between;align-items:center;gap:8px}.assistant-sidebar-heading h2{font-size:15px;margin:0}.assistant-sidebar-heading .btn{white-space:nowrap;padding:8px 11px}
.assistant-search-label{display:grid;gap:6px;font-size:12px;color:var(--muted)}.assistant-search-label input,.assistant-message-search input{width:100%;min-width:0;padding:10px 12px;border:1px solid var(--line);border-radius:10px;color:var(--ink);background:var(--collab-surface);font-size:13px}
.assistant-chat-tabs{display:flex;gap:3px;padding:3px;border:1px solid var(--line);border-radius:10px}.assistant-chat-tabs button{flex:1;border:0;border-radius:7px;background:transparent;color:var(--muted);padding:7px;font-size:12px}.assistant-chat-tabs button[aria-pressed="true"]{background:var(--collab-selected);color:var(--ink);font-weight:650}
.assistant-room-list{flex:1;min-height:0;overflow:auto;display:flex;flex-direction:column;gap:6px;scrollbar-width:thin}.assistant-room{width:100%;border:1px solid transparent;background:transparent;color:var(--ink);text-align:left;padding:12px;border-radius:11px;display:grid;gap:6px;flex-shrink:0}
.assistant-room:hover{background:var(--collab-surface)}.assistant-room.selected{background:var(--collab-selected);border-color:var(--blue)}.assistant-room-title{font-weight:650;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.assistant-room-preview{font-size:12px;line-height:1.5;color:var(--muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.assistant-room time{font-size:11px;color:var(--muted)}
.assistant-list-empty,#assistant-list-status{font-size:12px;line-height:1.6;color:var(--muted);margin:6px}
.assistant-conversation{display:flex;flex-direction:column;min-width:0;min-height:0;position:relative}
.assistant-conversation>#assistant-thread-header{height:auto;flex-shrink:0}
.assistant-conversation>.assistant-message-search,.assistant-conversation>#chat-form{flex-shrink:0}
.assistant-conversation>#assistant-thread-header{position:static;top:auto;margin:0;width:auto;padding:15px 18px;display:flex;justify-content:space-between;align-items:flex-start;gap:14px;border:0;border-bottom:1px solid var(--line);border-radius:0;background:var(--collab-surface);box-shadow:none;backdrop-filter:none;-webkit-backdrop-filter:none}
#assistant-thread-header h2{font-size:17px;line-height:1.4;margin:0;overflow-wrap:anywhere}#assistant-thread-header p{font-size:12px;line-height:1.4;color:var(--muted);margin:5px 0 0}.assistant-thread-actions{display:flex;gap:7px;align-items:center;flex-shrink:0}.assistant-thread-actions .btn{font-size:12px;white-space:nowrap;padding:8px 10px;min-height:34px}
.assistant-chat-menu{position:relative}.assistant-chat-menu>summary{cursor:pointer;list-style:none}.assistant-chat-menu>div{position:absolute;right:0;top:calc(100% + 8px);z-index:4;min-width:170px;padding:6px;border:1px solid var(--line);border-radius:11px;background:var(--collab-surface);box-shadow:var(--shadow)}.assistant-chat-menu button{display:block;width:100%;border:0;padding:10px;background:transparent;color:var(--ink);text-align:left;border-radius:7px}.assistant-chat-menu button:hover{background:var(--collab-selected)}
.assistant-message-search{padding:9px 18px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px}.assistant-message-search label{display:flex;align-items:center;gap:10px;font-size:12px;color:var(--muted);width:min(100%,490px)}.assistant-message-search label input{flex:1;min-width:120px;padding:7px 10px}.assistant-message-search span{font-size:12px;color:var(--muted)}
.assistant-log-wrap{position:relative;flex:1;min-height:0}.assistant-conversation #messages{height:100%;max-height:none;min-height:0;overflow-y:auto;overflow-x:hidden;padding:20px 24px;display:block;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-gutter:stable}
.assistant-message-slot{max-width:100%;margin:0 0 20px}.assistant-message-slot.is-user{max-width:86%;margin-left:auto}.assistant-message-slot.is-assistant{max-width:96%}.assistant-message-slot .chat-message{width:100%;max-width:none;min-width:0;margin:0;padding:15px 18px;background:var(--collab-soft);border:1px solid var(--line);border-radius:13px;max-height:none;overflow:visible;line-height:1.65;font-size:14px}
.assistant-message-slot.is-user .chat-message{background:var(--collab-user);white-space:pre-wrap}.assistant-message-slot .chat-meta{font-size:11px;line-height:1.5;margin-bottom:9px;color:var(--muted)}.assistant-message-slot .answer-text{max-height:none;overflow:visible}.assistant-message-slot .answer-text p{margin:8px 0}.assistant-message-slot .answer-text h3{font-size:15px;line-height:1.5;margin:16px 0 8px}.assistant-message-slot .answer-table{max-height:none;overflow-x:auto;overflow-y:visible}.assistant-last-marker{font-size:11px;font-weight:650;color:var(--blue);margin:0 0 8px;text-align:right}
.assistant-empty{padding:40px 20px;text-align:center;color:var(--muted);line-height:1.6}.assistant-empty h3{font-size:19px;color:var(--ink)}.assistant-opening{padding:25px;color:var(--muted)}
.assistant-conversation #chat-form{display:block;border-top:1px solid var(--line);padding:14px 18px;background:var(--collab-surface);margin:0;flex-shrink:0}.assistant-conversation #chat-form textarea{display:block;width:100%;max-height:160px;min-height:76px;resize:vertical;padding:12px 14px;border:1px solid var(--line);border-radius:11px;color:var(--ink);background:var(--collab-soft);font-size:14px;line-height:1.5}.assistant-conversation #chat-form>div{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-top:10px}.assistant-conversation #chat-form small{font-size:11px;color:var(--muted)}.assistant-conversation #chat-form .btn{min-width:105px}
.assistant-conversation #chat-status{margin:0;padding:10px 18px;border-radius:0;border:0;border-bottom:1px solid var(--line);box-shadow:none;background:var(--collab-soft);font-size:12px}.assistant-conversation #chat-status[hidden],.assistant-conversation #chat-form[hidden]{display:none!important}.assistant-conversation #chat-status p{margin:5px 0}.assistant-conversation #chat-status .assistant-request-question{max-height:65px;overflow:auto}
.assistant-settings{margin:14px 0;border:1px solid var(--line);border-radius:12px;padding:12px 16px;background:var(--collab-surface);font-size:13px}.assistant-settings>summary{cursor:pointer;color:var(--muted)}.assistant-settings .metrics{margin-top:12px}.assistant-settings .assistant-model-summary{margin-top:12px}
#main[data-current-view="assistant"]>[aria-label="Запрос на доработку"]{padding:9px 14px;margin-bottom:12px;min-height:0}#main[data-current-view="assistant"]>[aria-label="Запрос на доработку"] p{display:none}
.team-chat-sidebar-top{flex-wrap:wrap;gap:10px}.team-chat-create-actions{display:flex;gap:6px;flex-wrap:wrap}.team-chat-create-actions .btn{font-size:12px;padding:8px 10px}.team-chat-create-kind{display:flex;gap:5px;margin-bottom:14px}.team-chat-create-kind button{flex:1;padding:10px;border:1px solid var(--line);border-radius:9px;color:var(--ink);background:var(--collab-soft)}.team-chat-create-kind button[aria-pressed="true"]{background:var(--collab-selected);border-color:var(--blue);font-weight:650}.team-chat-selected-count{font-size:13px;color:var(--muted);margin:8px 0}.team-chat-person-filter{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:9px;background:var(--collab-soft);color:var(--ink);margin-bottom:10px}.team-chat-person[hidden]{display:none!important}.team-chat-person:has(input:checked){background:var(--collab-selected);border-color:var(--blue)}
#team-chat-form{display:grid;grid-template-columns:minmax(0,1fr);gap:9px}#team-chat-form>.field{width:100%;min-width:0;margin:0}#team-chat-form textarea{width:100%;min-height:76px;font-size:14px;line-height:1.5;padding:12px 14px}#team-chat-form>.team-chat-send{display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-end;align-items:center;gap:8px}#team-chat-form>.team-chat-send button{min-height:35px}#team-chat-keys{margin-left:auto}.panel.team-chat{backdrop-filter:none;-webkit-backdrop-filter:none}
.tasks-move-help{font-size:13px;color:var(--muted);line-height:1.5;margin:10px 0}.task-tile[data-task-drag]{cursor:grab}.task-tile[data-task-drag]:active{cursor:grabbing}.task-move-button{border:1px solid var(--line);border-radius:8px;padding:5px 8px;font-size:11px;background:var(--collab-soft);color:var(--ink)}.task-move-button:hover{border-color:var(--blue)}.task-tile-head{gap:6px;flex-wrap:wrap}.task-deadline-column.drop-ready,.task-column.drop-ready{background:var(--collab-selected);outline:2px solid var(--blue);outline-offset:-2px}.task-dragging{opacity:.55}.tasks-deadlines{scrollbar-gutter:stable;scrollbar-width:thin}.tasks-deadlines .task-tile{padding:12px;min-height:0}.tasks-deadlines .task-title{font-size:14px;line-height:1.5}.task-moving{opacity:.7;pointer-events:none}.task-move-targets{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.task-move-targets button{text-align:left;border:1px solid var(--line);border-radius:10px;padding:12px;background:var(--collab-soft);color:var(--ink)}.task-move-targets button:hover{border-color:var(--blue);background:var(--collab-selected)}.task-move-targets small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
@media(max-width:1100px){.assistant-shell{grid-template-columns:225px minmax(0,1fr)}.assistant-thread-actions{flex-direction:column;align-items:flex-end}.assistant-conversation #messages{padding:16px}.assistant-message-search label{display:grid;gap:5px}.assistant-message-slot.is-user{max-width:93%}}
@media(max-width:760px){.assistant-shell{grid-template-columns:1fr;height:auto;min-height:650px}.assistant-shell>.assistant-chat-sidebar{border-right:0;border-bottom:1px solid var(--line);max-height:255px;padding:12px}.assistant-room-list{max-height:110px}.assistant-room{padding:8px 10px}.assistant-room-preview,.assistant-room time{display:none}.assistant-conversation{height:620px;min-height:500px}.assistant-conversation>#assistant-thread-header{padding:12px;flex-direction:column;gap:10px}.assistant-thread-actions{flex-direction:row;align-items:center;flex-wrap:wrap}.assistant-thread-actions .btn{font-size:11px}.assistant-message-search{padding:8px 12px}.assistant-conversation #chat-form{padding:12px}.assistant-conversation #chat-form small{max-width:160px}.assistant-conversation #messages{padding:12px}.assistant-bar{padding:12px}.assistant-chip{flex:1 1 210px}.team-chat-send #team-chat-keys{width:100%}.task-move-targets{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.assistant-shell *,.task-tile,.task-card{scroll-behavior:auto!important;transition:none!important}}

.assistant-message-pending{font-size:11px;line-height:1.5;color:var(--muted);margin:6px 0 0}

.chat-room-row,.chat-list-tools,.chat-order-buttons{display:flex;align-items:center;gap:6px;min-width:0}
.chat-room-row>.team-chat-room{flex:1;min-width:0;width:100%}
.chat-list-tools{flex-wrap:wrap;margin:4px 0 10px}
.chat-list-tools .btn,.chat-order-buttons .btn{padding:5px 9px}
.chat-avatar{--chat-hue:215;overflow:hidden;border-radius:50%;background:hsl(var(--chat-hue) 44% 32%);color:white}
.chat-avatar img{width:100%;height:100%;object-fit:cover}
.chat-color-1{--chat-hue:167}.chat-color-2{--chat-hue:322}.chat-color-3{--chat-hue:30}.chat-color-4{--chat-hue:264}.chat-color-5{--chat-hue:190}.chat-color-6{--chat-hue:355}.chat-color-7{--chat-hue:126}
.chat-list-tools [hidden]{display:none}
#chat-incoming-banner{position:fixed;z-index:90;right:16px;bottom:18px;max-width:min(350px,calc(100vw - 32px));display:flex;align-items:flex-start;gap:12px;padding:12px 14px;border:1px solid var(--line);background:var(--glass-floating,var(--panel,#303442));border-radius:14px;box-shadow:0 5px 24px #0003}
#chat-incoming-banner a{display:grid;gap:4px;color:var(--ink);text-decoration:none;overflow-wrap:anywhere}#chat-incoming-banner button{font-size:18px}
#task-results .task-empty .actions{display:flex;flex-wrap:wrap;justify-content:center;gap:8px}
@media(max-width:600px){.chat-order-buttons .btn{min-width:34px}.chat-list-tools .btn{min-height:36px}}
/* Messenger-style chat (21.11): actions on hover/tap, one-line composer, instant sending, top banner. */
#team-chat-messages{display:flex;flex-direction:column;gap:6px;scroll-behavior:smooth}
.team-message-bubble{position:relative}
.team-message-actions{position:absolute;top:-14px;right:8px;display:none;gap:2px;padding:2px;border:1px solid var(--line);border-radius:10px;background:var(--collab-surface);box-shadow:0 3px 12px #0002;z-index:2}
.team-message.own .team-message-actions{right:auto;left:8px}
.team-message:hover .team-message-actions,.team-message:focus-within .team-message-actions,.team-message.show-actions .team-message-actions{display:flex}
.team-message-actions .team-message-task{width:30px;height:28px;padding:0;display:inline-flex;align-items:center;justify-content:center;font-size:15px;line-height:1}
.team-message-pending{opacity:.6}.team-message-pending time{font-style:italic}
#team-chat-form{display:grid;gap:6px;border-top:1px solid var(--line);padding-top:10px}
.team-chat-composer{display:flex;align-items:flex-end;gap:6px}
.team-chat-composer textarea{flex:1;min-width:0;min-height:40px;max-height:160px;resize:none;padding:10px 12px;border-radius:20px;font-size:14px;line-height:1.4}
.team-chat-tool{flex:none;width:38px;height:38px;border-radius:50%;border:1px solid var(--line);background:var(--collab-soft);color:var(--ink);font-size:16px;cursor:pointer}
.team-chat-tool:hover,.team-chat-tool:focus-visible{border-color:var(--blue);color:var(--blue)}
.team-chat-tool:disabled{opacity:.5;cursor:default}
.team-chat-submit{flex:none;min-height:40px;border-radius:20px;padding:0 18px}
.team-chat-draft-files:empty,#team-chat-upload-status:empty{display:none}
#chat-incoming-banner{top:14px;bottom:auto;left:50%;right:auto;transform:translateX(-50%);max-width:min(420px,calc(100vw - 24px));animation:chatBannerIn .22s ease-out}
#chat-incoming-banner .chat-banner-label{font-size:12px;font-weight:650;color:var(--blue);text-transform:none}
@keyframes chatBannerIn{from{opacity:0;transform:translate(-50%,-12px)}to{opacity:1;transform:translate(-50%,0)}}
@media (prefers-reduced-motion:reduce){#chat-incoming-banner{animation:none}#team-chat-messages{scroll-behavior:auto}}
@media(max-width:600px){.team-chat-submit{padding:0 12px}.team-chat-tool{width:34px;height:34px}}

/* Team messenger */
#main[data-current-view="team-chat"]:has(#team-chat) {
 display:flex;
 flex-direction:column;
 padding-block-start:16px;
}
body:has(#team-chat) .assistant-launcher {position:static; margin:8px 18px 12px auto; display:flex;}
#team-chat {
 --ink:#f4f3f6; --muted:#adaeb8; --line:#494951; --glass:#303037; --blue:#99bdff;
 --collab-soft:#323239; --collab-surface:#29292f; --collab-selected:#373942;
 color-scheme:dark; color:var(--ink); font-family:system-ui,sans-serif; padding:0; margin:0;
 flex:1 0 0; min-block-size:25rem;
 grid-template-columns:clamp(240px,30%,560px) minmax(0,1fr);
 border:1px solid #484850; border-radius:18px; background:#222226; overflow:hidden;
}
#team-chat .team-chat-sidebar, #team-chat .team-chat-pane {display:flex; flex-direction:column; min-height:0; min-width:0;}
#team-chat .team-chat-sidebar {padding:16px 10px 8px; background:#242428; border-right:1px solid #414146;}
#team-chat .team-chat-sidebar-top {margin:0 5px 12px; flex-wrap:nowrap;}
#team-chat .team-chat-sidebar-top h2 {font-size:18px; letter-spacing:-.02em;}
#team-chat .room-search {display:flex; align-items:center; gap:8px; margin:0 4px; padding:0 10px;
 height:37px; flex:none; background:#38383e; border:1px solid #484850; border-radius:10px; color:#c4c4cd;}
#team-chat .room-search input {flex:1; width:0; min-width:0; padding:4px 0; border:0; background:transparent; color:var(--ink); box-shadow:none; font:inherit; font-size:14px;}
#team-chat .room-search input::placeholder {color:#bdbdc5;}
#team-chat .room-search input:focus-visible {outline:0;}
#team-chat .room-search>span, #team-chat .room-search-toggle {position:relative; font-size:0;}
#team-chat .room-search>span {width:15px; height:15px; flex:none;}
#team-chat .room-search>span::before,#team-chat .room-search-toggle::before {
 content:""; width:10px; height:10px; box-sizing:border-box; border:1.6px solid currentColor; border-radius:50%; position:absolute; left:calc(50% - 6px); top:calc(50% - 6px);}
#team-chat .room-search>span::after,#team-chat .room-search-toggle::after {
 content:""; width:6px; height:1.6px; background:currentColor; transform:rotate(45deg); position:absolute; left:calc(50% + 2px); top:calc(50% + 4px);}
#team-chat .room-search:focus-within {outline:2px solid var(--blue);}
#team-chat .room-filters {display:flex; flex-wrap:wrap; gap:3px; padding:11px 3px 10px; flex:none;}
#team-chat .room-filters button, #team-chat .room-more, #team-chat .room-search-toggle, #team-chat .chat-back, #team-chat .chat-menu summary {
 font:inherit; font-weight:600; color:var(--muted); background:transparent; border:1px solid transparent; border-radius:8px; cursor:pointer;}
#team-chat .room-filters button {padding:5px 8px; font-size:12px;}
#team-chat .room-filters button[aria-pressed=true] {background:linear-gradient(150deg,#46464e,#38383e); border-color:#53535c; color:white;}
#team-chat #team-chat-list {display:block; min-height:0; max-height:none; flex:1; padding:0 2px 8px; overflow:auto; scroll-snap-type:none;}
#team-chat .chat-folder {margin:0; padding:4px 0; border-top:1px solid #39393f;}
#team-chat .chat-folder h3 {margin:3px 7px 5px; font-size:11px; font-weight:600; color:#bcbcc6; letter-spacing:.025em;}
#team-chat .chat-folder h3 span {margin-left:4px; font-variant-numeric:tabular-nums; color:#9c9ca7;}
#team-chat .chat-folder[data-folder-empty] {display:none;}
#team-chat .is-dragging .chat-folder[data-folder-empty] {display:block; min-height:37px; border:1px dashed #727680; border-radius:8px;}
#team-chat .chat-room-row {position:relative; border-radius:10px; gap:0; cursor:grab;}
#team-chat .chat-room-row:hover {background:#303036;}
#team-chat .chat-room-row:has([aria-current=true]) {background:#393940; box-shadow:inset 2px 0 #97b9f3;}
#team-chat .team-chat-room {cursor:grab; grid-template-columns:auto minmax(0,1fr) auto; padding:7px 4px 7px 8px; min-height:57px; gap:9px; border:0; background:transparent; flex:1 1 0;}
#team-chat .team-chat-room:active {cursor:grabbing;}
#team-chat .chat-avatar {border-radius:50%; color:white; border:1px solid #ffffff1c;
 background:linear-gradient(145deg,hsl(var(--chat-hue) 57% 60%),hsl(var(--chat-hue) 53% 39%));}
#team-chat .team-chat-icon {width:39px; height:39px;}
#team-chat .team-chat-room-copy strong {
 display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
 white-space:normal; overflow-wrap:anywhere;
 font-size:14px; line-height:1.3; font-weight:650; margin-bottom:3px;
}
#team-chat .team-chat-room-copy>span {font-size:12px; line-height:1.35;}
#team-chat .team-chat-room-meta {align-content:start; padding-top:2px;}
#team-chat .room-more {padding:0; width:22px; height:32px; line-height:1;}
#team-chat .room-more:hover, #team-chat .chat-menu summary:hover {color:white; background:#ffffff16;}
#team-chat .drag-source {opacity:.48;}
#team-chat .chat-folder.drop-inside {background:#333e50; outline:2px solid #95b9fc; outline-offset:-2px; border-radius:9px;}
#team-chat .drop-before::before,#team-chat .drop-after::after {content:""; position:absolute; left:6px; right:6px; height:3px; background:#a2c4ff; border-radius:4px; pointer-events:none;}
#team-chat .drop-before::before {top:0;} #team-chat .drop-after::after {bottom:0;}
#team-chat .layout-feedback, #team-chat .room-no-results {padding:8px; color:#c5d9ff; font-size:12px;}
#team-chat .layout-feedback:empty {display:none;}
#team-chat .team-chat-pane {padding:0; background:#222226;}
#team-chat .team-chat-header, #team-chat #team-chat-form {
 background:linear-gradient(130deg,#38383fbf,#2a2a30ed); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);}
#team-chat .team-chat-header {padding:11px 16px; min-height:60px; flex:none; flex-wrap:nowrap;}
#team-chat .team-chat-title {flex:1;}
#team-chat .team-chat-zone {font-size:10px; border:none; padding:0;}
#team-chat .chat-menu {position:relative; flex:none;}
#team-chat .chat-menu summary, #team-chat .room-search-toggle, #team-chat .chat-back {
 display:grid; place-items:center; height:32px; width:32px; padding:0; font-size:20px; list-style:none;}
#team-chat .chat-menu summary::-webkit-details-marker {display:none;}
#team-chat button.room-search-toggle {font-size:0;}
#team-chat .chat-popover {position:absolute; top:100%; right:0; z-index:6; width:max-content; max-width:220px; padding:5px;
 background:#323238; border:1px solid #51515b; border-radius:12px; box-shadow:0 10px 32px #0006;}
#team-chat .chat-popover .btn {display:block; width:100%; text-align:left; padding:8px 11px; border:0; color:var(--ink); background:transparent; box-shadow:none;}
#team-chat .chat-popover .btn:hover {background:#45454d;}
#team-chat .team-chat-top {padding:3px 15px 0; min-height:18px;}
#team-chat [data-chat-text-search] {display:flex; flex:1; gap:6px; padding:5px 0;}
#team-chat [data-chat-text-search] input {min-width:0; flex:1; background:#36363d; color:white;}
#team-chat #team-chat-status {font-size:10px; color:var(--muted);}
#team-chat #team-chat-messages {flex:1; min-height:0; height:auto; padding:8px 18px 18px; gap:12px;}
#team-chat .team-message {align-self:stretch; align-items:flex-start; flex-direction:row; width:100%; max-width:none; gap:10px; flex:none;}
#team-chat .team-message-avatar {width:32px; height:32px; margin-top:1px;}
#team-chat .team-message-bubble {flex:1; border:none; box-shadow:none; background:transparent; padding:0 2px;}
#team-chat .team-message-meta strong {color:#a8c9ff;}
#team-chat .team-message-meta .team-message-role {font-size:10px;}
#team-chat .team-message p {max-inline-size:105ch; font-size:15px; line-height:1.45; color:#efeff3;}
#team-chat .team-message-actions {left:auto; right:2px;}
#team-chat #team-chat-form {flex:none; margin:0; padding:10px 14px; display:grid; align-items:stretch;}
#team-chat .team-chat-composer {border:1px solid #4a4a53; border-radius:13px; background:#34343b; padding:4px; align-items:center;}
#team-chat #team-chat-form textarea {min-height:34px; max-height:125px; padding:7px 5px; font-size:14px; outline-offset:-2px; resize:none; border:0; box-shadow:none; background:transparent; color:white;}
#team-chat .team-chat-tool {width:29px; height:32px; padding:0; border:0; background:transparent;}
#team-chat .team-chat-submit {min-height:32px; padding:0 12px; border:0; border-radius:9px; color:#14223a; background:#a5c6ff;}
#team-chat [hidden], #team-chat .chat-back {display:none;}
@media(max-width:760px){
 #team-chat {display:flex; flex-direction:column;}
 #team-chat .team-chat-sidebar,#team-chat .team-chat-pane {flex:1 1 0;}
 #team-chat .team-chat-sidebar {border-right:0;}
 #team-chat .team-chat-pane,#team-chat.show-dialog .team-chat-sidebar {display:none;}
 #team-chat.show-dialog .team-chat-pane {display:flex;}
 #team-chat .chat-back {display:grid;}
 #team-chat .team-chat-header {padding:8px; gap:5px;}
 #team-chat #team-chat-messages {padding:10px;}
 #team-chat #team-chat-form {padding:6px;}
 #team-chat .team-chat-tool {width:25px;}
 #team-chat .team-chat-submit {padding:0 8px; font-size:12px;}
}

#team-chat{grid-template-rows:minmax(0,1fr) auto}
#team-chat .team-chat-header,#team-chat .team-chat-sidebar-top{position:relative;z-index:3}
#team-chat .chat-assistant-dock{grid-column:1/-1;display:flex;justify-content:flex-end;align-items:center;background:#27272d}
#team-chat .chat-assistant-dock:not(:empty){border-top:1px solid #45454e}
#team-chat .assistant-launcher{position:static;margin:4px 8px;min-height:34px;padding:4px 12px;box-shadow:none}
#team-chat .chat-assistant-dock:has([hidden]){display:none}
#team-chat .room-grip{cursor:grab;touch-action:none;user-select:none;color:#acb1c1;align-self:stretch;display:grid;place-items:center;width:17px;font-size:16px}
#team-chat .team-chat-room{padding-left:3px}
#team-chat .team-chat-top:has(#team-chat-older[hidden]):has(#team-chat-status:empty){display:none}
#team-chat .team-chat-composer{display:grid;grid-template-columns:auto auto minmax(60px,1fr) auto auto;gap:5px}
#team-chat #team-chat-form textarea{grid-column:3;grid-row:1;width:100%;box-sizing:border-box}
#team-chat #team-chat-task{grid-column:4;grid-row:1;width:auto;padding:0 9px;color:#cad8ed;font:inherit;font-size:12px;border:1px solid #596373;border-radius:8px}
#team-chat .team-chat-submit{grid-column:5;grid-row:1;font-weight:700}
#team-chat .chat-room-row{user-select:none}
#team-chat #team-chat-list.is-dragging{display:flex;flex-direction:column}
#team-chat .is-dragging .chat-folder[data-folder-empty]{order:1;flex:none}
.hidden-chat-list>div{display:flex;justify-content:space-between;align-items:center;gap:10px;margin:6px 0}
#team-chat .chat-popover{max-width:min(260px,80vw);max-height:45dvh;overflow:auto}
@media(max-width:760px){
 #team-chat .team-chat-composer{grid-template-columns:auto auto minmax(0,1fr) auto}
 #team-chat #team-chat-form textarea{grid-column:1/-1;grid-row:1}
 #team-chat #team-chat-task,#team-chat .team-chat-submit{grid-row:2}
 #team-chat #team-chat-task{grid-column:3;justify-self:end}
 #team-chat .team-chat-submit{grid-column:4;min-height:35px}
 #team-chat .room-grip{width:26px}
}
@media(max-width:360px){
 #team-chat.show-dialog {min-block-size:28rem;}
}

/* Let long titles and the job status take their own rows. On a short display
   the document can scroll to the composer without collapsing the message log. */
.assistant-shell{height:auto;min-height:min(78dvh,800px);grid-template-rows:minmax(0,1fr) auto}
.assistant-shell .assistant-chat-sidebar{max-height:88dvh}
.assistant-shell .assistant-conversation{height:auto;min-height:0}
.assistant-shell .assistant-conversation #chat-status{position:static;flex:0 0 auto;max-height:min(32dvh,220px);overflow:auto;min-height:0;align-items:flex-start;box-sizing:border-box}
.assistant-shell .assistant-conversation #chat-status:empty{display:none}
.assistant-shell .assistant-log-wrap{flex:1 0 auto;min-height:clamp(180px,34dvh,520px)}
.assistant-shell .assistant-log-wrap #messages{position:absolute;inset:0;width:100%;box-sizing:border-box}
.assistant-shell .assistant-thread-actions{flex-wrap:wrap;flex-shrink:1}
.assistant-shell #assistant-thread-header{flex-wrap:wrap}
.assistant-shell #assistant-thread-header>div:first-child{flex:1 1 200px;min-width:0}
.assistant-shell #chat-form textarea{width:100%;min-height:54px}
.assistant-page-dock{grid-column:1/-1;display:flex;justify-content:flex-end;background:var(--collab-surface)}
.assistant-page-dock .assistant-launcher{position:static;margin:4px 10px 8px auto}
@media(max-width:760px){.assistant-shell{grid-template-rows:auto auto auto}.assistant-shell>.assistant-chat-sidebar{max-height:240px}}

#team-chat .assistant-launcher{background:#343d50;color:#eef4ff;border:1px solid #667a9b}
#team-chat .assistant-launcher:hover,#team-chat .assistant-launcher:focus-visible{background:#425473}

#team-chat .team-message{border-radius:10px;padding:5px 6px;box-sizing:border-box}
#team-chat .team-message-meta{align-items:center;min-height:25px;flex-wrap:wrap;row-gap:2px}
#team-chat .message-shortcuts{display:inline-flex;flex:none;border-radius:8px;background:#343439;opacity:0}
#team-chat .team-message:hover .message-shortcuts,#team-chat .team-message:focus-within .message-shortcuts{opacity:1}
#team-chat .message-shortcuts button{display:grid;place-items:center;width:26px;height:26px;border:0;border-radius:7px;background:transparent;color:#b8bac1;cursor:pointer}
#team-chat .message-shortcuts button:hover,#team-chat .message-shortcuts button:focus-visible{background:#45454d;color:white}
#team-chat :is(.message-shortcuts,.message-popup,.selection-bar) svg{width:17px;height:17px;flex:none}
#team-chat .message-popup{position:fixed;inset:auto;margin:0;padding:5px;width:202px;box-sizing:border-box;
 max-width:calc(100vw - 16px);max-height:min(76dvh,380px);overflow:auto;color:#eeeef3;
 background:#2b2b30;border:1px solid #48484f;border-radius:13px;box-shadow:0 8px 32px #0006}
#team-chat .message-popup:popover-open{display:grid}
#team-chat .message-popup button{display:flex;align-items:center;gap:12px;padding:8px 11px;min-height:35px;
 color:inherit;border:0;border-radius:7px;background:transparent;text-align:left;font:inherit;font-size:14px;cursor:pointer}
#team-chat .message-popup button svg{color:#aeb0bc}
#team-chat .message-popup button:hover,#team-chat .message-popup button:focus-visible{background:#3c3c42;outline-offset:-2px}
#team-chat .message-popup [data-message-action=delete],#team-chat .message-popup [data-message-action=delete] svg{color:#ff928a}
#team-chat .message-popup.sheet{border-radius:12px;background:#303036}
#team-chat .message-menu-space{flex:none}
#team-chat .message-check{display:grid;place-items:center;flex:none;width:36px;height:36px;
 margin:-1px -5px 0;padding:0;border:0;border-radius:8px;background:transparent;cursor:pointer;touch-action:manipulation}
#team-chat .message-check span{display:grid;place-items:center;width:19px;height:19px;box-sizing:border-box;
 border:1px solid #838591;border-radius:50%;color:transparent;font:600 13px/1 system-ui}
#team-chat .team-message:hover .message-check span,#team-chat .message-check:focus-visible span{color:#b5bdcc}
#team-chat .message-check:focus-visible{outline:2px solid #a5c6ff;outline-offset:-2px}
@media(pointer:coarse){#team-chat .message-check{width:44px;height:44px;margin:-5px -7px 0}}
#team-chat .selecting-messages .message-shortcuts{display:none}
#team-chat [data-selection-more]{anchor-name:--team-selection-options}
#team-chat #selection-options{position:fixed;position-anchor:--team-selection-options;inset:auto;margin:0 0 5px;
 bottom:anchor(top);right:anchor(right);background:#2b2b30;color:#eeeef3;border:1px solid #48484f;
 border-radius:10px;padding:4px;box-shadow:0 5px 22px #0005}
#team-chat #selection-options button{padding:10px;min-height:40px}
#team-chat .message-check[aria-pressed=true] span{background:#e4e9f3;border-color:#e4e9f3;color:#333940}
#team-chat .message-selected{background:#404149}
#team-chat .selection-bar{display:flex;flex:none;align-items:center;gap:6px;padding:9px 12px;background:#303137;border-top:1px solid #494952}
#team-chat .selection-bar strong{min-width:0;flex:1;font-size:13px}
#team-chat .selection-bar button{display:inline-flex;align-items:center;justify-content:center;gap:5px;padding:5px;border:0;
 border-radius:7px;background:transparent;color:#cfddf1;font:inherit;font-size:13px;cursor:pointer}
#team-chat .selection-bar button:hover{background:#434751}
#team-chat .selection-bar button[hidden],#team-chat .selection-bar[hidden]{display:none}
#team-chat .selection-bar [data-selection-clear]{font-size:23px}
#team-chat #team-chat-form[hidden]{display:none}
@media(hover:none),(max-width:600px){
 #team-chat .message-shortcuts{opacity:1;background:transparent}
 #team-chat .message-shortcuts button{width:29px;height:30px}
 #team-chat .message-popup button{min-height:37px}
 #team-chat .selection-bar{padding:6px 5px;gap:3px;flex-wrap:wrap}
 #team-chat .message-selected .team-message-role{display:none}
}

#team-chat #team-chat-new{color:#d6e6ff;background:#36435a;border-color:#647ba0;align-self:center}
#team-chat .message-check[aria-pressed=true]:hover span{color:#283449;background:#d1e3ff}

:root[data-theme=dark] .assistant-shell .assistant-room.selected,
:root[data-theme=dark] .assistant-shell .assistant-chat-tabs button[aria-pressed=true]{background:#34415a;color:#f0f4fd}
:root[data-theme=dark] .assistant-shell .assistant-room.selected .assistant-room-preview{color:#c6cedd}
@media(min-width:761px) and (max-width:1100px){
 .assistant-shell{grid-template-columns:minmax(170px,26%) minmax(0,1fr)}
 .assistant-shell .assistant-thread-actions{flex-direction:row;align-items:center}
}

.assistant-shell .assistant-chat-tabs{flex-wrap:wrap}
.assistant-shell .assistant-chat-tabs button{flex:1 1 auto}

#team-chat .chat-mention-picker{min-width:0;max-height:min(180px,24dvh);overflow:auto;overscroll-behavior:contain;
 background:#2e3037;color:#edf0f6;border:1px solid #515762;border-radius:10px;padding:4px}
#team-chat .chat-mention-picker [role=status]:not(:empty){padding:8px 10px;font-size:13px}
#team-chat .chat-mention-picker button{display:flex;width:100%;min-height:40px;align-items:center;justify-content:space-between;
 gap:8px;border:0;border-radius:7px;padding:7px 10px;background:transparent;color:inherit;text-align:left;overflow-wrap:anywhere;cursor:pointer}
#team-chat .chat-mention-picker button:is(:hover,[aria-selected=true]){background:#414a5b}
#team-chat .chat-mention-picker small{color:#c2cada}

