/*
 * BDU STUDENT HUB — FRONTEND SHOWCASE LAYER
 * Progressive enhancement only: the product stays fully usable without it.
 */

@property --spotlight-opacity {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

@property --scroll-progress {
  syntax: '<number>';
  inherits: true;
  initial-value: 0;
}

:root {
  --ease-spring: linear(0, .004, .016, .035, .063, .097, .136, .178, .223, .268, .311, .351, .386, .414, .434, .447, .451, .446, .434, .416, .392, .366, .338, .311, .287, .267, .254, .249, .253, .266, .289, .32, .359, .403, .45, .497, .542, .582, .615, .638, .65, .649, .635, .61, .576, .536, .495, .458, .429, .412, .41, .423, .451, .491, .536, .58, .615, .635, .638, .624, .596, .559, .521, .491, .474, .474, .49, .519, .554, .589, .615, .626, .62, .6, .573, .548, .532, .532, .548, .573, .599, .618, .625, .617, .598, .577, .563, .564, .579, .6, .618, .624, .616, .601, .588, .586, .597, .613, .623, .619, .607, .6, .604, .615, .622, .618, .61, .611, .618, .62, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --showcase-ring: 0 0 0 3px rgba(140, 21, 21, .16), 0 0 0 1px #8c1515;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: rgba(140, 21, 21, .45) transparent;
  scrollbar-width: thin;
}

::selection {
  color: #fff;
  background: #8c1515;
}

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { border: 3px solid transparent; border-radius: 999px; background: rgba(140, 21, 21, .42); background-clip: padding-box; }

body {
  --pointer-x: 50vw;
  --pointer-y: 50vh;
  --spotlight-opacity: 0;
}

body::after {
  content: '';
  position: fixed;
  z-index: 9998;
  inset: 0;
  pointer-events: none;
  opacity: var(--spotlight-opacity);
  background: radial-gradient(360px circle at var(--pointer-x) var(--pointer-y), rgba(140, 21, 21, .045), transparent 74%);
  transition: --spotlight-opacity .35s ease;
}

body.has-fine-pointer { --spotlight-opacity: 1; }

:where(button, input, select, textarea, a, [tabindex]):focus-visible {
  outline: none;
  box-shadow: var(--showcase-ring) !important;
}

:where(button, a) {
  -webkit-tap-highlight-color: transparent;
}

/* View Transition API: content morphs while the navigation frame remains fixed. */
::view-transition-old(root) {
  animation: .18s ease both showcase-fade-out;
}

::view-transition-new(root) {
  animation: .42s var(--ease-out-expo) both showcase-fade-in;
}

@keyframes showcase-fade-out {
  to { opacity: 0; filter: blur(3px); transform: translateY(-3px) scale(.995); }
}

@keyframes showcase-fade-in {
  from { opacity: 0; filter: blur(4px); transform: translateY(8px) scale(.995); }
}

/* Scroll progress on the sticky application bar. */
.topbar::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg, #8c1515, #c45b5b);
  transform: scaleX(var(--scroll-progress));
  transform-origin: left;
  transition: transform .08s linear;
}

.dashboard-body {
  container-name: dashboard;
  container-type: inline-size;
}

.topbar-actions { isolation: isolate; }

.command-trigger {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding: 7px 8px 7px 13px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  font: 600 .74rem/1 var(--font-main);
  cursor: pointer;
  transition: color .2s ease, border-color .2s ease, background .2s ease, transform .2s var(--ease-spring);
}

.command-trigger:hover {
  color: var(--bdu-primary);
  border-color: rgba(140, 21, 21, .3);
  background: rgba(140, 21, 21, .045);
  transform: translateY(-1px);
}

kbd {
  min-width: 35px;
  padding: 5px 7px;
  border: 1px solid var(--border-color);
  border-bottom-width: 2px;
  border-radius: 5px;
  background: var(--bg-card-hover);
  color: var(--text-dim);
  font: 600 .62rem/1 var(--font-mono);
  text-align: center;
}

.status-beacon {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-dim);
  font-size: .66rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.status-beacon::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #218358;
  box-shadow: 0 0 0 4px rgba(33, 131, 88, .1);
  transition: background .2s ease, box-shadow .2s ease;
}

.status-beacon.is-offline::before {
  background: #b4232a;
  box-shadow: 0 0 0 4px rgba(180, 35, 42, .1);
}

/* Command palette */
.command-palette {
  position: fixed;
  z-index: 11000;
  inset: 0;
  display: grid;
  place-items: start center;
  padding: min(17vh, 150px) 20px 20px;
  background: rgba(28, 23, 22, .46);
  backdrop-filter: blur(12px) saturate(.8);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}

.command-palette.is-open {
  opacity: 1;
  visibility: visible;
}

.command-panel {
  width: min(620px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 18px;
  background: var(--bg-card);
  box-shadow: 0 34px 100px rgba(20, 14, 12, .34);
  transform: translateY(-14px) scale(.98);
  transition: transform .36s var(--ease-out-expo);
}

.command-palette.is-open .command-panel { transform: none; }

.command-search-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-color);
}

.command-search-index {
  color: var(--bdu-primary);
  font: 700 .7rem/1 var(--font-mono);
}

.command-search {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text-main);
  font: 600 .98rem/1.4 var(--font-main);
}

.command-search::placeholder { color: var(--text-dim); }

.command-results {
  max-height: min(430px, 55vh);
  padding: 8px;
  overflow-y: auto;
}

.command-group-label {
  padding: 10px 10px 6px;
  color: var(--text-dim);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.command-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font: 600 .82rem/1.35 var(--font-main);
  text-align: left;
  cursor: pointer;
}

.command-item:hover,
.command-item.is-selected {
  color: var(--bdu-primary);
  background: rgba(140, 21, 21, .07);
}

.command-number {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 6px;
  background: var(--bg-card-hover);
  color: var(--text-dim);
  font: 600 .62rem/1 var(--font-mono);
}

.command-item.is-selected .command-number { background: #8c1515; color: #fff; }
.command-empty { padding: 38px 18px; color: var(--text-dim); font-size: .82rem; text-align: center; }
.command-footer { display: flex; justify-content: space-between; gap: 14px; padding: 11px 16px; border-top: 1px solid var(--border-color); color: var(--text-dim); font-size: .62rem; }

/* Entry choreography; IntersectionObserver controls the visible state. */
.reveal-ready {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .58s var(--ease-out-expo), transform .58s var(--ease-out-expo);
  transition-delay: var(--reveal-delay, 0ms);
}

.reveal-ready.is-revealed {
  opacity: 1;
  transform: none;
}

/* GPU-friendly perspective, applied only on fine pointers. */
.showcase-tilt {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  --tilt-lift: 0px;
  transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) translateY(var(--tilt-lift));
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform .45s var(--ease-out-expo), border-color .2s ease, box-shadow .25s ease;
}

.showcase-tilt:hover {
  --tilt-lift: -3px;
  border-color: rgba(140, 21, 21, .24);
  box-shadow: 0 18px 45px rgba(57, 39, 33, .09);
}

.showcase-tilt > * { transform: translateZ(0); }

/* Ripple is added in JS and removed after its animation. */
.has-ripple { position: relative; overflow: hidden; }
.showcase-ripple {
  position: absolute;
  z-index: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  pointer-events: none;
  background: currentColor;
  opacity: .14;
  transform: translate(-50%, -50%) scale(0);
  animation: showcase-ripple .62s ease-out forwards;
}

@keyframes showcase-ripple { to { opacity: 0; transform: translate(-50%, -50%) scale(24); } }

/* Refined data surfaces */
.stat-card { position: relative; isolation: isolate; overflow: hidden; }
.stat-card::after {
  content: '';
  position: absolute;
  z-index: -1;
  inset: auto -18px -35px auto;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(140, 21, 21, .08);
  border-radius: 50%;
  transition: transform .4s var(--ease-out-expo), border-color .3s ease;
}
.stat-card:hover::after { transform: scale(1.35); border-color: rgba(140, 21, 21, .18); }

.stat-card.is-loading .stat-value {
  width: 72px;
  color: transparent !important;
  border-radius: 5px;
  background: linear-gradient(100deg, rgba(110,100,92,.08) 20%, rgba(140,21,21,.1) 45%, rgba(110,100,92,.08) 70%);
  background-size: 220% 100%;
  animation: skeleton-scan 1.5s infinite linear;
}

@keyframes skeleton-scan { to { background-position-x: -220%; } }

.semester-header { position: sticky; top: 0; z-index: 5; }
/* `.table-responsive` is the nearest scroll container, so a positive sticky
   offset pushes the header over the first course row. Keep it at its natural
   top edge to ensure row 1 (for example ENG1644) remains visible. */
.grade-table thead { position: sticky; top: 0; z-index: 4; }
.grade-table tbody tr { transition: background .18s ease, box-shadow .18s ease; }
.grade-table tbody tr:focus-visible { position: relative; z-index: 3; }
.grade-table tbody tr:hover { box-shadow: inset 3px 0 #8c1515; }

.toast { overflow: hidden; }
.toast::after {
  content: '';
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: rgba(255,255,255,.72);
  transform-origin: left;
  animation: toast-life 4s linear forwards;
}
@keyframes toast-life { to { transform: scaleX(0); } }

.sidebar-backdrop {
  position: fixed;
  z-index: 90;
  inset: 0;
  border: 0;
  background: rgba(32, 25, 23, .44);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s ease, visibility .22s ease;
}
.sidebar-backdrop.is-visible { opacity: 1; visibility: visible; }

@container dashboard (max-width: 760px) {
  .hero-section { border-radius: 12px; }
  .analytics-grid { gap: 14px; }
  .chart-card { min-height: 330px; }
}

@media (max-width: 1100px) {
  .status-beacon { display: none; }
  .command-trigger > span { display: none; }
}

@media (max-width: 680px) {
  .command-trigger { display: none; }
  .command-palette { padding: 10vh 12px 12px; }
  .command-panel { border-radius: 15px; }
  .command-footer { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-ready { opacity: 1; transform: none; }
  .showcase-tilt { transform: none !important; }
  body::after { display: none; }
}

@media (forced-colors: active) {
  .status-beacon::before, .toast-mark { forced-color-adjust: none; }
  .showcase-tilt { transform: none; }
}

/* ========================================================================== 
   ART-DIRECTED V2 — DEPTH, PARALLAX, TYPE & MATERIAL
   ========================================================================== */
:root {
  --font-display: 'Space Grotesk', 'Manrope', sans-serif;
  --showcase-ink: #171314;
  --showcase-paper: #f1ede5;
  --showcase-coral: #ef5b43;
  --showcase-oxblood: #801522;
  --showcase-blush: #ead9d6;
  --showcase-lilac: #cfc1d1;
  --section-parallax: 0px;
}

body.theme-light {
  --bg-app: #ede9e1;
  --bg-sidebar: var(--showcase-ink);
  --bg-card: rgba(255, 253, 249, .92);
  --bg-card-hover: #f7f1e9;
  --glass-bg: rgba(255, 253, 249, .88);
  --glass-border: rgba(64, 46, 42, .12);
  --border-color: rgba(64, 46, 42, .14);
  --text-main: #221d1e;
  --text-muted: #6e6260;
  --text-dim: #918581;
}

.topbar-title, .section-title, .hero-name, .student-main-name,
.card-title, .login-title, .scene-copy h2, .progress-title,
.learning-block-title, .cs-title {
  font-family: var(--font-display);
}

/* Login becomes a dimensional stage instead of a flat centered card. */
.login-wrapper {
  background:
    radial-gradient(circle at calc(var(--pointer-x) * .12) calc(var(--pointer-y) * .12), rgba(239, 91, 67, .22), transparent 28%),
    radial-gradient(circle at 83% 18%, rgba(128, 21, 34, .65), transparent 32%),
    linear-gradient(135deg, #120e0f 0%, #201416 52%, #0f0c0d 100%);
}

.login-wrapper::after {
  content: '';
  position: absolute;
  inset: -20%;
  pointer-events: none;
  background: conic-gradient(from 40deg at 50% 50%, transparent, rgba(239,91,67,.08), transparent 24%, rgba(207,193,209,.08), transparent 50%);
  animation: aurora-drift 18s linear infinite;
}

@keyframes aurora-drift { to { transform: rotate(1turn) scale(1.08); } }

.auth-shell {
  border-color: rgba(255, 255, 255, .14);
  box-shadow: 0 55px 140px rgba(0,0,0,.48), 0 0 0 1px rgba(255,255,255,.05);
}

.login-context {
  background:
    linear-gradient(145deg, rgba(255,255,255,.18), transparent 40%),
    linear-gradient(165deg, #f1dedb 0%, #dbc5d7 100%);
}

.login-context::before {
  content: '';
  position: absolute;
  width: 360px;
  height: 360px;
  top: -160px;
  right: -130px;
  border: 1px solid rgba(128,21,34,.18);
  border-radius: 50%;
  box-shadow: 0 0 0 50px rgba(255,255,255,.08), 0 0 0 100px rgba(128,21,34,.035);
  transform: translate3d(calc((var(--pointer-x) - 50vw) * .018), calc((var(--pointer-y) - 50vh) * .018), 0);
  transition: transform .35s ease-out;
}

.login-card { position: relative; }
.login-card::before {
  content: 'AUTH / 01';
  position: absolute;
  top: 24px;
  right: 28px;
  color: rgba(128,21,34,.3);
  font: 600 .6rem/1 var(--font-mono);
  letter-spacing: .12em;
}

/* Official BDU identity assets */
.scene-brand-mark {
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
}
.scene-brand-mark img,
.brand-logo img,
.bdu-badge-logo,
.document-brand {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}
.university-badge {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.university-wordmark {
  width: min(300px, 100%);
  height: auto;
  display: block;
}
.topbar-wordmark {
  width: 126px;
  height: 42px;
  flex: 0 0 auto;
  object-fit: contain;
}

/* Keep the desktop sign-in card fully inside one viewport. */
@media (min-width: 901px) {
  .login-wrapper {
    height: 100svh;
    min-height: 560px;
    padding: 22px;
  }
  .auth-shell {
    width: min(1020px, 100%);
    height: min(700px, calc(100svh - 44px));
    min-height: 0;
  }
  .login-context { padding: 26px 32px 30px; }
  .character-stage {
    height: 300px;
    margin-top: 6px;
    transform: scale(.9);
    transform-origin: 50% 100%;
  }
  .login-card { padding: 34px 46px 28px; }
  .university-wordmark { width: min(230px, 100%); }
  .university-badge { gap: 6px; margin-bottom: 20px; }
  .login-header { margin-bottom: 22px; }
  .login-title { font-size: 1.75rem; }
  .login-card .form-group { margin-bottom: 14px; }
  .login-card .form-input { min-height: 38px; }
  .login-card .form-actions { margin-bottom: 18px; }
  .login-card .btn-primary { min-height: 44px; }
  .login-footer { margin-top: 16px; padding-top: 12px; }
}

/* Dark navigation creates a strong spatial frame around the lighter canvas. */
.app-layout {
  background: transparent;
  isolation: isolate;
}

.sidebar {
  z-index: 100;
  border-color: rgba(255,255,255,.08);
  background:
    radial-gradient(circle at 10% 5%, rgba(239,91,67,.16), transparent 24%),
    var(--showcase-ink) !important;
  color: #fff;
  box-shadow: 18px 0 50px rgba(34, 20, 20, .08);
}

.sidebar::before { background: linear-gradient(90deg, var(--showcase-coral), var(--showcase-oxblood)); }
.sidebar-header, .sidebar-footer { border-color: rgba(255,255,255,.09); }
.sidebar-footer { background: rgba(255,255,255,.035); }
.sidebar .brand-title, .sidebar .user-fullname { color: #fff; }
.sidebar .brand-subtitle, .sidebar .user-mssv-text { color: rgba(255,255,255,.47); }
.brand-logo {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  padding: 2px;
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 1px rgba(255,255,255,.18), 0 8px 24px rgba(0,0,0,.22);
}
.nav-group-title { color: rgba(255,255,255,.36); }
.nav-item { color: rgba(255,255,255,.64); }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(90deg, rgba(239,91,67,.23), rgba(239,91,67,.06));
  box-shadow: inset 3px 0 var(--showcase-coral);
}
.sidebar .badge-mini { color: rgba(255,255,255,.66); background: rgba(255,255,255,.08); }
.sidebar .btn-logout { color: rgba(255,255,255,.5); }

.main-content-wrapper { position: relative; z-index: 2; }
.topbar {
  background: rgba(242, 238, 230, .78);
  border-color: rgba(73,56,50,.12);
  backdrop-filter: blur(24px) saturate(1.35);
}
.topbar-title { font-size: 1.75rem; font-weight: 700; }
.topbar-badge { color: var(--showcase-oxblood); font-weight: 700; }
.command-trigger, .topbar-btn, .btn-icon { background: rgba(255,255,255,.52); }

.dashboard-body {
  position: relative;
  z-index: 2;
  perspective: 1600px;
}

/* Actual multi-layer parallax environment. JS updates each layer independently. */
.parallax-environment {
  position: fixed;
  z-index: 0;
  inset: 0 0 0 284px;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(circle at 80% 12%, rgba(239,91,67,.12), transparent 25%),
    linear-gradient(135deg, #efeae1, #e8e2d9);
}

.parallax-layer { position: absolute; will-change: transform; }
.parallax-grid {
  inset: -80px;
  opacity: .38;
  background-image: linear-gradient(rgba(67,49,45,.07) 1px, transparent 1px), linear-gradient(90deg, rgba(67,49,45,.07) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(circle at center, #000, transparent 78%);
}
.parallax-orb { border-radius: 50%; filter: blur(1px); }
.parallax-orb-one {
  top: 8%; right: -100px; width: 410px; height: 410px;
  border: 1px solid rgba(128,21,34,.22);
  box-shadow: inset 0 0 100px rgba(239,91,67,.06), 0 0 0 70px rgba(255,255,255,.12);
}
.parallax-orb-two {
  bottom: -120px; left: 9%; width: 330px; height: 330px;
  background: linear-gradient(145deg, rgba(207,193,209,.28), rgba(239,91,67,.08));
  filter: blur(28px);
}
.parallax-type {
  right: -3%;
  bottom: -5%;
  width: clamp(34rem, 58vw, 68rem);
  opacity: .045;
  filter: saturate(1.4) contrast(1.08) blur(.7px);
}
.parallax-type img {
  width: 100%;
  height: auto;
  display: block;
}
.parallax-rule {
  top: 17%; left: 5%; width: 22vw; height: 1px;
  background: linear-gradient(90deg, var(--showcase-coral), transparent);
}

/* Panels are art-directed by purpose rather than sharing one generic surface. */
.glass-panel {
  border-color: rgba(69,51,46,.12);
  box-shadow: 0 12px 45px rgba(54,37,32,.065);
}

.hero-section {
  overflow: visible;
  border: 0;
  background: transparent;
  box-shadow: none;
}
.hero-profile {
  position: relative;
  overflow: hidden;
  padding: 38px 40px;
  border: 0;
  border-radius: 24px 24px 0 0;
  background:
    radial-gradient(circle at 86% 15%, rgba(239,91,67,.38), transparent 22%),
    linear-gradient(125deg, #171314 0%, #27171a 64%, #801522 100%);
  color: #fff;
}
.hero-profile > :not(.brand-watermark) { position: relative; z-index: 1; }
.hero-profile::after {
  content: 'ACADEMIC RECORD';
  position: absolute;
  right: -14px;
  bottom: -13px;
  color: rgba(255,255,255,.055);
  font: 700 3.6rem/1 var(--font-display);
  letter-spacing: -.06em;
}
.hero-name, .hero-profile .meta-item { color: #fff; }
.hero-profile .meta-item { opacity: .7; }
.hero-avatar { background: var(--showcase-coral); border-radius: 18px; transform: rotate(-3deg); }
.tag-role { color: #fff; background: rgba(255,255,255,.12); }
.stats-grid {
  overflow: hidden;
  border-radius: 0 0 24px 24px;
  box-shadow: 0 22px 60px rgba(49,31,28,.1);
}
.stat-card { min-height: 108px; }
.stat-card:nth-child(1) { background: #fffdf9; }
.stat-card:nth-child(2) { background: #f0deda; }
.stat-card:nth-child(3) { background: #d6c9d8; }
.stat-card:nth-child(4) { background: #e5bd64; }
.stat-icon { border: 1px solid rgba(128,21,34,.14); background: rgba(255,255,255,.44); }

.analytics-grid { gap: 22px; }
.chart-card { min-height: 345px; border-radius: 22px; background: rgba(255,253,249,.88); }
.chart-card:first-child { border-top: 4px solid var(--showcase-coral); }
.chart-card:last-child { border-top: 4px solid var(--showcase-lilac); }
.card-title { font-size: 1.25rem; }

.section-header-box {
  min-height: 178px;
  position: relative;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  padding: 34px 40px;
  border: 0;
  border-radius: 24px;
  background:
    radial-gradient(circle at 78% 20%, rgba(239,91,67,.38), transparent 20%),
    linear-gradient(115deg, var(--showcase-ink) 0 72%, var(--showcase-oxblood) 72%);
  color: #fff;
}
.brand-watermark {
  position: absolute;
  z-index: 0;
  right: -58px;
  top: 50%;
  width: clamp(360px, 42vw, 650px);
  max-width: none;
  opacity: .105;
  pointer-events: none;
  user-select: none;
  transform: translateY(-50%);
  filter: saturate(1.45) contrast(1.1) blur(.55px);
  mix-blend-mode: screen;
}
.hero-brand-watermark {
  right: -85px;
  width: clamp(390px, 44vw, 680px);
  opacity: .115;
}
.section-header-box > :not(.brand-watermark) { position: relative; z-index: 1; }
.section-header-box::before {
  content: attr(data-section-index);
  position: absolute;
  top: -35px;
  right: 36px;
  color: rgba(255,255,255,.08);
  font: 700 11rem/1 var(--font-display);
  letter-spacing: -.1em;
  transform: translateY(var(--section-parallax));
  will-change: transform;
}
.section-header-box::after {
  content: '';
  position: absolute;
  top: 27px; left: 37px;
  width: 46px; height: 3px;
  background: var(--showcase-coral);
}
.section-header-box .header-split { position: relative; z-index: 1; width: 100%; }
.section-title { color: #fff; font-size: clamp(1.65rem, 2.4vw, 2.45rem); }
.section-desc { color: rgba(255,255,255,.58); max-width: 720px; }
.section-header-box .badge-mini { color: #fff; background: rgba(255,255,255,.12); }

.profile-hero-card, .sub-bento-card, .gradebook-section,
.wordfmt-card, .survey-card, .terminal-card, .schedule-card,
.doc-card, .video-card, .coming-soon-card {
  border-radius: 20px;
}
.profile-hero-card { border-top: 4px solid var(--showcase-oxblood); }
.bdu-badge-logo {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(128,21,34,.14);
}
.sub-bento-card:nth-child(2) { background: #f0deda; }
.wordfmt-layout { grid-template-columns: minmax(0, 1.08fr) minmax(390px, .92fr); }
.wordfmt-card { background: rgba(255,253,249,.92); }
.dropzone-box {
  background: linear-gradient(145deg, rgba(239,91,67,.055), rgba(207,193,209,.09));
  border-radius: 14px;
}
.btn-primary { background: var(--showcase-ink); border-radius: 10px; }
.btn-primary:hover { background: var(--showcase-oxblood); }

/* WordFmt is presented as a visible processing instrument. */
.wordfmt-result-column { position: sticky; top: 104px; align-self: start; }
.wordfmt-result-column .result-placeholder { min-height: 560px; }
#wordfmt-status-card.is-processing {
  align-items: stretch;
  justify-content: stretch;
  overflow: hidden;
  padding: 0;
  border-color: rgba(239,91,67,.28);
  background:
    radial-gradient(circle at 15% 10%, rgba(239,91,67,.2), transparent 24%),
    linear-gradient(145deg, #1a1415, #24191b);
  color: #fff;
}

.wordfmt-progress-box {
  width: 100%;
  min-height: 560px;
  display: grid;
  grid-template-rows: 205px 1fr;
}
.document-processing-scene {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.08);
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
}
.document-orbit {
  position: absolute;
  border: 1px solid rgba(239,91,67,.24);
  border-radius: 50%;
  animation: orbit-spin 9s linear infinite;
}
.orbit-one { width: 185px; height: 185px; }
.orbit-two { width: 140px; height: 140px; border-style: dashed; animation-direction: reverse; animation-duration: 6s; }
@keyframes orbit-spin { to { transform: rotate(1turn); } }

.document-sheet {
  position: absolute;
  width: 94px;
  height: 124px;
  border-radius: 7px;
  background: #fffdf8;
  box-shadow: 0 18px 50px rgba(0,0,0,.28);
  transition: transform .5s var(--ease-out-expo);
}
.sheet-back { transform: translate(-22px, 8px) rotate(-9deg); opacity: .35; }
.sheet-middle { transform: translate(20px, 5px) rotate(7deg); opacity: .6; }
.sheet-front { z-index: 2; padding: 15px 12px; overflow: hidden; }
.document-brand { width: 18px; height: 18px; margin-bottom: 12px; border-radius: 50%; }
.document-line { display: block; height: 4px; margin-bottom: 9px; border-radius: 9px; background: #d8d1ca; }
.document-line.short { width: 58%; }
.document-line.medium { width: 78%; }
.document-line.line-title { width: 72%; height: 7px; background: #433a38; }
.document-scan {
  position: absolute;
  right: 0; left: 0; top: -20px;
  height: 24px;
  background: linear-gradient(180deg, transparent, rgba(239,91,67,.24), var(--showcase-coral));
  filter: drop-shadow(0 4px 8px rgba(239,91,67,.5));
  animation: document-scan 1.35s ease-in-out infinite;
}
@keyframes document-scan { 50%, 100% { transform: translateY(145px); } }

.progress-content { padding: 28px 30px 30px; }
.progress-eyebrow { color: var(--showcase-coral); font: 700 .6rem/1 var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.progress-title { margin-top: 9px; color: #fff; font-size: 1.45rem; letter-spacing: -.04em; }
.progress-desc { min-height: 42px; margin-top: 7px; color: rgba(255,255,255,.52); font-size: .75rem; line-height: 1.55; }
.progress-rail { height: 6px; margin-top: 24px; overflow: hidden; border-radius: 99px; background: rgba(255,255,255,.1); }
.progress-fill {
  display: block; width: 0; height: 100%; border-radius: inherit;
  background: linear-gradient(90deg, var(--showcase-coral), #ffb15a, #d6c9d8);
  box-shadow: 0 0 18px rgba(239,91,67,.45);
  transition: width .55s var(--ease-out-expo);
}
.progress-meta { display: flex; justify-content: space-between; margin-top: 8px; color: rgba(255,255,255,.44); font: 600 .62rem/1 var(--font-mono); }
.progress-meta strong { color: #fff; }
.processing-stages { display: grid; grid-template-columns: 1fr 1fr; gap: 9px 14px; margin-top: 24px; list-style: none; }
.processing-stages li {
  display: flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,.34); font-size: .67rem; font-weight: 600;
  transition: color .25s ease, transform .25s ease;
}
.processing-stages li span { color: inherit; font: 600 .56rem/1 var(--font-mono); }
.processing-stages li.is-active { color: #fff; transform: translateX(3px); }
.processing-stages li.is-active span { color: var(--showcase-coral); }
.processing-stages li.is-complete { color: rgba(255,255,255,.68); }
.processing-stages li.is-complete span { color: #66d09c; }
.wordfmt-progress-box.is-complete .document-sheet { transform: translate(0) rotate(0) scale(1.05); }
.wordfmt-progress-box.is-complete .document-scan { animation: none; transform: translateY(145px); }
.wordfmt-progress-box.is-error .progress-fill { background: #d64545; box-shadow: 0 0 18px rgba(214,69,69,.4); }
.wordfmt-progress-box.is-error .document-scan { background: #d64545; animation-play-state: paused; }

.wordfmt-success-box { width: 100%; animation: success-arrive .65s var(--ease-out-expo) both; }
@keyframes success-arrive { from { opacity: 0; transform: scale(.96) translateY(12px); } }

/* High-contrast WordFmt diagnostics for both themes. */
.diagnostics-box {
  background: #f3f0eb;
  border-color: #d7cfc7;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.8);
  text-align: left;
}
.diag-title {
  color: #3f3734;
  font-weight: 800;
}
.diag-items {
  color: #302a28;
  font-size: .78rem;
  line-height: 1.45;
}
.diag-line {
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 650;
}
.diag-pass {
  color: #12633e;
  background: #e2f1e8;
  border-color: #bcdcc9;
  border-left: 3px solid #218358;
}
.diag-info {
  color: #184f86;
  background: #e3edf8;
  border-color: #c3d5e9;
  border-left: 3px solid #326ca8;
}
body.theme-dark .diagnostics-box {
  background: #211e1c;
  border-color: #4a403b;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}
body.theme-dark .diag-title { color: #f0e8df; }
body.theme-dark .diag-pass {
  color: #8ce6bd;
  background: rgba(33,131,88,.18);
  border-color: rgba(76,190,137,.28);
}
body.theme-dark .diag-info {
  color: #9cc8f5;
  background: rgba(50,108,168,.2);
  border-color: rgba(96,165,250,.28);
}

@supports (animation-timeline: view()) {
  .tab-pane.active > :not(.section-header-box) {
    animation: panel-depth linear both;
    animation-timeline: view(block);
    animation-range: entry 0% cover 24%;
  }
  @keyframes panel-depth {
    from { opacity: .3; transform: translateY(36px) scale(.985); filter: blur(4px); }
    to { opacity: 1; transform: none; filter: none; }
  }
}

@media (max-width: 992px) {
  .parallax-environment { left: 0; }
  .sidebar { box-shadow: 20px 0 60px rgba(0,0,0,.24); }
  .wordfmt-layout { grid-template-columns: 1fr; }
  .wordfmt-result-column { position: static; }
}

@media (max-width: 680px) {
  .dashboard-body { padding-top: 14px; }
  .hero-profile { padding: 28px 22px; border-radius: 18px 18px 0 0; }
  .hero-profile::after { font-size: 2rem; }
  .stats-grid { border-radius: 0 0 18px 18px; }
  .section-header-box { min-height: 150px; padding: 28px 24px; border-radius: 18px; }
  .section-header-box::before { right: 20px; font-size: 8rem; }
  .section-header-box::after { top: 22px; left: 24px; }
  .brand-watermark { right: -125px; width: 440px; opacity: .085; }
  .topbar-wordmark { display: none; }
  .wordfmt-progress-box { min-height: 590px; grid-template-rows: 235px 1fr; }
  .progress-content { padding: 24px 22px; }
  .processing-stages { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .login-wrapper::after, .document-orbit, .document-scan { animation: none; }
  .parallax-layer { transform: none !important; }
}

/*
 * Keep the application chrome attached to the viewport.
 *
 * The dashboard used to rely on a sticky sidebar inside a page-height flex
 * container. On long tabs the document itself became the scroll container,
 * so the sidebar was eventually constrained by the bottom of `.app-layout`
 * and its footer appeared halfway up the screen. The shell now owns the
 * viewport and delegates scrolling to the content/navigation panes.
 */
.app-layout {
  height: 100vh;
  height: 100dvh;
  min-height: 0;
  overflow: hidden;
}

.sidebar {
  position: relative;
  top: auto;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.sidebar-nav {
  min-height: 0;
  overscroll-behavior: contain;
}

.main-content-wrapper {
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.topbar {
  flex: 0 0 auto;
}

.dashboard-body {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

@media (max-width: 992px) {
  .sidebar {
    position: fixed;
    height: 100vh;
    height: 100dvh;
  }

  .main-content-wrapper {
    width: 100%;
  }
}
