:root {
  --el-color-primary: #0b5eff;
  --el-color-primary-light-3: #4d8aff;
  --el-color-primary-light-5: #85adff;
  --el-color-primary-light-7: #b8d1ff;
  --el-color-primary-light-8: #d1e3ff;
  --el-color-primary-light-9: #e8f1ff;
  --el-color-primary-dark-2: #094bcc;
  --el-color-success: #00c23f;
  --el-color-success-light-9: #e6f9ec;
  --el-color-warning: #ff710c;
  --el-color-warning-light-9: #fff3e8;
  --el-color-danger: #fa4949;
  --el-color-danger-light-9: #feeaea;
  --el-color-info: #4d5e80;
  --el-color-info-light-9: #eceef2;
  --el-bg-color: #fff;
  --el-bg-color-page: #f2f3f5;
  --custom-page-bg: #eff1f8;
  --el-text-color-primary: #182946;
  --el-text-color-regular: #525f74;
  --el-text-color-secondary: #808a99;
  --el-text-color-placeholder: #a3a9b5;
  --el-border-color: #dcdfe6;
  --el-border-color-light: #e4e7ed;
  --el-border-color-lighter: #ebeef5;
  --el-fill-color: #f0f2f5;
  --el-fill-color-light: #f5f7fa;
  --el-fill-color-blank: #fff;
  --el-color-icon: #7a8599;
  --el-border-radius-base: 8px;
  --el-border-radius-small: 4px;
  --el-border-radius-round: 20px;
  --custom-header-height: 66px;


  /* 业务界面各区块口径（沿用「工作事项列表左栏收窄与行高压缩」已确认口径） */
  --topbar-h: 50px;
  --pagehead-h: 45px;
  --viewtab-h: 35px;
  --toolbar-h: 40px;
  --header-h: 35px;
  --row-h: 35px;
  --sidebar-w: 180px;
  --nav-font: 14px;
  --crumb-fs: 13px;
  --title-fs: 16px;
  --tab-fs: 13px;
  --toolbar-fs: 13px;
  /* 贪玩仔面板 */
  --tw-panel-w: 400px;
  --tw-brand: #ff7a1a;
  --tw-brand-light: #fff1e6;
  --tw-brand-border: #ffd4b3;
  /* 贪玩仔悬浮形象（R11） */
  --tw-mascot-size: 72px;
  --tw-mascot-right: 20px;
  --tw-mascot-left: auto;
  --tw-mascot-bottom: 24px;
  --tw-face-yellow: #f0d32c;
  --tw-face-ink: #1e1f1f;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; font-family: 'AlibabaPuHuiTi-3', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', Arial, sans-serif; color: var(--el-text-color-primary); background: var(--custom-page-bg); }
body { font-size: 13px; }
button, input, textarea { font-family: inherit; }
[v-cloak] { display: none; }
.flex-1 { flex: 1; }

/* ---------- 顶部导航 ---------- */
.top-nav { height: var(--custom-header-height); background: #fff; border-bottom: 1px solid var(--el-border-color-lighter); display: flex; align-items: center; padding: 0 28px; gap: 18px; box-shadow: 0 2px 10px rgba(24,41,70,.04); }
.brand-mark { width: 36px; height: 36px; border-radius: 10px; background: linear-gradient(135deg,#0b5eff,#6a3de8); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:700; letter-spacing:-1px; }
.crumb { display:flex; align-items:center; gap:10px; color: var(--el-text-color-secondary); font-size:14px; }
.crumb strong { color:var(--el-text-color-primary); font-weight:600; }
.crumb i { color:#b2bac8; }
.top-actions { margin-left:auto; display:flex; align-items:center; gap:18px; color:var(--el-text-color-secondary); font-size:18px; }
.prototype-links { display:inline-flex; align-items:center; gap:8px; flex:none; }
.prototype-links .el-button { margin-left:0; text-decoration:none; }
.prototype-links a:focus-visible { outline:2px solid var(--el-color-primary); outline-offset:2px; }
.exit-presentation, :fullscreen .enter-presentation { display:none; }
:fullscreen .exit-presentation { display:inline; }
@media (max-width:768px) {
  .top-nav { height:auto; min-height:var(--custom-header-height); flex-wrap:wrap; gap:8px; padding:10px 12px; }
  .top-actions { justify-content:flex-end; flex-wrap:wrap; gap:8px; }
}
.avatar { width:28px; height:28px; border-radius:50%; display:inline-flex; align-items:center; justify-content:center; color:#fff; font-size:12px; font-weight:600; }
.avatar-indigo { background:linear-gradient(135deg,#4454c9,#8193ff); }
.avatar-sm { width:22px; height:22px; font-size:10px; flex:none; }

/* ---------- 评审页三段式 ---------- */
.review-page { width:100%; padding:20px; }
.brief-card, .acceptance-card { background:#fff; border:1px solid var(--el-border-color-lighter); border-radius:12px; padding:20px 24px; box-shadow:0 4px 18px rgba(24,41,70,.04); }
.brief-card { margin-bottom:16px; display:flex; flex-wrap:wrap; align-items:flex-start; gap:22px; }
.brief-title { flex:none; }
.eyebrow { color:var(--el-color-primary); font-size:11px; font-weight:700; letter-spacing:.12em; text-transform:uppercase; }
.brief-title h1, .brief-title h2 { margin:6px 0 0; font-size:20px; line-height:1.35; font-weight:600; }
.brief-body { margin:2px 0 0; flex:1; min-width:360px; }
.brief-body p { margin:0 0 8px; color:var(--el-text-color-regular); line-height:1.75; max-width:880px; }
.brief-body p:last-child { margin-bottom:0; }
.brief-body b { color:var(--el-text-color-primary); }
.brief-chips { display:flex; gap:7px; margin-left:auto; white-space:nowrap; padding-top:4px; }

.demo-layout { position:relative; display:flex; gap:16px; align-items:stretch; }
.req-link-layer { position:absolute; left:0; top:0; pointer-events:none; z-index:40; overflow:visible; }
.req-link-path { fill:none; stroke:var(--el-color-primary); stroke-width:1.5; stroke-dasharray:5 4; opacity:.75; }
.req-link-dot { fill:var(--el-color-primary); }
.req-anchor { display:inline-flex; align-items:center; justify-content:center; min-width:22px; height:16px; padding:0 4px; margin-left:6px; border-radius:4px; background:var(--el-color-primary); color:#fff; font-size:10px; font-weight:700; font-style:normal; vertical-align:middle; flex:none; }
.mapping-where { display:inline-block; margin-top:6px; color:var(--el-text-color-placeholder); font-size:11px; }
.business-canvas { position:relative; min-width:0; flex:1; background:#f8f9fc; border:1px solid var(--el-border-color-lighter); border-radius:12px; padding:22px; overflow:hidden; }
.canvas-head { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.canvas-kicker { color:var(--el-text-color-secondary); font-size:12px; }
.canvas-head h2 { margin:5px 0 0; font-size:18px; }
.canvas-tools { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.tool-label { color:var(--el-text-color-secondary); font-size:12px; }
.anchor-target { scroll-margin-top:20px; }
.anchor-flash { box-shadow:0 0 0 2px var(--el-color-primary-light-5) !important; transition:box-shadow .2s ease; }
.interaction-hint { margin:13px 4px 0; color:var(--el-text-color-secondary); font-size:12px; display:flex; align-items:center; gap:7px; }
.interaction-hint i { color:var(--el-color-primary); }

/* ---------- 业务界面：BPM 工作事项列表（面板的定位容器） ---------- */
.bpm-app { position:relative; margin-top:16px; height:620px; background:var(--custom-page-bg); border:1px solid var(--el-border-color-lighter); border-radius:10px; overflow:hidden; overflow:clip; display:flex; flex-direction:column; } /* clip：画布只裁切不可被 focus / scrollIntoView 程序滚动（面板滑入动画期间会被横向滚出 400px） */
.bpm-topbar { height:var(--topbar-h); flex:none; background:#fff; border-bottom:1px solid var(--el-border-color-lighter); display:flex; align-items:center; gap:12px; padding:0 14px; position:relative; z-index:25; }
.bpm-logo { width:26px; height:26px; border-radius:8px; background:linear-gradient(135deg,var(--el-color-primary-light-3),var(--el-color-primary)); color:#fff; font-weight:700; display:inline-flex; align-items:center; justify-content:center; font-size:12px; }
.bpm-crumb { display:inline-flex; align-items:center; gap:6px; color:var(--el-text-color-secondary); font-size:var(--crumb-fs); }
.bpm-crumb .sep { color:#b2bac8; }
.bpm-crumb b { color:var(--el-text-color-primary); }
.bpm-crumb > i:first-child { color:var(--el-color-success); }
.bpm-top-right { margin-left:auto; display:inline-flex; align-items:center; gap:14px; }
.bpm-top-search { width:180px; }
.bpm-bell { position:relative; color:var(--el-text-color-regular); font-size:16px; }
.notification-badge { position:absolute; top:-6px; right:-8px; background-color:var(--el-color-danger); color:#fff; font-size:11px; font-weight:600; font-style:normal; padding:0 5px; border-radius:10px; min-width:18px; height:18px; line-height:18px; text-align:center; }

/* R1 贪玩仔入口按钮 */
.tw-unread { position:absolute; top:-3px; right:-3px; width:8px; height:8px; border-radius:50%; background:var(--el-color-danger); border:2px solid #fff; box-sizing:content-box; }
/* 贪玩仔头像：统一使用企业 logo 彩色版形象（assets/tanwanzai.png），圆形浅橙底 */
.tw-avatar { width:32px; height:32px; flex:none; border-radius:50%; background:var(--tw-brand-light); border:1px solid var(--tw-brand-border); display:inline-flex; align-items:center; justify-content:center; overflow:hidden; padding:2px; }
.tw-avatar img { width:100%; height:100%; object-fit:contain; display:block; pointer-events:none; }
.tw-avatar-sm { width:26px; height:26px; }
.tw-avatar-xs { width:22px; height:22px; padding:1px; }
.tw-avatar-xxs { width:16px; height:16px; padding:1px; border-width:0; }
/* 面板头部头像：面板打开时形象「缩进」这里，与右下角形象做同一套漂浮 */
.tw-head .tw-avatar.tw-avatar-float { animation:twFloat 3.2s ease-in-out infinite; }
.tw-head .tw-avatar.tw-avatar-float.busy { animation-duration:1.6s; }

.bpm-body { display:flex; gap:12px; padding:12px; align-items:stretch; flex:1; min-height:0; }
.bpm-sidebar { width:var(--sidebar-w); flex:0 0 var(--sidebar-w); background:#fff; border-radius:var(--el-border-radius-base); padding:10px 8px; display:flex; flex-direction:column; gap:12px; position:relative; }
.space-switch { height:34px; flex:0 0 34px; border:1px solid var(--el-border-color-light); border-radius:var(--el-border-radius-base); background:var(--el-fill-color-light); display:flex; align-items:center; gap:6px; padding:0 8px; font-weight:600; font-size:var(--nav-font); }
.space-ico { width:20px; height:20px; flex:none; border-radius:6px; background:var(--el-color-success-light-9); color:var(--el-color-success); display:inline-flex; align-items:center; justify-content:center; font-size:11px; }
.space-name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.space-switch > .el-icon-arrow-down { color:var(--el-text-color-placeholder); font-size:12px; }
.nav-group { display:flex; flex-direction:column; gap:2px; }
.nav-group-title { font-size:12px; color:var(--el-text-color-secondary); padding:0 6px 5px; margin-bottom:3px; border-bottom:1px solid var(--el-border-color-lighter); }
.nav-item { height:34px; flex:0 0 34px; border-radius:var(--el-border-radius-base); display:flex; align-items:center; gap:7px; padding:0 8px; color:var(--el-text-color-regular); cursor:pointer; min-width:0; font-size:var(--nav-font); }
.nav-ico { width:20px; height:20px; flex:none; border-radius:6px; color:#fff; font-size:11px; display:inline-flex; align-items:center; justify-content:center; }
.nav-text { min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.nav-item:hover { background:var(--el-fill-color-light); }
.nav-item.active { background:#f5a524; color:#fff; font-weight:600; }
.nav-item.active .nav-ico { background:rgba(255,255,255,.28) !important; }
.sidebar-collapse { position:absolute; right:-9px; top:27px; transform:translateY(-50%); z-index:2; width:18px; height:34px; background:#fff; border:1px solid var(--el-border-color-light); border-left:none; border-radius:0 8px 8px 0; box-shadow:2px 0 6px rgba(24,41,70,.06); display:inline-flex; align-items:center; justify-content:center; color:var(--el-text-color-placeholder); font-size:12px; cursor:pointer; }

.bpm-content { flex:1; min-width:0; background:#fff; border-radius:16px; display:flex; flex-direction:column; overflow:hidden; }
.content-head { height:var(--pagehead-h); flex:none; display:flex; align-items:center; gap:8px; padding:0 14px; background:#fafbfc; }
.content-ico { width:24px; height:24px; border-radius:var(--el-border-radius-base); background:var(--el-color-warning-light-9); color:var(--el-color-warning); display:inline-flex; align-items:center; justify-content:center; }
.content-head h3 { margin:0 0 0 8px; font-size:var(--title-fs); font-weight:600; }
.content-tabs { height:var(--viewtab-h); flex:none; display:flex; align-items:flex-end; padding:0 14px; background:#f5f6f7; }
.content-tab { height:var(--viewtab-h); line-height:var(--viewtab-h); padding:0 16px; font-size:var(--tab-fs); cursor:pointer; white-space:nowrap; display:inline-flex; align-items:center; gap:4px; color:var(--el-text-color-primary); border-radius:8px; }
.content-tab:hover:not(.active) { color:var(--el-color-primary); }
.content-tab.active { background:var(--el-bg-color); color:var(--el-color-primary); border-radius:8px 8px 0 0; }
.tab-ico { color:var(--el-color-icon); font-size:14px; }
.content-tab.active .tab-ico { color:var(--el-color-primary); }
.tab-more { color:var(--el-text-color-placeholder); font-size:14px; margin-left:2px; }
.content-toolbar { height:var(--toolbar-h); flex:none; display:flex; align-items:center; gap:12px; padding:0 14px; flex-wrap:nowrap; overflow-x:auto; overflow-y:hidden; }
.content-toolbar > * { flex:none; }
.content-toolbar .flex-1 { flex:1 1 auto; min-width:8px; }
.search-group { display:inline-flex; align-items:stretch; }
.search-group .tb-search { width:210px; }
.search-group .el-input__inner { height:30px; line-height:30px; border-radius:8px 0 0 8px; border-right:none; background:var(--el-bg-color); font-weight:500; }
.search-group .el-input__icon { line-height:30px; }
.search-btn { height:30px; padding:0 14px; border:1px solid var(--el-color-primary); border-radius:0 8px 8px 0; background:var(--el-color-primary); color:#fff; font-size:var(--toolbar-fs); font-weight:500; cursor:pointer; display:inline-flex; align-items:center; gap:3px; }
.search-btn i { font-size:12px; }
.tb-link { height:30px; padding:0 8px; border:1px solid transparent; border-radius:8px; background:#fff; cursor:pointer; font-size:var(--toolbar-fs); font-weight:500; color:var(--el-text-color-regular); display:inline-flex; align-items:center; gap:4px; }
.tb-link:hover { color:var(--el-color-primary); background:var(--el-color-primary-light-9); }
.tb-link i { font-size:14px; color:var(--el-color-icon); }
.tb-btn { height:30px; padding:0 11px; border:1px solid var(--el-border-color); border-radius:8px; background:#fff; cursor:pointer; font-size:var(--toolbar-fs); font-weight:500; color:var(--el-text-color-regular); display:inline-flex; align-items:center; gap:4px; }
.tb-btn:hover { color:var(--el-color-primary); border-color:var(--el-color-primary-light-5); }
.tb-btn i { font-size:14px; color:var(--el-color-icon); }
.tb-btn.is-primary { color:var(--el-color-primary); border-color:var(--el-color-primary); }
.tb-btn.is-primary i { color:var(--el-color-primary); }
.content-table { padding:0 14px; flex:1; min-height:0; }
.content-pager { padding:8px 14px; flex:none; border-top:1px solid var(--el-border-color-lighter); display:flex; justify-content:flex-end; }
.page-placeholder { flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:10px; color:var(--el-text-color-secondary); text-align:center; padding:20px; }
.page-placeholder i { font-size:40px; color:var(--el-border-color); }
.page-placeholder p { margin:0; font-size:15px; color:var(--el-text-color-primary); font-weight:500; }
.page-placeholder span { max-width:420px; line-height:1.6; }

.inst-table.el-table th.el-table__cell { height:var(--header-h); padding:0; background-color:#f7f9fc; color:var(--el-text-color-secondary); font-weight:500; }
.inst-table.el-table td.el-table__cell { height:var(--row-h); padding:0; }
.inst-table.el-table th.el-table__cell > .cell { height:calc(var(--header-h) - 1px); line-height:calc(var(--header-h) - 1px); padding:0 10px; }
.inst-table.el-table td.el-table__cell > .cell { height:calc(var(--row-h) - 1px); line-height:calc(var(--row-h) - 1px); padding:0 10px; }
.inst-table .proj, .inst-table .life-pill, .inst-table .user-tag, .inst-table .el-tag, .inst-table .el-checkbox, .inst-table .caret-wrapper { vertical-align:middle; }
.inst-table .caret-wrapper { height:14px; }
.inst-table .sort-caret.ascending { top:-7px; }
.inst-table .sort-caret.descending { bottom:-5px; }
.inst-table .el-tag--mini { height:20px; line-height:18px; }
.inst-table .el-checkbox__inner { width:14px; height:14px; }
.inst-table .el-table__row.row-new > td.el-table__cell { background:var(--tw-brand-light); animation:rowFlash 2s ease forwards; }
@keyframes rowFlash { 0% { background:#ffe0c2; } 100% { background:var(--tw-brand-light); } }
.proj { display:inline-flex; align-items:center; gap:6px; max-width:100%; }
.proj-dot { width:9px; height:9px; flex:none; border-radius:2px; background:#ff4d9e; display:inline-block; }
.life-pill { display:inline-flex; align-items:center; height:22px; padding:0 10px; border:1px solid var(--el-border-color-light); border-radius:11px; font-size:12px; color:var(--el-text-color-regular); max-width:100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.user-tag { display:inline-flex; align-items:center; gap:6px; font-size:13px; }
.user-tag-avatar { width:18px; height:18px; flex:none; border-radius:50%; background:linear-gradient(135deg,#0b5eff 0%,#6a3de8 100%); color:#fff; font-size:10px; font-style:normal; font-weight:500; display:inline-flex; align-items:center; justify-content:center; }

/* ---------- 贪玩仔对话面板（左侧全局浮层） ---------- */
.tw-panel { position:absolute; right:0; top:var(--topbar-h); bottom:0; width:var(--tw-panel-w); z-index:20; background:#fff; border-left:1px solid var(--el-border-color-lighter); box-shadow:-6px 0 24px rgba(24,41,70,.08); display:flex; flex-direction:column; overflow:hidden; }
/* 面板打开时内容区收缩让位（右侧停靠，不遮挡） */
.bpm-body { transition:padding-right .25s ease; }
.bpm-body.with-chat { padding-right:calc(var(--tw-panel-w) + 12px); }
.tw-slide-enter-active, .tw-slide-leave-active { transition:transform .25s ease, opacity .25s ease; }
.tw-slide-enter, .tw-slide-leave-to { transform:translateX(100%); opacity:0; }
.tw-head { height:60px; flex:none; display:flex; align-items:center; gap:12px; padding:0 14px 0 16px; border-bottom:1px solid var(--el-border-color-lighter); background:#fff; }
.tw-head .tw-avatar { width:40px; height:40px; }
.tw-head-name { display:flex; flex-direction:column; gap:3px; }
.tw-head-name strong { font-size:15px; display:inline-flex; align-items:center; gap:6px; }
.tw-status { display:inline-flex; align-items:center; gap:6px; font-size:12px; color:var(--el-text-color-secondary); }
.tw-status::before { content:''; width:8px; height:8px; border-radius:50%; background:var(--el-color-success); }
.tw-status.busy::before { background:var(--el-color-primary); box-shadow:0 0 0 3px rgba(11,94,255,.15); }
.tw-head-actions { margin-left:auto; display:flex; align-items:center; gap:2px; padding:4px; border-radius:8px; }
.tw-head-actions .tw-hbtn { height:28px; padding:0 8px; border-radius:8px; display:inline-flex; align-items:center; gap:4px; color:var(--el-text-color-regular); cursor:pointer; font-size:12px; white-space:nowrap; }
.tw-head-actions .tw-hbtn:hover { background:var(--el-fill-color-light); color:var(--el-color-primary); }
.tw-head-actions .tw-hbtn i { font-size:14px; }
.tw-head-actions .tw-hbtn.icon-only { padding:0; width:28px; justify-content:center; }
.tw-head-actions .tw-fullscreen-toggle { width:28px; height:28px; padding:0; margin:0; flex:none; color:var(--el-text-color-regular); border-radius:8px; }
.tw-fullscreen-toggle:focus-visible { outline:2px solid var(--el-color-primary); outline-offset:2px; }
.tw-panel.is-fullscreen { top:0; left:0; width:100%; z-index:26; border-left:0; box-shadow:none; }
.tw-panel.is-fullscreen .tw-messages { padding-left:max(20px, calc((100% - 900px) / 2)); padding-right:max(20px, calc((100% - 900px) / 2)); }
.tw-panel.is-fullscreen .tw-input { padding-left:max(20px, calc((100% - 900px) / 2)); padding-right:max(20px, calc((100% - 900px) / 2)); }
.tw-panel.is-fullscreen .tw-operation-fields { max-height:none; }
.tw-history { min-width:240px; border-radius:12px; }
.tw-history .el-dropdown-menu__item { display:flex; justify-content:space-between; gap:12px; border-radius:8px; margin:0 4px; line-height:32px; }
.tw-history .el-dropdown-menu__item.is-active { color:var(--el-color-primary); background:var(--el-color-primary-light-9); }
.tw-history-title { max-width:160px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tw-history-time { color:var(--el-text-color-placeholder); font-size:11px; }
.tw-banner { flex:none; display:flex; align-items:center; gap:6px; padding:6px 14px; background:var(--el-color-danger-light-9); color:var(--el-color-danger); font-size:12px; }
.tw-banner .el-button { padding:0; margin-left:auto; }

.tw-messages { flex:1; min-height:0; overflow-y:auto; padding:14px 14px 8px; display:flex; flex-direction:column; gap:14px; position:relative; background:#fbfbfd; }
.tw-msg { display:flex; gap:8px; align-items:flex-start; }
.tw-msg-user { justify-content:flex-end; }
.tw-msg-body { min-width:0; max-width:100%; display:flex; flex-direction:column; gap:8px; flex:1; }
.tw-msg-user .tw-msg-body { align-items:flex-end; }
.tw-bubble { position:relative; max-width:100%; padding:9px 12px; border-radius:12px; line-height:1.65; font-size:13px; word-break:break-word; }
.tw-msg-ai .tw-bubble { background:#fff; border:1px solid var(--el-border-color-lighter); border-top-left-radius:4px; color:var(--el-text-color-primary); }
.tw-msg-user .tw-bubble { background:var(--el-color-primary-light-9); border-top-right-radius:4px; color:var(--el-text-color-primary); max-width:82%; }
.tw-bubble.is-error { border-color:#ffb8b8; background:#fff7f7; color:var(--el-color-danger); }
.tw-bubble.is-error .el-button { padding:0; margin-left:6px; }
.tw-bubble ul { margin:4px 0 0; padding-left:18px; }
.tw-bubble code { background:var(--el-fill-color); padding:0 4px; border-radius:4px; font-size:12px; }
.tw-typing { display:inline-flex; gap:3px; margin-left:4px; vertical-align:middle; }
.tw-typing i { width:5px; height:5px; border-radius:50%; background:var(--tw-brand); animation:twBounce 1s infinite; }
.tw-typing i:nth-child(2) { animation-delay:.15s; }
.tw-typing i:nth-child(3) { animation-delay:.3s; }
@keyframes twBounce { 0%,80%,100% { transform:translateY(0); opacity:.4; } 40% { transform:translateY(-4px); opacity:1; } }
.tw-stopped { display:inline-block; margin-left:6px; font-style:normal; font-size:11px; color:var(--el-text-color-placeholder); }


.tw-feedback { display:flex; align-items:center; gap:2px; padding-left:2px; opacity:0; transition:opacity .2s; }
.tw-msg:hover .tw-feedback, .tw-feedback:hover { opacity:1; }
.tw-feedback i { width:24px; height:22px; border-radius:6px; display:inline-flex; align-items:center; justify-content:center; color:var(--el-text-color-placeholder); cursor:pointer; font-size:13px; }
.tw-feedback i:hover { background:var(--el-fill-color-light); color:var(--el-color-primary); }
.tw-feedback i.on { color:var(--el-color-primary); }
.tw-feedback-reason { margin-left:6px; color:var(--el-text-color-placeholder); font-size:11px; }
.tw-back-latest { position:sticky; bottom:4px; align-self:center; background:#fff; border:1px solid var(--el-border-color-light); border-radius:14px; padding:3px 12px; font-size:12px; color:var(--el-color-primary); cursor:pointer; box-shadow:0 2px 8px rgba(24,41,70,.12); display:inline-flex; align-items:center; gap:4px; }

.tw-input { flex:none; border-top:1px solid var(--el-border-color-lighter); padding:8px 12px 6px; background:#fff; }
.tw-input-hint { margin-bottom:6px; color:var(--el-text-color-secondary); font-size:11px; display:flex; align-items:center; gap:4px; }
.tw-input-box { display:flex; align-items:flex-end; gap:8px; }
.tw-input-box .el-textarea { flex:1; }
.tw-input-box .el-textarea__inner { border-radius:12px; background:var(--el-fill-color-light); font-size:13px; padding:8px 12px; line-height:1.6; min-height:36px !important; }
.tw-input-box .el-textarea__inner:focus { background:#fff; border-color:var(--tw-brand); box-shadow:0 0 0 2px rgba(255,122,26,.12); }
.tw-send.el-button { width:36px; height:36px; padding:0; flex:none; background:var(--tw-brand); border-color:var(--tw-brand); }
.tw-send.el-button.is-disabled { background:#ffd4b3; border-color:#ffd4b3; }
.tw-send.tw-stop.el-button { background:#182946; border-color:#182946; color:#fff; }
.tw-input-foot { text-align:right; color:var(--el-text-color-placeholder); font-size:11px; margin-top:4px; }
.tw-input-foot .over { color:var(--el-color-danger); }

/* ---------- R11 右下角悬浮贪玩仔形象（以 .bpm-app 为定位容器，不越出业务画布） ---------- */
.tw-mascot { position:absolute; right:var(--tw-mascot-right); left:var(--tw-mascot-left); bottom:var(--tw-mascot-bottom); touch-action:none; width:var(--tw-mascot-size); height:var(--tw-mascot-size); z-index:24; cursor:pointer; user-select:none; outline:none; border-radius:50%;
  transition:right .38s cubic-bezier(.4,.1,.2,1), left .38s cubic-bezier(.4,.1,.2,1), bottom .38s cubic-bezier(.4,.1,.2,1), transform .38s cubic-bezier(.4,.1,.2,1), opacity .3s ease; transform-origin:50% 50%; }
/* 拖动中：去掉位置过渡与漂浮，手感跟手；抓取光标 */
.tw-mascot.is-dragging { transition:none; cursor:grabbing; }
.tw-mascot.is-dragging .tw-mascot-float { animation:none; }
.tw-mascot.is-dragging .tw-mascot-figure { transform:scale(1.08) rotate(-4deg); }
.tw-mascot:not(.is-open) { cursor:grab; }
.tw-mascot:not(.is-open):active { cursor:grabbing; }
.tw-mascot:focus-visible { box-shadow:0 0 0 3px rgba(255,122,26,.35); }
/* 面板打开：形象飞向面板头部头像（面板 left 16px 的 40px 头像，中心距顶栏下 30px）并缩小淡出，由头部头像接力漂浮；用 right/bottom 位移，不依赖画布高度 */
.tw-mascot.is-open { right:calc(var(--tw-panel-w) - var(--tw-mascot-size)); bottom:calc(100% - var(--topbar-h) - 30px - var(--tw-mascot-size) / 2); transform:scale(.55); opacity:0; pointer-events:none; }
.tw-mascot-float { width:100%; height:100%; animation:twFloat 3.2s ease-in-out infinite; }
.tw-mascot-figure { position:relative; width:100%; height:100%; transform-origin:50% 90%; transition:transform .25s ease; filter:drop-shadow(0 6px 10px rgba(24,41,70,.18)); }
.tw-mascot-body, .tw-mascot-ring { position:absolute; inset:0; width:100%; height:100%; display:block; pointer-events:none; }
.tw-mascot-ring { transform-origin:68% 20%; }
/* 闭眼：覆盖在左眼位置的一片脸色椭圆 + 下缘一道墨线，默认压扁隐藏，眨眼时展开 */
.tw-mascot-lid { position:absolute; left:26%; top:14%; width:25%; height:25%; border-radius:50%; background:var(--tw-face-yellow); border-bottom:3px solid var(--tw-face-ink); transform:scaleY(0); transform-origin:50% 62%; animation:twBlink 4.6s ease-in-out infinite; pointer-events:none; }
/* hover：红圈晃一晃 + 身体轻微倾斜 */
.tw-mascot:hover .tw-mascot-figure { transform:rotate(-6deg); }
.tw-mascot:hover .tw-mascot-ring { animation:twRingSway .9s ease-in-out; }
/* 点击弹跳 */
.tw-mascot.is-bouncing .tw-mascot-figure { animation:twMascotBounce .45s ease; }
/* 有新回复：摇晃招手 + 小红点 */
.tw-mascot.has-unread .tw-mascot-figure { animation:twWave 1.1s ease-in-out 2; }
.tw-mascot-unread { top:6px; right:4px; width:10px; height:10px; border-width:2px; }
/* 生成中：形象上方三点「思考」 */
.mascot-left .tw-mascot-think { right:auto; left:calc(100% - 22px); border-radius:11px 11px 11px 2px; }
.tw-mascot-think { position:absolute; right:calc(100% - 22px); bottom:calc(100% - 10px); height:22px; padding:0 8px; border-radius:11px 11px 2px 11px; background:#fff; border:1px solid var(--tw-brand-border); box-shadow:0 2px 8px rgba(24,41,70,.1); display:inline-flex; align-items:center; gap:3px; }
.tw-mascot-think i { width:5px; height:5px; border-radius:50%; background:var(--tw-brand); animation:twBounce 1s infinite; }
.tw-mascot-think i:nth-child(2) { animation-delay:.15s; }
.tw-mascot-think i:nth-child(3) { animation-delay:.3s; }
/* 需求锚点 R1 / R11 放在形象上方 */
.tw-mascot-anchors { position:absolute; bottom:100%; right:0; margin-bottom:6px; display:flex; gap:4px; }
.tw-mascot-anchors .req-anchor { margin-left:0; }
.tw-mascot.is-open .tw-mascot-anchors { visibility:hidden; }

@keyframes twFloat { 0%,100% { transform:translateY(0); } 50% { transform:translateY(-6px); } }
@keyframes twBlink { 0%,90%,100% { transform:scaleY(0); } 93%,96% { transform:scaleY(1); } }
@keyframes twRingSway { 0%,100% { transform:rotate(0); } 20% { transform:rotate(-16deg); } 45% { transform:rotate(14deg); } 70% { transform:rotate(-8deg); } 85% { transform:rotate(4deg); } }
@keyframes twMascotBounce { 0% { transform:scale(1); } 35% { transform:scale(1.16,.9); } 65% { transform:scale(.94,1.06); } 100% { transform:scale(1); } }
@keyframes twWave { 0%,100% { transform:rotate(0); } 15% { transform:rotate(-9deg); } 35% { transform:rotate(9deg); } 55% { transform:rotate(-7deg); } 75% { transform:rotate(5deg); } }


/* 无障碍：系统要求减少动态效果时，形象的全部动画、过渡静止 */
@media (prefers-reduced-motion: reduce) {
  .tw-mascot, .tw-mascot *, .tw-head .tw-avatar.tw-avatar-float { animation:none !important; transition:none !important; }
  .tw-mascot:hover .tw-mascot-figure { transform:none; }
}

/* 点踩原因弹窗：以 .bpm-app 为定位容器，遮罩与弹窗都不越出业务画布 */
.tw-dialog-mask { position:absolute; inset:0; z-index:28; background:rgba(24,41,70,.35); }
.bpm-app .el-dialog__wrapper { position:absolute; inset:0; z-index:29 !important; overflow:auto; }
.tw-dialog.el-dialog { border-radius:16px; overflow:hidden; background:var(--custom-page-bg); margin-bottom:0; }
.tw-dialog .el-dialog__header { padding:16px 20px; border-bottom:1px solid var(--el-border-color-lighter); }
.tw-dialog .el-dialog__headerbtn { width:56px; height:56px; top:0; right:0; font-size:20px; }
.tw-dialog .el-dialog__body { padding:12px; }
.tw-dialog .el-dialog__footer { padding:12px 20px; border-top:1px solid var(--el-border-color-lighter); }
.scene-modal-inner { background:var(--el-bg-color); border-radius:12px; padding:16px 20px; overflow-y:auto; max-height:45vh; }
.tw-reasons { display:flex; flex-direction:column; gap:10px; }

/* ---------- 需求映射栏 ---------- */
.mapping-panel { width:280px; flex:none; background:#fff; border:1px solid var(--el-border-color-lighter); border-radius:12px; padding:18px; transition:width .25s ease; display:flex; flex-direction:column; min-height:0; contain:size; } /* contain:size：映射栏不把自己的内容高度撑给布局，高度跟随业务画布，内容超出时列表内滚动 */
.mapping-panel.collapsed { width:54px; padding:18px 12px; }
.mapping-head { display:flex; justify-content:space-between; align-items:flex-start; }
.mapping-head h3 { margin:6px 0 0; font-size:15px; }
.mapping-list { margin-top:20px; display:flex; flex-direction:column; gap:10px; flex:1; min-height:0; overflow-y:auto; padding-right:4px; margin-right:-8px; scrollbar-gutter:stable; }
.mapping-list::-webkit-scrollbar { width:6px; }
.mapping-list::-webkit-scrollbar-thumb { background:var(--el-border-color); border-radius:3px; }
.mapping-list::-webkit-scrollbar-track { background:transparent; }
.mapping-item { display:flex; gap:10px; padding:12px 10px; border:1px solid transparent; border-radius:9px; cursor:pointer; }
.mapping-item:hover, .mapping-item.active { background:var(--el-color-primary-light-9); border-color:var(--el-color-primary-light-7); }
.mapping-index { width:26px; height:22px; border-radius:6px; display:flex; align-items:center; justify-content:center; color:var(--el-color-primary); background:#dce9ff; font-size:11px; font-weight:700; flex:none; }
.mapping-item strong { display:block; font-size:12px; }
.mapping-item em { font-style:normal; color:var(--el-color-warning); font-size:11px; margin-left:4px; }
.mapping-item p { margin:5px 0 0; color:var(--el-text-color-secondary); font-size:11px; line-height:1.55; }
.mapping-collapsed-label { text-align:center; color:var(--el-color-primary); font-weight:700; line-height:1.7; margin-top:36px; }

.acceptance-card { margin-top:16px; }
.acceptance-card .brief-title { display:flex; align-items:baseline; gap:12px; }
.acceptance-card .brief-title h2 { font-size:16px; }
.acceptance-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px 22px; margin-top:16px; }
.acceptance-grid > div { display:flex; align-items:flex-start; gap:8px; color:var(--el-text-color-regular); font-size:12px; line-height:1.6; }
.acceptance-grid i { color:var(--el-color-success); font-size:16px; margin-top:1px; }

/* ---------- Element UI 覆盖 ---------- */
.el-button { padding:8px 16px; border-radius:var(--el-border-radius-base); transition:all .35s ease-in-out; font-size:13px; }
.el-button:hover { opacity:.85; }
.el-button--primary { background-color:var(--el-color-primary); border-color:var(--el-color-primary); }
.el-button--primary:hover { background-color:var(--el-color-primary); border-color:var(--el-color-primary); opacity:.85; }
.el-button--text { color:var(--el-text-color-regular); }
.el-button--text:hover { color:var(--el-color-primary); }
.el-button--mini { padding:5px 10px; }
.el-table { font-size:13px; }
.el-table--enable-row-hover .el-table__body tr:hover > td.el-table__cell { background-color:var(--el-color-primary-light-9); }
.el-pagination .btn-prev, .el-pagination .btn-next, .el-pager li { border-radius:var(--el-border-radius-base); }
.el-pager li.active { background-color:var(--el-color-primary); }
.el-input__inner { border-radius:var(--el-border-radius-base); font-size:13px; font-weight:500; background-color:var(--el-fill-color-light); transition:all .35s ease-in-out; }
.el-input__inner::placeholder { font-weight:400; }
.el-input__inner:hover { border-color:var(--el-color-primary); }
.el-input__inner:focus { background-color:var(--el-bg-color); border-color:var(--el-color-primary); box-shadow:0 0 0 2px rgba(11,94,255,.15); }
.el-tag { border-radius:6px; }
.el-tag--small, .el-tag--mini { border-radius:4px; }
.el-checkbox__input.is-checked .el-checkbox__inner { background-color:var(--el-color-primary); border-color:var(--el-color-primary); }
.el-checkbox__input.is-checked + .el-checkbox__label { color:var(--el-color-primary); }
.el-switch.is-checked .el-switch__core { background-color:var(--el-color-primary); border-color:var(--el-color-primary); }
.el-pagination { padding:0; }
.canvas-tools .el-radio-button__inner { padding:5px 10px; font-size:12px; }
.canvas-tools .el-radio-button:first-child .el-radio-button__inner { border-radius:8px 0 0 8px; }
.canvas-tools .el-radio-button:last-child .el-radio-button__inner { border-radius:0 8px 8px 0; }
.canvas-tools .el-radio-button__orig-radio:checked + .el-radio-button__inner { background:var(--el-color-primary); border-color:var(--el-color-primary); box-shadow:-1px 0 0 0 var(--el-color-primary); }
.canvas-tools .fault-group .el-radio-button__orig-radio:checked + .el-radio-button__inner { background:var(--el-color-danger); border-color:var(--el-color-danger); box-shadow:-1px 0 0 0 var(--el-color-danger); }
.canvas-tools .fault-group .el-radio-button:first-child .el-radio-button__orig-radio:checked + .el-radio-button__inner { background:var(--el-color-success); border-color:var(--el-color-success); box-shadow:none; }
.el-dropdown-menu { border-radius:12px; }
.el-dropdown-menu__item { border-radius:var(--el-border-radius-base); }
.el-dialog { border-radius:16px; }
.el-dialog__title { font-size:18px; font-weight:500; }

::-webkit-scrollbar { width:6px; height:6px; }
::-webkit-scrollbar-thumb { background:var(--el-border-color); border-radius:3px; }
::-webkit-scrollbar-track { background:transparent; }

@media (max-width: 1200px) {
  .mapping-panel { width:238px; }
  .canvas-tools { width:100%; }
  :root { --tw-panel-w: 360px; }
}
@media (max-width: 768px) {
  .review-page { padding:12px; }
  .brief-card { display:block; }
  .demo-layout { flex-direction:column; }
  .mapping-panel, .mapping-panel.collapsed { width:100%; margin-top:12px; contain:none; max-height:60vh; }
  .mapping-collapsed-label { margin:0; }
  .acceptance-grid { grid-template-columns:1fr; }
  :root { --tw-panel-w: 100%; }
  .bpm-body.with-chat { padding-right:12px; }
}

/* ---------- 完整演示模式（?mode=demo）：隐藏评审外壳，业务界面铺满视口 ---------- */
.demo-mode .top-nav, .demo-mode .brief-card, .demo-mode .acceptance-card, .demo-mode .mapping-panel,
.demo-mode .req-link-layer, .demo-mode .req-anchor, .demo-mode .canvas-kicker, .demo-mode .canvas-head h2,
.demo-mode .interaction-hint { display:none !important; }
.demo-mode .review-page { padding:0; }
.demo-mode .demo-layout { display:block; }
.demo-mode .business-canvas { border:0; border-radius:0; padding:8px 12px 12px; height:100vh; display:flex; flex-direction:column; }
.demo-mode .canvas-head { justify-content:flex-end; }
.demo-mode .bpm-app { flex:1; height:auto; min-height:0; margin-top:8px; }
/* 完整演示模式下按需调出需求映射栏：控制条「需求映射」开关，右侧停靠、与画布同高，连线与锚点一并恢复 */
.demo-mode.demo-mapping .demo-layout { display:flex; gap:0; }
.demo-mode.demo-mapping .mapping-panel { display:flex !important; height:100vh; border-radius:0; border-width:0 0 0 1px; }
.demo-mode.demo-mapping .req-link-layer { display:block !important; }
.demo-mode.demo-mapping .req-anchor { display:inline-flex !important; }


/* 图片与附件 */
.tw-draft-files { display:flex; flex-direction:column; gap:6px; max-height:150px; overflow-y:auto; padding-bottom:8px; }
.tw-message-files { display:flex; flex-direction:column; gap:6px; margin-top:6px; min-width:0; }
.tw-file-card { display:flex; align-items:center; gap:8px; min-width:0; padding:7px 8px; border:1px solid var(--el-border-color-light); border-radius:7px; background:#fff; color:var(--el-text-color-primary); }
.tw-file-meta { display:flex; flex-direction:column; gap:3px; flex:1; min-width:0; }
.tw-file-meta strong { font-size:12px; font-weight:500; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.tw-file-meta small { font-size:11px; color:var(--el-text-color-secondary); }
.tw-file-icon { font-size:26px; color:var(--el-color-primary); flex:none; }
.tw-image-thumb.el-button { width:44px; height:44px; flex:none; padding:0; overflow:hidden; border-radius:5px; }
.tw-image-thumb img { width:44px; height:44px; object-fit:cover; display:block; }
.tw-file-download { color:var(--el-color-primary); font-size:12px; text-decoration:none; flex:none; }
.tw-image-preview .el-dialog__body { overflow:auto; max-height:65vh; text-align:center; padding:12px; }
.tw-image-preview .el-dialog__body > img { max-width:100%; max-height:60vh; object-fit:contain; }

/* 输入框内统一附件入口 */
.tw-composer-field { position:relative; flex:1; min-width:0; }
.tw-composer-field .el-textarea__inner { padding-right:44px; }
.tw-attach-upload { position:absolute; right:6px; bottom:3px; }
.tw-attach-button.el-button { width:30px; height:30px; padding:0; font-size:20px; color:var(--tw-brand); border-radius:7px; }
.tw-attach-button.el-button:hover { background:var(--el-fill-color-light); }
.tw-attach-button.el-button:focus-visible { outline:2px solid var(--tw-brand); outline-offset:1px; }
.tw-attach-button.el-button.is-disabled { color:var(--el-text-color-placeholder); }
