/* public/themes/modern-white/assets/css/admin/students.css
   Vista "Estudiantes" — Studium 360
   Usa el sistema de tabla existente (.cp-table) y tokens de tokens.css.
   ============================================================ */

/* ============================================================
   Header de la vista
   ============================================================ */

.cp-hero .cp-hero-head > div:last-child{
  flex: 0 0 auto;
}

/* ============================================================
   Tarjeta contenedora de la tabla
   ============================================================ */

.cp-students-card{
  padding: 0;
  overflow: hidden;
}

.cp-students-card .cp-scroll{
  overflow-x: auto;
}

/* ============================================================
   Tabla de estudiantes
   ============================================================ */

.cp-table--students{
  min-width: 640px;
}

.cp-table--students thead th{
  position: sticky;
  top: 0;
  background: var(--surface-2);
  z-index: 1;
}

.cp-table--students tbody tr{
  transition: background-color .12s ease;
}

.cp-table--students tbody tr:hover{
  background: var(--surface-2);
}

.cp-table--students tbody tr:last-child td{
  border-bottom: none;
}

/* ---- Celda de estudiante: avatar + nombre + email ---- */

.cp-student{
  display: flex;
  align-items: center;
  gap: 12px;
}

.cp-student__avatar{
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;

  background: var(--tone-success-bg);
  color: var(--tone-success-text);
  border: 1px solid var(--tone-success-border);

  font-weight: 800;
  font-size: 14px;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.cp-student__info{
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.cp-student__name{
  font-weight: 650;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cp-student__email{
  font-size: var(--text-sm);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Badges numéricos en la tabla ---- */

.cp-table--students .badge{
  font-weight: 700;
  color: var(--text);
  background: var(--surface-2);
}

.cp-badge-score{
  display: inline-flex;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid transparent;
}

.cp-badge-score--high{
  background: var(--tone-success-bg);
  border-color: var(--tone-success-border);
  color: var(--tone-success-text);
}

.cp-badge-score--mid{
  background: var(--tone-warning-bg);
  border-color: var(--tone-warning-border);
  color: var(--tone-warning-text);
}

.cp-badge-score--low{
  background: var(--tone-danger-bg);
  border-color: var(--tone-danger-border);
  color: var(--tone-danger-text);
}

/* ---- Estado vacío ---- */

.cp-students-empty{
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6) var(--space-4);
  text-align: center;
}

.cp-students-empty svg{
  width: 40px;
  height: 40px;
  color: var(--muted);
  opacity: .5;
}

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 639px){
  .cp-hero .cp-hero-head > div:last-child{
    width: 100%;
    flex-direction: column;
  }

  .cp-hero .cp-hero-head > div:last-child .btn{
    width: 100%;
    justify-content: center;
  }

  .cp-student__email{
    max-width: 38vw;
  }
}