#view-team > .panel {
  overflow-x: auto;
}

#view-team > .panel + .panel {
  margin-top: 16px;
}

#view-team > .panel > h2 {
  margin: 0 0 4px;
  font-size: 17px;
}

.team-add,
.team-person-actions,
.team-person-head {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
}

.team-add {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}

.team-person-head {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.team-person-head h2 {
  margin: 0;
  font-size: 17px;
}

.team-add label,
.team-person-actions label {
  display: grid;
  gap: 5px;
}

.team-add label > span:first-child,
.team-person-actions label > span:first-child {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.team-add input,
.team-add select,
.team-person-actions select,
.team-grant-row select,
.team-account-grants select {
  min-height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

.team-email {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  overflow: hidden;
}

.team-email input {
  border: 0;
  border-radius: 0;
  min-width: 140px;
}

.team-email > span {
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-left: 1px solid var(--line-strong);
  background: var(--surface-3);
  color: var(--muted);
  font-size: 13px;
}

.team-email:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

#view-team .team-email input:focus {
  box-shadow: none;
}

#teamTempPassword {
  flex-wrap: wrap;
  align-items: center;
  margin-top: 14px;
}

#teamTempPassword code {
  padding: 4px 8px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 13px;
  user-select: all;
}

.team-table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.team-table th,
.team-table td {
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.team-table td:last-child {
  text-align: right;
}

#teamAccessEditor h3 {
  margin: 20px 0 6px;
  font-size: 13px;
  color: var(--ink-2);
}

.team-grant-row {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.team-account-grants {
  display: grid;
  margin-bottom: 10px;
}

#teamSaveAccess {
  margin-top: 16px;
}

