/* Candidate Dashboard */
.page { padding: 32px; max-width: 1200px; margin: 0 auto; }
.page-header { margin-bottom: 32px; }
.page-header h1 { font-size: 24px; font-weight: 700; color: var(--text-primary); margin: 0 0 4px; }
.page-subtitle { font-size: 14px; color: var(--text-muted); margin: 0; }

.loading-center { display: flex; flex-direction: column; align-items: center; padding: 80px 20px; gap: 16px; }
.loading-text { font-size: 14px; color: var(--text-muted); }

.quiz-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; }

.quiz-card { padding: 24px; display: flex; flex-direction: column; gap: 12px; height: 100%; box-sizing: border-box; }
.quiz-card.taken { opacity: 0.85; }
.quiz-card-header { display: flex; align-items: flex-start; justify-content: flex-start; gap: 12px; }

.quiz-icon-wrap {
  width: 40px; height: 40px; border-radius: var(--radius-md); flex-shrink: 0;
  background: var(--accent-primary-light); display: flex; align-items: center; justify-content: center;
}
.quiz-icon-wrap .material-symbols-rounded { font-size: 22px; color: var(--accent-primary); }
.quiz-icon-wrap.completed { background: var(--success-light); }
.quiz-icon-wrap.completed .material-symbols-rounded { color: var(--success); }

.quiz-meta { display: flex; gap: 8px; flex: 1; flex-wrap: wrap; justify-content: flex-start; align-items: center; min-width: 0; margin-left: 4px; width: 100%; }

.difficulty-badge { margin-left: auto; }

.quiz-meta .badge {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 15vw; /* Keeps it contained so it truncation kicks in */
}
@media (max-width: 768px) {
  .quiz-meta .badge { max-width: 40vw; }
}

.quiz-title { font-size: 16px; font-weight: 600; color: var(--text-primary); margin: 0; }

.quiz-details { display: flex; gap: 16px; margin-bottom: 8px; }
.quiz-detail { display: flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text-muted); }
.quiz-detail .material-symbols-rounded { font-size: 16px; }

.quiz-result { display: flex; flex-direction: column; gap: 6px; }
.result-bar-track { width: 100%; height: 6px; background: var(--bg-tertiary); border-radius: 3px; overflow: hidden; }
.result-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s ease; }
.fill-good { background: var(--success); }
.fill-avg { background: var(--warning); }
.fill-poor { background: var(--danger); }
.result-score { font-size: 13px; color: var(--text-secondary); font-weight: 500; }

.quiz-card-footer { display: flex; align-items: center; justify-content: space-between; margin-top: auto; }

@media (max-width: 768px) {
  .page { padding: 20px; }
  .quiz-grid { grid-template-columns: 1fr; }
}
