.sales-teams-workspace {
  gap: 14px;
}

.sales-team-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.sales-team-stats > div {
  display: grid;
  gap: 6px;
  padding: 14px 18px;
  border: 1px solid #dce5f0;
  border-radius: 13px;
  background: #fff;
}

.sales-team-stats dt, .sales-team-results {
  color: #526681;
  font-size: 13px;
}

.sales-team-stats dd {
  margin: 0;
  color: #1b406e;
  font-size: 26px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.sales-team-directory {
  padding: 0;
  overflow: hidden;
}

.sales-team-toolbar,
.sales-team-toolbar-actions,
.sales-team-card-actions,
.sales-team-picker-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.sales-team-toolbar {
  justify-content: space-between;
  padding: 14px 18px;
  background: #f6f8fc;
  border-bottom: 1px solid #e2e9f2;
}

.sales-team-toolbar input[type=search] {
  width: min(100%, 420px);
  background: #fff;
}

.sales-team-results {
  margin-inline-end: 5px;
}

.sales-team-list {
  display: grid;
  gap: 10px;
  padding: 14px 18px 18px;
}

.sales-team-card {
  overflow: hidden;
  border: 1px solid #dce5f0;
  border-radius: 11px;
  background: #fff;
}

.sales-team-card[open] > summary {
  background: var(--access-wash);
  border-bottom: 1px solid #dce5f0;
}

.sales-team-card-body {
  padding: 12px;
}

.sales-team-roster {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 185px), 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sales-team-roster > li,
.sales-team-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #e0e7f1;
  border-radius: 9px;
  background: #f7f9fc;
}

.sales-team-account {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 2px;
  color: #263953;
  font-size: 13px;
  overflow-wrap: anywhere;
}

.sales-team-account small {
  color: #536782;
  font-size: 12px;
}

.sales-team-card-actions {
  justify-content: flex-end;
  margin-top: 10px;
}

.sales-team-empty {
  margin: 0;
  padding: 16px;
  color: #526681;
  text-align: center;
}

.sales-team-warning,
.sales-team-form-error {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid #ecd8b7;
  border-radius: 9px;
  background: #fffaee;
  color: #754c10;
  font-size: 13px;
}

.sales-team-form-error {
  margin-top: 12px;
  border-color: #efc8ce;
  background: #fff3f4;
  color: #962035;
}

.sales-team-fields {
  display: grid;
  min-width: 0;
  gap: 14px;
  margin: 0;
  padding: 0;
  border: 0;
}

.sales-team-manager-fields,
.sales-team-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: end;
  gap: 8px;
}

.sales-team-manager-fields input,
.sales-team-manager-fields select,
.sales-team-filters input,
.sales-team-filters select {
  width: 100%;
  min-width: 0;
}

.sales-team-editor-manager {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  padding: 11px 13px;
  border-radius: 10px;
  background: #edf3fb;
  overflow-wrap: anywhere;
}

.sales-team-editor-manager span,
.sales-team-editor-manager small {
  color: #4b6380;
  font-size: 12px;
}

.sales-team-picker {
  border: 1px solid #dce5f0;
  border-radius: 12px;
  background: #f6f8fc;
}

.sales-team-picker-head {
  padding: 10px 12px;
  border-bottom: 1px solid #e2e9f2;
}

.sales-team-picker-head h4 {
  margin: 0 0 7px;
  color: #22334f;
}

.sales-team-filters {
  grid-template-columns: minmax(0, 1fr) minmax(120px, 185px);
}

.sales-team-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  max-height: clamp(108px, 32dvh, 330px);
  overflow-y: auto;
  padding: 9px 12px;
}

.sales-team-options > .sales-team-empty {
  grid-column: 1 / -1;
}

.sales-team-option {
  margin: 0;
  background: #fff;
  cursor: pointer;
}

.sales-team-option:has(input:checked) {
  border-color: #abc4e8;
  background: #edf4ff;
}

.sales-team-option input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: #2759a3;
}

.sales-team-inactive,
.sales-team-affiliation {
  max-width: 38%;
  padding: 3px 7px;
  border-radius: 7px;
  background: #eaf0f6;
  color: #486078;
  font-size: 11px;
  overflow-wrap: anywhere;
}

.sales-team-inactive,
.sales-team-affiliation.is-other {
  background: #f9ecd5;
  color: #775019;
}

.sales-team-affiliation.is-current {
  background: #e1f3ec;
  color: #086353;
}

.sales-team-picker-tools {
  padding: 8px 12px;
  border-top: 1px solid #e2e9f2;
}

.sales-team-form-actions {
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.sales-team-form-actions > span {
  margin-inline-end: auto;
  color: #285694;
  font-size: 13px;
  font-weight: 700;
}

@media (max-width: 670px) {
  .sales-team-stats { gap: 6px; }
  .sales-team-stats > div { padding: 9px; }
  .sales-team-stats dt { font-size: 11px; }
  .sales-team-stats dd { font-size: 21px; }
  .sales-team-toolbar, .sales-team-list { padding: 10px; }
  .sales-team-manager-fields,
  .sales-team-options { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .sales-team-filters { grid-template-columns: minmax(0, 1fr); }
}
