/* Final layout anchors for the chat canvas */
.chat-stage{width:min(1120px,100%);max-width:1120px;margin:0 auto}
.chat-stage .workspace-grid{display:block;width:100%;max-width:none;margin:0}
.chat-panel{width:100%;max-width:none;height:calc(100vh - 190px);min-height:620px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden}
.chat-panel>.panel-head{grid-column:1;grid-row:1;min-width:0}
.chat-panel>.chat-messages{grid-column:1;grid-row:2;min-width:0;min-height:0;height:auto;max-height:none;overflow-y:auto}
.chat-panel>.composer-wrap{grid-column:1;grid-row:3;width:100%;min-width:0;min-height:0;align-self:end;justify-self:stretch;box-sizing:border-box}
.chat-panel .composer{width:100%;min-width:0;box-sizing:border-box}
.chat-panel .composer-actions{width:100%;min-width:0;box-sizing:border-box}
.chat-heading-title{color:#9bdff0!important;font-size:22.4px!important;font-weight:700!important;letter-spacing:-.03em!important;line-height:1.35!important;margin:0!important;white-space:nowrap}
.chat-history{margin:2px 2px 17px;padding-top:4px;overflow:visible;position:relative;z-index:3}.chat-history-head{display:flex;align-items:center;justify-content:space-between;padding:0 7px 6px;position:relative;z-index:2}.chat-history-head .nav-label{padding:0;font-size:10.1px}.new-chat-btn{width:22px;height:22px;border:1px solid rgba(95,212,255,.28);border-radius:6px;background:rgba(47,146,180,.12);color:#94e2ee;font-size:15.7px;line-height:1;cursor:pointer}.new-chat-btn:hover{background:rgba(47,186,215,.24);border-color:#6be3ee}.chat-items{display:grid;gap:2px;max-height:250px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin}.chat-item{display:flex;align-items:center;gap:7px;width:100%;border:0;background:transparent;color:#809ca9;text-align:left;border-radius:7px;padding:7px 8px;font:inherit;font-size:10.1px;cursor:pointer;white-space:nowrap;min-width:0}.chat-item:hover{background:rgba(81,176,221,.08);color:#d5eef4}.chat-item.active{background:rgba(48,132,170,.16);color:#d4f2f7}.chat-item-dot{width:5px;height:5px;border:1px solid #6b94a3;border-radius:50%;flex:none}.chat-item.active .chat-item-dot{background:#61dbe6;border-color:#61dbe6;box-shadow:0 0 8px #61dbe6}.chat-item span:nth-child(2){overflow:hidden;text-overflow:ellipsis;min-width:0}.chat-item time{margin-left:auto;color:#5f7e8e;font-size:9px}.chat-list-note{padding:7px 8px;color:#668391;font-size:10px}.current-chat-title{border:1px solid rgba(102,194,220,.18);background:rgba(40,118,151,.1);border-radius:6px;color:#a9dbe6;padding:5px 8px;margin-left:7px;font:inherit;font-size:11.2px;cursor:pointer}.current-chat-title span{color:#6f9baa;margin-left:3px}.current-chat-title:hover{background:rgba(40,154,181,.2);border-color:rgba(102,220,235,.42)}
.chat-items{scrollbar-width:none}.chat-items::-webkit-scrollbar{width:0;height:0}.new-chat-btn{width:auto;min-width:70px;height:29px;padding:0 10px;border-radius:9px;background:linear-gradient(145deg,rgba(67,176,213,.24),rgba(27,95,138,.16));border-color:rgba(100,218,237,.34);color:#9beef7;font-size:11.2px;font-weight:700;display:flex;align-items:center;justify-content:center;gap:5px;box-shadow:0 5px 16px rgba(30,139,182,.14);transition:transform .2s,background .2s,box-shadow .2s}.new-chat-glyph{font-size:17px;line-height:1}.new-chat-label{font-size:11px;letter-spacing:.04em}.new-chat-btn:hover{transform:translateY(-1px);background:linear-gradient(145deg,rgba(76,204,232,.4),rgba(31,122,170,.24));box-shadow:0 7px 20px rgba(30,160,204,.24)}
#view-overview{min-height:calc(100vh - 120px)}
#view-overview .chat-stage{height:calc(100vh - 120px);display:flex;flex-direction:column}
#view-overview .chat-stage .workspace-grid{flex:1;min-height:0}
#view-overview .chat-panel{height:100%;min-height:0}
.main{padding-bottom:0}

@media(max-width:820px){
  .chat-stage{width:100%}
  .chat-panel{height:calc(100vh - 170px);min-height:540px}
  #view-overview{min-height:calc(100vh - 109px)}
  #view-overview .chat-stage{height:calc(100vh - 109px)}
}

/* Keep the task list at the lower edge and give conversation names more room. */
.sidebar-todos{margin-top:auto;margin-bottom:14px}
.sidebar-mini-stats{display:none!important}
.chat-history-head .nav-label{font-size:11.2px}
.chat-item{font-size:11.2px;padding-top:8px;padding-bottom:8px}
.chat-item time{font-size:10.1px}

.chat-item{position:relative}
.chat-messages .message.user{width:100%;justify-content:flex-start;flex-direction:row-reverse;margin-left:0}
.chat-messages .message.user .bubble{max-width:72%;text-align:right}
.chat-messages .message.user .message-meta{justify-content:flex-end}
.chat-messages .message.user .bubble p{display:inline-block;text-align:left;padding:9px 12px;border:1px solid rgba(91,190,220,.22);border-radius:11px 3px 11px 11px;background:rgba(45,142,177,.16);color:#d9f2f6}
.chat-messages .message.user .message-avatar{background:linear-gradient(145deg,#79d7e9,#3474bd);color:#082032}
.empty-chat-state{height:100%;display:grid;place-content:center;text-align:center;gap:8px;color:#7395a5}.empty-chat-state strong{font-size:18px;color:#bcecf5}.empty-chat-state span{font-size:12px;color:#668391}
body.light-theme .chat-messages .message.user .bubble p{border-color:rgba(47,145,176,.25);background:rgba(63,169,198,.13);color:#214f60}
.chat-item>span:nth-child(2){flex:1;min-width:0}
.chat-more{border:0;background:transparent;color:#6d8b9a;font:inherit;font-size:12.3px;letter-spacing:1px;line-height:1;padding:3px 2px;cursor:pointer;opacity:.7;flex:none}
.chat-more:hover{color:#b9eff7;opacity:1}
.chat-menu{position:fixed;z-index:30;min-width:112px;padding:5px;border:1px solid rgba(105,194,221,.3);border-radius:9px;background:rgba(10,27,38,.97);box-shadow:0 14px 32px rgba(0,0,0,.38);backdrop-filter:blur(15px)}
.chat-menu button{display:block;width:100%;border:0;border-radius:6px;padding:8px 10px;background:transparent;color:#b3ced8;text-align:left;font:inherit;font-size:11.2px;cursor:pointer}
.chat-menu button:hover{background:rgba(86,192,222,.14);color:#e5fbff}.chat-menu button.danger{color:#ff9e9e}.chat-menu button.danger:hover{background:rgba(218,88,88,.12);color:#ffc4c4}
.theme-toggle{display:flex;align-items:center;gap:6px;border:1px solid rgba(105,194,221,.2);border-radius:7px;background:rgba(54,146,175,.08);color:#9ecbd5;padding:6px 8px;font:inherit;font-size:11.2px;cursor:pointer;white-space:nowrap}
.theme-toggle span{font-size:14.6px;line-height:1}.theme-toggle em{font-style:normal}.theme-toggle:hover{border-color:rgba(105,220,235,.5);background:rgba(54,174,198,.15)}

body.light-theme{--bg:#edf5f8;--panel:#ffffff;--panel2:#f5fafc;--line:rgba(35,91,111,.18);--text:#16303d;--muted:#55717f;--shadow:0 18px 50px rgba(34,80,98,.12);background-image:radial-gradient(circle at 76% 5%,rgba(111,203,236,.2),transparent 30%),linear-gradient(rgba(22,87,111,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(22,87,111,.045) 1px,transparent 1px)}
body.light-theme .sidebar{background:rgba(244,250,252,.94);backdrop-filter:blur(18px)}
body.light-theme .brand-name,body.light-theme .breadcrumbs strong,body.light-theme .profile-btn,body.light-theme .sidebar-user{color:#183b4b}
body.light-theme .brand-sub,body.light-theme .nav-label,body.light-theme .workspace-copy small,body.light-theme .secondary-nav .nav-label{color:#6c8995}
body.light-theme .workspace-switcher,body.light-theme .panel,body.light-theme .chat-panel{background:rgba(255,255,255,.82)}
body.light-theme .nav-item{color:#547582}body.light-theme .nav-item:hover{color:#173e4d;background:rgba(37,159,194,.1)}body.light-theme .nav-item.active{color:#173e4d;background:linear-gradient(90deg,rgba(59,174,212,.2),rgba(59,174,212,.06))}
body.light-theme .chat-item{color:#557481}body.light-theme .chat-item.active{color:#1f5668;background:rgba(59,174,212,.14)}body.light-theme .chat-more{color:#6f929e}
body.light-theme .topbar{border-color:var(--line)}body.light-theme .breadcrumbs{color:#6c8995}body.light-theme .connection-status{color:#567783}
body.light-theme .time-readout{border-color:var(--line)}body.light-theme .time-readout span{color:#6b8996}body.light-theme .time-readout strong{color:#1a4d5d}
body.light-theme .chat-messages{background:rgba(247,252,253,.38)}body.light-theme .composer-wrap,body.light-theme .chat-panel>.composer-wrap{background:#ffffff!important;border-top:1px solid rgba(47,145,176,.12)}body.light-theme .composer{background:#ffffff!important;border-color:rgba(47,145,176,.42)}body.light-theme .composer textarea{background:transparent!important;color:#173a47}body.light-theme .composer textarea::placeholder{color:#78919b}body.light-theme .attach-btn{color:#5f8491}body.light-theme .composer-actions{background:#ffffff!important}body.light-theme .composer-actions .ghost-btn{background:#f2f8fa;color:#376777;border-color:rgba(47,145,176,.28)}body.light-theme .model-mode{color:#527481;background:#f2f8fa;border-color:rgba(47,145,176,.3)}body.light-theme .model-mode label{color:#527481}body.light-theme .model-mode label.selected,body.light-theme .model-mode label:has(input:checked){color:#1f6474;background:rgba(47,161,191,.14)}
body.light-theme .model-chip,body.light-theme .current-chat-title,body.light-theme .theme-toggle{color:#3a7180;background:rgba(49,161,190,.08);border-color:rgba(47,145,176,.24)}
body.light-theme .sidebar-todos .todo-item{color:#557481}body.light-theme .local-pill{border-color:var(--line);color:#42806f}
body.light-theme .chat-menu{background:rgba(255,255,255,.98);border-color:rgba(47,145,176,.28);box-shadow:0 14px 32px rgba(25,75,92,.18)}body.light-theme .chat-menu button{color:#416875}body.light-theme .chat-menu button:hover{background:rgba(47,161,191,.1);color:#173e4d}
body.light-theme .message-meta strong,body.light-theme .bubble{color:#265666}body.light-theme .bubble p{color:#527482}
@media(max-width:560px){.composer-actions{flex-wrap:nowrap;overflow-x:auto;padding-bottom:2px}.composer-actions .primary-btn,.composer-actions .ghost-btn{flex:none}.model-mode{width:auto;flex:none;margin-left:auto}.model-mode label{flex:none;padding-left:5px;padding-right:5px;font-size:9px}}
/* 联网搜索和混合模式 */
.model-mode{flex-wrap:wrap}
.web-search-toggle{display:flex;align-items:center;gap:4px;margin-left:0;padding:5px 8px;border:1px solid rgba(111,190,214,.18);border-radius:8px;background:rgba(8,25,35,.65);color:#c5f3f8;font-size:10.1px;white-space:nowrap;cursor:pointer}
.web-search-toggle input{appearance:none;width:7px;height:7px;border-radius:50%;border:1px solid #698a99;margin:0}
.web-search-toggle input:checked{border:2px solid #aaf5ff;background:#39cce3}
.knowledge-toggle{display:flex;align-items:center;gap:4px;margin-left:0;padding:5px 8px;border:1px solid rgba(111,190,214,.18);border-radius:8px;background:rgba(8,25,35,.65);color:#c5f3f8;font-size:10.1px;white-space:nowrap;cursor:pointer}
.knowledge-toggle input{appearance:none;width:7px;height:7px;border-radius:50%;border:1px solid #698a99;margin:0}
.knowledge-toggle input:checked{border:2px solid #aaf5ff;background:#39cce3}
body.light-theme .knowledge-toggle{color:#1f6474;background:#f2f8fa;border-color:rgba(47,145,176,.3)}
body.light-theme .knowledge-toggle input{border-color:#71939d}
body.light-theme .knowledge-toggle input:checked{border-color:#2b8fa6;background:#39a9bd}
.source-list{display:grid;gap:4px;margin-top:12px;padding-top:9px;border-top:1px solid rgba(112,193,214,.16);font-size:10.1px}
.source-list span{color:#74b8c8}
.source-list a{color:#7ccfe2;text-decoration:none;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.source-list a:hover{text-decoration:underline;color:#b7f3ff}
body.light-theme .web-search-toggle{color:#1f6474;background:#f2f8fa;border-color:rgba(47,145,176,.3)}
body.light-theme .source-list{border-color:rgba(47,145,176,.18)}
body.light-theme .source-list a{color:#27738a}
/* 隐藏浏览器窗口外层滚动条，保留页面本身的滚动能力；聊天区、任务列表仍使用各自滚动条 */
html,body{scrollbar-width:none}
html::-webkit-scrollbar,body::-webkit-scrollbar{width:0;height:0;display:none}

/* 可读性：聊天输入框最多显示 8 行，超过后在输入框内部滚动 */
.chat-messages .bubble{font-size:15.4px;line-height:1.82}
.chat-messages .message-meta strong{font-size:13.4px}
.chat-messages .message-meta span{font-size:10.8px}
.answer-content{white-space:pre-wrap;word-break:break-word}
.rich-text p{margin:0 0 10px}
.rich-text p:last-child{margin-bottom:0}
.rich-text h2,.rich-text h3,.rich-text h4,.rich-text h5,.rich-text h6{margin:15px 0 8px;color:#d9f8ff;line-height:1.32;letter-spacing:-.01em}
/* Markdown 标题映射：#=27、##=23、###=20、####=18、#####=16、######=14px */
.rich-text h2{font-size:27px}.rich-text h3{font-size:23px}.rich-text h4{font-size:20px}.rich-text h5{font-size:18px}.rich-text h6{font-size:14px}
.rich-text .md-heading-1{font-size:27px}.rich-text .md-heading-2{font-size:23px}.rich-text .md-heading-3{font-size:20px}.rich-text .md-heading-4{font-size:18px}.rich-text .md-heading-5{font-size:16px}.rich-text .md-heading-6{font-size:14px}
.rich-text strong{color:#e8fbff;font-weight:800}.rich-text code{padding:2px 5px;border-radius:4px;background:rgba(95,212,255,.1);color:#9eefff;font-family:ui-monospace,Consolas,monospace;font-size:.9em}
.rich-text a{color:#7dd9eb;text-decoration:none;border-bottom:1px solid rgba(125,217,235,.35)}.rich-text a:hover{color:#d4fbff}
.rich-text ul{margin:7px 0 10px;padding-left:22px}.rich-text li{margin:4px 0}
.process-log{margin-top:9px;color:#7598a7;font-size:10.8px;line-height:1.55;white-space:pre-wrap;letter-spacing:.01em}
body.light-theme .rich-text h2,body.light-theme .rich-text h3,body.light-theme .rich-text h4{color:#24596b}
body.light-theme .rich-text strong{color:#1d5265}body.light-theme .rich-text code{background:rgba(47,145,176,.1);color:#286b7c}
body.light-theme .process-log{color:#6a8995}
.composer textarea{max-height:176px;overflow-y:hidden;scrollbar-width:thin;scrollbar-color:rgba(89,196,224,.55) transparent}
.composer textarea::-webkit-scrollbar{width:7px}
.composer textarea::-webkit-scrollbar-track{background:transparent}
.composer textarea::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(104,221,239,.8),rgba(40,119,177,.7));border-radius:10px;border:2px solid transparent;background-clip:padding-box}
/* 对话区滚动条 */
.chat-messages{scrollbar-width:thin;scrollbar-color:rgba(89,196,224,.55) transparent}
.chat-messages::-webkit-scrollbar{width:8px}
.chat-messages::-webkit-scrollbar-track{background:transparent;margin:8px 0}
.chat-messages::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(111,224,239,.8),rgba(44,123,181,.72));border-radius:10px;border:2px solid transparent;background-clip:padding-box}
.chat-messages::-webkit-scrollbar-thumb:hover{background:linear-gradient(180deg,#a5f6ff,#3ca9df);background-clip:padding-box}
body.light-theme .chat-messages{scrollbar-color:rgba(42,139,169,.52) transparent}
body.light-theme .chat-messages::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(60,169,195,.7),rgba(66,127,159,.58));background-clip:padding-box}


/* 运行状态、任务弹层和图片附件的统一视觉 */
.toast{transition:opacity .5s ease,transform .5s ease}
.collapsible-task-panel{display:block;max-height:720px;opacity:1;transform:translateY(0);overflow:hidden;transition:max-height .9s ease,opacity .9s ease,transform .9s ease,margin .9s ease}
.collapsible-task-panel.is-hidden{display:block;max-height:0;opacity:0;transform:translateY(-10px);pointer-events:none;margin-top:0!important;margin-bottom:0!important}
.tasks-panel .task-list{scrollbar-width:thin;scrollbar-color:rgba(89,196,224,.55) transparent}
.tasks-panel .task-list::-webkit-scrollbar{width:8px}.tasks-panel .task-list::-webkit-scrollbar-track{background:transparent}.tasks-panel .task-list::-webkit-scrollbar-thumb{background:linear-gradient(180deg,rgba(111,224,239,.8),rgba(44,123,181,.72));border-radius:10px;border:2px solid transparent;background-clip:padding-box}
.rich-text h5,.rich-text h6{color:#c6eef7}.rich-text h5{font-size:18px}.rich-text h6{font-size:14px}.rich-text hr{border:0;border-top:1px solid rgba(112,193,214,.24);margin:14px 0}.rich-text em{color:#bcecf5}
.model-picker{display:flex;align-items:center;gap:5px;padding:4px 7px;border:1px solid rgba(111,190,214,.18);border-radius:8px;background:rgba(8,25,35,.65);color:#8fb3c0;font-size:10px;white-space:nowrap}
.model-picker select{border:0;background:transparent;color:#c7eef4;font:inherit;outline:0;max-width:150px}.model-picker option{color:#16303d;background:#fff}
.attachment-preview{display:flex;gap:7px;flex-wrap:wrap;margin:0 0 7px}.attachment-chip{display:inline-flex;align-items:center;gap:5px;max-width:220px;padding:4px 6px;border:1px solid rgba(95,212,255,.25);border-radius:7px;background:rgba(18,57,72,.48);color:#acd7e0;font-size:10px}.attachment-chip img{width:25px;height:25px;object-fit:cover;border-radius:4px}.attachment-chip b{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-weight:500}.attachment-chip button{border:0;background:transparent;color:#8fb8c2;cursor:pointer;font-size:15px;line-height:1;padding:0 2px}
body.light-theme .toast{background:rgba(255,255,255,.97);border-color:rgba(47,145,176,.34);box-shadow:0 13px 35px rgba(25,75,92,.18);color:#173e4d}body.light-theme .toast small{color:#62818d}
body.light-theme .model-picker{color:#527481;background:#f2f8fa;border-color:rgba(47,145,176,.3)}body.light-theme .model-picker select{color:#285f70}body.light-theme .attachment-chip{background:rgba(222,246,250,.9);color:#285f70;border-color:rgba(47,145,176,.28)}
body.light-theme .rich-text h5,body.light-theme .rich-text h6{color:#24596b}body.light-theme .rich-text hr{border-color:rgba(47,145,176,.2)}


/* 任务面板展开时在同一视口内顶起聊天区，避免页面整体滚动 */
#view-overview .workspace-grid{display:flex;flex-direction:column;gap:0;height:100%;min-height:0}
#view-overview .chat-panel{height:auto;min-height:0;flex:1 1 auto;transition:flex-basis .9s ease,min-height .9s ease}
#view-overview .tasks-panel{flex:0 0 auto;width:100%;margin-top:0;max-height:330px}
#view-overview .collapsible-task-panel.is-hidden{max-height:0}
#view-overview.tasks-open .chat-panel{min-height:360px}

/* 模型选择器：当前固定单模型，样式保留为后续切换入口 */
.model-picker{margin-left:auto;min-width:172px;justify-content:space-between;gap:8px;padding:5px 8px;border-radius:9px;background:rgba(7,25,36,.82);box-shadow:inset 0 0 0 1px rgba(95,212,255,.08)}
.model-picker>span{color:#79a6b5;font-size:10px}.model-picker select{appearance:none;min-width:122px;padding:3px 22px 3px 8px;border-radius:6px;background:rgba(31,94,121,.25);color:#c8eff5;cursor:not-allowed;text-align:right}
.model-picker select:disabled{opacity:.92;color:#b5d7df;pointer-events:none}
.model-picker:after{content:'固定';color:#7faeb9;font-size:9px;letter-spacing:.04em;margin-left:3px;pointer-events:none;border-left:1px solid rgba(111,190,214,.2);padding-left:7px}
body.light-theme .model-picker{background:#f4fafb;box-shadow:inset 0 0 0 1px rgba(47,145,176,.08)}body.light-theme .model-picker>span{color:#547b88}body.light-theme .model-picker select{background:#eaf4f7;color:#3c6876}body.light-theme .model-picker:after{color:#4b8998;border-color:rgba(47,145,176,.2)}

/* 总览：小尔 → 能力大类 → 具体模型/工具 → 工作站 */
.tree-orchestration{min-height:540px;padding:28px 26px 16px;overflow:hidden;background:radial-gradient(circle at 50% 8%,rgba(36,131,173,.17),transparent 28%),rgba(10,24,34,.76)}
.tree-root-node{position:relative;z-index:3;width:250px;margin:0 auto}
.tree-lines{position:absolute;z-index:1;inset:0;width:100%;height:100%;pointer-events:none}
.tree-structural-lines path{fill:none;stroke:rgba(89,190,220,.28);stroke-width:1.4;vector-effect:non-scaling-stroke}
.tree-flow-dots circle{fill:#d7ffff;filter:url(#treeGlow)}
.tree-level-two{position:relative;z-index:2;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin:72px 1% 0}
.tree-group{min-width:0}.tree-group-card{display:flex;align-items:center;gap:8px;min-height:58px;padding:10px 11px;border:1px solid rgba(105,198,224,.3);border-radius:10px;background:rgba(11,36,49,.92);box-shadow:0 7px 22px rgba(0,0,0,.16)}
.tree-group-card strong{display:block;font-size:12px;color:#d9f7fc}.tree-group-card small{display:block;margin-top:3px;color:#7195a3;font-size:9.8px}.tree-group-icon{display:grid;place-items:center;width:26px;height:26px;flex:none;border-radius:7px;background:rgba(95,212,255,.14);color:#79e4f4;font-size:15px}
.tree-leaves{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-auto-flow:row;grid-auto-rows:minmax(58px,auto);align-content:start;gap:6px;margin-top:54px}
.tree-leaf{min-height:58px;padding:8px 7px;border:1px solid rgba(118,173,192,.18);border-radius:8px;background:rgba(15,36,47,.88);box-shadow:0 5px 14px rgba(0,0,0,.13)}.tree-leaf b{display:block;color:#b8dce4;font-size:9.8px;line-height:1.3;font-weight:700}.tree-leaf small{display:block;color:#668895;font-size:8.8px;line-height:1.3;margin-top:4px}
.tree-to-workstation circle{fill:#eaffff;opacity:.95}
.tree-workstation{position:relative;z-index:3;width:min(720px,82%);margin:118px auto 0;min-height:72px;background:rgba(18,33,43,.95);border-color:rgba(95,212,255,.34);box-shadow:0 0 28px rgba(42,170,215,.13)}
.tree-workstation .hardware-metrics{gap:18px}.tree-workstation .hardware-metrics b{font-size:13px}.tree-workstation .hardware-metrics small{font-size:8.8px}
@media(max-width:1000px){.tree-level-two{gap:9px;margin-left:0;margin-right:0}.tree-group-card{padding:9px 7px}.tree-leaf{padding:7px 5px}.tree-leaf b{font-size:9px}.tree-workstation{width:96%}}
@media(max-width:720px){.tree-orchestration{min-height:860px;overflow:auto}.tree-level-two{grid-template-columns:repeat(2,minmax(0,1fr));row-gap:30px}.tree-lines{opacity:.72}.tree-workstation{margin-top:170px}.tree-leaves{grid-template-columns:1fr}.model-picker{min-width:158px}}
body.light-theme .tree-orchestration{background:radial-gradient(circle at 50% 8%,rgba(111,203,236,.2),transparent 28%),rgba(255,255,255,.86)}body.light-theme .tree-structural-lines path{stroke:rgba(47,145,176,.3)}body.light-theme .tree-group-card{background:rgba(240,250,252,.92);border-color:rgba(47,145,176,.27)}body.light-theme .tree-group-card strong{color:#24596b}body.light-theme .tree-leaf{background:rgba(248,253,254,.95);border-color:rgba(47,145,176,.17)}body.light-theme .tree-leaf b{color:#356a78}body.light-theme .tree-leaf small{color:#6c8b95}body.light-theme .tree-workstation{background:rgba(248,253,254,.96);border-color:rgba(47,145,176,.27)}

/* 浅色模式：所有业务卡片统一使用浅底、深字和浅边框 */
body.light-theme .dash-stat,
body.light-theme .dashboard-block,
body.light-theme .metric-card,
body.light-theme .capability-card,
body.light-theme .task-board,
body.light-theme .asset-toolbar,
body.light-theme .asset-card,
body.light-theme .workflow-card,
body.light-theme .device-stat,
body.light-theme .device-list,
body.light-theme .knowledge-hero,
body.light-theme .settings-card,
body.light-theme .command-strip{
  background:rgba(255,255,255,.9)!important;
  border-color:rgba(47,145,176,.2)!important;
  color:#244b5a;
  box-shadow:0 12px 30px rgba(37,91,110,.08);
}
body.light-theme .dash-stat>span,
body.light-theme .metric-head,
body.light-theme .dashboard-block .panel-kicker,
body.light-theme .dash-stat small,
body.light-theme .metric-card small,
body.light-theme .capability-card small,
body.light-theme .device-stat small,
body.light-theme .device-stat span,
body.light-theme .workflow-meta,
body.light-theme .workflow-card p,
body.light-theme .knowledge-hero p{color:#64818c}
body.light-theme .dash-stat>strong,
body.light-theme .metric-card>strong,
body.light-theme .workflow-card h3,
body.light-theme .device-stat>strong,
body.light-theme .knowledge-hero h3,
body.light-theme .capability-card strong{color:#214f60}
body.light-theme .dash-progress,
body.light-theme .progress,
body.light-theme .task-progress{background:rgba(47,145,176,.12)}
body.light-theme .dashboard-block .panel-head,
body.light-theme .model-row,
body.light-theme .mini-task,
body.light-theme .device-row,
body.light-theme .board-row{border-color:rgba(47,145,176,.13)}
body.light-theme .model-row strong,
body.light-theme .mini-task strong,
body.light-theme .board-row strong,
body.light-theme .task-title strong{color:#285b6c}
body.light-theme .model-row small,
body.light-theme .mini-task small,
body.light-theme .board-row small,
body.light-theme .task-info small{color:#6a8995}
body.light-theme .board-tabs{border-color:rgba(47,145,176,.15)}
body.light-theme .board-tabs button{color:#5b7b88}body.light-theme .board-tabs button.active{color:#24596b}
body.light-theme .board-row{color:#527482}body.light-theme .board-filter{color:#668692}
body.light-theme .asset-filter,
body.light-theme .model-select,
body.light-theme .search-box{background:#f8fcfd;border-color:rgba(47,145,176,.22);color:#4e7582}
body.light-theme .search-box input{color:#244f5d}body.light-theme .search-box input::placeholder{color:#87a1aa}
body.light-theme .asset-card>strong{color:#285b6c}body.light-theme .asset-card>small{color:#6a8995}
body.light-theme .workflow-card.featured{background:linear-gradient(135deg,rgba(239,250,253,.98),rgba(255,255,255,.95))!important;border-color:rgba(47,145,176,.3)!important}
body.light-theme .workflow-badge{background:rgba(47,161,191,.12);color:#337c8d}
body.light-theme .device-row{color:#527482}body.light-theme .device-main strong{color:#285b6c}body.light-theme .device-main small{color:#6a8995}
body.light-theme .device-row>button{color:#3e8293}body.light-theme .device-row.dimmed{opacity:.68}
body.light-theme .knowledge-stats{color:#5c7d89}
body.light-theme .knowledge-stats b{color:#24596b}
body.light-theme .command-strip strong{color:#285b6c}body.light-theme .command-strip small{color:#688793;border-color:rgba(47,145,176,.18)}
body.light-theme .command-strip-state{color:#3e8a70}
body.light-theme .tree-root-node,
body.light-theme .tree-orchestration .agent-node,
body.light-theme .tree-orchestration .map-node{background:linear-gradient(120deg,rgba(225,248,252,.98),rgba(248,253,254,.97))!important;border-color:rgba(47,145,176,.34);box-shadow:0 10px 24px rgba(37,91,110,.1);color:#24596b}
body.light-theme .tree-root-node strong,
body.light-theme .tree-orchestration .map-node strong{color:#24596b}
body.light-theme .tree-root-node small,
body.light-theme .tree-orchestration .map-node small{color:#668692}
body.light-theme .tree-workstation strong{color:#24596b}body.light-theme .tree-workstation small{color:#668692}
body.light-theme .tree-workstation .hardware-metrics b{color:#24596b}body.light-theme .tree-workstation .hardware-metrics small{color:#6b8b96}
body.light-theme .hardware-node{background:rgba(248,253,254,.96);border-color:rgba(47,145,176,.24);color:#285b6c}

/* Keep the floating new-chat control inside a safe top area and give send a clearer action affordance. */
.new-chat-btn{position:relative;z-index:4}
.composer .send-btn{width:34px;height:34px;flex:none;display:grid;place-items:center;border:1px solid rgba(160,242,255,.58);border-radius:11px;background:linear-gradient(145deg,#8cecf7 0%,#45cfe7 42%,#188bd8 100%);color:#062033;font-size:20px;font-weight:900;line-height:1;box-shadow:0 5px 16px rgba(35,184,226,.28),inset 0 1px 0 rgba(255,255,255,.46);transition:transform .18s ease,filter .18s ease,box-shadow .18s ease}
.composer .send-btn:hover{transform:translateY(-1px);filter:brightness(1.08);box-shadow:0 8px 22px rgba(35,184,226,.38),inset 0 1px 0 rgba(255,255,255,.52)}
.composer .send-btn:active{transform:translateY(0) scale(.96)}
.composer .send-btn:focus-visible{outline:2px solid rgba(140,238,247,.8);outline-offset:2px}
body.light-theme .composer .send-btn{color:#07344b;border-color:rgba(20,141,181,.38);box-shadow:0 5px 16px rgba(23,126,163,.18),inset 0 1px 0 rgba(255,255,255,.7)}

/* Workbench navigation lives in the title bar; the sidebar is reserved for chats and todos. */
 .sidebar{padding:26px 16px 18px;overflow:hidden}
.sidebar .brand{padding-bottom:18px}
.sidebar .chat-history{display:flex;flex-direction:column;flex:1;min-height:0;margin:0 2px 12px;padding-top:4px;overflow:visible}
.sidebar .chat-history .chat-items{flex:1;min-height:0;max-height:none}
.sidebar .sidebar-todos{flex:0 0 auto;max-height:250px;overflow-y:auto;overflow-x:hidden;margin:8px 0 12px}
.sidebar .sidebar-footer{flex:0 0 auto}
.topbar{height:78px;margin-bottom:22px;gap:18px}
.breadcrumbs{flex:0 1 auto;min-width:0}
.top-nav{display:flex;align-items:center;justify-content:center;gap:3px;flex:1;min-width:0;overflow-x:auto;scrollbar-width:none}
.top-nav::-webkit-scrollbar{display:none}
.top-nav .nav-item{width:auto;flex:none;display:flex;align-items:center;gap:6px;margin:0;padding:8px 10px;font-size:11.2px;white-space:nowrap}
.top-nav .nav-icon{width:auto;font-size:15.7px}
.top-nav .nav-item.active{box-shadow:inset 0 -2px 0 var(--blue);background:rgba(55,146,200,.14)}
.top-nav .nav-badge{padding:1px 5px;font-size:9px}
.runtime-stack{display:flex;flex-direction:column;align-items:flex-end;gap:4px;flex:none}
.runtime-stack .connection-status{font-size:10.1px;white-space:nowrap}
.runtime-stack .time-readout{padding:0;border:0;display:block}
.runtime-stack .time-readout strong{font-size:13.4px;letter-spacing:.06em}
.top-actions{gap:13px;flex:none}

@media(max-width:1100px){
  .topbar{gap:10px}
  .top-nav .nav-item{padding-left:7px;padding-right:7px}
  .top-nav .nav-item{font-size:10.1px}
}

/* 最终布局约定：主内容左右各留 20px；待办标题和每行几何尺寸不随断点变化。 */
.main{padding-left:20px!important;padding-right:20px!important}
.sidebar .sidebar-todos .nav-label{display:block!important;height:auto!important;min-height:0!important;padding:0 12px 8px!important;font-size:13.4px!important;line-height:1.2!important}
.sidebar .todo-item{display:flex!important;align-items:center!important;gap:7px!important;height:29px!important;min-height:29px!important;padding:7px 9px!important;font-size:12.3px!important;line-height:1.2!important}
.sidebar .todo-item span:nth-child(2),.sidebar .todo-item time{display:inline!important}

/* 左栏内部布局固定：只有整块左栏滑入/滑出，不随 820px 断点改变行高和内边距。 */
@media(max-width:1100px){
  .sidebar{padding:26px 16px 18px!important}
  .sidebar .brand{height:52px!important;min-height:52px!important;padding:0 10px 18px!important}
  .sidebar .nav-item{height:auto!important;min-height:0!important;margin:2px 0!important;padding:11px 12px!important;justify-content:flex-start!important;gap:11px!important;font-size:14.6px!important}
  .sidebar .nav-item .nav-icon{width:19px!important;font-size:17.9px!important}
  .sidebar .nav-item .nav-badge{display:block!important}
  .sidebar .workspace-switcher{justify-content:flex-start!important;padding:11px!important}
  .sidebar .chat-history-head,.sidebar .sidebar-todos .nav-label{height:auto!important;min-height:0!important}
  .sidebar .chat-item{height:32px!important;min-height:32px!important}
  .sidebar .todo-item{height:29px!important;min-height:29px!important}
  .sidebar .sidebar-user{height:auto!important;min-height:29px!important}
}
@media(max-width:820px){
  .topbar{gap:7px}
  .top-nav{justify-content:flex-start;gap:2px}
  .top-nav .nav-item{font-size:0;width:34px;height:34px;min-height:34px;padding:0;justify-content:center;border-radius:8px}
  .top-nav .nav-item .nav-icon{font-size:18px}
  .top-nav .nav-item .nav-badge{display:none}
  .runtime-stack .connection-status span{display:none}
  .runtime-stack .connection-status{font-size:0}
  .runtime-stack .connection-status i{margin:0}
  .runtime-stack .time-readout strong{font-size:11.2px}
}
/* Keep both sidebar canvases fixed; item counts must not resize either region. */
.sidebar{
  display:grid;
  grid-template-rows:auto minmax(180px,1fr) 320px auto;
  align-content:stretch;
}
.sidebar .chat-history{
  grid-row:2;
  flex:none;
  height:auto;
  min-height:0;
  overflow:visible;
}
.sidebar .chat-history .chat-items{
  display:grid;
  grid-auto-rows:32px;
  align-content:start;
  height:100%;
  min-height:0;
  max-height:none;
  overflow-y:auto;
  overflow-x:hidden;
}
.sidebar .chat-item{
  height:32px;
  min-height:32px;
  box-sizing:border-box;
}
.sidebar .sidebar-todos{
  grid-row:3;
  height:320px;
  min-height:320px;
  max-height:320px;
  margin:8px 0 12px;
  overflow-y:auto;
  overflow-x:hidden;
}
.sidebar .sidebar-todos .todo-item{
  height:29px;
  min-height:29px;
  box-sizing:border-box;
}
.sidebar .sidebar-footer{
  grid-row:4;
}
/* Light theme contrast pass: keep every surface readable against the pale canvas. */
body.light-theme{
  color-scheme:light;
  --text:#173b4a;
  --muted:#5b7885;
  --line:rgba(38,95,113,.22);
}
body.light-theme .brand-name,
body.light-theme .breadcrumbs,
body.light-theme .sidebar-user,
body.light-theme .top-nav .nav-item,
body.light-theme .panel-head h3,
body.light-theme .section-head h2,
body.light-theme .full-view-head h1,
body.light-theme .dashboard-section-head h2{
  color:#173f50;
}
body.light-theme .brand-sub,
body.light-theme .nav-label,
body.light-theme .section-head p,
body.light-theme .full-view-head p,
body.light-theme .dashboard-section-head p,
body.light-theme .panel-kicker,
body.light-theme .sidebar-user small{
  color:#5d7d8a;
}
body.light-theme .top-nav .nav-item:hover{
  color:#124c61;
  background:rgba(42,151,183,.12);
}
body.light-theme .top-nav .nav-item.active{
  color:#124c61;
  background:rgba(42,151,183,.16);
  box-shadow:inset 0 -2px 0 #2b9fbb;
}
body.light-theme .top-nav .nav-icon{color:#3e8294}
body.light-theme .chat-heading-title{color:#176277!important}
body.light-theme .panel,
body.light-theme .chat-panel,
body.light-theme .tasks-panel,
body.light-theme .dashboard-block,
body.light-theme .task-board,
body.light-theme .device-list,
body.light-theme .asset-toolbar,
body.light-theme .workflow-card,
body.light-theme .device-stat,
body.light-theme .knowledge-hero,
body.light-theme .settings-card{
  background:rgba(255,255,255,.96)!important;
  border-color:rgba(42,112,133,.22)!important;
  color:#244e5e;
}
body.light-theme .panel-head{
  border-color:rgba(42,112,133,.16);
}
body.light-theme .chat-messages{background:#f8fcfd}
body.light-theme .empty-chat-state{color:#5b7c89}
body.light-theme .empty-chat-state strong{color:#1d6275}
body.light-theme .empty-chat-state span{color:#6b8791}
body.light-theme .message-meta strong{color:#1e6073}
body.light-theme .message-meta span{color:#698894}
body.light-theme .bubble{color:#244e5e}
body.light-theme .bubble p{color:#426b79}
body.light-theme .chat-messages .message.user .bubble p{
  color:#214f60;
  background:#e6f6f9;
  border-color:rgba(42,135,158,.28);
}
body.light-theme .suggestions button{
  color:#286b7b;
  background:#eef8fa;
  border-color:rgba(42,135,158,.28);
}
body.light-theme .suggestions button:hover{background:#def1f5;color:#174e61}
body.light-theme .attach-btn{color:#3d7888}
body.light-theme .voice-btn{
  color:#286b7b;
  background:#eef8fa;
  border-color:rgba(42,135,158,.3);
}
body.light-theme .voice-btn:hover,
body.light-theme .voice-btn.listening{color:#124c61;background:#d9f1f5;border-color:#39a9bd}
body.light-theme .speak-btn{color:#286b7b;background:#eef8fa;border-color:rgba(42,135,158,.3)}
body.light-theme .speak-btn:hover,body.light-theme .speak-btn.speaking{color:#124c61;background:#d9f1f5;border-color:#39a9bd}
.speak-btn{width:23px;height:21px;margin-left:2px;padding:0;border:1px solid rgba(106,199,222,.2);border-radius:6px;background:rgba(72,171,198,.08);color:#8ddce9;font-size:11px;line-height:1;cursor:pointer;opacity:.8}
.speak-btn:hover,.speak-btn.speaking{opacity:1;color:#e8ffff;background:rgba(58,200,217,.2);border-color:#6ee5ee;box-shadow:0 0 12px rgba(58,200,217,.2)}
.tts-toggle{display:flex;align-items:center;gap:4px;margin-left:0;padding:5px 8px;border:1px solid rgba(111,190,214,.18);border-radius:8px;background:rgba(8,25,35,.65);color:#c5f3f8;font-size:10.1px;white-space:nowrap;cursor:pointer}
.tts-toggle input{appearance:none;width:7px;height:7px;border-radius:50%;border:1px solid #698a99;margin:0}
.tts-toggle input:checked{border:2px solid #aaf5ff;background:#39cce3}
body.light-theme .tts-toggle{color:#1f6474;background:#f2f8fa;border-color:rgba(47,145,176,.3)}
body.light-theme .tts-toggle input{border-color:#71939d}
body.light-theme .tts-toggle input:checked{border-color:#2b8fa6;background:#39a9bd}
body.light-theme .primary-btn{color:#06384b}
body.light-theme .ghost-btn,
body.light-theme .outline-wide{
  color:#286777;
  background:#f5fafb;
  border-color:rgba(42,112,133,.3);
}
body.light-theme .ghost-btn:hover,
body.light-theme .outline-wide:hover{color:#124c61;background:#e9f6f8;border-color:#54afc0}
body.light-theme .text-btn,
body.light-theme .open-result{color:#22758a}
body.light-theme .model-chip{color:#246b7b;background:#eaf7f9;border-color:rgba(42,135,158,.18)}
body.light-theme .task-item,
body.light-theme .model-row,
body.light-theme .mini-task,
body.light-theme .device-row,
body.light-theme .board-row{border-color:rgba(42,112,133,.14)}
body.light-theme .task-foot,
body.light-theme .task-more,
body.light-theme .more-btn{color:#617f8a}
body.light-theme .task-info small{color:#607f8b}
body.light-theme .status.running{color:#117186;background:#e4f7fa}
body.light-theme .status.done{color:#21784f;background:#e8f8ef}
body.light-theme .status.waiting{color:#96651a;background:#fff5df}
body.light-theme .board-tabs button{color:#587985}
body.light-theme .board-tabs button.active{color:#1b6274}
body.light-theme .board-tabs b,
body.light-theme .board-filter{color:#6a8791}
body.light-theme .board-row{color:#4d7180}
body.light-theme .board-row strong{color:#24586a}
body.light-theme .board-row small{color:#66848e}
body.light-theme .board-row>button{color:#4f8190}
body.light-theme .asset-thumb i{color:#2c6271;background:rgba(255,255,255,.84)}
body.light-theme .asset-card>strong{color:#24586a}
body.light-theme .asset-card>small{color:#66848e}
body.light-theme .workflow-symbol{color:#207f95}
body.light-theme .workflow-symbol.blue{color:#5575bf}
body.light-theme .workflow-symbol.purple{color:#7660b4}
body.light-theme .workflow-card h3{color:#24586a}
body.light-theme .workflow-card p,
body.light-theme .workflow-meta{color:#66848e}
body.light-theme .workflow-meta button{color:#23778b}
body.light-theme .device-load{color:#5f7e89}
body.light-theme .device-row>button{color:#27778a}
body.light-theme .device-stat span.green{color:#2a8a62}
body.light-theme .knowledge-icon{box-shadow:0 8px 18px rgba(39,112,133,.16)}
body.light-theme .knowledge-stats{color:#5c7c87}
body.light-theme .knowledge-stats b{color:#1c6274}
.knowledge-list{margin-top:16px;overflow:hidden}
.knowledge-files{padding:6px 18px}
.knowledge-file-row{display:flex;align-items:center;gap:10px;padding:12px 0;border-bottom:1px solid rgba(164,197,219,.09)}
.knowledge-file-row:last-child{border-bottom:0}
.knowledge-file-row>div{flex:1;min-width:0}
.knowledge-file-icon{width:28px;height:28px;display:grid;place-items:center;border-radius:7px;background:rgba(65,187,216,.12);color:#79deeb;font-size:10px}
.knowledge-file-row strong,.knowledge-file-row small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.knowledge-file-row strong{font-size:12px;color:#cfe8ee}
.knowledge-file-row small{font-size:10px;color:#7894a2;margin-top:4px}
.knowledge-open{font-size:11px;color:#71cbe4;text-decoration:none;padding:5px 8px;border:1px solid rgba(95,212,255,.2);border-radius:6px}
.knowledge-open:hover{border-color:rgba(95,212,255,.55);color:#dffaff}
.knowledge-empty{padding:24px 2px;color:#7894a2;font-size:12px}
body.light-theme .knowledge-file-row strong{color:#1d3e4b}
body.light-theme .knowledge-file-row small{color:#647f88}
body.light-theme .knowledge-open{color:#286b7b;border-color:rgba(42,135,158,.3)}
body.light-theme .search-box input{color:#244e5e}
body.light-theme .search-box input::placeholder{color:#829da6}
body.light-theme .asset-filter,
body.light-theme .model-select{color:#376d7c;background:#f7fbfc}
body.light-theme .settings-card label{color:#5f7e89}
body.light-theme .settings-card input{background:#f8fcfd;color:#244e5e;border-color:rgba(42,112,133,.25)}
body.light-theme .settings-card input::placeholder{color:#829da6}
body.light-theme .setting-toggle{border-color:rgba(42,112,133,.14)}
body.light-theme .setting-toggle strong{color:#285b6c}
body.light-theme .setting-toggle small{color:#6b8791}
body.light-theme .toggle{background:#bdd2d9}
body.light-theme .toggle i{background:#f8ffff}
body.light-theme .toggle.active{background:#2c9eb7}
body.light-theme .tree-flow-dots circle{fill:#31a5bc}
body.light-theme .tree-to-workstation circle{fill:#218fa8}
body.light-theme .flow-live{color:#2b805f}
body.light-theme .hardware-metrics b{color:#24586a}
body.light-theme .hardware-metrics small{color:#66848e}
body.light-theme .model-picker select:disabled{color:#376d7c}
body.light-theme .source-list span{color:#4b8392}
body.light-theme .source-list a{color:#1d7188}
body.light-theme .rich-text a{color:#1f7188;border-color:rgba(31,113,136,.35)}
body.light-theme .rich-text a:hover{color:#124c61}
body.light-theme .rich-text em{color:#3f7180}
body.light-theme .rich-text li{color:#315e6c}
body.light-theme .rich-text hr{border-color:rgba(42,112,133,.25)}
body.light-theme .process-log{color:#6b8791}
body.light-theme .web-search-toggle{color:#286b7b;background:#f4fafb}
body.light-theme .model-mode label{color:#3d7180}
body.light-theme .model-mode label.selected,
body.light-theme .model-mode label:has(input:checked){color:#175d70}

/* Keep the brand block at one stable height so the sidebar canvas never jumps. */
.sidebar .brand{
  height:52px;
  min-height:52px;
  flex:none;
  box-sizing:border-box;
  align-items:center;
  overflow:hidden;
}
.sidebar .brand-mark{flex:none}


/* Make the new-chat action stand out from the sidebar background. */
.new-chat-btn{
  border:1px solid rgba(126,235,248,.72);
  background:linear-gradient(135deg,#1f789d 0%,#2daec4 52%,#4ad8df 100%);
  color:#f2ffff;
  box-shadow:0 5px 16px rgba(34,174,205,.28),inset 0 1px 0 rgba(255,255,255,.34);
  text-shadow:0 1px 2px rgba(3,35,48,.42);
}
.new-chat-btn:hover{
  border-color:#b4fbff;
  background:linear-gradient(135deg,#2996b7 0%,#40c8d7 52%,#78edf0 100%);
  color:#ffffff;
  box-shadow:0 8px 22px rgba(34,174,205,.42),0 0 0 2px rgba(112,232,242,.12),inset 0 1px 0 rgba(255,255,255,.5);
}
.new-chat-btn:focus-visible{outline:2px solid rgba(151,245,250,.9);outline-offset:2px}
body.light-theme .new-chat-btn{
  border-color:#23839a;
  background:linear-gradient(135deg,#d7f3f6 0%,#8cdae4 54%,#4eb9cc 100%);
  color:#12495b;
  box-shadow:0 5px 14px rgba(38,119,140,.2),inset 0 1px 0 rgba(255,255,255,.8);
  text-shadow:none;
}
body.light-theme .new-chat-btn:hover{
  border-color:#176c82;
  background:linear-gradient(135deg,#e5f9fa 0%,#a5e6ed 54%,#62c9d7 100%);
  color:#0b3e50;
  box-shadow:0 8px 20px rgba(38,119,140,.28),0 0 0 2px rgba(63,161,180,.13),inset 0 1px 0 rgba(255,255,255,.9);
}

/* Match the new-chat action to the primary task action. */
.new-chat-btn{
  border-color:rgba(95,212,255,.55);
  background:linear-gradient(110deg,#1e9bdd,#4dd7e8);
  color:#03131d;
  box-shadow:0 8px 25px rgba(41,181,229,.22);
  text-shadow:none;
}
.new-chat-btn:hover{
  border-color:rgba(145,239,250,.85);
  background:linear-gradient(110deg,#1e9bdd,#4dd7e8);
  color:#03131d;
  filter:brightness(1.08);
  box-shadow:0 10px 28px rgba(41,181,229,.34);
}
body.light-theme .new-chat-btn,
body.light-theme .new-chat-btn:hover{
  border-color:rgba(95,212,255,.55);
  background:linear-gradient(110deg,#1e9bdd,#4dd7e8);
  color:#03131d;
}

/* Top workbench tabs: one size larger and visibly weighted. */
.top-nav .nav-item{
  font-size:13.4px;
  font-weight:700;
}
@media(max-width:1100px){
  .top-nav .nav-item{font-size:12.3px}
}

/* 顶栏和品牌区跨断点保持同一几何尺寸，避免窗口拖动时出现跳动。 */
.topbar{height:78px!important;min-height:78px!important;margin-bottom:22px!important}
.sidebar .brand{height:52px!important;min-height:52px!important;padding:0 10px 18px!important}
.main{padding-left:42px!important;padding-right:42px!important}
.sidebar .sidebar-todos .nav-label{display:block!important;font-size:13.4px!important;text-align:left!important;padding:0 12px 8px!important;line-height:1.2!important}
.sidebar .todo-item{padding:7px 9px!important}
@media(max-width:820px){
  .top-nav .nav-item{font-size:0}
}

/* Sidebar chat and todo typography: one size larger without changing row geometry. */
.sidebar .chat-history-head .nav-label,
.sidebar .sidebar-todos .nav-label{
  font-size:13.4px;
}
.sidebar .chat-item{
  font-size:13.4px;
  line-height:1.2;
}
.sidebar .chat-item time{
  font-size:11.2px;
}
.sidebar .todo-item{
  font-size:12.3px;
  line-height:1.2;
}
.sidebar .todo-item time{
  font-size:11.2px;
}
.composer .send-btn.is-stop{background:linear-gradient(145deg,#ffd28a 0%,#ff9e70 48%,#e65b65 100%);color:#35131a;border-color:rgba(255,196,139,.78);box-shadow:0 5px 16px rgba(235,103,93,.3),inset 0 1px 0 rgba(255,255,255,.5)}.composer .send-btn.is-stop:hover{filter:brightness(1.08);box-shadow:0 8px 22px rgba(235,103,93,.42)}
.composer .send-btn:not(.is-stop){font-size:24px;font-weight:1000;-webkit-text-stroke:1.15px currentColor;text-shadow:.55px 0 currentColor,-.55px 0 currentColor,0 .45px currentColor,0 -.45px currentColor}
@media (max-width:1180px) and (min-width:821px){.top-nav{justify-content:flex-start;overflow:hidden;flex-wrap:nowrap}.top-nav .nav-item{flex:none}.top-actions{flex:none}.breadcrumbs{flex:none;white-space:nowrap}}

/* 响应式侧栏：窄窗口时由顶部本尔科技按钮控制滑入滑出 */
.breadcrumbs[role="button"]{cursor:default}
@media(max-width:1100px){
  .breadcrumbs[role="button"]{cursor:pointer;user-select:none}
  .sidebar{width:248px!important;min-width:248px!important;padding:26px 16px 18px!important;transform:translateX(-102%);transition:transform .32s cubic-bezier(.22,.8,.24,1);z-index:20}
  body.sidebar-open .sidebar{transform:translateX(0)}
  .main{margin-left:0;width:100%;transition:margin-left .32s cubic-bezier(.22,.8,.24,1),width .32s cubic-bezier(.22,.8,.24,1)}
  body.sidebar-open .main{margin-left:248px;width:calc(100% - 248px)}
  .sidebar .brand>div:last-child{display:block}
  .sidebar .workspace-copy{display:flex}
  .sidebar .workspace-switcher .chevron{display:block}
  .sidebar .nav-label{display:block}
  .sidebar .nav-item{font-size:14.6px;justify-content:flex-start;gap:11px;padding:11px 12px}
  .sidebar .nav-item .nav-icon{font-size:17.9px;width:19px}
  .sidebar .nav-item .nav-badge{display:block}
  .sidebar .sidebar-user>div:not(.avatar){display:block}
  .sidebar .local-pill span{display:inline}
}
@media(max-width:1100px){.main{min-width:600px}.sidebar .brand>div:last-child,.sidebar .workspace-copy,.sidebar .workspace-switcher .chevron,.sidebar .nav-label,.sidebar .sidebar-user>div:not(.avatar),.sidebar .local-pill span{display:block}.sidebar .workspace-copy{display:flex}.sidebar .workspace-switcher .chevron{display:block}.sidebar .local-pill span{display:inline}}

@media(max-width:1100px){
  .main{min-width:700px}
  .chat-panel,.chat-stage,.composer-wrap,.composer-actions{overflow-x:hidden!important;scrollbar-width:none}
  .chat-panel::-webkit-scrollbar,.chat-stage::-webkit-scrollbar,.composer-wrap::-webkit-scrollbar,.composer-actions::-webkit-scrollbar{width:0;height:0}
  .sidebar .chat-history-head .nav-label{display:block;font-size:13.4px;text-align:left}
  .sidebar .chat-item{display:flex;font-size:13.4px}
  .sidebar .new-chat-label{display:inline;font-size:11px}
  .sidebar .chat-history-head{justify-content:space-between}
  .sidebar .sidebar-todos .nav-label{display:block;font-size:13.4px;text-align:left;padding:0 12px 10px}
  .sidebar .todo-item{display:flex;text-align:left;padding:7px 8px}
  .sidebar .todo-item span:nth-child(2),.sidebar .todo-item time{display:inline}
  .sidebar .sidebar-user .avatar{display:grid}
  .sidebar .sidebar-user>div:not(.avatar){display:block}
  .sidebar .sidebar-user>span{display:block;margin-left:auto;width:auto;text-align:left}
}

@media(max-width:1100px){
  .sidebar .new-chat-btn{width:auto!important;min-width:70px!important;height:29px!important;padding:0 10px!important}
  .sidebar .new-chat-label{display:inline!important}
  .sidebar .chat-history-head .nav-label{display:block!important;text-align:left!important;font-size:13.4px!important}
  .sidebar .chat-item{display:flex!important;justify-content:flex-start!important;height:32px!important;min-height:32px!important}
  .sidebar .chat-item span:nth-child(2){display:block!important;flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
  .sidebar .chat-item .chat-more{display:block!important}
}

/* 最终覆盖：主内容左右各留 20px，待办区域不再被 1100px 规则改写。 */
.main{max-width:none!important;margin-right:0!important;padding-left:20px!important;padding-right:20px!important}
.sidebar .sidebar-todos .nav-label{display:block!important;height:auto!important;min-height:0!important;padding:0 12px 8px!important;font-size:13.4px!important;line-height:1.2!important}
.sidebar .todo-item{display:flex!important;align-items:center!important;gap:7px!important;height:29px!important;min-height:29px!important;padding:7px 9px!important;font-size:12.3px!important;line-height:1.2!important}
.sidebar .todo-item span:nth-child(2),.sidebar .todo-item time{display:inline!important}

