/* Speech & Theater Arts — modern agency-inspired UI (Lightflows-style) */

:root {
  --ink-950: #06060a;
  --ink-900: #0a0a0f;
  --ink-800: #12121a;
  --ink-700: #1a1a24;
  --purple-950: #0f0a18;
  --purple-900: #14101f;
  --purple-800: #1e1830;
  --purple-700: #5b4a8a;
  --purple-600: #7c5cff;
  --purple-500: #a78bfa;
  --purple-200: #e4ddff;
  --purple-100: #f3f0ff;
  --accent-cyan: #22d3ee;
  --accent-coral: #fb7185;
  --gradient-brand: linear-gradient(120deg, var(--accent-cyan) 0%, var(--purple-500) 55%, var(--accent-coral) 100%);
  --gradient-subtle: linear-gradient(135deg, rgb(34 211 238 / 0.12), rgb(167 139 250 / 0.1));
  --slate-50: #f6f6f8;
  --slate-100: #ececf0;
  --slate-200: #dcdce4;
  --slate-500: #6b6b7b;
  --slate-600: #52525f;
  --slate-700: #3a3a46;
  --slate-900: #0c0c12;
  --white: #ffffff;
  --success-bg: #d1fae5;
  --success-text: #065f46;
  --warn-bg: #fef3c7;
  --warn-text: #92400e;
  --info-bg: #e0f7fa;
  --info-text: #0e7490;
  --danger: #e11d48;
  --danger-bg: #ffe4e6;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-w: 280px;
  --shadow: 0 1px 2px rgb(12 12 18 / 0.04), 0 8px 24px rgb(12 12 18 / 0.06);
  --shadow-md: 0 12px 40px rgb(12 12 18 / 0.1);
  --shadow-glow: 0 0 48px rgb(34 211 238 / 0.18);
  --font: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-display: "Syne", var(--font);
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Ambient gradient orbs */
.ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  animation: orb-drift 22s var(--ease-out) infinite alternate;
}

.orb-a {
  width: 420px;
  height: 420px;
  background: rgb(34 211 238 / 0.35);
  top: -8%;
  left: -6%;
}

.orb-b {
  width: 360px;
  height: 360px;
  background: rgb(167 139 250 / 0.32);
  bottom: 10%;
  right: 8%;
  animation-delay: -6s;
}

.orb-c {
  width: 280px;
  height: 280px;
  background: rgb(251 113 133 / 0.22);
  top: 42%;
  left: 38%;
  animation-delay: -12s;
}

@keyframes orb-drift {
  from {
    transform: translate(0, 0) scale(1);
  }
  to {
    transform: translate(28px, -18px) scale(1.06);
  }
}

.text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.animate-in {
  animation: fade-up 0.55s var(--ease-out) both;
}

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

.auth-body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  background: var(--ink-950);
  color: var(--slate-900);
}

.app-body {
  margin: 0;
  font-family: var(--font);
  color: var(--slate-900);
  background: var(--slate-50);
  min-height: 100vh;
}
/* ----- App shell + sidebar ----- */
.app-shell {
  display: flex;
  min-height: 100vh;
  position: relative;
  z-index: 1;
}

.sidebar {
  width: var(--sidebar-w);
  flex-shrink: 0;
  background: rgb(10 10 15 / 0.88);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  color: rgb(255 255 255 / 0.92);
  display: flex;
  flex-direction: column;
  padding: 1.35rem 0.85rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgb(255 255 255 / 0.06);
  box-shadow: 4px 0 32px rgb(0 0 0 / 0.2);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0 0.75rem 1.35rem;
  border-bottom: 1px solid rgb(255 255 255 / 0.08);
}

.sidebar-logo {
  font-size: 1.75rem;
  line-height: 1;
  filter: drop-shadow(0 0 12px rgb(34 211 238 / 0.35));
}

.sidebar-brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.sidebar-brand-sub {
  font-size: 0.68rem;
  opacity: 0.65;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.sidebar-user {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.25rem 0.75rem;
  padding: 0.9rem;
  border-radius: var(--radius-sm);
  background: rgb(255 255 255 / 0.05);
  border: 1px solid rgb(255 255 255 / 0.08);
}

.sidebar-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--gradient-brand);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: var(--shadow-glow);
}
.sidebar-avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 0.8rem;
}

.sidebar-user-name {
  font-weight: 600;
  font-size: 0.92rem;
  color: #fff;
}

.sidebar-user-role {
  font-size: 0.75rem;
  opacity: 0.85;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  flex: 1;
  padding: 0 0.35rem;
}

.sidebar-link {
  display: block;
  padding: 0.62rem 0.85rem;
  border-radius: var(--radius-sm);
  color: rgb(255 255 255 / 0.88);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, color 0.15s;
}

.sidebar-link:hover {
  background: rgb(255 255 255 / 0.1);
  color: #fff;
}

.sidebar-link.is-active {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 20px rgb(34 211 238 / 0.25);
}

.sidebar-nav-group {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.sidebar-link-group {
  font-weight: 600;
}

.sidebar-subnav {
  display: none;
  flex-direction: column;
  gap: 0.1rem;
  padding-left: 0.65rem;
  margin-bottom: 0.15rem;
  border-left: 2px solid rgb(255 255 255 / 0.15);
  margin-left: 0.85rem;
}

.sidebar-nav-group.is-open .sidebar-subnav {
  display: flex;
}

.sidebar-sublink {
  font-size: 0.84rem;
  padding: 0.5rem 0.75rem;
}

.settings-hub {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.settings-hub-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.settings-hub-card:hover {
  border-color: var(--purple-400);
  box-shadow: var(--shadow);
}

.sidebar-link-logout {
  margin-top: 0.25rem;
  color: rgb(254 226 226 / 0.95);
}

.sidebar-footer {
  padding-top: 1rem;
  border-top: 1px solid rgb(255 255 255 / 0.1);
  margin-top: auto;
}

/* ----- Main ----- */
.app-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: transparent;
}

.app-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.85rem;
  background: rgb(255 255 255 / 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgb(220 220 228 / 0.8);
  box-shadow: var(--shadow);
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-topbar-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--slate-900);
}
.app-topbar-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.notify-wrap {
  position: relative;
}

.app-topbar-notify {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.35rem;
  border: none;
  border-radius: 10px;
  background: transparent;
  color: var(--slate-500);
  cursor: pointer;
  line-height: 0;
  transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, box-shadow 0.18s ease;
}

.app-topbar-notify:hover {
  color: var(--purple-700);
  background: var(--purple-100);
  box-shadow: 0 2px 8px rgb(124 58 237 / 0.12);
}

.app-topbar-notify:focus-visible {
  color: var(--purple-700);
  background: var(--purple-100);
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.app-topbar-notify:active {
  transform: scale(0.96);
  background: var(--purple-200);
}

.notify-panel {
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  width: min(380px, calc(100vw - 2rem));
  max-height: min(70vh, 420px);
  overflow-y: auto;
  background: var(--white);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  z-index: 50;
  padding: 0.35rem 0;
}

.notify-panel.is-open {
  display: block;
}

.notify-panel-empty {
  padding: 1.25rem 1rem;
  text-align: center;
  font-size: 0.9rem;
}

.notify-section {
  padding: 0.25rem 0 0.5rem;
  border-bottom: 1px solid var(--slate-100);
}

.notify-section:last-child {
  border-bottom: none;
}

.notify-section-title {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--slate-500);
  padding: 0.35rem 1rem 0.5rem;
}

.notify-item {
  display: block;
  padding: 0.65rem 1rem;
  text-decoration: none;
  color: inherit;
  border-top: 1px solid var(--slate-50);
}

.notify-item:hover {
  background: var(--purple-100);
}

.notify-item-title {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--slate-900);
}

.notify-item-snippet {
  display: block;
  font-size: 0.8rem;
  color: var(--slate-500);
  margin-top: 0.2rem;
  line-height: 1.35;
}

.notify-item-time {
  display: block;
  font-size: 0.72rem;
  margin-top: 0.35rem;
}

.app-topbar-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  background: var(--danger);
  color: white;
  font-size: 0.65rem;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.28rem;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.topbar-user-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  font-size: 0.82rem;
  max-width: 220px;
}

.topbar-user-chip .muted {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-page {
  flex: 1;
  padding: 1.5rem 1.75rem 2.5rem;
  max-width: 1400px;
  width: 100%;
  position: relative;
  z-index: 1;
}

.app-footer {
  padding: 1rem 1.75rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--slate-500);
  border-top: 1px solid var(--slate-200);
  background: rgb(255 255 255 / 0.65);
  backdrop-filter: blur(12px);
  position: relative;
  z-index: 1;
}
.app-footer p {
  margin: 0;
}

/* ----- Typography & page chrome ----- */
.muted {
  color: var(--slate-500);
  font-size: 0.9rem;
}

.page-lead {
  margin: -0.25rem 0 1.35rem;
  color: var(--slate-500);
  font-size: 0.95rem;
}

.greeting-line {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--slate-900);
  margin: 0 0 0.35rem;
}

h1:not(.app-topbar-title) {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 0.5rem;
  color: var(--slate-900);
}

h2.section-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--slate-700);
  margin: 0 0 1rem;
}

/* ----- Cards ----- */
.card {
  background: rgb(255 255 255 / 0.92);
  backdrop-filter: blur(8px);
  border-radius: var(--radius);
  padding: 1.4rem 1.55rem;
  margin-bottom: 1.15rem;
  border: 1px solid rgb(220 220 228 / 0.9);
  box-shadow: var(--shadow);
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgb(167 139 250 / 0.35);
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.card-flat {
  box-shadow: none;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

/* ----- Tabs & filters ----- */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-bottom: 1rem;
}

.tabs a {
  padding: 0.45rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--slate-500);
  border: 1px solid transparent;
}

.tabs a:hover {
  background: var(--purple-100);
  color: var(--purple-800);
}

.tabs a.is-active {
  background: var(--gradient-brand);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 14px rgb(34 211 238 / 0.2);
}
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.form-select {
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: var(--white);
  font-family: inherit;
  font-size: 0.9rem;
}

/* ----- Layout rows ----- */
.layout-split {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 1.5rem;
  align-items: start;
}

@media (max-width: 1100px) {
  .layout-split {
    grid-template-columns: 1fr;
  }
}

/* ----- Stats ----- */
.grid-stats {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.stat {
  background: rgb(255 255 255 / 0.9);
  border: 1px solid var(--slate-200);
  padding: 1.2rem 1rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out);
}

.stat::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--gradient-brand);
}

.stat:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* ----- Buttons ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.55rem 1.15rem;
  border-radius: var(--radius-sm);
  border: none;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
  transition:
    background 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    filter 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.12s ease;
}

.btn:focus-visible {
  outline: 2px solid var(--purple-500);
  outline-offset: 2px;
}

.btn:focus:not(:focus-visible) {
  outline: none;
}

.btn:hover {
  text-decoration: none;
}

.btn:active {
  transform: translateY(1px);
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-primary {
  background: var(--gradient-brand);
  color: #fff;
  box-shadow: 0 4px 16px rgb(34 211 238 / 0.28);
}

.btn-primary:hover {
  filter: brightness(1.06);
  box-shadow: 0 8px 24px rgb(124 92 255 / 0.35);
}
.btn-primary:active {
  filter: brightness(0.96);
}

.btn-secondary {
  background: var(--white);
  color: var(--slate-700);
  border: 1px solid var(--slate-200);
}

.btn-secondary:hover {
  background: var(--purple-100);
  border-color: var(--purple-200);
  color: var(--purple-900);
}

.btn-secondary:active {
  background: var(--purple-200);
  border-color: var(--purple-500);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
  box-shadow: 0 2px 8px rgb(220 38 38 / 0.22);
}

.btn-danger:hover {
  filter: brightness(1.1);
  box-shadow: 0 4px 14px rgb(220 38 38 / 0.38);
}

.btn-danger:active {
  filter: brightness(0.94);
}

.btn-ghost {
  background: transparent;
  color: var(--purple-700);
}

.btn-ghost:hover {
  background: var(--purple-100);
  color: var(--purple-900);
}

.btn-ghost:active {
  background: var(--purple-200);
}

.btn-sm {
  padding: 0.35rem 0.75rem;
  font-size: 0.8rem;
}

/* Primary actions above tables / filters */
.page-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

/* Save / Cancel rows on edit forms */
.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

/* Role filter chips, etc. */
.filter-pills {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.filter-pills > .muted {
  margin-right: 0.15rem;
}

.list-filters {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
}

.list-filters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: 0.75rem 1rem;
  align-items: end;
}

.list-filters-field label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--slate-600);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.list-filters-input,
.list-filters-select {
  width: 100%;
  min-width: 0;
}

.list-filters-input {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  font-family: inherit;
  font-size: 0.9rem;
}

.list-filters-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--slate-200);
}

.list-filters-result {
  font-size: 0.88rem;
  color: var(--slate-600);
  margin: 0 0 0.75rem;
}

/* ----- Tables ----- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  background: var(--white);
}

table.data thead th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--slate-500);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-size: 0.72rem;
  background: var(--slate-50);
  border-bottom: 1px solid var(--slate-200);
}

table.data tbody td {
  padding: 1rem;
  vertical-align: middle;
  border-bottom: 1px solid var(--slate-100);
}

table.data tbody tr:hover {
  background: var(--purple-100);
  background: rgb(237 233 254 / 0.5);
}

table.data th.col-actions,
table.data td.col-actions {
  text-align: right;
  white-space: nowrap;
  width: 1%;
}

.lesson-folder-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--purple-100), var(--purple-200));
  color: var(--purple-800);
}

.cell-title-stack strong {
  display: block;
  color: var(--slate-900);
  font-size: 0.95rem;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  background: var(--slate-100);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--slate-700);
}

/* ----- Badges ----- */
.badge {
  display: inline-block;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
}

.badge-submit {
  background: var(--info-bg);
  color: var(--info-text);
}

.badge-eval-pending {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.badge-done {
  background: var(--success-bg);
  color: var(--success-text);
}

.badgemuted {
  background: var(--slate-100);
  color: var(--slate-600);
}

/* backward compat names */
.badge-graded {
  background: var(--success-bg);
  color: var(--success-text);
}

.badge-pending {
  background: var(--warn-bg);
  color: var(--warn-text);
}

.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--slate-500);
}

/* ----- Forms (light theme) ----- */
.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--slate-700);
  font-size: 0.88rem;
  font-weight: 600;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group input[type="number"],
.form-group input[type="file"],
.form-group select,
.form-group textarea {
  width: 100%;
  max-width: 520px;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: var(--white);
  color: var(--slate-900);
  font-family: inherit;
  font-size: 0.95rem;
}

.auth-body .form-group input,
.auth-body .form-group select,
.auth-body .form-group textarea {
  background: rgb(255 255 255 / 0.95);
  border-color: var(--slate-200);
}

.form-group textarea {
  min-height: 110px;
  max-width: 100%;
}

/* Hide number input stepper arrows system-wide */
input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.enrollment-form .form-row .form-group--subject {
  flex: 2 1 320px;
  min-width: 320px;
}

.enrollment-form .form-group--subject .form-select--wide {
  width: 100%;
  min-width: 320px;
  max-width: 480px;
}

.enrollment-profile-summary {
  margin-bottom: 1.25rem;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-sm);
  background: var(--slate-50, #f8fafc);
  border: 1px solid var(--slate-200);
}

.enrollment-profile-dl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.75rem 1.25rem;
  margin: 0;
}

.enrollment-profile-dl dt {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  margin: 0 0 0.2rem;
}

.enrollment-profile-dl dd {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-900);
}

.enrollment-subject-chips {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.enrollment-subject-chips li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.75rem;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--slate-200);
  font-size: 0.88rem;
}

.enrollment-subject-groups {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.enrollment-subject-group {
  border: none;
  margin: 0;
  padding: 0;
}

.enrollment-subject-group-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--slate-900);
  margin: 0 0 0.5rem;
  padding: 0;
}

.enrollment-subject-group .enrollment-subject-check {
  margin-bottom: 0.5rem;
}

.enrollment-subject-group .enrollment-subject-check:last-child {
  margin-bottom: 0;
}

.enrollment-subject-checkboxes {
  border: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.enrollment-subject-check {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 0.85rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  background: var(--white);
  cursor: pointer;
  font-size: 0.95rem;
}

.enrollment-subject-check:hover {
  border-color: var(--cyan-500, #06b6d4);
  background: rgb(6 182 212 / 0.04);
}

.enrollment-subject-check input {
  width: 1.1rem;
  height: 1.1rem;
  accent-color: var(--cyan-600, #0891b2);
}

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

.bulk-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--slate-50, #f8fafc);
  border: 1px solid var(--slate-200);
}

.bulk-select-all {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.bulk-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.data th.col-check,
.data td.col-check {
  width: 2.5rem;
  text-align: center;
  vertical-align: middle;
}

.data tr.row-course-only td {
  background: rgb(248 250 252 / 0.85);
}

/* ----- Alerts ----- */
.alert {
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  font-size: 0.9rem;
}

.alert-success {
  background: var(--success-bg);
  color: var(--success-text);
  border: 1px solid rgb(110 231 183 / 0.5);
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid rgb(252 165 165 / 0.5);
}

.auth-body .alert-error {
  background: rgb(254 226 226 / 0.95);
}

.auth-body code {
  font-size: 0.82em;
}

/* ----- Upload dropzone ----- */
.dropzone-panel {
  border: 2px dashed var(--slate-200);
  border-radius: var(--radius);
  padding: 1.5rem;
  text-align: center;
  background: var(--slate-50);
  margin-bottom: 1rem;
}

.dropzone-panel p.muted {
  margin: 0.5rem 0 0;
  font-size: 0.85rem;
}

/* ----- Login / auth ----- */
.login-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  padding: 2rem 1.5rem;
  max-width: 1080px;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .login-page {
    grid-template-columns: 1fr minmax(320px, 420px);
    padding: 3rem 2.5rem;
  }
}

/* Hero panel: light type on dark auth background (overrides .auth-body text color) */
.auth-body .login-hero {
  color: rgb(255 255 255 / 0.94);
  max-width: 520px;
}

.auth-body .login-hero .login-hero-eyebrow {
  margin: 0 0 1rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-cyan);
}

.auth-body .login-hero .login-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.04em;
  margin: 0 0 1.25rem;
  color: rgb(255 255 255 / 0.96);
}

.auth-body .login-hero .login-hero-title .text-gradient {
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.auth-body .login-hero .login-hero-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: rgb(255 255 255 / 0.72);
  max-width: 42ch;
}

.auth-body .login-hero .login-hero-lead strong {
  color: rgb(255 255 255 / 0.9);
  font-weight: 600;
}

.login-card {
  width: 100%;
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 2.35rem 2rem;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgb(255 255 255 / 0.2);
  box-shadow: var(--shadow-md), 0 0 0 1px rgb(255 255 255 / 0.05) inset;
}

.login-brand {
  text-align: center;
  margin-bottom: 1rem;
}

.login-brand-logo {
  font-size: 2.5rem;
}

.login-brand h1 {
  margin: 0.35rem 0 0;
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: var(--gradient-brand);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.login-card-sub {
  text-align: center;
  margin-bottom: 1.5rem !important;
}

.auth-body .login-card a {
  color: var(--purple-600);
  font-weight: 600;
  text-decoration: none;
}

.auth-body .login-card a:hover {
  text-decoration: underline;
}

.auth-body .form-group input:focus,
.auth-body .form-group select:focus,
.auth-body .form-group textarea:focus,
.app-body .form-group input:focus,
.app-body .form-group select:focus,
.app-body .form-group textarea:focus {
  outline: none;
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 3px rgb(34 211 238 / 0.2);
}
/* ----- Misc ----- */
.actions-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.card .actions-inline,
p.actions-inline {
  justify-content: flex-start;
}

table.data td.col-actions .actions-inline {
  justify-content: flex-end;
}

.actions-inline form {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: none;
  background: var(--slate-100);
  color: var(--slate-600);
  cursor: pointer;
  text-decoration: none;
}

.icon-btn:hover {
  background: var(--purple-100);
  color: var(--purple-700);
}

.crit-row {
  display: grid;
  grid-template-columns: 1fr 100px;
  gap: 0.5rem;
  align-items: end;
  margin-bottom: 0.5rem;
}

.peer-list .card {
  margin-bottom: 0.65rem;
}

/* ----- Evaluation studio (instructor evaluate) ----- */
.eval-studio {
  display: grid;
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr) minmax(200px, 300px);
  gap: 1rem;
  align-items: start;
}

.eval-aside-title {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: var(--purple-900);
}

.eval-queue-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.eval-queue-list li {
  margin-bottom: 0.35rem;
}

.eval-queue-list a {
  display: block;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  background: var(--slate-50);
  color: inherit;
  text-decoration: none;
  border: 1px solid var(--slate-200);
  transition: border-color 0.15s, background 0.15s;
}

.eval-queue-list a:hover {
  border-color: var(--purple-200);
  background: var(--purple-100);
}

.eval-queue-list a.is-current {
  border-color: var(--purple-500);
  background: linear-gradient(135deg, var(--purple-100), var(--white));
}

.qe-title {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--slate-900);
}

.qe-student {
  display: block;
  font-size: 0.78rem;
  color: var(--slate-500);
}

.qe-mini {
  margin-top: 0.25rem;
  font-size: 0.68rem !important;
  padding: 0.1rem 0.35rem !important;
}

.rubric-matrix-head {
  margin-bottom: 0.75rem;
}

.rubric-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.rubric-matrix th,
.rubric-matrix td {
  padding: 0.5rem 0.35rem;
  text-align: center;
  border-bottom: 1px solid var(--slate-200);
  vertical-align: middle;
}

.rubric-matrix td:first-child {
  text-align: left;
}

.rubric-cell {
  padding: 0.25rem !important;
}

.rubric-radio {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  gap: 0.15rem;
  margin: 0;
}

.rubric-radio input[type="radio"] {
  accent-color: var(--purple-600);
}

.eval-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
}

.eval-video-shell {
  margin-bottom: 1rem;
}

.eval-video-el {
  width: 100%;
  border-radius: var(--radius-sm);
  background: #000;
  max-height: 220px;
}

.eval-file-meta {
  margin: 0.35rem 0 0.5rem;
  font-size: 0.78rem;
}

.eval-donut-wrap {
  text-align: center;
  margin: 1rem 0;
}

.score-donut {
  width: 120px;
  height: 120px;
  margin: 0 auto;
  border-radius: 50%;
  background: conic-gradient(var(--accent-cyan) calc(var(--p, 40) * 1%), var(--slate-200) 0);  display: flex;
  align-items: center;
  justify-content: center;
}

.score-donut-inner {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: var(--white);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  line-height: 1.05;
  box-shadow: var(--shadow);
}

.sdn-t {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--purple-800);
}

.sdn-m,
.sdn-b {
  font-size: 0.8rem;
  color: var(--slate-500);
}

.eval-quality-label {
  margin: 0.5rem 0 0;
  font-weight: 600;
  color: var(--purple-700);
}

.score-donut-sm {
  width: 88px;
  height: 88px;
}

.score-donut-sm .score-donut-inner {
  width: 56px;
  height: 56px;
}

.score-donut-sm .sdn-t {
  font-size: 1rem;
}

.grade-weight-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.75rem 1rem;
}

.grade-weight-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.grade-weight-item input[type="number"] {
  width: 4.5rem;
  padding: 0.35rem 0.5rem;
}

.grade-weight-total {
  margin: 0.75rem 0 0;
  font-size: 0.9rem;
}

.grade-weight-warn {
  color: var(--danger, #b42318);
  font-weight: 600;
}

.grade-breakdown-panel {
  padding: 1rem 1.1rem;
  background: var(--slate-50);
  border: 1px solid var(--slate-200);
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
}

.grade-breakdown-panel--compact {
  margin-bottom: 0.75rem;
}

.grade-breakdown-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.85rem;
}

.grade-breakdown-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem 1rem;
  margin: 0;
}

.grade-breakdown-stats div {
  margin: 0;
}

.grade-breakdown-stats dt {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-500);
  margin: 0 0 0.15rem;
}

.grade-breakdown-stats dd {
  margin: 0;
  font-size: 0.92rem;
}

.grade-breakdown-final dd strong {
  color: var(--purple-800);
  font-size: 1.05rem;
}

.grade-formula-details {
  margin-top: 0.85rem;
  font-size: 0.85rem;
}

.grade-formula-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--purple-700);
}

.grade-formula-steps {
  margin: 0.65rem 0 0;
  padding-left: 1.25rem;
}

.grade-formula-steps li {
  margin-bottom: 0.45rem;
}

.feedback-review-card {
  margin-bottom: 1rem;
}

.feedback-review-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}

.rubric-matrix-readonly td:nth-child(2) {
  font-weight: 600;
  color: var(--purple-800);
}

.peer-aside-section {
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--slate-200);
}

.peer-aside-note {
  padding: 0.65rem;
  background: var(--slate-50);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--slate-200);
}

/* ----- Direct messages ----- */
.msg-layout-single .card {
  max-width: 640px;
}

.msg-contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.msg-contact-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.5rem;
  border-radius: var(--radius-sm);
  color: inherit;
  text-decoration: none;
}

.msg-contact-card:hover {
  background: var(--purple-100);
}

.msg-preview {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.82rem;
  line-height: 1.3;
}

.msg-thread-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  margin-bottom: 0.75rem;
}

.msg-thread-email {
  font-size: 0.85rem;
}

.msg-thread-card {
  max-width: 720px;
}

.msg-bubbles {
  max-height: 48vh;
  overflow-y: auto;
  padding: 0.5rem 0.25rem 1rem;
  margin-bottom: 0.5rem;
}

.msg-row {
  display: flex;
  margin-bottom: 0.5rem;
}

.msg-row.mine {
  justify-content: flex-end;
}

.msg-row.theirs {
  justify-content: flex-start;
}

.msg-bubble {
  max-width: 85%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.msg-row.mine .msg-bubble {
  background: var(--gradient-brand);
  color: var(--white);
  border-bottom-right-radius: 4px;
}
.msg-row.theirs .msg-bubble {
  background: var(--slate-100);
  color: var(--slate-900);
  border: 1px solid var(--slate-200);
  border-bottom-left-radius: 4px;
}

.msg-row.mine .msg-meta {
  color: rgb(255 255 255 / 0.75);
}

.msg-meta {
  margin-top: 0.35rem;
  font-size: 0.72rem;
}

.msg-compose {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  margin-top: 0.5rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--slate-100);
}

.msg-compose textarea {
  width: 100%;
  margin: 0;
  border-radius: var(--radius-sm);
  border: 1px solid var(--slate-200);
  padding: 0.65rem;
  font-family: inherit;
  resize: vertical;
}

.msg-compose .btn-primary {
  align-self: flex-end;
}

.empty-state {
  text-align: center;
  padding: 2rem 1rem;
  color: var(--slate-500);
}

.placehold-page {
  max-width: 520px;
  margin-top: 0.5rem;
}

.placehold-note {
  padding: 1.25rem;
  background: var(--gradient-subtle);
  border-radius: var(--radius-sm);
  border: 1px solid rgb(167 139 250 / 0.25);
  color: var(--slate-700);
}
/* ----- Mobile ----- */
@media (max-width: 900px) {
  .app-shell {
    flex-direction: column;
  }

  .sidebar {
    width: 100%;
    height: auto;
    max-height: none;
    position: relative;
    padding: 1rem;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .sidebar-brand {
    flex: 1;
    border-bottom: none;
    padding-bottom: 0;
  }

  .sidebar-user {
    flex: 0 0 auto;
    margin-top: 0;
  }

  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    width: 100%;
    max-height: 16rem;
    overflow-y: auto;
    gap: 0.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid rgb(255 255 255 / 0.1);
  }

  .sidebar-footer {
    width: 100%;
    border-top: none;
    padding-top: 0.5rem;
  }

  .app-topbar-title {
    font-size: 1.05rem;
  }

  .topbar-user-chip .muted {
    display: none;
  }
}

@media (max-width: 640px) {
  .crit-row {
    grid-template-columns: 1fr;
  }

  .eval-studio {
    grid-template-columns: 1fr;
  }

  .eval-queue {
    order: -1;
  }
}
