/* ---------- 卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm), 0 8px 22px rgba(21,59,101,.035);
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

/* ---------- 云端销售数据审计（owner 只读） ---------- */
.sales-cloud-audit-page { display:grid; gap:14px; }
.cloud-audit-module-switch { display:inline-flex; justify-self:start; gap:3px; padding:3px; border:1px solid var(--border); border-radius:9px; background:#fff; }
.cloud-audit-module-switch button, .cloud-audit-inner-tabs button { border:0; border-radius:6px; background:transparent; color:var(--text-2); padding:6px 12px; font:inherit; font-size:12.5px; cursor:pointer; }
.cloud-audit-module-switch button.active, .cloud-audit-inner-tabs button.active { background:var(--primary-50); color:var(--primary); font-weight:700; }
.cloud-audit-hero {
  display:flex; justify-content:space-between; align-items:flex-start; gap:18px;
  padding:18px 20px; border:1px solid #ccdaea; border-radius:12px;
  background:linear-gradient(135deg,#f7fbff 0%,#eef5fc 100%);
}
.cloud-audit-hero h2 { margin:5px 0 4px; font-size:20px; }
.cloud-audit-hero p { margin:0; max-width:850px; color:var(--text-2); font-size:12.5px; }
.cloud-audit-source { display:flex; align-items:center; gap:7px; color:var(--info); font-size:12px; font-weight:720; }
.cloud-audit-source .dot { width:7px; height:7px; border-radius:50%; background:var(--info); }
.cloud-audit-readonly { min-width:190px; text-align:right; color:var(--text); font-size:13px; font-weight:720; }
.cloud-audit-readonly small { color:var(--text-3); font-weight:500; }
.cloud-audit-filter { padding:14px; display:grid; grid-template-columns:repeat(4,minmax(150px,1fr)); gap:10px; }
.cloud-audit-filter label { display:grid; gap:4px; font-size:11.5px; color:var(--text-3); }
.cloud-audit-filter input, .cloud-audit-filter select { width:100%; height:34px; }
.cloud-audit-filter-actions { display:flex; align-items:flex-end; gap:7px; }
.cloud-audit-section { padding:16px; min-width:0; }
.cloud-audit-section .section-head { margin-top:0; }
.cloud-audit-metrics { display:grid; grid-template-columns:repeat(5,minmax(120px,1fr)); gap:9px; }
.cloud-audit-metric { padding:12px 13px; border:1px solid var(--border-soft); border-radius:9px; background:var(--card-2); }
.cloud-audit-metric span { display:block; color:var(--text-3); font-size:11.5px; }
.cloud-audit-metric strong { display:block; margin-top:5px; font-size:20px; font-variant-numeric:tabular-nums; }
.cloud-audit-state { min-height:112px; display:grid; place-items:center; align-content:center; gap:5px; text-align:center; color:var(--text-3); }
.cloud-audit-state strong { color:var(--text-2); }
.cloud-audit-state.error strong { color:var(--bad); }
.cloud-audit-state.unavailable { background:var(--warn-bg); border-radius:9px; }
.cloud-audit-updating { margin-bottom:8px; color:var(--info); font-size:11.5px; }
.cloud-audit-table th, .cloud-audit-table td { vertical-align:middle; white-space:nowrap; }
.cloud-audit-table .num { text-align:right; font-variant-numeric:tabular-nums; }
.cloud-audit-trace { display:grid; gap:2px; }
.cloud-audit-trace small { color:var(--text-3); }
.cloud-audit-pager { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-top:12px; color:var(--text-2); font-size:12px; }
.cloud-audit-pager > div { display:flex; gap:6px; }
.cloud-audit-batch-summary { display:flex; gap:8px 22px; flex-wrap:wrap; margin-bottom:10px; padding:9px 11px; border-radius:8px; background:var(--card-2); color:var(--text-2); font-size:12px; }
.cloud-audit-batch-summary strong { color:var(--text); font-variant-numeric:tabular-nums; }
.cloud-audit-inner-tabs { display:flex; gap:3px; flex-wrap:wrap; margin-bottom:12px; padding-bottom:10px; border-bottom:1px solid var(--border-soft); }
.gear-audit-filter { padding:0 0 12px; border:0; border-radius:0; box-shadow:none; background:transparent; }
.gear-audit-toolbar { display:flex; justify-content:space-between; align-items:center; gap:10px; margin:0 0 12px; color:var(--text-3); font-size:11.5px; }
.gear-audit-metrics { grid-template-columns:repeat(4,minmax(120px,1fr)); }
.cloud-audit-no-filter { margin-bottom:12px; padding:8px 10px; border-radius:7px; background:var(--card-2); color:var(--text-3); font-size:11.5px; }
.hirose-audit-metrics { grid-template-columns:repeat(5,minmax(120px,1fr)); }
.hirose-audit-breakdowns { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-top:10px; }
.hirose-audit-breakdowns > div { display:flex; align-items:center; gap:8px 16px; flex-wrap:wrap; padding:10px 12px; border:1px solid var(--border-soft); border-radius:8px; background:var(--card-2); font-size:12px; color:var(--text-2); }
.hirose-audit-breakdowns b { color:var(--text); }
.governance-audit-metrics { grid-template-columns:repeat(6,minmax(110px,1fr)); }
.governance-audit-warning { margin-bottom:12px; padding:9px 11px; border-left:3px solid var(--warn); border-radius:7px; background:var(--warn-bg); color:var(--text-2); font-size:12px; }
.governance-legacy-detail { margin-top:14px; padding:14px; border:1px solid #cbd9e7; border-radius:10px; background:#f8fbff; }
.governance-legacy-detail > div, .governance-legacy-head { display:flex; justify-content:space-between; align-items:flex-start; gap:12px; }
.governance-legacy-head span { display:block; margin-top:3px; color:var(--text-3); font-size:11.5px; }
.governance-legacy-detail details { margin-top:10px; }
.governance-legacy-detail summary { cursor:pointer; color:var(--primary); font-size:12px; font-weight:650; }
.governance-legacy-detail pre { max-height:420px; overflow:auto; padding:12px; border:1px solid var(--border-soft); border-radius:7px; background:#111827; color:#dbeafe; font-size:11.5px; line-height:1.5; white-space:pre-wrap; word-break:break-word; }
.system-status-metrics { grid-template-columns:repeat(4,minmax(150px,1fr)); }
.system-setting-value { max-width:420px; white-space:normal !important; word-break:break-word; }
.system-setting-value code { display:inline-block; max-width:100%; padding:3px 6px; border-radius:5px; background:var(--card-2); color:var(--text-2); white-space:pre-wrap; word-break:break-word; }
.cloud-audit-loaded-at { margin-bottom:9px; color:var(--text-3); font-size:11.5px; }
@media (max-width:1050px) {
  .cloud-audit-filter { grid-template-columns:repeat(2,minmax(150px,1fr)); }
  .cloud-audit-metrics { grid-template-columns:repeat(3,minmax(120px,1fr)); }
}
@media (max-width:620px) {
  .cloud-audit-hero { display:grid; }
  .cloud-audit-readonly { text-align:left; }
  .cloud-audit-filter, .cloud-audit-metrics { grid-template-columns:1fr; }
  .hirose-audit-breakdowns { grid-template-columns:1fr; }
  .cloud-audit-pager { align-items:flex-start; flex-direction:column; }
}
.card:hover { border-color: #cbd9e7; box-shadow: var(--shadow-sm), 0 10px 24px rgba(21,59,101,.045); }
.card-pad { padding: 20px 22px; }

/* ---------- 顶栏用户区 ---------- */
.user-chip { margin-left: auto; display: flex; align-items: center; gap: 9px; min-width:0; }
.user-chip .uc-av {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  display: grid; place-items: center; font-size: 14px; font-weight: 600; color: #fff;
  background: linear-gradient(150deg, var(--accent), var(--primary));
  box-shadow: 0 7px 16px rgba(21,59,101,.16);
}
.user-chip .uc-meta { display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; }
.user-chip .uc-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-chip .uc-role { font-size: 11px; color: var(--text-3); }
.user-chip .uc-logout {
  font-family: inherit; font-size: 12px; color: var(--text-3);
  background: #fff; border: 1px solid var(--border); border-radius: 7px;
  min-height:30px;padding: 5px 11px; cursor: pointer; transition: color .14s, border-color .14s, background .14s, transform .14s;
}
.user-chip .uc-logout:hover { color:var(--primary);border-color:#c9d8e7;background:var(--primary-50);transform:translateY(-1px); }
.user-chip #logoutBtn:hover { color:var(--bad);border-color:#e7c9c6;background:var(--bad-bg); }
.user-chip .uc-logout:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }

/* ---------- 经营驾驶舱：数据范围工具栏 + 图表范围提示 ---------- */
.metrics-head { flex-wrap: wrap; }
.metrics-head .section-actions { align-self: center; }
.db-scope { display: inline-flex; align-items: center; gap: 8px; }
.db-scope-label { font-size: 12px; color: var(--text-3); letter-spacing: .5px; white-space: nowrap; }
.db-scope .db-sel {
  height: 32px; min-width: 92px; font-size: 12.5px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center;
  padding-right: 26px; background-color: #fff;
}
.db-scope .db-sel:disabled { color: var(--text-3); background-color: var(--bg-soft); }
.chart-scope { font-size: 11.5px; color: var(--text-3); letter-spacing: .3px; white-space: nowrap; opacity: .9; }
@media (max-width: 700px) {
  .metrics-head .section-actions { margin-left: 0; width: 100%; }
}

/* ---------- 顶栏筛选 select（更高级：自定义箭头） ---------- */
.topbar select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 9px center;
  padding-right: 28px; background-color: #fff;
}

/* ---------- 指标卡 ---------- */
.metric {
  background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
  border: 1px solid rgba(226,232,240,.95);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(23,32,51,.035), 0 10px 26px rgba(23,32,51,.045);
  display: flex; flex-direction: column; gap: 10px;
  position: relative;
  min-height: 106px;
  transition: box-shadow .15s, transform .15s, border-color .15s;
}
.metric:hover { box-shadow: var(--shadow); border-color:#d6e0eb; transform: translateY(-1px); }
.metric-label { font-size: 12px; color: var(--text-3); display:flex; align-items:center; gap:6px; letter-spacing:.15px; }
.metric-value { font-size: 27px; font-weight: 760; letter-spacing: .1px; line-height: 1; font-variant-numeric: tabular-nums; }
.metric-value .unit { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 4px; }
.metric-cmp { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--text-2); }
.metric-cmp .delta { font-weight: 600; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--text-3); }
.metric-corner { position: absolute; top: 14px; right: 14px; }

/* ---------- 汇率看板 ---------- */
.fx-topbar { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; flex-wrap:wrap; padding-top:14px; padding-bottom:14px; margin-bottom:12px; border-color:#d4e0ec; }
.fx-title { font-size:16px; font-weight:760; color:var(--text); }
.fx-subtitle { margin-top:4px; font-size:12.5px; line-height:1.45; color:var(--text-2); max-width:960px; }
.fx-source { display:flex; gap:6px 14px; flex-wrap:wrap; margin-top:6px; font-size:11.5px; color:var(--text-3); }
.fx-source a { color:var(--accent); text-decoration:none; }
.fx-source a:hover { text-decoration:underline; }
.fx-actions { display:flex; gap:8px; align-items:center; }
.fx-kpi-grid { display:grid; grid-template-columns:repeat(4, minmax(170px, 1fr)); gap:10px; margin-bottom:12px; }
.fx-kpi-card { padding:13px 15px; min-height:104px; display:flex; flex-direction:column; gap:5px; border-color:#d7e1ec; box-shadow:0 1px 2px rgba(23,32,51,.035); }
.fx-kpi-title { font-size:12px; color:var(--text-3); font-weight:650; }
.fx-kpi-value { font-size:20px; line-height:1.2; font-weight:780; color:var(--text); font-variant-numeric:tabular-nums; }
.fx-kpi-aux { font-size:12px; color:var(--accent); font-weight:650; font-variant-numeric:tabular-nums; }
.fx-kpi-sub { margin-top:auto; font-size:11.5px; line-height:1.45; color:var(--text-3); }
.fx-main-grid { display:grid; grid-template-columns:minmax(460px, 1.35fr) minmax(360px, .9fr); gap:12px; align-items:stretch; }
.fx-trend-panel, .fx-expert-panel { border-color:#cdddec; background:#fbfdff; }
.fx-tight-head { align-items:flex-start; margin-bottom:10px; }
.fx-chart-empty { border:1px solid var(--border-soft); border-radius:8px; background:#fff; padding:12px; }
.fx-chart-grid { display:grid; grid-template-columns:repeat(4, minmax(120px, 1fr)); gap:8px; margin-bottom:12px; }
.fx-chart-grid div { border:1px solid var(--border-soft); border-radius:8px; padding:9px 10px; background:var(--card-2); min-height:58px; }
.fx-chart-grid span { display:block; font-size:11.5px; color:var(--text-3); margin-bottom:4px; }
.fx-chart-grid strong { font-size:13px; color:var(--text); font-variant-numeric:tabular-nums; }
.fx-chart-placeholder { height:190px; border:1px dashed #cbd7e5; border-radius:8px; background:linear-gradient(180deg,#fff,#f8fbfe); display:flex; align-items:center; justify-content:center; position:relative; overflow:hidden; }
.fx-chart-axis { position:absolute; left:30px; right:18px; bottom:34px; height:1px; background:#d9e2ec; }
.fx-chart-axis::before { content:""; position:absolute; left:0; bottom:0; width:1px; height:116px; background:#d9e2ec; }
.fx-chart-note { position:relative; color:var(--text-3); font-size:12.5px; }
.fx-analysis-block { border-top:1px solid var(--border-soft); padding-top:9px; margin-top:9px; }
.fx-analysis-block:first-of-type { border-top:none; padding-top:0; margin-top:0; }
.fx-block-title { font-size:12px; font-weight:720; color:var(--text); margin-bottom:7px; }
.fx-fact-list { display:grid; grid-template-columns:1fr 1fr; gap:6px 10px; }
.fx-fact-list div { display:flex; justify-content:space-between; gap:10px; font-size:12px; border-bottom:1px solid var(--border-soft); padding-bottom:5px; }
.fx-fact-list span { color:var(--text-3); }
.fx-fact-list strong { color:var(--text); font-variant-numeric:tabular-nums; text-align:right; }
.fx-callout { border-left:3px solid #cbd7e5; background:#fff; border-radius:6px; padding:8px 10px; display:grid; gap:3px; }
.fx-callout strong { font-size:13px; color:var(--text); }
.fx-callout span { font-size:12px; color:var(--text-2); line-height:1.45; }
.fx-callout.good { border-left-color:var(--good); background:var(--good-bg); }
.fx-callout.warn { border-left-color:var(--warn); background:var(--warn-bg); }
.fx-callout.info { border-left-color:var(--info); background:var(--info-bg); }
.fx-suggestion-list { display:grid; gap:5px; font-size:12px; color:var(--text-2); line-height:1.45; }
.fx-calc-panel { border-color:#d9e3ee; }
.fx-calc-grid { display:grid; grid-template-columns:minmax(260px,.8fr) minmax(360px,1fr) minmax(260px,.8fr); gap:12px; align-items:end; }
.fx-mode-list { display:flex; gap:6px; flex-wrap:wrap; }
.fx-calc-input-row { display:flex; align-items:flex-end; gap:10px; flex-wrap:wrap; }
.fx-calc-input-row input { width:180px; }
.fx-quick-row { display:flex; gap:6px; flex-wrap:wrap; }
.fx-calc-output { border:1px solid var(--border-soft); border-radius:8px; background:var(--card-2); padding:10px 12px; min-height:58px; display:grid; gap:3px; }
.fx-calc-output span { font-size:11.5px; color:var(--text-3); }
.fx-calc-output strong { font-size:16px; color:var(--text); font-variant-numeric:tabular-nums; }
.fx-detail-card { margin-top:12px; }
.fx-detail-head { align-items:flex-end; flex-wrap:wrap; }
.fx-table-tools { display:flex; gap:8px; align-items:flex-end; margin-left:auto; flex-wrap:wrap; }
.fx-table-tools select, .fx-table-tools input[type=text] { height:30px; font-size:12px; }
.fx-table-tools input[type=text] { width:220px; }
.fx-table th, .fx-table td { padding-top:8px; padding-bottom:8px; vertical-align:middle; }
.fx-rate-num { font-size:14px; font-weight:700; color:var(--text); font-variant-numeric:tabular-nums; }
.fx-empty-cell { padding:18px 12px; text-align:center; color:var(--text-3); background:var(--card-2); }
@media (max-width: 900px) {
  .fx-actions { width:100%; justify-content:flex-start; }
  .fx-kpi-grid { grid-template-columns:repeat(2, minmax(160px, 1fr)); }
  .fx-main-grid, .fx-calc-grid { grid-template-columns:1fr; }
  .fx-chart-grid { grid-template-columns:repeat(2, minmax(120px, 1fr)); }
  .fx-table-tools { margin-left:0; width:100%; }
}
@media (max-width: 560px) {
  .fx-kpi-grid { grid-template-columns:1fr; }
  .fx-chart-grid, .fx-fact-list { grid-template-columns:1fr; }
}

/* ---------- 客户业务档案 ---------- */
.biz-overview { display:grid; grid-template-columns:repeat(4, minmax(130px, 1fr)); gap:10px; margin-bottom:12px; }
.biz-metric { border:1px solid var(--border-soft); background:linear-gradient(180deg, #fff 0%, var(--card-2) 100%); border-radius:12px; padding:13px 15px; display:flex; flex-direction:column; gap:4px; min-height:78px; }
.biz-metric span { font-size:12px; color:var(--text-3); }
.biz-metric strong { font-size:22px; line-height:1; color:var(--text); font-variant-numeric:tabular-nums; }
.biz-metric small { font-size:11px; color:var(--text-3); }
.biz-link-line { display:flex; align-items:center; gap:10px; flex-wrap:wrap; border:1px solid var(--border-soft); background:var(--primary-50); border-radius:8px; padding:9px 12px; margin-bottom:12px; font-size:12.5px; }
.biz-alerts { display:grid; grid-template-columns:1fr 1fr; gap:12px; margin-bottom:12px; }
.biz-alerts > div { border:1px solid var(--border-soft); border-radius:12px; padding:13px 15px; background:#fff; }
.biz-alert-title { font-size:12px; font-weight:700; color:var(--text-2); margin-bottom:7px; }
.biz-alert-item { font-size:12.5px; line-height:1.65; border-left:3px solid var(--border); padding-left:8px; margin-top:5px; color:var(--text-2); }
.biz-alert-item.risk { border-left-color:var(--warn); }
.biz-alert-item.opp { border-left-color:var(--good); }
.biz-alert-item.muted { border-left-color:var(--border-soft); color:var(--text-3); }
.biz-grid { display:grid; grid-template-columns:1fr; gap:12px; margin-top:12px; }
.biz-block { border:1px solid var(--border-soft); border-radius:13px; background:#fff; padding:14px 15px; min-width:0; }
.biz-block-head { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; font-size:13px; font-weight:700; }
.biz-empty { padding:16px 0; text-align:center; }
.biz-radar-summary { display:flex; gap:8px 14px; flex-wrap:wrap; font-size:12.5px; color:var(--text-2); margin-bottom:10px; }
.biz-mini-timeline { display:flex; flex-direction:column; gap:8px; }
.biz-tl-item { display:grid; grid-template-columns:auto 1fr; gap:10px; align-items:flex-start; border-bottom:1px solid var(--border-soft); padding:0 0 8px; }
.biz-tl-item:last-child { border-bottom:none; padding-bottom:0; }
.biz-tl-item.clickable { cursor:pointer; }
.biz-tl-item.clickable:hover b { color:var(--accent); }
.biz-tl-item b { display:block; font-size:13px; font-weight:650; color:var(--text); }
.biz-tl-item small { display:block; margin-top:2px; font-size:11.5px; color:var(--text-3); }
.btn.btn-sm { padding:3px 9px; font-size:12px; }
@media (max-width: 980px) {
  .biz-overview { grid-template-columns:repeat(2, minmax(130px, 1fr)); }
  .biz-alerts { grid-template-columns:1fr; }
}
@media (max-width: 620px) {
  .biz-overview { grid-template-columns:1fr; }
}

/* ---------- 客户档案首页 ---------- */
.customer-ledger-page {
  --ledger-bg: var(--bg);
  --ledger-panel: var(--card);
  --ledger-line: var(--border-soft);
  --ledger-line-strong: var(--border);
  --ledger-ink: var(--text);
  --ledger-muted: var(--text-2);
  --ledger-blue: var(--info);
  --ledger-blue-soft: var(--info-bg);
  --ledger-green: var(--good);
  --ledger-red: var(--bad);
  --ledger-brass: var(--warn);
  display: grid;
  gap: 14px;
  margin: -4px -2px 0;
  padding: 4px 2px 0;
  background: transparent;
}
.customer-home-head {
  display:flex; align-items:flex-start; justify-content:space-between; gap:16px;
  padding:4px 0 2px; border:0; border-radius:0; background:transparent;
  box-shadow:none;
}
.customer-ledger-page .section-title {
  color: var(--ledger-ink);
  letter-spacing: .01em;
}
.customer-ledger-page .section-sub {
  color: var(--ledger-muted);
}
.customer-home-meta { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.customer-meta-item {
  min-width:106px; padding:6px 0 6px 14px; border-left:1px solid var(--ledger-line); border-radius:0; background:transparent;
}
.customer-meta-item span { display:block; font-size:11.5px; color:var(--ledger-muted); }
.customer-meta-item strong { display:block; margin-top:3px; font-size:13px; color:var(--ledger-ink); font-weight:720; }
.customer-kpi-grid {
  display:flex;
  align-items:center;
  gap:6px;
  padding:8px 10px;
  border:1px solid var(--ledger-line);
  border-radius:12px;
  background:#fff;
  box-shadow:0 8px 22px rgba(24,45,76,.035);
  overflow:auto;
}
.customer-kpi {
  display:flex;
  align-items:baseline;
  gap:6px;
  min-height:0;
  padding:6px 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  box-shadow:none;
  position:relative;
  overflow:visible;
  white-space:nowrap;
}
.customer-kpi + .customer-kpi { border-left:1px solid #eef1f5; border-radius:0; }
.customer-kpi::before { content:''; flex:0 0 auto; width:6px; height:6px; border-radius:50%; background:#a1aec0; opacity:.95; }
.customer-kpi.good::before { background:var(--ledger-green); }
.customer-kpi.bad::before { background:var(--ledger-red); }
.customer-kpi.warn::before { background:var(--ledger-brass); }
.customer-kpi.info::before { background:var(--ledger-blue); }
.customer-kpi span { display:block; padding-left:0; font-size:12px; color:var(--ledger-muted); font-weight:600; }
.customer-kpi strong { display:block; margin-top:0; font-size:16px; line-height:1; font-weight:760; color:var(--ledger-ink); font-variant-numeric:tabular-nums; }
.customer-kpi small { display:none; }
.customer-followup-page { display:grid; gap:14px; }
.customer-product-followup-section { background:#fff; }
.customer-product-tabs {
  display:inline-flex;
  gap:4px;
  padding:3px;
  margin-bottom:12px;
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:var(--card-2);
  flex-wrap:wrap;
}
.customer-product-tabs button {
  height:28px;
  padding:0 12px;
  border:none;
  border-radius:6px;
  background:transparent;
  color:var(--text-2);
  font:inherit;
  font-size:12.5px;
  cursor:pointer;
}
.customer-product-tabs button.active {
  background:#fff;
  color:var(--accent);
  font-weight:700;
  box-shadow:var(--shadow-sm);
}
.customer-reminder-grid { display:grid; grid-template-columns:repeat(3, minmax(0, 1fr)); gap:12px; }
.customer-reminder-card {
  min-height:170px;
  padding:12px;
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:var(--card-2);
}
.customer-reminder-list,
.customer-contact-list { display:grid; gap:8px; margin-top:10px; }
.customer-reminder-item,
.customer-contact-item {
  min-width:0;
  padding:8px 9px;
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:#fff;
}
.customer-reminder-item div,
.customer-contact-item {
  display:grid;
  grid-template-columns:minmax(0, 1fr) auto;
  gap:8px;
  align-items:center;
}
.customer-reminder-item strong,
.customer-contact-item strong {
  color:var(--text);
  font-size:13px;
  font-weight:750;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.customer-reminder-item span,
.customer-contact-item span {
  color:var(--text-2);
  font-size:12px;
  white-space:nowrap;
}
.customer-reminder-item small,
.customer-contact-item small {
  display:block;
  grid-column:1 / -1;
  margin-top:4px;
  color:var(--text-3);
  font-size:11.5px;
  line-height:1.35;
}
.customer-reminder-state {
  grid-column:1 / -1;
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
}
.customer-reminder-state small {
  display:inline;
  grid-column:auto;
  margin:0;
}
.customer-reminder-history {
  padding-top:5px;
  border-top:1px dashed var(--border-soft);
}
.customer-reminder-actions {
  grid-column:1 / -1;
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  margin-top:7px;
}
.customer-today-contact { background:#fff; }
.customer-contact-list { grid-template-columns:repeat(2, minmax(0, 1fr)); margin-top:0; }
.customer-followup-toolbar {
  gap: 10px;
  align-items: center;
}
.customer-followup-toolbar input[type=text] {
  width: min(360px, 100%);
}
.customer-followup-table-card {
  overflow: hidden;
}
.customer-followup-table th,
.customer-followup-table td {
  vertical-align: middle;
}
.customer-followup-table th:nth-child(1),
.customer-followup-table td:nth-child(1) { min-width: 220px; }
.customer-followup-table th:nth-child(2),
.customer-followup-table td:nth-child(2) { min-width: 94px; }
.customer-followup-table th:nth-child(3),
.customer-followup-table td:nth-child(3) { min-width: 150px; }
.customer-followup-table th:nth-child(4),
.customer-followup-table td:nth-child(4) { min-width: 300px; white-space: normal; }
.customer-followup-table th:nth-child(7),
.customer-followup-table td:nth-child(7) { min-width: 230px; white-space: normal; }
.customer-followup-judge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #f6f8fb;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.2;
  white-space: nowrap;
}
.customer-followup-judge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.customer-followup-judge.risk {
  border-color: #fecaca;
  background: #fff1f2;
  color: #b42318;
}
.customer-followup-judge.opportunity {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}
.customer-followup-judge.due {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}
.customer-followup-judge.done {
  border-color: #d1d5db;
  background: #f9fafb;
  color: #6b7280;
}
.customer-followup-name,
.customer-followup-product,
.customer-followup-reason {
  display: grid;
  gap: 4px;
  min-width: 0;
}
.customer-followup-name strong,
.customer-followup-product strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.25;
}
.customer-followup-name small,
.customer-followup-product small {
  color: var(--text-3);
  font-size: 11.5px;
  line-height: 1.35;
}
.customer-followup-reason b {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}
.customer-followup-reason span {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
.customer-followup-table .customer-reminder-state {
  margin-top: 0;
}
.customer-followup-table .customer-reminder-actions {
  margin-top: 0;
  gap: 6px;
}
.customer-followup-modal { width:min(720px, calc(100vw - 32px)); }
.customer-followup-modal.compact { width:min(560px, calc(100vw - 32px)); }
.customer-followup-body {
  display:grid;
  gap:12px;
  min-height:0;
  overflow:auto;
  padding:14px 18px;
}
.customer-followup-alert {
  display:grid;
  gap:4px;
  padding:10px 12px;
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:var(--card-2);
}
.customer-followup-alert b { color:var(--text); font-size:14px; }
.customer-followup-alert span { color:var(--text-2); font-size:12.5px; }
.customer-followup-alert small { color:var(--text-3); font-size:12px; line-height:1.45; }
.customer-followup-form {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:10px;
}
.customer-followup-form label {
  display:flex;
  flex-direction:column;
  gap:5px;
  color:var(--text-3);
  font-size:12px;
}
.customer-followup-form select,
.customer-followup-form input,
.customer-followup-form textarea { width:100%; }
.customer-followup-note { grid-column:1 / -1; }
.customer-followup-last {
  padding:8px 10px;
  border:1px dashed var(--border);
  border-radius:8px;
  background:#fff;
  color:var(--text-3);
  font-size:12px;
  line-height:1.45;
}
.customer-war-room {
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 4px 0 12px;
}
.customer-war-main { display:block; }
.customer-war-title { position:relative; color:#1f3349; font-size:27px; font-weight:820; line-height:1.3; word-break:break-word; }
.customer-war-title::after { content:""; display:block; width:44px; height:3px; margin-top:10px; border-radius:999px; background:#3b82f6; opacity:.72; }
.customer-archive-summary { align-self:start; }
.customer-archive-head { align-items:center; margin-bottom:0; }
.customer-archive-grid { display:grid; grid-template-columns:repeat(2, minmax(0, 1fr)); gap:9px 12px; margin-top:10px; }
.customer-archive-field { min-width:0; border:1px solid var(--border-soft); border-radius:10px; background:var(--card-2); padding:8px 10px; }
.customer-archive-field.full { grid-column:1 / -1; }
.customer-archive-field span { display:block; color:var(--text-3); font-size:11.5px; margin-bottom:4px; }
.customer-archive-field strong { display:block; overflow:hidden; color:var(--text); font-size:13px; font-weight:720; line-height:1.45; text-overflow:ellipsis; white-space:nowrap; }
.customer-archive-field.full strong { white-space:normal; }
.customer-archive-fixed-value { line-height:1.65; white-space:normal !important; }
.customer-archive-field input,
.customer-archive-field textarea { width:100%; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--text); font-family:inherit; font-size:13px; line-height:1.4; padding:5px 7px; }
.customer-archive-field textarea { resize:vertical; min-height:46px; }
.customer-archive-missing { margin-top:10px; border:1px dashed var(--border); border-radius:9px; background:#fff; color:var(--text-3); font-size:12px; padding:7px 9px; }
.customer-archive-modal { width:620px; max-width:calc(100vw - 32px); }
.customer-archive-modal-body { display:grid; gap:12px; padding:16px 20px; }
.customer-archive-modal-body .filter { display:grid; gap:6px; }
.customer-archive-modal-body textarea { width:100%; border:1px solid var(--border); border-radius:8px; padding:8px; font-family:inherit; font-size:13px; resize:vertical; }
.customer-diagnosis-v1 { border:1px solid rgba(59,130,246,.18); }
.customer-diagnosis-grid { display:grid; grid-template-columns:1fr 1.4fr; gap:10px 16px; margin-top:12px; }
.customer-diagnosis-grid > div { border:1px solid var(--border-soft); border-radius:12px; background:var(--card-2); padding:10px 12px; }
.customer-diagnosis-grid span { display:block; color:var(--text-3); font-size:11.5px; margin-bottom:5px; }
.customer-diagnosis-grid strong { color:#1d4ed8; font-size:18px; }
.customer-diagnosis-grid p { margin:0; color:var(--text-2); font-size:13px; line-height:1.55; }
.customer-purchase-core { display:grid; gap:16px; }
.customer-analysis-block { border-top:1px solid var(--border-soft); padding-top:14px; }
.customer-analysis-block:first-of-type { border-top:0; padding-top:0; }
.customer-analysis-title { color:var(--text); font-size:14px; font-weight:780; margin-bottom:10px; }
.customer-trend-table th,
.customer-trend-table td,
.customer-model-matrix th,
.customer-model-matrix td { white-space:nowrap; }
.trend-cell { display:inline-flex; align-items:center; justify-content:flex-end; min-width:38px; padding:3px 5px; border-radius:7px; background:linear-gradient(to top, rgba(59,130,246,.16) var(--h), rgba(248,250,252,.8) var(--h)); color:var(--text-2); font-size:11.5px; }
.customer-model-cycle td:nth-child(1) { min-width:170px; }
.customer-model-cycle td:nth-child(7) { max-width:220px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.purchase-status { display:inline-flex; align-items:center; gap:5px; padding:2px 7px; border:1px solid var(--border-soft); border-radius:999px; background:#f8fafc; color:var(--text-3); font-size:11.5px; font-weight:720; line-height:1.35; white-space:nowrap; }
.purchase-status::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.75; }
.purchase-status.good { border-color:#cfe6dc; background:var(--good-bg); color:var(--good); }
.purchase-status.info { border-color:#d2e2f5; background:var(--info-bg); color:var(--info); }
.purchase-status.warn { border-color:#eedebc; background:var(--warn-bg); color:var(--warn); }
.purchase-status.bad { border-color:#edcdcd; background:var(--bad-bg); color:var(--bad); }
.purchase-status.neutral { border-color:#dde4ee; background:var(--neutral-bg); color:var(--neutral); }
.matrix-cell { display:inline-flex; min-width:34px; justify-content:center; border-radius:7px; padding:3px 5px; color:var(--text-3); }
.matrix-cell.hot { background:#eff6ff; color:#1d4ed8; font-weight:760; }
.customer-purchase-conclusions { display:grid; gap:8px; margin:0; padding-left:18px; color:var(--text-2); font-size:13px; line-height:1.65; }
.customer-purchase-conclusions li { padding-left:2px; }
.customer-purchase-conclusions li::marker { color:#3b82f6; font-weight:800; }
.customer-purchase-profile-table th,
.customer-purchase-profile-table td { vertical-align:middle; }
.customer-purchase-profile-table td:nth-child(1) { min-width:96px; }
.customer-purchase-profile-table td:nth-child(4) { min-width:120px; max-width:180px; }
.customer-purchase-profile-table td:nth-child(5) { min-width:118px; max-width:170px; }
.customer-purchase-profile-table td:nth-child(6) { min-width:180px; max-width:320px; }
.purchase-profile-state { display:inline-flex; align-items:center; gap:5px; padding:2px 7px; border:1px solid var(--border-soft); border-radius:999px; font-size:11.5px; font-weight:720; line-height:1.35; white-space:nowrap; }
.purchase-profile-state::before { content:""; width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.75; }
.purchase-profile-state.purchased { border-color:#bbf7d0; background:#f0fdf4; color:#15803d; }
.purchase-profile-state.missing { border-color:#dbe4ee; background:#f8fafc; color:#64748b; }
.customer-profile-note { display:-webkit-box; overflow:hidden; color:var(--text-2); line-height:1.45; -webkit-box-orient:vertical; -webkit-line-clamp:2; white-space:normal; }
.customer-purchase-profile-modal { width:min(660px, calc(100vw - 32px)); }
.customer-purchase-profile-form { display:grid; gap:11px; padding:16px 20px; }
.customer-purchase-profile-form label { display:grid; gap:5px; color:var(--text-3); font-size:12px; }
.customer-purchase-profile-form input,
.customer-purchase-profile-form textarea { width:100%; box-sizing:border-box; border:1px solid var(--border); border-radius:8px; background:#fff; color:var(--text); font-family:inherit; font-size:13px; line-height:1.45; padding:8px 9px; }
.customer-purchase-profile-form input[readonly] { background:var(--card-2); color:var(--text-2); }
.customer-purchase-profile-form textarea { resize:vertical; }
.customer-profile-grid { display:grid; grid-template-columns:1fr 1fr 1.2fr; gap:12px; }
.customer-profile-grid > div { border:1px solid var(--border-soft); border-radius:12px; background:var(--card-2); padding:12px; }
.customer-profile-grid h4 { margin:0 0 8px; color:var(--text); font-size:13px; }
.customer-profile-grid div div { display:grid; gap:3px; margin-top:8px; }
.customer-profile-grid b { color:var(--text); font-size:12.5px; }
.customer-profile-grid span,
.customer-profile-grid p { margin:0; color:var(--text-2); font-size:12px; line-height:1.55; }
.customer-more-business summary { cursor:pointer; color:var(--text); font-size:15px; font-weight:800; list-style:none; }
.customer-more-business summary::-webkit-details-marker { display:none; }
.customer-more-business summary::after { content:"展开"; float:right; color:var(--accent); font-size:12px; font-weight:650; }
.customer-more-business[open] summary::after { content:"收起"; }
.customer-internal-source summary { cursor:pointer; color:var(--text-2); font-size:13px; font-weight:700; list-style:none; }
.customer-internal-source summary::-webkit-details-marker { display:none; }
.customer-internal-source summary::after { content:"展开"; float:right; color:var(--text-3); font-size:12px; font-weight:650; }
.customer-internal-source[open] summary::after { content:"收起"; }
.customer-more-block { border-top:1px solid var(--border-soft); padding-top:12px; margin-top:12px; }
.customer-empty-mini {
  display:grid; place-items:center; min-height:92px; color:var(--text-3); font-size:12.5px; background:var(--card-2);
  border:1px dashed var(--border); border-radius:8px;
}
.customer-tag-row { display:flex; flex-wrap:wrap; gap:4px; }
.customer-judgement-cell {
  display: grid;
  gap: 4px;
  min-width: 86px;
  max-width: 140px;
}
.customer-ledger-toolbar {
  padding: 0 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.customer-ledger-toolbar input[type=text],
.customer-ledger-toolbar select {
  height: 34px;
  border-color: #dfe6ee;
  border-radius: 8px;
  background: #fff;
  color: var(--ledger-ink);
}
.customer-ledger-toolbar input[type=text]:focus,
.customer-ledger-toolbar select:focus {
  border-color: #68a7ff;
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.customer-ledger-toolbar .inline-f {
  color: var(--ledger-muted);
  font-size: 12px;
  font-weight: 650;
}
.customer-ledger-table-card {
  overflow: hidden;
  border: 1px solid var(--ledger-line);
  border-radius: 12px;
  background: #fff;
  box-shadow:0 10px 26px rgba(24,45,76,.04);
}
.customer-ledger-page table.dt {
  font-size: 12.5px;
  background: transparent;
  table-layout: fixed;
}
.customer-ledger-page table.dt th,
.customer-ledger-page table.dt td {
  padding: 10px 12px;
  height: 48px;
  border-color: var(--ky-table-row-border);
  vertical-align: middle;
}
.customer-ledger-page table.dt thead th {
  color: var(--ky-table-head-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform:none;
  border-bottom: 1px solid var(--ky-table-border);
  background:var(--ky-table-head-bg);
  box-shadow:none;
}
.customer-ledger-page table.dt th:nth-child(1),
.customer-ledger-page table.dt td:nth-child(1) {
  width: 36%;
}
.customer-ledger-page table.dt th:nth-child(2),
.customer-ledger-page table.dt td:nth-child(2) {
  width: 13%;
  font-size: 13px;
  font-weight: 500;
  color: #42556b;
}
.customer-ledger-page table.dt th:nth-child(3),
.customer-ledger-page table.dt td:nth-child(3) {
  width: 19%;
}
.customer-ledger-page table.dt th:nth-child(4),
.customer-ledger-page table.dt td:nth-child(4) {
  width: 32%;
}
.customer-ledger-page table.dt tbody tr {
  border-bottom: 1px solid var(--ky-table-row-border);
  background: #fff;
}
.customer-ledger-page table.dt tbody tr:nth-child(even) {
  background: #fff;
}
.customer-ledger-page table.dt tbody tr:hover {
  background: var(--ky-table-hover-bg);
  box-shadow:none;
}
.customer-ledger-page .back-link {
  color: #1d4f8f;
  font-weight: 760;
  text-decoration: none;
}
.customer-ledger-page table.dt tbody tr:hover .back-link {
  color: #2563eb;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
.customer-ledger-page table.dt td .t-muted {
  color: #7a8ca0;
}
.customer-ledger-page .badge {
  min-height: 20px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 720;
  letter-spacing: .01em;
  box-shadow: none;
}
.customer-ledger-page .badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.customer-ledger-page .badge.good { color: var(--ledger-green); background:#eaf8f4; border-color:#c8ebe1; }
.customer-ledger-page .badge.info { color: var(--ledger-blue); background:var(--ledger-blue-soft); border-color:#cfe4ff; }
.customer-ledger-page .badge.bad { color: var(--ledger-red); background:#fff0f0; border-color:#f1caca; }
.customer-ledger-page .badge.warn { color: var(--ledger-brass); background:#fff8df; border-color:#efdf9e; }
.customer-ledger-page .badge.neutral { color:#657384; background:#f2f6fb; border-color:#d9e4ef; }
.customer-ledger-page .customer-judgement-cell {
  min-width: 86px;
}
.customer-ledger-page .customer-judgement-status {
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  font-size:12px;
  line-height:1.2;
  font-weight:720;
}
.customer-ledger-page .customer-judgement-status .dot {
  width:6px;
  height:6px;
  border-radius:50%;
  background:currentColor;
}
.customer-ledger-page .customer-judgement-status.good { color:var(--ledger-green); }
.customer-ledger-page .customer-judgement-status.info { color:var(--ledger-blue); }
.customer-ledger-page .customer-judgement-status.bad { color:var(--ledger-red); }
.customer-ledger-page .customer-judgement-status.warn { color:var(--ledger-brass); }
.customer-ledger-page .customer-judgement-status.neutral { color:#667990; }
.customer-ledger-page .customer-judgement-text {
  color: #5f6f82;
}
.customer-master-cell {
  display:grid;
  gap:4px;
  min-width:0;
  max-width:100%;
}
.customer-master-name {
  color:#172b42;
  font-size:13.2px;
  font-weight:650;
  line-height:1.25;
  text-decoration:none;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.customer-master-meta {
  color:#7b8a9b;
  font-size:11.5px;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.customer-key-model-cell {
  display:grid;
  gap:4px;
  min-width:0;
  max-width:100%;
}
.customer-key-model-name {
  color:#27384c;
  font-size:12.8px;
  font-weight:650;
  line-height:1.3;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.customer-key-model-status {
  display:inline-flex;
  align-items:center;
  gap:5px;
  width:max-content;
  max-width:100%;
  padding:2px 7px;
  border:1px solid #dbe5ef;
  border-radius:999px;
  background:#f5f8fb;
  color:#6d7f93;
  font-size:11.5px;
  font-weight:650;
  line-height:1.2;
}
.customer-key-model-status .dot {
  width:5px;
  height:5px;
  border-radius:50%;
  background:currentColor;
}
.customer-key-model-status.stop {
  color:#9c2f35;
  background:#fff1f2;
  border-color:#f1c4c9;
}
.customer-key-model-status.overdue {
  color:#c3453f;
  background:#fff3ef;
  border-color:#f3c9be;
}
.customer-key-model-status.soon {
  color:#9b7415;
  background:#fff9dc;
  border-color:#eadb92;
}
.customer-key-model-status.first {
  color:#2566b1;
  background:#edf6ff;
  border-color:#c8e0ff;
}
.customer-key-model-status.normal {
  color:#25785e;
  background:#ebfaf4;
  border-color:#c7eadc;
}
.customer-key-model-status.watch {
  color:#6b7b8d;
  background:#f3f6fa;
  border-color:#d9e2ec;
}
.customer-judgement-text {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}
@media (max-width: 1180px) {
  .customer-kpi-grid { flex-wrap:wrap; }
  .customer-reminder-grid { grid-template-columns:1fr; }
}
@media (max-width: 860px) {
  .customer-home-head { flex-direction:column; }
  .customer-home-meta { width:100%; justify-content:flex-start; }
  .customer-kpi-grid { align-items:flex-start; }
  .customer-kpi { width:calc(50% - 6px); }
  .customer-contact-list { grid-template-columns:1fr; }
  .customer-followup-form { grid-template-columns:1fr; }
}

/* ---------- 状态徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  min-height:22px;padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 680;
  line-height: 1.6;
  white-space: nowrap;
  border: 1px solid transparent;
  letter-spacing: 0;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.badge .dot { width: 6px; height: 6px; flex:none;border-radius: 50%; background: currentColor; }
.badge.good { color: var(--good); background: var(--good-bg); border-color:#cfe6dc; }
.badge.warn { color: var(--warn); background: var(--warn-bg); border-color:#eedebc; }
.badge.bad  { color: var(--bad);  background: var(--bad-bg); border-color:#edcdcd; }
.badge.info { color: var(--info); background: var(--info-bg); border-color:#d2e2f5; }
.badge.neutral { color: var(--neutral); background: var(--neutral-bg); border-color:#dde4ee; }
.badge,
.purchase-status,
.purchase-profile-state,
.customer-ledger-page .customer-judgement-status,
.customer-key-model-status { min-height:22px;border-radius:999px; }

/* ---------- 筛选器 ---------- */
.filter {
  display: inline-flex; flex-direction: column; gap: 3px;
}
.filter > label { font-size: 10.5px; color: var(--text-3); padding-left: 2px; }
select, input[type=text], input[type=date], input[type=number], input[type=password], textarea {
  font-family: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 7px;
  padding: 7px 11px;
  outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
select:hover, input:hover, textarea:hover { border-color:#c4d3e2; }
select:focus, input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--ky-focus-ring); background:#fff; }
select:disabled, input:disabled, textarea:disabled { background: var(--card-2); color: var(--text-3); cursor:not-allowed; }
.seg {
  display: inline-flex; background: #edf3f9; border: 1px solid var(--border); border-radius: 8px; padding: 3px;
}
.seg button {
  border: none; background: transparent; font-family: inherit; font-size: 12.5px;
  color: var(--text-2); padding: 5px 12px; border-radius: 6px; cursor: pointer;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease;
}
.seg button.active { background: #fff; color: var(--primary); font-weight: 680; box-shadow: 0 3px 8px rgba(23,32,51,.07); }

/* ---------- 按钮 ---------- */
.btn {
  min-height:var(--control-height);font-family: inherit; font-size: 13px; font-weight: 620;
  border: 1px solid #cfdbe7; background: #fff; color: var(--text);
  padding: 7px 14px; border-radius: 7px; cursor: pointer;
  box-shadow: 0 1px 1px rgba(21,59,101,.025);
  transition: background .14s, border-color .14s, color .14s, box-shadow .14s, transform .12s;
}
.btn:hover { background: var(--primary-50); border-color:#bfd0e1; box-shadow: 0 6px 14px rgba(21,59,101,.07); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); box-shadow: none; }
.btn.primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.primary:hover { background: var(--primary-600); border-color: var(--primary-600); box-shadow: 0 8px 18px rgba(21,59,101,.18); }
.btn.ghost { border-color: transparent; background: transparent; color: var(--accent); }
.btn.ghost:hover { background: var(--primary-50); border-color: transparent; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; box-shadow: none; filter: grayscale(.08); }
.btn:focus-visible { outline:2px solid var(--accent);outline-offset:2px; }

/* ---------- 表格 ---------- */
:root {
  --ky-table-border: #d8e3ef;
  --ky-table-row-border: #e8eff6;
  --ky-table-head-bg: #f2f6fb;
  --ky-table-head-text: #3f536a;
  --ky-table-hover-bg: #f5f9fe;
  --ky-table-selected-bg: #edf4fc;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--ky-table-border);
  border-radius: var(--radius);
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}
table.dt,
table.table {
  width: 100%;
  border: 1px solid var(--ky-table-border);
  border-collapse: collapse;
  border-radius: 8px;
  background: #fff;
  font-size: 13px;
}
.table-wrap > table.dt,
.table-wrap > table.table {
  border: 0;
  border-radius: 0;
}
table.dt th,
table.dt td,
table.table th,
table.table td {
  padding: 12px 15px;
  text-align: left;
  white-space: nowrap;
}
table.dt thead th,
table.table thead th {
  color: var(--ky-table-head-text);
  font-size: 11.5px;
  font-weight: 720;
  letter-spacing: .25px;
  border-bottom: 1px solid var(--ky-table-border);
  background: var(--ky-table-head-bg);
  box-shadow: none;
  cursor: default;
  user-select: none;
}
table.dt thead th { position: sticky; top: 0; }
table.dt thead th.sortable { cursor: pointer; }
table.dt thead th.sortable:hover,
table.table thead th.sortable:hover { color: var(--text); }
table.dt tbody tr,
table.table tbody tr {
  border-bottom: 1px solid var(--ky-table-row-border);
  background: #fff;
  transition: background .14s ease, box-shadow .14s ease;
  animation:kyTableRowIn .18s ease both;
}
table.dt tbody tr:nth-child(even),
table.table tbody tr:nth-child(even) { background: #fff; }
table.dt tbody tr:last-child,
table.table tbody tr:last-child { border-bottom: 0; }
table.dt tbody tr:hover,
table.table tbody tr:hover {
  background: var(--ky-table-hover-bg);
  box-shadow: none;
}
table.dt tbody tr:hover td:first-child,
table.table tbody tr:hover td:first-child { box-shadow:inset 3px 0 0 rgba(78,125,170,.68); }
table.dt tbody tr.selected,
table.dt tbody tr.active,
table.dt tbody tr[aria-selected="true"],
table.table tbody tr.selected,
table.table tbody tr.active,
table.table tbody tr[aria-selected="true"] { background:var(--ky-table-selected-bg); }
table.dt tbody td:not(.num),
table.table tbody td:not(.num) { overflow-wrap:anywhere;word-break:break-word; }
table.dt tbody td:first-child,
table.table tbody td:first-child { white-space:normal; }
@keyframes kyTableRowIn { from { opacity:.74; } to { opacity:1; } }
table.dt tbody tr.clickable { cursor: pointer; }
table.dt td.num,
table.table td.num { text-align: right; font-variant-numeric: tabular-nums; }
table.dt th.num,
table.table th.num { text-align: right; }
.t-strong { font-weight: 600; }
.t-muted { color: var(--text-3); }
.sort-ind { font-size: 10px; opacity: .7; margin-left: 3px; }
[data-model] { transition: text-decoration .1s; }
[data-model]:hover { text-decoration: underline; }
/* 紧凑表格：行高更小，适合一眼判断的经营总览 */
table.dt.dt-compact th,
table.dt.dt-compact td,
table.table.compact th,
table.table.compact td { padding: 9px 13px; }
table.dt.dt-compact tbody td,
table.table.compact tbody td { height: 38px; }

/* ---------- 产品中心：产品经营轨道 ---------- */
.product-center-page { display:flex; flex-direction:column; gap:12px; min-width:0; max-width:100%; }
.product-title-row {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
}
.product-title-actions { display:flex; gap:8px; flex-wrap:wrap; justify-content:flex-end; }
.product-page-note { font-size:12.5px; color:var(--text-3); line-height:1.45; }
.product-control-bar {
  display:flex;
  align-items:flex-end;
  flex-wrap:wrap;
  gap:10px;
  padding:10px;
  background:var(--ky-control-bg);
  border:1px solid var(--border);
  border-radius:8px;
  min-width:0;
}
.product-search-field,
.product-filter-field {
  position:relative;
  display:grid;
  gap:4px;
  flex:0 1 138px;
  min-width:118px;
  color:var(--text-3);
  font-size:12px;
}
.product-search-field { flex:1 1 280px; max-width:420px; min-width:220px; }
.product-search-field > span,
.product-filter-field > span { display:flex;align-items:center;gap:5px;white-space:nowrap; }
.product-search-field i,
.product-filter-field i { width:5px;height:5px;border-radius:50%;background:var(--primary);opacity:0;transform:scale(.65);transition:opacity .14s ease,transform .14s ease; }
.product-search-field.has-value i,
.product-filter-field.has-value i { opacity:.82;transform:scale(1); }
.product-search-field input,
.product-filter-field select { width:100%;height:34px;font-size:12.5px; }
.product-filter-meta { display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:230px;color:var(--text-3);font-size:12px;white-space:nowrap; }
.product-filter-clear { border:0;background:transparent;padding:2px 0;color:var(--primary);font:inherit;font-weight:650;cursor:pointer; }
.product-filter-clear:hover,
.product-filter-clear:focus-visible { color:var(--primary-strong);text-decoration:underline;outline:none; }
.product-filter-clear.is-hidden { visibility:hidden;pointer-events:none; }
.product-count { color:var(--text-3); font-size:12.5px; white-space:nowrap; padding:0 4px; }
.product-table-card { box-shadow:none; border-color:var(--border-soft); overflow:hidden; min-width:0; max-width:100%; }
.product-table-card .table-wrap { max-width:100%;overflow:auto; }
.product-center-page table.dt { min-width:760px;font-size:12.5px; }
.product-center-page table.dt th,
.product-center-page table.dt td { padding:8px 13px; height:48px; }
.product-center-page table.dt td { vertical-align:middle; }
.product-center-page table.dt thead th {
  height:40px;
  background:var(--ky-table-head-bg);
  color:var(--ky-table-head-text);
  font-size:11.5px;
  font-weight:720;
  border-bottom:1px solid var(--ky-table-border);
  box-shadow:none;
}
.product-center-page table.dt tbody tr { border-bottom:1px solid var(--ky-table-row-border); background:#fff; }
.product-center-page table.dt tbody tr:hover { background:var(--ky-table-hover-bg); box-shadow:none; }
.product-center-page table.dt tbody tr:hover .product-model-link,
.product-center-page table.dt tbody tr:hover .product-last-sale { color:var(--primary); }
.product-center-page table.dt td.num,
.product-center-page table.dt th.num { text-align:right; }
.product-name-cell { display:flex;align-items:flex-start;gap:9px;min-width:0; }
.product-name-cell > div { display:grid;gap:3px;min-width:0; }
.product-name-cell small { color:var(--text-3);font-size:11px;line-height:1.35;overflow-wrap:anywhere; }
.product-sales-state { flex:0 0 auto;width:7px;height:7px;margin-top:6px;border-radius:50%;background:#c8d1dc;box-shadow:0 0 0 3px rgba(200,209,220,.20); }
.product-sales-state.current { background:#4e91a8;box-shadow:0 0 0 3px rgba(78,145,168,.12); }
.product-sales-state.history { background:#8297aa;box-shadow:0 0 0 3px rgba(130,151,170,.12); }
.product-model-link {
  margin:0;
  display:inline;
  align-items:center;
  max-width:100%;
  min-width:0;
  white-space:normal;
  overflow-wrap:anywhere;
  color:var(--accent);
  font-weight:680;
  line-height:1.4;
  vertical-align:middle;
}
.product-taxonomy-cell { display:grid;gap:2px;min-width:0; }
.product-taxonomy-cell strong { color:var(--text);font-size:12.5px;font-weight:680; }
.product-taxonomy-cell span { color:var(--text-3);font-size:11.5px; }
.product-brand-cell { color:var(--text-2);font-weight:630; }
.product-last-sale { color:var(--text-2);font-variant-numeric:tabular-nums;transition:color .14s ease; }
.product-spec-cell {
  display:grid;
  gap:2px;
  min-width:0;
}
.product-spec-cell b,
.product-spec-cell span {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.product-spec-cell b { color:var(--text); font-weight:700; }
.product-spec-cell span { color:var(--text-3); font-size:11.5px; }
.product-row-actions {
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  min-width:160px;
}
.product-center-page td:last-child .back-link {
  margin:0;
  color:#4f6680;
  font-size:12.5px;
  font-weight:600;
}

/* ---------- 产品档案：产品运行核心 ---------- */
.product-archive { min-width:0;max-width:100%; }
.product-archive .section { margin-bottom:12px; }
.product-archive-back { display:inline-flex;margin:0 0 10px; }
.product-core-card { position:relative;overflow:hidden;min-width:0;animation:kyProductCoreIn .28s ease-out both; }
.product-core-card::after { content:"";position:absolute;right:-90px;top:-136px;width:420px;height:238px;border:1px solid rgba(78,125,170,.10);border-radius:50%;transform:rotate(-9deg);pointer-events:none; }
.product-core-head { position:relative;z-index:1;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--border-soft); }
.product-core-heading { min-width:0; }
.product-archive-actions {
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.product-core-body { position:relative;z-index:1;display:grid;grid-template-columns:minmax(260px,.9fr) minmax(320px,1.1fr);gap:0;margin-top:14px;min-width:0; }
.product-core-identity { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px 16px;padding-right:18px;min-width:0; }
.product-core-fact { min-width:0; }
.product-core-fact span,
.product-core-section-label { display:block;margin-bottom:4px;color:var(--text-3);font-size:11.5px; }
.product-core-fact strong { display:block;color:var(--text);font-size:13px;line-height:1.42;overflow-wrap:anywhere; }
.product-core-performance { min-width:0;padding:0 0 0 18px;border-left:1px solid var(--border-soft); }
.product-core-performance { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;align-content:start; }
.product-core-performance .product-core-metric + .product-core-metric { border-left:1px solid var(--border-soft); }
.product-core-metric { min-width:0;padding:2px 10px; }
.product-core-metric span { display:block;min-height:30px;color:var(--text-3);font-size:11.5px;line-height:1.35; }
.product-core-metric strong { display:block;color:var(--text);font-size:15px;font-weight:750;line-height:1.35;overflow-wrap:anywhere; }
.product-core-metric.good strong { color:var(--good); }
.product-core-metric.bad strong { color:var(--bad); }
.product-core-metric.info strong { color:var(--primary); }
.product-archive-card { border-radius:8px; }
.product-archive-history { display:grid; gap:10px; }
.product-operating-grid { display:grid;grid-template-columns:minmax(0,7fr) minmax(280px,3fr);gap:16px;align-items:stretch;min-width:0; }
.product-trend-main { min-width:0;width:100%; }
.product-panel-title { margin-bottom:8px;font-size:14px; }
.product-chart-summary { display:flex;flex-wrap:wrap;gap:7px 12px;margin-bottom:8px;color:var(--text-3);font-size:12px; }
.product-chart-summary b { color:var(--text); }
.product-sales-chart { position:relative;width:100%;height:290px;border:1px solid var(--border-soft);border-radius:8px;background:var(--card-2);padding:8px;overflow:auto; }
.product-sales-chart svg { width:100%;height:100%;min-width:620px; }
.product-inventory-panel { min-width:0;padding-left:16px;border-left:1px solid var(--border-soft); }
.product-inventory-rows { display:grid;gap:0; }
.product-inventory-row { display:flex;align-items:flex-start;justify-content:space-between;gap:12px;min-width:0;padding:8px 0;border-bottom:1px solid var(--border-soft);font-size:12.5px;line-height:1.4; }
.product-inventory-row span { flex:0 0 auto;color:var(--text-3); }
.product-inventory-row strong { min-width:0;color:var(--text);font-weight:680;text-align:right;overflow-wrap:anywhere; }
.product-inventory-row.strong strong { font-size:15px; }
.product-inventory-row.good strong { color:var(--good); }
.product-inventory-row.bad strong { color:var(--bad); }
.product-inventory-row.info strong { color:var(--primary); }
.product-coverage { margin-top:14px; }
.product-coverage-track { position:relative;height:4px;border-radius:4px;background:#e5ebf2; }
.product-coverage-fill { position:absolute;inset:0 auto 0 0;border-radius:4px;background:#8ea7bc; }
.product-coverage-fill.good { background:#6f9d8a; }
.product-coverage-fill.bad { background:#b66b68; }
.product-coverage-fill.info { background:#668cad; }
.product-coverage-target { position:absolute;top:-3px;width:1px;height:10px;background:#566b7f;transform:translateX(-.5px); }
.product-coverage-current { position:absolute;top:50%;width:8px;height:8px;border:2px solid #fff;border-radius:50%;background:#70879a;box-shadow:0 0 0 1px rgba(36,74,105,.16);transform:translate(-50%,-50%); }
.product-coverage-current.good { background:#4f866f; }
.product-coverage-current.bad { background:#a84f4b; }
.product-coverage-current.info { background:#416f96; }
.product-coverage-scale { display:flex;justify-content:space-between;margin-top:5px;color:var(--text-3);font-size:10.5px; }
.product-arrival-rhythm { margin-top:13px;padding-top:11px;border-top:1px solid var(--border-soft);min-width:0; }
.product-arrival-heading { margin-bottom:7px;color:var(--text-2);font-size:12px;font-weight:720; }
.product-arrival-list { display:grid;gap:5px;min-width:0; }
.product-arrival-row { display:grid;grid-template-columns:minmax(64px,.8fr) auto minmax(70px,.7fr) minmax(112px,1.15fr);align-items:center;gap:7px;min-width:0;padding:5px 0;color:var(--text-2);font-size:11.5px;line-height:1.35; }
.product-arrival-row + .product-arrival-row { border-top:1px dashed var(--border-soft); }
.product-arrival-row.is-arrival-overflow { display:none; }
.product-arrival-rhythm.is-expanded .product-arrival-row.is-arrival-overflow { display:grid; }
.product-arrival-date { min-width:0;color:var(--text-3);font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.product-arrival-quantity { color:var(--primary);font-size:12px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap; }
.product-arrival-balance { min-width:0;text-align:right;overflow-wrap:anywhere; }
.product-arrival-balance b { color:var(--text);font-weight:720;font-variant-numeric:tabular-nums; }
.product-arrival-empty { padding:7px 0;color:var(--text-3);font-size:11.5px; }
.product-arrival-toggle { margin-top:7px;border:0;background:transparent;padding:2px 0;color:var(--primary);font:inherit;font-size:11.5px;font-weight:650;cursor:pointer; }
.product-arrival-toggle:hover,
.product-arrival-toggle:focus-visible { color:var(--primary-strong);text-decoration:underline;outline:none; }
.product-month-bars {
  display:grid;
  grid-template-columns:repeat(12, minmax(36px, 1fr));
  gap:7px;
  align-items:end;
  padding:10px;
  border:1px solid var(--border-soft);
  border-radius:8px;
  background:var(--card-2);
  overflow:auto;
}
.product-month-bar {
  display:grid;
  justify-items:center;
  gap:4px;
  min-width:36px;
}
.product-month-track {
  display:flex;
  align-items:flex-end;
  justify-content:center;
  width:24px;
  height:70px;
  border-bottom:1px solid var(--border);
}
.product-month-track i {
  display:block;
  width:18px;
  border-radius:4px 4px 2px 2px;
  background:var(--accent);
}
.product-month-bar b {
  max-width:44px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  color:var(--text);
  font-size:11px;
  font-variant-numeric:tabular-nums;
}
.product-month-bar span { color:var(--text-3); font-size:11px; }
.product-archive-table { min-width:680px; font-size:12.5px; }
.product-archive-table th,
.product-archive-table td { vertical-align:middle; }
.product-customer-analysis { display:grid; gap:14px; }
.product-sales-detail .section-head { align-items:flex-end;gap:14px; }
.product-sales-controls { display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap;min-width:0; }
.product-sales-controls input,
.product-sales-controls select { height:34px;border-radius:7px;font-size:12.5px; }
.product-sales-controls input { width:280px;max-width:100%; }
.product-sales-controls select { width:140px; }
.product-sales-result { color:var(--text-3);font-size:12px;white-space:nowrap; }
.product-section-controls { display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:flex-end;gap:8px;margin:0 0 9px;padding:8px;border:1px solid var(--border-soft);border-radius:8px;background:var(--ky-control-bg); }
.product-control-field { display:grid;gap:4px;color:var(--text-3);font-size:12px;min-width:118px; }
.product-control-field input,
.product-control-field select { width:100%;height:34px;font-size:12.5px; }
.product-customer-search,
.product-sales-search { min-width:190px;max-width:240px; }
.product-customer-cycle-table { min-width:940px; }
.product-customer-cycle-table th:nth-child(1),
.product-customer-cycle-table td:nth-child(1) { min-width:170px; }
.product-customer-months-detail {
  min-width:220px;
  max-width:360px;
  white-space:normal;
  line-height:1.45;
}
.product-customer-month-table {
  min-width:980px;
  table-layout:fixed;
  font-size:12.5px;
}
.product-customer-month-table th:first-child,
.product-customer-month-table td:first-child { width:180px; }
.product-customer-month-table th:not(:first-child),
.product-customer-month-table td:not(:first-child) { width:66px; }
.product-customer-month-table .is-current-month { background:#edf4fc; }
.product-customer-month-table .matrix-cell { display:inline-flex;align-items:center;justify-content:flex-end;min-width:38px;min-height:25px;padding:3px 6px;border-radius:5px; }
.product-customer-month-table .matrix-cell.has-value { background:#edf4fc;color:var(--primary);font-weight:680; }
.product-customer-month-table .matrix-cell.hot { background:#dceaf8;color:var(--primary); }
.product-sales-delta.up,
.product-change-state.up { color:#287358; }
.product-sales-delta.down,
.product-change-state.down { color:var(--bad); }
.product-sales-delta.steady,
.product-change-state.steady { color:var(--text-3); }
.product-change-state { display:inline-flex;align-items:center;gap:5px;font-weight:650; }
.product-change-state::before { content:"";width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.72; }
.product-empty-line {
  padding:11px 12px;
  border:1px dashed var(--border);
  border-radius:8px;
  background:var(--card-2);
  color:var(--text-3);
  text-align:center;
  font-size:12.5px;
}
.product-note-toolbar {
  display:flex;
  align-items:center;
  gap:8px;
  margin-bottom:8px;
}
.product-note-toolbar select { width:110px; height:34px; }
.product-note-toolbar input { flex:1; min-width:160px; height:34px; }
.product-note-list .tl-item { background:#fff; }
@keyframes kyProductCoreIn { from { opacity:.76;transform:translateY(3px); } to { opacity:1;transform:none; } }
@media (max-width: 1100px) {
  .product-filter-meta { flex:1 1 100%;justify-content:flex-start;min-width:0; }
  .product-core-body { grid-template-columns:minmax(220px,.9fr) minmax(0,1.1fr); }
  .product-operating-grid { grid-template-columns:minmax(0,1fr); }
  .product-inventory-panel { padding:14px 0 0;border-left:0;border-top:1px solid var(--border-soft); }
  .product-sales-detail .section-head { align-items:flex-start;flex-direction:column; }
  .product-sales-controls { justify-content:flex-start;width:100%; }
}
@media (max-width: 780px) {
  .product-title-row,
  .product-core-head { flex-direction:column; }
  .product-title-actions,
  .product-archive-actions { justify-content:flex-start; }
  .product-search-field { flex-basis:100%;max-width:none; }
  .product-filter-field { flex:1 1 calc(50% - 8px); }
  .product-core-body { grid-template-columns:minmax(0,1fr); }
  .product-core-performance { margin-top:14px;padding:14px 0 0;border-left:0;border-top:1px solid var(--border-soft); }
  .product-section-controls { justify-content:flex-start; }
  .product-control-field { flex:1 1 140px;max-width:none; }
  .product-customer-search,
  .product-sales-search { flex-basis:100%;max-width:none; }
  .product-note-toolbar { flex-direction:column; align-items:stretch; }
  .product-note-toolbar select,
  .product-note-toolbar input,
  .product-note-toolbar .btn { width:100%; }
}
@media (max-width: 480px) {
  .product-control-bar { padding:9px; }
  .product-filter-field { flex-basis:100%; }
  .product-filter-meta { display:grid;grid-template-columns:auto auto 1fr;gap:7px;width:100%; }
  .product-filter-meta .product-count { text-align:right; }
  .product-core-identity,
  .product-core-performance { grid-template-columns:minmax(0,1fr); }
  .product-core-performance .product-core-metric + .product-core-metric { margin-top:9px;padding:9px 0 0;border-left:0;border-top:1px solid var(--border-soft); }
  .product-core-metric { padding:2px 0; }
  .product-section-controls { align-items:stretch; }
  .product-control-field { flex-basis:100%; }
  .product-sales-controls { align-items:stretch;flex-direction:column; }
  .product-sales-controls input,
  .product-sales-controls select { width:100%;max-width:none; }
  .product-sales-result { white-space:normal; }
  .product-sales-chart { height:260px; }
  .product-sales-chart svg { min-width:620px; }
  .product-arrival-row,
  .product-arrival-rhythm.is-expanded .product-arrival-row.is-arrival-overflow { grid-template-columns:minmax(0,1fr) auto;gap:5px 8px; }
  .product-arrival-quantity { text-align:left; }
  .product-arrival-balance { text-align:right; }
}

/* ---------- 行动卡 ---------- */
.action-col { display: flex; flex-direction: column; gap: 10px; }
.action-col-head { display:flex; align-items:center; gap:8px; font-weight:650; font-size:14px; margin-bottom: 2px; }
.action-col-head .count { font-size: 12px; color: var(--text-3); font-weight: 500; }
.action {
  border: 1px solid var(--border); border-radius: 12px;
  padding: 13px 15px; background: #fff;
  border-left: 3px solid var(--neutral);
  cursor: pointer; transition: box-shadow .12s, transform .12s, border-color .12s;
}
.action:hover { box-shadow: var(--shadow); transform: translateY(-1px); border-color:#d6e0eb; }
.action.sev-bad { border-left-color: var(--bad); }
.action.sev-warn { border-left-color: var(--warn); }
.action.sev-good { border-left-color: var(--good); }
.action.sev-info { border-left-color: var(--info); }
.action-title { font-weight: 620; font-size: 13.5px; display:flex; justify-content:space-between; gap:8px; }
.action-reason { font-size: 12.5px; color: var(--text-2); margin-top: 5px; }

/* ---------- 图表 ---------- */
.chart-box { position: relative; height: 320px; }
.chart-box.sm { height: 240px; }
.legend-inline { display:flex; gap:16px; flex-wrap:wrap; font-size:12px; color:var(--text-2); margin-top:10px; }
.legend-inline span { display:inline-flex; align-items:center; gap:6px; }
.legend-inline i { width:12px; height:3px; border-radius:2px; display:inline-block; }

/* ---------- 杂项 ---------- */
.empty {
  text-align: center; color: var(--text-3); padding: 58px 22px;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(255,255,255,.78), rgba(247,250,253,.72));
  border: 1px dashed rgba(203,213,225,.85);
}
.empty .big { font-size: 15px; color: var(--text-2); margin-bottom: 6px; font-weight: 700; }
.kv { display:flex; justify-content:space-between; gap:14px; padding:10px 0; border-bottom:1px solid var(--border-soft); font-size:13px; }
.kv:last-child { border-bottom:none; }
.kv .k { color: var(--text-3); }
.kv .v { font-weight: 650; text-align:right; }
.pill-row { display:flex; gap:8px; flex-wrap:wrap; }
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content:''; position:absolute; left:5px; top:4px; bottom:4px; width:2px; background:#d9e2ee; }
.tl-item { position: relative; padding: 0 0 16px 8px; }
.tl-item::before { content:''; position:absolute; left:-16px; top:4px; width:9px; height:9px; border-radius:50%; background:var(--accent); border:2px solid #fff; box-shadow:0 0 0 3px var(--primary-50); }
.tl-date { font-size:11.5px; color:var(--text-3); }
.tl-text { font-size:13px; }
.back-link { color: var(--accent); cursor: pointer; font-size: 13px; display:inline-flex; gap:5px; align-items:center; margin-bottom: 14px; }
.subtle-note { font-size: 12px; color: var(--text-3); margin-top: 8px; }
.progress { height:6px; background:var(--bg-soft); border-radius:999px; overflow:hidden; }
.progress > i { display:block; height:100%; border-radius:999px; }
.toolbar {
  display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:16px;
  padding: 2px 0;
  animation: kySoftIn .18s ease both;
}
.content > .toolbar,
.content > [class$="-page"] > .toolbar,
.content .customer-ledger-toolbar {
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:var(--radius);
  background:var(--ky-control-bg);
}
.content > .toolbar:focus-within,
.content > [class$="-page"] > .toolbar:focus-within,
.content .customer-ledger-toolbar:focus-within,
.product-control-bar:focus-within { border-color:#c4d5e5;box-shadow:0 0 0 3px rgba(78,125,170,.07); }
.toolbar .grow { flex:1; }
/* 工具栏内控件统一高度，对齐基线 */
.toolbar input[type=text], .toolbar select, .toolbar .seg, .toolbar .seg button, .toolbar .btn { height:34px; box-sizing:border-box; }
.toolbar .seg { padding:3px; display:inline-flex; align-items:center; }
.toolbar .seg button { height:28px; padding:0 14px; }
.inline-f { display:inline-flex; align-items:center; gap:5px; font-size:13px; color:var(--text-3); white-space:nowrap; }
.inline-f select { height:34px; }
.tag-input { min-width: 220px; }
.setting-row { display:flex; align-items:center; gap:14px; padding:12px 0; border-bottom:1px solid var(--border-soft); }
.setting-row .lbl { flex:1; }
.setting-row .lbl small { display:block; color:var(--text-3); font-weight:400; font-size:11.5px; margin-top:2px; }
.dropzone {
  border:1.5px dashed #cbd7e5; border-radius:var(--radius); padding:42px; text-align:center;
  color:var(--text-3); background:linear-gradient(180deg, #fff 0%, var(--card-2) 100%); cursor:pointer; transition:border-color .15s, background .15s, box-shadow .15s;
}
.dropzone:hover, .dropzone.drag { border-color:var(--accent); background:var(--primary-50); box-shadow: inset 0 0 0 1px rgba(53,109,163,.08), 0 10px 24px rgba(23,59,109,.08); }
.toast { position:fixed; bottom:24px; right:24px; background:var(--text); color:#fff; padding:12px 18px; border-radius:12px; box-shadow:var(--shadow-md); font-size:13px; z-index:100; opacity:0; transform:translateY(8px); transition:opacity .2s, transform .2s; }
.toast.show { opacity:1; transform:translateY(0); }

/* ---------- 关联卡片（案例关联客户/产品） ---------- */
.rel-grid { display:flex; flex-wrap:wrap; gap:10px; }
.rel-card { position:relative; display:flex; gap:10px; align-items:flex-start; width:300px; max-width:100%; padding:13px 15px 12px; border-radius:13px; border:1px solid var(--border); cursor:pointer; transition:box-shadow .12s, transform .12s, border-color .12s; }
.rel-card:hover { box-shadow:var(--shadow); transform:translateY(-1px); border-color:#d6e0eb; }
.rel-card.cust { background:var(--info-bg); border-color:#dbe7f3; }
.rel-card.prod { background:var(--warn-bg); border-color:#eee0c4; }
.rel-ico { width:30px; height:30px; border-radius:8px; display:grid; place-items:center; font-size:14px; flex-shrink:0; color:#fff; }
.rel-card.cust .rel-ico { background:var(--info); }
.rel-card.prod .rel-ico { background:var(--warn); }
.rel-body { min-width:0; flex:1; }
.rel-title { font-weight:650; font-size:13.5px; line-height:1.3; word-break:break-all; }
.rel-sub { font-size:12px; color:var(--text-2); margin-top:1px; word-break:break-all; }
.rel-aux { font-size:11.5px; color:var(--text-3); margin-top:5px; }
.rel-del { position:absolute; top:7px; right:9px; cursor:pointer; color:var(--text-3); font-size:15px; line-height:1; }
.rel-del:hover { color:var(--bad); }
.rel-empty { padding:24px 18px; text-align:center; color:var(--text-3); border:1px dashed #cbd7e5; border-radius:13px; background:var(--card-2); }

/* ---------- 客户中心顶部统计（5 卡） ---------- */
.cc-stats { display:grid; grid-template-columns:repeat(5,1fr); gap:14px; }
@media (max-width:900px){ .cc-stats { grid-template-columns:repeat(2,1fr); } }

/* ---------- 首页「团队今日」辅助管理模块（视觉弱于经营核心指标） ---------- */
.tt-card { border-left: 3px solid var(--border); }
.tt-strip {
  display: grid; grid-template-columns: repeat(6, 1fr);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--card-2);
}
.tt-cell { padding: 14px 12px 12px; text-align: center; border-right: 1px solid var(--border-soft); }
.tt-cell:last-child { border-right: none; }
.tt-val { font-size: 22px; font-weight: 660; line-height: 1; letter-spacing: .3px; color: var(--text); }
.tt-val.good { color: var(--good); }
.tt-val.bad  { color: var(--bad); }
.tt-val.info { color: var(--info); }
.tt-label { font-size: 12px; color: var(--text-3); margin-top: 9px; letter-spacing: .3px; }
.tt-hint { margin-top: 13px; font-size: 12.5px; color: var(--text-2); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tt-hint b { font-weight: 600; }
.tt-hint b.good { color: var(--good); }
.tt-hint b.bad  { color: var(--bad); }
.tt-hint .tt-dot { color: var(--border); }
@media (max-width: 900px) {
  .tt-strip { grid-template-columns: repeat(3, 1fr); }
  .tt-cell:nth-child(3) { border-right: none; }
  .tt-cell:nth-child(-n+3) { border-bottom: 1px solid var(--border-soft); }
}

/* ---------- 每日工作：今日工作总览 / 待提交员工 / 日报表单 ---------- */
.ov-grid {
  display: grid; grid-template-columns: 1.1fr 1fr 1.2fr;
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--card-2);
}
.ov-block { padding: 16px 18px; border-right: 1px solid var(--border-soft); }
.ov-block:last-child { border-right: none; }
.ov-h { font-size: 11.5px; color: var(--text-3); letter-spacing: 1px; margin-bottom: 12px; font-weight: 600; }
.ov-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 5px 0; }
.ov-row .l { font-size: 12.5px; color: var(--text-2); }
.ov-row .v { font-size: 19px; font-weight: 660; color: var(--text); letter-spacing: .3px; }
.ov-row .v.bad { color: var(--bad); }
.ov-row .v.good { color: var(--good); }
.ov-row .v.info { color: var(--info); }
.ov-progress { margin-top: 12px; }
.ov-progress .pl { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--text-3); margin-bottom: 6px; }
.ov-hint { list-style: none; margin: 0; padding: 0; }
.ov-hint li { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--text-2); padding: 6px 0; line-height: 1.5; }
.ov-hint li .dotm { width: 7px; height: 7px; border-radius: 50%; margin-top: 5px; flex: none; }
@media (max-width: 900px) {
  .ov-grid { grid-template-columns: 1fr; }
  .ov-block { border-right: none; border-bottom: 1px solid var(--border-soft); }
  .ov-block:last-child { border-bottom: none; }
}

.daily-stat {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--border-soft); border-radius: var(--radius-sm);
  overflow: hidden; background: var(--card-2);
}
@media (max-width: 700px) { .daily-stat { grid-template-columns: repeat(2, 1fr); } }

.pending-emp { border-left: 3px solid var(--bad); }
.emp-chip {
  display: inline-flex; flex-direction: column; gap: 2px;
  padding: 8px 13px; border: 1px solid var(--border); border-left: 2px solid var(--bad);
  border-radius: 9px; background: var(--card-2);
}
.emp-chip .n { font-size: 13px; font-weight: 600; color: var(--text); }
.emp-chip .r { font-size: 11px; color: var(--text-3); }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
@media (max-width: 760px) { .form-grid { grid-template-columns: 1fr; } }
.fld label { display: block; font-size: 12px; color: var(--text-2); margin-bottom: 5px; font-weight: 500; }
.fld textarea {
  width: 100%; font-family: inherit; font-size: 13px; color: var(--text);
  border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px;
  background: var(--card-2); resize: vertical; outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.fld textarea:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 3px var(--primary-50); }
.fld textarea:disabled { background: var(--bg-soft); color: var(--text-2); }
.daily-link-box { max-height: 180px; overflow: auto; border: 1px solid var(--border-soft); border-radius: 10px; padding: 8px; background: #fff; }
.daily-link-box label { display: flex; gap: 8px; align-items: center; font-size: 12.5px; padding: 7px 8px; border-radius: 8px; }
.daily-link-box .pp-row { min-height: 42px; cursor: pointer; transition: background .12s, border-color .12s; border: 1px solid transparent; }
.daily-link-box .pp-row:hover { background: var(--card-2); border-color: var(--border-soft); }
.daily-link-box .pp-row.checked, .daily-link-box .pp-row:has(.pp-chk:checked) { background: var(--primary-50); border-color: #d7e4f2; }
.daily-link-box .pp-chk { width: 14px; height: 14px; flex: 0 0 14px; margin: 0; accent-color: var(--primary); }
.daily-link-box .pp-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; flex: 1; }
.daily-link-box .pp-top { display: flex; align-items: baseline; gap: 7px; min-width: 0; }
.daily-link-box .pp-name { font-size: 13px; font-weight: 650; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.daily-link-box .pp-account { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }
.daily-link-box .pp-meta { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.daily-link-box .pp-badge { display: inline-flex; align-items: center; min-height: 18px; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600; line-height: 1.5; color: var(--text-2); background: var(--bg-soft); }
.daily-link-box .pp-badge.role { color: var(--accent); background: var(--primary-50); }
.daily-link-box .pp-badge.dept { color: var(--neutral); background: var(--neutral-bg); }
.daily-link-box .pp-badge.muted { color: var(--text-3); background: var(--border-soft); }

/* 待办详情：处理工作台（左信息 + 右操作面板） */
.td-grid { display: grid; grid-template-columns: 1fr 320px; gap: 16px; align-items: start; }
@media (max-width: 980px) { .td-grid { grid-template-columns: 1fr; } }
.td-main { display: flex; flex-direction: column; gap: 16px; }
.td-head { position: relative; overflow: hidden; background: #fbfcfe; border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 18px 20px; display: flex; gap: 18px; flex-wrap: wrap; justify-content: space-between; }
.td-head::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary); }
.td-head .hl { flex: 1; min-width: 240px; }
.td-head .ttl { font-size: 18px; font-weight: 700; color: var(--text); }
.td-head .badges { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 9px; }
.td-head .meta { font-size: 12px; color: var(--text-3); margin-top: 11px; line-height: 1.85; }
.td-head .meta .lnk { color: var(--accent); cursor: pointer; }
.td-statusbox { min-width: 200px; background: var(--card-2); border: 1px solid var(--border-soft); border-radius: 12px; padding: 12px 14px; align-self: flex-start; }
.td-statusbox .h { font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--text-3); margin-bottom: 6px; }
.td-statusbox .row { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 12.5px; border-bottom: 1px solid var(--border-soft); }
.td-statusbox .row:last-child { border-bottom: none; }
.td-statusbox .row .k { color: var(--text-3); } .td-statusbox .row .v { color: var(--text); font-weight: 600; }
.td-card { background: #fbfcfe; border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 16px 18px; }
.td-card .h { font-size: 14px; font-weight: 680; color: var(--text); margin-bottom: 10px; }
.td-grp { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 24px; }
@media (max-width: 680px) { .td-grp { grid-template-columns: 1fr; } }
.td-panel { background: #fbfcfe; border: 1px solid var(--border-soft); border-radius: 14px; box-shadow: var(--shadow-sm); padding: 16px 18px; position: sticky; top: 76px; }
.td-panel .h { font-size: 14px; font-weight: 680; color: var(--text); margin-bottom: 12px; }
.td-ops { display: flex; flex-direction: column; gap: 4px; }
.td-ops .btn { width: 100%; justify-content: center; margin-top: 8px; }
.td-ops .cap { font-size: 11px; color: var(--text-3); text-align: center; margin-top: 3px; }
.td-ops .sep { height: 1px; background: var(--border-soft); margin: 12px 0 2px; }
.td-more { margin-top: 12px; border-top: 1px solid var(--border-soft); padding-top: 8px; }
.td-more > summary { cursor: pointer; list-style: none; font-size: 13px; font-weight: 600; color: var(--accent); user-select: none; padding: 2px 0; }
.td-more > summary::-webkit-details-marker { display: none; }
.td-more > summary::after { content: ' ▾'; }
.td-more[open] > summary::after { content: ' ▴'; }

/* 员工日报卡片列表（替代表格） */
.dr-list { display: flex; flex-direction: column; gap: 12px; }
.dr-card { background: #fbfcfe; border: 1px solid var(--border-soft); border-left: 3px solid var(--neutral); border-radius: 12px; box-shadow: 0 1px 2px rgba(20,33,56,.04); padding: 14px 16px; }
.dr-card.sev-good { border-left-color: var(--good); } .dr-card.sev-bad { border-left-color: var(--bad); } .dr-card.sev-warn { border-left-color: var(--warn); } .dr-card.sev-info { border-left-color: var(--info); }
.dr-card .drc-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dr-card .who .nm { font-size: 14px; font-weight: 650; color: var(--text); }
.dr-card .who .mt { font-size: 12px; color: var(--text-3); margin-left: 8px; }
.dr-card .st { display: flex; align-items: center; gap: 10px; }
.dr-card .st .tm { font-size: 12px; color: var(--text-3); font-weight: 400; }
.dr-card .dr-body { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 12px; }
@media (max-width: 780px) { .dr-card .dr-body { grid-template-columns: 1fr; gap: 10px; } }
.dr-card .dr-blk .bl { font-size: 11px; font-weight: 600; letter-spacing: .5px; color: var(--text-3); margin-bottom: 5px; }
.dr-card .dr-blk.warn .bl { color: var(--warn); }
.dr-card .dr-blk .bv { font-size: 13px; color: var(--text-2); line-height: 1.6; }
.dr-card .dr-blk.warn .bv { color: var(--text); }
.dr-card .dr-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-soft); font-size: 12px; }
.dr-card .dr-toggle { color: var(--accent); font-weight: 600; cursor: pointer; white-space: nowrap; }
.dr-card .dr-detail { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border-soft); }

/* 清单式日报：工作项行 */
.dr-section { margin-bottom: 18px; }
.dr-h { font-size: 13.5px; font-weight: 650; color: var(--text); }
.dr-sub { font-size: 12px; color: var(--text-3); margin: 2px 0 9px; }
.wi-list { display: flex; flex-direction: column; gap: 8px; }
.wi-row { display: flex; align-items: center; gap: 8px; }
.wi-input { flex: 1; height: 38px; }
.wi-del { color: var(--text-3); cursor: pointer; font-size: 17px; line-height: 1; padding: 4px 7px; border-radius: 6px; flex: none; user-select: none; }
.wi-del:hover { color: var(--bad); background: var(--bad-bg); }
.ui-row { border: 1px solid var(--border-soft); border-left: 2px solid var(--warn); border-radius: 9px; padding: 10px 12px; background: var(--card-2); display: flex; flex-direction: column; gap: 8px; }
.ui-row .ui-line { display: flex; align-items: center; gap: 8px; }
.ui-row .ui-line .ui-item { flex: 1; height: 36px; }
.ui-row .ui-reason { height: 34px; }
.ui-row .ui-foot { display: flex; align-items: center; gap: 12px; }
.ui-row .ui-foot .ui-next { flex: 1; height: 34px; }
.dr-collapse { margin-top: 6px; border-top: 1px solid var(--border-soft); padding-top: 10px; }
.dr-collapse > summary { cursor: pointer; font-size: 12.5px; color: var(--accent); list-style: none; user-select: none; }
.dr-collapse > summary::-webkit-details-marker { display: none; }
.dr-collapse > summary::before { content: '▸ '; color: var(--text-3); }
.dr-collapse[open] > summary::before { content: '▾ '; }

/* ---------- 我的工作台（三段式：状态栏 / 两列核心 / 团队·案例）---------- */
/* 页面层：浅灰蓝 + 左上极淡蓝光，制造空间层次 */
.wb-page { position:relative; }
.wb-page::before { content:""; position:absolute; inset:-24px -28px auto; height:360px; z-index:0; pointer-events:none;
  background:radial-gradient(680px 300px at 14% -10%, rgba(61,110,165,.08), transparent 62%); }
.wb-page > * { position:relative; z-index:1; }
.wb-page .section { margin-bottom:18px; }

/* 第一段：页面 Header（页面工具栏，非卡片；不显示用户名，无边框无大阴影） */
.wb-header { display:flex; align-items:flex-end; justify-content:space-between; gap:14px 20px; flex-wrap:wrap; margin-bottom:18px; }
.wb-header .wb-htitle .t { font-size:21px; font-weight:600; color:var(--text); letter-spacing:.3px; }
.wb-header .wb-htitle .s { font-size:12.5px; color:var(--text-3); margin-top:4px; }
.wb-header .wb-htools { display:flex; align-items:center; gap:14px; flex-wrap:wrap; }
.wb-header .wb-hmeta { font-size:12.5px; color:var(--text-3); display:inline-flex; align-items:center; gap:6px; white-space:nowrap; }

/* 第一行：今日行动摘要(左) + 我的今日状态(右) */
.wb-action { display:grid; grid-template-columns:1.7fr 1fr; gap:18px; align-items:stretch; }
@media (max-width:900px){ .wb-action { grid-template-columns:1fr; } }
/* 主卡（今日行动摘要）：最强视觉，左侧深蓝细条 + 顶部极淡蓝渐变 + 略强阴影 */
.wb-summary { position:relative; overflow:hidden; border:1px solid var(--border); border-radius:16px;
  background:linear-gradient(180deg, #f5f8fc 0%, #fbfcfe 46%); box-shadow:0 6px 20px rgba(20,33,56,.07);
  padding:22px 24px; display:flex; flex-direction:column; min-height:180px; }
.wb-summary::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background:var(--primary); }
.wb-summary .h { font-size:16px; font-weight:680; color:var(--text); letter-spacing:.3px; }
.wb-summary .lead { margin:14px 0 0; }
.wb-summary .lead-a { font-size:15px; font-weight:600; color:var(--text); line-height:1.6; }
.wb-summary .lead-a .hl-bad { color:var(--bad); } .wb-summary .lead-a .hl-warn { color:var(--warn); }
.wb-summary .lead-b { margin-top:10px; font-size:12.5px; color:var(--text-3); display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.wb-summary .acts { margin-top:auto; padding-top:18px; display:flex; gap:8px; flex-wrap:wrap; }

/* 辅助卡（我的今日状态）：更轻、更小圆角 */
.wb-status { background:#fbfcfe; border:1px solid var(--border-soft); border-radius:14px; box-shadow:0 1px 2px rgba(20,33,56,.04); padding:18px 20px; }
.wb-status .h { font-size:13px; font-weight:600; color:var(--text-3); letter-spacing:.5px; margin-bottom:6px; }
.wb-srow { display:flex; align-items:center; justify-content:space-between; gap:10px; padding:9px 0; border-bottom:1px solid var(--border-soft); }
.wb-srow:last-child { border-bottom:none; }
.wb-srow .l { font-size:12.5px; color:var(--text-2); }
.wb-srow .n { font-size:14px; font-weight:680; color:var(--text); }
.wb-srow .n.bad { color:var(--bad); } .wb-srow .n.warn { color:var(--warn); } .wb-srow .n.info { color:var(--info); } .wb-srow .n.muted { color:var(--text-3); }

/* 第二段：核心两列 64 / 36 */
.wb-core { display:grid; grid-template-columns:64fr 36fr; gap:18px; align-items:start; }
@media (max-width:920px){ .wb-core { grid-template-columns:1fr; } }
.wb-card { background:#fbfcfe; border:1px solid var(--border-soft); border-radius:16px; box-shadow:0 1px 2px rgba(20,33,56,.04); }
.wb-card .wb-cap { padding:15px 20px 13px; border-bottom:1px solid var(--border-soft); }
.wb-card .wb-cap .t { font-size:16px; font-weight:680; color:var(--text); letter-spacing:.3px; }
.wb-card .wb-cap .s { font-size:12px; color:var(--text-3); margin-top:4px; }
.wb-card .wb-body { padding:16px 20px 18px; }

/* 主区：今日待处理（视觉主角，顶部主色细条 + 略强阴影） */
.wb-card.primary { border-color:var(--border); box-shadow:0 6px 20px rgba(20,33,56,.07); position:relative; overflow:hidden; }
.wb-card.primary::before { content:""; position:absolute; left:0; right:0; top:0; height:3px; background:var(--primary); }
.wb-list { display:flex; flex-direction:column; gap:8px; }
.wb-item { display:flex; align-items:center; gap:13px; padding:12px 14px; border:1px solid var(--border-soft); border-left:3px solid var(--neutral); border-radius:11px; background:#fff; cursor:pointer; transition:box-shadow .12s, transform .08s; }
.wb-item:hover { box-shadow:0 4px 14px rgba(20,33,56,.10); transform:translateY(-1px); }
.wb-item.sev-bad { border-left-color:var(--bad); } .wb-item.sev-warn { border-left-color:var(--warn); } .wb-item.sev-info { border-left-color:var(--info); } .wb-item.sev-good { border-left-color:var(--good); }
.wb-item .body { flex:1; min-width:0; }
.wb-item .t { font-size:13.5px; font-weight:620; color:var(--text); display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.wb-item .meta { font-size:12px; color:var(--text-3); margin-top:4px; display:flex; gap:14px; flex-wrap:wrap; }
.wb-item .go { font-size:12.5px; color:var(--accent); white-space:nowrap; font-weight:600; }
.wb-kind { font-size:10.5px; font-weight:600; padding:1px 7px; border-radius:6px; background:var(--primary-50); color:var(--accent); letter-spacing:.5px; }
.wb-seg + .wb-seg { margin-top:16px; }
.wb-seg-h { font-size:11px; font-weight:600; letter-spacing:1.5px; color:var(--text-3); text-transform:uppercase; margin:0 0 9px; }

/* 右侧：快捷入口（操作行：图标 + 标题 + 说明 + 箭头，非按钮堆叠） */
.wb-quick { display:flex; flex-direction:column; gap:6px; }
.wb-qrow { display:flex; align-items:center; gap:12px; padding:11px 12px; border-radius:11px; cursor:pointer; transition:background .12s; }
.wb-qrow:hover { background:var(--bg-soft); }
.wb-qrow .qi { width:34px; height:34px; border-radius:9px; flex:none; display:grid; place-items:center; color:var(--accent); background:var(--primary-50); }
.wb-qrow .qt { flex:1; min-width:0; line-height:1.3; }
.wb-qrow .qt .qn { font-size:13.5px; font-weight:620; color:var(--text); }
.wb-qrow .qt .qd { font-size:11.5px; color:var(--text-3); margin-top:1px; }
.wb-qrow .qa { color:var(--text-3); font-size:14px; }
.wb-qrow.primary { background:var(--primary); }
.wb-qrow.primary:hover { background:var(--primary-600); }
.wb-qrow.primary .qi { background:rgba(255,255,255,.16); color:#fff; }
.wb-qrow.primary .qt .qn { color:#fff; } .wb-qrow.primary .qt .qd { color:rgba(255,255,255,.78); } .wb-qrow.primary .qa { color:rgba(255,255,255,.8); }
.wb-quick-status { display:flex; gap:16px; flex-wrap:wrap; margin-top:14px; padding-top:13px; border-top:1px solid var(--border-soft); font-size:12px; color:var(--text-3); }
.wb-quick-status b { color:var(--text); font-weight:680; margin-left:4px; }
.wb-quick-status b.bad { color:var(--bad); } .wb-quick-status b.warn { color:var(--warn); } .wb-quick-status b.info { color:var(--info); }

/* 团队关注：可折叠，轻量 */
.wb-collapse > summary { cursor:pointer; list-style:none; font-size:16px; font-weight:680; color:var(--text); padding:16px 20px; display:flex; align-items:center; gap:10px; }
.wb-collapse > summary::-webkit-details-marker { display:none; }
.wb-collapse > summary .s { font-size:12px; color:var(--text-3); font-weight:400; }
.wb-collapse > summary .toggle { margin-left:auto; font-size:12px; color:var(--accent); font-weight:600; }
.wb-collapse > summary .toggle::after { content:'展开'; }
.wb-collapse[open] > summary .toggle::after { content:'收起'; }
.wb-collapse > .wb-body { padding-top:0; }
.wb-risk .row { display:flex; align-items:center; gap:11px; padding:11px 2px; border-bottom:1px solid var(--border-soft); font-size:13px; }
.wb-risk .row:last-child { border-bottom:none; }
.wb-risk .row .dotm { width:8px; height:8px; border-radius:50%; flex:none; }
.wb-risk .row .txt { flex:1; color:var(--text-2); }
.wb-risk .row .txt b { color:var(--text); font-weight:680; }
.wb-risk .row .lnk { font-size:12.5px; color:var(--accent); white-space:nowrap; font-weight:600; cursor:pointer; }

/* 精致紧凑空状态 */
.wb-empty { padding:24px 16px; text-align:center; }
.wb-empty .ei { width:40px; height:40px; border-radius:50%; margin:0 auto 12px; display:grid; place-items:center; color:var(--good); background:var(--good-bg); }
.wb-empty .ei svg { width:22px; height:22px; }
.wb-empty .big { font-size:13.5px; color:var(--text-2); font-weight:600; }
.wb-empty .sub { font-size:12px; color:var(--text-3); margin:5px 0 13px; }
.wb-empty .row { display:flex; gap:8px; justify-content:center; flex-wrap:wrap; }

/* ---------- 用户权限：角色卡 / 提示条 / 表格控件 ---------- */
.role-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; box-shadow: var(--shadow-sm);
  display: flex; flex-direction: column; gap: 8px;
}
.role-card .rc-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.role-card .rc-name { font-size: 13.5px; font-weight: 650; color: var(--text); }
.role-card .rc-desc { font-size: 12px; color: var(--text-2); line-height: 1.65; }

.notice {
  display: flex; align-items: center; gap: 16px;
  background: var(--card); border: 1px solid var(--border); border-left: 3px solid var(--warn);
  border-radius: var(--radius); padding: 13px 16px; box-shadow: var(--shadow-sm);
}
.notice-body { flex: 1; min-width: 0; }
.notice-title { font-size: 13px; font-weight: 600; color: var(--text); }
.notice-sub { font-size: 12px; color: var(--text-3); margin-top: 3px; line-height: 1.6; }

.btn-sm { padding: 4px 11px; font-size: 12px; }
.btn-danger-soft { color: var(--bad); border-color: #e2c9c8; background: #fff; }
.btn-danger-soft:hover { background: var(--bad-bg); border-color: #d8b3b1; }

@media (max-width: 700px) {
  .user-chip .uc-meta { display:none; }
  .user-chip { gap:6px; }
  .user-chip .uc-logout { min-height:30px;padding:4px 9px; }
  .card-pad { padding:16px; }
  table.dt th, table.dt td, table.table th, table.table td { padding-left:11px;padding-right:11px; }
  .content > .toolbar,
  .content > [class$="-page"] > .toolbar,
  .content .customer-ledger-toolbar { padding:9px; }
}

/* ---------- 数据导入：数据安全导入台 ---------- */
.import-workspace { display:flex;flex-direction:column;gap:12px;min-width:0;max-width:100%; }
.import-workspace .section { margin-bottom:0; }
.import-hero { position:relative;overflow:hidden;min-width:0; }
.import-hero::after { content:"";position:absolute;right:-86px;top:-128px;width:420px;height:220px;border:1px solid rgba(78,125,170,.10);border-radius:50%;transform:rotate(-8deg);pointer-events:none; }
.import-hero-head { position:relative;z-index:1;display:flex;align-items:flex-start;justify-content:space-between;gap:18px;padding-bottom:14px;border-bottom:1px solid var(--border-soft); }
.import-hero-copy { min-width:0; }
.import-page-title { margin-top:3px;color:var(--text);font-size:22px;font-weight:760;line-height:1.25; }
.import-hero-actions { display:flex;justify-content:flex-end;gap:8px;flex-wrap:wrap; }
.import-hero-actions .btn { white-space:nowrap; }
.import-status-label { margin:12px 0 7px;color:var(--text-3);font-size:11.5px;font-weight:650; }
.import-status-band { display:grid;min-width:0;border:1px solid var(--border-soft);border-radius:8px;background:var(--card-2);overflow:hidden; }
.import-global-status { grid-template-columns:repeat(6,minmax(0,1fr)); }
.import-category-status { grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:14px; }
.import-status-item { position:relative;min-width:0;padding:9px 11px; }
.import-status-item + .import-status-item { border-left:1px solid var(--border-soft); }
.import-status-item span { display:block;margin-bottom:3px;color:var(--text-3);font-size:10.5px;line-height:1.3; }
.import-status-item strong { display:block;color:var(--text);font-size:13px;font-weight:700;line-height:1.35;overflow-wrap:anywhere; }
.import-status-item.primary strong { color:var(--primary); }
.import-status-item.locked strong { color:#66798d; }
.import-status-item.warn strong { color:var(--warn); }
.import-ledger-card { min-width:0;overflow:hidden; }
.import-ledger-head { margin-bottom:8px; }
.import-category-track { display:flex;align-items:stretch;gap:2px;margin:0 -2px 14px;padding:0 2px;border-bottom:1px solid var(--border-soft);overflow-x:auto;scrollbar-width:thin; }
.import-category-track button { position:relative;flex:0 0 auto;min-width:82px;border:0;background:transparent;padding:9px 13px;color:var(--text-3);font:inherit;font-size:12.5px;font-weight:650;cursor:pointer;transition:background .14s ease,color .14s ease; }
.import-category-track button:hover { background:#f4f7fb;color:var(--text-2); }
.import-category-track button.active { background:#edf4fc;color:var(--primary); }
.import-category-track button.active::after { content:"";position:absolute;left:16px;right:16px;bottom:-1px;height:2px;border-radius:2px;background:var(--primary); }
.import-category-panel { min-width:0;animation:kyImportPanelIn .18s ease-out both; }
.import-category-status-head { display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:8px; }
.import-category-status-head .section-title { font-size:14px; }
.import-category-status-head .pwb-title { margin-top:2px;font-size:9.5px; }
.import-month-table-title { margin-bottom:8px;font-size:14px; }
.import-month-table-wrap { max-width:100%;overflow:auto; }
.import-month-table { min-width:720px; }
.import-month-table tbody tr.is-current { background:#f0f6fc; }
.import-month-table tbody tr.is-current:hover { background:#eaf3fb; }
.import-month-actions { display:flex;align-items:center;gap:11px;white-space:nowrap; }
.import-text-action { border:0;background:transparent;padding:2px 0;color:var(--primary);font:inherit;font-size:12px;font-weight:650;cursor:pointer; }
.import-text-action:hover,
.import-text-action:focus-visible { color:var(--primary-strong);text-decoration:underline;outline:none; }
.import-text-action:disabled { color:var(--text-3);cursor:default;text-decoration:none;opacity:.55; }
.import-empty-state { padding:13px 14px;border:1px dashed var(--border);border-radius:8px;background:var(--card-2);color:var(--text-3);text-align:center;font-size:12.5px; }
.import-advanced { min-width:0; }
.import-advanced > summary { display:flex;align-items:center;gap:9px;list-style:none;color:var(--text-2);font-size:13px;font-weight:700;cursor:pointer; }
.import-advanced > summary::-webkit-details-marker { display:none; }
.import-advanced > summary::before { content:"›";color:var(--primary);font-size:18px;line-height:1;transform:rotate(0);transition:transform .16s ease; }
.import-advanced[open] > summary::before { transform:rotate(90deg); }
.import-advanced-hint { color:var(--text-3);font-size:11.5px;font-weight:500; }
.import-advanced-body { margin-top:12px;padding-top:12px;border-top:1px solid var(--border-soft); }
.import-tool-layout { display:grid;gap:12px; }
.import-tool-summary { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px; }
.import-tool-actions,
.import-danger-actions { display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap; }
.import-tool-action-with-note .subtle-note { margin-top:4px; }
.import-danger-zone { padding-top:11px;border-top:1px solid var(--border-soft); }
.import-danger-title { margin-bottom:8px;color:var(--bad);font-size:12px;font-weight:700; }
.import-danger-actions select { min-width:150px; }
.import-danger-button { border-color:#e7c9c9!important;color:var(--bad)!important;background:#fffafa!important; }
.import-danger-button:hover { border-color:#d9adad!important;background:#fff5f5!important; }

.import-modal { width:min(1080px,96vw);max-height:92vh;overflow:auto; }
.import-modal .form-modal-head { display:grid;grid-template-columns:minmax(220px,.75fr) minmax(420px,1.25fr);align-items:end;gap:22px; }
.import-step-track { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0;min-width:0; }
.import-step { position:relative;display:flex;align-items:center;gap:7px;min-width:0;padding:7px 10px;border-top:1px solid #d7e0ea;color:var(--text-3);font-size:11.5px;font-weight:650; }
.import-step::before { content:"";position:absolute;left:0;top:-1px;width:0;height:2px;background:var(--primary);transition:width .18s ease; }
.import-step.active { color:var(--primary);background:#f1f6fb; }
.import-step.active::before,
.import-step.complete::before { width:100%; }
.import-step.complete { color:#59748c; }
.import-step-number { display:inline-flex;align-items:center;justify-content:center;flex:0 0 auto;width:22px;height:22px;border:1px solid #d6e0ea;border-radius:50%;background:#fff;font-size:9.5px;font-variant-numeric:tabular-nums; }
.import-step.active .import-step-number { border-color:#a9c3da;background:#e9f2fa;color:var(--primary); }
.import-step.complete .import-step-number { border-color:#bfd2c9;background:#edf6f1;color:var(--good); }
.import-modal-actions { justify-content:space-between; }
.import-modal-action-group { display:flex;gap:10px; }
.import-step-note { margin-bottom:10px;color:var(--text-3);font-size:12px;line-height:1.5; }
.import-dropzone { padding:30px 22px; }
.import-dropzone-title { margin-bottom:5px;color:var(--text-2);font-size:14px;font-weight:680; }
.import-file-table-wrap { margin-top:12px;max-width:100%;overflow:auto; }
.import-file-table { min-width:1000px; }
.import-file-table select { height:32px;font-size:12px; }
.import-file-type { min-width:98px; }
.import-file-method { min-width:146px; }
.import-remove-file { padding:3px 8px!important;color:var(--bad)!important; }
.import-preflight-toolbar { display:flex;align-items:center;gap:9px;flex-wrap:wrap;margin-bottom:9px; }
.import-confirm-table-wrap,
.import-final-table-wrap,
.import-impact-table-wrap { max-width:100%;overflow:auto; }
.import-confirm-table { min-width:900px; }
.import-confirm-table input { min-width:160px; }
.import-final-table,
.import-impact-table { min-width:860px; }
.import-preflight-panel { margin-bottom:12px;padding:11px;border:1px solid var(--border-soft);border-radius:8px;background:var(--card-2); }
.import-preflight-title { margin-bottom:8px;font-size:14px; }
.import-preflight-summary { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin-bottom:10px;border:1px solid var(--border-soft);border-radius:7px;background:#fff;overflow:hidden; }
.import-preflight-stat { min-width:0;padding:8px 9px; }
.import-preflight-stat + .import-preflight-stat { border-left:1px solid var(--border-soft); }
.import-preflight-stat:nth-child(n+6) { border-top:1px solid var(--border-soft); }
.import-preflight-stat span { display:block;margin-bottom:3px;color:var(--text-3);font-size:10.5px; }
.import-preflight-stat strong { display:block;color:var(--text);font-size:12.5px;line-height:1.35;overflow-wrap:anywhere; }
.import-risk-list { display:grid;gap:6px;margin-bottom:10px;animation:kyImportRiskIn .16s ease-out both; }
.import-risk-item { padding:7px 9px;border-left:2px solid #c9a55f;background:#fffaf0;color:#876c38;font-size:11.5px;line-height:1.5; }

.import-month-drawer-backdrop { position:fixed;inset:0;z-index:240;display:flex;justify-content:flex-end;background:rgba(20,33,56,.32);animation:kyBackdropIn .16s ease both; }
.import-month-drawer { width:560px;max-width:96vw;height:100%;overflow-y:auto;background:var(--bg);box-shadow:var(--shadow-md);animation:kyImportDrawerIn .22s ease-out both; }
.import-drawer-head { position:sticky;top:0;z-index:2;padding:18px 20px 14px;border-bottom:1px solid var(--border-soft);background:rgba(247,249,252,.96);backdrop-filter:blur(8px); }
.import-drawer-title-row { display:flex;align-items:flex-start;justify-content:space-between;gap:12px; }
.import-drawer-body { padding:18px 20px 24px; }
.import-drawer-section-title { margin-bottom:8px;font-size:14px; }
.import-drawer-overview { grid-template-columns:repeat(2,minmax(0,1fr)); }
.import-drawer-overview .import-status-item:nth-child(odd) { border-left:0; }
.import-drawer-overview .import-status-item:nth-child(n+3) { border-top:1px solid var(--border-soft); }
.import-batch-title { margin-top:18px; }
.import-batch-timeline { position:relative;display:grid;gap:0;min-width:0; }
.import-batch-timeline::before { content:"";position:absolute;left:5px;top:8px;bottom:8px;width:1px;background:#d8e2ec; }
.import-batch-item { position:relative;display:grid;grid-template-columns:12px minmax(0,1fr);gap:10px;min-width:0;padding:0 0 15px; }
.import-batch-marker { position:relative;z-index:1;width:9px;height:9px;margin-top:5px;border:2px solid #fff;border-radius:50%;background:#7897b2;box-shadow:0 0 0 1px #bfd0df; }
.import-batch-content { min-width:0;padding-bottom:13px;border-bottom:1px solid var(--border-soft); }
.import-batch-head { display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-width:0; }
.import-batch-name { min-width:0;overflow-wrap:anywhere; }
.import-batch-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 15px;margin-top:10px; }
.import-detail-field { min-width:0; }
.import-detail-field .metric-label { font-size:10.5px; }
.import-detail-field > div:last-child { margin-top:2px;color:var(--text-2);font-size:12px;line-height:1.4;overflow-wrap:anywhere; }

@keyframes kyImportPanelIn { from { opacity:.7;transform:translateY(2px); } to { opacity:1;transform:none; } }
@keyframes kyImportDrawerIn { from { opacity:.75;transform:translateX(14px); } to { opacity:1;transform:none; } }
@keyframes kyImportRiskIn { from { opacity:0;transform:translateY(-2px); } to { opacity:1;transform:none; } }

@media (max-width: 1100px) {
  .import-global-status { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .import-global-status .import-status-item:nth-child(4) { border-left:0; }
  .import-global-status .import-status-item:nth-child(n+4) { border-top:1px solid var(--border-soft); }
  .import-category-status { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .import-category-status .import-status-item:nth-child(4) { border-left:0; }
  .import-category-status .import-status-item:nth-child(n+4) { border-top:1px solid var(--border-soft); }
  .import-modal .form-modal-head { grid-template-columns:1fr;align-items:start; }
}

@media (max-width: 780px) {
  .import-hero-head { flex-direction:column; }
  .import-hero-actions { justify-content:flex-start; }
  .import-category-track { margin-right:-14px; }
  .import-tool-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .import-preflight-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .import-preflight-stat + .import-preflight-stat { border-left:0; }
  .import-preflight-stat:nth-child(even) { border-left:1px solid var(--border-soft); }
  .import-preflight-stat:nth-child(n+3) { border-top:1px solid var(--border-soft); }
  .import-month-drawer { width:min(560px,100vw);max-width:100vw; }
}

@media (max-width: 480px) {
  .import-hero-actions { display:grid;grid-template-columns:1fr;width:100%; }
  .import-hero-actions .btn { width:100%; }
  .import-global-status,
  .import-category-status { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .import-global-status .import-status-item,
  .import-category-status .import-status-item { border-top:0;border-left:0; }
  .import-global-status .import-status-item:nth-child(even),
  .import-category-status .import-status-item:nth-child(even) { border-left:1px solid var(--border-soft); }
  .import-global-status .import-status-item:nth-child(n+3),
  .import-category-status .import-status-item:nth-child(n+3) { border-top:1px solid var(--border-soft); }
  .import-category-track button { min-width:74px;padding:9px 11px; }
  .import-advanced > summary { align-items:flex-start;flex-wrap:wrap; }
  .import-advanced-hint { flex-basis:100%;padding-left:24px; }
  .import-tool-summary { grid-template-columns:1fr; }
  .import-danger-actions { align-items:stretch;flex-direction:column; }
  .import-danger-actions select,
  .import-danger-actions .btn { width:100%; }
  .import-modal { width:calc(100vw - 16px);max-height:calc(100dvh - 16px);border-radius:8px; }
  .import-modal .form-modal-head,
  .import-modal .form-modal-body { padding-left:12px;padding-right:12px; }
  .import-step { align-items:flex-start;flex-direction:column;gap:4px;padding:7px 5px;font-size:10.5px; }
  .import-step-number { width:20px;height:20px; }
  .import-modal-actions { align-items:stretch;flex-direction:column-reverse; }
  .import-modal-actions > span,
  .import-modal-action-group { display:grid;grid-template-columns:1fr;width:100%; }
  .import-modal-actions .btn { width:100%; }
  .import-dropzone { padding:24px 14px; }
  .import-drawer-head,
  .import-drawer-body { padding-left:14px;padding-right:14px; }
  .import-month-drawer { width:100vw; }
  .import-batch-fields { grid-template-columns:1fr; }
}

@media (prefers-reduced-motion: reduce) {
  table.dt tbody tr,
  table.table tbody tr,
  .badge,
  .import-category-panel,
  .import-risk-list,
  .import-month-drawer-backdrop,
  .import-month-drawer { animation:none!important; }
}
.op-group { display: inline-flex; gap: 6px; }

/* ---------- 账户中心：我的资料 / 用户权限 ---------- */
.acct-page { max-width: 1380px; margin: 0 auto; }
.acct-page-head {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 2px 2px 18px; padding-bottom: 16px; border-bottom: 1px solid var(--border-soft);
}
.acct-page-title { font-size: 20px; line-height: 1.3; font-weight: 700; color: var(--text); }
.acct-page-sub { margin-top: 5px; font-size: 12.5px; color: var(--text-3); }
.acct-page-status { flex: none; }
.acct-card { padding: 22px 24px; }
.acct-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.acct-card-title { font-size: 15px; font-weight: 680; color: var(--text); }
.acct-card-sub { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.acct-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.acct-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.acct-span-2 { grid-column: 1 / -1; }
.acct-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.acct-field > label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.acct-field input, .acct-field select, .acct-field textarea {
  box-sizing: border-box; width: 100%; min-height: 38px; font-family: inherit; font-size: 13px; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.acct-field textarea { resize: vertical; line-height: 1.55; }
.acct-field input:focus, .acct-field select:focus, .acct-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--primary-50);
}
.acct-field input:disabled, .acct-field select:disabled {
  color: var(--text-2); background: var(--bg-soft); border-color: var(--border-soft); cursor: not-allowed;
}
.acct-field-note { font-size: 11px; line-height: 1.5; color: var(--text-3); }
.acct-card-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.acct-inline-note, .acct-security-note, .acct-password-rule {
  font-size: 11.5px; line-height: 1.65; color: var(--text-3); background: var(--card-2);
  border: 1px solid var(--border-soft); border-radius: 8px; padding: 9px 11px;
}

.profile-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(300px, .85fr); gap: 18px; align-items: start; }
.profile-side { display: flex; flex-direction: column; gap: 16px; }
.acct-info-list { display: flex; flex-direction: column; }
.acct-info-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--border-soft); }
.acct-info-row:first-child { padding-top: 0; }
.acct-info-row:last-child { border-bottom: 0; }
.acct-info-row > span:first-child { font-size: 12px; color: var(--text-3); }
.acct-info-row strong { font-size: 12.5px; font-weight: 600; color: var(--text-2); text-align: right; }
.acct-security-note { margin-top: 14px; }
.acct-password { padding: 0; overflow: hidden; }
.acct-password > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px;
  cursor: pointer; list-style: none; user-select: none;
}
.acct-password > summary::-webkit-details-marker { display: none; }
.acct-password > summary strong { display: block; font-size: 14px; color: var(--text); }
.acct-password > summary small { display: block; margin-top: 4px; font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.acct-chevron { color: var(--text-3); transition: transform .12s; }
.acct-password[open] .acct-chevron { transform: rotate(180deg); }
.acct-password-body { display: flex; flex-direction: column; gap: 13px; padding: 2px 20px 20px; border-top: 1px solid var(--border-soft); padding-top: 18px; }
.acct-password-rule { padding: 8px 10px; }
.acct-error { min-height: 17px; font-size: 12px; color: var(--bad); }
.acct-password-body .acct-card-actions { margin-top: 0; }

.acct-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.acct-stat {
  position: relative; overflow: hidden; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 64px; padding: 13px 16px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-sm);
}
.acct-stat::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--accent); opacity: .7; }
.acct-stat.good::before { background: var(--good); }
.acct-stat.warn::before { background: var(--warn); }
.acct-stat.neutral::before { background: var(--neutral); }
.acct-stat span { font-size: 12px; color: var(--text-3); }
.acct-stat strong { font-size: 22px; line-height: 1; color: var(--text); }
.acct-role-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.acct-user-list { overflow: hidden; }
.acct-list-head { display: flex; align-items: center; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.acct-list-head strong { font-size: 14px; color: var(--text); }
.acct-list-head span { margin-left: 10px; font-size: 11.5px; color: var(--text-3); }
.acct-user-table .op-group { align-items: center; white-space: nowrap; }
.acct-action-main { color: var(--accent); border-color: #cbd9e8; background: #f8fbfe; }
.acct-action-main:hover { background: var(--primary-50); border-color: #b8cde1; }

.acct-modal-backdrop {
  position: fixed; inset: 0; z-index: 240; display: grid; place-items: center; padding: 20px;
  background: rgba(20,33,56,.38); overflow-y: auto;
  animation: kyBackdropIn .16s ease both;
}
.acct-modal { width: min(680px, 94vw); max-height: calc(100vh - 40px); overflow: auto; border-radius: 14px; box-shadow: 0 24px 64px rgba(20,33,56,.22); animation: kyModalIn .18s ease both; }
.acct-modal-sm { width: min(440px, 94vw); }
.acct-modal-head { padding: 20px 22px 16px; border-bottom: 1px solid var(--border-soft); }
.acct-modal-title { font-size: 16px; font-weight: 700; color: var(--text); }
.acct-modal-sub { margin-top: 5px; font-size: 12px; color: var(--text-3); }
.acct-modal-body { padding: 20px 22px; }
.acct-modal-actions { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border-soft); background: var(--card-2); }
.acct-form-section + .acct-form-section { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.acct-form-section-title { margin-bottom: 12px; font-size: 12px; font-weight: 680; color: var(--text-2); letter-spacing: .3px; }
.acct-form-section .acct-inline-note { margin-top: 12px; }

/* ---------- 正式表单弹窗（待办 / 拜访） ---------- */
.form-modal-backdrop {
  position: fixed; inset: 0; z-index: 240; display: grid; place-items: start center;
  padding: 5vh 16px; background: rgba(20,33,56,.38); overflow-y: auto;
  animation: kyBackdropIn .16s ease both;
}
.form-modal { width: min(860px, 96vw); max-height: calc(100vh - 40px); overflow: auto; border-radius: 15px; box-shadow: 0 24px 64px rgba(20,33,56,.22); animation: kyModalIn .18s ease both; }
.form-modal-head { padding: 22px 26px 17px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, #fbfcfe 0%, #f7f9fc 100%); }
.form-modal-title { font-size: 18px; font-weight: 720; color: var(--text); }
.form-modal-sub { margin-top: 5px; font-size: 12.5px; color: var(--text-3); line-height: 1.6; }
.form-modal-body { padding: 20px 26px 22px; background: #fff; }
.form-modal-actions {
  position: sticky; bottom: 0; display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 26px; border-top: 1px solid var(--border); background: #f8fafc;
}
.form-section {
  position: relative; padding: 16px 18px 18px; border: 1px solid var(--border-soft);
  border-radius: 12px; background: #fbfcfe;
}
.form-section + .form-section { margin-top: 16px; }
.form-section::before { content: ''; position: absolute; left: 0; top: 14px; bottom: 14px; width: 3px; border-radius: 0 3px 3px 0; background: var(--primary); opacity: .75; }
.form-section-title { margin: 0 0 14px; padding-left: 2px; font-size: 13px; font-weight: 720; color: var(--text); letter-spacing: .4px; }
.form-grid { display: grid; gap: 14px 16px; }
.form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-span-2 { grid-column: 1 / -1; }
.form-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.form-field > label { font-size: 12px; font-weight: 600; color: var(--text-2); }
.form-field input, .form-field select, .form-field textarea {
  box-sizing: border-box; width: 100%; min-height: 38px; font-family: inherit; font-size: 13px; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 8px; padding: 8px 11px; outline: none;
  transition: border-color .12s, box-shadow .12s, background .12s;
}
.form-field textarea { resize: vertical; line-height: 1.55; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px var(--primary-50);
}
.form-field input:disabled, .form-field select:disabled, .form-field textarea:disabled {
  color: var(--text-2); background: var(--bg-soft); border-color: var(--border-soft); cursor: not-allowed;
}
.form-note, .form-field-note {
  font-size: 11.5px; line-height: 1.6; color: var(--text-3);
}
.form-note { margin-top: 10px; padding: 9px 11px; border: 1px solid var(--border-soft); border-radius: 8px; background: var(--card-2); }

/* ---------- 通用确认弹窗 ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background: rgba(20,33,56,.42);
  overflow: auto;
  animation: kyBackdropIn .16s ease both;
}
.modal-card {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 28px 72px rgba(20,33,56,.28);
  animation: kyModalIn .18s ease both;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 13px;
  border-bottom: 1px solid var(--border-soft);
  background: #fbfcfe;
}
.modal-title { font-size: 16px; font-weight: 720; color: var(--text); }
.modal-card > .subtle-note {
  margin: 0;
  padding: 14px 18px 10px;
  line-height: 1.6;
}
.modal-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 13px 18px;
  border-top: 1px solid var(--border-soft);
  background: #f8fafc;
}

.visit-form-body { padding: 22px 28px 24px; background: linear-gradient(180deg, #fff 0%, #fbfcfe 100%); }
.visit-form-section {
  position: relative; padding: 18px 20px 20px; border: 1px solid #d8e2f1;
  border-radius: 14px; background: #fff; box-shadow: 0 8px 22px rgba(20,33,56,.06);
}
.visit-form-section + .visit-form-section { margin-top: 20px; }
.visit-form-section::before {
  content: ''; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px;
  border-radius: 0 4px 4px 0; background: var(--primary);
}
.visit-form-section-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 16px; padding-left: 8px;
  font-size: 15px; font-weight: 760; color: var(--text); letter-spacing: .2px;
}
.visit-form-section-title::before {
  content: ''; width: 8px; height: 8px; border-radius: 999px; background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-50);
}
.visit-form-section-desc {
  margin: -6px 0 16px; padding: 9px 12px; border-radius: 10px;
  background: #f4f7fb; color: var(--text-3); font-size: 12px; line-height: 1.6;
}
.visit-form-grid { display: grid; gap: 15px 18px; }
.visit-form-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.visit-form-stack { display: grid; gap: 15px; }
.visit-communication-grid { margin-top: 15px; }
.visit-textarea-lg { min-height: 150px; }
.visit-textarea-md { min-height: 104px; }
.visit-textarea-sm { min-height: 70px; }

/* ---------- 首次登录设置 ---------- */
.first-login-page { max-width: 1040px; }
.first-login-layout {
  display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .85fr);
  gap: 18px; align-items: start;
}
.first-login-main, .first-login-side { min-height: 0; }
.first-login-password-grid { gap: 14px; }
.first-login-submit {
  margin-top: 16px; padding: 14px 18px; display: flex; align-items: center;
  justify-content: space-between; gap: 14px; background: #fbfcfe;
}
.first-login-submit strong { display: block; font-size: 13.5px; color: var(--text); }
.first-login-submit span { display: block; margin-top: 3px; font-size: 12px; color: var(--text-3); }
.first-login-error { margin-top: 10px; }

@media (max-width: 1050px) {
  .profile-layout { grid-template-columns: 1fr; }
  .first-login-layout { grid-template-columns: 1fr; }
  .acct-role-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .acct-page-head { align-items: flex-start; flex-wrap: wrap; }
  .acct-page-head .section-actions { width: 100%; margin-left: 0; }
  .acct-page-head .section-actions .btn { width: 100%; }
  .acct-card { padding: 18px 16px; }
  .acct-form-grid, .acct-form-grid-3 { grid-template-columns: 1fr; }
  .acct-span-2 { grid-column: auto; }
  .acct-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .acct-role-grid { grid-template-columns: 1fr; }
  .acct-modal-backdrop { place-items: start center; padding: 12px; }
  .acct-modal { width: 100%; max-height: calc(100vh - 24px); }
  .acct-modal-head, .acct-modal-body { padding-left: 16px; padding-right: 16px; }
  .acct-modal-actions { position: sticky; bottom: 0; padding: 12px 16px; }
  .form-modal-backdrop { padding: 12px; }
  .form-modal { width: 100%; max-height: calc(100vh - 24px); }
  .form-modal-head, .form-modal-body { padding-left: 16px; padding-right: 16px; }
  .form-modal-actions { padding: 12px 16px; }
  .visit-form-body { padding: 18px 16px 20px; }
  .visit-form-section { padding: 16px 14px 18px; }
  .visit-form-grid.cols-2 { grid-template-columns: 1fr; }
  .form-grid.cols-2 { grid-template-columns: 1fr; }
  .form-span-2 { grid-column: auto; }
  .first-login-layout { grid-template-columns: 1fr; }
  .first-login-submit { align-items: stretch; flex-direction: column; }
  .first-login-submit .btn { width: 100%; }
}
.cell-sel {
  height: 30px; padding: 3px 26px 3px 9px; font-size: 12.5px; min-width: 84px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b95a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'/></svg>");
  background-repeat: no-repeat; background-position: right 8px center; background-color: #fff;
}
.cell-sel:disabled { color: var(--text-2); background-color: var(--bg-soft); opacity: .9; }

/* ---------- 待确认客户卡片 ---------- */
.pending-card { display:flex; gap:14px; align-items:flex-start; padding:12px 14px; border:1px solid var(--border); border-radius:10px; background:var(--card); margin-bottom:10px; }
.pending-card:hover { box-shadow:var(--shadow-sm); }
.pending-actions { display:flex; gap:8px; align-items:flex-start; flex-shrink:0; }
.more-menu { display:none; position:absolute; right:0; top:calc(100% + 4px); z-index:5; background:#fff; border:1px solid var(--border); border-radius:8px; box-shadow:var(--shadow-md); min-width:150px; overflow:hidden; }
.more-menu.open { display:block; }
.more-item { display:block; width:100%; text-align:left; border:none; background:transparent; font-family:inherit; font-size:12.5px; color:var(--text); padding:8px 12px; cursor:pointer; }
.more-item:hover { background:var(--bg-soft); }
.rel-empty .big { color:var(--text-2); font-weight:600; margin-bottom:4px; }
.rel-search { position:relative; max-width:420px; }
.rel-results { border:1px solid var(--border); border-radius:var(--radius-sm); margin-top:6px; max-height:260px; overflow-y:auto; background:#fff; box-shadow:var(--shadow-sm); }
.rel-result { padding:8px 12px; cursor:pointer; border-bottom:1px solid var(--border-soft); }
.rel-result:hover { background:var(--bg-soft); }
.rel-result .t { font-weight:600; font-size:13px; }
.rel-result .s { font-size:11.5px; color:var(--text-3); }

/* ---------- 技术报告预览 / 打印 ---------- */
.tr-preview { max-width: 820px; margin: 0 auto; }
.tr-preview h2 { font-size: 20px; font-weight: 720; text-align: center; margin: 0 0 4px; }
.tr-preview h3 { font-size: 15px; font-weight: 700; margin: 18px 0 6px; padding-bottom: 4px; border-bottom: 1px solid var(--border); }
.tr-preview .tr-body { white-space: pre-wrap; font-size: 13.5px; line-height: 1.7; }
.tr-preview .tr-info { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 4px 24px; }
.tr-preview .tr-info .kv { padding: 6px 0; }
@media print {
  body * { visibility: hidden; }
  .tr-print-area, .tr-print-area * { visibility: visible; }
  .tr-print-area { position: absolute; left: 0; top: 0; width: 100%; padding: 0 8mm; }
  .tr-no-print { display: none !important; }
}

/* ---------- 合同固定打印版式（独立于技术报告）：紧凑 A4 单页 ---------- */
.contract-print-page { background: var(--bg-soft); padding: 12px 0; }
.contract-print-area {
  width: 794px; max-width: 100%; margin: 0 auto; background: #fff; color: #000;
  box-sizing: border-box; min-height: 277mm; display: flex; flex-direction: column;
  padding: 9mm 12mm; font-size: 13.5px; line-height: 1.5;
  border: 1px solid var(--border); box-shadow: 0 1px 6px rgba(0, 0, 0, .08);
  font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
}
.contract-print-no { text-align: right; font-size: 12.5px; }
.contract-print-title {
  text-align: center; font-size: 30px; font-weight: 800; letter-spacing: 18px;
  width: 52%; margin: 2px auto 4px; padding-bottom: 6px; border-bottom: 2px solid #000;
}
.contract-print-date { text-align: center; font-size: 13.5px; margin: 8px 0 12px; }
.contract-party-line { font-size: 14px; margin: 7px 0; }
.contract-items-table { width: 100%; border-collapse: collapse; margin: 12px 0 0; border: 2px solid #000; }
.contract-items-table th, .contract-items-table td { border: 1px solid #000; padding: 4px 6px; font-size: 13px; text-align: center; height: 44px; word-break: break-word; }
.contract-items-table thead th { font-weight: 700; background: #f4f4f4; padding: 7px 4px; height: auto; }
.contract-items-table td.l { text-align: left; }
.contract-items-table td.amt { text-align: right; padding-right: 8px; }
/* 原版总价拆 9 格（百|十|万|千|百|十|元|角|分），窄等宽居中 */
.contract-items-grid { table-layout: fixed; }
.contract-items-grid col.cd { width: 24px; }
.contract-items-grid th.d, .contract-items-grid td.d { width: 24px; padding: 3px 0; font-size: 12.5px; text-align: center; }
.contract-items-grid tbody tr { height: 44px; }
.contract-items-grid .ct-foot td.l { font-size: 12.5px; }
.contract-items-grid .ct-cn td { text-align: left; padding: 8px; font-size: 13px; letter-spacing: 1px; height: 36px; }
.contract-terms { margin: 16px 0; display: grid; grid-template-columns: 1fr 1fr; gap: 4px 30px; }
.contract-terms .item { display: flex; gap: 4px; padding: 6px 0; font-size: 13.5px; align-items: flex-end; }
.contract-terms .item .n { font-weight: 700; white-space: nowrap; min-width: 88px; }
.contract-terms .item .v { flex: 1; border-bottom: 1px dotted #000; min-height: 20px; line-height: 1.6; white-space: pre-wrap; }
.contract-terms .item.full { grid-column: 1 / -1; align-items: flex-start; padding-top: 6px; }
.contract-terms .item.full .v { border-bottom: none; }
.contract-sign-area { display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; margin-top: auto; padding-top: 28px; }
.contract-sign-area .col { font-size: 13.5px; }
.contract-sign-area .col .h { font-weight: 700; margin-bottom: 4px; font-size: 14px; }
.contract-sign-area .sline { display: flex; align-items: flex-end; gap: 2px; line-height: 2.6; }
.contract-sign-area .sline .sl { white-space: nowrap; }
.contract-sign-area .sline .sv { flex: 1; border-bottom: 1px dotted #000; min-height: 20px; padding-left: 2px; }
.contract-sign-area .stamp { height: 56px; }
/* ---------- 合同产品明细表格录入 ---------- */
.ct-items-wrap { overflow-x: auto; }
.ct-items-edit { width: 100%; border-collapse: collapse; min-width: 560px; }
.ct-items-edit th, .ct-items-edit td { border: 1px solid var(--border); padding: 2px 3px; font-size: 12.5px; }
.ct-items-edit th { background: var(--bg-soft); font-weight: 600; text-align: center; white-space: nowrap; padding: 5px 4px; }
.ct-items-edit input { width: 100%; box-sizing: border-box; border: 1px solid transparent; background: transparent; padding: 5px 6px; font-size: 12.5px; border-radius: 4px; }
.ct-items-edit input:focus { border-color: var(--accent); background: #fff; outline: none; }
.ct-items-edit input[readonly] { color: var(--muted); cursor: default; }
.ct-items-edit input[readonly]:focus { border-color: transparent; background: transparent; }
.ct-items-edit input.ct-num { text-align: right; }
.ct-items-edit td.amt { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; padding-right: 8px; min-width: 78px; }
.ct-items-edit .ct-del { padding: 0 8px; color: var(--bad); }
.ct-items-tools { margin: 8px 0; }
.ct-items-summary { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; font-size: 13px; padding-top: 8px; border-top: 1px dashed var(--border); }
.ct-items-summary .ct-amounttext { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 280px; }
.ct-items-summary .ct-amounttext input { flex: 1; }
/* ---------- 出差报销 A5 报销单预览（按 Excel 模板，A5 横向）---------- */
.exp-a5-print-area { overflow-x: auto; }
.exp-a5 {
  width: 210mm; max-width: 100%; min-height: 148mm; box-sizing: border-box; margin: 0 auto;
  border: 1px solid #000; padding: 10mm 8mm 8mm; background: #fff; color: #000;
  display: flex; flex-direction: column; font-family: "Songti SC", "SimSun", "Noto Serif CJK SC", serif;
}
.exp-a5 h3 { text-align: center; font-size: 24px; font-weight: 800; letter-spacing: 5px; margin: 0 0 4px; }
.exp-a5 .a5-date { text-align: right; font-size: 13.5px; margin-bottom: 6px; }
.exp-a5 .a5-info { display: flex; gap: 20px; font-size: 14px; margin: 3px 0; }
.exp-a5 .a5-info .fld { display: flex; align-items: flex-end; white-space: nowrap; }
.exp-a5 .a5-info .fld.grow { flex: 1; }
.exp-a5 .a5-range { font-size: 14px; margin: 5px 0 3px; }
.exp-a5 .u { border-bottom: 1px solid #000; display: inline-block; min-width: 110px; padding: 0 6px; text-align: center; }
.exp-a5 .a5-info .fld.grow .u { flex: 1; min-width: 0; width: 100%; }
.exp-a5 .u.nb { min-width: 44px; }
.exp-a5-table { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 8px 0 0; border: 1.5px solid #000; }
.exp-a5-table th, .exp-a5-table td { border: 1px solid #000; padding: 4px 5px; font-size: 12.5px; text-align: center; height: 34px; }
.exp-a5 thead th { font-weight: 700; }
.exp-a5 td.l { text-align: left; }
.exp-a5 tfoot td { font-weight: 600; }
.exp-a5-cn {
  font-size: 15px; min-height: 30px; margin: 0 0 0; padding: 8px 10px;
  border: 1.5px solid #000; border-top: 0; box-sizing: border-box; display: flex; align-items: center;
}
.exp-a5-sign { display: flex; justify-content: space-between; font-size: 14px; margin-top: 30px; padding: 0 6mm 0 2mm; }
.exp-a5 .sign span { min-width: 30%; }

/* 导出 PDF：html2canvas 截图用的捕获态，尽量复用屏幕 A5 预览样式。 */
.exp-a5-capture-holder { position: fixed; left: 0; top: 0; width: 1123px; height: 794px; overflow: hidden; background: #fff; z-index: -10000; pointer-events: none; }
.exp-a5-capture {
  width: 1123px !important; height: 794px !important; min-height: 0 !important; max-height: 794px !important;
  box-sizing: border-box !important; overflow: hidden !important; margin: 0 !important; padding: 60px 14px 28px !important;
  border: none !important; box-shadow: none !important; outline: none !important; background: #fff !important;
}
/* 1123px 导出画布映射到 A5 210mm；按屏幕 210mm 预览比例等比放大文本与行高。 */
.exp-a5-capture h3 { font-size: 40px !important; letter-spacing: 8px !important; margin-bottom: 8px !important; }
.exp-a5-capture .a5-date { font-size: 24px !important; margin-bottom: 8px !important; }
.exp-a5-capture .a5-info, .exp-a5-capture .a5-range { font-size: 22px !important; margin: 5px 0 !important; }
.exp-a5-capture .u { min-width: 155px !important; padding: 0 8px !important; }
.exp-a5-capture .exp-a5-table { width: 100% !important; margin-top: 12px !important; }
.exp-a5-capture .exp-a5-table th, .exp-a5-capture .exp-a5-table td { height: 36px !important; padding: 5px 6px !important; font-size: 18px !important; }
.exp-a5-capture .exp-a5-cn { font-size: 25px !important; min-height: 64px !important; padding: 10px !important; }
.exp-a5-capture .exp-a5-sign { font-size: 26px !important; margin-top: 42px !important; padding: 0 22px !important; }

/* 详情页默认折叠 A5 预览 */
.exp-a5-collapsed { display: none; }

/* 条款「下拉 + 可微调文本」行 */
.ct-termrow { display: flex; gap: 8px; align-items: center; }
.ct-termrow select { flex: 0 0 auto; max-width: 200px; }
.ct-termrow input { flex: 1; min-width: 0; }

/* ---------- 产品客户跟进工作台 ---------- */
.product-workbench .section { margin-bottom: 12px; }
.pwb-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  align-items: start;
}
.pwb-hero-main { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; min-width: 0; }
.pwb-title { color: var(--text-2); font-size: 13px; font-weight: 650; margin-bottom: 4px; }
.pwb-model { font-size: 21px; font-weight: 780; color: var(--text); line-height: 1.25; }
.pwb-meta { color: var(--text-3); font-size: 13px; margin-top: 4px; }
.pwb-tags { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pwb-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.pwb-metrics {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
}
.pwb-metric {
  border: 1px solid var(--border-soft);
  background: var(--card-2);
  border-radius: 8px;
  padding: 9px 10px;
  min-width: 0;
}
.pwb-metric-label { color: var(--text-3); font-size: 12px; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwb-metric-value { color: var(--text); font-size: 17px; font-weight: 760; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pwb-metric.tone-warn .pwb-metric-value { color: var(--warn); }
.pwb-metric.tone-good .pwb-metric-value { color: var(--good); }
.pwb-card { border-radius: 8px; }
.pwb-follow-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  margin-bottom: 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--card-2);
}
.pwb-follow-tools input,
.pwb-follow-tools select { height: 32px; font-size: 12.5px; }
.pwb-follow-tools input { max-width: 220px; }
.pwb-check { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 12.5px; white-space: nowrap; }
.pwb-follow-table th { font-size: 12px; color: var(--ky-table-head-text); }
.pwb-follow-table td { vertical-align: middle; }
.pwb-row-attn {
  background: rgba(211,74,74,.055);
  box-shadow: inset 3px 0 0 rgba(211,74,74,.72);
}
.pwb-row-actions { display: flex; gap: 8px; flex-wrap: wrap; white-space: nowrap; }
.identity-batch-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  margin: 0 0 8px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--card-2);
}
.identity-workspace-hero { margin-bottom:12px;border-radius:8px;overflow:hidden;position:relative; }
.identity-workspace-hero::after { content:"";position:absolute;right:-68px;top:-92px;width:330px;height:160px;border:1px solid rgba(78,125,170,.10);border-radius:50%;pointer-events:none; }
.identity-workspace-hero-head { position:relative;z-index:1;margin-bottom:0; }
.identity-workspace-hero .section-title { margin-top:3px;font-size:20px; }
.identity-status-band { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));margin:0 0 12px;border:1px solid var(--border-soft);border-radius:8px;background:#fff;overflow:hidden; }
.identity-status-item { min-width:0;padding:10px 12px; }
.identity-status-item + .identity-status-item { border-left:1px solid var(--border-soft); }
.identity-status-item span { display:block;margin-bottom:3px;color:var(--text-3);font-size:11px;line-height:1.3; }
.identity-status-item strong { display:block;color:var(--text);font-size:17px;font-weight:760;line-height:1.25; }
.identity-status-item.good strong { color:var(--good); }
.identity-status-item.warn strong { color:var(--warn); }
.identity-status-item.neutral strong { color:#6b7b8d; }
.identity-list-card,
.identity-detail-card { border-radius:8px; }
.identity-list-head { align-items:center;margin-bottom:10px; }
.identity-sync-state { margin-left:auto;white-space:nowrap; }
.identity-refresh-button { margin-left:auto;white-space:nowrap; }
.identity-sync-state + .identity-refresh-button { margin-left:0; }
.identity-queue-controls { display:flex;align-items:center;gap:10px;margin:8px 0;min-width:0; }
.identity-queue-controls #govSearch { flex:0 1 300px;min-width:180px;margin-left:auto; }
.identity-person-batch-entry { display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px;padding:9px 10px;border:1px solid var(--border-soft);border-radius:8px;background:var(--card-2); }
.identity-person-batch-entry > div { display:grid;gap:2px;min-width:0; }
.identity-person-batch-entry strong { color:var(--text-2);font-size:12.5px; }
.identity-person-batch-entry span { color:var(--text-3);font-size:11.5px;line-height:1.4; }
.identity-person-batch-bar { border-color:#cfdeec;background:#f6f9fd; }
.identity-person-batch-bar .identity-batch-summary b { color:var(--primary);font-size:14px; }
.identity-auto-batch-panel { display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:12px;margin-bottom:10px;padding:10px;border:1px solid #cfdeec;border-radius:8px;background:#f6f9fd; }
.identity-auto-batch-summary { display:flex;gap:6px; }
.identity-auto-batch-summary button { display:grid;grid-template-columns:auto auto;align-items:center;gap:6px;min-height:34px;padding:5px 9px;border:1px solid var(--border-soft);border-radius:7px;background:#fff;color:var(--text-3);cursor:pointer; }
.identity-auto-batch-summary button.active { border-color:#a9c5df;background:var(--primary-50);color:var(--primary); }
.identity-auto-batch-summary button span { font-size:11.5px;white-space:nowrap; }
.identity-auto-batch-summary button strong { font-size:15px; }
.identity-auto-batch-groups { display:flex;align-items:center;gap:7px;min-width:0;flex-wrap:wrap; }
.identity-auto-batch-groups span { padding:4px 7px;border-radius:999px;background:#fff;color:var(--text-3);font-size:11.5px;white-space:nowrap; }
.identity-auto-batch-groups b { color:var(--text-2); }
.identity-auto-batch-actions { display:flex;gap:7px;flex-wrap:wrap;justify-content:flex-end; }
.identity-auto-batch-actions .btn { min-height:32px;padding:5px 10px;font-size:12px;white-space:nowrap; }
.identity-partition-empty { margin:10px 0;padding:18px 12px; }
.identity-batch-summary { color: var(--text-3); font-size: 12.5px; }
.identity-batch-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.identity-batch-actions .btn { height: 30px; padding: 0 10px; font-size: 12px; }
.identity-batch-col { width: 38px; text-align: center; }
.identity-governance-table {
  width: 100%;
  min-width: 760px;
  table-layout: fixed;
  font-size: 12.5px;
}
.identity-governance-table th,
.identity-governance-table td {
  vertical-align: middle;
  padding-top: 7px;
  padding-bottom: 7px;
  line-height: 1.35;
}
.identity-governance-table tbody tr.is-selected { background:#f0f6fc;box-shadow:inset 3px 0 0 var(--primary); }
.identity-governance-table tbody tr[data-gov-row] { cursor:pointer;outline:none; }
.identity-governance-table tbody tr[data-gov-row]:focus-visible { box-shadow:inset 3px 0 0 var(--primary),0 0 0 2px rgba(25,93,148,.22);background:#f5f9fd; }
.identity-governance-table tbody tr[data-gov-row]:focus-visible.is-selected { background:#edf5fc; }
.identity-governance-table th:nth-last-child(1),
.identity-governance-table td:nth-last-child(1) {
  width: 136px;
}
.identity-governance-table .identity-raw-col { width: 19%; }
.identity-governance-table .identity-candidate-col { width: 25%; }
.identity-governance-table .identity-confidence-col { width: 72px; }
.identity-governance-table .identity-count-col { width: 54px; }
.identity-governance-table .identity-date-col { width: 92px; }
.identity-governance-table .identity-status-col { width: 76px; }
.identity-governance-table .identity-action-col { width: 136px; }
.identity-governance-table th,
.identity-governance-table td {
  min-width: 0;
  overflow-wrap: anywhere;
}
.identity-raw-cell .link-btn {
  display: block;
  width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  text-align: left;
  vertical-align: bottom;
}
.identity-candidate-cell {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.identity-candidate-cell .t-muted {
  display: block;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.identity-candidate-cell .t-muted {
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.25;
}
.identity-governance-table .pwb-row-actions {
  gap: 7px;
  flex-wrap: wrap;
}
.identity-governance-detail-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}
.identity-governance-detail-table th,
.identity-governance-detail-table td {
  white-space: normal;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.identity-governance-detail-table th {
  width: 92px;
}
.identity-detail-card { position:sticky;top:88px; }
.identity-detail-head { margin-bottom:10px; }
.identity-confidence { display:inline-flex;align-items:center;min-width:32px;justify-content:center;padding:2px 8px;border:1px solid var(--border-soft);border-radius:999px;background:#f3f6fa;color:#6b7b8d;font-size:11.5px;font-weight:700; }
.identity-confidence.high { border-color:#cfe6dc;background:var(--good-bg);color:var(--good); }
.identity-confidence.medium { border-color:#eedebc;background:var(--warn-bg);color:var(--warn); }
.identity-confidence-note { margin:-2px 0 12px;padding:7px 9px;border-left:2px solid #9bb2c8;background:#f7f9fc;color:var(--text-3);font-size:11.5px;line-height:1.45; }
.identity-detail-actions { display:grid;gap:10px;margin-bottom:14px; }
.identity-action-group { display:grid;grid-template-columns:76px minmax(0,1fr);align-items:start;gap:8px; }
.identity-action-group > span { padding-top:7px;color:var(--text-3);font-size:11px; }
.identity-action-group > div { display:flex;flex-wrap:wrap;gap:7px;min-width:0; }
.identity-action-group .btn { min-height:32px;padding:5px 10px;font-size:12px; }
.identity-action-group.low { padding-top:8px;border-top:1px solid var(--border-soft); }
.identity-danger-action { color:var(--bad)!important; }
.identity-detail-candidates td {
  min-width: 0;
  max-width: 100%;
}
.identity-candidate-list {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: 3px;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.identity-candidate-list span,
.identity-candidate-list small,
.identity-candidate-empty {
  display: block;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.identity-candidate-list small,
.identity-candidate-short {
  color: var(--text-3);
}
.identity-candidate-item { position:relative;padding:5px 72px 5px 0;border-bottom:1px solid var(--border-soft); }
.identity-candidate-item:last-of-type { border-bottom:0; }
.identity-candidate-item b { display:block;color:var(--text);font-size:12px;line-height:1.45; }
.identity-candidate-item > small { margin-top:1px;font-size:10.5px; }
.identity-candidate-item em { position:absolute;top:6px;right:0;padding:1px 5px;border-radius:999px;background:#f1f4f7;color:var(--text-3);font-size:9.5px;font-style:normal;white-space:nowrap; }
.identity-candidate-item em.is-archived { background:var(--primary-50);color:var(--primary); }
.identity-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.identity-model-list {
  display: grid;
  gap: 5px;
}
.identity-model-list span,
.identity-model-list small {
  display: block;
  overflow-wrap: anywhere;
}
.identity-model-list small {
  color: var(--text-3);
}
.identity-source-list {
  display: grid;
  gap: 7px;
  max-height: 280px;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}
.identity-source-item {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--card-2);
  overflow-wrap: anywhere;
}
.identity-source-date,
.identity-source-meta {
  color: var(--text-3);
  font-size: 11.5px;
}
.identity-source-model {
  margin: 2px 0;
  color: var(--text);
  font-weight: 650;
  overflow-wrap: anywhere;
}
.identity-source-fallback {
  color: var(--text-2);
  line-height: 1.5;
}
.identity-queue-tabs {
  max-width: 100%;
  flex-wrap: nowrap;
  overflow-x:auto;
  scrollbar-width:thin;
}
.identity-queue-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.identity-queue-tabs button span {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(83, 103, 132, .10);
  color: var(--text-3);
  font-size: 11px;
  line-height: 1.35;
}
.identity-queue-tabs button.active span {
  background: var(--primary-50);
  color: var(--primary);
}
.identity-batch-check {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
}
.identity-batch-check input { width: 15px; height: 15px; margin: 0; }
.identity-batch-modal {
  width: min(720px, calc(100vw - 32px));
  max-height: calc(100vh - 96px);
}
.identity-person-resolution-modal { width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 64px); }
.identity-person-resolution-body { flex:1;min-height:0;overflow:auto;padding:0 18px 16px; }
.identity-resolution-section { display:grid;gap:10px; }
.identity-resolution-search { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px; }
.identity-resolution-results { display:grid;gap:7px;max-height:260px;overflow:auto; }
.identity-resolution-result { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 10px;border:1px solid var(--border-soft);border-radius:8px;background:var(--card-2); }
.identity-resolution-result > div { display:grid;gap:2px;min-width:0; }
.identity-resolution-result b,
.identity-resolution-result span { overflow-wrap:anywhere; }
.identity-resolution-result span { color:var(--text-3);font-size:11.5px; }
.identity-resolution-loading,
.identity-resolution-empty { padding:12px;border:1px dashed var(--border);border-radius:8px;color:var(--text-3);font-size:12px;text-align:center; }
.identity-resolution-divider { position:relative;margin:18px 0;text-align:center;color:var(--text-3);font-size:11px; }
.identity-resolution-divider::before { content:"";position:absolute;left:0;right:0;top:50%;height:1px;background:var(--border-soft); }
.identity-resolution-divider span { position:relative;padding:0 10px;background:#fff; }
.identity-resolution-create-actions { display:flex;gap:8px;flex-wrap:wrap; }
.identity-person-batch-modal { width:min(1120px,calc(100vw - 32px));max-height:calc(100vh - 48px); }
.identity-person-preflight-wrap { flex:1;min-height:0;overflow:auto;margin:0 18px 14px;border:1px solid var(--border-soft);border-radius:8px; }
.identity-person-preflight-table { min-width:980px;table-layout:fixed; }
.identity-person-preflight-table th:nth-child(1) { width:185px; }
.identity-person-preflight-table th:nth-child(2) { width:190px; }
.identity-person-preflight-table th:nth-child(3) { width:100px; }
.identity-person-preflight-table th:nth-child(4) { width:130px; }
.identity-person-preflight-table th:nth-child(5) { width:190px; }
.identity-person-preflight-table th:nth-child(6) { width:210px; }
.identity-person-preflight-table td { vertical-align:top;white-space:normal;overflow-wrap:anywhere; }
.identity-person-preflight-table td > span,
.identity-person-preflight-table td > small { display:block;margin-top:3px;color:var(--text-3);font-size:11.5px;line-height:1.4; }
.identity-person-preflight-table select { width:100%;min-width:0;font-size:12px; }
.identity-preflight-risk { display:block;padding:4px 6px;border-radius:6px;background:#f3f6fa;color:#6b7b8d; }
.identity-preflight-risk.sameName { background:var(--warn-bg);color:var(--warn); }
.identity-preflight-risk.assigned,
.identity-preflight-risk.exactAlias { background:#edf2f6;color:#647487; }
.identity-preflight-risk.invalid { background:var(--bad-bg);color:var(--bad); }
.identity-batch-selection-note { margin-right:auto;color:var(--text-3);font-size:12px; }
.identity-batch-result-body { flex:1;min-height:0;overflow:auto;padding:0 18px 18px; }
.identity-batch-result-summary { display:grid;grid-template-columns:repeat(5,minmax(0,1fr));border:1px solid var(--border-soft);border-radius:8px;overflow:hidden;margin-bottom:12px; }
.identity-batch-result-summary > div { padding:10px 12px; }
.identity-batch-result-summary > div + div { border-left:1px solid var(--border-soft); }
.identity-batch-result-summary span { display:block;color:var(--text-3);font-size:11px; }
.identity-batch-result-summary strong { display:block;margin-top:3px;color:var(--text);font-size:17px; }
.identity-batch-result-list { display:grid;gap:6px; }
.identity-batch-result-list > div { display:grid;grid-template-columns:minmax(120px,.45fr) minmax(0,1fr);gap:10px;padding:8px 9px;border:1px solid var(--border-soft);border-radius:7px;background:var(--card-2); }
.identity-batch-result-list span { color:var(--text-3);overflow-wrap:anywhere; }
.company-picker-modal { width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 48px); }
.company-picker-modal .modal-head > div { min-width:0; }
.company-picker-modal [data-company-picker-close] { flex:0 0 auto;white-space:nowrap; }
.company-picker-body { flex:1;min-height:0;overflow:auto;padding:0 18px 16px; }
.company-picker-search-step,
.company-picker-create-step { display:grid;gap:12px;min-width:0; }
.company-picker-search-row { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px; }
.company-picker-results { display:grid;gap:7px;max-height:360px;overflow:auto;min-width:0;padding-right:2px; }
.company-picker-result { display:flex;align-items:center;justify-content:space-between;gap:12px;min-width:0;padding:10px 11px;border:1px solid var(--border-soft);border-radius:8px;background:#fff;transition:border-color .14s ease,background .14s ease; }
.company-picker-result:hover,
.company-picker-result.is-active { border-color:#b9d0e5;background:#f5f9fd; }
.company-picker-result-main { display:grid;gap:3px;min-width:0; }
.company-picker-result-main strong { color:var(--text);font-size:13px;overflow-wrap:anywhere; }
.company-picker-recommended { display:inline-flex;margin-left:6px;padding:1px 5px;border-radius:999px;background:var(--primary-50);color:var(--primary);font-size:9.5px;font-style:normal;vertical-align:middle; }
.company-picker-result-main > div { display:flex;flex-wrap:wrap;gap:4px 10px;color:var(--text-3);font-size:11.5px; }
.company-picker-result-main small { color:var(--text-3);font-size:11.5px;overflow-wrap:anywhere; }
.company-picker-result-main .company-picker-duplicate-reason { color:var(--warn); }
.company-picker-state { padding:18px 12px;border:1px dashed var(--border);border-radius:8px;color:var(--text-3);font-size:12px;text-align:center; }
.company-picker-state.is-error,
.company-picker-error { color:var(--bad); }
.company-picker-error { padding:8px 10px;border:1px solid #edcdcd;border-radius:7px;background:var(--bad-bg);font-size:12px;overflow-wrap:anywhere; }
.company-picker-create-entry { width:100%;padding:9px 10px;border:1px dashed #b9cbdd;border-radius:8px;background:#f7fafd;color:var(--primary);font-size:12px;text-align:left;cursor:pointer; }
.company-picker-create-entry:hover { border-color:#8fb1d0;background:#f0f6fc; }
.company-picker-group-label { margin-top:2px;color:var(--text-3);font-size:10.5px;font-weight:700; }
.company-picker-unarchived { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 11px;border:1px dashed #c7d3df;border-radius:8px;background:#fafbfd; }
.company-picker-unarchived > div { display:grid;gap:2px;min-width:0; }
.company-picker-unarchived strong { color:var(--text);font-size:12.5px;overflow-wrap:anywhere; }
.company-picker-unarchived span { color:var(--text-3);font-size:10.5px; }
.company-picker-create-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px; }
.company-picker-duplicate-box { display:grid;gap:7px;min-width:0; }
.company-picker-duplicate-warning { display:grid;gap:7px;padding:10px;border:1px solid #eedebc;border-radius:8px;background:var(--warn-bg); }
.company-picker-duplicate-warning > strong { color:var(--warn);font-size:12px; }
.company-picker-duplicate-clear { padding:8px 10px;border-radius:7px;background:var(--good-bg);color:var(--good);font-size:12px; }
.company-picker-backdrop.is-busy .company-picker-body,
.company-picker-backdrop.is-busy .company-picker-footer { pointer-events:none;opacity:.72; }
.identity-batch-groups {
  min-height: 0;
  max-height: none;
  flex: 1;
  overflow: auto;
  display: grid;
  align-content: start;
  gap: 8px;
  margin: 0;
  padding: 0 18px 14px;
}
.identity-batch-group {
  padding: 9px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
}
.identity-batch-group b { display: inline-block; margin-right: 8px; color: var(--text); }
.identity-batch-group span { color: var(--text-3); font-size: 12px; }
.identity-batch-group .tag { margin-top: 6px; }
.identity-rules-tool {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.identity-backup-tool {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border-soft);
}
.identity-backup-panel {
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
}
.identity-backup-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
  color: var(--text-3);
  font-size: 12.5px;
}
.identity-backup-preview,
.identity-backup-result {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--card-2);
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.6;
}
.identity-backup-error {
  margin: 8px 0;
  padding: 8px 10px;
  border: 1px solid rgba(211, 74, 74, .22);
  border-radius: 8px;
  background: var(--bad-bg);
  color: var(--bad);
  font-size: 12px;
  line-height: 1.6;
}
.identity-work-mode {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--card-2);
}
.identity-work-mode button {
  height: 30px;
  padding: 0 14px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}
.identity-work-mode button.active {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.identity-main-grid { grid-template-columns: minmax(0, 1.75fr) minmax(340px, .85fr); align-items: start; }
.identity-governance-grid {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 410px);
}
.identity-governance-grid > *,
.identity-governance-grid .card,
.identity-governance-grid .table-wrap,
.identity-governance-grid #governanceRows,
.identity-governance-grid #governanceDetailPane {
  min-width: 0;
  max-width: 100%;
}
.identity-governance-grid .table-wrap {
  overflow-x: auto;
}
@media (max-width: 1100px) {
  .identity-status-band { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .identity-status-item:nth-child(4) { border-left:0; }
  .identity-status-item:nth-child(n+4) { border-top:1px solid var(--border-soft); }
  .identity-governance-grid { grid-template-columns:minmax(0,1fr) minmax(320px,350px); }
}
@media (max-width: 900px) {
  .identity-governance-grid { grid-template-columns:minmax(0,1fr); }
  .identity-detail-card { position:static; }
  .identity-auto-batch-panel { grid-template-columns:1fr;align-items:start; }
  .identity-auto-batch-actions { justify-content:flex-start; }
}
@media (max-width: 768px) {
  .identity-list-head { align-items:flex-start;flex-wrap:wrap; }
  .identity-sync-state { order:3;margin-left:0;flex-basis:100%; }
  .identity-refresh-button { margin-left:0; }
  .identity-queue-controls { align-items:stretch;flex-direction:column; }
  .identity-queue-tabs { width:100%; }
  .identity-queue-controls #govSearch { flex:1;width:100%;max-width:none; }
  .identity-batch-bar,
  .identity-person-batch-entry { align-items:flex-start;flex-direction:column; }
  .identity-batch-actions { width:100%; }
  .identity-auto-batch-summary { width:100%; }
  .identity-auto-batch-summary button { flex:1;justify-content:center; }
  .identity-action-group { grid-template-columns:1fr;gap:4px; }
  .identity-action-group > span { padding-top:0; }
  .identity-person-batch-modal { width:calc(100vw - 16px);max-height:calc(100dvh - 16px); }
  .identity-person-preflight-wrap { margin-left:10px;margin-right:10px; }
}
@media (max-width: 480px) {
  .identity-status-band { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .identity-status-item { border-top:0!important;border-left:0!important; }
  .identity-status-item:nth-child(even) { border-left:1px solid var(--border-soft)!important; }
  .identity-status-item:nth-child(n+3) { border-top:1px solid var(--border-soft)!important; }
  .identity-person-batch-entry .btn,
  .identity-batch-actions .btn { flex:1 1 calc(50% - 4px); }
  .identity-auto-batch-summary { display:grid;grid-template-columns:1fr 1fr; }
  .identity-auto-batch-actions { display:grid;grid-template-columns:1fr; }
  .identity-auto-batch-actions .btn { width:100%; }
  .identity-action-group > div { display:grid;grid-template-columns:1fr; }
  .identity-action-group .btn { width:100%; }
  .identity-person-resolution-modal { width:calc(100vw - 16px);max-height:calc(100dvh - 16px); }
  .identity-resolution-search { grid-template-columns:1fr; }
  .identity-resolution-result { align-items:stretch;flex-direction:column; }
  .identity-resolution-result .btn,
  .identity-resolution-create-actions .btn { width:100%; }
  .identity-resolution-create-actions { display:grid;grid-template-columns:1fr; }
  .identity-batch-result-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .identity-batch-result-summary > div { border-left:0!important; }
  .identity-batch-result-summary > div:nth-child(even) { border-left:1px solid var(--border-soft)!important; }
  .identity-batch-result-summary > div:nth-child(n+3) { border-top:1px solid var(--border-soft); }
  .identity-batch-result-list > div { grid-template-columns:1fr;gap:3px; }
  .company-picker-modal { width:calc(100vw - 16px);max-height:calc(100dvh - 16px); }
  .company-picker-body { padding-left:10px;padding-right:10px; }
  .company-picker-search-row,
  .company-picker-create-grid { grid-template-columns:1fr; }
  .company-picker-create-grid .form-span-2 { grid-column:auto; }
  .company-picker-result { align-items:stretch;flex-direction:column; }
  .company-picker-result .btn,
  .company-picker-unarchived .btn { width:100%; }
  .company-picker-unarchived { align-items:stretch;flex-direction:column; }
  .company-picker-footer { flex-wrap:wrap; }
  .company-picker-footer .btn { flex:1 1 calc(50% - 4px); }
}
.identity-type-suggestion-tool {
  margin-top: 0;
}
.identity-type-suggestion-table th,
.identity-type-suggestion-table td { vertical-align: top; }
.identity-type-suggestion-table .identity-batch-col { vertical-align: middle; }
.identity-type-reason {
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.identity-type-batch-bar {
  margin-bottom: 10px;
}
.identity-type-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}
.identity-type-actions select {
  height: 28px;
  min-width: 84px;
  font-size: 12px;
}
.identity-region-custom {
  height: 28px;
  min-width: 128px;
  max-width: 180px;
  font-size: 12px;
}
.identity-profile-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.identity-profile-actions select {
  height: 32px;
  min-width: 160px;
  font-size: 12px;
}
.identity-profile-actions .identity-region-custom {
  height: 32px;
  min-width: 180px;
  max-width: 240px;
}
.identity-rule-toolbar input[type=text] { min-width: 220px; }
.identity-rule-toolbar select { min-width: 112px; }
.identity-rules-table th,
.identity-rules-table td { vertical-align: top; }
.identity-rules-table .pwb-row-actions { gap: 7px; }
.link-btn {
  border: none;
  background: transparent;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
.pwb-pager { display: flex; align-items: center; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.pwb-pager .btn { height: 28px; padding: 0 10px; font-size: 12px; }
.pwb-lower-grid { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(0, .9fr); }
.pwb-empty {
  padding: 14px 12px;
  color: var(--text-3);
  background: var(--card-2);
  border: 1px dashed var(--border);
  border-radius: 8px;
  text-align: center;
}
.pwb-inv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.pwb-mini-kv { border: 1px solid var(--border-soft); border-radius: 8px; padding: 8px 9px; background: #fff; }
.pwb-mini-kv span { display: block; color: var(--text-3); font-size: 11.5px; margin-bottom: 3px; }
.pwb-mini-kv b { color: var(--text); font-size: 14px; }
.pwb-stock-chart { height: 170px; }
.pwb-tabs {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  margin-bottom: 8px;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}
.pwb-tabs button {
  height: 28px;
  padding: 0 12px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
}
.pwb-tabs button.active { background: #fff; color: var(--accent); font-weight: 700; box-shadow: var(--shadow-sm); }
.pwb-flow-head { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; margin-bottom: 8px; }
.pwb-flow-filter { color: var(--text-2); font-size: 12.5px; }
.pwb-note-toolbar { margin-bottom: 8px; }
.pwb-contact-modal { width: min(680px, calc(100vw - 32px)); }
.customer-choice-raw {
  margin: 14px 18px 10px;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--card-2);
  color: var(--text-2);
  font-size: 12.5px;
}
.customer-choice-search {
  margin: 0 18px 10px;
}
.customer-choice-results {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 0 18px 14px;
}
.customer-choice-list {
  display: grid;
  gap: 10px;
}
.customer-choice-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: #fff;
  transition: border-color .12s, background .12s, box-shadow .12s;
}
.customer-choice-card:hover {
  border-color: #cdd9e8;
  background: #fbfdff;
  box-shadow: 0 4px 14px rgba(23, 32, 51, .06);
}
.customer-choice-main {
  min-width: 0;
}
.customer-choice-name {
  color: var(--text);
  font-weight: 700;
  line-height: 1.45;
}
.customer-choice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 6px;
}
.customer-choice-meta span {
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--card-2);
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.4;
}
.customer-choice-action {
  flex: none;
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}
@media (max-width: 1200px) {
  .pwb-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pwb-lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .pwb-hero { grid-template-columns: 1fr; }
  .pwb-actions { justify-content: flex-start; }
  .pwb-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pwb-follow-tools { align-items: stretch; flex-direction: column; }
  .pwb-follow-tools input,
  .pwb-follow-tools select { width: 100%; max-width: none; }
}

/* ---------- 广濑计划：计划确认 / 供应缺口跟进 ---------- */
.hook-confirm-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin: 0 0 8px;
}
.hook-confirm-month {
  flex: 0 0 auto;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 5px 8px;
}
.hook-gap-panel {
  background: var(--card);
}
.hook-gap-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.hook-gap-filter {
  flex: 0 0 auto;
  background: var(--card-2);
  border: 1px solid var(--border-soft);
}
.hook-gap-filter button {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
}
.hook-confirm-table { overflow: hidden; }
.hook-compact-table th {
  color: var(--ky-table-head-text);
  font-size: 12px;
}
.hook-compact-table td {
  vertical-align: middle;
}
.hook-confirm-row-risk {
  background: rgba(211,74,74,.07);
  box-shadow: inset 3px 0 0 var(--bad);
}
.hook-danger-num {
  color: var(--bad) !important;
  font-weight: 780 !important;
}
.hook-total-row {
  background: var(--card-2);
  font-weight: 760;
}
.hook-actions {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}
.hook-actions .btn,
.hook-compact-table .btn {
  height: 28px;
  padding: 0 9px;
}
.hook-gap-empty {
  padding: 10px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: var(--card-2);
  color: var(--text-3);
}
@media (max-width: 900px) {
  .hook-gap-head { flex-direction: column; align-items: stretch; }
  .hook-confirm-month { width: 100%; box-sizing: border-box; }
}

@keyframes kySoftIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes kyBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes kyModalIn {
  from { opacity: 0; transform: translateY(8px) scale(.992); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ---------- 客户经营轨道：客户中心 / 客户档案 ---------- */
.customer-status-track {
  display:flex;align-items:center;gap:0;min-width:0;overflow-x:auto;padding:8px 10px;
  border:1px solid var(--border);border-radius:var(--radius);background:#fff;box-shadow:var(--shadow-sm);
  scrollbar-width:thin;
}
.customer-status-node {
  position:relative;display:flex;align-items:baseline;gap:8px;min-width:118px;padding:4px 16px 4px 20px;
  color:var(--text-2);white-space:nowrap;
}
.customer-status-node + .customer-status-node { border-left:1px solid var(--border-soft); }
.customer-status-node::before { content:"";position:absolute;left:9px;top:50%;width:6px;height:6px;border-radius:50%;background:currentColor;transform:translateY(-50%); }
.customer-status-node span { font-size:11.5px; }
.customer-status-node strong { color:var(--text);font-size:16px;font-variant-numeric:tabular-nums; }
.customer-status-node.good { color:var(--good); }
.customer-status-node.info { color:var(--info); }
.customer-status-node.bad { color:var(--bad); }
.customer-status-node.neutral { color:var(--neutral); }

.customer-ledger-toolbar {
  display:flex;align-items:flex-end;gap:9px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);
  background:var(--ky-control-bg);box-shadow:none;
}
.customer-search-field,
.customer-filter-field { position:relative;display:grid;gap:4px;min-width:112px;color:var(--text-3);font-size:11px;font-weight:650; }
.customer-search-field { flex:1 1 250px;max-width:360px; }
.customer-filter-field { flex:0 1 128px; }
.customer-search-field > span,
.customer-filter-field > span { display:flex;align-items:center;gap:5px;min-height:16px;white-space:nowrap; }
.customer-search-field i,
.customer-filter-field i { width:5px;height:5px;border-radius:50%;background:var(--primary);opacity:0;transform:scale(.5);transition:opacity .16s ease,transform .16s ease; }
.customer-search-field.has-value i,
.customer-filter-field.has-value i { opacity:1;transform:scale(1); }
.customer-ledger-toolbar .customer-search-field input,
.customer-ledger-toolbar .customer-filter-field select { width:100%;height:36px;border-color:var(--border); }
.customer-filter-meta { display:flex;align-items:center;justify-content:flex-end;gap:9px;min-width:226px;min-height:36px;margin-left:auto;white-space:nowrap;font-size:11.5px;color:var(--text-3); }
.customer-filter-clear { padding:0;border:0;background:transparent;color:var(--accent);font:inherit;font-weight:650;cursor:pointer; }
.customer-filter-clear:hover { text-decoration:underline;text-underline-offset:3px; }
.customer-filter-clear:focus-visible { outline:2px solid var(--accent);outline-offset:2px;border-radius:3px; }
.customer-filter-clear.is-hidden { visibility:hidden;pointer-events:none; }

.customer-ledger-table-card { border-color:var(--border);border-radius:var(--radius);box-shadow:var(--shadow-sm); }
.customer-ledger-page table.dt { min-width:860px; }
.customer-ledger-page table.dt th,
.customer-ledger-page table.dt td { height:56px; }
.customer-ledger-page table.dt tbody tr:hover td:first-child { box-shadow:inset 3px 0 0 rgba(78,125,170,.70); }
.customer-ledger-page table.dt tbody tr:hover .customer-master-name { color:var(--primary); }
.customer-ledger-page table.dt tbody tr:hover .customer-key-model-name,
.customer-ledger-page table.dt tbody tr:hover .customer-judgement-status { filter:brightness(.94); }
.customer-master-name,
.customer-master-meta,
.customer-key-model-name { white-space:normal;overflow-wrap:anywhere;word-break:break-word; }
.customer-master-name { display:block;color:var(--text);font-size:13px;font-weight:720;line-height:1.35; }
.customer-master-meta { display:block;color:var(--text-3);font-size:11.5px;line-height:1.35; }
.customer-key-model-name { display:-webkit-box;overflow:hidden;color:var(--text);font-size:12.5px;line-height:1.35;-webkit-box-orient:vertical;-webkit-line-clamp:2; }
.customer-key-model-status { min-height:21px;padding:2px 7px; }
.customer-mobile-status { display:none;align-items:center;gap:4px;margin-left:6px;color:var(--neutral);font-size:10.5px;font-weight:650; }
.customer-mobile-status i { width:5px;height:5px;border-radius:50%;background:currentColor; }
.customer-mobile-status.good { color:var(--good); }
.customer-mobile-status.info { color:var(--info); }
.customer-mobile-status.bad { color:var(--bad); }

.customer-core-card { position:relative;isolation:isolate;overflow:hidden;border-color:#ceddea;animation:kyCustomerCoreIn .30s ease-out both; }
.customer-core-orbit {
  position:absolute;z-index:-1;right:-72px;top:-118px;width:430px;height:220px;border:1px solid rgba(78,125,170,.11);border-radius:50%;transform:rotate(-8deg);pointer-events:none;
}
.customer-core-orbit::after { content:"";position:absolute;inset:30px 52px;border:1px dashed rgba(78,125,170,.08);border-radius:50%; }
.customer-core-head { display:flex;align-items:flex-start;justify-content:space-between;gap:16px;padding-bottom:14px;border-bottom:1px solid var(--border-soft); }
.customer-war-title { color:var(--text);font-size:24px;font-weight:800;line-height:1.3;overflow-wrap:anywhere; }
.customer-core-identity { display:flex;flex-wrap:wrap;gap:7px 13px;margin-top:7px;color:var(--text-3);font-size:12px; }
.customer-core-identity span { position:relative; }
.customer-core-identity span + span::before { content:"";position:absolute;left:-8px;top:50%;width:3px;height:3px;border-radius:50%;background:#a5b4c4;transform:translateY(-50%); }
.customer-core-identity .subject { color:var(--primary);font-weight:700; }
.customer-core-status { display:inline-flex;align-items:center;gap:7px;flex:none;min-height:30px;padding:4px 10px;border:1px solid var(--border);border-radius:999px;background:var(--card-2);color:var(--neutral);font-size:12px;font-weight:750; }
.customer-core-status i { width:9px;height:9px;border:2px solid currentColor;border-radius:50%;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 10%,transparent); }
.customer-core-status.good { color:var(--good);background:var(--good-bg);border-color:#cfe6dc; }
.customer-core-status.info { color:var(--info);background:var(--info-bg);border-color:#d2e2f5; }
.customer-core-status.bad { color:var(--bad);background:var(--bad-bg);border-color:#edcdcd; }
.customer-core-body { display:grid;grid-template-columns:minmax(150px,.62fr) minmax(320px,1.55fr) minmax(250px,1fr);gap:14px;margin-top:14px;align-items:stretch; }
.customer-core-current,
.customer-core-judgement,
.customer-core-metrics { min-width:0;border:1px solid var(--border-soft);border-radius:9px;background:rgba(248,250,253,.90); }
.customer-core-current { display:flex;flex-direction:column;justify-content:center;padding:14px 15px; }
.customer-core-current span,
.customer-core-judgement span,
.customer-core-metrics span { display:block;color:var(--text-3);font-size:11px;margin-bottom:4px; }
.customer-core-current strong { color:var(--primary);font-size:21px;line-height:1.25; }
.customer-core-judgement { display:grid;grid-template-columns:1.25fr 1fr 1.1fr; }
.customer-core-judgement > div { min-width:0;padding:11px 12px; }
.customer-core-judgement > div + div { border-left:1px solid var(--border-soft); }
.customer-core-judgement p { display:-webkit-box;margin:0;overflow:hidden;color:var(--text-2);font-size:12px;line-height:1.5;-webkit-box-orient:vertical;-webkit-line-clamp:3; }
.customer-core-metrics { display:grid;grid-template-columns:1fr 1fr; }
.customer-core-metrics > div { min-width:0;padding:10px 11px; }
.customer-core-metrics > div:nth-child(even) { border-left:1px solid var(--border-soft); }
.customer-core-metrics > div:nth-child(n+3) { border-top:1px solid var(--border-soft); }
.customer-core-metrics strong { display:block;overflow:hidden;color:var(--text);font-size:12.5px;font-weight:730;line-height:1.35;text-overflow:ellipsis;white-space:nowrap; }

.customer-archive-columns { display:grid;grid-template-columns:minmax(0,1.38fr) minmax(300px,1fr);gap:14px;align-items:start; }
.customer-archive-summary,
.customer-contact-card { align-self:start; }
.customer-archive-field { border-radius:8px; }
.customer-contact-card { min-width:0; }
.customer-profile-card { min-width:0; }
.customer-profile-head { margin-bottom:10px; }
.customer-profile-more-actions { position:relative; }
.customer-profile-more-actions > summary { list-style:none;cursor:pointer;user-select:none; }
.customer-profile-more-actions > summary::-webkit-details-marker { display:none; }
.customer-profile-more-actions[open] > summary { border-color:#b9d0e5;background:#f4f8fc;color:var(--primary); }
.customer-profile-more-menu { position:absolute;right:0;top:calc(100% + 5px);z-index:12;display:grid;width:176px;padding:5px;border:1px solid var(--border);border-radius:8px;background:#fff;box-shadow:var(--shadow-md); }
.customer-profile-more-menu button { width:100%;padding:8px 9px;border:0;border-radius:6px;background:transparent;color:var(--text-2);font:inherit;font-size:12px;text-align:left;cursor:pointer; }
.customer-profile-more-menu button:hover,
.customer-profile-more-menu button:focus-visible { background:#f2f6fb;color:var(--primary);outline:none; }
.customer-profile-more-menu button + button { border-top:1px solid var(--border-soft);border-radius:0; }
.customer-profile-name,
.customer-profile-basics,
.customer-profile-lower,
.customer-profile-completion,
.customer-profile-contacts,
.customer-profile-relations { min-width:0; }
.customer-profile-name .customer-archive-field { padding:9px 11px; }
.customer-profile-name .customer-archive-field strong { font-size:15px;white-space:normal; }
.customer-profile-basics { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin-top:9px; }
.customer-individual-profile .customer-profile-basics { grid-template-columns:repeat(3,minmax(0,1fr)); }
.customer-profile-basics .customer-archive-field { display:flex;min-height:64px;flex-direction:column;justify-content:center; }
.customer-profile-basics .customer-archive-field strong { white-space:normal;overflow-wrap:anywhere; }
.customer-individual-completion { min-width:0;margin-top:12px;padding:10px 0;border-top:1px solid var(--border-soft); }
.customer-profile-lower { display:grid;grid-template-columns:minmax(210px,.3fr) minmax(0,.7fr);gap:16px;margin-top:12px;padding-top:12px;border-top:1px solid var(--border-soft);align-items:start; }
.customer-profile-completion { padding-right:14px;border-right:1px solid var(--border-soft); }
.customer-profile-subtitle { color:var(--text);font-size:12.5px;font-weight:750;line-height:1.4; }
.customer-profile-contact-head { display:flex;align-items:center;justify-content:space-between;margin-bottom:7px; }
.customer-profile-contact-head .customer-profile-subtitle span { display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:19px;margin-left:4px;padding:0 6px;border-radius:999px;background:var(--primary-50);color:var(--primary);font-size:10.5px;font-weight:750; }
.customer-profile-missing { margin-top:7px;color:var(--text-3);font-size:12px;line-height:1.5;overflow-wrap:anywhere; }
.customer-profile-missing.has-missing { color:var(--warn); }
.customer-profile-supplemental { display:grid;gap:6px;margin-top:9px; }
.customer-profile-supplemental div { min-width:0;padding-top:6px;border-top:1px dashed var(--border-soft); }
.customer-profile-supplemental span { display:block;color:var(--text-3);font-size:10.5px; }
.customer-profile-supplemental p { margin:2px 0 0;color:var(--text-2);font-size:11.5px;line-height:1.45;overflow-wrap:anywhere; }
.customer-contact-compact { display:flex;flex-wrap:wrap;gap:7px;align-items:flex-start;animation:kyCustomerDisclosure .18s ease-out both; }
.customer-contact-row { display:grid;grid-template-columns:minmax(0,1fr) auto;flex:0 1 calc(33.333% - 5px);min-width:190px;max-width:280px;gap:8px;align-items:start;padding:8px 9px;border:1px solid var(--border-soft);border-radius:7px;background:var(--card-2); }
.customer-contact-compact > .kv { flex:1 1 100%;min-width:0; }
.customer-contact-main { display:flex;flex-wrap:wrap;align-items:baseline;gap:3px 8px;min-width:0; }
.customer-contact-main strong { color:var(--text);font-size:13px; }
.customer-contact-main span { color:var(--text-3);font-size:11.5px; }
.customer-contact-main small { flex-basis:100%;color:var(--text-2);font-size:11.5px;line-height:1.45;overflow-wrap:anywhere; }
.customer-contact-actions { display:flex;gap:2px;white-space:nowrap; }
.customer-contact-add { align-items:flex-end;flex-wrap:wrap;padding:8px;border:1px dashed var(--border-soft);border-radius:7px;background:transparent; }
.customer-contact-toggle { display:inline-flex;margin-top:7px;padding:0;border:0;background:transparent;color:var(--accent);font:inherit;font-size:11.5px;font-weight:650;cursor:pointer; }
.customer-contact-toggle:hover { text-decoration:underline;text-underline-offset:3px; }
.customer-contact-toggle:focus-visible { outline:2px solid var(--ky-focus-ring);outline-offset:3px;border-radius:3px; }
.customer-profile-contacts .customer-empty-mini { min-height:0;padding:7px 0; }
.customer-profile-relations { margin-top:12px;padding-top:12px;border-top:1px solid var(--border-soft); }
.customer-profile-relations .customer-empty-mini { min-height:0;padding:7px 0; }
.customer-relation-list { display:flex;flex-wrap:wrap;gap:7px;align-items:flex-start;animation:kyCustomerDisclosure .18s ease-out both; }
.customer-relation-item { display:grid;grid-template-columns:minmax(0,1fr) auto;flex:0 1 calc(33.333% - 5px);min-width:210px;max-width:310px;gap:8px;align-items:start;padding:8px 9px;border:1px solid var(--border-soft);border-radius:7px;background:var(--card-2); }
.customer-relation-item.is-extra { display:none; }
.customer-relation-list.is-expanded .customer-relation-item.is-extra { display:grid; }
.customer-relation-main { display:flex;flex-wrap:wrap;align-items:center;gap:3px 7px;min-width:0; }
.customer-relation-main strong { flex-basis:100%;color:var(--text);font-size:13px;line-height:1.4;overflow-wrap:anywhere; }
.customer-relation-main > span:not(.badge) { color:var(--text-3);font-size:11.5px; }
.customer-relation-main small { flex-basis:100%;color:var(--text-2);font-size:11.5px;line-height:1.45;overflow-wrap:anywhere; }
.customer-relation-actions { display:flex;flex-wrap:wrap;justify-content:flex-end;gap:2px; }
.customer-subject-correction { display:flex;align-items:center;justify-content:space-between;gap:14px;margin-top:4px;padding:12px;border:1px solid #e4cfcd;border-radius:8px;background:#fffafa; }
.customer-subject-correction > div { display:grid;gap:3px;min-width:0; }
.customer-subject-correction strong { color:var(--bad);font-size:12.5px; }
.customer-subject-correction span { color:var(--text-3);font-size:11.5px; }
.customer-subject-correction-modal { width:min(560px,calc(100vw - 32px)); }
.customer-subject-correction-body { padding:16px 20px; }
.customer-subject-correction-body > p { margin:0 0 12px;color:var(--text);font-size:14px;font-weight:720;line-height:1.55;overflow-wrap:anywhere; }
.customer-subject-correction-body ul { margin:8px 0 0;padding-left:20px;color:var(--text-2);font-size:12.5px;line-height:1.75; }
.customer-subject-correction-warning { margin-top:12px;padding:8px 10px;border-left:3px solid var(--warn);background:var(--warn-bg);color:var(--text-2);font-size:12px;line-height:1.55; }
.customer-subject-correction-error { margin-top:10px;padding:8px 10px;border:1px solid #e4c5c3;border-radius:7px;background:var(--bad-bg);color:var(--bad);font-size:12px;line-height:1.5; }
.customer-contact-conversion-modal { width:min(720px,calc(100vw - 32px));max-height:calc(100dvh - 40px); }
.customer-contact-conversion-body { display:grid;gap:13px;min-width:0;padding:16px 20px;overflow:auto; }
.customer-contact-conversion-parties { display:grid;grid-template-columns:minmax(0,1fr) auto minmax(0,1fr);gap:12px;align-items:center;padding:11px;border:1px solid var(--border-soft);border-radius:8px;background:#f8fafc; }
.customer-contact-conversion-parties > div:not([aria-hidden]) { display:grid;gap:3px;min-width:0; }
.customer-contact-conversion-parties > div[aria-hidden] { color:var(--primary);font-size:18px; }
.customer-contact-conversion-parties span,
.customer-contact-conversion-summary span { color:var(--text-3);font-size:10.5px; }
.customer-contact-conversion-parties strong { color:var(--text);font-size:13.5px;line-height:1.4;overflow-wrap:anywhere; }
.customer-contact-conversion-parties small { color:var(--text-3);font-size:11px;overflow-wrap:anywhere; }
.customer-contact-conversion-summary { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));border:1px solid var(--border-soft);border-radius:8px;overflow:hidden; }
.customer-contact-conversion-summary > div { display:grid;gap:3px;min-width:0;padding:9px 11px; }
.customer-contact-conversion-summary > div + div { border-left:1px solid var(--border-soft); }
.customer-contact-conversion-summary strong { color:var(--text);font-size:12.5px;overflow-wrap:anywhere; }
.customer-contact-conversion-warning { padding:8px 10px;border-left:3px solid var(--warn);background:var(--warn-bg);color:var(--text-2);font-size:12px;line-height:1.55;overflow-wrap:anywhere; }
.customer-contact-conversion-raws { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0;padding:11px;border:1px solid var(--border);border-radius:8px;min-width:0; }
.customer-contact-conversion-raws legend { padding:0 5px;color:var(--text);font-size:12px;font-weight:740; }
.customer-contact-conversion-raws label { display:flex;align-items:flex-start;gap:7px;min-width:0;padding:7px 8px;border-radius:7px;background:#f7f9fc;color:var(--text-2);font-size:12px;cursor:pointer; }
.customer-contact-conversion-raws input { flex:0 0 auto;margin-top:2px; }
.customer-contact-conversion-raws span { overflow-wrap:anywhere; }
.customer-contact-conversion-fields { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
.customer-contact-conversion-fields label { display:grid;gap:5px;min-width:0; }
.customer-contact-conversion-fields label > span { color:var(--text-3);font-size:11px;font-weight:650; }
.customer-contact-conversion-impact { padding:10px 12px;border:1px solid var(--border-soft);border-radius:8px;background:#fbfcfe; }
.customer-contact-conversion-impact > strong { color:var(--text);font-size:12px; }
.customer-contact-conversion-impact ul { margin:6px 0 0;padding-left:19px;color:var(--text-2);font-size:11.5px;line-height:1.65; }
.customer-empty-mini { min-height:56px;padding:15px; }
.customer-empty-purchase { margin-top:10px; }

.customer-purchase-core { grid-template-columns:minmax(0,1fr);gap:14px;min-width:0; }
.customer-analysis-nav { display:flex;gap:5px;flex-wrap:wrap;padding:3px;border:1px solid var(--border);border-radius:8px;background:var(--card-2);width:max-content;max-width:100%; }
.customer-analysis-nav button { padding:5px 11px;border:0;border-radius:6px;background:transparent;color:var(--text-2);font:inherit;font-size:12px;font-weight:650;cursor:pointer; }
.customer-analysis-nav button:hover,
.customer-analysis-nav button:focus-visible { background:#fff;color:var(--primary);box-shadow:var(--shadow-sm);outline:none; }
.customer-analysis-block,
.customer-purchase-groups { min-width:0;max-width:100%; }
.customer-analysis-block { scroll-margin-top:92px;animation:kyCustomerBlockIn .28s ease-out both; }
.customer-analysis-block > .table-wrap { width:100%;max-width:100%; }
.customer-analysis-block:nth-of-type(3) { animation-delay:.04s; }
.customer-analysis-block:nth-of-type(4) { animation-delay:.08s; }
.customer-analysis-title { display:flex;align-items:center;gap:8px; }
.customer-analysis-title::before { content:"";width:18px;height:7px;border-top:2px solid rgba(78,125,170,.55);border-radius:50%; }
.customer-trend-table .is-current-month,
.customer-model-matrix .is-current-month { background:#edf4fc; }
.trend-cell { background:transparent; }
.trend-cell.has-value { background:linear-gradient(to top, rgba(78,125,170,.18) var(--h), rgba(248,250,253,.86) var(--h));color:var(--primary);font-weight:680; }
.matrix-cell.has-value { background:#edf4fc;color:var(--primary);font-weight:680; }
.matrix-cell.hot { background:#dceaf8;color:var(--primary); }
.customer-purchase-group { border:1px solid var(--border-soft);border-radius:8px;background:#fff;overflow:hidden; }
.customer-purchase-group + .customer-purchase-group { margin-top:9px; }
.customer-purchase-group-summary { position:relative;padding:9px 34px 9px 14px;cursor:pointer;list-style:none;background:linear-gradient(90deg,#f4f8fc,#fbfdff);color:var(--text);font-size:12.5px;font-weight:740; }
.customer-purchase-group-summary::-webkit-details-marker { display:none; }
.customer-purchase-group-summary::before { content:"";display:inline-block;width:14px;height:6px;margin-right:8px;border-top:2px solid rgba(78,125,170,.55);border-radius:50%;vertical-align:1px; }
.customer-purchase-group-summary::after { content:"展开";position:absolute;right:12px;top:10px;color:var(--text-3);font-size:10.5px;font-weight:600; }
.customer-purchase-group[open] > .customer-purchase-group-summary::after { content:"收起"; }
.customer-purchase-group[open] > .table-wrap { animation:kyCustomerDisclosure .20s ease-out both; }
.customer-purchase-group > .table-wrap { border-width:1px 0 0;border-radius:0; }
.customer-purchase-subhead td { background:#f2f6fb!important;color:var(--text-2); }
.customer-purchase-model-row td:first-child { color:var(--text); }
.customer-model-cycle td:nth-child(5) { max-width:240px;white-space:normal;line-height:1.45; }
.customer-model-cycle td:nth-child(7) { max-width:none;overflow:visible;text-overflow:clip;white-space:nowrap; }
.purchase-profile-state.purchased { border-color:#cfe6dc;background:var(--good-bg);color:var(--good); }
.purchase-profile-state.missing { border-color:#dde4ee;background:var(--neutral-bg);color:var(--neutral); }
.customer-more-business,
.customer-internal-source { overflow:hidden; }
.customer-more-business summary,
.customer-internal-source summary { outline:none; }
.customer-more-business summary:focus-visible,
.customer-internal-source summary:focus-visible { box-shadow:0 0 0 2px var(--ky-focus-ring);border-radius:5px; }

@keyframes kyCustomerCoreIn { from { opacity:0;transform:translateY(3px); } to { opacity:1;transform:none; } }
@keyframes kyCustomerBlockIn { from { opacity:.72;transform:translateY(2px); } to { opacity:1;transform:none; } }
@keyframes kyCustomerDisclosure { from { opacity:0;transform:translateY(-2px); } to { opacity:1;transform:none; } }

@media (max-width: 1100px) {
  .customer-core-body { grid-template-columns:minmax(140px,.6fr) minmax(0,1.4fr); }
  .customer-core-metrics { grid-column:1 / -1; }
  .customer-filter-meta { flex:1 1 100%;justify-content:flex-start;min-width:0; }
  .customer-profile-basics { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .customer-profile-lower { grid-template-columns:minmax(0,1fr);gap:12px; }
  .customer-profile-completion { padding-right:0;padding-bottom:10px;border-right:0;border-bottom:1px solid var(--border-soft); }
}
@media (max-width: 820px) {
  .customer-core-body { grid-template-columns:1fr; }
  .customer-core-judgement { grid-template-columns:1fr; }
  .customer-core-judgement > div + div { border-left:0;border-top:1px solid var(--border-soft); }
  .customer-core-metrics { grid-column:auto; }
  .customer-archive-columns { grid-template-columns:minmax(0,1fr); }
  .customer-archive-columns > * { min-width:0;max-width:100%; }
  .customer-search-field { max-width:none;flex-basis:100%; }
  .customer-filter-field { flex:1 1 calc(33.333% - 10px); }
}
@media (max-width: 600px) {
  .customer-status-track { padding:7px 8px; }
  .customer-status-node { min-width:104px;padding-left:19px;padding-right:12px; }
  .customer-ledger-toolbar { padding:9px; }
  .customer-filter-field { flex:1 1 calc(50% - 8px);min-width:130px; }
  .customer-filter-meta { display:grid;grid-template-columns:auto auto 1fr;gap:7px;width:100%; }
  .customer-filter-meta .t-muted { text-align:right; }
  .customer-ledger-page table.dt { min-width:820px; }
  .customer-ledger-page table.dt th:first-child,
  .customer-ledger-page table.dt td:first-child { position:sticky;left:0;z-index:2;background:#fff;box-shadow:1px 0 0 var(--border-soft); }
  .customer-ledger-page table.dt thead th:first-child { z-index:3;background:var(--ky-table-head-bg); }
  .customer-ledger-page table.dt tbody tr:hover td:first-child { background:var(--ky-table-hover-bg);box-shadow:inset 3px 0 0 rgba(78,125,170,.70),1px 0 0 var(--border-soft); }
  .customer-mobile-status { display:inline-flex; }
  .customer-core-head { flex-direction:column; }
  .customer-war-title { font-size:20px; }
  .customer-core-status { min-height:27px; }
  .customer-core-metrics { grid-template-columns:1fr; }
  .customer-core-metrics > div:nth-child(even) { border-left:0; }
  .customer-core-metrics > div + div { border-top:1px solid var(--border-soft); }
  .customer-archive-grid { grid-template-columns:1fr; }
  .customer-archive-field.full { grid-column:auto; }
  .customer-profile-basics { grid-template-columns:1fr; }
  .customer-profile-basics .customer-archive-field { min-height:58px; }
  .customer-contact-row { grid-template-columns:1fr;flex:1 1 100%;min-width:0;max-width:none; }
  .customer-contact-actions { justify-content:flex-start; }
  .customer-profile-head { align-items:flex-start; }
  .customer-profile-head .section-actions { flex-wrap:wrap;justify-content:flex-start; }
  .customer-profile-more-menu { right:auto;left:0; }
  .customer-subject-correction { align-items:flex-start;flex-direction:column; }
  .customer-contact-conversion-modal { width:calc(100vw - 16px);max-height:calc(100dvh - 16px); }
  .customer-contact-conversion-body { padding:12px 10px; }
  .customer-contact-conversion-parties { grid-template-columns:1fr; }
  .customer-contact-conversion-parties > div[aria-hidden] { transform:rotate(90deg);justify-self:start;font-size:15px; }
  .customer-contact-conversion-summary,
  .customer-contact-conversion-raws,
  .customer-contact-conversion-fields { grid-template-columns:1fr; }
  .customer-contact-conversion-summary > div + div { border-left:0;border-top:1px solid var(--border-soft); }
  .customer-relation-item { grid-template-columns:1fr;flex:1 1 100%;min-width:0;max-width:none; }
  .customer-relation-actions { justify-content:flex-start; }
  .customer-contact-add input { flex:1 1 130px;width:auto!important;min-width:0; }
  .customer-analysis-nav { width:100%; }
  .customer-analysis-nav button { flex:1;text-align:center; }
}

/* Gear operations workspace */
.gear-workspace-page { min-width:0;max-width:100%;overflow-x:clip; }
.gear-workspace-hero { position:relative;margin-bottom:10px;padding:4px 0 8px;overflow:hidden; }
.gear-workspace-hero::after { content:"";position:absolute;left:218px;bottom:2px;width:52px;height:16px;border-top:1px solid rgba(78,125,170,.38);border-radius:50%;pointer-events:none; }
.gear-workspace-kicker { color:var(--text-3);font-size:10.5px;font-weight:720;line-height:1.2;letter-spacing:.08em; }
.gear-workspace-title { margin-top:3px;color:var(--text);font-size:21px;font-weight:780;line-height:1.2; }
.gear-workspace-subtitle { margin-top:4px;color:var(--text-3);font-size:12px;line-height:1.45; }
.gear-tabs-shell { min-width:0;margin-bottom:10px;overflow-x:auto;scrollbar-width:thin; }
.gear-tabs { width:max-content;min-width:max-content; }
.gear-tabs button { min-height:32px;white-space:nowrap; }
.gear-status-band { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));min-width:0;border:1px solid var(--border-soft);border-radius:8px;background:#fff;overflow:hidden; }
.gear-status-item { min-width:0;padding:9px 12px; }
.gear-status-item + .gear-status-item { border-left:1px solid var(--border-soft); }
.gear-status-item span { display:block;color:var(--text-3);font-size:10.5px;line-height:1.3;white-space:nowrap; }
.gear-status-item strong { display:block;margin-top:3px;color:var(--text);font-size:17px;font-weight:760;font-variant-numeric:tabular-nums;line-height:1.2; }
.gear-status-item.warn strong { color:var(--warn); }
.gear-status-item.neutral strong { color:#708092; }
.gear-control-bar { padding:10px 11px; }
.gear-control-grid { display:flex;align-items:end;gap:8px;min-width:0;flex-wrap:wrap; }
.gear-filter-field { display:grid;flex:0 1 104px;gap:4px;min-width:92px;color:var(--text-3);font-size:10.5px;font-weight:650; }
.gear-filter-field > span { display:flex;align-items:center;gap:5px;min-height:15px;white-space:nowrap; }
.gear-filter-field i { width:5px;height:5px;border-radius:50%;background:var(--primary);opacity:0;transform:scale(.55);transition:opacity .14s ease,transform .14s ease; }
.gear-filter-field.has-value i { opacity:.9;transform:scale(1); }
.gear-filter-field input,
.gear-filter-field select { width:100%;height:35px;min-width:0;border-color:var(--border);font-size:12px; }
.gear-filter-search { flex:1 1 270px;min-width:220px; }
.gear-filter-meta { display:flex;align-items:center;justify-content:flex-end;gap:9px;min-height:35px;margin-left:auto;color:var(--text-3);font-size:11.5px;white-space:nowrap; }
.gear-filter-clear { padding:0;border:0;background:transparent;color:var(--primary);font:inherit;font-weight:650;cursor:pointer; }
.gear-filter-clear:hover,
.gear-filter-clear:focus-visible { color:var(--primary-strong);text-decoration:underline;text-underline-offset:3px;outline:none; }
.gear-filter-clear.is-hidden { visibility:hidden;pointer-events:none; }
.gear-table-card { min-width:0;overflow:hidden; }
.gear-table-card > div { min-width:0; }
.gear-table-card .table-wrap { max-width:100%;overflow:auto; }
.gear-table-card table.dt { min-width:860px;table-layout:auto; }
.gear-table-card table.dt th,
.gear-table-card table.dt td { vertical-align:middle; }
.gear-table-card table.dt tbody tr { position:relative; }
.gear-table-card table.dt tbody tr:hover,
.gear-table-card table.dt tbody tr.is-selected { background:var(--ky-table-hover-bg);box-shadow:inset 3px 0 0 rgba(78,125,170,.72); }
.gear-table-card table.dt tbody tr:hover td,
.gear-table-card table.dt tbody tr.is-selected td { background:transparent; }
.gear-table-card table.dt td:first-child { max-width:280px;white-space:normal;overflow-wrap:anywhere; }
.gear-model-cell { display:flex;align-items:center;gap:9px;min-width:170px; }
.gear-model-cell > div { display:grid;gap:2px;min-width:0; }
.gear-model-cell strong { color:var(--text);font-size:12.5px;line-height:1.35;overflow-wrap:anywhere; }
.gear-model-cell small { color:var(--text-3);font-size:10.5px;line-height:1.3; }
.gear-activity-dot { flex:0 0 auto;width:6px;height:6px;border-radius:50%;background:#cbd4de; }
.gear-activity-dot.is-active { background:#4e7daa;box-shadow:0 0 0 3px rgba(78,125,170,.10); }
.gear-flow-pair { display:inline-flex;gap:7px;white-space:nowrap;font-variant-numeric:tabular-nums; }
.gear-flow-pair b { color:var(--primary);font-weight:700; }
.gear-flow-pair i { color:#778596;font-style:normal;font-weight:650; }
.gear-row-action { white-space:nowrap; }
.gear-active-control { padding:10px 11px; }
.gear-active-control-row { display:flex;align-items:end;gap:10px;min-width:0;flex-wrap:wrap; }
.gear-month-picker,
.gear-active-sort { display:grid;gap:4px;color:var(--text-3);font-size:10.5px;font-weight:650; }
.gear-month-picker input { width:142px;height:34px;font-size:12px; }
.gear-active-sort select { width:122px;height:34px;font-size:12px; }
.gear-active-summary { display:flex;align-items:center;justify-content:flex-end;gap:12px;min-height:34px;margin-left:auto;color:var(--text-3);font-size:11.5px;white-space:nowrap; }
.gear-active-summary b { color:var(--text-2);font-size:13px;font-variant-numeric:tabular-nums; }
.gear-governance-head { display:flex;align-items:center;justify-content:space-between;gap:14px;padding:11px 12px; }
.gear-governance-layout { display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,390px);align-items:start;gap:12px;min-width:0; }
.gear-governance-layout > * { min-width:0; }
.gear-governance-detail { position:sticky;top:86px;max-height:calc(100vh - 104px);overflow:auto;padding:14px; }
.gear-pending-name { display:grid;gap:2px;min-width:150px; }
.gear-pending-name strong { color:var(--text);font-size:12.5px;overflow-wrap:anywhere; }
.gear-pending-name small { color:var(--text-3);font-size:10.5px; }
.gear-detail-heading { display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding-bottom:11px;border-bottom:1px solid var(--border-soft); }
.gear-detail-heading > div { display:grid;gap:3px;min-width:0; }
.gear-detail-heading span { color:var(--text-3);font-size:10.5px; }
.gear-detail-heading strong { color:var(--text);font-size:17px;line-height:1.35;overflow-wrap:anywhere; }
.gear-detail-facts { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px 14px;margin:13px 0; }
.gear-info-item { display:grid;gap:3px;min-width:0; }
.gear-info-item span { color:var(--text-3);font-size:10.5px; }
.gear-info-item strong { color:var(--text);font-size:12.5px;font-weight:680;line-height:1.4;overflow-wrap:anywhere; }
.gear-detail-actions { display:flex;gap:7px;flex-wrap:wrap;padding:11px 0;border-top:1px solid var(--border-soft);border-bottom:1px solid var(--border-soft); }
.gear-detail-section-title { margin:12px 0 7px;color:var(--text-2);font-size:12px;font-weight:720; }
.gear-source-table { max-height:230px;overflow:auto; }
.gear-source-table table { min-width:480px; }
.gear-picker-modal { width:min(680px,calc(100vw - 32px));max-height:calc(100dvh - 48px); }
.gear-picker-modal .form-modal-head { display:flex;align-items:flex-start;justify-content:space-between;gap:12px; }
.gear-picker-modal .form-modal-body { display:grid;gap:10px;min-height:0;overflow:auto; }
.gear-picker-modal input[type="search"] { width:100%;height:38px; }
.gear-picker-results { display:grid;gap:6px;max-height:430px;overflow:auto; }
.gear-picker-results > button { display:flex;align-items:center;justify-content:space-between;gap:12px;width:100%;padding:9px 10px;border:1px solid var(--border-soft);border-radius:7px;background:#fff;color:inherit;text-align:left;cursor:pointer; }
.gear-picker-results > button:hover,
.gear-picker-results > button:focus-visible { border-color:#abc6df;background:#f4f8fc;outline:none; }
.gear-picker-results > button span { display:grid;gap:2px;min-width:0; }
.gear-picker-results > button strong { color:var(--text);font-size:12.5px;overflow-wrap:anywhere; }
.gear-picker-results > button small { color:var(--text-3);font-size:10.5px;overflow-wrap:anywhere; }
.gear-picker-results > button em { flex:0 0 auto;color:var(--text-3);font-size:10.5px;font-style:normal; }
.gear-ignored-control { display:flex;align-items:end;gap:14px;padding:11px 12px; }
.gear-ignored-control > div:first-child { min-width:220px; }
.gear-inline-search { display:grid;flex:1 1 280px;gap:4px;max-width:390px;color:var(--text-3);font-size:10.5px;font-weight:650; }
.gear-inline-search input { width:100%;height:35px; }
.gear-ignored-count { margin-left:auto;color:var(--text-3);font-size:11.5px;white-space:nowrap; }
.gear-import-status,
.gear-import-preflight,
.gear-import-entry { padding:12px; }
.gear-import-status-grid,
.gear-preflight-grid { display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:7px; }
.gear-import-status-grid > div,
.gear-preflight-grid > div { min-width:0;padding:8px 9px!important;background:#f8fafc!important; }
.gear-import-modes { gap:7px;flex-wrap:wrap;margin-bottom:10px; }
.gear-import-actions { gap:8px;min-width:0;flex-wrap:wrap; }
.gear-import-actions .t-muted { min-width:180px;overflow-wrap:anywhere; }
.gear-file-queue { min-width:0;margin-top:11px;border-top:1px solid var(--border-soft);padding-top:10px; }
.gear-file-queue-title { display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:7px; }
.gear-file-queue-title strong { color:var(--text-2);font-size:12px; }
.gear-file-queue-title span { color:var(--text-3);font-size:10.5px; }
.gear-file-queue .table-wrap { max-width:100%;overflow:auto; }
.gear-file-queue table { min-width:820px; }
.gear-file-queue td:first-child { min-width:180px; }
.gear-file-queue td:first-child strong { display:block;color:var(--text);font-size:12px;overflow-wrap:anywhere; }
.gear-file-error { display:block;margin-top:3px;color:var(--danger);font-size:10.5px;line-height:1.35;overflow-wrap:anywhere; }
.gear-file-failure-note { margin-top:8px;color:var(--warn); }
.gear-risk-list { display:grid;gap:5px;margin-top:10px; }
.gear-risk-list > div { padding:7px 9px;border-left:3px solid var(--warn);background:var(--warn-bg);color:var(--warn);font-size:11.5px;line-height:1.5; }
.gear-preview-ignored { min-width:0;overflow:hidden; }
.gear-preview-ignored > summary { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;color:var(--text-2);font-size:12px;font-weight:700;cursor:pointer; }
.gear-preview-ignored > summary span { color:var(--text-3);font-size:11px;font-weight:550; }
.gear-preview-ignored[open] > summary { border-bottom:1px solid var(--border-soft); }
.gear-preview-ignored .table-wrap { max-width:100%;max-height:300px;overflow:auto; }
.gear-month-card .card-pad { padding:12px; }
.gear-month-table tbody tr.is-current { background:#f1f6fb;box-shadow:inset 3px 0 0 rgba(78,125,170,.68); }
.gear-write-plan { min-width:0;overflow:hidden; }
.gear-write-plan .card-pad { padding:12px; }
.gear-write-plan .table-wrap { max-width:100%;overflow:auto; }
.gear-write-plan table { min-width:650px; }
.gear-write-plan tr.is-muted { color:var(--text-3);background:#fafbfc; }
.gear-preview-card,
.gear-issue-card { min-width:0;overflow:hidden; }
.gear-preview-card .table-wrap,
.gear-issue-card .table-wrap { max-width:100%;overflow:auto; }
.gear-issue-actions { display:flex;align-items:center;gap:5px;white-space:nowrap; }
.gear-empty { min-height:70px;padding:19px 14px; }
.gear-empty .big { font-size:13px; }
.gear-advanced-shell { margin-top:14px;padding:11px 12px; }
.gear-advanced-body { display:flex;align-items:center;justify-content:space-between;gap:14px; }
.gear-advanced-body > div { display:grid;gap:3px;min-width:0; }
.gear-advanced-body strong { color:var(--text-2);font-size:12.5px; }
.gear-advanced-body span { color:var(--text-3);font-size:11.5px;line-height:1.45; }
.gear-import-confirm-modal { width:min(760px,calc(100vw - 32px));max-height:calc(100dvh - 48px); }
.gear-import-confirm-modal .form-modal-head { display:flex;align-items:flex-start;justify-content:space-between;gap:14px; }
.gear-import-confirm-modal .form-modal-body { display:grid;gap:14px;min-height:0;overflow:auto; }
.gear-import-confirm-summary { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:7px; }
.gear-confirm-section { display:grid;gap:7px;min-width:0; }
.gear-confirm-section > strong { color:var(--text-2);font-size:12px; }
.gear-confirm-section .table-wrap { max-width:100%;max-height:260px;overflow:auto; }
.gear-confirm-section table { min-width:520px; }
.gear-confirm-ignored { display:grid;gap:4px;padding:8px 10px;border-left:3px solid var(--warn);background:var(--warn-bg);color:var(--warn);font-size:11.5px;line-height:1.45; }
.gear-import-confirm-error { min-height:18px;color:var(--danger);font-size:11.5px;line-height:1.45; }
.gear-detail-backdrop { justify-content:flex-end;padding:0;background:rgba(14,30,47,.28); }
.gear-detail-drawer { width:min(780px,calc(100vw - 40px));height:100dvh;max-height:none;border-radius:8px 0 0 8px;box-shadow:-18px 0 42px rgba(17,36,55,.16); }
.gear-detail-drawer-head { display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:17px 18px 14px; }
.gear-detail-drawer-body { display:grid;gap:12px;min-height:0;padding:14px 18px 22px;overflow:auto; }
.gear-detail-core,
.gear-detail-section { min-width:0;border:1px solid var(--border-soft);border-radius:8px;background:#fff;overflow:hidden; }
.gear-detail-core-grid { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:11px 15px;padding:13px 14px; }
.gear-detail-metric-band { display:grid;grid-template-columns:repeat(4,minmax(0,1fr));border-top:1px solid var(--border-soft);background:#f8fafc; }
.gear-detail-metric { min-width:0;padding:9px 12px; }
.gear-detail-metric + .gear-detail-metric { border-left:1px solid var(--border-soft); }
.gear-detail-metric span { display:block;color:var(--text-3);font-size:10.5px; }
.gear-detail-metric strong { display:block;margin-top:3px;color:var(--text);font-size:15px;font-weight:760;font-variant-numeric:tabular-nums;overflow-wrap:anywhere; }
.gear-detail-section-head { display:flex;align-items:center;justify-content:space-between;gap:12px;padding:11px 13px;border-bottom:1px solid var(--border-soft);background:#fbfcfe; }
.gear-detail-section > .table-wrap { border:0;border-radius:0; }
.gear-detail-section table.dt { min-width:600px; }
.gear-detail-section .empty { min-height:82px;padding:17px 12px; }
.gear-detail-section .empty .big { font-size:13px; }
.gear-detail-pager > div:last-child { display:flex;align-items:center;gap:6px;flex-wrap:wrap;justify-content:flex-end; }

@media (max-width: 1100px) {
  .gear-status-band { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .gear-status-item:nth-child(4) { border-left:0;border-top:1px solid var(--border-soft); }
  .gear-status-item:nth-child(5),
  .gear-status-item:nth-child(6) { border-top:1px solid var(--border-soft); }
  .gear-filter-meta { flex:1 1 100%;justify-content:flex-start;margin-left:0; }
  .gear-active-summary { flex:1 1 100%;justify-content:flex-start;margin-left:0; }
  .gear-import-status-grid,
  .gear-preflight-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
@media (max-width: 900px) {
  .gear-governance-layout { grid-template-columns:minmax(0,1fr); }
  .gear-governance-detail { position:static;max-height:none; }
  .gear-detail-core-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 768px) {
  .gear-workspace-title { font-size:19px; }
  .gear-filter-field { flex:1 1 calc(33.333% - 8px);min-width:120px; }
  .gear-filter-search { flex-basis:100%; }
  .gear-governance-head,
  .gear-ignored-control { align-items:flex-start;flex-direction:column; }
  .gear-inline-search { width:100%;max-width:none; }
  .gear-ignored-count { margin-left:0; }
  .gear-import-actions .grow { display:none; }
  .gear-import-actions .t-muted { flex:1 1 100%; }
  .gear-file-queue-title { align-items:flex-start;flex-direction:column;gap:2px; }
  .gear-preview-ignored > summary { align-items:flex-start;flex-direction:column;gap:3px; }
  .gear-detail-drawer { width:100vw;max-width:100vw;border-radius:0; }
  .gear-detail-metric-band { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gear-detail-metric:nth-child(3) { border-left:0;border-top:1px solid var(--border-soft); }
  .gear-detail-metric:nth-child(4) { border-top:1px solid var(--border-soft); }
  .gear-detail-pager { align-items:flex-start;flex-direction:column; }
  .gear-detail-pager > div:last-child { justify-content:flex-start; }
  .gear-advanced-body { align-items:flex-start;flex-direction:column; }
}
@media (max-width: 480px) {
  .gear-status-band { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gear-status-item:nth-child(3),
  .gear-status-item:nth-child(5) { border-left:0; }
  .gear-status-item:nth-child(3) { border-top:1px solid var(--border-soft); }
  .gear-status-item:nth-child(4) { border-left:1px solid var(--border-soft); }
  .gear-filter-field { flex:1 1 calc(50% - 6px);min-width:130px; }
  .gear-filter-search { flex-basis:100%; }
  .gear-filter-meta { display:grid;grid-template-columns:auto auto 1fr;width:100%;gap:7px; }
  .gear-filter-meta span:last-child { text-align:right; }
  .gear-active-control-row { align-items:stretch; }
  .gear-active-control-row .seg { width:100%;overflow-x:auto; }
  .gear-month-picker,
  .gear-active-sort { flex:1 1 calc(50% - 6px); }
  .gear-month-picker input,
  .gear-active-sort select { width:100%; }
  .gear-active-summary { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px 10px;white-space:normal; }
  .gear-detail-facts,
  .gear-detail-core-grid { grid-template-columns:minmax(0,1fr); }
  .gear-detail-drawer-head { padding:14px; }
  .gear-detail-drawer-body { padding:12px 10px 18px; }
  .gear-picker-modal { width:100vw;height:100dvh;max-height:none;border-radius:0; }
  .gear-picker-results { max-height:none; }
  .gear-import-status-grid,
  .gear-preflight-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .gear-import-actions .btn { flex:1 1 auto; }
  .gear-import-confirm-backdrop { padding:0; }
  .gear-import-confirm-modal { width:100vw;height:100dvh;max-height:none;border-radius:0; }
  .gear-import-confirm-summary { grid-template-columns:minmax(0,1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
  }
  .card:hover,
  .btn:hover,
  .user-chip .uc-logout:hover,
  .action:hover {
    transform: none !important;
  }
  .toolbar,
  .customer-core-card,
    .customer-analysis-block,
    .customer-contact-compact,
    .customer-relation-list,
    .customer-purchase-group[open] > .table-wrap,
  .acct-modal-backdrop,
  .acct-modal,
  .form-modal-backdrop,
  .form-modal,
  .modal-backdrop,
  .modal-card {
    animation: none !important;
  }
}

@page { size: A4 portrait; margin: 8mm 10mm; }
@media print {
  body * { visibility: hidden; }
  .contract-print-area, .contract-print-area * { visibility: visible; }
  /* 撑满 A4 可打印区域：不缩字号、不缩放，签章区靠 margin-top:auto 下沉到底 */
  .contract-print-area { position: absolute; left: 0; top: 0; width: 100%; min-height: 281mm; margin: 0; border: none; box-shadow: none; padding: 0; }
  .contract-print-page { background: #fff; padding: 0; }
  .contract-no-print { display: none !important; }
  .contract-items-table, .contract-sign-area { page-break-inside: avoid; }
}
