/* RoboLabs EDU teacher foundation
   Phase 1: light-first institutional shell and reusable presentation tokens.
   All rules are role-scoped so student, admin, Robotlab, and integration
   behaviour remain under their existing styles and handlers. */

body.edu-role-teacher {
  color-scheme: light;

  --edu-bg: #f6f8fb;
  --edu-surface: #ffffff;
  --edu-surface-subtle: #f9fafb;
  --edu-text-primary: #101828;
  --edu-text-secondary: #667085;
  --edu-text-tertiary: #98a2b3;
  --edu-border: #e4e7ec;
  --edu-border-strong: #d0d5dd;
  --edu-blue: #2f6bff;
  /* One-channel adjustment gives normal white button text AA contrast. */
  --edu-blue-action: #2f6bfe;
  --edu-blue-hover: #2458d8;
  --edu-blue-subtle: #eef4ff;
  --edu-cyan: #16b8d4;
  --edu-cyan-subtle: #ecfbfd;
  --edu-success: #15803d;
  --edu-success-bg: #ecfdf3;
  --edu-warning: #b54708;
  --edu-warning-bg: #fffaeb;
  --edu-error: #b42318;
  --edu-error-bg: #fef3f2;
  --edu-info: #175cd3;
  --edu-info-bg: #eff8ff;
  --edu-radius-sm: 6px;
  --edu-radius-md: 10px;
  --edu-radius-lg: 12px;
  --edu-shadow-xs: 0 1px 2px rgba(16, 24, 40, 0.04);
  --edu-focus-ring: 0 0 0 3px rgba(47, 107, 255, 0.18);

  /* Compatibility aliases for the existing component system. */
  --bg: var(--edu-bg);
  --surface: var(--edu-surface);
  --surface-2: var(--edu-surface-subtle);
  --border: var(--edu-border);
  --text: var(--edu-text-primary);
  --text-soft: var(--edu-text-secondary);
  --text-mute: var(--edu-text-tertiary);
  --brand-50: var(--edu-blue-subtle);
  --brand-100: #d9e5ff;
  --brand-200: #b7ccff;
  --brand-300: #84a7ff;
  --brand-400: #5e86ff;
  --brand-500: var(--edu-blue);
  --brand-600: var(--edu-blue-hover);
  --brand-700: #1f4bb8;
  --ok: var(--edu-success);
  --warn: var(--edu-warning);
  --err: var(--edu-error);
  --radius-sm: var(--edu-radius-sm);
  --radius: var(--edu-radius-md);
  --radius-lg: var(--edu-radius-lg);
  --shadow-sm: var(--edu-shadow-xs);
  --shadow: var(--edu-shadow-xs);
  --shadow-lg: 0 4px 12px rgba(16, 24, 40, 0.06);
  --glow: none;
  --sidebar-w: 224px;
  --topbar-h: 64px;
  --font: 'Inter', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: var(--font);

  min-height: 100vh;
  background: var(--edu-bg);
  color: var(--edu-text-primary);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Keep the teacher experience light even when an older saved preference says
   dark. The preference and its infrastructure remain intact for other roles. */
html[data-theme="dark"] body.edu-role-teacher {
  --bg: var(--edu-bg);
  --surface: var(--edu-surface);
  --surface-2: var(--edu-surface-subtle);
  --border: var(--edu-border);
  --text: var(--edu-text-primary);
  --text-soft: var(--edu-text-secondary);
  --text-mute: var(--edu-text-tertiary);
  background: var(--edu-bg);
  color: var(--edu-text-primary);
}

body.edu-role-teacher .skip-link {
  border-radius: var(--edu-radius-sm);
  background: var(--edu-blue);
  box-shadow: var(--edu-focus-ring);
}

body.edu-role-teacher :where(a, button, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--edu-blue);
  outline-offset: 2px;
}

body.edu-role-teacher :where(button, input, select, textarea):disabled {
  cursor: not-allowed;
}

/* Application shell */
body.edu-role-teacher .edu-sidebar,
html[data-theme="dark"] body.edu-role-teacher .edu-sidebar {
  width: var(--sidebar-w);
  padding: 0;
  gap: 0;
  overflow-x: hidden;
  background: var(--edu-surface);
  border-right: 1px solid var(--edu-border);
  color: var(--edu-text-secondary);
  animation: none;
  box-shadow: none;
  transition: width 180ms cubic-bezier(.2, .8, .2, 1), padding 180ms cubic-bezier(.2, .8, .2, 1);
}

body.edu-role-teacher .brand {
  position: relative;
  min-height: 80px;
  gap: 8px;
  padding: 16px 12px;
  border-bottom: 1px solid var(--edu-border);
}

body.edu-role-teacher .brand-mark {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  border-radius: 8px;
  background: var(--edu-blue);
  box-shadow: none;
}

body.edu-role-teacher .brand-title {
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

body.edu-role-teacher .brand-sub {
  margin-top: 1px;
  color: var(--edu-text-secondary);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

body.edu-role-teacher .sidebar-collapse-btn {
  width: 24px;
  flex: 0 0 24px;
  height: 32px;
  padding: 0;
  color: var(--edu-text-secondary);
  border-radius: 8px;
}

body.edu-role-teacher .sidebar-collapse-btn:hover {
  background: var(--edu-surface-subtle);
  color: var(--edu-text-primary);
}

body.edu-role-teacher .nav {
  gap: 4px;
  padding: 16px 12px;
}

body.edu-role-teacher .nav-item {
  min-height: 46px;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--edu-text-secondary);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0;
  transition: background-color 140ms ease, color 140ms ease;
}

body.edu-role-teacher .nav-item:hover {
  background: var(--edu-surface-subtle);
  color: var(--edu-text-primary);
}

body.edu-role-teacher .nav-item.active,
html[data-theme="dark"] body.edu-role-teacher .nav-item.active {
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
  font-weight: 600;
  box-shadow: none;
}

body.edu-role-teacher .nav-item.active::before {
  display: none;
}

body.edu-role-teacher .nav-icon,
body.edu-role-teacher .nav-item.active .nav-icon,
html[data-theme="dark"] body.edu-role-teacher .nav-icon,
html[data-theme="dark"] body.edu-role-teacher .nav-item.active .nav-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  background: transparent;
  color: currentColor;
}

body.edu-role-teacher .nav-item:hover .nav-icon {
  color: currentColor;
  transform: none;
}

body.edu-role-teacher .nav-label {
  font-size: 14px;
  font-weight: inherit;
  letter-spacing: 0;
}

body.edu-role-teacher .sidebar-footer {
  gap: 8px;
  padding: 16px;
  border-top: 1px solid var(--edu-border);
  background: transparent;
}

body.edu-role-teacher .mode-toggle,
body.edu-role-teacher .sidebar-footer-status {
  display: none;
}

body.edu-role-teacher .sidebar-footer-credit {
  color: #667085;
  font-size: 10px;
  line-height: 1.5;
}

body.edu-role-teacher .edu-main,
html[data-theme="dark"] body.edu-role-teacher .edu-main {
  width: calc(100% - var(--sidebar-w));
  margin-left: var(--sidebar-w);
  background: var(--edu-bg) !important;
  transition: width 180ms cubic-bezier(.2, .8, .2, 1), margin-left 180ms cubic-bezier(.2, .8, .2, 1);
}

body.edu-role-teacher .edu-topbar,
html[data-theme="dark"] body.edu-role-teacher .edu-topbar {
  height: var(--topbar-h);
  padding: 0 40px;
  background: var(--edu-surface);
  border-bottom: 1px solid var(--edu-border);
  color: var(--edu-text-primary);
  backdrop-filter: none;
  animation: none;
  box-shadow: none;
}

body.edu-role-teacher .topbar-left {
  gap: 12px;
}

body.edu-role-teacher .topbar-title {
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
}

body.edu-role-teacher .topbar-role-badge,
body.edu-role-teacher .data-source-pill,
body.edu-role-teacher .teacher-api-strip,
body.edu-role-teacher .topbar-notification-btn,
body.edu-role-teacher .topbar-notification-btn .notification-dot {
  display: none !important;
}

body.edu-role-teacher .topbar-actions {
  gap: 12px;
  flex-wrap: nowrap;
}

body.edu-role-teacher .status-pill,
html[data-theme="dark"] body.edu-role-teacher .status-pill {
  display: none;
  min-height: 30px;
  padding: 5px 10px;
  gap: 7px;
  border: 1px solid var(--edu-border);
  border-radius: 999px;
  background: var(--edu-surface);
  color: var(--edu-text-secondary);
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0;
  animation: none;
}

body.edu-role-teacher .status-pill .dot {
  width: 7px;
  height: 7px;
  background: var(--edu-success);
  box-shadow: none;
  animation: none;
}

body.edu-role-teacher .status-pill[data-state="busy"] {
  border-color: #fedf89;
  background: var(--edu-warning-bg);
  color: var(--edu-warning);
}

body.edu-role-teacher .status-pill[data-state="error"] {
  border-color: #fecdca;
  background: var(--edu-error-bg);
  color: var(--edu-error);
}

body.edu-role-teacher .topbar-notification-btn {
  width: 36px;
  height: 36px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--edu-text-secondary);
}

body.edu-role-teacher .topbar-notification-btn:hover {
  border-color: var(--edu-border);
  background: var(--edu-surface-subtle);
  color: var(--edu-text-primary);
}

body.edu-role-teacher .topbar-user-widget {
  gap: 8px;
  padding: 4px 0;
  border-radius: 8px;
}

body.edu-role-teacher .topbar-user-widget:hover {
  background: transparent;
}

body.edu-role-teacher .topbar-user-avatar,
html[data-theme="dark"] body.edu-role-teacher .topbar-user-avatar {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
  box-shadow: none;
}

body.edu-role-teacher .topbar-user-name {
  color: var(--edu-text-primary);
  font-size: 13px;
  font-weight: 600;
}

body.edu-role-teacher .topbar-user-sub {
  margin-top: 4px;
  color: var(--edu-text-secondary);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0;
}

/* Page and typography foundation */
body.edu-role-teacher .edu-view {
  width: 100%;
  max-width: 1600px;
  margin-inline: auto;
  padding: 30px clamp(20px, 3vw, 48px) 48px;
  gap: 28px;
  background: transparent;
  animation: none;
}

body.edu-role-teacher .edu-view > * {
  min-width: 0;
  animation: none;
}

body.edu-role-teacher .edu-view.edu-view-lab {
  max-width: none;
  padding: clamp(16px, 2vw, 32px);
}

body.edu-role-teacher :where(.h1, .template-view-title, .edu-page-title) {
  margin: 0;
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: clamp(28px, 2.2vw, 32px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

body.edu-role-teacher :where(.h2, .edu-section-title) {
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: 21px;
  font-weight: 650;
  line-height: 1.3;
  letter-spacing: -0.015em;
}

body.edu-role-teacher :where(.h3, .card-title, .card-section-title) {
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

body.edu-role-teacher :where(.muted, .template-view-sub, .card-sub, .card-description) {
  color: var(--edu-text-secondary);
}

body.edu-role-teacher .tiny {
  color: var(--edu-text-secondary);
  font-size: 13px;
  letter-spacing: 0;
}

body.edu-role-teacher .template-view-header,
body.edu-role-teacher .edu-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}

body.edu-role-teacher .template-view-sub,
body.edu-role-teacher .edu-page-description {
  max-width: 720px;
  margin: 6px 0 0;
  font-size: 15px;
  line-height: 1.55;
}

/* Surfaces and cards */
body.edu-role-teacher :where(.card, .bento-card, .role-panel, .edu-surface),
html[data-theme="dark"] body.edu-role-teacher :where(.card, .bento-card, .role-panel, .edu-surface) {
  border: 1px solid var(--edu-border) !important;
  border-radius: var(--edu-radius-lg) !important;
  background: var(--edu-surface) !important;
  color: var(--edu-text-primary);
  box-shadow: var(--edu-shadow-xs) !important;
}

body.edu-role-teacher :where(.card, .bento-card, .role-panel, .edu-surface):hover {
  border-color: var(--edu-border-strong) !important;
  box-shadow: var(--edu-shadow-xs) !important;
  transform: none;
}

body.edu-role-teacher :where(.card, .bento-card, .edu-surface) {
  padding: 22px;
}

body.edu-role-teacher :where(.card-lg, .edu-surface-lg) {
  padding: 24px;
}

body.edu-role-teacher :where(.bento-banner, .animate-bento) {
  animation: none;
  box-shadow: var(--edu-shadow-xs);
}

body.edu-role-teacher .bento-banner:hover {
  transform: none;
  box-shadow: var(--edu-shadow-xs);
}

/* Phase 1 keeps the existing overview structure, but removes its decorative
   gradient so it participates in the new light surface system. */
body.edu-role-teacher .teacher-role-shell .role-hero,
html[data-theme="dark"] body.edu-role-teacher .teacher-role-shell .role-hero {
  border-color: var(--edu-border) !important;
  background: var(--edu-surface) !important;
  color: var(--edu-text-primary) !important;
  box-shadow: var(--edu-shadow-xs) !important;
}

body.edu-role-teacher .teacher-role-shell .role-hero::before,
body.edu-role-teacher .teacher-role-shell .role-hero::after {
  display: none;
}

body.edu-role-teacher .teacher-role-shell .role-hero :where(.hero-title, .hero-sub) {
  color: var(--edu-text-primary) !important;
}

body.edu-role-teacher .teacher-role-shell .role-hero .hero-sub {
  color: var(--edu-text-secondary) !important;
}

body.edu-role-teacher .teacher-role-shell .role-hero .hero-eyebrow {
  color: var(--edu-blue-hover) !important;
}

body.edu-role-teacher .teacher-role-shell .role-metric {
  border: 1px solid var(--edu-border) !important;
  border-radius: var(--edu-radius-md) !important;
  background: var(--edu-surface-subtle) !important;
  box-shadow: none !important;
}

body.edu-role-teacher .teacher-role-shell .role-metric span {
  color: var(--edu-text-secondary) !important;
}

body.edu-role-teacher .teacher-role-shell .role-metric strong {
  color: var(--edu-text-primary) !important;
}

/* Button hierarchy */
body.edu-role-teacher :where(.btn, .btn-template-primary, .btn-template-secondary, .btn-template-gradient, .edu-button) {
  min-height: 40px;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid var(--edu-border-strong);
  border-radius: 8px;
  background: var(--edu-surface);
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
  box-shadow: none;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

body.edu-role-teacher :where(.btn, .btn-template-primary, .btn-template-secondary, .btn-template-gradient, .edu-button)::after {
  display: none;
}

body.edu-role-teacher :where(.btn, .btn-template-secondary, .edu-button):hover:not(:disabled) {
  border-color: var(--edu-border-strong);
  background: var(--edu-surface-subtle);
  color: var(--edu-text-primary);
  box-shadow: none;
  transform: none;
}

body.edu-role-teacher :where(.btn.primary, .btn-template-primary, .btn-template-gradient, .edu-button--primary),
html[data-theme="dark"] body.edu-role-teacher .btn.primary {
  border-color: var(--edu-blue);
  background: var(--edu-blue);
  color: #ffffff;
  box-shadow: none;
}

body.edu-role-teacher :where(.btn.primary, .btn-template-primary, .btn-template-gradient, .edu-button--primary):hover:not(:disabled) {
  border-color: var(--edu-blue-hover);
  background: var(--edu-blue-hover);
  color: #ffffff;
  box-shadow: none;
  transform: none;
}

body.edu-role-teacher .btn.ghost,
body.edu-role-teacher .edu-button--tertiary {
  border-color: transparent;
  background: transparent;
  color: var(--edu-blue-hover);
}

html[data-theme="dark"] body.edu-role-teacher .btn.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--edu-blue-hover);
}

body.edu-role-teacher :where(.btn.ghost, .edu-button--tertiary):hover:not(:disabled) {
  border-color: transparent;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
}

body.edu-role-teacher :where(.btn.danger, .edu-button--danger) {
  border-color: #fda29b;
  background: var(--edu-surface);
  color: var(--edu-error);
}

body.edu-role-teacher :where(.btn.danger, .edu-button--danger):hover:not(:disabled) {
  border-color: #f97066;
  background: var(--edu-error-bg);
  color: var(--edu-error);
}

body.edu-role-teacher :where(.btn.sm, .edu-button--compact) {
  min-height: 36px;
  padding: 7px 12px;
  border-radius: 7px;
  font-size: 13px;
}

body.edu-role-teacher :where(.btn, .btn-template-primary, .btn-template-secondary, .btn-template-gradient, .edu-button):disabled {
  opacity: 1;
  border-color: var(--edu-border);
  background: #f2f4f7;
  color: var(--edu-text-secondary);
  box-shadow: none;
  transform: none;
}

html[data-theme="dark"] body.edu-role-teacher .btn.primary:disabled {
  border-color: var(--edu-border);
  background: #f2f4f7;
  color: var(--edu-text-secondary);
  box-shadow: none;
}

html[data-theme="dark"] body.edu-role-teacher .btn:hover:not(:disabled) {
  border-color: var(--edu-border-strong);
  background: var(--edu-surface-subtle);
  color: var(--edu-text-primary);
  box-shadow: none;
  transform: none;
}

html[data-theme="dark"] body.edu-role-teacher .btn.primary:hover:not(:disabled) {
  border-color: var(--edu-blue-hover);
  background: var(--edu-blue-hover);
  color: #ffffff;
}

html[data-theme="dark"] body.edu-role-teacher .btn.ghost:hover:not(:disabled) {
  border-color: transparent;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
}

/* Status hierarchy */
body.edu-role-teacher :where(.status-badge, .card-tag, .edu-status) {
  min-height: 24px;
  padding: 3px 8px;
  gap: 6px;
  border: 1px solid var(--edu-border);
  border-radius: 999px;
  background: var(--edu-surface-subtle);
  color: var(--edu-text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.edu-role-teacher :where(.status-online, .edu-status--success) {
  border-color: #abefc6;
  background: var(--edu-success-bg);
  color: var(--edu-success);
}

body.edu-role-teacher :where(.edu-status--warning) {
  border-color: #fedf89;
  background: var(--edu-warning-bg);
  color: var(--edu-warning);
}

body.edu-role-teacher :where(.edu-status--error) {
  border-color: #fecdca;
  background: var(--edu-error-bg);
  color: var(--edu-error);
}

body.edu-role-teacher :where(.edu-status--info, .card-tag-cyan) {
  border-color: #b2ddff;
  background: var(--edu-info-bg);
  color: var(--edu-info);
}

body.edu-role-teacher .status-dot {
  width: 7px;
  height: 7px;
  box-shadow: none;
}

/* Forms and tables */
body.edu-role-teacher :where(input, select, textarea) {
  accent-color: var(--edu-blue);
}

body.edu-role-teacher :where(.template-form-field input, .template-form-field select, .teacher-feedback-input, .grade-select, .search-box input, .edu-field) {
  min-height: 42px;
  border: 1px solid var(--edu-border-strong);
  border-radius: 8px;
  background: var(--edu-surface);
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: 14px;
  box-shadow: none;
}

body.edu-role-teacher :where(.template-form-field input, .template-form-field select, .teacher-feedback-input, .grade-select, .search-box input, .edu-field):focus {
  border-color: var(--edu-blue);
  outline: none;
  box-shadow: var(--edu-focus-ring);
}

body.edu-role-teacher .template-form-field label {
  margin-bottom: 6px;
  color: var(--edu-text-secondary);
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0;
  text-transform: none;
}

body.edu-role-teacher .template-form-panel {
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-lg);
  background: var(--edu-surface);
  box-shadow: var(--edu-shadow-xs);
}

body.edu-role-teacher .template-table-wrapper {
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
  background: var(--edu-surface);
}

body.edu-role-teacher .template-table {
  color: var(--edu-text-primary);
  font-size: 14px;
}

body.edu-role-teacher .template-table thead {
  border-bottom: 1px solid var(--edu-border);
  background: var(--edu-surface-subtle);
  color: var(--edu-text-secondary);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

body.edu-role-teacher .template-table :where(th, td) {
  height: 56px;
  padding: 12px 16px;
}

body.edu-role-teacher .template-table tbody tr {
  border-bottom-color: var(--edu-border);
}

body.edu-role-teacher .template-table tbody tr:hover {
  background: var(--edu-surface-subtle);
}

/* Shared Phase 1 state primitives. Existing teacher state panels are mapped to
   the same calm presentation; later phases can reuse the edu-state classes. */
body.edu-role-teacher :where(.edu-state, .role-state-panel, .teacher-empty-state) {
  display: grid;
  align-content: center;
  justify-items: start;
  gap: 8px;
  min-height: 144px;
  padding: 24px;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-lg);
  background: var(--edu-surface);
  color: var(--edu-text-secondary);
  text-align: left;
  box-shadow: var(--edu-shadow-xs);
}

body.edu-role-teacher .edu-state__title {
  margin: 0;
  color: var(--edu-text-primary);
  font-size: 17px;
  font-weight: 600;
}

body.edu-role-teacher .edu-state__description {
  max-width: 560px;
  margin: 0;
  color: var(--edu-text-secondary);
  font-size: 14px;
  line-height: 1.55;
}

body.edu-role-teacher .edu-state--loading {
  position: relative;
  overflow: hidden;
}

body.edu-role-teacher .edu-state--loading::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(47, 107, 255, 0.06) 50%, transparent 70%);
  animation: eduTeacherSkeleton 1.4s ease-in-out infinite;
  content: '';
  pointer-events: none;
}

body.edu-role-teacher .edu-state--error {
  border-color: #fecdca;
  background: var(--edu-error-bg);
}

@keyframes eduTeacherSkeleton {
  from { transform: translateX(-100%); }
  to { transform: translateX(100%); }
}

/* Responsive shell foundation */
body.sidebar-collapsed.edu-role-teacher .edu-sidebar {
  width: 70px;
  padding: 0 9px;
}

body.sidebar-collapsed.edu-role-teacher .edu-main {
  width: calc(100% - 70px);
  margin-left: 70px;
}

body.sidebar-collapsed.edu-role-teacher .edu-sidebar .brand {
  min-height: 76px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 12px 4px;
}

body.sidebar-collapsed.edu-role-teacher .edu-sidebar .brand-text,
body.sidebar-collapsed.edu-role-teacher .edu-sidebar .nav-label,
body.sidebar-collapsed.edu-role-teacher .edu-sidebar .sidebar-footer {
  display: none;
}

body.sidebar-collapsed.edu-role-teacher .edu-sidebar .brand-mark {
  width: 34px;
  height: 34px;
}

body.sidebar-collapsed.edu-role-teacher .edu-sidebar .sidebar-collapse-btn {
  width: 26px;
  height: 22px;
  margin: 0 auto;
  transform: rotate(180deg);
}

body.sidebar-collapsed.edu-role-teacher .edu-sidebar .nav {
  padding: 16px 0;
}

body.sidebar-collapsed.edu-role-teacher .edu-sidebar .nav-item {
  justify-content: center;
  padding: 9px;
}

body.sidebar-collapsed.edu-role-teacher .edu-sidebar .nav-item.active {
  box-shadow: none;
}

/* Teacher data provenance and write states. */
body.edu-role-teacher .teacher-data-state {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  gap: 7px;
  margin-bottom: 4px;
  color: var(--edu-text-secondary);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

body.edu-role-teacher .teacher-data-state__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--edu-success);
}

body.edu-role-teacher .teacher-data-state--demo .teacher-data-state__dot {
  background: var(--edu-warning);
}

body.edu-role-teacher .teacher-action-status,
body.edu-role-teacher .teacher-row-status,
body.edu-role-teacher .teacher-unavailable-note {
  color: var(--edu-text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

body.edu-role-teacher .teacher-action-status.is-saving,
body.edu-role-teacher .teacher-row-status.is-saving {
  color: var(--edu-info);
}

body.edu-role-teacher .teacher-action-status.is-error,
body.edu-role-teacher .teacher-row-status.is-error {
  color: var(--edu-error);
}

body.edu-role-teacher .teacher-row-status.is-saved {
  color: var(--edu-success);
}

body.edu-role-teacher .teacher-unavailable-note {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher .edu-state {
  grid-column: 1 / -1;
}

@media (max-width: 1100px) {
  body.edu-role-teacher {
    --sidebar-w: 224px;
  }

  body.edu-role-teacher .edu-view {
    padding-inline: 24px;
  }
}

@media (max-width: 780px) {
  body.edu-role-teacher {
    --sidebar-w: 68px;
  }

  body.edu-role-teacher .edu-sidebar,
  body.sidebar-collapsed.edu-role-teacher .edu-sidebar {
    top: 0;
    right: auto;
    bottom: 0;
    width: 68px;
    height: 100dvh;
    padding: 0 8px;
    flex-direction: column;
    overflow-y: auto;
    border-top: 0;
  }

  body.edu-role-teacher .edu-sidebar .brand {
    display: flex;
    min-height: 68px;
    justify-content: center;
    padding: 12px 4px;
  }

  body.edu-role-teacher .edu-sidebar :where(.brand-text, .nav-label, .sidebar-footer, .sidebar-collapse-btn) {
    display: none;
  }

  body.edu-role-teacher .nav {
    padding: 12px 0;
    flex-direction: column;
  }

  body.edu-role-teacher .nav-item {
    justify-content: center;
    flex-direction: row;
    padding: 9px;
  }

  body.edu-role-teacher .edu-main,
  body.sidebar-collapsed.edu-role-teacher .edu-main {
    width: calc(100% - 68px);
    margin-left: 68px;
    padding-bottom: 0;
  }

  body.edu-role-teacher .edu-topbar {
    min-height: 64px;
    height: 64px;
    padding: 10px 20px;
    flex-wrap: nowrap;
  }

  body.edu-role-teacher .topbar-left,
  body.edu-role-teacher .topbar-actions {
    width: auto;
  }

  body.edu-role-teacher .topbar-user-info {
    display: none;
  }

  body.edu-role-teacher .edu-view {
    padding: 24px 20px 40px;
  }

  body.edu-role-teacher .template-view-header,
  body.edu-role-teacher .edu-page-header {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.edu-role-teacher *,
  body.edu-role-teacher *::before,
  body.edu-role-teacher *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body.edu-role-teacher .edu-status--neutral {
  border-color: var(--edu-border);
  background: var(--edu-surface-subtle);
  color: var(--edu-text-secondary);
}

/* Overview */
body.edu-role-teacher .edu-view:has(> .teacher-overview) {
  max-width: 1520px;
  padding: 32px 40px 48px;
}

body.edu-role-teacher .teacher-overview {
  display: grid;
  gap: 24px;
  width: 100%;
  min-width: 0;
}

body.edu-role-teacher .teacher-overview-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  padding: 0 0 24px;
  border-bottom: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-overview-heading {
  min-width: 0;
}

body.edu-role-teacher .teacher-section-index,
body.edu-role-teacher .teacher-form-index {
  color: var(--edu-blue-hover);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.edu-role-teacher .teacher-overview-heading h1 {
  margin: 0;
  color: var(--edu-text-primary);
  font-family: var(--font);
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
}

body.edu-role-teacher .teacher-overview-context {
  margin: 8px 0 0;
  color: var(--edu-text-secondary);
  font-size: 14px;
  line-height: 1.5;
}

body.edu-role-teacher .teacher-overview-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 12px;
}

body.edu-role-teacher .teacher-overview-actions .btn,
body.edu-role-teacher .teacher-robotlab-entry .btn,
body.edu-role-teacher .teacher-today-action,
body.edu-role-teacher .teacher-section-link,
body.edu-role-teacher .teacher-row-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

body.edu-role-teacher .teacher-today,
body.edu-role-teacher .teacher-dashboard-section,
body.edu-role-teacher .teacher-create-class-panel,
body.edu-role-teacher .teacher-class-card,
body.edu-role-teacher .teacher-class-detail {
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-lg);
  background: var(--edu-surface);
  box-shadow: var(--edu-shadow-xs);
}

body.edu-role-teacher .teacher-today {
  padding: 24px;
}

body.edu-role-teacher .teacher-section-heading,
body.edu-role-teacher .teacher-dashboard-heading,
body.edu-role-teacher .teacher-collection-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

body.edu-role-teacher .teacher-section-heading > div,
body.edu-role-teacher .teacher-dashboard-heading > div {
  display: grid;
  gap: 5px;
}

body.edu-role-teacher .teacher-section-heading h2,
body.edu-role-teacher .teacher-dashboard-heading h2,
body.edu-role-teacher .teacher-robotlab-entry h2,
body.edu-role-teacher .teacher-collection-heading h2 {
  margin: 0;
  color: var(--edu-text-primary);
  font-size: 19px;
  font-weight: 650;
  letter-spacing: -.02em;
}

body.edu-role-teacher .teacher-section-summary,
body.edu-role-teacher .teacher-collection-heading span {
  color: var(--edu-text-secondary);
  font-size: 12px;
}

body.edu-role-teacher .teacher-today-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 12px;
  margin-top: 16px;
}

body.edu-role-teacher .teacher-today-item {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 4px 12px;
  min-height: 88px;
  padding: 16px;
  border: 1px solid var(--edu-border);
  border-radius: 8px;
  color: var(--edu-text-primary);
  transition: border-color 140ms ease, background-color 140ms ease;
}

body.edu-role-teacher .teacher-today-item:hover {
  border-color: var(--edu-border-strong);
  background: var(--edu-surface-subtle);
}

body.edu-role-teacher .teacher-today-count {
  display: grid;
  grid-row: 1 / 3;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: var(--edu-surface-subtle);
  color: var(--edu-text-primary);
  font-size: 18px;
  font-weight: 700;
}

body.edu-role-teacher .teacher-today-item.is-warning .teacher-today-count {
  background: var(--edu-warning-bg);
  color: var(--edu-warning);
}

body.edu-role-teacher .teacher-today-item.is-info .teacher-today-count {
  background: var(--edu-info-bg);
  color: var(--edu-info);
}

body.edu-role-teacher .teacher-today-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body.edu-role-teacher .teacher-today-copy strong {
  font-size: 14px;
}

body.edu-role-teacher .teacher-today-copy small,
body.edu-role-teacher .teacher-dashboard-heading p,
body.edu-role-teacher .teacher-robotlab-entry p,
body.edu-role-teacher .teacher-empty p {
  margin: 0;
  color: var(--edu-text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

body.edu-role-teacher .teacher-today-action {
  align-self: end;
  color: var(--edu-blue-hover);
  font-size: 12px;
  font-weight: 650;
}

body.edu-role-teacher .teacher-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

body.edu-role-teacher .teacher-overview-column {
  display: grid;
  gap: 20px;
  min-width: 0;
}

body.edu-role-teacher .teacher-dashboard-section {
  min-width: 0;
  padding: 24px;
}

body.edu-role-teacher .teacher-dashboard-heading {
  margin-bottom: 16px;
}

body.edu-role-teacher .teacher-section-link,
body.edu-role-teacher .teacher-row-link {
  flex: 0 0 auto;
  color: var(--edu-blue-hover);
  font-size: 12px;
  font-weight: 650;
}

body.edu-role-teacher .teacher-overview-class-list,
body.edu-role-teacher .teacher-compact-list,
body.edu-role-teacher .teacher-activity-list {
  display: grid;
}

body.edu-role-teacher .teacher-overview-class {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1.1fr) minmax(0, .9fr) auto;
  align-items: center;
  gap: 16px;
  min-height: 72px;
  padding: 12px 0;
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-overview-class:first-child,
body.edu-role-teacher .teacher-compact-row:first-child,
body.edu-role-teacher .teacher-activity-row:first-child {
  border-top: 0;
}

body.edu-role-teacher .teacher-class-ident,
body.edu-role-teacher .teacher-class-assignment,
body.edu-role-teacher .teacher-class-completion,
body.edu-role-teacher .teacher-activity-copy,
body.edu-role-teacher .teacher-compact-row > span {
  display: grid;
  min-width: 0;
  gap: 4px;
}

body.edu-role-teacher .teacher-class-ident {
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

body.edu-role-teacher .teacher-class-code,
body.edu-role-teacher .teacher-activity-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 700;
}

body.edu-role-teacher .teacher-class-ident h3,
body.edu-role-teacher .teacher-class-ident p,
body.edu-role-teacher .teacher-class-assignment span,
body.edu-role-teacher .teacher-class-assignment strong,
body.edu-role-teacher .teacher-class-completion span,
body.edu-role-teacher .teacher-class-no-progress {
  margin: 0;
  overflow-wrap: anywhere;
}

body.edu-role-teacher .teacher-class-ident h3,
body.edu-role-teacher .teacher-class-assignment strong {
  color: var(--edu-text-primary);
  font-size: 14px;
  font-weight: 600;
}

body.edu-role-teacher .teacher-class-ident p,
body.edu-role-teacher .teacher-class-assignment span,
body.edu-role-teacher .teacher-class-completion span,
body.edu-role-teacher .teacher-class-no-progress {
  color: var(--edu-text-secondary);
  font-size: 12px;
}

body.edu-role-teacher .teacher-progress {
  display: block;
  overflow: hidden;
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: #edf0f5;
}

body.edu-role-teacher .teacher-progress > span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--edu-blue);
}

body.edu-role-teacher .teacher-compact-row,
body.edu-role-teacher .teacher-activity-row {
  display: grid;
  align-items: center;
  min-height: 62px;
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-compact-row {
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
  color: var(--edu-text-primary);
}

body.edu-role-teacher .teacher-compact-row strong,
body.edu-role-teacher .teacher-activity-copy strong {
  font-size: 14px;
  font-weight: 600;
  overflow-wrap: anywhere;
}

body.edu-role-teacher .teacher-compact-row small,
body.edu-role-teacher .teacher-activity-copy small,
body.edu-role-teacher .teacher-compact-row time,
body.edu-role-teacher .teacher-activity-row time {
  color: var(--edu-text-secondary);
  font-size: 12px;
}

body.edu-role-teacher .teacher-activity-row {
  grid-template-columns: 36px minmax(0, 1fr) auto auto;
  gap: 12px;
  padding: 12px 0;
}

body.edu-role-teacher .teacher-robotlab-entry {
  align-self: start;
}

body.edu-role-teacher .teacher-robotlab-symbol {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  border-radius: 8px;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
}

body.edu-role-teacher .teacher-robotlab-entry h2 {
  margin: 0;
}

body.edu-role-teacher .teacher-robotlab-entry p {
  max-width: 38ch;
  margin: 8px 0 0;
}

body.edu-role-teacher .teacher-robotlab-entry .btn {
  margin-top: 24px;
}

body.edu-role-teacher .teacher-overview :is(.teacher-section-heading h2, .teacher-dashboard-heading h2, .teacher-robotlab-entry h2) {
  font-family: var(--font);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -.015em;
}

body.edu-role-teacher .teacher-overview :is(.teacher-today-copy small, .teacher-dashboard-heading p, .teacher-empty p, .teacher-robotlab-beta) {
  font-size: 13px;
  line-height: 1.5;
}

body.edu-role-teacher .teacher-robotlab-entry > p:not(.teacher-robotlab-beta) {
  font-size: 14px;
}

body.edu-role-teacher .teacher-overview :is(.teacher-section-link, .teacher-row-link, .teacher-today-action) {
  font-size: 13px;
  font-weight: 600;
}

body.edu-role-teacher .teacher-overview .btn {
  padding: 8px 16px;
}

body.edu-role-teacher .teacher-overview .btn.primary {
  background: var(--edu-blue-action);
  border-color: var(--edu-blue-action);
  color: #fff;
  box-shadow: none;
}

body.edu-role-teacher .teacher-overview .btn.primary:hover {
  background: var(--edu-blue-hover);
  border-color: var(--edu-blue-hover);
  box-shadow: none;
  transform: none;
}

body.edu-role-teacher .teacher-overview-actions .btn.ghost {
  color: var(--edu-blue-hover);
  border-color: transparent;
  background: transparent;
}

body.edu-role-teacher .teacher-overview .teacher-progress {
  height: 4px;
  background: var(--edu-border);
}

body.edu-role-teacher .teacher-overview .edu-status {
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-family: var(--font);
  font-size: 12px;
  line-height: 1.2;
}

body.edu-role-teacher .teacher-empty {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 74px;
  padding: 16px;
  border: 1px dashed var(--edu-border-strong);
  border-radius: var(--edu-radius-md);
  background: var(--edu-surface-subtle);
}

body.edu-role-teacher .teacher-empty strong {
  display: block;
  margin-bottom: 3px;
  color: var(--edu-text-primary);
  font-size: 13px;
}

body.edu-role-teacher .teacher-empty--success {
  justify-content: flex-start;
  min-height: 64px;
  gap: 12px;
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  border-style: solid;
  border-color: #abefc6;
  background: var(--edu-success-bg);
}

body.edu-role-teacher .teacher-empty--success strong {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

body.edu-role-teacher .teacher-overview .teacher-empty--success p {
  line-height: 1.4;
}

body.edu-role-teacher .teacher-empty-icon {
  display: grid;
  flex: 0 0 32px;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #d1fadf;
  color: var(--edu-success);
}

/* Classes */
body.edu-role-teacher .teacher-classes-page {
  display: grid;
  gap: 26px;
}

body.edu-role-teacher .teacher-classes-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-classes-header h1 {
  margin: 5px 0 4px;
  color: var(--edu-text-primary);
  font-size: clamp(28px, 3vw, 32px);
  font-weight: 680;
  letter-spacing: -.035em;
}

body.edu-role-teacher .teacher-classes-header p,
body.edu-role-teacher .teacher-class-detail-header p {
  margin: 0;
  color: var(--edu-text-secondary);
  font-size: 13px;
}

body.edu-role-teacher .teacher-source-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--edu-text-secondary);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

body.edu-role-teacher .teacher-source-note::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--edu-success);
  content: '';
}

body.edu-role-teacher .teacher-source-note.is-demo::before {
  background: var(--edu-warning);
}

body.edu-role-teacher .teacher-create-class-panel {
  padding: 22px 24px;
}

body.edu-role-teacher .teacher-class-form {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(220px, 1fr) minmax(180px, .7fr) auto;
  align-items: end;
  gap: 18px;
}

body.edu-role-teacher .teacher-form-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

body.edu-role-teacher .teacher-form-heading h2,
body.edu-role-teacher .teacher-form-heading p {
  margin: 0;
}

body.edu-role-teacher .teacher-form-heading h2 {
  font-size: 16px;
}

body.edu-role-teacher .teacher-form-heading p {
  margin-top: 4px;
  color: var(--edu-text-secondary);
  font-size: 11px;
}

body.edu-role-teacher .teacher-class-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

body.edu-role-teacher .teacher-class-form-actions .teacher-action-status {
  max-width: 220px;
}

body.edu-role-teacher .teacher-classes-collection {
  display: grid;
  gap: 15px;
}

body.edu-role-teacher .teacher-collection-heading {
  align-items: baseline;
}

body.edu-role-teacher .teacher-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  gap: 18px;
}

body.edu-role-teacher .teacher-class-card {
  display: grid;
  min-width: 0;
  min-height: 330px;
  padding: 22px;
  border-top: 3px solid #98a2b3;
  transition: border-color 140ms ease, box-shadow 140ms ease;
}

body.edu-role-teacher .teacher-class-card:hover,
body.edu-role-teacher .teacher-class-card.is-selected {
  border-color: var(--edu-blue);
  box-shadow: 0 4px 12px rgba(16, 24, 40, 0.06);
}

body.edu-role-teacher .teacher-class-card-header,
body.edu-role-teacher .teacher-class-card-actions,
body.edu-role-teacher .teacher-class-card-progress > div,
body.edu-role-teacher .teacher-class-detail-header,
body.edu-role-teacher .teacher-class-detail-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.edu-role-teacher .teacher-class-card-code {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid #c7d7fe;
  border-radius: 9px;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
}

body.edu-role-teacher .teacher-class-card-type {
  color: var(--edu-text-secondary);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .06em;
  text-transform: uppercase;
}

body.edu-role-teacher .teacher-class-card-title {
  margin: 20px 0 18px;
}

body.edu-role-teacher .teacher-class-card-title h3,
body.edu-role-teacher .teacher-class-card-title p {
  margin: 0;
}

body.edu-role-teacher .teacher-class-card-title h3 {
  font-size: 19px;
  letter-spacing: -.02em;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

body.edu-role-teacher .teacher-class-card-title p,
body.edu-role-teacher .teacher-class-card-note,
body.edu-role-teacher .teacher-class-card-assignment small {
  color: var(--edu-text-secondary);
  font-size: 12px;
}

body.edu-role-teacher .teacher-class-card-title p {
  margin-top: 5px;
}

body.edu-role-teacher .teacher-class-card-assignment {
  display: grid;
  align-content: start;
  min-height: 80px;
  padding: 14px;
  border-left: 3px solid var(--edu-blue);
  background: var(--edu-surface-subtle);
}

body.edu-role-teacher .teacher-class-card-assignment span {
  color: var(--edu-text-secondary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.edu-role-teacher .teacher-class-card-assignment strong {
  margin-top: 5px;
  color: var(--edu-text-primary);
  font-size: 13px;
}

body.edu-role-teacher .teacher-class-card-assignment small {
  margin-top: 3px;
}

body.edu-role-teacher .teacher-class-card-progress {
  display: grid;
  align-content: start;
  gap: 8px;
  margin-top: 18px;
}

body.edu-role-teacher .teacher-class-card-progress span,
body.edu-role-teacher .teacher-class-card-progress strong {
  font-size: 11px;
}

body.edu-role-teacher .teacher-class-card-note {
  align-self: start;
  margin: 18px 0 0;
  line-height: 1.5;
}

body.edu-role-teacher .teacher-class-card-actions {
  align-self: end;
  justify-content: flex-start;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-class-card-actions .btn {
  flex: 0 1 auto;
}

body.edu-role-teacher .teacher-class-card-actions .btn.primary {
  margin-left: auto;
}

body.edu-role-teacher .teacher-class-detail-host:empty {
  display: none;
}

body.edu-role-teacher .teacher-class-detail-host {
  scroll-margin-top: calc(var(--topbar-h) + 18px);
}

body.edu-role-teacher .teacher-class-detail {
  overflow: hidden;
  outline: none;
}

body.edu-role-teacher .teacher-class-detail-header {
  padding: 22px 24px 18px;
}

body.edu-role-teacher .teacher-class-detail-header h2 {
  margin: 5px 0 4px;
  font-size: 22px;
  letter-spacing: -.025em;
}

body.edu-role-teacher .teacher-detail-close {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 1px solid var(--edu-border);
  border-radius: 8px;
  background: var(--edu-surface);
  color: var(--edu-text-secondary);
}

body.edu-role-teacher .teacher-detail-close:hover {
  background: var(--edu-surface-subtle);
  color: var(--edu-text-primary);
}

body.edu-role-teacher .teacher-class-tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  padding: 0 24px;
  border-bottom: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-class-tab {
  min-width: 92px;
  min-height: 43px;
  padding: 10px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--edu-text-secondary);
  font-size: 13px;
  font-weight: 600;
}

body.edu-role-teacher .teacher-class-tab:hover {
  color: var(--edu-text-primary);
}

body.edu-role-teacher .teacher-class-tab.is-active {
  border-bottom-color: var(--edu-blue);
  color: var(--edu-blue-hover);
}

body.edu-role-teacher .teacher-class-tab-panel {
  padding: 24px;
}

body.edu-role-teacher .teacher-class-overview-tab {
  display: grid;
  gap: 24px;
}

body.edu-role-teacher .teacher-class-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
}

body.edu-role-teacher .teacher-class-metric {
  display: grid;
  gap: 5px;
  padding: 16px 18px;
  border-left: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-class-metric:first-child {
  border-left: 0;
}

body.edu-role-teacher .teacher-class-metric span {
  color: var(--edu-text-secondary);
  font-size: 11px;
}

body.edu-role-teacher .teacher-class-metric strong {
  font-size: 22px;
}

body.edu-role-teacher .teacher-class-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, .8fr);
  gap: 20px;
}

body.edu-role-teacher .teacher-class-detail-grid > section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
}

body.edu-role-teacher .teacher-class-detail-grid h3 {
  margin: 0 0 14px;
  font-size: 15px;
}

body.edu-role-teacher .teacher-detail-assignment strong,
body.edu-role-teacher .teacher-detail-assignment p {
  display: block;
  margin: 0;
}

body.edu-role-teacher .teacher-detail-assignment p,
body.edu-role-teacher .teacher-muted-copy {
  margin: 5px 0 14px;
  color: var(--edu-text-secondary);
  font-size: 12px;
}

body.edu-role-teacher .teacher-detail-activity {
  display: grid;
  gap: 10px;
}

body.edu-role-teacher .teacher-detail-activity > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--edu-border);
  color: var(--edu-text-secondary);
  font-size: 11px;
}

body.edu-role-teacher .teacher-class-detail-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

body.edu-role-teacher .teacher-class-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
}

body.edu-role-teacher .teacher-class-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

body.edu-role-teacher .teacher-class-table th {
  padding: 12px 16px;
  background: var(--edu-surface-subtle);
  color: var(--edu-text-secondary);
  font-size: 11px;
  font-weight: 650;
}

body.edu-role-teacher .teacher-class-table td {
  min-width: 150px;
  padding: 13px 16px;
  border-top: 1px solid var(--edu-border);
  color: var(--edu-text-primary);
  font-size: 13px;
}

body.edu-role-teacher .teacher-table-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

body.edu-role-teacher .teacher-table-person > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 7px;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
}

body.edu-role-teacher .teacher-assignment-list {
  display: grid;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
}

body.edu-role-teacher .teacher-assignment-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  align-items: center;
  gap: 18px;
  min-height: 68px;
  padding: 12px 16px;
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-assignment-row:first-child {
  border-top: 0;
}

body.edu-role-teacher .teacher-assignment-row > div {
  display: grid;
  gap: 3px;
}

body.edu-role-teacher .teacher-assignment-row small,
body.edu-role-teacher .teacher-assignment-row > span {
  color: var(--edu-text-secondary);
  font-size: 11px;
}

@media (max-width: 1439px) {
  body.edu-role-teacher .edu-view:has(> .teacher-overview) {
    padding-inline: 32px;
  }

  body.edu-role-teacher .teacher-overview-heading h1 {
    font-size: 28px;
  }
}

@media (max-width: 1199px) {
  body.edu-role-teacher .edu-view:has(> .teacher-overview) {
    padding-inline: 24px;
  }

  body.edu-role-teacher .teacher-overview-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  body.edu-role-teacher .teacher-today-list {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-today-item {
    min-height: 80px;
  }

  body.edu-role-teacher .teacher-overview-grid {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-overview-column {
    display: contents;
  }

}

@media (max-width: 1180px) {
  body.edu-role-teacher .teacher-class-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 940px) {
  body.edu-role-teacher .teacher-class-detail-grid {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-assignment-row {
    grid-template-columns: minmax(180px, 1fr) auto auto;
  }

  body.edu-role-teacher .teacher-assignment-row .teacher-row-link {
    grid-column: 1 / -1;
  }
}

@media (max-width: 780px) {
  body.edu-role-teacher .teacher-overview-header,
  body.edu-role-teacher .teacher-classes-header {
    align-items: stretch;
    flex-direction: column;
  }

  body.edu-role-teacher .teacher-overview-actions,
  body.edu-role-teacher .teacher-class-card-actions {
    flex-wrap: wrap;
  }

  body.edu-role-teacher .teacher-overview-actions .btn {
    flex: 1 1 auto;
  }

  body.edu-role-teacher .teacher-overview-class {
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 12px 0;
  }

  body.edu-role-teacher .teacher-overview-class .teacher-class-assignment {
    grid-column: 1 / -1;
  }

  body.edu-role-teacher .teacher-overview-class :is(.teacher-class-completion, .teacher-class-no-progress) {
    grid-column: 1;
  }

  body.edu-role-teacher .teacher-activity-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
  }

  body.edu-role-teacher .teacher-activity-row time {
    display: none;
  }

  body.edu-role-teacher .teacher-class-form {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-class-form-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.edu-role-teacher .teacher-class-metrics {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-class-metric {
    border-top: 1px solid var(--edu-border);
    border-left: 0;
  }

  body.edu-role-teacher .teacher-class-metric:first-child {
    border-top: 0;
  }
}

@media (max-width: 767px) {
  body.edu-role-teacher .teacher-overview-heading h1 {
    font-size: 26px;
  }
}

@media (max-width: 520px) {
  body.edu-role-teacher .teacher-today,
  body.edu-role-teacher .teacher-dashboard-section {
    padding: 20px;
  }

  body.edu-role-teacher .teacher-create-class-panel,
  body.edu-role-teacher .teacher-class-card,
  body.edu-role-teacher .teacher-class-tab-panel {
    padding: 18px;
  }

  body.edu-role-teacher .teacher-section-heading,
  body.edu-role-teacher .teacher-dashboard-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  body.edu-role-teacher .teacher-today-item {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  body.edu-role-teacher .teacher-today-count {
    width: 36px;
    height: 36px;
  }

  body.edu-role-teacher .teacher-class-detail-header {
    padding: 18px;
  }

  body.edu-role-teacher .teacher-class-tabs {
    padding: 0 12px;
  }
}

/* Phase 3: curriculum library and student assessment */
body.edu-role-teacher .teacher-lessons-page,
body.edu-role-teacher .teacher-results-page {
  display: grid;
  gap: 24px;
}

body.edu-role-teacher .teacher-lessons-header,
body.edu-role-teacher .teacher-results-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-page-kicker {
  color: var(--edu-blue-hover);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
}

body.edu-role-teacher .teacher-lessons-header h1,
body.edu-role-teacher .teacher-results-header h1 {
  margin: 5px 0 4px;
  color: var(--edu-text-primary);
  font-size: clamp(28px, 3vw, 32px);
  font-weight: 680;
  letter-spacing: -.035em;
}

body.edu-role-teacher .teacher-lessons-header p,
body.edu-role-teacher .teacher-results-header p,
body.edu-role-teacher .teacher-section-heading p {
  margin: 0;
  color: var(--edu-text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

body.edu-role-teacher .teacher-workflow-path {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
  padding: 0;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-lg);
  background: var(--edu-surface);
  box-shadow: var(--edu-shadow-xs);
  list-style: none;
}

body.edu-role-teacher .teacher-workflow-path li {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 12px 18px;
  border-left: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-workflow-path li:first-child {
  border-left: 0;
}

body.edu-role-teacher .teacher-workflow-path li:not(:last-child)::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  right: -4px;
  width: 7px;
  height: 7px;
  border-top: 1px solid var(--edu-border-strong);
  border-right: 1px solid var(--edu-border-strong);
  background: var(--edu-surface);
  content: '';
  transform: translateY(-50%) rotate(45deg);
}

body.edu-role-teacher .teacher-workflow-path span,
body.edu-role-teacher .teacher-lesson-code {
  color: var(--edu-blue-hover);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
}

body.edu-role-teacher .teacher-workflow-path strong {
  color: var(--edu-text-primary);
  font-size: 12px;
  font-weight: 620;
}

body.edu-role-teacher .teacher-lessons-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 340px);
  align-items: start;
  gap: 20px;
}

body.edu-role-teacher .teacher-lesson-library,
body.edu-role-teacher .teacher-assignment-panel,
body.edu-role-teacher .teacher-results-workspace {
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-lg);
  background: var(--edu-surface);
  box-shadow: var(--edu-shadow-xs);
}

body.edu-role-teacher .teacher-lesson-library,
body.edu-role-teacher .teacher-results-workspace {
  padding: 22px 24px 24px;
}

body.edu-role-teacher .teacher-assignment-panel {
  position: sticky;
  top: calc(var(--topbar-h) + 20px);
  padding: 22px;
  border-top: 3px solid var(--edu-cyan);
}

body.edu-role-teacher .teacher-lesson-library > .teacher-section-heading,
body.edu-role-teacher .teacher-results-workspace > .teacher-section-heading,
body.edu-role-teacher .teacher-assignment-panel > .teacher-section-heading {
  justify-content: flex-start;
}

body.edu-role-teacher .teacher-lesson-filters,
body.edu-role-teacher .teacher-results-filters {
  display: grid;
  gap: 12px;
  margin-top: 20px;
  padding: 14px;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
  background: var(--edu-surface-subtle);
}

body.edu-role-teacher .teacher-lesson-filters {
  grid-template-columns: minmax(180px, 1.35fr) repeat(3, minmax(120px, .7fr));
}

body.edu-role-teacher .teacher-results-filters {
  grid-template-columns: minmax(180px, 1.25fr) repeat(4, minmax(145px, .8fr));
}

body.edu-role-teacher .teacher-filter-search,
body.edu-role-teacher .teacher-filter-field,
body.edu-role-teacher .teacher-form-field {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body.edu-role-teacher :where(.teacher-filter-search, .teacher-filter-field, .teacher-form-field) > span {
  color: var(--edu-text-secondary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .055em;
  text-transform: uppercase;
}

body.edu-role-teacher :where(.teacher-filter-search, .teacher-filter-field, .teacher-form-field) :where(input, select, textarea) {
  width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 9px 11px;
  border: 1px solid var(--edu-border-strong);
  border-radius: var(--edu-radius-sm);
  background: var(--edu-surface);
  color: var(--edu-text-primary);
  font: inherit;
  font-size: 13px;
}

body.edu-role-teacher .teacher-form-field textarea {
  resize: vertical;
  line-height: 1.55;
}

body.edu-role-teacher .teacher-filter-summary {
  margin: 13px 2px 9px;
  color: var(--edu-text-secondary);
  font-family: var(--mono);
  font-size: 10px;
}

body.edu-role-teacher .teacher-lesson-list {
  display: grid;
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-lesson-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 19px 2px;
  border-bottom: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-lesson-row:last-child {
  border-bottom: 0;
}

body.edu-role-teacher .teacher-lesson-code {
  display: grid;
  place-items: center;
  align-self: start;
  width: 40px;
  height: 40px;
  border: 1px solid #b2e9f2;
  border-radius: 8px;
  background: var(--edu-cyan-subtle);
}

body.edu-role-teacher .teacher-lesson-body {
  min-width: 0;
}

body.edu-role-teacher .teacher-lesson-title-line {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

body.edu-role-teacher .teacher-lesson-title-line h3 {
  margin: 0;
  color: var(--edu-text-primary);
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -.015em;
}

body.edu-role-teacher .teacher-lesson-title-line .edu-status {
  flex: 0 0 auto;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.edu-role-teacher .teacher-lesson-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

body.edu-role-teacher .teacher-lesson-meta span {
  padding: 3px 7px;
  border: 1px solid var(--edu-border);
  border-radius: 4px;
  color: var(--edu-text-secondary);
  font-family: var(--mono);
  font-size: 9px;
}

body.edu-role-teacher .teacher-lesson-description {
  max-width: 760px;
  margin: 10px 0 0;
  color: var(--edu-text-secondary);
  font-size: 12px;
  line-height: 1.55;
}

body.edu-role-teacher .teacher-lesson-objectives {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 18px;
  margin-top: 13px;
  padding-top: 12px;
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-lesson-objectives > div {
  display: grid;
  gap: 3px;
}

body.edu-role-teacher .teacher-lesson-objectives span {
  color: var(--edu-text-secondary);
  font-size: 9px;
  font-weight: 650;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.edu-role-teacher .teacher-lesson-objectives strong {
  color: var(--edu-text-primary);
  font-size: 11px;
  font-weight: 560;
  line-height: 1.45;
}

body.edu-role-teacher .teacher-lesson-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 8px;
}

body.edu-role-teacher .teacher-assignment-form {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

body.edu-role-teacher .teacher-assignment-form .btn {
  justify-content: center;
  width: 100%;
}

body.edu-role-teacher .teacher-assignment-status,
body.edu-role-teacher .teacher-assessment-save-status {
  min-height: 18px;
  margin: 0;
  color: var(--edu-text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

body.edu-role-teacher :where(.teacher-assignment-status, .teacher-assessment-save-status).is-saving {
  color: var(--edu-info);
}

body.edu-role-teacher :where(.teacher-assignment-status, .teacher-assessment-save-status).is-saved {
  color: var(--edu-success);
}

body.edu-role-teacher :where(.teacher-assignment-status, .teacher-assessment-save-status).is-error {
  color: var(--edu-error);
}

body.edu-role-teacher .teacher-form-footnote {
  margin: 14px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--edu-border);
  color: var(--edu-text-secondary);
  font-size: 10px;
  line-height: 1.5;
}

body.edu-role-teacher .teacher-form-footnote--demo {
  color: var(--edu-warning);
}

body.edu-role-teacher .teacher-follow-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--edu-border);
  color: var(--edu-blue-hover);
  font-size: 12px;
  font-weight: 620;
  text-decoration: none;
}

body.edu-role-teacher .teacher-follow-link:hover {
  color: var(--edu-blue);
}

body.edu-role-teacher .teacher-detail-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 48px);
  margin: auto;
  padding: 0;
  overflow: auto;
  border: 1px solid var(--edu-border-strong);
  border-radius: var(--edu-radius-lg);
  background: var(--edu-surface);
  color: var(--edu-text-primary);
  box-shadow: 0 18px 48px rgba(16, 24, 40, .18);
}

body.edu-role-teacher .teacher-detail-dialog::backdrop {
  background: rgba(11, 21, 38, .42);
}

body.edu-role-teacher .teacher-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-dialog-header h2 {
  margin: 5px 0 0;
  font-size: 22px;
  letter-spacing: -.025em;
}

body.edu-role-teacher .teacher-dialog-header p {
  margin: 5px 0 0;
  color: var(--edu-text-secondary);
  font-size: 12px;
}

body.edu-role-teacher .teacher-dialog-close {
  display: grid;
  flex: 0 0 34px;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-sm);
  background: var(--edu-surface);
  color: var(--edu-text-secondary);
  font-size: 22px;
}

body.edu-role-teacher .teacher-dialog-content {
  display: grid;
  gap: 22px;
  padding: 22px 24px 24px;
}

body.edu-role-teacher .teacher-dialog-content section h3 {
  margin: 0 0 8px;
  font-size: 13px;
}

body.edu-role-teacher .teacher-dialog-content section p {
  margin: 0;
  color: var(--edu-text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

body.edu-role-teacher .teacher-preview-meta,
body.edu-role-teacher .teacher-assessment-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
}

body.edu-role-teacher :where(.teacher-preview-meta, .teacher-assessment-context) > div {
  display: grid;
  gap: 3px;
  padding: 12px 14px;
  border-left: 1px solid var(--edu-border);
  border-top: 1px solid var(--edu-border);
}

body.edu-role-teacher :where(.teacher-preview-meta, .teacher-assessment-context) > div:nth-child(odd) {
  border-left: 0;
}

body.edu-role-teacher :where(.teacher-preview-meta, .teacher-assessment-context) > div:nth-child(-n + 2) {
  border-top: 0;
}

body.edu-role-teacher :where(.teacher-preview-meta, .teacher-assessment-context) span {
  color: var(--edu-text-secondary);
  font-size: 9px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

body.edu-role-teacher :where(.teacher-preview-meta, .teacher-assessment-context) strong {
  font-size: 12px;
  font-weight: 620;
}

body.edu-role-teacher .teacher-concept-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body.edu-role-teacher .teacher-concept-list span {
  padding: 5px 8px;
  border: 1px solid #b2e9f2;
  border-radius: 5px;
  background: var(--edu-cyan-subtle);
  color: #087990;
  font-size: 11px;
}

body.edu-role-teacher .teacher-goal-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

body.edu-role-teacher .teacher-goal-list li {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  color: var(--edu-text-primary);
  font-size: 12px;
  line-height: 1.5;
}

body.edu-role-teacher .teacher-goal-list svg {
  color: var(--edu-success);
}

body.edu-role-teacher .teacher-dialog-footer {
  display: flex;
  justify-content: flex-end;
  padding: 14px 24px;
  border-top: 1px solid var(--edu-border);
  background: var(--edu-surface-subtle);
}

/* Student results */
body.edu-role-teacher .teacher-results-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 16px;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
}

body.edu-role-teacher .teacher-result-metric {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 14px 16px 14px 19px;
  border-left: 1px solid var(--edu-border);
}

body.edu-role-teacher .teacher-result-metric:first-child {
  border-left: 0;
}

body.edu-role-teacher .teacher-result-metric::before {
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 0;
  width: 3px;
  background: var(--edu-border-strong);
  content: '';
}

body.edu-role-teacher .teacher-result-metric:first-child::before {
  display: none;
}

body.edu-role-teacher .teacher-result-metric.is-info::before { background: var(--edu-cyan); }
body.edu-role-teacher .teacher-result-metric.is-warning::before { background: #f79009; }
body.edu-role-teacher .teacher-result-metric.is-success::before { background: var(--edu-success); }

body.edu-role-teacher .teacher-result-metric span {
  color: var(--edu-text-secondary);
  font-size: 10px;
}

body.edu-role-teacher .teacher-result-metric strong {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 650;
}

body.edu-role-teacher .teacher-results-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--edu-border);
  border-radius: var(--edu-radius-md);
}

body.edu-role-teacher .teacher-results-table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  text-align: left;
}

body.edu-role-teacher .teacher-results-table th {
  padding: 11px 14px;
  background: var(--edu-surface-subtle);
  color: var(--edu-text-secondary);
  font-size: 10px;
  font-weight: 650;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body.edu-role-teacher .teacher-results-table td {
  padding: 13px 14px;
  border-top: 1px solid var(--edu-border);
  color: var(--edu-text-primary);
  font-size: 12px;
  vertical-align: middle;
}

body.edu-role-teacher .teacher-results-table tr.requires-attention td:first-child {
  box-shadow: inset 3px 0 0 #f79009;
}

body.edu-role-teacher .teacher-results-table td > strong,
body.edu-role-teacher .teacher-result-person strong {
  display: block;
  font-size: 12px;
  font-weight: 620;
}

body.edu-role-teacher .teacher-results-table td > small,
body.edu-role-teacher .teacher-result-person small,
body.edu-role-teacher .teacher-result-state small {
  display: block;
  margin-top: 3px;
  color: var(--edu-text-secondary);
  font-size: 10px;
}

body.edu-role-teacher .teacher-result-person {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
}

body.edu-role-teacher .teacher-result-person > span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid #c7d7fe;
  border-radius: 7px;
  background: var(--edu-blue-subtle);
  color: var(--edu-blue-hover);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
}

body.edu-role-teacher .teacher-result-state {
  display: grid;
  justify-items: start;
}

body.edu-role-teacher .teacher-result-state.is-waiting strong {
  color: var(--edu-text-secondary);
}

body.edu-role-teacher .teacher-result-action {
  text-align: right;
}

body.edu-role-teacher .teacher-no-action {
  color: var(--edu-text-secondary);
  font-size: 10px;
}

body.edu-role-teacher .teacher-assessment-form {
  display: grid;
  gap: 16px;
}

body.edu-role-teacher .teacher-assessment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

@media (max-width: 1380px) {
  body.edu-role-teacher .teacher-lesson-filters,
  body.edu-role-teacher .teacher-results-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.edu-role-teacher .teacher-filter-search {
    grid-column: span 2;
  }

  body.edu-role-teacher .teacher-lesson-row {
    grid-template-columns: minmax(0, 1fr);
  }

  body.edu-role-teacher .teacher-lesson-actions {
    grid-column: 1;
  }
}

@media (max-width: 960px) {
  body.edu-role-teacher .teacher-lessons-layout {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-assignment-panel {
    position: static;
  }

  body.edu-role-teacher .teacher-assignment-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.edu-role-teacher .teacher-assignment-form .teacher-assignment-status,
  body.edu-role-teacher .teacher-assignment-form .btn {
    grid-column: span 2;
  }

  body.edu-role-teacher .teacher-results-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.edu-role-teacher .teacher-result-metric:nth-child(3) {
    border-top: 1px solid var(--edu-border);
    border-left: 0;
  }

  body.edu-role-teacher .teacher-result-metric:nth-child(4) {
    border-top: 1px solid var(--edu-border);
  }
}

@media (max-width: 700px) {
  body.edu-role-teacher .teacher-lessons-header,
  body.edu-role-teacher .teacher-results-header {
    align-items: flex-start;
    flex-direction: column;
  }

  body.edu-role-teacher .teacher-workflow-path {
    grid-template-columns: repeat(2, 1fr);
  }

  body.edu-role-teacher .teacher-workflow-path li:nth-child(3) {
    border-top: 1px solid var(--edu-border);
    border-left: 0;
  }

  body.edu-role-teacher .teacher-workflow-path li:nth-child(4) {
    border-top: 1px solid var(--edu-border);
  }

  body.edu-role-teacher .teacher-workflow-path li:nth-child(2)::after {
    display: none;
  }

  body.edu-role-teacher .teacher-lesson-library,
  body.edu-role-teacher .teacher-assignment-panel,
  body.edu-role-teacher .teacher-results-workspace {
    padding: 18px;
  }

  body.edu-role-teacher .teacher-lesson-filters,
  body.edu-role-teacher .teacher-results-filters,
  body.edu-role-teacher .teacher-assignment-form {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-filter-search,
  body.edu-role-teacher .teacher-assignment-form .teacher-assignment-status,
  body.edu-role-teacher .teacher-assignment-form .btn {
    grid-column: 1;
  }

  body.edu-role-teacher .teacher-lesson-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }

  body.edu-role-teacher .teacher-lesson-code {
    width: 34px;
    height: 34px;
  }

  body.edu-role-teacher .teacher-lesson-title-line {
    align-items: flex-start;
    flex-direction: column;
  }

  body.edu-role-teacher .teacher-lesson-objectives {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-lesson-actions {
    grid-column: 1 / -1;
    padding-left: 0;
  }
}

@media (max-width: 480px) {
  body.edu-role-teacher .teacher-workflow-path {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-workflow-path li,
  body.edu-role-teacher .teacher-workflow-path li:nth-child(2),
  body.edu-role-teacher .teacher-workflow-path li:nth-child(4) {
    border-top: 1px solid var(--edu-border);
    border-left: 0;
  }

  body.edu-role-teacher .teacher-workflow-path li:first-child {
    border-top: 0;
  }

  body.edu-role-teacher .teacher-workflow-path li::after {
    display: none;
  }

  body.edu-role-teacher .teacher-results-summary,
  body.edu-role-teacher .teacher-preview-meta,
  body.edu-role-teacher .teacher-assessment-context {
    grid-template-columns: 1fr;
  }

  body.edu-role-teacher .teacher-result-metric,
  body.edu-role-teacher .teacher-result-metric:nth-child(2),
  body.edu-role-teacher .teacher-result-metric:nth-child(4),
  body.edu-role-teacher :where(.teacher-preview-meta, .teacher-assessment-context) > div {
    border-top: 1px solid var(--edu-border);
    border-left: 0;
  }

  body.edu-role-teacher .teacher-result-metric:first-child,
  body.edu-role-teacher :where(.teacher-preview-meta, .teacher-assessment-context) > div:first-child {
    border-top: 0;
  }

  body.edu-role-teacher .teacher-lesson-actions {
    display: grid;
    padding-left: 0;
  }
}
