.user-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: var(--space-4);
}

.user-filters-panel {
  flex-wrap: wrap;
}

.user-filters-panel .search-box {
  flex: 0 0 320px;
}

.user-main {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: var(--space-3);
}

.user-main-button {
  display: block;
  width: 100%;
  padding: 2px;
  border: 0;
  border-radius: var(--radius-control);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition:
    background var(--motion-base) var(--ease-standard),
    box-shadow var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.user-main-button:hover {
  background: var(--bg-hover);
}

.user-main-button:hover .service-name {
  color: var(--primary);
}

.user-main-button:focus-visible {
  outline: 2px solid var(--primary-border-strong);
  outline-offset: 2px;
}

.user-main__text {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.user-main__text .service-name,
.user-main__text .service-desc {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-main__text .service-name {
  color: var(--text-primary);
  font-weight: 700;
}

.user-main__text .service-desc {
  color: var(--text-secondary);
  font-size: 12px;
}

.user-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: var(--radius-control);
  background: var(--primary-surface);
  color: var(--primary);
  transition:
    background var(--motion-base) var(--ease-standard),
    transform var(--motion-base) var(--ease-emphasized);
}

.admin-row:hover .user-avatar {
  background: var(--primary-surface-strong);
  transform: scale(1.08);
}

.user-profile {
  display: grid;
  gap: var(--space-5);
}

.user-profile__head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.user-profile__avatar {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: var(--radius-control);
  background: var(--primary-surface);
  color: var(--primary);
}

.user-profile__identity {
  display: grid;
  min-width: 0;
  gap: var(--space-1);
}

.user-profile__identity strong {
  color: var(--text-primary);
  font-weight: 800;
}

.user-profile__identity span {
  overflow: hidden;
  color: var(--text-secondary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-profile__rows {
  display: grid;
  border-top: 1px solid var(--border);
}

.user-profile__row {
  display: grid;
  grid-template-columns: minmax(88px, 0.45fr) minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-height: 44px;
  border-bottom: 1px solid var(--border);
}

.user-profile__row span {
  color: var(--text-tertiary);
}

.user-profile__value {
  min-width: 0;
  color: var(--text-primary);
  font-weight: 700;
  overflow-wrap: anywhere;
}

.team-name-cell {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.team-name-cell--child {
  padding-left: 18px;
  border-left: 2px solid var(--border-subtle);
}

.team-name-cell strong {
  overflow: hidden;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.team-name-cell small {
  width: max-content;
  padding: 2px 6px;
  border-radius: var(--radius-control);
  background: var(--primary-surface);
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}
