/* ============================================================
   students.css — Page-specific styles for students.html
   Foundation tokens: variables.css
   Base layout:       base.css
   Shared components: components.css
   This file adds only what is unique to the Students page.
   ============================================================ */

/* ── Page header extras ───────────────────────────────────── */

.back-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  color: var(--gold);
  text-decoration: none;
  transition: background var(--transition-fast);
  flex-shrink: 0;
}

.back-btn:hover {
  background: var(--gold-glow);
}

.icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: transparent;
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color var(--transition-fast), color var(--transition-fast);
}

.icon-btn:hover {
  border-color: var(--gold-border);
  color: var(--gold);
}

/* ── Search with icon ─────────────────────────────────────── */

.search-wrap {
  position: relative;
  margin-bottom: var(--sp-4);
}

.search-icon {
  position: absolute;
  left: var(--sp-4);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar--icon {
  padding-left: calc(var(--sp-4) + 16px + var(--sp-2));
}

/* ── Filter chips row ─────────────────────────────────────── */

.filter-chips-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-2);
  margin-bottom: var(--sp-5);
}

/* ── Stats row (3 cards) ──────────────────────────────────── */

.stu-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}

.stu-stat-card {
  text-align: center;
  align-items: center;
}

.stu-stat-card .stat-card-value {
  font-size: var(--text-xl);
}

@media (max-width: 500px) {
  .stu-stats-row {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--sp-2);
  }

  .stu-stat-card .stat-card-value {
    font-size: var(--text-lg);
  }

  .stu-stat-card .stat-card-label {
    font-size: var(--text-xs);
  }
}

/* ── Student list ─────────────────────────────────────────── */

#student-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

/* ── Student card ─────────────────────────────────────────── */

.stu-card {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--border-neutral);
  border-radius: var(--radius-lg);
  padding: var(--sp-3) var(--sp-4);
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}

.stu-card:hover {
  border-color: var(--gold-border);
  background: var(--bg-card-hover);
  transform: translateX(2px);
}

/* avatar wrapper */
.stu-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.stu-avatar img.avatar {
  width: 52px;
  height: 52px;
}

.stu-avatar .avatar-initials {
  width: 52px;
  height: 52px;
  font-size: var(--text-base);
  font-weight: 700;
}

/* middle info */
.stu-card-mid {
  flex: 1;
  min-width: 0;
}

.stu-card-name {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.stu-card-sub {
  font-size: var(--text-xs);
  color: var(--text-secondary);
  margin-bottom: var(--sp-2);
}

/* right side */
.stu-card-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: var(--sp-1);
  flex-shrink: 0;
}

.stu-card-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  text-align: right;
}

.stu-card-time-label {
  font-size: 10px;
  color: var(--text-muted);
}

.stu-chevron {
  color: var(--text-muted);
  display: flex;
  align-items: center;
}

/* ── Empty state ──────────────────────────────────────────── */

.stu-empty {
  text-align: center;
  padding: var(--sp-10) var(--sp-4);
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.stu-empty svg {
  margin-bottom: var(--sp-4);
  opacity: 0.4;
}

/* ── Skeleton ─────────────────────────────────────────────── */

.skeleton {
  background: var(--bg-input);
  border-radius: var(--radius-sm);
  animation: stu-shimmer 1.6s ease-in-out infinite;
}

@keyframes stu-shimmer {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.skeleton-card {
  pointer-events: none;
  cursor: default;
}

.stu-avatar-skeleton {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

@media (max-width: 768px) {
  .page-content {
    padding: var(--sp-4);
  }
}
