@font-face {
  font-family: "Mulish";
  src: url("./assets/fonts/Mulish-Variable.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("./assets/fonts/Newsreader-Variable.ttf") format("truetype");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #f4f4fb;
  --surface: #ffffff;
  --surface-soft: #f7f6ff;
  --line: #e7e7f2;
  --text: #1f2340;
  --muted: #737998;
  --brand: #22104d;
  --brand-2: #4c32a7;
  --accent: #ffb22c;
  --green: #0f9f67;
  --blue: #4b7afe;
  --pink: #ff5ea7;
  --orange: #f08a24;
  --shadow: 0 10px 30px rgba(28, 32, 66, 0.08);
  --radius-lg: 24px;
  --radius-md: 18px;
  --radius-sm: 14px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Mulish", sans-serif;
  background:
    radial-gradient(circle at top left, rgba(255, 178, 44, 0.14), transparent 24%),
    linear-gradient(180deg, #f8f8fd 0%, var(--bg) 100%);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

.teacher-auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.teacher-auth-card {
  width: min(100%, 420px);
  display: grid;
  gap: 14px;
  padding: 32px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.teacher-auth-card > img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

.teacher-auth-card h1,
.teacher-auth-card p {
  margin: 0;
}

.teacher-auth-card label {
  display: grid;
  gap: 7px;
  font-weight: 700;
}

.teacher-auth-card input {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
}

.teacher-auth-error {
  min-height: 20px;
  color: #a22b2b;
}

.teacher-sign-out {
  margin-top: 12px;
  border: 0;
  background: transparent;
  color: var(--brand-2);
  padding: 0;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

button,
input,
textarea,
select,
a {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-shell {
  display: grid;
  grid-template-columns: 248px 1fr;
  min-height: 100vh;
}

.sidebar {
  padding: 18px 14px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px);
  border-right: 1px solid rgba(231, 231, 242, 0.9);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.logo-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 0;
}

.logo-mark {
  width: 50px;
  height: 50px;
  object-fit: contain;
  border-radius: 16px;
  background: linear-gradient(180deg, var(--surface-soft), #fff);
}

.logo-copy {
  display: flex;
  flex-direction: column;
}

.logo-copy strong,
.toolbar-title,
.kpi .value,
.score,
.attention-score {
  font-weight: 800;
}

.logo-copy strong {
  font-family: "Newsreader", serif;
  font-size: 1.2rem;
  color: var(--brand);
}

.logo-copy span {
  font-size: 0.76rem;
  color: var(--muted);
}

.nav {
  display: grid;
  gap: 8px;
}

.nav-item {
  border: 0;
  background: transparent;
  color: #616a89;
  text-align: left;
  padding: 14px 16px;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
}

.nav-item.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
  box-shadow: var(--shadow);
}

.side-summary {
  margin-top: auto;
  background: linear-gradient(180deg, var(--brand) 0%, #2c1768 100%);
  color: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: var(--shadow);
}

.summary-label,
.eyebrow,
.kpi .label,
.profile-label,
th,
.micro-copy {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.eyebrow {
  margin-bottom: 6px;
}

.side-summary .summary-label {
  color: rgba(255, 255, 255, 0.72);
}

.side-summary strong {
  display: block;
  margin-bottom: 8px;
  font-family: "Newsreader", serif;
  font-size: 1.15rem;
}

.side-summary span {
  font-size: 0.9rem;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.84);
}

.workspace {
  padding: 20px;
  display: grid;
  gap: 18px;
}

.topbar,
.toolbar,
.subnav,
.card,
.day-strip,
.attendance-row,
.mini-summary-card {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 20px;
}

.topbar h1,
.card h2,
.form-card h2,
.table-card h2,
.attention-card h2 {
  margin: 0;
  font-family: "Newsreader", serif;
}

.topbar h1 {
  font-size: 1.8rem;
  margin-bottom: 4px;
}

.topbar p,
.card p,
.subtle,
.assessment-meta,
.month-chip,
.attendance-note {
  color: var(--muted);
}

.topbar-user img {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand);
  border: 3px solid #f2efff;
}

.page {
  display: none;
}

.page.visible,
.content-tab.visible {
  display: block;
}

.toolbar,
.subnav {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.toolbar-copy {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.select,
.search-input,
.form-card input,
.form-card textarea,
.form-card select {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  background: #fff;
  color: var(--text);
}

.select {
  min-width: 220px;
}

.search-input {
  width: 100%;
  max-width: 420px;
}

.month-chip {
  font-weight: 800;
}

.kpi-grid,
.analytics-kpis,
.students-summary,
.analytics-skill-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.students-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.report-kpis .kpi {
  min-width: 0;
}

.report-kpis .label {
  overflow-wrap: anywhere;
}

#dashboardKpis {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  gap: 0;
}

.kpi,
.mini-summary-card,
.skill-insight-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  box-shadow: var(--shadow);
}

#dashboardKpis .kpi {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  padding: 4px 20px;
}

#dashboardKpis .kpi:last-child {
  border-right: 0;
}

.kpi .value,
.mini-summary-card strong,
.skill-insight-card strong {
  display: block;
  font-size: 1.7rem;
}

.kpi .note {
  display: block;
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--muted);
}

.spotlight-grid,
.teaching-grid,
.dashboard-support-grid,
.dashboard-grid,
.analytics-grid,
.profile-grid,
.student-workspace {
  display: grid;
  gap: 16px;
}

.spotlight-grid {
  grid-template-columns: 1.05fr 1fr;
  margin-bottom: 16px;
}

.teaching-grid {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  margin-bottom: 16px;
}

.assessment-loop-card {
  margin-bottom: 16px;
}

.dashboard-support-grid {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: stretch;
  margin-bottom: 16px;
}

.dashboard-grid {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  margin-bottom: 16px;
}

.reports-analysis-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(420px, 2fr);
  gap: 16px;
  align-items: start;
}

.student-workspace {
  grid-template-columns: minmax(0, 3fr) minmax(380px, 2fr);
  align-items: start;
}

.analytics-grid {
  grid-template-columns: 1fr 1fr;
  margin: 14px 0;
}

.profile-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 18px;
}

.side-stack {
  display: grid;
  gap: 16px;
}

.card {
  padding: 18px;
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 14px;
}

.card h2 {
  font-size: 1.3rem;
  margin-bottom: 6px;
}

.chart-card {
  min-height: 0;
}

.svg-chart {
  width: 100%;
  height: 240px;
}

.legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
  color: #667085;
  font-size: 0.92rem;
}

.legend span::before {
  content: "";
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 7px;
  border-radius: 999px;
  vertical-align: middle;
  background: currentColor;
}

.student-line,
.event-line,
.assessment-card,
.queue-item,
.attention-row,
.priority-row,
.teaching-step {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}

.student-line:last-child,
.event-line:last-child,
.assessment-card:last-child,
.queue-item:last-child,
.attention-row:last-child,
.priority-row:last-child,
.teaching-step:last-child {
  border-bottom: 0;
}

.priority-list,
.loop-card + .loop-card {
  margin-top: 8px;
}

.priority-row strong,
.loop-head strong,
.profile-block strong,
.teaching-step strong {
  display: block;
  margin-bottom: 4px;
}

.action-priority {
  align-items: center;
}

.teaching-plan-card {
  background: linear-gradient(180deg, var(--surface-soft) 0%, #fff 100%);
}

.teaching-step {
  justify-content: start;
  align-items: start;
}

.teaching-step p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.time-chip {
  flex: 0 0 78px;
  display: inline-flex;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 9px;
  color: var(--brand);
  font-size: 0.78rem;
  font-weight: 800;
  background: #fff;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), #8d76d8);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  font-weight: 700;
}

.avatar.large {
  width: 52px;
  height: 52px;
  font-size: 1rem;
}

.score {
  color: var(--green);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 15px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  font-size: 0.74rem;
}

td {
  font-size: 0.95rem;
}

tbody tr {
  cursor: pointer;
}

.student-list-card tbody tr {
  cursor: default;
}

tbody tr:hover {
  background: #fbfaff;
}

.selected-row {
  background: #fbfaff;
}

.batch-pill,
.status-pill,
.tiny-pill,
.pill,
.issue-chip,
.mini-pill,
.flow-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 700;
}

.batch-pill,
.status-pill,
.mini-pill {
  padding: 7px 11px;
  font-size: 0.78rem;
}

.pill {
  border: 0;
  padding: 8px 14px;
  background: #f3f5fa;
  color: #667085;
  cursor: pointer;
}

.pill.active,
.tiny-pill.live,
.subnav-item.active,
.action-btn.primary,
.inline-btn.primary-link {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}

.batch-pill.n5 {
  background: #eef5ff;
  color: #3d62cc;
}

.batch-pill.n4 {
  background: #f6f1ff;
  color: #6d43c6;
}

.status-pill.good {
  background: #e9fbf4;
  color: var(--green);
}

.status-pill.watch,
.mini-pill.warn {
  background: #fff4e5;
  color: var(--orange);
}

.status-pill.risk {
  background: #fff0f3;
  color: #eb5f6d;
}

.mini-pill.info {
  background: #edf2ff;
  color: var(--blue);
}

.mini-pill.brand {
  background: #f1eeff;
  color: var(--brand-2);
}

.issue-chip,
.flow-chip {
  padding: 7px 10px;
  background: #f5f4fb;
  color: #5f6384;
  font-size: 0.78rem;
}

.chip-row,
.assessment-badges,
.loop-flow,
.table-actions,
.profile-actions,
.queue-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.action-link,
.inline-btn {
  color: var(--brand);
  font-weight: 650;
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.table-actions .inline-btn {
  font-weight: 500;
}

.student-name-link {
  display: inline;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.student-name-link:hover,
.student-name-link:focus-visible {
  color: var(--brand-2);
  text-decoration: underline;
}

.student-action-menu {
  position: relative;
  display: flex;
  justify-content: flex-start;
}

.menu-trigger {
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.menu-trigger:hover,
.menu-trigger:focus-visible,
.student-action-menu.open .menu-trigger {
  background: #f5f4fb;
  border-color: var(--line);
}

.kebab-dots,
.kebab-dots::before,
.kebab-dots::after {
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
  display: block;
}

.kebab-dots {
  position: relative;
}

.kebab-dots::before,
.kebab-dots::after {
  content: "";
  position: absolute;
  left: 0;
}

.kebab-dots::before {
  top: -8px;
}

.kebab-dots::after {
  top: 8px;
}

.student-menu-popover {
  position: absolute;
  z-index: 20;
  top: calc(100% + 6px);
  right: 0;
  min-width: 180px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: none;
}

.student-action-menu.open .student-menu-popover {
  display: grid;
  gap: 2px;
}

.student-menu-item {
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--brand);
  cursor: pointer;
  font-weight: 700;
  text-align: left;
}

.student-menu-item:hover,
.student-menu-item:focus-visible {
  background: #f5f4fb;
}

.day-strip {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 0;
  margin: 14px 0;
  overflow: hidden;
}

.day-box {
  padding: 14px 12px;
  text-align: center;
  background: #fff;
}

.day-box.active {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 100%);
  color: #fff;
}

.day-name {
  display: block;
  font-size: 0.8rem;
}

.day-date {
  display: block;
  margin-top: 4px;
  font-size: 1.9rem;
  font-weight: 800;
}

.attendance-list {
  display: grid;
  gap: 16px;
}

.attendance-row {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(390px, auto) minmax(320px, 1fr);
  align-items: center;
  gap: 16px 24px;
  padding: 18px 20px;
}

.attendance-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.attendance-btn {
  width: 104px;
  padding: 12px 10px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-soft);
  color: #667085;
  text-align: center;
  font-size: 0.78rem;
}

.attendance-btn.active.present {
  background: var(--green);
  color: #fff;
}

.attendance-btn.active.informed {
  background: var(--blue);
  color: #fff;
}

.attendance-note {
  grid-column: 1 / -1;
  margin-top: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.9rem;
}

.subnav {
  justify-content: start;
  gap: 10px;
}

.subnav-item {
  border: 0;
  background: transparent;
  padding: 11px 14px;
  border-radius: 14px;
  font-weight: 800;
  color: #667085;
  cursor: pointer;
}

.content-tab {
  display: none;
  margin-top: 14px;
}

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

.assessment-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-top: 12px;
  align-items: start;
}

.assessment-main h3 {
  margin: 0;
  font-family: "Newsreader", serif;
  font-size: 1.25rem;
}

.assessment-title-row {
  display: flex;
  justify-content: flex-start;
  gap: 14px;
  align-items: center;
  margin-bottom: 10px;
  flex-wrap: wrap;
}

.assessment-meta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 0.86rem;
}

.assessment-actions {
  display: flex;
  gap: 10px;
}

.tiny-pill {
  padding: 6px 10px;
  font-size: 0.74rem;
}

.tiny-pill.draft {
  background: #eef2f8;
  color: #657085;
}

.tiny-pill.scheduled {
  background: #edf2ff;
  color: #4669d8;
}

.tiny-pill.type {
  background: #fff3dc;
  color: #926312;
}

.form-intro {
  margin: 10px 0 18px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.form-grid label {
  display: grid;
  gap: 8px;
  color: #596579;
  font-weight: 700;
  font-size: 0.92rem;
}

.form-grid .full {
  grid-column: 1 / -1;
}

.checks {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin: 18px 0;
  color: #4c576a;
}

.mapping-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  padding: 14px;
  margin: 0 0 18px;
}

.mapping-panel .profile-label {
  display: block;
}

#studentViewMapping {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mapping-chip {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: #596579;
  padding: 7px 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.empty-state {
  border: 1px dashed var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-soft);
  color: var(--muted);
  padding: 18px;
  margin-top: 12px;
  font-weight: 700;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 13px 16px;
  border-radius: var(--radius-md);
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow);
  font-weight: 800;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

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

.action-btn {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 650;
  background: #fff;
  color: var(--brand);
}

.action-btn.compact {
  padding: 9px 13px;
  white-space: nowrap;
}

.metric-row {
  margin-top: 14px;
}

.metric-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  color: #4f5867;
  font-weight: 700;
}

.bar {
  height: 8px;
  background: #edf1f7;
  border-radius: 999px;
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand), #5e46c9);
}

.toolbar-actions {
  display: flex;
  gap: 10px;
}

.students-toolbar .toolbar-actions {
  flex: 1;
  justify-content: flex-end;
}

.spotlight-grid .card,
.profile-card {
  min-height: 100%;
}

.profile-card {
  position: sticky;
  top: 20px;
  padding: 0;
  overflow: hidden;
}

.student-list-card {
  overflow: auto;
}

.loop-card {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.loop-card:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.loop-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.flow-chip.soft {
  background: #f3f5fd;
}

.profile-shell {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.profile-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.profile-top h2 {
  margin-bottom: 5px;
}

.profile-top p {
  margin: 0;
  color: var(--muted);
}

.profile-score-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.profile-score-grid div,
.profile-section,
.profile-alert,
.profile-block {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: #fff;
}

.profile-score-grid div {
  padding: 13px 14px;
}

.profile-score-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 6px;
}

.profile-score-grid strong {
  font-size: 1.06rem;
}

.profile-section {
  padding: 15px;
}

.profile-section h3 {
  margin: 4px 0 6px;
  font-family: "Newsreader", serif;
  font-size: 1.08rem;
}

.profile-section p,
.profile-alert p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.compact-section p {
  margin-top: 4px;
}

.profile-alert {
  padding: 14px 15px;
  border-color: #ffd6a3;
  background: #fff8ed;
}

.profile-actions .action-btn.quiet,
.profile-footer-actions .action-btn {
  font-weight: 500;
}

.profile-footer-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-footer-actions .action-btn {
  text-align: center;
  border-radius: 14px;
}

.profile-block p {
  margin-top: 8px;
}

.skill-insight-card p {
  margin-top: 8px;
}

.queue-actions,
.attention-meta {
  align-items: center;
}

.attention-card {
  align-self: stretch;
}

.attention-card .attention-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, auto);
  align-items: start;
}

.attention-card .attention-meta {
  text-align: right;
  min-width: 150px;
}

.attention-card .avatar {
  flex: 0 0 40px;
}

.attendance-summary,
.assessment-template-grid {
  display: grid;
  gap: 14px;
  margin: 14px 0;
}

.attendance-summary,
.assessment-template-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.attendance-recovery {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  background: #fff;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.attendance-recovery .profile-label {
  display: block;
  margin-bottom: 5px;
}

.attendance-recovery strong {
  font-size: 0.92rem;
}

.template-card {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 16px;
  cursor: pointer;
}

.template-card strong,
.template-card span {
  display: block;
}

.template-card strong {
  margin-bottom: 7px;
  font-family: "Newsreader", serif;
  font-size: 1.15rem;
  color: var(--text);
}

.template-card span:last-child {
  color: var(--muted);
  line-height: 1.45;
  font-size: 0.9rem;
}

@media (max-width: 1220px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    position: sticky;
    top: 0;
    z-index: 5;
  }

  .nav {
    display: flex;
    gap: 8px;
    overflow-x: auto;
  }

  .nav-item {
    white-space: nowrap;
    padding: 11px 14px;
  }

  .side-summary {
    display: none;
  }

  .spotlight-grid,
  .dashboard-grid,
  .analytics-grid,
  .analytics-skill-grid,
  .form-grid,
  .profile-grid {
    grid-template-columns: 1fr;
  }

  .students-summary,
  .attendance-summary,
  .assessment-template-grid,
  .analytics-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-workspace {
    grid-template-columns: minmax(0, 1fr) 340px;
  }

  .profile-card {
    position: static;
  }
}

@media (max-width: 1020px) {
  .teaching-grid,
  .student-workspace,
  .dashboard-support-grid,
  .reports-analysis-grid,
  .attendance-row {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .analytics-kpis,
  .students-summary,
  .attendance-summary,
  .assessment-template-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.students-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.active-lesson-card,
.next-action-card {
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 18px;
  margin-bottom: 12px;
  padding: 14px;
}

.active-lesson-card h3,
.next-action-card strong {
  display: block;
  margin: 6px 0;
}

.lesson-badge {
  background: #172554;
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 6px 10px;
}

.lesson-facts,
.readiness-grid {
  display: grid;
  gap: 8px;
}

.lesson-facts {
  color: var(--muted);
  font-size: 0.86rem;
}

.readiness-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.readiness-grid div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
}

.readiness-grid strong {
  display: block;
  font-size: 1.35rem;
}

.readiness-grid span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.heatmap-cell {
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.74rem;
  font-weight: 900;
  justify-content: center;
  min-width: 66px;
  padding: 6px 8px;
}

.heatmap-strong {
  background: #dcfce7;
  color: #166534;
}

.heatmap-watch {
  background: #fef3c7;
  color: #92400e;
}

.heatmap-repair {
  background: #fee2e2;
  color: #991b1b;
}

.heatmap-missing {
  background: #e5e7eb;
  color: #374151;
}

@media (min-width: 861px) {
  .student-workspace {
    grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
  }
}

.student-workspace {
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
}

@media (max-width: 860px) {
  .workspace {
    padding: 14px;
  }

  .topbar,
  .toolbar,
  .subnav,
  .card,
  .attendance-row,
  .mini-summary-card {
    padding: 16px;
  }

  .topbar,
  .toolbar,
  .students-toolbar .toolbar-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .select,
  .search-input {
    max-width: 100%;
    width: 100%;
  }

  .day-strip {
    grid-template-columns: repeat(2, 1fr);
  }

  .kpi-grid,
  .analytics-kpis,
  .students-summary,
  .attendance-summary,
  .assessment-template-grid {
    grid-template-columns: 1fr;
  }

  .attendance-actions,
  .assessment-card,
  .student-line,
  .event-line,
  .attention-row,
  .priority-row,
  .queue-item,
  .loop-head,
  .assessment-title-row,
  .teaching-step {
    flex-direction: column;
    align-items: start;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .side-summary {
    max-width: none;
  }

  .action-btn.compact,
  .profile-actions .action-btn,
  .toolbar-actions .action-btn {
    width: 100%;
    text-align: center;
  }

  table,
  thead,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr {
    border-bottom: 1px solid var(--line);
    padding: 8px 0;
  }

  td {
    padding: 8px 0;
    border-bottom: 0;
  }
}

/* Keep student summary operational metrics in one row on the teacher workspace. */
.students-summary {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 861px) {
  .student-workspace {
    grid-template-columns: minmax(0, 3fr) minmax(360px, 2fr);
  }
}
.lm-shell { min-height: 100vh; display: grid; grid-template-columns: 220px 1fr; background: #f7f8fa; color: #17202a; font-family: Mulish, system-ui, sans-serif; }
.lm-sidebar { background: #17202a; color: white; padding: 24px 16px; }
.lm-brand { color: white; display: block; font-size: 20px; font-weight: 800; text-decoration: none; }
.lm-brand small { color: #b8c1cc; display: block; font-size: 12px; font-weight: 500; margin-top: 4px; }
.lm-nav { display: grid; gap: 4px; margin-top: 28px; }
.lm-nav a { color: #cfd6de; padding: 10px; text-decoration: none; }
.lm-nav a.active, .lm-nav a:hover { background: #2a3541; color: white; }
.lm-main { max-width: 1180px; padding: 32px; width: 100%; }
.lm-header p { color: #286b5f; font-size: 12px; font-weight: 800; margin: 0 0 6px; text-transform: uppercase; }
.lm-header h1 { font-family: Newsreader, Georgia, serif; font-size: 34px; letter-spacing: 0; margin: 0; }
.lm-header span { color: #64707d; display: block; margin-top: 6px; }
.lm-metrics { display: grid; gap: 1px; grid-template-columns: repeat(4, minmax(120px, 1fr)); margin: 28px 0; }
.lm-metrics div { background: white; border: 1px solid #dfe3e8; padding: 18px; }
.lm-metrics span { color: #64707d; display: block; font-size: 12px; }
.lm-metrics strong { display: block; font-size: 26px; margin-top: 6px; }
.lm-section { border-top: 1px solid #d7dce2; margin-top: 30px; padding-top: 18px; }
.lm-section h2 { font-size: 18px; margin: 0 0 12px; }
.lm-table { background: white; border: 1px solid #dfe3e8; }
.lm-row { align-items: center; border-bottom: 1px solid #e8ebef; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); padding: 13px 16px; }
.lm-row:last-child { border-bottom: 0; }
.lm-row-link { align-items: center; background: white; border-bottom: 1px solid #dfe3e8; color: inherit; display: flex; justify-content: space-between; padding: 16px; text-decoration: none; }
.lm-form { display: grid; gap: 16px; margin-top: 28px; max-width: 620px; }
.lm-form label { display: grid; font-size: 13px; font-weight: 700; gap: 6px; }
.lm-form select, .lm-form button { border: 1px solid #cbd2d9; font: inherit; padding: 11px; }
.lm-form button { background: #286b5f; color: white; cursor: pointer; font-weight: 800; width: fit-content; }
@media (max-width: 760px) { .lm-shell { grid-template-columns: 1fr; } .lm-sidebar { padding: 16px; } .lm-nav { display: flex; flex-wrap: wrap; margin-top: 14px; } .lm-main { padding: 22px 16px; } .lm-metrics { grid-template-columns: repeat(2, 1fr); } }
