/* ==========================================================================
   橙子财税咨询 · 全流程工作台
   视觉参照：小橙子财税咨询工作台（橙品牌 + 浅灰工作区 + 对话式引导）
   ========================================================================== */
:root {
  --c-text: #172033;
  --c-text-2: #344256;
  --c-text-3: #475569;
  --c-orange: #914316;
  --c-brand: #e68539;
  --c-brand-d: #b85a1e;
  --c-send: #e38b45;
  --c-navy: #253e55;
  --c-bg: #f7f8fa;
  --c-side: #f0f2f5;
  --c-card: #ffffff;
  --c-line: #e2e6ed;
  --c-line-s: #edf0f4;
  --c-line-i: #dce2ea;
  --c-ol: #fff0e3;
  --c-ol2: #fff8f1;
  --c-ol3: #fffaf5;
  --c-bl: #e7edf4;
  --c-bl-t: #26384d;
  --c-bl-d: #315d80;
  --c-green: #2f7d5b;
  --c-green-l: #eaf6ef;
  --c-red: #b42323;
  --c-red-l: #fdeceb;
  --c-shadow: 0 1px 3px rgba(23, 32, 51, .04), 0 8px 24px rgba(23, 32, 51, .05);
  --c-shadow-h: 0 4px 12px rgba(23, 32, 51, .08), 0 16px 40px rgba(23, 32, 51, .10);
  --r: 14px;
  --r-s: 10px;
  --side-w: 252px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  background: var(--c-bg);
  color: var(--c-text);
  font-size: 14px;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--c-orange); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ==========================================================================
   一、工作台外壳：左侧栏 + 主区
   ========================================================================== */
.shell { display: flex; min-height: 100vh; background: var(--c-bg); }

.shell-sidebar {
  width: var(--side-w);
  flex: 0 0 var(--side-w);
  background: var(--c-side);
  border-right: 1px solid var(--c-line);
  padding: 24px 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}

.sb-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 0 8px 22px;
  font-weight: 750; font-size: 17px; color: var(--c-text);
}
.sb-mark {
  width: 40px; height: 40px; flex: 0 0 auto;
  display: grid; place-items: center;
  background: var(--c-brand); color: #fff;
  border-radius: 13px; font-size: 19px; font-weight: 700;
}
.sb-brand small {
  display: block; font-size: 10.5px; font-weight: 400;
  letter-spacing: .6px; color: var(--c-text-3); margin-top: 2px;
}

.sb-create {
  width: 100%;
  background: var(--c-navy); color: #fff;
  border: 0; border-radius: 9px; padding: 10px 16px;
  font-size: 13.5px; font-weight: 600; font-family: inherit;
  cursor: pointer; margin-bottom: 6px;
}
.sb-create:hover { background: #1d3348; }

.sb-label {
  font-size: 10.5px; color: var(--c-text-3);
  margin: 20px 8px 8px;
  display: flex; justify-content: space-between; align-items: center;
}
.sb-label span { color: #94a3b8; }

.sb-workspace { margin-top: 12px; }
.sb-workspace summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; padding: 7px 8px; border-radius: 9px;
  color: var(--c-text-3); font-size: 10.5px; user-select: none;
}
.sb-workspace summary::-webkit-details-marker { display: none; }
.sb-workspace summary:hover { background: #fff; color: var(--c-orange); }
.sb-workspace summary span { display: inline-flex; align-items: center; gap: 7px; }
.sb-workspace summary i { font-style: normal; color: var(--c-brand); font-size: 12px; }
.sb-workspace summary b { color: #94a3b8; font-size: 12px; transition: transform .16s; }
.sb-workspace:not([open]) summary b { transform: rotate(-90deg); }
.sb-workspace .sb-nav { margin-top: 2px; }

.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-nav a {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 9px;
  font-size: 13px; color: var(--c-text-2);
  transition: .16s;
}
.sb-nav a:hover { background: #fff; color: var(--c-orange); text-decoration: none; }
.sb-nav a.on {
  background: #fff; color: var(--c-orange); font-weight: 700;
  box-shadow: 0 2px 9px rgba(21, 40, 62, .03);
}
.sb-nav a i {
  width: 18px; text-align: center; font-style: normal;
  font-size: 12px; color: #94a3b8;
}
.sb-nav a.on i { color: var(--c-brand); }

.sb-mods { display: flex; flex-direction: column; gap: 2px; }
.sb-mods a {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px; border-radius: 8px;
  font-size: 12.5px; color: var(--c-text-2);
}
.sb-mods a:hover { background: var(--c-ol); color: var(--c-orange); text-decoration: none; }
.sb-mods a i {
  font-style: normal; width: 16px; text-align: center;
  font-size: 11px; color: var(--c-brand);
}
.sb-mods a em {
  margin-left: auto; font-style: normal;
  font-size: 10px; color: #94a3b8;
}

.sb-extra { margin-top: 18px; }

.sb-account {
  margin-top: auto;
  padding: 16px 8px 0;
  border-top: 1px solid #dfe4ea;
}
.sb-account strong { display: block; font-size: 12.5px; color: var(--c-text); }
.sb-account small {
  display: block; font-size: 10.5px; color: var(--c-text-3);
  margin-top: 3px; line-height: 1.6;
}

.shell-main {
  flex: 1; min-width: 0;
  background: var(--c-card);
  display: flex; flex-direction: column;
}
body.wb-mode .shell-main { height: 100vh; overflow: hidden; }
body.wb-mode { overflow: hidden; }

/* 主区里的普通内容容器 */
.wrap { max-width: 1120px; width: 100%; margin: 0 auto; padding: 26px 30px 60px; }
.wrap-narrow { max-width: 880px; width: 100%; margin: 0 auto; padding: 26px 30px 60px; }

/* ==========================================================================
   二、通用块
   ========================================================================== */
.sec { margin-bottom: 26px; }
.sec-t {
  font-size: 17px; color: var(--c-text); font-weight: 700;
  display: flex; align-items: center; gap: 10px; margin-bottom: 12px;
}
.sec-t .n {
  background: var(--c-ol); color: var(--c-orange);
  width: 26px; height: 26px; border-radius: 8px;
  display: grid; place-items: center; font-size: 13px; flex: 0 0 auto;
}
.sec-sub { font-size: 12.5px; color: var(--c-text-3); margin: -6px 0 12px; }

.card {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--r); padding: 18px 20px;
  box-shadow: var(--c-shadow); margin-bottom: 13px;
}
.card.tight { padding: 14px 16px; }
.card h3 { font-size: 14.5px; color: var(--c-orange); margin-bottom: 7px; }
.card p { font-size: 13.5px; color: var(--c-text-2); }
.muted { color: var(--c-text-3); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; }

.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g3 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(178px, 1fr)); }

.note {
  background: var(--c-ol2); border: 1px solid #f0dcc9;
  border-radius: var(--r-s); padding: 11px 15px;
  font-size: 13px; color: #7a4a1c; margin: 11px 0; line-height: 1.75;
}
.note.red { background: var(--c-red-l); border-color: #f0c5c2; color: #8f2929; }
.note.green { background: var(--c-green-l); border-color: #cfe9db; color: var(--c-green); }
.note b { font-weight: 800; }

/* ==========================================================================
   三、Hero（全景页头部）
   ========================================================================== */
.hero {
  background: linear-gradient(135deg, #fff8f1 0%, #fff0e3 62%, #ffe9d6 100%);
  border: 1px solid #f2ddc9;
  border-radius: 16px; padding: 28px 28px;
  position: relative; overflow: hidden;
  box-shadow: var(--c-shadow); margin-bottom: 22px;
}
.hero::after {
  content: ""; position: absolute; right: -60px; top: -70px;
  width: 230px; height: 230px; border-radius: 50%;
  background: radial-gradient(circle, rgba(230, 133, 57, .22), transparent 68%);
}
.hero h1 {
  font-size: 24px; font-weight: 750; letter-spacing: .2px;
  margin-bottom: 8px; position: relative; color: var(--c-text);
}
.hero h1 .l {
  background: var(--c-brand); color: #fff; border-radius: 10px;
  padding: 2px 11px; margin-right: 10px; font-size: 17px; vertical-align: middle;
}
.hero .sub { font-size: 13.5px; color: var(--c-text-2); max-width: 780px; position: relative; }
.hero .tags { margin-top: 14px; display: flex; gap: 8px; flex-wrap: wrap; position: relative; }
.hero .tags span {
  background: rgba(255, 255, 255, .8); border: 1px solid #f0d8c0;
  border-radius: 999px; padding: 4px 13px; font-size: 12.5px; color: var(--c-orange);
}

/* ==========================================================================
   四、模块链 / 模块卡 / 团队
   ========================================================================== */
.chain { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 6px 0 4px; }
.chain .c {
  background: #fff; color: var(--c-orange);
  border: 1px solid #efd9c3; border-radius: 999px;
  padding: 7px 16px; font-size: 13px; font-weight: 700;
  cursor: pointer; transition: .18s; font-family: inherit;
}
.chain .c:hover { background: var(--c-ol); border-color: var(--c-brand); transform: translateY(-1px); }
.chain .arr { color: var(--c-brand); font-weight: 800; }

.mcard {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-brand); border-radius: var(--r-s);
  padding: 13px 16px; cursor: pointer; transition: .18s;
  box-shadow: var(--c-shadow);
}
.mcard:hover { transform: translateY(-2px); box-shadow: var(--c-shadow-h); border-color: #efd9c3; }
.mcard .mt {
  font-weight: 700; font-size: 14.5px; color: var(--c-text);
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.mcard .mt .cnt {
  font-size: 11px; color: var(--c-orange); font-weight: 600;
  background: var(--c-ol); border-radius: 999px; padding: 1px 9px;
}
.mcard .ms { font-size: 12.5px; color: var(--c-text-3); margin-top: 3px; }
.mcard .md { font-size: 12px; color: var(--c-orange); margin-top: 6px; font-weight: 600; }

.person {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--r-s); padding: 14px 16px; box-shadow: var(--c-shadow);
}
.person img { width: 50px; height: 50px; border-radius: 14px; flex: 0 0 auto; background: var(--c-ol); object-fit: cover; }
.person .pn { font-weight: 750; font-size: 14px; color: var(--c-text); }
.person .pr { font-size: 11.5px; color: var(--c-orange); font-weight: 700; margin-bottom: 4px; }
.person .pd { font-size: 12.5px; color: var(--c-text-3); line-height: 1.65; }

/* ==========================================================================
   五、流程地图
   ========================================================================== */
.flow-layout { display: grid; grid-template-columns: 300px 1fr; gap: 16px; align-items: start; }
@media (max-width: 960px) { .flow-layout { grid-template-columns: 1fr; } }

.steplist {
  background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--r); box-shadow: var(--c-shadow); overflow: hidden;
  position: sticky; top: 16px; max-height: calc(100vh - 40px);
  display: flex; flex-direction: column;
}
.steplist .head { padding: 12px 15px; border-bottom: 1px solid var(--c-line-s); background: var(--c-ol2); }
.steplist .head .t { font-weight: 750; font-size: 13.5px; color: var(--c-text); }
.steplist .head .p { font-size: 11.5px; color: var(--c-text-3); margin-top: 3px; }
.steplist .body { overflow-y: auto; padding: 8px; flex: 1; }
.mgroup { margin-bottom: 8px; }
.mgroup .mh {
  font-size: 11.5px; font-weight: 700; color: var(--c-orange);
  padding: 5px 8px; background: var(--c-ol); border-radius: 7px; margin-bottom: 4px;
}
.sitem {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px; border-radius: 8px; cursor: pointer;
  font-size: 12.5px; color: var(--c-text-2); transition: .15s;
  border: 1px solid transparent;
}
.sitem:hover { background: var(--c-ol2); }
.sitem.on { background: var(--c-ol); color: var(--c-orange); font-weight: 700; border-color: #efd9c3; }
.sitem .dot {
  width: 19px; height: 19px; border-radius: 6px; background: #e9edf2;
  color: var(--c-text-3); font-size: 10.5px; display: grid; place-items: center;
  flex: 0 0 auto; font-weight: 700;
}
.sitem.on .dot { background: var(--c-brand); color: #fff; }

.progress { height: 6px; background: #e9edf2; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--c-brand), var(--c-brand-d)); border-radius: 99px; transition: width .35s; }

.detail { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--c-shadow); overflow: hidden; }
.detail .dhead { padding: 17px 21px; background: linear-gradient(135deg, #fffaf5, #fff3e8); border-bottom: 1px solid var(--c-line); }
.detail .dhead .crumb { font-size: 11.5px; color: var(--c-orange); font-weight: 700; margin-bottom: 4px; }
.detail .dhead h2 { font-size: 19px; color: var(--c-text); font-weight: 750; }
.detail .dhead .goal { font-size: 13px; color: var(--c-text-3); margin-top: 5px; }
.detail .dbody { padding: 17px 21px 21px; }

.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 9px; }
.chip {
  font-size: 11px; background: var(--c-ol2); border: 1px solid #f0e2d3;
  color: var(--c-orange); border-radius: 999px; padding: 2px 10px; font-weight: 600;
}
.chip.red { background: var(--c-red-l); border-color: #f4d2d0; color: #8f2929; }
.chip.green { background: var(--c-green-l); border-color: #cfe9db; color: var(--c-green); }
.chip.blue { background: var(--c-bl); border-color: #cfdde9; color: var(--c-bl-d); }

/* 四要素 */
.four { display: grid; gap: 11px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); margin: 14px 0; }
.fbox { border: 1px solid var(--c-line); border-radius: var(--r-s); padding: 13px 15px; background: #fcfdfe; }
.fbox .ft { font-size: 12.5px; font-weight: 750; margin-bottom: 7px; display: flex; align-items: center; gap: 6px; color: var(--c-text); }
.fbox .ft i {
  width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center;
  font-style: normal; font-size: 11px; color: #fff;
}
.fbox ul { list-style: none; }
.fbox li { font-size: 12.8px; color: var(--c-text-2); padding-left: 13px; position: relative; margin-bottom: 5px; line-height: 1.68; }
.fbox li::before { content: "·"; position: absolute; left: 3px; color: var(--c-brand); font-weight: 800; }
.fbox.do { background: var(--c-ol3); border-color: #f0e2d3; }
.fbox.do .ft i { background: var(--c-brand-d); }
.fbox.give { background: var(--c-ol2); border-color: #f0dcc9; }
.fbox.give .ft i { background: var(--c-brand); }
.fbox.need { background: #f4f8fb; border-color: #dce7f0; }
.fbox.need .ft i { background: var(--c-bl-d); }
.fbox.own { background: #f6f9fc; border-color: #dfe8f1; }
.fbox.own .ft i { background: #5b7c9d; }
.fbox.own li b { color: #2c4a68; font-weight: 700; }
.fbox.done { background: var(--c-green-l); border-color: #cfe9db; }
.fbox.done .ft i { background: var(--c-green); }
.fbox.done .dv { font-size: 13px; font-weight: 700; color: var(--c-green); }

/* 话术块 */
.quote {
  background: var(--c-ol3); border: 1px solid #f0dcc9; border-left: 3px solid var(--c-brand);
  border-radius: 8px; padding: 11px 15px; font-size: 13.2px; color: #7a4a1c;
  line-height: 1.8; margin: 10px 0;
}
.quote b { color: var(--c-orange); }

/* ==========================================================================
   六、按钮
   ========================================================================== */
.btn {
  border: 0; border-radius: 9px; padding: 9px 18px;
  font-size: 13.2px; font-weight: 650; cursor: pointer;
  transition: .18s; font-family: inherit;
  background: var(--c-navy); color: #fff; display: inline-flex;
  align-items: center; gap: 7px;
}
.btn:hover { background: #1d3348; transform: translateY(-1px); box-shadow: var(--c-shadow-h); text-decoration: none; }
.btn.ghost { background: #fff; color: var(--c-text-2); border: 1px solid var(--c-line); }
.btn.ghost:hover { background: var(--c-ol2); border-color: #efd9c3; color: var(--c-orange); }
.btn.gold { background: var(--c-send); color: #fff; }
.btn.gold:hover { background: var(--c-brand-d); }
.btn.sm { padding: 6px 13px; font-size: 12.3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btnrow { display: flex; gap: 9px; flex-wrap: wrap; align-items: center; margin-top: 14px; }

/* ==========================================================================
   七、工作台对话区（核心）
   ========================================================================== */
.wb { display: flex; flex-direction: column; height: 100%; min-height: 0; background: #fff; }

.wb-head {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 26px; border-bottom: 1px solid var(--c-line-s); flex: 0 0 auto;
  position: relative; z-index: 3;
}
.wb-head > div:first-child { flex: 1; min-width: 0; }
.wb-head small { color: var(--c-text-3); font-size: 11px; }
.wb-client-line { display: flex; align-items: center; gap: 9px; min-width: 0; }
.wb-client-line .wb-advisors { margin-left: 7px; }
.wb-head h1 {
  font-size: 18px; font-weight: 700; margin-top: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.wb-head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.wb-act {
  font-size: 12px; border: 1px solid var(--c-line); background: #fff;
  color: var(--c-text-2); padding: 7px 12px; border-radius: 8px;
  cursor: pointer; font-family: inherit; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
}
.wb-act:hover { border-color: #efd9c3; background: var(--c-ol2); color: var(--c-orange); }
.wb-act[hidden] { display: none; }

/* 顾问入口放在客户标题与操作按钮之间，交付阶段仅在展开时覆盖聊天区。 */
.wb-advisors {
  display: flex; align-items: center; gap: 7px; flex: 0 0 auto;
}
.wb-advisor {
  display: inline-flex; align-items: center; gap: 5px; padding: 7px 10px;
  border: 1px solid var(--c-line); border-radius: 9px; background: #fff;
  color: var(--c-text-2); font: inherit; font-size: 12px; font-weight: 700;
  line-height: 1.4; white-space: nowrap; cursor: pointer;
}
.wb-advisor:hover { border-color: var(--c-brand); background: var(--c-ol3); }
.wb-advisor.on { border-color: var(--c-brand); background: var(--c-ol); color: var(--c-orange); }
.wb-advisor-chevron { font-size: 17px; line-height: .7; margin-left: 1px; }
.wb-delivery-wrap { position: relative; }
.wb-stages-label { font-size: 11px; font-weight: 700; color: var(--c-text-3); padding: 3px 8px 7px; }

/* 悬浮的交付阶段菜单，不占聊天高度。 */
.wb-stages {
  display: none; position: absolute; top: 100%; left: 0; z-index: 20;
  width: 196px; padding: 8px; border: 1px solid var(--c-line);
  border-radius: 11px; background: #fff; box-shadow: var(--c-shadow-h);
}
.wb-delivery-wrap.is-open .wb-stages { display: block; }
.wb-stages ol { display: flex; flex-direction: column; gap: 2px; list-style: none; }
.wb-stages li {
  display: block; font-size: 12px; font-weight: 600;
  color: var(--c-text-2); white-space: nowrap;
}
.wb-stages button {
  display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px;
  border: 0; border-radius: 8px; background: transparent;
  color: inherit; font: inherit; cursor: pointer;
}
.wb-stages button:hover { background: var(--c-ol); color: var(--c-orange); }
.wb-stages button > span {
  display: grid; place-items: center; width: 20px; height: 20px;
  background: #94a3b8; color: #fff; border-radius: 50%; font-size: 10px;
}
.wb-stages li.on { color: var(--c-orange); font-weight: 700; }
.wb-stages li.on button { background: var(--c-ol); }
.wb-stages li.on button > span { background: var(--c-brand-d); }
.wb-stages li.done button > span { background: var(--c-green); }
.wb-stages li.skipped button { background: #fff8e7; border-color: #ecd8a7; color: #9a681f; }
.wb-arrow { color: #cbd5e1; flex: 0 0 auto; }
.wb-choice { max-width: 760px; margin: 28px auto; }
.wb-choice h2 { font-size: 23px; color: var(--c-text); margin-bottom: 8px; }
.wb-choice p { color: var(--c-text-2); font-size: 13px; margin-bottom: 18px; }
.wb-choice-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.wb-choice-card {
  text-align: left; border: 1px solid var(--c-line); border-radius: 15px;
  background: #fff; padding: 20px; cursor: pointer; font: inherit;
  box-shadow: var(--c-shadow); display: flex; flex-direction: column; gap: 9px;
}
.wb-choice-card:hover { border-color: var(--c-brand); background: var(--c-ol3); }
.wb-choice-card b { font-size: 17px; color: var(--c-text); }
.wb-choice-card span { font-size: 12.5px; color: var(--c-text-2); line-height: 1.6; }
.wb-choice-card em { font-size: 12px; color: var(--c-orange); font-style: normal; font-weight: 700; }

/* 消息流 */
.wb-messages {
  flex: 1; min-height: 0; overflow-y: auto;
  padding: 24px max(26px, calc((100% - 880px) / 2)) 8px;
  overscroll-behavior-y: contain;
}
.wb-msg { margin-bottom: 22px; max-width: 90%; animation: wbin .28s ease; }
@keyframes wbin { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.wb-msg.from-user { margin-left: auto; width: fit-content; max-width: 80%; }
.wb-label { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.wb-badge {
  display: inline-flex; align-items: center; padding: 3px 10px;
  border: 1px solid #bac7d5; border-radius: 6px;
  background: var(--c-bl); color: var(--c-bl-t);
  font-size: 12.5px; font-weight: 700; line-height: 1.5;
}
.from-orange .wb-badge { border-color: #e7b38b; background: var(--c-ol); color: var(--c-orange); }
.wb-label .wb-tag {
  font-size: 10px; background: #f3f4f6; color: var(--c-text-3);
  border-radius: 4px; padding: 1px 6px;
}
.from-user .wb-label { justify-content: flex-end; }
.wb-text {
  white-space: normal; overflow-wrap: anywhere; line-height: 1.9;
  font-size: 14px; color: var(--c-text-2);
}
.from-orange .wb-text { color: var(--c-text-2); }
.from-orange .wb-text b { color: var(--c-orange); }
.from-orange .wb-text strong { color: var(--c-text); font-weight: 750; }
.from-orange .wb-md-heading { margin: 12px 0 5px; color: var(--c-text); font-weight: 750; }
.from-orange .wb-md-table { max-width: 100%; overflow-x: auto; margin: 8px 0 12px; border: 1px solid var(--c-line); border-radius: 9px; }
.from-orange .wb-md-table table { width: 100%; border-collapse: collapse; font-size: .88em; line-height: 1.55; }
.from-orange .wb-md-table th, .from-orange .wb-md-table td { padding: 8px 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--c-line); }
.from-orange .wb-md-table th { background: #f7f9fb; color: var(--c-text); font-weight: 700; white-space: nowrap; }
.from-orange .wb-md-table tbody tr:last-child td { border-bottom: 0; }
.from-user .wb-text {
  background: #eef3f7; padding: 12px 16px;
  border-radius: 12px 12px 3px 12px; color: var(--c-text);
}
.wb-msg-actions { display: flex; margin-top: 5px; }
.from-user .wb-msg-actions { justify-content: flex-end; }
.wb-copy {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 5px; border: 0; border-radius: 5px;
  background: transparent; color: var(--c-text-3);
  font: inherit; font-size: 12px; line-height: 1.5; cursor: pointer;
}
.wb-copy svg { width: 13px; height: 13px; }
.wb-copy:hover, .wb-copy:focus-visible { background: #eef3f7; color: var(--c-text); }
.wb-copy.is-copied { color: #2f7d5b; }
.wb-copy:focus-visible { outline: 2px solid var(--c-orange); outline-offset: 2px; }

/* 开场白常驻样式 */
.wb-opening { max-width: 100%; }
.wb-opening .wb-text {
  border-left: 3px solid #e7b38b; background: var(--c-ol3);
  padding: 12px 16px; border-radius: 3px 12px 12px 3px;
  color: var(--c-text-2);
}

/* 系统条 */
.wb-sys {
  margin: 0 0 22px; max-width: 100%;
}
.wb-sys .wb-text {
  background: #f6f7f9; border: 1px solid var(--c-line-s);
  border-radius: 10px; padding: 10px 14px;
  font-size: 12.5px; color: var(--c-text-3);
}
.wb-sys .wb-text b { color: var(--c-green); }

/* 对话里的卡片 */
.wb-card {
  border: 1px solid var(--c-line); border-radius: 12px;
  background: #fff; padding: 14px 16px;
  box-shadow: var(--c-shadow); margin: 0 0 20px;
  animation: wbin .28s ease;
}
.wb-card .ct {
  font-size: 13px; font-weight: 700; color: var(--c-orange);
  margin-bottom: 9px; display: flex; align-items: center; gap: 7px;
}
.wb-card table { width: 100%; border-collapse: collapse; font-size: 12.4px; }
.wb-card td, .wb-card th {
  border-bottom: 1px solid var(--c-line-s);
  padding: 6px 8px; text-align: left; vertical-align: top;
}
.wb-card th { color: var(--c-text-3); font-weight: 700; background: #fafbfc; font-size: 11.8px; }
.wb-card tr:last-child td { border-bottom: 0; }
.wb-card td.n { white-space: nowrap; }

/* 选项 */
.wb-opts { display: flex; flex-direction: column; gap: 7px; margin-top: 10px; }
.wb-opt {
  text-align: left; background: #fff; border: 1px solid var(--c-line);
  border-radius: 10px; padding: 10px 14px; font-size: 13px;
  cursor: pointer; transition: .16s; font-family: inherit;
  color: var(--c-text);
}
.wb-opt:hover:not(:disabled) { border-color: var(--c-brand); background: var(--c-ol2); transform: translateX(2px); }
.wb-opt:disabled { opacity: .5; cursor: default; }
.wb-opt b { color: var(--c-text); font-weight: 650; }
.wb-opt .od { font-size: 11.8px; color: var(--c-text-3); display: block; margin-top: 1px; }

/* 思考中 */
.wb-typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.wb-typing i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--c-brand); animation: bl 1s infinite;
}
.wb-typing i:nth-child(2) { animation-delay: .18s; }
.wb-typing i:nth-child(3) { animation-delay: .36s; }
@keyframes bl { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* 产出成果卡（解锁产出物） */
.wb-generated { display: flex; flex-direction: column; gap: 8px; margin: 0 0 20px; }
.wb-gen-card {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border: 1px solid #e6ddd2;
  border-left: 3px solid var(--c-orange); border-radius: 9px;
  background: #fdfaf5; font-size: 12px; animation: wbin .28s ease;
}
.wb-gen-card .gc-ic { flex: none; color: var(--c-orange); font-size: 15px; }
.wb-gen-card > div { display: grid; gap: 2px; min-width: 0; flex: 1; }
.wb-gen-card strong { font-size: 12.8px; font-weight: 650; color: var(--c-text); }
.wb-gen-card small { color: var(--c-text-3); font-size: 11px; }

/* ---- 产出物正文卡：写好的文件就在这里面展开看 ---- */
.wb-gen-card.doc-card {
  display: block; padding: 12px 14px 13px;
  border: 1px solid #e6ddd2; border-left: 3px solid var(--c-orange);
  border-radius: 9px; background: #fffdf9; animation: wbin .28s ease;
}
.doc-card .gc-head { display: flex; align-items: center; gap: 10px; }
.doc-card .gc-head > div { display: grid; gap: 2px; min-width: 0; }
.doc-card .gc-head .gc-ic { flex: none; color: var(--c-orange); font-size: 15px; }
.doc-minus { color: var(--c-text-3); }
.doc-body {
  margin-top: 10px; padding: 12px 13px; max-height: 420px; overflow: auto;
  border: 1px solid var(--c-line-s); border-radius: 8px; background: #fff;
}
.doc-body .doc-h1 { font-size: 18px; font-weight: 700; color: #b8141b; margin: 0 0 12px; }
.doc-body .doc-toc-title, .out-doc .doc-toc-title { font-weight: 700; color: #b8141b; margin: 12px 0 6px; }
.doc-body .doc-h2 { font-size: 13.5px; font-weight: 700; color: #fff; background: #b8141b; padding: 6px 9px; margin: 18px 0 9px; }
.doc-body .doc-h3 { font-size: 12.6px; font-weight: 700; color: #b8141b; border-left: 3px solid #e6a52a; padding-left: 7px; margin: 12px 0 6px; }
.doc-body p { font-size: 12.6px; line-height: 1.85; color: #344256; margin: 0 0 6px; }
.doc-body .doc-ul { margin: 0 0 8px; padding-left: 18px; }
.doc-body .doc-ul li { font-size: 12.6px; line-height: 1.85; color: #344256; margin-bottom: 3px; }
.doc-table { border-collapse: collapse; width: 100%; margin: 8px 0 14px; font-size: 12px; line-height: 1.6; }
.doc-table th, .doc-table td { border: 1px solid #ded7c7; padding: 7px 9px; text-align: left; vertical-align: top; }
.doc-table th { background: #b8141b; color: #fff; font-weight: 700; }
.doc-table tr:nth-child(odd):not(:first-child) { background: #fff8ea; }
.doc-acts { display: flex; gap: 8px; margin-top: 10px; }
.doc-btn {
  border: 1px solid #e0d6c9; background: #fff; color: #8a5a20;
  font-size: 11.5px; padding: 4px 10px; border-radius: 6px; cursor: pointer; font-family: inherit;
}
.doc-btn:hover { background: #fdf6ec; border-color: #d9c7ad; }
/* 卡片布局的 display 声明会覆盖浏览器默认 hidden，必须显式隐藏。 */
.doc-card [hidden] { display: none !important; }
.doc-card.is-collapsed .doc-body,
.doc-card.is-collapsed .doc-acts,
.doc-card.is-collapsed .doc-sub { display: none !important; }
.doc-card .doc-expand { flex: none; }
.doc-card .doc-acts { display: flex; flex-wrap: wrap; align-items: center; }
.copy-status, .export-status { display: block; flex-basis: 100%; color: var(--c-text); font-size: 12px; }

/* ---- 产出物汇总弹层 ---- */
.out-list { max-height: 58vh; overflow: auto; display: grid; gap: 8px; }
.out-item { border: 1px solid var(--c-line-s); border-radius: 8px; padding: 9px 11px; background: #fdfcf9; }
.out-item summary { cursor: pointer; font-size: 12.6px; display: flex; justify-content: space-between; gap: 10px; }
.out-item summary b { flex: 1; }
.out-item summary::-webkit-details-marker { display: none; }
.out-meta { color: var(--c-text-3); font-size: 11px; flex: none; }
.out-delete { flex: none; border: 1px solid #e8c8c8; background: #fff; color: #a63a3a; border-radius: 6px; padding: 3px 9px; font: inherit; font-size: 11px; cursor: pointer; transform: translateY(-4px); }
.out-delete:hover, .out-delete-confirm { background: #fff0f0; color: #a63a3a; border-color: #dbaaaa; }
.out-feedback { margin: 8px 0 12px; font-size: 12px; color: var(--c-text); }
.out-doc { margin-top: 8px; padding: 10px 11px; border: 1px solid var(--c-line-s); border-radius: 7px; background: #fff; max-height: 320px; overflow: auto; }
.out-doc .doc-h1 { font-size: 17px; font-weight: 700; color: #b8141b; margin: 0 0 9px; }
.out-doc .doc-h2 { font-size: 12.7px; font-weight: 700; color: #fff; background: #b8141b; padding: 6px 9px; margin: 14px 0 7px; }
.out-doc .doc-h3 { font-size: 12px; font-weight: 700; color: #b8141b; border-left: 3px solid #e6a52a; padding-left: 7px; margin: 9px 0 4px; }
.out-doc p, .out-doc .doc-ul li { font-size: 12.2px; line-height: 1.82; color: #344256; }
.out-doc p { margin: 0 0 5px; }
.out-doc .doc-ul { margin: 0 0 7px; padding-left: 17px; }
.out-acts { margin-top: 8px; }
.out-empty { font-size: 12.4px; color: var(--c-text-3); line-height: 1.8; margin: 0; }

/* 输入区 */
/* ---- 底部对话输入：一整条完整的输入框（只有一个框，里面不再套框） ---- */
.wb-composer { position: relative; padding: 10px max(26px, calc((100% - 880px) / 2)) 14px; border-top: 1px solid var(--c-line-s); flex: 0 0 auto; background: #fff; }
.wb-jump-latest {
  position: absolute; top: -47px; left: 50%; transform: translateX(-50%); z-index: 3;
  width: 38px; height: 38px; border: 1px solid var(--c-line-i); border-radius: 50%;
  background: #fff; color: var(--c-text-3); box-shadow: var(--c-shadow-h);
  display: grid; place-items: center; cursor: pointer;
}
.wb-jump-latest[hidden] { display: none; }
.wb-jump-latest:hover { border-color: var(--c-brand); color: var(--c-orange); }
.wb-jump-dots { display: flex; align-items: center; gap: 3px; }
.wb-jump-dots i {
  width: 5px; height: 5px; border-radius: 50%; background: currentColor;
  animation: wb-jump-dot 1s ease-in-out infinite;
}
.wb-jump-dots i:nth-child(2) { animation-delay: .16s; }
.wb-jump-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes wb-jump-dot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .wb-jump-dots i { animation: none; } }
.wb-composer-box {
  border: 1px solid #dbe3ea; border-radius: 18px; background: #fff;
  padding: 10px 12px 8px; transition: .16s;
  box-shadow: 0 2px 10px rgba(41, 70, 99, .04);
}
.wb-composer-box:focus-within { border-color: #c3d2de; box-shadow: 0 2px 14px rgba(41, 70, 99, .07); }
/* 清掉全局 textarea 的边框与聚焦光圈（否则框里又套一个框） */
.wb-composer #wb-input, .wb-composer #wb-input:focus {
  display: block; width: 100%; height: 46px; box-sizing: border-box;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
  padding: 4px 2px 0; margin: 0; outline: none;
  resize: none; font-family: inherit; font-size: 13.5px; line-height: 1.7; color: var(--c-text);
}
.wb-composer #wb-input::placeholder { color: var(--c-text-3); opacity: 1; }
.wb-atts { display: flex; flex-wrap: wrap; gap: 6px; padding: 2px 2px 7px; }
.wb-atts:empty { display: none; }
.wb-att {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: var(--c-text-2); background: var(--c-ol3);
  border: 1px solid #f0dcc9; border-radius: 99px; padding: 3px 6px 3px 10px; max-width: 280px;
}
.wb-att .at-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-att .at-s { font-size: 10.5px; color: var(--c-text-3); white-space: nowrap; }
.wb-att.st-ok { border-color: #cfe3d2; background: #f2f8f3; color: var(--c-text-2); }
.wb-att.st-ok .at-s { color: #2f7d4f; }
.wb-att.st-fail { border-color: #f0d0c9; background: #fdf3f1; }
.wb-att.st-fail .at-s { color: #b4442e; }
.wb-att.st-pending .at-s { color: var(--c-text-3); }
.wb-att-x {
  border: 0; background: none; color: var(--c-text-3); font-size: 13px;
  line-height: 1; cursor: pointer; padding: 0 2px;
}
.wb-att-x:hover { color: #c2410c; }
.wb-tools { display: flex; align-items: center; gap: 8px; }
.wb-attach { display: flex; align-items: center; gap: 2px; }
.wb-icon {
  width: 30px; height: 30px; border: 0; border-radius: 9px; background: transparent;
  cursor: pointer; display: grid; place-items: center; transition: .14s;
}
.wb-icon svg { width: 16px; height: 16px; display: block; }
.wb-icon:hover { background: var(--c-ol3); }
.wb-tools .wb-hint { font-size: 11px; color: var(--c-text-3); margin-left: 2px; }
.wb-tools .wb-hint b { color: var(--c-orange); font-weight: 700; }
.wb-send {
  background: var(--c-send); color: #fff; width: 34px; height: 34px;
  border-radius: 50%; border: 0; cursor: pointer; margin-left: auto;
  display: grid; place-items: center; line-height: 1; transition: .14s;
}
.wb-send .send-icon { width: 20px; height: 20px; display: block; }
.wb-send .stop-icon { width: 11px; height: 11px; border-radius: 2px; background: currentColor; display: none; }
.wb-send.is-stopping .send-icon { display: none; }
.wb-send.is-stopping .stop-icon { display: block; }
.wb-send:hover:not(:disabled) { background: var(--c-brand-d); }
.wb-send:disabled { opacity: .45; cursor: not-allowed; }
.ai-stopped { margin-top: 8px; color: var(--c-text-3); font-size: .85em; }
.wb-footnote { display: block; text-align: center; color: var(--c-text-3); font-size: 10.5px; margin-top: 9px; }

/* 旧对话类（兼容保留） */
.chatbox { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--c-shadow); display: flex; flex-direction: column; height: calc(100vh - 140px); min-height: 540px; }
.chatfeed { flex: 1; overflow-y: auto; padding: 18px; }
.chatfoot { padding: 12px 16px; border-top: 1px solid var(--c-line-s); background: var(--c-ol3); }
.msg { display: flex; gap: 10px; margin-bottom: 15px; }
.msg .av { width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto; background: var(--c-ol); }
.bubble { background: #fff; border: 1px solid var(--c-line); border-radius: 4px 13px 13px 13px; padding: 11px 15px; font-size: 13.5px; color: var(--c-text-2); line-height: 1.8; }
.bubble b { color: var(--c-orange); }
.cardslot { margin: 8px 0 15px; }
.minicard { background: #fff; border: 1px solid var(--c-line); border-radius: 11px; padding: 12px 15px; box-shadow: var(--c-shadow); }
.minicard .mt { font-size: 13px; font-weight: 700; color: var(--c-orange); margin-bottom: 7px; display: flex; align-items: center; gap: 7px; }
.minicard table { width: 100%; border-collapse: collapse; font-size: 12.4px; }
.minicard td, .minicard th { border-bottom: 1px solid var(--c-line-s); padding: 5px 7px; text-align: left; vertical-align: top; }
.minicard th { color: var(--c-text-3); font-weight: 700; background: #fafbfc; }
.minicard tr:last-child td { border-bottom: 0; }
.typing { display: inline-flex; gap: 4px; align-items: center; padding: 4px 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--c-brand); animation: bl 1s infinite; }
.typing i:nth-child(2) { animation-delay: .18s; }
.typing i:nth-child(3) { animation-delay: .36s; }

/* ==========================================================================
   八、侧栏卡片（客户档案 / 进度）
   ========================================================================== */
.sb-card {
  background: #fff; border: 1px solid var(--c-line);
  border-radius: 11px; padding: 12px 13px; margin-bottom: 10px;
}
.sb-card .h {
  font-size: 12px; font-weight: 700; color: var(--c-orange);
  margin-bottom: 8px; display: flex; align-items: center;
  justify-content: space-between; gap: 6px;
}
.sb-card .h em {
  font-style: normal; font-size: 9.5px; background: var(--c-ol);
  color: var(--c-orange); border-radius: 999px; padding: 1px 7px; font-weight: 700;
}
.kv {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; padding: 4px 0; border-bottom: 1px dashed var(--c-line-s);
}
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--c-text-3); flex: 0 0 auto; }
.kv .v { text-align: right; font-weight: 600; color: var(--c-text-2); overflow-wrap: anywhere; }

.side { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 12px; }
.sidecard { background: var(--c-card); border: 1px solid var(--c-line); border-radius: var(--r); box-shadow: var(--c-shadow); padding: 15px 17px; }

/* ==========================================================================
   九、表格 / 折叠 / 三态
   ========================================================================== */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; margin: 10px 0; }
table.tbl th, table.tbl td { border: 1px solid var(--c-line); padding: 8px 11px; text-align: left; vertical-align: top; }
table.tbl th { background: #fafbfc; color: var(--c-text-3); font-weight: 700; font-size: 12.3px; }
table.tbl tr:nth-child(even) td { background: #fcfdfe; }
table.tbl td.n { white-space: nowrap; }

.acc { border: 1px solid var(--c-line); border-radius: var(--r-s); overflow: hidden; margin-bottom: 9px; background: #fff; box-shadow: var(--c-shadow); }
.acc .ah {
  padding: 12px 16px; cursor: pointer; display: flex; align-items: center; gap: 10px;
  font-weight: 700; font-size: 13.2px; color: var(--c-text); transition: .16s;
}
.acc .ah:hover { background: var(--c-ol3); }
.acc .ah .no {
  width: 24px; height: 24px; border-radius: 7px; background: var(--c-brand);
  color: #fff; display: grid; place-items: center; font-size: 11.5px; flex: 0 0 auto;
}
.acc .ah .src {
  margin-left: auto; font-size: 10.5px; color: var(--c-orange); font-weight: 600;
  background: var(--c-ol); border-radius: 999px; padding: 1px 9px; white-space: nowrap;
}
.acc .ah .cv { transition: .2s; color: #94a3b8; font-size: 12px; }
.acc.open .ah .cv { transform: rotate(90deg); }
.acc .ab { display: none; padding: 0 16px 15px; border-top: 1px solid var(--c-line-s); }
.acc.open .ab { display: block; animation: wbin .22s ease; }
.acc .ab .lbl { font-size: 11.5px; font-weight: 750; color: var(--c-orange); margin: 10px 0 4px; }
.acc .ab p { font-size: 13px; color: var(--c-text-2); }

.tristate { display: inline-flex; gap: 4px; }
.tristate button {
  border: 1px solid var(--c-line); background: #fff; border-radius: 7px;
  font-size: 11.3px; padding: 2px 9px; cursor: pointer;
  font-family: inherit; color: var(--c-text-3); transition: .15s;
}
.tristate button:hover { border-color: var(--c-brand); }
.tristate button.hit.on { background: var(--c-brand-d); border-color: var(--c-brand-d); color: #fff; }
.tristate button.none.on { background: var(--c-green); border-color: var(--c-green); color: #fff; }
.tristate button.todo.on { background: var(--c-brand); border-color: var(--c-brand); color: #fff; }

/* ==========================================================================
   十、输入 / 结果 / 标签 / 树
   ========================================================================== */
input[type="number"], input[type="text"], select, textarea {
  font-family: inherit; font-size: 13px; padding: 8px 11px;
  border: 1px solid var(--c-line-i); border-radius: 8px;
  background: #fff; color: var(--c-text); width: 100%; transition: .16s;
}
input:focus, select:focus, textarea:focus {
  outline: 0; border-color: var(--c-brand);
  box-shadow: 0 0 0 3px rgba(230, 133, 57, .14);
}
.field { margin-bottom: 11px; }
.field label { display: block; font-size: 12.3px; color: var(--c-text-3); margin-bottom: 4px; font-weight: 600; }

.result { background: var(--c-ol3); border: 1px solid #f0dcc9; border-radius: var(--r-s); padding: 15px 17px; }
.result .rt { font-size: 12.3px; font-weight: 750; color: var(--c-orange); margin-bottom: 8px; }
.bignum { font-size: 24px; font-weight: 800; color: var(--c-text); letter-spacing: .4px; }
.bignum small { font-size: 13px; color: var(--c-text-3); font-weight: 600; }

.pill { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }
.pill.p0 { background: var(--c-red-l); color: #8f2929; }
.pill.p1 { background: var(--c-ol); color: var(--c-orange); }
.pill.p2 { background: var(--c-bl); color: var(--c-bl-d); }
.pill.ok { background: var(--c-green-l); color: var(--c-green); }

.tree { display: flex; flex-direction: column; gap: 9px; }
.tnode {
  border: 1px solid var(--c-line); border-left: 3px solid var(--c-brand);
  border-radius: var(--r-s); padding: 11px 14px; background: #fcfdfe; font-size: 13px;
}
.tnode.pick { border-left-color: var(--c-brand-d); background: var(--c-ol3); }
.tnode .tt { font-weight: 750; color: var(--c-text); margin-bottom: 3px; }

.flowstrip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; }
.fs {
  flex: 0 0 auto; background: var(--c-card); border: 1px solid var(--c-line);
  border-radius: var(--r-s); padding: 10px 14px; min-width: 165px;
  box-shadow: var(--c-shadow); cursor: pointer; transition: .16s;
}
.fs:hover { transform: translateY(-2px); box-shadow: var(--c-shadow-h); border-color: #efd9c3; }
.fs.on { border-color: var(--c-brand); background: var(--c-ol3); }
.fs .fst { font-size: 12.6px; font-weight: 750; color: var(--c-text); }
.fs .fss { font-size: 11.2px; color: var(--c-text-3); margin-top: 2px; }

.toc { position: sticky; top: 16px; }
@media (max-width: 960px) {
  .steplist, .side, .toc { position: static; max-height: none; }
}

footer.site {
  text-align: center; font-size: 11.5px; color: #a8b3c2;
  padding: 20px 26px 36px; border-top: 1px solid var(--c-line-s); margin-top: 26px;
}
body.wb-mode footer.site { display: none; }
body.wb-mode .wb-cardwrap { margin: 0 0 20px; }
.wb-cardwrap { animation: wbin .28s ease; margin: 0 0 20px; }

/* 首页对话预览（不可交互的开场展示） */
.wb-preview {
  border: 1px solid var(--c-line); border-radius: 14px; background: #fff;
  padding: 20px 22px 6px; box-shadow: var(--c-shadow); margin-bottom: 13px;
}
.wb-preview .wb-msg { margin-bottom: 16px; animation: none; }
.wb-preview .wb-opts { pointer-events: none; }
.wb-preview .wb-opt { opacity: .78; }

/* ==========================================================================
   十一、响应式
   ========================================================================== */
@media (max-width: 860px) {
  .shell-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    transform: translateX(-100%); transition: transform .22s;
    box-shadow: 0 0 40px rgba(23, 32, 51, .18);
  }
  .shell-sidebar.is-open { transform: translateX(0); }
  .sb-shade {
    position: fixed; inset: 0; background: rgba(21, 42, 75, .33);
    z-index: 59; display: none;
  }
  .sb-shade.is-open { display: block; }
  .sb-toggle { display: inline-flex !important; }
  .wrap, .wrap-narrow { padding: 20px 16px 50px; }
  .wb-head { padding: 11px 15px; }
  .wb-messages { padding: 18px 15px 8px; }
  .wb-composer { padding: 9px 15px 12px; }
  .wb-msg { max-width: 100%; }
  .hero { padding: 22px 18px; }
  .hero h1 { font-size: 20px; }
  .btn { padding: 8px 15px; }
}
.sb-toggle { display: none; }

@media (max-width: 560px) {
  .wb-head { flex-wrap: wrap; gap: 8px; }
  .wb-head-client { width: 100%; }
  .wb-client-line { flex-wrap: wrap; }
  .wb-client-line .wb-advisors { margin-left: 0; }
  .wb-advisor { padding: 7px 8px; font-size: 11px; }
  .wb-choice-grid { grid-template-columns: 1fr; }
  .wb-head-actions { width: 100%; overflow-x: auto; padding-bottom: 2px; }
  .wb-badge { font-size: 11.5px; padding: 2px 8px; }
  .wb-text { font-size: 13.5px; }
  .wb-tools .wb-hint { display: none; }
  .grid.g2, .grid.g3, .grid.g4 { grid-template-columns: 1fr; }
}


/* ==========================================================================
   十二、客户工作台（左侧客户区 + 右侧流程区）
   ========================================================================== */

/* ---- 左栏：客户 ---- */
.sb-clients { flex: 1 1 auto; overflow-y: auto; padding: 2px 2px 6px; margin: 0 -2px; }
.sb-client-row { position: relative; }
.sb-client {
  display: block; padding: 9px 56px 9px 10px; border-radius: 10px;
  border: 1px solid transparent; margin-bottom: 4px;
}
.sb-client:hover { background: #fff; border-color: var(--c-line); text-decoration: none; }
.sb-client.on { background: #fff; border-color: #efd9c3; box-shadow: 0 1px 3px rgba(23, 32, 51, .05); }
.sc-delete {
  position: absolute; top: 8px; right: 9px; padding: 3px 6px;
  border: 1px solid #e8c0bb; border-radius: 6px; background: #fff; color: #a33b32;
  font-size: 11px; cursor: pointer; opacity: 0; pointer-events: none;
}
.sb-client-row:hover .sc-delete, .sb-client-row:focus-within .sc-delete {
  opacity: 1; pointer-events: auto;
}
.sc-delete:hover, .sc-delete:focus-visible { background: #fff1ef; border-color: #d7887e; }
@media (hover: none) { .sc-delete { opacity: 1; pointer-events: auto; } }
.sc-name {
  font-size: 12.8px; color: var(--c-text); font-weight: 700;
  line-height: 1.4; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-badge {
  display: inline-block; font-size: 10px; padding: 1px 7px; border-radius: 99px;
  background: var(--c-ol); color: var(--c-orange); font-weight: 700; margin-right: 5px;
}
.sc-badge.off { background: #e9edf2; color: #94a3b8; }
.sc-sub {
  display: flex; align-items: center; font-size: 10.8px; color: var(--c-text-3);
  margin-top: 4px; overflow: hidden; white-space: nowrap;
}
.sc-bar { height: 3px; background: #e3e8ef; border-radius: 99px; margin-top: 6px; overflow: hidden; }
.sc-bar i {
  display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--c-brand), var(--c-brand-d)); transition: width .3s;
}
.sb-empty {
  font-size: 11.5px; color: var(--c-text-3); background: #fff;
  border: 1px dashed var(--c-line-i); border-radius: 10px;
  padding: 14px 12px; text-align: center; line-height: 1.8;
}
.sb-help {
  display: flex; align-items: center; gap: 7px; width: 100%;
  margin-top: 6px; padding: 8px 10px; border-radius: 9px;
  border: 1px solid var(--c-line); background: #fff;
  color: var(--c-text-2); font-size: 12.5px; cursor: pointer;
  font-family: inherit; text-align: left;
}
.sb-help:hover { border-color: #efd9c3; color: var(--c-orange); }
.sb-help i {
  font-style: normal; width: 16px; height: 16px; border-radius: 50%;
  background: var(--c-ol); color: var(--c-orange); font-size: 11px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.sb-account { position: relative; }
.sb-logout { margin-top: 10px; padding: 5px 8px; border: 1px solid var(--c-line); border-radius: 8px;
  background: #fff; color: var(--c-text-3); font: inherit; font-size: 10.5px; cursor: pointer; }
.sb-logout:hover { color: #b42323; border-color: #efcaca; }

/* ---- 登录 / 注册 ---- */
html.orange-auth-loading body { visibility: hidden; }
.auth-page {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(145deg, #fff8f0, #f3f6fa); padding: 24px;
}
.auth-card {
  width: min(410px, 100%); background: #fff; border: 1px solid var(--c-line);
  border-radius: 18px; padding: 34px 32px; box-shadow: 0 18px 50px rgba(23,32,51,.12);
}
.auth-mark {
  width: 46px; height: 46px; border-radius: 14px; background: var(--c-brand);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 25px; font-weight: 800; margin-bottom: 16px;
}
.auth-card h1 { margin: 0; color: var(--c-text); font-size: 24px; }
.auth-sub { color: var(--c-text-3); font-size: 13px; line-height: 1.7; margin: 9px 0 22px; }
.auth-card label { display: block; color: var(--c-text-2); font-size: 12px; margin: 13px 0; }
.auth-card input { display: block; box-sizing: border-box; width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--c-line); border-radius: 9px; font: inherit; color: var(--c-text); background: #fff; }
.auth-card input:focus { outline: none; border-color: var(--c-brand); box-shadow: 0 0 0 3px rgba(226,126,56,.12); }
.auth-submit { width: 100%; border: 0; border-radius: 10px; padding: 11px 14px; margin-top: 8px;
  color: #fff; background: var(--c-brand); font: inherit; font-weight: 700; cursor: pointer; }
.auth-submit:hover { background: var(--c-brand-d); }
.auth-submit:disabled { opacity: .6; cursor: wait; }
.auth-error { min-height: 19px; color: #b42323; font-size: 12px; line-height: 1.6; }
.auth-foot { color: var(--c-text-3); font-size: 12px; text-align: center; margin: 20px 0 0; }
.auth-foot a { color: var(--c-orange); text-decoration: none; font-weight: 700; }
.admin-card { width: min(900px, 100%); background: #fff; border: 1px solid var(--c-line); border-radius: 18px; padding: 28px; box-shadow: 0 18px 50px rgba(23,32,51,.12); }
.admin-head { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; margin-bottom:18px; }
.admin-card h1 { margin:0; color:var(--c-text); font-size:24px; }
.admin-card h2 { margin:0 0 12px; color:var(--c-text); font-size:16px; }
.admin-card .card { margin-top:14px; }
.invite-result { margin-top:12px; padding:10px; color:#2f7d5b; background:#eef9f2; border-radius:8px; word-break:break-all; }

/* ---- 右栏：客户头 ---- */
.wb > .wb-head, .wb > .wb-composer { flex: 0 0 auto; }
.wb > .wb-messages { flex: 1 1 auto; min-height: 0; }
.wb-head-meta { font-size: 11.5px; color: var(--c-text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 620px) {
  .wb-client-line { gap: 6px; }
  .wb-head-meta { max-width: 38vw; }
}

/* ---- 产出类型标签 ---- */
.kindtag {
  display: inline-block; font-size: 10.5px; font-weight: 700;
  padding: 1px 7px; border-radius: 6px; margin: 0 5px 0 2px; vertical-align: 1px;
}

/* ---- 步骤卡（用户视角三件事） ---- */
.step-brief {
  background: #fff; border: 1px solid var(--c-line); border-left: 3px solid var(--c-brand);
  border-radius: 12px; padding: 14px 16px; box-shadow: var(--c-shadow); max-width: 660px;
}
.sb-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.sb-head .sb-no {
  font-size: 11px; color: var(--c-orange); background: var(--c-ol);
  padding: 2px 8px; border-radius: 99px; font-weight: 700;
}
.sb-head b { font-size: 15px; color: var(--c-text); }
.sb-row {
  display: flex; gap: 10px; padding: 8px 0;
  border-top: 1px solid var(--c-line-s); font-size: 13px; color: var(--c-text-2);
}
.sb-row .sb-k { flex: 0 0 76px; color: var(--c-text-3); font-size: 11.8px; padding-top: 1px; }
.sb-out b { color: var(--c-orange); }
.sb-out-lines { flex: 1; min-width: 0; }
.sb-out-line { display: flex; align-items: flex-start; gap: 8px; min-width: 0; line-height: 1.6; }
.sb-out-line + .sb-out-line { margin-top: 3px; }
.sb-out-label { flex: 0 0 auto; color: var(--c-text-2); }
.sb-out-value { min-width: 0; overflow-wrap: anywhere; }
.sb-to { font-size: 10.5px; color: #94a3b8; margin-left: 4px; }
.sb-more { margin-top: 6px; border-top: 1px dashed var(--c-line-i); padding-top: 9px; }
.sb-more summary { cursor: pointer; font-size: 12px; color: var(--c-text-3); list-style: none; }
.sb-more summary::-webkit-details-marker { display: none; }
.sb-more summary:before { content: '▸ '; color: var(--c-brand); }
.sb-more[open] summary:before { content: '▾ '; }
.sb-more summary:hover { color: var(--c-orange); }
.sb-more-body { margin-top: 10px; font-size: 12px; color: var(--c-text-2); }
.sb-m { margin-bottom: 9px; }
.sb-m b { color: var(--c-text); font-size: 12px; display: block; margin-bottom: 3px; }
.sb-m ul { list-style: none; }
.sb-m li { padding-left: 12px; position: relative; margin-bottom: 3px; line-height: 1.65; }
.sb-m li:before { content: '·'; position: absolute; left: 2px; color: var(--c-brand); font-weight: 800; }
.sb-done { color: var(--c-green); font-weight: 700; }

/* ---- 弹层 ---- */
.ws-modal {
  position: fixed; inset: 0; z-index: 200; padding: 20px;
  background: rgba(21, 42, 75, .36);
  display: flex; align-items: center; justify-content: center;
}
.ws-modal-box {
  background: #fff; border-radius: 16px; padding: 22px 24px;
  width: 100%; max-width: 470px; max-height: 86vh; overflow: auto;
  box-shadow: 0 20px 60px rgba(23, 32, 51, .28);
}
.ws-modal-box:has(.chat-list) { max-width: 720px; }
.ws-modal-box:has(.manual-stage) { max-width: 620px; }
.manual-stage { margin: 18px 0 10px; padding-top: 12px; border-top: 1px solid var(--c-line-s); }
.manual-stage b { display: block; color: var(--c-text); font-size: 13px; }
.manual-stage small { display: block; margin-top: 4px; color: var(--c-text-3); line-height: 1.6; }
.manual-files { margin: 0 0 10px; color: var(--c-text-2); font-size: 12px; line-height: 1.8; overflow-wrap: anywhere; }
.chat-tabs { display: flex; gap: 8px; border-bottom: 1px solid var(--c-line-s); margin-bottom: 10px; }
.chat-tabs button { border: 0; border-bottom: 2px solid transparent; background: none; color: var(--c-text-3); padding: 8px 12px; cursor: pointer; font: inherit; }
.chat-tabs button.on { color: var(--c-orange); border-color: var(--c-orange); font-weight: 700; }
.chat-list { max-height: 58vh; overflow: auto; }
.chat-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 2px; border-bottom: 1px solid var(--c-line-s); }
.chat-row-main { min-width: 0; flex: 1; cursor: pointer; border-radius: 8px; }
.chat-row-main:hover .chat-row-title, .chat-row-main:focus-visible .chat-row-title { color: var(--c-orange); }
.chat-row-main:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 4px; }
.chat-row-title { display: flex; align-items: center; min-width: 0; color: var(--c-text); font-size: 14px; font-weight: 700; }
.chat-title-text { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-current { display: inline-block; margin-left: 8px; color: var(--c-orange); background: var(--c-ol3); border-radius: 10px; padding: 2px 7px; font-size: 11px; vertical-align: 1px; }
.chat-row-meta { margin-top: 3px; color: var(--c-text-3); font-size: 11px; }
.chat-row-preview { margin-top: 5px; color: var(--c-text-2); font-size: 12px; line-height: 1.5; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-row-actions { display: flex; align-items: center; flex: 0 0 auto; gap: 8px; }
.chat-state { flex: none; display: inline-flex; align-items: center; padding: 4px 9px; border-radius: 999px; background: #edf3fb; color: #315d80; font-size: 11px; font-weight: 700; white-space: nowrap; }
.chat-state.is-ready { background: #eaf6ef; color: #2f7d5b; }
.chat-state.is-error { background: #fdeceb; color: #b42323; }
.chat-state[hidden] { display: none; }
.chat-row-actions .chat-icon { width: 36px; height: 36px; padding: 0; border: 1px solid var(--c-line); border-radius: 10px; background: #fff; color: var(--c-text-2); box-shadow: none; display: inline-flex; align-items: center; justify-content: center; line-height: 1; transition: background .16s, border-color .16s, color .16s, transform .16s; }
.chat-row-actions .chat-icon svg { display: block; width: 18px; height: 18px; flex: none; }
.chat-row-actions .chat-icon:hover { background: var(--c-ol2); border-color: #efd9c3; color: var(--c-orange); box-shadow: none; transform: translateY(-1px); }
.chat-row-actions .chat-icon:focus-visible { outline: 2px solid var(--c-brand); outline-offset: 2px; }
.chat-row-actions .chat-open { color: var(--c-orange); }
.chat-empty { padding: 26px 10px; color: var(--c-text-3); text-align: center; font-size: 13px; }
.ws-modal-h { font-size: 17px; font-weight: 750; color: var(--c-text); }
.ws-modal-sub { font-size: 12.5px; color: var(--c-text-3); margin: 6px 0 16px; line-height: 1.72; }
.ws-f { display: block; margin-bottom: 13px; }
.ws-f > span { display: block; font-size: 12px; color: var(--c-text-2); font-weight: 700; margin-bottom: 6px; }
.ws-f > span em { font-style: normal; color: var(--c-red); font-weight: 700; font-size: 11px; }
.ws-f input {
  width: 100%; padding: 9px 12px; border: 1px solid var(--c-line-i); border-radius: 9px;
  font-size: 13px; font-family: inherit; color: var(--c-text); background: #fbfcfd;
}
.ws-f input:focus { outline: none; border-color: var(--c-brand); background: #fff; }
.ws-f input.err { border-color: var(--c-red); background: #fffafa; }
.ws-radios { display: flex; flex-direction: column; gap: 6px; }
.ws-radio {
  text-align: left; padding: 9px 12px; border: 1px solid var(--c-line-i); border-radius: 9px;
  background: #fbfcfd; font-size: 12.5px; color: var(--c-text-2);
  cursor: pointer; font-family: inherit;
}
.ws-radio.on { border-color: var(--c-brand); background: var(--c-ol3); color: var(--c-orange); font-weight: 700; }
.ws-modal-f { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.ws-help p {
  font-size: 12.8px; color: var(--c-text-2); line-height: 1.85;
  margin-bottom: 9px; padding-left: 13px; position: relative;
}
.ws-help p:before {
  content: ''; position: absolute; left: 2px; top: 8px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--c-brand);
}
.ws-help b { color: var(--c-text); }

@media (max-width: 960px) {
  .step-brief { max-width: 100%; }
  .ws-modal-box { padding: 18px 16px; }
}
@media (max-width: 640px) {
  .chat-row { align-items: flex-start; flex-direction: column; }
  .chat-row-actions { width: 100%; }
  .chat-row-actions .btn { flex: 1; }
  .chat-row-actions .chat-icon { flex: 0 0 36px; }
}


/* ---- 产出物：双产出条目 + 目录结构折叠 ---- */
.oi { display: inline-block; margin: 0 12px 5px 0; max-width: 100%; }
.sb-none { color: #94a3b8; font-size: 12.5px; }
.sb-row.sb-own b { color: #315d80; }
.sb-more + .sb-more { margin-top: 5px; }
.sb-sample > summary {
  color: var(--c-orange); font-weight: 700;
  background: var(--c-ol3); border-radius: 7px; padding: 6px 10px;
}
.sb-sample > summary:before { content: '▸ '; }
.sb-sample[open] > summary:before { content: '▾ '; }
.sb-sample > summary:hover { background: var(--c-ol); }
.sb-sample .sb-m { margin-top: 9px; }
.sb-sample .sb-m:first-child { margin-top: 2px; }

/* ---- 步骤卡：一句话总结 ---- */
.sb-one {
  font-size: 13.2px; color: var(--c-text); line-height: 1.78;
  margin: 0 0 11px; padding-left: 11px; border-left: 3px solid var(--c-brand);
}
.sb-sep { color: #cbd5e1; margin: 0 9px; }

/* ---- 小橙子在读 / AI 提示 ---- */
.ai-thinking {
  color: var(--c-text-3); font-size: 12.8px;
  display: inline-flex; align-items: center; gap: 2px;
}
.wb-progress-live { min-height: 20px; color: var(--c-text-2); }
.ai-thinking .wb-typing { padding: 0 0 0 2px; }
.ai-note {
  display: block; margin-top: 8px; padding-top: 7px;
  border-top: 1px dashed var(--c-line-i);
  font-size: 11.5px; color: var(--c-text-3); line-height: 1.7;
}
.ai-warn { color: #b45309; font-size: 12.4px; }

/* ---- AI 设置弹窗（内部维护用，界面上无入口） ---- */
.ai-cfg-note {
  font-size: 11.5px; color: var(--c-text-3); line-height: 1.7;
  background: var(--c-ol3); border-radius: 8px; padding: 8px 11px; margin: 2px 0 10px;
}
.ai-cfg-state { font-size: 12.2px; min-height: 18px; margin-bottom: 10px; color: var(--c-text-3); }
.ai-cfg-state.ok { color: var(--c-green); }
.ai-cfg-state.bad { color: #b45309; }
.ai-cfg-cur {
  border: 1px solid var(--c-line-i); border-radius: 10px;
  padding: 4px 12px; margin: 2px 0 12px; background: #fff;
}
.ai-cfg-cur .acc-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 0; font-size: 12.6px; border-bottom: 1px solid var(--c-line-i);
}
.ai-cfg-cur .acc-row:last-child { border-bottom: 0; }
.ai-cfg-cur .acc-row span { color: var(--c-text-3); min-width: 42px; }
.ai-cfg-cur .acc-row b { color: var(--c-text); font-weight: 600; }
.ai-cfg-more { margin-bottom: 12px; }
.ai-cfg-more > summary {
  font-size: 12.4px; color: var(--c-text-3); cursor: pointer;
  padding: 5px 0; list-style: none;
}
.ai-cfg-more > summary::-webkit-details-marker { display: none; }
.ai-cfg-more > summary::before { content: '▸ '; }
.ai-cfg-more[open] > summary::before { content: '▾ '; }
.ai-cfg-more > summary:hover { color: var(--c-brand); }
.ai-cfg-more[open] > summary { margin-bottom: 8px; }
