.class-students-panel {
  overflow: hidden;
}

.class-student-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.class-student-card {
  min-width: 0;
  min-height: 76px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: #fafcfb;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.class-student-card strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
}

.class-student-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--teal-dark);
  background: var(--teal-soft);
  border-radius: 13px;
  font-size: 12px;
  font-weight: 800;
}

.class-student-photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
}

.class-student-avatar.has-photo .class-student-photo {
  opacity: 1;
}

.class-student-avatar.has-photo > span {
  visibility: hidden;
}

@media (max-width: 980px) {
  .class-student-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .class-student-grid {
    grid-template-columns: 1fr;
  }
}
