.staff-page-head,
.staff-page-actions,
.staff-group-head,
.staff-group-label,
.staff-target,
.staff-person {
  display: flex;
  align-items: center;
  gap: 9px;
}

.staff-page-head {
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.staff-page-actions {
  flex-wrap: wrap;
}

.staff-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.staff-summary > div {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
}

.staff-summary span, .staff-summary small {
  color: var(--muted);
  font-size: 12px;
}

.staff-summary strong {
  color: #243b57;
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

.staff-import-status {
  margin: 0 0 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.staff-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(290px, 1fr);
  align-items: start;
  gap: 16px;
}

.staff-board, .staff-group-head > div, .staff-candidate > div {
  min-width: 0;
}

.staff-tier + .staff-tier {
  margin-top: 15px;
}

.staff-tier {
  border: 1px solid var(--line);
  border-radius: 17px;
  background: var(--surface);
  overflow: clip;
}

.staff-tier > h2 {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  background: #edf3f9;
  color: #243b57;
  font-size: 15px;
}

.staff-tier-badge {
  display: inline-grid;
  place-items: center;
  min-width: 29px;
  padding: 3px 5px;
  border-radius: 6px;
  background: #243b57;
  color: #fff;
  font-size: 11px;
  letter-spacing: .035em;
}

.staff-group {
  padding: 12px 14px;
}

.staff-group + .staff-group {
  border-top: 1px solid var(--line);
}

.staff-group-head {
  align-items: flex-start;
}

.staff-group-head > div {
  flex: 1;
}

.staff-group-label h3, .staff-group-head p {
  overflow-wrap: anywhere;
}

.staff-group-head p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.staff-group-head .button {
  min-height: 28px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
}

.staff-count {
  min-height: 27px;
  display: inline-flex;
  align-items: center;
  flex: none;
  font-weight: 800;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: #485e76;
  white-space: nowrap;
}

.staff-count.full { color: #15624c; }
.staff-zero { color: var(--muted); margin-top: 8px; font-size: 12px; }
.staff-legacy {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.staff-seats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(125px, 100%), 1fr));
  gap: 7px;
  list-style: none;
  padding: 0;
  margin: 9px 0 0;
}

.staff-seat {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 36px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  font-size: 12px;
  color: #435772;
}

.staff-seat-number {
  flex: none;
  font-variant-numeric: tabular-nums;
  color: #596d85;
}

.staff-seat-name {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 750;
}

.staff-vacant {
  width: 100%;
  background: #fff;
  border-style: dashed;
}

.staff-vacant svg {
  width: 14px;
  height: 14px;
  margin-left: auto;
}

.staff-vacant:hover, .staff-vacant[aria-pressed="true"] {
  background: #eaf3ff;
  border-color: #6d9ccc;
  color: #173f72;
}

.staff-vacant[aria-pressed="true"] {
  border-style: solid;
  font-weight: 800;
}

.staff-occupied {
  background: #edf8f3;
  border-color: #d5e9df;
  color: #214d40;
}

.staff-clear.icon-button {
  min-width: 24px;
  min-height: 24px;
  padding: 0;
  color: #355e53;
  margin: -1px -2px -1px 0;
}

.staff-clear.icon-button svg { width: 14px; height: 14px; }
.staff-clear.icon-button:hover { background: #fce8e6; color: #952e2b; }

.staff-candidates {
  position: sticky;
  top: 89px;
  scroll-margin-top: 79px;
}

.staff-target {
  justify-content: space-between;
  flex-wrap: wrap;
  padding: 10px 11px;
  border-radius: 10px;
  background: #eef4fb;
  margin-bottom: 10px;
}

.staff-target span, .staff-target strong { display: block; }
.staff-target span { color: var(--muted); font-size: 11px; margin-bottom: 3px; }
.staff-target strong { color: #243b57; overflow-wrap: anywhere; }
.staff-target .button, .staff-candidate .button { min-height: 32px; padding-inline: 10px; font-size: 12px; }
.staff-empty { color: var(--muted); font-size: 13px; padding: 6px 0; line-height: 1.6; }

.staff-suggestions {
  max-height: max(185px, calc(100dvh - 258px));
  overflow-y: auto;
  scrollbar-width: thin;
}

.staff-applicants + .staff-applicants { margin-top: 10px; }
.staff-applicants h3 {
  background: #f2f5f9;
  border-radius: 7px;
  color: #294561;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.staff-applicants > p { color: var(--muted); font-size: 12px; margin: 8px 2px 0; line-height: 1.55; }
.staff-candidate-list { margin: 0; padding: 0; list-style: none; }

.staff-candidate {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 3px;
}

.staff-candidate + .staff-candidate { border-top: 1px solid var(--line); }
.staff-person { align-items: baseline; gap: 6px; flex-wrap: wrap; overflow-wrap: anywhere; }
.staff-candidate p { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.45; overflow-wrap: anywhere; }

@media (max-width: 940px) {
  .staff-workspace { grid-template-columns: minmax(0, 1fr); }
  .staff-candidates { position: static; }
  .staff-suggestions { max-height: none; }
}

@media (max-width: 480px) {
  .staff-summary { gap: 5px; }
  .staff-summary > div { padding: 8px; }
  .staff-summary span, .staff-summary small { font-size: 11px; }
  .staff-summary strong { font-size: 16px; }
  .staff-group { padding: 10px; }
  .staff-group-label { gap: 6px; }
  .staff-group-label h3 { font-size: 14px; }
  .staff-seats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
