/**
 * Copyright (c) 2014 The xterm.js authors. All rights reserved.
 * Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
 * https://github.com/chjj/term.js
 * @license MIT
 *
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the "Software"), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 *
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 *
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 *
 * Originally forked from (with the author's permission):
 *   Fabrice Bellard's javascript vt100 for jslinux:
 *   http://bellard.org/jslinux/
 *   Copyright (c) 2011 Fabrice Bellard
 *   The original design remains. The terminal itself
 *   has been extended to include xterm CSI codes, among
 *   other features.
 */.xterm{cursor:text;position:relative;user-select:none;-ms-user-select:none;-webkit-user-select:none}.xterm.focus,.xterm:focus{outline:none}.xterm .xterm-helpers{position:absolute;top:0;z-index:5}.xterm .xterm-helper-textarea{padding:0;border:0;margin:0;position:absolute;opacity:0;left:-9999em;top:0;width:0;height:0;z-index:-5;white-space:nowrap;overflow:hidden;resize:none}.xterm .composition-view{background:#000;color:#fff;display:none;position:absolute;white-space:nowrap;z-index:1}.xterm .composition-view.active{display:block}.xterm .xterm-viewport{background-color:#000;overflow-y:scroll;cursor:default;position:absolute;right:0;left:0;top:0;bottom:0}.xterm .xterm-screen{position:relative}.xterm .xterm-screen canvas{position:absolute;left:0;top:0}.xterm .xterm-scroll-area{visibility:hidden}.xterm-char-measure-element{display:inline-block;visibility:hidden;position:absolute;top:0;left:-9999em;line-height:normal}.xterm.enable-mouse-events{cursor:default}.xterm.xterm-cursor-pointer,.xterm .xterm-cursor-pointer{cursor:pointer}.xterm.column-select.focus{cursor:crosshair}.xterm .xterm-accessibility:not(.debug),.xterm .xterm-message{position:absolute;left:0;top:0;bottom:0;right:0;z-index:10;color:transparent;pointer-events:none}.xterm .xterm-accessibility-tree:not(.debug) *::selection{color:transparent}.xterm .xterm-accessibility-tree{-webkit-user-select:text;user-select:text;white-space:pre}.xterm .live-region{position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden}.xterm-dim{opacity:1!important}.xterm-underline-1{text-decoration:underline}.xterm-underline-2{text-decoration:double underline}.xterm-underline-3{text-decoration:wavy underline}.xterm-underline-4{text-decoration:dotted underline}.xterm-underline-5{text-decoration:dashed underline}.xterm-overline{text-decoration:overline}.xterm-overline.xterm-underline-1{text-decoration:overline underline}.xterm-overline.xterm-underline-2{text-decoration:overline double underline}.xterm-overline.xterm-underline-3{text-decoration:overline wavy underline}.xterm-overline.xterm-underline-4{text-decoration:overline dotted underline}.xterm-overline.xterm-underline-5{text-decoration:overline dashed underline}.xterm-strikethrough{text-decoration:line-through}.xterm-screen .xterm-decoration-container .xterm-decoration{z-index:6;position:absolute}.xterm-screen .xterm-decoration-container .xterm-decoration.xterm-decoration-top-layer{z-index:7}.xterm-decoration-overview-ruler{z-index:8;position:absolute;top:0;right:0;pointer-events:none}.xterm-decoration-top{z-index:2;position:relative}*{box-sizing:border-box}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,PingFang SC,Microsoft YaHei,sans-serif;background:#f5f5f5}.login-bg{min-height:100vh;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;background:linear-gradient(135deg,#1a2980,#26d0ce)}.site-beian{padding:12px 16px;text-align:center;font-size:12px;line-height:1.5;color:#00000073}.site-beian a{color:inherit;text-decoration:none}.site-beian a:hover{color:#000000a6}.login-bg .site-beian{color:#ffffffd9}.login-bg .site-beian a:hover{color:#fff}.terminal-container{width:100%;height:100%;background:#1e1e1e;padding:8px;border-radius:6px}.terminal-container .xterm{height:100%;font-family:Cascadia Code,SF Mono,Menlo,Consolas,Noto Sans Mono CJK SC,PingFang SC,Microsoft YaHei,monospace}.terminal-container .xterm .xterm-helper-textarea{font-family:inherit}.terminal-container .xterm-viewport{overflow-y:auto!important;scrollbar-width:none}.terminal-container .xterm-viewport::-webkit-scrollbar{width:0;height:0}.task-output{background:#1e1e1e;color:#d4d4d4;font-family:Cascadia Code,Consolas,monospace;font-size:13px;padding:16px;border-radius:6px;white-space:pre-wrap;word-break:break-all;max-height:480px;overflow-y:auto;min-height:120px}.session-transcript{display:flex;flex-direction:column;gap:12px}.session-msg--user{align-self:flex-end;max-width:88%}.session-msg--assistant,.session-msg--meta{align-self:flex-start;max-width:92%}.session-msg__role{font-size:12px;color:#00000073;margin-bottom:4px}.session-msg--user .session-msg__role{text-align:right}.session-msg__bubble{padding:10px 14px;border-radius:12px;background:#f5f5f5}.session-msg--user .session-msg__bubble{background:#e6f4ff}.session-msg__text,.session-msg__pre{margin:0;white-space:pre-wrap;word-break:break-word;font-family:inherit;font-size:13px;line-height:1.55}.session-msg__pre{max-height:320px;overflow:auto;font-family:Cascadia Code,Consolas,monospace;font-size:12px}.session-msg__expand{display:inline-block;margin-top:6px;padding:0;border:0;background:none;color:#1677ff;font-size:12px;cursor:pointer;line-height:1.4}.session-msg__expand:hover{color:#4096ff}.session-msg__tool-group{display:flex;flex-direction:column;gap:8px;padding:8px 10px}.session-msg__tool-group-toggle{display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:2px;border:0;background:none;color:inherit;font:inherit;font-size:13px;line-height:1.4;text-align:left;cursor:pointer}.session-msg__tool-group-summary{flex:1;min-width:0;word-break:break-word}.session-msg__tool-group-action{flex-shrink:0;color:#1677ff;font-size:12px}.session-msg__tool-group-toggle:hover .session-msg__tool-group-action{color:#4096ff}.session-msg__tool-collapse.ant-collapse{background:transparent;border:none}.session-msg__tool-collapse>.ant-collapse-item{border:none;border-bottom:1px solid rgba(0,0,0,.06)}.session-msg__tool-collapse>.ant-collapse-item:last-child{border-bottom:none}.session-msg__tool-collapse .ant-collapse-header{padding:8px 4px!important;align-items:center!important}.session-msg__tool-collapse .ant-collapse-content{border-top:none;background:transparent}.session-msg__tool-collapse .ant-collapse-content-box{padding:0 4px 8px!important}.session-msg__tool-section+.session-msg__tool-section{margin-top:10px}.session-msg__tool-label{font-size:12px;color:#00000073;margin-bottom:4px}.session-msg__tool-hint{font-size:12px;color:#00000073}.chat-layout{--chat-bg: #0d1117;--chat-fg: #e6edf3;--chat-sidebar-bg: #161b22;--chat-border: #21262d;--chat-border2: #30363d;--chat-hover: #21262d;--chat-active-bg: #1f6feb22;--chat-active-border: #388bfd33;--chat-muted: #8b949e;--chat-dim: #484f58;--chat-session-title: #c9d1d9;--chat-session-badge: #21262d;--chat-icon-color: #8b949e;--chat-icon-hover-bg: #21262d;--chat-icon-hover-border: #30363d;--chat-icon-hover-color: #c9d1d9;--chat-danger-hover-bg: #3d1212;--chat-danger-hover-border: #f8514933;--chat-status-run-bg: #1a4a1a;--chat-status-run-fg: #3fb950;--chat-status-stream-bg: #1a3a5c;--chat-status-stream-fg: #79c0ff;--chat-status-acq-bg: #3d2a0a;--chat-status-acq-fg: #d29922;--chat-status-err-bg: #3d1212;--chat-status-err-fg: #f85149;--chat-msg-user-bg: #1f6feb;--chat-msg-user-fg: #ffffff;--chat-msg-asst-bg: #161b22;--chat-msg-asst-fg: #e6edf3;--chat-msg-asst-border: #21262d;--chat-avatar-asst-bg: #21262d;--chat-avatar-asst-border: #30363d;--chat-code-bg: #0d1117;--chat-code-header-bg: #161b22;--chat-code-border: #30363d;--chat-code-fg: #e6edf3;--chat-code-lang-color: #8b949e;--chat-copy-btn-color: #8b949e;--chat-copy-hover-bg: #21262d;--chat-copy-hover-fg: #c9d1d9;--chat-input-box-bg: #161b22;--chat-input-border: #30363d;--chat-input-fg: #e6edf3;--chat-input-placeholder: #484f58;--chat-input-area-bg: #0d1117;--chat-send-disabled-bg: #21262d;--chat-send-disabled-fg: #484f58;--chat-project-select-bg: #161b22;--chat-project-select-border: #21262d;--chat-project-select-color: #8b949e;--chat-welcome-sub: #8b949e;--chat-start-panel-bg: #161b22;--chat-start-panel-border: #21262d;--chat-start-panel-title: #8b949e;--chat-provider-card-bg: #0d1117;--chat-provider-card-border: #21262d;--chat-provider-card-hover-border: #388bfd44;--chat-provider-card-hover-bg: #1f6feb11;--chat-provider-card-sel-border: #388bfd;--chat-provider-card-sel-bg: #1f6feb22;--chat-provider-card-name: #e6edf3;--chat-provider-card-desc: #8b949e;--chat-start-divider-fg: #484f58;--chat-start-divider-line: #21262d;--chat-divider-bg: #21262d;--chat-scrollbar: #21262d;--chat-scrollbar2: #30363d;--chat-cursor-color: #79c0ff;--chat-new-btn-bg: #1f6feb22;--chat-new-btn-border: #388bfd44;--chat-new-btn-fg: #79c0ff;--chat-new-btn-hover-bg: #1f6feb44;--chat-new-btn-hover-border: #388bfd88;--chat-new-btn-hover-fg: #a8d8ff;--chat-sidebar-logo-text: #e6edf3;--chat-provider-name: #e6edf3;--chat-topbar-title: #e6edf3;--chat-welcome-title-from: #79c0ff;--chat-welcome-title-to: #a371f7;--chat-group-label: #484f58;--chat-msg-meta: #484f58}.chat-layout[data-theme=light]{--chat-bg: #ffffff;--chat-fg: #1f2328;--chat-sidebar-bg: #f7f8fa;--chat-border: #e8eaed;--chat-border2: #d0d7de;--chat-hover: #eef0f3;--chat-active-bg: #eef3ff;--chat-active-border: #c7d4ff;--chat-muted: #6b7280;--chat-dim: #9ca3af;--chat-session-title: #1f2328;--chat-session-badge: #eaeef2;--chat-icon-color: #6b7280;--chat-icon-hover-bg: #eef0f3;--chat-icon-hover-border: #d0d7de;--chat-icon-hover-color: #1f2328;--chat-danger-hover-bg: #ffeef0;--chat-danger-hover-border: #f8514944;--chat-status-run-bg: #dcffe4;--chat-status-run-fg: #1a7f37;--chat-status-stream-bg: #ddf4ff;--chat-status-stream-fg: #0550ae;--chat-status-acq-bg: #fff8c5;--chat-status-acq-fg: #9a6700;--chat-status-err-bg: #ffeef0;--chat-status-err-fg: #cf222e;--chat-msg-user-bg: #4d6bff;--chat-msg-user-fg: #ffffff;--chat-msg-asst-bg: #f7f8fa;--chat-msg-asst-fg: #1f2328;--chat-msg-asst-border: #e8eaed;--chat-avatar-asst-bg: #f7f8fa;--chat-avatar-asst-border: #e8eaed;--chat-code-bg: #f6f8fa;--chat-code-header-bg: #eaeef2;--chat-code-border: #d0d7de;--chat-code-fg: #1f2328;--chat-code-lang-color: #57606a;--chat-copy-btn-color: #57606a;--chat-copy-hover-bg: #d0d7de;--chat-copy-hover-fg: #1f2328;--chat-input-box-bg: #ffffff;--chat-input-border: #e5e7eb;--chat-input-fg: #1f2328;--chat-input-placeholder: #9ca3af;--chat-input-area-bg: #ffffff;--chat-send-disabled-bg: #e5e7eb;--chat-send-disabled-fg: #9ca3af;--chat-project-select-bg: #f7f8fa;--chat-project-select-border: #e8eaed;--chat-project-select-color: #6b7280;--chat-welcome-sub: #6b7280;--chat-start-panel-bg: #ffffff;--chat-start-panel-border: #e8eaed;--chat-start-panel-title: #6b7280;--chat-provider-card-bg: #f7f8fa;--chat-provider-card-border: #e8eaed;--chat-provider-card-hover-border: #4d6bff88;--chat-provider-card-hover-bg: #eef3ff;--chat-provider-card-sel-border: #4d6bff;--chat-provider-card-sel-bg: #eef3ff;--chat-provider-card-name: #1f2328;--chat-provider-card-desc: #6b7280;--chat-start-divider-fg: #9ca3af;--chat-start-divider-line: #e8eaed;--chat-divider-bg: #e8eaed;--chat-scrollbar: #d0d7de;--chat-scrollbar2: #d8dee4;--chat-cursor-color: #4d6bff;--chat-new-btn-bg: #eef3ff;--chat-new-btn-border: #c7d4ff;--chat-new-btn-fg: #4d6bff;--chat-new-btn-hover-bg: #dfe8ff;--chat-new-btn-hover-border: #4d6bff;--chat-new-btn-hover-fg: #3d5aef;--chat-sidebar-logo-text: #1f2328;--chat-provider-name: #1f2328;--chat-topbar-title: #1f2328;--chat-welcome-title-from: #4d6bff;--chat-welcome-title-to: #818cf8;--chat-group-label: #9ca3af;--chat-msg-meta: #9ca3af}.chat-layout{display:flex;height:100vh;background:var(--chat-bg);color:var(--chat-fg);font-family:Inter,PingFang SC,Microsoft YaHei,-apple-system,sans-serif;overflow:hidden}.chat-sidebar{width:280px;min-width:280px;background:var(--chat-sidebar-bg);border-right:1px solid var(--chat-border);display:flex;flex-direction:column;overflow:hidden;transition:width .22s ease,min-width .22s ease,background .2s}.chat-layout.sidebar-collapsed .chat-sidebar{width:68px;min-width:68px}.chat-sidebar-header{height:56px;padding:0 14px;display:flex;align-items:center;gap:8px;flex-shrink:0}.chat-layout.sidebar-collapsed .chat-sidebar-header{padding:0;justify-content:center}.chat-sidebar-logo{display:flex;align-items:center;gap:8px;flex:1;min-width:0}.chat-layout.sidebar-collapsed .chat-sidebar-logo{flex:none;justify-content:center}.chat-sidebar-logo.clickable{cursor:pointer;border-radius:10px;padding:6px;transition:background .15s}.chat-sidebar-logo.clickable:hover{background:var(--chat-hover)}.chat-sidebar-logo-icon{width:28px;height:28px;background:linear-gradient(135deg,#388bfd,#a371f7);border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}.chat-sidebar-logo-text{font-size:16px;font-weight:700;color:var(--chat-sidebar-logo-text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;letter-spacing:-.02em}.chat-sidebar-collapse-btn{width:32px;height:32px;border:none;background:transparent;border-radius:8px;color:var(--chat-icon-color);cursor:pointer;display:flex;align-items:center;justify-content:center;flex-shrink:0;transition:background .15s,color .15s;font-size:15px}.chat-sidebar-collapse-btn:hover{background:var(--chat-hover);color:var(--chat-icon-hover-color)}.chat-sidebar-new-wrap{padding:0 14px 12px;flex-shrink:0}.chat-sidebar-new-wrap.collapsed{padding:0 12px 12px;display:flex;justify-content:center}.chat-sidebar-new-btn{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:10px 14px;background:transparent;border:1px solid var(--chat-border2);border-radius:12px;color:var(--chat-session-title);font-size:14px;font-weight:500;cursor:pointer;transition:all .15s;white-space:nowrap}.chat-sidebar-new-btn:hover{background:var(--chat-hover);border-color:var(--chat-muted)}.chat-sidebar-new-btn.icon-only{width:40px;height:40px;padding:0;border-radius:12px}.chat-sidebar-providers{padding:4px 10px 8px;flex-shrink:0}.chat-layout.sidebar-collapsed .chat-sidebar-providers{padding:4px 10px}.chat-sidebar-section-label{font-size:11px;font-weight:600;color:var(--chat-muted);text-transform:uppercase;letter-spacing:.06em;padding:4px 8px 8px}.chat-provider-item{display:flex;align-items:center;gap:10px;padding:8px 10px;border-radius:10px;cursor:pointer;transition:background .12s;margin-bottom:2px;border:1px solid transparent}.chat-layout.sidebar-collapsed .chat-provider-item{justify-content:center;padding:8px}.chat-provider-item:hover{background:var(--chat-hover)}.chat-provider-item.active{background:var(--chat-active-bg);border-color:var(--chat-active-border)}.chat-provider-icon{width:28px;height:28px;border-radius:7px;display:flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}.chat-provider-info{flex:1;min-width:0}.chat-provider-name{font-size:13px;font-weight:500;color:var(--chat-provider-name);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-provider-status{font-size:11px;color:var(--chat-muted);display:flex;align-items:center;gap:4px;margin-top:1px}.chat-provider-dot{width:6px;height:6px;border-radius:50%;background:var(--chat-status-run-fg);flex-shrink:0}.chat-provider-dot.inactive{background:var(--chat-dim)}.chat-provider-dot.acquiring{background:var(--chat-status-acq-fg);animation:pulse 1.2s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1;transform:scale(1)}50%{opacity:.5;transform:scale(.85)}}.chat-sidebar-sessions{flex:1;overflow-y:auto;padding:4px 10px 8px;scrollbar-width:thin;scrollbar-color:var(--chat-scrollbar) transparent}.chat-sidebar-sessions::-webkit-scrollbar{width:4px}.chat-sidebar-sessions::-webkit-scrollbar-track{background:transparent}.chat-sidebar-sessions::-webkit-scrollbar-thumb{background:var(--chat-scrollbar);border-radius:4px}.chat-session-empty{padding:16px 8px;font-size:12px;color:var(--chat-dim);text-align:center}.chat-session-group-label{font-size:12px;font-weight:500;color:var(--chat-group-label);padding:10px 8px 6px}.chat-session-item{display:flex;align-items:center;padding:8px 10px;border-radius:10px;cursor:pointer;transition:background .12s;gap:8px;min-width:0}.chat-session-item:hover,.chat-session-item.active{background:var(--chat-hover)}.chat-session-title{flex:1;font-size:13px;color:var(--chat-session-title);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.chat-session-item.active .chat-session-title{font-weight:500}.chat-session-provider-badge{font-size:10px;padding:1px 5px;border-radius:4px;background:var(--chat-session-badge);color:var(--chat-muted);flex-shrink:0}.chat-sidebar-footer{padding:10px 12px 14px;flex-shrink:0}.chat-user-bar{display:flex;align-items:center;gap:10px;width:100%;padding:8px 10px;border-radius:14px;border:1.5px solid #4d6bff;background:transparent;cursor:pointer;transition:background .15s,box-shadow .15s;text-align:left;color:var(--chat-session-title)}.chat-layout.sidebar-collapsed .chat-user-bar{justify-content:center;padding:8px;border-radius:12px}.chat-user-bar:hover{background:var(--chat-hover)}.chat-user-avatar{width:28px;height:28px;border-radius:50%;background:linear-gradient(135deg,#4d6bff,#818cf8);color:#fff;font-size:13px;font-weight:600;display:flex;align-items:center;justify-content:center;flex-shrink:0}.chat-user-name{flex:1;font-size:13px;color:var(--chat-session-title);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}.chat-user-more{color:var(--chat-muted);font-size:14px;flex-shrink:0}.chat-user-dropdown.ant-dropdown,.chat-layout .chat-user-dropdown{z-index:1100;padding:0!important;background:transparent!important;border:none!important;box-shadow:none!important}.chat-user-dropdown .ant-dropdown-menu,.chat-user-menu.ant-dropdown-menu{border-radius:12px!important;padding:6px!important;min-width:168px;box-shadow:none!important}.chat-user-dropdown .ant-dropdown-menu-item,.chat-user-menu .ant-dropdown-menu-item{border-radius:8px;padding:8px 12px;font-size:13px}.chat-user-dropdown .ant-dropdown-menu-item-group-title,.chat-user-menu .ant-dropdown-menu-item-group-title{padding:6px 12px 4px;font-size:12px;font-weight:500}.chat-user-dropdown .ant-dropdown-menu-item-divider,.chat-user-menu .ant-dropdown-menu-item-divider{margin:4px 0}.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu,.chat-theme-dark.chat-user-menu.ant-dropdown-menu,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu{background:#161b22!important;border:1px solid #30363d!important}.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu-item{color:#e6edf3!important}.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item .anticon,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item .anticon,.chat-layout[data-theme=dark] .chat-user-dropdown .anticon,.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item-group-title,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item-group-title,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu-item-group-title{color:#8b949e!important}.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item:hover,.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item-active,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item:hover,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu-item:hover{background:#21262d!important;color:#e6edf3!important}.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item-danger,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item-danger,.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item-danger .anticon,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item-danger .anticon,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu-item-danger,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu-item-danger .anticon{color:#f85149!important}.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item-danger:hover,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item-danger:hover,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu-item-danger:hover{background:#3d1212!important}.chat-theme-dark.chat-user-dropdown .ant-dropdown-menu-item-divider,.chat-theme-dark.chat-user-menu .ant-dropdown-menu-item-divider,.chat-layout[data-theme=dark] .chat-user-dropdown .ant-dropdown-menu-item-divider{background:#30363d!important}.chat-theme-light.chat-user-dropdown .ant-dropdown-menu,.chat-theme-light.chat-user-menu.ant-dropdown-menu,.chat-layout[data-theme=light] .chat-user-dropdown .ant-dropdown-menu{background:#fff!important;border:1px solid #e8eaed!important}.chat-theme-light.chat-user-dropdown .ant-dropdown-menu-item,.chat-theme-light.chat-user-menu .ant-dropdown-menu-item,.chat-layout[data-theme=light] .chat-user-dropdown .ant-dropdown-menu-item{color:#1f2328!important}.chat-theme-light.chat-user-dropdown .ant-dropdown-menu-item-group-title,.chat-theme-light.chat-user-menu .ant-dropdown-menu-item-group-title,.chat-layout[data-theme=light] .chat-user-dropdown .ant-dropdown-menu-item-group-title{color:#6b7280!important}.chat-theme-light.chat-user-dropdown .ant-dropdown-menu-item:hover,.chat-theme-light.chat-user-menu .ant-dropdown-menu-item:hover,.chat-layout[data-theme=light] .chat-user-dropdown .ant-dropdown-menu-item:hover{background:#eef0f3!important}.chat-theme-light.chat-user-dropdown .ant-dropdown-menu-item-divider,.chat-theme-light.chat-user-menu .ant-dropdown-menu-item-divider,.chat-layout[data-theme=light] .chat-user-dropdown .ant-dropdown-menu-item-divider{background:#e8eaed!important}.chat-main{flex:1;display:flex;flex-direction:column;overflow:hidden;min-width:0}.chat-topbar{height:52px;border-bottom:1px solid var(--chat-border);display:flex;align-items:center;padding:0 20px;gap:12px;flex-shrink:0;background:var(--chat-bg);transition:background .2s}.chat-topbar-title{font-size:15px;font-weight:600;color:var(--chat-topbar-title);flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.chat-status-badge{display:flex;align-items:center;gap:6px;padding:4px 10px;border-radius:20px;font-size:12px;font-weight:500}.chat-status-badge.running{background:var(--chat-status-run-bg);color:var(--chat-status-run-fg);border:1px solid color-mix(in srgb,var(--chat-status-run-fg) 30%,transparent)}.chat-status-badge.streaming{background:var(--chat-status-stream-bg);color:var(--chat-status-stream-fg);border:1px solid color-mix(in srgb,var(--chat-status-stream-fg) 30%,transparent);animation:glow 1.5s ease-in-out infinite}.chat-status-badge.acquiring{background:var(--chat-status-acq-bg);color:var(--chat-status-acq-fg);border:1px solid color-mix(in srgb,var(--chat-status-acq-fg) 30%,transparent)}.chat-status-badge.error{background:var(--chat-status-err-bg);color:var(--chat-status-err-fg);border:1px solid color-mix(in srgb,var(--chat-status-err-fg) 30%,transparent)}@keyframes glow{0%,to{box-shadow:0 0 #388bfd00}50%{box-shadow:0 0 8px 2px #388bfd44}}.chat-topbar-actions{display:flex;align-items:center;gap:8px}.chat-icon-btn{width:32px;height:32px;border-radius:8px;display:flex;align-items:center;justify-content:center;cursor:pointer;border:1px solid transparent;background:transparent;color:var(--chat-icon-color);transition:all .15s;font-size:14px}.chat-icon-btn:hover{background:var(--chat-icon-hover-bg);border-color:var(--chat-icon-hover-border);color:var(--chat-icon-hover-color)}.chat-icon-btn.danger:hover{background:var(--chat-danger-hover-bg);border-color:var(--chat-danger-hover-border);color:var(--chat-status-err-fg)}.chat-messages-area{flex:1;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--chat-scrollbar) transparent;padding:0}.chat-messages-area::-webkit-scrollbar{width:5px}.chat-messages-area::-webkit-scrollbar-thumb{background:var(--chat-scrollbar);border-radius:4px}.chat-messages-inner{max-width:820px;margin:0 auto;padding:24px 24px 8px}.chat-msg{display:flex;gap:12px;margin-bottom:20px;animation:fadeIn .2s ease}@keyframes fadeIn{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:translateY(0)}}.chat-msg.user{flex-direction:row-reverse}.chat-msg-avatar{width:32px;height:32px;border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:15px;flex-shrink:0;margin-top:2px}.chat-msg.user .chat-msg-avatar{background:linear-gradient(135deg,#388bfd,#a371f7)}.chat-msg.assistant .chat-msg-avatar{background:var(--chat-avatar-asst-bg);border:1px solid var(--chat-avatar-asst-border)}.chat-msg-body{flex:1;min-width:0}.chat-msg.user .chat-msg-body{display:flex;flex-direction:column;align-items:flex-end}.chat-msg-meta{font-size:11px;color:var(--chat-msg-meta);margin-bottom:5px;display:flex;align-items:center;gap:6px}.chat-msg.user .chat-msg-meta{justify-content:flex-end}.chat-msg-bubble{padding:10px 14px;border-radius:12px;font-size:14px;line-height:1.65;max-width:100%;word-break:break-word;white-space:pre-wrap}.chat-msg.user .chat-msg-bubble{background:var(--chat-msg-user-bg);color:var(--chat-msg-user-fg);border-bottom-right-radius:4px;max-width:78%}.chat-msg.assistant .chat-msg-bubble{background:var(--chat-msg-asst-bg);color:var(--chat-msg-asst-fg);border:1px solid var(--chat-msg-asst-border);border-bottom-left-radius:4px}.chat-msg-bubble p{margin:0 0 8px}.chat-msg-bubble p:last-child{margin-bottom:0}.chat-cursor{display:inline-block;width:2px;height:1em;background:var(--chat-cursor-color);margin-left:2px;vertical-align:middle;animation:blink-cursor .9s step-end infinite;border-radius:1px}@keyframes blink-cursor{0%,to{opacity:1}50%{opacity:0}}.chat-code-block{background:var(--chat-code-bg);border:1px solid var(--chat-code-border);border-radius:8px;margin:10px 0;overflow:hidden;font-size:13px}.chat-code-block-header{display:flex;justify-content:space-between;align-items:center;padding:7px 14px;background:var(--chat-code-header-bg);border-bottom:1px solid var(--chat-border)}.chat-code-lang{font-size:11px;color:var(--chat-code-lang-color);font-family:Cascadia Code,Consolas,monospace;text-transform:uppercase;letter-spacing:.05em}.chat-copy-btn{font-size:11px;color:var(--chat-copy-btn-color);background:none;border:none;cursor:pointer;padding:2px 6px;border-radius:4px;transition:all .15s;display:flex;align-items:center;gap:4px}.chat-copy-btn:hover{background:var(--chat-copy-hover-bg);color:var(--chat-copy-hover-fg)}.chat-code-block pre{margin:0;padding:14px;overflow-x:auto;font-family:Cascadia Code,Consolas,monospace;line-height:1.6;color:var(--chat-code-fg);white-space:pre;scrollbar-width:thin;scrollbar-color:var(--chat-scrollbar2) transparent}.chat-code-block pre::-webkit-scrollbar{height:4px}.chat-code-block pre::-webkit-scrollbar-thumb{background:var(--chat-scrollbar2);border-radius:4px}.chat-welcome{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;padding:40px 24px;text-align:center}.chat-welcome-logo{margin-bottom:16px}.chat-welcome-title{font-size:28px;font-weight:600;color:var(--chat-fg);margin-bottom:8px;letter-spacing:-.02em}.chat-welcome-sub{font-size:15px;color:var(--chat-welcome-sub);margin-bottom:36px;max-width:480px}.chat-start-panel{background:var(--chat-start-panel-bg);border:1px solid var(--chat-start-panel-border);border-radius:16px;padding:28px;max-width:520px;width:100%;text-align:left}.chat-start-panel-title{font-size:14px;font-weight:600;color:var(--chat-start-panel-title);margin-bottom:16px;text-transform:uppercase;letter-spacing:.06em}.chat-provider-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:20px}.chat-provider-card{display:flex;align-items:center;gap:10px;padding:12px 14px;border:1.5px solid var(--chat-provider-card-border);border-radius:10px;cursor:pointer;transition:all .15s;background:var(--chat-provider-card-bg)}.chat-provider-card:hover{border-color:var(--chat-provider-card-hover-border);background:var(--chat-provider-card-hover-bg)}.chat-provider-card.selected{border-color:var(--chat-provider-card-sel-border);background:var(--chat-provider-card-sel-bg)}.chat-provider-card-icon{width:34px;height:34px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}.chat-provider-card-name{font-size:13px;font-weight:600;color:var(--chat-provider-card-name)}.chat-provider-card-desc{font-size:11px;color:var(--chat-provider-card-desc);margin-top:2px}.chat-start-divider{font-size:12px;color:var(--chat-start-divider-fg);margin:14px 0;display:flex;align-items:center;gap:8px}.chat-start-divider:before,.chat-start-divider:after{content:"";flex:1;height:1px;background:var(--chat-start-divider-line)}.chat-start-btn{width:100%;padding:11px;background:linear-gradient(135deg,#4d6bff,#818cf8);border:none;border-radius:10px;color:#fff;font-size:14px;font-weight:600;cursor:pointer;transition:all .2s;display:flex;align-items:center;justify-content:center;gap:8px}.chat-start-btn:hover:not(:disabled){opacity:.92;transform:translateY(-1px);box-shadow:0 4px 16px #4d6bff44}.chat-start-btn:disabled{opacity:.5;cursor:not-allowed}.chat-layout .chat-project-select-antd.ant-select .ant-select-selector{background:var(--chat-input-box-bg)!important;border-color:var(--chat-input-border)!important;color:var(--chat-input-fg)!important;border-radius:10px!important;box-shadow:none!important}.chat-layout .chat-project-select-antd.ant-select-focused .ant-select-selector,.chat-layout .chat-project-select-antd.ant-select-open .ant-select-selector{border-color:#4d6bff!important;box-shadow:0 0 0 2px #4d6bff2e!important}.chat-layout .chat-project-select-antd .ant-select-selection-placeholder{color:var(--chat-input-placeholder)!important}.chat-layout .chat-project-select-antd .ant-select-selection-item{color:var(--chat-input-fg)!important}.chat-layout .chat-project-select-antd .ant-select-arrow,.chat-layout .chat-project-select-antd .ant-select-clear{color:var(--chat-muted)!important}.chat-layout .chat-project-select-antd .ant-select-clear{background:var(--chat-input-box-bg)!important}.chat-layout .chat-project-select-dropdown.ant-select-dropdown{background:var(--chat-start-panel-bg);border:1px solid var(--chat-border);border-radius:10px;box-shadow:0 8px 24px #00000047;padding:4px}.chat-layout .chat-project-select-dropdown .ant-select-item{color:var(--chat-fg);border-radius:8px}.chat-layout .chat-project-select-dropdown .ant-select-item-option-active,.chat-layout .chat-project-select-dropdown .ant-select-item-option-selected{background:var(--chat-active-bg)!important;color:var(--chat-fg)!important}.chat-layout .chat-project-select-dropdown .ant-empty-description,.chat-layout .chat-project-select-dropdown .rc-virtual-list,.chat-layout .chat-project-select-dropdown .ant-select-item-empty{color:var(--chat-muted)}.chat-layout .chat-project-select-dropdown .ant-empty-img-simple-ellipse,.chat-layout .chat-project-select-dropdown .ant-empty-img-simple-path,.chat-layout .chat-project-select-dropdown .ant-empty-img-simple-g{fill:var(--chat-border2);stroke:var(--chat-muted)}.chat-input-area{padding:12px 24px 28px;background:var(--chat-input-area-bg);flex-shrink:0;transition:background .2s}.chat-input-inner{max-width:768px;margin:0 auto}.chat-input-box{background:var(--chat-input-box-bg);border:1.5px solid var(--chat-input-border);border-radius:24px;padding:14px 16px 12px;display:flex;flex-direction:column;gap:10px;transition:border-color .18s,box-shadow .18s,background .2s;box-shadow:0 2px 12px #0000000a}.chat-input-box:focus-within{border-color:#4d6bff88;box-shadow:0 4px 20px #4d6bff1a}.chat-input-textarea{width:100%;background:none;border:none;outline:none;resize:none;color:var(--chat-input-fg);font-size:15px;line-height:1.6;font-family:inherit;min-height:28px;max-height:200px;overflow-y:auto;scrollbar-width:thin;scrollbar-color:var(--chat-scrollbar2) transparent;padding:0 4px}.chat-input-textarea::placeholder{color:var(--chat-input-placeholder)}.chat-input-textarea::-webkit-scrollbar{width:4px}.chat-input-textarea::-webkit-scrollbar-thumb{background:var(--chat-scrollbar2);border-radius:4px}.chat-input-toolbar{display:flex;align-items:center;justify-content:space-between;gap:8px}.chat-input-toolbar-left,.chat-input-toolbar-right{display:flex;align-items:center;gap:8px}.chat-chip-btn{display:inline-flex;align-items:center;gap:5px;padding:5px 12px;border-radius:20px;border:none;background:#eef3ff;color:#4d6bff;font-size:13px;font-weight:500;cursor:pointer;transition:all .15s;white-space:nowrap}.chat-layout[data-theme=dark] .chat-chip-btn{background:#1f2a4d;color:#8ba3ff}.chat-chip-btn:hover{background:#dfe8ff}.chat-layout[data-theme=dark] .chat-chip-btn:hover{background:#2a3a66}.chat-chip-btn.active{background:#4d6bff;color:#fff}.chat-attach-btn{width:36px;height:36px;border:none;background:transparent;border-radius:50%;color:var(--chat-icon-color);font-size:18px;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:color .15s,background .15s}.chat-attach-btn:hover:not(:disabled){background:var(--chat-hover);color:var(--chat-icon-hover-color)}.chat-attach-btn:disabled{opacity:.45;cursor:not-allowed}.chat-send-btn{width:36px;height:36px;border-radius:50%;background:#4d6bff;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;color:#fff;font-size:15px;transition:all .15s;flex-shrink:0}.chat-send-btn:hover:not(:disabled){background:#3d5aef;transform:scale(1.05)}.chat-send-btn:disabled{background:var(--chat-send-disabled-bg);color:var(--chat-send-disabled-fg);cursor:not-allowed;transform:none}.chat-send-btn.stop{background:#ef4444}.chat-send-btn.stop:hover{background:#dc2626}.chat-input-hint{font-size:11px;color:var(--chat-dim);margin-top:7px;text-align:center}.chat-project-select{display:flex;align-items:center;gap:8px;margin-bottom:10px;padding:8px 12px;background:var(--chat-project-select-bg);border:1px solid var(--chat-project-select-border);border-radius:10px;font-size:12px;color:var(--chat-project-select-color)}.chat-project-select-label{flex-shrink:0;display:flex;align-items:center;gap:5px}.chat-project-name{color:#4d6bff;font-weight:500}.chat-layout[data-theme=dark] .chat-project-name{color:#79c0ff}.chat-project-clear{margin-left:auto;cursor:pointer;color:var(--chat-dim);font-size:16px;line-height:1}.chat-project-clear:hover{color:var(--chat-session-title)}.chat-sidebar-divider{height:1px;background:var(--chat-divider-bg);margin:4px 12px}.chat-scroll-anchor{height:1px;flex-shrink:0}
