/* =============================================================================
   Student portal — layout & components
   ============================================================================= */
:root {
  --stu-accent: #2563eb;
  --stu-accent-soft: rgba(37, 99, 235, 0.12);
  --stu-teal: #0d9488;
  --stu-ink: #0f172a;
  --stu-muted: #64748b;
}

.student-portal-body {
  margin: 0;
  min-height: 100vh;
  background: linear-gradient(165deg, #f1f5f9 0%, #e8eef5 40%, #f8fafc 100%);
  color: var(--stu-ink);
}

.student-panel-root .stu-shell {
  min-height: calc(100vh - 52px);
}

/* ----- Top bar ----- */
.student-topbar {
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(148, 163, 184, 0.15);
  position: sticky;
  top: 0;
  z-index: 1035;
}

.student-topbar .brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--stu-accent), var(--stu-teal));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: -0.02em;
}

.stu-nav-toggle {
  border-radius: 10px !important;
}

/* ----- Sidebar (offcanvas on small screens) ----- */
.stu-sidebar-offcanvas.offcanvas-lg {
  width: min(288px, 100vw);
  background: #0f172a;
  color: #e2e8f0;
  border-right: 1px solid rgba(148, 163, 184, 0.12);
}

@media (min-width: 992px) {
  .stu-sidebar-offcanvas.offcanvas-lg {
    transform: none !important;
    visibility: visible !important;
    position: sticky;
    top: 52px;
    align-self: flex-start;
    height: calc(100vh - 52px);
    max-height: calc(100vh - 52px);
  }
}

.stu-sidebar-offcanvas .sidebar-section-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #64748b;
  padding: 1rem 1rem 0.35rem;
  font-weight: 700;
}

.stu-sidebar-offcanvas .nav-link {
  color: #94a3b8;
  border-radius: 10px;
  padding: 0.55rem 1rem;
  margin: 0.1rem 0.65rem;
  font-weight: 500;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  transition: color 0.15s ease, background 0.15s ease;
  border-left: 3px solid transparent;
}

.stu-sidebar-offcanvas .nav-link:hover {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.12);
}

.stu-sidebar-offcanvas .nav-link.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.35), rgba(13, 148, 136, 0.12));
  border-left-color: var(--stu-teal);
}

.stu-sidebar-offcanvas .nav-link .bi {
  font-size: 1.1rem;
  opacity: 0.92;
}

.student-profile-chip {
  background: rgba(148, 163, 184, 0.12);
  border-radius: 12px;
  padding: 1rem;
}

.student-profile-chip .avatar {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* ----- Main column ----- */
.stu-toolbar {
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  position: sticky;
  top: 52px;
  z-index: 1018;
}

.stu-breadcrumb .breadcrumb-item a {
  color: var(--stu-muted);
  text-decoration: none;
}

.stu-breadcrumb .breadcrumb-item a:hover {
  color: var(--stu-accent);
}

.stu-main-pad {
  max-width: 1280px;
  margin: 0 auto;
}

.stu-content-card {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  padding: clamp(1.25rem, 2vw, 1.85rem);
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}

.stu-page-head {
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.stu-page-head h1 {
  font-size: clamp(1.25rem, 2vw, 1.45rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stu-page-head .stu-lead {
  color: var(--stu-muted);
  font-size: 0.92rem;
  max-width: 42rem;
  margin-bottom: 0;
}

.stu-enroll-banner {
  border-radius: 12px;
  padding: 0.85rem 1.1rem;
  background: linear-gradient(120deg, rgba(37, 99, 235, 0.06), rgba(13, 148, 136, 0.08));
  border: 1px solid rgba(37, 99, 235, 0.15);
}

.stu-quick-actions .btn {
  border-radius: 10px;
}

.stu-table-shell {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.stu-table-shell .table {
  margin-bottom: 0;
}

.stu-table-shell thead th {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--stu-muted);
  font-weight: 700;
}

.stu-empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--stu-muted);
}

.stu-empty .bi {
  font-size: 2rem;
  opacity: 0.35;
  display: block;
  margin-bottom: 0.35rem;
}

.stu-panel-filters {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.15rem;
}

.stu-notice-card {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stu-notice-card:hover {
  border-color: rgba(37, 99, 235, 0.35);
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.08);
}

.stu-footer {
  color: var(--stu-muted);
}

.student-card {
  background: #fff;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  box-shadow: 0 8px 30px rgba(15, 23, 42, 0.05);
}

.student-card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(226, 232, 240, 0.95);
  font-weight: 600;
  font-size: 0.88rem;
}

.student-stat {
  border-radius: 14px;
  padding: 1.15rem 1.25rem;
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.student-stat::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--stu-accent), var(--stu-teal));
  opacity: 0.85;
}

.student-stat.stu-stat-neutral::before {
  opacity: 0.35;
}

.student-stat .label {
  font-size: 0.72rem;
  color: var(--stu-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
}

.student-stat .value {
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--stu-ink);
  line-height: 1.2;
}

.student-stat .hint {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-top: 0.35rem;
}

.hero-panel {
  background: linear-gradient(125deg, #1e293b 0%, #0f172a 55%, #172554 100%);
  color: #f8fafc;
  border-radius: 16px;
  padding: clamp(1.5rem, 4vw, 2.5rem);
  border: 1px solid rgba(99, 102, 241, 0.22);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.22);
}

.hero-panel .lead {
  color: #cbd5e1;
  max-width: 42rem;
}

.video-shell {
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(148, 163, 184, 0.35);
  background: #0f172a;
}

.video-shell video,
.video-shell canvas {
  display: block;
  width: 100%;
  max-height: 380px;
  object-fit: cover;
}

.step-badge {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(59, 130, 246, 0.15);
  color: #2563eb;
  font-weight: 700;
  font-size: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stu-login-badge {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--stu-accent), var(--stu-teal));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.45rem;
}

@media (max-width: 991.98px) {
  .stu-shell {
    flex-direction: column;
  }
}
