/* ============================================================
   parent.css — Parent Portal page styles
   ============================================================ */

.parent-page {
  max-width: 900px;
}

/* ── Student grid ────────────────────────────────────────────────────────── */

.pa-student-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--space-5);
  margin-bottom: var(--space-8);
}

.pa-student-card {
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.pa-student-card:hover {
  border-color: var(--color-primary-300);
  box-shadow: 0 2px 12px rgba(99, 77, 255, 0.08);
}

.pa-student-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-primary-700);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  flex-shrink: 0;
  margin-bottom: var(--space-3);
}

.pa-student-name {
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--text-default);
  line-height: 1.3;
}

.pa-student-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.pa-student-stats {
  display: flex;
  gap: var(--space-4);
  margin-bottom: var(--space-5);
  padding: var(--space-3) 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.pa-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pa-stat-value {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--text-default);
  line-height: 1;
}

.pa-stat-label {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
}

.pa-student-actions {
  margin-top: auto;
  display: flex;
  gap: var(--space-2, 0.5rem);
}

/* ── Status badge ────────────────────────────────────────────────────────── */

.pa-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  padding: 3px 8px;
  border-radius: var(--radius-full);
  margin-bottom: var(--space-4);
}

.pa-status-badge.active {
  background: var(--color-success-50, #f0fdf4);
  color: var(--color-success-700, #15803d);
}

.pa-status-badge.pending {
  background: var(--color-warning-50, #fffbeb);
  color: var(--color-warning-700, #b45309);
}

.pa-status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.active .pa-status-dot  { background: var(--color-success-500, #22c55e); }
.pending .pa-status-dot { background: var(--color-warning-400, #fbbf24); }

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

.pa-skeleton-card {
  pointer-events: none;
}

/* ── Pending invites section ─────────────────────────────────────────────── */

.pa-section-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: var(--space-3);
}

.pa-invites-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.pa-invite-row {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: var(--space-3) var(--space-4);
}

.pa-invite-email {
  flex: 1;
  font-size: var(--text-sm);
  color: var(--text-default);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pa-invite-sent {
  font-size: var(--text-xs);
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.pa-invite-actions {
  display: flex;
  gap: var(--space-2);
  flex-shrink: 0;
}

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

.pa-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: var(--space-16) var(--space-6) var(--space-10);
  max-width: 540px;
  margin: 0 auto;
}

.pa-empty-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary-50, #ede9ff);
  color: var(--color-primary-600, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-5);
}

.pa-empty-title {
  font-size: var(--text-xl);
  font-weight: var(--weight-bold);
  color: var(--text-default);
  margin: 0 0 var(--space-2);
}

.pa-empty-body {
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0 0 var(--space-8);
}

/* ── Path cards (empty state) ────────────────────────────────────────────── */

.pa-path-cards {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pa-path-card {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.pa-path-card:hover {
  border-color: var(--color-primary-400);
  box-shadow: 0 2px 10px rgba(99, 77, 255, 0.1);
}

.pa-path-card-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--color-primary-50, #ede9ff);
  color: var(--color-primary-600, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pa-path-card-text {
  flex: 1;
  min-width: 0;
}

.pa-path-card-title {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-default);
  margin-bottom: 2px;
}

.pa-path-card-desc {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.pa-path-card-arrow {
  color: var(--text-muted);
  flex-shrink: 0;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */

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

  .pa-invite-row {
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .pa-invite-sent {
    display: none;
  }
}
