:root {
  --student-bg: #050505;
  --student-surface: #0a0a0a;
  --student-raised: #0f0f0f;
  --student-line: rgba(253, 253, 253, 0.1);
  --student-line-strong: rgba(253, 253, 253, 0.17);
  --student-muted: #aaa7a5;
  --student-muted-2: #777370;
}

.student-library {
  min-height: 100dvh;
  background: var(--student-bg);
}

.student-library::before {
  opacity: 0.72;
  background:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.78), transparent 88%);
}

.student-library::after { opacity: 0.025; }
.student-library main { position: relative; z-index: 1; min-height: 100dvh; }
.student-library svg { display: block; width: 1.15rem; height: 1.15rem; flex: 0 0 auto; }
.student-library h1,
.student-library h2,
.student-library h3 { text-transform: none; }

.student-library .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;
}

/* Login */
.student-library .login-screen {
  position: relative;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: 78px minmax(0, 1fr) 44px;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 86% 24%, rgba(255, 90, 0, 0.13), transparent 26rem),
    radial-gradient(circle at 10% 90%, rgba(255, 90, 0, 0.055), transparent 30rem),
    #050505;
}

.student-library .login-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.026) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.026) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.92), rgba(0,0,0,0.45) 72%, transparent);
}

.student-library .login-nav {
  width: 100%;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0 32px;
  border-bottom: 1px solid var(--student-line);
  background: rgba(5, 5, 5, 0.78);
  backdrop-filter: blur(18px);
}

.student-library .login-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 20px;
  color: var(--white);
  text-decoration: none;
}

.student-library .login-brand img { width: 160px; }
.student-library .login-brand span {
  padding-left: 20px;
  border-left: 1px solid var(--student-line-strong);
  color: var(--student-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

.student-library .login-nav-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--student-muted);
  font-family: var(--font-mono);
  font-size: 0.67rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.student-library .login-nav-status svg { color: var(--orange); }
.student-library .login-stage {
  width: min(1240px, calc(100% - 64px));
  min-height: 0;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(410px, 490px);
  gap: 72px;
  align-items: center;
  padding: 32px 0 22px;
}

.student-library .login-intro { max-width: 660px; }
.student-library .login-kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.student-library .login-kicker svg { width: 1rem; height: 1rem; }
.student-library .login-intro h1 {
  max-width: 650px;
  margin: 20px 0 18px;
  color: var(--white);
  font-size: 3.6rem;
  font-weight: 700;
  line-height: 1.02;
  text-wrap: balance;
}
.student-library .login-intro > p {
  max-width: 590px;
  margin: 0;
  color: var(--student-muted);
  font-size: 1.08rem;
  line-height: 1.65;
  text-wrap: pretty;
}

.student-library .login-benefits {
  max-width: 620px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 34px;
  border-top: 1px solid var(--student-line);
  border-bottom: 1px solid var(--student-line);
}
.student-library .login-benefits > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  align-content: start;
  padding: 18px 16px 18px 0;
}
.student-library .login-benefits > div + div {
  padding-left: 16px;
  border-left: 1px solid var(--student-line);
}
.student-library .login-benefits svg {
  width: 1.25rem;
  height: 1.25rem;
  margin-top: 2px;
  color: var(--orange);
}
.student-library .login-benefits span {
  min-width: 0;
  color: var(--student-muted-2);
  font-size: 0.76rem;
  line-height: 1.45;
}
.student-library .login-benefits strong {
  display: block;
  margin-bottom: 4px;
  color: var(--white);
  font-size: 0.83rem;
  font-weight: 600;
}

.student-library .login-card {
  width: 100%;
  min-width: 0;
  padding: 30px;
  border: 1px solid var(--student-line-strong);
  border-radius: 6px;
  background: rgba(10, 10, 10, 0.9);
  box-shadow: 0 30px 100px rgba(0,0,0,0.52), 0 0 48px rgba(255,90,0,0.055);
  backdrop-filter: blur(24px);
}
.student-library .login-card::before {
  content: '';
  display: block;
  width: 42px;
  height: 2px;
  margin: -31px 0 28px;
  background: var(--orange);
  box-shadow: 0 0 18px rgba(255,90,0,0.5);
}
.student-library .login-card-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}
.student-library .login-card-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,90,0,0.3);
  border-radius: 4px;
  color: var(--orange);
  background: rgba(255,90,0,0.07);
}
.student-library .login-card-heading span:not(.login-card-icon) {
  display: block;
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.student-library .login-card-heading h2 {
  margin: 4px 0 0;
  color: var(--white);
  font-size: 1.42rem;
  font-weight: 650;
  line-height: 1.1;
}
.student-library .login-card .field { gap: 8px; margin-bottom: 16px; }
.student-library .login-card .field label {
  color: #d8d6d4;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
}
.student-library .input-shell {
  min-height: 52px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 15px;
  border: 1px solid var(--student-line-strong);
  border-radius: 4px;
  background: #080808;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.student-library .input-shell:focus-within {
  border-color: var(--orange);
  background: #0b0b0b;
  box-shadow: 0 0 0 3px rgba(255,90,0,0.1);
}
.student-library .input-shell > svg { width: 1.05rem; height: 1.05rem; color: var(--student-muted-2); }
.student-library .input-shell .input {
  min-width: 0;
  min-height: 50px;
  padding: 0;
  border: 0;
  color: var(--white);
  background: transparent;
  box-shadow: none;
  font-size: 0.93rem;
  font-weight: 500;
}
.student-library .input-shell .input:focus { border: 0; box-shadow: none; }
.student-library .input-shell .input::placeholder { color: #615e5c; }
.student-library .login-card .field small { color: var(--student-muted-2); font-size: 0.74rem; }
.student-library .login-submit {
  width: 100%;
  min-height: 52px;
  justify-content: space-between;
  margin-top: 4px;
  padding: 0 17px;
  border-radius: 4px;
  font-size: 0.69rem;
  letter-spacing: 0.1em;
}
.student-library .login-submit svg { width: 1rem; height: 1rem; transition: transform 180ms ease; }
.student-library .login-submit:hover svg { transform: translateX(3px); }
.student-library .login-card .status { min-height: 20px; margin: 10px 0 0; font-size: 0.79rem; }
.student-library .login-policy {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--student-line);
}
.student-library .login-policy svg { width: 1rem; height: 1rem; color: var(--orange); }
.student-library .login-policy p { margin: 0; color: var(--student-muted-2); font-size: 0.72rem; line-height: 1.55; }
.student-library .login-footer {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0 32px;
  border-top: 1px solid var(--student-line);
  color: #615e5c;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Aplicacao autenticada */
.student-library.is-authenticated { overflow: hidden; }
.student-library .library-app {
  width: 100%;
  height: 100dvh;
  display: grid;
  grid-template-columns: 72px 290px minmax(0, 1fr);
  overflow: hidden;
  color: var(--white);
  background: #050505;
}

.student-library .app-rail {
  position: relative;
  z-index: 4;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 0 16px;
  border-right: 1px solid var(--student-line);
  background: #060606;
}
.student-library .rail-logo { width: 44px; height: 44px; object-fit: contain; margin-bottom: 24px; }
.student-library .rail-categories { width: 100%; display: grid; gap: 5px; margin-top: 12px; }
.student-library .rail-action {
  position: relative;
  width: 100%;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-left: 2px solid transparent;
  color: #a6a3a1;
  background: transparent;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}
.student-library .rail-action svg { width: 1.25rem; height: 1.25rem; }
.student-library .rail-action:hover,
.student-library .rail-action:focus-visible { color: var(--white); background: rgba(255,255,255,0.04); }
.student-library .rail-action[aria-selected="true"] {
  color: var(--orange);
  border-left-color: var(--orange);
  background: rgba(255,90,0,0.08);
}
.student-library .rail-action[title]::after {
  content: attr(title);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  z-index: 12;
  padding: 7px 9px;
  border: 1px solid var(--student-line-strong);
  border-radius: 4px;
  color: var(--white);
  background: #121212;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transform: translate(-4px, -50%);
  transition: opacity 140ms ease, transform 140ms ease;
}
.student-library .rail-action[title]:hover::after,
.student-library .rail-action[title]:focus-visible::after { opacity: 1; transform: translate(0, -50%); }
.student-library .rail-bottom { width: 100%; margin-top: auto; }

.student-library .library-navigation {
  position: relative;
  z-index: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  padding: 24px 28px 20px;
  overflow: hidden;
  border-right: 1px solid var(--student-line);
  background: #090909;
}
.student-library .app-brand { min-width: 0; margin-bottom: 29px; }
.student-library .app-brand img { width: 154px; }
.student-library .app-brand span {
  display: block;
  margin-top: -5px;
  color: #6d6966;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  white-space: nowrap;
}
.student-library .nav-section-label {
  margin-bottom: 10px;
  color: #767270;
  font-family: var(--font-mono);
  font-size: 0.61rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.student-library .library-tabs { display: grid; gap: 2px; margin: 0; }
.student-library .library-tab {
  min-width: 0;
  min-height: 47px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0 12px;
  border: 0;
  border-left: 2px solid transparent;
  border-radius: 0;
  color: #b5b2b0;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0;
  text-align: left;
  text-transform: none;
  transition: color 180ms ease, background 180ms ease, border-color 180ms ease;
}
.student-library .library-tab svg { width: 1.05rem; height: 1.05rem; }
.student-library .library-tab span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-library .library-tab b {
  color: #777370;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
}
.student-library .library-tab:hover,
.student-library .library-tab:focus-visible { color: var(--white); background: rgba(255,255,255,0.035); }
.student-library .library-tab[aria-selected="true"] {
  color: var(--white);
  border-left-color: var(--orange);
  background: rgba(255,255,255,0.065);
}
.student-library .library-tab[aria-selected="true"] svg,
.student-library .library-tab[aria-selected="true"] b { color: var(--orange); }
.student-library .navigation-divider { height: 1px; margin: 22px 0 20px; background: var(--student-line); }
.student-library .recent-list { display: grid; min-height: 0; overflow: hidden; }
.student-library .recent-item {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 11px 3px;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.065);
  color: #b8b5b3;
  background: transparent;
  text-align: left;
}
.student-library .recent-item:hover,
.student-library .recent-item:focus-visible { color: var(--white); }
.student-library .recent-item > svg { width: 1rem; height: 1rem; color: #8a8582; }
.student-library .recent-item span { min-width: 0; }
.student-library .recent-item strong,
.student-library .recent-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-library .recent-item strong { font-size: 0.75rem; font-weight: 500; }
.student-library .recent-item small { margin-top: 3px; color: #716d6a; font-size: 0.64rem; }
.student-library .session-security {
  min-width: 0;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--student-line);
  color: #7a7673;
}
.student-library .session-security svg { width: 1.15rem; height: 1.15rem; color: var(--orange); }
.student-library .session-security strong,
.student-library .session-security span { display: block; }
.student-library .session-security strong { margin-bottom: 2px; color: #a8a5a2; font-size: 0.7rem; font-weight: 500; }
.student-library .session-security span { font-size: 0.62rem; }

.student-library .library-workspace {
  min-width: 0;
  height: 100dvh;
  display: grid;
  grid-template-rows: 72px minmax(0, 1fr);
  overflow: hidden;
  background: #050505;
}
.student-library .workspace-topbar {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid var(--student-line);
  background: rgba(5,5,5,0.92);
}
.student-library .breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #8d8986;
  font-size: 0.86rem;
}
.student-library .breadcrumb svg { width: 0.9rem; height: 0.9rem; color: #5f5b58; }
.student-library .breadcrumb strong { color: var(--orange); font-weight: 500; }
.student-library .student-menu { min-width: 0; display: flex; align-items: center; gap: 10px; }
.student-library .student-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--student-line-strong);
  border-radius: 50%;
  color: var(--white);
  background: #111;
  font-size: 0.82rem;
  font-weight: 600;
}
.student-library .student-menu > span:nth-child(2) { min-width: 0; }
.student-library .student-menu strong,
.student-library .student-menu small { display: block; max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.student-library .student-menu strong { color: #ddd; font-size: 0.78rem; font-weight: 550; }
.student-library .student-menu small { color: #777370; font-size: 0.65rem; }
.student-library .icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #8a8582;
  background: transparent;
}
.student-library .icon-button:hover,
.student-library .icon-button:focus-visible {
  border-color: var(--student-line-strong);
  color: var(--white);
  background: rgba(255,255,255,0.04);
}

.student-library .workspace-scroll {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 20px 30px 32px;
  scrollbar-color: #393532 #0a0a0a;
}
.student-library .command-search {
  width: 100%;
  min-height: 54px;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 0 15px;
  border: 1px solid var(--student-line-strong);
  border-radius: 5px;
  color: #8e8986;
  background: #0a0a0a;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.student-library .command-search:focus-within {
  border-color: rgba(255,90,0,0.7);
  box-shadow: 0 0 0 3px rgba(255,90,0,0.08);
}
.student-library .command-search input {
  min-width: 0;
  height: 50px;
  padding: 0;
  border: 0;
  outline: 0;
  color: var(--white);
  background: transparent;
  font-size: 0.92rem;
}
.student-library .command-search input::placeholder { color: #716c69; }
.student-library .command-search kbd {
  min-width: 26px;
  height: 24px;
  display: grid;
  place-items: center;
  border: 1px solid var(--student-line);
  border-radius: 4px;
  color: #7a7673;
  background: #0d0d0d;
  font-family: var(--font-mono);
  font-size: 0.65rem;
}

.student-library .news-section { margin-top: 18px; padding: 20px 0 0; border-top: 1px solid var(--student-line); }
.student-library .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.student-library .section-heading.compact { align-items: center; margin-bottom: 13px; }
.student-library .section-kicker {
  display: inline-block;
  color: var(--orange);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.student-library .section-heading h2,
.student-library .collection-toolbar h2 {
  margin: 4px 0 0;
  color: var(--white);
  font-size: 1.16rem;
  font-weight: 620;
  line-height: 1.2;
}
.student-library .text-action {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 0;
  border: 0;
  color: #aaa6a3;
  background: transparent;
  font-size: 0.74rem;
}
.student-library .text-action:hover,
.student-library .text-action:focus-visible { color: var(--orange); }
.student-library .text-action svg { width: 0.9rem; height: 0.9rem; }
.student-library .news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--student-line);
  border-bottom: 1px solid var(--student-line);
}
.student-library .news-item {
  min-width: 0;
  min-height: 126px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 18px 16px;
  background: rgba(255,255,255,0.012);
  transition: background 180ms ease;
}
.student-library .news-item + .news-item { border-left: 1px solid var(--student-line); }
.student-library .news-item:hover { background: rgba(255,255,255,0.026); }
.student-library .news-icon {
  width: 32px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid var(--student-line-strong);
  border-radius: 4px;
  color: #b5b1ae;
}
.student-library .news-item > div { min-width: 0; }
.student-library .news-meta {
  display: block;
  margin-bottom: 6px;
  overflow: hidden;
  color: #777370;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.student-library .news-item h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: #e8e6e4;
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.3;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.student-library .news-item p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: #8d8986;
  font-size: 0.72rem;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.student-library .collection-section { margin-top: 26px; }
.student-library .collection-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 16px;
}
.student-library .collection-toolbar > div:first-child { min-width: 0; }
.student-library .collection-toolbar p {
  max-width: 650px;
  margin: 6px 0 0;
  color: #8d8986;
  font-size: 0.78rem;
  line-height: 1.5;
}
.student-library .collection-controls { flex: 0 0 auto; display: flex; align-items: center; gap: 12px; }
.student-library .segmented-control {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--student-line-strong);
  border-radius: 5px;
  overflow: hidden;
}
.student-library .segmented-control button {
  min-width: 70px;
  min-height: 38px;
  padding: 0 12px;
  border: 0;
  color: #8f8b88;
  background: #090909;
  font-size: 0.72rem;
}
.student-library .segmented-control button + button { border-left: 1px solid var(--student-line); }
.student-library .segmented-control button:hover,
.student-library .segmented-control button:focus-visible { color: var(--white); }
.student-library .segmented-control button[aria-pressed="true"] {
  color: var(--white);
  box-shadow: inset 0 -2px 0 var(--orange);
  background: rgba(255,90,0,0.07);
}
.student-library .sort-control { position: relative; min-width: 150px; }
.student-library .sort-control select {
  width: 100%;
  min-height: 40px;
  appearance: none;
  padding: 0 36px 0 12px;
  border: 1px solid var(--student-line-strong);
  border-radius: 5px;
  outline: 0;
  color: #d0cdca;
  background: #090909;
  font-size: 0.72rem;
}
.student-library .sort-control select:focus { border-color: var(--orange); }
.student-library .sort-control > svg {
  position: absolute;
  right: 11px;
  top: 50%;
  width: 0.9rem;
  height: 0.9rem;
  color: #777370;
  pointer-events: none;
  transform: translateY(-50%);
}

.student-library .file-table-head {
  display: grid;
  grid-template-columns: minmax(330px, 1fr) 78px 90px 120px 86px;
  gap: 12px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--student-line);
  color: #6f6b68;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.student-library .files-list { display: grid; }
.student-library .file-row {
  min-width: 0;
  min-height: 104px;
  display: grid;
  grid-template-columns: minmax(330px, 1fr) 78px 90px 120px 86px;
  gap: 12px;
  align-items: center;
  padding: 13px 12px;
  border-bottom: 1px solid var(--student-line);
  transition: background 180ms ease, border-color 180ms ease;
}
.student-library .file-row:hover { background: rgba(255,255,255,0.018); border-bottom-color: rgba(255,90,0,0.28); }
.student-library .file-identity {
  min-width: 0;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
}
.student-library .file-icon {
  width: 52px;
  height: 58px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--student-line-strong);
  border-radius: 5px;
  color: #d0cdca;
  background: #090909;
}
.student-library .file-icon svg { width: 1.35rem; height: 1.35rem; }
.student-library .file-icon em {
  color: #777370;
  font-family: var(--font-mono);
  font-size: 0.47rem;
  font-style: normal;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.student-library .file-identity > div { min-width: 0; }
.student-library .file-category {
  display: block;
  margin-bottom: 4px;
  overflow: hidden;
  color: #777370;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  letter-spacing: 0.08em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.student-library .file-identity h3 {
  margin: 0;
  overflow: hidden;
  color: #f0eeec;
  font-size: 0.95rem;
  font-weight: 620;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.student-library .file-identity p {
  display: -webkit-box;
  margin: 4px 0 0;
  overflow: hidden;
  color: #8d8986;
  font-size: 0.74rem;
  line-height: 1.42;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}
.student-library .file-detail {
  color: #aaa6a3;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  line-height: 1.4;
}
.student-library .file-detail small {
  display: none;
  color: #6f6b68;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.student-library .download-action {
  min-width: 0;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 0 10px;
  border: 1px solid var(--student-line-strong);
  border-radius: 4px;
  color: #ddd9d6;
  background: transparent;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  transition: color 180ms ease, border-color 180ms ease, background 180ms ease;
}
.student-library .download-action svg { width: 0.95rem; height: 0.95rem; color: var(--orange); }
.student-library .download-action:hover,
.student-library .download-action:focus-visible {
  color: var(--white);
  border-color: rgba(255,90,0,0.55);
  background: rgba(255,90,0,0.07);
}
.student-library .download-action:disabled {
  color: #777370;
  border-color: var(--student-line);
  cursor: default;
  opacity: 0.7;
}
.student-library .download-action.compact {
  position: relative;
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-color: transparent;
}
.student-library .download-action.compact span {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
}
.student-library .download-action.is-loading svg { animation: student-spin 0.8s linear infinite; }
.student-library .empty {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 180px;
  padding: 28px;
  border: 0;
  border-bottom: 1px solid var(--student-line);
  color: #777370;
  background: transparent;
}
.student-library .empty svg { width: 1.5rem; height: 1.5rem; margin-bottom: 6px; color: var(--orange); }
.student-library .empty strong { color: #bbb7b4; font-size: 0.9rem; }
.student-library .empty span { font-size: 0.76rem; }
.student-library .collection-count {
  display: block;
  margin-top: 12px;
  color: #625e5b;
  font-family: var(--font-mono);
  font-size: 0.57rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.student-library .collection-count b { color: var(--orange); font-weight: 500; }

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

@media (max-width: 1280px) {
  .student-library .library-app { grid-template-columns: 64px 242px minmax(0, 1fr); }
  .student-library .app-rail { padding-top: 16px; }
  .student-library .library-navigation { padding-inline: 14px; }
  .student-library .library-tab { gap: 6px; padding-inline: 2px; font-size: 0.74rem; }
  .student-library .workspace-topbar,
  .student-library .workspace-scroll { padding-inline: 22px; }
  .student-library .file-table-head,
  .student-library .file-row {
    grid-template-columns: minmax(220px, 1fr) 60px 70px 92px 72px;
    gap: 7px;
  }
}

@media (min-width: 981px) {
  .student-library .command-search { max-width: 640px; }
}

@media (max-width: 980px) {
  .student-library.is-authenticated { overflow: auto; }
  .student-library .library-app {
    height: auto;
    min-height: 100dvh;
    display: block;
    overflow: visible;
  }
  .student-library .app-rail { display: none; }
  .student-library .library-navigation {
    position: sticky;
    top: 0;
    z-index: 20;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 14px 24px;
    padding: 13px 18px 11px;
    overflow: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--student-line);
    background: rgba(7,7,7,0.96);
    backdrop-filter: blur(20px);
  }
  .student-library .app-brand { margin: 0; }
  .student-library .app-brand img { width: 126px; }
  .student-library .app-brand span,
  .student-library .nav-section-label,
  .student-library .navigation-divider,
  .student-library .recent-list,
  .student-library .session-security { display: none; }
  .student-library .library-tabs {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: none;
  }
  .student-library .library-tabs::-webkit-scrollbar { display: none; }
  .student-library .library-tab {
    flex: 0 0 auto;
    width: auto;
    min-height: 39px;
    grid-template-columns: 18px auto;
    gap: 8px;
    padding: 0 11px;
    border-left: 0;
    border-bottom: 2px solid transparent;
    font-size: 0.77rem;
  }
  .student-library .library-tab b { display: none; }
  .student-library .library-tab[aria-selected="true"] { border-bottom-color: var(--orange); }
  .student-library .library-workspace {
    height: auto;
    min-height: calc(100dvh - 66px);
    display: block;
    overflow: visible;
  }
  .student-library .workspace-topbar {
    position: sticky;
    top: 66px;
    z-index: 16;
    min-height: 62px;
    padding-inline: 18px;
    background: rgba(5,5,5,0.94);
    backdrop-filter: blur(18px);
  }
  .student-library .workspace-scroll { overflow: visible; padding: 18px 18px 32px; }
  .student-library .collection-toolbar { align-items: flex-start; }
  .student-library .file-table-head { display: none; }
  .student-library .file-row { grid-template-columns: minmax(0, 1fr) repeat(3, minmax(70px, auto)) 86px; }
  .student-library .file-detail small { display: block; margin-bottom: 3px; }
}

@media (min-width: 861px) {
  .student-library .news-item:nth-child(3n + 1) { border-left: 0; }
  .student-library .news-item:nth-child(n + 4) { border-top: 1px solid var(--student-line); }
}

@media (max-width: 860px) {
  .student-library .login-screen { min-height: 100dvh; overflow: visible; }
  .student-library .login-stage {
    width: min(680px, calc(100% - 36px));
    grid-template-columns: 1fr;
    gap: 30px;
    align-content: center;
    padding: 34px 0;
  }
  .student-library .login-intro { max-width: none; }
  .student-library .login-intro h1 { max-width: 600px; font-size: 2.8rem; }
  .student-library .login-intro > p { max-width: 620px; }
  .student-library .login-benefits { max-width: none; margin-top: 24px; }
  .student-library .login-card { max-width: 560px; }
  .student-library .news-grid {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  .student-library .news-grid::-webkit-scrollbar { display: none; }
  .student-library .news-item { flex: 0 0 min(360px, 82vw); scroll-snap-align: start; }
  .student-library .collection-toolbar { display: grid; }
  .student-library .collection-controls { width: 100%; }
  .student-library .segmented-control { flex: 1 1 auto; }
  .student-library .file-row {
    grid-template-columns: repeat(3, minmax(0, 1fr)) 94px;
    grid-template-areas:
      'identity identity identity identity'
      'format size date action';
    gap: 12px;
    padding-block: 16px;
  }
  .student-library .file-identity { grid-area: identity; }
  .student-library .file-detail:nth-of-type(1) { grid-area: format; }
  .student-library .file-detail:nth-of-type(2) { grid-area: size; }
  .student-library .file-detail:nth-of-type(3) { grid-area: date; }
  .student-library .file-row > .download-action { grid-area: action; }
}

@media (max-width: 600px) {
  .student-library .login-screen { grid-template-rows: 66px auto 42px; }
  .student-library .login-nav { padding-inline: 16px; }
  .student-library .login-brand { gap: 0; }
  .student-library .login-brand img { width: 132px; }
  .student-library .login-brand span { display: none; }
  .student-library .login-nav-status { font-size: 0; }
  .student-library .login-nav-status svg { width: 1.15rem; height: 1.15rem; }
  .student-library .login-stage {
    width: calc(100% - 28px);
    align-content: start;
    gap: 24px;
    padding: 30px 0;
  }
  .student-library .login-kicker { font-size: 0.62rem; }
  .student-library .login-intro h1 { margin-block: 14px 12px; font-size: 2.25rem; line-height: 1.04; }
  .student-library .login-intro > p { font-size: 0.94rem; line-height: 1.55; }
  .student-library .login-benefits { grid-template-columns: 1fr; margin-top: 20px; }
  .student-library .login-benefits > div,
  .student-library .login-benefits > div + div { padding: 11px 0; border-left: 0; }
  .student-library .login-benefits > div + div { border-top: 1px solid var(--student-line); }
  .student-library .login-card { padding: 22px 18px; }
  .student-library .login-card::before { margin: -23px 0 22px; }
  .student-library .login-footer { justify-content: center; padding-inline: 16px; text-align: center; }
  .student-library .login-footer span:last-child { display: none; }
  .student-library .library-navigation { display: block; padding: 10px 12px 8px; }
  .student-library .app-brand { display: flex; align-items: center; margin-bottom: 8px; }
  .student-library .app-brand img { width: 112px; }
  .student-library .library-tab { min-height: 37px; padding-inline: 10px; }
  .student-library .workspace-topbar { top: 101px; min-height: 56px; padding-inline: 13px; }
  .student-library .breadcrumb { gap: 6px; font-size: 0.75rem; }
  .student-library .student-menu > span:nth-child(2) { display: none; }
  .student-library .student-avatar,
  .student-library .icon-button { width: 34px; height: 34px; }
  .student-library .workspace-scroll { padding: 13px 13px 28px; }
  .student-library .command-search { min-height: 50px; grid-template-columns: 22px minmax(0, 1fr); }
  .student-library .command-search input { height: 46px; font-size: 0.84rem; }
  .student-library .command-search kbd { display: none; }
  .student-library .section-heading.compact { align-items: flex-end; }
  .student-library .section-heading h2,
  .student-library .collection-toolbar h2 { font-size: 1.05rem; }
  .student-library .news-item {
    flex-basis: 86vw;
    grid-template-columns: 32px minmax(0, 1fr) 32px;
    padding-inline: 12px;
  }
  .student-library .collection-controls { display: grid; grid-template-columns: 1fr; }
  .student-library .segmented-control,
  .student-library .sort-control { width: 100%; }
  .student-library .segmented-control button { min-width: 0; }
  .student-library .file-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-areas:
      'identity identity identity'
      'format size date'
      'action action action';
    gap: 13px 8px;
    padding: 15px 4px;
  }
  .student-library .file-identity { grid-template-columns: 46px minmax(0, 1fr); gap: 11px; }
  .student-library .file-icon { width: 46px; height: 52px; }
  .student-library .file-identity h3 { white-space: normal; }
  .student-library .file-detail { font-size: 0.62rem; }
  .student-library .file-row > .download-action { width: 100%; min-height: 42px; }
}

@media (max-height: 760px) and (min-width: 861px) {
  .student-library .login-screen { grid-template-rows: 70px minmax(0, 1fr) 38px; }
  .student-library .login-stage { padding-block: 18px; }
  .student-library .login-intro h1 { margin-block: 14px 12px; font-size: 3rem; }
  .student-library .login-intro > p { font-size: 0.98rem; }
  .student-library .login-benefits { margin-top: 22px; }
  .student-library .login-benefits > div { padding-block: 13px; }
  .student-library .login-card { padding-block: 24px; }
  .student-library .login-card::before { margin-top: -25px; margin-bottom: 22px; }
  .student-library .login-card-heading { margin-bottom: 18px; }
  .student-library .login-card .field { margin-bottom: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .student-library *,
  .student-library *::before,
  .student-library *::after { scroll-behavior: auto !important; }
}
