:root {
  --ink: #302923;
  --muted: #857b72;
  --line: #ece3da;
  --paper: #faf7f3;
  --teal: #c76535;
  --teal-dark: #ad512b;
  --teal-soft: #fbede3;
  --orange: #d77b43;
  --shadow: 0 12px 35px rgba(76, 48, 30, .08);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline-color: #e2a078;
}

.sidebar {
  background: #302a26;
  color: #eee4db;
}

.brand-mark {
  background: #fff0e4;
}

.brand-mark span {
  background: #c76535;
}

.brand strong span {
  color: #e6a37b;
}

.workspace-switcher {
  background: #39312b;
  border-color: #51443a;
}

.nav-item:hover {
  background: #40352d;
}

.nav-item.active {
  background: #4a382d;
  box-shadow: inset 3px 0 #e48a50;
}

.nav-item.active .nav-icon {
  color: #f0ad7e;
}

.nav-item em {
  background: #f9e3d3;
  color: #a8542e;
}

.usage-card {
  background: #39312b;
  border-color: #51443a;
}

.usage-head b {
  color: #f0b083;
}

.usage-bar span {
  background-color: #e28a52;
}

.metric-highlight {
  background: #fcf0e7;
  border-color: #f2ddcd;
}

.metric-icon {
  background: #f5e1d2;
  color: #b45b32;
}

.soft-yellow {
  background: #fbf1dc;
  color: #b68a35;
}

.filter-chip.active,
.list-tab.active {
  background: #fbede3;
  color: #b45b32;
}

.list-tab.active {
  background: transparent;
  border-color: #cb6b39;
}

.list-tab.active b,
.metric-link,
.text-button,
.quote-meta b {
  color: #b65b31;
}

.stage-hot {
  background: #fbede7;
  color: #b86646;
}

.stage-follow {
  background: #edf2f6;
  color: #627e99;
}

.stage-new {
  background: #fbf2df;
  color: #a28441;
}

.metric-card,
.panel,
.integration-card,
.usage-card,
.live-call-card,
.strength-card,
.quote-block {
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.metric-card:hover,
.panel:hover,
.integration-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(91, 56, 33, .075);
  border-color: #e8d4c3;
}

.usage-card:hover,
.live-call-card:hover,
.strength-card:hover,
.quote-block:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(91, 56, 33, .07);
}

.task-row,
.history-row,
tbody tr,
.team-member {
  transition: background-color .16s ease, box-shadow .16s ease;
}

.task-row {
  cursor: pointer;
}

.task-row:hover,
.history-row:hover,
tbody tr:hover,
.team-member:hover {
  background: #fffaf5;
}

.task-row:hover {
  box-shadow: inset 3px 0 #dc8050;
}

.history-row,
tbody tr {
  cursor: pointer;
}

.button,
.icon-btn,
.nav-item,
.filter-chip,
.list-tab,
.page-button,
.text-button,
.arrow-button {
  transition: color .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(91, 56, 33, .12);
}

.button-primary:hover {
  background: #ab4f2a;
}

.button-ghost:hover,
.panel-icon:hover,
.icon-btn:hover {
  color: #a9502b;
  border-color: #e8cdb8;
  background-color: #fff5ec;
}

.nav-item:hover {
  transform: translateX(2px);
}

.filter-chip:hover,
.list-tab:hover,
.page-button:hover {
  color: #a9502b;
  background-color: #fff4eb;
}

.arrow-button:hover {
  color: #b65b31;
  transform: translateX(3px);
}

.donut-chart {
  background: conic-gradient(#ca6c3c 0 19%, #718da8 19% 52%, #d5b45f 52% 81%, #e7ded5 81% 100%);
  transition: transform .2s ease;
}

.chart-wrap:hover .donut-chart {
  transform: rotate(-5deg);
}

.progress-track i,
.quality-bars i b,
.profile-bars i {
  background: #d77b43;
}

.quote-block>span {
  color: #d17b4b;
}

.integration-note {
  background: #fbf2e9;
}

.integration-note>span {
  background: #f2dfce;
  color: #a95a35;
}

.integration-lower-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 13px;
  margin-top: 13px;
}

.route-panel,
.invocation-panel {
  padding: 16px;
}

.route-list,
.invocation-list {
  margin-top: 12px;
}

.route-row,
.invocation-row {
  min-height: 52px;
  display: grid;
  align-items: center;
  gap: 10px;
  border-top: 1px solid #f1e9e2;
}

.route-row {
  grid-template-columns: minmax(0, 1fr) 155px 32px;
}

.route-row > div,
.invocation-row > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.route-row b,
.invocation-row b {
  color: #51463e;
  font-size: 11.2px;
}

.route-row span,
.invocation-row span {
  color: #a19890;
  font-size: 9.0px;
  margin-top: 3px;
}

.route-row select {
  width: 100%;
  border: 1px solid #e9dfd6;
  border-radius: 4px;
  background: #fffdfa;
  color: #65584e;
  padding: 7px;
  font-size: 10.1px;
}

.route-state {
  width: 30px;
  text-align: center;
  padding: 3px 0;
  border-radius: 3px;
  color: #aaa099 !important;
  background: #f5f1ed;
  font: 9.0px 'DM Mono', monospace !important;
}

.route-state.is-on {
  color: #b45b32 !important;
  background: #fff0e5;
}

.invocation-row {
  grid-template-columns: minmax(0, 1fr) 42px 52px;
}

.invocation-row strong {
  color: #8f8178;
  font: 10.1px 'DM Mono', monospace;
  text-align: right;
}

.invocation-status {
  justify-self: start;
  border-radius: 3px;
  padding: 3px 5px;
  font-size: 9.0px !important;
  margin-top: 0 !important;
}

.invocation-status.success {
  color: #6e8d75 !important;
  background: #edf5ed;
}

.invocation-status.failed {
  color: #b25c43 !important;
  background: #fbedE8;
}

.field-help {
  color: #a0958c;
  font-size: 9.0px;
  margin-left: 5px;
}

.error-status {
  color: #bd664d !important;
}

.configured {
  color: #ae8240 !important;
}

@media (max-width: 800px) {
  .integration-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .route-row {
    grid-template-columns: minmax(0, 1fr) 112px 30px;
    gap: 6px;
  }

  .route-row b,
  .invocation-row b {
    font-size: 10.1px;
  }
}

.detail-modal {
  width: min(720px, 100%);
  max-height: min(760px, 92vh);
  overflow: auto;
}

.detail-title {
  display: flex;
  gap: 10px;
  align-items: center;
}

.detail-title .avatar {
  width: 42px;
  height: 42px;
  flex-basis: 42px;
}

.detail-title h2 {
  margin-bottom: 4px !important;
}

.detail-title span,
.detail-subline {
  color: #9a8f85;
  font-size: 10.1px;
}

.detail-actions {
  display: flex;
  gap: 7px;
  padding: 14px 0 13px;
  border-bottom: 1px solid var(--line);
}

.detail-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.detail-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #988d84;
  font-size: 11.2px;
  padding: 10px 1px 9px;
}

.detail-tab b {
  font: 10.1px 'DM Mono', monospace;
  color: #b2a79e;
  margin-left: 3px;
}

.detail-tab.active,
.detail-tab:hover {
  color: #b45b32;
  border-bottom-color: #d77b43;
}

.detail-panel {
  display: none;
}

.detail-panel.active {
  display: block;
}

.detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 13px;
}

.detail-summary-grid > div {
  border: 1px solid #eee5dd;
  border-radius: 5px;
  padding: 11px;
  background: #fffdfa;
}

.detail-summary-grid small,
.detail-big-value {
  display: block;
}

.detail-big-value {
  margin-top: 7px;
  font-size: 14.6px;
  color: #4a4038;
}

.detail-summary-grid small {
  color: #a39890;
  font-size: 9.0px;
  margin-top: 4px;
}

.orange-text,
.positive-text {
  color: #c56838;
}

.detail-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.detail-columns .analysis-column {
  min-height: 155px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 13px;
}

.tag-row span {
  color: #aa6a46;
  background: #fff0e5;
  border-radius: 3px;
  padding: 4px 6px;
  font-size: 9.0px;
}

.timeline {
  padding: 4px 2px 5px 6px;
}

.timeline-item {
  display: flex;
  gap: 10px;
  position: relative;
  padding: 0 0 17px;
}

.timeline-item:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 27px;
  bottom: 0;
  left: 12px;
  width: 1px;
  background: #eee3d9;
}

.timeline-icon {
  position: relative;
  z-index: 1;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0e5;
  color: #c56838;
  font-style: normal;
  font-size: 12.3px;
}

.timeline-item b,
.timeline-item span,
.timeline-item p {
  display: block;
}

.timeline-item b {
  font-size: 11.2px;
}

.timeline-item span {
  color: #aa9f96;
  font: 9.0px 'DM Mono', monospace;
  margin-top: 3px;
}

.timeline-item p {
  color: #778078;
  font-size: 10.1px;
  line-height: 1.6;
  margin: 6px 0 0;
}

.mini-history > div {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 4px;
  border-bottom: 1px solid #f1eae3;
}

.mini-history .avatar {
  width: 27px;
  height: 27px;
  flex-basis: 27px;
  font-size: 10.1px;
}

.mini-history > div > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.mini-history b {
  font-size: 10.1px;
}

.mini-history small {
  color: #a19891;
  font-size: 9.0px;
  margin-top: 3px;
}

.inner-call {
  font-size: 9.0px;
}

.call-review-bar {
  display: flex;
  align-items: center;
  gap: 9px;
  background: #fff9f4;
  border: 1px solid #f0e1d5;
  padding: 10px;
  border-radius: 5px;
  margin: 14px 0;
  color: #988b81;
  font-size: 10.1px;
}

.call-review-bar .button {
  height: 28px;
  margin-right: auto;
}

.call-review-bar > b {
  color: #bd5e33;
  font: 700 20.2px 'DM Mono', monospace;
}

.call-review-bar > b small {
  color: #a89b91;
  font-size: 10.1px;
  font-weight: 400;
}

.score-state {
  color: #6f947e;
  background: #edf6ef;
  padding: 4px 6px;
  border-radius: 3px;
  font-size: 9.0px;
}

.insight-chip-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 15px;
}

.insight-chip-grid > div {
  padding: 8px;
  background: #fffaf6;
  border-radius: 4px;
}

.insight-chip-grid b,
.insight-chip-grid span {
  display: block;
}

.insight-chip-grid b {
  color: #b45b32;
  font-size: 9.0px;
}

.insight-chip-grid span {
  color: #7b837e;
  font-size: 9.0px;
  line-height: 1.5;
  margin-top: 4px;
}

.transcript {
  border: 1px solid #eee7df;
  border-radius: 5px;
  padding: 6px 12px;
  background: #fffdfa;
}

.transcript p {
  border-bottom: 1px solid #f3ece5;
  padding: 9px 0;
  margin: 0;
  font-size: 10.1px;
  color: #6d766f;
}

.transcript p:last-child {
  border-bottom: 0;
}

.transcript time {
  color: #b19783;
  font: 9.0px 'DM Mono', monospace;
  margin-right: 9px;
}

.transcript b {
  color: #443b34;
  margin-right: 5px;
}

.coaching-detail {
  display: grid;
  gap: 8px;
}

.coaching-detail > div {
  border-left: 3px solid #e09561;
  padding: 9px 11px;
  background: #fffaf5;
}

.coaching-detail > div:nth-child(2) {
  border-color: #d4ad62;
}

.coaching-detail > div:nth-child(3) {
  border-color: #8c9fb1;
}

.coaching-detail b {
  font-size: 10.1px;
}

.coaching-detail p {
  color: #7c837e;
  font-size: 10.1px;
  line-height: 1.6;
  margin: 5px 0 0;
}

.insight-item {
  cursor: pointer;
  border-radius: 5px;
  padding-left: 5px;
  padding-right: 5px;
}

.insight-item:hover {
  background: #fffaf5;
}

.insight-hero {
  display: flex;
  gap: 10px;
  padding: 12px;
  margin-bottom: 12px;
  border-radius: 5px;
  background: #fff4eb;
  color: #825d48;
}

.insight-hero > span {
  color: #c66b3d;
  font-size: 19.0px;
}

.insight-hero p {
  font-size: 11.2px;
  line-height: 1.7;
  margin: 0;
}

.insight-detail-modal blockquote {
  color: #57483f;
  font-size: 13.4px;
  line-height: 1.8;
  margin: 10px 0 7px;
  padding-left: 13px;
  border-left: 3px solid #e0925d;
}

.insight-detail-modal .analysis-column > small {
  color: #a39890;
  font-size: 9.0px;
}

.recommendation-list {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.recommendation-list > div {
  display: flex;
  gap: 8px;
  align-items: center;
  color: #747c77;
  font-size: 10.1px;
}

.recommendation-list b {
  width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff0e5;
  color: #bd6337;
  font: 10.1px 'DM Mono', monospace;
}

.config-modal {
  width: min(540px, 100%);
}

.config-form {
  margin-top: 16px;
}

.config-form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #655a52;
  font-size: 10.1px;
  margin-bottom: 13px;
}

.config-form input,
.config-form select {
  border: 1px solid #e9dfd6;
  border-radius: 5px;
  color: #4c4139;
  background: #fffdfa;
  padding: 9px;
  font-size: 11.2px;
}

.config-hint {
  color: #9b9188;
  background: #faf5ef;
  border-radius: 4px;
  padding: 9px;
  font-size: 9.0px;
  line-height: 1.6;
  margin-bottom: 13px;
}

.empty-state {
  color: #a29a93;
  text-align: center;
  padding: 25px 8px;
  font-size: 10.1px;
}

.quick-panel {
  width: min(520px, 100%);
}

.quick-panel-body > p {
  color: #7f7870;
  font-size: 11.2px;
  line-height: 1.7;
  margin: 0 0 12px;
}

.quick-action {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #eee5dc;
  background: #fffdfa;
  border-radius: 5px;
  padding: 10px;
  text-align: left;
  margin-top: 7px;
}

.quick-action:hover {
  border-color: #e4c6af;
  background: #fff7f0;
}

.quick-action > span:first-child {
  width: 25px;
  height: 25px;
  display: grid;
  place-items: center;
  flex: 0 0 25px;
  border-radius: 5px;
  color: #bd6338;
  background: #fff0e5;
  font-size: 13.4px;
}

.quick-action > span:nth-child(2) {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.quick-action b {
  color: #493e35;
  font-size: 10.1px;
}

.quick-action small {
  color: #a0958c;
  font-size: 9.0px;
  margin-top: 3px;
}

.quick-action > strong {
  color: #b66a45;
  font-size: 15.7px;
}

.metric-card,
.live-call-card {
  cursor: pointer;
}

@media (max-width: 560px) {
  .detail-summary-grid,
  .detail-columns {
    grid-template-columns: 1fr;
  }

  .detail-actions {
    flex-wrap: wrap;
  }

  .detail-tabs {
    gap: 12px;
  }

  .insight-chip-grid {
    grid-template-columns: 1fr;
  }

  .call-review-bar {
    flex-wrap: wrap;
  }

  .call-review-bar .button {
    margin-right: 0;
  }
}

/* Readability pass: the original prototype used compact 8-10px labels
   throughout the desktop workspace. Keep the density, but bring text to a
   comfortable reading size. */
body {
  font-size: 16.8px;
}

.nav-item {
  font-size: 14.6px;
}

.nav-label {
  font-size: 12.3px;
}

.workspace-copy b,
.user-profile b {
  font-size: 14.6px;
}

.workspace-copy span,
.user-profile span {
  font-size: 12.3px;
}

.breadcrumb {
  font-size: 13.4px;
}

.eyebrow {
  font-size: 12.3px;
}

.subheading {
  font-size: 13.4px;
}

.metric-top,
.panel-header p {
  font-size: 12.3px;
}

.metric-foot {
  font-size: 11.2px;
}

.metric-value {
  font-size: 32.5px;
}

.panel-header h2 {
  font-size: 15.7px;
}

.text-button,
.filter-chip,
.stage-pill,
.priority,
.task-time,
.customer-cell span,
.customer-cell b,
.table-customer b,
.owner-cell,
.history-name b,
.history-score,
.member-stat,
.integration-copy b {
  font-size: 12.3px;
}

.task-time small,
.customer-cell span,
.table-customer span,
.history-name span,
.integration-copy span,
.integration-copy p,
.insight-item p,
.insight-meta,
.call-stat-row span,
.legend div,
.quality-bars > div,
.profile-bars > div,
.strength-card small,
.quote-block small,
.quote-meta,
.integration-note p {
  font-size: 11.2px;
}

.live-transcript p,
.analysis-column p,
.suggestion-box p,
.timeline-item p,
.coaching-detail p,
.quick-panel-body > p {
  font-size: 12.3px;
}

.button {
  font-size: 13.4px;
}

.top-search input,
.inline-search input,
.modal input,
.modal select,
.modal textarea,
.config-form input,
.config-form select {
  font-size: 13.4px;
}

th,
td,
.table-footer,
.list-tab,
.segmented button {
  font-size: 12.3px;
}

.insight-item b,
.strength-card b,
.quote-block p,
.call-profile b,
.call-profile span,
.member-main b,
.member-main span {
  font-size: 12.3px;
}

.call-stat-row b,
.history-time,
.history-duration {
  font-size: 12.3px;
}

.analysis-label,
.confidence-label,
.recording-pill,
.score-state,
.status-badge,
.insight-chip-grid b,
.insight-chip-grid span,
.recommendation-list > div,
.quick-action b,
.quick-action small {
  font-size: 11.2px;
}

.form-row label,
.modal form label,
.config-form label {
  font-size: 12.3px;
}

@media (max-width: 800px) {
  .nav-item {
    font-size: 0;
  }

  .metric-top,
  .panel-header p,
  .subheading {
    font-size: 11.2px;
  }
}

@media (max-width: 560px) {
  .page-heading h1 {
    font-size: 24.6px;
  }

  .metric-value {
    font-size: 28.0px;
  }

  .metric-top,
  .panel-header p,
  .subheading,
  .metric-foot,
  .task-time,
  .priority,
  .customer-cell b,
  .customer-cell span,
  .table-customer b,
  .table-customer span,
  .history-name b,
  .history-name span,
  .history-time,
  .history-duration,
  .button,
  .list-tab,
  .segmented button {
    font-size: 11.2px;
  }

  .filter-chip {
    font-size: 10.1px;
  }
}

.button-danger:hover {
  background: #ab493b;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* ===== 登录与导入 ===== */
.login-error {
  color: #d9480f;
  font-size: 14.6px;
  margin: 0;
}
.import-actions-inline {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  padding-bottom: 6px;
}
.import-result {
  max-height: 300px;
  overflow: auto;
  margin-top: 4px;
}
.import-result table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14.6px;
}
.import-result th,
.import-result td {
  text-align: left;
  padding: 6px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}
.import-result tr.row-error td {
  color: #d9480f;
}
.import-result .row-status {
  font-size: 13.4px;
  white-space: nowrap;
}

.customer-bulk-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 8px 17px;
  border-bottom: 1px solid #eee5dd;
  background: #fff8f2;
}

.customer-bulk-toolbar[hidden] {
  display: none !important;
}

.customer-bulk-toolbar > span {
  color: #71645a;
  font-size: 12px;
  margin-right: auto;
}

.customer-bulk-toolbar > span b {
  color: #b45b32;
  font-size: 14px;
}

.bulk-owner-label {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #766a61;
  font-size: 11px;
}

.bulk-owner-label select {
  min-width: 120px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid #e7d9cd;
  border-radius: 5px;
  background: #fff;
  color: #4d423a;
  font-size: 11px;
}

.customer-panel th:first-child,
.customer-panel td:first-child {
  width: 40px;
  padding-left: 17px;
}

.customer-panel input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #bd6538;
  cursor: pointer;
}

.customer-panel tbody tr:has(.customer-select:checked) {
  background: #fff8f1;
}

@media (max-width: 560px) {
  .customer-bulk-toolbar {
    flex-wrap: wrap;
    gap: 8px;
    padding: 9px 12px;
  }

  .customer-bulk-toolbar > span {
    flex-basis: 100%;
  }

  .customer-bulk-toolbar .bulk-owner-label {
    flex: 1;
  }

  .bulk-owner-label select {
    min-width: 0;
    flex: 1;
  }
}

/* ===== 团队报表与保留策略 ===== */
.team-lower-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 20px;
  margin-top: 20px;
  align-items: start;
}
#report-panel,
#retention-panel,
#audit-panel {
  padding: 17px;
}
.retention-form {
  flex-wrap: wrap;
}
#backup-btn {
  max-width: 100%;
  white-space: normal;
}
@media (max-width: 800px) {
  .team-lower-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
.report-list {
  display: flex;
  flex-direction: column;
}
.report-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}
.report-row:last-child {
  border-bottom: none;
}
.report-row .report-main {
  flex: 1;
  min-width: 0;
}
.report-row .report-main b {
  display: block;
  font-size: 15.7px;
}
.report-row .report-main > span {
  font-size: 13.4px;
  opacity: 0.7;
}
.report-stats {
  display: flex;
  gap: 18px;
}
.report-stats div {
  text-align: center;
}
.report-stats b {
  display: block;
  font-size: 17.9px;
}
.report-stats span {
  font-size: 12.3px;
  opacity: 0.65;
}
.funnel-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 14.6px;
}
.funnel-row span {
  width: 76px;
  flex-shrink: 0;
  opacity: 0.75;
}
.funnel-row i {
  flex: 1;
  height: 10px;
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.08);
  overflow: hidden;
}
.funnel-row i b {
  display: block;
  height: 100%;
  border-radius: 6px;
  background: linear-gradient(90deg, #f0a35e, #d97706);
}
.funnel-row > b {
  width: 28px;
  text-align: right;
}
.retention-form {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin: 10px 0;
}
.retention-form label {
  flex: 1;
}

/* ===== 实时监控 / 审计日志 / 真实洞察 ===== */
.live-monitor-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live-call-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(217, 119, 6, 0.25);
  border-radius: 10px;
  background: rgba(240, 163, 94, 0.08);
}
.live-call-row .avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16.8px;
  flex-shrink: 0;
}
.live-call-row .live-main {
  flex: 1;
  min-width: 0;
}
.live-call-row .live-main b {
  display: block;
  font-size: 15.7px;
}
.live-call-row .live-main span {
  font-size: 13.4px;
  opacity: 0.7;
}
.live-call-row .live-timer {
  font-size: 17.9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.rec-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.3px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(217, 72, 15, 0.12);
  color: #d9480f;
}
.rec-pill i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #d9480f;
  animation: recBlink 1.2s infinite;
}
@keyframes recBlink {
  50% { opacity: 0.2; }
}
.audit-list {
  display: flex;
  flex-direction: column;
  max-height: 320px;
  overflow: auto;
}
.audit-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.05);
  font-size: 14.6px;
}
.audit-row:last-child {
  border-bottom: none;
}
.audit-row .audit-time {
  flex-shrink: 0;
  width: 110px;
  opacity: 0.6;
  font-size: 13.4px;
}
.audit-row .audit-actor {
  flex-shrink: 0;
  width: 90px;
  font-weight: 600;
}
.audit-row .audit-action {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.audit-row .audit-target {
  flex-shrink: 0;
  opacity: 0.55;
  font-size: 13.4px;
}
.real-insights-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}
.insight-stat-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
}
.insight-stat-card > b {
  display: block;
  font-size: 14.6px;
  margin-bottom: 10px;
  opacity: 0.75;
}
.insight-stat-card .stat-big {
  font-size: 29.1px;
  font-weight: 800;
  margin-bottom: 4px;
}
.insight-stat-card .stat-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 14.6px;
  padding: 4px 0;
}
.insight-stat-card .stat-line span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.insight-stat-card .stat-line b {
  flex-shrink: 0;
}

/* ===== 话术知识库 ===== */
.knowledge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}
.knowledge-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 14px;
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: rgba(255, 255, 255, 0.6);
}
.knowledge-card.reviewed {
  border-color: rgba(13, 128, 106, 0.35);
}
.knowledge-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.4px;
}
.knowledge-type {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(21, 94, 239, 0.1);
  color: #155edf;
  font-weight: 600;
}
.knowledge-reviewed {
  color: #0d806a;
  font-weight: 600;
}
.knowledge-pending {
  color: #d97706;
}
.knowledge-title {
  font-size: 16.8px;
}
.knowledge-content {
  font-size: 14.6px;
  line-height: 1.7;
  opacity: 0.85;
}
.knowledge-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.knowledge-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-top: auto;
}
.knowledge-meta {
  font-size: 13.4px;
  opacity: 0.65;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.knowledge-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}
.knowledge-actions .kb-like.liked {
  color: #d9480f;
}
.sidebar-logout {
  margin: 0 0 8px;
  color: #efb7a6;
}
.sidebar-logout:hover {
  background: #453732;
  color: #fff;
}
@media (max-width: 800px) {
  .sidebar-logout {
    width: 44px;
    height: 42px;
    justify-content: center;
    padding: 0;
    gap: 0;
  }
  .sidebar-logout .nav-icon {
    font-size: 19.0px;
  }
}

/* Give section headings and adjacent panels clearer separation. */
.panel-header h2 {
  color: #302923;
  font-size: 17px;
  line-height: 1.35;
}

.panel-header p {
  color: #81766c;
  font-size: 13.4px;
  line-height: 1.55;
  margin-top: 6px;
}

.view > .panel + *,
.view > .panel + section {
  margin-top: 18px;
}

.view > .panel,
.insights-layout > .panel {
  box-shadow: 0 4px 16px rgba(76, 48, 30, 0.06);
}

#real-insights-panel {
  padding: 18px;
}

.insights-layout {
  gap: 18px;
  align-items: start;
}

@media (max-width: 800px) {
  .panel-header h2 {
    font-size: 16px;
  }

  .panel-header p {
    font-size: 12.3px;
  }

  .view > .panel + *,
  .view > .panel + section {
    margin-top: 14px;
  }

  #real-insights-panel {
    padding: 14px;
  }

  .insights-layout {
    gap: 14px;
  }
}

/* Call analysis dialog readability overrides; keep existing dialog behavior. */
.call-detail-modal {
  width: min(900px, calc(100vw - 56px));
  max-width: 900px;
  max-height: min(860px, calc(100vh - 48px));
  overflow-y: auto;
  padding: 28px;
  color: #302923;
}

.call-detail-modal .modal-header {
  margin-bottom: 22px;
}

.call-detail-modal .modal-header h2 {
  color: #302923;
  font-size: 25px;
  line-height: 1.4;
}

.call-detail-modal .eyebrow,
.call-detail-modal .detail-subline {
  color: #6e6258;
  font-size: 14px;
  line-height: 1.6;
}

.call-detail-modal .call-review-bar {
  gap: 12px;
  padding: 13px 14px;
  color: #65594f;
  font-size: 14px;
}

.call-detail-modal .call-review-bar .button {
  height: 38px;
}

.call-detail-modal .call-review-bar > b {
  font-size: 25px;
}

.call-detail-modal .call-review-bar > b small,
.call-detail-modal .score-state {
  font-size: 13px;
}

.call-detail-modal .detail-tabs {
  gap: 24px;
  margin: 10px 0 18px;
}

.call-detail-modal .detail-tab {
  color: #62574e;
  font-size: 15px;
  padding: 12px 2px 11px;
}

.call-detail-modal .detail-panel {
  color: #39332e;
}

.call-detail-modal .analysis-column {
  padding: 17px;
}

.call-detail-modal .analysis-label {
  color: #52645d;
  font-size: 14px;
}

.call-detail-modal .analysis-column p,
.call-detail-modal .suggestion-box p,
.call-detail-modal .transcript p,
.call-detail-modal .coaching-detail p {
  color: #49423c;
  font-size: 15px;
  line-height: 1.8;
}

.call-detail-modal .insight-chip-grid {
  gap: 10px;
}

.call-detail-modal .insight-chip-grid > div {
  padding: 11px;
}

.call-detail-modal .insight-chip-grid b {
  color: #a84f2b;
  font-size: 14px;
}

.call-detail-modal .insight-chip-grid span {
  color: #514941;
  font-size: 14px;
  line-height: 1.65;
}

.call-detail-modal .suggestion-box {
  padding: 13px;
}

.call-detail-modal .suggestion-box b {
  color: #286f60;
  font-size: 14px;
}

.call-detail-modal .text-button {
  font-size: 14px;
}

.call-detail-modal .call-modal-actions {
  gap: 10px;
  margin-top: 20px;
}

.call-detail-modal .call-modal-actions .button {
  min-height: 40px;
  font-size: 14px;
}

@media (max-width: 700px) {
  .call-detail-modal {
    width: min(600px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    padding: 20px;
  }

  .call-detail-modal .modal-header h2 {
    font-size: 22px;
  }

  .call-detail-modal .analysis-column p,
  .call-detail-modal .suggestion-box p,
  .call-detail-modal .transcript p,
  .call-detail-modal .coaching-detail p {
    font-size: 14px;
  }

  .call-detail-modal .call-review-bar {
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .call-detail-modal {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .call-detail-modal .modal-header h2 {
    font-size: 20px;
  }

  .call-detail-modal .detail-tabs {
    gap: 16px;
  }

  .call-detail-modal .detail-tab {
    font-size: 14px;
  }

  .call-detail-modal .call-modal-actions {
    flex-wrap: wrap;
  }
}

/* Match the customer record dialog to the call analysis dialog. */
.detail-modal:has(.detail-title) {
  width: min(900px, calc(100vw - 56px));
  max-width: 900px;
  max-height: min(860px, calc(100vh - 48px));
  overflow-y: auto;
  padding: 28px;
  color: #302923;
}

.detail-modal:has(.detail-title) .modal-header {
  margin-bottom: 20px;
}

.detail-modal:has(.detail-title) .detail-title h2 {
  color: #302923;
  font-size: 25px;
  line-height: 1.4;
}

.detail-modal:has(.detail-title) .eyebrow,
.detail-modal:has(.detail-title) .detail-title span {
  color: #6e6258;
  font-size: 14px;
  line-height: 1.6;
}

.detail-modal:has(.detail-title) .detail-actions {
  flex-wrap: wrap;
  gap: 9px;
  padding: 16px 0;
}

.detail-modal:has(.detail-title) .detail-actions .button,
.detail-modal:has(.detail-title) .call-modal-actions .button {
  min-height: 40px;
  font-size: 14px;
}

.detail-modal:has(.detail-title) .detail-tabs {
  gap: 24px;
  margin: 4px 0 18px;
}

.detail-modal:has(.detail-title) .detail-tab {
  color: #62574e;
  font-size: 15px;
  padding: 12px 2px 11px;
}

.detail-modal:has(.detail-title) .detail-summary-grid {
  gap: 10px;
  margin-bottom: 16px;
}

.detail-modal:has(.detail-title) .detail-summary-grid > div,
.detail-modal:has(.detail-title) .analysis-column {
  padding: 16px;
}

.detail-modal:has(.detail-title) .analysis-label {
  color: #52645d;
  font-size: 14px;
}

.detail-modal:has(.detail-title) .detail-big-value {
  color: #39332e;
  font-size: 18px;
}

.detail-modal:has(.detail-title) .detail-summary-grid small,
.detail-modal:has(.detail-title) .tag-row span {
  color: #62574e;
  font-size: 13px;
  line-height: 1.6;
}

.detail-modal:has(.detail-title) .analysis-column p,
.detail-modal:has(.detail-title) .suggestion-box p,
.detail-modal:has(.detail-title) .timeline-item p {
  color: #49423c;
  font-size: 15px;
  line-height: 1.8;
}

.detail-modal:has(.detail-title) .suggestion-box {
  padding: 13px;
}

.detail-modal:has(.detail-title) .suggestion-box b,
.detail-modal:has(.detail-title) .timeline-item b {
  color: #286f60;
  font-size: 14px;
}

.detail-modal:has(.detail-title) .timeline-item span,
.detail-modal:has(.detail-title) .mini-history small {
  color: #62574e;
  font-size: 13px;
  line-height: 1.6;
}

.detail-modal:has(.detail-title) .mini-history b,
.detail-modal:has(.detail-title) .text-button {
  color: #39332e;
  font-size: 14px;
}

.detail-modal:has(.detail-title) .call-modal-actions {
  gap: 10px;
  margin-top: 20px;
}

@media (max-width: 700px) {
  .detail-modal:has(.detail-title) {
    width: min(600px, calc(100vw - 28px));
    max-height: calc(100vh - 28px);
    padding: 20px;
  }

  .detail-modal:has(.detail-title) .detail-title h2 {
    font-size: 22px;
  }

  .detail-modal:has(.detail-title) .detail-columns,
  .detail-modal:has(.detail-title) .detail-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .detail-modal:has(.detail-title) {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
    padding: 16px;
  }

  .detail-modal:has(.detail-title) .detail-title h2 {
    font-size: 20px;
  }

  .detail-modal:has(.detail-title) .detail-actions {
    gap: 6px;
  }

  .detail-modal:has(.detail-title) .detail-actions .button {
    flex: 1 1 auto;
  }

  .detail-modal:has(.detail-title) .detail-tabs {
    gap: 16px;
  }

  .detail-modal:has(.detail-title) .detail-tab {
    font-size: 14px;
  }

  .detail-modal:has(.detail-title) .call-modal-actions {
    flex-wrap: wrap;
  }
}

/* Knowledge cards: give tags and actions enough room to scan and click. */
.knowledge-grid {
  gap: 18px;
}

.knowledge-card {
  gap: 12px;
  padding: 18px;
}

.knowledge-card-head {
  gap: 12px;
}

.knowledge-type,
.knowledge-reviewed,
.knowledge-pending {
  font-size: 14px;
}

.knowledge-title {
  color: #302923;
  font-size: 18px;
  line-height: 1.5;
}

.knowledge-content {
  color: #514941;
  font-size: 15px;
  line-height: 1.8;
  opacity: 1;
}

.knowledge-tags {
  gap: 8px;
  margin-top: 2px;
}

.knowledge-tags span {
  padding: 5px 8px;
  border-radius: 4px;
  color: #75482f;
  background: #fff0e5;
  font-size: 12.3px;
  line-height: 1.5;
}

.knowledge-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid #eee7e1;
}

.knowledge-meta {
  color: #6e6258;
  font-size: 13px;
  line-height: 1.6;
  opacity: 1;
}

.knowledge-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-actions .icon-btn {
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  border: 1px solid #e6ddd5;
  border-radius: 6px;
  background: #fff;
  color: #62574e;
  font-size: 18px;
}

.knowledge-actions .icon-btn:hover {
  border-color: #d8c6b8;
  background: #fff8f3;
}

.knowledge-actions .kb-delete.is-confirming {
  width: 64px;
  flex-basis: 64px;
  color: #a84f2b;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.knowledge-actions .kb-like {
  width: auto;
  min-width: 64px;
  flex-basis: 64px;
  display: inline-flex;
  flex-direction: row;
  gap: 5px;
  white-space: nowrap;
  font-size: 15px;
}

.knowledge-actions .kb-like.liked {
  color: #c94f3d;
}

.knowledge-actions .kb-review {
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid #f0d8c7;
  border-radius: 6px;
  background: #fff6ef;
  color: #a84f2b;
  font-size: 13px;
}

.knowledge-actions .kb-review:hover {
  background: #ffecdf;
}

@media (max-width: 560px) {
  .knowledge-card {
    padding: 15px;
  }

  .knowledge-title {
    font-size: 17px;
  }

  .knowledge-content {
    font-size: 14px;
  }

  .knowledge-tags span {
    font-size: 12px;
  }

  .knowledge-actions {
    justify-content: flex-start;
    gap: 7px;
  }

  .knowledge-actions .kb-review {
    margin-left: auto;
  }
}

.team-subnav {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 5px;
  width: fit-content;
  max-width: 100%;
  background: #f1ebe5;
  border: 1px solid #e7ddd3;
  border-radius: 7px;
}

.team-subnav-tab {
  min-height: 38px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: #71655b;
  font-size: 14px;
  font-weight: 600;
}

.team-subnav-tab:hover {
  color: #302923;
}

.team-subnav-tab.active {
  background: #fff;
  border-color: #e6dacf;
  color: #a84f2b;
  box-shadow: 0 1px 3px rgba(76, 48, 30, 0.08);
}

.team-subnav-tab[hidden],
.team-subpage[hidden] {
  display: none !important;
}

.team-subpage.active {
  display: block;
}

.team-subpage > .team-lower-grid {
  margin-top: 0;
  margin-bottom: 18px;
}

#team-reports-page #audit-panel {
  margin-top: 18px;
}

@media (max-width: 560px) {
  .team-subnav {
    width: 100%;
  }

  .team-subnav-tab {
    flex: 1;
    padding: 0 10px;
  }
}

#import-modal .button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
  filter: saturate(0.45);
  box-shadow: none;
}

#import-modal .import-result > .empty-state {
  color: #62574e;
  font-size: 13px;
  line-height: 1.6;
}

#import-modal .import-result tr.row-error td {
  color: #a83e32;
  background: #fff4f1;
}

/* Team report dashboard */
#team-reports-page > .team-lower-grid {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

#report-panel {
  grid-column: 1 / -1;
  padding: 22px;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(232, 169, 119, .12), transparent 38%),
    #fff;
  box-shadow: 0 10px 30px rgba(76, 48, 30, .07);
}

#report-panel > .panel-header {
  align-items: center;
  padding-bottom: 17px;
  border-bottom: 1px solid #f0e8e1;
}

#report-panel > .panel-header h2 {
  font-size: 18px;
}

#report-panel > .panel-header p {
  font-size: 12px;
}

#report-panel .report-list {
  gap: 18px;
  padding-top: 18px;
}

.report-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.report-kpi {
  min-height: 128px;
  padding: 17px 18px 14px;
  border: 1px solid #eee7e0;
  border-radius: 7px;
  background: linear-gradient(145deg, #fff 0%, #fcfaf8 100%);
  box-shadow: 0 3px 8px rgba(76, 48, 30, .035), inset 0 1px #fff;
}

.report-kpi-primary {
  border-color: #ead4c3;
  background: linear-gradient(145deg, #fff8f2, #fff);
}

.report-kpi > span {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #75685e;
  font-size: 12px;
}

.report-kpi > span i {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: #f6eee8;
  color: #bd7047;
  font-style: normal;
  font-size: 14px;
}

.report-kpi > b {
  display: block;
  margin-top: 10px;
  color: #3d332c;
  font: 700 30px/1.1 'Manrope', 'Noto Sans SC', sans-serif;
}

.report-kpi > small {
  display: block;
  margin-top: 7px;
  color: #9b9087;
  font-size: 11px;
}

.report-visual-grid {
  display: grid;
  grid-template-columns: minmax(275px, .78fr) minmax(0, 1.7fr);
  gap: 16px;
  align-items: stretch;
}

.report-visual-panel {
  min-width: 0;
  padding: 18px;
  border: 1px solid #eee7e0;
  border-radius: 7px;
  background: linear-gradient(155deg, #fff 0%, #fdfbf9 100%);
  box-shadow: 0 4px 12px rgba(76, 48, 30, .045);
}

.report-section-heading,
.report-section-heading > div {
  display: flex;
  align-items: center;
}

.report-section-heading {
  justify-content: space-between;
  gap: 12px;
}

.report-section-heading > div {
  gap: 10px;
  min-width: 0;
}

.report-section-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  font-size: 17px;
}

.funnel-icon {
  color: #b66a40;
  background: #f9eee5;
}

.member-icon {
  color: #537e70;
  background: #eaf2ed;
}

.report-section-heading h3 {
  margin: 0;
  color: #493d34;
  font-size: 14px;
}

.report-section-heading p {
  margin: 4px 0 0;
  color: #9a8f86;
  font-size: 11px;
}

.report-section-heading > strong {
  color: #473a31;
  font: 700 21px/1 'Manrope', 'Noto Sans SC', sans-serif;
  white-space: nowrap;
}

.report-section-heading > strong small {
  margin-left: 5px;
  color: #9b9087;
  font: 11px 'Noto Sans SC', sans-serif;
}

.funnel-chart {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 24px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 76px minmax(30px, 1fr) 28px;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: #786c63;
  font-size: 11px;
}

.funnel-row span {
  width: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  opacity: 1;
}

.funnel-track,
.member-call-track {
  height: 9px;
  overflow: hidden;
  border-radius: 10px;
  background: #f0eeec;
}

.funnel-track i,
.member-call-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e7a166, #c86737);
  box-shadow: 0 2px 5px rgba(181, 91, 49, .2);
}

.funnel-row > b {
  width: auto;
  color: #51443b;
  font: 700 12px 'Manrope', sans-serif;
  text-align: right;
}

.report-live-mark {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #638572;
  font-size: 10px;
  white-space: nowrap;
}

.report-live-mark i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #66a780;
  box-shadow: 0 0 0 3px #e9f3ec;
}

.member-report-list {
  margin-top: 15px;
}

.member-report-row {
  display: grid;
  grid-template-columns: minmax(145px, 1.05fr) minmax(130px, 1.25fr) repeat(4, minmax(66px, .6fr));
  gap: 14px;
  align-items: center;
  min-height: 75px;
  padding: 11px 3px;
  border-top: 1px solid #f0eae5;
}

.member-report-identity {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.member-report-identity .avatar {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.member-report-identity > div:last-child,
.member-report-volume {
  min-width: 0;
}

.member-report-identity b,
.member-report-identity span,
.member-report-stat b,
.member-report-stat span {
  display: block;
}

.member-report-identity b {
  color: #51443b;
  font-size: 12px;
}

.member-report-identity span,
.member-report-stat span {
  margin-top: 4px;
  color: #9a8f86;
  font-size: 10px;
}

.member-report-label {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 7px;
  color: #8c8077;
  font-size: 10px;
}

.member-report-label b {
  color: #51443b;
  font: 700 12px 'Manrope', sans-serif;
}

.member-call-track {
  height: 6px;
}

.member-call-track i {
  background: linear-gradient(90deg, #8eaa91, #4b8c78);
  box-shadow: 0 2px 5px rgba(75, 140, 120, .18);
}

.member-report-stat {
  text-align: center;
}

.member-report-stat b {
  color: #4d4037;
  font: 700 15px 'Manrope', 'Noto Sans SC', sans-serif;
}

.member-report-stat.has-overdue b,
.member-report-stat.has-overdue span {
  color: #bd674f;
}

@media (max-width: 1100px) {
  .report-visual-grid {
    grid-template-columns: minmax(240px, .8fr) minmax(0, 1.4fr);
    gap: 12px;
  }

  .member-report-row {
    grid-template-columns: minmax(120px, 1fr) minmax(110px, 1fr) repeat(4, minmax(54px, .55fr));
    gap: 8px;
  }
}

@media (max-width: 800px) {
  .report-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .report-visual-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  #report-panel {
    padding: 14px;
  }

  #report-panel .report-list {
    gap: 12px;
    padding-top: 13px;
  }

  .report-kpi-grid {
    gap: 8px;
  }

  .report-kpi {
    min-height: 105px;
    padding: 12px;
  }

  .report-kpi > b {
    font-size: 24px;
  }

  .report-kpi > small {
    font-size: 9px;
  }

  .report-visual-panel {
    padding: 13px;
  }

  .funnel-row {
    grid-template-columns: 70px minmax(30px, 1fr) 24px;
    gap: 7px;
  }

  .member-report-row {
    grid-template-columns: minmax(0, 1fr) repeat(2, minmax(48px, .5fr));
    gap: 9px 5px;
    padding: 12px 0;
  }

  .member-report-identity {
    grid-column: 1;
  }

  .member-report-volume {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-left: 43px;
  }

  .member-report-stat {
    grid-row: 1;
  }

  .member-report-stat b {
    font-size: 13px;
  }
}

/* ===== 布局修复：实时监控面板留白与卡片/弹窗立体感（2026-11-02 用户反馈） ===== */
.live-monitor-panel {
  padding: 17px 17px 15px;
}
.live-monitor-panel .panel-header {
  padding: 0 2px;
}
.live-monitor-list {
  margin-top: 14px;
}
.live-call-row {
  padding: 12px 14px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(76, 48, 30, 0.07), 0 1px 2px rgba(76, 48, 30, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.live-call-row:hover {
  box-shadow: 0 5px 14px rgba(76, 48, 30, 0.12), 0 2px 4px rgba(76, 48, 30, 0.06);
  transform: translateY(-1px);
}
.modal {
  border: 1px solid rgba(76, 48, 30, 0.09);
  box-shadow: 0 24px 60px rgba(76, 48, 30, 0.2), 0 8px 20px rgba(76, 48, 30, 0.08);
}

/* ===== 布局修复：销售洞察「真实通话洞察」面板（与实时监控面板同风格，2026-11-02 用户反馈） ===== */
#real-insights-panel {
  padding: 17px 17px 15px;
}
#real-insights-panel .panel-header {
  padding: 0 2px;
}
.real-insights-list {
  margin-top: 14px;
  gap: 14px;
}
.insight-stat-card {
  padding: 15px 17px;
  border-color: rgba(76, 48, 30, 0.09);
  box-shadow: 0 2px 6px rgba(76, 48, 30, 0.07), 0 1px 2px rgba(76, 48, 30, 0.05);
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.insight-stat-card:hover {
  box-shadow: 0 5px 14px rgba(76, 48, 30, 0.12), 0 2px 4px rgba(76, 48, 30, 0.06);
  transform: translateY(-1px);
}
.insight-stat-card > b {
  display: block;
  margin: 0 0 10px;
  padding-bottom: 9px;
  border-bottom: 1px solid rgba(76, 48, 30, 0.07);
}
.insight-stat-card .stat-big {
  margin: 2px 0 6px;
}
.insight-stat-card .stat-line {
  padding: 5px 0;
}

/* ===== 布局修复：话术知识库立体感 + 大字号胶囊页签（2026-11-02 用户反馈） ===== */
.knowledge-grid {
  padding: 16px 17px 17px;
  gap: 15px;
}
.knowledge-card {
  border-color: rgba(76, 48, 30, 0.09);
  box-shadow: 0 2px 6px rgba(76, 48, 30, 0.07), 0 1px 2px rgba(76, 48, 30, 0.05);
  transition: box-shadow 0.16s ease, transform 0.16s ease;
}
.knowledge-card:hover {
  box-shadow: 0 6px 16px rgba(76, 48, 30, 0.13), 0 2px 4px rgba(76, 48, 30, 0.06);
  transform: translateY(-2px);
}
.knowledge-card .knowledge-title {
  display: block;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(76, 48, 30, 0.07);
}

/* 知识库页签：放大字号 + 胶囊形态 + 动效 */
#knowledge-tabs {
  gap: 10px;
}
#knowledge-tabs .list-tab {
  height: auto;
  align-self: center;
  padding: 8px 16px;
  border: 1px solid rgba(76, 48, 30, 0.13);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #857b72;
  transition: all 0.18s ease;
}
#knowledge-tabs .list-tab b {
  margin-left: 5px;
  font-size: 12px;
}
#knowledge-tabs .list-tab:hover {
  color: var(--teal);
  border-color: rgba(199, 101, 53, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(76, 48, 30, 0.1);
}
#knowledge-tabs .list-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 3px 10px rgba(199, 101, 53, 0.32);
  transform: translateY(-1px);
}
#knowledge-tabs .list-tab.active b {
  color: rgba(255, 255, 255, 0.85);
}

/* ===== 销售洞察五卡片暖色升级（2026-11-02 用户反馈：比纯白稍深，呼应主题橙） ===== */
.insight-stat-card,
.insight-main {
  background: linear-gradient(180deg, #fffefc 0%, #faf1e9 100%);
  border-color: rgba(199, 101, 53, 0.16);
}
.insight-stat-card > b {
  border-bottom-color: rgba(199, 101, 53, 0.14);
}
.insight-stat-card .stat-big {
  color: #ad512b;
}

/* ===== 客户列表页改版：胶囊页签 + 分层背景 + 行卡片立体悬停（2026-11-02 用户反馈） ===== */
#view-customers .customer-toolbar {
  padding: 12px 17px;
  gap: 12px;
}
#view-customers .customer-toolbar .list-tabs {
  gap: 10px;
  height: auto;
}
#view-customers .customer-toolbar .list-tab {
  height: auto;
  padding: 8px 16px;
  border: 1px solid rgba(76, 48, 30, 0.13);
  border-radius: 999px;
  background: #fff;
  font-size: 14px;
  font-weight: 600;
  color: #857b72;
  transition: all 0.18s ease;
}
#view-customers .customer-toolbar .list-tab b {
  margin-left: 5px;
  font-size: 12px;
}
#view-customers .customer-toolbar .list-tab:hover {
  color: var(--teal);
  border-color: rgba(199, 101, 53, 0.4);
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(76, 48, 30, 0.1);
}
#view-customers .customer-toolbar .list-tab.active {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
  box-shadow: 0 3px 10px rgba(199, 101, 53, 0.32);
}
#view-customers .customer-toolbar .list-tab.active b {
  color: rgba(255, 255, 255, 0.85);
}

/* 列表区：暖色分层背景，行变白色卡片 */
#view-customers .table-wrap {
  padding: 6px 17px 10px;
  background: linear-gradient(180deg, #f9f0e8 0%, #f6e9de 100%);
}
#view-customers table {
  border-collapse: separate;
  border-spacing: 0 8px;
}
#view-customers th {
  background: transparent;
  height: 26px;
  color: #a08f81;
}
#view-customers th:first-child {
  text-align: center;
}
#view-customers td {
  background: #fff;
  height: 56px;
  border-top: 1px solid rgba(76, 48, 30, 0.06);
  border-bottom: 1px solid rgba(76, 48, 30, 0.06);
}
#view-customers td:first-child {
  border-left: 1px solid rgba(76, 48, 30, 0.06);
  border-radius: 12px 0 0 12px;
}
#view-customers td:last-child {
  border-right: 1px solid rgba(76, 48, 30, 0.06);
  border-radius: 0 12px 12px 0;
}
#view-customers tbody tr {
  transition: transform 0.15s ease;
}
#view-customers tbody tr:hover {
  transform: translateY(-1px);
}
#view-customers tbody tr:hover td {
  background: #fffdfb;
  box-shadow: 0 6px 14px rgba(76, 48, 30, 0.13);
}

/* 勾选框：放大 + 主题色 + 手型，弱化突兀感 */
#view-customers input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--teal);
  cursor: pointer;
  transition: transform 0.12s ease;
}
#view-customers input[type="checkbox"]:hover {
  transform: scale(1.15);
}

/* 批量分配栏与表尾微调 */
#view-customers .customer-bulk-toolbar {
  margin: 0 17px;
}
#view-customers .table-footer {
  padding: 4px 24px 14px;
}

/* 实时通话行：可点击进入客户档案 */
.live-call-row {
  cursor: pointer;
}
.live-open-hint {
  display: none;
  font-size: 12px;
  font-weight: 600;
  color: var(--teal);
  white-space: nowrap;
  flex-shrink: 0;
}
.live-call-row:hover .live-open-hint {
  display: inline;
}

.embedded-call-monitor {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #ead8ca;
  border-radius: 8px;
  background: linear-gradient(180deg, #fffaf5 0%, #fff 100%);
  box-shadow: 0 6px 18px rgba(76, 48, 30, 0.08);
}
.project-learning-button[hidden] {
  display: none;
}
.embedded-call-head,
.embedded-call-actions,
.embedded-followup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.embedded-call-head h3 {
  margin: 4px 0;
  color: var(--ink);
  font-size: 17px;
}
.embedded-call-state {
  color: #68736f;
  font-size: 12px;
}
.embedded-call-state .live-dot {
  margin: 0 7px 0 1px;
}
.embedded-call-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, .85fr);
  gap: 12px;
}
.embedded-call-columns .analysis-column {
  min-height: 132px;
}
.embedded-call-transcript {
  max-height: 145px;
  overflow: auto;
}
.embedded-call-transcript p,
.embedded-call-empty {
  margin: 8px 0 0;
  color: #4f5c58;
  font-size: 13px;
  line-height: 1.7;
  white-space: pre-wrap;
}
.embedded-call-empty {
  color: #8b9692;
}
.embedded-call-monitor .big-waveform {
  margin: 10px 0;
}
.embedded-call-actions {
  justify-content: flex-end;
  margin-top: 12px;
}
.embedded-call-readonly {
  color: #857b72;
  font-size: 12px;
}
.embedded-followup-form {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #eee3da;
}
.embedded-followup-form label {
  display: block;
  margin-bottom: 7px;
  color: #51463e;
  font-size: 13px;
  font-weight: 700;
}
.embedded-followup-form textarea {
  width: 100%;
  border: 1px solid #e1d5cb;
  border-radius: 5px;
  padding: 10px;
  color: #302923;
  font: inherit;
  font-size: 13px;
}
.embedded-followup-actions {
  margin-top: 8px;
}
.embedded-followup-actions > span {
  color: #8b8179;
  font-size: 11px;
}
.embedded-call-monitor .suggestion-box p {
  font-size: 12px;
  line-height: 1.65;
}
.project-learning-modal {
  width: min(920px, calc(100vw - 32px));
  max-height: min(92vh, 1000px);
  overflow: auto;
}
.project-learning-modal .detail-subline {
  display: block;
  max-width: 680px;
  margin-top: 6px;
  color: #5c6964;
  line-height: 1.6;
}
.project-learning-modal .config-form {
  gap: 15px;
}
.project-learning-modal textarea {
  min-height: 220px;
  font-size: 14px;
  line-height: 1.7;
}
.project-training-results {
  margin-top: 20px;
  padding-top: 18px;
  border-top: 1px solid #e6ece9;
}
.project-training-results h3 {
  margin: 0 0 12px;
  color: #263b35;
  font-size: 17px;
}
.project-script-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.project-script {
  min-width: 0;
  padding: 14px;
  border: 1px solid #dce8e3;
  border-radius: 6px;
  background: #fbfdfc;
}
.project-script > span {
  display: inline-block;
  margin-bottom: 10px;
  color: #287868;
  font-size: 13px;
  font-weight: 700;
}
.project-script b {
  display: block;
  margin-top: 8px;
  color: #4d5c56;
  font-size: 12px;
}
.project-script p {
  margin: 4px 0;
  color: #303d37;
  font-size: 13px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.project-script small {
  display: block;
  margin-top: 10px;
  color: #777f79;
  line-height: 1.55;
  overflow-wrap: anywhere;
}
@media (max-width: 700px) {
  .embedded-call-columns {
    grid-template-columns: 1fr;
  }
  .embedded-followup-actions {
    align-items: flex-start;
    flex-direction: column;
  }
  .project-script-list {
    grid-template-columns: 1fr;
  }
}

/* ===== 通话工作台弹窗放大（2026-11-11 用户反馈：加宽、顶部字体变大，与其他弹窗一致） ===== */
.call-modal {
  width: min(880px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  padding: 26px 28px;
}
.call-modal .modal-header h2 {
  font-size: 22px;
  line-height: 1.35;
}
.call-modal .modal-header .eyebrow {
  font-size: 12px;
  margin-bottom: 7px;
}
.call-modal .call-live-status b {
  font-size: 15px;
}
.call-modal .call-live-status span {
  font-size: 13px;
  margin-top: 5px;
}
.call-modal .call-live-status > strong {
  font-size: 12px;
}
.call-modal #call-timer {
  font-size: 17px;
}
.call-modal .call-live-status .avatar {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  font-size: 18px;
}
.call-modal .analysis-label {
  font-size: 11px;
}
.call-modal .live-analysis .analysis-column p,
.call-modal .live-analysis .suggestion-box p {
  font-size: 13px;
  line-height: 1.8;
}
.call-modal .live-analysis .analysis-column p b,
.call-modal .live-analysis .suggestion-box b {
  font-size: 13px;
}
.call-modal .call-modal-actions {
  margin-top: 18px;
}
.call-modal .call-modal-actions .button {
  height: 40px;
  padding: 0 18px;
  font-size: 13px;
}

/* ===== 选择客户弹窗加宽放大（2026-11-11 用户反馈） ===== */
.quick-panel {
  width: min(700px, calc(100vw - 48px));
  padding: 26px 28px;
  box-shadow: 0 24px 60px rgba(76, 48, 30, 0.2), 0 8px 20px rgba(76, 48, 30, 0.08);
}
.quick-panel .modal-header h2 {
  font-size: 22px;
}
.quick-panel .modal-header .eyebrow {
  font-size: 12px;
}
.quick-panel-body > p {
  font-size: 13px;
  margin-bottom: 14px;
}
.quick-action {
  padding: 13px 14px;
  border-radius: 10px;
  border-color: rgba(76, 48, 30, 0.1);
  box-shadow: 0 1px 3px rgba(76, 48, 30, 0.06);
  transition: all 0.15s ease;
}
.quick-action:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(76, 48, 30, 0.13);
  border-color: rgba(199, 101, 53, 0.35);
}
.quick-action > span:first-child {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 9px;
  font-size: 15px;
}
.quick-action b {
  font-size: 13.4px;
}
.quick-action small {
  font-size: 11.2px;
  margin-top: 4px;
}
.quick-panel .call-modal-actions .button,
.quick-panel .form-actions .button {
  height: 38px;
  padding: 0 16px;
  font-size: 12.3px;
}

/* ===== 通话记录分页页脚 ===== */
.call-page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0 4px;
  color: #9aa39f;
  font-size: 9px;
}
.call-page-buttons {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-ellipsis {
  color: #9aa39f;
  font-size: 9px;
  padding: 0 2px;
}

/* ===== 话术草稿分组/统计/筛选紧凑化（2026-11-13 用户反馈） ===== */
.pl-scripts-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 18px 0 10px; }
.pl-scripts-head > div > b { font-size: 14px; }
#pl-scripts-stats { display: block; font-size: 12px; color: #8a9993; margin-top: 3px; }
.pl-filters { display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.pl-filters select { border: 1px solid #ddd2c6; border-radius: 8px; padding: 6px 10px; font-size: 12px; background: #fff; color: #493e35; transition: border-color 0.15s ease; }
.pl-filters select:hover, .pl-filters select:focus { border-color: rgba(199, 101, 53, 0.5); }
.ps-group { margin-bottom: 14px; }
.ps-group:last-child { margin-bottom: 0; }
.ps-group-head { display: flex; justify-content: space-between; align-items: center; padding: 7px 2px; border-bottom: 1px dashed rgba(76, 48, 30, 0.15); margin-bottom: 8px; }
.ps-group-head b { font-size: 13px; color: #6b5c4f; }
.ps-group-head span { font-size: 11px; color: #a0958c; }
.project-script { transition: border-color 0.15s ease; }
.project-script.ps-published { background: #f4f9f6; border-color: rgba(76, 144, 114, 0.3); }

/* ===== 团队报表筛选控件：近 7/30/90 天 · 业务员 · 导出 CSV（2026-11-26 用户拍板接着做完） ===== */
.report-controls {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 16px;
  margin-top: 4px;
}
.report-range-btns {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #eee7e0;
  border-radius: 999px;
  background: #fdfaf7;
}
.report-range-btn {
  border: none;
  padding: 7px 16px;
  border-radius: 999px;
  background: transparent;
  color: #857b72;
  font: 600 13px 'Manrope', 'Noto Sans SC', sans-serif;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.report-range-btn:hover { color: #c76535; }
.report-range-btn.active {
  background: linear-gradient(145deg, #c76535, #d77b43);
  color: #fff;
  box-shadow: 0 3px 8px rgba(199, 101, 53, 0.28);
}
.report-member-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #75685e;
  font-size: 12.5px;
}
.report-member-label select {
  min-width: 132px;
  padding: 7px 10px;
  border: 1px solid #eee7e0;
  border-radius: 7px;
  background: #fff;
  color: #3d332c;
  font: 500 13px 'Noto Sans SC', sans-serif;
  transition: border-color 0.15s ease;
}
.report-member-label select:hover,
.report-member-label select:focus { border-color: rgba(199, 101, 53, 0.5); }
@media (max-width: 900px) {
  .report-controls { gap: 8px 10px; }
  .report-range-btn { padding: 6px 12px; }
}

/* ===== 客户导入结果三类明细（成功 / 重复跳过 / 错误跳过） ===== */
.import-report-summary {
  padding: 10px 14px;
  border: 1px solid #ead4c3;
  border-radius: 7px;
  background: linear-gradient(145deg, #fff8f2, #fff);
  color: #3d332c;
  font-size: 13.5px;
}
.import-report-summary b { color: #c76535; margin-right: 10px; }
.import-report-section { margin-top: 14px; }
.import-report-section > b {
  display: block;
  margin-bottom: 6px;
  color: #75685e;
  font-size: 12.5px;
}
.import-report-section table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.import-report-section td {
  padding: 6px 10px;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
  color: #4a4038;
}
.import-report-section td[colspan] { color: #b3552e; }
