/* ==========================================================================
   企业 AI 工作台 · 演示页
   沿用官网设计语言：墨黑 / 雾白 / 涌现蓝。蓝色只出现在“AI 正在工作”的地方：
   AI 的判断、被选中的问题、AI 预审意见、AI 提炼出的信号。状态色（红、琥珀、绿）只表达状态，并且总配文字。
   ========================================================================== */

.wb-anchor { scroll-margin-top: 96px; }

/* 视角切换 */
.wb-tabs { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 5px; border: 1px solid var(--l-d2); border-radius: var(--r-pill); background: var(--ink-2); }
.wb-tab { border: 0; background: transparent; color: var(--t-d2); font: inherit; font-size: 15px; line-height: 1.2; padding: 11px 18px; border-radius: var(--r-pill); cursor: pointer; display: inline-flex; gap: 9px; align-items: baseline; min-height: 44px; transition: background .3s, color .3s; }
.wb-tab small { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--t-d3); }
.wb-tab:hover { color: var(--t-d1); }
.wb-tab[aria-selected="true"] { background: var(--fog); color: var(--ink); }
.wb-tab[aria-selected="true"] small { color: #55555F; }
.wb-tab:focus-visible { outline: 2px solid var(--blue-2); outline-offset: 2px; }
.wb-cap { margin: 18px 0 28px; color: var(--t-d2); max-width: 52em; min-height: 3.4em; }
.wb-cap b { color: var(--t-d1); font-weight: 600; }

/* 窗口 */
.wb-win { position: relative; border: 1px solid var(--l-d2); border-radius: 22px; background: var(--ink-2); overflow: hidden; box-shadow: 0 50px 140px rgba(0, 0, 0, .5); }
.wb-bar { display: flex; align-items: center; gap: 12px 16px; padding: 14px 20px; border-bottom: 1px solid var(--l-d); font-size: 13px; color: var(--t-d2); flex-wrap: wrap; }
.wb-bar b { color: var(--t-d1); font-weight: 600; font-size: 14px; }
.wb-live { width: 8px; height: 8px; border-radius: 50%; background: #2FBF71; box-shadow: 0 0 0 4px rgba(47, 191, 113, .16); flex: none; }
.wb-bar .sp { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.wb-demo { font-family: var(--mono); font-size: 11px; letter-spacing: .06em; color: var(--t-d3); border: 1px dashed var(--l-d2); border-radius: 6px; padding: 2px 8px; }
.wb-mini { font: inherit; font-size: 13px; color: var(--t-d1); background: transparent; border: 1px solid var(--l-d2); border-radius: var(--r-pill); padding: 7px 14px; cursor: pointer; min-height: 36px; transition: border-color .3s; }
.wb-mini:hover { border-color: var(--t-d2); }
.wb-mini:disabled { opacity: .5; cursor: default; }
.wb-body { padding: 16px; }
.wb-view { display: none; }
.wb-view.on { display: block; animation: wbIn .5s var(--ease); }
@keyframes wbIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wb-scan { position: absolute; inset: 0; pointer-events: none; opacity: 0; background: linear-gradient(90deg, transparent, rgba(46, 91, 255, .10), transparent); background-size: 40% 100%; background-repeat: no-repeat; }
.wb-win.scanning .wb-scan { opacity: 1; animation: wbScan 1.1s linear infinite; }
@keyframes wbScan { from { background-position: -40% 0; } to { background-position: 140% 0; } }

/* 指标块 */
.wb-kpis { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; }
.wb-kpis.k4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.wb-k { background: var(--ink-3); border: 1px solid var(--l-d); border-radius: 14px; padding: 14px 16px; min-width: 0; }
.wb-k .l { font-size: 12.5px; color: var(--t-d2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-k .v { font-size: clamp(22px, 2.1vw, 30px); font-weight: 600; letter-spacing: -.02em; margin-top: 4px; line-height: 1.15; white-space: nowrap; }
.wb-k .v small { font-size: 13px; color: var(--t-d2); margin-left: 3px; font-weight: 500; letter-spacing: 0; }
.wb-k .d { font-size: 12px; margin-top: 5px; color: var(--t-d2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-up { color: #3DD68C; }
.wb-dn { color: #FF7A7A; }

/* 主区 */
.wb-main { display: grid; grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr); gap: 12px; margin-top: 12px; }
.wb-col { display: grid; gap: 12px; align-content: start; min-width: 0; }
.wb-pnl { background: var(--ink-3); border: 1px solid var(--l-d); border-radius: 14px; padding: 16px 18px; min-width: 0; position: relative; }
.wb-ph { font-size: 13px; color: var(--t-d2); display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
.wb-ph b { color: var(--t-d1); font-size: 14.5px; font-weight: 600; }
.wb-ph .lg { margin-left: auto; display: flex; gap: 14px; font-size: 12px; }
.wb-ph .lg i { display: inline-block; width: 14px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.wb-ai { display: inline-flex; align-items: center; gap: 5px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; color: var(--blue-2); border: 1px solid rgba(79, 117, 255, .45); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }

/* 问题清单 */
.wb-issue { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 12px; align-items: center; width: 100%; text-align: left; font: inherit; color: var(--t-d1); background: transparent; border: 1px solid var(--l-d); border-radius: 12px; padding: 11px 13px; margin-top: 8px; cursor: pointer; transition: border-color .3s, background .3s; min-height: 44px; }
.wb-issue:hover { border-color: var(--l-d2); }
.wb-issue.sel { border-color: rgba(79, 117, 255, .75); background: rgba(46, 91, 255, .08); }
.wb-issue .t { font-size: 14px; line-height: 1.45; }
.wb-issue .go { font-size: 12px; color: var(--t-d3); white-space: nowrap; }
.wb-sev { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; padding: 4px 8px; border-radius: 7px; background: var(--ink-4); white-space: nowrap; color: var(--t-d1); }
.wb-sev svg { width: 14px; height: 14px; flex: none; }

/* 详情 */
.wb-detail .blk { margin-bottom: 10px; }
.wb-detail .bh { font-size: 12px; color: var(--blue-2); margin-bottom: 4px; letter-spacing: .02em; }
.wb-detail .bt { font-size: 14.5px; line-height: 1.6; color: var(--t-d1); }
.wb-detail ul { margin: 0; padding: 0; list-style: none; }
.wb-detail li { font-size: 13.5px; line-height: 1.6; color: var(--t-d2); padding-left: 14px; position: relative; margin: 3px 0; }
.wb-detail li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 5px; height: 5px; border-radius: 50%; background: var(--t-d3); }
.wb-detail ul.plan li { padding-left: 0; color: var(--t-d1); }
.wb-detail ul.plan li::before { display: none; }
.wb-ev { display: inline-block; font-family: var(--mono); font-size: 10.5px; color: var(--t-d3); border: 1px solid var(--l-d2); border-radius: 5px; padding: 0 6px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; }
.wb-owner { font-size: 12.5px; color: var(--t-d3); border-top: 1px solid var(--l-d); padding-top: 9px; margin-top: 4px; }
.wb-fade { animation: wbIn .4s var(--ease); }

/* 图表 */
.wb-chart { position: relative; height: 230px; }
.wb-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.wb-chart .gl { stroke: rgba(245, 245, 247, .07); stroke-width: 1; }
.wb-chart .ax { fill: var(--t-d3); font-size: 11px; font-family: var(--sans); }
.wb-chart .lb { fill: var(--t-d1); font-size: 12px; font-family: var(--sans); }
.wb-chart .lb2 { fill: var(--t-d2); font-size: 12px; font-family: var(--sans); }
.wb-tip { position: absolute; pointer-events: none; background: var(--ink-4); border: 1px solid var(--l-d2); border-radius: 10px; padding: 8px 12px; font-size: 12.5px; line-height: 1.55; color: var(--t-d1); opacity: 0; transition: opacity .15s; white-space: nowrap; z-index: 2; }
.wb-tip.on { opacity: 1; }

/* 信号条 */
.wb-sig { display: grid; grid-template-columns: 82px minmax(0, 1fr) 24px; gap: 10px; align-items: center; margin: 7px 0; font-size: 13px; }
.wb-sig .bar { height: 8px; background: var(--ink-4); border-radius: 4px; overflow: hidden; }
.wb-sig .bar i { display: block; height: 100%; background: var(--blue); border-radius: 0 4px 4px 0; transform-origin: left; transition: transform .9s var(--ease); }
.wb-sig .n { text-align: right; color: var(--t-d2); font-variant-numeric: tabular-nums; }

/* 部门工作台：审批 */
.wb-appr { border: 1px solid var(--l-d); border-radius: 12px; padding: 13px 14px; margin-top: 10px; transition: opacity .4s, border-color .3s; }
.wb-appr .hd { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.wb-appr .ty { font-size: 11.5px; color: var(--t-d2); border: 1px solid var(--l-d2); border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.wb-appr .tt { font-size: 14.5px; font-weight: 600; }
.wb-appr .amt { margin-left: auto; font-size: 13px; color: var(--t-d2); white-space: nowrap; }
.wb-appr .ai { margin-top: 9px; padding: 10px 12px; border-radius: 10px; background: rgba(46, 91, 255, .07); border: 1px solid rgba(79, 117, 255, .22); font-size: 13.5px; line-height: 1.6; color: var(--t-d1); }
.wb-appr .ai .wb-ai { margin-right: 8px; }
.wb-appr .act { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.wb-appr .act button { font: inherit; font-size: 13px; padding: 7px 14px; border-radius: var(--r-pill); cursor: pointer; min-height: 36px; border: 1px solid var(--l-d2); background: transparent; color: var(--t-d1); }
.wb-appr .act button.ok { background: var(--fog); color: var(--ink); border-color: var(--fog); }
.wb-appr .res { display: none; margin-top: 10px; font-size: 13px; color: var(--t-d2); }
.wb-appr.done { opacity: .55; }
.wb-appr.done .act { display: none; }
.wb-appr.done .res { display: block; }

/* 团队状态 */
.wb-team { width: 100%; border-collapse: collapse; font-size: 13px; }
.wb-team th { text-align: left; font-weight: 500; color: var(--t-d3); font-size: 12px; padding: 0 8px 8px 0; border-bottom: 1px solid var(--l-d); }
.wb-team td { padding: 9px 8px 9px 0; border-bottom: 1px solid var(--l-d); vertical-align: middle; color: var(--t-d2); }
.wb-team td:first-child { color: var(--t-d1); white-space: nowrap; }
.wb-team .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wb-meter { display: flex; align-items: center; gap: 8px; }
.wb-meter span { flex: 1; height: 6px; border-radius: 3px; background: var(--ink-4); min-width: 40px; overflow: hidden; }
.wb-meter span i { display: block; height: 100%; background: rgba(245, 245, 247, .55); border-radius: 3px; }
.wb-tag { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; white-space: nowrap; border: 1px solid var(--l-d2); color: var(--t-d2); }
.wb-tag.warn { border-color: rgba(245, 165, 36, .5); color: #F5C36A; }
.wb-tag.crit { border-color: rgba(255, 122, 122, .5); color: #FF9A9A; }
.wb-tips li { font-size: 13.5px; line-height: 1.65; color: var(--t-d1); margin: 6px 0; }
.wb-tips { margin: 0; padding-left: 20px; }

/* 员工助手 */
.wb-staff { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 12px; }
.wb-acts { display: grid; gap: 10px; align-content: start; }
.wb-act { display: grid; grid-template-columns: 36px minmax(0, 1fr); gap: 12px; align-items: start; text-align: left; font: inherit; color: var(--t-d1); background: var(--ink-3); border: 1px solid var(--l-d); border-radius: 14px; padding: 14px 16px; cursor: pointer; transition: border-color .3s, background .3s; min-height: 44px; }
.wb-act:hover { border-color: var(--l-d2); }
.wb-act.on { border-color: rgba(79, 117, 255, .75); background: rgba(46, 91, 255, .07); }
.wb-act .ic { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--l-d2); display: flex; align-items: center; justify-content: center; }
.wb-act .ic svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.wb-act b { display: block; font-size: 14.5px; font-weight: 600; }
.wb-act small { display: block; font-size: 12.5px; color: var(--t-d2); margin-top: 2px; line-height: 1.5; }
.wb-chat { background: var(--ink-3); border: 1px solid var(--l-d); border-radius: 14px; display: flex; flex-direction: column; height: 430px; overflow: hidden; }
.wb-chat .hd { padding: 12px 16px; border-bottom: 1px solid var(--l-d); font-size: 13px; color: var(--t-d2); display: flex; gap: 8px; align-items: center; }
.wb-chat .hd b { color: var(--t-d1); font-weight: 600; }
.wb-chat .bd { flex: 1; overflow-y: auto; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; }
.wb-msg { max-width: 88%; font-size: 13.5px; line-height: 1.65; padding: 9px 13px; border-radius: 14px; white-space: pre-line; }
.wb-msg.u { align-self: flex-end; background: var(--fog); color: var(--ink); border-bottom-right-radius: 4px; }
.wb-msg.a { align-self: flex-start; background: var(--ink-4); color: var(--t-d1); border-bottom-left-radius: 4px; }
.wb-msg.a .wb-ai { margin-right: 6px; }
.wb-msg .src { display: block; margin-top: 6px; font-size: 11.5px; color: var(--t-d3); }
.wb-card { align-self: stretch; border: 1px solid rgba(79, 117, 255, .35); background: rgba(46, 91, 255, .06); border-radius: 12px; padding: 12px 14px; font-size: 13px; line-height: 1.65; }
.wb-card .ch { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; font-weight: 600; color: var(--t-d1); }
.wb-card dl { display: grid; grid-template-columns: 5.5em minmax(0, 1fr); gap: 3px 10px; margin: 0; }
.wb-card dt { color: var(--t-d3); }
.wb-card dd { margin: 0; color: var(--t-d1); }
.wb-card .sub { margin-top: 10px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.wb-card .sub button { font: inherit; font-size: 12.5px; padding: 6px 14px; border-radius: var(--r-pill); border: 0; background: var(--fog); color: var(--ink); cursor: pointer; min-height: 34px; }
.wb-card .ok { color: #3DD68C; font-size: 12.5px; }
.wb-dots { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; background: var(--ink-4); border-radius: 14px; }
.wb-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--t-d3); animation: wbDot 1s infinite; }
.wb-dots i:nth-child(2) { animation-delay: .15s; } .wb-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes wbDot { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.wb-note { margin-top: 18px; font-size: 13px; color: var(--t-d3); }

/* 原理流程 */
.wb-flow { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; margin-top: 8px; counter-reset: st; }
.wb-st { position: relative; background: #fff; border: 1px solid var(--l-l); border-radius: var(--r-card); padding: 22px 20px 24px; }
.wb-st::after { content: ""; position: absolute; right: -11px; top: 38px; width: 8px; height: 8px; border-top: 1.6px solid var(--t-l3); border-right: 1.6px solid var(--t-l3); transform: rotate(45deg); }
.wb-st:last-child::after { display: none; }
.wb-st .n { font-family: var(--mono); font-size: 12px; color: var(--t-l3); letter-spacing: .1em; }
.wb-st h3 { font-size: 20px; margin: 10px 0 8px; font-weight: 600; letter-spacing: -.01em; }
.wb-st p { margin: 0; font-size: 14.5px; line-height: 1.7; color: var(--t-l2); }
.wb-st.ai { border-color: rgba(46, 91, 255, .35); }
.wb-st.ai h3 { color: var(--blue); }
.wb-src { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.wb-src span { font-size: 13px; color: var(--t-l2); border: 1px solid var(--l-l2); border-radius: var(--r-pill); padding: 6px 14px; background: #fff; }
.wb-loop { margin-top: 18px; font-size: 14px; color: var(--t-l3); display: flex; align-items: center; gap: 10px; }
.wb-loop svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* 三阶段 */
.wb-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--l-d); margin-top: 8px; }
.wb-phase { padding: 30px 28px 6px 0; border-right: 1px solid var(--l-d); }
.wb-phase + .wb-phase { padding-left: 28px; }
.wb-phase:last-child { border-right: 0; }
.wb-phase .w { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; color: var(--t-d3); }
.wb-phase h3 { font-size: clamp(24px, 2.4vw, 32px); font-weight: 600; letter-spacing: -.02em; margin: 12px 0 10px; }
.wb-phase p { color: var(--t-d2); margin: 0; }
.wb-phase .out { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--l-d); font-size: 14px; color: var(--t-d1); }
.wb-phase .out span { color: var(--t-d3); margin-right: 8px; }

/* 红线 */
.wb-lines { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.wb-line { border-top: 2px solid var(--ink); padding-top: 18px; }
.wb-line h3 { font-size: 19px; font-weight: 600; margin: 0 0 8px; }
.wb-line p { margin: 0; font-size: 14.5px; line-height: 1.75; color: var(--t-l2); }
.wb-law { margin-top: 34px; font-size: 13px; color: var(--t-l3); line-height: 1.8; max-width: 62em; }

@media (max-width: 1100px) {
  .wb-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .wb-main, .wb-staff { grid-template-columns: minmax(0, 1fr); }
  .wb-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-st::after { display: none; }
  .wb-lines { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .wb-tab { padding: 10px 14px; font-size: 14px; }
  .wb-tab small { display: none; }
  .wb-kpis, .wb-kpis.k4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .wb-body { padding: 10px; }
  .wb-bar .sp { margin-left: 0; width: 100%; }
  .wb-phases { grid-template-columns: minmax(0, 1fr); }
  .wb-phase, .wb-phase + .wb-phase { padding: 24px 0 6px; border-right: 0; border-bottom: 1px solid var(--l-d); }
  .wb-flow, .wb-lines { grid-template-columns: minmax(0, 1fr); }
  .wb-chat { height: 400px; }
  .wb-team .hide-s { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .wb-view.on, .wb-fade { animation: none; }
  .wb-sig .bar i { transition: none; }
}
