:root {
  --bg: #f6f1e8;
  --panel: #ffffff;
  --panel-muted: #fbf8f2;
  --ink: #181818;
  --muted: #746e63;
  --muted-strong: #4c463e;
  --line: #e6dccc;
  --line-soft: #eee5d8;
  --brand: #1c1a17;
  --brand-strong: #0f0e0c;
  --brand-dark: #181510;
  --brand-soft: #eee8dc;
  --surface: #ffffff;
  --surface-soft: #fbf8f2;
  --surface-muted: #f4f6f8;
  --surface-subtle: #f7f9fb;
  --accent: #8a7a66;
  --accent-strong: #6b5d4b;
  --accent-soft: #eee8dc;
  --blue: #315fba;
  --amber: #b76519;
  --red: #b84242;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 2px rgba(17, 31, 42, 0.05);
  --shadow-md: 0 12px 30px rgba(17, 31, 42, 0.08);
  --shadow-lg: 0 18px 48px rgba(17, 31, 42, 0.14);
  --shadow-hover: 0 16px 38px rgba(17, 31, 42, 0.11);
  --focus: 0 0 0 3px color-mix(in srgb, var(--brand) 18%, transparent);
}

.settlement-metrics {
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  margin: 16px 0;
}

.settlement-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.deal-report-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.4fr) minmax(260px, 1fr) max-content;
  gap: 18px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.risk-report-row {
  display: grid;
  grid-template-columns: minmax(280px, 1.3fr) minmax(240px, 0.9fr) minmax(220px, auto);
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.reversal-request-row {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) max-content;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.deal-report-row.selected {
  border-color: var(--accent, #2864dc);
  box-shadow: inset 3px 0 0 var(--accent, #2864dc);
}

.deal-report-row h4,
.risk-report-row h4,
.reversal-request-row h4,
.settlement-confirmation h4,
.finance-detail-sections h4 {
  margin: 7px 0;
  letter-spacing: 0;
}

.deal-report-number-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.deal-report-number-link:hover,
.deal-report-number-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.deal-report-row p,
.deal-report-row small,
.risk-report-row p,
.risk-report-row small,
.reversal-request-row p,
.reversal-request-row small {
  margin: 4px 0 0;
  color: var(--muted);
}

.settlement-readiness {
  display: grid;
  grid-template-columns: repeat(2, minmax(90px, 1fr));
  gap: 7px;
}

.deal-report-row .settlement-readiness {
  min-width: 260px;
}

.deal-report-row .inline-actions,
.risk-report-row .inline-actions,
.reversal-request-row .inline-actions {
  justify-content: flex-end;
  margin-bottom: 0;
}

.deal-report-row .inline-action,
.risk-report-row .inline-action,
.reversal-request-row .inline-action {
  margin-bottom: 0;
  white-space: nowrap;
}

.deal-report-row > .inline-action {
  justify-self: end;
}

.deal-report-row .inline-action {
  white-space: nowrap;
}

.risk-report-row .inline-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reversal-request-row .inline-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.settlement-readiness span {
  font-size: 12px;
  color: var(--muted);
}

.settlement-readiness b {
  display: block;
  margin-top: 2px;
  color: var(--success, #167850);
}

.settlement-detail,
.settlement-confirmation,
.reversal-list {
  margin-top: 16px;
  padding-top: 18px;
  border-top: 1px solid var(--line-soft);
}

.settlement-detail-grid,
.finance-detail-sections {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.settlement-detail-grid > div,
.finance-detail-sections > article,
.settlement-form-grid > article {
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-subtle, #f8fafc);
}

.settlement-detail-grid span,
.settlement-detail-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.settlement-detail-grid strong {
  display: block;
  margin: 6px 0;
  font-size: 18px;
}

.settlement-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.step-index {
  color: var(--accent, #2864dc);
  font-size: 12px;
  font-weight: 700;
}

.settlement-form-grid dl,
.finance-detail-sections dl {
  display: grid;
  grid-template-columns: minmax(84px, auto) 1fr;
  gap: 7px 10px;
  margin: 10px 0 0;
  font-size: 13px;
}

.settlement-form-grid dt,
.finance-detail-sections dt {
  color: var(--muted);
}

.settlement-form-grid dd,
.finance-detail-sections dd {
  margin: 0;
  text-align: right;
  overflow-wrap: anywhere;
}

.settlement-split-list {
  display: grid;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.settlement-split-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
}

.voucher-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0;
}

.backoffice-report-detail .workflow-heading {
  align-items: flex-start;
}

.backoffice-report-grid {
  margin-top: 12px;
}

.detail-drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.36);
}

.detail-drawer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  width: min(760px, 92vw);
  height: 100vh;
  overflow: hidden;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -22px 0 56px rgba(15, 23, 42, 0.24);
}

.detail-drawer-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px;
  border-bottom: 1px solid var(--line-soft);
}

.detail-drawer-header h3 {
  margin: 3px 0 8px;
  letter-spacing: 0;
}

.detail-drawer-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 18px 20px 0;
}

.detail-drawer-actions {
  position: sticky;
  bottom: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding: 12px 0 16px;
  border-top: 1px solid var(--line-soft);
  background: var(--panel);
}

.backoffice-detail-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.backoffice-detail-tabs .page-tab {
  flex: 0 0 auto;
}

.backoffice-detail-tab-content {
  min-height: 260px;
}

.backoffice-report-detail.compact {
  padding: 0;
  border: 0;
  box-shadow: none;
}

.backoffice-report-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.backoffice-report-summary-grid > div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel-muted);
}

.backoffice-report-summary-grid span,
.backoffice-report-summary-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.backoffice-report-summary-grid strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-detail-card {
  margin-top: 12px;
}

.stage-b1-exception-panel {
  min-height: 0;
  margin-top: 12px;
  border-color: color-mix(in srgb, var(--brand) 24%, var(--line-soft));
  background: color-mix(in srgb, var(--brand) 4%, #fff);
}

.stage-b1-exception-panel .detail-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.stage-b1-exception-panel details {
  padding: 10px 0;
  border-top: 1px solid var(--line-soft);
}

.stage-b1-exception-panel summary {
  cursor: pointer;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.stage-b1-timeline {
  display: grid;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.stage-b1-timeline li {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.stage-b1-timeline li strong,
.stage-b1-timeline li small {
  margin: 0;
}

.stage-b1-timeline li em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.detail-collapse {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.detail-collapse summary {
  cursor: pointer;
  padding: 12px 14px;
  color: var(--ink);
  font-weight: 700;
}

.detail-collapse > :not(summary) {
  margin: 0 14px 14px;
}

.finance-performance-shortcut {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finance-performance-shortcut h4 {
  margin: 4px 0 6px;
}

.audit-mini-list {
  display: grid;
  gap: 6px;
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
}

.performance-table-shell {
  overflow-x: auto;
}

.performance-ledger-scroll {
  max-height: 560px;
  overflow: auto;
  padding-right: 6px;
}

.performance-ledger-table {
  min-width: 1280px;
}

.performance-ledger-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--panel);
}

.performance-ledger-table th:last-child,
.performance-ledger-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 1;
  background: var(--panel);
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
}

.tone-pending { color: #9a6700; border-color: #f2cf87; background: #fff7df; }
.tone-processing { color: #1d4ed8; border-color: #b8d4ff; background: #edf5ff; }
.tone-success { color: #167447; border-color: #a9dec1; background: #ecf9f0; }
.tone-danger { color: #b42318; border-color: #f0b4ae; background: #fff0ef; }
.tone-muted, .tone-neutral { color: var(--muted-strong); border-color: var(--line-soft); background: var(--panel-muted); }

@media (max-width: 760px) {
  .detail-drawer-panel {
    width: 100vw;
  }

  .detail-drawer-header,
  .finance-performance-shortcut {
    flex-direction: column;
  }

  .backoffice-report-summary-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .finance-lock-scroll-list {
    max-height: 480px;
  }
}

.settlement-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.finance-settlement-shell {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(560px, 1.6fr);
  min-height: 560px;
  margin-top: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  overflow: hidden;
}

.finance-settlement-queue {
  padding: 14px;
  border-right: 1px solid var(--line-soft);
  background: var(--surface-subtle, #f8fafc);
  overflow: auto;
}

.queue-head,
.finance-settlement-item > span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.finance-settlement-item {
  width: 100%;
  display: grid;
  gap: 7px;
  margin-top: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface, #fff);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.finance-settlement-item:hover,
.finance-settlement-item.active {
  border-color: var(--accent, #2864dc);
}

.finance-settlement-item i,
.finance-settlement-item em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.finance-settlement-detail {
  padding: 18px;
  overflow: auto;
  max-height: min(760px, calc(100vh - 280px));
}

.finance-lock-grid {
  align-items: start;
}

.finance-lock-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.finance-lock-scroll-list {
  max-height: min(680px, calc(100vh - 360px));
  overflow-y: auto;
  padding-right: 6px;
}

.finance-lock-list-header {
  position: sticky;
  top: 0;
  z-index: 2;
  padding-bottom: 10px;
  background: var(--surface-subtle, #f8fafc);
  border-bottom: 1px solid var(--line-soft);
}

.finance-detail-sections {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.finance-detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.finance-detail-summary-card {
  min-height: 128px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface, #fff);
}

.finance-detail-summary-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.finance-detail-summary-card strong {
  display: block;
  color: var(--ink);
}

.finance-detail-summary-card p {
  margin: 6px 0 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.5;
}

.finance-detail-action-bar {
  position: sticky;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px 0 0;
  background: var(--surface-subtle, #f8fafc);
  border-top: 1px solid var(--line-soft);
}

.review-flow-panel {
  grid-column: 1 / -1;
}

.review-flow-panel .review-timeline span {
  display: grid;
  gap: 3px;
}

.review-flow-panel .review-timeline small {
  color: var(--muted);
}

.settlement-progress {
  margin-top: 14px;
}

.settlement-progress span {
  display: grid;
  gap: 3px;
}

.settlement-progress small {
  color: var(--muted);
}

.review-flow-panel .review-timeline .approved {
  color: var(--success, #167850);
}

.queue-empty {
  padding: 40px 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1100px) {
  .settlement-form-grid,
  .settlement-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-settlement-shell {
    grid-template-columns: 1fr;
  }

  .finance-lock-grid {
    grid-template-columns: 1fr;
  }

  .finance-detail-summary-grid {
    grid-template-columns: 1fr;
  }

  .finance-settlement-queue {
    max-height: 360px;
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
}

@media (max-width: 900px) {
  .deal-report-row,
  .risk-report-row,
  .reversal-request-row {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .deal-report-row .inline-action,
  .risk-report-row .inline-actions,
  .reversal-request-row .inline-actions {
    justify-self: stretch;
    justify-content: flex-start;
  }

  .deal-report-row > .inline-action {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .settlement-form-grid,
  .settlement-detail-grid,
  .finance-detail-sections {
    grid-template-columns: 1fr;
  }

  .settlement-form-actions {
    justify-content: stretch;
    flex-wrap: wrap;
  }
}

/*
 * 客户详情只调整页面信息层级：客户事实、签约入口、资料与跟进记录各自成组。
 * 不改变按钮事件、客户保护、签约、带看、成交报数或任何数据状态，仅重排既有 DOM 的视觉呈现。
 */
.customer-detail-shell {
  gap: 16px;
}

.customer-detail-shell .customer-detail-head {
  align-items: flex-start;
  gap: 24px;
  padding: 2px 0 16px;
  border-bottom: 1px solid var(--line);
}

.customer-detail-shell .customer-detail-head > div:first-child {
  max-width: 760px;
}

.customer-detail-shell .customer-detail-head h3 {
  margin-bottom: 8px;
  font-size: 26px;
}

.customer-detail-shell .property-actions {
  max-width: 560px;
  gap: 8px;
}

.customer-detail-shell .customer-summary-metrics {
  gap: 0;
  margin: -2px 0 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-muted);
  box-shadow: none;
}

.customer-detail-shell .customer-summary-card.detail-metric-card {
  min-height: 70px;
  padding: 12px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell .customer-summary-card.detail-metric-card:last-child {
  border-right: 0;
}

.customer-detail-shell .customer-summary-card span {
  font-size: 12px;
  font-weight: 700;
}

.customer-detail-shell .customer-summary-card strong {
  overflow: hidden;
  font-size: 18px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 高发操作改为紧凑工具条，避免签约与报数占据一整块业务内容高度。 */
.customer-detail-shell > .customer-high-frequency-actions {
  grid-template-columns: minmax(0, 1fr) 1px auto;
  gap: 10px;
  min-height: 48px;
  margin: 0;
  padding: 4px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry,
.customer-detail-shell > .customer-high-frequency-actions > .inline-action {
  min-height: 40px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 0 8px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 15px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy {
  grid-template-columns: auto auto 1fr;
  gap: 6px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy strong {
  font-size: 14px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy small {
  padding: 2px 5px;
  font-size: 11px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-templates {
  display: flex;
  grid-column: auto;
  gap: 4px;
  align-items: center;
  margin: 0;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-templates em {
  padding: 2px 5px;
  font-size: 10px;
  white-space: nowrap;
}

.customer-detail-shell > .customer-high-frequency-actions .customer-high-frequency-divider {
  min-height: 28px;
}

.customer-detail-shell > .customer-high-frequency-actions > .inline-action {
  width: auto;
  min-width: 142px;
  padding: 0 14px;
  border-radius: 7px;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-icon {
  font-size: 16px;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-copy strong {
  font-size: 14px;
}

/* 合同状态保持为可扫描的业务清单，不再与客户资料竞争卡片层级。 */
.customer-detail-shell .signature-status-card {
  margin: 0;
  padding: 0;
}

.customer-detail-shell .signature-status-card .workflow-heading {
  min-height: 44px;
  padding: 10px 0 6px;
}

.customer-detail-shell .signature-status-card .workflow-heading h3 {
  font-size: 18px;
}

.customer-detail-shell .signature-status-row {
  min-height: 58px;
  padding: 8px 0;
}

.customer-detail-shell .signature-row-actions {
  grid-template-columns: 110px 110px;
  gap: 8px;
}

.customer-detail-shell .signature-state,
.customer-detail-shell .signature-row-actions .inline-action {
  min-height: 32px;
  width: 110px;
  min-width: 0;
  font-size: 12px;
}

/* 资料左重、待办右轻；原有每张 detail-card 的内容与按钮均保留。 */
.customer-detail-shell .customer-detail-grid {
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: 12px 18px;
  align-items: start;
}

.customer-detail-shell .customer-detail-card {
  min-height: 0;
  padding: 16px;
  border-radius: var(--radius);
  box-shadow: none;
}

.customer-detail-shell .customer-detail-card.large {
  grid-row: span 2;
  min-height: 0;
}

.customer-detail-shell .customer-detail-card.compact {
  min-height: 0;
}

.customer-detail-shell .customer-profile .detail-card-body {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 20px;
}

.customer-detail-shell .customer-profile p {
  align-items: baseline;
  padding: 9px 0;
}

.customer-detail-shell .customer-detail-card:not(.customer-profile) {
  display: grid;
  align-content: start;
  gap: 8px;
}

.customer-detail-shell .customer-detail-card:not(.customer-profile) p {
  margin: 0;
  color: var(--muted-strong);
  line-height: 1.55;
}

.customer-detail-shell .workflow-columns {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 28px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.customer-detail-shell .workflow-columns > div {
  min-width: 0;
}

.customer-detail-shell .workflow-columns .workflow-heading {
  min-height: 44px;
  padding: 10px 0 6px;
}

.customer-detail-shell .workflow-columns .detail-card {
  min-height: 0;
  margin: 0;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell .workflow-columns .detail-card p {
  margin: 5px 0;
}

@media (max-width: 1100px) {
  .customer-detail-shell .customer-summary-card.detail-metric-card:nth-child(3n) {
    border-right: 0;
  }

  .customer-detail-shell .customer-summary-card.detail-metric-card:nth-child(-n + 3) {
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .customer-detail-shell .customer-detail-head {
    gap: 14px;
  }

  .customer-detail-shell .customer-summary-metrics,
  .customer-detail-shell .customer-detail-grid,
  .customer-detail-shell .workflow-columns {
    grid-template-columns: 1fr;
  }

  .customer-detail-shell .customer-summary-card.detail-metric-card,
  .customer-detail-shell .customer-summary-card.detail-metric-card:nth-child(3n) {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .customer-detail-shell .customer-summary-card.detail-metric-card:last-child {
    border-bottom: 0;
  }

  .customer-detail-shell > .customer-high-frequency-actions {
    grid-template-columns: 1fr;
    padding: 8px 0;
  }

  .customer-detail-shell > .customer-high-frequency-actions .customer-high-frequency-divider {
    display: none;
  }

  .customer-detail-shell > .customer-high-frequency-actions > .inline-action {
    width: 100%;
  }

  .customer-detail-shell .esign-entry-templates {
    grid-column: 1 / -1;
  }

  .customer-detail-shell .customer-profile .detail-card-body {
    grid-template-columns: 1fr;
  }

  .customer-detail-shell .customer-detail-card.large {
    grid-row: auto;
  }
}

.station-workspace {
  display: grid;
  gap: 18px;
}

.station-page-head {
  align-items: flex-end;
}

.station-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.station-two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 16px;
}

.station-task-card,
.station-card,
.station-boundary-grid article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.station-task-card {
  min-height: 68px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.station-task-card + .station-task-card {
  margin-top: 8px;
}

.station-task-card p,
.station-card p,
.station-boundary-grid p {
  margin: 4px 0 0;
  color: var(--muted);
}

.station-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.station-card {
  padding: 16px;
  display: grid;
  gap: 14px;
}

.station-card h4 {
  margin: 10px 0 0;
  font-size: 17px;
}

.station-card dl {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.station-card dt {
  color: var(--muted);
  font-size: 12px;
}

.station-card dd {
  margin: 3px 0 0;
  font-weight: 650;
}

.station-booking-form {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface, #fff);
}

.station-booking-form label {
  display: grid;
  gap: 7px;
}

.station-booking-form label > span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 650;
}

.station-booking-form input,
.station-booking-form select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--surface, #fff);
  color: var(--ink);
  padding: 0 10px;
}

.offline-service-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 16px;
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.offline-service-form label {
  display: grid;
  align-content: start;
  gap: 7px;
}

.offline-service-form label > span {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.offline-service-form input,
.offline-service-form select,
.offline-service-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.offline-service-form textarea {
  min-height: 88px;
  resize: vertical;
}

.offline-service-form .wide,
.offline-form-actions {
  grid-column: 1 / -1;
}

.offline-service-form .check-field {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
}

.offline-service-form .check-field input {
  width: 16px;
  min-height: 16px;
  margin: 0;
}

.offline-form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.offline-form-actions span {
  color: var(--muted);
  font-size: 12px;
}

.record-type-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.record-type-summary span {
  padding: 6px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  color: var(--muted-strong);
  font-size: 12px;
}

.station-boundary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.station-boundary-grid article {
  padding: 18px;
}

.station-boundary-grid article:last-child {
  border-color: rgba(185, 74, 72, .28);
}

@media (max-width: 1100px) {
  .station-metrics,
  .station-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .station-two-column,
  .station-booking-form,
  .offline-service-form {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 700px) {
  .offline-service-form,
  .station-card-grid {
    grid-template-columns: 1fr;
  }

  .offline-form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .property-media-gallery {
    min-height: 0;
  }

  .property-gallery-main,
  .property-gallery-main > img,
  .property-gallery-main > .property-gallery-placeholder {
    min-height: 220px;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0) 320px),
    var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
}

button,
select,
input {
  outline: none;
}

button {
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

button:active {
  transform: translateY(1px);
}

button:focus-visible,
select:focus-visible,
input:focus-visible {
  border-color: var(--brand);
  box-shadow: var(--focus);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.hidden {
  display: none !important;
}

.toast-host {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: flex;
  align-items: center;
  gap: 10px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 16px;
  border: 1px solid rgba(37, 111, 76, 0.28);
  border-radius: 8px;
  background: #f5fbf7;
  color: #174e35;
  box-shadow: 0 14px 36px rgba(18, 31, 25, 0.16);
}

.toast-host[data-type="error"] {
  border-color: rgba(176, 61, 58, 0.3);
  background: #fff7f6;
  color: #9f302f;
}

.result-card-host {
  position: fixed;
  top: 18px;
  left: 50%;
  z-index: 1150;
  width: min(720px, calc(100vw - 32px));
  transform: translateX(-50%);
}

.result-card-host > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid #bed8c8;
  border-radius: 8px;
  background: #f8fcf9;
  box-shadow: 0 16px 42px rgba(21, 42, 31, 0.18);
}

.result-card-host p {
  margin: 3px 0 0;
  color: var(--muted);
}

.action-dialog-overlay {
  position: fixed;
  inset: 0;
  z-index: 1250;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(20, 22, 20, 0.48);
}

.action-dialog {
  width: min(620px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface, #fff);
  box-shadow: 0 24px 70px rgba(15, 18, 16, 0.24);
}

.action-dialog > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.action-dialog > p {
  margin: 10px 0 18px;
  color: var(--muted);
  white-space: pre-line;
}

.action-dialog-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.action-dialog-fields label:not(.check-field) {
  display: grid;
  gap: 6px;
  color: var(--muted-strong);
  font-size: 13px;
}

.action-dialog-fields label:has(textarea) {
  grid-column: 1 / -1;
}

.action-dialog-fields input,
.action-dialog-fields select,
.action-dialog-fields textarea {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft, #fafafa);
  color: var(--ink);
  font: inherit;
}

.action-dialog-fields textarea {
  min-height: 84px;
  resize: vertical;
}

.action-dialog-readonly {
  grid-column: 1 / -1;
}

.bank-reversal-impact {
  border: 1px solid var(--line-soft);
  background: var(--surface-soft, #fafafa);
  padding: 14px;
  border-radius: 8px;
}

.bank-reversal-impact.is-blocked {
  border-color: rgba(185, 74, 72, 0.32);
  background: rgba(185, 74, 72, 0.05);
}

.bank-reversal-impact .detail-card-title h4 {
  margin: 2px 0 0;
  font-size: 15px;
}

.bank-reversal-impact > p,
.bank-reversal-impact li p,
.bank-reversal-impact li small {
  margin: 5px 0 0;
}

.impact-blockers {
  margin: 10px 0;
  padding: 10px 12px 10px 30px;
  color: var(--red);
  background: rgba(185, 74, 72, 0.06);
  border-radius: 6px;
}

.check-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
}

.check-field input {
  width: 18px;
  min-height: 18px;
}

.governed-empty-state {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 24px;
  border: 1px dashed var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft, #fafafa);
}

.governed-empty-state.compact-empty {
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
}

.governed-empty-state.compact-empty > div {
  min-width: 0;
}

.empty-state-icon {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 50%;
  background: #e8f0ec;
  color: #245f45;
  font-size: 20px;
}

.governed-empty-state h3,
.governed-empty-state p {
  margin: 0 0 6px;
}

.governed-empty-state small {
  display: block;
  margin-bottom: 12px;
  color: var(--muted);
}

.filter-stack {
  display: grid;
  gap: 8px;
}

.filter-bar button.active {
  border-color: #286949;
  background: #eaf4ee;
  color: #1d573b;
  font-weight: 700;
}

.selected-filters {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 34px;
  color: var(--muted);
  font-size: 13px;
}

.disabled-action,
button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none !important;
}

@media (max-width: 720px) {
  .action-dialog-fields {
    grid-template-columns: 1fr;
  }

  .action-dialog-fields label:has(textarea) {
    grid-column: auto;
  }

  .result-card-host > div {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .result-card-host .inline-actions {
    grid-column: 1 / -1;
  }

  .toast-host {
    right: 16px;
    bottom: 16px;
  }

  .selected-filters {
    align-items: flex-start;
    flex-direction: column;
  }
}

.login-screen {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
  padding: clamp(24px, 5vw, 72px);
  background:
    linear-gradient(135deg, rgba(28, 26, 23, 0.96), rgba(59, 53, 46, 0.92)),
    radial-gradient(circle at 18% 16%, rgba(214, 181, 107, 0.24), transparent 30%),
    var(--bg);
}

.login-visual {
  color: #fbf6e9;
}

.login-brand-mark {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 28px;
  border: 1px solid rgba(214, 181, 107, 0.56);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.08);
  color: #e5c775;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: 0;
}

.login-visual h1 {
  max-width: 560px;
  margin: 8px 0 12px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 0.96;
}

.login-visual p:not(.eyebrow) {
  max-width: 500px;
  color: rgba(251, 246, 233, 0.72);
  font-size: 18px;
  line-height: 1.7;
}

.login-proof-grid {
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  margin-top: 34px;
}

.login-proof-grid span {
  min-height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(214, 181, 107, 0.22);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.06);
  color: rgba(251, 246, 233, 0.82);
  font-weight: 800;
}

.login-panel {
  width: 100%;
  max-width: 460px;
  justify-self: end;
  display: grid;
  gap: 16px;
  padding: 24px;
  border: 1px solid rgba(214, 181, 107, 0.28);
  border-radius: 10px;
  background: #fbf8f0;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
}

.login-panel h2 {
  margin: 4px 0 0;
  font-size: 28px;
}

.login-form {
  display: grid;
  gap: 12px;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.login-form input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.login-submit,
.test-account-toggle {
  min-height: 44px;
  border: 1px solid #1c1a17;
  border-radius: var(--radius);
  background: #1c1a17;
  color: #fff9eb;
  font-weight: 900;
  cursor: pointer;
}

.test-account-toggle {
  background: #fff;
  color: #1c1a17;
}

.device-auth-toggle {
  justify-self: start;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
}

.device-auth-toggle:hover {
  color: var(--brand-strong);
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #ad3f34;
  font-size: 13px;
  font-weight: 800;
}

.backend-status {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.55);
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.45;
}

.backend-status::before {
  width: 7px;
  height: 7px;
  margin-right: 8px;
  border-radius: 50%;
  background: #8b8f95;
  content: "";
  flex: 0 0 auto;
}

.backend-status[data-status="connected"] {
  border-color: rgba(35, 125, 82, 0.22);
  color: #237d52;
}

.backend-status[data-status="connected"]::before {
  background: #237d52;
}

.backend-status[data-status="disconnected"] {
  border-color: rgba(185, 74, 72, 0.22);
  background: rgba(185, 74, 72, 0.06);
  color: var(--red);
}

.backend-status[data-status="disconnected"]::before {
  background: var(--red);
}

.login-submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.test-account-panel {
  display: grid;
  gap: 12px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}

.device-auth-panel {
  display: grid;
  gap: 10px;
}

.quick-login-unlock-panel {
  display: grid;
}

.quick-login-unlock-form {
  display: grid;
  gap: 7px;
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.58);
}

.quick-login-unlock-form > label {
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 800;
}

.quick-login-unlock-form > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.quick-login-unlock-form input {
  min-width: 0;
  height: 38px;
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 5px;
  background: #fff;
}

.quick-login-unlock-form button {
  min-width: 64px;
  border: 0;
  border-radius: 5px;
  background: var(--ink);
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.device-auth-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.72);
}

.device-auth-card strong {
  font-size: 13px;
}

.device-auth-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.device-auth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.device-auth-actions button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted-strong);
  font-weight: 800;
  cursor: pointer;
}

.device-auth-actions button:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.test-device-form {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.test-device-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.test-device-form label.wide {
  grid-column: span 2;
}

.test-device-form input {
  min-height: 38px;
  min-width: 0;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

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

.test-device-feature-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted-strong);
}

.test-device-table {
  margin-top: 12px;
}

.test-account-group {
  display: grid;
  gap: 8px;
}

.test-account-group h3 {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.test-account-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
}

.test-account-card strong,
.test-account-card small {
  display: block;
}

.test-account-card small,
.test-account-card p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.test-account-actions {
  display: grid;
  gap: 8px;
  min-width: 92px;
}

.test-account-card button {
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--amber);
  border-radius: var(--radius);
  background: #fff8e6;
  color: #7a5a12;
  font-weight: 900;
  cursor: pointer;
}

.test-account-card button[data-copy-credential] {
  border-color: var(--line-soft);
  background: #fff;
  color: var(--muted-strong);
}

.forgot-password {
  justify-self: start;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}

.app-shell.auth-hidden {
  display: none;
}

.app-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0)),
    var(--brand-dark);
  color: #fff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 52px;
  margin-bottom: 18px;
  padding: 0 6px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  font-weight: 800;
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  margin-top: 3px;
  color: #aab8c6;
  font-size: 12px;
}

.module-nav {
  display: grid;
  gap: 5px;
  min-height: 0;
  overflow: auto;
  padding-bottom: 12px;
}

.nav-group {
  display: grid;
  gap: 4px;
}

.nav-group-button,
.nav-child-button,
.nav-button {
  width: 100%;
  min-height: 42px;
  display: grid;
  grid-template-columns: 30px 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: #c8d3df;
  text-align: left;
  cursor: pointer;
}

.nav-group-button {
  min-height: 38px;
  color: #d3deea;
}

.nav-group-button:hover,
.nav-group.active .nav-group-button,
.nav-button:hover {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.nav-group.active .nav-group-button,
.nav-button.active {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--accent), var(--shadow-sm);
}

.nav-chevron {
  color: #91a2b2;
  font-size: 16px;
}

.nav-children {
  display: none;
  gap: 3px;
  margin-left: 15px;
  padding: 2px 0 4px 10px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.nav-children.expanded {
  display: grid;
}

.nav-child-button {
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0 9px;
  border-radius: 9px;
  color: #aebdcc;
}

.nav-child-button:hover {
  background: rgba(255, 255, 255, 0.055);
  color: #fff;
}

.nav-child-button.active {
  border-color: rgba(243, 213, 141, 0.2);
  background: rgba(243, 213, 141, 0.12);
  color: #fff;
}

.nav-child-button.readonly-preview small {
  color: #b4c0cc;
  font-size: 10px;
}

.nav-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.045);
  color: #9fb0bf;
}

.nav-icon svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-group-button:hover .nav-icon,
.nav-group.active .nav-icon,
.nav-button:hover .nav-icon {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.08);
  color: #f3d58d;
}

.nav-group.active .nav-icon,
.nav-button.active .nav-icon {
  border-color: rgba(243, 213, 141, 0.28);
  background: rgba(243, 213, 141, 0.12);
  color: #f3d58d;
}

.nav-child-button small,
.nav-button small {
  color: #91a2b2;
  font-size: 11px;
}

.sidebar-account {
  position: relative;
  margin-top: auto;
  padding: 14px 6px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-account-user {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.sidebar-account-avatar {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #f4d889;
  font-size: 13px;
  font-weight: 900;
}

.sidebar-account-name,
.sidebar-account-workspace {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-account-name {
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.sidebar-account-workspace {
  margin-top: 3px;
  color: #91a2b2;
  font-size: 12px;
}

.sidebar-logout-button {
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: #aab8c6;
  text-align: left;
  cursor: pointer;
}

.sidebar-logout-button:hover {
  background: rgba(184, 66, 66, 0.12);
  color: #ffb5b5;
}

.sidebar-logout-button:active {
  transform: translateY(1px);
}

.sidebar-logout-icon {
  width: 18px;
  text-align: center;
  font-size: 15px;
  line-height: 1;
}

.workspace {
  min-width: 0;
  max-width: 1500px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 24px 28px;
}

.topbar,
.hero-panel,
.main-grid,
.design-grid {
  display: grid;
  gap: 16px;
}

.topbar {
  position: sticky;
  z-index: 5;
  top: 0;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px) minmax(210px, 260px) auto;
  align-items: center;
  margin: -22px -24px 16px;
  padding: 16px 24px 14px;
  border-bottom: 1px solid rgba(219, 228, 234, 0.8);
  background: rgba(242, 245, 246, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.global-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: end;
}

.global-tools label {
  grid-column: 1 / -1;
  color: var(--muted);
  font-size: 12px;
}

.global-tools input {
  min-height: 38px;
  min-width: 0;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.global-search-results {
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: var(--shadow-md);
}

.global-results-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.global-results-head span {
  color: var(--muted);
}

.global-results-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.global-result {
  min-height: 82px;
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #e4e9ef;
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.global-result:hover {
  border-color: color-mix(in srgb, var(--brand) 38%, transparent);
  background: #fff;
}

.global-result span,
.global-result small {
  color: var(--muted);
}

.notification-dot {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 19px;
  height: 19px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: var(--red);
  color: #fff;
  font-size: 11px;
  line-height: 1;
}

.notification-center {
  display: grid;
  gap: 12px;
}

.notification-center .global-results-head > div {
  display: grid;
  gap: 2px;
}

.notification-center .global-results-head > div span {
  font-size: 12px;
}

.notification-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.notification-filters button {
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted-strong);
  cursor: pointer;
}

.notification-filters button.active,
.notification-filters button:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, transparent);
  background: var(--brand-soft);
  color: var(--brand);
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.notification-card.priority-high {
  border-left-color: var(--red);
}

.notification-card.priority-medium {
  border-left-color: var(--amber);
}

.notification-card.read {
  background: var(--panel-muted);
}

.notification-main {
  display: grid;
  gap: 4px;
  min-height: 64px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.notification-main span,
.notification-main small {
  color: var(--muted);
  line-height: 1.45;
}

.workspace-switcher {
  position: relative;
  display: grid;
  gap: 6px;
}

.workspace-switcher-label {
  color: var(--muted);
  font-size: 11px;
  line-height: 1;
}

.workspace-current {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}

.workspace-current span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
}

.workspace-current b {
  color: var(--brand);
  font-size: 14px;
}

.workspace-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 20;
  display: grid;
  gap: 6px;
  width: min(360px, 86vw);
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.workspace-option {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: transparent;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.workspace-option:hover,
.workspace-option.active {
  border-color: color-mix(in srgb, var(--brand) 36%, transparent);
  background: var(--surface-soft);
}

.workspace-option small {
  color: var(--muted);
  line-height: 1.45;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.workspace-subtitle {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

h2 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

.eyebrow {
  margin-bottom: 6px;
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
}

.role-login {
  display: grid;
  gap: 6px;
}

.role-login label {
  color: var(--muted);
  font-size: 12px;
}

.role-simulator-help {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.role-login select {
  min-width: 188px;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.hero-panel {
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: end;
  min-height: 176px;
  padding: 22px;
  border: 1px solid rgba(16, 39, 53, 0.1);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, var(--brand-dark), var(--brand-strong) 52%, color-mix(in srgb, var(--accent) 82%, var(--brand))),
    linear-gradient(90deg, rgba(255, 255, 255, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.05) 1px, transparent 1px);
  background-size: auto, 36px 36px, 36px 36px;
  color: #fff;
  box-shadow: 0 18px 42px rgba(16, 39, 53, 0.12);
}

.hero-panel h2 {
  margin-bottom: 10px;
  font-size: 32px;
  line-height: 1.18;
}

.hero-panel p {
  max-width: 760px;
  margin-bottom: 0;
  color: #dce9ef;
  line-height: 1.7;
}

.role-card {
  min-height: 124px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  border-radius: var(--radius);
  background: rgba(8, 23, 32, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.role-card span,
.role-card p {
  color: #c9d8e2;
}

.role-card strong {
  display: block;
  margin: 10px 0;
  font-size: 24px;
  line-height: 1.2;
}

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

.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}

.kpi-card {
  min-height: 104px;
  padding: 16px;
  border-top: 3px solid var(--brand);
  box-shadow: var(--shadow-sm);
}

.kpi-card:hover {
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
  box-shadow: var(--shadow-md);
}

.kpi-card span,
.kpi-card small {
  display: block;
  color: var(--muted);
}

.kpi-card strong {
  display: block;
  margin: 8px 0 6px;
  font-size: 24px;
  font-variant-numeric: tabular-nums;
}

.main-grid {
  grid-template-columns: minmax(0, 1.45fr) minmax(320px, 0.55fr);
  margin-bottom: 16px;
}

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

.design-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  margin-top: 16px;
}

.panel {
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.large-panel > .panel-header {
  display: none;
}

.workspace-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 12px;
  padding: 0 2px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.breadcrumb-link {
  border: 0;
  background: transparent;
  color: var(--muted-strong);
  font: inherit;
  cursor: pointer;
  padding: 2px 0;
}

.breadcrumb-link:hover {
  color: var(--brand-strong);
}

.breadcrumb-current {
  color: var(--ink);
  font-weight: 650;
}

.breadcrumb-separator {
  color: var(--muted);
}

.submodule-scope-header {
  margin: 0 0 18px;
  padding: 0 2px 14px;
  border-bottom: 1px solid var(--line-soft);
}

.submodule-scope-header .eyebrow {
  margin-bottom: 4px;
}

.submodule-scope-header h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.25;
}

.submodule-scope-header p:last-child {
  max-width: 760px;
  margin: 6px 0 0;
  color: var(--muted-strong);
}

.followup-timeline-card {
  border-left: 3px solid var(--brand);
}

.icon-button {
  position: relative;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.icon-button:hover {
  border-color: color-mix(in srgb, var(--brand) 36%, transparent);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 14, 12, 0.48);
}

.confirm-dialog {
  width: min(420px, 100%);
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: var(--panel);
  box-shadow: var(--shadow-lg);
}

.confirm-dialog h2 {
  margin: 0 0 8px;
  font-size: 20px;
}

.confirm-dialog p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.confirm-cancel,
.confirm-danger {
  min-height: 38px;
  padding: 0 14px;
  border-radius: var(--radius);
  cursor: pointer;
}

.confirm-cancel {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted-strong);
}

.confirm-cancel:hover {
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.confirm-danger {
  border: 1px solid rgba(184, 66, 66, 0.28);
  background: rgba(184, 66, 66, 0.08);
  color: var(--red);
  font-weight: 800;
}

.confirm-danger:hover {
  background: rgba(184, 66, 66, 0.14);
  border-color: rgba(184, 66, 66, 0.4);
}

.module-detail {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.module-detail.property-workspace-shell {
  grid-template-columns: 1fr;
}

.module-detail.module-workspace-shell {
  grid-template-columns: 1fr;
}

.module-summary,
.agent-status-strip,
.cap-panel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.summary-chip,
.agent-status-strip > div,
.cap-panel > div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
  box-shadow: var(--shadow-sm);
}

.summary-chip span,
.agent-status-strip span,
.cap-panel span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.summary-chip strong,
.agent-status-strip strong,
.cap-panel strong {
  font-size: 20px;
}

.summary-chip.risk {
  border-color: rgba(184, 66, 66, 0.38);
  background: #fff7f7;
}

.summary-chip.warn {
  border-color: rgba(183, 101, 25, 0.38);
  background: #fff9ef;
}

.summary-chip.ok {
  border-color: color-mix(in srgb, var(--brand) 36%, transparent);
  background: var(--brand-soft);
}

.property-workbench {
  display: grid;
  gap: 14px;
}

.business-path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.business-path button {
  min-height: 28px;
  padding: 0 2px;
  border: 0;
  background: transparent;
  color: var(--brand);
  font: inherit;
  cursor: pointer;
}

.business-path button:hover {
  color: var(--brand-strong);
  text-decoration: underline;
}

.business-path i {
  color: var(--muted);
  font-style: normal;
}

.business-path span {
  color: var(--ink);
}

.back-path-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--line-soft);
}

.icon-back-button {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.icon-back-button span {
  font-size: 18px;
  line-height: 1;
}

.icon-back-button:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, transparent);
  background: var(--brand-soft);
}

.icon-back-button.compact {
  width: 34px;
  justify-content: center;
  padding: 0;
}

.high-frequency-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: stretch;
}

.esign-entry {
  min-height: 74px;
  min-width: 180px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.esign-entry-icon,
.esign-entry > span {
  grid-row: span 3;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 20px;
}

.esign-entry-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
  align-content: center;
}

.esign-entry strong {
  margin: 0;
  font-size: 15px;
}

.esign-entry small,
.esign-entry em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}

.esign-entry-templates {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 2px;
}

.esign-entry-templates em {
  padding: 2px 6px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--panel-muted);
  line-height: 1.35;
}

.esign-entry:hover {
  border-color: color-mix(in srgb, var(--brand) 46%, transparent);
  background: var(--brand-soft);
}

.esign-entry.static-entry {
  cursor: default;
}

.esign-drawer {
  position: fixed;
  right: 18px;
  top: 78px;
  z-index: 40;
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100vh - 96px);
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.drawer-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.drawer-head h3 {
  margin: 0;
}

.template-grid,
.contract-list {
  display: grid;
  gap: 10px;
}

.template-chip,
.contract-card {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.template-chip {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 2px 10px;
  align-items: center;
  text-align: left;
  color: var(--ink);
  cursor: pointer;
}

.template-chip span {
  grid-row: span 2;
  color: var(--brand);
  font-size: 18px;
}

.template-chip small,
.contract-card p {
  color: var(--muted);
}

.signer-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0;
}

.signer-list span {
  padding: 4px 8px;
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.agent-workbench,
.workflow-section {
  display: grid;
  gap: 14px;
}

.agent-home-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #ffffff 0%, #f5faf8 100%);
  box-shadow: var(--shadow-sm);
}

.agent-home-head h3 {
  margin: 2px 0 6px;
  font-size: 24px;
}

.agent-home-head p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.identity-pill {
  flex: 0 0 auto;
  max-width: 280px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--brand) 28%, transparent);
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 800;
  text-align: right;
}

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

.work-metric-card {
  min-height: 112px;
  display: grid;
  align-content: start;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  text-align: left;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.work-metric-card:hover {
  border-color: color-mix(in srgb, var(--brand) 34%, transparent);
  background: var(--brand-soft);
}

.work-metric-card span,
.work-metric-card small {
  color: var(--muted);
  font-size: 12px;
}

.work-metric-card strong {
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.risk-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.risk-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 92px;
  padding: 12px;
  border: 1px solid rgba(183, 101, 25, 0.28);
  border-radius: var(--radius);
  background: #fffaf2;
  box-shadow: var(--shadow-sm);
}

.risk-card p {
  margin: 4px 0 0;
  color: var(--muted);
}

.growth-panel {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.growth-panel summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.growth-panel summary::-webkit-details-marker {
  display: none;
}

.growth-panel summary span {
  color: var(--ink);
  font-weight: 900;
}

.growth-panel summary b {
  color: var(--muted);
  font-size: 12px;
}

.growth-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.growth-grid > div {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.growth-grid span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
}

.growth-grid strong {
  font-size: 18px;
}

.growth-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 14px;
}

.settings-workspace {
  gap: 16px;
}

.account-center-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.account-center-card,
.account-current-card,
.account-boundary-note {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.account-center-card,
.account-current-card {
  display: grid;
  gap: 16px;
  align-items: center;
  padding: 16px;
}

.account-current-card {
  grid-template-columns: minmax(0, 1fr) auto;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--accent-soft) 52%, #fff), #fff 58%),
    var(--panel);
}

.account-center-card span,
.account-current-card span {
  color: var(--muted);
  font-size: 12px;
}

.account-center-card strong,
.account-current-card strong {
  display: block;
  margin: 6px 0;
  font-size: 22px;
}

.account-center-card p,
.account-current-card p,
.account-boundary-note p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.account-boundary-note {
  padding: 14px;
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
  background: var(--accent-soft);
}

.primary-action {
  background: var(--brand);
  color: #fff;
}

.workflow-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
}

.todo-list,
.customer-list {
  display: grid;
  gap: 10px;
}

.todo-card,
.customer-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 88px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
  box-shadow: var(--shadow-sm);
}

.todo-card:hover,
.customer-card:hover {
  border-color: color-mix(in srgb, var(--brand) 28%, transparent);
  background: #fff;
}

.todo-card > span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 900;
}

.todo-card.priority-high > span {
  background: #fbecec;
  color: var(--red);
}

.todo-card.priority-medium > span {
  background: #fff4e3;
  color: var(--amber);
}

.todo-card p,
.customer-card p {
  margin-bottom: 4px;
  color: var(--muted);
  line-height: 1.45;
}

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

.customer-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: stretch;
}

.customer-profile {
  display: grid;
  gap: 8px;
}

.customer-profile p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.customer-profile p:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.customer-profile span {
  color: var(--muted);
}

.customer-profile b {
  color: var(--ink);
  text-align: right;
}

.match-card,
.timeline-card {
  min-height: 0;
  margin-bottom: 10px;
}

.match-score {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 10px;
}

.match-score span,
.match-score b {
  padding: 4px 8px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.2;
}

.match-score span {
  background: var(--brand);
  color: #fff;
}

.match-score b {
  background: var(--brand-soft);
  color: var(--brand);
}

.as-button {
  width: 100%;
  display: block;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.as-button:hover {
  border-color: color-mix(in srgb, var(--brand) 32%, transparent);
  background: #fff;
}

.form-row {
  display: grid;
  gap: 6px;
  margin-bottom: 10px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.form-row input {
  min-height: 36px;
  width: 100%;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
}

.property-page-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
}

.property-page-head h3 {
  margin: 0 0 6px;
  font-size: 24px;
  line-height: 1.25;
}

.property-page-head p {
  margin-bottom: 0;
  color: var(--muted);
}

.property-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.property-actions button,
.text-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  cursor: pointer;
}

.property-actions button {
  padding: 0 10px;
  font-weight: 700;
  box-shadow: var(--shadow-sm);
}

.property-actions button:hover,
.filter-bar button:hover,
.tab-button:hover,
.inline-action:hover {
  border-color: color-mix(in srgb, var(--brand) 42%, transparent);
  background: var(--brand-soft);
  color: var(--brand-strong);
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-bar button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}

.audit-note {
  padding: 10px 12px;
  border: 1px solid rgba(199, 119, 32, 0.28);
  border-radius: var(--radius);
  background: #fff8ec;
  color: #7a4d18;
  font-size: 13px;
  line-height: 1.5;
}

.text-button {
  margin-bottom: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  font-weight: 800;
}

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

.property-category-card,
.quick-entry,
.property-list-card {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  box-shadow: var(--shadow-sm);
}

.property-category-card {
  min-height: 164px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 7px;
  padding: 14px;
}

.property-category-card:hover,
.quick-entry:hover,
.property-list-card:hover {
  border-color: color-mix(in srgb, var(--brand) 45%, transparent);
  background: #fff;
  box-shadow: var(--shadow-hover);
  transform: translateY(-1px);
}

.property-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 900;
}

.property-category-card strong {
  font-size: 18px;
}

.property-category-card b {
  color: var(--brand-dark);
  font-size: 20px;
}

.property-category-card small,
.property-list-card small {
  color: var(--muted);
  line-height: 1.45;
}

.property-category-card i {
  color: var(--brand);
  font-style: normal;
  font-weight: 800;
}

.quick-entry-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
}

.quick-entry {
  min-height: 92px;
  display: grid;
  gap: 4px;
  padding: 12px;
}

.quick-entry span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: var(--radius);
  background: #eef3f6;
  color: var(--blue);
  font-weight: 900;
}

.quick-entry b {
  color: var(--muted);
  font-size: 12px;
}

.property-list {
  display: grid;
  gap: 10px;
}

.property-list-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 14px;
}

.property-list-card strong {
  display: block;
  margin-bottom: 7px;
  font-size: 16px;
}

.property-list-card p {
  margin-bottom: 7px;
  color: var(--muted);
  line-height: 1.5;
}

.property-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
  max-width: 220px;
}

.property-badges span {
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.property-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.empty-state {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.54);
  color: var(--muted);
}

.detail-card,
.deal-report-row,
.risk-report-row,
.reversal-request-row,
.doc-item,
.schema-item {
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
  box-shadow: var(--shadow-sm);
}

.detail-card {
  min-height: 150px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detail-card:hover {
  border-color: color-mix(in srgb, var(--brand) 22%, transparent);
  background: #fff;
}

.detail-card strong {
  display: block;
  margin-bottom: 8px;
}

.detail-card p {
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.55;
}

.detail-card small {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  line-height: 1.45;
}

.detail-card-grid {
  display: grid;
  gap: 14px;
  align-items: stretch;
}

.detail-card-header,
.detail-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

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

.detail-card-footer,
.detail-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.detail-section {
  display: grid;
  gap: 12px;
}

.detail-metric-grid,
.customer-summary-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.detail-metric-card,
.customer-summary-card {
  min-height: 96px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  box-shadow: var(--shadow-sm);
}

.customer-summary-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.customer-summary-card strong {
  font-size: 22px;
  color: var(--ink);
}

.customer-detail-head {
  gap: 16px;
}

.customer-detail-card {
  min-height: 168px;
}

.customer-detail-card.compact {
  min-height: 140px;
}

.customer-detail-card.large {
  min-height: 220px;
}

.phone-history-list {
  display: grid;
  gap: 4px;
  padding-top: 4px;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 1100px) {
  .customer-summary-metrics,
  .detail-metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.status-flow {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-flow span {
  padding: 7px 10px;
  border: 1px solid #dce7ef;
  border-radius: var(--radius);
  background: #f7fafb;
  color: var(--brand-dark);
  font-size: 12px;
  font-weight: 800;
}

.cap-panel {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.compact-summary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cap-panel .progress-track {
  grid-column: 1 / -1;
  min-height: 10px;
  padding: 0;
  overflow: hidden;
  border: 0;
  background: #e7edf2;
}

.progress-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand);
}

.cap-panel p {
  grid-column: 1 / -1;
  margin-bottom: 0;
  color: var(--muted);
}

.tag {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 12px;
  font-weight: 700;
}

.inline-action {
  min-height: 32px;
  margin: 0 0 10px;
  padding: 0 10px;
  border: 1px solid var(--brand);
  border-radius: var(--radius);
  background: #fff;
  color: var(--brand);
  font-weight: 800;
  cursor: pointer;
}

.settlement-list {
  display: grid;
  gap: 10px;
}

.legacy-settlement-row {
  display: grid;
  grid-template-columns: 1fr 56px 98px;
  align-items: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 12px;
}

.legacy-settlement-row b {
  color: var(--amber);
}

.segmented {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

.tab-button {
  min-height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
}

.tab-button.active {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

th,
td {
  padding: 12px;
  border-bottom: 1px solid #edf1f4;
  text-align: left;
  font-size: 13px;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f7f9;
  color: var(--muted);
  font-weight: 800;
}

tbody tr:hover {
  background: #f8fbfa;
}

tr:last-child td {
  border-bottom: 0;
}

.doc-list,
.schema-list {
  display: grid;
  gap: 8px;
}

.doc-item {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}

.doc-method {
  color: var(--blue);
  font-weight: 800;
}

.doc-item p,
.schema-item {
  color: var(--muted);
  line-height: 1.55;
}

.schema-item {
  padding: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}

.download-page {
  min-height: 100dvh;
  padding: 28px;
  background: var(--bg);
}

.download-hero,
.download-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.download-hero {
  max-width: 980px;
  margin: 0 auto 16px;
  padding: 28px;
}

.download-hero h1 {
  margin-bottom: 10px;
}

.download-hero p:last-child {
  margin-bottom: 0;
  color: var(--muted);
}

.download-grid {
  max-width: 980px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0 auto;
}

.download-card {
  min-height: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
}

.download-mark {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border-radius: var(--radius);
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 800;
}

.download-card p {
  color: var(--muted);
  line-height: 1.6;
}

.download-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
}

.download-link:hover {
  background: var(--brand-strong);
}

.download-card code {
  display: block;
  overflow-wrap: anywhere;
  padding: 10px;
  border-radius: var(--radius);
  background: #f3f6f8;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    max-height: none;
  }

  .module-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-panel,
  .main-grid,
  .design-grid {
    grid-template-columns: 1fr;
  }

  .property-core-grid,
  .property-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-metric-grid,
  .growth-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-center-grid,
  .workflow-columns,
  .customer-detail-grid,
  .detail-card-grid {
    grid-template-columns: 1fr;
  }

  .risk-list {
    grid-template-columns: 1fr;
  }

  .quick-entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .login-screen {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  .login-visual h1 {
    font-size: 42px;
  }

  .detail-card-grid,
  .customer-detail-grid,
  .customer-summary-metrics,
  .detail-metric-grid {
    grid-template-columns: 1fr;
  }

  .login-proof-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .login-panel {
    max-width: none;
    justify-self: stretch;
  }

  .test-account-card {
    grid-template-columns: 1fr;
  }

  .workspace {
    padding: 14px;
  }

  .topbar {
    grid-template-columns: 1fr;
    position: static;
    margin: 0 0 12px;
    padding: 0;
    border-bottom: 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }

  .module-nav,
  .kpi-grid,
  .module-detail,
  .work-metric-grid,
  .workflow-columns,
  .customer-detail-grid,
  .risk-list,
  .account-center-grid,
  .growth-grid,
  .property-core-grid,
  .quick-entry-grid,
  .property-detail-grid {
    grid-template-columns: 1fr;
  }

  .agent-home-head,
  .back-path-row,
  .property-page-head,
  .risk-card,
  .notification-card,
  .account-current-card,
  .account-center-card,
  .property-list-card {
    grid-template-columns: 1fr;
  }

  .agent-home-head {
    display: grid;
  }

  .identity-pill {
    max-width: none;
    text-align: left;
  }

  .growth-panel summary {
    display: grid;
  }

  .property-page-head {
    display: grid;
  }

  .back-path-row {
    align-items: flex-start;
    gap: 6px;
  }

  .business-path {
    min-width: 0;
    font-size: 11px;
  }

  .icon-back-button b {
    max-width: 96px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .high-frequency-actions,
  .esign-entry {
    width: 100%;
  }

  .esign-drawer {
    inset: auto 10px 10px;
    top: 72px;
    width: auto;
    max-height: calc(100vh - 86px);
  }

  .property-actions,
  .property-badges {
    justify-content: flex-start;
  }

  .todo-card,
  .customer-card,
  .property-list-card {
    align-items: start;
  }

  .todo-card,
  .customer-card {
    grid-template-columns: 1fr;
  }

  .inline-actions {
    width: 100%;
  }

  .inline-action,
  .property-actions button,
  .filter-bar button {
    min-height: 36px;
  }

  .hero-panel {
    padding: 20px;
  }

  .hero-panel h2 {
    font-size: 28px;
  }

  .download-page {
    padding: 14px;
  }

  .download-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================================================== */
/* 经纪人作业工作台第一批：紧凑导航、今日作业、任务队列与消息抽屉             */
/* ========================================================================== */

@media (min-width: 1081px) {
  .app-shell {
    grid-template-columns: 216px minmax(0, 1fr);
  }
}

.sidebar {
  overflow: visible;
}

.brand {
  gap: 9px;
}

.brand > div:nth-child(2) {
  min-width: 0;
}

.brand > div:nth-child(2) strong,
.brand > div:nth-child(2) span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.module-nav {
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
}

.nav-group-button {
  min-height: 40px;
  padding: 5px 8px;
}

.nav-child-button {
  min-height: 32px;
  padding: 5px 8px 5px 42px;
  font-size: 12px;
}

.sidebar-account-user {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}

.sidebar-account-user-static {
  cursor: default;
}

.sidebar-account-chevron {
  margin-left: auto;
  color: #91a1b2;
}

.sidebar-account-menu {
  position: absolute;
  left: 6px;
  bottom: calc(100% + 4px);
  z-index: 20;
  width: 250px;
  max-height: 360px;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid #dce3ea;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 14px 34px rgba(16, 28, 40, 0.2);
}

.sidebar-account-menu > p {
  margin: 4px 6px 7px;
  color: #667789;
  font-size: 11px;
  font-weight: 700;
}

.sidebar-account-menu .sidebar-logout-button {
  margin-top: 5px;
  border-top: 1px solid #edf1f5;
  color: #536474;
}

.agent-home-v2 {
  gap: 10px;
}

.compact-home-head {
  min-height: 66px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.compact-home-head h3 {
  margin: 0 0 2px;
  font-size: 20px;
}

.compact-home-head p {
  margin: 0;
}

.agent-home-global-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.compact-metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.compact-metric-grid .work-metric-card {
  min-height: 76px;
  padding: 10px 12px;
  border-radius: 7px;
  text-align: left;
}

.compact-metric-grid .work-metric-card strong {
  font-size: 22px;
}

.compact-metric-grid .work-metric-card small {
  display: block;
  margin-top: 2px;
}

.compact-work-section,
.home-quick-section,
.professional-reminders {
  padding: 0;
  border: 0;
  background: transparent;
}

.workflow-heading {
  min-height: 36px;
  margin-bottom: 5px;
}

.workflow-heading h3 {
  font-size: 16px;
}

.text-action {
  border: 0;
  background: transparent;
  color: #315477;
  font-size: 12px;
  cursor: pointer;
}

.compact-todo-list {
  max-height: 252px;
  overflow-y: auto;
  padding-right: 3px;
}

.compact-todo-list .todo-card {
  min-height: 56px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  padding: 7px 9px;
  border-radius: 7px;
}

.compact-todo-list .todo-card > span {
  width: 26px;
  height: 26px;
}

.compact-todo-list .todo-card p {
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-deal-list .active-deal-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) minmax(180px, 0.7fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.deal-progress-compact {
  display: flex;
  gap: 4px;
}

.deal-progress-compact span {
  padding: 3px 6px;
  border-radius: 4px;
  background: #eef3f8;
  color: #536474;
  font-size: 10px;
}

.deal-progress-compact .current {
  background: #e5eef9;
  color: #244e77;
  font-weight: 700;
}

.compact-quick-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.compact-quick-grid .quick-entry,
.quick-more > summary {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 2px 8px;
  min-height: 68px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.compact-quick-grid .nav-icon {
  grid-row: 1 / 3;
}

.compact-quick-grid small {
  color: var(--muted);
}

.quick-more {
  position: relative;
}

.quick-more > summary {
  list-style: none;
}

.quick-more > div {
  position: absolute;
  right: 0;
  z-index: 8;
  width: 190px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.quick-more > div button {
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.quick-more > div button:hover {
  background: #f2f6fa;
}

.professional-reminders > button {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid rgba(169, 99, 24, 0.28);
  border-radius: 7px;
  background: #fff8ed;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.professional-reminders > button div {
  display: grid;
}

.agent-task-center {
  display: grid;
  gap: 10px;
}

.compact-page-head {
  padding-bottom: 10px;
}

.agent-task-tabs,
.agent-task-business-filters {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
}

.agent-task-tabs > button,
.agent-task-business-filters button,
.agent-task-tabs summary {
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: #536474;
  cursor: pointer;
  white-space: nowrap;
}

.agent-task-tabs > button small {
  margin-left: 6px;
}

.agent-task-tabs > button.active,
.agent-task-business-filters button.active {
  border-color: #315477;
  background: #315477;
  color: #fff;
}

.agent-task-tabs details {
  position: relative;
  margin-left: auto;
}

.agent-task-tabs details span {
  position: absolute;
  right: 0;
  z-index: 5;
  width: 260px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  box-shadow: var(--shadow-md);
  color: var(--muted);
  font-size: 11px;
}

.agent-task-list {
  display: grid;
  gap: 7px;
}

.agent-task-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 72px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.task-state-mark {
  padding: 5px 3px;
  border-radius: 5px;
  background: #eef3f8;
  color: #536474;
  font-size: 10px;
  font-weight: 700;
  text-align: center;
}

.task-state-mark.overdue {
  background: #fff0f0;
  color: #a23c3c;
}

.task-row-main {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.task-row-main > span,
.task-row-main > small {
  color: var(--muted);
  font-size: 10px;
}

.task-row-main p {
  overflow: hidden;
  margin: 0;
  color: #667789;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.global-search-results:has(.notification-center) {
  position: fixed;
  inset: 0 0 0 auto;
  z-index: 80;
  width: min(460px, 100vw);
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  box-shadow: -18px 0 44px rgba(15, 28, 40, 0.18);
}

.notification-center {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  height: 100vh;
  padding: 0;
}

.notification-center .global-results-head {
  min-height: 62px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}

.notification-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.compact-notification-filters {
  flex-wrap: nowrap;
  overflow-x: auto;
  padding: 9px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.agent-notification-list {
  min-height: 0;
  max-height: none;
  overflow-y: auto;
  padding: 8px 10px 18px;
}

.agent-notification-list .notification-card {
  position: relative;
  display: block;
  padding: 0;
  border-radius: 7px;
}

.agent-notification-list .notification-main {
  display: grid;
  width: 100%;
  gap: 3px;
  padding: 10px 66px 10px 11px;
  text-align: left;
}

.agent-notification-list .notification-main time {
  color: #8996a3;
  font-size: 10px;
}

.notification-read-action {
  position: absolute;
  top: 10px;
  right: 8px;
  padding: 3px 5px;
  border: 0;
  background: transparent;
  color: #607488;
  font-size: 10px;
  cursor: pointer;
}

.service-entry-card {
  display: grid;
  min-height: 118px;
  padding: 12px;
  text-align: left;
  cursor: pointer;
}

.service-entry-card b {
  color: #315477;
  font-size: 11px;
}

@media (max-width: 900px) {
  .compact-metric-grid,
  .compact-quick-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-deal-list .active-deal-row,
  .agent-task-row {
    grid-template-columns: 1fr;
  }

  .deal-progress-compact {
    display: none;
  }
}

.stage-b3-panel {
  display: grid;
  gap: 14px;
  border-left: 3px solid #35705a;
}

.stage-b3-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stage-b3-summary span {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--surface-soft, #f7f8f8);
}

.stage-b3-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
}

.stage-b3-history {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.stage-b3-history li {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.stage-b3-history li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stage-b3-history p,
.stage-b3-history small {
  margin: 5px 0 0;
}

.stage-b3-actions {
  justify-content: flex-start;
}

.stage-b3-workbench {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

@media (max-width: 900px) {
  .stage-b3-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.payment-workbench-grid {
  display: grid;
  grid-template-columns: minmax(250px, .9fr) minmax(270px, 1fr) minmax(330px, 1.2fr);
  gap: 12px;
  align-items: start;
}

.payment-workbench-column {
  min-width: 0;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
}

.payment-workbench-column > header {
  min-height: 72px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.payment-workbench-column h4,
.payment-workbench-column h5 { margin: 2px 0 0; }

.payment-scroll-list {
  max-height: 620px;
  overflow: auto;
  padding: 8px;
}

.payment-transaction-row,
.payment-report-row {
  width: 100%;
  min-height: 92px;
  display: grid;
  gap: 6px;
  padding: 10px 11px;
  margin: 0 0 6px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.payment-transaction-row {
  min-height: 56px;
  gap: 1px;
  padding: 4px 7px;
  margin-bottom: 4px;
  line-height: 1.1;
}

.payment-transaction-row small,
.payment-transaction-row em { font-size: 10.5px; }

.payment-transaction-row:hover,
.payment-report-row:hover,
.payment-transaction-row.active,
.payment-report-row.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.payment-transaction-row.active,
.payment-report-row.active {
  border-width: 2px;
  box-shadow: inset 3px 0 0 var(--accent);
}

.payment-transaction-row span,
.payment-report-row span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.payment-transaction-row i,
.payment-report-row i,
.payment-transaction-row em,
.payment-report-row em,
.payment-transaction-row small,
.payment-report-row small {
  color: var(--muted);
  font-style: normal;
}

.allocation-panel { padding-bottom: 12px; }

.payment-queue-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 2px 0 10px;
  border-bottom: 1px solid var(--line-soft);
}

.payment-queue-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted-strong);
  white-space: nowrap;
}

.payment-queue-tabs button strong {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--ink);
  font-size: 12px;
}

.payment-queue-tabs button.active {
  border-color: var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 1px 2px rgba(20, 29, 38, 0.08);
}

.payment-efficiency-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--line-soft);
}

.payment-efficiency-strip span {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  background: var(--surface);
  color: var(--muted-strong);
  font-size: 12px;
}

.payment-efficiency-strip strong { color: var(--ink); font-size: 16px; }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.finance-matching-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(300px, 1.1fr) minmax(300px, auto);
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line-soft);
}

.payment-inbox-mode {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.workflow-section.payment-inbox-mode { gap: 0; }

.payment-inbox-header {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto auto;
  align-items: center;
  gap: 14px;
  height: 48px;
  min-height: 48px;
  box-sizing: border-box;
  border-bottom: 1px solid var(--line-soft);
}

.payment-inbox-header h3 { margin: 2px 0; font-size: 22px; }
.payment-inbox-header p { display: none; }
.payment-inbox-position { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.payment-inbox-position strong { min-width: 64px; text-align: center; }
.payment-inbox-tools { display: flex; align-items: center; gap: 8px; }
.payment-inbox-section-nav { display: flex; align-items: center; padding-right: 8px; border-right: 1px solid var(--line-soft); }
.payment-inbox-section-nav button { min-height: 34px; padding: 0 9px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted-strong); cursor: pointer; font-size: 12px; }
.payment-inbox-section-nav button.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }
.payment-inbox-tools details { position: relative; }
.payment-inbox-tools summary { list-style: none; cursor: pointer; padding: 9px 12px; border: 1px solid var(--line); border-radius: 6px; font-weight: 600; }
.payment-inbox-tools summary::-webkit-details-marker { display: none; }
.payment-inbox-tools details > div { position: absolute; right: 0; z-index: 10; display: grid; gap: 4px; min-width: 150px; margin-top: 6px; padding: 6px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); box-shadow: var(--shadow); }
.payment-inbox-tools details button { border: 0; background: transparent; padding: 9px 10px; text-align: left; cursor: pointer; }
.payment-inbox-tools details button:hover { background: var(--surface-soft); }

.finance-demo-scenario-bar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: 8px;
  height: 36px;
  min-height: 36px;
  margin: 2px 0 0;
  padding: 2px 8px;
  box-sizing: border-box;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-soft);
}
.finance-demo-scenario-bar > div:first-child { display: grid; grid-template-columns: auto minmax(180px, 1fr) auto; align-items: center; gap: 6px; }
.finance-demo-scenario-bar label { color: var(--muted); font-size: 12px; font-weight: 700; }
.finance-demo-scenario-bar select { min-width: 0; height: 30px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); padding: 0 8px; color: var(--ink); }
.finance-demo-scenario-bar span { color: var(--muted); font-size: 12px; white-space: nowrap; }
.finance-demo-scenario-bar p { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }
.finance-demo-scenario-bar .inline-actions { flex-wrap: nowrap; justify-content: flex-end; }
.finance-demo-scenario-bar .inline-action { min-height: 30px; padding-top: 5px; padding-bottom: 5px; }
.finance-demo-guide-list { display: grid; gap: 10px; margin: 0; padding-left: 22px; }
.finance-demo-guide-list li { padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 6px; }
.finance-demo-guide-list strong,
.finance-demo-guide-list span,
.finance-demo-guide-list small { display: block; }
.finance-demo-guide-list span,
.finance-demo-guide-list small { margin-top: 4px; color: var(--muted); }
.finance-demo-guide-list p { margin: 7px 0; font-size: 13px; }

.payment-inbox-toolbar {
  display: grid;
  grid-template-columns: minmax(430px, 1fr) minmax(280px, 420px);
  align-items: center;
  gap: 12px;
  margin: 2px 0;
}

.payment-inbox-tabs { display: grid; grid-template-columns: repeat(4, minmax(96px, 1fr)); border-bottom: 1px solid var(--line-soft); }
.payment-inbox-tabs button { display: flex; justify-content: center; align-items: center; gap: 8px; min-height: 34px; border: 0; border-bottom: 2px solid transparent; background: transparent; color: var(--muted-strong); cursor: pointer; }
.payment-inbox-tabs button.active { border-bottom-color: var(--ink); color: var(--ink); font-weight: 700; }
.payment-inbox-tabs strong { min-width: 20px; padding: 1px 5px; border-radius: 5px; background: var(--surface-soft); font-size: 12px; }
.payment-inbox-search { display: grid; grid-template-columns: minmax(0, 1fr) 38px; }
.payment-inbox-search input { width: 100%; height: 34px; border: 1px solid var(--line); border-radius: 6px 0 0 6px; padding: 0 12px; }
.payment-inbox-search button { border: 1px solid var(--line); border-left: 0; border-radius: 0 6px 6px 0; background: var(--surface); cursor: pointer; }

.payment-inbox-main { min-height: min(500px, calc(100dvh - 300px)); }
.payment-inbox-card {
  display: grid;
  grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr);
  grid-template-rows: auto 1fr;
  min-height: min(500px, calc(100dvh - 300px));
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  overflow: hidden;
}

.payment-inbox-bank { grid-row: 1 / span 2; padding: 24px; border-right: 1px solid var(--line-soft); background: var(--surface-soft); }
.payment-inbox-bank > strong { display: block; margin: 8px 0 22px; font-size: 30px; line-height: 1; }
.payment-inbox-bank dl { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 11px 8px; margin: 0; font-size: 13px; }
.payment-inbox-bank dt { color: var(--muted); }
.payment-inbox-bank dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.payment-inbox-choice { grid-column: 2; padding: 18px 22px 0; }
.payment-inbox-choice h4 { margin: 3px 0 12px; font-size: 16px; }
.payment-inbox-choice > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.payment-inbox-candidate { display: grid; gap: 7px; min-height: 112px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); text-align: left; cursor: pointer; }
.payment-inbox-candidate.active { border-color: var(--accent); box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
.payment-inbox-candidate > span { display: flex; justify-content: space-between; gap: 8px; }
.payment-inbox-candidate em { color: var(--green, #2f7a57); font-style: normal; font-size: 12px; }
.payment-inbox-candidate small { color: var(--muted); }
.payment-inbox-candidate ul { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; padding: 0; list-style: none; font-size: 12px; }

.payment-inbox-conclusion { grid-column: 2; align-self: stretch; display: flex; flex-direction: column; padding: 22px 26px; min-width: 0; }
.payment-inbox-conclusion h4 { margin: 4px 0 6px; font-size: 22px; }
.payment-inbox-conclusion > p { margin: 0 0 12px; color: var(--muted-strong); }
.payment-judgement { align-self: flex-start; padding: 4px 8px; border-radius: 5px; background: var(--surface-soft); color: var(--muted-strong); font-size: 12px; font-weight: 700; }
.payment-judgement.is-positive { background: rgba(42, 129, 91, .1); color: var(--green, #2f7a57); }
.payment-judgement.is-warning { background: rgba(180, 118, 31, .11); color: var(--amber); }
.payment-inbox-reasons { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 8px 0 14px; font-size: 13px; }
.payment-inbox-reasons strong { width: 100%; }
.payment-inbox-reasons span::before { content: "✓"; margin-right: 5px; color: var(--green, #2f7a57); }
.payment-inbox-after { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px; background: var(--surface-soft); border: 1px solid var(--line-soft); border-radius: 6px; font-size: 13px; }
.payment-inbox-after span { display: flex; justify-content: space-between; gap: 8px; }
.payment-inbox-primary { margin-top: auto; padding-top: 14px; }
.payment-inbox-primary button { width: 100%; min-height: 46px; justify-content: center; }
.payment-inbox-actions { display: flex; gap: 8px; margin-top: 8px; }
.payment-inbox-actions > * { flex: 1 1 0; justify-content: center; }
.payment-score-details { margin-top: 8px; color: var(--muted); font-size: 12px; }
.payment-score-details summary { cursor: pointer; }
.payment-inbox-exception .payment-inbox-conclusion,
.payment-inbox-completed .payment-inbox-conclusion { justify-content: center; }
.payment-inbox-allocation-list { display: grid; gap: 6px; margin-top: 10px; }
.payment-inbox-allocation-list span { display: flex; justify-content: space-between; padding: 8px 10px; background: var(--surface-soft); border-radius: 5px; }
.payment-inbox-empty { display: grid; place-content: center; min-height: min(500px, calc(100dvh - 300px)); border: 1px dashed var(--line); text-align: center; }
.payment-inbox-empty strong { font-size: 18px; }
.payment-inbox-empty p { color: var(--muted); }
.payment-search-empty { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; padding: 8px 10px; border: 1px dashed var(--line); color: var(--muted); font-size: 12px; }
.payment-search-empty strong { color: var(--ink); }

.finance-inbox-shell > .workspace-breadcrumb { display: none; }

.payment-split-workspace { min-height: min(500px, calc(100dvh - 300px)); border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.payment-split-workspace > header { display: flex; justify-content: space-between; align-items: start; gap: 16px; padding: 16px 18px; border-bottom: 1px solid var(--line-soft); }
.payment-split-workspace h3 { margin: 3px 0; }
.payment-split-workspace p { margin: 0; color: var(--muted); }
.payment-split-conservation { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; background: var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.payment-split-conservation span { display: grid; gap: 3px; padding: 10px 14px; background: var(--surface-soft); font-size: 12px; }
.payment-split-conservation strong { font-size: 16px; }
.payment-split-table { padding: 8px 18px; }
.payment-split-row { display: grid; grid-template-columns: 48px minmax(190px, 1fr) minmax(120px, .45fr) minmax(140px, .5fr); align-items: center; gap: 12px; min-height: 54px; border-bottom: 1px solid var(--line-soft); }
.payment-split-row small { display: block; color: var(--muted); }
.payment-split-row input[type="text"], .payment-split-row input[inputmode="decimal"] { width: 100%; height: 36px; border: 1px solid var(--line); border-radius: 5px; padding: 0 10px; }
.payment-split-head { min-height: 34px; color: var(--muted); font-size: 12px; }
.payment-split-workspace form > footer { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 18px; border-top: 1px solid var(--line-soft); }
.payment-split-workspace form > footer span { color: var(--muted); font-size: 12px; }

.payment-batch-preview {
  display: grid;
  max-height: min(420px, 52vh);
  overflow-y: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
}

.payment-batch-preview-row {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(100px, .55fr) minmax(130px, .8fr) minmax(190px, 1.4fr);
  gap: 10px;
  align-items: center;
  min-height: 44px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}

.payment-batch-preview-row:last-child { border-bottom: 0; }
.payment-batch-preview-row.is-head { position: sticky; top: 0; z-index: 1; min-height: 34px; background: var(--surface-soft); color: var(--muted); }
.payment-batch-preview-row small { color: var(--muted-strong); }

.finance-matching-header h3 { margin: 2px 0 3px; font-size: 22px; }
.finance-matching-header p { margin: 0; }
.finance-matching-header > div:first-child > p:last-child { color: var(--muted); font-size: 13px; }
.demo-mode-badge { margin-left: 6px; font-weight: 600; }

.finance-search-hit-strip {
  display: flex;
  gap: 8px;
  margin: 10px 0;
  overflow-x: auto;
  padding-bottom: 2px;
}

.stage-b2-payment-workbench .list-search-toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin: 8px 0;
  padding: 0;
  border: 0;
}

.stage-b2-payment-workbench .list-search-field span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
.stage-b2-payment-workbench .list-search-field input { height: 38px; }
.stage-b2-payment-workbench .list-search-meta { white-space: nowrap; }

.finance-search-hit {
  display: grid;
  flex: 0 0 min(320px, 80vw);
  gap: 3px;
  padding: 9px 11px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.finance-search-hit:hover {
  border-color: var(--line-strong);
  background: var(--surface-muted);
}

.finance-search-hit span {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-context-report {
  display: grid;
  gap: 5px;
  margin: 12px;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-muted);
}

.payment-context-report > span,
.payment-context-report > small { color: var(--muted); }

.payment-context-report .inline-action { justify-self: start; }

.payment-smart-grid {
  display: grid;
  grid-template-columns: minmax(240px, 28fr) minmax(330px, 42fr) minmax(270px, 30fr);
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.stage-b2-payment-workbench .property-page-head {
  align-items: flex-start;
  gap: 24px;
}

.payment-header-actions {
  min-width: max-content;
  align-items: center;
}

.payment-header-actions button {
  min-height: 36px;
  padding: 0 10px;
  white-space: nowrap;
}

.stage-b2-payment-workbench:not(.matcher-v2-shell) .payment-smart-grid .payment-workbench-column {
  min-width: 0;
  height: clamp(440px, calc(100dvh - 280px), 560px);
  min-height: 440px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface);
}

.payment-workbench-column > header {
  min-height: 50px;
  padding: 7px 10px;
}

.payment-workbench-column > header h4 { font-size: 15px; }

.payment-list-toolbar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}

.payment-inline-search {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 6px;
  margin: 0;
}

.payment-inline-search .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.payment-inline-search input {
  grid-column: 1;
  grid-row: 1;
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  font-size: 14px;
}

.payment-inline-search input:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 18%, transparent);
  outline-offset: 0;
}

.payment-inline-search button {
  grid-column: 2;
  grid-row: 1;
  width: 38px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-muted);
  color: var(--muted);
}

.payment-filter-row {
  display: none;
}

.payment-filter-row span {
  padding: 3px 7px;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  color: var(--muted);
  font-size: 11px;
}

.payment-smart-grid .payment-scroll-list {
  max-height: none;
  height: calc(100% - 50px - 46px);
  padding: 7px;
  overscroll-behavior: contain;
}

[data-payment-exception-candidate-panel] {
  align-self: start;
  display: grid;
  grid-template-rows: auto auto minmax(210px, 1fr) auto;
  height: clamp(405px, calc(100dvh - 350px), 480px) !important;
  min-height: 405px !important;
}

[data-payment-exception-candidate-panel] .payment-scroll-list {
  height: auto;
  min-height: 210px;
  max-height: 310px;
}

[data-payment-exception-candidate-panel] > header {
  min-height: 62px;
}

[data-payment-exception-candidate-list] .payment-report-row {
  box-sizing: border-box;
  min-height: 126px;
  max-height: 142px;
  gap: 5px;
  padding: 10px 12px 12px;
  overflow: hidden;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

[data-payment-exception-candidate-list] .payment-report-row.active {
  border-width: 1px;
  box-shadow: inset 3px 0 0 var(--accent);
}

.payment-candidate-title b,
.payment-candidate-facts strong,
.payment-preview-facts dd,
.payment-result-summary dd,
.payment-result-summary > div strong,
.payment-split-preview td:nth-child(n+3) {
  font-variant-numeric: tabular-nums;
}

.payment-candidate-facts {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px !important;
}

.payment-candidate-facts small,
.payment-candidate-facts strong {
  min-width: 0;
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-candidate-facts strong {
  color: var(--ink);
  text-align: right;
}

[data-payment-exception-candidate-list] .payment-report-row ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-height: 25px;
  margin: 2px 0 0;
  padding: 0;
  overflow: hidden;
  list-style: none;
}

[data-payment-exception-candidate-list] .payment-report-row li {
  padding: 3px 6px;
  border-radius: 4px;
  background: var(--surface-muted);
  color: var(--muted-strong);
  font-size: 11px;
}

.confidence-high { color: var(--green) !important; }
.confidence-review { color: var(--blue) !important; }
.confidence-low { color: var(--amber) !important; }
.confidence-none { color: var(--muted) !important; }
.confidence-blocked { color: var(--red) !important; }
.payment-report-row.is-blocked {
  border-color: color-mix(in srgb, var(--red) 34%, var(--line));
  background: color-mix(in srgb, var(--red) 5%, var(--surface));
}
.payment-report-row.is-blocked:disabled { opacity: 1; cursor: not-allowed; }
.payment-report-row.is-blocked .risk-text { margin: 8px 0 0; }

[data-payment-exception-candidate-panel] .candidate-more {
  align-self: center;
  width: calc(100% - 16px);
  min-height: 38px;
  margin: 4px 8px 8px;
  justify-content: center;
}

[data-payment-exception-candidate-panel] .candidate-more span {
  min-width: 20px;
  margin-left: 4px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.payment-extra-candidates {
  display: grid;
}

.payment-extra-candidates.hidden {
  display: none;
}

.selected-match-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20px minmax(0, 1fr);
  align-items: center;
  gap: 6px;
  margin: 0 12px 10px;
  color: var(--muted-strong);
  font-size: 12px;
}

.selected-match-summary span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-suggestion {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: baseline;
  gap: 4px 12px;
  margin: 0 12px 10px;
  padding: 12px;
  border-left: 3px solid var(--blue);
  background: var(--surface-muted);
}

.payment-suggestion strong { font-size: 22px; }
.payment-suggestion small { grid-column: 1 / -1; color: var(--muted); }
.payment-suggestion.is-blocked {
  border-color: color-mix(in srgb, var(--red) 36%, var(--line));
  background: color-mix(in srgb, var(--red) 6%, var(--surface));
}
.payment-suggestion.is-blocked strong { color: var(--red); }

.payment-secondary-actions,
.payment-more-menu { position: relative; }

.payment-secondary-actions { margin: 10px 12px; }

.payment-secondary-actions.is-visible {
  display: grid;
  gap: 7px;
  padding-top: 10px;
  border-top: 1px solid var(--line-soft);
}

.payment-action-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payment-secondary-actions.is-visible > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 0;
}

.payment-secondary-actions.is-visible button {
  flex: 1 1 138px;
  text-align: center;
}

.payment-secondary-actions summary,
.payment-more-menu summary {
  cursor: pointer;
  color: var(--muted-strong);
  font-size: 13px;
}

.payment-secondary-actions > div,
.payment-more-menu > div {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.payment-secondary-actions button,
.payment-more-menu button {
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  color: var(--muted-strong);
  text-align: left;
}

.payment-keyboard-help {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 8px;
  min-height: 0;
  margin: 3px 0 0;
  padding: 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.25;
}

.payment-allocation-preview {
  position: sticky;
  top: 12px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 0;
  overflow: hidden;
}

.payment-preview-scroll-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.payment-preview-facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  margin: 0 10px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface);
}

.payment-preview-facts section {
  min-width: 0;
  padding: 9px 10px;
}

.payment-preview-facts section + section {
  border-top: 1px solid var(--line-soft);
}

.payment-preview-facts .eyebrow {
  margin-bottom: 6px;
}

.payment-preview-facts dl,
.payment-result-summary dl {
  display: grid;
  grid-template-columns: minmax(70px, 1fr) minmax(0, auto);
  gap: 4px 8px;
  margin: 0;
  font-size: 11px;
}

.payment-preview-facts dt,
.payment-result-summary dt {
  color: var(--muted);
}

.payment-preview-facts dd,
.payment-result-summary dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: var(--ink);
  font-weight: 650;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payment-result-summary {
  display: grid;
  gap: 7px;
  margin: 0 10px 8px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--green);
  border-radius: 6px;
  background: var(--surface-soft);
}

.payment-result-summary.is-risk {
  border-left-color: var(--amber);
}

.payment-result-summary > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.payment-result-summary > div span {
  color: var(--muted-strong);
  font-size: 12px;
}

.payment-result-summary > div strong {
  font-size: 18px;
}

.payment-result-summary p {
  margin: 0;
  padding-top: 6px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-strong);
  font-size: 11px;
  line-height: 1.4;
}

.payment-split-preview {
  margin: 0 10px 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  overflow: hidden;
}

.payment-split-preview h5 {
  margin: 0;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.payment-split-preview-scroll {
  max-height: 116px;
  overflow-x: hidden;
  overflow-y: auto;
}

.payment-split-preview table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 8.5px;
}

.payment-split-preview th,
.payment-split-preview td {
  box-sizing: border-box;
  padding: 5px 2px;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  line-height: 1.2;
}

.payment-split-preview th:last-child,
.payment-split-preview td:last-child {
  border-right: 0;
}

.payment-split-preview th:first-child,
.payment-split-preview td:first-child {
  width: 24%;
  overflow-wrap: anywhere;
}

.payment-split-preview th:nth-child(2),
.payment-split-preview td:nth-child(2) {
  width: 16%;
  overflow-wrap: anywhere;
}

.payment-split-preview th:nth-child(n+3),
.payment-split-preview td:nth-child(n+3) {
  width: 20%;
  text-align: right;
  white-space: nowrap;
}

.payment-conservation-card {
  margin: 8px 10px;
  padding: 10px;
}

.payment-conservation-card dl {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 10px;
  margin: 0;
  font-size: 12px;
}

.payment-conservation-card dt { color: var(--muted); }
.payment-conservation-card dd { margin: 0; font-weight: 700; text-align: right; }

.payer-explanation-status {
  display: grid;
  gap: 3px;
  margin: 8px 10px;
  padding: 9px 10px;
  border-left: 3px solid var(--blue);
  background: var(--surface-muted);
  font-size: 12px;
}

.payer-explanation-status span { color: var(--muted-strong); }

.payment-action-blocker {
  display: grid;
  gap: 4px;
  min-width: min(100%, 320px);
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-subtle);
  color: var(--muted-strong);
}

.payment-action-blocker strong { color: var(--ink); }
.payment-action-blocker .inline-action { justify-self: start; margin-top: 4px; }

.payment-decision-footer {
  position: static;
  display: grid;
  gap: 7px;
  padding: 10px;
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.payment-decision-footer > .primary-action { width: 100%; min-height: 42px; }

.payment-decision-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.payment-decision-secondary .inline-action { justify-content: center; }

.payment-more-menu > div {
  position: absolute;
  right: 0;
  bottom: calc(100% + 6px);
  z-index: 8;
  width: min(280px, 80vw);
  padding: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(20, 29, 38, 0.16);
}

@media (max-width: 1180px) {
  .finance-matching-header { grid-template-columns: minmax(240px, 1fr) minmax(340px, 1.2fr); }
  .finance-matching-header .payment-header-actions { grid-column: 1 / -1; }
  .payment-smart-grid { grid-template-columns: minmax(230px, 28fr) minmax(310px, 42fr) minmax(250px, 30fr); }
}

@media (max-width: 1020px) {
  .stage-b2-payment-workbench .property-page-head { display: grid; }
  .payment-header-actions { min-width: 0; justify-content: flex-start; }
  .payment-smart-grid { grid-template-columns: minmax(280px, 0.8fr) minmax(380px, 1.2fr); }
  .payment-allocation-preview { position: static; grid-column: 1 / -1; height: auto !important; min-height: auto !important; }
}

@media (max-width: 760px) {
  .payment-efficiency-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .payment-smart-grid { grid-template-columns: minmax(0, 1fr); }
  .payment-allocation-preview { grid-column: auto; }
  .payment-smart-grid .payment-workbench-column { min-height: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .payment-candidate-list .payment-report-row {
    transition: none;
  }
}

.payment-conservation-card,
.payment-allocation-list,
.payment-exception-list {
  margin: 8px 10px;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
}

.payment-allocation-list,
.payment-exception-list {
  max-height: 120px;
  overflow: auto;
}

.payment-conservation-card dl {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 14px;
  margin: 0;
}

.payment-conservation-card dt { color: var(--muted); }
.payment-conservation-card dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.payment-primary-actions { padding: 0 12px; }
.payment-primary-actions + .muted-copy { margin: 8px 12px 0; }

.payment-allocation-list article,
.payment-exception-list article,
.payment-detail-section article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.payment-allocation-list article:last-child,
.payment-exception-list article:last-child,
.payment-detail-section article:last-child { border-bottom: 0; }

.payment-allocation-list article div,
.payment-exception-list article div { display: grid; gap: 4px; }

.payment-exception-list:has(.third-party-aggregate-card) {
  max-height: min(540px, 58vh);
}

.payment-exception-list .third-party-aggregate-card {
  display: grid;
  gap: 10px;
  width: 100%;
}

.third-party-aggregate-card > header,
.third-party-aggregate-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.third-party-aggregate-card > header > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.third-party-aggregate-card > header small,
.third-party-aggregate-summary span { color: var(--muted-strong); }

.third-party-aggregate-summary {
  padding: 8px 0;
  border-block: 1px solid var(--line-soft);
  font-size: 12px;
}

.third-party-aggregate-card ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.third-party-aggregate-item {
  position: relative;
  display: grid;
  gap: 7px;
  padding: 9px 64px 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.third-party-aggregate-item > div {
  display: flex !important;
  justify-content: space-between;
  gap: 8px;
}

.third-party-aggregate-item dl {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 8px;
  margin: 0;
  font-size: 12px;
}

.third-party-aggregate-item dt { color: var(--muted); }
.third-party-aggregate-item dd { margin: 0; text-align: right; }
.third-party-aggregate-item > .tag { position: absolute; top: 9px; right: 0; }
.third-party-aggregate-item > p { margin: 0; color: var(--red); font-size: 12px; }
.third-party-aggregate-item.is-stale { background: rgba(185, 74, 72, 0.04); }
.third-party-aggregate-card > .inline-actions { display: flex; flex-wrap: wrap; }
.third-party-aggregate-card > .inline-actions .primary-action { flex: 1 1 220px; }
.payment-report-detail { display: grid; gap: 14px; }
.payment-detail-section { padding-top: 4px; }

@media (max-width: 1180px) {
  .payment-workbench-grid { grid-template-columns: 1fr 1fr; }
  .payment-workbench-column.allocation-panel { grid-column: 1 / -1; }
}

.btn {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 700;
  line-height: 1.2;
  cursor: pointer;
}

.btn-primary {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.btn-primary:hover {
  background: var(--brand-strong);
}

.btn-secondary {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: #b9aa95;
  background: var(--panel-muted);
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: var(--muted-strong);
}

.btn-ghost:hover {
  background: var(--brand-soft);
  color: var(--ink);
}

.btn-danger {
  border-color: rgba(184, 66, 66, 0.3);
  background: rgba(184, 66, 66, 0.07);
  color: var(--red);
}

.property-create-workspace,
.property-form {
  display: grid;
  gap: 18px;
}

.property-create-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.property-create-header h3,
.property-form-header h3 {
  margin: 4px 0 7px;
}

.property-create-header p:last-child,
.property-form-header > p:last-of-type,
.property-create-section-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.property-create-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(92px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.property-create-stats article {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 15px;
}

.property-create-stats article + article {
  border-left: 1px solid var(--line-soft);
}

.property-create-stats strong {
  font-size: 22px;
}

.property-create-stats span {
  color: var(--muted);
  font-size: 12px;
}

.property-create-section {
  display: grid;
  gap: 12px;
}

.property-create-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.property-create-section-head h4 {
  margin: 0 0 4px;
  font-size: 16px;
}

.property-create-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.property-create-card {
  min-height: 240px;
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 13px;
  padding: 18px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.property-create-card:hover {
  transform: translateY(-1px);
  border-color: #b7a68e;
  box-shadow: var(--shadow-md);
}

.property-create-card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--brand-soft);
  color: var(--brand);
}

.property-create-card-icon .nav-icon {
  width: 22px;
  height: 22px;
}

.property-create-card strong {
  font-size: 17px;
}

.property-create-card p,
.property-create-card small,
.property-application-card p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.property-application-card {
  min-height: 166px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 10px;
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel-muted);
}

.property-create-preparation,
.property-create-permission {
  display: grid;
  align-items: center;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.property-create-preparation {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  background: #fff;
}

.property-create-preparation ol {
  margin: 8px 0 0;
  padding-left: 20px;
  color: var(--muted-strong);
  line-height: 1.8;
}

.property-create-permission {
  grid-template-columns: minmax(0, 1fr) auto;
  background: var(--brand-soft);
}

.property-create-permission p {
  max-width: 850px;
  margin: 6px 0 0;
  color: var(--muted-strong);
  line-height: 1.65;
}

.property-create-back-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  border-bottom: 1px solid var(--line-soft);
}

.property-create-back-row > span {
  color: var(--muted);
  font-size: 13px;
}

.property-form {
  max-width: 1120px;
}

.form-section {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.form-section-head {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.form-section-head strong {
  font-size: 16px;
}

.form-section-head p,
.form-hint {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

/* 楼盘字典回填后先锁定结构字段；人工修订必须显式点击按钮，避免误把现场信息当字典事实。 */
.property-dictionary-base-grid.is-dictionary-locked [data-property-dictionary-base-field] {
  background: var(--surface-soft);
  color: var(--muted-strong);
}

.property-dictionary-base-grid.is-dictionary-locked select[data-property-dictionary-base-field] {
  pointer-events: none;
}

.property-dictionary-base-section .form-section-head {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 16px;
}

.property-dictionary-base-status[data-tone="warning"] {
  color: var(--warning-strong, #a86200);
}

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

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.form-field > span,
.form-field > label {
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 700;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

.form-field textarea {
  min-height: 88px;
  padding-top: 10px;
  resize: vertical;
}

.form-field-wide {
  grid-column: span 2;
}

/* 楼盘字典下拉保持在录盘表单内，不改变现有 SaaS 的表单、边线和按钮视觉体系。 */
.property-dictionary-search {
  position: relative;
}

.property-dictionary-results {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  left: 0;
  max-height: 282px;
  overflow-y: auto;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.property-dictionary-option {
  width: 100%;
  display: grid;
  gap: 3px;
  padding: 9px 10px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.property-dictionary-option:hover,
.property-dictionary-option:focus-visible {
  background: var(--brand-soft);
}

.property-dictionary-option strong {
  font-size: 13px;
}

.property-dictionary-option span,
.property-dictionary-empty {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.property-dictionary-empty {
  padding: 9px 10px;
}

.property-dictionary-status[data-tone="success"] {
  color: #28734c;
}

.property-dictionary-status[data-tone="error"] {
  color: var(--red);
}

.customer-create-form {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.customer-create-error {
  padding: 10px 12px;
  border: 1px solid rgba(185, 74, 72, 0.24);
  border-radius: 6px;
  background: rgba(185, 74, 72, 0.08);
  color: var(--red);
  font-weight: 700;
}

.customer-tag-picker {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel-muted);
}

.customer-tag-picker legend {
  padding: 0 6px;
  color: var(--muted-strong);
  font-size: 13px;
  font-weight: 800;
}

.customer-tag-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.customer-tag-grid label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.customer-create-notes {
  margin-top: 14px;
}

.form-check,
.form-check-grid label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-muted);
}

.form-check input,
.form-check-grid input {
  width: 16px;
  height: 16px;
}

.form-check-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.payment-method-row {
  min-height: 42px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.payment-method-row label {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.payment-method-row input {
  min-width: 0;
  height: 32px;
  padding: 0 7px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.form-preview {
  padding: 11px 13px;
  border-left: 3px solid var(--blue);
  background: #f2f6fd;
  color: #274878;
  font-weight: 700;
}

.property-upload-demo {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.property-upload-button {
  min-height: 68px;
  display: grid;
  gap: 4px;
}

.property-upload-button small {
  color: var(--muted);
  font-weight: 500;
}

.property-upload-button[data-uploaded="true"] {
  border-color: #80a98a;
  background: #f1f8f3;
  color: #285c34;
}

.property-form-notice {
  padding: 12px 14px;
  border-left: 3px solid #5d849b;
  background: #f4f7f9;
  color: var(--muted-strong);
  font-size: 13px;
}

.form-actions {
  position: sticky;
  bottom: 0;
  z-index: 5;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 0 8px;
  background: linear-gradient(to top, var(--bg) 68%, rgba(246, 241, 232, 0.82), transparent);
}

/* 录盘页面字段较长，提交动作固定悬浮会遮挡中段作业字段，改为表单末尾正常呈现。 */
.property-create-form .form-actions {
  position: static;
  margin-top: 18px;
  padding: 0;
  background: transparent;
}

.status-chip {
  display: inline-flex;
  width: fit-content;
  margin-top: 10px;
  padding: 5px 9px;
  border-radius: 6px;
  background: #edf3fb;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.property-submit-result {
  max-width: 760px;
  display: grid;
  justify-items: start;
  gap: 12px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

.property-result-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #edf7ef;
  color: #2f6f3e;
  font-size: 22px;
  font-weight: 800;
}

.property-submit-result h3,
.property-submit-result p {
  margin: 0;
}

.property-submit-result > p:not(.eyebrow) {
  color: var(--muted-strong);
  line-height: 1.65;
}

.property-result-meta {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto 1fr;
  gap: 8px 14px;
  padding: 14px;
  border-radius: 8px;
  background: var(--panel-muted);
}

.property-result-meta span {
  color: var(--muted);
}

.property-result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.new-home-project-list {
  display: grid;
  gap: 10px;
}

.new-home-project-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(420px, auto);
  align-items: center;
  gap: 18px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.new-home-project-row p,
.new-home-project-row small {
  margin: 5px 0 0;
  color: var(--muted);
}

@media (max-width: 980px) {
  .property-create-header,
  .property-create-permission {
    grid-template-columns: 1fr;
  }

  .property-application-grid,
  .form-grid.three,
  .form-check-grid,
  .property-upload-demo {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .new-home-project-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .property-create-grid,
  .property-application-grid,
  .property-create-preparation,
  .form-grid,
  .form-grid.three,
  .form-check-grid,
  .property-upload-demo {
    grid-template-columns: 1fr;
  }

  .form-field-wide {
    grid-column: auto;
  }

  .property-create-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .property-create-stats article {
    min-width: 0;
    padding: 10px;
  }

  .property-create-card {
    min-height: auto;
  }

  .form-actions,
  .property-result-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .property-result-meta {
    grid-template-columns: auto 1fr;
  }
}

.signature-status-card,
.property-customer-matches,
.finance-priority-queue {
  margin: 14px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.signature-status-list,
.match-customer-list,
.finance-queue-list {
  display: grid;
  gap: 0;
}

.signature-status-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 72px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-soft);
}

.signature-status-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.signature-state {
  display: grid;
  place-items: center;
  min-height: 34px;
  width: 132px;
  padding: 5px 8px;
  border-radius: 4px;
  background: #edf2f8;
  color: #315477;
  font-size: 11px;
  text-align: center;
}

.signature-row-actions {
  display: grid;
  grid-template-columns: 132px 132px;
  align-items: center;
  gap: 10px;
}

.signature-row-actions .inline-action {
  min-width: 132px;
  min-height: 34px;
  margin: 0;
  padding: 0 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

/* 客户详情将电子签约和成交报数收进同一条高频操作栏，保持主次关系和视觉对齐。 */
.customer-detail-shell > .customer-high-frequency-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 1px minmax(280px, 0.9fr);
  gap: 12px;
  align-items: stretch;
  width: 100%;
  margin: 2px 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface, #fff);
  box-shadow: var(--shadow-sm);
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry,
.customer-detail-shell > .customer-high-frequency-actions > .inline-action {
  width: 100%;
  min-width: 0;
  min-height: 56px;
  margin: 0;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 4px 10px;
  align-content: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-icon {
  grid-row: 1;
  align-self: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 18px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy {
  grid-template-columns: auto auto;
  gap: 4px 10px;
  align-items: center;
  justify-content: start;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy strong {
  font-size: 16px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy small {
  justify-self: start;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--muted-strong);
  font-size: 12px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-templates {
  grid-column: 1 / -1;
  margin-top: 0;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-templates em {
  padding: 3px 6px;
  border-color: var(--line);
  border-radius: 6px;
  background: var(--surface-muted);
  font-size: 11px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry:hover {
  background: transparent;
}

.customer-detail-shell > .customer-high-frequency-actions .customer-high-frequency-divider {
  width: 1px;
  min-height: 40px;
  align-self: center;
  background: var(--line);
}

.customer-detail-shell > .customer-high-frequency-actions > .inline-action {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  border-color: var(--brand);
  border-radius: var(--radius);
  background: var(--brand);
  color: #fff;
  text-align: center;
  box-shadow: none;
}

.customer-detail-shell > .customer-high-frequency-actions > .inline-action:hover {
  border-color: var(--brand-strong);
  background: var(--brand-strong);
  color: #fff;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-icon {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-size: 20px;
  line-height: 1;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-copy {
  display: block;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-copy strong {
  font-size: 16px;
  font-weight: 700;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-copy small {
  display: none;
}

.signature-report-prompt {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 12px;
  border-left: 3px solid #3e7d60;
  background: #eff7f2;
}

.signature-report-prompt div {
  flex: 1;
}

.signature-report-prompt p {
  margin: 3px 0 0;
  color: #4f6659;
  font-size: 12px;
}

.match-customer-row {
  display: grid;
  grid-template-columns: 72px minmax(260px, 1fr) minmax(150px, 0.55fr);
  align-items: center;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.match-customer-score {
  display: grid;
  align-content: center;
  width: 66px;
  height: 66px;
  border: 1px solid #bfd0e6;
  border-radius: 50%;
  color: var(--blue);
  text-align: center;
}

.match-customer-score strong {
  font-size: 22px;
  line-height: 1;
}

.match-customer-score span {
  margin-top: 3px;
  font-size: 10px;
}

.match-customer-row h4 {
  margin: 0 0 5px;
  font-size: 15px;
}

.match-customer-row p,
.match-customer-row small {
  color: var(--muted);
  font-size: 11px;
}

.match-reasons,
.match-customer-actions,
.rejection-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.match-reasons {
  margin: 7px 0;
}

.match-reasons span {
  padding: 3px 6px;
  border-radius: 4px;
  background: #edf4fa;
  color: #315477;
  font-size: 10px;
}

.match-customer-actions {
  justify-content: flex-end;
}

.recommendation-template {
  margin-top: 12px;
  padding: 12px 14px;
  border-left: 3px solid var(--blue);
  background: #f2f6fb;
}

.recommendation-template p {
  margin: 4px 0 0;
  color: #485b6e;
  font-size: 12px;
  line-height: 1.6;
}

.report-rejection-card {
  margin: 14px 0;
  padding: 14px;
  border: 1px solid #e8c3c3;
  border-left: 4px solid var(--red);
  border-radius: var(--radius);
  background: #fffafa;
}

.rejection-status {
  display: flex;
  align-items: center;
  gap: 10px;
}

.rejection-status > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--red);
  color: #fff;
  font-weight: 800;
}

.rejection-status p,
.rejection-status h3 {
  margin: 0;
}

.rejection-status p {
  color: var(--red);
  font-size: 12px;
}

.rejection-status h3 {
  margin-top: 3px;
  font-size: 16px;
}

.rejection-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 13px 0;
  background: #f0dede;
}

.rejection-grid > div {
  display: grid;
  gap: 5px;
  padding: 10px;
  background: #fff;
}

.rejection-grid span,
.finance-queue-row > div > span {
  color: var(--muted);
  font-size: 10px;
}

.rejection-grid strong {
  font-size: 12px;
}

.review-timeline {
  display: flex;
  align-items: center;
  margin-top: 12px;
  color: var(--muted);
  font-size: 11px;
}

.review-timeline i {
  flex: 1;
  height: 1px;
  margin: 0 8px;
  background: #dfcaca;
}

.review-timeline strong {
  color: var(--red);
}

.finance-queue-row {
  display: grid;
  grid-template-columns: 72px minmax(150px, 1.25fr) repeat(3, minmax(100px, 0.7fr)) 100px minmax(110px, auto);
  align-items: center;
  gap: 10px;
  min-width: 940px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.finance-queue-list {
  overflow-x: auto;
}

.finance-queue-row > div {
  display: grid;
  gap: 3px;
}

.finance-queue-row p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.queue-priority {
  padding: 5px 7px;
  border-left: 3px solid var(--blue);
  background: #f0f4f9;
  font-size: 11px;
  font-weight: 700;
}

.finance-queue-row:first-child .queue-priority {
  border-color: var(--red);
  background: #fbefef;
  color: var(--red);
}

@media (max-width: 720px) {
  .signature-status-row,
  .match-customer-row {
    grid-template-columns: 1fr;
  }

  .signature-row-actions {
    width: min(100%, 276px);
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signature-state,
  .signature-row-actions .inline-action {
    width: 100%;
    min-width: 0;
  }

  .customer-detail-shell > .customer-high-frequency-actions {
    width: 100%;
    grid-template-columns: 1fr;
  }

  .customer-detail-shell > .customer-high-frequency-actions .customer-high-frequency-divider {
    width: 100%;
    min-height: 1px;
    height: 1px;
  }

  .customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy strong,
  .customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-copy strong {
    font-size: 16px;
  }

  .match-customer-actions {
    justify-content: flex-start;
  }

  .rejection-grid {
    grid-template-columns: 1fr;
  }

  .signature-report-prompt {
    align-items: flex-start;
    flex-wrap: wrap;
  }
}

.business-review-list,
.risk-exception-list,
.audit-row-list {
  display: grid;
  gap: 10px;
}

.business-review-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(260px, 1.2fr) minmax(150px, 0.65fr);
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.business-review-row h4,
.risk-exception-row h4 {
  margin: 7px 0 4px;
  font-size: 15px;
}

.business-review-row p,
.risk-exception-row p {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.review-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.review-checks span {
  display: grid;
  gap: 3px;
  padding: 8px;
  background: #f4f6f8;
  color: var(--muted);
  font-size: 10px;
}

.review-checks b {
  color: var(--ink);
  font-size: 11px;
}

.review-responsibility {
  display: grid;
  align-content: start;
  gap: 4px;
}

.review-responsibility span,
.review-responsibility small {
  color: var(--muted);
  font-size: 10px;
}

.business-review-row .rejection-actions {
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.risk-exception-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 0;
  border-bottom: 1px solid var(--line-soft);
}

.audit-row-list > div {
  display: grid;
  grid-template-columns: minmax(150px, 0.6fr) minmax(260px, 1.4fr) 90px;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 11px;
}

.audit-row-list span {
  color: var(--muted);
}

@media (max-width: 780px) {
  .business-review-row {
    grid-template-columns: 1fr;
  }

  .business-review-row .rejection-actions {
    grid-column: auto;
    justify-content: flex-start;
  }

  .risk-exception-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .audit-row-list > div {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1080px) {
  .sidebar {
    position: sticky;
    z-index: 30;
    top: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    height: auto;
    padding: 10px 12px;
  }

  .brand {
    min-height: 42px;
    margin: 0;
  }

  .module-nav {
    display: flex;
    gap: 6px;
    min-width: 0;
    overflow-x: auto;
    padding: 0 0 2px;
    scrollbar-width: none;
  }

  .module-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-button {
    width: auto;
    min-width: 106px;
    grid-template-columns: 28px minmax(0, 1fr);
    padding: 0 8px;
  }

  .nav-group {
    min-width: 146px;
  }

  .nav-group-button {
    grid-template-columns: 28px minmax(0, 1fr) auto;
    padding: 0 8px;
  }

  .nav-children {
    margin-left: 9px;
  }

  .nav-child-button {
    min-height: 32px;
  }

  .nav-button small {
    display: none;
  }

  .sidebar-mobile-account {
    display: block;
    margin: 0;
    padding: 0;
    border: 0;
  }

  .sidebar-mobile-account .sidebar-account-user {
    display: none;
  }

  .sidebar-mobile-account .sidebar-logout-button {
    width: 40px;
    min-height: 40px;
    justify-content: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }

  .sidebar-mobile-account .sidebar-logout-button > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
  }
}

@media (max-width: 640px) {
  .sidebar {
    grid-template-columns: 42px minmax(0, 1fr) 40px;
    gap: 8px;
    padding: 8px;
  }

  .brand {
    padding: 0;
  }

  .brand > div:last-child {
    display: none;
  }

  .brand-mark {
    width: 40px;
    height: 40px;
  }

  .nav-button {
    min-width: 72px;
    min-height: 54px;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 2px;
    padding: 5px 4px;
    text-align: center;
  }

  .nav-button strong {
    max-width: 66px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-icon {
    width: 25px;
    height: 25px;
  }

  .nav-group {
    min-width: 128px;
  }

  .nav-group-button {
    min-height: 44px;
    grid-template-columns: 25px minmax(0, 1fr) auto;
  }

  .nav-group-button strong,
  .nav-child-button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workspace {
    padding-top: 10px;
  }
}

.demo-progress-host {
  position: sticky;
  top: 92px;
  z-index: 24;
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, 0.65fr) auto;
  align-items: center;
  gap: 16px;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid #cbd8eb;
  border-left: 4px solid var(--blue);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow-md);
}

.demo-progress-copy > div,
.demo-progress-actions,
.scenario-actions,
.pipeline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.demo-progress-copy strong {
  margin-right: 10px;
  font-size: 14px;
}

.demo-progress-copy span,
.demo-progress-copy p,
.demo-progress-copy b {
  color: var(--muted);
  font-size: 12px;
}

.demo-progress-copy p {
  margin: 3px 0 0;
}

.demo-progress-copy b {
  margin-left: 8px;
  color: var(--blue);
  font-weight: 600;
}

.demo-progress-track {
  height: 5px;
  overflow: hidden;
  border-radius: 3px;
  background: #e8edf4;
}

.demo-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
  transition: width 180ms ease;
}

.icon-action {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
}

.icon-action .nav-icon {
  width: 16px;
  height: 16px;
}

.icon-action:disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.demo-step-highlight {
  outline: 3px solid color-mix(in srgb, var(--blue) 35%, transparent);
  outline-offset: 3px;
  animation: demo-step-pulse 1.4s ease-in-out infinite;
}

@keyframes demo-step-pulse {
  50% { outline-color: color-mix(in srgb, var(--blue) 12%, transparent); }
}

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

.scenario-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px 14px;
  min-height: 226px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.scenario-index {
  color: var(--blue);
  font-size: 22px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.scenario-card h4,
.pipeline-card h4 {
  margin: 8px 0 5px;
  font-size: 17px;
}

.scenario-card p,
.pipeline-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.scenario-card dl {
  grid-column: 2;
  display: flex;
  gap: 24px;
  margin: 0;
}

.scenario-card dl div {
  display: grid;
  gap: 3px;
}

.scenario-card dt,
.pipeline-meta span {
  color: var(--muted);
  font-size: 11px;
}

.scenario-card dd {
  margin: 0;
  font-size: 13px;
  font-weight: 650;
}

.scenario-actions {
  grid-column: 2;
  align-self: end;
}

.danger-quiet {
  color: var(--red);
}

.pipeline-stage-track {
  display: grid;
  grid-template-columns: repeat(10, minmax(92px, 1fr));
  gap: 2px;
  overflow-x: auto;
  margin: 2px 0 14px;
  padding-bottom: 6px;
}

.pipeline-stage-track span {
  position: relative;
  min-height: 38px;
  padding: 11px 8px;
  border-bottom: 3px solid #d9dee7;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.pipeline-stage-track span.active {
  border-color: var(--blue);
  color: var(--ink);
  font-weight: 700;
}

.pipeline-list,
.active-deal-list {
  display: grid;
  gap: 10px;
}

.pipeline-card {
  padding: 15px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: #fff;
}

.pipeline-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.probability {
  display: grid;
  min-width: 92px;
  text-align: right;
}

.probability strong {
  color: var(--blue);
  font-size: 24px;
}

.probability span {
  color: var(--muted);
  font-size: 11px;
}

.pipeline-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin: 14px 0;
  background: var(--line-soft);
}

.pipeline-meta > div {
  display: grid;
  gap: 4px;
  min-height: 62px;
  padding: 10px;
  background: var(--panel-muted);
}

.pipeline-meta strong {
  font-size: 12px;
  line-height: 1.45;
}

.pipeline-meta .risk strong {
  color: var(--red);
}

.active-deal-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.8fr) minmax(340px, 1.5fr) auto;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.active-deal-row strong {
  display: block;
  margin: 7px 0 3px;
  font-size: 14px;
}

.active-deal-row p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.mini-stage-line {
  display: flex;
  align-items: center;
  min-width: 0;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.mini-stage-line i {
  flex: 1;
  min-width: 10px;
  height: 1px;
  margin: 0 5px;
  background: #c8d2df;
}

.demo-explanation {
  margin: 12px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.demo-explanation summary {
  padding: 10px 2px;
  color: var(--blue);
  font-size: 12px;
  cursor: pointer;
}

.demo-explanation > div {
  padding: 0 2px 12px;
}

.demo-explanation p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.compact-risk-list {
  margin-top: 12px;
}

@media (max-width: 980px) {
  .demo-progress-host {
    position: static;
    grid-template-columns: 1fr;
  }

  .scenario-grid {
    grid-template-columns: 1fr;
  }

  .pipeline-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .active-deal-row {
    grid-template-columns: 1fr;
  }

  .mini-stage-line {
    overflow-x: auto;
  }
}

@media (max-width: 640px) {
  .demo-progress-actions span {
    display: none;
  }

  .scenario-card {
    grid-template-columns: 34px minmax(0, 1fr);
    padding: 13px;
  }

  .pipeline-main {
    display: grid;
    grid-template-columns: 1fr auto;
  }

  .pipeline-meta {
    grid-template-columns: 1fr;
  }
}

/* Real management pages */
.management-workspace {
  position: relative;
  min-width: 0;
  padding-bottom: 24px;
}

.management-page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--line);
}

.management-page-head h3 {
  margin: 4px 0 6px;
  font-size: 23px;
  letter-spacing: 0;
}

.management-page-head p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.65;
}

.management-scope {
  flex: 0 0 auto;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-muted);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 650;
}

.management-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(138px, 1fr));
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--panel);
}

.management-metrics > div {
  display: grid;
  align-content: center;
  min-height: 78px;
  padding: 13px 15px;
  border-right: 1px solid var(--line-soft);
}

.management-metrics > div:last-child {
  border-right: 0;
}

.management-metrics span,
.management-metrics small {
  color: var(--muted);
  font-size: 11px;
}

.management-metrics strong {
  margin-top: 5px;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}

.management-filters {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 3px 0 10px;
  scrollbar-width: thin;
}

.management-facet-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 8px;
  margin: 2px 0 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.management-facet-bar label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.management-facet-bar label > span {
  color: var(--muted);
  font-size: 10px;
}

.management-facet-bar select {
  width: 100%;
  min-height: 34px;
  padding: 6px 24px 6px 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel);
  color: var(--ink);
  font-size: 11px;
}

.management-filters button {
  flex: 0 0 auto;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
}

.management-filters button:hover {
  background: var(--panel-muted);
}

.management-filters button.active {
  border-color: var(--line);
  background: var(--ink);
  color: #fff;
}

.page-tabs {
  display: flex;
  gap: 4px;
  margin: 2px 0 14px;
  overflow-x: auto;
  padding: 3px;
  border-bottom: 1px solid var(--line-soft);
  scrollbar-width: thin;
}

.page-tab {
  flex: 0 0 auto;
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
}

.page-tab:hover {
  background: var(--panel-muted);
  color: var(--ink);
}

.page-tab.active {
  border-bottom-color: var(--brand);
  color: var(--brand);
}

.page-tab small {
  min-width: 18px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--panel-muted);
  color: inherit;
  font-size: 10px;
  text-align: center;
}

.property-search-toolbar {
  display: grid;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.list-search-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.list-search-field {
  display: grid;
  gap: 5px;
  flex: 1 1 420px;
  min-width: 260px;
}

.list-search-field span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.list-search-field input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.list-search-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.property-search-main,
.property-search-actions,
.property-advanced-filters {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.property-search-main input {
  min-width: 280px;
  flex: 1 1 460px;
  height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.property-search-actions {
  justify-content: flex-end;
}

.property-advanced-filters label {
  display: grid;
  gap: 4px;
  min-width: 130px;
  flex: 1 1 130px;
}

.property-library-scope {
  display: grid;
  align-content: center;
  gap: 4px;
  min-width: 130px;
  min-height: 56px;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
}

.property-library-scope span {
  color: var(--muted);
  font-size: 12px;
}

.property-library-scope strong {
  color: var(--ink);
  font-size: 13px;
}

.property-advanced-filters label span {
  font-size: 12px;
  color: var(--muted);
}

.property-advanced-filters select {
  width: 100%;
  height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.property-search-results {
  border-top: 1px solid var(--line-soft);
}

.property-search-row {
  display: grid;
  grid-template-columns: 128px minmax(240px, 1.5fr) minmax(120px, 0.55fr) minmax(190px, 0.8fr) minmax(210px, auto);
  gap: 14px;
  align-items: center;
  padding: 14px 0;
  border-bottom: 1px solid var(--line-soft);
}

.property-thumb {
  width: 128px;
  height: 92px;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--muted-strong);
  font-weight: 700;
}

.property-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.property-thumb-empty {
  align-content: center;
  gap: 4px;
  padding: 12px;
  text-align: center;
}

.property-thumb-empty strong {
  color: var(--ink);
  font-size: 13px;
}

.property-thumb-empty small {
  color: var(--muted);
  font-size: 11px;
}

.property-media-placeholder,
.property-gallery-placeholder {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--brand) 16%, var(--surface-soft)), var(--surface-soft)),
    repeating-linear-gradient(45deg, transparent 0 12px, color-mix(in srgb, var(--line) 30%, transparent) 12px 13px);
}

.property-thumb-type,
.property-thumb-count,
.property-gallery-count {
  position: absolute;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(16, 24, 32, 0.76);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.property-thumb-type {
  top: 7px;
  left: 7px;
}

.property-thumb-count {
  right: 7px;
  bottom: 7px;
}

.property-media-gallery {
  display: grid;
  grid-template-columns: minmax(320px, 1.35fr) minmax(300px, 1fr);
  min-height: 300px;
  margin: 14px 0 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.property-gallery-main {
  position: relative;
  min-height: 300px;
  overflow: hidden;
  background: var(--surface-soft);
}

.property-gallery-main > img,
.property-gallery-main > .property-gallery-placeholder {
  width: 100%;
  height: 100%;
  min-height: 300px;
  object-fit: cover;
}

.property-gallery-placeholder {
  display: grid;
  place-content: center;
  gap: 5px;
  color: var(--muted);
  text-align: center;
}

.property-gallery-placeholder strong {
  color: var(--ink);
}

.property-gallery-count {
  right: 12px;
  bottom: 12px;
}

.property-gallery-side {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 18px;
  border-left: 1px solid var(--line-soft);
}

.property-gallery-copy h4,
.property-gallery-copy p {
  margin: 0 0 6px;
}

.property-gallery-copy p:last-child {
  color: var(--muted);
  line-height: 1.65;
}

.property-gallery-thumbnails {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.property-gallery-thumbnails button {
  min-height: 72px;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
}

.property-gallery-thumbnails img,
.property-gallery-thumbnails .property-gallery-placeholder {
  width: 100%;
  height: 72px;
  object-fit: cover;
}

.property-gallery-actions {
  align-self: end;
}

.property-search-info,
.property-search-price,
.property-search-status {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.property-search-info p,
.property-search-info small,
.property-search-status small {
  margin: 0;
  color: var(--muted);
}

.property-search-actions-row {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.store-property-workspace .management-table td:first-child {
  min-width: 210px;
}

.store-property-workspace .management-table td:first-child small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
}

.oa-workspace {
  position: relative;
}

.oa-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line-soft);
}

.oa-form label {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.oa-form label.wide,
.oa-form-actions,
.oa-evidence-upload {
  grid-column: 1 / -1;
}

.oa-form label span {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted-strong);
}

.oa-form input,
.oa-form select,
.oa-form textarea {
  width: 100%;
  min-height: 40px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.oa-form textarea {
  min-height: 88px;
  resize: vertical;
}

.oa-form input:focus,
.oa-form select:focus,
.oa-form textarea:focus {
  outline: 2px solid color-mix(in srgb, var(--brand) 22%, transparent);
  border-color: var(--brand);
}

.oa-evidence-upload {
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: var(--surface-soft);
}

.oa-evidence-upload p {
  margin: 4px 0 10px;
  color: var(--muted);
}

.oa-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.oa-form-actions span {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 980px) {
  .property-search-row {
    grid-template-columns: 112px minmax(0, 1fr);
  }

  .property-search-price,
  .property-search-status,
  .property-search-actions-row {
    grid-column: 2;
  }

  .property-thumb {
    width: 112px;
    height: 84px;
  }

  .property-media-gallery {
    grid-template-columns: 1fr;
  }

  .property-gallery-side {
    border-top: 1px solid var(--line-soft);
    border-left: 0;
  }

  .property-search-actions-row {
    justify-content: flex-start;
  }

  .oa-form {
    grid-template-columns: 1fr;
  }

  .oa-form label.wide,
  .oa-form-actions,
  .oa-evidence-upload {
    grid-column: auto;
  }
}

.management-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 0;
}

.management-list-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.management-list-head strong {
  font-size: 14px;
}

.management-list-head span {
  color: var(--muted);
  font-size: 11px;
}

.management-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.management-table {
  width: 100%;
  min-width: 960px;
  border-collapse: collapse;
  font-size: 12px;
}

.management-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--panel-muted);
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 650;
  text-align: left;
  white-space: nowrap;
}

.management-table td {
  max-width: 220px;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line-soft);
  color: var(--ink);
  line-height: 1.45;
  vertical-align: top;
}

.management-table tr:last-child td {
  border-bottom: 0;
}

.management-table tbody tr:hover {
  background: color-mix(in srgb, var(--brand-soft) 44%, #fff);
}

.management-table tbody tr {
  cursor: pointer;
}

.management-table tbody tr:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: -2px;
}

.management-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--line));
  border-radius: 5px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.management-row-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 250px;
  flex-wrap: wrap;
}

.management-row-actions .inline-action {
  min-height: 28px;
  padding: 5px 7px;
  font-size: 11px;
}

.management-demo-note {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 11px 0;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 11px;
}

.management-demo-note strong {
  color: var(--ink);
}

.management-demo-note p {
  margin: 0;
  line-height: 1.5;
}

.platform-saas-page {
  display: grid;
  gap: 14px;
}

.platform-toolbar {
  justify-content: flex-start;
  padding: 10px 0;
}

.platform-flow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
  margin: 8px 0 14px;
}

.platform-flow-card {
  display: grid;
  gap: 10px;
}

.platform-flow-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.platform-flow-card .status-flow {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
}

.platform-section-title,
.platform-report-funnel h4 {
  margin: 14px 0 8px;
  color: var(--ink);
  font-size: 14px;
}

.platform-report-funnel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-muted);
}

.platform-table td {
  min-width: 100px;
}

.entity-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 120;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, 92vw);
  height: 100vh;
  border-left: 1px solid var(--line);
  background: var(--panel);
  box-shadow: -18px 0 48px rgba(17, 31, 42, 0.16);
}

.entity-drawer::before {
  content: "";
  position: fixed;
  inset: 0 520px 0 0;
  background: rgba(24, 24, 24, 0.18);
  pointer-events: none;
}

.entity-drawer > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
  border-bottom: 1px solid var(--line);
}

.entity-drawer > header h3 {
  margin: 4px 0 9px;
  font-size: 19px;
  letter-spacing: 0;
}

.entity-drawer-body {
  overflow-y: auto;
  padding: 8px 20px 22px;
}

.entity-drawer-body section {
  padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}

.entity-drawer-body h4 {
  margin: 0 0 9px;
  font-size: 13px;
}

.entity-drawer-body p {
  margin: 6px 0;
  color: var(--muted-strong);
  font-size: 12px;
  line-height: 1.55;
}

.entity-drawer > footer {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
  background: var(--panel-muted);
}

.entity-drawer > footer button {
  flex: 0 0 auto;
}

.readonly-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  color: var(--muted);
  background: var(--panel-muted);
  font-size: 12px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .management-metrics {
    grid-template-columns: repeat(3, minmax(130px, 1fr));
  }

  .management-demo-note {
    grid-template-columns: 1fr;
    gap: 5px;
  }
}

@media (max-width: 640px) {
  .management-page-head {
    gap: 10px;
  }

  .management-page-head h3 {
    font-size: 19px;
  }

  .management-scope {
    max-width: 112px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .management-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .management-facet-bar {
    display: flex;
    overflow-x: auto;
  }

  .management-facet-bar label {
    flex: 0 0 138px;
  }

  .management-metrics > div {
    min-height: 70px;
    border-bottom: 1px solid var(--line-soft);
  }

  .management-metrics strong {
    font-size: 17px;
  }

  .management-list-head {
    align-items: flex-start;
  }

  .management-table {
    min-width: 820px;
  }

  .entity-drawer {
    width: 100vw;
  }

  .entity-drawer::before {
    display: none;
  }
}

/* Taste refresh: enterprise SaaS polish for dense workbench screens */
:root {
  --bg: #f3f5f7;
  --panel: #ffffff;
  --panel-muted: #f7f9fb;
  --ink: #18202a;
  --muted: #6c7683;
  --muted-strong: #465160;
  --line: #dce3ea;
  --line-soft: #e8edf2;
  --brand: #17212b;
  --brand-strong: #0c1218;
  --brand-dark: #111922;
  --brand-soft: #eef2f6;
  --surface-soft: #f7f9fb;
  --accent: #9a6b2f;
  --accent-strong: #714a1f;
  --accent-soft: #f5ead8;
  --blue: #2f64c8;
  --amber: #a96318;
  --red: #b43d3d;
  --green: #2f7a57;
  --radius: 8px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 2px rgba(18, 30, 42, 0.06);
  --shadow-md: 0 10px 24px rgba(18, 30, 42, 0.08);
  --shadow-lg: 0 22px 52px rgba(18, 30, 42, 0.16);
  --shadow-hover: 0 14px 30px rgba(18, 30, 42, 0.12);
  --focus: 0 0 0 3px rgba(47, 100, 200, 0.2);
}

html {
  background: var(--bg);
}

body {
  min-height: 100dvh;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0) 280px),
    var(--bg);
  color: var(--ink);
  font-size: 14px;
  letter-spacing: 0;
}

::selection {
  background: color-mix(in srgb, var(--blue) 22%, transparent);
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  border-color: var(--line);
  background: #fff;
  color: var(--ink);
}

button {
  -webkit-tap-highlight-color: transparent;
}

button:hover {
  box-shadow: none;
}

.login-screen {
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.08fr) minmax(380px, 0.92fr);
  gap: 28px;
  padding: clamp(24px, 4vw, 54px);
  background:
    linear-gradient(135deg, #111922 0%, #192635 48%, #eef2f6 48.2%, #f8fafb 100%);
}

.login-visual {
  min-height: 620px;
  align-content: end;
  padding: clamp(28px, 5vw, 64px);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0)),
    linear-gradient(135deg, #101820, #1b2a38);
  color: #fff;
  box-shadow: 0 28px 70px rgba(12, 18, 24, 0.24);
}

.login-brand-mark {
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(135deg, #101820, #293746);
  color: #f4d18a;
}

.login-visual h1 {
  max-width: 660px;
  font-size: clamp(48px, 7vw, 92px);
  line-height: 0.96;
  letter-spacing: 0;
}

.login-visual p:not(.eyebrow) {
  max-width: 520px;
  color: #c6d2de;
}

.login-proof-grid {
  max-width: 560px;
  gap: 8px;
}

.login-proof-grid span {
  border-color: rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.07);
  color: #dce6ef;
}

.login-panel {
  align-self: center;
  width: min(100%, 480px);
  padding: clamp(24px, 4vw, 38px);
  border-color: rgba(220, 227, 234, 0.95);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 24px 70px rgba(18, 30, 42, 0.16);
}

.login-form input,
.quick-login-unlock-form input,
.global-tools input,
.role-login select,
.management-facet-bar select,
.form-row input {
  min-height: 40px;
  border-color: var(--line);
  border-radius: var(--radius);
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(18, 30, 42, 0.03);
}

.login-submit,
.quick-login-unlock-form button,
.download-link,
.primary-action {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
  box-shadow: 0 8px 18px rgba(18, 30, 42, 0.16);
}

.login-submit:hover,
.quick-login-unlock-form button:hover,
.download-link:hover,
.primary-action:hover {
  background: var(--brand-strong);
  color: #fff;
}

.test-account-card,
.device-auth-card {
  border-color: var(--line);
  background: var(--panel-muted);
}

.app-shell {
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  padding: 18px 13px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0)),
    #111922;
  border-right-color: rgba(255, 255, 255, 0.08);
}

.brand {
  min-height: 56px;
  margin-bottom: 14px;
  padding: 0 7px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand span,
.nav-button small,
.sidebar-account-workspace {
  color: #91a1b2;
}

.module-nav {
  gap: 4px;
  padding: 4px 0 12px;
}

.nav-button {
  min-height: 44px;
  grid-template-columns: 32px 1fr auto;
  gap: 10px;
  padding: 0 10px;
  color: #c9d3de;
}

.nav-button strong {
  font-size: 13px;
  font-weight: 760;
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.045);
  color: #9eadbc;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.075);
}

.nav-button.active {
  border-color: rgba(244, 209, 138, 0.2);
  background: rgba(244, 209, 138, 0.12);
  color: #fff;
  box-shadow: inset 3px 0 0 #f4d18a;
}

.nav-button.active .nav-icon,
.nav-button:hover .nav-icon {
  border-color: rgba(244, 209, 138, 0.25);
  background: rgba(244, 209, 138, 0.13);
  color: #f4d18a;
}

.sidebar-account {
  margin: auto -1px 0;
  padding: 14px 6px 4px;
}

.sidebar-account-avatar {
  background: rgba(244, 209, 138, 0.12);
  color: #f4d18a;
}

.sidebar-logout-button {
  min-height: 40px;
  color: #b8c4cf;
}

.workspace {
  max-width: 1560px;
  padding: 20px 26px 30px;
}

.topbar {
  grid-template-columns: minmax(280px, 1fr) minmax(300px, 430px) minmax(220px, 280px) auto;
  gap: 14px;
  margin: -20px -26px 18px;
  padding: 14px 26px;
  border-bottom: 1px solid rgba(220, 227, 234, 0.9);
  background: rgba(248, 250, 252, 0.94);
}

h1 {
  font-size: 27px;
  font-weight: 820;
}

h2 {
  font-size: 19px;
  font-weight: 800;
}

.eyebrow {
  margin-bottom: 5px;
  color: var(--muted-strong);
  font-size: 11px;
  font-weight: 760;
}

.workspace-subtitle {
  max-width: 780px;
  color: var(--muted);
}

.global-tools {
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 8px;
}

.icon-button,
.workspace-current,
.confirm-cancel,
.tab-button,
.filter-bar button,
.property-actions button,
.icon-back-button,
.inline-action,
.icon-action,
.switch-row,
.text-button {
  border-color: var(--line);
  background: #fff;
  color: var(--brand);
}

.icon-button,
.workspace-current {
  min-height: 40px;
}

.icon-button:hover,
.workspace-current:hover,
.confirm-cancel:hover,
.tab-button:hover,
.filter-bar button:hover,
.property-actions button:hover,
.icon-back-button:hover,
.inline-action:hover,
.icon-action:hover,
.switch-row:hover,
.text-button:hover {
  border-color: color-mix(in srgb, var(--blue) 34%, var(--line));
  background: #f7faff;
  color: var(--blue);
}

.workspace-menu,
.global-search-results,
.esign-drawer,
.confirm-dialog,
.action-dialog,
.entity-drawer,
.result-card-host > div {
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-lg);
}

.workspace-option:hover,
.workspace-option.active {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: #f5f8fc;
}

.hero-panel {
  min-height: 154px;
  padding: 20px;
  border-color: rgba(18, 30, 42, 0.12);
  background:
    linear-gradient(135deg, #111922, #1a2a38 58%, #2b3847),
    linear-gradient(90deg, rgba(255, 255, 255, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: auto, 32px 32px, 32px 32px;
  box-shadow: 0 16px 36px rgba(18, 30, 42, 0.14);
}

.hero-panel h2 {
  font-size: 28px;
}

.role-card {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(7, 12, 18, 0.58);
}

.kpi-grid {
  gap: 10px;
  margin: 14px 0;
}

.kpi-card,
.panel,
.module-summary,
.agent-status-strip > div,
.cap-panel,
.summary-chip,
.work-metric-card,
.detail-card,
.todo-card,
.customer-card,
.property-category-card,
.quick-entry,
.property-list-card,
.growth-panel,
.account-center-card,
.account-current-card,
.account-boundary-note,
.pipeline-card,
.scenario-card,
.report-rejection-card,
.download-card,
.download-hero {
  border-color: var(--line);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.kpi-card {
  min-height: 98px;
  padding: 14px;
  border-top: 0;
  border-left: 3px solid var(--brand);
}

.kpi-card strong,
.work-metric-card strong,
.management-metrics strong,
.summary-chip strong,
.cap-panel strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

.kpi-card strong {
  font-size: 23px;
}

.panel {
  padding: 16px;
}

.panel-header {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.module-detail,
.agent-workbench,
.workflow-section,
.property-workbench {
  gap: 12px;
}

.module-summary,
.agent-status-strip,
.cap-panel {
  gap: 8px;
}

.summary-chip,
.agent-status-strip > div,
.cap-panel > div,
.growth-grid > div,
.pipeline-meta > div,
.review-checks span {
  background: var(--panel-muted);
}

.summary-chip.ok,
.work-metric-card:hover,
.property-category-card:hover,
.quick-entry:hover,
.property-list-card:hover,
.detail-card:hover,
.todo-card:hover,
.customer-card:hover {
  border-color: color-mix(in srgb, var(--blue) 24%, var(--line));
  background: #fff;
  box-shadow: var(--shadow-md);
}

.agent-home-head {
  padding: 16px;
  border-color: var(--line);
  background:
    linear-gradient(135deg, #ffffff 0%, #f6f9fc 100%);
}

.identity-pill,
.tag,
.property-badges span,
.match-score b,
.management-status,
.readonly-chip,
.signature-state {
  border: 1px solid color-mix(in srgb, var(--blue) 18%, var(--line));
  border-radius: 6px;
  background: #f3f7fc;
  color: #315477;
}

.filter-bar,
.notification-filters,
.management-filters,
.inline-actions,
.property-actions,
.high-frequency-actions,
.growth-actions,
.demo-progress-actions,
.scenario-actions,
.pipeline-actions {
  gap: 7px;
}

.filter-bar button.active,
.tab-button.active,
.notification-filters button.active,
.management-filters button.active {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.business-path {
  position: sticky;
  top: 72px;
  z-index: 3;
  min-height: 34px;
  margin: -2px 0 2px;
  padding: 6px 10px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.back-path-row {
  min-height: 42px;
  border-bottom-color: var(--line);
}

.property-page-head,
.management-page-head {
  align-items: center;
}

.property-page-head h3,
.management-page-head h3,
.agent-home-head h3 {
  font-size: 22px;
  font-weight: 820;
}

.property-core-grid {
  gap: 10px;
}

.property-category-card {
  min-height: 150px;
}

.quick-entry-grid {
  gap: 8px;
}

.quick-entry {
  min-height: 86px;
}

.property-list,
.todo-list,
.customer-list,
.settlement-list,
.notification-list,
.pipeline-list,
.active-deal-list,
.business-review-list,
.risk-exception-list,
.audit-row-list {
  gap: 8px;
}

.property-list-card,
.todo-card,
.customer-card {
  min-height: 84px;
}

.table-wrap,
.management-table-wrap {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

th,
.management-table th {
  background: #f6f8fb;
  color: var(--muted-strong);
  font-weight: 760;
}

td,
.management-table td {
  border-bottom-color: var(--line-soft);
}

tbody tr:hover,
.management-table tbody tr:hover {
  background: #f8fbff;
}

.management-page-head {
  padding: 2px 0 16px;
  border-bottom-color: var(--line-soft);
}

.management-metrics {
  border-color: var(--line);
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.management-metrics > div {
  border-right-color: var(--line-soft);
  background: #fff;
}

.management-facet-bar {
  border-color: var(--line);
  background: #f7f9fb;
}

.management-list-head {
  padding: 10px 0;
}

.management-table th,
.management-table td {
  padding: 9px 10px;
}

.management-table td {
  vertical-align: middle;
}

.management-row-actions {
  min-width: 214px;
  gap: 3px;
}

.management-row-actions .inline-action {
  min-height: 24px;
  margin: 0;
  padding: 3px 6px;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.2;
  box-shadow: none;
}

.management-demo-note {
  border-top-color: var(--line-soft);
  background: transparent;
}

.esign-entry,
.template-chip,
.contract-card {
  border-color: var(--line);
  background: #fff;
}

.esign-entry > span,
.template-chip span,
.property-icon,
.quick-entry span,
.todo-card > span {
  background: #eef3f8;
  color: #315477;
}

.esign-drawer,
.entity-drawer {
  border-color: var(--line);
}

.drawer-head,
.entity-drawer > header {
  border-bottom: 1px solid var(--line-soft);
}

.entity-drawer > footer {
  background: #f7f9fb;
}

.confirm-overlay,
.action-dialog-overlay {
  background: rgba(15, 23, 31, 0.5);
}

.toast-host {
  border-color: rgba(47, 122, 87, 0.26);
  border-radius: var(--radius);
  background: #f3fbf7;
  color: #1f5d41;
}

.result-card-host > div {
  border-color: rgba(47, 122, 87, 0.24);
  background: #f7fcf9;
}

.demo-progress-host {
  top: 82px;
  border-color: #cfdbea;
  border-left-color: var(--blue);
  background: rgba(255, 255, 255, 0.96);
}

.demo-progress-track {
  background: #e7edf4;
}

.audit-note,
.summary-chip.warn,
.risk-card {
  border-color: rgba(169, 99, 24, 0.28);
  background: #fff8ed;
}

.summary-chip.risk,
.report-rejection-card {
  border-color: rgba(180, 61, 61, 0.28);
  background: #fff6f6;
}

.signature-status-card,
.property-customer-matches,
.finance-priority-queue,
.demo-explanation {
  border-top-color: var(--line);
  border-bottom-color: var(--line);
}

.match-customer-row,
.signature-status-row,
.finance-queue-row,
.business-review-row,
.risk-exception-row,
.audit-row-list > div,
.active-deal-row {
  border-bottom-color: var(--line-soft);
}

.scenario-card,
.pipeline-card {
  background: #fff;
}

.pipeline-stage-track span.active {
  border-color: var(--blue);
}

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

@media (max-width: 1080px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    padding: 10px 12px;
  }

  .brand {
    min-height: 42px;
    padding: 0;
    border-bottom: 0;
  }

  .topbar {
    grid-template-columns: 1fr;
    margin: 0 0 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
  }

  .business-path {
    position: static;
  }
}

@media (max-width: 640px) {
  .login-screen {
    gap: 14px;
    padding: 16px;
    background: #f3f5f7;
  }

  .login-visual {
    min-height: 300px;
    padding: 22px;
  }

  .login-visual h1 {
    font-size: 42px;
  }

  .login-panel {
    padding: 20px;
  }

  .workspace {
    padding: 12px;
  }

  .hero-panel {
    padding: 16px;
  }

  .hero-panel h2 {
    font-size: 24px;
  }

  .panel {
    padding: 14px;
  }

  .panel-header,
  .property-page-head,
  .management-page-head,
  .workflow-heading,
  .pipeline-main,
  .global-results-head {
    display: grid;
    gap: 8px;
  }

  .property-actions,
  .inline-actions,
  .management-row-actions,
  .match-customer-actions {
    justify-content: flex-start;
  }

  .kpi-card,
  .work-metric-card,
  .property-category-card,
  .quick-entry,
  .detail-card {
    min-height: auto;
  }
}
/* Stage B4 commission payout records */
.stage-b4-panel { margin-top: 16px; border-left: 3px solid #2d6a5f; }
.stage-b4-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 14px 0; }
.stage-b4-summary span, .stage-b4-payment-grid > div { min-width: 0; padding: 10px 12px; border: 1px solid var(--line-soft); background: #f7f9f8; }
.stage-b4-summary span { display: flex; flex-direction: column; gap: 4px; color: var(--muted); font-size: 12px; }
.stage-b4-summary strong { overflow: hidden; color: var(--ink); font-size: 15px; text-overflow: ellipsis; white-space: nowrap; }
.stage-b4-payment-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stage-b4-payment-grid small, .stage-b4-payment-grid strong, .stage-b4-payment-grid p { display: block; margin: 0; }
.stage-b4-payment-grid strong { margin: 4px 0; }
.stage-b4-blocker { display: flex; align-items: flex-start; gap: 10px; margin-top: 12px; padding: 10px 12px; border: 1px solid rgba(185, 74, 72, 0.22); border-radius: 6px; background: rgba(185, 74, 72, 0.06); color: var(--muted-strong); font-size: 13px; line-height: 1.5; }
.stage-b4-blocker strong { flex: 0 0 auto; color: var(--red); }
.stage-b4-attempt-list { display: grid; gap: 6px; margin: 12px 0; padding: 0; list-style: none; }
.stage-b4-attempt-list li { display: grid; grid-template-columns: 72px minmax(100px, .7fr) minmax(180px, 1.8fr); align-items: center; gap: 10px; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.stage-b4-attempt-list small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.stage-b4-actions { margin-top: 12px; }
@media (max-width: 900px) {
  .stage-b4-summary, .stage-b4-payment-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-b4-attempt-list li { grid-template-columns: 64px minmax(92px, 1fr); }
  .stage-b4-attempt-list small { grid-column: 1 / -1; }
}

/* Finance matcher linking v2 */
.matcher-v2-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 142px);
  min-height: 560px;
  min-width: 0;
  overflow: hidden;
  overflow-x: hidden;
}
.matcher-v2-head, .matcher-v2-toolbar, .matcher-v2-footer { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.matcher-v2-head h3 { margin: 3px 0 2px; }
.matcher-v2-head p { margin: 0; color: var(--muted); }
.matcher-v2-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin: 16px 0 12px; }
.matcher-v2-metrics > div { min-width: 0; padding: 12px 14px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--surface-soft, #f7f9fb); }
.matcher-v2-metrics span, .matcher-v2-metrics strong { display: block; }
.matcher-v2-metrics span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.matcher-v2-metrics strong { margin-top: 5px; font-size: 22px; }
.matcher-v2-toolbar { margin-bottom: 10px; padding: 8px; border: 1px solid var(--line-soft); border-radius: 6px; background: #fff; }
.matcher-v2-tabs, .matcher-v2-mode { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.matcher-v2-tabs button, .matcher-v2-mode button { border: 0; border-radius: 5px; background: transparent; color: var(--muted-strong); cursor: pointer; padding: 8px 10px; }
.matcher-v2-tabs button.active, .matcher-v2-mode button.active { background: var(--ink); color: #fff; }
.matcher-v2-tabs span { margin-left: 4px; opacity: .72; }
.matcher-v2-mode > span { margin-right: 4px; color: var(--muted); font-size: 12px; }
.matcher-v2-search { display: grid; grid-template-columns: minmax(280px, 1fr) 32px; align-items: center; flex: 1 1 520px; max-width: 680px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.matcher-v2-search input { min-width: 0; border: 0; outline: 0; padding: 9px 12px; }
.matcher-v2-search button { width: 32px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.matcher-v2-workspace { display: flex; flex: 1 1 auto; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.matcher-v2-grid { display: grid; flex: 1 1 auto; grid-template-columns: minmax(300px, 42fr) minmax(420px, 58fr); gap: 10px; min-width: 0; min-height: 180px; height: auto; }
.matcher-v2-grid .payment-workbench-column { display: grid; grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; overflow: hidden; border: 1px solid var(--line-soft); border-radius: 6px; background: #fff; }
.matcher-v2-grid .matcher-v2-candidates { grid-template-rows: auto 162px minmax(118px, 1fr); }
.matcher-v2-grid .payment-workbench-column > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.matcher-v2-grid h4 { margin: 2px 0 0; }
.matcher-v2-scroll { display: grid; align-content: start; min-height: 0; overflow-y: auto; overscroll-behavior: contain; overflow-anchor: none; }
.matcher-v2-transaction { display: grid; grid-template-columns: minmax(0, 1fr) minmax(116px, .65fr) auto; align-items: center; gap: 10px; width: 100%; min-height: 54px; border: 0; border-bottom: 1px solid var(--line-soft); background: #fff; color: var(--ink); cursor: pointer; padding: 9px 12px; text-align: left; }
.matcher-v2-transaction:hover { background: #f6f8fa; }
.matcher-v2-transaction.active { box-shadow: inset 3px 0 0 var(--accent, #176b5b); background: #f1f7f5; }
.matcher-v2-transaction span { min-width: 0; }
.matcher-v2-transaction strong, .matcher-v2-transaction small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matcher-v2-transaction small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.matcher-v2-transaction em { border-radius: 4px; background: #edf3f1; color: #23685b; font-size: 11px; font-style: normal; padding: 4px 6px; white-space: nowrap; }
.matcher-v2-candidate-scroll { min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; overflow-anchor: none; padding: 6px; border-bottom: 1px solid var(--line-soft); }
.matcher-v2-candidate-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 8px; min-width: 0; }
.matcher-v2-candidate-card {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  min-height: 150px;
  height: auto;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  padding: 8px;
  text-align: left;
}
.matcher-v2-candidate-card:hover { border-color: #aebdb9; background: #f8faf9; }
.matcher-v2-candidate-card.active { border-color: var(--accent, #176b5b); box-shadow: inset 0 0 0 1px var(--accent, #176b5b); background: #f1f7f5; }
.matcher-v2-candidate-card.blocked { cursor: not-allowed; opacity: .62; }
.matcher-v2-candidate-card__top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; }
.matcher-v2-candidate-card__top em { border-radius: 4px; background: #edf3f1; color: #23685b; font-size: 11px; font-style: normal; padding: 4px 6px; white-space: nowrap; }
.matcher-v2-candidate-card__body { display: flex; flex: 1; flex-direction: column; gap: 2px; min-width: 0; margin-top: 6px; }
.matcher-v2-candidate-card__body strong, .matcher-v2-candidate-card__body small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matcher-v2-candidate-card__body strong { font-size: 13px; }
.matcher-v2-candidate-card__body small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.matcher-v2-candidate-card__footer { min-width: 0; margin-top: auto; padding-top: 7px; border-top: 1px solid var(--line-soft); }
.matcher-v2-candidate-card__footer small { display: -webkit-box; overflow: hidden; color: var(--muted-strong); font-size: 11px; line-height: 1.35; -webkit-box-orient: vertical; -webkit-line-clamp: 2; white-space: normal; }
.matcher-v2-extra-candidates { margin-top: 8px; }
.matcher-v2-candidate-header-actions { display: flex; align-items: center; gap: 8px; }
.matcher-v2-other-candidates { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line-soft); border-radius: 5px; background: #fff; color: var(--muted-strong); cursor: pointer; padding: 6px 8px; font-size: 12px; white-space: nowrap; }
.matcher-v2-other-candidates:hover { border-color: var(--accent, #176b5b); color: var(--accent, #176b5b); }
.matcher-v2-other-candidates span { display: inline-grid; min-width: 18px; height: 18px; place-items: center; border-radius: 4px; background: #edf3f1; font-size: 10px; }
.matcher-v2-allocation-preview { min-height: 118px; max-height: 210px; overflow-y: auto; overscroll-behavior: contain; padding: 10px 12px; background: #fbfcfc; }
[data-payment-matcher-preview-root] { min-height: 0; overflow: hidden; }
[data-payment-matcher-preview-root] > .matcher-v2-allocation-preview { height: 100%; min-height: 0; max-height: none; }
.matcher-v2-allocation-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; }
.matcher-v2-allocation-preview h4 { margin: 2px 0 0; font-size: 14px; }
.matcher-v2-allocation-preview.is-empty { display: flex; align-items: center; }
.matcher-v2-allocation-preview.is-empty h4 { margin: 3px 0 4px; }
.matcher-v2-allocation-preview.is-empty p { margin: 0; color: var(--muted); font-size: 12px; }
.matcher-v2-preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; min-width: 0; }
.matcher-v2-preview-grid article { min-width: 0; padding: 8px 9px; border: 1px solid var(--line-soft); border-radius: 5px; background: #fff; }
.matcher-v2-preview-grid span, .matcher-v2-preview-grid strong, .matcher-v2-preview-grid small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matcher-v2-preview-grid span { color: var(--muted); font-size: 10px; }
.matcher-v2-preview-grid strong { margin: 3px 0; font-size: 12px; }
.matcher-v2-preview-grid small { color: var(--muted-strong); font-size: 10px; line-height: 1.5; }
.matcher-v2-preview-result { border-color: rgba(23, 107, 91, .28) !important; background: #f3f8f6 !important; }
.matcher-v2-split-preview { max-height: 190px; overflow-y: auto; margin-top: 8px; border: 1px solid var(--line-soft); border-radius: 5px; background: #fff; }
.matcher-v2-split-preview table { width: 100%; border-collapse: collapse; font-size: 11px; }
.matcher-v2-split-preview th, .matcher-v2-split-preview td { padding: 6px 8px; border-bottom: 1px solid var(--line-soft); text-align: right; white-space: nowrap; }
.matcher-v2-split-preview th:first-child, .matcher-v2-split-preview td:first-child, .matcher-v2-split-preview th:nth-child(2), .matcher-v2-split-preview td:nth-child(2) { text-align: left; }
.matcher-v2-split-preview tr.is-proposed { background: #f1f7f5; }
.matcher-v2-split-preview footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 7px 8px; color: var(--muted); font-size: 11px; }
.matcher-v2-split-preview footer strong { color: var(--ink); }
.matcher-v2-footer { position: relative; flex: 0 0 auto; z-index: 1; margin-top: 8px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 -4px 14px rgba(28, 37, 43, .05); }
.matcher-v2-footer > div:first-child { display: flex; align-items: center; gap: 10px; min-width: 0; }
.matcher-v2-footer > div:first-child span { overflow: hidden; max-width: 220px; text-overflow: ellipsis; white-space: nowrap; }
.matcher-v2-auto-list { display: grid; max-height: 620px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 6px; }
.matcher-v2-auto-row { display: grid; grid-template-columns: minmax(180px, 1.1fr) minmax(180px, 1fr) minmax(160px, .8fr) minmax(190px, 1fr); align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; border-bottom: 1px solid var(--line-soft); }
.matcher-v2-auto-row > div { min-width: 0; }
.matcher-v2-auto-row strong, .matcher-v2-auto-row span, .matcher-v2-auto-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matcher-v2-auto-row span, .matcher-v2-auto-row small { margin-top: 3px; color: var(--muted); font-size: 12px; }
.matcher-v2-scenarios { margin: 0 0 10px; border: 1px solid var(--line-soft); border-radius: 6px; background: #fff; }
.matcher-v2-scenarios > summary { cursor: pointer; padding: 9px 12px; color: var(--muted-strong); font-size: 13px; font-weight: 600; }
.matcher-v2-scenarios > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-height: 340px; overflow: auto; border-top: 1px solid var(--line-soft); }
.matcher-v2-scenarios article { display: grid; grid-template-columns: auto minmax(150px, 1.1fr) minmax(140px, 1fr) minmax(140px, 1fr); align-items: center; gap: 10px; min-width: 0; padding: 9px 12px; border-right: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }
.matcher-v2-scenarios article > div, .matcher-v2-scenarios p { min-width: 0; margin: 0; }
.matcher-v2-scenarios strong, .matcher-v2-scenarios small, .matcher-v2-scenarios p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.matcher-v2-scenarios small, .matcher-v2-scenarios p { color: var(--muted); font-size: 11px; }
.matcher-v2-scenarios b { display: block; color: var(--muted-strong); font-size: 10px; font-weight: 600; }
@media (max-height: 820px) and (min-width: 901px) {
  .matcher-v2-shell { height: calc(100dvh - 164px); min-height: 0; }
  .matcher-v2-head p { display: none; }
  .matcher-v2-metrics { display: none; }
  .matcher-v2-toolbar { margin-bottom: 6px; padding: 4px; }
  .matcher-v2-tabs button, .matcher-v2-mode button { padding: 6px 8px; }
  .matcher-v2-search input { padding: 7px 10px; }
  .matcher-v2-scenarios { display: none; }
  .matcher-v2-grid .payment-workbench-column > header { padding: 6px 8px; }
  .matcher-v2-footer { padding: 8px 10px; }
}
@media (max-width: 1450px) and (min-width: 1101px) {
  .matcher-v2-toolbar { gap: 8px; }
  .matcher-v2-tabs button, .matcher-v2-mode button { padding-right: 7px; padding-left: 7px; }
  .matcher-v2-mode > span { display: none; }
  .matcher-v2-search { min-width: 260px; flex-basis: 320px; }
}
@media (max-width: 1100px) {
  .matcher-v2-toolbar { align-items: stretch; flex-wrap: wrap; }
  .matcher-v2-search { order: 3; max-width: none; flex-basis: 100%; }
  .matcher-v2-grid { grid-template-columns: minmax(260px, 40fr) minmax(340px, 60fr); }
  .matcher-v2-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .matcher-v2-auto-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .matcher-v2-scenarios > div { grid-template-columns: 1fr; }
}

/* Post-lock change workbench */
.post-lock-workspace { display: grid; gap: 14px; }
.post-lock-page-head { margin-bottom: 0; }
.post-lock-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-soft); border-radius: 6px; background: var(--surface); }
.post-lock-metrics > div { min-width: 0; padding: 10px 14px; }
.post-lock-metrics > div + div { border-left: 1px solid var(--line-soft); }
.post-lock-metrics span, .post-lock-metrics strong { display: block; }
.post-lock-metrics span { color: var(--muted); font-size: 11px; }
.post-lock-metrics strong { margin-top: 3px; font-size: 20px; font-variant-numeric: tabular-nums; }
.post-lock-section { min-width: 0; border-top: 1px solid var(--line); background: var(--surface); }
.post-lock-section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 14px 0 10px; }
.post-lock-section-heading h3, .post-lock-section-heading p { margin: 0; }
.post-lock-section-heading h3 { font-size: 17px; }
.post-lock-section-heading p:last-child { margin-top: 4px; color: var(--muted); font-size: 12px; }
.post-lock-scope { display: inline-flex; padding: 3px; border: 1px solid var(--line-soft); border-radius: 6px; background: var(--surface-muted); }
.post-lock-scope button { min-height: 30px; padding: 0 10px; border: 0; border-radius: 4px; background: transparent; color: var(--muted-strong); }
.post-lock-scope button.active { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(25, 34, 42, .08); }
.post-lock-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px; border: 1px solid var(--line-soft); border-bottom: 0; border-radius: 6px 6px 0 0; background: var(--surface-soft); }
.post-lock-toolbar > span { color: var(--muted); font-size: 11px; text-align: right; white-space: nowrap; }
.post-lock-search { display: grid; flex: 1 1 320px; grid-template-columns: minmax(0, 1fr) 34px; min-width: 0; margin: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
.post-lock-search input { min-width: 0; height: 34px; padding: 0 10px; border: 0; outline: 0; background: transparent; }
.post-lock-search button { width: 34px; padding: 0; border: 0; background: transparent; color: var(--muted); }
.post-lock-toolbar select { flex: 0 1 154px; width: auto; min-width: 132px; height: 36px; padding: 0 28px 0 9px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--ink); }
.post-lock-table-scroll { max-height: 390px; overflow: auto; border: 1px solid var(--line-soft); border-radius: 0 0 6px 6px; }
.post-lock-table { width: 100%; min-width: 1040px; border-collapse: collapse; table-layout: fixed; font-size: 11px; }
.post-lock-table th, .post-lock-table td { padding: 9px 10px; overflow: hidden; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; }
.post-lock-table th { position: sticky; top: 0; z-index: 2; background: var(--surface-soft); color: var(--muted-strong); font-weight: 650; }
.post-lock-table tbody tr:hover { background: var(--surface-subtle); }
.post-lock-table td > strong, .post-lock-table td > small { display: block; overflow-wrap: anywhere; }
.post-lock-table td > small { margin-top: 4px; overflow: hidden; color: var(--muted); line-height: 1.35; text-overflow: ellipsis; }
.post-lock-table th:first-child { width: 17%; }
.post-lock-table th:nth-child(2) { width: 18%; }
.post-lock-table th:nth-child(3) { width: 15%; }
.post-lock-table th:nth-child(4) { width: 14%; }
.post-lock-table th:nth-child(5) { width: 16%; }
.post-lock-table th:last-child { width: 20%; }
.post-lock-table:not(.post-lock-history-table) th:last-child,
.post-lock-table:not(.post-lock-history-table) td:last-child { position: sticky; right: 0; z-index: 1; border-left: 1px solid var(--line-soft); background: var(--surface); box-shadow: -5px 0 9px rgba(25, 34, 42, .05); }
.post-lock-table:not(.post-lock-history-table) th:last-child { z-index: 3; background: var(--surface-soft); }
.post-lock-table:not(.post-lock-history-table) tbody tr:hover td:last-child { background: var(--surface-subtle); }
.post-lock-history-table th:first-child { width: 14%; }
.post-lock-history-table th:nth-child(2) { width: 14%; }
.post-lock-history-table th:nth-child(3) { width: 23%; }
.post-lock-history-table th:nth-child(4) { width: 13%; }
.post-lock-history-table th:nth-child(5) { width: 12%; }
.post-lock-history-table th:nth-child(6) { width: 12%; }
.post-lock-history-table th:last-child { width: 12%; }
.post-lock-case-link { padding: 0; border: 0; background: transparent; color: var(--accent); font-weight: 750; text-align: left; }
.post-lock-row-actions, .post-lock-row-actions .stage-b3-actions { display: flex; flex-wrap: wrap; gap: 5px; }
.post-lock-row-actions .inline-action { min-height: 29px; padding: 5px 8px; font-size: 11px; }
.post-lock-drawer-layer, .post-lock-initiation-layer { position: fixed; inset: 0; z-index: 90; display: flex; justify-content: flex-end; }
.post-lock-drawer-backdrop { position: absolute; inset: 0; border: 0; background: rgba(18, 25, 31, .36); }
.post-lock-drawer, .post-lock-initiation { position: relative; z-index: 1; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; width: min(720px, calc(100vw - 280px)); height: 100%; background: var(--surface); box-shadow: -12px 0 30px rgba(18, 25, 31, .16); }
.post-lock-drawer > header, .post-lock-initiation > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.post-lock-drawer > header h3, .post-lock-drawer > header p, .post-lock-initiation > header h3, .post-lock-initiation > header p { margin: 0; }
.post-lock-drawer > header p:last-child, .post-lock-initiation > header p:last-child { margin-top: 4px; color: var(--muted); font-size: 12px; }
.post-lock-drawer-scroll { min-height: 0; overflow-y: auto; }
.post-lock-drawer > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 58px; padding: 9px 14px; border-top: 1px solid var(--line); background: var(--surface); }
.post-lock-overview { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-bottom: 1px solid var(--line); }
.post-lock-overview > div { min-width: 0; padding: 12px 16px; }
.post-lock-overview > div:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.post-lock-overview span, .post-lock-overview strong { display: block; }
.post-lock-overview span { color: var(--muted); font-size: 11px; }
.post-lock-overview strong { margin-top: 4px; font-size: 13px; }
.post-lock-detail-section { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.post-lock-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.post-lock-section-title h4, .post-lock-section-title p { margin: 0; }
.post-lock-section-title > span { color: var(--muted-strong); font-size: 12px; }
.post-lock-diff-table { border: 1px solid var(--line-soft); border-radius: 5px; overflow: hidden; }
.post-lock-diff-row { display: grid; grid-template-columns: minmax(130px, .7fr) repeat(2, minmax(0, 1fr)); }
.post-lock-diff-row + .post-lock-diff-row { border-top: 1px solid var(--line-soft); }
.post-lock-diff-row > * { min-width: 0; padding: 8px 10px; overflow-wrap: anywhere; }
.post-lock-diff-row > * + * { border-left: 1px solid var(--line-soft); }
.post-lock-diff-row.is-head { background: var(--surface-soft); color: var(--muted); font-size: 11px; }
.post-lock-impact-lines, .post-lock-related { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.post-lock-impact-lines span, .post-lock-related > div { padding: 8px 10px; border: 1px solid var(--line-soft); border-radius: 5px; color: var(--muted); font-size: 11px; }
.post-lock-impact-lines strong, .post-lock-related span, .post-lock-related strong { display: block; margin-top: 3px; color: var(--ink); }
.post-lock-version-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line-soft); border-radius: 5px; }
.post-lock-version-grid > div { min-width: 0; padding: 10px; }
.post-lock-version-grid > div + div { border-left: 1px solid var(--line-soft); }
.post-lock-version-grid span, .post-lock-version-grid strong, .post-lock-version-grid small { display: block; }
.post-lock-version-grid span, .post-lock-version-grid small { color: var(--muted); font-size: 10px; }
.post-lock-version-grid strong { margin: 4px 0; font-size: 18px; }
.post-lock-version-grid small { line-height: 1.45; }
.post-lock-timeline { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.post-lock-timeline li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; padding-bottom: 12px; }
.post-lock-timeline li::before { position: absolute; top: 12px; bottom: 0; left: 5px; width: 1px; background: var(--line); content: ""; }
.post-lock-timeline li:last-child::before { display: none; }
.post-lock-timeline li > span { z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 2px solid var(--accent); border-radius: 50%; background: var(--surface); }
.post-lock-timeline strong, .post-lock-timeline small, .post-lock-timeline p { display: block; margin: 0; }
.post-lock-timeline small, .post-lock-timeline p { margin-top: 3px; color: var(--muted); font-size: 11px; }
.post-lock-initiation { grid-template-rows: auto auto minmax(0, 1fr); width: min(860px, calc(100vw - 280px)); }
.post-lock-initiation > .post-lock-search { margin: 12px 16px 0; }
.post-lock-initiation-body { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(360px, 1.2fr); min-height: 0; margin-top: 12px; border-top: 1px solid var(--line); }
.post-lock-initiation-list { min-height: 0; overflow-y: auto; border-right: 1px solid var(--line); }
.post-lock-initiation-list > button { display: grid; gap: 4px; width: 100%; padding: 10px 12px; border: 0; border-bottom: 1px solid var(--line-soft); background: var(--surface); color: var(--ink); text-align: left; }
.post-lock-initiation-list > button:hover, .post-lock-initiation-list > button.active { background: var(--surface-subtle); }
.post-lock-initiation-list > button.active { box-shadow: inset 3px 0 0 var(--accent); }
.post-lock-initiation-list span { display: flex; justify-content: space-between; gap: 10px; }
.post-lock-initiation-list em { color: var(--muted); font-style: normal; }
.post-lock-initiation-list small { overflow: hidden; color: var(--muted); text-overflow: ellipsis; white-space: nowrap; }
.post-lock-initiation-detail { min-height: 0; padding: 14px 16px; overflow-y: auto; }
.post-lock-initiation-detail dl { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(0, auto); gap: 0; margin: 0; border: 1px solid var(--line-soft); border-radius: 5px; overflow: hidden; }
.post-lock-initiation-detail dt, .post-lock-initiation-detail dd { margin: 0; padding: 8px 10px; border-bottom: 1px solid var(--line-soft); }
.post-lock-initiation-detail dt { color: var(--muted); }
.post-lock-initiation-detail dd { text-align: right; font-weight: 650; }
.post-lock-allowed-types { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.post-lock-allowed-types > * { padding: 5px 8px; border: 1px solid var(--line-soft); border-radius: 4px; font-size: 11px; }
.post-lock-allowed-types span { border-color: transparent; color: var(--muted); }
.post-lock-initiation-actions { margin-top: 12px; }
@media (max-width: 1180px) {
  .post-lock-toolbar > span { text-align: left; }
  .post-lock-drawer, .post-lock-initiation { width: min(760px, calc(100vw - 64px)); }
}
@media (max-width: 760px) {
  .post-lock-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .post-lock-metrics > div:nth-child(3) { border-top: 1px solid var(--line-soft); border-left: 0; }
  .post-lock-metrics > div:nth-child(4) { border-top: 1px solid var(--line-soft); }
  .post-lock-section-heading, .post-lock-drawer > footer { align-items: stretch; flex-direction: column; }
  .post-lock-toolbar select { flex: 1 1 150px; }
  .post-lock-initiation-body { grid-template-columns: minmax(0, 1fr); }
  .post-lock-initiation-list { max-height: 240px; border-right: 0; border-bottom: 1px solid var(--line); }
  .post-lock-drawer, .post-lock-initiation { width: 100vw; }
  .post-lock-impact-lines, .post-lock-related, .post-lock-version-grid { grid-template-columns: minmax(0, 1fr); }
.post-lock-version-grid > div + div { border-top: 1px solid var(--line-soft); border-left: 0; }
}

/* Final cascade guard: later finance workbench styles must not reset agent navigation widths. */
@media (min-width: 1081px) {
  .app-shell { grid-template-columns: 216px minmax(0, 1fr); }
}

/*
 * 经纪人首页封板布局：在不缩小主文字的前提下，去除顶栏与身份卡的
 * 重复信息，使 1366×768 真实视口可完整看到四条待办和首条在途成交。
 * 这些样式只影响 role=agent，总部、财务、风控与服务站工作台不受影响。
 */
body[data-workspace-role="agent"] .topbar {
  min-height: 64px;
  align-items: center;
  margin-bottom: 10px;
  padding-block: 8px;
}

body[data-workspace-role="agent"] .topbar > div:first-child .eyebrow,
body[data-workspace-role="agent"] .topbar > div:first-child .workspace-subtitle {
  display: none;
}

body[data-workspace-role="agent"] .topbar h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

body[data-workspace-role="agent"] .global-tools {
  grid-template-rows: 40px;
  align-items: center;
}

body[data-workspace-role="agent"] .global-tools > label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

body[data-workspace-role="agent"] .main-grid.immersive > .panel,
body[data-workspace-role="agent"] .panel.large-panel {
  padding: 12px;
}

body[data-workspace-role="agent"] .workspace-breadcrumb {
  margin-bottom: 7px;
  font-size: 12px;
}

body[data-workspace-role="agent"] .agent-home-v2 {
  gap: 8px;
}

body[data-workspace-role="agent"] .compact-home-head {
  min-height: 58px;
  padding: 8px 12px;
}

body[data-workspace-role="agent"] .compact-home-head h3 {
  font-size: 18px;
}

body[data-workspace-role="agent"] .compact-metric-grid .work-metric-card {
  min-height: 68px;
  padding: 8px 10px;
}

body[data-workspace-role="agent"] .compact-metric-grid .work-metric-card {
  gap: 4px;
}

body[data-workspace-role="agent"] .compact-metric-grid .work-metric-card strong {
  font-size: 20px;
}

body[data-workspace-role="agent"] .workflow-heading {
  min-height: 30px;
  margin-bottom: 3px;
}

body[data-workspace-role="agent"] .workflow-heading h3 {
  margin: 0;
}

body[data-workspace-role="agent"] .workflow-heading .eyebrow {
  margin-bottom: 2px;
}

body[data-workspace-role="agent"] .compact-todo-list {
  max-height: 232px;
}

body[data-workspace-role="agent"] .compact-todo-list .todo-card {
  min-height: 52px;
  padding: 6px 9px;
}

/* 首页“今天必须处理”的动作按钮与卡片内容共用垂直中轴，避免全局按钮的底部间距造成视觉下沉。 */
.home-priority-section .todo-card > .inline-action {
  align-self: center;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0;
  line-height: 1.2;
  white-space: nowrap;
}

/* 两行待办说明需要完整内容轨道，避免按钮按溢出的网格轨道居中。 */
body[data-workspace-role="agent"] .home-priority-section .compact-todo-list .todo-card {
  min-height: 60px;
}

/* 保持首页首屏能完整看到四条待办，剩余事项继续在列表内滚动。 */
body[data-workspace-role="agent"] .home-priority-section .compact-todo-list {
  max-height: 276px;
}

body[data-workspace-role="agent"] .compact-deal-list .active-deal-row {
  min-height: 58px;
  padding: 7px 10px;
}

body[data-workspace-role="agent"] .compact-deal-list .active-deal-row .tag {
  padding: 2px 6px;
}

body[data-workspace-role="agent"] .compact-deal-list .active-deal-row strong {
  margin: 3px 0 1px;
}

body[data-workspace-role="agent"] .compact-deal-list .active-deal-row > .inline-action {
  margin: 0;
}

/* 1024 宽度使用显式“更多”菜单，不依赖被隐藏的横向滚动条。 */
.agent-nav-more {
  display: none;
  position: relative;
  flex: 0 0 96px;
}

.agent-nav-more > summary {
  min-height: 44px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 7px;
  color: #c9d3de;
  cursor: pointer;
  list-style: none;
}

.agent-nav-more > summary::-webkit-details-marker { display: none; }
.agent-nav-more > summary:hover,
.agent-nav-more.active > summary,
.agent-nav-more[open] > summary {
  border-color: rgba(244, 209, 138, 0.25);
  background: rgba(244, 209, 138, 0.12);
  color: #fff;
}

.agent-nav-more-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 8px);
  right: 0;
  width: min(520px, calc(100vw - 24px));
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-lg);
}

.agent-nav-more-group {
  min-width: 0;
  padding: 7px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--panel-muted);
}

.agent-nav-more-group > header {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 5px;
  color: var(--ink);
  font-size: 12px;
}

.agent-nav-more-group .nav-child-button {
  margin-left: 0;
  color: var(--muted-strong);
}

.agent-nav-more-group .nav-child-button.active {
  color: var(--brand);
  background: #eef4fb;
}

/* 消息主动作与已读辅助动作分区，整卡和主按钮共用同一结构化落点。 */
.agent-notification-list .notification-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 0;
}

.agent-notification-list .notification-main {
  padding: 10px 8px 10px 11px;
}

.agent-notification-actions {
  min-width: 126px;
  display: grid;
  justify-items: stretch;
  gap: 5px;
  padding: 8px 9px 8px 0;
}

.agent-notification-primary,
.agent-notification-actions .notification-read-action {
  position: static;
  width: 100%;
  min-height: 30px;
  white-space: nowrap;
}

.notification-task-badge {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.notification-main-readonly { cursor: default; }

.agent-case-location,
.agent-record-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid #b9d1ea;
  border-radius: 7px;
  background: #f3f8fd;
}

.agent-case-location h4,
.agent-case-location p { margin: 0; }
.agent-case-location small { display: block; margin-top: 5px; color: var(--muted); }
.contract-card.selected { border-color: var(--blue); box-shadow: 0 0 0 2px rgba(62, 111, 158, 0.12); }

@media (max-width: 1080px) {
  .agent-primary-nav {
    overflow: visible;
  }

  .agent-primary-nav > .nav-group:nth-of-type(n + 5) {
    display: none;
  }

  .agent-primary-nav > .agent-nav-more {
    display: block;
  }

  body[data-workspace-role="agent"] .topbar {
    grid-template-columns: minmax(180px, 1fr) minmax(300px, 420px);
    margin: 0 0 10px;
    padding: 8px 12px;
  }
}

@media (max-width: 720px) {
  .agent-nav-more-menu { grid-template-columns: 1fr; }
  .agent-notification-list .notification-card { grid-template-columns: 1fr; }
  .agent-notification-actions { grid-template-columns: 1fr auto; padding: 0 9px 9px; }
}

/*
 * 公盘与内部上盘界面：保持高频 SaaS 扫读密度，用图片、状态、时间和主动作
 * 建立固定布局。权益口径采用独立信息带，避免与房源卡片嵌套。
 */
.notification-bell-icon {
  width: 18px;
  height: 18px;
  position: relative;
  display: inline-block;
  border: 2px solid currentColor;
  border-top-left-radius: 9px;
  border-top-right-radius: 9px;
  border-bottom: 0;
  transform: translateY(1px);
}

.notification-bell-icon::before {
  content: "";
  position: absolute;
  left: 2px;
  right: 2px;
  bottom: -4px;
  border-top: 2px solid currentColor;
}

.notification-bell-icon::after {
  content: "";
  position: absolute;
  left: 5px;
  bottom: -7px;
  width: 4px;
  height: 3px;
  border-radius: 0 0 4px 4px;
  background: currentColor;
}

.notification-bell-icon > span {
  position: absolute;
  top: -5px;
  left: 6px;
  width: 3px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: currentColor;
}

.property-library-type-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface-soft);
  overflow-x: auto;
}

.property-library-type-tabs button {
  min-width: 78px;
  min-height: 34px;
  padding: 6px 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted-strong);
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

.property-library-type-tabs button:hover {
  background: #fff;
  color: var(--ink);
}

.property-library-type-tabs button.active {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.public-pool-head {
  align-items: end;
  gap: 24px;
}

.policy-callout.compact,
.internal-source-policy {
  max-width: 520px;
  padding: 11px 13px;
  border-left: 3px solid var(--blue);
  background: #f2f6fb;
  color: var(--ink);
}

.policy-callout.compact strong,
.policy-callout.compact span,
.internal-source-policy strong,
.internal-source-policy p {
  display: block;
  margin: 0;
}

.policy-callout.compact span,
.internal-source-policy p {
  margin-top: 4px;
  color: var(--muted-strong);
  font-size: 13px;
  line-height: 1.55;
}

.agent-readonly-preview {
  display: grid;
  gap: 18px;
}

.agent-readonly-preview .governed-empty-state {
  max-width: 760px;
}

.public-pool-list,
.internal-source-list {
  display: grid;
  gap: 10px;
}

.public-pool-card {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr);
  gap: 16px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.public-pool-card > .property-thumb {
  width: 168px;
  height: 126px;
}

.public-pool-card-main,
.public-pool-card-title > div {
  min-width: 0;
}

.public-pool-card-title,
.public-pool-card-actions,
.public-pool-facts,
.public-pool-share-strip {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.public-pool-card-title {
  justify-content: space-between;
}

.public-pool-card-title h4 {
  margin: 2px 0 0;
  font-size: 17px;
  letter-spacing: 0;
}

.public-pool-card-main > p {
  margin: 8px 0;
  color: var(--muted-strong);
}

.public-pool-facts {
  display: grid;
  grid-template-columns: minmax(130px, 0.7fr) minmax(190px, 1fr) minmax(180px, 1fr);
  padding: 9px 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.public-pool-facts span {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.public-pool-facts strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.public-pool-share-strip {
  margin-top: 9px;
}

.public-pool-share-strip span {
  padding: 4px 7px;
  border: 1px solid #c9d7e7;
  border-radius: 4px;
  background: #f6f9fc;
  color: #315474;
  font-size: 12px;
  font-weight: 700;
}

.public-pool-card-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.internal-source-policy {
  max-width: none;
  margin: 12px 0;
  border-left-color: var(--amber);
  background: #fff7ed;
}

.internal-source-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, auto);
  gap: 16px;
  align-items: center;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #fff;
}

.internal-source-row > div:first-child {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.internal-source-row .property-thumb {
  width: 112px;
  height: 82px;
}

.internal-source-row p,
.internal-source-row small {
  display: block;
  margin: 4px 0 0;
  color: var(--muted);
}

.internal-source-row > div:last-child {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.property-create-grid.single {
  grid-template-columns: minmax(280px, 620px);
}

@media (max-width: 1100px) {
  .public-pool-head {
    align-items: stretch;
  }

  .public-pool-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-search-row {
    grid-template-columns: 112px minmax(220px, 1fr) minmax(120px, auto);
  }

  .property-search-row .property-search-status,
  .property-search-row .property-search-actions-row {
    grid-column: 2 / -1;
  }
}

@media (max-width: 760px) {
  .public-pool-card,
  .internal-source-row,
  .internal-source-row > div:first-child {
    grid-template-columns: 1fr;
  }

  .public-pool-card > .property-thumb,
  .internal-source-row .property-thumb {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .public-pool-facts {
    grid-template-columns: 1fr;
  }

  .public-pool-card-actions,
  .internal-source-row > div:last-child {
    justify-content: stretch;
    justify-items: stretch;
  }

  .public-pool-card-actions > *,
  .internal-source-row .inline-actions > * {
    flex: 1 1 140px;
  }
}

/*
 * 全系统桌面排版规格：仅收敛尺寸、间距和对齐，不改变现有颜色、字体、
 * 边框与圆角语言。主动作、筛选动作和图标动作分为三档，业务卡片按钮、
 * 搜索栏、抽屉底栏与表格操作列均使用同一基线，避免文案长度造成上下跳动。
 */
:root {
  --control-height-action: 36px;
  --control-height-filter: 34px;
  --control-height-field: 40px;
  --control-height-icon: 40px;
  --control-gap: 8px;
  --page-block-gap: 14px;
}

.module-detail,
.agent-workbench,
.workflow-section,
.property-workbench,
.management-workspace,
.property-page-head > div:first-child,
.management-page-head > div:first-child,
.workflow-heading > div:first-child,
.form-section-head > div:first-child,
.property-create-section-head > div:first-child {
  min-width: 0;
}

.module-detail,
.agent-workbench,
.workflow-section,
.property-workbench {
  align-content: start;
}

.inline-action,
.property-actions button,
.text-button,
.confirm-cancel,
.confirm-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height-action);
  margin: 0;
  padding: 0 12px;
  line-height: 1.2;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
}

.inline-actions,
.property-actions,
.detail-card-actions,
.detail-card-footer,
.high-frequency-actions,
.growth-actions,
.scenario-actions,
.pipeline-actions,
.form-actions,
.confirm-actions,
.public-pool-card-actions,
.property-search-actions,
.property-search-utilities,
.property-search-actions-row,
.property-result-actions,
.management-row-actions,
.post-lock-row-actions,
.stage-b3-actions,
.stage-b4-actions {
  align-items: center;
  gap: var(--control-gap);
  margin-bottom: 0;
}

.workflow-heading,
.property-page-head,
.management-page-head,
.form-section-head,
.property-create-section-head,
.finance-matching-header,
.payment-inbox-header,
.matcher-v2-head,
.post-lock-section-heading {
  min-width: 0;
}

.workflow-heading,
.form-section-head,
.property-create-section-head {
  align-items: center;
}

.workflow-heading > :last-child,
.property-page-head > :last-child,
.management-page-head > :last-child,
.form-section-head > :last-child,
.property-create-section-head > :last-child {
  flex: 0 0 auto;
}

.workflow-heading h3,
.form-section-head h4,
.property-create-section-head h4 {
  margin-top: 0;
  margin-bottom: 0;
}

.filter-bar,
.notification-filters,
.management-filters,
.page-tabs,
.property-library-type-tabs,
.matcher-v2-tabs,
.matcher-v2-mode,
.payment-inbox-tabs,
.payment-inbox-section-nav,
.payment-queue-tabs,
.post-lock-scope {
  align-items: center;
  gap: 4px;
}

.filter-bar button,
.notification-filters button,
.management-filters button,
.page-tab,
.property-library-type-tabs button,
.matcher-v2-tabs button,
.matcher-v2-mode button,
.payment-inbox-tabs button,
.payment-inbox-section-nav button,
.payment-queue-tabs button,
.post-lock-scope button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control-height-filter);
  padding-top: 0;
  padding-bottom: 0;
  line-height: 1.2;
  white-space: nowrap;
}

.matcher-v2-search {
  min-height: var(--control-height-filter);
}

.matcher-v2-search input,
.matcher-v2-search button,
.matcher-v2-other-candidates {
  height: var(--control-height-filter);
  min-height: var(--control-height-filter);
}

.matcher-v2-search input {
  padding-top: 0;
  padding-bottom: 0;
}

.icon-button {
  width: var(--control-height-icon);
  min-width: var(--control-height-icon);
  height: var(--control-height-icon);
  min-height: var(--control-height-icon);
  padding: 0;
}

.icon-back-button.compact {
  width: 32px;
  min-width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
}

.list-search-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.list-search-field {
  width: 100%;
  min-width: 0;
}

.list-search-field input,
.property-search-main input,
.global-tools input,
.role-login select {
  height: var(--control-height-field);
  min-height: var(--control-height-field);
}

.list-search-meta {
  align-items: center;
  min-height: var(--control-height-field);
}

.list-search-meta .inline-action {
  min-height: var(--control-height-filter);
}

.property-search-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: var(--control-gap);
}

.property-search-main .inline-action {
  min-height: var(--control-height-field);
}

/* 房源库检索、操作和筛选分层：当前库由上方库类型 Tab 表达，避免混入筛选条件。 */
.property-search-toolbar {
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.property-search-topline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 16px;
}

.property-search-main {
  grid-template-columns: auto minmax(240px, 1fr) auto;
  align-items: end;
  min-width: 0;
}

.property-search-label,
.property-filter-panel-head strong,
.property-filter-cluster-head strong,
.property-filter-shortcuts-head strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.property-search-label {
  min-height: var(--control-height-field);
  display: inline-flex;
  align-items: center;
}

.property-search-utilities {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: var(--control-height-action);
  gap: 8px;
  flex-wrap: wrap;
}

.property-search-utilities .inline-action {
  min-height: var(--control-height-action);
  white-space: nowrap;
}

.property-search-utilities .inline-action:first-child {
  gap: 5px;
}

.property-library-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.property-library-page-actions .primary-action {
  min-height: var(--control-height-action);
  padding-inline: 14px;
}

.property-filter-panel {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.property-filter-cluster-head,
.property-filter-shortcuts-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

/* 快捷标签贴合筛选标题，保留高频入口而不单独占用一整块页面空间。 */
.property-filter-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.property-filter-panel-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.property-filter-quick-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  min-width: 0;
}

.property-filter-quick-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.property-filter-quick-tags {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.property-filter-quick-tags button,
.property-filter-quick-clear {
  min-height: 28px;
  padding: 0 9px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
  font-size: 12px;
  white-space: nowrap;
}

.property-filter-quick-tags button:hover,
.property-filter-quick-clear:hover {
  border-color: var(--accent);
}

.property-filter-quick-tags button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--panel);
}

.property-filter-quick-clear {
  color: var(--muted-strong);
}

.property-filter-panel-head span,
.property-filter-cluster-head span,
.property-filter-shortcuts-head small {
  color: var(--muted);
  font-size: 12px;
}

.property-advanced-filters {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(350px, 1.55fr) minmax(390px, 1.7fr);
  align-items: stretch;
  gap: 10px;
}

.property-filter-cluster {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--surface-soft);
}

.property-advanced-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.property-advanced-filters label > span {
  color: var(--muted);
  font-size: 12px;
}

.property-advanced-filters select,
.property-price-range input {
  width: 100%;
  height: var(--control-height-action);
  min-height: var(--control-height-action);
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.property-price-controls {
  display: grid;
  grid-template-columns: minmax(120px, 0.75fr) minmax(0, 1.25fr);
  align-items: end;
  gap: 8px;
}

/* 预设价格和自定义范围并列，仍可独立使用，避免三个输入框在同一行互相挤压。 */
.property-price-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  min-width: 0;
}

.property-price-range > span {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.property-meta-filter-controls {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

/* 分类列表使用真实筛选控件，避免把“天河、600 万、三房”等示例值伪装成默认条件。 */
.property-category-filter-toolbar {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--panel);
}

.property-category-search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: end;
  gap: 8px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line-soft);
}

.property-category-search-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.property-category-search-field > span,
.property-category-filter-head strong,
.property-category-filter-grid label > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.property-category-search-field input,
.property-category-filter-grid select,
.property-category-filter-grid input {
  width: 100%;
  height: var(--control-height-field);
  min-height: var(--control-height-field);
  padding: 0 10px;
  border: 1px solid var(--line-soft);
  border-radius: 6px;
  background: var(--panel);
  color: var(--ink);
}

.property-category-search-row > .inline-action {
  min-height: var(--control-height-field);
  white-space: nowrap;
}

.property-category-filter-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.property-category-filter-head span {
  color: var(--muted);
  font-size: 12px;
}

.property-category-filter-grid {
  display: grid;
  grid-template-columns: minmax(145px, 0.8fr) minmax(180px, 0.95fr) minmax(280px, 1.45fr) minmax(145px, 0.8fr) minmax(145px, 0.8fr) minmax(145px, 0.8fr);
  align-items: end;
  gap: 8px;
}

.property-category-filter-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.property-category-price-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 6px;
  min-width: 0;
}

.property-category-price-range > span {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.property-category-filter-toolbar .property-filter-quick-row {
  justify-content: flex-start;
  min-height: 28px;
  padding-top: 2px;
}

.property-filter-shortcuts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 8px 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line-soft);
}

.property-filter-shortcuts > .selected-filters {
  grid-column: 1 / -1;
}

.property-filter-shortcuts-head > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.property-filter-shortcuts .filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.property-filter-shortcuts .property-filter-quick-row {
  justify-content: flex-start;
}

.property-filter-shortcuts .property-filter-quick-tags {
  justify-content: flex-start;
}

.property-filter-shortcuts .filter-bar button {
  min-height: 32px;
  padding: 0 11px;
}

.property-filter-shortcuts .selected-filters {
  min-height: 0;
  padding: 0;
  font-size: 12px;
}

.property-advanced-filters select,
.management-facet-bar select {
  height: var(--control-height-action);
  min-height: var(--control-height-action);
}

.selected-filters {
  align-items: center;
  min-height: var(--control-height-action);
  padding: 2px 0;
}

.selected-filters .inline-action {
  min-height: var(--control-height-filter);
}

.customer-card > .inline-actions,
.deal-report-row > .inline-actions,
.risk-report-row > .inline-actions,
.reversal-request-row > .inline-actions,
.property-search-actions-row,
.property-result-actions,
.public-pool-card-actions,
.internal-source-row .inline-actions {
  justify-content: flex-end;
  align-self: center;
}

.todo-card > .inline-action,
.active-deal-row > .inline-action,
.customer-card > .inline-action,
.deal-report-row > .inline-action {
  align-self: center;
  justify-self: end;
}

.detail-drawer-actions {
  align-items: center;
  justify-content: flex-end;
}

.management-row-actions .inline-action,
.post-lock-row-actions .inline-action {
  min-height: 30px;
  margin: 0;
  padding: 0 8px;
  font-size: 11px;
  line-height: 1.2;
}

.action-dialog .confirm-actions,
.confirm-dialog .confirm-actions {
  align-items: center;
}

.action-dialog .confirm-actions > button,
.confirm-dialog .confirm-actions > button {
  min-width: 88px;
}

@media (max-width: 980px) {
  .property-search-topline {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .property-search-utilities {
    justify-content: flex-start;
  }

  .property-filter-panel-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .property-filter-shortcuts {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .property-filter-shortcuts > .selected-filters {
    grid-column: auto;
  }

  .property-filter-quick-row,
  .property-filter-quick-tags {
    justify-content: flex-start;
  }

  .property-advanced-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .property-filter-cluster-price,
  .property-filter-cluster-meta {
    grid-column: span 2;
  }

  .property-category-filter-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .property-category-price-range {
    grid-column: span 2;
  }

  .property-price-range {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .property-page-head,
  .management-page-head,
  .workflow-heading,
  .form-section-head,
  .property-create-section-head {
    align-items: stretch;
    flex-direction: column;
  }

  .list-search-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .list-search-meta {
    justify-content: space-between;
    min-height: 0;
  }

  .property-advanced-filters {
    grid-template-columns: minmax(0, 1fr);
  }

  .property-search-main {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .property-search-label {
    grid-column: 1 / -1;
    min-height: auto;
  }

  .property-price-controls,
  .property-meta-filter-controls {
    grid-template-columns: minmax(0, 1fr);
  }

  .property-category-search-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }

  .property-category-search-field {
    grid-column: 1 / -1;
  }

  .property-category-filter-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .property-category-filter-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .property-category-price-range {
    grid-column: auto;
  }

  .property-filter-cluster-price,
  .property-filter-cluster-meta {
    grid-column: auto;
  }

  .property-price-range {
    grid-column: auto;
  }

  .property-actions,
  .inline-actions,
  .detail-drawer-actions,
  .form-actions,
  .confirm-actions {
    justify-content: flex-start;
  }
}

/*
 * 客户详情顶部采用“事实摘要 + 紧凑操作”层级。
 * 仅覆盖视觉尺寸与排版，不改变电子签约、成交报数、客户状态或按钮行为。
 */
.customer-detail-shell .customer-detail-head {
  gap: 10px 18px;
  padding-bottom: 12px;
}

.customer-detail-shell .customer-detail-head h3 {
  font-size: 25px;
  line-height: 1.2;
}

.customer-detail-shell .customer-detail-head > p {
  margin-top: 3px;
  font-size: 14px;
}

.customer-detail-shell .customer-detail-head .property-actions {
  gap: 7px;
}

.customer-detail-shell .customer-detail-head .property-actions .inline-action {
  min-height: 34px;
  padding: 0 10px;
  font-size: 13px;
}

.customer-detail-shell .customer-summary-metrics {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  overflow: hidden;
}

.customer-detail-shell .customer-summary-card.detail-metric-card {
  min-height: 66px;
  padding: 11px 14px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell .customer-summary-card.detail-metric-card:last-child {
  border-right: 0;
}

.customer-detail-shell .detail-metric-card > span,
.customer-detail-shell .detail-metric-card > small {
  font-size: 12px;
  line-height: 1.35;
}

.customer-detail-shell .detail-metric-card > strong {
  margin-top: 6px;
  font-size: 20px;
  line-height: 1.15;
}

/* 签约是辅助闭环入口，压缩为一行；成交报数保持主动作但不扩张为大卡片。 */
.customer-detail-shell > .customer-high-frequency-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  margin: 10px 0 14px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry {
  display: grid;
  grid-template-columns: 26px auto minmax(0, 1fr);
  grid-template-areas: "icon copy templates";
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-icon {
  grid-area: icon;
  grid-row: auto;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  font-size: 14px;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy {
  display: flex;
  grid-area: copy;
  grid-template-columns: none;
  align-items: center;
  gap: 6px;
  min-width: max-content;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy strong {
  font-size: 14px;
  line-height: 1;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-copy small {
  display: inline-flex;
  justify-self: auto;
  margin: 0;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.2;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-templates {
  display: flex;
  grid-area: templates;
  grid-column: auto;
  align-items: center;
  gap: 5px;
  margin: 0;
  overflow: hidden;
}

.customer-detail-shell > .customer-high-frequency-actions .esign-entry-templates em {
  flex: 0 0 auto;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 11px;
  line-height: 1.2;
}

.customer-detail-shell > .customer-high-frequency-actions .customer-high-frequency-divider {
  display: none;
}

.customer-detail-shell > .customer-high-frequency-actions > .inline-action {
  flex: 0 0 auto;
  width: auto;
  min-width: 150px;
  min-height: 36px;
  margin: 0;
  padding: 0 14px;
  border-radius: 6px;
  box-shadow: none;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-icon {
  margin-right: 5px;
  font-size: 15px;
}

.customer-detail-shell > .customer-high-frequency-actions .deal-report-entry-copy strong {
  font-size: 14px;
}

/* 合同台账改为紧凑记录行，信息仍完整保留。 */
.customer-detail-shell .signature-status-card {
  margin: 0 0 14px;
  padding: 12px 0 0;
}

.customer-detail-shell .signature-status-card .workflow-heading {
  margin-bottom: 5px;
}

.customer-detail-shell .signature-status-card .workflow-heading h3 {
  font-size: 18px;
}

.customer-detail-shell .signature-status-row {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  min-height: 52px;
  padding: 8px 0;
}

.customer-detail-shell .signature-status-row strong {
  font-size: 14px;
}

.customer-detail-shell .signature-status-row p {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.35;
}

.customer-detail-shell .signature-row-actions {
  gap: 7px;
}

.customer-detail-shell .signature-row-actions .inline-action,
.customer-detail-shell .signature-row-actions .signature-state {
  min-height: 28px;
  padding: 0 9px;
  font-size: 12px;
}

@media (max-width: 900px) {
  .customer-detail-shell .customer-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .customer-detail-shell .customer-summary-card.detail-metric-card:nth-child(3n) {
    border-right: 0;
  }

  .customer-detail-shell > .customer-high-frequency-actions .esign-entry-templates {
    display: none;
  }
}

@media (max-width: 720px) {
  .customer-detail-shell .customer-summary-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .customer-detail-shell .customer-summary-card.detail-metric-card {
    border-right: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
  }

  .customer-detail-shell .customer-summary-card.detail-metric-card:nth-child(2n) {
    border-right: 0;
  }

  .customer-detail-shell .customer-summary-card.detail-metric-card:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .customer-detail-shell > .customer-high-frequency-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .customer-detail-shell > .customer-high-frequency-actions > .inline-action {
    width: 100%;
  }
}

/* 合同闭环使用紧凑矩阵，避免五条合同记录在客户详情首屏纵向堆叠。 */
.customer-detail-shell .signature-status-card {
  margin: 0 0 12px;
  padding: 10px 0 0;
}

.customer-detail-shell .signature-status-card .workflow-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 8px;
}

.customer-detail-shell .signature-status-card .workflow-heading > p {
  margin: 0;
  font-size: 12px;
}

.customer-detail-shell .signature-status-card .workflow-heading h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.25;
}

.customer-detail-shell .signature-status-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.customer-detail-shell .signature-status-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 58px;
  padding: 9px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  background: var(--panel);
}

.customer-detail-shell .signature-status-row > div:first-child {
  min-width: 0;
}

.customer-detail-shell .signature-status-row strong,
.customer-detail-shell .signature-status-row p {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-shell .signature-status-row strong {
  display: block;
  font-size: 13px;
  line-height: 1.25;
}

.customer-detail-shell .signature-status-row p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.25;
}

.customer-detail-shell .signature-row-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.customer-detail-shell .signature-row-actions .signature-state,
.customer-detail-shell .signature-row-actions .inline-action {
  min-width: 0;
  min-height: 26px;
  padding: 0 7px;
  font-size: 11px;
  white-space: nowrap;
}

.customer-detail-shell .signature-status-card > details {
  margin-top: 7px;
}

.customer-detail-shell .signature-status-card > details summary {
  font-size: 12px;
}

@media (max-width: 900px) {
  .customer-detail-shell .signature-status-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

/*
 * 客户详情采用“作业主线 + 合同侧栏”布局。
 * 仅改变既有客户详情 DOM 的尺寸与排列，不涉及左侧导航、权限、状态或任何业务事件。
 */
.customer-detail-shell .customer-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.52fr);
  grid-template-areas: "main rail";
  align-items: start;
  gap: 18px;
  margin-top: 2px;
}

.customer-detail-shell .customer-detail-main {
  grid-area: main;
  display: grid;
  min-width: 0;
  gap: 20px;
}

.customer-detail-shell .customer-detail-rail {
  grid-area: rail;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: none;
}

.customer-detail-shell .customer-rail-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
}

.customer-detail-shell .customer-rail-heading .eyebrow {
  margin: 0 0 3px;
  font-size: 11px;
}

.customer-detail-shell .customer-rail-heading h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.customer-detail-shell .customer-detail-rail .customer-high-frequency-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
  margin: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell .customer-detail-rail .esign-entry {
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  min-height: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.customer-detail-shell .customer-detail-rail .esign-entry-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  font-size: 15px;
}

.customer-detail-shell .customer-detail-rail .esign-entry-copy {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 6px;
}

.customer-detail-shell .customer-detail-rail .esign-entry-copy strong {
  font-size: 14px;
}

.customer-detail-shell .customer-detail-rail .esign-entry-copy small,
.customer-detail-shell .customer-detail-rail .esign-entry-templates {
  margin: 0;
}

.customer-detail-shell .customer-detail-rail .esign-entry-templates {
  display: flex;
  gap: 4px;
}

.customer-detail-shell .customer-detail-rail .esign-entry-templates em {
  padding: 2px 5px;
  font-size: 10px;
}

.customer-detail-shell .customer-detail-rail .customer-high-frequency-divider {
  display: none;
}

.customer-detail-shell .customer-detail-rail .deal-report-entry {
  width: 100%;
  min-height: 38px;
  justify-content: center;
  padding: 0 12px;
  border-radius: 7px;
}

.customer-detail-shell .customer-detail-rail .deal-report-entry-copy small {
  display: none;
}

.customer-detail-shell .customer-detail-rail .signature-status-card {
  margin: 0;
  padding: 10px 0 0;
}

.customer-detail-shell .customer-detail-rail .signature-status-card .workflow-heading {
  min-height: 32px;
  margin-bottom: 7px;
  padding: 0;
}

.customer-detail-shell .customer-detail-rail .signature-status-card .workflow-heading h3 {
  font-size: 15px;
}

.customer-detail-shell .customer-detail-rail .signature-status-list {
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.customer-detail-shell .customer-detail-rail .signature-status-row {
  min-height: 50px;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.customer-detail-shell .customer-detail-rail .signature-status-row:last-child {
  border-bottom: 0;
}

.customer-detail-shell .customer-detail-rail .signature-status-row p {
  overflow: hidden;
  max-width: 180px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-shell .customer-detail-rail .signature-row-actions {
  gap: 5px;
}

.customer-detail-shell .customer-detail-rail .signature-row-actions .signature-state,
.customer-detail-shell .customer-detail-rail .signature-row-actions .inline-action {
  min-height: 27px;
  padding: 0 7px;
  font-size: 11px;
}

.customer-detail-shell .customer-detail-main .customer-detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.customer-detail-shell .customer-detail-main .customer-detail-card.large {
  grid-column: 1 / -1;
  grid-row: auto;
}

.customer-detail-shell .customer-detail-main .workflow-columns {
  grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
  gap: 18px;
  margin: 0;
  padding-top: 0;
}

.customer-detail-shell .customer-detail-main .workflow-columns > div:first-child {
  order: 2;
}

.customer-detail-shell .customer-detail-main .workflow-columns > div:last-child {
  order: 1;
}

.customer-detail-shell .customer-detail-main .workflow-columns .workflow-heading {
  min-height: 36px;
  padding: 0 0 6px;
}

.customer-detail-shell .customer-detail-main .workflow-columns .detail-card {
  padding: 11px 0;
}

@media (max-width: 1080px) {
  .customer-detail-shell .customer-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "rail";
  }

  .customer-detail-shell .customer-detail-rail {
    padding: 12px;
  }
}

@media (max-width: 720px) {
  .customer-detail-shell .customer-detail-main .customer-detail-grid,
  .customer-detail-shell .customer-detail-main .workflow-columns {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-detail-shell .customer-detail-main .workflow-columns > div:first-child,
  .customer-detail-shell .customer-detail-main .workflow-columns > div:last-child {
    order: initial;
  }
}

/* 客户详情参照作业台信息密度重构：顶部摘要、左侧作业流、右侧合同台账。 */
.customer-detail-shell .customer-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 18px 28px;
  padding: 0 0 16px;
}

.customer-detail-shell .customer-detail-head h3 {
  display: inline-block;
  margin: 0 12px 7px 0;
  font-size: 28px;
  line-height: 1.25;
}

.customer-detail-shell .customer-header-facts {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  vertical-align: baseline;
}

.customer-detail-shell .customer-header-facts span {
  display: inline-flex;
  align-items: center;
  min-height: 25px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted-strong);
  font-size: 12px;
  font-weight: 700;
}

.customer-detail-shell .customer-header-facts .customer-level-tag {
  border-color: #efd19a;
  background: #fff8e9;
  color: #a56512;
}

.customer-detail-shell .customer-header-facts .customer-risk-tag {
  background: #f5f7fb;
  color: #4d627d;
}

.customer-detail-shell .customer-header-facts .customer-protection-tag {
  border: 0;
  color: var(--ink);
}

.customer-detail-shell .customer-detail-head > div:first-child > p:last-child {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 1.55;
}

.customer-detail-shell .property-actions {
  display: flex;
  justify-content: flex-end;
  max-width: 690px;
  gap: 8px;
}

.customer-detail-shell .property-actions > button,
.customer-detail-shell .property-actions .esign-entry {
  min-height: 38px;
  margin: 0;
  padding: 0 12px;
  border-radius: 6px;
  box-shadow: none;
  font-size: 13px;
  white-space: nowrap;
}

.customer-detail-shell .property-actions .esign-entry {
  display: inline-flex;
  grid-template-columns: auto;
  width: auto;
  gap: 0;
  border: 1px solid var(--line);
  background: var(--panel);
}

.customer-detail-shell .property-actions .esign-entry-icon,
.customer-detail-shell .property-actions .esign-entry-copy small,
.customer-detail-shell .property-actions .esign-entry-templates,
.customer-detail-shell .property-actions .deal-report-entry-copy small {
  display: none;
}

.customer-detail-shell .property-actions .esign-entry-copy {
  display: block;
}

.customer-detail-shell .property-actions .esign-entry-copy strong {
  font-size: 13px;
}

.customer-detail-shell .property-actions .deal-report-entry {
  min-width: 126px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.customer-detail-shell .property-actions .deal-report-entry-icon {
  margin-right: 4px;
}

.customer-detail-shell .customer-summary-metrics {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin: 0;
}

.customer-detail-shell .customer-summary-card.detail-metric-card {
  min-height: 68px;
  padding: 10px 12px;
}

.customer-detail-shell .customer-detail-layout {
  grid-template-columns: minmax(0, 1.58fr) minmax(340px, 0.92fr);
  grid-template-areas: "main rail";
  gap: 16px;
  margin-top: 2px;
}

.customer-detail-shell .customer-detail-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.customer-detail-shell .customer-workflow-overview {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  order: 0;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--line);
}

.customer-detail-shell .customer-workflow-overview .eyebrow {
  margin: 0 0 3px;
  font-size: 11px;
}

.customer-detail-shell .customer-workflow-overview h3 {
  margin: 0;
  font-size: 18px;
}

.customer-detail-shell .customer-work-tabs {
  display: flex;
  align-items: center;
  gap: 18px;
  color: var(--muted-strong);
  font-size: 13px;
  white-space: nowrap;
}

.customer-detail-shell .customer-work-tabs button {
  position: relative;
  padding: 5px 0 8px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.customer-detail-shell .customer-work-tabs button:hover {
  color: var(--ink);
}

.customer-detail-shell .customer-work-tabs button:focus-visible {
  outline: 2px solid rgba(212, 147, 40, 0.38);
  outline-offset: 4px;
}

.customer-detail-shell .customer-work-tabs button.active {
  color: #b97818;
  font-weight: 800;
}

.customer-detail-shell .customer-work-tabs button.active::after {
  position: absolute;
  right: 0;
  bottom: -11px;
  left: 0;
  height: 2px;
  background: #d49328;
  content: "";
}

.customer-detail-shell .customer-work-tab-panel {
  order: 1;
  min-width: 0;
  padding: 16px 0 4px;
}

.customer-detail-shell .customer-tab-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.customer-detail-shell .customer-tab-section-heading .eyebrow {
  margin: 0 0 2px;
  font-size: 11px;
}

.customer-detail-shell .customer-tab-section-heading h3 {
  margin: 0;
  font-size: 16px;
}

.customer-detail-shell .customer-tab-section-heading > span {
  color: var(--muted);
  font-size: 12px;
}

.customer-detail-shell .customer-tab-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.customer-detail-shell .customer-tab-card {
  display: grid;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding: 14px;
}

.customer-detail-shell .customer-tab-card p,
.customer-detail-shell .customer-tab-record p,
.customer-detail-shell .customer-followup-row p,
.customer-detail-shell .customer-tab-empty p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.customer-detail-shell .customer-tab-record-list {
  display: grid;
}

.customer-detail-shell .customer-tab-record {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  width: 100%;
  min-height: 68px;
  padding: 12px 4px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.customer-detail-shell button.customer-tab-record {
  cursor: pointer;
}

.customer-detail-shell button.customer-tab-record:hover {
  background: var(--surface-soft);
}

.customer-detail-shell .customer-tab-record-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.customer-detail-shell .customer-followup-timeline {
  display: grid;
}

.customer-detail-shell .customer-followup-row {
  display: grid;
  grid-template-columns: 128px 14px minmax(0, 1fr);
  gap: 10px;
  min-height: 72px;
}

.customer-detail-shell .customer-followup-row time {
  padding-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.customer-detail-shell .customer-followup-row > span {
  position: relative;
  width: 9px;
  height: 9px;
  margin-top: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #4f88d9;
  box-shadow: 0 0 0 1px #4f88d9;
}

.customer-detail-shell .customer-followup-row > span::after {
  position: absolute;
  top: 11px;
  bottom: -55px;
  left: 3px;
  width: 1px;
  background: var(--line-soft);
  content: "";
}

.customer-detail-shell .customer-followup-row:last-child > span::after {
  display: none;
}

.customer-detail-shell .customer-profile-tab-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.customer-detail-shell .customer-profile-tab-grid article {
  display: grid;
  gap: 5px;
  min-height: 76px;
  padding: 12px 14px;
  border: 1px solid var(--line-soft);
  background: var(--surface-soft);
}

.customer-detail-shell .customer-profile-tab-grid span {
  color: var(--muted);
  font-size: 12px;
}

.customer-detail-shell .customer-tab-empty {
  grid-column: 1 / -1;
  padding: 28px 16px;
  border: 1px dashed var(--line);
  background: var(--surface-soft);
  text-align: center;
}

.customer-detail-shell .workflow-columns {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  order: 1;
  margin: 0;
  padding: 0;
  border: 0;
}

.customer-detail-shell .workflow-columns > div:last-child {
  order: 1;
}

.customer-detail-shell .workflow-columns > div:first-child {
  order: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
}

.customer-detail-shell .workflow-columns > div:first-child .workflow-heading {
  grid-column: 1 / -1;
}

.customer-detail-shell .workflow-columns .workflow-heading {
  min-height: 32px;
  margin: 0;
  padding: 0;
}

.customer-detail-shell .workflow-columns .workflow-heading h3 {
  font-size: 15px;
}

.customer-detail-shell .workflow-columns > div:last-child .timeline-card,
.customer-detail-shell .workflow-columns > div:last-child .as-button {
  position: relative;
  min-height: 64px;
  margin: 0;
  padding: 11px 12px 11px 86px;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.customer-detail-shell .workflow-columns > div:last-child .timeline-card::before,
.customer-detail-shell .workflow-columns > div:last-child .as-button::before {
  position: absolute;
  top: 16px;
  left: 50px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4f88d9;
  content: "";
}

.customer-detail-shell .workflow-columns > div:last-child .timeline-card::after,
.customer-detail-shell .workflow-columns > div:last-child .as-button::after {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 53px;
  width: 1px;
  background: var(--line-soft);
  content: "";
}

.customer-detail-shell .workflow-columns > div:last-child .timeline-card .tag,
.customer-detail-shell .workflow-columns > div:last-child .as-button .tag {
  position: absolute;
  top: 12px;
  left: 0;
  width: 40px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.customer-detail-shell .workflow-columns > div:last-child .timeline-card p,
.customer-detail-shell .workflow-columns > div:last-child .as-button p {
  margin: 4px 0 0;
  color: var(--muted-strong);
  font-size: 13px;
}

.customer-detail-shell .customer-detail-grid {
  order: 3;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.customer-detail-shell .customer-detail-card.large {
  grid-column: 1 / -1;
  grid-row: auto;
}

.customer-detail-shell .customer-detail-rail {
  padding: 14px;
  border-radius: 7px;
}

.customer-detail-shell .customer-rail-heading {
  align-items: center;
  padding-bottom: 9px;
}

.customer-detail-shell .customer-rail-heading h3 {
  font-size: 18px;
}

.customer-detail-shell .customer-detail-rail .signature-status-card {
  padding-top: 10px;
}

.customer-detail-shell .customer-detail-rail .signature-status-card .workflow-heading {
  min-height: 28px;
}

.customer-detail-shell .customer-detail-rail .signature-status-card .workflow-heading h3 {
  font-size: 14px;
}

.customer-detail-shell .customer-detail-rail .signature-status-row {
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 46px;
  padding: 7px 0;
}

.customer-detail-shell .customer-detail-rail .signature-status-row p {
  display: none;
}

.customer-detail-shell .customer-detail-rail .signature-row-actions .inline-action {
  display: none;
}

.customer-detail-shell .customer-operation-log {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.customer-detail-shell .customer-rail-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.customer-detail-shell .customer-operation-log .link-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2c66bb;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.customer-detail-shell .customer-operation-log p {
  overflow: hidden;
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .customer-detail-shell .customer-detail-head {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-detail-shell .property-actions {
    justify-content: flex-start;
    max-width: none;
  }
}

@media (max-width: 900px) {
  .customer-detail-shell .customer-detail-layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "main" "rail";
  }

  .customer-detail-shell .customer-summary-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .customer-detail-shell .customer-workflow-overview {
    display: block;
  }

  .customer-detail-shell .customer-work-tabs {
    overflow-x: auto;
    margin-top: 10px;
  }

  .customer-detail-shell .customer-tab-card-grid,
  .customer-detail-shell .customer-profile-tab-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-detail-shell .customer-followup-row {
    grid-template-columns: 86px 14px minmax(0, 1fr);
  }

  .customer-detail-shell .customer-tab-record {
    grid-template-columns: minmax(0, 1fr);
  }

  .customer-detail-shell .customer-tab-record-meta {
    justify-content: space-between;
  }

  .customer-detail-shell .workflow-columns > div:first-child,
  .customer-detail-shell .customer-detail-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 覆盖旧客户详情的双栏作业流：参考稿要求时间线独占左侧主栏，推荐房源顺序下沉。 */
.customer-detail-shell .customer-detail-main .workflow-columns {
  grid-template-columns: minmax(0, 1fr);
}

/*
 * 客户详情顶部按最终设计稿收口：身份事实与主操作同处一行，次要事实分层展示。
 * 本段只改变客户详情头部排版；按钮原有 data 属性、权限判断和业务事件保持不变。
 */
.customer-detail-shell .customer-detail-head {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) auto;
  align-items: center;
  gap: 24px;
  margin: 0;
  padding: 8px 0 22px;
  border-bottom: 1px solid var(--line);
}

.customer-detail-shell .customer-identity-summary {
  min-width: 0;
}

.customer-detail-shell .customer-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
}

.customer-detail-shell .customer-title-row h3 {
  display: block;
  margin: 0;
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

.customer-detail-shell .customer-header-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.customer-detail-shell .customer-header-facts span {
  min-height: 27px;
  padding: 0 9px;
  border-radius: 5px;
  font-size: 12px;
}

.customer-detail-shell .customer-header-facts .customer-protection-divider {
  width: 1px;
  min-height: 34px;
  margin: 0 3px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--line);
}

.customer-detail-shell .customer-header-facts .customer-protection-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 13px;
}

.customer-detail-shell .customer-protection-tag .nav-icon {
  width: 17px;
  height: 17px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: #ca861c;
}

.customer-detail-shell .customer-protection-copy {
  display: grid;
  gap: 1px;
  padding: 0;
}

.customer-detail-shell .customer-protection-copy strong,
.customer-detail-shell .customer-protection-copy small {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  line-height: 1.3;
}

.customer-detail-shell .customer-protection-copy strong {
  color: var(--ink);
  font-size: 13px;
}

.customer-detail-shell .customer-protection-copy small {
  color: var(--muted);
  font-size: 11px;
}

.customer-detail-shell .customer-header-primary-meta,
.customer-detail-shell .customer-header-secondary-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  margin: 0;
  color: var(--muted-strong);
}

.customer-detail-shell .customer-header-primary-meta {
  gap: 0;
  margin-top: 9px;
  font-size: 13px;
}

.customer-detail-shell .customer-header-secondary-meta {
  gap: 0;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.customer-detail-shell .customer-header-primary-meta span + span::before,
.customer-detail-shell .customer-header-secondary-meta span + span::before {
  margin: 0 9px;
  color: var(--line-strong);
  content: "|";
}

.customer-detail-shell .customer-detail-head .property-actions {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: max-content;
  align-items: center;
  justify-content: end;
  gap: 8px;
  max-width: none;
}

.customer-detail-shell .customer-detail-head .property-actions > button,
.customer-detail-shell .customer-detail-head .property-actions .esign-entry {
  min-width: 0;
  min-height: 40px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  box-shadow: none;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.customer-detail-shell .customer-detail-head .property-actions > button:hover,
.customer-detail-shell .customer-detail-head .property-actions .esign-entry:hover {
  border-color: var(--line-strong);
  background: var(--surface-soft);
}

.customer-detail-shell .customer-detail-head .property-actions .esign-entry-copy strong,
.customer-detail-shell .customer-detail-head .property-actions .deal-report-entry-copy strong {
  font-size: 13px;
}

.customer-detail-shell .customer-detail-head .property-actions .deal-report-entry {
  min-width: 134px;
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.customer-detail-shell .customer-detail-head .property-actions .deal-report-entry:hover {
  border-color: #26384a;
  background: #26384a;
}

.customer-detail-shell .customer-hard-boundary {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  .customer-detail-shell .customer-detail-head {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .customer-detail-shell .customer-detail-head .property-actions {
    justify-content: start;
  }
}

@media (max-width: 720px) {
  .customer-detail-shell .customer-title-row {
    display: grid;
  }

  .customer-detail-shell .customer-header-facts .customer-protection-divider {
    display: none;
  }

  .customer-detail-shell .customer-detail-head .property-actions {
    grid-auto-flow: row;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .customer-detail-shell .customer-detail-head .property-actions > button,
  .customer-detail-shell .customer-detail-head .property-actions .esign-entry {
    width: 100%;
  }
}

/*
 * 客户详情右栏按“电子签约 -> 合同 -> 报数 -> 操作记录”呈现成交事实。
 * 只收紧侧栏的信息密度与视觉层级；签约、合同预览、报数和审计按钮仍沿用原业务事件。
 */
.customer-detail-shell .customer-detail-rail {
  padding: 16px 18px;
}

.customer-detail-shell .customer-rail-heading {
  align-items: center;
  padding-bottom: 11px;
}

.customer-detail-shell .customer-rail-heading h3 {
  font-size: 17px;
  line-height: 1.25;
}

.customer-detail-shell .customer-contract-overview {
  display: grid;
  gap: 0;
}

.customer-detail-shell .customer-contract-section {
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.customer-detail-shell .customer-contract-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 24px;
  margin-bottom: 5px;
}

.customer-detail-shell .customer-contract-section-heading > div {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.customer-detail-shell .customer-contract-section-heading .nav-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  color: var(--ink);
}

.customer-detail-shell .customer-contract-section-heading strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.customer-detail-shell .customer-contract-section-heading > span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.customer-detail-shell .customer-signature-compact-list {
  display: grid;
}

.customer-detail-shell .customer-signature-row {
  width: 100%;
  min-height: 39px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto 72px;
  align-items: center;
  gap: 7px;
  padding: 0 2px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
}

.customer-detail-shell .customer-signature-row:first-child {
  border-top: 0;
}

button.customer-signature-row {
  cursor: pointer;
}

button.customer-signature-row:hover {
  background: var(--surface-soft);
}

.customer-detail-shell .customer-signature-progress-icon {
  width: 16px;
  height: 16px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
}

.customer-detail-shell .customer-signature-progress-icon .nav-icon {
  width: 11px;
  height: 11px;
}

.customer-detail-shell .customer-signature-progress-icon.is-complete {
  border-color: #188454;
  background: #188454;
  color: #fff;
}

.customer-detail-shell .customer-signature-progress-icon.is-pending {
  border-color: #7f9fd0;
  color: #2c66bb;
}

.customer-detail-shell .customer-signature-row > strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-shell .customer-signature-state {
  min-height: 23px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid #bfd0ea;
  border-radius: 4px;
  background: #f2f6fc;
  color: #315a87;
  font-size: 10px;
  line-height: 1;
  white-space: nowrap;
}

.customer-detail-shell .customer-signature-state.is-complete {
  border-color: #b7dfce;
  background: #edf8f3;
  color: #18794e;
}

.customer-detail-shell .customer-signature-state.is-draft {
  border-color: #cbd9ec;
  background: #f2f6fc;
  color: #2c66bb;
}

.customer-detail-shell .customer-signature-row time,
.customer-detail-shell .customer-contract-draft-row time {
  color: var(--muted);
  font-size: 10.5px;
  text-align: right;
  white-space: nowrap;
}

.customer-detail-shell .customer-contract-draft-row {
  width: 100%;
  min-height: 40px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 72px auto;
  align-items: center;
  gap: 7px;
  padding: 0 2px;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.customer-detail-shell .customer-contract-draft-row:hover {
  background: var(--surface-soft);
}

.customer-detail-shell .customer-contract-draft-row > strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-shell .customer-contract-draft-row em {
  color: #2c66bb;
  font-size: 11px;
  font-style: normal;
  white-space: nowrap;
}

.customer-detail-shell .customer-report-row {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted-strong);
  font-size: 12px;
}

.customer-detail-shell .customer-report-row .link-action,
.customer-detail-shell .customer-operation-log .link-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: #2c66bb;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.customer-detail-shell .customer-operation-log {
  margin: 0;
  padding: 13px 0 0;
  border-top: 0;
}

.customer-detail-shell .customer-operation-log p {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
  margin: 7px 0 0;
  white-space: normal;
}

.customer-detail-shell .customer-operation-log p time {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.customer-detail-shell .customer-contract-empty {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 720px) {
  .customer-detail-shell .customer-signature-row {
    grid-template-columns: 18px minmax(0, 1fr) auto;
  }

  .customer-detail-shell .customer-signature-row time,
  .customer-detail-shell .customer-contract-draft-row time {
    display: none;
  }

  .customer-detail-shell .customer-contract-draft-row {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
}

/* FE041 管理员首页：两块分区之间留出间距 */
[data-admin-home="formal"] {
  display: grid;
  gap: 24px;
}

/* UI069：Core 正式报数抽屉（退回意见、凭证原件、补件上传）。只用 core-report- 前缀，旧/Demo 报数页不受影响。 */
/* 抽屉主体为可滚动 flex 列：区块不得被压缩，否则凭证卡内容会溢出到下一区块下方、按钮被遮挡 */
.core-report-drawer .detail-drawer-body > * {
  flex-shrink: 0;
}

.core-report-drawer .core-report-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #cfe3d6;
  border-radius: 7px;
  background: #f1f8f3;
  color: #24553a;
  font-size: 13px;
}

.core-report-drawer .core-report-muted {
  margin: 4px 0;
  color: var(--muted);
  font-size: 12px;
}

.core-report-drawer .core-report-warn {
  margin: 6px 0;
  padding: 8px 12px;
  border: 1px solid #f1d9a8;
  border-radius: 7px;
  background: #fdf5e6;
  color: #8a5a00;
  font-size: 13px;
}

.core-report-drawer .core-report-error {
  margin: 6px 0;
  color: #a23c3c;
  font-size: 13px;
}

.core-report-drawer .core-report-return {
  border-left: 3px solid #c58a1a;
}

.core-report-drawer .core-report-evidence-list {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.core-report-drawer .core-report-evidence-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.core-report-drawer .core-report-evidence-list li > span {
  display: grid;
  min-width: 0;
  gap: 2px;
  overflow-wrap: anywhere;
}

.core-report-drawer .core-report-evidence-list small {
  color: var(--muted);
  font-size: 12px;
}

.core-report-drawer .core-report-upload {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
}

.core-report-drawer .core-report-upload h4 {
  margin: 0;
  font-size: 14px;
}

.core-report-drawer .core-report-upload-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.core-report-drawer .core-report-upload-actions label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

/* UI070-B：Core 报数质感收敛（只作用于 .core-report-workspace 列表与 .core-report-drawer 抽屉）。
   取消同区多层框和卡片阴影；数字用系统字体等宽数字；退回意见与补件优先；中文文件选择保留原生 input 的键盘路径。 */
/* 六项指标固定网格：宽屏一行 6 项；窄窗口（≤1240px，如 1101）3+3 两行，分隔线随行列走，不出现孤项独占整行 */
.core-report-workspace .core-report-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  padding: 0;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}

.core-report-workspace .core-report-metrics .summary-chip {
  min-width: 0;
  margin: 8px 0;
  padding: 4px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.core-report-workspace .core-report-metrics .summary-chip + .summary-chip {
  border-left: 1px solid var(--line-soft);
}

@media (max-width: 1240px) {
  .core-report-workspace .core-report-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .core-report-workspace .core-report-metrics .summary-chip:nth-child(3n + 1) {
    border-left: 0;
  }

  .core-report-workspace .core-report-metrics .summary-chip:nth-child(n + 4) {
    margin-top: 0;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
  }
}

.core-report-workspace .core-report-metrics .summary-chip strong {
  font-family: inherit;
  font-size: 20px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.core-report-workspace .deal-report-row {
  box-shadow: none;
}

.core-report-workspace .property-page-head p,
.core-report-drawer .core-report-muted,
.core-report-drawer .core-report-return p {
  text-wrap: pretty;
}

.core-report-drawer .core-report-head {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.core-report-drawer .core-report-head h3 {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
}

.core-report-drawer .core-report-head-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.core-report-drawer .core-report-no {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.core-report-drawer .core-report-no span {
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.core-report-drawer .status-badge {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
}

.core-report-drawer .core-report-return {
  border-left: 3px solid #c58a1a;
  background: #fffaf0;
  box-shadow: none;
}

.core-report-drawer .core-report-return h4 {
  margin: 0 0 4px;
}

.core-report-drawer .core-report-section {
  display: grid;
  gap: 8px;
}

.core-report-drawer .core-report-section h4 {
  margin: 0;
  font-size: 14px;
}

.core-report-drawer .core-report-section h4 small {
  color: var(--muted);
  font-weight: 400;
  font-variant-numeric: tabular-nums;
}

.core-report-drawer .core-report-registered {
  padding: 8px 12px;
  border-top: 1px solid var(--line-soft);
}

.core-report-drawer .core-report-registered > summary {
  color: var(--muted-strong);
  font-size: 13px;
  cursor: pointer;
}

.core-report-drawer .core-report-registered > summary:focus-visible,
.core-report-drawer .core-report-file:focus-within {
  outline: 2px solid var(--blue, #315fba);
  outline-offset: 2px;
  border-radius: 6px;
}

.core-report-drawer .core-report-registered .core-report-evidence-list {
  margin-top: 8px;
}

.core-report-drawer .core-report-file {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  max-width: 100%;
  cursor: pointer;
}

/* 原生 input 只做视觉隐藏（仍可 Tab 聚焦与键盘选择文件），不使用 display:none */
.core-report-drawer .core-report-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.core-report-drawer .core-report-file-button {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel, #fff);
  font-size: 13px;
  white-space: nowrap;
}

.core-report-drawer .core-report-file.is-disabled {
  cursor: default;
  opacity: 0.6;
}

/* 材料类别下拉与“选择文件/上传凭证”按钮统一高度与 14px 正文 */
.core-report-drawer .core-report-upload-actions label {
  font-size: 14px;
}

.core-report-drawer .core-report-upload-actions select {
  min-height: 36px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel, #fff);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
}

.core-report-drawer .core-report-file-button {
  min-height: 36px;
  font-size: 14px;
}

/* 报数摘要：Core 抽屉内由 14 个灰底等权格改为紧凑轻分隔资料组（字段全部保留，长值可换行） */
.core-report-drawer .agent-report-detail .backoffice-report-summary-grid {
  gap: 0 16px;
  margin-top: 4px;
  border-top: 1px solid var(--line-soft);
}

.core-report-drawer .agent-report-detail .backoffice-report-summary-grid > div {
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}

.core-report-drawer .agent-report-detail .backoffice-report-summary-grid strong {
  margin-top: 2px;
  white-space: normal;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

/* 抽屉内报数信息卡：紧凑、去阴影，避免框中框过高（字段与内容不变） */
.core-report-drawer .agent-report-detail .detail-card {
  min-height: 0;
  padding: 12px 14px;
  box-shadow: none;
}

.core-report-drawer .agent-report-detail .detail-card h4 {
  margin: 0 0 6px;
}

.core-report-drawer .agent-report-detail .detail-card p {
  margin: 0;
}

.core-report-drawer .core-report-file-name {
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

/* UI076：Core 后台报数详情（平台业务复核 / 财务复核）。仅作用于 Core 抽屉与 Core 报数的审核流程、材料时间与退回卡。 */
[data-core-backoffice-detail] .core-report-muted { margin: 4px 0; color: var(--muted); font-size: 12px; }
[data-core-backoffice-detail] .core-report-error { margin: 6px 0; color: #a23c3c; font-size: 13px; }
.backoffice-report-detail .core-report-return,
[data-core-backoffice-detail] .core-report-return { border-left: 3px solid #c58a1a; background: #fffaf0; box-shadow: none; }
.backoffice-report-detail .core-report-return h4,
[data-core-backoffice-detail] .core-report-return h4 { margin: 0 0 4px; }
.backoffice-report-detail .core-report-return p,
[data-core-backoffice-detail] .core-report-return p { margin: 2px 0; font-size: 13px; overflow-wrap: anywhere; }
.core-review-flow { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.core-review-flow li { display: grid; grid-template-columns: minmax(88px, auto) auto minmax(0, 1fr); align-items: baseline; gap: 2px 12px; padding: 8px 10px; border: 1px solid var(--line, #dce3ea); border-radius: 7px; font-size: 13px; }
.core-review-flow li small { color: var(--muted); font-size: 12px; }
.core-review-flow li p { grid-column: 1 / -1; margin: 2px 0 0; color: var(--ink, #1f2933); overflow-wrap: anywhere; }
.core-evidence-time { color: var(--muted); font-size: 12px; }
.core-evidence-after-return { border-color: #c58a1a; color: #8a5a00; background: #fdf5e6; }
@media (max-width: 640px) { .core-review-flow li { grid-template-columns: 1fr; } }
/* UI076 窄修：Core 凭证材料一件一行，下载与材料同行对应。 */
.core-voucher-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.core-voucher-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line, #dce3ea); border-radius: 7px; min-width: 0; }
.core-voucher-main { display: grid; gap: 2px; min-width: 0; }
.core-voucher-main strong { font-size: 13px; overflow-wrap: anywhere; }
.core-voucher-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; color: var(--muted); font-size: 12px; }
.core-voucher-action { flex: none; }
/* UI077：Core 到账与锁数——对账卡、流水/分配一件一行、锁数条件、结果待核对原请求；经纪人到账进度卡。 */
.core-settle-card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.core-settle-figures { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.core-settle-note { margin: 6px 0 0; color: var(--muted); font-size: 12px; }
.core-settle-rows { display: grid; gap: 6px; margin: 0 0 8px; padding: 0; list-style: none; }
.core-settle-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 10px; border: 1px solid var(--line, #dce3ea); border-radius: 7px; min-width: 0; font-size: 13px; }
.core-settle-row-body { display: grid; gap: 3px; min-width: 0; }
.core-settle-row-main { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.core-settle-row-main strong { overflow-wrap: anywhere; }
.core-settle-row-main small, .core-settle-row-meta { color: var(--muted); font-size: 12px; }
.core-settle-row-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; overflow-wrap: anywhere; }
.core-settle-status { padding: 0 6px; border-radius: 4px; background: var(--soft, #f2f5f8); font-size: 12px; }
.core-settle-row-action { display: flex; flex: none; align-items: center; gap: 6px; }
.core-settle-row-action input { width: 110px; }
.core-settle-lock { display: grid; gap: 6px; justify-items: start; margin: 8px 0; }
.core-settle-lock h4 { margin: 0; }
.core-settle-lock-checks { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.core-settle-lock-checks li span { display: inline-block; width: 18px; }
.core-settle-lock-checks li[data-met="true"] span { color: #1f7a4d; }
.core-settle-lock-checks li[data-met="false"] { color: #9a3b2a; }
.core-settle-unknown { display: grid; gap: 6px; margin: 8px 0; padding: 10px 12px; border: 1px solid #e3c27a; border-left: 3px solid #c58a1a; border-radius: 7px; background: #fffaf0; }
.core-settle-unknown h4, .core-settle-unknown p { margin: 0; overflow-wrap: anywhere; }
.core-settle-pending { display: grid; gap: 4px; justify-items: start; font-size: 13px; }
.core-settle-pending-tag { margin-left: 6px; color: #8a5a00; background: #fdf5e6; }
.core-agent-payment p { margin: 6px 0 0; }
@media (max-width: 640px) { .core-settle-row { flex-direction: column; align-items: stretch; } .core-settle-row-action { flex-wrap: wrap; } }
/* UI078：到账与锁数视觉整理——金额主次、办理/记录分栏、流水与分配成组、状态标签与按钮区分、经纪人进度卡。 */
.core-settle-detail { display: grid; gap: 12px; }
.core-settle-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.core-settle-detail-head h4 { margin: 2px 0 4px; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.core-settle-next { margin: 0; font-size: 14px; color: var(--ink, #18202a); }
.core-settle-card { display: grid; gap: 10px; margin: 0; padding: 16px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; box-shadow: none; }
.core-settle-card .eyebrow { margin: 0; }
.core-settle-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.core-settle-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #eef1f5; color: #475260; font-size: 12px; font-weight: 500; line-height: 1; white-space: nowrap; cursor: default; }
.core-settle-chip.is-ok { background: #e7f4ec; color: #1f7a4d; }
.core-settle-chip.is-warn { background: #fdf3e1; color: #8a5a00; }
.core-settle-chip.is-risk { background: #fbeaea; color: #9a3b2a; }
.core-settle-primary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line, #dce3ea); border-radius: 8px; }
.core-settle-metric { display: grid; gap: 4px; padding: 12px 16px; min-width: 0; }
.core-settle-metric + .core-settle-metric { border-left: 1px solid var(--line, #dce3ea); }
.core-settle-metric span { color: var(--muted, #6c7683); font-size: 13px; }
.core-settle-metric strong { font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.2px; }
.core-settle-metric.is-confirmed strong { color: #1f7a4d; }
.core-settle-metric.is-outstanding strong { color: #8a5a00; }
.core-settle-secondary { display: flex; flex-wrap: wrap; gap: 4px 24px; margin: 0; font-size: 13px; }
.core-settle-secondary div { display: flex; gap: 6px; align-items: baseline; }
.core-settle-secondary dt { color: var(--muted, #6c7683); }
.core-settle-secondary dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.core-settle-secondary .is-risk dd { color: #9a3b2a; }
.core-settle-lockline { margin: 0; font-size: 13px; color: var(--ink, #18202a); }
.core-settle-alert-line { margin: 0; padding: 6px 10px; border-radius: 6px; background: #fdf3e1; color: #8a5a00; font-size: 13px; }
.core-settle-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(320px, 1fr); gap: 12px; align-items: start; }
.core-settle-side { display: grid; gap: 12px; }
.core-settle-panel { display: grid; gap: 10px; margin: 0; padding: 14px 16px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; background: var(--panel, #fff); min-width: 0; }
.core-settle-panel-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; }
.core-settle-panel-head h5 { margin: 0; font-size: 15px; font-weight: 600; }
.core-settle-panel-head small { color: var(--muted, #6c7683); font-size: 12px; }
.core-settle-groups { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.core-settle-group { display: grid; gap: 0; border: 1px solid var(--line, #dce3ea); border-radius: 8px; overflow: hidden; }
.core-settle-group-label { margin: 0; padding: 8px 12px; color: var(--muted, #6c7683); font-size: 12px; }
.core-settle-empty { padding: 12px; border: 1px dashed var(--line, #dce3ea); border-radius: 8px; color: var(--muted, #6c7683); font-size: 13px; }
.core-settle-detail .core-settle-row { border: 0; border-radius: 0; padding: 10px 12px; }
.core-settle-txn { background: #f8fafc; }
.core-settle-allocs { margin: 0; padding: 0; list-style: none; }
.core-settle-alloc { border-top: 1px solid var(--line, #dce3ea) !important; padding-left: 28px !important; }
.core-settle-alloc.is-void .core-settle-amount { color: var(--muted, #6c7683); text-decoration: line-through; }
.core-settle-kind { color: var(--muted, #6c7683); font-size: 12px; }
.core-settle-ref { font-variant-numeric: tabular-nums; }
.core-settle-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.core-settle-row-action .inline-action { white-space: nowrap; }
.core-settle-register .form-field { display: grid; gap: 4px; margin: 0; min-width: 0; }
.core-settle-register .form-field span { color: var(--muted, #6c7683); font-size: 12px; }
.core-settle-register .form-field input, .core-settle-register .form-field select, .core-settle-register .form-field textarea { width: 100%; min-width: 0; min-height: 34px; box-sizing: border-box; }
.core-settle-register .form-field textarea { min-height: 56px; resize: vertical; }
.core-settle-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.core-settle-form-grid .is-wide { grid-column: 1 / -1; }
.core-settle-form-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.core-settle-form-foot .core-settle-note { margin: 0; }
.core-settle-form-foot .inline-action { flex: none; }
.core-settle-lock { justify-items: stretch; }
.core-settle-lock-checks { gap: 4px; }
.core-settle-lock-blocked { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.core-settle-lock-blocked small { color: #9a3b2a; font-size: 12px; }
.core-settle-lock > .inline-action, .core-settle-lock > .core-settle-chip { justify-self: start; }
.core-settle-detail .core-settle-unknown { margin: 0; border-width: 1px 1px 1px 4px; }
.core-settle-detail .core-settle-unknown h4 { font-size: 15px; color: #8a5a00; }
@media (max-width: 1180px) { .core-settle-layout { grid-template-columns: minmax(0, 1fr); } }
.core-agent-payment-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.core-agent-payment-head h4 { margin: 0; }
.core-agent-stage { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #eef1f5; color: #475260; font-size: 12px; font-weight: 500; }
.core-agent-payment-main { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 10px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; }
.core-agent-payment-main .core-agent-figure { padding: 10px 14px; }
.core-agent-payment-main .core-agent-figure + .core-agent-figure { border-left: 1px solid var(--line, #dce3ea); }
.core-agent-figure { display: grid; gap: 2px; min-width: 0; }
.core-agent-figure span { color: var(--muted, #6c7683); font-size: 12px; }
.core-agent-payment-main strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.core-agent-figure.is-confirmed strong { color: #1f7a4d; }
.core-agent-figure.is-outstanding strong { color: #8a5a00; }
.core-agent-payment-sub { display: flex; flex-wrap: wrap; gap: 4px 28px; margin-top: 8px; }
.core-agent-payment-sub .core-agent-figure { display: flex; gap: 6px; align-items: baseline; }
.core-agent-payment-sub strong { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
/* UI078 窄修：分配金额输入与按钮同高、细边框、8px 圆角。 */
.core-settle-row-action input { height: 34px; width: 116px; padding: 0 10px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; background: #fff; font-variant-numeric: tabular-nums; box-sizing: border-box; }
.core-settle-row-action input:focus-visible { outline: 2px solid var(--blue, #2f64c8); outline-offset: 1px; }
/* UI079：V4.9 结算单——状态标签与说明、结果待核对原请求、读卡状态；宽表在卡内横向滚动，不撑宽页面。 */
.v49-settle-workspace, .v49-settle-workspace > *, .v49-detail, .v49-detail > * { min-width: 0; max-width: 100%; }
.v49-detail { display: grid; gap: 12px; }
.v49-detail .table-wrap { max-width: 100%; overflow-x: auto; }
.v49-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.v49-detail-head h4 { margin: 2px 0 0; font-size: 20px; font-weight: 600; overflow-wrap: anywhere; }
.v49-detail .detail-card { margin: 0; border: 1px solid var(--line, #dce3ea); border-radius: 8px; box-shadow: none; }
.v49-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #eef1f5; color: #475260; font-size: 12px; font-weight: 500; white-space: nowrap; cursor: default; }
.v49-chip[data-tone="ok"] { background: #e7f4ec; color: #1f7a4d; }
.v49-chip[data-tone="warn"] { background: #fdf3e1; color: #8a5a00; }
.v49-chip[data-tone="risk"] { background: #fbeaea; color: #9a3b2a; }
.v49-status-note { margin: 0; padding: 8px 12px; border-radius: 6px; background: #f3f5f8; color: var(--ink, #18202a); font-size: 13px; }
.v49-status-note[data-tone="ok"] { background: #eef7f1; color: #1f5e3f; }
.v49-status-note[data-tone="warn"] { background: #fdf6e8; color: #6f4a00; }
.v49-status-note[data-tone="risk"] { background: #fcf0ee; color: #8a3324; }
.v49-unknown { display: grid; gap: 6px; margin: 0; padding: 10px 12px; border: 1px solid #e3c27a; border-left: 4px solid #c58a1a; border-radius: 7px; background: #fffaf0; }
.v49-unknown h4 { margin: 0; font-size: 15px; color: #8a5a00; }
.v49-unknown p { margin: 0; overflow-wrap: anywhere; }
.v49-pending { display: grid; gap: 4px; justify-items: start; font-size: 13px; }
.v49-pending-tag { margin-left: 6px; color: #8a5a00; background: #fdf5e6; }
.v49-detail [data-v49-list-notice] { margin: 0; }
/* UI080：线下发放 / 冲正记录状态标签与下一步说明。 */
.v49-payout-row > div { min-width: 0; overflow-wrap: anywhere; }
.v49-payout-note { margin: 4px 0 0; color: var(--muted, #6c7683); font-size: 12px; }
[data-v49-dialog-payable] { margin: 0 0 8px; padding: 8px 10px; border-radius: 6px; background: #f3f5f8; font-size: 13px; }
/* UI081：结清提示为只读信息，保持与办理按钮分离。 */
.v49-settle-workspace .v49-close-summary { margin: 16px 0; padding: 16px; border: 1px solid #dce3ea; border-radius: 8px; background: #f7f9fb; font-size: 14px; }
.v49-settle-workspace .v49-close-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; }
.v49-settle-workspace .v49-close-head > span, .v49-settle-workspace .v49-close-counts { color: #6c7683; font-size: 13px; }
.v49-settle-workspace .v49-close-counts { margin: 8px 0; font-variant-numeric: tabular-nums; }
.v49-settle-workspace .v49-close-summary ul { list-style: none; padding: 0; margin: 12px 0 0; }
.v49-settle-workspace .v49-close-summary li { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 8px 0; border-top: 1px solid #dce3ea; overflow-wrap: anywhere; }
.v49-settle-workspace .v49-close-summary li > span:last-child { color: #526473; }
.v49-settle-workspace .v49-payroll-note { display: block; margin-top: 4px; }
/* UI082：财务工作列表——阶段 / 本人待办 / 售租 / 搜索 / 结果数量，报数行与原办理区入口。 */
.fw-workspace { display: grid; gap: 12px; min-width: 0; }
.fw-workspace > * { min-width: 0; max-width: 100%; }
.fw-back { margin: 0 0 8px; }
.fw-stages { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.fw-stage { display: grid; gap: 2px; justify-items: start; padding: 10px 12px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; background: var(--panel, #fff); color: var(--ink, #18202a); text-align: left; cursor: pointer; font: inherit; }
.fw-stage span { font-size: 13px; color: var(--muted, #6c7683); }
.fw-stage strong { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.fw-stage small { font-size: 12px; color: #8a5a00; }
.fw-stage.active { border-color: var(--blue, #2f64c8); box-shadow: inset 0 0 0 1px var(--blue, #2f64c8); }
.fw-stage.is-off { cursor: default; background: #f6f7f9; }
.fw-stage.is-off small { color: var(--muted, #6c7683); }
.fw-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.fw-segs { display: inline-flex; border: 1px solid var(--line, #dce3ea); border-radius: 8px; overflow: hidden; }
.fw-seg { height: 34px; padding: 0 12px; border: 0; background: var(--panel, #fff); color: var(--ink, #18202a); font: inherit; font-size: 13px; cursor: pointer; }
.fw-segs .fw-seg + .fw-seg { border-left: 1px solid var(--line, #dce3ea); }
.fw-toolbar > .fw-seg { border: 1px solid var(--line, #dce3ea); border-radius: 8px; }
.fw-seg.active { background: #eaf0fb; color: var(--blue, #2f64c8); font-weight: 600; }
.fw-search input { width: 240px; max-width: 100%; height: 34px; padding: 0 10px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; box-sizing: border-box; }
.fw-total { margin-left: auto; color: var(--muted, #6c7683); font-size: 13px; }
.fw-state { padding: 16px; border: 1px dashed var(--line, #dce3ea); border-radius: 8px; color: var(--muted, #6c7683); }
.fw-state p { margin: 0 0 8px; }
.fw-state[role="alert"] { border-style: solid; border-color: #f0c9c2; background: #fcf0ee; color: #8a3324; }
.fw-rows { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.fw-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; background: var(--panel, #fff); min-width: 0; }
.fw-row-main { display: grid; gap: 4px; min-width: 0; }
.fw-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.fw-row-title strong { overflow-wrap: anywhere; }
.fw-row-meta { display: flex; flex-wrap: wrap; gap: 2px 12px; color: var(--muted, #6c7683); font-size: 12px; overflow-wrap: anywhere; }
.fw-row-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; flex: none; max-width: 50%; }
.fw-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #eef1f5; color: #475260; font-size: 12px; font-weight: 500; white-space: nowrap; }
.fw-chip.is-plain { background: transparent; border: 1px solid var(--line, #dce3ea); }
.fw-chip.is-mine { background: #fdf3e1; color: #8a5a00; }
.fw-pager { display: flex; align-items: center; justify-content: center; gap: 12px; }
.fw-pending { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid #e3c27a; border-left: 4px solid #c58a1a; border-radius: 7px; background: #fffaf0; }
.fw-pending h4, .fw-pending p { margin: 0; }
.fw-pending h4 { color: #8a5a00; font-size: 15px; }
.fw-pending ul { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.fw-pending li { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
@media (max-width: 1180px) { .fw-row { flex-direction: column; align-items: stretch; } .fw-row-actions { max-width: none; justify-content: flex-start; } .fw-total { margin-left: 0; } }
/* UI083：复核原请求结果待确认——抽屉原请求卡、业务复核页与工作列表的原请求行。 */
.crr-card { display: grid; gap: 6px; margin: 0 0 12px; padding: 12px 14px; border: 1px solid #e3c27a; border-left: 4px solid #c58a1a; border-radius: 7px; background: #fffaf0; box-shadow: none; }
.crr-card h4 { margin: 0; color: #8a5a00; font-size: 15px; }
.crr-card p { margin: 0; overflow-wrap: anywhere; }
.crr-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 12px; }
.crr-reason { padding: 6px 10px; border-radius: 6px; background: #fff; border: 1px solid #f0dfb8; font-size: 13px; }
.crr-note { color: var(--muted, #6c7683); font-size: 12px; }
.crr-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; background: #eef1f5; color: #475260; font-size: 12px; font-weight: 500; white-space: nowrap; }
.crr-chip[data-tone="warn"] { background: #fdf3e1; color: #8a5a00; }
.crr-chip[data-tone="risk"] { background: #fbeaea; color: #9a3b2a; }
.crr-rows { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.crr-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #f0dfb8; border-radius: 6px; background: #fff; min-width: 0; }
.crr-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; font-size: 13px; }
.crr-main small { flex-basis: 100%; color: var(--muted, #6c7683); font-size: 12px; }
.crr-row .inline-action { flex: none; }
@media (max-width: 1180px) { .crr-row { flex-direction: column; align-items: stretch; } }
.fw-pending li.crr-row { align-items: center; }
@media (max-width: 1180px) { .fw-pending li.crr-row { align-items: stretch; } .fw-pending li.crr-row .inline-action { align-self: flex-start; } }
/* UI084：结算台账（只读）——筛选、当前筛选全部合计、角色行明细表、只读明细抽屉与追溯时间线。 */
.lg-workspace .lg-asof { margin-left: 8px; color: var(--muted, #6c7683); font-size: 12px; }
.lg-totals { display: grid; grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 8px; }
.lg-total { display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; background: var(--panel, #fff); min-width: 0; }
.lg-total span { color: var(--muted, #6c7683); font-size: 12px; }
.lg-total strong { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lg-total.is-ok strong { color: #1f7a4d; }
.lg-total.is-warn strong { color: #8a5a00; }
.lg-total.is-plain { background: #f6f7f9; border-style: dashed; }
.lg-basis, .lg-note { margin: 0; color: var(--muted, #6c7683); font-size: 12px; }
.lg-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 8px 12px; border: 1px solid #e3c27a; border-left: 4px solid #c58a1a; border-radius: 7px; background: #fffaf0; color: #8a5a00; font-size: 13px; }
.lg-table-wrap { max-width: 100%; overflow-x: auto; }
.lg-table td small { display: block; color: var(--muted, #6c7683); font-size: 12px; }
.lg-table .lg-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lg-flags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.lg-state { padding: 12px; border: 1px dashed var(--line, #dce3ea); border-radius: 8px; color: var(--muted, #6c7683); }
.lg-state[role="alert"] { border-style: solid; border-color: #f0c9c2; background: #fcf0ee; color: #8a3324; }
.lg-drawer-overlay { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; background: rgba(15, 23, 32, 0.32); }
.lg-drawer { width: min(720px, 100%); height: 100%; overflow-y: auto; }
.lg-detail-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 16px; margin: 0 0 12px; }
.lg-detail-grid dt { color: var(--muted, #6c7683); font-size: 12px; }
.lg-detail-grid dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.lg-stale { margin: 0 0 10px; padding: 8px 10px; border-radius: 6px; background: #fdf3e1; color: #8a5a00; font-size: 13px; }
.lg-timeline { display: grid; gap: 8px; margin: 0 0 10px; padding: 0 0 0 14px; border-left: 2px solid var(--line, #dce3ea); list-style: none; }
.lg-timeline li { display: grid; gap: 2px; font-size: 13px; }
.lg-timeline li span { color: var(--muted, #6c7683); font-size: 12px; }
.lg-timeline li small { color: var(--ink, #18202a); font-size: 12px; overflow-wrap: anywhere; }
.lg-timeline li[data-tone="risk"] strong { color: #9a3b2a; }
.lg-timeline li[data-tone="ok"] strong { color: #1f7a4d; }
/* UI084 视觉窄修：长报数号在自身列内断行完整显示（不覆盖相邻列）；九张合计卡固定两行（5＋4）。 */
.lg-totals { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lg-table th:first-child, .lg-table td:first-child { width: 22%; min-width: 168px; max-width: 240px; }
.lg-table td:first-child strong { display: block; overflow-wrap: anywhere; word-break: break-all; }
.lg-table th:nth-child(2), .lg-table td:nth-child(2) { min-width: 132px; }
.lg-table td { vertical-align: top; }

/* UI085：锁后更正（.cc-* 局部；沿 fw / lg / v49-chip 的细边框、单一强调色、等宽金额与琥珀色未知区） */
.cc-drawer { width: min(860px, 94vw); }
.cc-head-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; color: var(--muted, #6c7683); font-size: 13px; }
.cc-drawer .detail-drawer-body { display: grid; align-content: start; gap: 14px; overflow-y: auto; padding: 16px 20px 20px; }
.cc-summary dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 16px; margin: 0; padding: 12px 14px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; }
.cc-summary dt { color: var(--muted, #6c7683); font-size: 12px; }
.cc-summary dd { margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cc-entry { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; }
.cc-entry p { margin: 0; font-size: 13px; }
.cc-note { margin: 0; padding: 8px 12px; border-radius: 7px; background: #f4f6f9; color: #475260; font-size: 13px; }
.cc-note span { display: block; margin-top: 2px; font-variant-numeric: tabular-nums; }
.cc-note.is-warn { background: #fdf3e1; color: #8a5a00; }
.cc-note.is-ok { background: #e7f4ec; color: #1f7a4d; }
.cc-notice { margin: 0; padding: 8px 12px; border: 1px solid #b9dcc6; border-radius: 7px; background: #f0f8f3; color: #1f7a4d; font-size: 13px; }
.cc-error { margin: 4px 0 0; color: #9a3b2a; font-size: 12px; }
p.cc-error { font-size: 13px; }
.cc-muted { color: var(--muted, #6c7683); font-size: 12px; }
.cc-account { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; overflow-wrap: anywhere; }
.cc-num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.cc-pending { padding: 10px 14px; border: 1px solid #e3c27a; border-left: 4px solid #c58a1a; border-radius: 7px; background: #fffaf0; color: #8a5a00; font-size: 13px; }
.cc-pending p { margin: 0 0 6px; }
.cc-pending ul { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.cc-pending li { display: grid; gap: 4px; }
.cc-pending li span { overflow-wrap: anywhere; }
.cc-pending-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cc-form, .cc-case { display: grid; gap: 10px; padding: 14px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; background: var(--panel, #fff); }
.cc-form h4, .cc-cases h4 { margin: 0; font-size: 15px; }
.cc-cases { display: grid; gap: 12px; }
.cc-case > header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cc-case > header > div { display: flex; flex-wrap: wrap; gap: 6px; }
.cc-diff { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 13px; }
.cc-diff th, .cc-diff td { padding: 7px 8px; border-bottom: 1px solid var(--line-soft, #edf0f4); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.cc-diff thead th { color: var(--muted, #6c7683); font-size: 12px; font-weight: 500; }
.cc-diff td { font-variant-numeric: tabular-nums; }
.cc-diff .cc-old { color: var(--muted, #6c7683); }
.cc-diff .cc-new { font-weight: 600; }
.cc-diff th.cc-num, .cc-diff td.cc-num { width: 120px; text-align: right; }
.cc-form-table td:first-child { width: 170px; }
.cc-form-table td:nth-child(2) { width: 180px; }
.cc-form-table input:not([type="checkbox"]), .cc-form-table textarea, .cc-label textarea { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--line, #dce3ea); border-radius: 6px; font: inherit; font-variant-numeric: tabular-nums; }
.cc-form-table input:disabled, .cc-form-table textarea:disabled { background: #f4f6f9; color: var(--muted, #6c7683); }
.cc-form-table small { display: block; margin-top: 2px; color: var(--muted, #6c7683); font-size: 12px; }
.cc-form-table small.cc-error { color: #9a3b2a; }
.cc-form-table tr.is-on td { background: #f7f9fd; }
.cc-check { display: inline-flex; align-items: center; gap: 6px; margin-right: 6px; cursor: pointer; }
.cc-label { display: grid; gap: 4px; color: var(--muted, #6c7683); font-size: 12px; }
.cc-route { margin: 0; color: var(--blue, #2f64c8); font-size: 13px; font-weight: 500; }
.cc-act-buttons, .cc-case-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.cc-act { display: grid; gap: 8px; padding: 12px; border: 1px solid #c9d6ee; border-radius: 8px; background: #f7f9fd; }
.cc-act h5 { margin: 0; font-size: 14px; }
.cc-confirm-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-variant-numeric: tabular-nums; }
.cc-confirm-list strong { display: inline-block; min-width: 96px; margin-right: 8px; }
.cc-reason { margin: 0; font-size: 13px; overflow-wrap: anywhere; }
.cc-reason strong { margin-right: 8px; color: var(--muted, #6c7683); font-weight: 500; }
.cc-supplements { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; font-size: 13px; }
.cc-supplements span { margin-left: 8px; color: var(--muted, #6c7683); font-size: 12px; }
.cc-duty { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 0; padding: 0; border: 1px solid var(--line, #dce3ea); border-radius: 8px; list-style: none; overflow: hidden; }
.cc-duty li { display: grid; gap: 2px; padding: 8px 10px; font-size: 12px; }
.cc-duty li + li { border-left: 1px solid var(--line, #dce3ea); }
.cc-duty li > span { color: var(--muted, #6c7683); }
.cc-duty li.is-done { background: #f0f8f3; }
.cc-duty li.is-done > span::after { content: " ✓"; color: #1f7a4d; }
.cc-rule { margin: -4px 0 0; color: var(--muted, #6c7683); font-size: 12px; }
.cc-versions { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cc-versions small { color: var(--muted, #6c7683); font-size: 12px; }
.cc-history summary { cursor: pointer; color: var(--muted, #6c7683); font-size: 13px; }
.cc-history .lg-timeline { margin-top: 8px; }
.cc-workspace { grid-template-columns: minmax(0, 1fr); }
/* 全局 .property-page-head > :last-child 为 flex: 0 0 auto；本页头部只有说明块，须允许收缩换行 */
.cc-workspace .property-page-head > div { flex: 1 1 auto; min-width: 0; }
.cc-toolbar { justify-content: space-between; row-gap: 8px; }
.cc-toolbar .fw-segs { flex-wrap: wrap; max-width: 100%; }
.cc-table { table-layout: fixed; width: 100%; }
.cc-table td, .cc-table th { overflow-wrap: anywhere; }
.cc-table th:last-child, .cc-table td:last-child { width: 168px; }
.cc-table td small { display: block; color: var(--muted, #6c7683); font-size: 12px; }
.cc-table td:last-child { white-space: nowrap; }
.cc-table td:last-child .fw-chip { margin-right: 6px; }
@media (max-width: 1180px) {
  .cc-summary dl { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cc-form-table td:first-child { width: 140px; }
  .cc-form-table td:nth-child(2) { width: 140px; }
}

/* UI087：结算台账 CSV 导出（.lg-export 局部；沿台账细边框与琥珀 / 风险色） */
.lg-export { display: grid; gap: 8px; min-width: 0; }
.lg-export-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 8px 12px; border: 1px solid var(--line, #dce3ea); border-radius: 8px; }
.lg-export-bar p { flex: 1 1 320px; min-width: 0; margin: 0; color: var(--muted, #6c7683); font-size: 13px; overflow-wrap: anywhere; }
.lg-export-msg { margin: 0; padding: 8px 12px; border-radius: 7px; background: #f4f6f9; color: #475260; font-size: 13px; }
.lg-export-msg.is-risk { border: 1px solid #f0c9c2; background: #fcf0ee; color: #8a3324; }
.lg-export-receipt { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid #b9dcc6; border-radius: 8px; background: #f0f8f3; font-size: 13px; }
.lg-export-receipt p { margin: 0; overflow-wrap: anywhere; }
.lg-export-receipt dl { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px 12px; margin: 0; }
.lg-export-receipt dt { color: var(--muted, #6c7683); font-size: 12px; }
.lg-export-receipt dd { margin: 0; font-variant-numeric: tabular-nums; font-weight: 600; }
.lg-export-receipt small { color: #475260; font-size: 12px; }
@media (max-width: 1180px) { .lg-export-receipt dl { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
