.workspace-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.workspace-heading h2 {
  margin: 0 0 7px;
}
.workspace-heading p {
  margin: 0;
  color: #6b7d94;
}
.workspace-count {
  border-radius: 24px;
  padding: 9px 16px;
  background: #edf4ff;
  color: #175bdd;
  font-weight: 700;
}
.onboarding-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.onboarding-steps button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  gap: 10px;
  padding: 18px;
  background: #f7f9fd;
  border: 1px solid #dfe6f0;
  border-radius: 12px;
}
.onboarding-steps button.done {
  background: #eefaf7;
  border-color: #bce5da;
}
.step-number {
  display: grid;
  place-items: center;
  background: #e4ecfd;
  color: #245ed6;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  font-weight: 700;
}
.done .step-number {
  background: #c5eee2;
  color: #117c62;
}
.funnel-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.funnel-grid > div {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 20px;
  border-radius: 12px;
  background: #f5f8fc;
}
.funnel-grid strong {
  font-size: 28px;
  color: #183654;
}
.funnel-grid span {
  color: #667c95;
}
.workspace-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin: 18px 0;
}
.notice-row {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 18px 12px;
  border-bottom: 1px solid #edf0f5;
}
.notice-row > div {
  flex: 1;
}
.notice-row p {
  margin: 7px 0;
}
.notice-row small {
  color: #748399;
}
.notice-row.unread {
  background: #f4f8ff;
  border-left: 3px solid #2563eb;
}
.notice-row > svg {
  width: 24px;
  height: 24px;
  color: #387cd5;
}
.profile-record {
  padding: 12px 0;
  border-bottom: 1px solid #e6edf6;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.profile-record p {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.ticket-thread {
  max-height: 330px;
  overflow-y: auto;
}
.ticket-thread article {
  background: #f5f8fc;
  padding: 15px;
  margin-bottom: 12px;
  border-radius: 10px;
}
.ticket-thread small {
  display: block;
  margin-top: 5px;
  color: #73869f;
}
.ticket-thread p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.6;
}
.client-profile-head h3 {
  font-size: 23px;
  margin: 0;
}
.commission-rule-history {
  margin-top: 22px;
}
.account-balance-details small {
  display: block;
}
.modal:has(.client-profile-head) {
  max-width: 760px;
}
.rule-time-hint {
  font-size: 12px;
  color: #72839c;
}
.notice-counter {
  display: inline-grid;
  place-items: center;
  min-width: 20px;
  height: 20px;
  border-radius: 10px;
  background: #1758d5;
  color: white;
  font-size: 11px;
  padding: 0 5px;
  margin-left: auto;
}
.financial-progress {
  display: inline-block;
  margin-top: 6px;
  font-size: 12px;
  color: #667d96;
}
@media (max-width: 900px) {
  .onboarding-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (max-width: 580px) {
  .workspace-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .onboarding-steps,
  .funnel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .onboarding-steps button {
    padding: 13px;
  }
  .notice-row {
    gap: 10px;
  }
  .notice-row > svg {
    display: none;
  }
  .workspace-actions > span {
    font-size: 13px;
  }
}

.account-toolbar {
  flex-wrap: wrap;
}
.account-opening-policy {
  flex-basis: 100%;
  margin: 4px 0 16px;
}
.profile-record > button {
  align-self: flex-start;
}

.workspace-card {
  padding: 24px;
  margin-bottom: 24px;
}
.workspace-card > p {
  padding: 0;
  margin: 14px 0;
}
.workspace-card > p.notice {
  padding: 16px 18px;
}
.workspace-card .workspace-heading:last-child {
  margin-bottom: 0;
}
@media (max-width: 580px) {
  .workspace-card {
    padding: 18px;
  }
}

/* 财务异常工作台：证据卡片长订单号可换行，表格窄屏横向滚动。 */
.finance-filter {
  padding: 16px;
}
.finance-filter select {
  margin-left: 8px;
  min-width: 160px;
}
.finance-row-actions,
.finance-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.finance-tabs {
  margin: 20px 0 12px;
}
.finance-tabs button.active {
  background: var(--primary, #1854d8);
  color: white;
}
.finance-evidence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 18px 0;
}
.finance-evidence-grid label {
  display: block;
  color: #64748b;
  margin-bottom: 6px;
}
.finance-evidence-grid strong {
  display: block;
  overflow-wrap: anywhere;
}
@media (max-width: 600px) {
  .finance-evidence-grid {
    grid-template-columns: 1fr;
  }
}

/* Keep both payment identifiers readable and selectable on narrow displays. */
.reconciliation-table { min-width: 1100px; table-layout: fixed; white-space: normal; }
.reconciliation-table th, .reconciliation-table td { padding: 12px; overflow-wrap: anywhere; }
.reconciliation-table th:nth-child(5) { width: 240px; }
.reconciliation-table th:last-child { width: 145px; }
.reconciliation-order { min-width: 240px; max-width: 340px; overflow-wrap: anywhere; user-select: text; }
.reconciliation-table td { vertical-align: top; }
/* 金额汇总以后台筛选结果为准，小屏幕自动换行。 */
.finance-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin: 16px 0; }
.finance-summary > .card { display: grid; grid-template-rows: minmax(20px, auto) 32px minmax(20px, auto); align-content: start; gap: 10px; padding: 22px 24px; margin: 0; min-width: 0; }
.finance-summary > .card > small { display: block; margin: 0; line-height: 20px; }
.finance-summary strong { display: block; font-size: 24px; line-height: 32px; margin: 0; font-variant-numeric: tabular-nums; }
.recipient-address { overflow-wrap: anywhere; }
@media (max-width: 720px) { .finance-summary { grid-template-columns: 1fr; } }
