/* ============ tokens ============ */
:root {
  --bg: #f4f6f8;
  --surface: #ffffff;
  --surface-2: #fafbfc;
  --line: #e7eaee;
  --line-2: #d8dde4;
  --ink: #101828;
  --ink-2: #475467;
  --ink-3: #8a94a6;
  --brand: #0d5c63;
  --brand-2: #094247;
  --brand-soft: #e8f2f2;
  --brand-line: #cfe4e4;
  --amber: #a96a2c;
  --amber-soft: #fdf3e6;
  --red: #b93a34;
  --red-soft: #fdeceb;
  --green: #19704a;
  --green-soft: #e9f5ee;
  --blue: #2b5cbf;
  --blue-soft: #edf2fd;
  --r: 12px;
  --r-sm: 8px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .05);
  --shadow-2: 0 8px 28px -12px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .04);
  --shadow-3: 0 24px 60px -20px rgba(16, 24, 40, .28);
  /* v2.5.0 字体统一：苹果系统字体优先（SF Pro），英文按西方阅读习惯渲染；
     Windows 上无 SF 时落到 Segoe UI / 雅黑，字号与字重保持原样 */
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 620; letter-spacing: -0.011em; }
p { margin: 0; }
::selection { background: #cfe4e4; }

/* v2.5.0 西方阅读习惯：数据区数字等宽对齐（SF Pro 的 tabular figures），表格不挤压 */
.tb td, .kv dd, .num, .ring-val, .meter + *, .badge { font-variant-numeric: tabular-nums; }
/* 英文为主的长文本：松一点的可读性行距（字号不变），避免中西混排挤在一起 */
.cell-sub, .hint, .muted { letter-spacing: 0.001em; }

/* ============ layout ============ */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 18px; }
.brand-mark {
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(150deg, #12727a, #0a3f45);
  color: #fff; display: grid; place-items: center;
  box-shadow: 0 4px 12px -4px rgba(13, 92, 99, .6);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 14.5px; letter-spacing: -0.015em; }
.brand-text span { font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }

.nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; flex: 1; }
.nav-group {
  display: flex; align-items: center; gap: 9px; width: 100%;
  font-size: 11.5px; letter-spacing: .06em;
  color: var(--ink-3); padding: 8px 10px; font-weight: 600;
  background: transparent; border: 0; cursor: pointer; text-align: left;
  font-family: inherit; border-radius: 8px;
}
.nav-group:hover { background: #f4f6f8; color: var(--ink-2); }
.nav-group .ni-ico { opacity: .75; }
.nav-caret { margin-left: auto; width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent; border-top: 5px solid currentColor; opacity: .55; transition: transform .16s; }
.nav-sec.fold .nav-caret { transform: rotate(-90deg); }
.nav-sec.fold .nav-sub { display: none; }
.nav-top { margin-bottom: 4px; }
.nav-sub { display: flex; flex-direction: column; gap: 2px; }
.nav-sub .nav-item { padding-left: 35px; font-size: 12.8px; }
.nav-sub .nav-item.active::before { left: 13px; top: 9px; bottom: 9px; }
.nav-item {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 8px; color: var(--ink-2);
  font-size: 13px; cursor: pointer; position: relative; transition: background .14s, color .14s;
}
.nav-item:hover { background: #f4f6f8; color: var(--ink); }
.nav-item.active { background: var(--brand-soft); color: var(--brand-2); font-weight: 560; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px;
  border-radius: 0 3px 3px 0; background: var(--brand);
}
.ni-ico { display: grid; place-items: center; width: 16px; height: 16px; opacity: .8; }
.nav-item.active .ni-ico { opacity: 1; }
.nav-count {
  margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600;
  background: var(--amber-soft); color: var(--amber); border-radius: 20px; padding: 0 6px; min-width: 18px; text-align: center;
}
.nav-count:empty { display: none; }
.nav-dot { margin-left: auto; width: 6px; height: 6px; border-radius: 50%; background: var(--red); display: none; }
.nav-dot.on { display: block; }

.sidebar-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 8px; }
.engine-chip { display: flex; gap: 8px; align-items: center; padding: 7px 9px; border-radius: 8px; background: var(--surface-2); border: 1px solid var(--line); }
.engine-chip .pulse { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-3); flex: 0 0 auto; }
.engine-chip.live .pulse { background: var(--green); box-shadow: 0 0 0 3px rgba(25, 112, 74, .14); }
.engine-chip > div { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.engine-chip strong { font-size: 11.5px; font-weight: 600; }
.engine-chip span { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 28px 14px; background: rgba(244, 246, 248, .88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid rgba(231, 234, 238, .8);
}
.crumb h1 { font-size: 19px; }
.crumb p { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }
.view { padding: 24px 28px 56px; max-width: 1440px; width: 100%; }

/* ============ buttons ============ */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2);
  background: var(--surface); color: var(--ink-2); font-size: 12.5px; font-weight: 540;
  cursor: pointer; transition: all .13s ease; white-space: nowrap;
}
.btn:hover { border-color: var(--line-2); background: #fbfcfd; color: var(--ink); }
.btn:active { transform: translateY(.5px); }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 1px 2px rgba(13, 92, 99, .25); }
.btn.primary:hover { background: var(--brand-2); border-color: var(--brand-2); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #eef1f4; color: var(--ink); }
.btn.sm { height: 27px; padding: 0 9px; font-size: 12px; border-radius: 7px; }
.btn.danger { color: var(--red); border-color: #f0d6d4; background: #fff; }
.btn.danger:hover { background: var(--red-soft); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn svg { flex: 0 0 auto; }

.icon-btn {
  width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent;
  display: grid; place-items: center; background: transparent; color: var(--ink-3); cursor: pointer;
}
.icon-btn:hover { background: #eef1f4; color: var(--ink); }

/* ============ cards ============ */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  box-shadow: var(--shadow-1); overflow: hidden;
}
.card + .card { margin-top: 16px; }
.card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
}
.card-head h3 { font-size: 13.5px; }
.card-head p { font-size: 12px; color: var(--ink-3); margin-top: 1px; }
.card-body { padding: 16px; }
.card-body.tight { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid.c2 { grid-template-columns: 1fr 1fr; }
.grid.c3 { grid-template-columns: repeat(3, 1fr); }
.grid.c4 { grid-template-columns: repeat(4, 1fr); }
.grid.side { grid-template-columns: 1.45fr 1fr; }
.grid.side-l { grid-template-columns: 320px 1fr; }

/* ============ KPI ============ */
.kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 13px 14px 12px; box-shadow: var(--shadow-1); position: relative; overflow: hidden;
}
.kpi::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: linear-gradient(90deg, var(--brand), transparent 70%); opacity: .55;
}
.kpi .k-label { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 5px; }
.kpi .k-value { font-size: 25px; font-weight: 630; letter-spacing: -0.02em; margin-top: 4px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .k-value small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.kpi .k-foot { font-size: 11px; color: var(--ink-3); margin-top: 5px; display: flex; gap: 6px; align-items: center; }
.kpi .k-foot .up { color: var(--green); font-weight: 600; }
.kpi .k-foot .warn { color: var(--amber); font-weight: 600; }

/* ============ badges ============ */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 7px;
  border-radius: 20px; font-size: 11px; font-weight: 560; border: 1px solid transparent; white-space: nowrap;
}
.badge.gray { background: #f2f4f7; color: var(--ink-2); border-color: #e7eaee; }
.badge.green { background: var(--green-soft); color: var(--green); border-color: #cfe9da; }
.badge.amber { background: var(--amber-soft); color: var(--amber); border-color: #f2e0c9; }
.badge.red { background: var(--red-soft); color: var(--red); border-color: #f2d5d3; }
.badge.blue { background: var(--blue-soft); color: var(--blue); border-color: #d8e2fa; }
.badge.teal { background: var(--brand-soft); color: var(--brand-2); border-color: var(--brand-line); }
.badge.purple { background: #f1ebfb; color: #6d4bbf; border-color: #e0d5f5; }
.badge.dot::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

.tier {
  display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: 0;
}
.tier.A { background: #0d5c63; color: #fff; }
.tier.B { background: #cfe4e4; color: #0a4747; }
.tier.C { background: #eef1f4; color: var(--ink-2); }

/* ============ table ============ */
.table-wrap { overflow: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 12.5px; }
table.tb th {
  text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink-3); padding: 9px 14px; background: var(--surface-2);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; white-space: nowrap;
}
table.tb td { padding: 11px 14px; border-bottom: 1px solid #f1f3f6; vertical-align: middle; }
table.tb tr:last-child td { border-bottom: none; }
table.tb tbody tr { transition: background .12s; }
table.tb tbody tr.clickable { cursor: pointer; }
table.tb tbody tr.clickable:hover { background: #f8fafb; }
table.tb .num { font-variant-numeric: tabular-nums; }
.cell-main { font-weight: 560; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--ink-3); }
.row-actions { display: flex; gap: 4px; justify-content: flex-end; opacity: .35; transition: opacity .12s; }
tr:hover .row-actions { opacity: 1; }

/* ============ toolbar ============ */
.toolbar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.search {
  display: flex; align-items: center; gap: 7px; height: 32px; padding: 0 10px;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: 8px; min-width: 240px;
}
.search input { border: 0; outline: 0; background: transparent; font-size: 12.5px; width: 100%; color: var(--ink); font-family: inherit; }
.search svg { color: var(--ink-3); flex: 0 0 auto; }
select.sel, input.inp {
  height: 32px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 12.5px; padding: 0 9px; color: var(--ink-2); font-family: inherit; outline: none;
}
select.sel:focus, input.inp:focus, textarea.inp:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 92, 99, .1); }
textarea.inp {
  width: 100%; border-radius: 8px; border: 1px solid var(--line-2); padding: 10px 12px;
  font-family: inherit; font-size: 13px; line-height: 1.7; color: var(--ink); outline: none; resize: vertical; background: var(--surface);
}

/* ============ funnel & charts ============ */
.funnel { display: flex; flex-direction: column; gap: 7px; }
.funnel-row { display: grid; grid-template-columns: 74px 1fr 54px; align-items: center; gap: 10px; font-size: 12px; }
.funnel-row .fl { color: var(--ink-2); }
.funnel-bar { height: 22px; background: #f2f4f7; border-radius: 5px; overflow: hidden; }
.funnel-fill { height: 100%; border-radius: 5px; background: linear-gradient(90deg, #0d5c63, #2b8b86); transition: width .5s cubic-bezier(.2,.8,.2,1); }
.funnel-row .fv { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }

.bars { display: flex; align-items: flex-end; gap: 10px; height: 132px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.bar-col .b { width: 100%; max-width: 46px; background: linear-gradient(180deg, #2b8b86, #0d5c63); border-radius: 4px 4px 2px 2px; min-height: 3px; transition: height .5s; }
.bar-col .bl { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.bar-col .bv { font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }

.spark { width: 100%; height: 34px; display: block; }

/* ============ score ============ */
.score { display: flex; align-items: center; gap: 10px; }
.ring { position: relative; flex: 0 0 auto; }
.ring svg { transform: rotate(-90deg); display: block; }
.ring .ring-val {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 640; font-variant-numeric: tabular-nums;
}
.meter { height: 5px; border-radius: 4px; background: #eef1f4; overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 4px; }

/* ============ drawer ============ */
.scrim {
  position: fixed; inset: 0; background: rgba(16, 24, 40, .32); opacity: 0; pointer-events: none;
  transition: opacity .2s; z-index: 60; backdrop-filter: blur(1.5px);
}
.scrim.on { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(720px, 92vw);
  background: var(--surface); z-index: 61; box-shadow: var(--shadow-3);
  transform: translateX(102%); transition: transform .26s cubic-bezier(.32,.72,0,1);
  display: flex; flex-direction: column;
}
.drawer.on { transform: none; }
.drawer-head {
  padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: flex-start; gap: 12px;
}
.drawer-head .dh-main { flex: 1; min-width: 0; }
.drawer-head h2 { font-size: 16px; }
.drawer-head p { font-size: 12px; color: var(--ink-3); margin-top: 3px; }
.drawer-body { padding: 18px 20px 40px; overflow-y: auto; flex: 1; }

/* ============ modal ============ */
.modal-wrap {
  position: fixed; inset: 0; z-index: 80; display: grid; place-items: center;
  background: rgba(16, 24, 40, .4); padding: 24px; animation: fade .16s ease;
}
.modal {
  width: min(600px, 100%); background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-3);
  max-height: 88vh; display: flex; flex-direction: column; animation: pop .2s cubic-bezier(.2,.8,.2,1);
}
.modal-head { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-head h3 { font-size: 14.5px; }
.modal-body { padding: 18px; overflow-y: auto; }
.modal-foot { padding: 13px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; background: var(--surface-2); border-radius: 0 0 14px 14px; }
@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.985) } }

/* ============ form ============ */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12px; font-weight: 560; color: var(--ink-2); margin-bottom: 5px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.field .inp, .field .sel { width: 100%; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tab {
  padding: 8px 11px; font-size: 12.5px; color: var(--ink-3); cursor: pointer; border: 0; background: none;
  border-bottom: 2px solid transparent; margin-bottom: -1px; font-weight: 540;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--brand-2); border-bottom-color: var(--brand); font-weight: 600; }

.chip-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 20px;
  background: #f2f4f7; font-size: 11.5px; color: var(--ink-2); border: 1px solid #e9ecf0;
}
.chip.sel { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-2); font-weight: 560; }
.chip-btn { cursor: pointer; }
.chip-btn:hover { border-color: var(--line-2); }

/* ============ letter doc ============ */
.doc {
  font-family: "Iowan Old Style", "Palatino Linotype", Georgia, "Songti SC", serif;
  font-size: 13.5px; line-height: 1.78; white-space: pre-wrap; color: #1b2530;
  background: #fdfdfc; border: 1px solid #eceee9; border-radius: 10px; padding: 20px 22px;
  max-height: 460px; overflow-y: auto;
}
.doc-subject {
  font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--ink);
  padding: 9px 12px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px;
  display: flex; gap: 8px;
}
.doc-subject span { color: var(--ink-3); font-weight: 500; flex: 0 0 auto; }
.version-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.version-card { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--surface); }
.version-card.active { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(13, 92, 99, .09); }
.version-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.version-body { padding: 14px; }

/* ============ misc ============ */
.empty {
  text-align: center; padding: 46px 20px; color: var(--ink-3); font-size: 12.5px;
}
.empty .ico { width: 40px; height: 40px; margin: 0 auto 10px; display: grid; place-items: center; border-radius: 12px; background: #f2f4f7; color: var(--ink-3); }
.empty strong { display: block; color: var(--ink-2); font-size: 13px; margin-bottom: 3px; font-weight: 560; }

.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding: 0 0 14px 0; font-size: 12.5px; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 5px; width: 7px; height: 7px; border-radius: 50%;
  background: #fff; border: 1.5px solid var(--line-2);
}
.tl-item.t-data::before { border-color: #7aa9c4; }
.tl-item.t-match::before { border-color: #b9a26b; }
.tl-item.t-letter::before { border-color: #2b8b86; }
.tl-item.t-review::before { border-color: #7a8fbf; }
.tl-item.t-send::before { border-color: #19704a; }
.tl-item .tl-at { font-size: 11px; color: var(--ink-3); margin-top: 1px; }

.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 12.5px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; color: var(--ink); }
.section-title {
  font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3);
  font-weight: 620; margin: 18px 0 9px;
}
.section-title:first-child { margin-top: 0; }

.list-plain { display: flex; flex-direction: column; gap: 9px; }
.pain-item { display: flex; gap: 9px; font-size: 12.5px; line-height: 1.6; }
.pain-item .idx {
  flex: 0 0 auto; width: 17px; height: 17px; border-radius: 5px; background: var(--amber-soft);
  color: var(--amber); font-size: 10.5px; font-weight: 700; display: grid; place-items: center; margin-top: 1px;
}
.source-row { display: flex; align-items: center; gap: 8px; font-size: 12px; padding: 7px 0; border-bottom: 1px dashed var(--line); }
.source-row:last-child { border-bottom: 0; }

.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: #101828; color: #fff; padding: 9px 14px; border-radius: 9px; font-size: 12.5px;
  box-shadow: var(--shadow-2); animation: rise .22s ease; max-width: 520px;
}
.toast.err { background: #8f2f2a; }
.toast.ok { background: #135c43; }
@keyframes rise { from { opacity: 0; transform: translateY(8px) } }

.spinner {
  width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff; animation: spin .7s linear infinite; display: inline-block;
}
.spinner.dark { border-color: rgba(13,92,99,.2); border-top-color: var(--brand); }
@keyframes spin { to { transform: rotate(360deg) } }

.skeleton { background: linear-gradient(90deg, #f2f4f7 25%, #f8fafb 37%, #f2f4f7 63%); background-size: 400% 100%; animation: sk 1.3s ease infinite; border-radius: 6px; }
@keyframes sk { 0% { background-position: 100% 50% } 100% { background-position: 0 50% } }

.loading-block { display: flex; flex-direction: column; gap: 10px; padding: 40px; align-items: center; color: var(--ink-3); font-size: 12.5px; }

.hr { height: 1px; background: var(--line); margin: 14px 0; border: 0; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 8px; }
.flex.between { justify-content: space-between; }
.mt8 { margin-top: 8px; } .mt12 { margin-top: 12px; } .mt16 { margin-top: 16px; }
.right { text-align: right; }
.grow { flex: 1; }

.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.heat i { display: block; height: 26px; border-radius: 3px; background: #f2f4f7; }

@media (max-width: 1180px) {
  .kpi-row { grid-template-columns: repeat(3, 1fr); }
  .grid.side, .grid.side-l, .grid.c3, .grid.c4 { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .view, .topbar { padding-left: 16px; padding-right: 16px; }
  .kpi-row { grid-template-columns: repeat(2, 1fr); }
  /* v2.22.0 手机端：顶部一排操作按钮改为换行，消除整页横向溢出 */
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar-actions { flex-wrap: wrap; width: 100%; }
}

/* ============ utilities ============ */
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.hint { font-size: 12.5px; color: var(--ink-3); line-height: 1.55; }
.spinner {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin .7s linear infinite; vertical-align: -1px; margin-right: 4px;
}
.spinner.dark { color: var(--ink-2); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============ 客户开发（AI 挖掘 / 名片扫描） ============ */
.card-drop {
  border: 1.5px dashed var(--line); border-radius: var(--r); padding: 22px 16px;
  display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px;
  transition: border-color .2s, background .2s; background: var(--bg, #fafbfc);
}
.card-drop.dragover { border-color: var(--brand); background: var(--brand-soft); }
.empty-ico {
  width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center;
  background: var(--brand-soft); color: var(--brand-2); margin-bottom: 4px;
}
.lead-row {
  display: flex; gap: 10px; padding: 11px 12px; border: 1px solid var(--line);
  border-radius: 10px; margin-bottom: 8px; cursor: pointer; align-items: flex-start;
  transition: border-color .15s, background .15s;
}
.lead-row:hover { border-color: var(--brand); background: var(--brand-soft); }
.lead-row input { margin-top: 3px; accent-color: var(--brand); }
.lead-main { flex: 1; min-width: 0; }
.lead-main strong { font-size: 13.5px; }

/* ============ roadmap（预留模块） ============ */
.rm-phase {
  display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface);
}
.rm-phase + .rm-phase { margin-top: 10px; }
.rm-idx {
  flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; background: var(--brand-soft); color: var(--brand-2);
}
.rm-body h4 { font-size: 13.5px; margin: 0 0 3px; display: flex; align-items: center; gap: 8px; }
.rm-body p { margin: 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.6; }

.link { color: var(--brand-2); text-decoration: underline; text-underline-offset: 2px; }
.link:hover { color: var(--brand); }

/* ============ 小尺寸按钮 / 删除态 / 关键词单元格 ============ */
.btn.sm { height: 26px; padding: 0 9px; font-size: 11.8px; border-radius: 7px; gap: 4px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn.ghost:hover { background: #eef1f4; color: var(--ink); }
.btn.ghost.danger, .btn.danger.ghost { color: var(--red); }
.btn.ghost.danger:hover { background: var(--red-soft); }
.icon-btn.danger { color: #c07b76; }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }
.kw-cell { display: flex; gap: 4px; flex-wrap: nowrap; overflow: hidden; }
.kw-cell .chip { height: 21px; padding: 0 7px; font-size: 11px; max-width: 78px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; line-height: 19px; }
.chip.muted { color: var(--ink-3); background: #f7f8fa; }

/* 开关按钮禁用态 */
.chip-btn:disabled, .btn:disabled { opacity: .55; cursor: wait; }

/* ============ v1.7.0 登录页 / 多用户 ============ */
.login-screen {
  display: flex; align-items: center; justify-content: center;
  position: fixed; inset: 0; z-index: 200;
  background:
    radial-gradient(1200px 500px at 20% -10%, #e8f2f2 0%, transparent 60%),
    radial-gradient(900px 420px at 100% 110%, #edf2fd 0%, transparent 55%),
    var(--bg);
}
.login-card {
  width: min(380px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-3); padding: 30px 28px 22px;
  display: flex; flex-direction: column; gap: 14px;
}
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 6px; }
.login-brand strong { font-size: 19px; letter-spacing: .2px; }
.login-brand span { font-size: 12px; color: var(--ink-3); }
.brand-mark.lg { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: var(--brand); }
.login-err { min-height: 17px; font-size: 12.3px; color: var(--red); text-align: center; }
.login-foot { margin-top: 4px; text-align: center; font-size: 11.5px; color: var(--ink-3); }

.topbar-user { flex: none; }
.user-chip {
  display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 5px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--surface);
  cursor: pointer; transition: border-color .15s, background .15s;
}
.user-chip:hover { border-color: var(--brand-line); background: var(--brand-soft); }
.user-avatar {
  width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: #fff; font-size: 12.5px; font-weight: 700; flex: none;
}
.user-meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.user-meta strong { font-size: 12.5px; color: var(--ink); }
.user-meta em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }

.role-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; margin-right: 6px; vertical-align: 1px; }
.role-dot.admin { background: var(--brand); }
.role-dot.sales { background: var(--blue); }
.role-dot.docs { background: var(--amber); }
.role-dot.viewer { background: var(--ink-3); }

/* ============ v2.0.0 搜索数据源说明条 ============ */
.warn-strip {
  padding: 10px 13px;
  margin-bottom: 14px;
  font-size: 12.3px;
  line-height: 1.65;
  color: var(--ink-2);
  background: var(--amber-soft, #fdf7e8);
  border: 1px solid #efdfc6;
  border-left: 3px solid var(--amber);
  border-radius: 8px;
}
.warn-strip strong { color: var(--ink); }

/* ============ v2.5.0 产品图库 ============ */
.pdp-media { flex: 0 0 176px; display: flex; flex-direction: column; gap: 8px; }
.pdp-stage {
  position: relative; width: 176px; height: 176px; border-radius: 12px; overflow: hidden;
  background: #f7f9fb; border: 1px solid var(--line); cursor: zoom-in;
}
.pdp-stage.empty {
  border: 1.5px dashed var(--line-2); cursor: pointer; background: var(--surface-2);
  display: flex; align-items: center; justify-content: center;
}
.pdp-stage.empty:hover { border-color: var(--brand); background: var(--brand-soft); }
.pdp-stage.drag { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 2px var(--brand-line); }
.pdp-stage img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pdp-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--ink-3); text-align: center; padding: 0 10px; }
.pdp-empty strong { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.pdp-empty span { font-size: 10.5px; line-height: 1.5; }
.pdp-thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.pdp-thumb {
  position: relative; width: 46px; height: 46px; border-radius: 8px; overflow: hidden;
  border: 1px solid var(--line); background: #f7f9fb; padding: 0; flex: none;
}
.pdp-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.pdp-flag {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 9px; text-align: center;
  background: rgba(13, 92, 99, .85); color: #fff; padding: 1px 0; line-height: 1.4;
}
.pdp-tbtn {
  position: absolute; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-family: inherit; opacity: 0; transition: opacity .15s, background .15s; padding: 0;
}
.pdp-thumb:hover .pdp-tbtn { opacity: 1; }
.pdp-del-btn { top: 0; right: 0; width: 16px; height: 16px; border-radius: 0 0 0 6px; background: rgba(16, 24, 40, .55); color: #fff; font-size: 11px; line-height: 1; }
.pdp-del-btn:hover { background: var(--red); }
.pdp-cover-btn { left: 0; right: 0; bottom: 0; height: 16px; background: rgba(16, 24, 40, .55); color: #fff; font-size: 9px; line-height: 1; }
.pdp-cover-btn:hover { background: var(--brand); }
.pdp-add {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border: 1.5px dashed var(--line-2); background: var(--surface-2); color: var(--ink-3);
  font-size: 10px; cursor: pointer; font-family: inherit;
}
.pdp-add:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-soft); }

/* 列表缩略图 */
.cell-prod { display: flex; gap: 10px; align-items: center; }
.row-thumb {
  width: 42px; height: 42px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--line); background: #f7f9fb; flex-shrink: 0;
}
.row-thumb.empty { display: flex; align-items: center; justify-content: center; color: var(--ink-3); }

/* v2.9.0 附件组件（推荐信抽屉 / 邮件撰写） */
.att-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.att-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.att-chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2, #f8fafc); font-size: 11.5px; color: var(--ink); max-width: 100%; }
.att-chip .att-name { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-chip em.k { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 5px; background: #e0e7ff; color: #4338ca; }
.att-chip em.k.q { background: #fef3c7; color: #92400e; }
.att-chip em.st { font-style: normal; font-size: 10px; padding: 1px 5px; border-radius: 5px; background: #fef9c3; color: #a16207; }
.att-chip em.st.ok { background: #dcfce7; color: #15803d; }
.att-chip em.st.bad { background: #fee2e2; color: #b91c1c; }
.att-chip.is-pending { border-color: #fcd34d; }
.att-chip.is-rejected { border-color: #fca5a5; }
.att-x { border: 0; background: transparent; color: var(--ink-3); cursor: pointer; font-size: 15px; line-height: 1; padding: 0 1px; display: inline-flex; align-items: center; }
.att-x:hover { color: var(--red, #dc2626); }
.att-x.att-view { font-size: 12px; margin-left: 2px; }
.att-x.att-view:hover { color: var(--blue, #2563eb); }
.att-mailname { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; font: inherit; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.att-mailname:hover { color: var(--blue, #2563eb); }

/* 联系人邮箱：点一下直接用邮件中心写邮件（v2.13.2） */
/* 审核抽屉里点客户名 → 快速查看客户资料（v2.14.1） */
.cust-link { border: 0; background: transparent; color: inherit; cursor: pointer; padding: 0; font: inherit; font-size: inherit; font-weight: inherit; text-decoration: underline dotted; text-underline-offset: 4px; }
.cust-link:hover { color: var(--teal, #0e7c7b); text-decoration-style: solid; }
.em-link { border: 0; background: transparent; color: var(--teal, #0e7c7b); cursor: pointer; padding: 0; font: inherit; text-decoration: none; text-align: left; }
.em-link:hover { color: var(--brand); text-decoration: underline; text-underline-offset: 2px; }
/* WhatsApp 直链：绿色是 WhatsApp 的品牌色，一眼区分「能直接聊」和邮箱 */
.wa-link { color: #128c7e; text-decoration: none; font-weight: 600; }
.wa-link:hover { text-decoration: underline; text-underline-offset: 2px; }

/* 匹配设置：可点选的 chip（v2.14.0） */
.chip-btn { cursor: pointer; border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; }
.chip-btn:hover { border-color: var(--brand-2); color: var(--brand); }
.chip-btn.chip-on { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand); font-weight: 600; }

/* 规格书产品多选 */
.sp-list { max-height: 48vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.sp-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; cursor: pointer; border-bottom: 1px solid var(--line); }
.sp-row:last-child { border-bottom: 0; }
.sp-row:hover { background: var(--surface-2, #f8fafc); }
.sp-row.on { background: #eef4fb; }
.sp-row input { width: 14px; height: 14px; accent-color: #2563eb; }
.sp-row img { width: 38px; height: 38px; object-fit: contain; border-radius: 6px; border: 1px solid var(--line); background: #fff; flex: 0 0 auto; }
.sp-noimg { width: 38px; height: 38px; border-radius: 6px; border: 1px dashed var(--line); flex: 0 0 auto; }
.sp-meta { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sp-name { font-size: 12.5px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sp-sub { font-size: 11px; color: var(--ink-3); }

/* 报价单方案列表 */
.qp-list { max-height: 44vh; overflow: auto; border: 1px solid var(--line); border-radius: 10px; }
.qp-row { display: flex; align-items: center; gap: 10px; padding: 9px 11px; cursor: pointer; border-bottom: 1px solid var(--line); }
.qp-row:last-child { border-bottom: 0; }
.qp-row:hover { background: var(--surface-2, #f8fafc); }
.qp-row.on { background: #eef4fb; }
.qp-row input { accent-color: #2563eb; }
.qp-meta { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.qp-name { font-size: 12.5px; color: var(--ink); }
.qp-sub { font-size: 11px; color: var(--ink-3); }
.qp-price { font-size: 12.5px; color: var(--ink); font-variant-numeric: tabular-nums; }

/* v2.10.0 邮件中心（邮箱客户端三栏） */
.mailclient { display: grid; grid-template-columns: 216px minmax(300px, 1fr) minmax(320px, 1.15fr); gap: 14px; align-items: start; }
.mailclient-nav, .mailclient-list, .mailclient-view { min-height: 480px; }
.mailclient-nav { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; padding: 10px 8px; display: flex; flex-direction: column; gap: 2px; }
.mailnav-sec + .mailnav-sec { margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--line); }
.mailnav-title { font-size: 10.5px; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; padding: 4px 8px; text-transform: uppercase; }
.mailnav-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 7px 8px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; font-family: inherit; }
.mailnav-item:hover { background: #f4f6f8; }
.mailnav-item.on { background: var(--brand-soft, #e8f1f8); color: var(--brand-2, #0d5c63); font-weight: 560; }
.mailnav-item em { margin-left: auto; font-style: normal; font-size: 10.5px; background: #eef1f4; color: var(--ink-3); border-radius: 16px; padding: 0 6px; min-width: 16px; text-align: center; }
.mailnav-item.on em { background: rgba(13, 92, 99, .14); color: var(--brand-2, #0d5c63); }
.mailnav-ava { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: #e3eef7; color: #1d5f8a; font-size: 11px; font-weight: 600; flex: none; }
.mailnav-utext { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.mailnav-utext b { font-size: 11.5px; font-weight: 560; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailnav-utext i { font-style: normal; font-size: 10px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailnav-hint { font-size: 10.5px; color: var(--ink-3); padding: 6px 8px; line-height: 1.5; }
.mailnav-foot { margin-top: auto; padding: 8px; border-top: 1px solid var(--line); }
.mailclient-list { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mailbar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.mailbar-q { flex: 1; font-size: 12.5px; padding: 6px 10px; }
.mailbar-count { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.maillist { overflow-y: auto; max-height: 66vh; }
.mailrow { display: block; width: 100%; text-align: left; background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: 10px 12px; cursor: pointer; font-family: inherit; }
.mailrow:hover { background: #f7f9fb; }
.mailrow.on { background: var(--brand-soft, #e8f1f8); }
.mailrow-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mailrow-from { font-size: 12.5px; font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailrow.unread .mailrow-from::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--amber, #d97706); margin-right: 6px; vertical-align: 1px; }
.mailrow-time { font-size: 10.5px; color: var(--ink-3); flex: none; }
.mailrow-subject { display: flex; align-items: center; gap: 5px; margin-top: 3px; }
.mailrow-clip { color: var(--ink-3); display: grid; place-items: center; flex: none; }
.mailrow-stext { font-size: 12.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailrow-to { font-size: 11px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mailrow-meta { margin-top: 5px; }
.maillist-empty { padding: 30px 10px; }
.mailclient-view { background: var(--surface, #fff); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.mailview { display: flex; flex-direction: column; height: 100%; }
.mailview-empty { align-items: center; justify-content: center; padding: 40px 20px; }
.mailview-head { padding: 14px 16px 12px; border-bottom: 1px solid var(--line); }
.mailview-head h3 { margin: 0 0 10px; font-size: 15px; line-height: 1.45; color: var(--ink); }
.mailview-actors { display: flex; flex-direction: column; gap: 4px; }
.mailview-actors > div { display: flex; gap: 8px; font-size: 11.5px; align-items: baseline; }
.mailview-actors span { color: var(--ink-3); flex: none; width: 44px; }
.mailview-actors b { font-weight: 400; color: var(--ink-2); word-break: break-all; }
.mailview-ops { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.mailview-body { padding: 16px; font-size: 13px; line-height: 1.85; color: var(--ink); white-space: pre-wrap; word-break: break-word; overflow-y: auto; max-height: 46vh; }
@media (max-width: 1100px) { .mailclient { grid-template-columns: 180px 1fr; } .mailclient-view { grid-column: 1 / -1; } }

/* v2.18.0 规格书数据编辑抽屉 */
.se-sec { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 10px; background: var(--surface); }
.se-sec > summary { padding: 10px 14px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; list-style: none; color: var(--ink-2); }
.se-sec > summary::-webkit-details-marker { display: none; }
.se-sec > summary::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--ink-3); transition: transform .15s; }
.se-sec[open] > summary::before { transform: rotate(90deg); }
.se-sec[open] > summary { color: var(--ink); border-bottom: 1px solid var(--line); }
.se-b { padding: 12px 14px; }
.se-b .field { margin-bottom: 10px; }
.se-list .se-row .field { margin: 0; }
.se-add { margin-top: 2px; }

/* ============ v2.20.0 展会邀约 ============ */
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg > button { border: 0; background: transparent; padding: 6px 11px; font-size: 12px; color: var(--ink-2); cursor: pointer; border-right: 1px solid var(--line); white-space: nowrap; }
.seg > button:last-child { border-right: 0; }
.seg > button:hover { background: #f4f7fa; }
.seg > button.on { background: var(--blue, #2563eb); color: #fff; font-weight: 600; }
.expo-hero { background: linear-gradient(135deg, #ffffff 0%, #f3f8ff 58%, #eefaf6 100%); border: 1px solid #dce8f6; }
.expo-fact { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--ink-2); background: rgba(255,255,255,.85); border: 1px solid var(--line); border-radius: 7px; padding: 5px 9px; }
.expo-fact b { font-weight: 600; color: var(--ink-3); font-size: 10.5px; }
.expo-todo { font-style: normal; color: #b93a34; font-weight: 600; }
.expo-warn { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid #f3d2a8; background: #fff8ec; border-radius: 9px; font-size: 12px; color: #8a5b18; }
.expo-warn > svg { flex: 0 0 auto; color: #d68b1e; }
.expo-warn > div { flex: 1; line-height: 1.5; }
.expo-warn span { font-size: 11px; opacity: .85; }
.expo-stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 14px; }
.expo-stage { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: rgba(255,255,255,.7); }
.expo-stage.on { border-color: #9dc2f5; background: #eaf3ff; box-shadow: 0 0 0 2px rgba(37,99,235,.08); }
.expo-stage b { display: block; font-size: 11.5px; color: var(--ink); }
.expo-stage span { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 2px; line-height: 1.4; }
.expo-kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 14px; }
.expo-kpis .card-body { padding: 12px 14px; }
.expo-tbl td, .expo-tbl th { padding: 8px 10px; font-size: 12px; vertical-align: top; }
.expo-tbl .btn.sm { padding: 3px 6px; }
@media (max-width: 1100px) { .expo-kpis { grid-template-columns: repeat(3, 1fr); } .expo-stages { grid-template-columns: repeat(2, 1fr); } }

/* ---------- v2.21.0 多展会 / 多参展主体 / 宣传素材 / 富媒体邀约函 ---------- */
.expo-switch { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px dashed var(--line); }
.expo-def { font-style: normal; font-size: 10px; color: var(--blue, #2563eb); font-weight: 600; }
.expo-strip { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.expo-strip-item { position: relative; width: 156px; height: 64px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f7f9fc; flex: 0 0 auto; }
.expo-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.expo-strip-item span { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; color: #fff; background: rgba(20, 30, 45, .62); padding: 2px 6px; }
.expo-assets { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin: 10px 0 12px; max-height: 280px; overflow: auto; }
.expo-asset { border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: #fff; }
.expo-asset img { width: 100%; height: 88px; object-fit: cover; display: block; background: #f2f5f9; }
.expo-asset-meta { padding: 5px 7px; font-size: 10.5px; display: flex; gap: 5px; align-items: center; flex-wrap: wrap; }
.expo-ent-layout { display: grid; grid-template-columns: 265px 1fr; gap: 14px; margin-top: 12px; }
.expo-ent-list { border-right: 1px solid var(--line); padding-right: 12px; max-height: 520px; overflow: auto; }
.expo-ent-item { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 7px 8px; margin-bottom: 6px; font-size: 11.5px; cursor: pointer; flex-wrap: wrap; }
.expo-ent-item:hover { background: #f6f9fd; }
.expo-ent-item.on { border-color: #9dc2f5; background: #eaf3ff; }
.expo-ent-item .dot, .expo-ent-check .dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
.expo-ent-form { max-height: 520px; overflow: auto; padding-right: 6px; }
.expo-ent-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; margin: 8px 0 10px; }
.expo-ent-check { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 11.5px; flex-wrap: wrap; background: #fff; }
.expo-cat-checks { display: flex; gap: 10px; flex-wrap: wrap; font-size: 11.5px; margin-top: 4px; }
.expo-html-frame { width: 100%; height: 520px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
@media (max-width: 900px) { .expo-ent-layout { grid-template-columns: 1fr; } .expo-ent-list { border-right: 0; border-bottom: 1px solid var(--line); padding: 0 0 10px; max-height: 220px; } .expo-ent-form { max-height: none; } }

/* ============ v2.22.0 名片扫码 / 手机现场录入 ============ */
.cd-status { display: flex; flex-direction: column; gap: 3px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; margin-bottom: 12px; font-size: 12px; line-height: 1.5; background: var(--surface-2); }
.cd-status.ok { border-color: #9dc2a5; color: var(--green); }
.cd-status.warn { border-color: #e8d2a0; color: #8a5a00; }
.cd-status a { color: var(--brand); text-decoration: underline; }
.cd-sub { color: #888; font-size: 11.5px; }
.cd-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 12px; }
.cd-ok { color: var(--green); font-size: 12.5px; margin-bottom: 10px; }
.cd-queue { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 12.5px; }
.cd-queue-list { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.cd-chip { border: 1px solid var(--line); border-radius: 20px; padding: 3px 9px; font-size: 11.5px; background: var(--surface-2); }
@media (max-width: 700px) {
  .modal-wrap { padding: 8px; }
  .modal-body { padding: 14px; }
  .cd-actions .btn { flex: 1 1 100%; justify-content: center; min-height: 46px; font-size: 14px; }
  #cd-form .field-row { grid-template-columns: 1fr; gap: 8px; }
  #cd-form .inp { font-size: 16px; padding: 10px 11px; }
  .modal-foot .btn { min-height: 44px; }
  #cd-preview { max-height: 160px; }
}

/* ============ v2.22.0 PWA 安装引导 ============ */
.pwa-tip { position: fixed; right: 18px; bottom: 18px; z-index: 1200; width: min(360px, calc(100vw - 32px)); border: 1px solid var(--line); border-radius: 12px; background: var(--surface, #fff); box-shadow: var(--shadow-3, 0 8px 30px rgba(0,0,0,.14)); padding: 14px 16px; font-size: 12.5px; line-height: 1.6; }
@media (max-width: 700px) { .pwa-tip { right: 12px; left: 12px; bottom: 12px; width: auto; } }
.pwa-tip strong { font-size: 13px; }
.pwa-tip .pwa-x { position: absolute; right: 8px; top: 6px; border: 0; background: none; cursor: pointer; font-size: 16px; color: #888; }
.pwa-tip .btn { min-height: 38px; }
.pwa-steps { color: var(--ink-2, #475467); margin-top: 6px; }

/* ============ v2.23.0 展会邀约自动化 ============ */
.expo-auto-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin-top: 12px; }
.expo-auto-stats > div { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: var(--surface-2); }
.expo-auto-stats span { display: block; font-size: 11px; color: var(--ink-3); }
.expo-auto-stats b { font-size: 19px; color: var(--ink); }
#af-steps { overflow-x: auto; }
.expo-auto-step { display: grid; grid-template-columns: 28px minmax(150px, 2fr) 76px 116px 116px 58px 30px; gap: 6px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; background: var(--surface-2); min-width: 660px; }
.expo-auto-step .inp, .expo-auto-step .sel { font-size: 12px; padding: 5px 7px; min-height: 30px; width: 100%; box-sizing: border-box; }
.expo-auto-step .chip { min-height: 30px; display: inline-flex; align-items: center; justify-content: center; }
.expo-auto-step .btn { padding: 4px 6px; }
.expo-auto-guard { border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 9px; padding: 9px 12px; font-size: 12px; line-height: 1.65; margin-top: 10px; background: var(--amber-soft); }
.expo-auto-guard.ok { border-left-color: var(--green); background: var(--green-soft); }
.expo-auto-handoff { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); font-size: 12px; }
.expo-auto-handoff:last-child { border-bottom: 0; }
.expo-auto-handoff .hint { margin: 2px 0 0; }
@media (max-width: 900px) { .expo-auto-stats { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .expo-auto-stats { grid-template-columns: repeat(2, 1fr); } .expo-auto-handoff { flex-direction: column; } }

/* ============ v2.25.0 智能客服 · 统一收件箱 ============ */
.inbox-wrap { display: grid; grid-template-columns: 292px minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.inbox-wrap > * { min-width: 0; }
.inbox-main > .card, .inbox-left.card, .inbox-side > .card { margin-bottom: 12px; }
.inbox-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 5px; margin-bottom: 9px; }
.inbox-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 2px; text-align: center; }
.inbox-stats b { display: block; font-size: 15px; line-height: 1.2; color: var(--ink); }
.inbox-stats span { font-size: 10px; color: var(--ink-3); white-space: nowrap; }
.inbox-listbar { margin-bottom: 8px; }
.inbox-listbar .inp { width: 100%; font-size: 12px; }
.inbox-folders { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
.inbox-folders .chip { height: 23px; padding: 0 8px; font-size: 11px; cursor: pointer; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.inbox-folders .chip:hover { border-color: var(--line-2); }
.inbox-folders .chip.on { background: var(--brand-soft); border-color: var(--brand-line); color: var(--brand-2); font-weight: 600; }
.inbox-threads { max-height: calc(100vh - 300px); min-height: 220px; overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.inbox-row { display: block; width: 100%; text-align: left; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 8px 9px; margin-bottom: 6px; cursor: pointer; color: var(--ink); }
.inbox-row:hover { border-color: var(--brand-line); background: var(--surface-2); }
.inbox-row.on { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.inbox-row.unread { border-left: 3px solid var(--brand); }
.inbox-row-top { display: flex; justify-content: space-between; gap: 6px; align-items: center; }
.inbox-row-from { font-size: 12.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row-time { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; display: flex; align-items: center; gap: 4px; }
.inbox-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--red); }
.inbox-row-sub { font-size: 12px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row-snip { font-size: 11px; color: var(--ink-3); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-row-foot { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; align-items: center; }
.inbox-row-foot .badge { font-size: 10px; padding: 1px 6px; }
.inbox-mini { font-size: 10px; color: var(--ink-3); }
.inbox-mini.blue { color: var(--blue); }
.inbox-empty { padding: 14px 0; }
.inbox-empty .empty { padding: 18px 8px; }
.inbox-head-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.inbox-head-btns { display: flex; gap: 5px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.inbox-cust-line { margin-top: 8px; font-size: 12px; color: var(--ink-2); border-top: 1px dashed var(--line); padding-top: 8px; }
.inbox-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.inbox-sec-head strong { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
.inbox-msg { border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; margin-bottom: 8px; background: var(--surface-2); }
.inbox-msg.out { background: var(--brand-soft); border-color: var(--brand-line); }
.inbox-msg-head { display: flex; align-items: center; gap: 8px; }
.inbox-ava { width: 26px; height: 26px; border-radius: 50%; background: var(--brand); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; flex-shrink: 0; }
.inbox-ava.me { background: var(--ink-2); }
.inbox-msg-who { min-width: 0; flex: 1; line-height: 1.3; }
.inbox-msg-who b { font-size: 12px; }
.inbox-msg-who span { display: block; font-size: 10.5px; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inbox-msg-time { font-size: 10.5px; color: var(--ink-3); white-space: nowrap; }
.inbox-msg-sub { font-size: 12px; font-weight: 600; margin: 7px 0 4px; }
.inbox-msg-body { font-size: 12.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.inbox-msg-note { font-size: 11px; color: var(--amber); margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 5px; }
.inbox-ai-empty { font-size: 12px; color: var(--ink-3); line-height: 1.7; padding: 10px; background: var(--surface-2); border-radius: 8px; }
.inbox-ai-line { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 8px; }
.inbox-ai-text { font-size: 12.5px; line-height: 1.75; margin: 0 0 8px; color: var(--ink-2); }
.inbox-ai-points { margin: 0 0 8px; padding-left: 18px; font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.inbox-ai-next { font-size: 12px; background: var(--blue-soft); border-left: 3px solid var(--blue); border-radius: 6px; padding: 7px 9px; color: var(--ink-2); }
.inbox-warn { font-size: 11.5px; line-height: 1.6; background: var(--amber-soft); border-left: 3px solid var(--amber); border-radius: 6px; padding: 7px 9px; margin-top: 8px; color: var(--ink-2); }
.inbox-form-row { display: grid; grid-template-columns: 110px 110px minmax(0, 1fr); gap: 10px; }
.inbox-form-row .field { min-width: 0; }
.inbox-body { resize: vertical; font-size: 12.5px; line-height: 1.7; min-height: 170px; }
.inbox-quality { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 7px 0; }
.inbox-editor-foot { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-top: 9px; }
.inbox-send-note { margin-top: 9px; font-size: 12px; border-radius: 7px; padding: 7px 9px; }
.inbox-send-note.ok { background: var(--green-soft); color: var(--green); }
.inbox-send-note.err { background: var(--red-soft); color: var(--red); }
.inbox-cust-name { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.inbox-tags { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.inbox-link { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11.5px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; margin-bottom: 10px; }
.inbox-block { border-top: 1px solid var(--line); padding-top: 9px; margin-top: 9px; }
.inbox-block > label { display: block; font-size: 10.5px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .4px; margin-bottom: 5px; }
.inbox-block p, .inbox-block li { font-size: 11.5px; line-height: 1.65; color: var(--ink-2); margin: 0 0 4px; }
.inbox-block ul { padding-left: 16px; margin: 0; }
.inbox-match { border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; margin-bottom: 6px; background: var(--surface-2); }
.inbox-match b { font-size: 11.5px; }
.inbox-match p { margin: 3px 0 0; }
.inbox-combo { display: flex; gap: 5px; }
.inbox-evi { font-size: 11px; color: var(--ink-3); }
.inbox-contact { font-size: 11.5px; line-height: 1.55; border-bottom: 1px dashed var(--line); padding: 4px 0; color: var(--ink-2); }
.inbox-contact:last-child { border-bottom: 0; }
.inbox-confirm { font-size: 12.5px; line-height: 1.9; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; }
.inbox-preview { font-size: 11.5px; line-height: 1.7; white-space: pre-wrap; word-break: break-word; max-height: 150px; overflow-y: auto; border: 1px solid var(--line); border-radius: 8px; padding: 9px 11px; margin: 9px 0; color: var(--ink-2); background: var(--surface); }
@media (max-width: 1280px) { .inbox-wrap { grid-template-columns: 260px minmax(0, 1fr); } .inbox-side { grid-column: 1 / -1; } }
@media (max-width: 860px) { .inbox-wrap { grid-template-columns: minmax(0, 1fr); } .inbox-side { grid-column: auto; } .inbox-threads { max-height: 320px; } .inbox-form-row { grid-template-columns: 1fr 1fr; } .inbox-form-row .grow { grid-column: 1 / -1; } }
@media (max-width: 560px) { .inbox-form-row { grid-template-columns: 1fr; } .inbox-stats { grid-template-columns: repeat(3, 1fr); } .inbox-head-top { flex-direction: column; } .inbox-head h2, .inbox-msg-sub { overflow-wrap: anywhere; word-break: break-word; } .inbox-msg-head { flex-wrap: wrap; } .inbox-msg-time { white-space: normal; } .inbox-row-time { flex-shrink: 0; } }

/* v2.26.0 智能客服中心：统计 / 四环节页签 / 链路说明 / 会话快捷入口 */
.svc-shell { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.svc-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.svc-stat { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; text-align: left; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; cursor: pointer; }
.svc-stat:hover { border-color: var(--brand-line); background: var(--surface-2); }
.svc-stat b { font-size: 19px; line-height: 1.15; color: var(--ink); }
.svc-stat span { font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.svc-tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.svc-tab { display: inline-flex; align-items: center; gap: 7px; height: 36px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-2); cursor: pointer; font-size: 12.5px; white-space: nowrap; }
.svc-tab:hover { border-color: var(--brand-line); }
.svc-tab.on { background: var(--brand-soft); border-color: var(--brand); color: var(--brand-2); font-weight: 600; }
.svc-step { font-size: 10px; font-weight: 700; opacity: .65; letter-spacing: .5px; }
.svc-chain { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; }
.svc-chain-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.svc-chain-desc { font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.svc-chain-rel { font-size: 11.5px; line-height: 1.6; color: var(--ink-3); }
.svc-chain-btns { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.svc-body { min-width: 0; }
.svc-body > * { min-width: 0; }
.svc-quick { display: flex; gap: 5px; flex-wrap: wrap; margin: 8px 0 10px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); }
.svc-quick .btn { font-size: 11.5px; }
@media (max-width: 860px) { .svc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 560px) { .svc-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } .svc-tabs { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; } .svc-tab { flex: 0 0 auto; } .svc-chain { flex-direction: column; } .svc-chain-btns { width: 100%; } }

/* ============ v2.27.0 邮件档案 ↔ 会话工作台同源 / WhatsApp 接入 / 客户沟通时间线 ============ */
.mail-linked-bar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: 10px; padding: 9px 12px; margin-bottom: 10px; color: var(--brand-2); }
.mail-linked-bar b { font-size: 12.5px; white-space: nowrap; }
.mail-linked-bar span { flex: 1; min-width: 220px; line-height: 1.6; font-size: 11.8px; color: var(--ink-2); }
.mail-linked-bar .btn { flex: 0 0 auto; }

.wa-wrap { min-width: 0; }
.wa-panel { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; min-width: 0; }
.wa-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.wa-stat-main { display: flex; flex-direction: column; gap: 5px; min-width: 170px; }
.wa-stat-main strong { font-size: 16px; }
.wa-stat-cells { display: flex; gap: 18px; flex-wrap: wrap; }
.wa-stat-cells > div { display: flex; flex-direction: column; gap: 2px; }
.wa-stat-cells b { font-size: 18px; line-height: 1.2; color: var(--ink); }
.wa-stat-cells span { font-size: 11px; color: var(--ink-3); }
.wa-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.wa-body { display: grid; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); gap: 18px; padding: 18px; align-items: start; }
.wa-qr-box { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 280px; padding: 18px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-2); text-align: center; min-width: 0; }
.wa-qr { width: 240px; height: 240px; max-width: 100%; image-rendering: pixelated; border: 8px solid #fff; border-radius: 8px; background: #fff; }
.wa-qr-tip { font-size: 12.5px; font-weight: 600; line-height: 1.7; color: var(--ink-2); }
.wa-qr-tip span { display: block; font-weight: 400; font-size: 11.5px; color: var(--ink-3); }
.wa-qr-msg { color: var(--ink-3); }
.wa-qr-msg b { font-size: 14px; color: var(--ink); }
.wa-qr-msg p { margin: 0; font-size: 12px; line-height: 1.7; max-width: 290px; }
.wa-qr-msg code { font-size: 11px; background: var(--surface); padding: 1px 5px; border-radius: 4px; }
.wa-qr-ok { color: #19704a; }
.wa-qr-ok b { color: #19704a; }
.wa-steps { min-width: 0; }
.wa-steps ol { margin: 0; padding-left: 18px; }
.wa-steps li { font-size: 12.5px; line-height: 1.85; color: var(--ink-2); margin-bottom: 7px; }
.wa-steps li b { color: var(--ink); }
.wa-steps code { font-size: 11px; background: var(--surface-2); padding: 1px 5px; border-radius: 4px; }
.wa-note { margin-top: 12px; padding: 9px 11px; border-radius: 8px; background: var(--amber-soft); font-size: 11.8px; line-height: 1.7; color: var(--ink-2); display: flex; gap: 7px; align-items: flex-start; }

.comm-bar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.comm-kpis { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.comm-bar .btn { margin-left: auto; }
.comm-timeline { position: relative; padding-left: 16px; min-width: 0; }
.comm-timeline::before { content: ''; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 2px; background: var(--line-2); }
.comm-row { position: relative; padding: 0 0 13px 6px; min-width: 0; }
.comm-dot { position: absolute; left: -16px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--brand-line); }
.comm-row.out .comm-dot { background: var(--ink-3); box-shadow: 0 0 0 1px var(--line-2); }
.comm-main { background: var(--surface-2); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; min-width: 0; }
.comm-snip { font-size: 12px; line-height: 1.65; color: var(--ink-2); margin-top: 5px; overflow-wrap: anywhere; }
.comm-main .hint { overflow-wrap: anywhere; }

/* ---------- v2.30.0 订单全链路管控 ---------- */
.ord-board { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 14px; }
.ord-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ord-stats > div { background: var(--surface-2); border-radius: var(--r-sm); padding: 9px 11px; min-width: 0; }
.ord-stats label { display: block; font-size: 11.5px; color: var(--ink-3); margin-bottom: 3px; }
.ord-stats b { font-size: 18px; font-weight: 560; color: var(--ink); font-variant-numeric: tabular-nums; }
.ord-steps { display: flex; align-items: stretch; gap: 4px; flex-wrap: wrap; }
.ord-step { flex: 1 1 90px; min-width: 82px; display: flex; flex-direction: column; gap: 2px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 9px; cursor: pointer; text-align: left; transition: border-color .12s, background .12s; }
.ord-step:hover { border-color: var(--brand-line); }
.ord-step.on { border-color: var(--brand); background: var(--brand-soft); }
.ord-step-no { font-size: 10px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.ord-step b { font-size: 12px; font-weight: 560; color: var(--ink); white-space: nowrap; }
.ord-step-n { font-size: 11px; color: var(--ink-3); }
.ord-arrow { align-self: center; color: var(--ink-3); font-size: 15px; }
.ord-form .field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.ord-form .field-row > .field { flex: 1 1 180px; min-width: 0; }
.ord-lines { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 14px; min-width: 0; }
.ord-lines .inp, .ord-lines .sel { padding: 6px 8px; font-size: 12px; }
.ord-lines .cell-sub { font-size: 10.5px; }
.ord-warn-num { color: var(--amber); font-weight: 560; text-align: right; }
.ord-track { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 10px; }
.ord-track-step { flex: 1 1 78px; min-width: 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; text-align: center; opacity: .5; }
.ord-track-step.done, .ord-track-step.cur { opacity: 1; }
.ord-track-step.cur b { color: var(--brand); }
.ord-track-no { width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line-2); background: var(--surface); font-size: 10px; display: flex; align-items: center; justify-content: center; color: var(--ink-3); }
.ord-track-step.done .ord-track-no { background: var(--brand); border-color: var(--brand); color: #fff; }
.ord-track-step.cur .ord-track-no { border-color: var(--brand); color: var(--brand); }
.ord-track-step b { font-size: 11px; font-weight: 560; color: var(--ink); white-space: nowrap; }
.ord-track-at { font-size: 9.5px; color: var(--ink-3); min-height: 12px; }
.ord-track-line { flex: 0 0 6px; height: 1px; background: var(--line-2); }
.ord-warn { display: flex; gap: 8px; align-items: flex-start; background: var(--amber-soft); border: 1px solid #f2e0c9; border-radius: var(--r-sm); padding: 9px 11px; margin: 10px 0; font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.ord-warn svg { color: var(--amber); flex-shrink: 0; margin-top: 2px; }
.ord-kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ord-kv > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; min-width: 0; }
.ord-kv label { display: block; font-size: 10.5px; color: var(--ink-3); margin-bottom: 3px; }
.ord-kv b { font-size: 12.5px; font-weight: 560; color: var(--ink); overflow-wrap: anywhere; }
.ord-talk { display: flex; gap: 8px; align-items: flex-start; flex-wrap: wrap; background: var(--brand-soft); border: 1px solid var(--brand-line); border-radius: var(--r-sm); padding: 10px 12px; font-size: 12px; line-height: 1.7; color: var(--ink-2); }
.ord-talk svg { flex-shrink: 0; margin-top: 2px; color: var(--brand); }
.ord-talk .btn { margin-left: auto; }
.ord-events { padding-left: 6px; }
.ord-event { display: flex; gap: 10px; padding: 0 0 12px; position: relative; }
.ord-event::before { content: ''; position: absolute; left: 4px; top: 12px; bottom: 0; width: 1px; background: var(--line-2); }
.ord-event:last-child::before { display: none; }
.ord-event-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--brand); border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--brand-line); flex-shrink: 0; margin-top: 4px; z-index: 1; }
.ord-event-dot.red { background: var(--red); box-shadow: 0 0 0 1px var(--red-soft); }
.ord-event b { font-size: 12.5px; }
.inbox-delivery { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; margin-bottom: 6px; }
.inbox-delivery p { font-size: 11.5px; color: var(--ink-2); margin: 0; overflow-wrap: anywhere; }

/* ---------- v2.31.0 二 / 三期：页签、生产节点看板、出运与装载 ---------- */
.ord-tabs { display: flex; gap: 4px; margin: 14px 0 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.ord-tab { display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px; border: 1px solid transparent; border-bottom: 0; background: transparent; color: var(--ink-2); font-size: 12.5px; font-weight: 500; cursor: pointer; border-radius: var(--r-sm) var(--r-sm) 0 0; margin-bottom: -1px; }
.ord-tab:hover { color: var(--brand); background: var(--surface-2); }
.ord-tab.on { color: var(--brand); background: var(--surface); border-color: var(--line); border-bottom: 1px solid var(--surface); }
.ord-tab-badge { display: inline-block; min-width: 16px; padding: 1px 5px; border-radius: 8px; background: var(--surface-2); color: var(--ink-3); font-size: 10px; text-align: center; }
.ord-tab-badge.red { background: var(--red-soft); color: var(--red); }
.ord-tab-badge.amber { background: var(--amber-soft); color: var(--amber); }
.ord-mini-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.ord-mini-stats > div { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 10px; min-width: 0; }
.ord-mini-stats label { display: block; font-size: 10.5px; color: var(--ink-3); margin-bottom: 3px; }
.ord-mini-stats b { font-size: 16px; font-weight: 560; color: var(--ink); font-variant-numeric: tabular-nums; }
.ord-mini-stats b.red { color: var(--red); }
.ord-mini-stats b.amber { color: var(--amber); }
.ord-alert-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; margin-bottom: 12px; }
.ord-alert { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--r-sm); border: 1px solid var(--line); background: var(--surface-2); font-size: 11.5px; line-height: 1.6; }
.ord-alert.overdue { background: var(--red-soft); border-color: var(--red); }
.ord-alert.due { background: var(--amber-soft); border-color: var(--amber); }
.ord-alert b { color: var(--ink); }
.ord-alert .ord-alert-tag { margin-left: auto; flex-shrink: 0; font-size: 10.5px; font-weight: 600; }
.ord-alert.overdue .ord-alert-tag { color: var(--red); }
.ord-alert.due .ord-alert-tag { color: var(--amber); }
.ord-node-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 10px; }
.ord-node-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 12px; min-width: 0; }
.ord-node-card.lv2 { border-color: var(--red); }
.ord-node-card.lv1 { border-color: var(--amber); }
.ord-node-card-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 6px; }
.ord-node-card-head b { font-size: 12.5px; color: var(--ink); overflow-wrap: anywhere; }
.ord-node-card-sub { font-size: 10.5px; color: var(--ink-3); margin-bottom: 8px; }
.ord-progress { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; margin: 6px 0 10px; }
.ord-progress > i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.ord-node-list { display: flex; flex-direction: column; gap: 5px; }
.ord-node-row { display: flex; align-items: center; gap: 7px; padding: 5px 7px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 11.5px; min-width: 0; }
.ord-node-row.done { opacity: .68; }
.ord-node-row.overdue { border-color: var(--red); }
.ord-node-row.due { border-color: var(--amber); }
.ord-node-row .ord-node-name { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; }
.ord-node-row .ord-node-date { color: var(--ink-3); font-size: 10.5px; white-space: nowrap; }
.ord-node-row .sel { padding: 3px 6px; font-size: 11px; width: 88px; flex-shrink: 0; }
.ord-node-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); flex-shrink: 0; }
.ord-node-dot.done { background: var(--green); }
.ord-node-dot.running { background: var(--brand); }
.ord-node-dot.overdue { background: var(--red); }
.ord-node-dot.due { background: var(--amber); }
.ord-load-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 9px; margin: 10px 0; }
.ord-load-card { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px; background: var(--surface-2); }
.ord-load-card.best { border-color: var(--brand); background: var(--brand-soft); }
.ord-load-card h4 { margin: 0 0 6px; font-size: 12.5px; color: var(--ink); }
.ord-load-card .ord-load-big { font-size: 19px; font-weight: 600; color: var(--brand); font-variant-numeric: tabular-nums; }
.ord-load-card p { margin: 4px 0 0; font-size: 11px; color: var(--ink-2); line-height: 1.6; }
.ord-cont-bar { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; min-width: 54px; }
.ord-cont-bar > i { display: block; height: 100%; background: var(--teal, #2f9e8f); }
.ord-stamp-preview { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.ord-stamp-chip { width: 74px; height: 74px; border-radius: 50%; border: 2px solid var(--red); color: var(--red); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 9px; font-weight: 700; letter-spacing: .5px; text-align: center; opacity: .85; }
.ord-stamp-chip img { width: 70px; height: 70px; object-fit: contain; }
.ord-tpl-row { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; }
.ord-tpl-row .inp { flex: 1 1 120px; }
.ord-tpl-row .inp.days { flex: 0 0 76px; }

@media (max-width: 860px) { .wa-body { grid-template-columns: 1fr; } .wa-actions { margin-left: 0; width: 100%; } .ord-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ord-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); } .ord-arrow { display: none; } .ord-mini-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ord-node-cards { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .mail-linked-bar span { min-width: 100%; }
  .wa-qr { width: 200px; height: 200px; }
  .wa-top { padding: 12px; }
  .wa-body { padding: 12px; }
  .comm-bar .btn { margin-left: 0; width: 100%; }
  .ord-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ord-board { padding: 12px; }
  .ord-kv { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ord-track-step { flex: 1 1 60px; min-width: 58px; }
  .ord-track-step b { font-size: 10px; }
  .ord-track-at { display: none; }
  .ord-talk .btn { margin-left: 0; width: 100%; }
}

/* ---------------- v2.32.0 出口单证处理 ---------------- */
.td-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-bottom: 12px; }
.td-stats > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; min-width: 0; }
.td-stats label { display: block; font-size: 11px; color: var(--ink-3); margin-bottom: 4px; }
.td-stats b { font-size: 18px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.td-stats b.amber { color: var(--amber); }
.td-stats b.green { color: var(--green); }
.td-cat { margin-bottom: 12px; }
.td-cat:last-child { margin-bottom: 0; }
.td-cat-title { font-size: 11.5px; font-weight: 600; color: var(--ink-3); margin-bottom: 7px; }
.td-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 9px; }
.td-card { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-family: inherit; color: var(--ink); transition: border-color .15s, background .15s; }
.td-card:hover { border-color: var(--line-2); background: var(--surface-2); }
.td-card.on { border-color: var(--brand); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand); }
.td-card-ico { color: var(--brand); display: inline-flex; margin-bottom: 2px; }
.td-card b { font-size: 12.5px; font-weight: 600; }
.td-card small { font-size: 10.5px; color: var(--ink-3); }
.td-card-desc { font-size: 11px; color: var(--ink-2); line-height: 1.5; margin-top: 2px; }
.td-card-tag { margin-top: 4px; font-size: 10px; color: var(--amber); background: var(--amber-soft); border: 1px solid #f2e0c9; border-radius: 5px; padding: 1px 6px; }
.td-card-tag.best { color: var(--green); background: var(--green-soft); border-color: #cfe9da; }
.td-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; margin-bottom: 12px; align-items: start; }
.td-order-row { display: flex; flex-direction: column; gap: 8px; }
.td-order-row .sel { width: min(560px, 100%); }
.td-order-meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 11.5px; color: var(--ink-2); }
.td-check-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 6px; }
.td-check-head b { font-size: 12.5px; color: var(--ink); }
.td-check-ring { flex: 0 0 auto; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--amber); border: 3px solid var(--amber); background: var(--amber-soft); }
.td-check-ring.done { color: var(--green); border-color: var(--green); background: var(--green-soft); }
.td-check-bar { height: 5px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; margin-bottom: 10px; }
.td-check-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 3px; transition: width .2s; }
.td-check-list { display: flex; flex-direction: column; gap: 5px; }
.td-check-row { display: grid; grid-template-columns: 16px minmax(0, 1fr) minmax(0, 1.4fr) 46px; gap: 7px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 11.5px; cursor: pointer; }
.td-check-row:hover { border-color: var(--line-2); }
.td-check-row.missing { border-color: var(--red); background: var(--red-soft); }
.td-check-row.ok { opacity: .82; }
.td-check-row input { margin: 0; accent-color: var(--brand); }
.td-check-row input:disabled { cursor: default; }
.td-check-k { font-weight: 560; color: var(--ink); }
.td-check-v { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.td-check-s { text-align: right; font-size: 10.5px; color: var(--ink-3); }
.td-check-row.missing .td-check-s { color: var(--red); font-weight: 600; }
.td-check-row.ok .td-check-s { color: var(--green); }
.td-origin-box { margin-top: 10px; padding: 9px 11px; border: 1px solid var(--amber); background: var(--amber-soft); border-radius: var(--r-sm); font-size: 11.5px; line-height: 1.6; }
.td-origin-box b { color: var(--ink); }
.td-origin-box p { margin: 3px 0 0; color: var(--ink-2); }
.td-schemes { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 9px; }
.td-scheme { border: 1px solid var(--line); border-radius: var(--r); padding: 11px; background: var(--surface-2); min-width: 0; }
.td-scheme b { display: block; font-size: 12.5px; color: var(--ink); }
.td-scheme small { display: block; font-size: 10.5px; color: var(--ink-3); margin-bottom: 6px; }
.td-scheme p { margin: 3px 0 0; font-size: 11.5px; color: var(--ink-2); line-height: 1.6; }
.td-result p { margin: 0 0 6px; font-size: 12.5px; color: var(--ink); line-height: 1.6; }
.td-pct-low { color: var(--amber); font-weight: 600; }

@media (max-width: 1100px) { .td-grid { grid-template-columns: 1fr; } }
@media (max-width: 860px) { .td-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } .td-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
  .td-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .td-cards { grid-template-columns: 1fr; }
  .td-schemes { grid-template-columns: 1fr; }
  .td-check-row { grid-template-columns: 16px minmax(0, 1fr) 42px; }
  .td-check-k { grid-column: 2; }
  .td-check-s { grid-column: 3; }
  .td-check-v { grid-column: 2 / -1; grid-row: 2; white-space: normal; word-break: break-all; }
}

/* ---------------- v2.33.0 收款与账期管理（P4） ---------------- */
.pay-stats > div { display: flex; flex-direction: column; gap: 3px; }
.pay-stats .td-stat-l { display: block; font-size: 11px; color: var(--ink-3); }
.pay-stats strong { font-size: 18px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; line-height: 1.2; }
.pay-stats small { font-size: 10.5px; color: var(--ink-3); line-height: 1.4; }
.pay-stats .blue strong { color: var(--blue); }
.pay-stats .red strong { color: var(--red); }
.pay-stats .teal strong { color: var(--brand-2); }
.pay-stats .amber strong { color: var(--amber); }
.pay-stats .purple strong { color: #6d4bbf; }
.pay-tabs { margin-bottom: 12px; }
/* 计划页含 8 列表格，必须全宽单列，不能被 td-grid 的两栏挤窄 */
.pay-plans-grid { display: grid; grid-template-columns: 1fr; gap: 12px; }
.pay-order-meta { display: flex; gap: 8px 14px; flex-wrap: wrap; align-items: center; margin-top: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 11.5px; color: var(--ink-2); }
.pay-order-meta strong { color: var(--ink); font-weight: 600; }
.pay-gates { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.pay-gate { display: flex; align-items: center; gap: 6px; flex: 1 1 270px; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); font-size: 11.5px; }
.pay-gate.ok { border-color: #cfe9da; background: var(--green-soft); }
.pay-gate.blocked { border-color: #f2d5d3; background: var(--red-soft); }
.pay-gate strong { flex: 0 0 auto; color: var(--ink); font-weight: 600; }
.pay-gate > span { flex: 1 1 90px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); }
.pay-bar { width: 68px; height: 5px; border-radius: 3px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 5px; }
.pay-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 3px; }
.pay-overdue { color: var(--red); font-weight: 600; }
.pay-buckets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.pay-bucket { display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); min-width: 0; }
.pay-bucket > span { font-size: 11px; color: var(--ink-3); }
.pay-bucket strong { font-size: 14px; font-variant-numeric: tabular-nums; }
.pay-bucket small { font-size: 10px; color: var(--ink-3); }
.pay-bucket.red strong { color: var(--red); }
.pay-bucket.amber strong { color: var(--amber); }
.pay-bucket.teal strong { color: var(--brand-2); }
.pay-summary { padding: 9px 11px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); font-size: 12px; color: var(--ink-2); }
.pay-summary strong { color: var(--ink); }
.pay-rates { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.pay-rate { display: flex; align-items: center; gap: 6px; min-width: 0; }
.pay-rate > span { font-size: 11.5px; font-weight: 600; color: var(--ink-2); width: 40px; flex: 0 0 auto; }
.pay-rate input { min-width: 0; width: 100%; }
.pay-switch { display: flex; align-items: flex-start; gap: 9px; padding: 8px 10px; margin-bottom: 7px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface-2); cursor: pointer; }
.pay-switch input { margin: 3px 0 0; accent-color: var(--brand); flex: 0 0 auto; }
.pay-switch > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pay-switch strong { font-size: 12.5px; color: var(--ink); font-weight: 600; }
.pay-switch small { font-size: 11px; color: var(--ink-3); line-height: 1.5; }
.pay-check { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.pay-check input { margin: 0; accent-color: var(--brand); }
.pay-cands { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 11px; color: var(--ink-2); }

@media (max-width: 1100px) { .pay-buckets { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .pay-grid { grid-template-columns: 1fr; }
  .pay-gate { flex: 1 1 100%; }
  .pay-buckets { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pay-gate > span { white-space: normal; overflow: visible; }
}
@media (max-width: 560px) {
  .pay-buckets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-order-meta { flex-direction: column; align-items: flex-start; gap: 3px; }
  .pay-rates { grid-template-columns: 1fr 1fr; }
  .pay-gate { flex-wrap: wrap; }
  .pay-gate > span { flex: 1 1 100%; white-space: normal; }
  .pay-bar { width: 48px; }
}

/* ============ v2.34.0 产品中心 · 新品开发 ============ */
.dev-stats { margin-bottom: 4px; }
/* grid 子项默认 min-width:auto，会被宽表格的 min-content 撑破窄屏；
   显式 minmax(0,1fr) + 子项 min-width:0，让 .table-wrap 的 overflow:auto 真正生效 */
.dev-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.dev-pane > * { min-width: 0; }
.dev-toolbar { align-items: center; }
.dev-bar { width: 76px; height: 5px; border-radius: 4px; background: var(--line); overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 5px; }
.dev-bar > i { display: block; height: 100%; background: var(--brand); border-radius: 4px; }
.dev-overdue { color: var(--red); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.dev-due { color: var(--amber); font-size: 11.5px; font-weight: 600; }
.dev-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(126px, 1fr)); gap: 8px; margin: 12px 0; }
.dev-stage { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; background: var(--surface); min-width: 0; }
.dev-stage.done { border-color: var(--green); background: var(--green-soft); }
.dev-stage.current { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.dev-stage.todo { opacity: .72; }
.dev-stage-no { display: inline-block; font-size: 10px; font-weight: 700; color: var(--ink-3); background: var(--surface-2); border-radius: 5px; padding: 1px 5px; margin-bottom: 5px; }
.dev-stage strong { display: block; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dev-stage small { display: block; font-size: 10.5px; color: var(--ink-3); margin: 3px 0 6px; }
.dev-stage .dev-bar { width: 100%; margin: 0; }
.dev-gate-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.dev-missing { margin-top: 9px; padding: 8px 10px; border-radius: var(--r-sm); background: var(--red-soft); color: var(--red); font-size: 12px; line-height: 1.6; }
.dev-events { max-height: 260px; overflow: auto; }
.dev-event { display: flex; gap: 9px; padding: 7px 0; border-bottom: 1px dashed var(--line); font-size: 12px; }
.dev-event-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); margin-top: 5px; flex: 0 0 auto; }
.dev-event strong { font-weight: 600; color: var(--ink); }
.dev-gantt-row { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; min-width: 0; }
.dev-gantt-name { flex: 0 0 190px; display: flex; gap: 6px; align-items: baseline; min-width: 0; font-size: 11.5px; }
.dev-gantt-name strong { color: var(--ink); }
.dev-gantt-name span { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dev-gantt-name small { color: var(--ink-3); margin-left: auto; }
.dev-gantt-track { flex: 1 1 auto; display: flex; gap: 3px; min-width: 0; }
.dev-gantt-cell { flex: 1 1 0; min-width: 0; height: 22px; border-radius: 4px; display: flex; align-items: center; justify-content: center; font-size: 10px; color: #fff; overflow: hidden; white-space: nowrap; background: var(--line); }
.dev-gantt-cell.normal { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.dev-gantt-cell.done { background: var(--green); }
.dev-gantt-cell.due { background: var(--amber); }
.dev-gantt-cell.overdue { background: var(--red); }
.dev-gantt-end { flex: 0 0 82px; font-size: 11px; color: var(--ink-3); text-align: right; }
.dev-form { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dev-form label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-2); }
.dev-form textarea { resize: vertical; }
.dev-rule-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dev-rule-grid label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--ink-2); }
.dev-check { display: inline-flex !important; flex-direction: row !important; align-items: center; gap: 7px; font-size: 12px; color: var(--ink-2); cursor: pointer; }
.dev-check input { margin: 0; accent-color: var(--brand); }
.dev-tpl { display: grid; gap: 12px; }
.dev-tpl-list { margin-top: 10px; display: grid; gap: 9px; }
.dev-tpl-stage { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 10px; background: var(--surface-2); }
.dev-tpl-stage-head { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.dev-tpl-g { font-size: 10px; font-weight: 700; color: var(--brand); background: var(--brand-soft); border-radius: 5px; padding: 2px 6px; }
.dev-tpl-docs { margin-top: 8px; display: grid; gap: 6px; }
.dev-tpl-doc { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

@media (max-width: 1100px) {
  .dev-form, .dev-rule-grid { grid-template-columns: 1fr; }
  .dev-gantt-name { flex-basis: 150px; }
}
@media (max-width: 860px) {
  .dev-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dev-gantt-end { display: none; }
}
@media (max-width: 560px) {
  .dev-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dev-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dev-gantt-name { flex-basis: 96px; }
  .dev-gantt-name span { display: none; }
  .dev-tpl-doc > .inp { min-width: 100% !important; }
  .dev-form, .dev-rule-grid { grid-template-columns: 1fr; }
  .dev-gantt-track { overflow: hidden; }
  .dev-toolbar .search { min-width: 100% !important; }
  .dev-toolbar > .sel, .dev-toolbar > .btn { flex: 1 1 auto; }
  .dev-stage strong { white-space: normal; }
}

/* ============ v2.35.0 增长与订单 · 客户反馈分析 ============ */
.fb-stats { margin-bottom: 4px; }
.fb-tabs { margin-bottom: 12px; }
/* grid 子项默认 min-width:auto 会被宽表格撑破窄屏，显式 minmax(0,1fr) 让 .table-wrap 真正滚动 */
.fb-pane { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; }
.fb-pane > * { min-width: 0; }
.fb-toolbar { align-items: center; }
.fb-mini { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fb-mini > div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--card, #fff); }
.fb-mini span { display: block; font-size: 11px; color: var(--mut, #7b8a99); }
.fb-mini strong { font-size: 16px; }
.fb-mini strong.red { color: #c0392b; }
.fb-avoid-list { display: grid; gap: 8px; }
.fb-avoid-item { border: 1px solid var(--line); border-left: 3px solid #1e66f2; border-radius: 8px; padding: 8px 10px; background: var(--card, #fff); }
.fb-avoid-h { display: flex; gap: 6px; align-items: center; margin-bottom: 4px; flex-wrap: wrap; }
.fb-avoid-item .hint { margin-top: 2px; word-break: break-word; }
.fb-grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.fb-nps-big { font-size: 42px; font-weight: 700; text-align: center; padding: 6px 0; }
.fb-nps-big.blue { color: #1e66f2; }
.fb-nps-big.red { color: #c0392b; }
.fb-bar-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) 36px; gap: 8px; align-items: center; margin: 7px 0; font-size: 12px; }
.fb-bar { height: 8px; border-radius: 5px; background: var(--line); overflow: hidden; }
.fb-bar > i { display: block; height: 100%; border-radius: 5px; }
.fb-bar > i.green { background: #1a9b6c; }
.fb-bar > i.amber { background: #e0a020; }
.fb-bar > i.red { background: #c0392b; }
.fb-bar > i.blue { background: #1e66f2; }
.fb-bar > i.teal { background: #149a9a; }
.fb-dist { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.fb-dist-col strong { display: block; margin-bottom: 6px; font-size: 12px; }
.fb-kv { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.fb-kv > span { color: var(--mut, #7b8a99); }
.fb-flow { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.fb-flow-node { padding: 4px 8px; border-radius: 6px; background: var(--tint, #eef4fb); font-size: 11px; }
.fb-flow-arrow { color: var(--mut, #7b8a99); }
.fb-prompt { white-space: pre-wrap; word-break: break-word; font-size: 11px; line-height: 1.5; background: var(--card, #f8fafc); border: 1px solid var(--line); border-radius: 8px; padding: 8px; max-height: 220px; overflow: auto; font-family: inherit; margin: 0; }
.fb-events { display: grid; gap: 6px; }
.fb-event { display: grid; grid-template-columns: 70px 110px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 11.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.fb-event > span:last-child { word-break: break-word; }
.fb-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.fb-form .field { min-width: 0; }
.fb-tags { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.fb-tag-chk { font-size: 11.5px; display: block; word-break: break-word; }
@media (max-width: 1100px) {
  .fb-form { grid-template-columns: 1fr; }
  .fb-dist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .fb-grid2 { grid-template-columns: 1fr; }
  .fb-mini { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .fb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-dist { grid-template-columns: 1fr; }
  .fb-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-toolbar .search { min-width: 100% !important; }
  .fb-toolbar > .sel, .fb-toolbar > .btn { flex: 1 1 auto; }
  .fb-kv { grid-template-columns: 1fr; }
  .fb-event { grid-template-columns: 1fr; }
  .fb-bar-row { grid-template-columns: 88px minmax(0, 1fr) 30px; }
}
@media (max-width: 390px) {
  .fb-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-mini { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fb-pane, .fb-pane > * { min-width: 0; }
  .fb-tags { grid-template-columns: 1fr; }
}


/* ---------------- v2.36.0 二期：供应链执行（MRP / 采购 / 品质 / 库存） ---------------- */
.eo-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.eo-kpi > div { background: var(--surface-2, #f7f9fc); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0; }
.eo-kpi .hint { font-size: 11px; }
.eo-kpi strong { font-size: 16px; font-variant-numeric: tabular-nums; }
.eo-cfg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
@media (max-width: 1100px) {
  .eo-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eo-cfg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .eo-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eo-cfg { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .eo-kpi { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------- v2.37.0 三期：财务与经营（应付 / 成本 / 凭证 / 人力 / 驾驶舱） ---------------- */
.bo-kpi { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bo-kpi > div { min-width: 0; }
.bo-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.bo-cfg { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.bo-cfg .field { margin: 0; min-width: 0; }
@media (max-width: 1100px) {
  .bo-kpi { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bo-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bo-cfg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .bo-kpi { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bo-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bo-cfg { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .bo-kpi { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bo-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
