:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e2e8f0;
  --text: #1e293b;
  --muted: #64748b;
  --accent: #5b4fd6;
  --accent-dim: #ebe9ff;
  --purple: #5b4fd6;
  --purple-light: #ebe9ff;
  --card-panel-bg: #f0f2ff;
  --card-seller-bubble: #e8e4ff;
  --card-buyer-bubble: #ffffff;
  --card-avatar: #f59e0b;
  --card-ai-accent: #5b4fd6;
  --buyer-bg: #f5f3ff;
  --seller-bg: #eff6ff;
  --green: #059669;
  --blue: #4f46e5;
  --red: #dc2626;
  --orange: #ea580c;
  --amber: #d97706;
  --pill-done: #dcfce7;
  --pill-pending: #f1f5f9;
  --pill-warn-bg: #fee2e2;
  --focus-bg: #eff6ff;
  --focus-border: #3b82f6;
  --focus-priority-bg: #fff7ed;
  --focus-priority-border: #f97316;
  --focus-priority-text: #9a3412;
  --alert-bg: #fef2f2;
  --alert-border: #fca5a5;
  --alert-text: #b91c1c;
  --action-bg: #f0fdf4;
  --action-border: #22c55e;
  --action-title: #15803d;
  --insight-bg: #f0f9ff;
  --insight-border: #bae6fd;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.app {
  max-width: 1320px;
  margin: 0 auto;
  padding: 24px 20px 48px;
}

.app--workspace {
  display: flex;
  min-height: 100vh;
  max-width: none;
  margin: 0;
  padding: 0;
  gap: 0;
}

body.body--viewport-fit {
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px 24px;
  margin-bottom: 20px;
}

.topbar-side--left {
  justify-self: start;
  align-self: end;
  min-width: 0;
}

.topbar-center {
  justify-self: center;
  text-align: center;
}

.topbar-side--right {
  justify-self: end;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.topbar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.topbar-company {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  background: linear-gradient(135deg, #4338ca 0%, #7c3aed 45%, #2563eb 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.topbar-slogan {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: #ea580c;
  text-shadow: 0 1px 0 rgba(234, 88, 12, 0.15);
}

.topbar-welcome {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: #5b4fd6;
  text-align: right;
  white-space: nowrap;
  animation: topbar-welcome-bounce 2.2s ease-in-out infinite;
}

@keyframes topbar-welcome-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

@media (max-width: 900px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .topbar-side--left,
  .topbar-side--right {
    justify-self: center;
    align-items: center;
    width: 100%;
  }

  .topbar-welcome {
    text-align: center;
  }

  .topbar-context {
    justify-content: center;
  }

  .topbar-stats {
    justify-content: center;
  }
}

.subtitle {
  color: var(--muted);
  font-size: 0.875rem;
  margin-top: 4px;
}

.date-select {
  margin-top: 0.35rem;
  max-width: 100%;
  font-size: 0.8125rem;
  padding: 0.25rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
}

.date-select.hidden {
  display: none;
}

.topbar-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topbar-stats:empty {
  display: none;
}

.stat-chip {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 0.8rem;
}

.stat-chip strong {
  color: var(--blue);
  margin-right: 4px;
}

.stat-chip--cost {
  background: #f0fdf4;
  border-color: #bbf7d0;
  color: #166534;
}

.card-feedback-section {
  border-top: 1px dashed var(--border);
  padding-top: 10px;
  margin-top: 4px;
}

.card-section-title--feedback {
  font-size: 0.78rem;
  color: var(--muted);
}

.card-feedback-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.card-feedback-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 0.78rem;
  cursor: pointer;
  color: var(--text);
}

.card-feedback-btn:hover {
  border-color: var(--purple);
}

.card-feedback-btn.is-active {
  background: var(--purple-light);
  border-color: var(--purple);
  color: var(--purple);
}

.card-feedback-btn.is-down.is-active {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #b91c1c;
}

.card-feedback-status {
  font-size: 0.75rem;
  color: var(--muted);
}

.card-feedback-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.75rem;
  color: var(--muted);
}

.card-feedback-field,
.card-feedback-comment,
.card-feedback-corrected {
  font-size: 0.8125rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font-family: inherit;
  color: var(--text);
}

.msg-text-zh {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(91, 79, 214, 0.25);
  font-size: 0.8125rem;
  color: #4338ca;
  line-height: 1.45;
}

.msg-read-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  vertical-align: middle;
}

.msg-read-badge--read {
  background: #ecfdf5;
  color: #047857;
}

.msg-read-badge--unread {
  background: #fef2f2;
  color: #b91c1c;
}

.card-msg-assignee-name .msg-read-badge {
  margin-left: 8px;
}

/* Overview */
.overview {
  margin-bottom: 24px;
}

.overview-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}

@media (max-width: 900px) {
  .overview-summary {
    grid-template-columns: 1fr;
  }
}

.overview-summary-block {
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: 10px 12px 8px;
  border: 1px solid rgba(91, 79, 214, 0.08);
}

.overview-summary-block--closing,
.overview-summary-block--priority {
  border-top: 3px solid var(--grade-a);
}

.overview-summary-block--churn,
.overview-summary-block--urgent {
  border-top: 3px solid var(--grade-d);
}

.paid-order-link {
  color: var(--accent, #0f766e);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.paid-order-link:hover {
  opacity: 0.85;
}
.paid-orders-table td {
  vertical-align: middle;
}

.exec-action-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.exec-action-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
  line-height: 1.35;
}

.exec-action-table thead th {
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  padding: 4px 6px 6px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.exec-action-table tbody td {
  padding: 5px 6px;
  vertical-align: top;
  border-bottom: 1px solid rgba(226, 232, 240, 0.7);
}

.exec-action-table tbody tr:last-child td {
  border-bottom: none;
}

.exec-action-row-btn {
  border: none;
  background: transparent;
  padding: 0;
  font: inherit;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
  text-align: left;
}

.exec-action-row-btn--name {
  pointer-events: none;
}

.exec-action-row--clickable {
  cursor: pointer;
}

.exec-action-row--clickable:hover td {
  background: rgba(91, 79, 214, 0.06);
}

.exec-action-row--clickable:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.exec-action-row--clickable:hover .exec-action-row-btn--name {
  text-decoration: underline;
}

.exec-action-row-btn:hover {
  text-decoration: underline;
}

.exec-action-prob {
  font-weight: 600;
  color: var(--accent);
  white-space: nowrap;
  width: 4.5rem;
}

.exec-action-overview {
  color: var(--muted);
  max-width: 0;
  min-width: 120px;
  width: 40%;
}

.exec-action-table--churn .exec-action-overview {
  width: 24%;
  min-width: 88px;
}

.exec-action-severity {
  width: 3.25rem;
  white-space: nowrap;
}

.churn-sev {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  line-height: 1;
  cursor: help;
  outline: none;
}

.churn-sev:focus-visible {
  box-shadow: 0 0 0 2px rgba(91, 79, 214, 0.35);
  border-radius: 6px;
}

.churn-sev-floating-tip {
  position: fixed;
  z-index: 10050;
  max-width: min(320px, calc(100vw - 24px));
  padding: 8px 10px;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.94);
  color: #f8fafc;
  font-size: 0.6875rem;
  line-height: 1.45;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.28);
  pointer-events: none;
  text-align: left;
  white-space: pre-line;
}

.churn-sev-floating-tip.hidden {
  display: none;
}

.exec-action-table--churn tbody td.exec-action-severity {
  overflow: visible;
  position: relative;
}

.exec-action-table--churn tbody tr:hover td.exec-action-severity {
  z-index: 2;
}

.churn-sev-icon {
  width: 1.35rem;
  height: 1.35rem;
  display: block;
}

.churn-sev-text {
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.churn-sev--1 { color: #dc2626; }
.churn-sev--2 { color: #ea580c; }
.churn-sev--3 { color: #d97706; }
.churn-sev--4 { color: #4f46e5; }
.churn-sev--5 { color: #94a3b8; }

.exec-action-table--churn tbody tr.exec-action-row--churn-l1 {
  background: rgba(220, 38, 38, 0.06);
}

.exec-action-table--churn tbody tr.exec-action-row--churn-l1 td:first-child {
  box-shadow: inset 3px 0 0 #dc2626;
}

.exec-action-table--churn tbody tr.exec-action-row--churn-l2 {
  background: rgba(234, 88, 12, 0.05);
}

.exec-action-table--churn tbody tr.exec-action-row--churn-l2 td:first-child {
  box-shadow: inset 3px 0 0 #ea580c;
}

.exec-action-table--churn tbody tr.exec-action-row--churn-l3 td:first-child {
  box-shadow: inset 3px 0 0 #d97706;
}

.churn-risk-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(226, 232, 240, 0.85);
}

.churn-risk-pager-meta {
  font-size: 0.6875rem;
  color: var(--muted);
  white-space: nowrap;
}

.churn-risk-pager-btn {
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  border-radius: 6px;
  padding: 3px 10px;
  font-size: 0.6875rem;
  font-weight: 600;
  cursor: pointer;
}

.churn-risk-pager-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.churn-risk-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.exec-action-reasons {
  color: var(--grade-d);
  font-weight: 500;
  max-width: 0;
  min-width: 108px;
  width: 26%;
}

.overview-summary-block .overview-section-title {
  margin-bottom: 6px;
  font-size: 0.8125rem;
}

.overview-summary-block .overview-section-title::before {
  height: 12px;
}

.overview-summary-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 2px 12px;
}

@media (max-width: 640px) {
  .overview-summary-list {
    grid-template-columns: 1fr;
  }
}

.overview-summary-list--single {
  grid-template-columns: 1fr;
}

.overview-summary-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 2px 4px;
  border: none;
  border-radius: 4px;
  background: transparent;
  cursor: pointer;
  font-size: 0.72rem;
  line-height: 1.32;
  color: var(--text);
  transition: background 0.12s ease;
}

.overview-summary-item:hover {
  background: var(--accent-light, #ebe9ff);
}

.overview-summary-label {
  font-weight: 600;
  color: var(--text);
}

.overview-summary-desc {
  color: var(--text-muted);
  font-weight: 400;
}

.overview-summary-empty {
  margin: 0;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.inquiry-item--highlight {
  animation: inquiry-highlight-pulse 2.2s ease-out;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

@keyframes inquiry-highlight-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(91, 79, 214, 0.45);
  }
  40% {
    box-shadow: 0 0 0 8px rgba(91, 79, 214, 0.15);
  }
  100% {
    box-shadow: none;
  }
}

.overview-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 14px;
  color: var(--text);
}

.overview-section-title::before {
  content: "";
  width: 3px;
  height: 16px;
  background: var(--accent);
  border-radius: 2px;
}

.overview-section-meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  margin-left: 4px;
}

.overview-section-meta--foot {
  margin: 6px 0 0;
  text-align: right;
}

.overview-charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

/* 总览页紧凑图表：压低高度，摘要移至标题旁 */
.boss-cockpit--overview .overview-charts-row {
  gap: 10px;
  margin-top: 0;
}

.boss-cockpit--overview .chart-panel--overview-compact {
  padding: 10px 12px;
}

.boss-cockpit--overview .chart-panel-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.chart-panel-sub {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}

.chart-panel-sub-em {
  font-weight: 700;
  color: inherit;
}

/* 三柱图色系：客户·青绿 / 商机·琥珀 / 国家·品牌紫 */
.chart-panel--bar-cv .country-bar-fill {
  background: linear-gradient(90deg, #34d399, #059669);
}

.chart-panel--bar-cv .chart-panel-sub-em {
  color: #059669;
}

.chart-panel--bar-cv .country-bar-row--top .country-bar-name {
  color: #059669;
  font-weight: 600;
}

.chart-panel--bar-cv .country-bar-row--active {
  background: #ecfdf5;
}

.chart-panel--bar-cv .country-bar-row--active .country-bar-name {
  color: #047857;
}

.chart-panel--bar-opp .country-bar-fill {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

.chart-panel--bar-opp .chart-panel-sub-em {
  color: #b45309;
}

.chart-panel--bar-opp .country-bar-row--top .country-bar-name {
  color: #b45309;
  font-weight: 600;
}

.chart-panel--bar-country .country-bar-fill {
  background: linear-gradient(90deg, #818cf8, #5b4fd6);
}

.chart-panel--bar-country .chart-panel-sub-em {
  color: var(--accent, #5b4fd6);
}

.chart-panel--bar-country .country-bar-row--top .country-bar-name {
  color: var(--accent, #5b4fd6);
  font-weight: 600;
}

.chart-panel--bar-country .country-bar-row--active {
  background: var(--accent-dim, #ebe9ff);
}

.chart-panel--bar-country .country-bar-row--active .country-bar-name {
  color: var(--accent, #5b4fd6);
}

.boss-cockpit--overview .pie-chart-body {
  min-height: 0;
  padding: 2px 0 0;
  gap: 12px;
}

.boss-cockpit--overview .pie-wrap {
  width: 100px;
  height: 100px;
}

.boss-cockpit--overview .pie-legend {
  max-height: 108px;
  gap: 3px;
}

.boss-cockpit--overview .pie-legend-item {
  padding: 2px 4px;
  font-size: 0.75rem;
}

.boss-cockpit--overview .pie-legend-dot {
  width: 8px;
  height: 8px;
}

/* 今天询盘分布：保持饼图，略放大与柱图区对齐 */
.boss-cockpit--overview .chart-panel--inquiry-pie .pie-chart-body {
  min-height: 118px;
  gap: 14px;
  align-items: center;
}

.boss-cockpit--overview .chart-panel--inquiry-pie .pie-wrap {
  width: 118px;
  height: 118px;
}

.boss-cockpit--overview .chart-panel--inquiry-pie .pie-legend {
  max-height: none;
  gap: 6px;
}

.boss-cockpit--overview .chart-panel--inquiry-pie .pie-legend-item {
  padding: 4px 6px;
  font-size: 0.78rem;
}

/* 等级分布 · 横向柱图（与买家国家分布同风格） */
.chart-panel--grade-bar .country-bar-row {
  grid-template-columns: minmax(0, 84px) 1fr minmax(0, 52px);
}

/* 买家国家分布 · 横向柱图 */
.chart-panel--country-bar .country-bar-chart {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 118px;
}

.country-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 68px) 1fr minmax(0, 52px);
  align-items: center;
  gap: 8px;
  padding: 2px 4px;
  border: none;
  background: transparent;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
  transition: background 0.12s;
}

.country-bar-row--static {
  cursor: default;
}

.country-bar-row:hover:not(.country-bar-row--static) {
  background: var(--surface2, #f8fafc);
}

.country-bar-row--active {
  background: var(--accent-dim, #ebe9ff);
}

.country-bar-name {
  font-size: 0.75rem;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.country-bar-track {
  height: 8px;
  background: var(--surface2, #f1f5f9);
  border-radius: 4px;
  overflow: hidden;
  min-width: 0;
}

.country-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #818cf8, #5b4fd6);
  border-radius: 4px;
  min-width: 2px;
}

.country-bar-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.country-bar-row--active .country-bar-name {
  color: var(--accent);
  font-weight: 600;
}

@media (max-width: 900px) {
  .overview-charts-row {
    grid-template-columns: 1fr;
  }
}

.pie-panel {
  min-height: 0;
  min-width: 0;
}

.chart-panel.pie-panel {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.chart-panel.pie-panel .pie-chart-body {
  flex: 1;
}

.chart-panel.pie-panel .chart-insight {
  margin-top: auto;
}

.pie-chart-body {
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: 180px;
  padding: 8px 0 12px;
}

.pie-wrap {
  flex-shrink: 0;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}

.pie {
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.pie-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  max-height: 200px;
  overflow-y: auto;
}

.pie-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  padding: 4px 6px;
  border-radius: 6px;
  border: none;
  background: transparent;
  text-align: left;
  width: 100%;
}

.pie-legend-item--clickable {
  cursor: pointer;
}

.pie-legend-item--clickable:hover {
  background: var(--surface2);
  color: var(--text);
}

.pie-legend-item--active {
  background: var(--accent-dim);
  color: var(--accent);
  font-weight: 600;
}

.pie-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.pie-legend-dot.a { background: var(--green); }
.pie-legend-dot.b { background: var(--blue); }
.pie-legend-dot.c { background: var(--amber); }
.pie-legend-dot.d { background: var(--red); }

.pie-legend-label {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pie-legend-meta {
  font-weight: 600;
  color: var(--text);
  flex-shrink: 0;
  font-size: 0.75rem;
}

.pie-legend--potential {
  max-height: none;
  overflow-y: visible;
}

.pie-legend-item--potential .pie-legend-label {
  white-space: normal;
  line-height: 1.35;
  font-size: 0.72rem;
}

/* 独立功能面板（跟进人 / 健康度 / 筛选） */
.dash-panel {
  margin-bottom: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.dash-panel--filters {
  position: sticky;
  top: 0;
  z-index: 20;
  box-shadow: var(--shadow-md);
}

.dash-panel-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 12px;
}

.dash-panel--assignees .dash-panel-title {
  margin-bottom: 10px;
}

.dash-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.dash-panel-head .dash-panel-title {
  margin-bottom: 0;
}

.avg-health-inline {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 0.8rem;
  color: var(--muted);
  flex-shrink: 0;
}

.avg-health-value {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
}

.dash-panel--health .kpi-segmented {
  justify-content: flex-start;
}

.panel-toolbar {
  margin-bottom: 0;
}

.assignee-bars {
  min-width: 0;
}

.assignee-vbar-chart {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
  min-height: 172px;
  padding: 4px 2px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.assignee-vbar-item {
  flex: 1 1 0;
  min-width: 52px;
  max-width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 6px 4px 4px;
  font-size: 0.72rem;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.assignee-vbar-item:hover {
  background: var(--surface2);
  border-color: var(--border);
}

.assignee-vbar-item--active {
  background: var(--accent-dim);
  border-color: var(--accent);
}

.assignee-vbar-count {
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--accent);
  line-height: 1;
}

.assignee-vbar-track {
  width: 100%;
  max-width: 32px;
  height: 112px;
  background: #eef2f7;
  border-radius: 6px 6px 2px 2px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.assignee-vbar-fill {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, #7c6ee6, var(--accent));
  border-radius: 6px 6px 2px 2px;
  min-height: 6px;
  transition: height 0.2s ease;
}

.assignee-vbar-name {
  color: var(--text);
  font-weight: 500;
  font-size: 0.68rem;
  line-height: 1.25;
  text-align: center;
  width: 100%;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.assignee-vbar-avg {
  color: var(--muted);
  font-size: 0.65rem;
  line-height: 1.2;
  text-align: center;
}

.panel-chart-hint {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.4;
}

.panel-chart-hint strong {
  color: var(--text);
  font-weight: 600;
}

.kpi-segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.kpi-seg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface2);
  border-radius: 8px;
  padding: 8px 12px;
  font-size: 0.8rem;
  color: var(--text);
  min-width: 56px;
  justify-content: center;
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.kpi-seg-label {
  font-weight: 600;
}

.kpi-seg-count {
  font-weight: 700;
  font-size: 0.9rem;
}

.kpi-seg--s .kpi-seg-count { color: #7c3aed; }
.kpi-seg--a .kpi-seg-count { color: var(--green); }
.kpi-seg--b .kpi-seg-count { color: var(--blue); }
.kpi-seg--c .kpi-seg-count { color: var(--amber); }
.kpi-seg--d .kpi-seg-count { color: var(--red); }
.kpi-seg--d.kpi-seg--alert,
.kpi-seg--silent.kpi-seg--alert {
  background: var(--alert-bg);
  border-color: var(--alert-border);
}

.filter-chip-interactive {
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s, box-shadow 0.12s;
}

.filter-chip-interactive:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.kpi-seg--active {
  border-color: var(--accent);
  background: var(--accent-dim);
  box-shadow: 0 0 0 2px var(--accent-dim);
}

.kpi-seg.filter-chip-interactive:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.filter-status-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--accent-dim);
  border: 1px solid #c7c2f5;
  border-radius: 8px;
  font-size: 0.8rem;
}

.filter-status-bar.hidden {
  display: none;
}

.filter-status-label {
  font-weight: 600;
  color: var(--accent);
}

.filter-status-sep {
  margin: 0 6px;
  color: var(--muted);
}

.filter-status-count {
  font-weight: 600;
  color: var(--text);
}

/* 询盘列表 · 紧凑筛选区 */
.active-filter-panel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.active-filter-panel--collapsed .filter-row:not(.filter-row--toolbar) {
  display: none;
}

.filter-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.filter-row--toolbar {
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--border, #e2e8f0);
}

.filter-row-main--search {
  flex: 1;
  min-width: 200px;
}

.active-filter-search {
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  font-size: 0.875rem;
  background: var(--surface, #fff);
}

.filter-row-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.filter-toolbar-btn {
  padding: 6px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--surface, #fff);
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  cursor: pointer;
}

.filter-toolbar-btn:hover {
  border-color: var(--accent, #5b4fd6);
  color: var(--accent, #5b4fd6);
}

.filter-row-label {
  flex: 0 0 72px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

/* 询盘列表筛选区：chip 尺寸与行对齐统一 */
.active-filter-panel .filter-row,
.active-filter-panel .filter-row--duo,
.active-filter-panel .filter-row-seg {
  align-items: center;
}

.active-filter-panel .filter-chip-group {
  gap: 8px;
}

.active-filter-panel .filter-chip {
  padding: 5px 12px;
  font-size: 0.8rem;
  line-height: 1.4;
  min-height: 32px;
  box-sizing: border-box;
}

.active-filter-panel .filter-chip--all {
  flex: 0 0 96px;
  min-width: 96px;
  justify-content: center;
}

.active-filter-panel .filter-chip-count {
  font-size: 0.72rem;
  margin-left: 4px;
}

/* 双列筛选行：客户范围+等级、询盘状态+阶段 */
.filter-row--duo {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: flex-start;
}

.filter-row-seg {
  display: flex;
  flex: 1 1 320px;
  min-width: 0;
  gap: 10px;
  align-items: flex-start;
}

.filter-row-seg.hidden {
  display: none;
}

.filter-row-seg .filter-row-label {
  flex: 0 0 72px;
}

.filter-row-seg .filter-chip-group {
  flex: 1;
  min-width: 0;
}

.filter-row-seg--scope {
  flex: 0 0 auto;
}

.filter-row-seg--level {
  flex: 1 1 0;
  min-width: 0;
}

.filter-chip-group--level {
  flex-wrap: nowrap;
}

.filter-chip-group--level .filter-chip {
  flex-shrink: 0;
  white-space: nowrap;
}

.filter-chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.filter-row-fields {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.active-filter-select {
  min-width: 140px;
  padding: 6px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--surface, #fff);
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  background: var(--surface, #fff);
  font-size: 0.8rem;
  color: var(--text, #334155);
  cursor: default;
  line-height: 1.4;
}

.filter-chip-interactive {
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.filter-chip-interactive:hover {
  border-color: var(--accent, #5b4fd6);
}

.filter-chip--active {
  border-color: var(--accent, #5b4fd6);
  background: #f5f3ff;
  color: #5b4fd6;
  font-weight: 600;
}

.filter-chip--locked {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 600;
  cursor: default;
}

.filter-chip--alert.filter-chip--active {
  border-color: #fca5a5;
  background: #fef2f2;
  color: #b91c1c;
}

.filter-chip--hot.filter-chip--active {
  border-color: #fdba74;
  background: #fff7ed;
  color: #c2410c;
}

.filter-chip--warn.filter-chip--active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.filter-chip--ok.filter-chip--active {
  border-color: #86efac;
  background: #f0fdf4;
  color: #15803d;
}

.filter-chip-group--scroll {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.filter-chip-group--scroll::-webkit-scrollbar {
  height: 4px;
}

.filter-chip-group--scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* 跟进人筛选：「全部」占两行 + 业务员均分两行 */
.active-filter-panel [data-filter-row="assignee"] {
  align-items: flex-start;
}

.filter-chip-group--assignee-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: stretch;
  flex-wrap: unset;
}

.filter-chip--assignee-all {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
  white-space: nowrap;
}

.assignee-filter-rows {
  grid-column: 2;
  grid-row: 1 / -1;
  display: grid;
  grid-template-columns: repeat(var(--assignee-cols, 6), minmax(72px, 1fr));
  gap: 8px;
  min-width: 0;
  align-content: start;
}

.assignee-filter-rows .filter-chip {
  min-width: 0;
  justify-content: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.filter-chip-count {
  display: none;
}

.filter-chip--active .filter-chip-count {
  color: inherit;
  opacity: 0.85;
}

.filter-attr-country {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.filter-row--country-more {
  max-width: 280px;
}

.filter-row--country-more.hidden {
  display: none;
}

.filter-row--locked .filter-chip-group {
  opacity: 0.95;
}

.inquiry-section-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.inquiry-sort-select {
  padding: 6px 10px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.8rem;
  background: var(--surface, #fff);
  color: var(--text, #334155);
}

@media (max-width: 720px) {
  .filter-row-label {
    flex: 0 0 100%;
    line-height: 1.4;
  }

  .filter-row-fields {
    flex-direction: column;
    width: 100%;
  }

  .active-filter-select {
    width: 100%;
  }
}

.toolbar-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.toolbar-group--search {
  flex: 1;
  min-width: 200px;
}

.stat-chip--primary strong {
  color: var(--accent);
}

.stat-chip--ai {
  background: var(--accent-dim);
  border-color: #c7c2f5;
  color: var(--accent);
  font-weight: 600;
}

.list-result-count {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
}

.card-health-pill,
.list-health-pill {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-top: 4px;
  margin-bottom: 2px;
}

.card-health-pill.health-a,
.list-health-pill.health-a { background: #dcfce7; color: var(--green); }
.card-health-pill.health-b,
.list-health-pill.health-b { background: #dbeafe; color: var(--blue); }
.card-health-pill.health-c,
.list-health-pill.health-c { background: #fef3c7; color: var(--amber); }
.card-health-pill.health-d,
.list-health-pill.health-d { background: #fee2e2; color: var(--red); }

.list-health-pill {
  flex-shrink: 0;
  margin-top: 0;
  margin-right: 6px;
}

.charts-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

@media (max-width: 900px) {
  .charts-row {
    grid-template-columns: 1fr;
  }
}

.chart-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.chart-panel-title {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 16px;
}

.chart-panel-body {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 200px;
}

.chart-panel--compact .chart-panel-body--compact {
  min-height: auto;
  gap: 16px;
  padding: 4px 0;
}

.donut-wrap--sm {
  width: 120px;
  height: 120px;
}

.donut--sm {
  width: 120px;
  height: 120px;
}

.donut-hole--sm {
  width: 72px;
  height: 72px;
}

.donut-wrap {
  flex-shrink: 0;
  position: relative;
  width: 160px;
  height: 160px;
}

.donut {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  position: relative;
}

.donut-hole {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 96px;
  height: 96px;
  background: var(--surface);
  border-radius: 50%;
}

.donut-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.8rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
}

.legend-item--clickable {
  border: none;
  background: transparent;
  padding: 4px 6px;
  margin: -4px -6px;
  border-radius: 6px;
  cursor: pointer;
  font: inherit;
  text-align: left;
  width: 100%;
  transition: background 0.12s;
}

.legend-item--clickable:hover {
  background: var(--surface2);
  color: var(--text);
}

.legend-item--active {
  background: var(--accent-dim);
  color: var(--blue);
  font-weight: 600;
}

.list-filter-chips {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--blue);
  margin-left: 8px;
}

.list-filter-chips:empty {
  display: none;
}

.filter-chip-clear {
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.75rem;
  cursor: pointer;
  margin-left: 6px;
  text-decoration: underline;
}

.filter-chip-clear:hover {
  color: var(--red);
}

.chart-panel--country-compact {
  margin-bottom: 16px;
  padding: 12px 14px;
}

.country-compact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
}

.country-compact-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: var(--surface2);
  border-radius: 8px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 0.75rem;
  transition: background 0.12s, box-shadow 0.12s;
}

.country-compact-item:hover {
  background: #eef2ff;
}

.country-compact-item--active {
  background: var(--accent-dim);
  box-shadow: 0 0 0 1px var(--accent);
}

.country-compact-label {
  color: var(--text);
  white-space: nowrap;
}

.country-compact-track {
  width: 48px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.country-compact-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #7c6ee6, #5b4fd6);
  border-radius: 3px;
}

.country-compact-num {
  font-weight: 700;
  color: var(--blue);
  min-width: 1.2em;
}

.country-compact-more {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 4px 6px;
}

.country-compact-hint {
  margin-top: 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.bar-row--clickable {
  width: 100%;
  border: none;
  background: transparent;
  cursor: pointer;
  text-align: inherit;
  border-radius: 6px;
  padding: 2px 4px;
  margin: -2px -4px;
  transition: background 0.12s;
}

.bar-row--clickable:hover {
  background: var(--surface2);
}

.bar-row--active {
  background: var(--accent-dim);
}

.bar-fill--country {
  background: linear-gradient(90deg, #7c6ee6, #5b4fd6);
}

.inquiry-card-title-block {
  min-width: 0;
  flex: 1;
}

.inquiry-card-title-block .inquiry-card-title {
  display: block;
  margin-bottom: 4px;
}

.inquiry-card-submeta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.3;
}

.country-tip {
  cursor: help;
  border-bottom: 1px dotted #94a3b8;
}

.country-with-flag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: help;
}

.country-with-flag-name {
  border-bottom: 1px dotted #94a3b8;
}

.country-flag-emoji {
  font-size: 1.45em;
  line-height: 1;
  flex-shrink: 0;
  transform: scale(1.08);
  transform-origin: center;
}

.inquiry-card-country {
  font-weight: 600;
  color: #475569;
  border-bottom: none;
}

.inquiry-card-assignee::before {
  content: "·";
  margin-right: 6px;
  color: #cbd5e1;
  font-weight: 400;
}

.inquiry-card-assignee:first-child::before {
  content: none;
  margin: 0;
}

.grade-detail-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 60vh;
  overflow-y: auto;
}

.grade-detail-row {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--surface2);
  cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}

.grade-detail-row:hover {
  border-color: var(--accent);
  background: #f0f7ff;
}

.grade-detail-row-main {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.grade-detail-name {
  font-weight: 600;
  font-size: 0.95rem;
}

.grade-detail-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.grade-detail-potential {
  font-weight: 600;
}

.grade-detail-potential.grade-s { color: #7c3aed; }
.grade-detail-potential.grade-a { color: var(--green); }
.grade-detail-potential.grade-b { color: var(--blue); }
.grade-detail-potential.grade-c { color: var(--amber); }
.grade-detail-potential.grade-d { color: var(--red); }

.grade-detail-row-focus {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex-shrink: 0;
}

.legend-dot.s { background: #7c3aed; }
.legend-dot.a { background: var(--green); }
.legend-dot.b { background: var(--blue); }
.legend-dot.c { background: var(--amber); }
.legend-dot.d { background: var(--red); }

.bar-chart {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.bar-row {
  display: grid;
  grid-template-columns: 100px 1fr 36px;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.bar-name {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.bar-track {
  height: 10px;
  background: var(--surface2);
  border-radius: 5px;
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #2a6bb5, var(--blue));
  border-radius: 5px;
  min-width: 2px;
}

.bar-score {
  color: var(--text);
  font-weight: 600;
  text-align: right;
}

.chart-insight {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--insight-bg);
  border: 1px solid var(--insight-border);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.5;
}

.chart-insight strong {
  color: var(--accent);
  font-weight: 600;
}

.chart-insight--alert {
  background: var(--alert-bg);
  border-color: var(--alert-border);
  color: var(--alert-text);
}

.chart-insight--alert strong {
  color: var(--red);
}

.panel-toolbar.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.toolbar input,
.toolbar select {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 0.875rem;
}

.toolbar input {
  flex: 1;
  min-width: 200px;
}

.inquiry-section {
  margin-top: 4px;
}

.inquiry-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.inquiry-section-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.view-toggle {
  display: inline-flex;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.view-toggle-btn {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 6px 14px;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.view-toggle-btn:hover {
  color: var(--text);
}

.view-toggle-btn.active {
  background: var(--accent-dim);
  color: var(--blue);
  font-weight: 600;
}

.inquiry-list.view-card {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  align-items: stretch;
}

@media (max-width: 640px) {
  .inquiry-list.view-card {
    grid-template-columns: 1fr;
  }
}

.inquiry-list.view-list {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow-x: auto;
  overflow-y: visible;
}

.list-table-inner {
  width: 100%;
  min-width: 960px;
}

.list-header,
.list-row {
  display: grid;
  grid-template-columns:
    minmax(0, 0.9fr)
    minmax(0, 0.45fr)
    minmax(0, 0.28fr)
    minmax(0, 0.45fr)
    minmax(0, 0.95fr)
    minmax(0, 0.42fr)
    minmax(0, 0.65fr)
    minmax(0, 0.5fr)
    minmax(0, 1.1fr);
  gap: 4px 8px;
  align-items: start;
  padding: 5px 10px;
}

.list-header > *,
.list-row > * {
  min-width: 0;
}

.list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--surface2);
  font-size: 0.65rem;
  color: var(--muted);
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  align-items: end;
  line-height: 1.3;
}

.list-header-cell {
  word-break: break-word;
  text-align: left;
}

.list-row {
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  min-height: 34px;
}

.list-row:last-child {
  border-bottom: none;
}

.list-row:hover {
  background: #f0f7ff;
}

.list-row--alert {
  background: #fffbfb;
}

.list-row--alert:hover {
  background: #fef2f2;
}

.list-col-name {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-width: 0;
  gap: 2px;
}

.list-col-name-text {
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.list-col-name-meta {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  width: 100%;
  overflow: hidden;
  min-width: 0;
}

.list-col-name-meta .customer-type-badge,
.list-col-name-meta .inquiry-count-badge,
.list-col-name-meta .warning-badge {
  margin: 0;
  font-size: 0.62rem;
}

.list-col-country,
.list-col-level,
.list-col-assignee {
  padding-top: 2px;
}

.list-col-country,
.list-col-assignee {
  color: var(--text);
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-col-assignee {
  word-break: normal;
}

.list-col-level {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0;
  min-width: 0;
}

.list-inquiry-type {
  display: block;
  max-width: 100%;
  padding: 1px 4px;
  border-radius: 4px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.62rem;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: left;
}

.list-col-text {
  color: var(--text);
  line-height: 1.25;
  font-size: 0.74rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.list-col-text[data-list-tip] {
  cursor: default;
}

.list-col-text[data-list-tip] {
  cursor: default;
}

.list-col-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.list-col-clip--multiline,
.list-col-bottleneck .list-col-clip {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  white-space: normal;
  overflow: hidden;
  line-height: 1.3;
}

.list-col-followup.list-col-today-action {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
  font-size: 0.74rem;
  line-height: 1.3;
}

.list-col-followup.list-col-today-action .list-col-clip {
  flex: 1;
  min-width: 0;
}

.inquiry-list-pager {
  margin: 0;
  padding: 8px 12px;
  border-top: 1px solid var(--border, #e2e8f0);
  background: var(--surface2, #f8fafc);
  border-radius: 0 0 12px 12px;
}

.list-col-followup,
.list-col-bottleneck,
.list-col-today-action {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.list-col-today-action {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.list-col-today-action .list-today-icon {
  flex-shrink: 0;
}

.list-sales-feedback {
  color: var(--muted);
  font-size: 0.72rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.list-col-text.is-highlight,
.list-follow-item.is-highlight {
  color: var(--focus-priority-text);
  font-weight: 600;
}

.list-col-sales,
.list-col-score {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--blue);
  text-align: left;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  padding-top: 2px;
}

.list-sales-score {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--blue);
  flex-shrink: 0;
}

.list-sales-metrics {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.list-sales-metrics--bands {
  gap: 5px;
}

.list-sales-metrics--legacy {
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
  white-space: pre-line;
  max-height: 4.2em;
  overflow: hidden;
}

.list-sales-band {
  display: grid;
  grid-template-columns: 1.35em minmax(0, 1fr);
  gap: 3px 5px;
  align-items: center;
}

.list-sales-band--solo {
  grid-template-columns: minmax(0, 1fr);
}

.list-sales-band-label {
  font-size: 0.62rem;
  font-weight: 600;
  color: var(--muted, #6b7280);
  line-height: 1.15;
  white-space: nowrap;
}

.list-sales-band-items {
  display: flex;
  gap: 4px;
  min-width: 0;
}

.list-sales-chip {
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(12px, 1fr) auto;
  gap: 2px 3px;
  align-items: center;
  padding: 2px 4px;
  border-radius: 4px;
  background: #f4f6f9;
}

.list-sales-chip-name {
  font-size: 0.62rem;
  color: var(--muted, #6b7280);
  white-space: nowrap;
  line-height: 1.1;
}

.list-sales-chip-bar {
  height: 4px;
  border-radius: 2px;
  background: #e2e6ee;
  overflow: hidden;
  min-width: 18px;
}

.list-sales-chip-fill {
  display: block;
  height: 100%;
  border-radius: 2px;
}

.list-sales-chip--rate-high .list-sales-chip-fill { background: #059669; }
.list-sales-chip--rate-mid .list-sales-chip-fill { background: #d97706; }
.list-sales-chip--rate-low .list-sales-chip-fill { background: #dc2626; }
.list-sales-chip--rate-na .list-sales-chip-fill { background: transparent; }

.list-sales-chip-score {
  font-size: 0.65rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.1;
}

.list-sales-chip--rate-high .list-sales-chip-score { color: #059669; }
.list-sales-chip--rate-mid .list-sales-chip-score { color: #d97706; }
.list-sales-chip--rate-low .list-sales-chip-score { color: #dc2626; }
.list-sales-chip--na .list-sales-chip-score {
  color: #9ca3af;
  font-weight: 500;
}

.list-col-potential {
  font-weight: 700;
  text-align: left;
  font-size: 0.82rem;
  padding-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.list-col-potential.grade-s { color: #7c3aed; }
.list-col-potential.grade-a { color: var(--green); }
.list-col-potential.grade-b { color: var(--blue); }
.list-col-potential.grade-c { color: var(--amber, #e8a838); }
.list-col-potential.grade-d { color: var(--red); }

.list-col-potential--clickable {
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.list-col-potential--clickable:hover,
.list-col-potential--clickable:focus-visible {
  background: var(--accent-soft, #ebe9ff);
  box-shadow: inset 0 0 0 1px rgba(91, 79, 214, 0.25);
  outline: none;
}

.list-col-opportunity {
  font-weight: 700;
  font-size: 0.78rem;
  line-height: 1.35;
  text-align: left;
  padding: 2px 4px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.list-col-opportunity.grade-s { color: #7c3aed; }
.list-col-opportunity.grade-a { color: var(--green); }
.list-col-opportunity.grade-b { color: var(--blue); }
.list-col-opportunity.grade-c { color: var(--amber, #e8a838); }
.list-col-opportunity.grade-d { color: var(--red); }

.list-col-opportunity--clickable {
  cursor: pointer;
  transition: background 0.12s;
}

.list-col-opportunity--clickable:hover,
.list-col-opportunity--clickable:focus-visible {
  background: var(--accent-soft, #ebe9ff);
  box-shadow: inset 0 0 0 1px rgba(91, 79, 214, 0.25);
  outline: none;
}

.list-col-opportunity--executive {
  box-shadow: inset 0 0 0 1px rgba(220, 38, 38, 0.45);
  background: rgba(254, 226, 226, 0.35);
}

.list-row--executive {
  background: rgba(254, 242, 242, 0.55);
}

.warning-badge--executive {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid rgba(220, 38, 38, 0.25);
}

.opportunity-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
}

.opportunity-modal-head-score {
  font-size: 1.25rem;
  font-weight: 800;
  white-space: nowrap;
}

.opportunity-modal-head-score.grade-s { color: #7c3aed; }
.opportunity-modal-head-score.grade-a { color: var(--green); }
.opportunity-modal-head-score.grade-b { color: var(--blue); }
.opportunity-modal-head-score.grade-c { color: var(--amber, #d97706); }
.opportunity-modal-head-score.grade-d { color: var(--red); }

.opportunity-modal-formula,
.opportunity-modal-note {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0 0 8px;
}

.opportunity-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.opportunity-metric-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.opportunity-metric-title {
  font-size: 0.72rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.opportunity-metric-value {
  font-size: 1rem;
  font-weight: 700;
}

.opportunity-metric-sub {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 4px;
}

.opportunity-triple-compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.opportunity-triple-item {
  text-align: center;
  background: #f8f9ff;
  border-radius: 8px;
  padding: 8px;
  font-size: 0.78rem;
}

.opportunity-triple-item strong {
  display: block;
  font-size: 1.1rem;
  margin-top: 2px;
}

.opportunity-attention {
  padding: 10px 12px;
  border-radius: 8px;
  background: #eef2ff;
  font-size: 0.84rem;
  margin-bottom: 8px;
}

.opportunity-attention--executive {
  background: #fee2e2;
  color: #991b1b;
}

.opportunity-attention--priority {
  background: #ecfdf5;
  color: #065f46;
}

.opportunity-summary {
  font-size: 0.82rem;
  color: var(--muted);
  margin: 0;
}

.potential-modal-header h2 {
  font-size: 1.15rem;
}

.potential-modal-rules {
  margin: 12px 0 16px;
  padding: 12px 14px;
  background: #f8f9fc;
  border: 1px solid #e4e8f0;
  border-radius: 10px;
}

.potential-modal-rules-summary {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text, #1a1d26);
  cursor: pointer;
  list-style: none;
}

.potential-modal-rules-summary::-webkit-details-marker {
  display: none;
}

.potential-modal-formula {
  margin: 10px 0 6px;
  font-size: 0.82rem;
  color: var(--primary, #5b4fd6);
  font-weight: 600;
}

.potential-modal-rfq-note {
  margin: 0 0 10px;
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  line-height: 1.45;
}

.potential-rules-tables {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
}

@media (max-width: 640px) {
  .potential-rules-tables {
    grid-template-columns: 1fr;
  }
}

.potential-rules-block-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #6b7280);
  margin-bottom: 4px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.potential-rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.72rem;
}

.potential-rules-table th,
.potential-rules-table td {
  padding: 4px 6px;
  text-align: left;
  border-bottom: 1px solid #eceef4;
}

.potential-rules-table th {
  color: var(--muted, #6b7280);
  font-weight: 600;
}

.potential-modal-metrics {
  margin-bottom: 16px;
}

.potential-modal-metrics-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
}

.potential-modal-grade {
  font-size: 1.1rem;
  font-weight: 800;
}

.potential-modal-grade.grade-s { color: #7c3aed; }
.potential-modal-grade.grade-a { color: var(--green); }
.potential-modal-grade.grade-b { color: var(--blue); }
.potential-modal-grade.grade-c { color: var(--amber, #d97706); }
.potential-modal-grade.grade-d { color: var(--red); }

.potential-grade-row--current {
  background: var(--accent-dim, #ebe9ff);
  font-weight: 700;
}

.potential-modal-grade-compact {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
}

.pie-legend-dot.potential-s { background: #7c3aed; }
.pie-legend-dot.potential-a { background: #3dd68c; }
.pie-legend-dot.potential-b { background: #5eb3ff; }
.pie-legend-dot.potential-c { background: #e8a838; }
.pie-legend-dot.potential-d { background: #f07178; }

.potential-modal-score-num {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text, #1a1d26);
}

.potential-metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

@media (max-width: 720px) {
  .potential-metric-grid {
    grid-template-columns: 1fr;
  }
}

.potential-metric-card--na {
  opacity: 0.72;
  background: var(--surface-muted, #f6f7f9);
}

.potential-metric-score--na {
  color: var(--text-muted, #8b95a5);
  font-size: 0.92em;
}

.potential-metric-bar--na {
  visibility: hidden;
}

  padding: 12px;
  background: #fff;
  border: 1px solid #e4e8f0;
  border-radius: 10px;
  border-top: 3px solid var(--primary, #5b4fd6);
}

.potential-metric-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
  margin-bottom: 8px;
}

.potential-metric-card-title {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text, #1a1d26);
}

.potential-metric-card-weight {
  font-size: 0.68rem;
  color: var(--muted, #6b7280);
  white-space: nowrap;
}

.potential-metric-raw {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--primary, #5b4fd6);
  margin-bottom: 4px;
}

.potential-metric-label {
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  margin-bottom: 8px;
  line-height: 1.35;
}

.potential-metric-scores {
  display: flex;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text, #1a1d26);
  padding-top: 8px;
  border-top: 1px dashed #e8ebf2;
}

.potential-modal-total {
  margin-top: 12px;
  padding: 10px 12px;
  background: var(--accent-soft, #ebe9ff);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
}

.potential-source-warn {
  margin: 10px 0 0;
  padding: 8px 10px;
  font-size: 0.78rem;
  color: #92400e;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
}

.potential-source-note,
.potential-fallback-msg {
  margin: 10px 0 0;
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
}

.potential-modal-metrics--fallback {
  padding: 12px;
  background: #f8f9fc;
  border-radius: 10px;
  border: 1px dashed #d8dcf5;
}

.potential-modal-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: 8px;
  border-top: 1px solid #eceef4;
}

.potential-modal-full-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 8px;
  background: var(--primary, #5b4fd6);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.potential-modal-full-btn:hover {
  filter: brightness(1.05);
}

.list-col-followup {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.list-follow-item {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
  word-break: break-word;
}

/* —— 卡片视图（对话 + 底部 AI 总结）—— */
.inquiry-card {
  display: flex;
  flex-direction: column;
  min-height: 480px;
  max-height: 620px;
  background: var(--card-panel-bg);
  border: 1px solid #d8dcf5;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 4px 16px rgba(91, 79, 214, 0.08);
  transition: box-shadow 0.2s, transform 0.2s;
}

.inquiry-card:hover {
  box-shadow: 0 8px 24px rgba(91, 79, 214, 0.12);
  transform: translateY(-2px);
}

.inquiry-card--alert {
  border-color: #fecaca;
  box-shadow: 0 0 0 1px #fee2e2, 0 4px 16px rgba(220, 38, 38, 0.08);
}

.inquiry-card-ai {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
}

.card-ai-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 12px 16px 10px;
  -webkit-overflow-scrolling: touch;
}

.card-ai-body::-webkit-scrollbar {
  width: 4px;
}

.card-ai-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.card-ai-section {
  margin-bottom: 10px;
}

.card-ai-section:last-child {
  margin-bottom: 0;
}

.card-ai-section--actions {
  margin-bottom: 8px;
}

.inquiry-card-body {
  display: flex;
  flex: 1;
  min-height: 0;
  gap: 0;
}

.inquiry-card-ai--side {
  flex: 0 0 48%;
  min-width: 0;
  border-top: none;
  border-bottom: none;
  border-right: 1px solid #e8eaf3;
}

.inquiry-card-meta {
  flex-shrink: 0;
  padding: 10px 12px 8px;
  border-bottom: 1px solid #e8eaf3;
  background: var(--surface);
}

.inquiry-card-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-bottom: 4px;
}

.inquiry-card-meta-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.4;
}

.inquiry-card-meta-sub .inquiry-card-country {
  font-size: inherit;
}

.inquiry-card-meta-sub .inquiry-card-assignee::before {
  content: "·";
  margin-right: 10px;
  color: #cbd5e1;
}

.inquiry-card-chat--side {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
  background: var(--card-panel-bg);
}

.inquiry-card-chat-header {
  flex-shrink: 0;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px 8px;
  background: #fff;
  border-bottom: 1px solid #e8eaf3;
}

.inquiry-card-chat-title {
  flex: 1;
  min-width: 0;
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  white-space: normal;
  word-break: break-word;
  color: var(--text);
}

.inquiry-card-chat-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.inquiry-card-chat--side .card-chat-scroll {
  flex: 1;
  min-height: 0;
  max-height: none;
  margin: 0;
  padding: 10px 12px;
  border-radius: 0;
  background: var(--card-panel-bg);
}

.inquiry-card-chat--side .card-chat-empty {
  padding: 12px 8px;
}

@media (max-width: 640px) {
  .inquiry-card-body {
    flex-direction: column;
  }

  .inquiry-card-ai--side {
    flex: 0 0 auto;
    max-height: 45%;
    border-right: none;
    border-bottom: 1px solid #e8eaf3;
  }

  .inquiry-card-chat--side {
    flex: 1;
    min-height: 200px;
  }
}

.card-chat-more {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 4px 0;
  border: none;
  background: transparent;
  color: var(--card-ai-accent);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
}

.card-chat-more:hover {
  text-decoration: underline;
}

.inquiry-card-chat {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 14px 10px;
}

.inquiry-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 0;
  flex-shrink: 0;
  padding: 14px 14px 8px;
  background: var(--card-panel-bg);
}

.inquiry-card-header-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.inquiry-card-title {
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inquiry-card-header-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.card-icon-btn {
  width: 28px;
  height: 28px;
  border: none;
  background: rgba(255, 255, 255, 0.65);
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.85rem;
  line-height: 1;
  color: var(--muted);
  transition: background 0.15s, color 0.15s;
}

.card-icon-btn:hover {
  background: #fff;
  color: var(--card-ai-accent);
}

.card-chat-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.35);
  padding: 10px 8px;
  -webkit-overflow-scrolling: touch;
}

.card-chat-scroll::-webkit-scrollbar {
  width: 6px;
}

.card-chat-scroll::-webkit-scrollbar-thumb {
  background: rgba(91, 79, 214, 0.25);
  border-radius: 3px;
}

.card-chat-thread {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.card-chat-empty {
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 24px 8px;
}

.card-msg {
  display: flex;
  gap: 8px;
  max-width: 100%;
}

.card-msg--buyer {
  flex-direction: row;
  align-self: flex-start;
  max-width: 92%;
}

.card-msg--seller {
  flex-direction: column;
  align-items: flex-end;
  align-self: flex-end;
  max-width: 92%;
  gap: 4px;
}

.card-msg-assignee-name {
  width: 100%;
  max-width: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  text-align: right;
  line-height: 1.35;
  word-break: break-word;
  padding: 0 2px;
}

.card-msg-seller-row {
  display: flex;
  flex-direction: row-reverse;
  align-items: flex-end;
  gap: 8px;
  max-width: 100%;
}

.card-msg-avatar-wrap {
  position: relative;
  flex-shrink: 0;
}

.card-msg-avatar {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(145deg, #fbbf24, #f59e0b);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(245, 158, 11, 0.35);
}

.card-msg-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.card-msg--seller .card-msg-body {
  align-items: flex-end;
}

.card-msg-bubble {
  padding: 10px 12px;
  border-radius: 12px;
  font-size: 0.8rem;
  line-height: 1.45;
  word-break: break-word;
}

.card-msg--buyer .card-msg-bubble {
  background: var(--card-buyer-bubble);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.06);
}

.card-msg--seller .card-msg-bubble {
  background: var(--card-seller-bubble);
  border: 1px solid #d4cff9;
}

.card-msg-bubble .msg-text {
  font-size: inherit;
}

.card-msg-bubble .msg-media-label,
.msg-media-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 4px;
}

.card-msg-bubble .msg-text--placeholder,
.msg-text--placeholder {
  font-size: 0.78rem;
  color: var(--muted);
  font-style: italic;
}

.card-msg-bubble .msg-text-zh {
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(91, 79, 214, 0.28);
  font-size: 0.78rem;
  color: #4338ca;
  line-height: 1.45;
  word-break: break-word;
}

.card-msg-bubble .msg-text-zh--pending {
  color: var(--muted);
  font-style: italic;
  border-top-color: var(--border);
}

.card-msg-bubble .msg-image-wrap {
  margin-top: 4px;
  max-width: 100%;
}

.card-msg-bubble .msg-image {
  display: block;
  max-width: 100%;
  max-height: 160px;
  width: auto;
  height: auto;
  border-radius: 8px;
  object-fit: contain;
  cursor: pointer;
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid #e8eaf3;
}

.card-msg-bubble .msg-image--failed {
  display: none;
}

.card-msg-bubble .msg-image-fallback {
  display: none;
  font-size: 0.72rem;
  color: var(--card-ai-accent);
  line-height: 1.35;
  word-break: break-all;
}

.card-msg-bubble .msg-image-fallback.is-visible {
  display: block;
}

.card-msg-bubble .msg-image-fallback a {
  color: var(--card-ai-accent);
}

.card-msg-time {
  font-size: 0.65rem;
  color: var(--muted);
  line-height: 1.3;
}

.card-msg--seller .card-msg-time {
  width: 100%;
  text-align: right;
  padding: 0 2px;
}

.card-msg-meta {
  font-size: 0.65rem;
  color: var(--muted);
  padding: 0 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
}

.card-msg-meta-sep {
  opacity: 0.65;
}

.inquiry-card-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border-top: 1px solid #e8eaf3;
  padding: 12px 16px 10px;
  max-height: 42%;
}

.card-footer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  margin-bottom: 8px;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
}

.card-footer-body::-webkit-scrollbar {
  width: 4px;
}

.card-footer-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.card-footer-section {
  margin-bottom: 10px;
}

.card-footer-section:last-child {
  margin-bottom: 0;
}

.card-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.card-section-title--actions {
  color: var(--action-title);
}

.card-section-title--actions::before {
  content: "◎";
  font-size: 0.75rem;
  color: var(--action-border);
}

.card-ai-spark {
  color: var(--card-ai-accent);
  font-size: 1rem;
}

.card-ai-summary {
  font-size: 0.8rem;
  line-height: 1.55;
  color: #334155;
  margin: 0;
}

.card-actions-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.card-actions-item {
  font-size: 0.78rem;
  line-height: 1.45;
  color: #334155;
  padding: 6px 8px;
  background: var(--action-bg);
  border-radius: 6px;
  border-left: 3px solid var(--action-border);
}

.card-actions-item--priority {
  color: var(--alert-text);
  font-weight: 600;
  background: var(--focus-priority-bg);
  border-left-color: var(--focus-priority-border);
}

.card-actions-empty {
  font-size: 0.78rem;
  color: var(--muted);
  margin: 0;
}

.card-ai-progress {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
  padding-top: 6px;
  border-top: 1px solid #f1f5f9;
}

.card-progress-link {
  border: none;
  background: none;
  padding: 0;
  font-size: 0.78rem;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s;
}

.card-progress-link:hover {
  color: var(--card-ai-accent);
}

.card-progress-pct {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.level-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-dim);
  color: var(--blue);
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.potential-score {
  font-size: 1.75rem;
  font-weight: 700;
  line-height: 1;
}

.potential-score.high { color: var(--green); }
.potential-score.mid { color: var(--blue); }
.potential-score.low { color: var(--muted); }

.inquiry-type-tag {
  display: inline-block;
  font-size: 0.7rem;
  color: var(--blue);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 2px 8px;
  margin-bottom: 10px;
  font-weight: 500;
}

.inquiry-type-banner {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--blue);
  background: var(--accent-dim);
  border: 1px solid #93c5fd;
  border-radius: 6px;
  padding: 6px 12px;
  margin-bottom: 12px;
  font-weight: 600;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.tag {
  background: var(--surface2);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  color: var(--muted);
}

.focus-box {
  background: var(--focus-bg);
  border-radius: 8px;
  padding: 10px 12px;
  border-left: 4px solid var(--focus-border);
}

.focus-box--priority {
  background: var(--focus-priority-bg);
  border-left-color: var(--focus-priority-border);
}

.focus-box--priority .focus-label {
  color: var(--orange);
  font-weight: 700;
}

.focus-box--priority .focus-text {
  color: var(--focus-priority-text);
  font-weight: 500;
}

.focus-label {
  font-size: 0.7rem;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 4px;
}

.focus-text {
  font-size: 0.82rem;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.warning-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  background: var(--red);
  padding: 2px 6px;
  border-radius: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.warning-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  margin-left: 6px;
  box-shadow: 0 0 0 2px #fee2e2;
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

#feedbackModalOverlay {
  z-index: 110;
}

.modal--feedback {
  width: min(480px, 100%);
  max-height: 88vh;
}

.modal--feedback .modal-content {
  padding-bottom: 12px;
}

.feedback-modal-header {
  margin-bottom: 12px;
}

.feedback-modal-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feedback-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px 18px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

.btn-secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  cursor: pointer;
}

.btn-secondary:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.btn-primary {
  border: none;
  background: var(--purple, var(--accent));
  color: #fff;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(91, 79, 214, 0.35);
}

.btn-primary:hover {
  opacity: 0.92;
}

.modal-overlay.hidden {
  display: none;
}

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  width: min(1440px, 96vw);
  height: 94vh;
  max-height: 94vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-md);
}

.modal > .modal-content {
  flex: 1;
  min-height: 0;
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
  z-index: 2;
  line-height: 1;
}

.modal-close:hover {
  color: var(--text);
}

.modal-content {
  overflow-y: auto;
  padding: 20px 22px 24px;
}

.modal-content.modal-content--detail {
  overflow: hidden;
  padding: 12px 16px 14px;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.modal-shell {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  height: 100%;
}

.modal-top {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.modal-top--compact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 36px;
}

.modal-top-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.modal-top-row--identity {
  line-height: 1.3;
}

.modal-top-row--metrics {
  font-size: 0.78rem;
  color: var(--muted);
}

.modal-top-name {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
}

.modal-top-meta {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.modal-top-sep {
  color: #c4cad4;
  font-size: 0.72rem;
  user-select: none;
}

.modal-top-sep--bar {
  color: #d8dce3;
}

.modal-top-tag {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--blue);
  background: var(--accent-dim);
  border: 1px solid #93c5fd;
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.modal-top-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.modal-top-chip-label {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--muted);
}

.modal-top-chip-value {
  font-size: 0.92rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.modal-top-chip--potential .modal-top-chip-value {
  color: var(--green);
}

.modal-top-chip--potential.grade-s .modal-top-chip-value { color: #7c3aed; }
.modal-top-chip--potential.grade-a .modal-top-chip-value { color: var(--green); }
.modal-top-chip--potential.grade-b .modal-top-chip-value { color: var(--blue); }
.modal-top-chip--potential.grade-c .modal-top-chip-value { color: var(--amber, #d97706); }
.modal-top-chip--potential.grade-d .modal-top-chip-value { color: var(--red); }

.modal-top-chip--close .modal-top-chip-value {
  color: #4338ca;
}

.modal-top-chip-sub {
  font-size: 0.68rem;
  color: #9ca3af;
  font-weight: 500;
}

.modal-top .modal-header {
  margin-bottom: 10px;
}

.modal-top .stats-row {
  margin-bottom: 0;
}

.modal-split {
  display: grid;
  grid-template-columns: 45fr 55fr;
  gap: 12px;
  flex: 1;
  min-height: 0;
}

.modal-split--triple {
  grid-template-columns: 30fr 40fr 30fr;
}

.modal-pane {
  min-height: 0;
  overflow-y: auto;
  padding-right: 2px;
}

.modal-pane--sales,
.modal-pane--analysis {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.modal-pane--chat {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}

.modal-pane-head {
  flex-shrink: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
  margin-bottom: 4px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

.modal-pane-head--chat {
  margin-bottom: 8px;
}

.modal-sales-total {
  flex-shrink: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--blue);
  line-height: 1.2;
}

.modal-sales-score-body {
  min-height: 0;
  flex-shrink: 0;
}

.modal-sales-score-body .sales-score-card-body {
  margin-top: 0;
}

.modal-pane--sales .modal-score-basis {
  flex-shrink: 0;
  margin-top: 10px;
}

.modal-top .modal-kpi-strip {
  margin-top: 8px;
}

.modal-top .modal-potential-line {
  padding-top: 6px;
}

.modal-top--compact .modal-tip-icon {
  margin-left: 2px;
}

.modal-kpi-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.modal-kpi-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid #e8ebf0;
}

.modal-kpi-label {
  font-size: 0.68rem;
  color: var(--muted);
  font-weight: 600;
}

.modal-kpi-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.modal-kpi-item--sales .modal-kpi-value {
  color: var(--blue);
}

.modal-kpi-item--potential .modal-kpi-value {
  color: var(--green);
}

.modal-kpi-item--potential.grade-s .modal-kpi-value { color: #7c3aed; }
.modal-kpi-item--potential.grade-a .modal-kpi-value { color: var(--green); }
.modal-kpi-item--potential.grade-b .modal-kpi-value { color: var(--blue); }
.modal-kpi-item--potential.grade-c .modal-kpi-value { color: var(--amber, #d97706); }
.modal-kpi-item--potential.grade-d .modal-kpi-value { color: var(--red); }

.modal-kpi-item--close .modal-kpi-value {
  color: #4338ca;
}

.modal-tip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--muted);
  background: #eef1f6;
  cursor: help;
  flex-shrink: 0;
}

.modal-score-chips .list-sales-metrics {
  gap: 5px;
}

.modal-potential-line {
  font-size: 0.72rem;
  color: var(--muted);
  padding: 4px 2px 0;
}

.modal-potential-line--muted {
  color: #9ca3af;
}

.modal-analysis-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.modal-analysis-compact .analysis-block,
.modal-analysis-compact .modal-action-box {
  margin-bottom: 0;
  padding: 10px 12px;
}

.modal-analysis-compact .section-body {
  font-size: 0.84rem;
  line-height: 1.45;
}

.modal-analysis-compact .section-title {
  font-size: 0.72rem;
  margin-bottom: 4px;
}

.analysis-block--bottleneck {
  border-left: 3px solid var(--amber, #d97706);
  background: #fffbf5;
}

.analysis-block--core {
  background: var(--surface2);
}

.analysis-block--background {
  background: var(--surface2);
  padding-top: 6px;
}

.modal-action-box {
  margin-bottom: 0;
}

.modal-action-box ul {
  margin: 0;
}

.modal-action-box li {
  font-size: 0.82rem;
  margin-bottom: 4px;
}

.modal-suggested-reply {
  margin-top: 10px;
  margin-bottom: 0;
  padding: 10px 12px;
}

.modal-suggested-reply-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.modal-suggested-reply-head .section-title {
  margin-bottom: 0;
  color: var(--action-title);
  font-size: 0.85rem;
}

.modal-suggested-reply-body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--text);
  white-space: pre-wrap;
  word-break: break-word;
}

.modal-copy-reply-btn {
  flex-shrink: 0;
  padding: 3px 10px;
  border: 1px solid #86efac;
  border-radius: 6px;
  background: #fff;
  color: var(--action-title);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.4;
}

.modal-copy-reply-btn:hover {
  background: #ecfdf5;
  border-color: var(--action-border);
}

.modal-copy-reply-btn.is-copied {
  background: var(--action-bg);
  border-color: var(--action-border);
  color: var(--action-title);
}

.modal-copy-reply-btn:disabled {
  cursor: default;
  opacity: 0.9;
}

.modal-expand-toggle {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 0 0 4px;
  border: none;
  background: transparent;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.modal-expand-toggle.is-expanded .modal-expand-caret {
  transform: rotate(180deg);
}

.modal-clamp-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.modal-clamp-text.is-expanded {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.modal-details {
  font-size: 0.78rem;
  color: var(--text);
  border: 1px dashed var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: #fafbfc;
}

.modal-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.72rem;
}

.modal-details-body {
  margin-top: 8px;
  line-height: 1.45;
  font-size: 0.78rem;
}

.warnings-banner--slim {
  margin-bottom: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.warnings-banner--slim .section-body {
  font-size: 0.78rem;
  color: var(--alert-text);
  font-weight: 500;
}

.modal-chat-section {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  margin-top: 0;
  overflow: hidden;
}

.modal-chat-thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding-right: 4px;
}

.modal-chat-thread-inner {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.modal-chat-thread-inner .msg {
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .modal-split--triple {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "sales analysis"
      "chat chat";
  }

  .modal-split--triple .modal-pane--sales {
    grid-area: sales;
    max-height: 42vh;
  }

  .modal-split--triple .modal-pane--analysis {
    grid-area: analysis;
    max-height: 42vh;
  }

  .modal-split--triple .modal-pane--chat {
    grid-area: chat;
    min-height: 38vh;
  }
}

@media (max-width: 900px) {
  .modal {
    width: min(100%, 98vw);
    height: 96vh;
    max-height: 96vh;
  }

  .modal-split,
  .modal-split--triple {
    grid-template-columns: 1fr;
    grid-template-areas: unset;
    overflow-y: auto;
  }

  .modal-split--triple .modal-pane--sales,
  .modal-split--triple .modal-pane--analysis {
    max-height: none;
  }

  .modal-pane--chat,
  .modal-split--triple .modal-pane--chat {
    min-height: 42vh;
  }
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding-right: 36px;
}

.modal-header h2 {
  font-size: 1.25rem;
}

.modal-sub {
  color: var(--muted);
  font-size: 0.85rem;
}

.stats-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  background: var(--surface2);
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}

.stats-row span::after {
  content: " · ";
}

.stats-row span:last-child::after {
  content: "";
}

.topic-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.pill {
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 0.72rem;
}

.pill.done {
  background: var(--pill-done);
  color: var(--green);
}

.pill.pending {
  background: var(--pill-pending);
  color: var(--muted);
}

.pill.warn {
  background: var(--pill-warn-bg);
  color: var(--red);
  font-weight: 600;
  border: 1px solid #fecaca;
}

.section {
  margin-bottom: 16px;
}

.section-title {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.section-body {
  font-size: 0.9rem;
  color: var(--text);
}

.action-box {
  background: var(--action-bg);
  border: 1px solid #bbf7d0;
  border-left: 4px solid var(--action-border);
  border-radius: 8px;
  padding: 12px 14px;
}

.action-box .section-title {
  color: var(--action-title);
  font-size: 0.85rem;
}

.action-box ul {
  margin: 0;
  padding-left: 18px;
}

.action-box li {
  margin-bottom: 6px;
  font-size: 0.88rem;
  color: var(--text);
}

.action-box li.is-priority {
  color: var(--alert-text);
  font-weight: 600;
  list-style: none;
  margin-left: -18px;
  padding: 6px 10px;
  background: var(--focus-priority-bg);
  border-radius: 6px;
  border-left: 3px solid var(--focus-priority-border);
}

.last-buyer {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.88rem;
}

.last-buyer .section-title {
  color: var(--amber);
  font-weight: 700;
}

.warnings-banner {
  background: var(--alert-bg);
  border: 1px solid var(--alert-border);
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 16px;
}

.warnings-banner .section-title {
  color: var(--red);
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.warnings-banner .section-body {
  color: var(--alert-text);
  font-weight: 500;
  font-size: 0.88rem;
}

.analysis-grid {
  display: grid;
  gap: 12px;
}

.analysis-block {
  background: var(--surface2);
  border-radius: 8px;
  padding: 12px;
}

.score-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.score-card {
  flex: 1;
  min-width: 140px;
  background: var(--surface2);
  border-radius: 8px;
  padding: 12px;
}

.score-card .num {
  font-size: 1.5rem;
  font-weight: 700;
}

.score-card.sales .num { color: var(--blue); }
.score-card.potential .num { color: var(--green); }

.potential-score-card-body {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  word-break: break-word;
}

.potential-score-card-rules {
  color: var(--muted);
  font-size: 0.75rem;
}

.potential-score-card-rules p {
  margin: 0 0 3px;
}

.potential-score-card-formula {
  margin-bottom: 5px !important;
}

.potential-score-card-divider {
  height: 1px;
  background: var(--border, #e2e8f0);
  margin: 8px 0;
}

.potential-score-card-metrics {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.potential-score-card-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.potential-score-card-metric-main {
  font-weight: 500;
  color: var(--text, #1e293b);
}

.potential-score-card-metric-scores {
  font-size: 0.75rem;
  color: var(--muted);
}

.potential-score-card-metric-scores strong {
  color: var(--text, #1e293b);
  font-weight: 600;
}

.potential-score-card-total {
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--green);
}

.potential-score-card-warn,
.potential-score-card-fallback {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

.potential-score-card-warn {
  color: var(--amber, #d97706);
}

.potential-score-card-body--fallback p {
  margin: 0 0 4px;
}

.sales-score-card-body {
  margin-top: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  word-break: break-word;
}

.sales-score-card-body--empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.sales-score-card-legacy {
  white-space: pre-line;
  color: var(--muted);
  font-size: 0.78rem;
}

.sales-score-card-metrics {
  display: flex;
  flex-direction: column;
}

.sales-score-card-section + .sales-score-card-section {
  margin-top: 10px;
}

.sales-score-card-section-title {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted, #6b7280);
  letter-spacing: 0.02em;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eceef3;
}

.sales-score-card-metric {
  padding: 6px 0;
  border-bottom: 1px solid #eceef4;
}

.sales-score-card-metric:last-child {
  border-bottom: none;
}

.sales-score-card-metric-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.sales-score-card-metric-name {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--text, #1a1d26);
  flex: 1;
  min-width: 0;
}

.sales-score-card-metric-score {
  font-weight: 700;
  font-size: 0.78rem;
  color: var(--blue);
  flex-shrink: 0;
}

.sales-score-card-metric-detail {
  margin-top: 2px;
  font-size: 0.75rem;
  color: var(--muted, #6b7280);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.sales-score-card-metric--na .sales-score-card-metric-score {
  color: var(--muted, #9ca3af);
  font-weight: 500;
}

.sales-score-card-scoring-note {
  margin-top: 8px;
  padding: 6px 8px;
  font-size: 0.72rem;
  line-height: 1.4;
  color: var(--muted, #6b7280);
  background: #f6f7fa;
  border-radius: 6px;
}

.sales-score-card-summary {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #dce0ea;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sales-score-card-summary-row {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--text, #1a1d26);
}

.sales-score-card-summary-label {
  display: inline-block;
  min-width: 3em;
  margin-right: 6px;
  font-weight: 700;
  color: var(--muted, #6b7280);
}

.chat-section {
  margin-top: 8px;
}

.chat-title {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 10px;
}

.chat-thread {
  max-height: 360px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-right: 4px;
}

.msg {
  max-width: 85%;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.85rem;
}

.msg.buyer {
  align-self: flex-start;
  background: var(--buyer-bg);
}

.msg.seller {
  align-self: flex-end;
  background: var(--seller-bg);
}

.msg-time {
  font-size: 0.7rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.msg-sender {
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 6px;
}

.msg-image-wrap {
  margin-top: 4px;
}

.msg-image {
  display: block;
  max-width: 100%;
  max-height: 280px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
}

.msg-image-fallback {
  display: none;
  font-size: 0.8rem;
  color: var(--accent);
  word-break: break-all;
}

.msg-image-fallback.is-visible {
  display: block;
}

.msg-image--failed {
  display: none;
}

.msg-image-fallback a {
  color: var(--accent);
}

.empty-state {
  text-align: center;
  padding: 48px;
  color: var(--muted);
}

.customer-type-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  margin-right: 6px;
  vertical-align: middle;
}
.customer-type-badge--new { background: #dbeafe; color: #1d4ed8; }
.customer-type-badge--returning { background: #ede9fe; color: #5b4fd6; }
.customer-type-badge--unknown { background: #f3f4f6; color: #6b7280; }
.inquiry-count-badge {
  font-size: 0.68rem;
  color: #5b4fd6;
  font-weight: 600;
  margin-left: 4px;
}
.inquiry-day-divider,
.card-day-divider {
  text-align: center;
  font-size: 0.72rem;
  color: #5b4fd6;
  margin: 10px 0;
  opacity: 0.85;
}
.inquiry-day-divider span,
.card-day-divider span {
  background: #fff;
  padding: 2px 10px;
  border-radius: 999px;
  border: 1px dashed #c4b5fd;
}
.modal-inquiry-divider {
  margin: 12px 0 14px;
  flex-shrink: 0;
}
.modal-inquiry-divider span {
  background: var(--surface2);
}
.card-historical-profile {
  margin-top: 4px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #f8f7ff;
  border: 1px solid #ebe9ff;
}
.card-historical-profile .card-section-title { color: #5b4fd6; }
.card-historical-list {
  margin: 6px 0 0;
  padding-left: 1.1em;
  font-size: 0.82rem;
  line-height: 1.45;
  color: #374151;
}
.card-historical-list li { margin-bottom: 4px; }
.card-historical-text {
  margin: 6px 0 0;
  font-size: 0.82rem;
  line-height: 1.5;
  color: #374151;
  white-space: pre-wrap;
}
.historical-profile-item {
  margin-bottom: 4px;
}
.historical-profile-k {
  font-weight: 600;
  color: #4b5563;
  margin-right: 4px;
}
.historical-profile-item--highlight .historical-profile-k {
  color: #5b4fd6;
}
.historical-profile-item--caution .historical-profile-k {
  color: #b45309;
}
.historical-profile-item--caution {
  color: #92400e;
}
.customer-thread-profile-list,
.customer-modal-historical-list,
.modal-historical-list {
  margin: 0;
}
.customer-thread-profile-block {
  font-size: 0.78rem;
}
.stat-chip--new { background: #dbeafe; color: #1e40af; }
.stat-chip--returning { background: #ede9fe; color: #5b4fd6; }

.stat-chip--filter {
  cursor: pointer;
  font: inherit;
  font-size: 0.8rem;
  line-height: inherit;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.stat-chip--filter:hover {
  filter: brightness(0.96);
}

.stat-chip--filter.stat-chip--active {
  border-color: currentColor;
  box-shadow: 0 0 0 2px color-mix(in srgb, currentColor 25%, transparent);
  font-weight: 600;
}

.stat-chip--filter:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

/* V5 主管复盘 */
.stat-chip--supervisor { color: #5b4fd6; background: #ebe9ff; }
.stat-chip--stalled { color: #b45309; background: #fff7ed; }
.stat-chip--lowfollow { color: #dc2626; background: #fef2f2; }

.supervisor-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px 2px 5px;
  border-radius: 6px;
  background: #f1f5f9;
  color: #475569;
  white-space: nowrap;
}
.supervisor-badge-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}
.supervisor-badge-lv { line-height: 1; }
.supervisor-badge--l1 { background: #e0f2fe; color: #0369a1; }
.supervisor-badge--l2 { background: #fef3c7; color: #b45309; }
.supervisor-badge--l3,
.supervisor-badge--l4,
.supervisor-badge--high { background: #ebe9ff; color: #5b4fd6; }

.stage-arrow { margin-left: 2px; font-weight: 700; }
.stage-arrow--up { color: #059669; }
.stage-arrow--flat { color: #d97706; }

.meta-pill {
  display: inline-flex;
  align-items: center;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  margin-left: 4px;
}
.meta-pill--alert { background: #fef2f2; color: #dc2626; }

.list-row--supervisor-l3 { box-shadow: inset 3px 0 0 #5b4fd6; }
.list-row--low-follow { box-shadow: inset 3px 0 0 #ef4444; }
.list-row--supervisor-l3.list-row--low-follow { box-shadow: inset 3px 0 0 #5b4fd6, inset 6px 0 0 #ef4444; }

.list-col-today-action {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  font-size: 0.74rem;
  line-height: 1.35;
}
.list-today-icon {
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}
.list-header-cell .modal-tip-icon {
  margin-left: 2px;
  vertical-align: middle;
  font-size: 0.72rem;
}

.stat-chip--mustsee { border-color: #c4b5fd; }
.stat-chip--l3 { border-color: #ddd6fe; }
.stat-chip--l4 { border-color: #fecaca; background: #fff5f5; }

.supervisor-focus-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #faf8ff 0%, #f8fafc 100%);
  border: 1px solid #e8e4ff;
  border-radius: 10px;
}
.supervisor-focus-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text);
  margin-right: 4px;
}
.supervisor-focus-chip,
.supervisor-focus-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: 0.74rem;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}
.supervisor-focus-chip:hover,
.supervisor-focus-all:hover {
  background: #f0f7ff;
  border-color: #93c5fd;
}
.supervisor-focus-chip strong,
.supervisor-focus-all strong { font-weight: 800; }
.supervisor-focus-chip--l4 { border-color: #fecaca; color: #b91c1c; }
.supervisor-focus-chip--l3 { border-color: #ddd6fe; color: #5b4fd6; }
.supervisor-focus-chip--low { border-color: #fed7aa; color: #c2410c; }
.supervisor-focus-chip--churn { border-color: #fde68a; color: #b45309; }
.supervisor-focus-all {
  margin-left: auto;
  background: #5b4fd6;
  border-color: #5b4fd6;
  color: #fff;
  font-weight: 600;
}
.supervisor-focus-all:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

.v5-metrics-cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
@media (max-width: 900px) {
  .v5-metrics-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .v5-metrics-cards { grid-template-columns: 1fr; }
}
.v5-metrics-card {
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.74rem;
  line-height: 1.45;
}
.v5-metrics-card-head {
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 0.76rem;
}
.v5-metrics-card p { margin: 0; color: var(--muted); }

.card-today-action {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  margin-top: 6px;
  padding: 6px 8px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  font-size: 0.72rem;
  line-height: 1.4;
}
.card-today-action--priority {
  background: #fef3c7;
  border-color: #f59e0b;
}
.card-today-action-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-top: 1px;
  color: #d97706;
}
.card-today-action-label {
  font-weight: 700;
  color: #b45309;
  white-space: nowrap;
}
.card-today-action-text { color: var(--text); min-width: 0; }

.modal-supervisor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: linear-gradient(135deg, #f5f3ff 0%, #fafafa 100%);
  border: 1px solid #e8e4ff;
  border-radius: 10px;
  font-size: 0.78rem;
}
.modal-sup-bar-chip {
  padding: 3px 8px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.modal-sup-bar-chip--eff.list-col-eff--low,
.modal-sup-bar-chip--eff { font-weight: 600; }
.modal-sup-bar-action {
  flex: 1 1 220px;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.45;
}
.modal-sup-bar-action-icon {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  margin-top: 2px;
  color: #d97706;
}
.modal-sup-bar-muted { color: var(--muted); }

.assignee-vbar-warn {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #ef4444;
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 14px;
  text-align: center;
}
.assignee-vbar-item--low-eff .assignee-vbar-fill {
  background: linear-gradient(180deg, #fca5a5, #ef4444) !important;
}
.assignee-vbar-item { position: relative; }

.toolbar-preset-btn {
  padding: 6px 12px;
  border: 1px solid #c4b5fd;
  border-radius: 8px;
  background: #f5f3ff;
  color: #5b4fd6;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.toolbar-preset-btn:hover { background: #ede9fe; }

.exec-action-trigger {
  font-size: 0.68rem;
  color: var(--muted);
  max-width: 9em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.meta-pill--frq { background: #f0fdf4; color: #166534; }
.list-row--stalled { background: #fffbeb; }

.list-col-eff--low,
.exec-action-eff--low { color: #dc2626; font-weight: 700; }

.assignee-vbar-l2 {
  display: block;
  font-size: 0.58rem;
  font-weight: 700;
  color: #5b4fd6;
  margin-bottom: 2px;
}

.close-prob-bar-row {
  display: grid;
  grid-template-columns: 5.5em 1fr 3.5em;
  gap: 8px;
  align-items: center;
  margin-bottom: 6px;
  font-size: 0.78rem;
}
.close-prob-bar-track {
  height: 8px;
  background: #e2e8f0;
  border-radius: 4px;
  overflow: hidden;
}
.close-prob-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #5b4fd6, #7c3aed);
  border-radius: 4px;
}

.meta-pill--frq { background: #f0fdf4; color: #166534; }

.overview-metrics-help {
  margin-bottom: 12px;
  font-size: 0.78rem;
  color: var(--muted);
}
.overview-metrics-help summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--text);
  padding: 6px 0;
}
.overview-metrics-help-body {
  padding: 8px 0 4px;
  line-height: 1.55;
}
.overview-metrics-help-body p { margin: 0 0 8px; }

.exec-action-table--churn { font-size: 0.72rem; }
.exec-action-stage { white-space: nowrap; }

.hidden { display: none !important; }

/* ========== 重点客户画像（聊天 200+ 条） ========== */
.vip-customer-strip {
  margin: 12px 0 16px;
}

.vip-customer-strip-inner {
  background: linear-gradient(135deg, #fff9eb 0%, #fff 38%, #f5f3ff 100%);
  border: 2px solid #c4b5fd;
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 28px rgba(91, 79, 214, 0.14);
  padding: 14px 16px 12px;
  position: relative;
  overflow: hidden;
}

.vip-customer-strip--collapsed .vip-customer-strip-inner {
  padding: 8px 14px;
  box-shadow: 0 2px 10px rgba(91, 79, 214, 0.08);
}

.vip-customer-strip--collapsed .vip-customer-strip-head {
  margin-bottom: 0;
}

.vip-customer-strip--collapsed .vip-customer-strip-icon {
  width: 28px;
  height: 28px;
  font-size: 0.9rem;
  border-radius: 8px;
}

.vip-customer-strip--collapsed .vip-customer-strip-title {
  font-size: 0.92rem;
}

.vip-customer-strip--collapsed .vip-customer-strip-sub {
  margin-top: 2px;
  font-size: 0.72rem;
}

.vip-customer-strip-inner::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #f59e0b, #7c3aed, #5b4fd6);
}

.vip-customer-strip-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px 16px;
  margin-bottom: 12px;
}

.vip-customer-strip-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.vip-customer-strip-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border: 1px solid #c4b5fd;
  border-radius: 999px;
  background: #fff;
  color: #6d28d9;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}

.vip-customer-strip-toggle:hover {
  background: #f5f3ff;
  border-color: #7c3aed;
  transform: translateY(-1px);
}

.vip-customer-strip-toggle-chevron {
  display: inline-block;
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  transition: transform 0.15s ease;
}

.vip-customer-strip:not(.vip-customer-strip--collapsed) .vip-customer-strip-toggle-chevron {
  transform: rotate(180deg);
}

.vip-customer-strip-title-wrap {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.vip-customer-strip-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #7c3aed, #5b4fd6);
  color: #fef3c7;
  font-size: 1.1rem;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(91, 79, 214, 0.35);
  flex-shrink: 0;
}

.vip-customer-strip-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #4c1d95;
  letter-spacing: 0.02em;
}

.vip-customer-strip-sub {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.vip-customer-strip-sub strong {
  color: #7c3aed;
  font-weight: 800;
}

.vip-customer-strip-filter {
  padding: 8px 14px;
  border: 1px solid #7c3aed;
  border-radius: 999px;
  background: #7c3aed;
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, transform 0.12s;
}

.vip-customer-strip-filter:hover {
  background: #6d28d9;
  transform: translateY(-1px);
}

.vip-customer-strip-filter--active {
  background: #fff;
  color: #7c3aed;
  box-shadow: inset 0 0 0 2px #7c3aed;
}

.vip-customer-strip-filter--active:hover {
  background: #f5f3ff;
  color: #6d28d9;
}

.vip-customer-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.vip-customer-strip:not(.vip-customer-strip--collapsed) .vip-customer-scroll {
  max-height: 220px;
  overflow-y: auto;
}

.boss-cockpit-meta {
  margin: 4px 0 16px;
  font-size: 0.875rem;
  color: var(--text-muted, #64748b);
}

.boss-cockpit-meta strong {
  color: #5b4fd6;
}

.vip-customer-grid--page {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.vip-customer-grid--page .vip-customer-card {
  flex: none;
  min-width: 0;
}

.boss-cockpit--highvalue {
  padding-bottom: 8px;
}

.vip-customer-grid {
  display: flex;
  gap: 12px;
  min-width: min-content;
}

.vip-customer-card {
  flex: 0 0 min(340px, 88vw);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(124, 58, 237, 0.22);
  border-radius: 12px;
  box-shadow: 0 4px 14px rgba(91, 79, 214, 0.08);
  overflow: hidden;
}

.vip-customer-card-head {
  padding: 10px 12px 8px;
  background: linear-gradient(180deg, #faf5ff 0%, #fff 100%);
  border-bottom: 1px solid rgba(226, 232, 240, 0.9);
}

.vip-customer-card-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
}

.vip-customer-name {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--text);
  flex: 1;
  min-width: 0;
}

.vip-msg-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.vip-customer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--muted);
}

.vip-potential-pill {
  font-weight: 700;
}

.vip-customer-card-body {
  flex: 1;
  padding: 10px 12px;
  min-height: 120px;
}

.vip-profile-list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.76rem;
  line-height: 1.5;
}

.vip-profile-list li {
  margin-bottom: 6px;
  color: var(--text);
}

.vip-profile-list li:last-child {
  margin-bottom: 0;
}

.vip-profile-k {
  display: inline-block;
  min-width: 4.5em;
  margin-right: 4px;
  font-weight: 700;
  color: #6d28d9;
}

.vip-profile-empty {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
  font-style: italic;
}

.vip-profile-text {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text);
  white-space: pre-wrap;
}

.vip-customer-card-foot {
  display: flex;
  gap: 8px;
  padding: 8px 12px 10px;
  border-top: 1px solid rgba(226, 232, 240, 0.9);
  background: #fafafa;
}

.vip-customer-btn {
  flex: 1;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.vip-customer-btn:hover {
  background: #f8fafc;
  border-color: #93c5fd;
}

.vip-customer-btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.vip-customer-btn--primary:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff;
}

@media (min-width: 1200px) {
  .vip-customer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    min-width: 0;
  }

  .vip-customer-card {
    flex: unset;
  }

  .vip-customer-scroll {
    overflow-x: visible;
  }
}

.vip-inline-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  border: 1px solid #f59e0b;
  color: #92400e;
  font-size: 0.65rem;
  font-weight: 800;
  vertical-align: middle;
  white-space: nowrap;
}

.inquiry-card--vip {
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.35), var(--shadow-sm);
}

.list-row--vip .list-col-name-text {
  font-weight: 700;
}

/* ── Workspace sidebar + boss cockpit (2026-06-15) ── */

.workspace-sidebar {
  position: sticky;
  top: 0;
  align-self: flex-start;
  flex: 0 0 220px;
  width: 220px;
  min-height: 100vh;
  max-height: 100vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #1e1b4b 0%, #312e81 55%, #1e293b 100%);
  color: #e2e8f0;
  padding: 16px 0 24px;
  z-index: 40;
}

.sidebar-head {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 8px;
}

.sidebar-home-link {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  width: 100%;
  min-height: 36px;
  padding: 8px 10px;
  margin-top: 2px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.74rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.sidebar-home-link-icon {
  font-size: 0.82rem;
  line-height: 1;
  opacity: 0.85;
}

.sidebar-home-link:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.28);
  color: #fff;
}

.sidebar-brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 14px;
}

.sidebar-brand-icon {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  object-fit: contain;
  filter: drop-shadow(0 2px 10px rgba(56, 189, 248, 0.35));
}

.sidebar-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.sidebar-brand-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: #f8fafc;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.sidebar-slogan {
  font-size: 0.62rem;
  font-weight: 500;
  color: rgba(251, 191, 36, 0.88);
  letter-spacing: 0.06em;
  line-height: 1.25;
}

.sidebar-toggle {
  display: none;
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 1.1rem;
  cursor: pointer;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 8px;
}

.sidebar-group {
  margin-bottom: 8px;
}

.sidebar-group + .sidebar-group {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-group-title {
  padding: 8px 10px 6px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: none;
  color: rgba(248, 250, 252, 0.92);
  line-height: 1.35;
  white-space: nowrap;
}

.sidebar-group-title--link {
  display: block;
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-group-title--link:hover {
  color: #fff;
}

.sidebar-group-title--active {
  color: #fff;
  background: rgba(91, 79, 214, 0.35);
  border-radius: 8px;
}

.sidebar-group-note {
  padding: 0 10px 6px;
  font-size: 0.65rem;
  color: rgba(226, 232, 240, 0.45);
  line-height: 1.35;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 10px 8px 18px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: rgba(226, 232, 240, 0.88);
  font-size: 0.78rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.sidebar-nav-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.sidebar-nav-item--active {
  background: rgba(91, 79, 214, 0.55);
  color: #fff;
  font-weight: 600;
}

.sidebar-nav-icon {
  width: 1.1em;
  text-align: center;
  opacity: 0.85;
}

.workspace-main {
  flex: 1;
  min-width: 0;
  padding: 20px 24px 48px;
  overflow-y: auto;
}

/* 视口锁定：列表/聚焦/表格页一屏展示，条数由 JS 自适应 */
.app--workspace.workspace-has-viewport-fit {
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
}

.app--workspace.workspace-has-viewport-fit .workspace-sidebar {
  max-height: 100dvh;
}

.workspace-main--viewport-fit {
  height: 100dvh;
  max-height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 12px 20px 8px;
  box-sizing: border-box;
}

.workspace-main--viewport-fit > .workspace-topbar {
  flex-shrink: 0;
  margin-bottom: 10px;
}

.workspace-main--viewport-fit > .dash-panel,
.workspace-main--viewport-fit > .inquiry-section {
  flex-shrink: 0;
}

.workspace-main--viewport-fit .workspace-kpi-strip {
  flex-shrink: 0;
  position: relative;
  top: auto;
  margin-bottom: 8px;
  padding-bottom: 6px;
}

.workspace-main--viewport-fit .workspace-view {
  margin-bottom: 0;
  min-height: 0;
}

.workspace-main--viewport-fit .workspace-kpi-strip .boss-kpi-card {
  min-height: 54px;
  padding: 8px 12px 10px;
  gap: 4px;
}

.workspace-main--viewport-fit .workspace-kpi-strip .boss-kpi-card .boss-kpi-value {
  font-size: 1.25rem;
}

.workspace-main--viewport-fit .workspace-kpi-strip .boss-kpi-rows {
  gap: 8px;
}

.workspace-main--viewport-fit .workspace-kpi-strip .boss-kpi-row {
  gap: 8px;
}

.workspace-main--viewport-fit.workspace-main--list-fit > .inquiry-section {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: 0;
}

.workspace-main--viewport-fit.workspace-main--list-fit .inquiry-section-head {
  flex-shrink: 0;
  margin-bottom: 8px;
}

.workspace-main--viewport-fit.workspace-main--list-fit #inquiryList {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.workspace-main--viewport-fit.workspace-main--focus-fit > .workspace-kpi-strip:not(.hidden),
.workspace-main--viewport-fit.workspace-main--overview-fit > .workspace-kpi-strip:not(.hidden),
.workspace-main--viewport-fit.workspace-main--table-fit > .workspace-kpi-strip:not(.hidden) {
  flex-shrink: 0;
}

.workspace-main--viewport-fit.workspace-main--focus-fit > .workspace-view,
.workspace-main--viewport-fit.workspace-main--overview-fit > .workspace-view,
.workspace-main--viewport-fit.workspace-main--table-fit > .workspace-view {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin-bottom: 0;
}

.workspace-main--viewport-fit.workspace-main--list-fit > .workspace-view {
  flex-shrink: 0;
}

/* 总览 · 四图表一屏：两行均分高度，同行卡片等高，内容区垂直居中 */
.workspace-main--viewport-fit .boss-cockpit--overview {
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  gap: 8px;
}

.workspace-main--viewport-fit .boss-cockpit--overview .overview-charts-row {
  flex: 1 1 0;
  min-height: 0;
  gap: 8px;
  margin-top: 0;
  align-items: stretch;
}

.workspace-main--viewport-fit .boss-cockpit--overview .chart-panel--overview-compact {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  padding: 8px 10px;
  box-sizing: border-box;
}

.workspace-main--viewport-fit .boss-cockpit--overview .chart-panel-title {
  flex-shrink: 0;
  margin-bottom: 4px;
  font-size: 0.8rem;
}

.workspace-main--viewport-fit .boss-cockpit--overview .country-bar-chart {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
}

.workspace-main--viewport-fit .boss-cockpit--overview .chart-panel--country-bar .country-bar-chart {
  min-height: 0;
}

.workspace-main--viewport-fit .boss-cockpit--overview .overview-charts-row--grades .country-bar-row {
  padding: 3px 4px;
}

.workspace-main--viewport-fit .boss-cockpit--overview .country-bar-row {
  padding: 2px 4px;
}

.workspace-main--viewport-fit .boss-cockpit--overview .pie-chart-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 12px;
  overflow: hidden;
}

.workspace-main--viewport-fit .boss-cockpit--overview .chart-panel--inquiry-pie .pie-chart-body {
  min-height: 0;
}

.workspace-main--viewport-fit .boss-cockpit--overview .pie-wrap {
  width: min(96px, 14vh);
  height: min(96px, 14vh);
  flex-shrink: 0;
}

.workspace-main--viewport-fit .boss-cockpit--overview .chart-panel--inquiry-pie .pie-wrap {
  width: min(110px, 16vh);
  height: min(110px, 16vh);
}

.workspace-main--viewport-fit .boss-cockpit--overview .pie-legend {
  flex: 0 1 auto;
  min-width: 0;
  max-height: 100%;
  overflow: hidden;
  gap: 4px;
  justify-content: center;
}

.workspace-main--viewport-fit .boss-cockpit {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-main--viewport-fit .boss-cockpit-title {
  flex-shrink: 0;
}

.workspace-main--viewport-fit .boss-cockpit--focused {
  height: 100%;
}

.workspace-main--viewport-fit .boss-focus-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-main--viewport-fit .boss-focus-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-main--viewport-fit .boss-focus-list__head,
.workspace-main--viewport-fit .boss-focus-list__toolbar,
.workspace-main--viewport-fit .boss-focus-list__meta,
.workspace-main--viewport-fit .boss-focus-list__foot,
.workspace-main--viewport-fit .boss-focus-pager,
.workspace-main--viewport-fit .churn-risk-pager {
  flex-shrink: 0;
}

.workspace-main--viewport-fit .boss-focus-list__body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.workspace-main--viewport-fit .boss-panel {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.workspace-main--viewport-fit .boss-churn-head {
  flex-shrink: 0;
}

.workspace-main--viewport-fit .exec-action-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  margin-top: 0;
}

/* 今日必做：锁定一屏，仅当前阶段表格区可填充，靠分页而非整页滚动 */
.workspace-main--viewport-fit .boss-cockpit--must-do {
  height: 100%;
  min-height: 0;
  overflow: hidden;
  gap: 10px;
}

.workspace-main--viewport-fit .boss-cockpit--must-do > *:not(.must-do-tab-panels) {
  flex-shrink: 0;
}

.workspace-main--viewport-fit .boss-cockpit--must-do .must-do-tab-panels {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.workspace-main--viewport-fit .boss-cockpit--must-do .must-do-group--stage {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.workspace-main--viewport-fit .boss-cockpit--must-do .must-do-pager {
  flex-shrink: 0;
  margin-top: 8px;
}

.workspace-main--viewport-fit .inquiry-list-pager {
  flex-shrink: 0;
}

.workspace-topbar {
  grid-template-columns: 1fr auto;
  margin-bottom: 16px;
}

.period-toggle {
  display: inline-flex;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  flex-shrink: 0;
}

.period-toggle-btn {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 0.8125rem;
  line-height: 1.4;
  padding: 0.2rem 0.65rem;
  border-radius: 6px;
  cursor: pointer;
}

.period-toggle-btn--active {
  background: var(--accent-soft, #ebe9ff);
  color: var(--accent, #5b4fd6);
  font-weight: 600;
}

.period-toggle-btn:focus-visible {
  outline: 2px solid var(--accent, #5b4fd6);
  outline-offset: 1px;
}

.topbar-context {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
}

.topbar-context .subtitle {
  margin: 0;
}

.topbar-context .date-select {
  margin-top: 0;
  flex-shrink: 0;
  max-width: min(420px, 100%);
}

.topbar-context .date-select--disabled,
.topbar-context .date-select:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.workspace-view {
  margin-bottom: 20px;
}

.workspace-panel-head {
  margin-bottom: 12px;
}

.workspace-view-note {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted, #64748b);
}

.workspace-placeholder {
  padding: 32px 24px;
  background: var(--surface, #fff);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.workspace-placeholder p {
  margin: 12px 0 0;
  color: var(--text-muted, #64748b);
}

.boss-cockpit {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.boss-cockpit-title {
  margin: 0 0 4px;
  font-size: 1.25rem;
  font-weight: 800;
  color: #312e81;
}

.boss-cockpit-title-sub {
  margin-left: 8px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted, #64748b);
}

/* 今日必做：日期筛选器内嵌在标题行 */
.boss-cockpit-title--must-do {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.boss-cockpit-title--must-do .must-do-head-date {
  display: inline-flex;
}

.boss-cockpit-title--must-do .must-do-date-select {
  min-width: 0;
  padding: 4px 26px 4px 10px;
  font-size: 0.85rem;
  font-weight: 600;
  color: #312e81;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  cursor: pointer;
}

.boss-cockpit-title--must-do .boss-cockpit-title-sub {
  margin-left: 0;
}

.boss-cockpit .boss-kpi-grid {
  margin-bottom: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.boss-cockpit .overview-charts-row {
  margin-top: 4px;
}

.boss-kpi-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: 10px;
}

.boss-kpi-grid--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.workspace-kpi-strip {
  margin-bottom: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
  background: linear-gradient(180deg, var(--bg, #eef2f7) 70%, rgba(238, 242, 247, 0));
  padding-top: 4px;
  padding-bottom: 10px;
}

/* KPI 两行布局 — 白底卡片 + 灰顶栏 + 选中高亮 */

.workspace-kpi-strip .boss-kpi-rows {
  gap: 10px;
}

.workspace-kpi-strip .boss-kpi-row {
  gap: 10px;
}

.workspace-kpi-strip .boss-kpi-card {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 6px;
  min-height: 68px;
  padding: 12px 14px 14px;
  background: #fff;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  overflow: hidden;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.workspace-kpi-strip .boss-kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: #cbd5e1;
  border-radius: 10px 10px 0 0;
}

.workspace-kpi-strip .boss-kpi-card .boss-kpi-label {
  flex: none;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted, #64748b);
  line-height: 1.3;
}

.workspace-kpi-strip .boss-kpi-card .boss-kpi-value {
  flex-shrink: 0;
  font-size: 1.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--text, #0f172a);
  line-height: 1;
}

.workspace-kpi-strip .boss-kpi-card:hover:not(.boss-kpi-card--active) {
  border-color: #c7d2fe;
  background: #fff;
  box-shadow: 0 6px 16px rgba(91, 79, 214, 0.08);
  transform: translateY(-1px);
}

.workspace-kpi-strip .boss-kpi-sub {
  display: none;
}

.boss-kpi-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.boss-kpi-row {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.boss-kpi-row--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workspace-kpi-strip--pinned {
  z-index: 8;
  background: linear-gradient(180deg, var(--bg, #eef2f7) 85%, rgba(238, 242, 247, 0.92));
  box-shadow: 0 10px 24px -12px rgba(15, 23, 42, 0.18);
  padding-top: 6px;
  padding-bottom: 12px;
}

.boss-cockpit--focused {
  gap: 0;
}

.boss-focus-body {
  min-width: 0;
  margin-top: 4px;
}

.boss-focus-body .boss-focus-list {
  box-shadow: 0 2px 10px rgba(91, 79, 214, 0.06);
}

/* 老板 KPI 聚焦 · 统一列表 */
.boss-focus-list {
  background: #f6f7fc;
  border: 1px solid #e0e4ef;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.boss-focus-list--empty {
  padding: 24px 16px;
  background: #fff;
}

.boss-focus-list__meta {
  padding: 8px 12px 0;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  background: #f6f7fc;
}

.boss-focus-list .churn-assignee-filter {
  display: block;
  margin: 8px 12px 0;
  max-width: 200px;
  font-size: 0.78rem;
}

.boss-focus-list__toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  padding: 8px 12px 0;
  background: #f6f7fc;
}

.boss-focus-filter-select {
  min-width: 140px;
  max-width: 200px;
  padding: 4px 8px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 6px;
  font-size: 0.78rem;
  background: var(--surface, #fff);
  color: var(--text, #334155);
}

.boss-focus-list__cell--sortable {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: #334155;
  cursor: pointer;
  text-align: left;
}

.boss-focus-list__cell--sortable:hover {
  color: var(--accent, #5b4fd6);
}

.boss-focus-list__cell--sorted {
  color: var(--accent, #5b4fd6);
}

.boss-focus-list__sort-arrows {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  line-height: 0.82;
  font-size: 0.65em;
  flex-shrink: 0;
  gap: 1px;
}

.boss-focus-list__sort-dir {
  color: var(--muted, #94a3b8);
}

.boss-focus-list__sort-dir--active {
  color: var(--accent, #5b4fd6);
}

.boss-focus-list__cell--sortable:hover .boss-focus-list__sort-dir {
  color: var(--accent, #5b4fd6);
  opacity: 0.75;
}

.boss-focus-list__cell--sortable:hover .boss-focus-list__sort-dir--active,
.boss-focus-list__cell--sorted .boss-focus-list__sort-dir--active {
  opacity: 1;
}

.boss-focus-list__head,
.boss-focus-list__row {
  display: grid;
  grid-template-columns: var(--bf-grid);
  gap: 8px;
  align-items: center;
  padding: 5px 12px;
}

.boss-focus-list__head {
  background: linear-gradient(180deg, #eceeff 0%, #e4e8f8 100%);
  font-size: 0.72rem;
  font-weight: 600;
  color: #334155;
  letter-spacing: 0.01em;
  border-bottom: 1px solid #d5dbeb;
  min-height: 32px;
  padding: 7px 12px;
}

.boss-focus-list__body {
  background: #fff;
}

.boss-focus-list__row {
  font-size: 0.78rem;
  background: #fff;
  border-bottom: 1px solid #eef1f6;
  cursor: pointer;
  min-height: 34px;
  transition: background 0.12s;
}

.boss-focus-list__row:nth-child(even) {
  background: #fafbff;
}

.boss-focus-list__row:last-child {
  border-bottom: none;
}

.boss-focus-list__row:hover {
  background: #eef1ff;
}

.boss-focus-list__row:focus-visible {
  outline: 2px solid var(--accent, #5b4fd6);
  outline-offset: -2px;
  background: #eef1ff;
}

.boss-focus-list__cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  line-height: 1.25;
}

.boss-focus-list__cell--head {
  overflow: visible;
  white-space: nowrap;
  color: inherit;
}

.boss-focus-list__name {
  font-weight: 700;
  color: var(--accent, #5b4fd6);
}

.boss-focus-list__row:hover .boss-focus-list__name {
  text-decoration: underline;
}

.boss-focus-list__row--churn-l1 {
  background: #fff8f8;
}

.boss-focus-list__row--churn-l1:nth-child(even) {
  background: #fff5f5;
}

.boss-focus-list__row--churn-l2 {
  background: #fffbf3;
}

.boss-focus-list__row--churn-l2:nth-child(even) {
  background: #fff9ed;
}

.boss-focus-list__row--churn-l1:hover,
.boss-focus-list__row--churn-l2:hover {
  background: #fef2f2;
}

.boss-focus-list__foot {
  margin: 0;
  padding: 8px 12px;
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  border-top: 1px solid #e0e4ef;
  background: #f6f7fc;
}

.boss-focus-list .churn-risk-pager,
.boss-focus-list .boss-focus-pager {
  padding: 8px 12px;
  border-top: 1px solid #e0e4ef;
  background: #f6f7fc;
}

.boss-ov-default-hint {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted, #64748b);
  text-align: center;
  padding: 8px 0 4px;
}

.boss-kpi-card {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}

.boss-kpi-card--active {
  border-color: var(--accent, #5b4fd6);
  background: #f5f3ff;
  box-shadow: var(--shadow-md);
}

.boss-kpi-card--static {
  cursor: default;
}

.boss-kpi-card:hover:not(.boss-kpi-card--static) {
  border-color: var(--accent, #5b4fd6);
  box-shadow: var(--shadow-md);
}

.boss-kpi-card--alert {
  border-color: #fca5a5;
  background: #fef2f2;
}

/* 严重度色阶（第 2 行：实时预警→需主管介入→主管关注→正常）+ 阶段结果 */
.boss-kpi-card--alert,
.boss-kpi-card--warn,
.boss-kpi-card--attention,
.boss-kpi-card--ok,
.boss-kpi-card--done {
  border-left-width: 4px;
}

.boss-kpi-card--alert {
  border-left-color: #ef4444;
}
.boss-kpi-card--alert .boss-kpi-value {
  color: #b91c1c;
}

.boss-kpi-card--warn {
  border-left-color: #f97316;
  background: #fff7ed;
  border-color: #fed7aa;
}
.boss-kpi-card--warn .boss-kpi-value {
  color: #c2410c;
}

.boss-kpi-card--attention {
  border-left-color: #f59e0b;
  background: #fffbeb;
  border-color: #fde68a;
}
.boss-kpi-card--attention .boss-kpi-value {
  color: #b45309;
}

.boss-kpi-card--ok {
  border-left-color: #10b981;
}

.boss-kpi-card--done {
  border-left-color: #22c55e;
  background: #f0fdf4;
  border-color: #bbf7d0;
}
.boss-kpi-card--done .boss-kpi-value {
  color: #15803d;
}

/* 重点卡（老板重点盯：高价值客户 / 需主管介入 / 实时预警）：加粗强调 */
.boss-kpi-card--emphasis {
  box-shadow: 0 0 0 1px rgba(91, 79, 214, 0.12), var(--shadow-md);
}
.boss-kpi-card--emphasis .boss-kpi-label {
  font-weight: 700;
  color: #312e81;
}
.boss-kpi-card--emphasis .boss-kpi-value {
  font-size: 1.5rem;
}

/* 告警类有值才“点亮”（红/橙发光，吸引注意） */
.boss-kpi-card--hot.boss-kpi-card--alert {
  background: #fee2e2;
  box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.25), 0 6px 18px -8px rgba(239, 68, 68, 0.55);
}
.boss-kpi-card--hot.boss-kpi-card--warn {
  box-shadow: 0 0 0 1px rgba(249, 115, 22, 0.25), 0 6px 18px -8px rgba(249, 115, 22, 0.5);
}

/* KPI 条：统一灰顶栏 + 白底，选中后高亮 */
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--alert,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--warn,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--attention,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--ok,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--done,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--emphasis,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--hot {
  background: #fff;
  border-color: var(--border, #e2e8f0);
  border-left-width: 1px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--alert::before,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--warn::before,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--attention::before,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--ok::before,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--done::before,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--emphasis::before,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--hot::before {
  height: 3px;
  background: #cbd5e1;
  box-shadow: none;
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--alert .boss-kpi-value,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--warn .boss-kpi-value,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--attention .boss-kpi-value,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--done .boss-kpi-value,
.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--emphasis .boss-kpi-value {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text, #0f172a);
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--emphasis .boss-kpi-label {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted, #64748b);
}

.workspace-kpi-strip .boss-kpi-card:focus-visible {
  outline: 2px solid var(--accent, #5b4fd6);
  outline-offset: 2px;
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--active {
  border: 1.5px solid var(--accent, #5b4fd6);
  padding: 11.5px 13.5px 13.5px;
  background: linear-gradient(165deg, #f5f3ff 0%, #fff 55%);
  box-shadow: 0 8px 22px rgba(91, 79, 214, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.8);
  transform: translateY(-1px);
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--active::before {
  height: 4px;
  background: linear-gradient(90deg, var(--accent, #5b4fd6), #818cf8);
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--active::after {
  content: "";
  position: absolute;
  top: 10px;
  right: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #5b4fd6);
  box-shadow: 0 0 0 3px rgba(91, 79, 214, 0.18);
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--active .boss-kpi-label {
  color: var(--accent, #5b4fd6);
  font-weight: 600;
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--active .boss-kpi-value {
  color: #312e81;
  font-weight: 800;
}

.workspace-kpi-strip .boss-kpi-card.boss-kpi-card--active:hover {
  transform: translateY(-1px);
}

/* 总览内联内容区块（懒加载 + 折叠 + 锚点） */
.boss-ov-sections {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

.boss-ov-sections-hint {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
}

.boss-ov-section {
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  scroll-margin-top: 220px;
}

.boss-ov-section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.boss-ov-section-head:hover {
  background: #f8fafc;
}

.boss-ov-section-caret {
  color: var(--text-muted, #64748b);
  transition: transform 0.15s;
  flex-shrink: 0;
}

.boss-ov-section.is-open .boss-ov-section-caret {
  transform: rotate(90deg);
}

.boss-ov-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: #312e81;
}

.boss-ov-section-sub {
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
}

.boss-ov-section-body {
  padding: 0 16px 16px;
}

.boss-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted, #64748b);
}

.boss-kpi-value {
  font-size: 1.35rem;
  font-weight: 800;
  color: #312e81;
  line-height: 1.1;
}

.boss-kpi-sub {
  font-size: 0.62rem;
  color: var(--text-muted, #64748b);
  line-height: 1.25;
}

.boss-kpi-card--inquiry {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 0;
  cursor: default;
}

.boss-kpi-card--inquiry:hover {
  border-color: var(--border, #e2e8f0);
  box-shadow: var(--shadow-sm);
}

.boss-kpi-card-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 100%;
  padding: 10px 12px 0;
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.boss-kpi-card-main:hover .boss-kpi-value {
  color: var(--accent, #5b4fd6);
}

.boss-kpi-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0 10px 8px;
}

.boss-kpi-seg {
  border: 1px solid transparent;
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 0.6rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.boss-kpi-seg--new {
  background: #dbeafe;
  color: #1e40af;
}

.boss-kpi-seg--returning {
  background: #ede9fe;
  color: #5b4fd6;
}

.boss-kpi-seg:hover {
  box-shadow: 0 0 0 1px rgba(91, 79, 214, 0.25);
}

.boss-kpi-seg--active {
  border-color: var(--accent, #5b4fd6);
  box-shadow: 0 0 0 1px var(--accent, #5b4fd6);
}

.boss-kpi-seg:focus-visible {
  outline: 2px solid var(--accent, #5b4fd6);
  outline-offset: 1px;
}

.boss-panel {
  padding: 16px 18px;
  background: var(--surface, #fff);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.boss-panel-title {
  margin: 0 0 12px;
  font-size: 1rem;
  font-weight: 700;
  color: #1e293b;
}

.boss-churn-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.boss-churn-head .boss-panel-title {
  margin: 0;
  flex: 1 1 auto;
  min-width: 0;
}

.churn-assignee-filter {
  flex: 0 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 0.8rem;
  max-width: 100%;
}

.boss-focus-rank {
  font-weight: 800;
  color: var(--accent, #5b4fd6);
}

.boss-focus-product {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.boss-focus-pager {
  margin-top: 12px;
}

.boss-funnel-panel {
  flex: 1;
  min-width: 0;
}

.boss-funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.boss-funnel-row {
  display: grid;
  grid-template-columns: 88px 1fr 72px;
  align-items: center;
  gap: 10px;
  font-size: 0.78rem;
}

.boss-funnel-label {
  color: var(--text-muted, #64748b);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.boss-funnel-bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}

.boss-funnel-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5b4fd6, #7c3aed);
  min-width: 2px;
}

.boss-funnel-meta {
  text-align: right;
  font-weight: 600;
  color: #334155;
}

.boss-ai-reminders {
  padding: 16px 18px;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  border-radius: 12px;
  border: 1px solid #c7d2fe;
}

.boss-ai-reminders-list {
  margin: 0;
  padding-left: 1.2em;
  color: #334155;
  font-size: 0.88rem;
  line-height: 1.55;
}

.home-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.home-quick-link {
  padding: 10px 16px;
  border: 1px solid var(--accent, #5b4fd6);
  border-radius: 999px;
  background: var(--accent-soft, #ebe9ff);
  color: var(--accent, #5b4fd6);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.home-quick-link:hover {
  background: var(--accent, #5b4fd6);
  color: #fff;
}

@media (max-width: 1100px) {
  .boss-kpi-grid {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .boss-cockpit .boss-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow-x: visible;
  }

  .boss-kpi-grid--compact {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 900px) {
  .app--workspace {
    flex-direction: column;
  }

  .workspace-sidebar {
    position: relative;
    width: 100%;
    flex: none;
    min-height: auto;
    max-height: none;
    padding-top: 12px;
  }

  .sidebar-toggle {
    position: absolute;
    top: 12px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .sidebar-brand-lockup {
    padding-right: 44px;
  }

  body.sidebar-collapsed .sidebar-nav {
    display: none;
  }

  .workspace-main {
    padding: 16px 14px 40px;
  }

  .boss-kpi-grid {
    grid-template-columns: repeat(8, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .boss-cockpit .boss-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow-x: visible;
  }

  .boss-kpi-grid--compact {
    grid-template-columns: repeat(4, minmax(120px, 1fr));
    overflow-x: auto;
  }

  .boss-kpi-row,
  .boss-kpi-row--three {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .boss-funnel-row {
    grid-template-columns: 72px 1fr 64px;
    font-size: 0.72rem;
  }
}

/* ── Mobile layout (≤640px / ≤520px) ── */

@media (max-width: 640px) {
  .workspace-main {
    padding: 12px 12px calc(32px + env(safe-area-inset-bottom));
  }

  .dash-panel {
    padding: 12px;
  }

  .dash-panel--filters {
    padding-top: calc(12px + env(safe-area-inset-top));
  }

  .toolbar-group--search,
  .toolbar input {
    width: 100%;
    min-width: 0;
    flex: 1 1 100%;
  }

  .toolbar-group--filters {
    width: 100%;
  }

  .toolbar-group--filters select,
  .toolbar-preset-btn {
    flex: 1 1 calc(50% - 5px);
    min-width: 0;
    font-size: 0.8125rem;
    padding: 8px 10px;
  }

  .kpi-seg {
    padding: 6px 10px;
    min-width: 48px;
  }

  .inquiry-section-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .inquiry-list.view-list {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .inquiry-list.view-list::before {
    content: "左右滑动查看全部列";
    display: block;
    padding: 6px 10px;
    font-size: 0.72rem;
    color: var(--muted);
    background: var(--surface2);
    border-bottom: 1px solid var(--border);
  }

  .list-table-inner {
    min-width: 960px;
  }

  .inquiry-card {
    min-height: auto;
    max-height: none;
    height: auto;
  }

  .topbar-welcome {
    font-size: 0.85rem;
    max-width: 100%;
    white-space: normal;
  }

  .exec-action-table-wrap {
    -webkit-overflow-scrolling: touch;
  }
}

@media (max-width: 520px) {
  .boss-kpi-grid,
  .boss-kpi-grid--compact {
    grid-template-columns: 1fr;
  }
}

/* 普通成员：仅本人询盘列表 */
body.app--member #assigneeFilter,
body.app--member #mustSeePresetBtn,
body.app--member #supervisorLevelFilter {
  display: none;
}

/* ===================== 业务员工作台 me/coach ===================== */
.coach-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.coach-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.coach-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.coach-subtitle {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.coach-subtitle .grade-s { color: #7c3aed; font-weight: 700; }
.coach-subtitle .grade-a { color: var(--green); font-weight: 700; }
.coach-subtitle .grade-b { color: var(--blue); font-weight: 700; }
.coach-subtitle .grade-c { color: var(--amber); font-weight: 700; }
.coach-subtitle .grade-d { color: var(--red); font-weight: 700; }

.coach-switcher {
  font-size: 0.85rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-switcher-select {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}

.coach-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  gap: 14px;
  align-items: stretch;
}

.coach-card--tasks {
  grid-column: 1;
  grid-row: 1;
}

.coach-card--diagnosis {
  grid-column: 2;
  grid-row: 1;
}

.coach-card--score {
  grid-column: 1;
  grid-row: 2;
}

.coach-card--advice {
  grid-column: 2;
  grid-row: 2;
}

.coach-card--tasks,
.coach-card--diagnosis {
  --coach-list-row-h: 114px;
  min-height: 0;
  max-height: none;
  height: auto;
}

.coach-card--tasks .coach-card-body,
.coach-card--diagnosis .coach-card-body {
  flex: 0 1 auto;
  min-height: 0;
  overflow: hidden;
}

.coach-card--tasks .coach-list,
.coach-card--diagnosis .coach-list {
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: hidden;
}

.coach-card--tasks .coach-row,
.coach-card--diagnosis .coach-row {
  flex: 0 0 var(--coach-list-row-h);
  height: var(--coach-list-row-h);
  min-height: 0;
  max-height: var(--coach-list-row-h);
  overflow: hidden;
  box-sizing: border-box;
  align-items: flex-start;
  padding: 6px 10px;
  gap: 8px;
}

.coach-card--tasks .coach-row-main,
.coach-card--diagnosis .coach-row-main {
  flex: 1 1 auto;
  min-height: 0;
  max-height: 100%;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.coach-card--tasks .coach-row-head {
  flex: 0 0 auto;
  max-height: 1.35em;
  overflow: hidden;
  line-height: 1.25;
}

.coach-card--tasks .coach-row-action {
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.35;
  font-size: 0.78rem;
}

.coach-card--diagnosis .coach-diag-buyer {
  flex: 0 0 auto;
  font-size: 0.82rem;
  line-height: 1.25;
}

.coach-card--diagnosis .coach-diag-note {
  flex: 1 1 auto;
  min-height: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  word-break: break-word;
  line-height: 1.35;
  font-size: 0.76rem;
}

.coach-card--diagnosis .coach-diag-note[data-list-tip] {
  cursor: help;
}

.coach-card--tasks .coach-pager--list,
.coach-card--diagnosis .coach-pager--list {
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
  margin-top: 6px;
  padding-top: 8px;
}

.coach-card--tasks .coach-card-title,
.coach-card--diagnosis .coach-card-title {
  margin-bottom: 8px;
}

.coach-card--tasks .coach-list-summary,
.coach-card--diagnosis .coach-list-summary {
  margin-bottom: 6px;
}

.coach-card--score,
.coach-card--advice {
  min-height: 280px;
}

@media (max-width: 1024px) {
  .coach-grid {
    grid-template-columns: 1fr;
  }

  .coach-card--tasks,
  .coach-card--diagnosis,
  .coach-card--score,
  .coach-card--advice {
    grid-column: 1;
    grid-row: auto;
    min-height: 0;
    max-height: none;
  }

  .coach-card--tasks,
  .coach-card--diagnosis {
    min-height: 0;
    max-height: none;
  }
}

/* 卡片正文：列表/建议区独立滚动，不与底栏重叠 */
.coach-card-body {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}

/* 列表汇总条 + 列表行 */
.coach-list-summary {
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 8px;
  flex: 0 0 auto;
}

.coach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.coach-list-scroll {
  flex: 1 1 auto;
  min-height: 120px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.coach-list-scroll::-webkit-scrollbar {
  width: 6px;
}

.coach-list-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.coach-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  background: var(--surface2);
}

.coach-row[role="button"],
.coach-row-body[role="button"] {
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.coach-row[role="button"]:hover,
.coach-row[role="button"]:focus-visible,
.coach-row-body[role="button"]:hover,
.coach-row-body[role="button"]:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
  outline: none;
}

.coach-row--must { border-left-color: var(--red); }
.coach-row--push { border-left-color: var(--amber); }
.coach-row--normal { border-left-color: #cbd5e1; }
.coach-row--diag-lost { border-left-color: var(--red); }
.coach-row--diag-pending { border-left-color: var(--amber); }
.coach-row--diag-low { border-left-color: #64748b; }
.coach-row--diag-good { border-left-color: var(--green); }

.coach-row-tier {
  font-size: 0.9rem;
  line-height: 1.4;
  flex: 0 0 auto;
}

.coach-row-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  flex: 1 1 auto;
}

.coach-row-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 8px;
}

.coach-row-buyer {
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text);
}

.coach-row-action {
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.45;
}

.coach-row-action strong { color: var(--accent); }

.coach-diag-badge {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
  align-self: flex-start;
  padding-top: 1px;
}

.coach-diag-badge--lost { color: var(--red); }
.coach-diag-badge--pending { color: #b45309; }
.coach-diag-badge--low { color: #475569; }
.coach-diag-badge--good { color: var(--green); }

.coach-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex: 0 0 auto;
  padding-top: 10px;
  margin-top: 0;
}

.coach-pager--advice,
.coach-pager--list {
  gap: 8px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
  padding-top: 12px;
  background: var(--surface);
}

.coach-pager-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 8px;
  padding: 5px 12px;
  font-size: 0.8rem;
  cursor: pointer;
}

.coach-pager-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.coach-pager-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.coach-pager-info {
  font-size: 0.78rem;
  color: var(--muted);
}

.coach-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

@media (max-width: 1024px) {
  .coach-card {
    min-height: 320px;
  }
}

.coach-card-title {
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 12px;
  flex: 0 0 auto;
}

.coach-empty {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 14px 4px;
  text-align: center;
}

/* 模块1 优先级列表 */
.coach-tier {
  margin-bottom: 12px;
}

.coach-tier-head {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-tier-count {
  display: inline-flex;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 700;
}

.coach-task {
  border: 1px solid var(--border);
  border-left: 3px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  background: var(--surface2);
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.coach-task:hover,
.coach-task:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-dim);
  outline: none;
}

.coach-tier--must .coach-task { border-left-color: var(--red); }
.coach-tier--push .coach-task { border-left-color: var(--amber); }
.coach-tier--normal .coach-task { border-left-color: #cbd5e1; }

.coach-task-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  margin-bottom: 6px;
}

.coach-task-buyer {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--text);
}

.coach-task-country {
  font-size: 0.78rem;
  color: var(--muted);
}

.coach-task-level {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-dim);
  border-radius: 4px;
  padding: 1px 6px;
}

.coach-stage {
  font-size: 0.7rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 2px 9px;
  background: #eef2f7;
  color: var(--muted);
}

.coach-stage--quoted { background: #e0e7ff; color: var(--blue); }
.coach-stage--closing { background: #fef3c7; color: #b45309; }
.coach-stage--clarifying { background: #ecfeff; color: #0e7490; }
.coach-stage--new { background: #f1f5f9; color: var(--muted); }
.coach-stage--closed { background: #dcfce7; color: var(--green); }
.coach-stage--lost { background: #fee2e2; color: var(--red); }

.coach-task-action {
  font-size: 0.83rem;
  color: var(--text);
  line-height: 1.5;
}

.coach-task-action strong {
  color: var(--accent);
}

.coach-task-bottleneck {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 4px;
  line-height: 1.5;
}

.coach-task-warns {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.coach-warn-chip {
  font-size: 0.68rem;
  font-weight: 600;
  border-radius: 4px;
  padding: 1px 6px;
  background: #fef2f2;
  color: var(--red);
  border: 1px solid #fecaca;
}

.coach-warn-chip--spec_missing {
  background: #fffbeb;
  color: #b45309;
  border-color: #fde68a;
}

/* 模块2 昨日诊断 */
.coach-diag {
  margin-bottom: 12px;
}

.coach-diag-head {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coach-diag-row {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--surface2);
  margin-bottom: 6px;
}

.coach-diag--lost .coach-diag-row { border-left: 3px solid var(--red); }
.coach-diag--pending .coach-diag-row { border-left: 3px solid var(--amber); }
.coach-diag--low .coach-diag-row { border-left: 3px solid #64748b; }
.coach-diag--good .coach-diag-row { border-left: 3px solid var(--green); }

.coach-diag-buyer {
  font-weight: 700;
  font-size: 0.83rem;
  color: var(--text);
}

.coach-diag-score {
  color: var(--red);
  font-weight: 700;
}

.coach-diag-note {
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.5;
}

.coach-diag-more {
  font-size: 0.76rem;
  color: var(--muted);
  padding-left: 4px;
}

/* 模块3 能力评分 */
.coach-score-body {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
}

.coach-radar {
  width: 168px;
  height: 168px;
  flex: 0 0 auto;
}

@media (max-width: 1280px) {
  .coach-score-body {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }
  .coach-radar {
    align-self: center;
  }
}

.coach-radar-grid {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.coach-radar-axis {
  stroke: var(--border);
  stroke-width: 1;
}

.coach-radar-value {
  fill: rgba(91, 79, 214, 0.22);
  stroke: var(--accent);
  stroke-width: 2;
}

.coach-radar-label {
  font-size: 10px;
  fill: var(--muted);
}

.coach-dims {
  flex: 1 1 220px;
  min-width: 200px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.coach-dim {
  display: grid;
  grid-template-columns: 64px 1fr 40px;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.coach-dim-label {
  color: var(--text);
  white-space: nowrap;
}

.coach-dim--weak .coach-dim-label {
  color: var(--red);
  font-weight: 700;
}

.coach-dim-track {
  height: 8px;
  border-radius: 999px;
  background: #eef2f7;
  overflow: hidden;
}

.coach-dim-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #7c6ee6, var(--accent));
}

.coach-dim--weak .coach-dim-fill {
  background: linear-gradient(90deg, #f87171, var(--red));
}

.coach-dim-val {
  text-align: right;
  color: var(--muted);
  font-weight: 600;
}

.coach-score-hint {
  margin: 10px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.coach-card--score .coach-score-hint {
  margin-top: auto;
  padding-top: 10px;
}

/* 模块4 AI 建议 */
.coach-advice-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.coach-advice-scroll::-webkit-scrollbar {
  width: 6px;
}

.coach-advice-scroll::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.coach-advice-summary {
  font-size: 0.86rem;
  color: var(--text);
  line-height: 1.6;
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--accent-dim);
}

.coach-advice-praise {
  font-size: 0.86rem;
  color: var(--green);
  font-weight: 600;
  margin-bottom: 12px;
}

.coach-advice-block {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  background: var(--surface2);
}

.coach-advice-h {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 4px;
}

.coach-advice-diag {
  font-size: 0.79rem;
  color: var(--muted);
  margin-bottom: 6px;
  line-height: 1.55;
}

.coach-advice-actions li {
  line-height: 1.55;
}

.coach-advice-actions {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 0.8rem;
  color: var(--text);
  line-height: 1.6;
}

.coach-advice-example {
  font-size: 0.78rem;
  color: var(--text);
  background: #f0f2ff;
  border-radius: 8px;
  padding: 8px 10px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.coach-advice-example-tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--accent);
  margin-right: 6px;
}

.modal-content.modal-content--customer-dossier {
  overflow-y: auto;
  padding: 14px 18px 16px;
}

.modal-shell--customer-dossier {
  max-width: 1120px;
  margin: 0 auto;
  padding: 4px 2px 12px;
}

/* —— 一客一档 · 客户档案（左信息 / 右画像）—— */
.dossier-modal-head {
  margin: 2px 2px 12px;
}

.dossier-modal-title {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text);
}

.dossier-columns {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.7fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

/* 左栏 */
.dossier-aside {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: linear-gradient(180deg, #f8f7ff 0%, #f0f2ff 100%);
  border: 1px solid #ebe9ff;
  border-radius: 14px;
  padding: 14px 14px 16px;
}

.dossier-identity {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e6e3fb;
}

.dossier-identity-level {
  align-self: flex-start;
}

.dossier-identity-name {
  margin: 2px 0 0;
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.25;
  word-break: break-word;
}

.dossier-identity-country {
  font-size: 0.78rem;
  color: var(--muted);
}

.dossier-info-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dossier-info-group-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #7c73c0;
  text-transform: uppercase;
}

.dossier-info-grid {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dossier-info-item {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 8px;
  align-items: baseline;
}

.dossier-info-item dt {
  margin: 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.dossier-info-item dd {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text);
  line-height: 1.4;
  word-break: break-word;
}

/* 右栏：8 项画像 2×4 网格 */
.dossier-portrait {
  min-width: 0;
}

.dossier-portrait-head {
  margin-bottom: 10px;
}

.dossier-portrait-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}

.dossier-portrait-sub {
  margin: 3px 0 0;
  font-size: 0.72rem;
  color: var(--muted);
}

.dossier-portrait-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.dossier-portrait-card {
  background: #fff;
  border: 1px solid #ebe9ff;
  border-radius: 12px;
  padding: 10px 12px;
  box-shadow: 0 3px 12px rgba(15, 23, 42, 0.05);
}

.dossier-portrait-card-head {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
}

.dossier-portrait-card-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #5b4fd6;
  background: #ebe9ff;
  border-radius: 6px;
}

.dossier-portrait-card-label {
  font-size: 0.74rem;
  font-weight: 700;
  color: #374151;
  line-height: 1.2;
}

.dossier-portrait-card-text {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.5;
  color: #4b5563;
  word-break: break-word;
}

.dossier-portrait-card--highlight {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #fff 0%, #f8f7ff 100%);
}

.dossier-portrait-card--highlight .dossier-portrait-card-icon {
  background: #5b4fd6;
  color: #fff;
}

.dossier-portrait-card--highlight .dossier-portrait-card-label {
  color: #5b4fd6;
}

.dossier-portrait-card--caution {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fff 0%, #fffbeb 100%);
}

.dossier-portrait-card--caution .dossier-portrait-card-icon {
  background: #f59e0b;
  color: #fff;
}

.dossier-portrait-card--caution .dossier-portrait-card-label {
  color: #b45309;
}

.dossier-portrait-card--empty {
  background: #fafafa;
  border-style: dashed;
  border-color: #e5e7eb;
}

.dossier-portrait-card--empty .dossier-portrait-card-icon {
  background: #f1f1f4;
  color: #9ca3af;
}

.dossier-portrait-card--empty .dossier-portrait-card-text {
  color: #9ca3af;
}

@media (max-width: 900px) {
  .dossier-columns {
    grid-template-columns: 1fr;
  }
  .dossier-portrait-grid {
    grid-template-columns: 1fr;
  }
}

/* —— 一客一档 · 研判星图 —— */
.customer-dossier-orbit-section {
  margin-bottom: 16px;
}

.customer-dossier-orbit-head {
  margin-bottom: 10px;
  text-align: center;
}

.customer-dossier-orbit-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
}

.customer-dossier-orbit-sub {
  margin: 4px 0 0;
  font-size: 0.74rem;
  color: var(--muted);
}

.profile-orbit-stage {
  position: relative;
  width: 100%;
  min-height: 620px;
  margin: 0 auto;
  background: linear-gradient(180deg, #f8f7ff 0%, #f0f2ff 48%, #eef2ff 100%);
  border: 1px solid #ebe9ff;
  border-radius: 16px;
  overflow: hidden;
}

.profile-orbit-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

.profile-orbit-line {
  stroke: #d4cffc;
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
  opacity: 0.85;
  transition: stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
}

.profile-orbit-line--highlight {
  stroke: #a89cf5;
}

.profile-orbit-line--caution {
  stroke: #fbbf24;
}

.profile-orbit-line--active {
  stroke: #5b4fd6;
  stroke-width: 2.5;
  stroke-dasharray: none;
  opacity: 1;
}

.profile-orbit-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 3;
  width: 220px;
  transform: translate(-50%, -50%);
  animation: profile-orbit-hub-in 0.45s ease-out both;
}

.profile-orbit-hub-ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 2px solid rgba(91, 79, 214, 0.22);
  box-shadow:
    0 0 0 8px rgba(91, 79, 214, 0.06),
    0 0 32px rgba(91, 79, 214, 0.12);
  animation: profile-orbit-ring-pulse 3s ease-in-out infinite;
}

.profile-orbit-hub-body {
  position: relative;
  background: #fff;
  border: 1px solid #ebe9ff;
  border-radius: 50%;
  width: 220px;
  height: 220px;
  padding: 38px 14px 14px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  text-align: center;
  box-shadow: 0 8px 28px rgba(91, 79, 214, 0.14);
  overflow: hidden;
}

.profile-orbit-hub-level {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  z-index: 1;
}

.profile-orbit-hub-name {
  margin: 0;
  flex-shrink: 0;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--text);
  max-width: 100%;
  word-break: break-word;
}

.profile-orbit-hub-score {
  margin-top: 2px;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f8f7ff;
  flex-shrink: 0;
}

.profile-orbit-hub-meta {
  margin-top: 0;
  font-size: 0.64rem;
  color: var(--muted);
  line-height: 1.3;
  flex-shrink: 0;
}

.profile-orbit-hub-facts {
  margin-top: 2px;
  font-size: 0.58rem;
  color: #9ca3af;
  line-height: 1.35;
  max-width: 100%;
  word-break: break-word;
  text-align: center;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.profile-orbit-nodes {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.profile-orbit-node {
  --orbit-radius: min(248px, 34vw);
  position: absolute;
  left: 50%;
  top: 50%;
  width: 172px;
  pointer-events: auto;
  transform: translate(-50%, -50%) rotate(var(--orbit-angle)) translateY(calc(-1 * var(--orbit-radius)))
    rotate(calc(-1 * var(--orbit-angle)));
  animation: profile-orbit-node-in 0.5s ease-out both;
  animation-delay: calc(0.04s * var(--orbit-index, 0));
}

.profile-orbit-node[data-orbit-index="0"] { --orbit-index: 0; animation-delay: 0.05s; }
.profile-orbit-node[data-orbit-index="1"] { --orbit-index: 1; animation-delay: 0.1s; }
.profile-orbit-node[data-orbit-index="2"] { --orbit-index: 2; animation-delay: 0.15s; }
.profile-orbit-node[data-orbit-index="3"] { --orbit-index: 3; animation-delay: 0.2s; }
.profile-orbit-node[data-orbit-index="4"] { --orbit-index: 4; animation-delay: 0.25s; }
.profile-orbit-node[data-orbit-index="5"] { --orbit-index: 5; animation-delay: 0.3s; }
.profile-orbit-node[data-orbit-index="6"] { --orbit-index: 6; animation-delay: 0.35s; }
.profile-orbit-node[data-orbit-index="7"] { --orbit-index: 7; animation-delay: 0.4s; }

.profile-orbit-node-inner {
  background: #fff;
  border: 1px solid #ebe9ff;
  border-radius: 12px;
  padding: 10px 11px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
  cursor: default;
}

.profile-orbit-node-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
}

.profile-orbit-node-icon {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  color: #5b4fd6;
  background: #ebe9ff;
  border-radius: 6px;
}

.profile-orbit-node-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: #374151;
  line-height: 1.2;
}

.profile-orbit-node-text {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.45;
  color: #4b5563;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: -webkit-line-clamp 0.15s ease;
}

.profile-orbit-node--highlight .profile-orbit-node-inner {
  border-color: #c4b5fd;
  background: linear-gradient(180deg, #fff 0%, #f8f7ff 100%);
}

.profile-orbit-node--highlight .profile-orbit-node-icon {
  background: #5b4fd6;
  color: #fff;
}

.profile-orbit-node--highlight .profile-orbit-node-label {
  color: #5b4fd6;
}

.profile-orbit-node--caution .profile-orbit-node-inner {
  border-color: #fcd34d;
  background: linear-gradient(180deg, #fff 0%, #fffbeb 100%);
}

.profile-orbit-node--caution .profile-orbit-node-icon {
  background: #fef3c7;
  color: #b45309;
}

.profile-orbit-node--caution .profile-orbit-node-label {
  color: #b45309;
}

.profile-orbit-node--caution .profile-orbit-node-text {
  color: #92400e;
}

.profile-orbit-node--empty .profile-orbit-node-text {
  color: #9ca3af;
  font-style: italic;
}

.profile-orbit-node:hover,
.profile-orbit-node:focus-within,
.profile-orbit-node--active {
  z-index: 10;
}

.profile-orbit-node:hover .profile-orbit-node-inner,
.profile-orbit-node:focus-within .profile-orbit-node-inner,
.profile-orbit-node--active .profile-orbit-node-inner {
  border-color: #5b4fd6;
  box-shadow: 0 8px 24px rgba(91, 79, 214, 0.18);
  transform: scale(1.03);
}

.profile-orbit-node:hover .profile-orbit-node-text,
.profile-orbit-node:focus-within .profile-orbit-node-text,
.profile-orbit-node--active .profile-orbit-node-text {
  -webkit-line-clamp: unset;
  overflow: visible;
}

.customer-dossier-orbit-section--legacy,
.customer-dossier-orbit-section--fallback {
  background: linear-gradient(180deg, #f8f7ff 0%, #f0f2ff 100%);
  border: 1px solid #ebe9ff;
  border-radius: 16px;
  padding: 20px 16px;
  text-align: center;
}

.customer-dossier-orbit-section--legacy .profile-orbit-hub,
.customer-dossier-orbit-section--fallback .profile-orbit-hub {
  position: static;
  transform: none;
  margin: 0 auto 14px;
}

.customer-dossier-legacy-text,
.customer-dossier-fallback-text {
  margin: 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text);
  text-align: left;
  background: #fff;
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid #ebe9ff;
}

.customer-dossier-fallback-text--muted {
  color: var(--muted);
  text-align: center;
}

.customer-dossier-details {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.customer-dossier-details-summary {
  padding: 10px 14px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  user-select: none;
  background: #f8fafc;
}

.customer-dossier-details-summary::-webkit-details-marker {
  display: none;
}

.customer-dossier-details-summary::before {
  content: "▸";
  display: inline-block;
  margin-right: 8px;
  color: #5b4fd6;
  transition: transform 0.15s ease;
}

.customer-dossier-details[open] .customer-dossier-details-summary::before {
  transform: rotate(90deg);
}

.customer-dossier-details-body {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
}

.customer-modal-foot--dossier {
  margin-top: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

@keyframes profile-orbit-hub-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.88);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

@keyframes profile-orbit-node-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) rotate(var(--orbit-angle)) translateY(calc(-1 * var(--orbit-radius) + 16px))
      rotate(calc(-1 * var(--orbit-angle)));
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) rotate(var(--orbit-angle)) translateY(calc(-1 * var(--orbit-radius)))
      rotate(calc(-1 * var(--orbit-angle)));
  }
}

@keyframes profile-orbit-ring-pulse {
  0%,
  100% {
    box-shadow:
      0 0 0 8px rgba(91, 79, 214, 0.06),
      0 0 32px rgba(91, 79, 214, 0.1);
  }
  50% {
    box-shadow:
      0 0 0 12px rgba(91, 79, 214, 0.04),
      0 0 40px rgba(91, 79, 214, 0.16);
  }
}

@media (max-width: 900px) {
  .profile-orbit-stage {
    min-height: auto;
    padding: 14px 12px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
  }

  .profile-orbit-lines {
    display: none;
  }

  .profile-orbit-hub {
    position: static;
    transform: none;
    width: 100%;
    animation: none;
  }

  .profile-orbit-hub-ring {
    display: none;
  }

  .profile-orbit-hub-body {
    width: 100%;
    height: auto;
    border-radius: 14px;
    padding: 14px 16px;
  }

  .profile-orbit-hub-name {
    -webkit-line-clamp: unset;
  }

  .profile-orbit-hub-facts {
    white-space: normal;
  }

  .profile-orbit-nodes {
    position: static;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    pointer-events: auto;
  }

  .profile-orbit-node {
    position: static;
    width: auto;
    transform: none;
    animation: none;
  }

  .profile-orbit-node-text {
    -webkit-line-clamp: unset;
    overflow: visible;
  }
}

@media (max-width: 520px) {
  .profile-orbit-nodes {
    grid-template-columns: 1fr;
  }
}

/* —— 一客一档（列表） —— */
.list-header--customers,
.list-row--customer {
  grid-template-columns:
    minmax(0, 1.05fr)
    minmax(0, 0.42fr)
    minmax(0, 0.28fr)
    minmax(0, 0.42fr)
    minmax(0, 0.32fr)
    minmax(0, 0.38fr)
    minmax(0, 0.55fr)
    minmax(0, 1.25fr);
}

.list-col-thread-count,
.list-col-last-contact {
  font-size: 0.76rem;
  color: var(--text);
}

.list-header-cell--sorted {
  color: var(--accent, #2563eb);
  font-weight: 600;
}

.list-header-sort {
  margin-left: 2px;
  font-size: 0.72rem;
  color: var(--muted);
  font-weight: 400;
}

.list-header-sort--active {
  color: var(--accent, #2563eb);
  font-weight: 700;
}

.list-col-profile-summary {
  font-size: 0.74rem;
  color: var(--muted);
  line-height: 1.35;
}

.customer-company-hint,
.customer-primary-msg-badge {
  font-size: 0.65rem;
  color: var(--muted);
  margin-left: 4px;
}

.modal-shell--customer {
  max-width: 920px;
  margin: 0 auto;
  padding: 8px 4px 16px;
}

.customer-modal-head {
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.customer-modal-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.customer-modal-name {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
}

.customer-modal-meta,
.customer-modal-facts {
  margin: 6px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
}

.customer-modal-section {
  margin-bottom: 18px;
}

.customer-modal-section-title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
}

.customer-modal-summary {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.6;
  color: var(--text);
  background: #f8fafc;
  border-radius: 8px;
  padding: 10px 12px;
}

.customer-crm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.customer-crm-item dt {
  font-size: 0.65rem;
  color: var(--muted);
  margin: 0 0 2px;
}

.customer-crm-item dd {
  margin: 0;
  font-size: 0.78rem;
  color: var(--text);
}

.customer-crm-empty {
  margin: 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.customer-thread-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.customer-thread-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.customer-thread-card--primary {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.12);
}

.customer-thread-card-head {
  padding: 10px 12px 6px;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}

.customer-thread-card-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
}

.customer-thread-primary-tag {
  font-size: 0.62rem;
  font-weight: 700;
  color: #1d4ed8;
  background: #dbeafe;
  border-radius: 999px;
  padding: 2px 8px;
}

.customer-thread-fid {
  font-weight: 600;
  color: var(--text);
}

.customer-thread-meta {
  color: var(--muted);
}

.customer-thread-scores {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--muted);
}

.customer-thread-body {
  padding: 10px 12px;
}

.customer-thread-profile {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--text);
}

.customer-thread-empty {
  margin: 0;
  font-size: 0.76rem;
  color: var(--muted);
}

.customer-thread-foot {
  padding: 8px 12px 10px;
  border-top: 1px solid var(--border);
}

.customer-modal-foot {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 8px;
}

/* 今日必做 Tab + 工作台必做操作 */
.boss-cockpit--must-do .must-do-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 10px;
  flex-wrap: wrap;
}

.must-do-tab-toggle {
  margin-left: auto;
}

.must-do-assignee-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}

.must-do-assignee-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.must-do-assignee-tab:hover {
  border-color: #93c5fd;
  color: var(--accent);
}

.must-do-assignee-tab--active {
  border-color: var(--accent);
  background: #eff6ff;
  color: var(--accent);
}

.must-do-assignee-tab-count {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.9;
}

/* 阶段漏斗堆叠条 */
.must-do-funnel {
  display: flex;
  align-items: stretch;
  gap: 3px;
  margin: 0 0 12px;
  width: 100%;
}

.must-do-funnel-seg {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 2px;
  flex: 1 1 0;
  min-width: 64px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  text-align: left;
  opacity: 0.62;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.15s;
}

.must-do-funnel-seg:first-child { border-top-left-radius: 12px; border-bottom-left-radius: 12px; }
.must-do-funnel-seg:last-child { border-top-right-radius: 12px; border-bottom-right-radius: 12px; }

.must-do-funnel-seg:hover { opacity: 0.82; }

.must-do-funnel-seg--active {
  opacity: 1;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.85);
}

.must-do-funnel-seg-label {
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.must-do-funnel-seg-count {
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.must-do-funnel-seg--closing { background: #f59e0b; }
.must-do-funnel-seg--quoted { background: #6366f1; }
.must-do-funnel-seg--clarifying { background: #06b6d4; }
.must-do-funnel-seg--new { background: #94a3b8; }
.must-do-funnel-seg--other { background: #cbd5e1; color: #334155; }

.must-do-pager {
  margin-top: 10px;
}

.must-do-tab-panels {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.must-do-tab-panel[hidden] {
  display: none !important;
}

.must-do-tab-panel-meta {
  margin: 0 0 12px;
}

.must-do-date-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--muted);
}

.must-do-date-select {
  min-width: 180px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.85rem;
}

.must-do-groups {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.must-do-section-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.must-do-section--ongoing .must-do-tab-panel-meta {
  color: #92400e;
}

.must-do-group--ongoing {
  border-color: rgba(180, 83, 9, 0.25);
}

.must-do-stale-tag {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #b45309;
  background: rgba(180, 83, 9, 0.12);
  vertical-align: middle;
}

.must-do-action-cell .must-do-stale-tag {
  display: inline-block;
  margin-bottom: 4px;
}

.must-do-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
}

.must-do-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}

.must-do-coach-link {
  margin-left: auto;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--accent);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.must-do-coach-link:hover {
  border-color: var(--accent);
  background: #f0f9ff;
}

.must-do-group-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.must-do-group-meta {
  font-size: 0.78rem;
  color: var(--muted);
  white-space: nowrap;
}

.must-do-action-cell {
  max-width: 320px;
  font-size: 0.82rem;
  line-height: 1.35;
}

/* 今日动作固定 2 行高，保证每行等高 → 自适应测量稳定、翻页不抖动 */
.must-do-action-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  height: calc(1.35em * 2);
}

.must-do-silent-chip {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--red);
  background: rgba(220, 38, 38, 0.10);
  white-space: nowrap;
  vertical-align: middle;
}

.must-do-assignee-cell {
  font-size: 0.8rem;
  color: var(--muted);
  white-space: nowrap;
}

.must-do-group--stage .must-do-group-title .coach-stage {
  font-size: 0.82rem;
  padding: 3px 12px;
}

.must-do-appeal-note {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--muted);
  line-height: 1.35;
}

.must-do-optimize-note {
  margin-top: 4px;
  font-size: 0.75rem;
  color: var(--purple);
  line-height: 1.35;
}

.app-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translateX(-50%) translateY(12px);
  background: #1f2430;
  color: #fff;
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 3000;
}

.app-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.app-toast--success {
  background: #16794c;
}

.app-toast--error {
  background: #b91c1c;
}

.coach-task-btn.is-active {
  background: var(--purple-light);
  border-color: var(--purple);
  color: var(--purple);
}

.must-do-status,
.coach-task-status {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  white-space: nowrap;
}

.must-do-status--pending,
.coach-task-status--pending {
  background: #eef2f7;
  color: #64748b;
}

.must-do-status--done,
.coach-task-status--done {
  background: #dcfce7;
  color: #166534;
}

.must-do-status--appeal,
.coach-task-status--appeal {
  background: #fef3c7;
  color: #92400e;
}

.must-do-status--drop-review,
.coach-task-status--drop-review {
  background: #dbeafe;
  color: #1e40af;
}

.must-do-drop-note {
  margin-top: 6px;
  font-size: 0.72rem;
  line-height: 1.45;
  color: var(--text-muted, #64748b);
}

.must-do-status-cell--drop-pending .coach-task-btn:disabled,
.must-do-status-cell--drop-pending .coach-must-do-check[disabled] {
  opacity: 0.45;
  cursor: not-allowed;
}

.coach-task-btn--drop {
  border-color: #fca5a5;
  color: #dc2626;
}

.coach-task-btn--drop:hover {
  background: #fef2f2;
  border-color: #dc2626;
}

.coach-task-btn--drop-applied {
  color: #94a3b8;
  border-color: #e2e8f0;
}

.coach-task-btn--approve {
  background: #059669;
  border-color: #059669;
  color: #fff;
}

.coach-task-btn--approve:hover {
  background: #047857;
  border-color: #047857;
}

.exec-action-row--drop-pending {
  background: #fafafe;
}

.drop-review-detail {
  margin-top: 4px;
  font-size: 0.72rem;
  color: var(--text-muted, #64748b);
  line-height: 1.45;
}

.sidebar-nav-badge {
  margin-left: auto;
  min-width: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: #dc2626;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}

.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-feedback-select {
  width: 100%;
  margin-top: 6px;
  padding: 8px 10px;
  border: 1px solid var(--border, #e5e7ef);
  border-radius: 8px;
  font-size: 0.88rem;
  background: #fff;
}

.coach-must-do-footer--drop-pending {
  gap: 6px;
}

.coach-must-do-footer-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.coach-card--tasks .coach-row--has-must-do-footer {
  flex: 0 0 auto;
  height: auto;
  max-height: none;
  min-height: var(--coach-list-row-h);
  flex-direction: column;
  align-items: stretch;
  padding: 6px 10px 0;
  gap: 0;
}

.coach-card--tasks .coach-row--has-must-do-footer .coach-row-body {
  flex: 0 1 auto;
  width: 100%;
}

.coach-card--tasks .coach-row--has-must-do-footer .coach-row-action {
  -webkit-line-clamp: 3;
}

.coach-must-do-footer {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px -2px 0;
  padding: 7px 8px 8px;
  border-top: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.85);
  border-radius: 0 0 8px 8px;
}

.coach-must-do-footer--readonly {
  justify-content: flex-end;
}

.coach-must-do-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  min-width: 0;
}

.coach-must-do-check--done {
  cursor: default;
}

.coach-must-do-check-box {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 2px solid #94a3b8;
  border-radius: 4px;
  background: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
  transition: border-color 0.15s, background 0.15s;
}

.coach-must-do-check:hover .coach-must-do-check-box {
  border-color: var(--accent);
}

.coach-must-do-check-box--checked {
  border-color: #16a34a;
  background: #dcfce7;
  color: #166534;
}

.coach-must-do-check-label {
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.3;
}

.coach-must-do-check--done .coach-must-do-check-label {
  color: #166534;
}

.coach-must-do-check--inline {
  padding: 2px 6px;
  gap: 4px;
}

.coach-must-do-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.coach-must-do-banner-text {
  font-size: 0.78rem;
  font-weight: 600;
  color: #991b1b;
}

.coach-must-do-banner-link {
  border: 1px solid #f87171;
  background: #fff;
  color: #b91c1c;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.coach-must-do-banner-link:hover {
  background: #fff1f2;
  border-color: #dc2626;
}

.must-do-status-col {
  min-width: 140px;
}

.must-do-status-cell {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.must-do-row-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.coach-task-btn--compact {
  flex: 0 0 auto;
  padding: 2px 8px;
  font-size: 0.68rem;
  font-weight: 600;
  border-color: #cbd5e1;
  color: #64748b;
  background: #fff;
}

.coach-task-btn--compact:hover {
  border-color: var(--accent);
  color: var(--accent);
  filter: none;
}

.coach-row-body {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border-radius: 8px;
}

.coach-task-btn {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.coach-task-btn--ghost {
  background: var(--surface);
  color: var(--accent);
}

.coach-task-btn:hover {
  filter: brightness(0.96);
}

.period-toggle.hidden,
.topbar-context .subtitle.hidden {
  display: none !important;
}

/* ============================ 周复盘视图 (boss/weekly) ============================ */
.weekly-review .wr-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.weekly-review .wr-week-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  font-size: 14px;
  min-width: 220px;
}
.wr-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 20px;
  margin-bottom: 16px;
}
.wr-section-title {
  margin: 0 0 14px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}

/* ① 记分牌 */
.wr-scoreboard {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}
@media (max-width: 720px) {
  .wr-scoreboard { grid-template-columns: repeat(2, 1fr); }
}
.wr-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
}
.wr-card-label { font-size: 13px; color: var(--muted); }
.wr-card-val { font-size: 26px; font-weight: 800; color: var(--text); margin: 6px 0 8px; letter-spacing: -0.5px; }
.wr-card-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.wr-card-note { font-size: 12px; color: var(--muted); }
.wr-wow { font-size: 13px; font-weight: 700; }
.wr-wow--good { color: #059669; }
.wr-wow--bad { color: #dc2626; }
.wr-wow--none { color: var(--muted); font-weight: 500; }

/* 一句话结论 */
.wr-conclusion {
  margin-top: 14px;
  background: var(--accent-dim);
  border-radius: 12px;
  padding: 14px 16px;
}
.wr-conclusion--pending { background: var(--surface2); }
.wr-conclusion-headline { font-size: 15px; font-weight: 700; color: var(--text); }
.wr-conclusion-list { margin: 10px 0 0; padding-left: 20px; color: var(--text); }
.wr-conclusion-list li { margin: 4px 0; font-size: 14px; }
.wr-conclusion-hint { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ② 漏斗 */
.wr-funnel { display: flex; flex-direction: column; gap: 10px; }
.wr-funnel-row { display: grid; grid-template-columns: 88px 1fr 56px; align-items: center; gap: 12px; }
.wr-funnel-label { font-size: 14px; color: var(--muted); text-align: right; }
.wr-funnel-track { background: var(--surface2); border-radius: 8px; height: 26px; overflow: hidden; }
.wr-funnel-bar {
  height: 100%;
  background: var(--accent);
  border-radius: 8px;
  min-width: 2px;
  transition: width 0.3s ease;
}
.wr-funnel-bar--bottleneck { background: #f59e0b; }
.wr-funnel-val { font-size: 14px; font-weight: 700; color: var(--text); }
.wr-funnel-bottleneck {
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 10px;
  padding: 10px 14px;
}

/* ③ 漏点 */
.wr-leaks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 900px) { .wr-leaks { grid-template-columns: 1fr; } }
.wr-leak { background: var(--surface2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.wr-leak-head { display: flex; align-items: baseline; justify-content: space-between; }
.wr-leak-label { font-size: 14px; font-weight: 700; color: var(--text); }
.wr-leak-count { font-size: 22px; font-weight: 800; color: var(--text); }
.wr-leak-desc { font-size: 12px; color: var(--muted); margin: 2px 0 10px; }
.wr-leak-items { margin: 0; padding-left: 18px; }
.wr-leak-items li { font-size: 13px; color: var(--text); margin: 4px 0; }
.wr-leak-empty { font-size: 13px; color: var(--muted); }

/* ④ 作战清单 / 介入 TOP5 */
.wr-action-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.wr-action-table th, .wr-action-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}
.wr-action-table th { color: var(--muted); font-weight: 600; background: var(--surface2); }
.wr-action-bottleneck, .wr-action-suggest { color: var(--muted); max-width: 260px; }

/* ============================ 周复盘 v2 ============================ */
/* 顶部 7 张 KPI */
.wr-scoreboard--7 { grid-template-columns: repeat(7, 1fr); }
@media (max-width: 1200px) { .wr-scoreboard--7 { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 720px) { .wr-scoreboard--7 { grid-template-columns: repeat(2, 1fr); } }
.wr-card--risk .wr-card-val { color: #b45309; }

/* 中部两面板并排：状态饼图 + 负责人成单率 */
.wr-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 960px) { .wr-panels { grid-template-columns: 1fr; } }
.wr-panel { margin-bottom: 16px; }

/* 负责人成单率横条 */
.wr-perf { display: flex; flex-direction: column; gap: 10px; }
.wr-perf-row { display: grid; grid-template-columns: 96px 1fr 92px; align-items: center; gap: 12px; }
.wr-perf-name {
  font-size: 13px; color: var(--text); text-align: right;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.wr-perf-track { background: var(--surface2); border-radius: 8px; height: 22px; overflow: hidden; }
.wr-perf-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  border-radius: 8px; min-width: 2px; transition: width 0.3s ease;
}
.wr-perf-val { font-size: 13px; font-weight: 700; color: var(--text); display: flex; align-items: baseline; gap: 6px; }
.wr-perf-sub { font-size: 11px; font-weight: 500; color: var(--muted); }

/* 高价值标 */
.wr-tag-high {
  display: inline-block; margin-left: 6px; padding: 1px 7px;
  font-size: 11px; font-weight: 700; color: #7c3aed;
  background: rgba(124, 58, 237, 0.12); border-radius: 999px; vertical-align: middle;
}

/* 周复盘可点击元素（点击带筛选跳询盘列表 / 打开详情） */
.weekly-review .wr-clickable { cursor: pointer; transition: background-color .12s ease, box-shadow .12s ease, transform .06s ease; }
.weekly-review .wr-card.wr-clickable:hover { box-shadow: 0 0 0 2px var(--accent, #2563eb) inset; }
.weekly-review .wr-perf-row.wr-clickable:hover,
.weekly-review .pie-legend-item.wr-clickable:hover { background: var(--surface2, rgba(37,99,235,0.06)); border-radius: 8px; }
.weekly-review .wr-action-table tr.wr-clickable:hover { background: var(--surface2, rgba(37,99,235,0.06)); }
.weekly-review button.pie-legend-item { border: none; background: transparent; text-align: left; font: inherit; width: 100%; }
.weekly-review .wr-clickable:focus-visible { outline: 2px solid var(--accent, #2563eb); outline-offset: 1px; }

/* ===== 总览+按周：周复盘一屏锁定（紧凑三栏） ===== */
.workspace-main--viewport-fit .weekly-review--fit {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}
.workspace-main--viewport-fit .weekly-review--fit .wr-section { margin-bottom: 0; }
.workspace-main--viewport-fit .weekly-review--fit .wr-section--kpi { flex-shrink: 0; padding: 18px; }

/* KPI 卡：一屏内保持舒适高度 */
.workspace-main--viewport-fit .weekly-review--fit .wr-scoreboard--7 { gap: 12px; }
.workspace-main--viewport-fit .weekly-review--fit .wr-card {
  padding: 16px 16px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 88px;
}
.workspace-main--viewport-fit .weekly-review--fit .wr-card-label { font-size: 13px; }
.workspace-main--viewport-fit .weekly-review--fit .wr-card-val { font-size: 26px; margin: 6px 0 8px; }
.workspace-main--viewport-fit .weekly-review--fit .wr-wow { font-size: 13px; }

/* 下方三栏填满剩余高度 */
.workspace-main--viewport-fit .weekly-review--fit .wr-fit-row {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(260px, 1fr) minmax(340px, 1.3fr);
  gap: 12px;
}
.workspace-main--viewport-fit .weekly-review--fit .wr-fit-col {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 12px 14px;
}
.workspace-main--viewport-fit .weekly-review--fit .wr-fit-col > .wr-section-title { flex-shrink: 0; margin-bottom: 10px; }
.workspace-main--viewport-fit .weekly-review--fit .wr-fit-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

/* 状态饼图：竖排（饼在上、图例在下），随视高缩放 */
.workspace-main--viewport-fit .weekly-review--fit .pie-chart-body {
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.workspace-main--viewport-fit .weekly-review--fit .pie-wrap {
  width: min(160px, 24vh);
  height: min(160px, 24vh);
  flex-shrink: 0;
}
.workspace-main--viewport-fit .weekly-review--fit .pie-legend { max-height: 100%; overflow: auto; }
.workspace-main--viewport-fit .weekly-review--fit .chart-insight { flex-shrink: 0; }

/* TOP5 表在窄栏可横向滚动 */
.workspace-main--viewport-fit .weekly-review--fit .wr-action-table th,
.workspace-main--viewport-fit .weekly-review--fit .wr-action-table td { padding: 8px 10px; white-space: nowrap; }
