:root{color-scheme:light;font-family:Inter,"PingFang SC","Microsoft YaHei",sans-serif;color:#1d2939;background:#f4f6f9;--blue:#3370ff;--line:#e4e7ec;--muted:#667085}*{box-sizing:border-box}body{margin:0}.app-shell{min-height:100vh;padding:30px 34px 40px;background:radial-gradient(circle at 50% 0,rgba(51,112,255,.08),transparent 32rem),#f4f6f9}.topbar{max-width:1500px;margin:0 auto 24px;display:flex;align-items:center;justify-content:space-between}.eyebrow{margin:0 0 5px;color:#98a2b3;font-size:10px;font-weight:700;letter-spacing:.16em}.topbar h1{margin:0;font-size:25px;letter-spacing:-.04em}.user-menu{display:flex;align-items:center;gap:9px;padding:6px 10px;border:1px solid #dce5f5;border-radius:999px;background:#fff;color:#344054;font-size:12px}.user-menu img{width:24px;height:24px;border-radius:50%;object-fit:cover}.user-menu a{padding-left:8px;border-left:1px solid #e4e7ec;color:#315ec9;text-decoration:none}.connection{padding:7px 11px;border:1px solid #d7e9df;border-radius:999px;background:#f2fbf5;color:#247a45;font-size:12px;font-weight:600}.connection i{display:inline-block;width:7px;height:7px;margin-right:7px;border-radius:50%;background:#35b76f}.workspace{max-width:1500px;margin:0 auto;display:grid;grid-template-columns:minmax(250px,.8fr) minmax(420px,1.5fr) minmax(260px,.9fr);gap:18px;align-items:start}.panel{min-height:620px;padding:22px;border:1px solid var(--line);border-radius:18px;background:#fff;box-shadow:0 8px 26px rgba(16,24,40,.04)}.panel-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.panel-heading h2{margin:0 0 5px;font-size:16px}.panel-heading p{margin:0;color:#98a2b3;font-size:11px;line-height:1.5}.refresh,.clear-history{border:0;background:#f2f4f7;color:#667085;cursor:pointer}.refresh{width:30px;height:30px;border-radius:8px;font-size:18px}.clear-history{padding:6px 9px;border-radius:7px;font-size:11px}.search{height:40px;margin:19px 0 13px;padding:0 11px;display:flex;align-items:center;gap:7px;border:1px solid var(--line);border-radius:9px;color:#98a2b3}.search input{width:100%;border:0;outline:0;font:inherit;font-size:12px}.customer-list,.history-list{max-height:515px;overflow:auto}.customer-row{width:100%;margin-bottom:7px;padding:11px 10px;display:flex;align-items:center;gap:10px;border:1px solid transparent;border-radius:10px;background:#f9fafb;text-align:left;cursor:pointer;transition:.15s}.customer-row:hover{border-color:#b9caff;background:#f4f7ff}.customer-row.selected{border-color:#8aa9ff;background:#edf3ff}.customer-avatar{width:32px;height:32px;flex:0 0 auto;display:grid;place-items:center;border-radius:9px;background:#e8efff;color:#315ec9;font-size:13px;font-weight:700}.customer-copy{min-width:0}.customer-copy strong,.customer-copy span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.customer-copy strong{font-size:12px}.customer-copy span{margin-top:3px;color:#98a2b3;font-size:10px}.empty{padding:30px 10px;color:#98a2b3;font-size:12px;text-align:center}.command-panel{padding:27px}.composer{margin-top:28px;border:1px solid #d0d5dd;border-radius:13px;overflow:hidden;transition:.15s}.composer:focus-within{border-color:#84a4ff;box-shadow:0 0 0 3px rgba(51,112,255,.1)}.references{min-height:0;padding:13px 14px 0;display:flex;gap:8px;flex-wrap:wrap}.references:empty{display:none}.reference{max-width:100%;display:inline-flex;align-items:center;gap:7px;padding:7px 8px 7px 10px;border:1px solid #c9d7ff;border-radius:8px;background:#edf3ff;color:#264da8;font-size:11px;font-weight:600}.reference button{width:18px;height:18px;padding:0;border:0;border-radius:50%;background:#d8e3ff;color:#5271b7;cursor:pointer}.composer textarea{width:100%;min-height:180px;padding:17px;border:0;outline:0;resize:vertical;font:inherit;color:#344054;font-size:13px;line-height:1.75}.execute{width:100%;height:48px;margin-top:16px;border:0;border-radius:11px;background:var(--blue);color:#fff;font:inherit;font-size:14px;font-weight:700;cursor:pointer;box-shadow:0 9px 20px rgba(51,112,255,.2)}.execute:hover{background:#245bd7}.execute:disabled{cursor:wait;opacity:.65}.status{min-height:20px;margin:13px 0 0;color:var(--muted);font-size:12px;text-align:center}.status.error{color:#c4320a}.result{margin-top:10px;padding:15px;border:1px solid #d7e4ff;border-radius:11px;background:#f7f9ff;color:#475467;font-size:12px;line-height:1.7}.history-list{margin-top:19px}.history-item{padding:13px 3px;border-bottom:1px solid #eef0f3}.history-item:first-child{padding-top:0}.history-item h3{margin:0 0 7px;font-size:12px;line-height:1.5}.history-item .history-customer{margin:0 0 6px;color:#315ec9;font-size:10px;font-weight:600}.history-item time{color:#98a2b3;font-size:10px}.loading{padding:34px 0;color:#98a2b3;font-size:12px;text-align:center}@media(max-width:1050px){.workspace{grid-template-columns:280px 1fr}.history-panel{grid-column:1/-1;min-height:auto}.history-list{max-height:280px}}@media(max-width:720px){.app-shell{padding:22px 14px}.workspace{grid-template-columns:1fr}.panel{min-height:auto}.history-panel{grid-column:auto}.customer-list{max-height:300px}.topbar h1{font-size:21px}}

.workspace{display:flex;align-items:stretch}.workspace>.panel{min-width:0;flex:1 1 0}.panel{position:relative}.panel-heading{padding-top:31px}.panel-heading-actions{position:absolute;top:14px;left:18px;display:flex;align-items:center;gap:4px}.panel-control{width:26px;min-width:26px;height:24px;padding:0;border:0;border-radius:6px;background:#f2f4f7;color:#667085;font-size:15px;font-weight:700;line-height:24px;cursor:pointer}.panel-control:hover,.panel-marker:hover{background:#e8eeff;color:#315ec9}.panel-control:disabled{cursor:default;opacity:.35}.panel-marker{display:none;width:100%;height:100%;min-height:56px;padding:8px 4px;border:0;border-radius:13px;background:#f7f9fc;color:#475467;cursor:pointer}.panel-marker span,.panel-marker small{display:block}.panel-marker span{font-size:18px;font-weight:700}.panel-marker small{margin-top:5px;font-size:10px;white-space:nowrap}.panel.is-minimized{min-width:58px;max-width:58px;min-height:620px;padding:7px;flex:0 0 58px}.panel.is-minimized>*:not(.panel-marker){display:none!important}.panel.is-minimized>.panel-marker{display:block}.workspace.has-maximized>.panel:not(.is-maximized){visibility:hidden}.panel.is-maximized{position:fixed;inset:16px;z-index:100;width:auto;max-width:none;min-height:0;max-height:calc(100vh - 32px);overflow:auto;padding:28px;box-shadow:0 22px 70px rgba(16,24,40,.2)}body.panel-maximized{overflow:hidden}.customer-row{user-select:none}.record-action{padding:5px 7px;border:0;border-radius:7px;background:#e8eeff;color:#315ec9;font:inherit;font-size:10px;font-weight:700;cursor:pointer;opacity:0;pointer-events:none;transform:translateX(4px);transition:.15s}.record-open{margin-left:auto}.record-reference{background:#3370ff;color:#fff}.customer-row:hover .record-action,.customer-row:focus-within .record-action{opacity:1;pointer-events:auto;transform:none}.record-open:hover{background:#dbe5ff}.record-reference:hover{background:#245bd7}.customer-row.dragging{opacity:.45;border-color:#3370ff}.command-editor.drag-target{background:#f0f5ff;box-shadow:inset 0 0 0 2px #6c91ff}

.task-confirm-list{display:grid;gap:8px;max-height:clamp(180px,32vh,340px);margin-top:10px;padding-right:5px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}.task-confirm-row{display:flex;align-items:stretch;gap:8px;padding:10px;border:1px solid #e3e8f2;border-radius:10px;background:#fff}.task-confirm-copy{min-width:0;display:grid;grid-template-columns:auto 1fr;gap:4px 8px;flex:1}.task-confirm-copy>span{align-self:center;padding:2px 6px;border-radius:999px;background:#eef3ff;color:#315ec9;font-size:9px;white-space:nowrap}.task-confirm-copy>strong{align-self:center;font-size:12px}.task-content-button{grid-column:1/-1;padding:7px 8px;border:0;border-radius:7px;background:#f7f9fc;color:#475467;font:inherit;font-size:11px;line-height:1.55;text-align:left;white-space:pre-wrap;word-break:break-word;cursor:pointer}.task-content-button:hover{background:#edf3ff;color:#264da8}.delete-task{align-self:stretch;padding:0 9px;border:0;border-radius:7px;background:#fff1f0;color:#b42318;font:inherit;font-size:10px;cursor:pointer}.empty-task-plan{margin:12px 0;color:#b42318}.task-edit-dialog{width:min(620px,calc(100vw - 28px));padding:0;border:0;border-radius:16px;box-shadow:0 24px 80px rgba(16,24,40,.25)}.task-edit-dialog::backdrop{background:rgba(16,24,40,.45)}.task-edit-dialog form{padding:22px}.task-edit-head{display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.task-edit-head small{color:#315ec9}.task-edit-head h3{margin:4px 0 16px;font-size:17px}.task-edit-head button{width:30px;height:30px;border:0;border-radius:8px;background:#f2f4f7;font-size:20px;cursor:pointer}.task-edit-dialog label{display:block;margin-bottom:7px;color:#475467;font-size:11px;font-weight:700}.task-edit-dialog textarea{width:100%;padding:12px;border:1px solid #d0d5dd;border-radius:9px;outline:0;resize:vertical;font:inherit;font-size:12px;line-height:1.6}.task-edit-dialog textarea:focus{border-color:#84a4ff;box-shadow:0 0 0 3px rgba(51,112,255,.1)}.task-edit-tip{min-height:17px;margin:7px 0;color:#b42318;font-size:10px}.task-edit-actions{display:flex;justify-content:flex-end;gap:9px}.task-edit-actions button{padding:9px 16px;border:0;border-radius:8px;font:inherit;font-size:12px;font-weight:700;cursor:pointer}.task-edit-actions button:first-child{background:#f2f4f7;color:#475467}.task-edit-actions button:last-child{background:#3370ff;color:#fff}

.customer-panel{height:calc(100vh - 130px);max-height:1000px;display:flex;flex-direction:column}.customer-panel .data-groups{min-height:0;overflow-x:hidden;overflow-y:auto}.data-group-head{position:relative;padding-top:29px}.data-group-window-actions{position:absolute;top:4px;left:7px;display:flex;gap:4px}.data-group-window-actions button{width:24px;height:22px;padding:0;border:0;border-radius:5px;background:#eef2f8;color:#667085;font:inherit;font-size:14px;font-weight:700;line-height:22px;cursor:pointer}.data-group-window-actions button:hover{background:#e2e9ff;color:#315ec9}.data-group-window-actions button:disabled{opacity:.35;cursor:default}.customer-panel .data-groups.has-expanded{display:flex;flex:1}.data-groups.has-expanded>.data-group:not(.is-expanded){display:none}.data-groups.has-expanded>.data-group.is-expanded{min-height:0;flex:1;display:flex;flex-direction:column}.data-groups.has-expanded>.data-group.is-expanded>.data-list{max-height:none;min-height:0;flex:1;overflow:auto}.tree-row{min-height:34px;padding:6px 7px 6px calc(7px + var(--tree-depth,0)*14px);gap:6px}.tree-toggle,.tree-toggle-placeholder{width:18px;height:18px;flex:0 0 18px}.tree-toggle{padding:0;border:0;border-radius:5px;background:#edf3ff;color:#315ec9;font-size:16px;line-height:18px;cursor:pointer}.tree-toggle-placeholder{display:block}.record-label{min-width:0;overflow:hidden;color:#1d2939;font-size:12px;font-weight:650;line-height:20px;text-overflow:ellipsis;white-space:nowrap}.tree-depth-1 .record-label{color:#315ec9}.tree-depth-2 .record-label{color:#7b4bb7}.tree-children{padding:3px 0 5px 10px;border-left:1px solid #dbe4f5}.tree-branch{margin:4px 0;padding-left:calc(var(--tree-depth,1)*5px)}.tree-branch-title{height:25px;padding:0 7px;display:flex;align-items:center;justify-content:space-between;border-radius:6px;background:#f1f4f9;color:#667085;font-size:11px;font-weight:700}.tree-branch-title small{color:#98a2b3}.tree-empty{padding:7px 10px;color:#98a2b3;font-size:9px}

.skill-toolbar{position:relative;min-height:34px;padding:6px 9px;display:flex;align-items:center;gap:7px;border-top:1px solid #eef0f3;background:#fafbfc;color:#667085;font-size:10px}.skill-add{width:22px;height:22px;padding:0;border:0;border-radius:6px;background:#3370ff;color:#fff;font-size:18px;line-height:22px;cursor:pointer}.skill-picker{position:absolute;bottom:34px;left:9px;z-index:20;width:min(300px,calc(100% - 18px));max-height:230px;padding:7px;overflow:auto;border:1px solid #dce3f0;border-radius:10px;background:#fff;box-shadow:0 14px 35px rgba(16,24,40,.16)}.skill-picker button{width:100%;padding:9px;border:0;border-radius:7px;background:#fff;color:#344054;font:inherit;font-size:11px;font-weight:600;text-align:left;cursor:pointer}.skill-picker button:hover{background:#edf3ff;color:#264da8}.skill-picker-empty{padding:16px 8px;color:#98a2b3;text-align:center}.save-skill{margin-top:4px;padding:6px 9px;border:0;border-radius:7px;background:#edf3ff;color:#315ec9;font:inherit;font-size:10px;font-weight:700;cursor:pointer}.save-skill:hover{background:#dfe9ff}.task-edit-dialog input{width:100%;margin-bottom:14px;padding:10px 12px;border:1px solid #d0d5dd;border-radius:9px;outline:0;font:inherit;font-size:12px}.task-edit-dialog input:focus{border-color:#84a4ff;box-shadow:0 0 0 3px rgba(51,112,255,.1)}
.execution-state{display:inline-block;padding:1px 5px;border-radius:999px;background:#eef3ff;color:#315ec9;font-size:9px}
.recommendation-links{margin-top:5px;display:flex;gap:6px;flex-wrap:wrap}.recommendation-links a{padding:2px 6px;border-radius:6px;background:#edf3ff;color:#315ec9;text-decoration:none}

@media(max-width:1050px){.workspace{display:flex;flex-wrap:wrap}.workspace>.panel{min-width:280px}.history-panel{min-height:auto}.panel.is-minimized{min-width:58px}.panel.is-maximized{min-width:0}}
@media(max-width:720px){.workspace{display:flex;flex-direction:column}.workspace>.panel{width:100%;min-width:0}.panel.is-minimized{width:100%;max-width:none;min-height:54px;max-height:54px}.panel.is-minimized>.panel-marker{display:flex;align-items:center;justify-content:center;gap:10px}.panel-marker small{margin:0}.panel.is-maximized{inset:8px;max-height:calc(100vh - 16px)}}

/* Window-style sizing controls */
.panel-heading-actions{gap:5px}
.panel-control{
  position:relative;
  width:27px;
  min-width:27px;
  height:25px;
  border:1px solid #dce3ed;
  border-radius:7px;
  background:linear-gradient(180deg,#fff,#f4f6f9);
  box-shadow:0 1px 2px rgba(16,24,40,.06);
}
.panel-control::before,.panel-control::after,
.data-group-window-actions button::before,.data-group-window-actions button::after{
  content:"";
  position:absolute;
  box-sizing:border-box;
  pointer-events:none;
}
.panel-control[data-panel-action="minimize"]::before{
  left:8px;
  top:12px;
  width:10px;
  height:1.5px;
  border-radius:2px;
  background:#526176;
}
.panel-control[data-panel-action="maximize"]::before{
  left:8px;
  top:7px;
  width:10px;
  height:9px;
  border:1.5px solid #526176;
  border-radius:1px;
}
.panel-control[data-panel-action="restore"]::before{
  left:7px;
  top:9px;
  width:9px;
  height:8px;
  border:1.5px solid #526176;
  border-radius:1px;
  background:#f7f8fa;
}
.panel-control[data-panel-action="restore"]::after{
  left:10px;
  top:6px;
  width:9px;
  height:8px;
  border:1.5px solid #526176;
  border-radius:1px;
}
.panel-control:hover{border-color:#a9bfff;background:#edf3ff}
.panel-control:hover::before,.panel-control:hover::after{border-color:#315ec9}
.panel-control[data-panel-action="minimize"]:hover::before{background:#315ec9}
.panel-control:disabled{box-shadow:none}

.data-group-window-actions{top:6px;left:8px;gap:3px}
.data-group-window-actions button{
  position:relative;
  width:21px;
  height:20px;
  border:1px solid transparent;
  border-radius:50%;
  background:#e9eef6;
  box-shadow:none;
}
.data-group-window-actions button[data-group-action="minimize"]{background:#edf1f6}
.data-group-window-actions button[data-group-action="expand"]{background:#e8efff}
.data-group-window-actions button[data-group-action="restore"]{background:#eeeafb}
.data-group-window-actions button[data-group-action="minimize"]::before{
  left:6px;
  top:10px;
  width:8px;
  height:1.5px;
  border-radius:2px;
  background:#65758b;
}
.data-group-window-actions button[data-group-action="expand"]::before{
  left:6px;
  top:5px;
  width:9px;
  height:9px;
  border:1.3px solid #486aa8;
  border-radius:1px;
}
.data-group-window-actions button[data-group-action="restore"]::before{
  left:5px;
  top:7px;
  width:8px;
  height:7px;
  border:1.3px solid #7656a6;
  border-radius:1px;
  background:#eeeafb;
}
.data-group-window-actions button[data-group-action="restore"]::after{
  left:8px;
  top:4px;
  width:8px;
  height:7px;
  border:1.3px solid #7656a6;
  border-radius:1px;
}
.data-group-window-actions button:hover{border-color:#bdcaf0;transform:translateY(-1px)}
.data-group.is-minimized .data-list{display:none}
.data-group.is-minimized .data-group-head{min-height:47px;border-radius:10px}

.data-group-head{
  position:relative;
  padding:9px 10px;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:8px;
}
.data-group-window-actions{
  position:static;
  display:flex;
  align-items:center;
  flex:0 0 auto;
}
.data-group-head h3{
  min-width:0;
  justify-self:start;
  overflow:hidden;
  text-align:left;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.business-list-add{justify-self:end;padding:4px 8px;border:1px solid #cbdaf8;border-radius:7px;background:#f4f7ff;color:#2454aa;font:600 11px/1.3 inherit;white-space:nowrap;cursor:pointer}.business-list-add:hover{border-color:#9db8f4;background:#e8efff}

/* Compact workspace: maximize useful content while retaining visual hierarchy */
.app-shell{padding:18px 24px 22px}
.topbar{margin-bottom:14px}
.topbar h1{font-size:22px}
.workspace{gap:12px}
.workspace>.panel{
  height:100%;
  min-height:0;
  padding:17px;
  border-radius:16px;
  overflow:hidden;
}
.workspace{height:calc(100vh - 82px);align-items:stretch}
.panel-heading{padding-top:29px}
.panel-heading-actions{top:10px;left:14px}
.panel-heading h2{margin-bottom:3px}
.search{height:36px;margin:12px 0 8px}

.customer-panel{
  height:100%;
  max-height:none;
  box-sizing:border-box;
}
.customer-panel .data-groups{
  display:flex;
  flex:1;
  flex-direction:column;
  gap:7px;
  min-height:0;
}
.customer-panel .data-group{
  display:flex;
  flex:1 0 96px;
  flex-direction:column;
  min-height:96px;
}
.customer-panel .data-group.is-minimized{min-height:0;flex:0 0 auto}
.customer-panel .data-group-head{
  position:relative;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  justify-content:initial;
  gap:7px;
  min-height:38px;
  padding:7px 9px;
}
.customer-panel .data-group-window-actions{
  position:static;
  display:flex;
  align-items:center;
}
.customer-panel .data-group-head h3{
  justify-self:start;
  margin:0;
  overflow:hidden;
  text-align:left;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.customer-panel .data-list{
  flex:1;
  min-height:0;
  max-height:none;
  padding:4px 5px;
  overflow:auto;
}
.customer-panel .data-list .customer-row{margin-bottom:2px;padding:4px 6px}
.tree-row{
  min-height:28px;
  padding-top:3px;
  padding-bottom:3px;
  gap:4px;
}
.tree-toggle,.tree-toggle-placeholder{
  width:16px;
  height:16px;
  flex-basis:16px;
}
.tree-toggle{font-size:14px;line-height:16px}
.record-label{line-height:18px}
.record-action{padding:3px 6px}
.tree-children{padding-top:1px;padding-bottom:2px}
.tree-branch{margin:2px 0}
.tree-branch-title{height:21px}

.command-panel{
  display:flex;
  flex-direction:column;
  padding:19px;
  min-height:0;
  overflow:hidden;
}
.command-box{display:flex;min-height:0;flex-direction:column;border:1px solid #e2e7f0;border-radius:11px;background:#fff;overflow:hidden}
.command-box[hidden]{display:none}
.input-command-box{flex:1 1 auto;margin-top:10px}
.result-command-box{flex:0 1 260px;margin-top:8px;background:#f7f9ff}
.input-command-box,
.command-panel .conversation-composer{
  border:1px solid #e2e7f0;
  border-radius:11px;
  background:#fff;
  overflow:hidden;
}
.input-command-box:hover,
.input-command-box:focus-within{
  border-color:#84a4ff;
  box-shadow:0 0 0 3px rgba(51,112,255,.1);
}
.command-panel .composer{
  display:flex;
  flex:1;
  flex-direction:column;
  min-height:0;
  margin-top:0;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
}
.command-panel .command-editor{
  flex:1 1 auto;
  min-height:160px;
  padding:13px 15px;
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-gutter:stable;
  line-height:1.7;
}
.command-panel .skill-toolbar{flex:0 0 auto}
.execute{height:44px;margin-top:10px}
.status{margin-top:7px}
.command-panel .result{max-height:none;margin-top:0;padding:11px;flex:1 1 auto;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.command-panel.is-history-view .composer{min-height:96px;margin-top:10px;flex:0 0 96px}
.command-panel.is-history-view .command-editor{min-height:62px}
.command-panel.is-history-view .skill-toolbar{display:none}
.command-panel .result.history-view{min-height:0;max-height:none;flex:1 1 auto;margin-top:8px}
.history-result-head{position:sticky;top:-11px;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:10px;margin:-11px -11px 8px;padding:10px 11px;border-bottom:1px solid #d7e4ff;background:#f7f9ff}
.close-history-result{padding:6px 9px;border:1px solid #c9d7ff;border-radius:7px;background:#fff;color:#315ec9;font:inherit;font-size:10px;font-weight:700;cursor:pointer}
.execution-progress{margin-top:8px;padding:8px 10px;border-radius:8px;background:#f3f6fc;color:#667085;font-size:10px}
.execution-progress-current{display:flex;align-items:center;gap:7px;color:#475467;font-weight:650}
.execution-progress-current i{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:#3370ff;box-shadow:0 0 0 3px rgba(51,112,255,.12);animation:progress-pulse 1.4s ease-in-out infinite}
.execution-progress details{margin-top:7px}
.execution-progress summary{width:max-content;color:#667085;cursor:pointer;list-style:none}
.execution-progress summary::-webkit-details-marker{display:none}
.execution-progress summary::before{margin-right:4px;content:"›";display:inline-block;transition:transform .15s}
.execution-progress details[open] summary::before{transform:rotate(90deg)}
.execution-progress ul{margin:4px 0 0;padding-left:17px}
.execution-progress li{margin:2px 0}
@keyframes progress-pulse{50%{opacity:.45;transform:scale(.82)}}
.task-execution-list{display:grid;gap:8px;max-height:clamp(220px,42vh,440px);margin-top:8px;padding-right:5px;overflow-y:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
.task-execution-row{padding:9px 10px;border:1px solid #e3e8f2;border-radius:10px;background:#fff}
.task-execution-row.is-active{border-color:#9ab4ff;background:#f7f9ff;box-shadow:0 0 0 2px rgba(51,112,255,.08)}
.task-execution-row.is-complete{border-color:#cfe6d8}
.task-execution-head{display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:7px}
.task-execution-head>span{padding:2px 6px;border-radius:999px;background:#eef3ff;color:#315ec9;font-size:9px;white-space:nowrap}
.task-execution-head>strong{min-width:0;overflow:hidden;color:#1d2939;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.task-execution-content{margin:6px 0 0;overflow:hidden;color:#667085;font-size:10px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}
.task-inline-result{margin-top:7px;padding:7px 8px;border-radius:7px;background:#f5f7fa;color:#344054;font-size:11px;line-height:1.55;white-space:pre-wrap;word-break:break-word}
.document-query-result-frame{display:block;width:100%;min-height:180px;border:1px solid #dfe4ec;border-radius:8px;background:#fff;white-space:normal}
.analysis-charts{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:8px;margin-top:8px}.analysis-chart{display:block;overflow:hidden;border:1px solid #dbe4f4;border-radius:8px;background:#fff;color:#315ec9;text-decoration:none}.analysis-chart img{display:block;width:100%;max-height:260px;object-fit:contain;background:#fff}.analysis-chart span{display:block;padding:5px 7px;border-top:1px solid #eef2f7;font-size:10px;font-weight:600}
.task-execution-row.is-active .task-inline-result{background:#edf3ff;color:#315ec9}
.task-execution-row.is-complete .task-inline-result{background:#f3faf5}
.command-panel #commandInput{font-size:10px!important;line-height:1.6}
.command-panel #commandInput .reference,.command-panel #commandInput .reference button{font-size:10px!important}

.history-panel{display:flex;flex-direction:column;overflow:hidden}
.history-panel .history-list{flex:1;max-height:none;margin-top:0}
.history-item{padding:9px 3px}
.history-item h3{margin-bottom:4px;line-height:1.35}
.history-actions{display:flex;align-items:center;justify-content:space-between;gap:6px}
.delete-history{width:22px;height:22px;padding:0;border:0;border-radius:6px;background:transparent;color:#98a2b3;font-size:16px;line-height:22px;cursor:pointer}
.delete-history:hover{background:#fff0ee;color:#b42318}
.brand{display:flex;align-items:center;gap:10px}
.brand-icon{
  width:38px;
  height:38px;
  flex:0 0 38px;
  border:0;
  background:transparent;
  object-fit:contain;
}
.command-panel .skill-toolbar{min-height:30px;padding:4px 7px}
.skill-picker-item{
  display:grid;
  grid-template-columns:minmax(0,1fr) 26px;
  align-items:center;
  gap:4px;
}
.skill-picker .skill-picker-insert{
  min-width:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.skill-picker .skill-picker-delete{
  width:26px;
  height:26px;
  padding:0;
  border-radius:7px;
  color:#98a2b3;
  font-size:16px;
  line-height:26px;
  text-align:center;
}
.skill-picker .skill-picker-delete:hover{background:#fff0ee;color:#b42318}
.panel-control:disabled{
  opacity:1;
  border-color:#dce3ed;
  background:linear-gradient(180deg,#fafbfc,#f1f3f6);
}
.panel-control:disabled::before,.panel-control:disabled::after{opacity:.32}
.data-group-window-actions button{border-color:#d9e0eb}
.data-group-window-actions button:disabled{
  opacity:1;
  border-color:#d9e0eb;
  background:#f1f3f6;
}
.data-group-window-actions button:disabled::before,
.data-group-window-actions button:disabled::after{opacity:.32}

.right-groups{display:flex;flex:1;min-height:0;flex-direction:column;gap:7px;margin-top:12px;overflow:hidden}
.right-group{display:flex;flex:1 1 0;min-height:0;flex-direction:column;overflow:hidden;border:1px solid #e4e7ec;border-radius:11px;background:#fff}
.right-group-head{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:7px;min-height:38px;padding:7px 9px;background:#f9fafb}
.right-group-head h3{min-width:0;margin:0;overflow:hidden;font-size:12px;text-overflow:ellipsis;white-space:nowrap}
.right-group-head>span{color:#98a2b3;font-size:10px}
.right-group-content{min-height:0;padding:4px 6px;overflow:auto}
.right-group.is-minimized{flex:0 0 auto}
.right-group.is-minimized .right-group-content{display:none}
.right-groups.has-expanded{flex:1}
.right-groups.has-expanded>.right-group:not(.is-expanded){display:none}
.right-groups.has-expanded>.right-group.is-expanded{flex:1}
.skill-card,.automation-card{padding:7px 4px;border-bottom:1px solid #eef0f3}
.skill-card:last-child,.automation-card:last-child{border-bottom:0}
.skill-card-title{display:flex;align-items:center;gap:5px}
.skill-card-title strong{min-width:0;flex:1;overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.skill-card-title button{width:22px;height:22px;padding:0;border:0;border-radius:6px;background:transparent;color:#98a2b3;font-size:16px;line-height:22px;cursor:pointer}
.skill-card-title button:hover{background:#fff0ee;color:#b42318}
.skill-card p,.automation-card p{margin:3px 0;overflow:hidden;color:#667085;font-size:10px;line-height:1.35;text-overflow:ellipsis;white-space:nowrap}
.automation-create{padding:4px 7px;border:0;border-radius:6px;background:#edf3ff;color:#315ec9;font:inherit;font-size:9px;font-weight:700;cursor:pointer}
.automation-create:hover{background:#dfe9ff}
.automation-card small{color:#247a45;font-size:9px}.automation-card small.failed{color:#c4320a}
.automation-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.task-edit-dialog select{width:100%;height:38px;margin-bottom:14px;padding:0 10px;border:1px solid #d0d5dd;border-radius:9px;background:#fff;color:#344054;font:inherit;font-size:12px}
.automation-form-grid input{margin-bottom:14px}
.right-group [data-right-action]{position:relative;width:21px;height:20px;padding:0;border:1px solid #d9e0eb;border-radius:50%;background:#e9eef6;cursor:pointer}
.right-group [data-right-action]::before,.right-group [data-right-action]::after{content:"";position:absolute;box-sizing:border-box;pointer-events:none}
.right-group [data-right-action="minimize"]::before{left:6px;top:10px;width:8px;height:1.5px;border-radius:2px;background:#65758b}
.right-group [data-right-action="expand"]::before{left:6px;top:5px;width:9px;height:9px;border:1.3px solid #486aa8;border-radius:1px}
.right-group [data-right-action="restore"]::before{left:5px;top:7px;width:8px;height:7px;border:1.3px solid #7656a6;border-radius:1px;background:#eeeafb}
.right-group [data-right-action="restore"]::after{left:8px;top:4px;width:8px;height:7px;border:1.3px solid #7656a6;border-radius:1px}
.right-group [data-right-action]:disabled{opacity:1;background:#f1f3f6;cursor:default}
.right-group [data-right-action]:disabled::before,.right-group [data-right-action]:disabled::after{opacity:.32}

@media(max-width:1050px){
  .workspace{height:auto;align-items:stretch}
  .workspace>.panel{height:auto;min-height:620px}
}
@media(max-width:720px){
  .workspace>.panel{min-height:auto;overflow:visible}
}

/* 2026-07-26 visual system refresh
   Keep every sizing action, while reducing nested-card and control noise. */
:root{
  --blue:#2f6bff;
  --blue-strong:#2459d8;
  --surface:#fff;
  --surface-subtle:#f8fafc;
  --surface-hover:#f1f5ff;
  --line:#e5e9f0;
  --line-strong:#d5dce8;
  --text:#182230;
  --muted:#667085;
  --quiet:#98a2b3;
  --shadow:0 8px 24px rgba(16,24,40,.055);
  --page-top-offset:14px;
  font-size:13px;
}
body{
  color:var(--text);
  background:#f5f7fa;
}
button,input,textarea,select{font-family:inherit}
button:focus-visible,input:focus-visible,textarea:focus-visible,[contenteditable="true"]:focus-visible{
  outline:2px solid rgba(47,107,255,.42);
  outline-offset:2px;
}
.app-shell{
  padding:var(--page-top-offset) 22px 18px;
  background:
    linear-gradient(180deg,rgba(47,107,255,.045),transparent 190px),
    #f5f7fa;
}
.topbar{
  max-width:1680px;
  min-height:44px;
  margin-bottom:10px;
}
.brand{gap:9px}
.brand-icon{width:32px;height:32px;flex-basis:32px}
.topbar h1{
  color:#152033;
  font-size:20px;
  font-weight:750;
  letter-spacing:-.025em;
}
.user-menu{
  position:relative;
  min-height:32px;
  padding:4px 8px;
  border-color:var(--line);
  box-shadow:0 2px 8px rgba(16,24,40,.035);
}
.user-menu-toggle{padding:0;display:flex;align-items:center;gap:8px;border:0;background:transparent;color:inherit;font:inherit;cursor:pointer}
.user-usage-popover{position:absolute;z-index:30;top:calc(100% + 8px);right:0;width:245px;padding:13px;border:1px solid #dce3ee;border-radius:11px;background:#fff;box-shadow:0 14px 36px rgba(16,24,40,.16)}
.user-usage-popover strong{display:block;margin-bottom:9px;color:#253247;font-size:12px}
.user-usage-popover div{padding:5px 0;display:flex;align-items:center;justify-content:space-between;gap:16px;color:#667085;font-size:11px}
.user-usage-popover em{color:#26364d;font-style:normal;font-weight:700}
.user-usage-popover small{display:block;margin-top:8px;padding-top:8px;border-top:1px solid #eef1f5;color:#98a2b3;font-size:10px}
.user-usage-popover .ai-pricing-standard{margin-top:9px;padding-top:9px;border-top:1px solid #eef1f5}
.user-usage-popover .ai-pricing-standard strong{margin-bottom:4px}
.user-usage-popover .ai-pricing-standard div{padding:3px 0}
.user-usage-popover .ai-pricing-standard small{margin-top:4px;padding-top:0;border-top:0}
.user-usage-popover .account-overview-detail-source{display:none!important}
.ai-usage-progress{height:6px!important;margin:8px 0 0;padding:0!important;display:block!important;overflow:hidden;border-radius:999px;background:#e9edf3}
.ai-usage-progress span{height:100%;display:block;border-radius:inherit;background:#315ec9;transition:width .2s ease}
.ai-usage-progress span.is-over-limit{background:#d97706}
.ai-usage-caption{margin:5px 0 8px;color:#667085;font-size:10px;line-height:1.4}
.billing-actions{display:grid!important;grid-template-columns:1fr;gap:7px;padding:0!important;margin:6px 0 8px}
.recharge-entry,.refund-entry{width:100%;margin:0;padding:8px 10px;border-radius:8px;font-weight:700;cursor:pointer}
.recharge-entry{border:0;background:#111827;color:#fff}
.refund-entry{border:1px solid #d5dbe5;background:#fff;color:#344054}
.recharge-entry:active{transform:scale(.98)}
.refund-entry:active{transform:scale(.98)}
.account-details-entry{width:100%;min-height:32px;margin:8px 0 7px;padding:0 10px;display:flex;align-items:center;justify-content:space-between;border:1px solid #dce3ee;border-radius:8px;background:#fff;color:#344054;font:inherit;font-size:11px;cursor:pointer}
.account-details-entry:hover{background:#f7f9fc;border-color:#c8d3e3}
.account-details-entry span{font-size:18px;color:#98a2b3}
.account-details-dialog{width:min(620px,calc(100vw - 28px))}
.account-details-shell{padding:22px}
.account-details-tabs{display:flex;gap:4px;margin:0 0 16px;padding:4px;border-radius:10px;background:#f2f4f7}
.account-details-tabs button{flex:1;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:#667085;font:inherit;font-size:11px;cursor:pointer}
.account-details-tabs button.is-active{background:#fff;color:#1d2939;box-shadow:0 1px 4px rgba(16,24,40,.08)}
.account-details-panel{min-height:210px}
.account-details-panel[hidden]{display:none}
.account-details-summary{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px}
.account-details-summary>div{padding:13px;border:1px solid #e4e7ec;border-radius:10px;background:#f9fafb}
.account-details-summary span{display:block;color:#667085;font-size:10px}
.account-details-summary strong{display:block;margin-top:7px;color:#1d2939;font-size:16px}
.account-details-panel>p{margin:10px 0;color:#98a2b3;font-size:10px}
.account-details-pricing{margin-top:13px;padding:12px;display:flex;flex-wrap:wrap;gap:8px 16px;border-top:1px solid #e4e7ec;color:#667085;font-size:11px}
.account-details-pricing strong{width:100%;color:#344054;font-size:11px}
.account-details-pricing em{color:#344054;font-style:normal;font-weight:700}
.account-details-empty{padding:32px 10px;text-align:center}
.account-details-empty strong{color:#344054;font-size:12px}
.account-details-empty p{margin:7px 0;color:#98a2b3;font-size:11px}
.account-finance-row{padding:14px 2px;display:flex;align-items:center;justify-content:space-between;gap:18px;border-bottom:1px solid #eaecf0}
.account-finance-row:last-child{border-bottom:0}
.account-finance-row strong{color:#344054;font-size:12px}
.account-finance-row p{margin:4px 0 0;color:#98a2b3;font-size:10px}
.account-finance-row>button{min-width:92px;padding:8px 12px;border:0;border-radius:8px;background:#111827;color:#fff;font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.account-finance-row.is-secondary>button{border:1px solid #d5dbe5;background:#fff;color:#475467;font-weight:600}
@media(max-width:520px){.account-details-summary{grid-template-columns:1fr}.account-finance-row{align-items:flex-start}.account-finance-row>button{min-width:82px}}
.recharge-channels{margin:12px 0;padding:0;border:0;display:flex;gap:16px}
.recharge-channels label{display:flex;align-items:center;gap:6px}
.user-binding-notice{display:block!important;margin:0 0 11px;padding:10px;border:1px solid #f2d39b;border-radius:8px;background:#fffaeb;color:#7a4d00}
.user-binding-notice[hidden]{display:none!important}
.user-binding-notice strong{margin:0 0 4px;color:#7a4d00;font-size:11px}
.user-binding-notice p{margin:0;color:#8b641e;font-size:10px;line-height:1.45}
.user-binding-notice code{display:block;margin-top:6px;padding:5px 6px;overflow-wrap:anywhere;border-radius:5px;background:#fff3d6;color:#754c00;font-size:9px;user-select:all}
.logout-application{display:block;margin-top:10px;padding:8px 10px;border:1px solid #f2c9c5;border-radius:8px;background:#fff7f6;color:#b42318;text-align:center;text-decoration:none;font-size:11px;font-weight:700}
.logout-application:hover{border-color:#e7a49d;background:#fff0ee;color:#912018}
.workspace{
  width:100%;
  max-width:1680px;
  height:calc(100vh - 70px);
  gap:10px;
}
.workspace>.customer-panel{flex:.92 1 0}
.workspace>.command-panel{flex:1.12 1 0}
.workspace>.history-panel{flex:.92 1 0}
.workspace>.panel{
  padding:14px;
  border:1px solid rgba(213,220,232,.9);
  border-radius:14px;
  background:rgba(255,255,255,.96);
  box-shadow:var(--shadow);
}
.panel-heading{
  min-height:58px;
  padding:27px 2px 8px;
}
.panel-heading h2{
  margin:0 0 2px;
  color:var(--text);
  font-size:15px;
  font-weight:750;
  letter-spacing:-.015em;
}
.panel-heading p{
  color:var(--quiet);
  font-size:11px;
  line-height:1.4;
}
.panel-heading-actions{
  top:10px;
  left:14px;
  height:22px;
  gap:2px;
  padding:2px;
  border:1px solid #e7ebf1;
  border-radius:7px;
  background:#f7f9fc;
}
.panel-control{
  width:20px;
  min-width:20px;
  height:18px;
  border:0;
  border-radius:4px;
  background:transparent;
  box-shadow:none;
}
.panel-control[data-panel-action="minimize"]::before{
  left:6px;top:9px;width:8px;
}
.panel-control[data-panel-action="maximize"]::before{
  left:6px;top:4px;width:8px;height:8px;
}
.panel-control[data-panel-action="restore"]::before{
  left:5px;top:6px;width:8px;height:7px;
}
.panel-control[data-panel-action="restore"]::after{
  left:8px;top:3px;width:8px;height:7px;
}
.panel-control:disabled{
  border:0;
  background:transparent;
}
.panel-control:hover{border:0;background:#e8efff}
.refresh{
  width:20px;
  height:18px;
  border-radius:4px;
  background:transparent;
  font-size:14px;
  line-height:18px;
}
.refresh:hover{background:#e8efff;color:#315ec9}
.search{
  height:34px;
  margin:6px 0 8px;
  padding:0 10px;
  border-color:var(--line);
  border-radius:8px;
  background:#fbfcfe;
}
.search:focus-within{
  border-color:#9bb3ff;
  background:#fff;
  box-shadow:0 0 0 3px rgba(47,107,255,.08);
}
.search input{background:transparent;font-size:11px}

/* Reusable inner-window treatment */
.customer-panel .data-groups,.right-groups{gap:6px}
.customer-panel .data-group,.right-group,.command-box{
  border:1px solid var(--line);
  border-radius:9px;
  background:var(--surface);
  box-shadow:none;
}
.customer-panel .data-group-head,.right-group-head{
  min-height:34px;
  padding:5px 8px;
  gap:6px;
  border-bottom:1px solid #edf0f4;
  background:var(--surface-subtle);
}
.data-group-window-actions{
  gap:1px;
  padding:1px;
  border:1px solid #e6eaf0;
  border-radius:6px;
  background:#fff;
}
.data-group-window-actions button,
.right-group [data-right-action]{
  width:18px;
  height:17px;
  border:0;
  border-radius:3px;
  background:transparent!important;
}
.data-group-window-actions button[data-group-action="minimize"]::before,
.right-group [data-right-action="minimize"]::before{
  left:5px;top:8px;width:7px;
}
.data-group-window-actions button[data-group-action="expand"]::before,
.right-group [data-right-action="expand"]::before{
  left:5px;top:4px;width:7px;height:7px;
}
.data-group-window-actions button[data-group-action="restore"]::before,
.right-group [data-right-action="restore"]::before{
  left:4px;top:6px;width:7px;height:6px;background:#fff;
}
.data-group-window-actions button[data-group-action="restore"]::after,
.right-group [data-right-action="restore"]::after{
  left:7px;top:3px;width:7px;height:6px;
}
.data-group-window-actions button:hover,
.right-group [data-right-action]:hover{
  border:0;
  background:#eaf0ff!important;
  transform:none;
}
.customer-panel .data-group-head h3,.right-group-head h3{
  color:#344054;
  font-size:11px;
  font-weight:700;
}
.customer-panel .data-list{
  padding:3px 4px;
  scrollbar-gutter:stable;
}
.customer-panel .data-list .customer-row{
  min-height:26px;
  margin:0;
  padding:3px 5px;
  border:0;
  border-radius:6px;
  background:transparent;
}
.customer-panel .data-list .customer-row:hover{background:var(--surface-hover)}
.customer-panel .data-list .customer-row.selected{
  border:0;
  background:#eaf1ff;
  box-shadow:inset 2px 0 0 var(--blue);
}
.customer-panel .data-list .customer-row.is-new-record{
  border-color:#9bb4ff;
  background:#edf3ff;
  box-shadow:inset 3px 0 0 #3370ff;
}
.tree-row{min-height:25px}
.tree-toggle{
  border-radius:4px;
  background:transparent;
  color:#667085;
}
.tree-toggle:hover{background:#e8efff;color:#315ec9}
.record-label{
  color:#344054;
  font-size:11px;
  font-weight:600;
  line-height:17px;
}
.tree-depth-1 .record-label{color:#315ec9}
.tree-depth-2 .record-label{color:#6b4aa1}
.record-action{
  padding:2px 5px;
  border-radius:5px;
  font-size:9px;
  text-decoration:none;
}
.tree-children{
  margin-left:7px;
  padding-left:5px;
  border-left-color:#dfe5ef;
}
.tree-branch-title{
  height:20px;
  background:#f5f7fa;
  font-size:10px;
}

/* Command column is the visual focus. */
.command-panel{padding:14px}
.command-panel .panel-heading{flex:0 0 auto}
.input-command-box{margin-top:5px}
.result-command-box{margin-top:6px;background:#fbfcff}
.command-panel .composer{
  margin:0;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:transparent!important;
}
.command-panel .composer:focus-within{
  border:0!important;
  box-shadow:none!important;
}
.command-panel .command-editor,
.command-panel #commandInput{
  min-height:0;
  padding:12px 13px!important;
  color:#344054;
  font-size:12px!important;
  line-height:1.65!important;
  scrollbar-gutter:stable;
}
.command-panel #commandInput:focus-visible{
  outline:0;
}
.command-panel #commandInput .reference,
.command-panel #commandInput .reference button{font-size:11px!important}
.command-panel .skill-toolbar{
  min-height:32px;
  padding:4px 7px;
  flex-wrap:wrap;
  border-top-color:#edf0f4;
  background:#fbfcfe;
}
.skill-add{
  width:23px;
  height:23px;
  border-radius:6px;
  background:#eaf1ff;
  color:#2f6bff;
  font-size:17px;
  line-height:23px;
}
.skill-add:hover{background:#dce8ff}
.attachment-list{
  width:100%;
  display:flex;
  align-items:center;
  gap:5px;
  overflow-x:auto;
  scrollbar-width:thin;
}
.attachment-list[hidden]{display:none}
.composer>.attachment-list{padding:7px 10px 0}
.attachment-chip{
  max-width:220px;
  flex:0 0 auto;
  display:inline-flex;
  align-items:center;
  gap:5px;
  padding:3px 4px 3px 7px;
  border:1px solid #dce5f5;
  border-radius:6px;
  background:#fff;
  color:#475467;
  font-size:9px;
}
.attachment-chip>span{max-width:125px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.attachment-chip small{color:#98a2b3;font-size:8px;white-space:nowrap}
.attachment-chip button{
  width:16px;
  height:16px;
  padding:0;
  border:0;
  border-radius:4px;
  background:#f2f4f7;
  color:#667085;
  line-height:16px;
  cursor:pointer;
}
.attachment-chip button:hover{background:#fee4e2;color:#b42318}
.execute{
  height:40px;
  margin:8px 0 0;
  border-radius:8px;
  background:var(--blue);
  font-size:12px;
  box-shadow:0 5px 12px rgba(47,107,255,.16);
}
.execute:hover{background:var(--blue-strong)}
.status{
  min-height:16px;
  margin:5px 0 0;
  font-size:10px;
  line-height:16px;
}
.command-panel .result{
  padding:9px 10px;
  border:0;
  border-radius:0;
  background:#fbfcff;
  color:#475467;
  font-size:11px;
  line-height:1.6;
}
.task-confirm-list,.task-execution-list{gap:5px}
.task-confirm-row,.task-execution-row{
  padding:7px 8px;
  border-color:#e6eaf0;
  border-radius:8px;
}
.task-inline-result{padding:6px 7px;font-size:10px}

/* Right column: one quiet work surface instead of three heavy cards. */
.right-groups{margin-top:6px}
.right-group-content{padding:2px 6px}
.right-group-head>span{font-size:9px}
.clear-history{
  padding:3px 6px;
  border-radius:5px;
  background:transparent;
  font-size:9px;
}
.clear-history:hover{background:#fff0ee;color:#b42318}
.history-item{
  padding:7px 2px;
  border-bottom-color:#edf0f4;
}
.history-item h3{
  margin-bottom:3px;
  color:#344054;
  font-size:11px;
  font-weight:650;
}
.history-item time,.history-item .history-customer{font-size:9px}
.skill-card,.automation-card{padding:6px 2px}
.skill-card-title strong{font-size:10px}
.skill-card p,.automation-card p{font-size:9px}
.automation-create{background:#f0f4ff}
.empty,.loading{font-size:10px}

/* Calm, consistent scrollbars. */
.data-list,.right-group-content,.command-editor,.result,.task-confirm-list,.task-execution-list{
  scrollbar-width:thin;
  scrollbar-color:#c9d1de transparent;
}
.data-list::-webkit-scrollbar,
.right-group-content::-webkit-scrollbar,
.command-editor::-webkit-scrollbar,
.result::-webkit-scrollbar{width:6px}
.data-list::-webkit-scrollbar-thumb,
.right-group-content::-webkit-scrollbar-thumb,
.command-editor::-webkit-scrollbar-thumb,
.result::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:#c9d1de;
}

@media(max-width:1180px){
  .app-shell{padding:12px}
  .workspace{height:auto;flex-wrap:wrap}
  .workspace>.panel{min-height:640px}
  .workspace>.customer-panel,.workspace>.history-panel{flex:1 1 calc(50% - 5px)}
  .workspace>.command-panel{order:-1;flex:1 1 100%}
}
@media(max-width:720px){
  .app-shell{padding:8px}
  .topbar{min-height:40px}
  .topbar h1{font-size:17px}
  .brand-icon{width:28px;height:28px;flex-basis:28px}
  .workspace{display:flex;height:auto}
  .workspace>.panel{min-height:560px;padding:10px}
  .workspace>.customer-panel,.workspace>.command-panel,.workspace>.history-panel{flex:1 1 100%}
  .panel-heading-actions{left:10px}
}

/* The primary workspace always opens as three equal columns. Narrow viewports
   scroll horizontally instead of changing the business-area order. */
body{overflow-x:auto}
.app-shell{min-width:1020px}
.workspace{
  display:flex;
  flex-flow:row nowrap;
  align-items:stretch;
  min-width:990px;
}
.workspace>.panel:not(.is-minimized):not(.is-maximized){
  width:0;
  min-width:0;
  flex:1 1 0;
  order:initial;
}

@media(max-width:1180px){
  .app-shell{min-width:1020px;padding:12px}
  .workspace{height:calc(100vh - 70px);flex-flow:row nowrap}
  .workspace>.panel{min-height:620px}
  .workspace>.panel:not(.is-minimized):not(.is-maximized){
    width:0;
    min-width:0;
    flex:1 1 0;
    order:initial;
  }
}

/* Phase 3: ChatGPT 风格的轻量三栏工作台。 */
body{background:#fff}
.app-shell{padding:14px 16px 18px;background:#fff}
.topbar{max-width:none;margin:0 0 10px;padding:0 4px}
.topbar h1{font-size:18px;font-weight:700;letter-spacing:-.02em}
.brand-icon{width:27px;height:27px}
.workspace{position:relative;max-width:none;height:calc(100vh - 64px);gap:0;border:0;border-radius:0;overflow:hidden;background:#fff}
.workspace>.panel{min-height:0;padding:14px;border:0;border-radius:0;box-shadow:none}
.workspace>.history-panel:not(.is-minimized):not(.is-maximized){flex:0 0 268px;background:#f7f7f8;border-right:0}
.workspace>.command-panel{flex:1 1 auto;background:#fff}
.panel-heading{padding-top:28px}
.panel-heading h2{font-size:14px}
.panel-heading p{font-size:10px}
.panel-heading-actions{top:10px;left:12px;padding:0;border:0;background:transparent}
.history-panel{display:flex;flex-direction:column}
.history-panel>.panel-heading{padding-top:34px}
.history-panel .right-groups{margin-top:10px;gap:10px;overflow:hidden}
.sidebar-nav{min-height:0;display:flex;flex:1;flex-direction:column;gap:3px;overflow:hidden}
.sidebar-conversation-search{
  height:36px;
  margin-bottom:3px;
  padding:0 10px;
  display:flex;
  align-items:center;
  gap:8px;
  border-radius:8px;
  background:#ececee;
  color:#67676f;
}
.sidebar-conversation-search:focus-within{box-shadow:inset 0 0 0 1px #c7c7cd;background:#fff}
.sidebar-conversation-search input{min-width:0;width:100%;border:0;outline:0;background:transparent;color:#343541;font:inherit;font-size:11px}
.sidebar-conversation-search input::placeholder{color:#74747c}
.sidebar-list-group{min-height:0;display:flex;flex-direction:column}
.sidebar-list-group:has([data-sidebar-view="history"]){flex:1 1 auto}
.sidebar-list-group:has([data-sidebar-view="history"]) .right-group.is-sidebar-active{flex:1 1 auto}
.sidebar-nav button{width:100%;height:36px;padding:0 10px;display:grid;grid-template-columns:22px minmax(0,1fr) auto;align-items:center;gap:7px;border:0;border-radius:8px;background:transparent;color:#343541;font:inherit;text-align:left;cursor:pointer}
.sidebar-nav button:hover{background:#ececee}
.sidebar-nav button.is-active{background:#e9e9eb}
.sidebar-nav button>span{color:#67676f;font-size:14px;text-align:center}
.sidebar-nav button>strong{overflow:hidden;font-size:11px;font-weight:600;text-overflow:ellipsis;white-space:nowrap}
.sidebar-nav button>small{min-width:18px;padding:1px 5px;border-radius:999px;background:#dddde1;color:#686870;font-size:9px;text-align:center}
.history-panel .right-group{display:none;border:0;border-radius:0;background:transparent}
.history-panel .right-group.is-sidebar-active{display:flex;flex:0 1 auto;max-height:240px}
.history-panel [data-right-group="history"].is-sidebar-active{max-height:none}
.history-panel .right-group-head{display:flex;min-height:32px;padding:4px 4px 4px 7px;background:transparent;border-bottom:1px solid #e5e5e7}
.history-panel .right-group-head h3{flex:1;font-size:10px;color:#6b6b73}
.history-panel .right-group-content{padding:6px 2px}
.history-panel .history-item,.history-panel .skill-card,.history-panel .automation-card{padding:8px;border:0;border-radius:8px}
.history-panel .history-item:hover,.history-panel .skill-card:hover,.history-panel .automation-card:hover{background:#ececee}
.command-panel{padding:16px 22px}
.command-panel>.panel-heading{max-width:860px;width:100%;margin:0 auto;padding-top:28px}
.conversation-window,.conversation-composer{max-width:860px;width:100%;margin-left:auto;margin-right:auto;border-color:#ececee;border-radius:12px;background:#fff}
.conversation-window{border:0}
.conversation-messages{padding:18px 14px;background:#fff}
.conversation-composer{border:1px solid #dedee2;box-shadow:0 2px 12px rgba(0,0,0,.06)}
.conversation-composer,
.conversation-composer .composer,
.conversation-composer .skill-toolbar{overflow:visible}
.conversation-composer .skill-toolbar{position:relative;z-index:30}
.conversation-composer .composer{margin:0;border:0;border-radius:12px}
.conversation-composer .composer:focus-within{border:0;box-shadow:none}
.conversation-composer .composer{position:relative}
.crm-reference-picker{position:fixed;z-index:150;overflow:auto;padding:6px;border:1px solid #d9e0ec;border-radius:12px;background:#fff;box-shadow:0 14px 38px rgba(16,24,40,.18)}
.crm-reference-picker[hidden]{display:none}
.crm-reference-picker-empty{padding:12px 10px;color:#98a2b3;font-size:11px;text-align:center}
.crm-reference-option{width:100%;padding:8px 10px;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px;border:0;border-radius:8px;background:transparent;color:#344054;font:inherit;text-align:left;cursor:pointer}
.crm-reference-option:hover,.crm-reference-option:focus{background:#edf3ff;color:#264da8;outline:0}
.crm-reference-option strong,.crm-reference-option small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.crm-reference-option strong{font-size:11px;font-weight:650}
.crm-reference-option small{align-self:center;color:#667085;font-size:9px}
.command-editor{min-height:68px!important;max-height:132px!important;padding:12px 14px 6px!important;overflow-y:auto;font-size:12px!important;line-height:1.6!important}
.command-panel .skill-toolbar{border:0;background:#fff;padding:8px 10px}
.skill-add{width:30px;height:30px;border:1px solid #dedee2;border-radius:50%;background:#fff;color:#35363a}
.skill-add{font-size:20px;line-height:28px}
.skill-add:hover{background:#f2f2f3}
.composer-add-menu{position:absolute;left:8px;bottom:46px;z-index:160;width:260px;padding:6px;border:1px solid #dedee2;border-radius:12px;background:#fff;box-shadow:0 14px 38px rgba(0,0,0,.16)}
.composer-add-menu[hidden]{display:none}
.composer-add-menu button,.composer-add-menu .composer-add-option{width:100%;padding:9px;display:grid;grid-template-columns:28px minmax(0,1fr);grid-template-rows:auto auto;column-gap:8px;border:0;border-radius:8px;background:transparent;color:#343541;font:inherit;text-align:left;cursor:pointer}
.composer-add-menu button:hover,.composer-add-menu .composer-add-option:hover{background:#f2f2f3}
.composer-add-menu button>span,.composer-add-menu .composer-add-option>span{grid-row:1/3;width:28px;height:28px;display:grid;place-items:center;border:1px solid #dedee2;border-radius:8px;color:#555;font-size:13px}
.composer-add-menu button>strong,.composer-add-menu .composer-add-option>strong{overflow:hidden;font-size:11px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.composer-add-menu button>small,.composer-add-menu .composer-add-option>small{margin-top:2px;color:#85858d;font-size:9px}
.execute-icon{width:32px;height:32px}
.sidebar-user-menu{border-top:1px solid #e1e1e3}

.crm-people-scope{margin:0 0 8px;padding:6px 8px;border:1px solid #e1e4ea;border-radius:9px;background:#fafbfc;color:#667085}
.crm-people-scope legend{padding:0 4px;font-size:9px;font-weight:700}
.crm-people-scope>div{max-height:110px;display:block;overflow:auto}
.crm-people-scope label{display:inline-flex;align-items:center;gap:3px;color:#344054;font-size:10px;white-space:nowrap;cursor:pointer}
.crm-people-scope input{width:13px;height:13px;margin:0;accent-color:#3370ff}
.crm-people-scope label.is-current{font-weight:700}
.crm-people-scope>div>span{font-size:9px;color:#98a2b3}

@media(max-width:900px){
  .workspace>.history-panel:not(.is-minimized):not(.is-maximized){flex-basis:230px}
}

@media(max-width:720px){
  .app-shell{min-width:1020px;padding:8px}
  .workspace{display:flex;height:calc(100vh - 70px);flex-flow:row nowrap}
  .workspace>.panel{min-height:620px;padding:10px}
  .workspace>.panel:not(.is-minimized):not(.is-maximized){
    width:0;
    min-width:0;
    flex:1 1 0;
  }
}

/* 所有可点击按钮都提供即时的按压反馈，异步按钮仍由各自逻辑显示加载状态。 */
button:not(:disabled){
  transition:background-color .12s ease,color .12s ease,border-color .12s ease,box-shadow .12s ease,transform .08s ease,opacity .12s ease;
}
button:not(:disabled):active{
  transform:translateY(1px) scale(.98);
  filter:brightness(.96);
}
button:focus-visible{
  outline:2px solid rgba(51,112,255,.55);
  outline-offset:2px;
}

/* Once a result exists, dedicate most of the command column to it. */
.command-panel:has(.result-command-box:not([hidden])) .input-command-box{
  flex:0 1 clamp(92px,22%,180px);
}

/* Primary three-column ratio: left 25%, center 50%, right 25%. */
.workspace>.customer-panel:not(.is-minimized):not(.is-maximized),
.workspace>.history-panel:not(.is-minimized):not(.is-maximized){
  flex:1 1 0;
}
.workspace>.command-panel{
  flex:2 1 0;
}
.command-panel:has(.result-command-box:not([hidden])) .result-command-box{
  min-height:0;
  flex:1 1 auto;
}
.result-command-box .result{
  width:100%;
  min-width:0;
  min-height:0;
  height:100%;
}
.result-command-box .task-execution-list,
.result-command-box .task-confirm-list{
  max-height:none;
  overflow:visible;
}

.record-detail-dialog{position:fixed;inset:0;z-index:90;width:min(720px,calc(100vw - 28px));max-height:min(760px,calc(100vh - 40px));margin:auto;padding:0;border:0;border-radius:16px;background:#fff;box-shadow:0 24px 80px rgba(16,24,40,.28)}
.record-detail-dialog::backdrop{background:rgba(16,24,40,.48)}
.record-detail-head{position:sticky;top:0;z-index:1;padding:20px 22px 16px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid #e8ebf0;background:#fff}
.record-detail-head small{color:#315ec9;font-size:10px;font-weight:700}
.record-detail-head h3{margin:5px 0 0;color:#1d2939;font-size:18px}
.record-detail-actions{display:flex;align-items:center;gap:6px}
.record-detail-close,.record-detail-maximize{width:32px;height:32px;padding:0;border:0;border-radius:8px;background:#f2f4f7;color:#667085;line-height:32px;cursor:pointer}
.record-detail-close{font-size:22px}
.record-detail-maximize{font-size:17px}
.record-detail-close:hover,.record-detail-maximize:hover{background:#e8eeff;color:#315ec9}
.record-detail-dialog.is-maximized{width:calc(100vw - 24px);height:calc(100vh - 24px);max-width:none;max-height:none;margin:auto}
.record-detail-dialog.is-maximized .record-detail-fields{max-height:calc(100vh - 92px)}

/* AI 工作台主结构：CRM 上下文、销客对话、按需展开的任务工作区。 */
.workspace>.customer-panel{order:-1}
.workspace>.command-panel{order:0}
.workspace>.history-panel{order:1}

/* 中间列改为上方多轮对话、下方指令输入。 */
.command-panel .conversation-window{min-height:0;flex:1 1 auto;order:1}
.command-panel .conversation-composer{flex:0 0 auto;order:2}
.command-panel:has(.result-command-box:not([hidden])) .conversation-composer{
  flex:0 0 auto;
}
.conversation-window .conversation-messages{
  display:flex;
  min-height:180px;
  flex-direction:column;
  gap:12px;
  padding:14px;
  background:#f7f9fc;
}
.conversation-message{display:flex;width:100%}
.conversation-user{justify-content:flex-end}
.conversation-assistant{justify-content:flex-start}
.conversation-bubble{
  position:relative;
  width:fit-content;
  max-width:88%;
  padding:10px 12px 7px;
  border:1px solid #dfe5ef;
  border-radius:14px 14px 14px 4px;
  background:#fff;
  color:#344054;
  box-shadow:0 3px 10px rgba(16,24,40,.04);
}
.conversation-copy{
  width:20px;
  height:20px;
  padding:3px;
  display:grid;
  place-items:center;
  border:0;
  border-radius:5px;
  background:transparent;
  color:#98a2b3;
  cursor:pointer;
  transition:background .12s ease,color .12s ease;
}
.conversation-copy svg{width:14px;height:14px;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.conversation-copy:hover,.conversation-copy:focus-visible{background:#ededf0;color:#475467;outline:0}
.conversation-copy.is-copied{background:#e9f7ef;color:#168253}
.conversation-user .conversation-content{padding-top:0}
.conversation-message-meta{min-height:20px;margin-top:5px;display:flex;align-items:center;justify-content:flex-end;gap:6px}
.conversation-message-meta time{margin:0}
.conversation-feedback-actions{margin-top:9px;display:flex;align-items:center;gap:4px}
.conversation-feedback-actions button{min-width:29px;height:28px;padding:0 7px;display:inline-flex;align-items:center;justify-content:center;gap:4px;border:0;border-radius:7px;background:transparent;color:#6b7280;font:inherit;font-size:12px;cursor:pointer;transition:background .12s ease,color .12s ease,transform .12s ease}
.conversation-feedback-actions button span{font-size:9px}
.conversation-feedback-actions button:hover{background:#f0f1f3;color:#202123}
.conversation-feedback-actions button:active{transform:scale(.94)}
.conversation-feedback-actions button.is-selected{background:#eaf0ff;color:#315ec9}
.conversation-feedback-actions button:disabled{cursor:wait;opacity:.55}
.conversation-user .conversation-bubble{
  border-color:#dfe5ef;
  border-radius:14px 14px 4px 14px;
  background:#fff;
}
.conversation-content{font-family:inherit;font-size:14px;line-height:1.72;word-break:break-word}
.conversation-user .conversation-content small{display:block;margin-top:7px;color:#667085;font:inherit;font-size:13px;line-height:1.65}
.conversation-content>p:first-child{margin-top:0}
.conversation-content>p:last-child{margin-bottom:0}
.conversation-processed{display:block;margin-top:7px;color:#718096;font-size:9px;text-align:right}
.conversation-bubble time{display:block;margin-top:7px;color:#98a2b3;font-size:9px;text-align:right}
.conversation-empty{margin:auto;padding:28px 12px;color:#98a2b3;text-align:center}
.feedback-dialog{width:min(560px,calc(100vw - 28px))}
.feedback-intro{margin:0 0 14px;color:#667085;font-size:11px;line-height:1.65}
.feedback-reasons{margin:0 0 16px;padding:0;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;border:0}
.feedback-reasons label{margin:0;cursor:pointer}
.feedback-reasons input{position:absolute;opacity:0;pointer-events:none}
.feedback-reasons span{min-height:38px;padding:9px 10px;display:flex;align-items:center;border:1px solid #dfe3ea;border-radius:9px;background:#fff;color:#475467;font-size:11px;font-weight:600;transition:.12s ease}
.feedback-reasons input:checked+span{border-color:#7f9fff;background:#edf3ff;color:#264da8;box-shadow:0 0 0 2px rgba(51,112,255,.08)}
.feedback-dialog textarea{width:100%;padding:11px 12px;border:1px solid #d0d5dd;border-radius:9px;outline:0;resize:vertical;font:inherit;font-size:11px;line-height:1.6}
.feedback-dialog textarea:focus{border-color:#84a4ff;box-shadow:0 0 0 3px rgba(51,112,255,.1)}
.feedback-history-item{border-bottom:1px solid #eceef2}
.feedback-history-item>button{width:100%;padding:10px 8px;display:grid;gap:3px;border:0;border-radius:8px;background:transparent;color:#344054;text-align:left;cursor:pointer}
.feedback-history-item>button:hover{background:#ececee}
.feedback-history-item strong,.feedback-history-item span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.feedback-history-item strong{font-size:11px;font-weight:600}
.feedback-history-item span{color:#b54708;font-size:9px}
.feedback-history-item time{color:#98a2b3;font-size:8px}
.feedback-history-detail{max-height:calc(100vh - 105px);padding:18px 22px 24px;overflow:auto}
.feedback-history-detail section{padding:0 0 15px}
.feedback-history-detail section+section{padding-top:15px;border-top:1px solid #eceef2}
.feedback-history-detail strong{color:#344054;font-size:11px}
.feedback-history-detail p{margin:7px 0 0;color:#475467;font-size:11px;line-height:1.75;white-space:pre-wrap;word-break:break-word}
@media(max-width:560px){.feedback-reasons{grid-template-columns:1fr}}
.conversation-starter{width:min(680px,100%);margin:auto;padding:24px 18px;text-align:center}
.conversation-starter h3{margin:0 0 18px;color:#1d2939;font-size:22px;font-weight:720;letter-spacing:-.02em}
.conversation-starter p{margin:0;color:#98a2b3;font-size:12px}
.conversation-starter .conversation-starter-tagline{margin:-10px 0 18px;color:#667085;font-size:13px;line-height:1.6}
.conversation-suggestions{display:grid;grid-template-columns:1fr;gap:9px;text-align:left}
.conversation-suggestions button{min-height:48px;padding:9px 11px;display:flex;align-items:flex-start;gap:8px;border:1px solid #e3e7ee;border-radius:11px;background:#fff;color:#475467;font:inherit;font-size:11px;line-height:1.5;text-align:left;cursor:pointer;transition:.15s}
.conversation-suggestions button>span{width:18px;height:18px;flex:0 0 18px;display:grid;place-items:center;border-radius:6px;background:#f0f4ff;color:#315ec9;font-size:9px;font-weight:700}
.conversation-suggestions button:hover{border-color:#9bb3ff;background:#f4f7ff;color:#264da8;transform:translateY(-1px)}
.conversation-suggestion-actions{margin-top:10px;display:flex;align-items:center;justify-content:center;gap:6px}
.conversation-suggestion-actions button{padding:5px 9px;border:0;border-radius:7px;background:transparent;color:#667085;font:inherit;font-size:10px;cursor:pointer}
.conversation-suggestion-actions button:hover{background:#edf3ff;color:#315ec9}
@media(max-width:720px){.conversation-starter{padding:18px 8px}.conversation-starter h3{font-size:19px}.conversation-suggestions{grid-template-columns:1fr}}
.conversation-composer .composer{min-height:auto}

/* 输入框只保留一层较清晰的边框，工具栏与输入正文处于同一个框内。 */
.input-command-box{overflow:visible}
.command-panel .composer:focus-within{border:0;box-shadow:none}

/* 执行结果时间行不展示遗留的任务选择框。 */
.conversation-bubble input[type="checkbox"]{display:none!important}

.conversation-composer .command-editor,
.conversation-composer #commandInput{min-height:68px!important;max-height:132px!important;overflow-y:auto}
.conversation-composer .skill-toolbar{padding-right:9px}
/* “＋”菜单向输入框上方展开，父级不能裁剪，否则菜单项虽然存在但用户不可见。 */
.command-panel .conversation-composer,
.command-panel .conversation-composer .composer{overflow:visible!important}
.conversation-composer .execute-icon{
  width:30px;
  height:30px;
  min-width:30px;
  margin:0 0 0 auto;
  padding:0;
  display:grid;
  place-items:center;
  border-radius:50%;
  box-shadow:none;
}
.conversation-composer .execute-icon svg{width:17px;height:17px;fill:none;stroke:currentColor;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.conversation-composer .execute-icon.is-loading{background:#171717;color:#fff;opacity:1;cursor:not-allowed}
.conversation-composer .execute-icon.is-loading::after{width:10px;height:10px;border:0;border-radius:2px;background:#fff;content:"";animation:none}
.conversation-composer .execute-icon.is-loading svg{display:none}
.conversation-composer .status{margin-top:6px}
.async-completion-message{margin-top:8px;padding:10px 12px;border:1px solid #c8d6ff;border-radius:9px;background:#f3f6ff;color:#315ec9;font-size:11px;line-height:1.45}.async-completion-message strong{display:block;color:#244faa}.async-completion-message p{margin:3px 0 0}

/* AI 工作台第一阶段：降低嵌套窗口感，扩大真正的内容区域。 */
.topbar{min-height:38px;margin-bottom:7px}
.brand-icon{width:29px;height:29px;flex-basis:29px}
.topbar h1{font-size:18px}
.workspace{height:calc(100vh - 60px)}
.workspace>.panel{padding:12px}
.panel-heading{min-height:52px;padding:25px 2px 6px}
.panel-heading h2{font-size:14px}
.panel-heading p{font-size:10px}
.conversation-starter{padding:18px 14px}
.conversation-starter h3{margin-bottom:14px;font-size:20px}

/* 顶层三列仍是窗口；列内区域只保留折叠/恢复，不再重复显示三枚窗口图标。 */
.customer-panel .data-group-window-actions,
.command-panel .data-group-window-actions,
.history-panel .data-group-window-actions{
  position:static;
  order:3;
  margin-left:auto;
}
.customer-panel .data-group-window-actions button,
.command-panel .data-group-window-actions button,
.history-panel .data-group-window-actions button{
  display:none;
  width:22px;
  height:22px;
  border-radius:6px;
}
.customer-panel .data-group-window-actions button[data-group-action="minimize"]:not(:disabled),
.history-panel .data-group-window-actions button[data-right-action="minimize"]:not(:disabled),
.customer-panel .data-group-window-actions button[data-group-action="restore"]:not(:disabled),
.history-panel .data-group-window-actions button[data-right-action="restore"]:not(:disabled){
  display:block;
}
.customer-panel .data-group-head,
.history-panel .right-group-head{
  min-height:34px;
  padding:6px 9px;
  display:flex;
  align-items:center;
  gap:7px;
}
.customer-panel .data-group-head h3,
.history-panel .right-group-head h3{order:1}
.customer-panel .data-group-head>span,
.history-panel .right-group-head>span{order:2;margin-left:auto}
.history-panel .right-group-head .data-group-window-actions{order:4;margin-left:0}
.history-panel .right-group-head .clear-history{order:3;margin-left:auto}
.conversation-window .conversation-messages{padding:12px}
.right-groups{gap:6px}
.right-group{border-color:#e8ebf0;border-radius:9px}
.panel.is-minimized{min-width:52px;max-width:52px;flex-basis:52px}
.panel.is-minimized>.panel-marker{background:#fbfcfe}
.panel.is-minimized>.panel-marker span{font-size:16px}

/* ChatGPT 式左下角账户入口。 */
.customer-panel .data-groups{flex:1 1 auto}
.sidebar-user-menu{
  position:relative;
  width:100%;
  min-height:42px;
  margin-top:8px;
  padding:0;
  flex:0 0 auto;
  border:0;
  border-top:1px solid #edf0f4;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
.sidebar-user-menu .user-menu-toggle{
  width:100%;
  min-height:42px;
  padding:7px 5px;
  gap:8px;
  border-radius:9px;
  text-align:left;
}
.sidebar-user-menu .user-menu-toggle:hover{background:#f3f5f8}
.user-avatar-shell{
  width:27px;
  height:27px;
  flex:0 0 27px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:50%;
  background:linear-gradient(145deg,#dbe7ff,#eef2f8);
}
.user-avatar-shell::before{content:"人";color:#60708a;font-size:10px;font-weight:700}
.user-avatar-shell:has(img:not([hidden]))::before{display:none}
.user-avatar-shell img{width:100%;height:100%;border-radius:inherit;object-fit:cover}
.sidebar-user-copy{min-width:0;display:flex;flex:1;flex-direction:column}
.sidebar-user-copy strong{overflow:hidden;color:#344054;font-size:11px;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
.application-administrator-status{display:inline-block;margin-left:5px;padding:1px 4px;border:1px solid #d9dde5;border-radius:999px;background:#f5f6f8;color:#667085;font-size:9px;font-weight:600;line-height:1.25;vertical-align:1px}
.application-administrator-status[hidden]{display:none}
.application-administrator-status.is-application-administrator{border-color:#c8d8fb;background:#eef4ff;color:#315ec9}
.sidebar-user-copy small{margin-top:1px;color:#98a2b3;font-size:9px}
.sidebar-user-more{display:none}
.sidebar-user-menu .user-usage-popover{
  top:auto;
  right:0;
  bottom:calc(100% + 7px);
  left:0;
  width:100%;
  max-width:100%;
  min-width:0;
  overflow:hidden;
}
.sidebar-user-menu .user-usage-popover>div:not(.billing-actions){min-width:0;gap:8px}
.sidebar-user-menu .user-usage-popover em{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-user-menu .billing-actions{grid-template-columns:minmax(0,1fr)}
.sidebar-user-menu .recharge-entry,.sidebar-user-menu .refund-entry{min-width:0;padding-inline:5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.record-detail-fields{padding:8px 22px 22px;overflow:auto}
.record-detail-field{margin:0;padding:13px 0;display:grid;grid-template-columns:minmax(120px,180px) 1fr;gap:18px;border-bottom:1px solid #eef0f3}
.record-detail-field dt{color:#667085;font-size:11px;font-weight:700;line-height:1.65}
.record-detail-field dd{margin:0;color:#344054;font-size:12px;line-height:1.65;white-space:pre-wrap;word-break:break-word}
.record-detail-field dd>a,.record-detail-links a{color:#245bd7;font-weight:650;text-decoration:none}
.record-detail-field dd>a:hover,.record-detail-links a:hover{text-decoration:underline}
.record-detail-links{margin-top:7px;display:flex;flex-wrap:wrap;gap:10px}
.record-detail-related-list{margin-top:8px;display:grid;gap:6px}
.record-detail-related{width:100%;padding:8px 10px;display:flex;align-items:center;gap:9px;border:1px solid #d8e2f5;border-radius:8px;background:#f5f8ff;color:#264da8;font:inherit;text-align:left;cursor:pointer}
.record-detail-related:hover{border-color:#9bb3ff;background:#eaf0ff}
.record-detail-related:disabled{cursor:wait;opacity:.65}
.record-detail-related small{padding:2px 5px;border-radius:999px;background:#dfe8ff;color:#315ec9;font-size:9px;font-weight:700;white-space:nowrap}
.record-detail-related span{min-width:0;overflow:hidden;font-size:11px;font-weight:650;text-overflow:ellipsis;white-space:nowrap}
.record-detail-related-table-wrap{max-width:100%;overflow:auto;border:1px solid #e1e7f0;border-radius:9px}
.record-detail-related-table{width:100%;border-collapse:collapse;font-size:11px;white-space:nowrap}
.record-detail-related-table th,.record-detail-related-table td{padding:8px 10px;border-bottom:1px solid #eef0f3;text-align:left;vertical-align:middle}
.record-detail-related-table th{background:#f7f9fc;color:#667085;font-size:10px;font-weight:700}
.record-detail-related-table tbody tr:last-child td{border-bottom:0}
.record-detail-related-table a{color:#245bd7;font-weight:650;text-decoration:none}
.record-detail-related-table a:hover{text-decoration:underline}
.record-detail-related-key{width:auto;min-width:92px;margin:0;padding:5px 7px}
.record-detail-related-more{margin-top:8px;padding:7px 11px;border:1px solid #c9d6ee;border-radius:8px;background:#fff;color:#245bd7;font:inherit;font-size:11px;font-weight:650;cursor:pointer}
.record-detail-related-more:hover{background:#f3f6fc;border-color:#9bb3ff}
.record-detail-related-more:disabled{cursor:wait;opacity:.65}
.deepseek-usage{margin-top:12px;padding:10px 12px;display:flex;flex-wrap:wrap;gap:6px 12px;border:1px solid #dce5f5;border-radius:9px;background:#f7f9fd;color:#526174;font-size:11px}
.deepseek-usage strong{width:100%;color:#26364d;font-size:12px}
.deepseek-usage span{white-space:nowrap}
.deepseek-usage em{margin-left:auto;color:#16794b;font-style:normal;font-weight:750;white-space:nowrap}
.record-detail-load-related{padding:8px 11px;border:1px solid #c9d7ff;border-radius:8px;background:#edf3ff;color:#264da8;font:inherit;font-size:11px;font-weight:700;cursor:pointer}
.record-detail-load-related:hover{background:#dfe8ff}
.record-detail-load-related:disabled{cursor:wait;opacity:.65}

/* Phase 6：左侧导航采用主流 AI 应用的搜索、新对话与历史层级。 */
.workspace>.history-panel:not(.is-minimized):not(.is-maximized){
  flex-basis:286px;
  padding:10px 12px 14px;
}
.history-panel .right-groups{margin-top:0}
.sidebar-nav{gap:5px}
.sidebar-conversation-search{
  height:44px;
  margin:0 0 5px;
  padding:0 13px;
  gap:10px;
  border:1px solid transparent;
  border-radius:13px;
  background:#ececed;
  color:#77777e;
}
.sidebar-conversation-search>span{font-size:21px;line-height:1;transform:rotate(-15deg)}
.sidebar-conversation-search input{font-size:13px}
.sidebar-conversation-search:focus-within{
  border-color:#d8d8dc;
  background:#fff;
  box-shadow:0 1px 5px rgba(0,0,0,.05);
}
.sidebar-new-chat{
  height:44px!important;
  margin-bottom:5px;
  border:1px solid #ededee!important;
  border-radius:13px!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(0,0,0,.045);
}
.sidebar-new-chat:hover{background:#f1f1f2!important}
.sidebar-new-chat>span{font-size:18px!important;color:#222!important}
.sidebar-new-chat>strong{font-size:13px!important}
.sidebar-list-group>[data-sidebar-view]{
  height:40px;
  min-height:40px;
  flex:0 0 40px;
  border-radius:10px;
}
.sidebar-list-group:not(:has([data-sidebar-view="history"])){
  flex:0 0 auto;
}
.sidebar-list-group>[data-sidebar-view]>strong{font-size:12px}
.sidebar-nav button.is-active{background:#ececed}
.history-panel .right-group-head{
  min-height:28px;
  margin-top:3px;
  padding:3px 7px;
  border-bottom:0;
}
.history-panel .right-group-head h3{
  color:#a1a1a8;
  font-size:10px;
  font-weight:600;
}
.customer-panel .data-groups[hidden]{display:none!important}
.history-panel .right-group-content{padding:2px}
.history-panel .history-item{
  min-height:36px;
  padding:8px 9px;
  border-radius:9px;
}
.record-detail-none{color:#98a2b3;font-size:11px}
.record-detail-empty{padding:28px 0;color:#98a2b3;font-size:12px;text-align:center}
@media(max-width:600px){.record-detail-field{grid-template-columns:1fr;gap:5px}}

/* ChatGPT 式双栏：左侧历史，中间对话。 */
.workspace>.history-panel{order:-1}
.workspace>.command-panel{order:0}
.workspace>.history-panel:not(.is-minimized):not(.is-maximized){order:-1;flex:.82 1 0}
.workspace>.command-panel{order:0;flex:1.8 1 0}
.workspace>.history-panel.is-minimized{order:-1}
.history-panel .sidebar-user-menu{margin-top:auto}

/* CRM 核心数据由指令输入区“+”进入，按现有对象树逐级展开。 */
.workspace>.customer-panel:not(.is-minimized):not(.is-maximized){
  position:fixed;
  z-index:80;
  top:var(--page-top-offset);
  right:0;
  bottom:0;
  width:20%;
  height:auto;
  min-width:0;
  min-height:0;
  max-width:none;
  max-height:none;
  padding:12px;
  display:flex;
  flex:none;
  visibility:hidden;
  opacity:0;
  transform:translateX(10px) scale(.985);
  transform-origin:right center;
  pointer-events:none;
  transition:opacity .16s ease,transform .16s ease,visibility .16s;
  box-shadow:0 22px 70px rgba(16,24,40,.2);
}
.workspace>.customer-panel.is-context-open:not(.is-minimized):not(.is-maximized){
  visibility:visible;
  opacity:1;
  transform:none;
  pointer-events:auto;
}
.customer-panel .panel-heading{padding-top:8px}
.customer-panel .panel-heading-actions{top:8px;right:8px;left:auto;border:0;background:transparent}
.crm-context-close{width:24px;height:24px;padding:0;border:0;border-radius:7px;background:#f2f4f7;color:#667085;font-size:18px;line-height:24px;cursor:pointer}
.crm-context-home{width:24px;height:24px;padding:0;border:0;border-radius:7px;background:#f2f4f7;color:#667085;font-size:22px;line-height:22px;cursor:pointer}
.crm-context-add{width:24px;height:24px;padding:0;border:0;border-radius:7px;background:#edf3ff;color:#315ec9;font-size:18px;line-height:22px;cursor:pointer}
.crm-context-home:hover,.crm-context-add:hover{background:#e8eeff;color:#315ec9}
.crm-context-close:hover{background:#e8eeff;color:#315ec9}
.customer-panel .refresh{width:24px;height:24px;padding:0;display:grid;place-items:center;border:0;border-radius:7px;background:#f2f4f7;color:#667085;font-size:17px;line-height:24px;cursor:pointer;transition:transform .12s ease,background-color .12s ease,color .12s ease}
.customer-panel .refresh:hover{background:#e8eeff;color:#315ec9}
.customer-panel .refresh:active{transform:scale(.86);background:#dbe5ff;color:#244da8}
.customer-panel .refresh:disabled{cursor:progress;opacity:1}
.customer-panel .refresh .crm-refresh-icon{display:block;line-height:1}
.customer-panel .refresh.is-refreshing .crm-refresh-icon{animation:crm-refresh-spin .7s linear infinite}
.customer-panel .refresh.is-refresh-complete{background:#e8f7ee;color:#218653}
.customer-panel .refresh.is-refresh-error{background:#fff0ed;color:#c4320a}
@keyframes crm-refresh-spin{to{transform:rotate(360deg)}}
.crm-inline-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;width:100%}
.crm-inline-head>div:first-child{min-width:0}
.crm-inline-head h3{margin:0;color:#202123;font-size:14px}
.crm-inline-head p{margin:4px 0 0;color:#8b8b93;font-size:10px}
.crm-context-actions{display:flex;align-items:center;gap:4px;margin:0 0 0 auto;flex:0 0 auto;position:static}
.customer-panel .sidebar-user-menu{display:none!important}

/* CRM 数据区始终可见：桌面三列、手机单列。 */
.workspace>.customer-panel{border:1px solid #98a2b3!important}
.customer-panel .data-groups{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-rows:minmax(0,1fr);
  gap:8px;
  min-width:0;
  min-height:0;
  visibility:visible!important;
  opacity:1!important;
  overflow:hidden;
}
.customer-panel .data-groups>.data-group{
  display:flex!important;
  min-width:0;
  min-height:0;
  visibility:visible!important;
  flex-direction:column;
}
.customer-panel .data-groups>.data-group>.data-list{
  display:block!important;
  flex:1 1 0;
  min-width:0;
  min-height:0;
  max-height:none;
  visibility:visible!important;
  overflow:auto;
}
.crm-context-resize-handle{
  position:absolute;
  right:5px;
  bottom:5px;
  z-index:8;
  width:20px;
  height:20px;
  display:none;
  cursor:nwse-resize;
  touch-action:none;
}
.crm-context-resize-handle::before{
  content:"";
  position:absolute;
  right:3px;
  bottom:3px;
  width:10px;
  height:10px;
  border-right:2px solid #8b9ab0;
  border-bottom:2px solid #8b9ab0;
  border-radius:0 0 2px 0;
}
.customer-panel.is-context-open .crm-context-resize-handle{display:block}
.customer-panel.is-resizing{user-select:none;transition:none!important}
@media(max-width:900px){
  .customer-panel .data-groups{
    grid-template-columns:minmax(0,1fr);
    grid-template-rows:none;
    grid-auto-rows:minmax(220px,46dvh);
    overflow-x:hidden;
    overflow-y:auto;
  }
  .crm-context-resize-handle{display:none!important}
}

/* CRM 记录不再弹出独立窗口，统一嵌入右侧详情栏。 */

/* 收起后的列使用清晰的纵向标签，避免窄列中标题被裁切。 */
.panel.is-minimized>.panel-marker{
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:flex-start;
  gap:14px;
  padding-top:24px;
}
.panel.is-minimized>.panel-marker small{
  margin:0;
  writing-mode:vertical-rl;
  text-orientation:upright;
  white-space:normal;
  letter-spacing:.12em;
  line-height:1.35;
}

/* 执行状态默认只显示当前一步，点击当前行尾部箭头展开完整过程。 */
.execution-progress{padding:0;overflow:hidden;border:1px solid #e4e7ec;background:#f7f7f8}
.execution-progress details{margin:0}
.execution-progress .execution-progress-current{
  width:100%;
  min-height:38px;
  padding:9px 11px;
  display:grid;
  grid-template-columns:7px minmax(0,1fr) 18px;
  align-items:center;
  gap:8px;
  list-style:none;
  cursor:pointer;
}
.execution-progress .execution-progress-current::-webkit-details-marker{display:none}
.execution-progress .execution-progress-current::before{display:none}
.execution-progress .execution-progress-current span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.execution-progress .execution-progress-current b{
  width:18px;
  height:18px;
  display:grid;
  place-items:center;
  color:#8a8a92;
  font-size:15px;
  font-weight:500;
}
.execution-progress .execution-progress-current b::before{content:"⌄";transition:transform .16s ease}
.execution-progress details[open] .execution-progress-current b::before{transform:rotate(180deg)}
.execution-progress details.has-no-history .execution-progress-current{cursor:default}
.execution-progress details.has-no-history .execution-progress-current b{visibility:hidden}
.execution-progress ul{max-height:180px;margin:0;padding:5px 14px 10px 34px;overflow:auto;border-top:1px solid #e8e8eb;color:#73737b}
.execution-progress li{margin:4px 0;line-height:1.45}

/* 实时任务：先呈现进度摘要，再聚焦当前任务和可展开的过程记录。 */
.task-execution-flow{display:grid;gap:8px;margin-top:8px}
.task-execution-flow .task-execution-list{margin-top:0}
.task-execution-summary{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  min-height:28px;
  padding:0 2px;
  color:#7b8798;
  font-size:13px;
  font-variant-numeric:tabular-nums;
}
.task-execution-live{display:inline-flex;align-items:center;gap:7px;color:#315ec9;font-weight:700}
.task-execution-live i{width:7px;height:7px;border-radius:50%;background:#3370ff;box-shadow:0 0 0 4px rgba(51,112,255,.12);animation:progress-pulse 1.4s ease-in-out infinite}
.task-execution-row.is-active{border-color:#86a7ff;background:linear-gradient(135deg,#f9fbff 0%,#f1f5ff 100%);box-shadow:0 0 0 2px rgba(51,112,255,.1),0 4px 12px rgba(51,112,255,.07)}
.task-execution-row.is-active .task-execution-head>span{background:#dfe9ff;color:#2454b4}
.task-execution-row.is-active .task-inline-result{display:flex;align-items:center;gap:8px;background:#eaf1ff;color:#2454b4}
.execution-state{display:inline-flex;align-items:center;gap:6px}
.task-execution-row.is-active .execution-state::before{width:6px;height:6px;border-radius:50%;background:currentColor;content:"";animation:progress-pulse 1.4s ease-in-out infinite}
.execution-state-detail{color:#5f78ad;font-size:13px}
.execution-progress{margin-top:0;border-color:#dde4f0;background:#fafbfe;color:#536176;font-size:13px;line-height:1.5;box-shadow:0 1px 2px rgba(16,24,40,.03)}
.execution-progress .execution-progress-current{min-height:42px;padding:10px 12px}
.execution-progress ul{padding-top:7px;padding-bottom:12px;background:#fff}
@media(max-width:520px){
  .task-execution-summary{font-size:12px}
  .execution-state-detail{font-size:12px}
}

/* 左侧三类项目均为单行；操作按钮仅在悬停或键盘聚焦时出现。 */
.history-panel .history-item,
.history-panel .skill-card,
.history-panel .automation-card{
  position:relative;
  min-height:38px;
  padding:5px 7px;
  display:flex;
  align-items:center;
  overflow:hidden;
}
.history-panel .history-entry{min-width:0;flex:1;padding:5px 2px;border:0;background:transparent;text-align:left;cursor:pointer}
.history-panel .history-entry h3{margin:0;padding-right:54px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.history-panel .history-customer,
.history-panel .history-meta,
.history-panel .skill-card>p,
.history-panel .automation-card>p,
.history-panel .automation-card>small,
.history-panel .automation-card>br{display:none}
.history-panel .history-actions,
.history-panel .skill-card-title button,
.history-panel .automation-create{
  visibility:hidden;
  opacity:0;
  transition:opacity .12s ease;
}
.history-panel .history-actions{
  position:absolute;
  top:50%;
  right:5px;
  gap:2px;
  transform:translateY(-50%);
}
.history-panel .history-actions .save-skill{width:27px;height:27px;padding:0;overflow:hidden;border:0;border-radius:7px;background:transparent;font-size:0;cursor:pointer}
.history-panel .history-actions .save-skill::before{content:"◇";font-size:14px}
.history-panel .history-actions .save-skill:hover{background:#fff}
.history-panel .skill-card-title{width:100%;min-width:0}
.history-panel .skill-card-title strong{padding-right:56px}
.history-panel .skill-card-title button{position:absolute;top:50%;right:5px;transform:translateY(-50%)}
.history-panel .automation-create{
  position:absolute;
  top:50%;
  right:31px;
  width:27px;
  height:27px;
  padding:0;
  overflow:hidden;
  background:transparent;
  font-size:0;
  transform:translateY(-50%);
}
.history-panel .automation-create::before{content:"↻";font-size:13px}
.history-panel .automation-create:hover{background:#fff}
.history-panel .history-item:hover>.history-actions,
.history-panel .history-item:focus-within>.history-actions,
.history-panel .skill-card:hover .skill-card-title button,
.history-panel .skill-card:focus-within .skill-card-title button,
.history-panel .skill-card:hover>.automation-create,
.history-panel .skill-card:focus-within>.automation-create,
.history-panel .automation-card:hover .skill-card-title button,
.history-panel .automation-card:focus-within .skill-card-title button{
  visibility:visible;
  opacity:1;
}

/* 极简对话工作区：移除重复标题与窗口装饰，仅保留业务内容。 */
.ui-chrome-removed{display:none!important}
.sidebar-toggle{
  width:30px;
  height:30px;
  margin:0;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:transparent;
  color:#777780;
  cursor:pointer;
}
.sidebar-toggle:hover{background:#f1f1f3;color:#202123}
.sidebar-toggle svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.command-panel>.sidebar-toggle,.workspace-shortcut-dock>.sidebar-toggle{
  position:absolute;
  z-index:35;
  top:8px;
  left:8px;
  width:38px;
  height:38px;
  border:1px solid #dfe5f0;
  border-radius:11px;
  background:rgba(255,255,255,.96);
  box-shadow:0 4px 12px rgba(16,24,40,.08);
}
.command-panel>.sidebar-toggle:hover,.workspace-shortcut-dock>.sidebar-toggle:hover{
  background:#fff;
  box-shadow:0 7px 18px rgba(16,24,40,.14);
}
.command-panel>.sidebar-toggle:focus-visible,.workspace-shortcut-dock>.sidebar-toggle:focus-visible{
  outline:2px solid #84a4ff;
  outline-offset:2px;
}
.command-panel>.sidebar-toggle svg,.workspace-shortcut-dock>.sidebar-toggle svg{
  width:20px;
  height:20px;
}
.workspace.sidebar-closed>.history-panel{display:none!important}
.workspace.sidebar-closed>.command-panel{flex:1 1 auto}
.command-panel{padding-top:0!important}
.command-panel>.conversation-window{margin-top:0}
.conversation-window .conversation-messages{border-top:0}
.conversation-composer .status{display:none!important}

/* 对话左侧定位轨道：点击跳转，悬停可查看该段摘要。 */
.conversation-window{position:relative}
.conversation-navigator{
  position:absolute;
  z-index:8;
  top:14px;
  bottom:14px;
  left:5px;
  width:26px;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
}
.conversation-navigator[hidden]{display:none}
.conversation-nav-items{
  width:100%;
  min-height:0;
  padding:2px 0;
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  align-items:center;
  gap:5px;
  overflow:auto;
  scrollbar-width:none;
}
.conversation-nav-items::-webkit-scrollbar{display:none}
.conversation-nav-point{
  width:11px;
  height:3px;
  min-height:3px;
  padding:0;
  flex:0 0 auto;
  border:0;
  border-radius:999px;
  background:#d7d7dc;
  cursor:pointer;
  transition:width .13s ease,background .13s ease;
}
.conversation-nav-point:hover{width:21px;background:#777780}
.conversation-nav-user{background:#9da9c2}
.conversation-window:has(.conversation-navigator:not([hidden])) .conversation-messages{padding-left:32px}
.conversation-message.is-located .conversation-bubble{outline:2px solid rgba(51,112,255,.32);outline-offset:3px}

/* 历史、技能和自动化任务使用一致的悬停操作区。 */
.history-panel .history-actions button,
.history-panel .skill-card .automation-create,
.history-panel .skill-card-title button{
  width:27px;
  height:27px;
  padding:0;
  border:0;
  border-radius:7px;
  background:rgba(255,255,255,.9);
  color:#6f6f78;
  box-shadow:0 0 0 1px rgba(0,0,0,.04);
}
.history-panel .history-actions button:hover,
.history-panel .skill-card .automation-create:hover,
.history-panel .skill-card-title button:hover{background:#fff;color:#202123;box-shadow:0 1px 4px rgba(0,0,0,.12)}
.history-search-kind{display:block;margin-top:2px;color:#85858e;font-size:9px}

/* CRM 记录与任务结果链接统一使用可放大、可关闭的应用内弹窗。 */
.record-detail-dialog{
  width:min(760px,calc(100vw - 32px));
  height:min(760px,calc(100vh - 40px));
  max-width:none;
  max-height:none;
  overflow:hidden;
}
.record-detail-dialog .record-detail-fields{height:calc(100% - 76px);max-height:none;overflow:auto}
.record-detail-config-fields{display:block;width:100%;height:calc(100% - 104px);min-height:280px;padding:12px;resize:none;border:1px solid #d0d5dd;border-radius:10px;font-family:ui-monospace,SFMono-Regular,Consolas,monospace;font-size:12px;line-height:1.6}
.record-detail-config-fields[hidden],.record-detail-edit-tip[hidden]{display:none!important}
.record-detail-edit-tip{margin:8px 0;color:#667085;font-size:11px}
.record-detail-config-edit,.record-detail-config-cancel,.record-detail-config-save{min-height:30px;padding:0 11px;border:0;border-radius:8px;background:#edf3ff;color:#315ec9;cursor:pointer}
.record-detail-config-save{background:#315ec9;color:#fff}
.record-action.record-config-delete{margin-left:auto;margin-right:8px;padding-left:12px;border-left:1px solid #f0c7c7;border-radius:0;color:#b42318}
.record-detail-dialog.is-maximized{width:calc(100vw - 20px);height:calc(100vh - 20px)}
.record-detail-dialog::backdrop,.link-preview-dialog::backdrop{background:rgba(16,24,40,.44);backdrop-filter:blur(2px)}
.link-preview-dialog{
  width:min(920px,calc(100vw - 32px));
  height:min(760px,calc(100vh - 40px));
  max-width:none;
  max-height:none;
  padding:0;
  overflow:hidden;
  border:0;
  border-radius:16px;
  background:#fff;
  box-shadow:0 24px 80px rgba(16,24,40,.28);
}
.link-preview-dialog.is-maximized{width:calc(100vw - 20px);height:calc(100vh - 20px)}
.link-preview-head{
  height:54px;
  padding:0 12px 0 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  border-bottom:1px solid #eceef2;
  background:#fff;
}
.link-preview-title{min-width:0;overflow:hidden;color:#202123;font-size:13px;text-overflow:ellipsis;white-space:nowrap}
.link-preview-head>div{display:flex;align-items:center;gap:5px}
.link-preview-external,.link-preview-maximize,.link-preview-close{
  width:32px;
  height:32px;
  padding:0;
  display:grid;
  place-items:center;
  border:0;
  border-radius:8px;
  background:#f3f4f6;
  color:#67676f;
  font:inherit;
  font-size:16px;
  line-height:32px;
  text-decoration:none;
  cursor:pointer;
}
.link-preview-close{font-size:21px}
.link-preview-external:hover,.link-preview-maximize:hover,.link-preview-close:hover{background:#e9edf6;color:#245bd7}
.link-preview-frame{width:100%;height:calc(100% - 54px);display:block;border:0;background:#fff}
.link-preview-frame[hidden]{display:none}
.link-preview-content{height:calc(100% - 54px);padding:22px 26px;overflow:auto;background:#fff;color:#303030}
.link-preview-content[hidden]{display:none}
.link-preview-content pre{margin:0;white-space:pre-wrap;overflow-wrap:anywhere;font:inherit;font-size:13px;line-height:1.75}
.link-preview-loading{margin:28px 0;color:#85858d;text-align:center}
@media(max-width:720px){
  .panel.is-minimized>.panel-marker{
    flex-direction:row;
    justify-content:center;
    gap:10px;
    padding-top:8px;
  }
  .panel.is-minimized>.panel-marker small{
    writing-mode:horizontal-tb;
    text-orientation:mixed;
    white-space:nowrap;
    letter-spacing:normal;
  }
}

/* 左侧功能行的操作只在悬停或键盘聚焦时出现。 */
.sidebar-list-group{position:relative}
.sidebar-row-action{
  position:absolute;
  z-index:4;
  top:5px;
  right:6px;
  width:auto!important;
  height:30px!important;
  padding:0 8px!important;
  display:block!important;
  border-radius:7px!important;
  background:#fff!important;
  color:#6f6f78!important;
  font-size:10px!important;
  line-height:30px;
  visibility:hidden;
  opacity:0;
  box-shadow:0 1px 5px rgba(0,0,0,.09);
  transition:opacity .12s ease;
}
.sidebar-list-group:hover>.sidebar-row-action,
.sidebar-list-group:focus-within>.sidebar-row-action{
  visibility:visible;
  opacity:1;
}
.sidebar-row-action:hover{background:#f4f4f5!important;color:#202123!important}
#clearHistory{width:30px!important;padding:0!important;display:grid!important;grid-template-columns:1fr!important;gap:0!important;place-items:center;border-radius:7px!important}
#clearHistory svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
#clearHistory:hover{background:#fff0ee!important;color:#b42318!important}

/* 左侧栏保持紧凑，主对话占用除左侧栏外的全部可用空间。 */
.workspace>.history-panel:not(.is-minimized):not(.is-maximized){
  width:20%;
  min-width:0;
  flex:0 0 20%;
  padding-left:8px;
  padding-right:8px;
}
.workspace>.command-panel{flex:1 1 auto}
.history-panel .right-group-content{padding-left:1px;padding-right:1px}
.history-panel .history-item,
.history-panel .skill-card,
.history-panel .automation-card{padding-left:5px;padding-right:5px}

/* 任务历史、技能和自动化任务采用统一的轻量线性图标。 */
.sidebar-nav-icon{
  width:18px!important;
  height:18px!important;
  display:grid!important;
  place-items:center;
  color:#5f6f8e;
}
.sidebar-nav-icon svg{
  width:16px;
  height:16px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.7;
  stroke-linecap:round;
  stroke-linejoin:round;
}

/* 记录行操作直接使用中文名称，避免抽象图标含义不明确。 */
.history-panel .history-actions .save-skill,
.history-panel .history-actions .delete-history,
.history-panel .skill-card-title button,
.history-panel .automation-create{
  width:auto!important;
  min-width:38px;
  height:27px;
  padding:0 7px!important;
  overflow:visible;
  font-size:10px!important;
  line-height:27px;
  white-space:nowrap;
}
.history-panel .history-actions .save-skill::before,
.history-panel .automation-create::before{content:none}
.history-panel .automation-create{right:50px}
.history-panel .history-entry h3,
.history-panel .skill-card-title strong{padding-right:0}
.history-panel .history-actions,
.history-panel .skill-card-title button,
.history-panel .automation-create{background:#fff;box-shadow:0 1px 4px rgba(16,24,40,.08)}

/* 列表项统一采用“正文 + 操作组”布局，避免多个绝对定位按钮互相覆盖。 */
.history-panel .history-entry,
.history-panel .skill-card-copy{
  min-width:0;
  max-width:none;
  flex:1 1 auto;
  width:100%;
  padding-right:0;
}
.history-panel .history-item{padding-right:2px;padding-left:2px}
.history-panel .history-entry{display:block;overflow:hidden}
.history-panel .history-entry h3{
  display:block;
  width:100%;
  max-width:100%;
  padding:0;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.history-panel .skill-card-copy strong{
  display:block;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.history-panel .skill-card-copy p,
.history-panel .skill-card-copy small{display:none}
.history-panel .history-actions,
.history-panel .skill-card-actions{
  position:static;
  flex:0 0 auto;
  margin-left:5px;
  display:none;
  align-items:center;
  gap:4px;
  visibility:hidden;
  opacity:0;
  transform:none;
  transition:opacity .12s ease;
}
.history-panel .skill-card-actions button,
.history-panel .history-actions button{
  position:static!important;
  width:auto!important;
  min-width:38px;
  height:27px;
  padding:0 7px!important;
  border:0;
  border-radius:7px;
  background:#fff;
  color:#666670;
  font:inherit;
  font-size:10px!important;
  line-height:27px;
  white-space:nowrap;
  box-shadow:0 1px 4px rgba(16,24,40,.08);
  transform:none!important;
  cursor:pointer;
  visibility:visible;
  opacity:1;
}
.history-panel .history-item:hover>.history-actions,
.history-panel .history-item:focus-within>.history-actions,
.history-panel .skill-card:hover>.skill-card-actions,
.history-panel .skill-card:focus-within>.skill-card-actions,
.history-panel .automation-card:hover>.skill-card-actions,
.history-panel .automation-card:focus-within>.skill-card-actions{
  display:flex;
  visibility:visible;
  opacity:1;
}

/* 左侧记录仅显示一个更多菜单，操作项纵向弹出且不挤占正文宽度。 */
.history-panel .row-action-menu{
  position:absolute;
  z-index:12;
  top:5px;
  right:4px;
  width:28px;
  height:28px;
  transform:none;
  visibility:hidden;
  opacity:0;
}
.history-panel .history-item,
.history-panel .skill-card,
.history-panel .automation-card{overflow:visible}
.history-panel .history-item:hover>.row-action-menu,
.history-panel .history-item:focus-within>.row-action-menu,
.history-panel .skill-card:hover>.row-action-menu,
.history-panel .skill-card:focus-within>.row-action-menu,
.history-panel .automation-card:hover>.row-action-menu,
.history-panel .automation-card:focus-within>.row-action-menu{visibility:visible;opacity:1}
.history-panel .row-action-trigger{
  width:28px;
  height:28px;
  padding:0;
  border:0;
  border-radius:7px;
  background:#fff;
  color:#666670;
  font:inherit;
  font-size:11px;
  cursor:pointer;
  box-shadow:0 1px 5px rgba(16,24,40,.12);
}
.history-panel .row-action-options{
  position:fixed;
  z-index:200;
  inset:auto;
  width:max-content;
  min-width:108px;
  margin:0;
  padding:4px;
  display:none;
  flex-direction:column;
  align-items:stretch;
  gap:2px;
  border:1px solid #dedee2;
  border-radius:9px;
  background:#fff;
  box-shadow:0 10px 28px rgba(16,24,40,.16);
  transform:none;
}
.history-panel .row-action-options.is-open{display:flex;visibility:visible;opacity:1}
/* 菜单打开时会移动到 body，仍使用相同浮层样式并保持在所有应用面板之上。 */
body>.row-action-options{position:fixed;z-index:1000;width:max-content;min-width:108px;padding:4px;display:none;flex-direction:column;gap:2px;border:1px solid #dedee2;border-radius:9px;background:#fff;box-shadow:0 10px 28px rgba(16,24,40,.2)}
body>.row-action-options.is-open{display:flex;visibility:visible;opacity:1}
body>.row-action-options button{width:100%;min-width:100px;height:29px;padding:0 9px;border:0;border-radius:6px;background:#fff;color:#4b4b53;font:inherit;font-size:10px;line-height:29px;text-align:left;white-space:nowrap;cursor:pointer}
body>.row-action-options button:hover{background:#f2f2f3}
/* 任务历史旧版曾把“保存为技能”压缩成菱形图标；新菜单始终显示完整文字。 */
.row-action-options [data-save-skill-index],
body>.row-action-options [data-save-skill-index]{
  width:100%!important;
  min-width:100px;
  height:29px;
  margin:0;
  padding:0 9px!important;
  overflow:visible;
  font-size:10px!important;
  line-height:29px;
  text-align:left;
}
.row-action-options [data-save-skill-index]::before,
body>.row-action-options [data-save-skill-index]::before{content:none!important}
/* 操作菜单展开后保持父容器可见，避免鼠标移向浮层时菜单随记录悬停状态一起消失。 */
.history-panel .row-action-menu.is-menu-open{visibility:visible;opacity:1}
.history-panel .row-action-options button{
  position:static!important;
  width:100%!important;
  min-width:100px;
  height:29px;
  padding:0 9px!important;
  border:0;
  border-radius:6px;
  background:#fff;
  color:#4b4b53;
  font:inherit;
  font-size:10px!important;
  line-height:29px;
  text-align:left;
  white-space:nowrap;
  box-shadow:none;
  transform:none!important;
  visibility:visible;
  opacity:1;
}
.history-panel .row-action-options button:hover{background:#f2f2f3}

/* 左侧四个分组不随展开状态压缩间距，标题行和内容列表保持稳定节奏。 */
.history-panel .right-group{margin:0 0 6px!important}
.history-panel .right-group-header{min-height:34px;margin:0!important}
.history-panel .right-group-content{padding-top:4px!important;padding-bottom:4px!important}
.history-panel .right-group-content[hidden]{display:none!important}

/* 信息检索分析使用结构化消息卡片，提升长文本、标题和列表的可读性。 */
.information-result-card{margin:10px 0 4px;padding:16px 18px;border:1px solid #e0e4ea;border-radius:12px;background:#f1f2f4;color:#30343b}
.information-match-heading{display:flex;align-items:center;gap:8px;margin:16px 0 7px;padding-top:12px;border-top:1px solid #e1e5eb;color:#1f4fbf;font-weight:700}
.information-match-heading:first-child{margin-top:0;padding-top:0;border-top:0}
.information-match-heading span{padding:4px 9px;border-radius:6px;background:#eaf1ff}
.information-record-heading{margin:16px 0 7px;padding:9px 11px;border-left:3px solid #5b8def;border-radius:0 7px 7px 0;background:#f8faff;color:#273b63;font-size:12px;font-weight:700}
.information-record-heading:first-child{margin-top:0}
.information-source{margin:5px 0 8px;color:#667085;font-size:11px;font-weight:650}
.information-result-body small{color:#8a929e;font-size:10px;font-weight:400}
.query-result-card{border-color:#dbe4f4;background:#f8fafc}
.query-result-card .information-result-body>p:first-child{margin-top:0;padding:8px 10px;border-radius:7px;background:#eef3fb;color:#4b5d78;font-size:11px;line-height:1.55}
.task-input-card{margin:7px 0 9px;padding:10px 12px;border:1px solid #e5e8ee;border-radius:9px;background:#fafbfc}
.task-input-label{margin-bottom:7px;color:#98a2b3;font-size:10px;font-weight:700;letter-spacing:.04em}
.task-input-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}
.task-input-grid>div{min-width:0;padding:7px 9px;border-radius:7px;background:#fff}
.task-input-grid span{display:block;margin-bottom:3px;color:#98a2b3;font-size:10px}
.task-input-grid strong{display:block;overflow:hidden;color:#344054;font-size:11px;line-height:1.45;text-overflow:ellipsis;white-space:nowrap}
.task-input-grid .task-input-request{grid-column:1 / -1;background:#f3f6fc}
.task-input-request strong{white-space:normal}
.information-result-body h2,.information-result-body h3,.information-result-body h4{margin:14px 0 7px;color:#20242b;line-height:1.4}
.information-result-body h2:first-child,.information-result-body h3:first-child,.information-result-body h4:first-child{margin-top:0}
.information-result-body p{margin:7px 0;line-height:1.75}
.information-result-body ul{margin:8px 0;padding-left:22px}
.information-result-body li{margin:5px 0;line-height:1.65}
.information-result-body a{color:#245bd7;text-decoration:none}
.information-result-body a:hover{text-decoration:underline}

/* 页面启动、CRM 后台加载和任务执行期间保持主工作区尺寸稳定。 */
html,body{width:100%;height:100%;overflow:hidden}
.app-shell{
  width:100%;
  height:100dvh;
  min-width:0;
  min-height:0;
  display:flex;
  flex-direction:column;
  overflow:hidden;
}
.topbar{flex:0 0 auto}
.workspace{
  width:100%;
  max-width:100%;
  min-width:0;
  height:auto;
  min-height:0;
  flex:1 1 auto;
  contain:layout;
  overflow:hidden;
}
.workspace>.panel{
  min-height:0!important;
  max-height:100%;
}
.workspace>.command-panel{
  height:100%;
  max-height:100%;
  min-width:0;
}
.workspace>.history-panel:not(.is-minimized):not(.is-maximized){
  width:20%;
  flex:0 0 20%;
}
.workspace>.command-panel{
  width:80%;
  flex:0 0 80%;
}
.command-panel>.conversation-window{
  min-height:0;
  flex:1 1 0;
}
.command-panel>.conversation-composer{
  height:126px;
  min-height:126px;
  max-height:126px;
  flex:0 0 126px!important;
}
.conversation-composer .composer{
  height:100%;
  display:flex;
  flex-direction:column;
}
.conversation-composer .command-editor,
.conversation-composer #commandInput{
  height:auto;
  min-height:0!important;
  max-height:none!important;
  flex:1 1 auto;
  overflow-y:auto;
}
.conversation-composer .skill-toolbar{flex:0 0 42px}
.crm-loading-shell{padding:8px;display:grid;gap:8px}
.crm-loading-shell span{height:54px;border-radius:9px;background:linear-gradient(90deg,#f2f3f5 25%,#fafafa 40%,#f2f3f5 60%);background-size:240% 100%;animation:crm-loading 1.25s ease-in-out infinite}
@keyframes crm-loading{to{background-position:-140% 0}}
.conversation-starter{margin:0 auto}

@media(max-width:900px){
  .workspace{display:block}
  .workspace>.history-panel,
  .workspace>.customer-panel,
  .workspace>.command-panel{
    width:100%;
    min-width:0;
    height:100%;
    display:flex;
  }
  .workspace>.panel{min-height:0}
}
/* 客户应用统一采用中文系统字体，避免侧边栏与中英文混排的指令区视觉不一致。 */

html,body,button,input,textarea,select{
  font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;
}

/* 技能可以直接显示，也可以按目录折叠；旧技能没有目录时保持原来的根级展示。 */
.skill-directory{margin:2px 0;border-radius:8px}
.skill-directory-toggle{width:100%;height:34px;padding:0 7px;display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:5px;border:0;border-radius:8px;background:transparent;color:#343541;font:inherit;text-align:left;cursor:pointer}
.skill-directory-toggle:hover{background:#ececee}
.skill-directory-toggle>span{color:#667085;font-size:17px;text-align:center}
.skill-directory-toggle>strong{overflow:hidden;font-size:11px;text-overflow:ellipsis;white-space:nowrap}
.skill-directory-toggle>small{color:#98a2b3;font-size:9px}
.skill-directory-items{padding-left:14px;border-left:1px solid #e3e6eb}
.skill-picker-directory{margin-top:5px;padding-top:5px;border-top:1px solid #eef0f3}
.skill-picker-directory>strong{display:block;padding:4px 9px;color:#667085;font-size:9px}

/* 左侧边栏只有导航、目录和分组标题使用粗体，具体记录及账户正文使用常规字重。 */
.history-panel .history-entry h3,
.history-panel .skill-card-copy strong,
.history-panel .feedback-history-item strong,
.history-panel .sidebar-user-copy strong,
.history-panel .sidebar-new-chat>strong{
  font-weight:400!important;
}

/* 左侧任务历史、技能、自动化任务和反馈统一使用相同行高与行间距。 */
.history-panel .right-group-content{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.history-date-group{display:flex;flex-direction:column;gap:3px}
.history-date-group+.history-date-group{margin-top:9px}
.history-date-group>h4{margin:0;padding:3px 7px;color:#8b919c;font-size:10px;font-weight:500}
.history-panel .history-item{min-height:50px!important}
.history-panel .history-entry h3{font-size:11px;line-height:1.45}
.history-entry-time{display:block;margin-top:3px;color:#98a2b3;font-size:9px;line-height:1.35}
.history-panel .history-item.is-selected{background:#e8edf7;box-shadow:inset 3px 0 0 #4778dc}
.history-panel .history-item.is-selected:hover{background:#e8edf7}
.sidebar-search-result{width:100%;min-width:0;padding:7px!important;display:block!important;border:0;border-radius:8px;background:transparent;color:#343541;font:inherit;text-align:left;cursor:pointer}
.sidebar-search-result:hover{background:#ececee}
.sidebar-search-result strong,.sidebar-search-result small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sidebar-search-result strong{font-size:11px;font-weight:400}
.sidebar-search-result small{margin-top:3px;color:#98a2b3;font-size:9px}
.history-panel .history-item,
.history-panel .skill-card,
.history-panel .automation-card,
.history-panel .feedback-history-item{
  min-height:38px;
  margin:0;
  padding:5px 7px;
  border:0;
  border-radius:8px;
}
.history-panel .feedback-history-item>button{
  min-height:28px;
  padding:0;
}
.history-panel [data-sidebar-view="feedbacks"],
.history-panel [data-right-group="feedbacks"],
.history-panel [data-right-group="feedbacks"] *{
  font-family:"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",Arial,sans-serif;
}
.history-panel [data-right-group="feedbacks"] .right-group-head h3{
  color:#6b6b73;
  font-size:12px;
  font-weight:600;
}
.history-panel [data-right-group="feedbacks"] .right-group-head>span{
  color:#98a2b3;
  font-size:10px;
  font-weight:400;
}
.history-panel .feedback-history-item strong{
  color:#343541;
  font-size:12px;
  font-weight:400!important;
  line-height:1.45;
}
.history-panel .feedback-history-item span{
  color:#b54708;
  font-size:11px;
  font-weight:400;
  line-height:1.4;
}
.history-panel .feedback-history-item time{
  color:#98a2b3;
  font-size:10px;
  font-weight:400;
  line-height:1.4;
}
.history-panel .skill-directory-items{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.history-panel .skill-directory-items[hidden]{display:none}

/* 业务配置中心在账户菜单中提供九类配置状态和入口。 */
.business-config-entry{
  width:100%;
  min-height:32px;
  border:1px solid #d8e2f7;
  border-radius:8px;
  background:#f6f8ff;
  color:#315ec9;
  font-size:11px;
  cursor:pointer;
}
.business-config-panel-content{display:flex;min-width:0;min-height:0;flex:1 1 auto;flex-direction:column;overflow:auto;padding:2px}
.business-config-panel-content[hidden]{display:none!important}
.business-config-overview{display:grid;grid-template-columns:120px minmax(0,1fr) auto auto;align-items:center;gap:12px;margin:14px 0}
.business-config-overview select,.business-config-row select{height:34px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;padding:0 9px}
.business-config-items{display:flex;flex-direction:column;gap:7px}
.business-config-row{display:grid;grid-template-columns:28px minmax(130px,1fr) 105px repeat(3,74px);align-items:center;gap:7px;padding:9px;border:1px solid #e7e9ee;border-radius:10px;background:#fafbfc}
.business-config-order{width:24px;height:24px;display:grid;place-items:center;border-radius:50%;background:#e9efff;color:#315ec9;font-size:10px;font-weight:700}
.business-config-row .business-config-name{height:auto;padding:0;border:0;background:transparent;color:#344054;font-size:12px;font-weight:700;text-align:left;cursor:pointer}
.business-config-row .business-config-name:hover,.business-config-row .business-config-name:focus-visible{color:#315ec9;text-decoration:underline}
.business-config-row button{height:32px;border:0;border-radius:7px;background:#edf3ff;color:#315ec9;font-size:10px;cursor:pointer}
.business-config-suggestion{margin-top:12px;padding:11px;border:1px solid #d8e2f7;border-radius:10px;background:#f7f9ff}
.business-config-suggestion strong{display:block;margin-bottom:8px;font-size:11px}
.business-config-suggestion textarea{width:100%;padding:10px;border:1px solid #d0d5dd;border-radius:8px;background:#fff;resize:vertical;font-size:11px;line-height:1.65}
.business-config-suggestion button{margin-top:7px;padding:6px 12px;border:0;border-radius:7px;background:#315ec9;color:#fff;font-size:10px;cursor:pointer}
.opportunity-process-setup-page{display:flex;min-width:0;min-height:0;flex:1 1 auto;flex-direction:column;gap:12px;overflow:auto;padding:4px 2px}.opportunity-process-setup-page[hidden]{display:none!important}.opportunity-process-setup-head{padding:14px;border:1px solid #d8e2f7;border-radius:12px;background:#f7f9ff}.opportunity-process-setup-head small{color:#315ec9;font-weight:700}.opportunity-process-setup-head h3{margin:5px 0;color:#1d2939;font-size:16px}.opportunity-process-setup-head p{margin:0;color:#667085;font-size:12px;line-height:1.65}.opportunity-process-default,.opportunity-process-result,.opportunity-process-upload{display:grid;gap:7px;color:#344054;font-size:12px;font-weight:600}.opportunity-process-default textarea,.opportunity-process-result textarea{width:100%;padding:10px;border:1px solid #d0d5dd;border-radius:9px;background:#fff;resize:vertical;font:12px/1.65 inherit}.opportunity-process-upload{padding:11px;border:1px dashed #b8c8e6;border-radius:9px;background:#fbfcff}.opportunity-process-upload input{max-width:100%;font:12px inherit}.opportunity-process-upload small{color:#667085;font-weight:400}.opportunity-process-parse{align-self:flex-start;padding:8px 13px;border:0;border-radius:8px;background:#315ec9;color:#fff;font-size:12px;cursor:pointer}.opportunity-process-parse:disabled{opacity:.65;cursor:wait}
.business-config-inspection{max-height:220px;margin:8px 0;padding:10px;overflow:auto;border:1px solid #e5e7eb;border-radius:10px;background:#f8fafc;font-size:10px}
.business-config-inspection>div:first-child,.business-config-inspection-item{display:flex;justify-content:space-between;gap:12px}
.business-config-inspection-item{padding:6px 0;border-top:1px solid #e5e7eb}
.business-config-inspection-item em{color:#64748b;font-style:normal;text-align:right}
.business-config-inspection button{margin-top:8px;padding:6px 10px;border:0;border-radius:7px;background:#315ec9;color:#fff;cursor:pointer}
.workspace>.customer-panel.business-record-split:not(.is-minimized):not(.is-maximized){display:grid!important;grid-template-columns:minmax(260px,36%) minmax(0,1fr);grid-template-rows:auto auto minmax(0,1fr);gap:10px;align-content:stretch}
.customer-panel.business-record-split .crm-inline-head,.customer-panel.business-record-split>.search{grid-column:1/-1;margin:0}
.customer-panel.business-record-split .data-groups{grid-column:1;grid-row:3;width:auto;grid-template-columns:minmax(0,1fr)}
.business-parameter-pane{grid-column:2;grid-row:3;min-width:0;min-height:0;padding:16px;overflow:auto;border:1px solid #dce4f2;border-radius:12px;background:linear-gradient(180deg,#fbfcff 0,#f8faff 100%)}
.business-parameter-pane[hidden]{display:none!important}
.business-parameter-pane form{height:100%;display:flex;flex-direction:column;gap:10px}
.business-parameter-fields{display:flex;min-height:0;flex:1 1 auto;flex-direction:column;gap:12px;overflow:auto;padding:2px 4px 2px 0}
.business-parameter-field{display:grid;gap:7px;padding:12px;border:1px solid #e4e7ec;border-radius:10px;background:#fff;box-shadow:0 1px 2px rgba(16,24,40,.025)}
.business-parameter-field>span{display:flex;align-items:center;justify-content:space-between;gap:8px;color:#344054;font-size:12px;font-weight:600}
.business-parameter-field small{color:#98a2b3;font-size:10px;font-weight:400}
.business-parameter-field input,.business-parameter-field textarea{width:100%;border:1px solid #d0d5dd;border-radius:7px;padding:9px 10px;background:#fff;color:#101828;font:12px/1.55 inherit}
.business-parameter-field input[type="checkbox"]{width:16px;height:16px;padding:0}
.business-parameter-field textarea{min-height:96px;resize:vertical;font-family:ui-monospace,SFMono-Regular,Consolas,monospace}
.business-parameter-field.is-readonly{background:#f8fafc}.business-parameter-field.is-readonly input,.business-parameter-field.is-readonly textarea{border-color:transparent;background:transparent;color:#475467;cursor:default}
.business-parameter-guidance{display:flex;align-items:flex-start;gap:7px;margin:0;padding:9px 10px;border:1px solid #dbe7fb;border-radius:8px;background:#f4f8ff;color:#526581;font-size:11px;line-height:1.55}.business-parameter-guidance span{display:inline-grid;flex:0 0 auto;place-items:center;width:15px;height:15px;margin-top:1px;border-radius:50%;background:#dce9ff;color:#3b69b7;font-size:10px;font-weight:700}
.business-relation{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.business-relation-selected{display:flex;flex:1 1 100%;flex-wrap:wrap;gap:6px}.business-relation-actions{display:flex;align-items:center;gap:14px;margin-top:2px}.business-relation-count{margin-right:2px;color:#7a8799;font-size:11px}.business-relation-record,.business-relation-select{border:1px solid #cdd9ef;border-radius:7px;padding:6px 9px;background:#f5f8ff;color:#2454aa;font:inherit;font-size:11px;cursor:pointer}.business-parameter-actions{margin-top:2px;padding-top:12px;border-top:1px solid #e8edf5}.business-parameter-delete{margin-right:auto;border-color:#f0c7c7!important;background:#fffafa!important;color:#b54747!important}.business-parameter-delete:hover{background:#fff1f1!important}.business-relation-picker{width:min(560px,calc(100vw - 24px));border:0;border-radius:12px;box-shadow:0 18px 55px #10182833}.business-relation-picker form{display:grid;gap:10px;padding:14px}.business-relation-search{border:1px solid #d0d5dd;border-radius:7px;padding:9px 10px;font:inherit}.business-relation-options{max-height:48vh;overflow:auto;display:grid;gap:5px}.business-relation-options label{display:flex;align-items:center;gap:8px;padding:8px;border:1px solid #eaecf0;border-radius:7px}.business-relation-options small{margin-left:auto;color:#667085}
@media(max-width:900px){.workspace>.customer-panel.business-record-split:not(.is-minimized):not(.is-maximized){grid-template-columns:minmax(0,1fr);grid-template-rows:auto auto minmax(180px,42%) minmax(220px,1fr);overflow:auto}.customer-panel.business-record-split .data-groups{grid-column:1;grid-row:3;width:100%}.business-parameter-pane{grid-column:1;grid-row:4;width:100%}}
@media(max-width:620px){.business-config-row{grid-template-columns:28px minmax(0,1fr) 94px}.business-config-row button{grid-column:2/-1}.business-config-overview{grid-template-columns:1fr}}

/* 手机端必须严格收敛到设备视口：只显示会话区，任何历史桌面最小宽度不得造成横向滚动。 */
@media(max-width:900px){
  html,body{width:100%;max-width:100%;overflow-x:hidden}
  .app-shell{width:100%;min-width:0;max-width:100%;padding:8px max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
  .topbar{width:100%;min-width:0;max-width:100%;margin-bottom:6px}
  .workspace{width:100%;min-width:0;max-width:100%;height:calc(100dvh - 58px);margin:0;overflow:hidden}
  .workspace>.command-panel{width:100%;min-width:0;max-width:100%;height:100%;padding:8px}
  .command-panel>.panel-heading,.conversation-window,.conversation-composer{width:100%;min-width:0;max-width:100%}
  .conversation-messages,.conversation-message,.conversation-message-body,.task-execution-card,.result{min-width:0;max-width:100%;overflow-wrap:anywhere;word-break:break-word}
  .conversation-message.user,.conversation-message.assistant{max-width:94%}
  .conversation-composer .composer,.command-editor{width:100%;min-width:0;max-width:100%}
  .composer-add-menu{width:min(260px,calc(100vw - 32px));max-width:calc(100vw - 32px)}
  .attachment-strip,.references{max-width:100%;overflow-x:auto}
  .attachment-chip{max-width:calc(100vw - 44px)}
  .analysis-charts{grid-template-columns:minmax(0,1fr)}
  .task-execution-card table,.record-detail-related-table{display:block;max-width:100%;overflow-x:auto;white-space:nowrap}
  dialog,.record-detail-dialog,.link-preview-dialog,.task-edit-dialog,.feedback-dialog{max-width:calc(100vw - 16px);margin:auto}
  .record-detail-dialog.is-maximized,.link-preview-dialog.is-maximized{width:calc(100vw - 8px);height:calc(100dvh - 8px);max-width:none;max-height:none}
}

@media(max-width:420px){
  .app-shell{padding-inline:max(4px,env(safe-area-inset-left)) max(4px,env(safe-area-inset-right))}
  .workspace>.command-panel{padding:5px}
  .conversation-messages{padding-inline:5px}
  .conversation-message.user,.conversation-message.assistant{max-width:97%}
  .topbar h1{font-size:15px}
}
/* CRM 浮层与工作区顶端对齐 */
.workspace > .customer-panel {
  margin-top: 0;
  transform: none;
  align-self: flex-start;
}

/* 飞书内嵌 WebView 对原生 dialog 的顶层渲染不稳定，改用文档内兼容浮层。 */
body.sales-onboarding-open,body.embedded-dialog-open{overflow:hidden}
.task-edit-dialog.embedded-dialog-fallback{position:fixed;z-index:1200;top:50%;left:50%;display:block;width:min(620px,calc(100vw - 28px));max-height:calc(100dvh - 28px);margin:0;overflow:auto;transform:translate(-50%,-50%);background:#fff}
.link-preview-dialog.embedded-dialog-fallback,.record-detail-dialog.embedded-dialog-fallback{position:fixed;z-index:1200;inset:auto;top:50%;left:50%;margin:0;transform:translate(-50%,-50%)}
.task-edit-dialog.embedded-dialog-fallback::backdrop{display:none}
body.sales-onboarding-open::after,body.embedded-dialog-open::after{content:"";position:fixed;z-index:1199;inset:0;background:rgba(16,24,40,.45);backdrop-filter:blur(2px)}
#salesOnboardingDialog[data-mode="administrator-registration"] .sales-onboarding-fields{display:none}

/* 销售人员建档与登录受限共用弹窗；受限状态用提示卡片表达原因和下一步。 */
.sales-onboarding-dialog{width:min(540px,calc(100vw - 32px));border:1px solid #e8edf5;border-radius:20px;box-shadow:0 24px 72px rgba(16,24,40,.22)}
.sales-onboarding-dialog form{padding:26px 28px 24px}
.sales-onboarding-dialog .task-edit-head{align-items:center;margin-bottom:20px}
.sales-onboarding-dialog .task-edit-head small{display:inline-flex;align-items:center;min-height:24px;padding:0 9px;border-radius:999px;background:#eef4ff;color:#3264cb;font-size:11px;font-weight:700;letter-spacing:.01em}
.sales-onboarding-dialog .task-edit-head h3{margin:7px 0 0;color:#182230;font-size:22px;line-height:1.25;letter-spacing:-.03em}
.sales-onboarding-dialog .task-edit-head button{width:34px;height:34px;border:1px solid transparent;border-radius:10px;background:#f7f8fa;color:#667085;font-size:22px;line-height:1;transition:.16s}
.sales-onboarding-dialog .task-edit-head button:hover{border-color:#e3e7ee;background:#eef2f6;color:#344054}
.sales-onboarding-dialog #salesOnboardingIntro{position:relative;min-height:0;margin:0 0 14px;padding:13px 15px 13px 42px;border:1px solid #f6d7d0;border-radius:12px;background:#fff8f6;color:#9b2418;font-size:13px;font-weight:600;line-height:1.65}
.sales-onboarding-dialog #salesOnboardingIntro::before{content:"!";position:absolute;top:14px;left:14px;width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:#d92d20;color:#fff;font-size:12px;font-weight:800;line-height:1}
.sales-onboarding-dialog #salesOnboardingTip{min-height:0;margin:0 0 20px;padding:0;color:#667085;font-size:12px;line-height:1.6}
.sales-onboarding-dialog .sales-onboarding-fields{margin:2px 0 16px;padding:16px;border:1px solid #e7ebf2;border-radius:13px;background:#fbfcfe}
.sales-onboarding-dialog .sales-onboarding-fields label{margin:0 0 7px;font-size:12px}
.sales-onboarding-dialog .sales-onboarding-fields input{margin-bottom:13px;background:#fff}
.sales-onboarding-dialog .sales-onboarding-fields input:last-child{margin-bottom:0}
.sales-onboarding-dialog .task-edit-actions{padding-top:2px}
.sales-onboarding-dialog .task-edit-actions button{min-width:88px;min-height:38px;border-radius:10px;transition:.16s}
.sales-onboarding-dialog .task-edit-actions button:last-child,.sales-onboarding-dialog[data-mode="administrator-registration"] #dismissSalesOnboarding{background:#3370ff;color:#fff;box-shadow:0 7px 15px rgba(51,112,255,.2)}
.sales-onboarding-dialog .task-edit-actions button:last-child:hover,.sales-onboarding-dialog[data-mode="administrator-registration"] #dismissSalesOnboarding:hover{background:#245fd9}
.sales-onboarding-dialog[data-mode="self-service"] #salesOnboardingIntro{border-color:#d7e7ff;background:#f5f9ff;color:#27569f}
.sales-onboarding-dialog[data-mode="self-service"] #salesOnboardingIntro::before{content:"i";background:#3370ff;font-family:Georgia,serif;font-style:italic}
@media(max-width:520px){.sales-onboarding-dialog{width:calc(100vw - 20px);border-radius:16px}.sales-onboarding-dialog form{padding:22px 18px 18px}.sales-onboarding-dialog .task-edit-head{margin-bottom:16px}.sales-onboarding-dialog .task-edit-head h3{font-size:20px}.sales-onboarding-dialog .task-edit-actions{display:grid;grid-template-columns:1fr}.sales-onboarding-dialog .task-edit-actions button{width:100%}}
.command-queue{max-width:860px;width:100%;margin:8px auto 0;padding:9px 12px;border:1px solid #ececee;border-radius:10px;background:#fff;font-size:11px}.command-queue-heading{display:flex;justify-content:space-between;color:#667085}.command-queue-items{display:grid;gap:5px;margin-top:7px}.command-queue-item{display:flex;align-items:center;gap:7px;min-width:0;padding:6px 7px;border-radius:7px;background:#f8f9fb}.command-queue-index{width:18px;height:18px;display:grid;place-items:center;border-radius:50%;background:#e8efff;color:#315ec9;font-size:10px}.command-queue-text{flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:#344054}.command-queue-state{color:#98a2b3}.command-queue-item.is-running .command-queue-state{color:#315ec9}.command-queue-item.is-failed .command-queue-state{color:#c4320a}.command-queue-item button{width:20px;height:20px;padding:0;border:0;border-radius:50%;background:#eef0f3;color:#667085;cursor:pointer}.command-queue-item button:hover{background:#e4e7ec;color:#344054}

/* Final typography baseline for the sales workspace. Keep monospace/code areas unchanged. */
:root{
  font-family:Inter,"PingFang SC","Microsoft YaHei UI","Microsoft YaHei","Noto Sans CJK SC","Segoe UI",sans-serif;
  font-size:14px;
}
.task-configuration-dialog{width:min(720px,calc(100vw - 24px));border:1px solid #e8edf5;border-radius:18px;box-shadow:0 24px 72px rgba(16,24,40,.22)}
.task-configuration-dialog form{padding:25px 26px 22px}
.task-configuration-dialog .task-edit-head{margin-bottom:14px}
.task-configuration-dialog .task-edit-head small{display:inline-flex;align-items:center;min-height:23px;padding:0 9px;border-radius:999px;background:#eef4ff;color:#3264cb;font-size:11px;font-weight:700}
.task-configuration-dialog .task-edit-head h3{margin:7px 0 0;color:#182230;font-size:22px;line-height:1.25;letter-spacing:-.03em}
.task-configuration-dialog #taskConfigurationIntro{position:relative;min-height:0;margin:0 0 16px;padding:12px 14px 12px 40px;border:1px solid #f6d7d0;border-radius:12px;background:#fff8f6;color:#9b2418;font-size:13px;font-weight:600;line-height:1.6}
.task-configuration-dialog #taskConfigurationIntro::before{content:"!";position:absolute;top:13px;left:14px;width:17px;height:17px;display:grid;place-items:center;border-radius:50%;background:#d92d20;color:#fff;font-size:11px;font-weight:800}
.task-configuration-items{display:grid;gap:12px;max-height:min(54vh,520px);margin:0 0 16px;padding-right:2px;overflow:auto;scrollbar-gutter:stable}
.task-configuration-group{display:grid;gap:9px;padding:12px;border:1px solid #e5eaf1;border-radius:13px;background:#fbfcfe}
.task-configuration-group.is-blocking{border-color:#f1c9c5;background:#fffafa}
.task-configuration-group-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:0 2px}
.task-configuration-group-head strong{color:#344054;font-size:13px}
.task-configuration-group-head small{color:#98a2b3;font-size:11px}
.task-configuration-item{display:grid;gap:7px;padding:13px;border:1px solid #e8edf3;border-radius:11px;background:#fff;color:#475467;font-size:12px;line-height:1.55;box-shadow:0 1px 2px rgba(16,24,40,.025)}
.task-configuration-item header{display:flex;align-items:center;justify-content:space-between;gap:8px}
.task-configuration-item header strong{color:#1d2939;font-size:13px;font-weight:700}
.task-configuration-item em{border-radius:999px;padding:3px 7px;background:#fff0f0;color:#b42318;font-size:10px;font-style:normal;font-weight:700;white-space:nowrap}
.task-configuration-item.is-warning em{background:#fff7e8;color:#b54708}
.task-configuration-reason{margin:0;color:#475467}
.task-configuration-source{display:flex;align-items:flex-start;gap:6px;margin:0;color:#667085;font-size:11px}
.task-configuration-source span{flex:0 0 auto;padding:1px 5px;border-radius:4px;background:#f2f4f7;color:#667085;font-size:10px;font-weight:700}
.task-configuration-input{margin-top:2px}
.task-configuration-item textarea{display:block;width:100%;min-height:84px;padding:10px 11px;border:1px solid #d0d5dd;border-radius:9px;background:#fff;color:#344054;resize:vertical;font:inherit;font-size:12px;line-height:1.6;outline:0}
.task-configuration-item input,.task-configuration-item select{width:100%;min-height:40px;margin:0;padding:8px 10px;border:1px solid #d0d5dd;border-radius:9px;background:#fff;color:#344054;font:inherit;font-size:12px;outline:0}
.task-configuration-item textarea:focus,.task-configuration-item input:focus,.task-configuration-item select:focus{border-color:#6f94ff;box-shadow:0 0 0 3px rgba(51,112,255,.12)}
.task-configuration-page-link{width:100%;min-height:40px;border:1px solid #b8c9f5;border-radius:9px;background:#f5f8ff;color:#245fd9;font-size:12px;font-weight:700;cursor:pointer}
.task-configuration-page-link:hover{border-color:#6f94ff;background:#eef4ff}
.task-configuration-item .task-configuration-create{width:100%;min-height:40px;border:1px solid #b8cbff;border-radius:9px;background:#f4f7ff;color:#285dcc;font-size:12px;font-weight:700;box-shadow:none}
.task-configuration-item .task-configuration-create:hover{border-color:#7f9fff;background:#eaf0ff;color:#1749b5}
.task-configuration-dialog .task-edit-tip{min-height:0;margin:0 0 12px;font-size:12px;line-height:1.55}
.task-configuration-dialog .task-edit-actions{padding-top:2px}
.task-configuration-dialog .task-edit-actions button{min-height:40px;border-radius:10px;transition:.16s}
.task-configuration-dialog .task-edit-actions button:last-child{box-shadow:0 7px 15px rgba(51,112,255,.2)}
.task-configuration-dialog .task-edit-actions button:last-child:hover{background:#245fd9}
@media(max-width:520px){.task-configuration-dialog{width:calc(100vw - 20px);border-radius:16px}.task-configuration-dialog form{padding:21px 17px 18px}.task-configuration-dialog .task-edit-head h3{font-size:20px}.task-configuration-items{max-height:50vh}.task-configuration-dialog .task-edit-actions{display:grid;grid-template-columns:1fr}.task-configuration-dialog .task-edit-actions button{width:100%}}
.configuration-result-warning{margin:8px 0;padding:8px 10px;border:1px solid #f4d7a1;border-radius:8px;background:#fff8e8;color:#8a4b08;font-size:11px;line-height:1.55}
body,.app-shell,.workspace>.panel,.topbar,.panel-heading,.sidebar-nav,.right-group-content,
.conversation-window,.conversation-composer,.conversation-message,.conversation-message-body,.conversation-content,
.task-execution-card,.result,.history-item,.customer-row,.record-detail-dialog{
  font-family:inherit;
}
.topbar h1{font-size:18px;font-weight:700}
.panel-heading h2{font-size:15px;font-weight:650}
.panel-heading p{font-size:12px}
.sidebar-conversation-search input{font-size:13px}
.sidebar-nav button>strong{font-size:13px;font-weight:600}
.sidebar-nav button>small{font-size:11px}
.history-panel .right-group-head h3{font-size:12px;font-weight:600}
.history-panel .history-item h3{font-size:13px;line-height:1.55}
.history-panel .history-item .history-customer{font-size:12px}
.history-panel .history-item time{font-size:11px}
.customer-panel .data-group-head h3,.right-group-head h3{font-size:12px}
.record-label{font-size:13px;line-height:19px}
.tree-branch-title{font-size:12px}
.command-editor,.conversation-composer textarea{font-size:14px!important;line-height:1.7!important}
.conversation-message-body,.conversation-content{font-size:14px;line-height:1.7}
.conversation-message-body small,.conversation-content small,.conversation-processed,.conversation-bubble time{font-size:12px}
.conversation-feedback-actions button{font-size:13px}
.conversation-feedback-actions button span{font-size:11px}
.task-execution-card,.result{font-size:13px;line-height:1.7}
.task-execution-card h3,.task-execution-card h4,.result h4{font-size:14px}
.status{font-size:13px}
.command-queue{font-size:13px}
.command-queue-index,.command-queue-item button{font-size:11px}
.command-queue-state{font-size:12px}
.skill-toolbar{font-size:12px}
.skill-picker button{font-size:13px}
.record-action{font-size:11px}

@media(max-width:720px){
  .topbar h1{font-size:17px}
  .conversation-message-body,.conversation-content{font-size:13px}
}

/* Mobile and tablet application shell: one conversation surface, a growing
   bottom composer, and every business layer constrained between them. */
@media(max-width:900px){
  :root{--mobile-topbar-bottom:0px;--mobile-composer-height:66px;--mobile-visual-viewport-height:100dvh}
  html,body{min-height:100%;overflow:hidden}
  .app-shell{height:var(--mobile-visual-viewport-height);padding:0 max(8px,env(safe-area-inset-right)) max(8px,env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-left))}
  .topbar{display:none!important}
  .topbar .brand{min-width:0}.topbar h1{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .workspace{display:block!important;position:static!important;width:100%!important;height:auto!important;min-width:0!important;flex:1 1 auto;contain:none!important;overflow:visible!important}
  .workspace>.panel:not(.is-minimized):not(.is-maximized),.workspace>.command-panel{width:100%!important;min-width:0!important;max-width:100%!important;flex:none!important}
  .workspace>.command-panel{position:static!important;height:auto!important;padding:0!important;background:#fff}
  .command-panel>.panel-heading{display:none}
  .command-panel>.conversation-window{height:calc(var(--mobile-visual-viewport-height) - var(--mobile-topbar-bottom) - var(--mobile-composer-height));min-height:0!important;margin:0!important;padding:0!important;transition:height .12s ease}
  .conversation-window .conversation-messages{height:100%;min-height:0;padding:14px 12px calc(80px + env(safe-area-inset-bottom));overflow:auto}
  .command-panel>.conversation-composer{position:fixed;z-index:90;right:max(6px,env(safe-area-inset-right));bottom:max(6px,env(safe-area-inset-bottom));left:max(6px,env(safe-area-inset-left));width:auto!important;height:auto!important;min-height:0!important;max-height:min(210px,42dvh)!important;margin:0!important;padding:5px 8px!important;overflow:visible!important;border:1px solid #d7dde7;border-radius:17px;background:#fff;box-shadow:0 7px 24px rgba(16,24,40,.16)}
  .conversation-composer .composer{position:relative;height:auto!important;min-height:0!important}
  .conversation-composer .command-editor,.conversation-composer #commandInput{min-height:44px!important;max-height:142px!important;padding:9px 52px!important;overflow-y:auto!important;font-size:16px!important;line-height:1.55!important}
  .conversation-composer .skill-toolbar{position:absolute;right:4px;bottom:4px;left:4px;min-height:44px;display:flex;align-items:center;justify-content:space-between;flex:0 0 auto!important;padding:0!important;border:0!important;background:transparent!important;pointer-events:none}
  .conversation-composer .skill-toolbar>.skill-add,.conversation-composer .skill-toolbar>.execute-icon{width:44px!important;height:44px!important;min-width:44px!important;pointer-events:auto}
  .conversation-composer .skill-toolbar .execute-icon{margin:0 0 0 auto!important}
  .conversation-composer .skill-toolbar .composer-add-menu,.conversation-composer .skill-toolbar .skill-picker{pointer-events:auto}
  .conversation-composer .composer-add-menu{z-index:161;bottom:52px;left:0;width:min(320px,calc(100vw - 28px));max-width:calc(100vw - 28px);max-height:min(292px,calc(var(--mobile-visual-viewport-height) - var(--mobile-topbar-bottom) - 78px));padding:7px;overflow-y:auto;overscroll-behavior:contain}
  .conversation-composer .composer-add-menu button,.conversation-composer .composer-add-menu .composer-add-option{width:100%!important;min-width:0!important;height:auto!important;min-height:50px!important;padding:8px 10px!important;display:grid!important;grid-template-columns:30px minmax(0,1fr)!important;grid-template-rows:auto auto!important;column-gap:9px!important;align-items:center!important;touch-action:manipulation;white-space:normal!important}
  .conversation-composer .composer-add-menu button>span,.conversation-composer .composer-add-menu .composer-add-option>span{grid-row:1/3;width:30px;height:30px}
  .conversation-composer .composer-add-menu button>strong,.conversation-composer .composer-add-menu .composer-add-option>strong,.conversation-composer .composer-add-menu button>small,.conversation-composer .composer-add-menu .composer-add-option>small{display:block;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .conversation-composer .composer-add-menu button:focus-visible{outline:2px solid #3370ff;outline-offset:-2px;background:#edf3ff}
  /* 快捷入口始终锚定在指令区的正上方；键盘改变 visualViewport 时由
     --mobile-composer-height 同步更新，避免按钮压住输入内容。 */
  .workspace-shortcut-dock{position:fixed!important;z-index:1300;right:max(12px,env(safe-area-inset-right));bottom:calc(var(--mobile-composer-height) + 12px);display:flex!important;align-items:center;gap:8px}
  .workspace-shortcut-dock>.sidebar-toggle,.workspace-shortcut-dock .dashboard-shortcut{position:static!important;display:grid!important;width:44px!important;height:44px!important;min-width:44px!important;margin:0!important;touch-action:manipulation}
  /* 不能把三个业务按钮的容器限制为 44px：否则按钮会纵向压住侧栏正文。 */
  .workspace-shortcut-dock .dashboard-shortcuts{position:static!important;display:flex!important;align-items:center;width:auto!important;height:44px!important;min-width:0!important;margin:0!important;gap:8px}
  .workspace.sidebar-closed>.history-panel{display:none!important}
  .workspace:not(.sidebar-closed)>.history-panel{position:fixed!important;z-index:81;top:var(--mobile-topbar-bottom);bottom:var(--mobile-composer-height);left:0;width:min(84vw,340px)!important;height:auto!important;min-height:0!important;padding:12px!important;display:flex!important;overflow:auto;border:0!important;border-radius:0 14px 14px 0!important;box-shadow:12px 0 36px rgba(16,24,40,.22);background:#f7f7f8}
  .workspace:not(.sidebar-closed)::before{position:fixed;z-index:80;inset:var(--mobile-topbar-bottom) 0 var(--mobile-composer-height);background:rgba(16,24,40,.42);content:""}
  .workspace>.customer-panel:not(.is-minimized):not(.is-maximized),.sales-dashboard{position:fixed!important;z-index:82;top:var(--mobile-topbar-bottom)!important;right:0!important;bottom:var(--mobile-composer-height)!important;left:0!important;width:auto!important;height:auto!important;min-width:0!important;min-height:0!important;max-width:none!important;max-height:calc(var(--mobile-visual-viewport-height) - var(--mobile-topbar-bottom) - var(--mobile-composer-height))!important;margin:0!important;padding:14px!important;border:0!important;border-radius:0!important;transform:none!important;transition:bottom .12s ease}
  .workspace>.customer-panel{display:none!important}.workspace>.customer-panel.is-context-open{display:flex!important}
  .workspace>.customer-panel.is-context-open:not(.is-minimized):not(.is-maximized){height:calc(var(--mobile-visual-viewport-height) - var(--mobile-topbar-bottom) - var(--mobile-composer-height))!important}
  /* 手机端核心数据默认只显示分类和记录数；点击分类后在固定高度浮层内
     展开该分类的全部记录，其他分类自动收起。 */
  .customer-panel:not(.business-record-split) .data-groups{display:flex!important;flex-direction:column;overflow-x:hidden;overflow-y:auto}
  .customer-panel:not(.business-record-split) .data-groups>.data-group{min-height:0;flex:0 0 auto}
  .customer-panel:not(.business-record-split) .data-groups>.data-group>.data-group-head{cursor:pointer;touch-action:manipulation}
  .customer-panel:not(.business-record-split) .data-groups>.data-group>.data-group-head::after{content:"›";margin-left:2px;color:#98a2b3;font-size:20px;line-height:1;transform:rotate(90deg);transition:transform .12s ease}
  .customer-panel:not(.business-record-split) .data-groups>.data-group.is-mobile-expanded>.data-group-head::after{transform:rotate(-90deg)}
  .customer-panel:not(.business-record-split) .data-groups>.data-group>.data-list{display:none!important;min-height:0;max-height:none;flex:0 0 auto;overflow:visible}
  .customer-panel:not(.business-record-split) .data-groups>.data-group.is-mobile-expanded>.data-list{display:block!important}
  .customer-panel:not(.business-record-split) .data-groups>.data-group.is-mobile-search-results>.data-list{display:block!important;max-height:none;overflow:visible}
  .customer-panel:not(.business-record-split) .data-groups>.data-group.is-mobile-search-overflow>.data-list{max-height:350px;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain}
  .sales-dashboard{border-radius:0!important}.sales-dashboard-header{padding:12px 4px}.sales-dashboard-body{padding:12px 4px 20px}.sales-dashboard-actions button{width:44px;height:44px}
  .sales-dashboard-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.sales-dashboard-mini-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
  .conversation-suggestion-actions{display:flex}
  .conversation-suggestions button{animation:mobile-suggestion-enter .2s ease both}
  .conversation-suggestions button:nth-child(2){animation-delay:.025s}.conversation-suggestions button:nth-child(3){animation-delay:.05s}.conversation-suggestions button:nth-child(4){animation-delay:.075s}.conversation-suggestions button:nth-child(5){animation-delay:.1s}
  .workspace:not(.sidebar-closed)>.history-panel{animation:mobile-drawer-enter .2s cubic-bezier(.2,.8,.2,1) both}
  .workspace>.customer-panel.is-context-open,.sales-dashboard{animation:mobile-overlay-enter .2s cubic-bezier(.2,.8,.2,1) both}
}
@media(min-width:641px) and (max-width:900px){
  .command-panel>.conversation-window{max-width:min(820px,100%);margin:0 auto!important}
  .command-panel>.conversation-composer{right:max(32px,calc((100vw - 760px)/2));left:max(32px,calc((100vw - 760px)/2))}
  .sales-dashboard-kpis{grid-template-columns:repeat(3,minmax(0,1fr))}
}
@media(max-width:900px) and (prefers-reduced-motion:reduce){
  .conversation-suggestions button,.workspace:not(.sidebar-closed)>.history-panel,.workspace>.customer-panel.is-context-open,.sales-dashboard{animation:none!important;transition:none!important}
}
@keyframes mobile-suggestion-enter{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes mobile-drawer-enter{from{opacity:.6;transform:translateX(-14px)}to{opacity:1;transform:none}}
@keyframes mobile-overlay-enter{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* Secondary readability pass: controls and supporting copy. */
.sidebar-conversation-search{font-size:13px}
.sidebar-nav button{line-height:1.4}
.sidebar-nav button>small{line-height:1.3}
.history-panel .history-item{line-height:1.55}
.history-panel .history-item time{color:#7b8798}
/* 历史记录保持标题、日期两行，只增加文字行高，不用固定高度撑开记录间距。 */
.history-panel .history-item{min-height:0!important;align-items:stretch}
.history-panel .history-entry{height:auto!important;min-height:48px;display:grid;grid-template-columns:minmax(0,1fr);grid-template-rows:20px 18px;align-content:start;row-gap:2px;padding-top:4px;padding-bottom:4px}
.history-panel .history-entry h3{grid-column:1;grid-row:1;line-height:20px}
.history-panel .history-entry-time{grid-column:1;grid-row:2;min-height:18px;margin:0;overflow:visible;line-height:18px;white-space:nowrap}
.conversation-processed,.conversation-bubble time{color:#7b8798;line-height:1.45}
.conversation-composer .skill-toolbar button,
.conversation-composer .composer-add-menu button{font-size:13px}
.conversation-composer .skill-toolbar small,
.conversation-composer .composer-add-menu small{font-size:12px}
.conversation-feedback-actions button{min-height:30px}
.async-completion-message{font-size:13px;line-height:1.6}
.async-completion-message strong{font-size:13px}
.deepseek-usage{font-size:13px;line-height:1.55}
.deepseek-usage strong{font-size:14px}
.task-content-button{font-size:13px;line-height:1.6}
.task-confirm-copy>span{font-size:11px}
.task-confirm-copy>strong{font-size:13px}
.delete-task{font-size:12px}
.record-detail-field dt{font-size:12px}
.record-detail-field dd{font-size:13px}

/* Align remaining compact UI text with the 14px workspace base. */
.information-match-heading{font-size:14px}
.information-record-heading{font-size:13px}
.information-source{font-size:12px}
.information-result-body small{font-size:11px}
.query-result-card .information-result-body>p:first-child{font-size:13px;line-height:1.65}
.task-input-label,.task-input-grid span{font-size:11px}
.task-input-grid strong{font-size:13px}
.record-detail-related small{font-size:11px}
.record-detail-related span,.record-detail-related-table{font-size:12px}
.record-detail-related-table th{font-size:11px}
.record-detail-none{font-size:12px}
.record-detail-empty{font-size:13px}
.empty,.loading{font-size:13px}
.recommendation-links a{font-size:12px}
.link-preview-title{font-size:14px}
.link-preview-content pre{font-size:13px;line-height:1.7}

/* Conversation typography: make the command and its result read as the primary
   work surface, while token and billing figures retain stable tabular widths. */
.conversation-composer .command-editor,
.conversation-composer #commandInput{
  color:#253247;
  font-size:15px!important;
  font-weight:400;
  line-height:1.68!important;
  letter-spacing:.005em;
}
.conversation-composer #commandInput:empty::before{
  color:#7b8798;
  font-size:14px;
  line-height:1.68;
}
.conversation-message-body,.conversation-content,
.task-inline-result{
  color:#344054;
  font-size:14px;
  line-height:1.72;
}
.task-execution-head>strong{
  font-size:15px;
  font-weight:700;
  letter-spacing:-.01em;
}
.task-execution-head>span,
.execution-state{
  font-size:11px;
  font-weight:650;
}
.task-execution-content{font-size:12px;line-height:1.55}
.deepseek-usage{
  gap:7px 14px;
  color:#526174;
  font-size:13px;
  font-variant-numeric:tabular-nums;
}
.deepseek-usage span,
.deepseek-usage em{
  font-family:ui-monospace,SFMono-Regular,Consolas,"Liberation Mono",monospace;
  letter-spacing:-.015em;
}
.deepseek-usage em{
  color:#087443;
  font-size:14px;
  font-weight:750;
}
.conversation-processed,
.conversation-bubble time{
  font-variant-numeric:tabular-nums;
}
@media(max-width:720px){
  .conversation-composer .command-editor,
  .conversation-composer #commandInput{font-size:16px!important;line-height:1.6!important}
  .conversation-message-body,.conversation-content,.task-inline-result{font-size:14px;line-height:1.68}
  .task-execution-head>strong{font-size:14px}
  .deepseek-usage{font-size:12px}
  .deepseek-usage em{font-size:13px}
}

/* CRM floating panel readability */
.customer-panel.is-context-open{
  border:1px solid #d9e2f2;
  border-radius:14px;
  background:#fff;
  box-shadow:0 18px 48px rgba(16,24,40,.14);
}
.crm-inline-head{padding:2px 2px 10px;border-bottom:1px solid #edf0f4}
.crm-inline-head h3{font-size:17px;font-weight:700;line-height:1.35}
.crm-inline-head p{font-size:12px;line-height:1.5}
.crm-context-actions{gap:6px}
.crm-context-actions .refresh,.crm-context-close,.crm-context-home,.crm-context-add{width:30px;height:30px;font-size:19px}
.crm-people-scope{margin:10px 0;padding:8px 10px;background:#fafcff}
.crm-people-scope legend{font-size:11px}
.crm-people-scope label{gap:5px;font-size:12px}
.crm-people-scope>div>span{font-size:11px}
.customer-panel .data-group-head{min-height:39px;padding:8px 10px}
.customer-panel .data-group-head h3{font-size:13px}
.customer-panel .data-group-head span{font-size:12px}
.customer-panel .data-list{padding:5px 6px}
.customer-panel .data-list .customer-row{min-height:30px;padding:5px 7px}
.record-label{font-size:13px;line-height:20px}
.tree-branch-title{height:25px;font-size:12px}
.tree-empty{font-size:11px}
.crm-context-resize-handle{width:6px}

/* Final CRM overlay polish */
.customer-panel.is-context-open{overflow:hidden}
.customer-panel.is-context-open::before{
  content:"";
  position:absolute;
  top:0;left:0;right:0;height:3px;
  z-index:2;
  background:linear-gradient(90deg,#8aa9ff,#3370ff,#c8d6ff);
}
.crm-inline-head{min-height:52px;align-items:center;padding:8px 4px 10px}
.crm-inline-head h3{font-size:18px;letter-spacing:-.015em}
.crm-inline-head p{margin-top:5px;color:#667085;font-size:12px}
.crm-context-actions .refresh,.crm-context-close,.crm-context-home,.crm-context-add{border:1px solid #dfe5f0;background:#fff}
.crm-context-actions .refresh:hover,.crm-context-close:hover,.crm-context-home:hover,.crm-context-add:hover{border-color:#b9caff;background:#eef3ff}
.crm-people-scope{border-color:#dce4f2;box-shadow:0 2px 8px rgba(16,24,40,.03)}
.crm-people-scope legend{color:#667085;font-size:12px}
.crm-people-scope label{font-size:13px;line-height:1.5}
.customer-panel .data-groups{gap:10px}
.customer-panel .data-groups>.data-group{border-color:#dce4f2;border-radius:10px;box-shadow:0 2px 9px rgba(16,24,40,.035)}
.customer-panel .data-group-head{background:#f8faff;border-bottom-color:#e7edf6}
.customer-panel .data-group-head h3{font-size:13px;font-weight:700}
.customer-panel .data-group-head span{color:#7b8798;font-size:12px}
.customer-panel .data-list{scrollbar-width:thin;scrollbar-color:#c5d0e5 transparent}
.customer-panel .data-list .customer-row{min-height:32px}
.record-label{font-size:13px;font-weight:600}
.tree-toggle{font-size:17px}
.tree-branch-title{font-size:12px;font-weight:700}
.tree-branch-title small{font-size:11px}
.tree-empty{padding:10px;font-size:12px}
.crm-context-resize-handle::before{border-color:#6f84a8}

/* Sales dashboard and dialogs: preserve hierarchy without tiny labels. */
.sales-dashboard-eyebrow{font-size:11px!important}
.sales-dashboard-header>div>p:last-child{font-size:12px}
.sales-dashboard-state{font-size:13px}
.sales-dashboard-state button{font-size:12px}
.sales-dashboard-kpi small{font-size:12px}
.sales-dashboard-kpi span{font-size:11px}
.sales-dashboard-tabs button{font-size:12px}
.sales-dashboard-section-head p{font-size:12px}
.sales-dashboard-mini-metric span{font-size:11px}
.sales-dashboard-card h4{font-size:13px}
.sales-dashboard-bar-label,.sales-dashboard-bar-value{font-size:11px}
.sales-dashboard-bar-detail{font-size:10px}
.sales-dashboard-empty{font-size:13px}
.sales-dashboard-table{font-size:11px}
.sales-dashboard-record-query{font-size:10px}
.sales-dashboard-note{font-size:12px}
.task-edit-dialog label,.task-edit-dialog textarea,.task-edit-actions button{font-size:13px}
.task-edit-tip{font-size:12px}
.sales-onboarding-dialog #salesOnboardingTip{font-size:13px}
.sales-onboarding-dialog .sales-onboarding-fields label{font-size:13px}
.task-edit-tip pre{margin:7px 0 0;white-space:pre-wrap;word-break:break-word;font:inherit;line-height:1.55;color:#475467}
