/* ==========================================================================
   GET ENGINEERING SEAT — Student Dashboard Stylesheet (v1.0)
   Authoritative Reference: docs/02-ui-ux-branding.md & docs/06-STUDENT SYSTEM.md
   ========================================================================== */

/* --- Dashboard Page Shell & Header --- */
.dashboard-shell {
  padding-top: var(--spacing-6);
  padding-bottom: var(--spacing-12);
}

.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: var(--spacing-4);
  margin-bottom: var(--spacing-8);
  padding-bottom: var(--spacing-6);
  border-bottom: 1px solid var(--color-border);
}

.dashboard-user-greeting {
  display: flex;
  align-items: center;
  gap: var(--spacing-4);
}

.dashboard-avatar {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-primary-light) 100%);
  color: var(--color-primary-contrast);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  box-shadow: var(--shadow-sm);
  flex-shrink: 0;
}

.dashboard-title-group h1 {
  margin-bottom: var(--spacing-1);
  font-size: var(--font-size-2xl);
  line-height: var(--line-height-tight);
}

.dashboard-title-group p {
  margin-bottom: 0;
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
}

/* --- Section Layout Grids --- */
.dashboard-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--spacing-6);
  margin-bottom: var(--spacing-8);
}

.dashboard-main-split {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--spacing-6);
  margin-bottom: var(--spacing-8);
}

/* --- Stats Grid & Unified Metrics Cluster --- */
.dashboard-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--spacing-3);
  margin-bottom: var(--spacing-8);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: var(--spacing-3);
  box-shadow: var(--shadow-sm);
}

.stat-card {
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  padding: var(--spacing-4);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast);
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  background: var(--color-surface-hover);
  border-color: var(--color-border);
  transform: translateY(-1px);
}

.stat-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-2);
}

.stat-card-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-md);
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: var(--color-secondary);
}

[data-theme="dark"] .stat-card-icon {
  background: rgba(45, 212, 191, 0.1);
  border-color: rgba(45, 212, 191, 0.2);
  color: var(--color-secondary-light);
}

.stat-card-number {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  color: var(--color-text);
  line-height: 1;
}

[data-theme="dark"] .stat-card-number {
  color: var(--color-text);
}

.stat-card-label {
  font-size: 0.8125rem; /* 13px */
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
  margin-top: var(--spacing-2);
}

/* --- Exam Stat Strip (Sleek, No Nested Boxes) --- */
.exam-stats-strip {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: var(--color-surface-hover);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--spacing-3) var(--spacing-4);
  margin-bottom: var(--spacing-4);
}

.exam-stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.exam-stat-label {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
  font-weight: var(--font-weight-medium);
}

[data-theme="dark"] .exam-stat-label {
  color: var(--color-text-secondary, #e2e8f0);
}

.exam-stat-val {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-bold);
  color: var(--color-primary);
}

[data-theme="dark"] .exam-stat-val {
  color: var(--color-teal-bright, #2dd4bf);
}

.exam-stat-divider {
  width: 1px;
  height: 28px;
  background-color: var(--color-border);
}

/* --- Profile Progress Bar --- */
.progress-track {
  width: 100%;
  height: 8px;
  background-color: var(--color-border);
  border-radius: var(--radius-full);
  overflow: hidden;
  margin: var(--spacing-3) 0;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--color-secondary) 0%, var(--color-secondary-light) 100%);
  border-radius: var(--radius-full);
  transition: width var(--transition-normal);
}

/* --- List Items (Deadlines & Counselling) --- */
.dashboard-list {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-3);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dashboard-list-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-3) var(--spacing-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  transition: background-color var(--transition-fast);
}

.dashboard-list-item:hover {
  background-color: var(--color-surface-hover);
}

.item-main {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.item-title {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text);
}

.item-subtitle {
  font-size: var(--font-size-xs);
  color: var(--color-text-muted);
}

[data-theme="dark"] .item-subtitle {
  color: var(--color-text-secondary, #e2e8f0);
}

[data-theme="dark"] #dash-profile-progress-text {
  color: var(--color-teal-bright, #2dd4bf) !important;
}

[data-theme="dark"] .dashboard-overview-grid .text-muted {
  color: var(--color-text-muted, #cbd5e1) !important;
}

.item-meta {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
}

/* --- Quick Actions Grid --- */
.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-4);
  margin-top: var(--spacing-4);
}

.quick-action-btn {
  display: flex;
  align-items: center;
  gap: var(--spacing-3);
  padding: var(--spacing-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--color-text);
  font-weight: var(--font-weight-medium);
  font-size: var(--font-size-sm);
  transition: all var(--transition-fast);
}

.quick-action-btn:hover {
  border-color: var(--color-secondary);
  background: var(--color-surface-hover);
  color: var(--color-secondary);
  transform: translateY(-1px);
}

[data-theme="dark"] .quick-action-btn:hover {
  border-color: var(--color-teal-bright, #2dd4bf);
  color: var(--color-teal-bright, #2dd4bf);
}

/* --- Responsive Breakpoints --- */
@media (max-width: 1023.98px) {
  .dashboard-overview-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-main-split {
    grid-template-columns: 1fr;
  }

  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quick-actions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 639.98px) {
  .dashboard-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .dashboard-stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-2);
    padding: var(--spacing-2);
  }

  .quick-actions-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-list-item {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--spacing-2);
  }

  .item-meta {
    width: 100%;
    justify-content: space-between;
  }
}

/* --- Dashboard Section Titles & Contrast Utilities --- */
.dashboard-section-title {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

[data-theme="dark"] .dashboard-section-title {
  color: var(--color-text-secondary, #e2e8f0);
}

[data-theme="dark"] .dashboard-header .btn-outline {
  border-color: #475569;
  color: var(--color-text);
}

[data-theme="dark"] .dashboard-header .btn-outline:hover {
  border-color: var(--color-teal-bright, #2dd4bf);
  color: var(--color-teal-bright, #2dd4bf);
  background-color: rgba(45, 212, 191, 0.1);
}
