/*
 * Physics SciEd Student Dashboard
 * Compact learner-focused interface v1.0
 */

:root {
  --student-navy: #10233f;
  --student-navy-soft: #18365f;
  --student-gold: #f3c632;
  --student-gold-hover: #dfaF1f;
  --student-cream: #fffdf0;
  --student-soft: #fff9c4;
  --student-white: #ffffff;
  --student-border: #e9e2c8;
  --student-border-strong: #d8cfae;
  --student-muted: #667085;
  --student-blue: #174ea6;
  --student-success: #176b4d;
  --student-warning: #9a3412;
  --student-danger: #b42318;
}

html {
  min-height: 100%;
  background: var(--student-cream);
}

body.psc-student-page {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  background: var(--student-cream) !important;
  color: var(--student-navy) !important;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.psc-student-page *,
body.psc-student-page *::before,
body.psc-student-page *::after {
  box-sizing: border-box;
}

body.psc-student-page img {
  max-width: 100%;
}

.student-skip-link {
  position: fixed;
  top: -72px;
  left: 12px;
  z-index: 2000;
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.85rem;
  color: var(--student-navy);
  background: var(--student-gold);
  border: 2px solid white;
  border-radius: 10px;
  font-weight: 800;
  text-decoration: none;
  transition: top 0.16s ease;
}

.student-skip-link:focus,
.student-skip-link:focus-visible {
  top: 10px;
}

/* Navy learner portal header */
body.psc-student-page .student-navbar {
  position: sticky;
  top: 0;
  z-index: 1030;
  min-height: 68px;
  padding: 0.58rem clamp(0.75rem, 2vw, 1.35rem);
  background: var(--student-navy) !important;
  color: white !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.17) !important;
}

.student-navbar-inner {
  padding-inline: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.student-brand {
  min-width: 0;
  display: inline-flex !important;
  align-items: center;
  gap: 11px;
  color: white !important;
  text-decoration: none;
}

.student-brand-emblem {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: white;
  border: 1px solid rgba(255, 255, 255, 0.36);
  border-radius: 14px;
}

.student-brand-emblem img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.student-brand-copy {
  min-width: 0;
  display: grid;
  gap: 1px;
  line-height: 1.15;
}

body.psc-student-page .student-brand-copy strong {
  color: white !important;
  -webkit-text-fill-color: white !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 1rem;
  font-weight: 800 !important;
  white-space: nowrap;
}

body.psc-student-page .student-brand-copy small {
  color: rgba(255, 255, 255, 0.74) !important;
  -webkit-text-fill-color: rgba(255, 255, 255, 0.74) !important;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.student-navbar-actions {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

body.psc-student-page .student-navbar .navbar-text {
  max-width: min(34vw, 420px);
  color: white !important;
  -webkit-text-fill-color: white !important;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.psc-student-page .student-navbar .btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding-inline: 0.75rem;
  color: white !important;
  -webkit-text-fill-color: white !important;
  background: transparent !important;
  border-color: rgba(255, 255, 255, 0.48) !important;
  border-radius: 999px !important;
  font-weight: 700;
}

body.psc-student-page .student-navbar .btn-outline-light:hover,
body.psc-student-page .student-navbar .btn-outline-light:focus {
  color: var(--student-navy) !important;
  -webkit-text-fill-color: var(--student-navy) !important;
  background: white !important;
  border-color: white !important;
}

/* Main learner shell */
.student-dashboard-shell {
  width: min(1380px, 100%);
  margin-inline: auto;
  padding: 20px clamp(12px, 2vw, 22px) 52px;
  flex: 1 0 auto;
}

.student-welcome-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 350px);
  align-items: center;
  gap: 22px;
  margin-bottom: 16px;
  padding: 22px 24px;
  background: var(--student-white);
  border: 1px solid var(--student-border);
  border-radius: 22px;
}

.student-welcome-copy {
  min-width: 0;
  display: grid;
  gap: 10px;
}

.student-status-pill {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0.33rem 0.68rem;
  color: var(--student-navy);
  background: var(--student-soft);
  border: 1px solid var(--student-border);
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
}

.student-welcome-panel h1 {
  margin: 0 0 6px;
  color: var(--student-navy) !important;
  font-family: "Libre Baskerville", Georgia, serif !important;
  font-size: clamp(1.75rem, 3vw, 2.45rem) !important;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.student-welcome-panel p {
  max-width: 830px;
  margin: 0;
  color: var(--student-muted) !important;
  font-size: 0.94rem;
  line-height: 1.6;
}

.student-feature-link {
  min-width: 0;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 13px 14px;
  color: var(--student-navy);
  background: var(--student-soft);
  border: 1px solid #dfc84e;
  border-radius: 17px;
  text-decoration: none;
}

.student-feature-link:hover {
  color: var(--student-navy);
  background: #fff5a8;
  border-color: var(--student-gold);
}

.student-feature-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  color: var(--student-navy);
  background: white;
  border: 1px solid var(--student-border);
  border-radius: 13px;
}

.student-feature-link > span:nth-child(2) {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.student-feature-link strong {
  color: var(--student-navy) !important;
  font-size: 0.88rem;
  font-weight: 800;
}

.student-feature-link small {
  color: var(--student-muted) !important;
  font-size: 0.72rem;
  line-height: 1.35;
}

/* Profile + workspace layout */
.student-dashboard-grid {
  display: grid;
  grid-template-columns: minmax(260px, 315px) minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.student-profile-column {
  min-width: 0;
  display: grid;
  gap: 12px;
  position: sticky;
  top: 84px;
}

.profile-card,
.student-help-card,
.student-learning-workspace,
.student-profile-detail-card {
  min-width: 0;
  background: white !important;
  border: 1px solid var(--student-border) !important;
  border-radius: 20px !important;
}

.profile-card {
  margin: 0;
  padding: 17px !important;
}

.student-card-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--student-border);
}

.student-card-heading > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--student-navy);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.student-text-action {
  appearance: none;
  border: 0;
  padding: 0;
  color: var(--student-blue);
  background: transparent;
  font: inherit;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.student-text-action:hover {
  text-decoration: underline;
}

.profile-info {
  min-width: 0;
  display: grid;
  gap: 15px;
}

.profile-avatar-wrap {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 13px;
}

.profile-avatar-edit {
  position: relative;
  flex: 0 0 auto;
}

.profile-avatar,
.profile-avatar-initials {
  width: 68px !important;
  height: 68px !important;
  flex: 0 0 68px;
  display: grid;
  place-items: center;
  object-fit: cover;
  overflow: hidden;
  color: white !important;
  background: var(--student-navy) !important;
  border: 1px solid var(--student-border) !important;
  border-radius: 20px !important;
  font-size: 1.3rem;
  font-weight: 800;
}

.profile-avatar-edit-btn {
  position: absolute;
  right: -5px;
  bottom: -5px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--student-navy);
  background: var(--student-gold);
  border: 2px solid white !important;
  border-radius: 999px;
  cursor: pointer;
}

.profile-avatar-edit-btn:hover {
  background: var(--student-gold-hover);
}

.profile-avatar-wrap .min-w-0 {
  min-width: 0;
}

.profile-name {
  color: var(--student-navy) !important;
  font-family: "Libre Baskerville", Georgia, serif !important;
  font-size: 1rem !important;
  font-weight: 700 !important;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.profile-email {
  margin: 2px 0 0;
  color: var(--student-muted) !important;
  font-size: 0.76rem;
  overflow-wrap: anywhere;
}

.profile-photo-status {
  margin-top: 4px;
  color: var(--student-muted);
  font-size: 0.7rem;
}

.profile-photo-status.text-danger {
  color: var(--student-danger) !important;
}

.profile-photo-status.text-success {
  color: var(--student-success) !important;
}

.profile-complete-badge,
.profile-incomplete-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 7px;
  padding: 0.28rem 0.55rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 800;
}

.profile-complete-badge {
  color: var(--student-success) !important;
  background: #eaf7f1 !important;
  border: 1px solid #b8ddce !important;
}

.profile-incomplete-badge {
  color: var(--student-warning) !important;
  background: #fff4e8 !important;
  border: 1px solid #efc6a7 !important;
}

.profile-meta-grid {
  display: grid;
  gap: 8px;
}

.profile-meta-item {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  color: var(--student-navy);
  background: #fffdf6;
  border: 1px solid var(--student-border);
  border-radius: 13px;
  font-size: 0.75rem;
  line-height: 1.4;
}

.profile-meta-item i {
  flex: 0 0 auto;
  color: var(--student-navy) !important;
  margin-top: 1px;
}

.profile-meta-item span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.student-profile-avatar-skeleton {
  width: 68px;
  height: 68px;
  border-radius: 20px;
}

.profile-details {
  min-width: 0;
  display: grid;
  gap: 8px;
}

.student-profile-line {
  width: 80%;
  height: 12px;
  border-radius: 999px;
}

.student-profile-line-name {
  width: 72%;
  height: 18px;
}

.student-profile-line-short {
  width: 54%;
}

.student-help-card {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 14px;
}

.student-help-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  color: var(--student-navy);
  background: var(--student-soft);
  border: 1px solid var(--student-border);
  border-radius: 12px;
}

.student-help-card h2 {
  margin: 0 0 3px;
  color: var(--student-navy) !important;
  font-family: Inter, system-ui, sans-serif !important;
  font-size: 0.8rem !important;
  font-weight: 800 !important;
}

.student-help-card p {
  margin: 0;
  color: var(--student-muted) !important;
  font-size: 0.72rem;
  line-height: 1.5;
}

/* Main learning workspace */
.student-learning-workspace {
  overflow: hidden;
}

.student-workspace-heading {
  padding: 16px 18px 12px;
}

.student-section-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #7d5d00;
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.065em;
}

.student-workspace-heading h2 {
  margin: 0;
  color: var(--student-navy) !important;
  font-size: 1.05rem !important;
}

.student-dashboard-tabs {
  display: grid !important;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
  margin: 0 !important;
  padding: 5px 8px 8px;
  background: #fffdf6;
  border: 0 !important;
  border-bottom: 1px solid var(--student-border) !important;
}

body.psc-student-page .student-dashboard-tabs .nav-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin: 0;
  padding: 8px 11px;
  color: var(--student-muted) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
  border-radius: 12px !important;
  font-size: 0.78rem;
  font-weight: 800;
}

body.psc-student-page .student-dashboard-tabs .nav-link:hover {
  color: var(--student-navy) !important;
  background: white !important;
  border-color: var(--student-border) !important;
}

body.psc-student-page .student-dashboard-tabs .nav-link.active {
  color: var(--student-navy) !important;
  background: white !important;
  border-color: var(--student-border-strong) !important;
  box-shadow: inset 0 -3px 0 var(--student-gold) !important;
}

.student-dashboard-content {
  padding: 0 !important;
}

.student-tab-panel {
  position: relative;
  min-height: 310px;
  padding: 18px;
  outline: none;
}

.student-tab-heading {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 15px;
}

.student-tab-heading h3 {
  margin: 0 0 4px;
  color: var(--student-navy) !important;
  font-size: 1.25rem !important;
}

.student-tab-heading p {
  max-width: 800px;
  margin: 0;
  color: var(--student-muted) !important;
  font-size: 0.8rem;
  line-height: 1.55;
}

.student-tutorial-summary {
  overflow: hidden;
  border: 1px solid var(--student-border-strong);
  border-radius: 20px;
  background: white;
}

.student-tutorial-summary-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  color: white;
  background: linear-gradient(135deg, var(--student-navy), var(--student-navy-soft));
  border-bottom: 4px solid var(--student-gold);
}

.student-tutorial-summary-head h4 {
  margin: 5px 0 6px;
  color: white !important;
  font-family: "Libre Baskerville", Georgia, serif;
  font-size: 1.25rem !important;
}

.student-tutorial-summary-head p {
  margin: 0;
  color: #dfe8f4 !important;
  font-size: 0.82rem;
  line-height: 1.55;
}

.student-tutorial-summary-kicker {
  display: block;
  color: var(--student-gold);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.student-tutorial-status {
  flex: 0 0 auto;
  padding: 0.45rem 0.7rem;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: white;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
}

.student-tutorial-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 22px;
}

.student-tutorial-metric {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--student-border);
  border-radius: 14px;
  background: #fffdf6;
}

.student-tutorial-metric span {
  display: block;
  color: var(--student-muted);
  font-size: 0.67rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.student-tutorial-metric strong {
  display: block;
  margin-top: 6px;
  overflow-wrap: anywhere;
  color: var(--student-navy);
  font-size: 0.84rem;
  line-height: 1.45;
}

.student-tutorial-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  padding: 0 22px 22px;
}

.student-tutorial-empty,
.student-course-access-notice {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  padding: 20px;
  border: 1px solid var(--student-border);
  border-radius: 17px;
  background: #fffdf6;
}

.student-tutorial-empty > i,
.student-course-access-notice > i {
  flex: 0 0 auto;
  color: #987400;
  font-size: 1.65rem;
}

.student-tutorial-empty h4,
.student-course-access-notice h4 {
  margin: 0 0 6px;
  color: var(--student-navy) !important;
  font-size: 1rem !important;
}

.student-tutorial-empty p,
.student-course-access-notice p {
  margin: 0 0 12px;
  color: var(--student-muted) !important;
  font-size: 0.8rem;
  line-height: 1.55;
}

.student-course-type-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 7px !important;
  margin: 0 0 14px !important;
}

body.psc-student-page .student-course-type-tabs .nav-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  color: var(--student-muted) !important;
  background: white !important;
  border: 1px solid var(--student-border) !important;
  border-radius: 999px !important;
  font-size: 0.74rem;
  font-weight: 800;
}

body.psc-student-page .student-course-type-tabs .nav-link.active {
  color: white !important;
  background: var(--student-navy) !important;
  border-color: var(--student-navy) !important;
}

.student-course-type-content {
  padding: 0 !important;
}

/* Course cards generated by the preserved controller */
.course-card-minimal {
  --course-card-bg: #e8f3f8;
  --course-card-bg-strong: #b8d8e8;
  --course-card-accent: #287da1;
  --course-card-ink: #16324a;
  min-height: 100%;
  overflow: hidden;
  background: linear-gradient(145deg, var(--course-card-bg) 0%, #ffffff 118%) !important;
  border: 1px solid color-mix(in srgb, var(--course-card-accent) 36%, white) !important;
  border-radius: 20px !important;
  box-shadow: 0 9px 24px rgba(21, 42, 68, 0.08) !important;
  transition: border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.course-card-minimal::before {
  content: "";
  display: block;
  height: 7px;
  background: linear-gradient(90deg, var(--course-card-accent), var(--course-card-bg-strong)) !important;
}

.course-card-minimal:hover {
  transform: translateY(-4px);
  border-color: var(--course-card-accent) !important;
  box-shadow: 0 14px 30px rgba(21, 42, 68, 0.14) !important;
}

.course-card-minimal .card-body {
  min-height: 175px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 19px 18px 18px;
}

.course-card-icon {
  width: 46px;
  height: 46px;
  margin: 0 auto 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--course-card-ink);
  background: color-mix(in srgb, var(--course-card-bg-strong) 76%, white);
  border: 1px solid color-mix(in srgb, var(--course-card-accent) 28%, white);
  border-radius: 15px;
  font-size: 1.3rem;
}

.course-card-minimal .card-title {
  margin-bottom: 8px;
  color: var(--course-card-ink) !important;
  font-size: 1.02rem !important;
  line-height: 1.38;
}

.course-card-minimal .small {
  font-size: 0.72rem;
  line-height: 1.45;
}

.course-type-chip,
.course-date-chip {
  width: fit-content;
  max-width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: center;
  padding: 0.28rem 0.55rem;
  color: var(--course-card-ink) !important;
  background: rgba(255, 255, 255, 0.72) !important;
  border: 1px solid color-mix(in srgb, var(--course-card-accent) 24%, white) !important;
  border-radius: 999px;
  font-size: 0.66rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.course-type-chip {
  margin-bottom: 8px;
}

.course-date-chip {
  margin: 5px 0 11px;
}

body.psc-student-page .course-card-minimal .open-course-btn,
body.psc-student-page .course-card-minimal .enroll-button {
  color: #ffffff !important;
  background: var(--course-card-accent) !important;
  border-color: var(--course-card-accent) !important;
  border-radius: 11px !important;
}

body.psc-student-page .course-card-minimal .open-course-btn:hover,
body.psc-student-page .course-card-minimal .open-course-btn:focus-visible,
body.psc-student-page .course-card-minimal .enroll-button:hover,
body.psc-student-page .course-card-minimal .enroll-button:focus-visible {
  color: #ffffff !important;
  background: color-mix(in srgb, var(--course-card-accent) 84%, #0c2340) !important;
  border-color: color-mix(in srgb, var(--course-card-accent) 84%, #0c2340) !important;
}

/* Student-friendly Pantone-inspired course palette. */
.course-palette-limpet-shell {
  --course-card-bg: #dff5f5;
  --course-card-bg-strong: #98ddde;
  --course-card-accent: #147d86;
  --course-card-ink: #134b55;
}

.course-palette-serenity {
  --course-card-bg: #e9eef8;
  --course-card-bg-strong: #91a8d0;
  --course-card-accent: #526fa6;
  --course-card-ink: #263f70;
}

.course-palette-greenery {
  --course-card-bg: #edf5df;
  --course-card-bg-strong: #88b04b;
  --course-card-accent: #557d20;
  --course-card-ink: #365413;
}

.course-palette-living-coral {
  --course-card-bg: #fff0ec;
  --course-card-bg-strong: #ff6f61;
  --course-card-accent: #bf4f45;
  --course-card-ink: #74342f;
}

.course-palette-primrose-yellow {
  --course-card-bg: #fff8d8;
  --course-card-bg-strong: #f6d155;
  --course-card-accent: #946f05;
  --course-card-ink: #654d08;
}

.course-palette-rose-quartz {
  --course-card-bg: #fff0f1;
  --course-card-bg-strong: #f7cac9;
  --course-card-accent: #a85c6b;
  --course-card-ink: #6e3946;
}

@media (prefers-reduced-motion: reduce) {
  .course-card-minimal {
    transition: none;
  }

  .course-card-minimal:hover {
    transform: none;
  }
}

body.psc-student-page .open-course-btn,
body.psc-student-page .enroll-button,
body.psc-student-page .btn-primary {
  min-height: 38px;
  padding: 0.45rem 0.85rem;
  color: var(--student-navy) !important;
  background: var(--student-gold) !important;
  border-color: var(--student-gold) !important;
  border-radius: 999px !important;
  font-size: 0.75rem;
  font-weight: 800;
}

body.psc-student-page .open-course-btn:hover,
body.psc-student-page .enroll-button:hover,
body.psc-student-page .btn-primary:hover {
  color: var(--student-navy) !important;
  background: var(--student-gold-hover) !important;
  border-color: var(--student-gold-hover) !important;
}

/* Profile details */
.student-profile-detail-card {
  position: relative;
  padding: 17px;
}

.readonly-profile-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 12px 13px;
  color: var(--student-muted);
  background: #fffdf6;
  border: 1px solid var(--student-border);
  border-radius: 14px;
  font-size: 0.78rem;
  line-height: 1.55;
}

.readonly-profile-note i {
  flex: 0 0 auto;
  color: var(--student-navy);
  margin-top: 2px;
}

.locked-field {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--student-navy);
  background: #fffdf6;
  border: 1px solid var(--student-border);
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.form-label {
  color: var(--student-navy);
  font-size: 0.76rem;
  font-weight: 800;
}

/* Loading states */
.skeleton,
.course-skeleton-line,
.course-skeleton-chip,
.course-skeleton-button {
  background: linear-gradient(
    90deg,
    #eef1f4 25%,
    #fafafa 50%,
    #eef1f4 75%
  );
  background-size: 200% 100%;
  animation: studentSkeletonShimmer 1.3s linear infinite;
}

@keyframes studentSkeletonShimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.tab-loader {
  position: absolute;
  inset: 50% auto auto 50%;
  z-index: 10;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transform: translate(-50%, -50%);
  padding: 9px 13px;
  color: var(--student-muted);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--student-border);
  border-radius: 12px;
  font-size: 0.75rem;
}

body.dashboard-ready .tab-loader {
  display: none !important;
}

.my-courses-loading-note {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  padding: 0.75rem 0.85rem;
  color: var(--student-muted);
  background: #fffdf6;
  border: 1px solid var(--student-border);
  border-radius: 13px;
  font-size: 0.76rem;
  font-weight: 700;
}

.my-courses-loading-dot {
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  background: var(--student-gold);
  border-radius: 999px;
  animation: studentPulseDot 1.05s ease-in-out infinite;
}

@keyframes studentPulseDot {
  0%, 100% { transform: scale(0.78); opacity: 0.42; }
  50% { transform: scale(1); opacity: 1; }
}

.course-skeleton-card {
  min-height: 178px;
  padding: 1rem;
  overflow: hidden;
  background: white;
  border: 1px solid var(--student-border);
  border-radius: 17px;
}

.course-skeleton-line,
.course-skeleton-chip,
.course-skeleton-button {
  display: block;
  border-radius: 999px;
}

.course-skeleton-chip {
  width: 42%;
  height: 16px;
  margin: 0 auto 0.95rem;
}

.course-skeleton-line.title {
  width: 78%;
  height: 20px;
  margin: 0 auto 0.7rem;
}

.course-skeleton-line.meta {
  width: 58%;
  height: 12px;
  margin: 0 auto 0.5rem;
}

.course-skeleton-line.meta.short {
  width: 46%;
  margin-bottom: 0.85rem;
}

.course-skeleton-button {
  width: 108px;
  height: 32px;
  margin: 0.85rem auto 0;
}

/* Supplementary catalog harmonization */
.supplementary-table-card,
.supplementary-course-card,
.supplementary-catalog-card {
  border-color: var(--student-border) !important;
  border-radius: 17px !important;
}

.supplementary-status-badge {
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 800;
}

.supplementary-request-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
  gap: 0.5rem;
}

.supplementary-request-list label {
  padding: 0.65rem 0.75rem;
  background: white;
  border: 1px solid var(--student-border);
  border-radius: 12px;
  font-size: 0.8rem;
}

/* Existing modals retain their working structure */
.student-id-gate-card,
.modal-content {
  overflow: hidden;
  background: white !important;
  border: 1px solid var(--student-border) !important;
  border-radius: 20px !important;
}

.student-id-gate-header {
  padding: 22px;
  color: var(--student-navy) !important;
  background: white !important;
  border-bottom: 1px solid var(--student-border) !important;
}

.student-id-gate-header .gate-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  margin-bottom: 10px;
  color: var(--student-navy);
  background: var(--student-soft);
  border: 1px solid var(--student-border);
  border-radius: 14px;
}

.student-id-gate-card .modal-body {
  padding: 22px;
}

.form-control,
.form-select {
  min-height: 44px;
  color: var(--student-navy);
  background: white;
  border: 1px solid var(--student-border) !important;
  border-radius: 12px !important;
}

.form-control:focus,
.form-select:focus {
  border-color: var(--student-blue) !important;
  box-shadow: 0 0 0 0.18rem rgba(23, 78, 166, 0.14) !important;
}

/* Empty/error states produced by scripts */
.student-tab-panel .alert,
.student-learning-workspace .alert {
  border-radius: 14px !important;
  font-size: 0.8rem;
}

.student-tab-panel .text-muted {
  color: var(--student-muted) !important;
}

/* Accessible focus */
body.psc-student-page a:focus-visible,
body.psc-student-page button:focus-visible,
body.psc-student-page input:focus-visible,
body.psc-student-page select:focus-visible,
body.psc-student-page textarea:focus-visible,
body.psc-student-page [tabindex]:focus-visible {
  outline: 3px solid rgba(23, 78, 166, 0.24) !important;
  outline-offset: 2px;
}

/* Tablet */
@media (max-width: 1040px) {
  .student-welcome-panel {
    grid-template-columns: 1fr;
  }

  .student-feature-link {
    max-width: 430px;
  }

  .student-dashboard-grid {
    grid-template-columns: minmax(240px, 285px) minmax(0, 1fr);
  }
}

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

  .student-profile-column {
    position: static;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.72fr);
  }

  .student-help-card {
    height: 100%;
  }

  .student-tab-panel {
    min-height: 360px;
  }
}

/* Mobile: the four learner destinations become the bottom navigation */
@media (max-width: 640px) {
  body.psc-student-page {
    padding-bottom: 72px;
  }

  .student-navbar {
    position: static !important;
  }

  .student-navbar-inner {
    gap: 10px;
  }

  .student-brand-emblem {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  body.psc-student-page .student-brand-copy strong {
    font-size: 0.9rem;
  }

  body.psc-student-page .student-brand-copy small {
    font-size: 0.63rem;
  }

  body.psc-student-page .student-navbar .navbar-text {
    display: none;
  }

  .student-navbar-actions .btn span {
    display: none;
  }

  .student-navbar-actions .btn {
    width: 38px;
    padding: 0 !important;
    justify-content: center;
  }

  .student-dashboard-shell {
    padding: 12px 10px 34px;
  }

  .student-welcome-panel {
    padding: 17px;
    border-radius: 18px;
  }

  .student-welcome-panel h1 {
    font-size: 1.65rem !important;
  }

  .student-feature-link {
    grid-template-columns: 38px minmax(0, 1fr) auto;
  }

  .student-feature-icon {
    width: 38px;
    height: 38px;
  }

  .student-profile-column {
    grid-template-columns: 1fr;
  }

  .student-workspace-heading {
    padding: 14px 15px 10px;
  }

  .student-dashboard-tabs {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 1020;
    min-height: 58px;
    padding: 5px !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border: 1px solid var(--student-border) !important;
    border-radius: 18px !important;
  }

  body.psc-student-page .student-dashboard-tabs .nav-link {
    min-height: 48px;
    display: grid;
    place-items: center;
    align-content: center;
    gap: 2px;
    padding: 5px 4px;
    font-size: 0.65rem;
    line-height: 1.15;
  }

  body.psc-student-page .student-dashboard-tabs .nav-link i {
    font-size: 1rem;
  }

  body.psc-student-page .student-dashboard-tabs .nav-link.active {
    background: var(--student-soft) !important;
    box-shadow: none !important;
  }

  .student-tab-panel {
    padding: 15px;
  }

  .student-tutorial-summary-head {
    flex-direction: column;
    padding: 18px;
  }

  .student-tutorial-metrics {
    grid-template-columns: 1fr;
    padding: 15px 18px;
  }

  .student-tutorial-actions {
    padding: 0 18px 18px;
  }

  .student-course-type-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  body.psc-student-page .student-course-type-tabs .nav-link {
    width: 100%;
    justify-content: center;
    white-space: normal;
    line-height: 1.25;
  }
}

@media (max-width: 400px) {
  .student-brand-copy small {
    max-width: 145px;
    white-space: normal !important;
  }

  .student-course-type-tabs {
    grid-template-columns: 1fr;
  }
}

@media print {
  .student-navbar,
  .student-skip-link,
  .student-feature-link,
  .student-dashboard-tabs,
  .student-course-type-tabs,
  .btn {
    display: none !important;
  }

  body.psc-student-page {
    padding: 0;
    background: white !important;
  }

  .student-dashboard-shell {
    width: 100%;
    max-width: none;
    padding: 0;
  }

  .student-dashboard-grid {
    display: block;
  }

  .student-profile-column,
  .student-learning-workspace {
    margin-bottom: 16px;
  }

  .tab-pane {
    display: block !important;
    opacity: 1 !important;
  }
}
/* =========================================================
   Student Dashboard v1.1 — Quick learning tools
   ========================================================= */

.student-feature-links {
  min-width: 0;
  display: grid;
  gap: 9px;
}

.student-library-feature-link {
  background: #fffdf6;
  border-color: var(--student-border-strong);
}

.student-library-feature-link:hover {
  background: var(--student-soft);
  border-color: var(--student-gold);
}

@media (max-width: 1040px) {
  .student-feature-links {
    width: min(100%, 430px);
  }
}

@media (max-width: 640px) {
  .student-feature-links {
    width: 100%;
  }
}
/* =========================================================
   Student Dashboard v1.2 — Assessment quick tool
   ========================================================= */

.student-assessment-feature-link {
  background: #fffdf6;
  border-color: var(--student-border-strong);
}

.student-assessment-feature-link:hover {
  background: var(--student-soft);
  border-color: var(--student-gold);
}

.student-assessment-feature-link .student-feature-icon {
  color: var(--student-navy);
  background: var(--student-soft);
  border-color: var(--student-border);
}
