/* === Team Management ===================================================
 * List of users with role pills, edit drawer. Admin-only screen.
 * ======================================================================= */

.team-list {
  background: var(--surface);
  border: 1px solid var(--b1);
  border-radius: var(--r);
  box-shadow: var(--sh-1);
  overflow: hidden;
}

.team-row {
  display: grid;
  grid-template-columns: 48px 1fr 120px 100px 90px;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-3) var(--s-4);
  border-bottom: 1px solid var(--b0);
  transition: background var(--t-fast);
}
.team-row:last-child { border-bottom: none; }
.team-row:hover { background: var(--bg); }
.team-row.is-disabled { opacity: 0.55; }

.team-row__avatar {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-family: var(--fd);
  font-weight: var(--w-bold);
  font-size: 15px;
  color: #fff;
}

.team-row__name {
  font-family: var(--fd);
  font-size: var(--text-md);
  font-weight: var(--w-semibold);
  color: var(--tx);
  line-height: 1.2;
}
.team-row__email {
  font-size: var(--text-xs);
  color: var(--t3);
  margin-top: 2px;
}

.team-row__role-pill,
.team-row__status-pill {
  display: inline-block;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: var(--w-bold);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 999px;
}

.team-row__role-pill--admin {
  background: var(--primary-tint);
  color: var(--primary-deep);
}
.team-row__role-pill--partner {
  background: rgba(79, 70, 229, 0.12);
  color: #4F46E5;
}
.team-row__role-pill--employee {
  background: rgba(245, 158, 11, 0.12);
  color: #B45309;
}

.team-row__status-pill.is-active {
  background: var(--positive-tint);
  color: var(--positive);
}
.team-row__status-pill.is-disabled {
  background: var(--b1);
  color: var(--t3);
}

.team-row__actions {
  display: flex;
  justify-content: flex-end;
}

.team-drawer-info {
  margin-top: var(--s-4);
  padding: var(--s-3);
  background: var(--bg);
  border-radius: var(--rs);
}
.team-drawer-info__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: var(--text-sm);
  padding: 4px 0;
}
.team-drawer-info__row strong {
  color: var(--tx);
  font-weight: var(--w-medium);
}

@media (max-width: 700px) {
  .team-row {
    grid-template-columns: 44px 1fr 70px;
    grid-template-areas:
      "av  name  actions"
      "av  email actions"
      "role status actions";
    gap: var(--s-2);
  }
  .team-row__avatar  { grid-area: av; }
  .team-row__main    { grid-area: name; }
  .team-row__role    { grid-area: role; }
  .team-row__status  { grid-area: status; }
  .team-row__actions { grid-area: actions; }
}
