:root {
  color-scheme: light;
  --background: #0b0f1a;
  --surface: #f7f8fc;
  --surface-strong: #eef1f8;
  --text: #0b1220;
  --text-muted: #566074;
  --border: #d7deec;
  --primary: #295cdb;
  --primary-hover: #1e4fc2;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --shadow-sm: 0 6px 16px rgba(15, 23, 42, 0.12);
  --shadow-md: 0 22px 46px rgba(15, 23, 42, 0.18);
  --shadow-lg: 0 34px 70px rgba(15, 23, 42, 0.24);
  --hero-gradient: linear-gradient(135deg, rgba(18, 30, 56, 0.98), rgba(7, 12, 24, 0.94));
  --hero-glow: radial-gradient(circle at top right, rgba(73, 124, 255, 0.3), transparent 60%);
  --ambient-glow: radial-gradient(circle at top, rgba(73, 124, 255, 0.22), transparent 55%);
  --focus-ring: rgba(37, 99, 235, 0.5);
  --focus-ring-soft: rgba(37, 99, 235, 0.2);
  --danger: #dc2626;
  --danger-soft: rgba(220, 38, 38, 0.12);
  --danger-border: rgba(220, 38, 38, 0.35);
  --bg: var(--background);
  --card: var(--surface);
  --primary-dark: var(--primary-hover);
  --primary-soft: rgba(41, 92, 219, 0.14);
  --primary-glow: rgba(41, 92, 219, 0.35);
  --muted: var(--text-muted);
  --shadow: var(--shadow-md);
  --brand-green: #0b6b3c;
  --input-height: 44px;
  --input-padding-x: 14px;
  --glass: rgba(255, 255, 255, 0.75);
  --glass-border: rgba(255, 255, 255, 0.45);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", "Helvetica Neue", Arial, "Noto Sans",
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top, rgba(73, 124, 255, 0.12), transparent 55%),
    linear-gradient(180deg, #eef1f8 0%, #f7f8fc 55%, #f4f6fb 100%);
  line-height: 1.65;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  box-shadow: 0 0 0 4px var(--focus-ring-soft);
}

.auth-locked [data-auth-section] {
  display: none;
}

body:not(.auth-locked) [data-guest-section] {
  display: none;
}

.hero {
  background: #0b1120;
  color: #fff;
  padding: 24px 8vw 48px;
  position: relative;
  overflow: hidden;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero::before {
  background: var(--hero-gradient);
  opacity: 0.85;
}

.hero::after {
  background: var(--hero-glow);
  mix-blend-mode: screen;
  opacity: 0.9;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.16);
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.brand__logo {
  display: block;
  width: auto;
  height: 58px;
  max-width: 190px;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(10, 25, 60, 0.45));
}

.brand__name {
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.brand__subtitle {
  font-size: 0.78rem;
  opacity: 0.8;
}

.topbar__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #f8fafc;
  backdrop-filter: blur(8px);
}

.user-chip__email {
  white-space: nowrap;
}

.user-chip__role {
  font-size: 0.65rem;
}

.language-select select {
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.45);
  color: #fff;
  padding: 12px 18px 12px 48px;
  border-radius: 999px;
  font-weight: 600;
  font-family: inherit;
  font-variant-emoji: emoji;
  cursor: pointer;
  appearance: none;
  background-repeat: no-repeat;
  background-position: 16px center;
  background-size: 20px auto;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.language-select select option {
  color: var(--text);
  font-family: inherit;
  font-variant-emoji: emoji;
  background-repeat: no-repeat;
  background-position: 10px center;
  background-size: 18px auto;
  padding-left: 36px;
}

.language-select select:hover,
.language-select select:focus {
  border-color: rgba(255, 255, 255, 0.65);
  box-shadow: 0 10px 24px rgba(10, 25, 60, 0.2);
  transform: translateY(-1px);
}

.hero__content {
  max-width: 980px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.8s ease;
}

.hero__eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 0.68rem;
  opacity: 0.8;
  margin-bottom: 8px;
}

.hero h1 {
  font-size: clamp(1.9rem, 3vw, 2.8rem);
  margin-bottom: 12px;
}

.hero p {
  max-width: 640px;
  font-size: 0.98rem;
}

.hero__meta {
  display: flex;
  gap: 20px;
  margin-top: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
  opacity: 0.9;
}

.hero__meta span {
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.28);
  backdrop-filter: blur(6px);
}

main {
  padding: 40px 8vw 80px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: var(--space-6);
  box-shadow: var(--shadow-md);
  border: 1px solid rgba(224, 230, 240, 0.9);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeUp 0.85s ease;
  position: relative;
  overflow: hidden;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(41, 92, 219, 0.08), transparent 55%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.landing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 24px;
}

.auth-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  min-height: 100%;
}

.auth-panel h3 {
  font-size: 1.15rem;
}

.auth-panel .modal__grid {
  margin-top: 8px;
}

.auth-panel .modal__actions {
  justify-content: flex-start;
}

.auth-panel .helper-text {
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-panel--status {
  background: #fff;
}

.card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.card__header-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}

.role-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--surface);
  border: 1px solid rgba(215, 222, 236, 0.9);
  border-radius: 14px;
  padding: 12px 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}

.role-bar label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--muted);
}

.role-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.role-note {
  color: var(--muted);
  font-size: 0.85rem;
}

.helper-text {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
}

.helper-text--error {
  color: var(--danger);
}

.upload-status {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--text);
  font-size: 0.8rem;
}

.upload-status__bar {
  position: relative;
  width: 140px;
  height: 6px;
  border-radius: 999px;
  background: rgba(41, 92, 219, 0.15);
  overflow: hidden;
}

.upload-status__bar::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(41, 92, 219, 0.85), transparent);
  animation: upload-bar-spin 1.2s linear infinite;
  animation-play-state: paused;
}

.upload-status__text {
  white-space: nowrap;
}

.upload-status--active .upload-status__bar::after {
  animation-play-state: running;
}

@keyframes upload-bar-spin {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(220%);
  }
}

.card__header h2 {
  font-size: 1.7rem;
  margin-bottom: 4px;
}

.card__header p {
  color: var(--muted);
}

.header__stats {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.header__stats div {
  background: linear-gradient(135deg, rgba(41, 92, 219, 0.16), rgba(41, 92, 219, 0.05));
  padding: 12px 16px;
  border-radius: var(--radius-md);
  min-width: 140px;
  border: 1px solid rgba(41, 92, 219, 0.18);
  box-shadow: var(--shadow-sm);
}

.header__stats strong {
  display: block;
  font-size: 1.2rem;
}

.header__stats span {
  font-size: 0.85rem;
  color: var(--muted);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.01em;
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease,
    background 0.15s ease, border-color 0.15s ease;
}

.btn:hover:not(:disabled) {
  opacity: 0.92;
  transform: translateY(-1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

.btn--primary {
  background: linear-gradient(135deg, var(--primary), #3b82f6);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 12px 30px rgba(41, 92, 219, 0.3);
}

.btn--primary:hover:not(:disabled) {
  background: linear-gradient(135deg, var(--primary-hover), #2563eb);
  box-shadow: 0 16px 30px var(--primary-glow);
}

.btn--secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
}

.btn--secondary:hover:not(:disabled) {
  background: #fff;
}

.btn--secondary.btn--inverse {
  background: rgba(255, 255, 255, 0.28);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  box-shadow: 0 14px 28px rgba(10, 25, 60, 0.28);
  backdrop-filter: blur(8px);
}

.btn--secondary.btn--inverse:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.32);
  box-shadow: 0 18px 32px rgba(10, 25, 60, 0.32);
}

.btn--ghost {
  background: transparent;
  box-shadow: none;
}

.btn--danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}

.btn--danger:hover:not(:disabled) {
  background: rgba(220, 38, 38, 0.18);
}

.btn--sm {
  padding: 7px 14px;
  font-size: 0.8rem;
  border-radius: 10px;
}

.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.search {
  flex: 1 1 320px;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  height: var(--input-height);
  border-radius: 12px;
  border: 1px solid rgba(215, 222, 236, 0.95);
  padding: 0 var(--input-padding-x);
  font-size: 0.95rem;
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease,
    transform 0.2s ease;
}

.form-input:disabled,
.form-select:disabled,
.form-textarea:disabled {
  background: #d3d7df;
  color: rgba(60, 70, 85, 0.85);
  border-color: rgba(160, 170, 185, 0.8);
  cursor: not-allowed;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: rgba(90, 100, 120, 0.8);
}

.form-input:focus-visible,
.form-select:focus-visible,
.form-textarea:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px var(--focus-ring-soft);
  transform: translateY(-1px);
}

.form-textarea {
  height: auto;
  min-height: 120px;
  padding: 10px var(--input-padding-x);
  resize: vertical;
}

.form-input--pill {
  border-radius: 999px;
}

.form-select--sm {
  height: 36px;
  padding: 0 10px;
  font-size: 0.85rem;
  border-radius: 10px;
}

.form-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.01em;
}

.search input {
  width: 100%;
}

.toggle {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface-strong);
  padding: 6px;
  border-radius: 999px;
}

.toggle__btn {
  border: none;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.toggle__btn:hover {
  background: rgba(255, 255, 255, 0.7);
  color: var(--text);
}

.toggle__btn--active {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow-sm);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.filters label {
  font-size: 0.85rem;
}

.table-wrapper {
  overflow-x: visible;
  max-width: 100%;
}

.table {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
}

.table__row {
  display: grid;
  grid-template-columns: repeat(13, minmax(90px, 1fr));
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(247, 248, 252, 0.92));
  border: 1px solid rgba(215, 222, 236, 0.9);
  font-size: 0.95rem;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.table__row > * {
  min-width: 0;
  word-break: break-word;
}

.table__row[data-pdf-url] {
  cursor: pointer;
}

.table__row[data-pdf-url]:hover {
  box-shadow: 0 18px 30px rgba(10, 25, 60, 0.16);
  border-color: rgba(41, 92, 219, 0.35);
}

.table__row:not(.table__header)[data-status="obsolete"] {
  background: linear-gradient(135deg, rgba(254, 226, 226, 0.96), rgba(255, 241, 242, 0.92));
  border-color: rgba(220, 38, 38, 0.35);
}

.table__row:not(.table__header)[data-status="obsolete"][data-pdf-url]:hover {
  border-color: rgba(185, 28, 28, 0.65);
  box-shadow: 0 18px 30px rgba(185, 28, 28, 0.18);
}

.table__empty {
  grid-column: 1 / -1;
  padding: 20px 16px;
  border-radius: 14px;
  border: 1px dashed var(--border);
  background: var(--card);
  color: var(--muted);
  text-align: center;
}

.table__header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--card);
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(224, 230, 240, 0.7);
  font-weight: 600;
  color: var(--muted);
}

.table__link {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

.table__link:hover {
  text-decoration: underline;
}

.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border: 1px solid transparent;
}

.chip--active {
  background: rgba(11, 107, 60, 0.12);
  color: var(--brand-green);
  border-color: rgba(11, 107, 60, 0.2);
}

.chip--inactive {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: var(--danger-border);
}

.chip--admin {
  background: rgba(37, 99, 235, 0.12);
  color: var(--primary);
  border-color: rgba(37, 99, 235, 0.25);
}

.chip--viewer {
  background: rgba(15, 23, 42, 0.08);
  color: var(--text);
  border-color: rgba(15, 23, 42, 0.2);
}

.chip--editor {
  background: rgba(14, 116, 144, 0.12);
  color: #0e7490;
  border-color: rgba(14, 116, 144, 0.22);
}

.modal {
  border: none;
  border-radius: 20px;
  padding: 0;
  max-width: 900px;
  width: min(92vw, 900px);
  background: transparent;
  box-shadow: none;
}

#login-modal {
  max-width: 520px;
  width: min(92vw, 520px);
  margin: auto;
}

#login-modal[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.modal::backdrop {
  background: rgba(10, 18, 32, 0.68);
}

.modal[open] {
  animation: modalFadeScale 0.16s ease-out;
}

.modal[open]::backdrop {
  animation: modalBackdropFade 0.16s ease-out;
}

.modal__content {
  background: var(--card);
  padding: 28px;
  display: grid;
  gap: 18px;
  border-radius: 20px;
  border: 1px solid rgba(224, 230, 240, 0.9);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.22);
}

.modal__content--login {
  position: relative;
  padding: 36px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(245, 248, 255, 0.94));
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.28);
  backdrop-filter: blur(8px);
}

.modal__content--login::before {
  content: "";
  position: absolute;
  left: 32px;
  right: 32px;
  top: 0;
  height: 5px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(37, 99, 235, 0.95), rgba(14, 116, 144, 0.9), rgba(59, 130, 246, 0.9));
}

.modal__content--login .modal__header {
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.modal__content--login .login-logo {
  width: 150px;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 20px rgba(15, 23, 42, 0.2));
}

.login-subtitle {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 360px;
}

.modal__content--login .modal__grid {
  grid-template-columns: 1fr;
  gap: 16px;
}

.modal__content--login .modal__grid input {
  padding: 12px 14px;
  border-radius: 12px;
}

.modal__content--login .modal__actions {
  justify-content: stretch;
}

.modal__content--login .modal__actions .btn--primary {
  width: 100%;
}

.modal__content--login .helper-text {
  font-size: 0.8rem;
}

.modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 4px;
}

.modal__header h3 {
  font-size: 1.3rem;
}

.modal__close {
  background: rgba(15, 23, 42, 0.06);
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--muted);
  width: 36px;
  height: 36px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.modal__close:hover,
.modal__close:focus-visible {
  background: rgba(15, 23, 42, 0.12);
  color: var(--text);
  transform: translateY(-1px);
  outline: none;
}

.modal__content--login .modal__close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.modal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.modal__grid label {
  font-size: 0.85rem;
}

.modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding-top: 4px;
}

@keyframes modalFadeScale {
  from {
    opacity: 0;
    transform: translateY(12px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes modalBackdropFade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .modal[open],
  .modal[open]::backdrop,
  .modal__close {
    animation: none;
    transition: none;
  }
}

.assignment-list {
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.assignment-list h4 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.assignment-list ul {
  list-style: none;
  display: grid;
  gap: 8px;
}

.assignment-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  background: var(--surface);
  border-radius: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(224, 230, 240, 0.9);
  box-shadow: none;
}

.assignment-summary {
  display: grid;
  gap: 8px;
}

.assignment-title {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.assignment-email {
  font-weight: 600;
  font-size: 1rem;
}

.assignment-meta {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.78rem;
}

.assignment-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.assignment-control {
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
}

.assignment-select {
  text-transform: capitalize;
}

.audit-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 10px;
  font-size: 0.9rem;
  table-layout: fixed;
}

.audit-table th,
.audit-table td {
  min-width: 0;
  word-break: break-word;
}

.audit-table thead th {
  text-align: left;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  padding: 0 12px 8px;
}

.audit-table tbody td {
  background: var(--surface);
  padding: 12px 14px;
  border-top: 1px solid rgba(224, 230, 240, 0.9);
  border-bottom: 1px solid rgba(224, 230, 240, 0.9);
}

.audit-table tbody td:first-child {
  border-left: 1px solid rgba(224, 230, 240, 0.9);
  border-radius: 14px 0 0 14px;
}

.audit-table tbody td:last-child {
  border-right: 1px solid rgba(224, 230, 240, 0.9);
  border-radius: 0 14px 14px 0;
}

.audit-table tbody tr:hover td {
  background: #fff;
}

.sort {
  background: transparent;
  border: none;
  text-align: left;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
  position: relative;
  padding-right: 16px;
}

.sort::after {
  content: "⇅";
  position: absolute;
  right: 0;
  top: 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.summary {
  background: var(--card);
  padding: 24px;
  border-radius: 16px;
  box-shadow: var(--shadow-md);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: fadeUp 0.9s ease;
  border: 1px solid rgba(224, 230, 240, 0.85);
}

.summary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.summary h3 {
  margin-bottom: 12px;
}

.summary ul {
  list-style: none;
  display: grid;
  gap: 10px;
}

.summary__list {
  list-style: none;
  display: grid;
  gap: 10px;
  padding-left: 0;
  margin-top: 12px;
  color: var(--text);
}

.summary a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

footer {
  text-align: center;
  color: rgba(15, 23, 42, 0.6);
  padding: 24px 16px 48px;
}

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

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 999;
  pointer-events: none;
}

.toast {
  min-width: 220px;
  max-width: 320px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #111827;
  color: #f8fafc;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: auto;
}

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

.toast--success {
  background: #0b6b3c;
}

.toast--error {
  background: #9f1239;
}

.toast--info {
  background: #1e293b;
}

@media (max-width: 900px) {
  .card__header-actions {
    align-items: flex-start;
  }

  .table__row {
    grid-template-columns: repeat(13, minmax(80px, 1fr));
  }

  .assignment-list li {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .assignment-actions {
    justify-items: stretch;
  }
}
