.mct-teacher-dashboard {
  --mct-preview-ink: #1f2a44;
  --mct-preview-muted: #64708a;
  --mct-preview-surface: #ffffff;
  --mct-preview-canvas: #f5f7fb;
  --mct-preview-border: #dfe5ef;
  --mct-preview-accent: #236b78;
  --mct-preview-accent-soft: #e8f3f4;
  --mct-preview-positive: #267a56;
  --mct-preview-positive-soft: #e7f5ed;
  --mct-preview-draft: #9a5a16;
  --mct-preview-draft-soft: #fff2dc;
  --mct-preview-radius-lg: 24px;
  --mct-preview-radius-md: 16px;
  --mct-preview-shadow: 0 12px 32px rgb(31 42 68 / 8%);

  box-sizing: border-box;
  width: 100%;
  max-width: 1120px;
  margin: 1rem auto;
  padding: clamp(1rem, 2.5vw, 2rem);
  overflow: visible;
  color: var(--mct-preview-ink);
  font-family: inherit;
  background: var(--mct-preview-canvas);
  border: 1px solid var(--mct-preview-border);
  border-radius: var(--mct-preview-radius-lg);
  box-shadow: var(--mct-preview-shadow);
}

.mct-teacher-dashboard .mct-teacher-icon-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.mct-teacher-dashboard .mct-teacher-icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
  overflow: visible;
  fill: currentcolor;
}

.mct-teacher-dashboard .mct-heading-with-icon {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.mct-teacher-dashboard .mct-heading-with-icon > .mct-teacher-icon {
  color: var(--mct-preview-accent);
  font-size: 0.88em;
}

.mct-teacher-dashboard > #mct-teacher-navigation-root {
  position: sticky;
  top: 0.5rem;
  z-index: 30;
  margin: 0 0 1rem;
}

.mct-teacher-dashboard > #mct-teacher-navigation-root:empty {
  display: none;
}

.mct-teacher-dashboard .mct-teacher-navigation {
  position: relative;
  max-width: 100%;
  margin: 0;
  padding: 0.35rem;
  background: rgb(255 255 255 / 96%);
  border: 1px solid var(--mct-preview-border);
  border-radius: 999px;
  box-shadow: 0 7px 20px rgb(31 42 68 / 12%);
  backdrop-filter: blur(10px);
}

body.admin-bar .mct-teacher-dashboard > #mct-teacher-navigation-root {
  top: calc(32px + 0.5rem);
}

.mct-teacher-dashboard .mct-teacher-navigation__items {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  overscroll-behavior-inline: contain;
}

.mct-teacher-dashboard .mct-teacher-navigation__item {
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-width: 2.75rem;
  width: auto;
  height: 2.75rem;
  padding: 0 0.75rem;
  color: var(--mct-preview-muted);
  font-size: 0.82rem;
  font-weight: 650;
  line-height: 1.15;
  text-align: center;
  text-decoration: none;
  background: transparent;
  border-radius: 999px;
  transition:
    color 150ms ease,
    background-color 150ms ease,
    box-shadow 150ms ease;
}

.mct-teacher-dashboard .mct-teacher-navigation__item:hover,
.mct-teacher-dashboard .mct-teacher-navigation__item:focus-visible,
.mct-teacher-dashboard .mct-teacher-navigation__item--active {
  color: var(--mct-preview-accent);
  background: var(--mct-preview-accent-soft);
}

.mct-teacher-dashboard .mct-teacher-navigation__item:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--mct-preview-accent) 42%, transparent);
  outline-offset: -2px;
}

.mct-teacher-dashboard .mct-teacher-navigation__item--active {
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--mct-preview-accent) 35%, transparent);
}

.mct-teacher-dashboard .mct-teacher-navigation__item > .mct-teacher-icon {
  font-size: 1.05rem;
}

.mct-teacher-dashboard .mct-teacher-navigation__label {
  white-space: nowrap;
}

.mct-teacher-navigation__tooltip {
  position: fixed;
  z-index: 100000;
  max-width: calc(100vw - 1rem);
  padding: 0.28rem 0.55rem;
  color: #fff;
  font-size: 0.75rem;
  line-height: 1.2;
  white-space: nowrap;
  pointer-events: none;
  background: #1f2a44;
  border-radius: 0.4rem;
  transition: opacity 100ms ease;
}

.mct-teacher-dashboard--sectional .mct-teacher-dashboard__section[hidden] {
  display: none !important;
}

.mct-teacher-dashboard .mct-teacher-dashboard__section {
  min-width: 0;
}

.mct-teacher-dashboard
  :is(
    .mct-teacher-dashboard__section,
    #mct-teacher-dashboard-home,
    #mct-teacher-agenda-root,
    #mct-teacher-dashboard-schedule,
    #mct-group-roster-root,
    #mct-teacher-dashboard-groups,
    #mct-class-mode-root,
    #mct-class-crazy-random,
    #mct-class-presentation,
    #mct-student-progress-root,
    .mct-student-progress__header,
    .mct-student-progress__detail,
    .mct-student-progress__evidence,
    #mct-operational-reports-root,
    #mct-teacher-dashboard-owner
  ) {
  scroll-margin-top: 5.25rem;
}

body.admin-bar
  .mct-teacher-dashboard
  :is(
    .mct-teacher-dashboard__section,
    #mct-teacher-dashboard-home,
    #mct-teacher-agenda-root,
    #mct-teacher-dashboard-schedule,
    #mct-group-roster-root,
    #mct-teacher-dashboard-groups,
    #mct-class-mode-root,
    #mct-class-crazy-random,
    #mct-class-presentation,
    #mct-student-progress-root,
    .mct-student-progress__header,
    .mct-student-progress__detail,
    .mct-student-progress__evidence,
    #mct-operational-reports-root,
    #mct-teacher-dashboard-owner
  ) {
  scroll-margin-top: calc(32px + 5.25rem);
}

.mct-teacher-dashboard__app-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: 0;
  padding: 0.15rem 0.35rem 1rem;
  color: var(--mct-preview-muted);
  font-size: 0.82rem;
  line-height: 1.4;
}

.mct-teacher-dashboard__app-brand {
  flex: 0 1 auto;
  color: var(--mct-preview-ink);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mct-teacher-dashboard__app-user {
  min-width: 0;
  margin-left: auto;
  overflow-wrap: anywhere;
  font-weight: 650;
  text-align: right;
}

.mct-teacher-dashboard__back-link {
  flex: 0 0 auto;
  color: var(--mct-preview-accent);
  font-weight: 700;
  text-decoration: none;
}

.mct-teacher-dashboard__back-link:hover,
.mct-teacher-dashboard__back-link:focus-visible {
  text-decoration: underline;
}

.mct-teacher-dashboard__back-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

.mct-teacher-dashboard *,
.mct-teacher-dashboard *::before,
.mct-teacher-dashboard *::after {
  box-sizing: inherit;
}

.mct-teacher-dashboard__header {
  position: relative;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  color: #ffffff;
  background: var(--mct-preview-ink);
  border-radius: var(--mct-preview-radius-lg);
}

.mct-teacher-dashboard__header::after {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  width: 3.25rem;
  height: 3.25rem;
  content: '';
  background: var(--mct-preview-accent);
  border: 0.5rem solid rgb(255 255 255 / 18%);
  border-radius: 50%;
}

.mct-teacher-dashboard__brand,
.mct-teacher-dashboard__eyebrow {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 750;
  line-height: 1.4;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.mct-teacher-dashboard__brand {
  color: #aee1e6;
}

.mct-teacher-dashboard__title {
  max-width: calc(100% - 4.5rem);
  margin: 0;
  color: #ffffff;
  font-size: clamp(1.8rem, 5vw, 3.1rem);
  font-weight: 780;
  line-height: 1.08;
  letter-spacing: -0.035em;
}

.mct-teacher-dashboard__greeting {
  margin: 1rem 0 0;
  color: #e6ecf6;
  font-size: clamp(1rem, 2.4vw, 1.15rem);
  line-height: 1.6;
}

.mct-teacher-dashboard__greeting-lead {
  color: inherit;
}

.mct-teacher-dashboard__greeting strong {
  color: #ffffff;
  font-weight: 700;
}

.mct-teacher-dashboard__summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.mct-teacher-dashboard__summary-card,
.mct-teacher-dashboard__group-card {
  min-width: 0;
  background: var(--mct-preview-surface);
  border: 1px solid var(--mct-preview-border);
  border-radius: var(--mct-preview-radius-md);
}

.mct-teacher-dashboard__summary-card {
  padding: clamp(1.15rem, 3vw, 1.6rem);
}

.mct-teacher-dashboard__eyebrow {
  color: var(--mct-preview-accent);
}

.mct-teacher-dashboard__card-title,
.mct-teacher-dashboard__section-heading h3,
.mct-teacher-dashboard__group-card h4,
.mct-teacher-dashboard--message h2 {
  color: var(--mct-preview-ink);
  font-family: inherit;
}

.mct-teacher-dashboard__card-title {
  margin: 0 0 1rem;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 720;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.mct-teacher-dashboard__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  color: var(--mct-preview-muted);
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.2;
  background: #eef1f6;
  border-radius: 999px;
}

.mct-teacher-dashboard__status > span {
  width: 0.55rem;
  height: 0.55rem;
  background: currentColor;
  border-radius: 50%;
}

.mct-teacher-dashboard__status--active {
  color: var(--mct-preview-positive);
  background: var(--mct-preview-positive-soft);
}

.mct-teacher-dashboard__status--draft {
  color: var(--mct-preview-draft);
  background: var(--mct-preview-draft-soft);
}

.mct-teacher-dashboard__groups {
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
}

.mct-teacher-dashboard__schedule-management,
.mct-teacher-dashboard__owner-administration {
  min-width: 0;
  margin-top: clamp(1.5rem, 4vw, 2.25rem);
  border: 1px solid var(--mct-preview-border);
  border-radius: var(--mct-preview-radius-md);
  background: #f8faff;
  padding: clamp(1rem, 3vw, 1.5rem);
}

.mct-teacher-dashboard__owner-administration {
  background: var(--mct-preview-surface);
}

.mct-teacher-dashboard__region-heading {
  margin-bottom: 1rem;
}

.mct-teacher-dashboard__region-heading p,
.mct-teacher-dashboard__region-heading h2 {
  margin: 0;
}

.mct-teacher-dashboard__region-heading h2 {
  color: var(--mct-preview-ink);
  font-family: inherit;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  line-height: 1.2;
}

.mct-teacher-dashboard__schedule-management > :not(.mct-teacher-dashboard__region-heading),
.mct-teacher-dashboard__owner-administration > :not(.mct-teacher-dashboard__region-heading) {
  min-width: 0;
}

.mct-teacher-dashboard__section-heading {
  margin-bottom: 1rem;
}

.mct-teacher-dashboard__section-heading h3 {
  margin: 0;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
  font-weight: 760;
  line-height: 1.2;
}

.mct-teacher-dashboard__group-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 1rem;
  padding: 0;
  margin: 0;
  list-style: none;
}

.mct-teacher-dashboard__group-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 7.5rem;
  padding: 1.25rem;
  border-left: 0.35rem solid var(--mct-preview-accent);
}

.mct-teacher-dashboard__group-card h4 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 720;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mct-teacher-dashboard__level {
  margin: 0.35rem 0 0;
  color: var(--mct-preview-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.mct-teacher-dashboard__empty,
.mct-teacher-dashboard--message p {
  margin: 0;
  color: var(--mct-preview-muted);
  font-size: 1rem;
  line-height: 1.65;
}

.mct-teacher-dashboard__empty--groups {
  padding: 1.25rem;
  background: var(--mct-preview-surface);
  border: 1px dashed var(--mct-preview-border);
  border-radius: var(--mct-preview-radius-md);
}

.mct-teacher-dashboard--message {
  max-width: 46rem;
  text-align: center;
}

.mct-teacher-dashboard--message h2 {
  margin: 0 0 0.6rem;
  font-size: clamp(1.4rem, 4vw, 2rem);
  line-height: 1.2;
}

@media (max-width: 680px) {
  .mct-teacher-dashboard {
    margin-block: 0.5rem;
    border-radius: var(--mct-preview-radius-md);
  }

  .mct-teacher-dashboard .mct-teacher-navigation {
    border-radius: var(--mct-preview-radius-md);
  }

  .mct-teacher-dashboard .mct-teacher-navigation__items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(8.75rem, 100%), 1fr));
    overflow: visible;
  }

  .mct-teacher-dashboard .mct-teacher-navigation__item {
    justify-content: flex-start;
    width: 100%;
    height: auto;
    min-height: 2.75rem;
    padding: 0.55rem 0.65rem;
    text-align: left;
  }

  .mct-teacher-dashboard .mct-teacher-navigation__label {
    overflow-wrap: anywhere;
    white-space: normal;
  }

  .mct-teacher-dashboard__app-header {
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    padding-inline: 0.1rem;
  }

  .mct-teacher-dashboard__app-user {
    margin-left: auto;
  }

  .mct-teacher-dashboard__header {
    border-radius: var(--mct-preview-radius-md);
  }

  .mct-teacher-dashboard__header::after {
    width: 2.4rem;
    height: 2.4rem;
  }

  .mct-teacher-dashboard__summary {
    grid-template-columns: 1fr;
  }

  .mct-teacher-dashboard__group-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media screen and (max-width: 782px) {
  body.admin-bar .mct-teacher-dashboard > #mct-teacher-navigation-root {
    top: calc(46px + 0.5rem);
  }

  body.admin-bar
    .mct-teacher-dashboard
    :is(
      .mct-teacher-dashboard__section,
      #mct-teacher-dashboard-home,
      #mct-teacher-agenda-root,
      #mct-teacher-dashboard-schedule,
      #mct-group-roster-root,
      #mct-teacher-dashboard-groups,
      #mct-class-mode-root,
      #mct-class-crazy-random,
      #mct-class-presentation,
      #mct-student-progress-root,
      .mct-student-progress__header,
      .mct-student-progress__detail,
      .mct-student-progress__evidence,
      #mct-operational-reports-root,
      #mct-teacher-dashboard-owner
    ) {
    scroll-margin-top: calc(46px + 5.25rem);
  }
}

@media (prefers-reduced-motion: reduce) {
  .mct-teacher-dashboard .mct-teacher-navigation__item,
  .mct-teacher-navigation__tooltip {
    transition: none;
  }
}
