/* ========= Grand Institute — student portal (mockup-aligned) ========= */

:root {
  --primary: #c02c2b;
  --primary-600: #c02c2b;
  --primary-700: #a82423;
  --accent: #c02c2b;
  --accent-600: #c02c2b;
  --accent-700: #a82423;
  --danger-accent: #d9333f;
  --gold: #d9333f;
  --gold-600: #c02e38;
  --bg: #f4f5f7;
  --card: #ffffff;
  --ink: #1a1a1a;
  --muted: #6c757d;
  --ring: rgba(192, 44, 43, 0.35);
  --grad: linear-gradient(135deg, var(--primary), #6b2030 60%, var(--gold) 130%);
  --grad-accent: linear-gradient(135deg, var(--primary), var(--accent));
  --grad-brand: linear-gradient(135deg, var(--accent), #e0455c);
  --login-brand-overlay: linear-gradient(to top, rgba(74, 21, 32, 0.9), rgba(74, 21, 32, 0));
  --login-btn-shadow: rgba(196, 30, 58, 0.28);
  --stu-sidebar-active: rgba(0, 0, 0, 0.18);
}

.dashboard--student .dash-sidebar {
  padding: 18px 14px;
}

.dashboard--student .dash-nav--student a.active {
  background: var(--stu-sidebar-active);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.dash-nav__messages {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dash-nav__badge {
  margin-inline-start: auto;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: #fff;
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-icon--available { color: #5cb87a; }
.nav-icon--reserved { color: #f0b35a; }
.nav-icon--completed { color: #b48adf; }
.nav-icon--messages { color: #fff; }
.nav-icon--profile { color: #fff; }
.nav-icon--settings { color: #fff; }

.dash-topbar--student {
  padding: 14px 24px;
  gap: 14px;
}

.dash-topbar--student .dash-topbar__welcome {
  color: var(--primary);
  font-size: 1.05rem;
}

.dash-topbar--student .dash-topbar__search {
  position: relative;
  max-width: 420px;
  flex: 1;
}

.dash-topbar__search-icon {
  position: absolute;
  inset-inline-start: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.dash-topbar--student .dash-topbar__search .form-control {
  padding-inline-start: 38px;
  border-radius: 999px;
  background: #f8f9fb;
  border-color: transparent;
}

.dash-topbar__notify {
  position: relative;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, white);
  text-decoration: none;
}

.dash-topbar__notify-badge {
  position: absolute;
  top: -2px;
  inset-inline-end: -2px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.dash-topbar--student .dash-topbar__avatar {
  background: color-mix(in srgb, var(--primary) 12%, white);
  color: var(--primary);
}

.dash-topbar--student .dash-topbar__user-text strong {
  color: var(--primary);
}

.dash-footer {
  text-align: center;
  padding: 18px 24px 28px;
  color: var(--muted);
  font-size: 0.85rem;
}

/* KPI row */
.stu-kpi-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.stu-stat-card {
  background: var(--card);
  border-radius: 16px;
  padding: 16px;
  box-shadow: var(--shadow-1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 148px;
}

.stu-stat-card__top {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
}

.stu-stat-card__icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.stu-stat-card__label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.stu-stat-card__num {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--ink);
}

.stu-stat-card__hint {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 2px;
}

.stu-stat-card__action {
  width: 100%;
  border-radius: 10px;
  font-weight: 700;
}

.stu-stat-card--blue { background: #e6f0fb; }
.stu-stat-card--blue .stu-stat-card__icon { background: #3b7dd8; }
.stu-stat-card--orange { background: #fff3e0; }
.stu-stat-card--orange .stu-stat-card__icon { background: #e89b3a; }
.stu-stat-card--green { background: #e3f6ec; }
.stu-stat-card--green .stu-stat-card__icon { background: #2e9e5b; }
.stu-stat-card--purple { background: #efe6fb; }
.stu-stat-card--purple .stu-stat-card__icon { background: #8e5fd1; }
.stu-stat-card--teal { background: #e0f5f0; }
.stu-stat-card--teal .stu-stat-card__icon { background: #2a9d8f; }
.stu-stat-card--rose { background: #fde8ea; }
.stu-stat-card--rose .stu-stat-card__icon { background: #d64550; }
.stu-stat-card--gold { background: #fff8e6; }
.stu-stat-card--gold .stu-stat-card__icon { background: #d4a017; }
.stu-stat-card__num--gpa { font-variant-numeric: tabular-nums; }

.stu-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stu-filter-tabs__link {
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid rgba(2, 8, 23, 0.08);
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  text-decoration: none;
}

.stu-filter-tabs__link.is-active,
.stu-filter-tabs__link:hover {
  background: color-mix(in srgb, var(--primary) 8%, white);
  color: var(--primary);
  border-color: color-mix(in srgb, var(--primary) 20%, white);
}

.nav-icon--assignments { color: #5ec4b7; }
.nav-icon--exams { color: #e07a84; }
.nav-icon--gpa { color: #d4a017; }

/* Home grid */
.stu-home-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.95fr) minmax(0, 1.35fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.stu-home-grid__side {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

.stu-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.stu-panel__link {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  white-space: nowrap;
}

.stu-panel__link:hover {
  text-decoration: underline;
}

/* Schedule */
.stu-schedule-date {
  padding: 10px 20px 0;
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.stu-schedule {
  list-style: none;
  margin: 0;
  padding: 8px 0 16px;
}

.stu-schedule__item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid rgba(2, 8, 23, 0.05);
}

.stu-schedule__item:last-child {
  border-bottom: 0;
}

.stu-schedule__time {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 700;
  line-height: 1.4;
}

.stu-schedule__title {
  display: block;
  font-size: 0.92rem;
  margin-bottom: 2px;
}

.stu-schedule__title--green { color: #2e9e5b; }
.stu-schedule__title--orange { color: #c67a12; }
.stu-schedule__title--blue { color: #3b7dd8; }
.stu-schedule__title--purple { color: #8e5fd1; }
.stu-schedule__title--pink { color: #d1477a; }

.stu-schedule__meta {
  font-size: 0.78rem;
  color: var(--muted);
}

.stu-schedule__empty {
  padding: 16px 20px;
}

/* Available lecture cards */
.stu-lecture-list {
  padding: 12px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stu-lecture-list__empty {
  padding: 8px 4px 12px;
}

.stu-lecture-card {
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid rgba(2, 8, 23, 0.06);
  border-inline-start-width: 4px;
}

.stu-lecture-card--green { border-inline-start-color: #2e9e5b; background: #f6fbf8; }
.stu-lecture-card--orange { border-inline-start-color: #e89b3a; background: #fffaf3; }
.stu-lecture-card--blue { border-inline-start-color: #3b7dd8; background: #f5f9fe; }
.stu-lecture-card--purple { border-inline-start-color: #8e5fd1; background: #f9f6fd; }
.stu-lecture-card--pink { border-inline-start-color: #d1477a; background: #fdf5f8; }

.stu-lecture-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.stu-lecture-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--ink);
}

.stu-lecture-card__meta {
  font-size: 0.8rem;
  color: var(--muted);
}

.stu-lecture-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  color: var(--muted);
}

.stu-lecture-card__actions {
  margin-top: 10px;
}

/* Upcoming list */
.stu-upcoming-list {
  list-style: none;
  margin: 0;
  padding: 8px 0 16px;
}

.stu-upcoming-list__item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 12px;
  padding: 12px 20px;
  border-bottom: 1px solid rgba(2, 8, 23, 0.05);
}

.stu-upcoming-list__item:last-child {
  border-bottom: 0;
}

.stu-upcoming-list__when {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.76rem;
  color: var(--muted);
  font-weight: 600;
}

.stu-upcoming-list__body {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.stu-upcoming-list__empty {
  padding: 16px 20px;
}

/* Page header + breadcrumb */
.stu-page-header {
  margin-bottom: 20px;
}

.stu-page-header__title {
  margin: 0 0 6px;
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
}

.stu-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.stu-breadcrumb a {
  color: var(--muted);
  text-decoration: none;
}

.stu-breadcrumb a:hover {
  color: var(--primary);
}

.stu-breadcrumb__sep {
  opacity: 0.6;
}

/* Search bar on list pages */
.stu-search-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.stu-search-bar .form-control {
  flex: 1;
  min-width: 220px;
}

/* Tables */
.stu-table-card {
  border: 0;
  box-shadow: var(--shadow-1);
}

.stu-table thead th {
  background: color-mix(in srgb, var(--primary) 5%, white);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.84rem;
  white-space: nowrap;
}

.stu-attendance {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
}

.stu-attendance--yes {
  background: #e3f6ec;
  color: #2e9e5b;
}

.stu-attendance--no {
  background: #fdecef;
  color: #d9333f;
}

.stu-cert-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.stu-profile-card {
  border: 0;
  box-shadow: var(--shadow-1);
}

/* Login brand panel */
.login-split__brand--photo::before {
  background-position: left top;
  background-size: cover;
  filter: none;
  transform: none;
  opacity: 1;
}

@media (max-width: 1199px) {
  .stu-home-grid {
    grid-template-columns: 1fr 1fr;
  }

  .stu-home-grid__schedule {
    grid-column: 1 / -1;
  }
}

@media (max-width: 991px) {
  .stu-kpi-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stu-home-grid {
    grid-template-columns: 1fr;
  }

  .dash-topbar--student .dash-topbar__greeting {
    order: 2;
    width: 100%;
  }
}

@media (max-width: 575px) {
  .stu-kpi-row {
    grid-template-columns: 1fr;
  }

  .stu-upcoming-list__item,
  .stu-schedule__item {
    grid-template-columns: 1fr;
  }
}
