﻿/* 1. Variables */
:root {
  --student-navy: #10213f;
  --student-navy-soft: #1d3557;
  --student-green: #079455;
  --student-green-dark: #067647;
  --student-green-soft: #e9f8f1;
  --student-bg: #f3f7fb;
  --student-card: #ffffff;
  --student-border: #dfe7ef;
  --student-muted: #667085;
  --student-danger: #d92d20;
  --student-warning: #b54708;
  --student-info: #2563a9;
  --student-radius-lg: 20px;
  --student-radius-md: 14px;
  --student-radius-sm: 11px;
  --student-shadow: 0 10px 30px rgba(16, 33, 63, 0.07);
  --student-shadow-hover: 0 16px 38px rgba(16, 33, 63, 0.11);
  --student-shadow-float: 0 20px 48px rgba(16, 33, 63, 0.16);
  --student-container: 1500px;
}

/* 2. Reset / Base */
html {
  background: var(--student-bg);
  scroll-behavior: smooth;
}

body.student-dashboard-page {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--student-bg);
  color: var(--student-navy);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.55;
}

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

.student-dashboard-page button,
.student-dashboard-page input,
.student-dashboard-page select,
.student-dashboard-page textarea {
  font: inherit;
}

.student-dashboard-page button,
.student-dashboard-page a {
  -webkit-tap-highlight-color: transparent;
}

.student-dashboard-page a {
  color: inherit;
  text-decoration: none;
}

.student-dashboard-page img {
  display: block;
  max-width: 100%;
}

.student-dashboard-page [hidden] {
  display: none !important;
}

.student-dashboard-page :focus-visible {
  outline: 3px solid rgba(7, 148, 85, 0.28);
  outline-offset: 3px;
}

.student-dashboard-page svg {
  width: auto;
  height: auto;
  max-width: 24px;
  max-height: 24px;
  flex: 0 0 auto;
}

.student-dashboard-page .empty-state svg {
  width: 28px;
  height: 28px;
  max-width: 28px;
  max-height: 28px;
}

.student-dashboard-page h1,
.student-dashboard-page h2,
.student-dashboard-page h3,
.student-dashboard-page h4,
.student-dashboard-page p,
.student-dashboard-page dl,
.student-dashboard-page dd {
  margin: 0;
}

.student-dashboard-page h1,
.student-dashboard-page h2,
.student-dashboard-page h3,
.student-dashboard-page h4 {
  color: var(--student-navy);
  letter-spacing: -0.025em;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* 3. Navbar */
.student-dashboard-shell {
  width: 100%;
  min-height: 100vh;
}

.student-navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  width: 100%;
  border-bottom: 1px solid var(--student-border);
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 18px rgba(16, 33, 63, 0.06);
  backdrop-filter: blur(12px);
}

.student-navbar__inner {
  position: relative;
  width: 100%;
  max-width: var(--student-container);
  min-height: 76px;
  margin: 0 auto;
  padding: 0 28px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
}

.student-navbar__brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.student-navbar__logo {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  padding: 5px;
  border: 1px solid #e6edf3;
  border-radius: 12px;
  background: #fff;
}

.student-navbar__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

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

.student-navbar__brand-copy strong {
  overflow: hidden;
  color: var(--student-navy);
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-navbar__brand-copy small {
  color: var(--student-green-dark);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.student-navbar__brand-short {
  display: none;
}

.student-navbar__nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 4px;
}

.student-navbar__link,
.student-navbar__dropdown-link,
.student-mobile-menu__link {
  border: 1px solid transparent;
  background: transparent;
  color: #475467;
  font-weight: 700;
  cursor: pointer;
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.student-navbar__link {
  min-height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  font-size: 13px;
  white-space: nowrap;
}

.student-navbar__link:hover,
.student-navbar__link:focus-visible {
  color: var(--student-navy);
  background: #f4f7fa;
}

.student-navbar__link.is-active,
.student-navbar__link[aria-current="true"] {
  border-color: #ccebdd;
  background: var(--student-green-soft);
  color: var(--student-navy);
}

.student-navbar__actions {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
}

.student-navbar__toggle {
  display: none;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--student-border);
  border-radius: 11px;
  background: #fff;
  color: var(--student-navy);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.student-navbar__toggle-lines {
  display: grid;
  gap: 4px;
}

.student-navbar__toggle-lines span {
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.student-profile-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  max-width: 220px;
  padding: 5px 10px 5px 6px;
  border: 1px solid var(--student-border);
  border-radius: 13px;
  background: #fff;
  color: var(--student-navy);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.student-profile-button:hover,
.student-profile-button[aria-expanded="true"] {
  border-color: #b9dfce;
  background: #f9fcfa;
  box-shadow: 0 8px 20px rgba(16, 33, 63, 0.07);
}

.student-profile-button__avatar,
.student-navbar__dropdown-avatar,
.student-mobile-menu__avatar,
.home-welcome-card__avatar {
  width: 42px;
  height: 42px;
  max-width: 42px;
  max-height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 42px;
  border: 1px solid #ccebdd;
  border-radius: 50%;
  background: var(--student-green-soft);
  color: var(--student-green-dark);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.student-profile-button__avatar {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
}

.student-profile-button__copy {
  display: grid;
  min-width: 0;
  text-align: left;
  line-height: 1.2;
}

.student-profile-button__copy strong,
.student-profile-button__copy small {
  max-width: 135px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-profile-button__copy strong {
  font-size: 13px;
  font-weight: 800;
}

.student-profile-button__copy small {
  color: var(--student-muted);
  font-size: 11px;
  font-weight: 650;
}

.student-profile-button__chevron {
  display: inline-grid;
  place-items: center;
  color: #7b8796;
  line-height: 1;
  transition: transform 180ms ease;
}

.student-profile-button__chevron svg {
  display: block;
  width: 18px;
  height: 18px;
}

.student-profile-button[aria-expanded="true"] .student-profile-button__chevron {
  transform: rotate(180deg);
}

.student-navbar__dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 120;
  width: min(280px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid var(--student-border);
  border-radius: 16px;
  background: #fff;
  box-shadow: var(--student-shadow-float);
}

.student-navbar__dropdown-summary,
.student-mobile-menu__summary {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
}

.student-navbar__dropdown-summary {
  padding: 16px;
  border-bottom: 1px solid var(--student-border);
  background: #f8fcfa;
}

.student-navbar__dropdown-summary > div,
.student-mobile-menu__summary > div {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.student-navbar__dropdown-summary strong,
.student-mobile-menu__summary strong {
  overflow: hidden;
  color: var(--student-navy);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-navbar__dropdown-summary span:not(.student-navbar__dropdown-avatar),
.student-mobile-menu__summary span:not(.student-mobile-menu__avatar) {
  overflow-wrap: anywhere;
  color: var(--student-muted);
  font-size: 12px;
}

.student-navbar__dropdown-summary small,
.student-mobile-menu__summary small {
  color: var(--student-green-dark);
  font-size: 11px;
  font-weight: 750;
}

.student-navbar__dropdown-actions {
  display: grid;
  gap: 4px;
  padding: 8px;
}

.student-navbar__dropdown-link,
.student-mobile-menu__link {
  min-height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  text-align: left;
}

.student-navbar__dropdown-link:hover,
.student-mobile-menu__link:hover,
.student-navbar__dropdown-link:focus-visible,
.student-mobile-menu__link:focus-visible {
  border-color: #e0e8ef;
  background: #f5f8fb;
  color: var(--student-navy);
}

.student-navbar__dropdown-link--danger,
.student-mobile-menu__link--danger {
  color: var(--student-danger);
}

.student-mobile-menu {
  display: none;
}

.overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(16, 33, 63, 0.3);
  backdrop-filter: blur(2px);
}

/* 4. Main Layout */
.student-main {
  width: min(var(--student-container), calc(100% - 48px));
  margin: 0 auto;
  padding: 30px 0 52px;
}

.section-stack,
.page-section,
.home-dashboard {
  min-width: 0;
}

.section-stack {
  display: grid;
}

section[data-section] {
  display: none;
  scroll-margin-top: 96px;
}

section[data-section].is-active {
  display: block;
}

.page-section {
  animation: student-section-in 220ms ease both;
}

@keyframes student-section-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header,
.section-heading,
.home-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-header {
  margin-bottom: 22px;
}

.page-header > div:first-child,
.section-heading > div,
.home-card__header > div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.page-header h1 {
  font-size: clamp(30px, 3vw, 36px);
  line-height: 1.14;
}

.page-header p {
  max-width: 700px;
  color: var(--student-muted);
  font-size: 15px;
}

.section-heading h2,
.home-card__header h2 {
  font-size: 21px;
  line-height: 1.2;
}

.section-kicker {
  color: var(--student-green-dark);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

/* 5. Cards / Controls */
.student-card {
  min-width: 0;
  border: 1px solid var(--student-border);
  border-radius: var(--student-radius-lg);
  background: var(--student-card);
  box-shadow: var(--student-shadow);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.student-card:not(.student-card--static):hover {
  border-color: #cfdae4;
  transform: translateY(-2px);
  box-shadow: var(--student-shadow-hover);
}

.student-button {
  min-height: 40px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: var(--student-radius-sm);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.2;
  cursor: pointer;
  transition: transform 160ms ease, color 160ms ease, background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.student-dashboard-page .student-button:hover {
  transform: translateY(-1px);
}

.student-button--primary {
  border-color: var(--student-green);
  background: var(--student-green);
  color: #fff;
  box-shadow: 0 7px 16px rgba(7, 148, 85, 0.17);
}

.student-button--primary:hover {
  border-color: var(--student-green-dark);
  background: var(--student-green-dark);
}

.student-button--secondary {
  border-color: var(--student-border);
  background: #fff;
  color: var(--student-navy);
}

.student-button--secondary:hover {
  border-color: #b9dfce;
  background: var(--student-green-soft);
}

.student-button--ghost {
  border-color: transparent;
  background: transparent;
  color: var(--student-navy-soft);
}

.student-button--ghost:hover {
  background: #f2f5f8;
}

.student-button--danger {
  border-color: #fecdca;
  background: #fff1f0;
  color: var(--student-danger);
}

.student-button:active {
  transform: translateY(0);
}

.student-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.input,
.select {
  width: 100%;
  min-height: 44px;
  padding: 0 12px;
  border: 1px solid #ccd7e2;
  border-radius: var(--student-radius-sm);
  outline: none;
  background: #fff;
  color: var(--student-navy);
  font-size: 14px;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.input::placeholder {
  color: #98a2b3;
}

.input:focus,
.select:focus {
  border-color: var(--student-green);
  box-shadow: 0 0 0 4px rgba(7, 148, 85, 0.1);
}

.section-chip,
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.2;
}

.section-chip {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #dce5ed;
  background: #f7f9fb;
  color: #526172;
  font-size: 11px;
}

.section-chip--green,
.section-chip--success {
  border-color: #ccebdd;
  background: var(--student-green-soft);
  color: var(--student-green-dark);
}

.status-badge {
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid #d9e3ec;
  background: #f4f7fa;
  color: #526172;
  font-size: 10px;
  letter-spacing: 0.025em;
}

.status-badge--active {
  border-color: #b7e7d1;
  background: var(--student-green-soft);
  color: var(--student-green-dark);
}

.status-badge--info {
  border-color: #c9ddf3;
  background: #eef6ff;
  color: var(--student-info);
}

.status-badge--warning {
  border-color: #fedf89;
  background: #fffaeb;
  color: var(--student-warning);
}

.status-badge--danger {
  border-color: #fecdca;
  background: #fff1f0;
  color: var(--student-danger);
}

.status-badge--draft {
  border-color: #e0e6ec;
  background: #f4f6f8;
  color: #667085;
}

.student-icon-box,
.content-row__icon {
  width: 40px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 40px;
  border-radius: 12px;
  background: var(--student-green-soft);
  color: var(--student-green-dark);
}

.student-icon-box svg,
.content-row__icon svg {
  width: 20px;
  height: 20px;
  max-width: 20px;
  max-height: 20px;
}

.student-icon-box--blue,
.content-row__icon--bell,
.content-row__icon--download {
  background: #eef6ff;
  color: var(--student-info);
}

.student-icon-box--amber,
.content-row__icon--calendar {
  background: #fffaeb;
  color: var(--student-warning);
}

.student-icon-box--navy,
.content-row__icon--graduation {
  background: #eef1f6;
  color: var(--student-navy-soft);
}

/* Shared dynamic rows */
.content-row {
  min-width: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  border: 1px solid #e4ebf1;
  border-radius: 15px;
  background: #fbfcfe;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.content-row:hover {
  border-color: #d3dee7;
  background: #fff;
  box-shadow: 0 8px 20px rgba(16, 33, 63, 0.06);
}

.content-row__top,
.content-row__body {
  min-width: 0;
}

.content-row__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.content-row__body {
  display: grid;
  gap: 5px;
  flex: 1 1 auto;
}

.content-row__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 1px;
}

.content-row__title {
  overflow-wrap: anywhere;
  font-size: 15px;
  line-height: 1.35;
}

.content-row__meta,
.content-row__description {
  overflow-wrap: anywhere;
  color: var(--student-muted);
  font-size: 13px;
  line-height: 1.55;
}

.content-row__description {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.content-row__actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.content-row__media {
  grid-column: 1 / -1;
  width: 100%;
  max-height: 210px;
  object-fit: cover;
  border: 1px solid var(--student-border);
  border-radius: 12px;
}

.empty-state,
.loading-state {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 132px;
  padding: 24px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  border: 1px dashed #cfd9e3;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--student-muted);
  text-align: center;
}

.empty-state__icon {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef3f7;
  color: var(--student-navy-soft);
}

.empty-state__copy {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.empty-state__copy strong {
  color: var(--student-navy);
  font-size: 14px;
}

.empty-state__copy span {
  max-width: 460px;
  font-size: 13px;
}

.loading-state::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #d7e2eb;
  border-top-color: var(--student-green);
  border-radius: 50%;
  animation: student-spin 700ms linear infinite;
}

@keyframes student-spin { to { transform: rotate(360deg); } }

/* 6. Home */
.home-dashboard {
  display: grid;
  gap: 24px;
}

.home-welcome-card {
  padding: 28px 30px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  border-color: #cfe9dc;
  background: linear-gradient(110deg, #f0faf5 0%, #ffffff 72%);
}

.home-welcome-card__copy {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.home-welcome-card__copy h1 {
  overflow-wrap: anywhere;
  font-size: clamp(28px, 3vw, 36px);
  line-height: 1.12;
}

.home-welcome-card__copy p {
  max-width: 760px;
  color: var(--student-muted);
  font-size: 15px;
}

.home-badge-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 3px;
}

.home-welcome-card__profile {
  min-width: 160px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid #d8eee3;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.82);
}

.home-welcome-card__profile > span:last-child {
  display: grid;
  line-height: 1.25;
}

.home-welcome-card__profile strong {
  font-size: 13px;
}

.home-welcome-card__profile small {
  color: var(--student-muted);
  font-size: 11px;
}

.home-overview {
  display: grid;
  gap: 12px;
}

.home-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.home-overview-card {
  padding: 17px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto auto;
  align-items: center;
  gap: 2px 12px;
}

.home-overview-card .student-icon-box {
  grid-row: 1 / 4;
}

.metric-card__label {
  color: var(--student-muted);
  font-size: 12px;
  font-weight: 750;
}

.home-overview-card > strong {
  color: var(--student-navy);
  font-size: 28px;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

.home-overview-card > small {
  color: #7a8796;
  font-size: 11px;
  line-height: 1.35;
}

.home-main-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(320px, 0.8fr);
  align-items: start;
  gap: 20px;
}

.home-main-grid__primary,
.home-main-grid__aside {
  display: grid;
  min-width: 0;
  align-content: start;
  gap: 20px;
}

.home-card {
  padding: 21px;
  display: grid;
  gap: 15px;
}

.home-card__header {
  align-items: center;
}

.home-card__action {
  justify-self: start;
}

.home-list {
  display: grid;
  gap: 9px;
}

.home-main-grid__aside .content-row__top {
  display: grid;
}

.home-main-grid__aside .content-row__actions {
  justify-content: flex-start;
}

.home-profile-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.home-profile-field,
.profile-field {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  gap: 3px;
  border: 1px solid #e3eaf0;
  border-radius: 12px;
  background: #f8fafc;
}

.home-profile-field span,
.profile-field span {
  color: var(--student-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-profile-field strong,
.profile-field strong {
  overflow-wrap: anywhere;
  color: var(--student-navy);
  font-size: 13px;
  line-height: 1.4;
}

/* 7. Notes */
.filter-panel {
  padding: 18px;
  margin-bottom: 20px;
}

.notes-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.6fr) repeat(5, minmax(128px, 1fr));
  align-items: end;
  gap: 12px;
}

.filter-field {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 6px;
}

.filter-field > span:not(.sr-only) {
  color: #475467;
  font-size: 11px;
  font-weight: 800;
}

.notes-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.notes-grid .content-row,
.note-card {
  min-height: 100%;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--student-shadow);
}

.notes-grid .content-row:hover,
.note-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--student-shadow-hover);
}

.notes-grid .content-row__top,
.note-card .content-row__top {
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.notes-grid .content-row__actions,
.note-card .content-row__actions {
  width: 100%;
  margin-top: 12px;
  justify-content: flex-start;
}

/* 8. Downloads */
.page-header--with-actions {
  align-items: flex-end;
}

.page-toolbar {
  min-width: min(100%, 430px);
  padding: 10px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, auto);
  gap: 9px;
}

.downloads-list,
.notices-list {
  display: grid;
  gap: 11px;
}

.download-card {
  background: #fff;
}

/* 9. Updates */
.updates-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 16px;
}

.updates-grid .content-row,
.update-card {
  min-height: 100%;
  padding: 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--student-shadow);
}

.updates-grid .content-row__top,
.update-card .content-row__top {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.updates-grid .content-row__actions,
.update-card .content-row__actions {
  margin-top: auto;
  padding-top: 12px;
  justify-content: flex-start;
}

.update-card--important {
  border-top: 3px solid #f79009;
}

.update-card--urgent {
  border-top: 3px solid var(--student-danger);
}

/* 10. Timetable */
.timetable-switcher {
  padding: 4px;
  display: inline-flex;
  gap: 4px;
  border: 1px solid var(--student-border);
  border-radius: 13px;
  background: #fff;
}

.timetable-switcher .student-button {
  min-width: 86px;
  border-color: transparent;
}

.timetable-switcher .student-button.is-active {
  background: var(--student-green);
  color: #fff;
  box-shadow: 0 5px 12px rgba(7, 148, 85, 0.16);
}

.timetable-list {
  min-width: 0;
}

.timetable-list--today {
  position: relative;
  display: grid;
  gap: 11px;
  padding-left: 23px;
}

.timetable-list--today::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 7px;
  width: 2px;
  border-radius: 99px;
  background: #dce6ee;
}

.timetable-list--today > .timetable-card {
  position: relative;
  background: #fff;
}

.timetable-list--today > .timetable-card::before {
  content: "";
  position: absolute;
  top: 23px;
  left: -22px;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--student-green);
  box-shadow: 0 0 0 2px #b9dfce;
}

.timetable-list--weekly {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
}

.timetable-day-group {
  min-width: 0;
  padding: 16px;
  display: grid;
  gap: 10px;
  border: 1px solid var(--student-border);
  border-radius: 18px;
  background: #fff;
  box-shadow: var(--student-shadow);
}

.timetable-day-group__head {
  padding-bottom: 10px;
  border-bottom: 1px solid #e6edf3;
  color: var(--student-navy);
  font-size: 15px;
  font-weight: 850;
}

.timetable-day-group .content-row {
  grid-template-columns: 1fr;
  padding: 12px;
  box-shadow: none;
}

.timetable-day-group .content-row__icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
}

.timetable-day-group .content-row__top,
.timetable-day-group .content-row__actions {
  display: grid;
  justify-content: stretch;
}

/* 11. Results */
.results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.result-card {
  padding: 18px;
  background: #fff;
  box-shadow: var(--student-shadow);
}

/* 12. Profile / Dropdown */
.student-profile-grid {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 1fr);
  align-items: start;
  gap: 20px;
}

.profile-card {
  padding: 20px;
}

.profile-card--photo {
  display: grid;
  gap: 16px;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border: 1px solid var(--student-border);
  border-radius: 16px;
  background: #f0f6f3;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-card__identity {
  display: grid;
  gap: 3px;
  text-align: center;
}

.profile-card__identity strong {
  color: var(--student-navy);
  font-size: 17px;
}

.profile-card__identity span {
  overflow-wrap: anywhere;
  color: var(--student-muted);
  font-size: 13px;
}

.profile-card__identity small {
  color: var(--student-green-dark);
  font-weight: 750;
}

.profile-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 11px;
}

.compact-coming-soon {
  max-width: 760px;
  padding: 30px;
  display: grid;
  gap: 10px;
}

.compact-coming-soon h1 {
  font-size: 27px;
}

.compact-coming-soon p {
  max-width: 640px;
  color: var(--student-muted);
}

.compact-coming-soon .student-button {
  justify-self: start;
  margin-top: 4px;
}

/* 13. Modal / Toast */
body.student-dashboard-page.is-pdf-preview-open,
body.student-dashboard-page.is-modal-open {
  overflow: hidden;
}

.preview-modal {
  width: min(980px, calc(100% - 32px));
  max-width: 980px;
  max-height: 90vh;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 20px;
  background: transparent;
  box-shadow: 0 28px 80px rgba(16, 33, 63, 0.3);
}

.preview-modal::backdrop {
  background: rgba(16, 33, 63, 0.72);
  backdrop-filter: blur(3px);
}

.preview-modal__backdrop {
  position: fixed;
  inset: 0;
}

.preview-modal__panel {
  position: relative;
  z-index: 1;
  height: min(820px, 90vh);
  max-height: 90vh;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  overflow: hidden;
  border-radius: 20px;
  background: #fff;
}

.preview-modal__head,
.preview-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #fff;
}

.preview-modal__head {
  border-bottom: 1px solid var(--student-border);
}

.preview-modal__head > div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.preview-modal__head h2 {
  overflow: hidden;
  font-size: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-modal__head p {
  overflow: hidden;
  color: var(--student-muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.preview-modal__x {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--student-border);
  border-radius: 999px;
  background: #fff;
  color: var(--student-navy);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(16, 33, 63, 0.1);
}

.preview-modal__x:hover,
.preview-modal__x:focus-visible {
  border-color: var(--student-green);
  color: var(--student-green);
  outline: none;
}

.preview-modal__body {
  position: relative;
  min-height: 0;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
  background: #edf2f7;
}

.preview-modal__loading,
.preview-modal__error {
  position: absolute;
  inset: 0;
  z-index: 2;
  padding: 24px;
  display: grid;
  place-items: center;
  background: rgba(248, 250, 252, 0.94);
  color: var(--student-navy);
  text-align: center;
  font-weight: 700;
}

.preview-modal__error {
  color: var(--student-danger);
}

.preview-modal__object,
.preview-modal__iframe {
  width: 100%;
  height: 100%;
  min-height: 100%;
  border: 0;
  background: #fff;
}

.preview-modal__footer {
  position: sticky;
  bottom: 0;
  z-index: 3;
  flex-wrap: wrap;
  justify-content: flex-end;
  border-top: 1px solid var(--student-border);
  box-shadow: 0 -10px 24px rgba(16, 33, 63, 0.08);
}
.announcement-detail-modal {
  height: auto;
  max-height: calc(100dvh - 32px);
}

.announcement-detail-modal__body {
  background: #fff;
}

.announcement-detail-modal__content {
  padding: 22px;
  display: grid;
  gap: 15px;
}

.announcement-detail-modal__badges {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.announcement-detail-modal__description {
  overflow-wrap: anywhere;
  color: #344054;
  line-height: 1.7;
  white-space: pre-line;
}

.announcement-detail-modal__image {
  width: 100%;
  max-height: 360px;
  object-fit: cover;
  border: 1px solid var(--student-border);
  border-radius: 14px;
}

.announcement-detail-modal__attachment {
  width: fit-content;
}

.toast {
  position: fixed;
  top: 92px;
  right: 20px;
  z-index: 160;
  width: min(360px, calc(100vw - 24px));
  padding: 13px 15px;
  border: 1px solid var(--student-border);
  border-left: 4px solid var(--student-green);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--student-shadow-float);
  color: var(--student-navy);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-8px);
  transition: opacity 180ms ease, transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast.is-error {
  border-left-color: var(--student-danger);
}

.toast.is-success {
  border-left-color: var(--student-green);
}

/* 14. Responsive */
@media (max-width: 1280px) {
  .student-navbar__inner { gap: 14px; padding-inline: 22px; }
  .student-navbar__link { padding-inline: 8px; font-size: 12px; }
  .student-profile-button__copy strong,
  .student-profile-button__copy small { max-width: 105px; }
  .notes-toolbar { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .filter-field--search { grid-column: span 2; }
  .notes-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .profile-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .home-overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .home-main-grid { grid-template-columns: 1fr; }
  .home-main-grid__aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .timetable-list--weekly { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .student-navbar__inner {
    min-height: 72px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding-inline: 20px;
  }

  .student-navbar__nav { display: none; }
  .student-navbar__toggle { display: inline-flex; }

  .student-mobile-menu {
    position: absolute;
    top: 100%;
    left: 0;
    z-index: 115;
    display: block;
    width: 100%;
    max-height: calc(100dvh - 72px);
    overflow-y: auto;
    border-top: 1px solid var(--student-border);
    border-bottom: 1px solid var(--student-border);
    background: #fff;
    box-shadow: 0 18px 36px rgba(16, 33, 63, 0.13);
  }

  .student-mobile-menu__inner {
    width: min(620px, 100%);
    margin: 0 auto;
    padding: 14px 20px 18px;
  }

  .student-mobile-menu__summary {
    padding: 4px 4px 13px;
    border-bottom: 1px solid var(--student-border);
  }

  .student-mobile-menu__nav {
    padding-top: 9px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .student-mobile-menu__link.is-active {
    border-color: #ccebdd;
    background: var(--student-green-soft);
    color: var(--student-navy);
  }

  .student-main {
    width: min(var(--student-container), calc(100% - 40px));
    padding: 22px 0 42px;
  }

  section[data-section] { scroll-margin-top: 88px; }
  .student-profile-grid { grid-template-columns: minmax(220px, 280px) minmax(0, 1fr); }
  .updates-grid,
  .results-grid { grid-template-columns: 1fr; }
  .page-header--with-actions { align-items: flex-start; }
}

@media (max-width: 768px) {
  .home-welcome-card { padding: 23px; }
  .home-main-grid__aside { grid-template-columns: 1fr; }
  .student-profile-grid { grid-template-columns: 1fr; }
  .profile-card--photo { grid-template-columns: minmax(150px, 240px) minmax(0, 1fr); align-items: center; }
  .profile-photo { aspect-ratio: 1 / 1; }
  .profile-card__identity { text-align: left; }
  .notes-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filter-field--search { grid-column: 1 / -1; }
  .notes-grid { grid-template-columns: 1fr; }
  .timetable-list--weekly { grid-template-columns: 1fr; }
  .content-row__top { display: grid; }
  .content-row__actions { justify-content: flex-start; }
}

@media (max-width: 640px) {
  .student-navbar__inner { padding-inline: 14px; gap: 10px; }
  .student-navbar__logo { width: 40px; height: 40px; flex-basis: 40px; }
  .student-profile-button { padding: 4px; min-height: 44px; }
  .student-profile-button__copy,
  .student-profile-button__chevron { display: none; }
  .student-navbar__dropdown { right: 0; }

  .student-main {
    width: calc(100% - 24px);
    padding: 16px 0 34px;
  }

  .page-header,
  .page-header--with-actions,
  .section-heading,
  .home-card__header { display: grid; }

  .page-header h1 { font-size: 26px; }
  .section-heading h2,
  .home-card__header h2 { font-size: 19px; }
  .home-dashboard { gap: 18px; }
  .home-welcome-card { grid-template-columns: 1fr; gap: 16px; padding: 20px; }
  .home-welcome-card__profile { min-width: 0; width: fit-content; }
  .home-overview-grid { grid-template-columns: 1fr; gap: 10px; }
  .home-card { padding: 17px; }
  .home-card__header .student-button { justify-self: start; }
  .home-profile-grid { grid-template-columns: 1fr; }
  .notes-toolbar { grid-template-columns: 1fr; }
  .filter-field--search { grid-column: auto; }
  .filter-panel { padding: 14px; }
  .page-toolbar { width: 100%; min-width: 0; grid-template-columns: 1fr; }
  .timetable-switcher { width: 100%; }
  .timetable-switcher .student-button { flex: 1 1 0; }
  .profile-card--photo { grid-template-columns: 1fr; }
  .profile-photo { max-width: 240px; margin: 0 auto; }
  .profile-card__identity { text-align: center; }
  .profile-fields { grid-template-columns: 1fr; }
  .compact-coming-soon { padding: 22px; }
  .compact-coming-soon h1 { font-size: 24px; }

  .preview-modal {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px);
    max-height: 90vh;
    border-radius: 15px;
  }

  .preview-modal__panel {
    height: 90vh;
    max-height: 90vh;
    border-radius: 15px;
  }

  .preview-modal__head,
  .preview-modal__footer { padding: 13px; }

  .preview-modal__footer .student-button { flex: 1 1 calc(50% - 6px); }

  .announcement-detail-modal__content { padding: 16px; }
  .toast { top: 82px; right: 12px; }
}

@media (max-width: 430px) {
  .student-navbar__brand-copy strong { font-size: 13px; }
  .student-navbar__brand-copy small { font-size: 9px; }
  .student-navbar__toggle { padding-inline: 10px; }
  .student-mobile-menu__inner { padding-inline: 12px; }
  .student-mobile-menu__nav { grid-template-columns: 1fr; }
  .home-welcome-card__copy h1 { font-size: 26px; }
  .home-overview-card { padding: 15px; }
  .content-row { grid-template-columns: 1fr; }
  .content-row__icon { width: 36px; height: 36px; flex-basis: 36px; }
  .content-row__actions { width: 100%; }
  .content-row__actions .student-button { flex: 1 1 calc(50% - 5px); }
  .timetable-list--today { padding-left: 20px; }
  .timetable-list--today > .timetable-card::before { left: -20px; }
}

@media (max-width: 380px) {
  .student-navbar__brand-full { display: none; }
  .student-navbar__brand-short { display: inline; }
  .student-navbar__toggle-label { font-size: 12px; }
  .student-navbar__actions { gap: 6px; }
  .preview-modal__footer .student-button { flex-basis: 100%; }
}

/* 15. Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .student-dashboard-page *,
  .student-dashboard-page *::before,
  .student-dashboard-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}




.announcement-detail-modal__meta,
.result-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin: 0;
}

.announcement-detail-modal__meta div,
.result-detail-grid div,
.result-summary-card {
  padding: 12px 14px;
  border: 1px solid var(--student-border);
  border-radius: 14px;
  background: #f8fbff;
}

.announcement-detail-modal__meta dt,
.result-detail-grid dt,
.result-summary-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--student-muted);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.announcement-detail-modal__meta dd,
.result-detail-grid dd {
  margin: 0;
  color: var(--student-navy);
  font-weight: 800;
}

.results-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.result-summary-card strong {
  display: block;
  color: var(--student-navy);
  font-size: 1.35rem;
}

/* Student timetable weekly/specific-date upgrade */
.student-dashboard .timetable-list--weekly {
  grid-template-columns: repeat(7, minmax(210px, 1fr));
  overflow-x: auto;
  align-items: start;
}
.student-dashboard .timetable-list--all {
  display: grid;
  gap: 14px;
}
.student-dashboard .timetable-today-heading {
  font-weight: 800;
  color: #0f2a44;
  margin-bottom: 4px;
}
.student-dashboard .timetable-day-group {
  min-width: 210px;
}
.student-dashboard .timetable-card {
  cursor: pointer;
}
.student-dashboard .timetable-card:focus-visible {
  outline: 3px solid rgba(31, 157, 85, .28);
  outline-offset: 3px;
}
@media (max-width: 1024px) {
  .student-dashboard .timetable-list--weekly {
    grid-template-columns: repeat(3, minmax(210px, 1fr));
  }
}
@media (max-width: 720px) {
  .student-dashboard .timetable-switcher {
    flex-wrap: wrap;
  }
  .student-dashboard .timetable-list--weekly {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }
}
