.lead-center-toolbar, .lead-center-pagination,
.lead-center-pagination > div, .lead-center-toolbar [role='group'] {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.lead-center-toolbar { margin: 18px 0; }
.lead-center-toolbar label { display: flex; align-items: center; gap: 8px; }
.lead-center-toolbar select { padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
#leadsView .lead-center-toolbar [aria-pressed='true'] {
  background: #173e36 !important;
  color: white !important;
  border-color: #173e36 !important;
}
.lead-center-pagination { justify-content: space-between; margin: 20px 0; }
.lead-center-pagination button:disabled { opacity: .45; cursor: default; }
#leadResults [hidden] { display: none !important; }
.lead-center-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 16px; }
.lead-center-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: white; }
.lead-center-card .lead-person img { width: 48px; height: 48px; object-fit: cover; border-radius: 50%; }
.lead-center-card .lead-person > div { min-width: 0; }
.lead-center-card p, .lead-center-card b { overflow-wrap: anywhere; }
.lead-card-status { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 14px 0; }
.lead-card-status strong { font-size: 13px; }
.lead-center-card details { border-top: 1px solid var(--line); padding-top: 12px; margin-bottom: 14px; }
.lead-center-card summary { cursor: pointer; font-weight: 700; }
.lead-center-card > button { width: 100%; }
.lead-center-collapsed .lead-table th:nth-child(3),
.lead-center-collapsed .lead-table td:nth-child(3),
.lead-center-collapsed .lead-table .lead-person span,
.lead-center-collapsed .lead-table .lead-person small,
.lead-center-collapsed .lead-table td:nth-child(2) > span { display: none; }
@media (max-width: 600px) {
  .lead-center-toolbar > label { width: 100%; }
  .lead-center-pagination { align-items: flex-start; flex-direction: column; }
}

/* Lead pipeline page tidy-up (owner request, 2026-10-10; member-pages-runtime.txt). */
#leadWorkspaceView .lead-workspace-kpis { grid-template-columns: repeat(var(--lead-kpis, 5), minmax(0, 1fr)); }
#leadWorkspaceView .lead-workspace-kpis span { font-size: 12.5px; }
#leadWorkspaceView .lead-workspace-grid.single { grid-template-columns: 1fr; }
#leadWorkspaceView .lead-workspace-facts { gap: 6px 16px; }
#leadWorkspaceView .lead-workspace-facts > div { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; background: #f6f9f9; }
#leadWorkspaceView .lead-workspace-facts > div > span { color: var(--muted); font-size: 13px; }
#leadWorkspaceView .lead-workspace-facts > div > b { font-size: 13.5px; text-align: right; }
#leadWorkspaceView .pipeline-step b { font-size: 12px; }
#leadWorkspaceView .pipeline-step > span { font-size: 11px; }
#leadWorkspaceView .pipeline-history time, #leadWorkspaceView .lead-timeline time { font-size: 12px; }
@media (max-width: 980px) { #leadWorkspaceView .lead-workspace-kpis { grid-template-columns: repeat(var(--lead-kpis, 3), minmax(0, 1fr)); } }
@media (max-width: 700px) {
  #leadWorkspaceView .lead-workspace-facts { grid-template-columns: 1fr; }
  #leadWorkspaceView .lead-workspace-grid { grid-template-columns: 1fr; }
}

/* Lead stages (owner approval 2026-10-10; docs/lead-stages.md): the status line, suggestion,
   flags, temperature, next step and side-state buttons under the stage track. */
#leadWorkspaceView .pipeline-step small.lead-viewing-marker { display: block; margin-top: 4px; font-size: 10px; color: #3e6b65; font-weight: 700; }
#leadWorkspaceView .lead-stage-tools { display: grid; gap: 10px; margin-top: 6px; }
#leadWorkspaceView .lead-stage-banner, #leadWorkspaceView .lead-stage-suggestion { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 14px; border-radius: 14px; border: 1px solid #cfe0e4; background: #f6fbfb; font-size: 13px; }
#leadWorkspaceView .lead-stage-banner span, #leadWorkspaceView .lead-stage-suggestion span { flex: 1 1 220px; min-width: 0; overflow-wrap: anywhere; }
#leadWorkspaceView .lead-stage-won { border-color: #9fcfae; background: #f4fbf6; }
#leadWorkspaceView .lead-stage-lost, #leadWorkspaceView .lead-stage-invalid { border-color: #d9c9c0; background: #fbf7f4; }
#leadWorkspaceView .lead-stage-on-hold { border-color: #e4d39a; background: #fffbea; }
#leadWorkspaceView .lead-stage-suggestion { border-style: dashed; border-color: #62a79e; }
#leadWorkspaceView .lead-stage-flags { display: flex; flex-wrap: wrap; gap: 8px; }
#leadWorkspaceView .lead-flag { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: #fff3d6; color: #6b4700; font-size: 12px; font-weight: 700; max-width: 100%; }
#leadWorkspaceView .lead-stage-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; font-size: 13px; }
#leadWorkspaceView .lead-temperature { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; }
#leadWorkspaceView .lead-temperature select { padding: 6px 8px; border-radius: 10px; border: 1px solid #cfe0e4; }
#leadWorkspaceView .lead-next-step { flex: 1 1 200px; min-width: 0; overflow-wrap: anywhere; }
#leadWorkspaceView .lead-side-actions { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.lead-won-checklist { padding: 10px 12px; border-radius: 12px; background: #f4fbf6; border: 1px solid #9fcfae; font-size: 13px; line-height: 1.45; }
@media (max-width: 600px) {
  #leadWorkspaceView .lead-side-actions { width: 100%; }
  #leadWorkspaceView .lead-side-actions button { flex: 1 1 0; min-width: 0; }
}
.lead-won-confirm { display: flex !important; flex-direction: row-reverse; justify-content: flex-end; align-items: center; gap: 8px; font-weight: 700; }
