/* ==========================================================================
   DASHBOARD & PERFORMANCE ANALYTICS - AUTHENTIC INSTITUTIONAL UI
   ========================================================================== */

.dashboard-wrapper {
  max-width: 1360px;
  margin: 0 auto;
  padding: 1.8rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

/* Candidate Profile Banner */
.profile-hero {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.profile-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #10b981 0%, #3b82f6 100%);
}

.profile-details {
  display: flex;
  align-items: center;
  gap: 1.4rem;
}

.avatar-ring {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--surface-elevated);
  border: 2px solid var(--border-medium);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.5rem;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.profile-title-row {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.student-name {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.025em;
  color: var(--text-primary);
}

.dept-badge {
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.02em;
}

.aspirant-target {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-top: 0.25rem;
}

.aspirant-target strong {
  color: var(--text-primary);
}

.profile-actions {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.streak-pill {
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.25);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.streak-pill svg {
  color: var(--accent-gold);
}

.streak-count {
  display: block;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-gold);
  line-height: 1.2;
}

.streak-label {
  display: block;
  font-size: 0.7rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
}

/* Institutional Countdown & Fast Access Bar */
.exam-status-bar {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0.75rem 1.4rem;
  gap: 1rem;
}

.exam-countdown-group {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.countdown-badge {
  background: var(--jamb-surface);
  border: 1px solid var(--jamb-border);
  color: var(--jamb-emerald);
  font-size: 0.75rem;
  font-weight: 800;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
}

.novel-pill-btn {
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: var(--radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-fast);
}

.novel-pill-btn:hover {
  border-color: #10b981;
  color: #10b981;
  background: var(--jamb-surface);
}

/* Metrics Grid */
.metrics-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr 1fr;
  gap: 1rem;
}

.metric-card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 1.25rem 1.4rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast);
}

.metric-card:hover {
  border-color: var(--border-medium);
}

.metric-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.metric-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.metric-header svg {
  color: var(--text-tertiary);
}

.metric-val {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  line-height: 1.15;
}

.metric-sub {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  margin-top: 0.4rem;
}

.metric-target {
  border-left: 3px solid #10b981;
}

.target-comparison {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.4rem;
}

.score-display .current-score {
  font-size: 1.95rem;
  font-weight: 800;
  color: #10b981;
  font-family: var(--font-mono);
}

.score-display .score-denom {
  font-size: 0.95rem;
  color: var(--text-tertiary);
  font-weight: 600;
}

.target-subtext {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--surface-highlight);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 0.4rem;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.4s ease-out;
}

/* Exam Launcher Section */
.exam-launcher-section {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.section-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.section-title {
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.section-subtitle {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.dept-selector-tabs {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 0.25rem;
  display: flex;
  gap: 0.25rem;
}

.dept-tab-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-weight: 700;
  font-size: 0.82rem;
  padding: 0.45rem 0.85rem;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  transition: var(--transition-fast);
}

.dept-tab-btn:hover {
  color: var(--text-primary);
}

.dept-tab-btn.active {
  background: var(--surface-base);
  color: var(--text-primary);
  box-shadow: var(--shadow-sm);
}

/* Launcher Cards Grid */
.launcher-cards-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.launcher-card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.8rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: var(--shadow-sm);
  position: relative;
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.launcher-card:hover {
  transform: translateY(-2px);
}

.jamb-card {
  border-top: 3px solid #10b981;
}

.jamb-card:hover {
  border-color: rgba(16, 185, 129, 0.4);
}

.waec-card {
  border-top: 3px solid #3b82f6;
}

.waec-card:hover {
  border-color: rgba(59, 130, 246, 0.4);
}

.launcher-badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.2rem 0.6rem;
  border-radius: var(--radius-xs);
  margin-bottom: 0.75rem;
  width: fit-content;
}

.jamb-badge {
  background: var(--jamb-surface);
  color: #10b981;
  border: 1px solid var(--jamb-border);
}

.waec-badge {
  background: var(--waec-surface);
  color: #60a5fa;
  border: 1px solid var(--waec-border);
}

.launcher-title {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.015em;
  margin-bottom: 0.4rem;
}

.launcher-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 1.2rem;
}

.launcher-subjects-list, .waec-subject-picker {
  margin-bottom: 1.4rem;
}

.launcher-subjects-list strong, .waec-subject-picker label {
  display: block;
  font-size: 0.76rem;
  color: var(--text-tertiary);
  margin-bottom: 0.45rem;
  text-transform: uppercase;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.subject-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.subject-tag {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-xs);
  color: var(--text-secondary);
}

.launcher-buttons {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}

/* Analytics Section */
.analytics-section {
  display: grid;
  grid-template-columns: 1fr 1.35fr;
  gap: 1.25rem;
}

.analytics-card {
  background: var(--surface-base);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 1.6rem;
  box-shadow: var(--shadow-sm);
}

.card-title {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.card-subtitle {
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
  margin-bottom: 1.1rem;
}

.card-header-flex {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}

.history-count {
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-tertiary);
  background: var(--surface-elevated);
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border-subtle);
}

.subject-mastery-list {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.mastery-item {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.mastery-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.85rem;
}

.mastery-subject-name {
  font-weight: 600;
  color: var(--text-primary);
}

.mastery-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mastery-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.badge-status-strong {
  background: rgba(16, 185, 129, 0.12);
  color: #10b981;
}

.badge-status-medium {
  background: rgba(245, 158, 11, 0.12);
  color: #f59e0b;
}

.badge-status-weak {
  background: rgba(239, 68, 68, 0.12);
  color: #ef4444;
}

.badge-status-neutral {
  background: var(--surface-highlight);
  color: var(--text-tertiary);
}

.mastery-pct {
  font-weight: 700;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.mastery-bar-bg {
  width: 100%;
  height: 5px;
  background: var(--surface-highlight);
  border-radius: 999px;
  overflow: hidden;
}

.mastery-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #10b981);
  border-radius: 999px;
}

/* History Table */
.history-table-wrapper {
  overflow-x: auto;
}

.history-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.85rem;
}

.history-table th {
  padding: 0.65rem 0.5rem;
  color: var(--text-tertiary);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
}

.history-table td {
  padding: 0.75rem 0.5rem;
  border-bottom: 1px solid var(--border-subtle);
}

.badge-mini {
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0.15rem 0.45rem;
  border-radius: var(--radius-xs);
  letter-spacing: 0.03em;
}

.badge-jamb {
  background: var(--jamb-surface);
  color: #10b981;
}

.badge-waec {
  background: var(--waec-surface);
  color: #60a5fa;
}

.history-title-cell {
  font-weight: 600;
  max-width: 200px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-scaled {
  font-family: var(--font-mono);
  font-weight: 700;
  color: #10b981;
}

.badge-grade {
  font-weight: 800;
  font-family: var(--font-mono);
}

.btn-table-review {
  background: var(--surface-elevated);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-xs);
  transition: var(--transition-fast);
}

.btn-table-review:hover {
  background: #10b981;
  color: #ffffff;
  border-color: #10b981;
}

.empty-state {
  text-align: center;
  padding: 2.5rem 1.5rem;
  color: var(--text-tertiary);
  font-size: 0.9rem;
}

/* Custom Combination Modal List */
.combo-subjects-list label {
  background: var(--surface-elevated);
  border: 1px solid var(--border-subtle);
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  transition: var(--transition-fast);
}

.combo-subjects-list label:hover {
  background: var(--surface-highlight);
  border-color: var(--border-medium);
}

.combo-subjects-list input[type="checkbox"] {
  accent-color: #10b981;
  width: 16px;
  height: 16px;
}

/* Responsive */
@media (max-width: 1040px) {
  .metrics-grid { grid-template-columns: 1fr 1fr; }
  .launcher-cards-grid { grid-template-columns: 1fr; }
  .analytics-section { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .profile-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
    padding: 1.25rem;
  }
  .metrics-grid { grid-template-columns: 1fr; }
  .exam-status-bar { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════════════════════
   NOVEL FEATURE CARD — Dashboard Prominent Banner
   ═══════════════════════════════════════════════════════════ */

.novel-feature-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  background: var(--surface-base);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: var(--radius-lg);
  padding: 1.4rem 1.8rem;
  position: relative;
  overflow: hidden;
  cursor: default;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.novel-feature-card:hover {
  border-color: rgba(16, 185, 129, 0.55);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.06), var(--shadow-md);
}

/* Decorative gradient background */
.novel-feature-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 80% at 0% 50%, rgba(16, 185, 129, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 30% 50% at 100% 50%, rgba(5, 150, 105, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Subtle diagonal pattern */
.novel-feature-card::after {
  content: '';
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 200px;
  background: repeating-linear-gradient(
    135deg,
    transparent,
    transparent 10px,
    rgba(16,185,129,0.025) 10px,
    rgba(16,185,129,0.025) 11px
  );
  pointer-events: none;
}

/* Book icon circle */
.novel-feat-book-icon {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  background: linear-gradient(135deg, #047857, #10b981);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.3);
  position: relative;
  z-index: 1;
}

/* Info block */
.novel-feat-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  position: relative;
  z-index: 1;
}

.novel-feat-tag {
  font-size: 0.72rem;
  font-weight: 700;
  color: #10b981;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.novel-feat-title {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.novel-feat-title em {
  font-style: italic;
  color: var(--text-primary);
}

.novel-feat-author {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-tertiary);
  font-style: normal;
}

.novel-feat-desc {
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.55;
  max-width: 480px;
}

.novel-feat-desc strong {
  color: var(--text-primary);
}

/* Right action column */
.novel-feat-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.75rem;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.novel-feat-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.78rem;
}

.nf-stat {
  color: var(--text-secondary);
}

.nf-stat strong {
  color: var(--text-primary);
}

.nf-divider {
  color: var(--text-tertiary);
}

/* CTA Button */
.btn-novel-open {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, #059669, #10b981);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  padding: 0.6rem 1.1rem;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-novel-open:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.45);
}

.btn-novel-open:active {
  transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .novel-feature-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 1.25rem;
    gap: 1rem;
  }

  .novel-feat-actions {
    align-items: flex-start;
    width: 100%;
  }

  .btn-novel-open {
    width: 100%;
    justify-content: center;
  }

  .novel-feat-title {
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .novel-feat-book-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
  }
}

