/* Teacher classroom UI (Students / Class / Assignments tabs + per-student page).
 * Page-scoped — loaded only on /dashboard for teachers and /dashboard/student/*.
 * Reuses the dashboard's .glass-panel / .dashboard-* classes; this sheet only adds
 * the .teacher-* bits. Dark theme, matching the rest of the dashboard. */

.teacher-intro,
.teacher-hint {
  font-size: 0.85rem;
  color: rgb(148, 163, 184);
  margin: 0 0 0.85rem;
}
.teacher-hint { margin-top: 0.35rem; }

.teacher-form { margin-bottom: 1.5rem; }
.teacher-form-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
}
.teacher-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  min-width: 12rem;
  flex: 1 1 12rem;
}
/* Honour the `hidden` attribute: the rule above (display:flex) otherwise out-ranks the
   UA `[hidden]{display:none}`, leaving JS-hidden fields visible-but-empty (the vocab
   "Lesson" dropdown bug). `.teacher-field[hidden]` (0,2,0) beats `.teacher-field` (0,1,0). */
.teacher-field[hidden] { display: none; }
.teacher-label {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgb(148, 163, 184);
}
.teacher-pw-wrap { display: flex; gap: 0.4rem; align-items: stretch; }
.teacher-pw-wrap .dashboard-input { flex: 1 1 auto; }

.teacher-btn-mini {
  display: inline-block;
  padding: 0.35rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 500;
  color: rgb(226, 232, 240);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 0.6rem;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease;
}
.teacher-btn-mini:hover { background: rgba(255, 255, 255, 0.12); }
.teacher-btn-mini:focus-visible {
  outline: 2px solid rgba(103, 232, 249, 0.85);
  outline-offset: 2px;
}
.teacher-btn-mini + .teacher-btn-mini { margin-left: 0.35rem; }
.teacher-btn-danger { color: rgb(252, 165, 165); border-color: rgba(248, 113, 113, 0.35); }
.teacher-btn-danger:hover { background: rgba(248, 113, 113, 0.14); }
.teacher-btn-danger:focus-visible {
  outline: 2px solid rgba(252, 165, 165, 0.9);
  outline-offset: 2px;
}
.teacher-btn-mini:disabled { opacity: 0.4; cursor: default; pointer-events: none; }

/* Roster bulk-select toolbar */
.teacher-roster-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-bottom: 0.6rem;
}
.teacher-roster-toolbar [data-tc-add-group]:disabled { opacity: 0.4; cursor: default; }

/* Panel dimmed while it re-fetches after a mutation (no full page reload) */
.teacher-panel-busy { opacity: 0.55; pointer-events: none; transition: opacity 0.12s ease; }

/* Count chip — shared by the Assignments group/subject headers + the Groups tab. */
.teacher-group-head__count {
  display: inline-block;
  margin-left: 0.5rem;
  padding: 0 0.45rem;
  font-size: 0.7rem;
  font-weight: 600;
  color: rgb(148, 163, 184);
  background: rgba(255, 255, 255, 0.06);
  border-radius: 999px;
}

.teacher-avail { font-size: 0.74rem; font-weight: 600; }
.teacher-avail--ok { color: rgb(110, 231, 183); }
.teacher-avail--taken { color: rgb(252, 165, 165); }

.teacher-textarea { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; resize: vertical; margin-bottom: 0.6rem; }

.teacher-creds { list-style: none; margin: 0.6rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.25rem; }
.teacher-cred {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: rgb(167, 243, 208);
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.18);
  border-radius: 0.5rem;
  padding: 0.3rem 0.55rem;
  user-select: all;
}
.teacher-cred--fail { color: rgb(252, 165, 165); background: rgba(248, 113, 113, 0.08); border-color: rgba(248, 113, 113, 0.18); }

.teacher-table td { vertical-align: middle; }

/* Teacher-recoverable student password in the roster (click to select-all + copy). */
.teacher-pw {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82rem;
  color: rgb(196, 181, 253);
  background: rgba(168, 85, 247, 0.10);
  border: 1px solid rgba(168, 85, 247, 0.18);
  border-radius: 0.4rem;
  padding: 0.1rem 0.4rem;
  user-select: all;
  white-space: nowrap;
}

/* ---- Groups ---- */
.teacher-groups { display: flex; flex-direction: column; gap: 0.75rem; }
.teacher-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.85rem;
  padding: 0.8rem 0.95rem;
  background: rgba(255, 255, 255, 0.02);
}
.teacher-group-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.55rem; }
.teacher-group-name { font-weight: 600; color: #fff; }
.teacher-group-count { font-size: 0.78rem; color: rgb(148, 163, 184); margin-right: auto; }
.teacher-group-members { display: flex; flex-wrap: wrap; gap: 0.4rem; align-items: center; }
.teacher-chip {
  display: inline-flex; align-items: center; gap: 0.25rem;
  font-size: 0.8rem; color: rgb(226, 232, 240);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px; padding: 0.15rem 0.3rem 0.15rem 0.6rem;
}
.teacher-chip-x { background: none; border: none; color: rgb(148, 163, 184); cursor: pointer; font-size: 1rem; line-height: 1; padding: 0 0.2rem; }
.teacher-chip-x:hover { color: rgb(252, 165, 165); }
.teacher-select-mini { width: auto; min-width: 11rem; padding: 0.3rem 0.5rem; font-size: 0.82rem; }

/* ---- Class progress ---- */
.teacher-class-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-bottom: 0.5rem; }
.teacher-filter { display: flex; align-items: center; gap: 0.5rem; }
.teacher-num { font-weight: 600; color: #fff; }
.teacher-sub { display: block; font-size: 0.72rem; color: rgb(100, 116, 139); }

/* ---- Badges ---- */
.teacher-badge {
  display: inline-block; font-size: 0.72rem; font-weight: 600;
  padding: 0.12rem 0.5rem; border-radius: 999px; white-space: nowrap;
}
.teacher-badge--done { color: rgb(167, 243, 208); background: rgba(16, 185, 129, 0.16); }
.teacher-badge--in_progress { color: rgb(253, 230, 138); background: rgba(245, 158, 11, 0.16); }
.teacher-badge--not_started { color: rgb(148, 163, 184); background: rgba(148, 163, 184, 0.14); }
.teacher-badge--overdue { color: rgb(252, 165, 165); background: rgba(248, 113, 113, 0.16); }

/* ---- Kind tags ---- */
.teacher-kind-tag {
  display: inline-block; font-size: 0.66rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 0.08rem 0.4rem; border-radius: 0.4rem; margin-right: 0.35rem;
}
.teacher-kind-tag--learn { color: rgb(165, 180, 252); background: rgba(99, 102, 241, 0.16); }
.teacher-kind-tag--code { color: rgb(125, 211, 252); background: rgba(14, 165, 233, 0.16); }
.teacher-kind-tag--vocab { color: rgb(196, 181, 253); background: rgba(168, 85, 247, 0.16); }

/* ---- Assignments form + list ---- */
.teacher-assign-grid {
  display: grid; gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  align-items: end;
}
.teacher-assign-grid .dashboard-submit { align-self: end; }
/* Full-width field (Teacher's instructions textarea spans the whole grid). */
.teacher-field--wide { grid-column: 1 / -1; }

/* Teacher's instructions message — shown to the student + in the teacher's list. */
.teacher-assign-note {
  width: 100%;
  flex-basis: 100%;
  margin: 0.35rem 0 0;
  font-size: 0.82rem;
  color: rgb(148, 163, 184);
  white-space: pre-wrap;       /* preserve the teacher's line breaks */
  overflow-wrap: anywhere;
}

/* Teacher-tab polish: inline section head, summary stat row, class completion bar. */
.dash-section-head--inline { margin-bottom: 0; }
.teacher-summary { margin: 0.25rem 0 1.1rem; }
.teacher-assign-bar { max-width: 8rem; }
/* Per-tab accent on the section-head icon (Students = cyan default, Class = emerald,
   Assignments = violet) — a subtle visual cue without recolouring the whole card. */
.teacher-tab-class .dash-section-head > svg { color: rgb(52, 211, 153); }
.teacher-tab-assign .dash-section-head > svg { color: rgb(196, 181, 253); }

/* Multi-select lesson/topic picker (native <select multiple> → Shift/Ctrl-click ranges). */
.teacher-multiselect {
  padding: 0.25rem;
  min-height: 9rem;
  overflow-y: auto;
}
.teacher-multiselect option {
  padding: 0.3rem 0.5rem;
  border-radius: 0.35rem;
  color: rgb(226, 232, 240);
}
.teacher-multiselect option:checked {
  background: rgba(34, 211, 238, 0.35) linear-gradient(0deg, rgba(34, 211, 238, 0.35), rgba(34, 211, 238, 0.35));
  color: #fff;
}

.teacher-disclosure { background: none; border: none; color: inherit; font: inherit; cursor: pointer; text-align: left; padding: 0; }
.teacher-disclosure:hover { text-decoration: underline; }

.teacher-roster { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.teacher-roster-item {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 0.8rem; color: rgb(226, 232, 240);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.6rem; padding: 0.25rem 0.55rem; text-decoration: none;
}
.teacher-roster-item:hover { background: rgba(255, 255, 255, 0.05); }
.teacher-roster-frac { font-size: 0.72rem; color: rgb(148, 163, 184); }

/* ---- "My assignments" (student personal tab + per-student page) ---- */
.teacher-assign-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; }
.teacher-assign-item {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left-width: 3px;
  border-radius: 0.7rem; padding: 0.55rem 0.8rem;
  background: rgba(255, 255, 255, 0.02);
}
.teacher-assign-item--done { border-left-color: rgb(16, 185, 129); }
.teacher-assign-item--in_progress { border-left-color: rgb(245, 158, 11); }
.teacher-assign-item--overdue { border-left-color: rgb(248, 113, 113); }
.teacher-assign-item--not_started { border-left-color: rgba(148, 163, 184, 0.5); }
.teacher-assign-link { font-weight: 600; color: #fff; text-decoration: none; }
.teacher-assign-link:hover { text-decoration: underline; }
.teacher-assign-meta { display: inline-flex; align-items: center; gap: 0.5rem; }
.teacher-assign-frac { font-size: 0.78rem; color: rgb(148, 163, 184); font-variant-numeric: tabular-nums; }
.teacher-assign-due { font-size: 0.75rem; color: rgb(148, 163, 184); }

.teacher-back { display: inline-block; font-size: 0.85rem; color: rgb(148, 163, 184); text-decoration: none; margin-bottom: 0.5rem; }
.teacher-back:hover { color: rgb(226, 232, 240); }

/* ===== Student dashboard: "My assignments" — grouped, foldable course cards ===== */
.studentdash-alldone {
  display: flex; align-items: center; gap: 0.5rem;
  font-size: 0.85rem; color: rgb(110, 231, 183); margin: 0 0 0.9rem;
}
.studentdash-alldone svg { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }

/* Light class label — only rendered when the student is in >1 class. */
.studentdash-class { display: flex; align-items: baseline; gap: 0.5rem; margin: 1.15rem 0 0.55rem; }
.studentdash-class:first-of-type { margin-top: 0.2rem; }
.studentdash-class__name { font-size: 0.7rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(148, 163, 184); }
.studentdash-class__count { font-size: 0.74rem; color: rgb(100, 116, 139); }

/* Caret shared by the subject + compare folds (down when open, right when collapsed). */
.studentdash-caret { width: 0.8rem; height: 0.8rem; flex: 0 0 auto; color: rgb(148, 163, 184); transform: rotate(90deg); transition: transform 0.15s ease; }
.studentdash-subject.is-collapsed .studentdash-caret,
.studentdash-compare-wrap.is-collapsed .studentdash-caret { transform: rotate(0deg); }

/* Subject / course card — the collapsible unit (tinted by its --subj-rgb). */
.studentdash-subject {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 3px solid rgba(var(--subj-rgb, 34, 211, 238), 0.7);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 0.6rem;
  overflow: hidden;
}
.dash-root .studentdash-subject { transition: border-color .18s ease, box-shadow .18s ease; }
.dash-root .studentdash-subject:hover { border-color: rgba(var(--subj-rgb, 34, 211, 238), 0.5); box-shadow: 0 10px 26px -18px rgba(0, 0, 0, .6); }
.studentdash-subject__head { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; padding: 0.6rem 0.8rem; }
.studentdash-subject__toggle {
  display: flex; align-items: center; gap: 0.55rem; flex: 1 1 12rem; min-width: 0;
  background: none; border: 0; cursor: pointer; text-align: left; color: inherit; font: inherit; padding: 0;
}
.studentdash-subject__toggle:hover .studentdash-subject__name { color: rgb(199, 210, 254); }
.studentdash-subject__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.7rem; height: 1.7rem; border-radius: 0.5rem; flex: 0 0 auto;
  color: rgb(var(--subj-rgb, 34, 211, 238)); background: rgba(var(--subj-rgb, 34, 211, 238), 0.14);
}
.studentdash-subject__icon svg { width: 1rem; height: 1rem; }
.studentdash-subject__name { font-weight: 600; color: #fff; }
.studentdash-subject__bar { flex: 1 1 7rem; max-width: 13rem; margin-left: auto; }
.studentdash-overdue-pill {
  display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px;
  font-size: 0.66rem; font-weight: 700; color: rgb(252, 165, 165); background: rgba(248, 113, 113, 0.16);
}
.studentdash-subject__body { list-style: none; margin: 0; padding: 0 0.9rem 0.7rem; display: flex; flex-direction: column; gap: 0.35rem; }
.studentdash-subject.is-collapsed .studentdash-subject__body { display: none; }

/* Topic row — compact one-liner: [state-border] label · due · frac · one action. */
.studentdash-topic {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  padding: 0.5rem 0.65rem; border-radius: 0.6rem;
  border-left: 3px solid rgba(148, 163, 184, 0.5);
  background: rgba(255, 255, 255, 0.02);
}
.studentdash-topic--done { border-left-color: rgb(16, 185, 129); }
.studentdash-topic--in_progress { border-left-color: rgb(245, 158, 11); }
.studentdash-topic--overdue { border-left-color: rgb(248, 113, 113); }
.studentdash-topic--not_started { border-left-color: rgb(34, 211, 238); }
.studentdash-topic__label { flex: 1 1 12rem; min-width: 0; font-weight: 500; color: rgb(226, 232, 240); }
.studentdash-topic__due { flex: 0 0 auto; font-size: 0.75rem; color: rgb(148, 163, 184); white-space: nowrap; }
.studentdash-topic__due.is-overdue { color: rgb(252, 165, 165); }
.studentdash-topic__frac { flex: 0 0 auto; font-size: 0.78rem; color: rgb(148, 163, 184); }
.studentdash-topic__note { flex-basis: 100%; margin: 0.15rem 0 0; font-size: 0.78rem; color: rgb(148, 163, 184); }
.studentdash-start { flex: 0 0 auto; white-space: nowrap; text-decoration: none; }
.studentdash-start-arrow { width: 1rem; height: 1rem; }

/* "How you compare" — anonymized you-vs-average, folded by default. */
.studentdash-compare-wrap { margin: 0.2rem 0 0.8rem; }
.studentdash-compare-toggle {
  display: inline-flex; align-items: center; gap: 0.4rem;
  background: none; border: 0; cursor: pointer; padding: 0.25rem 0;
  font-size: 0.82rem; font-weight: 600; color: rgb(148, 163, 184);
}
.studentdash-compare-toggle:hover { color: rgb(203, 213, 225); }
.studentdash-compare__body { margin-top: 0.6rem; padding-left: 1.2rem; }
.studentdash-compare-wrap.is-collapsed .studentdash-compare__body { display: none; }
.studentdash-compare-row {
  display: grid; grid-template-columns: 9rem 1fr; gap: 0.4rem 0.9rem;
  align-items: center; margin-bottom: 0.7rem;
}
.studentdash-compare-row:last-child { margin-bottom: 0; }
.studentdash-compare-label { font-size: 0.82rem; color: rgb(148, 163, 184); }
.studentdash-compare-bars { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.studentdash-compare-tag {
  flex: 0 0 auto; width: 2.4rem; font-size: 0.66rem; text-transform: uppercase;
  letter-spacing: 0.05em; color: rgb(34, 211, 238); font-weight: 600;
}
.studentdash-compare-tag--avg { color: rgb(148, 163, 184); }
@media (max-width: 640px) {
  .studentdash-subject__bar { max-width: none; flex-basis: 100%; margin-left: 0; }
  .studentdash-compare-row { grid-template-columns: 1fr; gap: 0.25rem; }
}

/* ============================================================================
   "Bold & glowing" redesign — teacher/student panels. Themed off --accent-rgb
   (set on .dash-root in dashboard.html). Page-scoped → no rebuild.
   ========================================================================== */

/* Chips → accent-tinted pill with a hover glow (matches .subject-badge). */
.dash-root .teacher-chip {
  padding: 0.18rem 0.35rem 0.18rem 0.65rem;
  border-color: rgba(var(--accent-rgb), 0.22);
  background: rgba(var(--accent-rgb), 0.08);
  transition: filter 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.dash-root .teacher-chip:hover {
  filter: brightness(1.12) drop-shadow(0 0 6px rgba(var(--accent-rgb), 0.4));
  border-color: rgba(var(--accent-rgb), 0.4);
}

/* Group + roster cards → hover-lift + accent border. */
.dash-root .teacher-group,
.dash-root .teacher-roster-item {
  transition: transform 0.16s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.15s ease;
}
.dash-root .teacher-group:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.26);
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, 0.6), 0 0 22px -12px rgba(var(--accent-rgb), 0.32);
}
.dash-root .teacher-roster-item:hover {
  border-color: rgba(var(--accent-rgb), 0.32);
  box-shadow: 0 0 14px -7px rgba(var(--accent-rgb), 0.4);
}

/* Badges keep their semantic colour but gain a touch more presence. */
.dash-root .teacher-badge { box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04); }

/* Mini buttons (incl. the login-cards / reset / remove links) → hover-lift + accent. */
.dash-root .teacher-btn-mini {
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.dash-root .teacher-btn-mini:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 14px -6px rgba(var(--accent-rgb), 0.45);
}
.dash-root .teacher-btn-danger:hover {
  border-color: rgba(248, 113, 113, 0.45);
  box-shadow: 0 0 14px -6px rgba(248, 113, 113, 0.45);
}

/* Inputs / submit → role-accent focus ring + gradient submit with hover-lift. */
.dash-root .dashboard-input:focus,
.dash-root .dashboard-input:focus-visible {
  border-color: rgba(var(--accent-rgb), 0.5);
  box-shadow: 0 0 0 2px rgba(var(--accent-rgb), 0.2);
  outline: none;
}
.dash-root .dashboard-submit {
  background: linear-gradient(135deg, rgb(var(--accent-rgb)) 0%, rgba(99, 102, 241, 0.95) 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 6px 20px -8px rgba(var(--accent-rgb), 0.5);
  transition: transform 0.16s ease, filter 0.16s ease, box-shadow 0.16s ease;
}
.dash-root .dashboard-submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.08) saturate(1.05);
}
.dash-root .dashboard-submit:focus-visible {
  outline: 2px solid rgba(103, 232, 249, 0.85);
  outline-offset: 2px;
}

/* ---- Assignments overview: group → subject → topic (nested cards) ---- */
.teacher-assign-selectall { display: inline-flex; align-items: center; gap: 0.4rem; margin-right: auto; font-size: 0.8rem; color: rgb(148, 163, 184); cursor: pointer; }
.teacher-assign-cb { cursor: pointer; accent-color: rgb(168, 85, 247); flex: 0 0 auto; }

.teacher-assign-groups { display: flex; flex-direction: column; gap: 0.85rem; margin-top: 0.2rem; }
.teacher-assign-group {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0.95rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.8rem 0.95rem;
}
.dash-root .teacher-assign-group { transition: transform .16s ease, box-shadow .18s ease, border-color .18s ease; }
.dash-root .teacher-assign-group:hover {
  transform: translateY(-1px);
  border-color: rgba(var(--accent-rgb), 0.26);
  box-shadow: 0 10px 26px -16px rgba(0, 0, 0, .6), 0 0 22px -12px rgba(var(--accent-rgb), .32);
}
.teacher-assign-group__head { display: flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.teacher-assign-group__toggle { display: inline-flex; align-items: center; gap: 0.45rem; }
.teacher-assign-group__toggle:hover { text-decoration: none; }
.teacher-assign-caret { width: 0.85rem; height: 0.85rem; color: rgb(148, 163, 184); transition: transform 0.15s ease; }
.teacher-assign-group.is-collapsed .teacher-assign-caret { transform: rotate(-90deg); }
.teacher-assign-group__name { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: rgb(196, 181, 253); }
.teacher-assign-group__bar { flex: 1 1 9rem; max-width: 16rem; margin-left: auto; }
.teacher-assign-group__body { margin-top: 0.6rem; padding-top: 0.6rem; border-top: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; gap: 0.5rem; }
.teacher-assign-group.is-collapsed .teacher-assign-group__body { display: none; }

.teacher-assign-overdue-pill {
  display: inline-block; padding: 0.05rem 0.45rem; border-radius: 999px;
  font-size: 0.68rem; font-weight: 700;
  color: rgb(252, 165, 165); background: rgba(248, 113, 113, 0.16);
}

.teacher-assign-subject {
  border-left: 2px solid rgba(var(--subj-rgb, 148, 163, 184), 0.45);
  padding: 0.3rem 0 0.3rem 0.7rem;
}
.teacher-assign-subject__head { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.teacher-assign-subject__icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.55rem; height: 1.55rem; border-radius: 0.5rem; flex: 0 0 auto;
  color: rgb(var(--subj-rgb, 148, 163, 184)); background: rgba(var(--subj-rgb, 148, 163, 184), 0.14);
}
.teacher-assign-subject__icon svg { width: 0.95rem; height: 0.95rem; }
.teacher-assign-subject__name { font-weight: 600; color: #fff; }
.teacher-assign-subject__bar { flex: 1 1 8rem; max-width: 14rem; margin-left: auto; }

.teacher-assign-topics { list-style: none; margin: 0.4rem 0 0; padding: 0; display: flex; flex-direction: column; gap: 0.15rem; }
.teacher-assign-topic__row {
  display: grid; align-items: center; gap: 0.6rem;
  grid-template-columns: auto minmax(0, 1fr) auto auto auto;
  padding: 0.3rem 0.4rem; border-radius: 0.55rem;
}
.teacher-assign-topic__row:hover { background: rgba(255, 255, 255, 0.03); }
.teacher-assign-topic__title { font-weight: 500; color: rgb(226, 232, 240); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teacher-assign-topic__due { font-size: 0.78rem; color: rgb(148, 163, 184); white-space: nowrap; }
.teacher-assign-topic__due.is-overdue { color: rgb(252, 165, 165); }
.teacher-assign-roster { padding: 0.15rem 0.4rem 0.5rem 1.7rem; }

@media (max-width: 640px) {
  .teacher-assign-group__bar, .teacher-assign-subject__bar { max-width: none; flex-basis: 100%; margin-left: 0; }
  .teacher-assign-topic__row { display: flex; flex-wrap: wrap; }
  .teacher-assign-topic__title { flex: 1 1 60%; white-space: normal; }
}
