/* iPad-first rehearsal attendance interface */
:root {
  --mc-ink: #172033;
  --mc-soft-ink: #475569;
  --mc-muted: #718096;
  --mc-line: #dbe4ef;
  --mc-surface: #ffffff;
  --mc-surface-2: #f8fbff;
  --mc-app: #eef5fb;
  --mc-navy: #101827;
  --mc-blue: #2563eb;
  --mc-sky: #0284c7;
  --mc-green: #059669;
  --mc-amber: #d97706;
  --mc-red: #e11d48;
  --mc-purple: #7c3aed;
  --mc-shadow: 0 18px 50px rgba(15, 23, 42, 0.10), 0 2px 8px rgba(15, 23, 42, 0.04);
  --mc-shadow-sm: 0 10px 24px rgba(15, 23, 42, 0.07);
}

* {
  -webkit-tap-highlight-color: transparent;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--mc-app);
}

body {
  min-width: 320px;
  color: var(--mc-ink);
  background:
    radial-gradient(circle at 14% -10%, rgba(37, 99, 235, 0.13), transparent 30rem),
    radial-gradient(circle at 92% 10%, rgba(5, 150, 105, 0.12), transparent 26rem),
    linear-gradient(180deg, #f8fbff 0%, #edf4fb 50%, #f8fbff 100%);
  touch-action: manipulation;
}

.mc-icon {
  width: 1.1rem !important;
  height: 1.1rem !important;
}

body svg {
  width: 1.25rem;
  height: 1.25rem;
  max-width: 2rem;
  max-height: 2rem;
  flex: 0 0 auto;
}

a,
button,
input,
textarea,
select {
  transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease, opacity 150ms ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.26);
  outline-offset: 3px;
}

button,
a {
  -webkit-touch-callout: none;
}

input,
textarea,
select {
  background: rgba(255, 255, 255, 0.96);
  border-color: #cbd5e1;
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(37, 99, 235, 0.42);
}

.mc-shell {
  min-height: 100vh;
  background: transparent;
}

.mc-sidebar {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(203, 213, 225, 0.78) !important;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(20px);
}

.mc-brand {
  letter-spacing: 0;
}

.mc-brand-mark {
  background: linear-gradient(135deg, #0f172a, #1e3a8a) !important;
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.22);
}

.mc-brand-mark svg {
  color: #fff;
}

.mc-nav {
  padding-top: 1rem;
}

.mc-nav-item {
  min-height: 3rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
}

.mc-nav-item.bg-slate-900 {
  background: linear-gradient(135deg, #0f172a, #1e293b 58%, #1e40af) !important;
  color: #fff !important;
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 14px 26px rgba(30, 64, 175, 0.20);
}

.mc-nav-item:not(.bg-slate-900):hover {
  background: #eef6ff !important;
  color: #1e3a8a !important;
  border-color: rgba(37, 99, 235, 0.18);
}

.mc-content {
  min-width: 0;
}

.mc-mobile-header {
  height: 4rem;
  background: rgba(255, 255, 255, 0.94) !important;
  backdrop-filter: blur(18px);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
}

.mc-menu-button {
  min-width: 2.75rem;
  min-height: 2.75rem;
}

.mc-main {
  max-width: 1280px !important;
  padding: 1.5rem clamp(1rem, 2.5vw, 2.75rem) 2.75rem !important;
}

.mc-page-head {
  padding: 1.1rem;
  margin: -0.25rem 0 1.25rem;
  background: linear-gradient(135deg, rgba(255,255,255,0.82), rgba(239,246,255,0.76));
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 1rem;
  box-shadow: var(--mc-shadow-sm);
}

.mc-tabs {
  padding: 0.35rem;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(203, 213, 225, 0.72);
  border-radius: 0.9rem;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.mc-tab {
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
  padding: 0 0.9rem;
  border-radius: 0.65rem;
  color: var(--mc-soft-ink);
  font-weight: 650;
}

.mc-tab:hover {
  background: #eef6ff;
  color: #1e3a8a;
}

.mc-tab.is-active {
  background: var(--mc-navy);
  color: #fff;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.16);
}

.bg-white.border-slate-200,
.bg-white.ring-slate-200 {
  background: rgba(255, 255, 255, 0.92) !important;
  border-color: rgba(203, 213, 225, 0.9) !important;
  box-shadow: var(--mc-shadow-sm);
}

.mc-class-pill {
  min-height: 2.75rem;
}

.mc-calendar-tools {
  align-items: stretch;
}

.mc-weekday-choice span {
  min-height: 2.75rem;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 0.7rem;
  background: #fff;
  color: var(--mc-soft-ink);
  font-weight: 750;
  cursor: pointer;
  user-select: none;
}

.mc-weekday-choice input:checked + span {
  background: var(--mc-navy);
  border-color: var(--mc-navy);
  color: #fff;
  box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
}

.mc-calendar {
  box-shadow: var(--mc-shadow);
}

.mc-calendar-day {
  min-height: 7.4rem !important;
}

.mc-calendar-day:hover {
  background-color: #eef6ff !important;
}

.mc-calendar-day.is-selected {
  box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.08);
}

.mc-today-row {
  min-height: 5.25rem;
}

.mc-today-row:hover {
  background: linear-gradient(90deg, rgba(239, 246, 255, 0.88), rgba(255, 255, 255, 0.92)) !important;
}

.rounded-xl.bg-white.border-slate-200,
.rounded-2xl.bg-white.ring-slate-200,
.rounded-xl.bg-white.ring-slate-200 {
  box-shadow: var(--mc-shadow);
}

.rounded-xl,
.rounded-2xl,
.rounded-3xl {
  border-radius: 0.9rem !important;
}

.bg-slate-900 {
  background-color: var(--mc-navy) !important;
}

.hover\:bg-slate-800:hover,
.hover\:bg-slate-900:hover {
  background-color: #0b1120 !important;
}

.bg-indigo-600 {
  background-color: var(--mc-blue) !important;
}

.hover\:bg-indigo-700:hover {
  background-color: #1d4ed8 !important;
}

.bg-emerald-500,
.bg-emerald-600 {
  background-color: var(--mc-green) !important;
}

.bg-sky-500,
.bg-sky-600 {
  background-color: var(--mc-sky) !important;
}

.bg-violet-500,
.bg-violet-600 {
  background-color: var(--mc-purple) !important;
}

.text-slate-500,
.text-slate-400 {
  color: var(--mc-muted) !important;
}

.divide-y > :where(:not(:last-child)) {
  border-color: rgba(226, 232, 240, 0.82) !important;
}

li:hover,
tbody tr:hover {
  background-color: rgba(241, 248, 255, 0.82);
}

table {
  min-width: 720px;
}

section:has(> table) {
  overflow-x: auto;
}

.att-btn,
.beh-btn,
.par-btn {
  min-height: 3.35rem;
  border-radius: 0.8rem !important;
  font-size: 1rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

.att-btn[data-selected="true"],
.beh-btn[data-selected="true"],
.par-btn[data-selected="true"] {
  transform: translateY(-1px);
  box-shadow: 0 13px 26px rgba(15, 23, 42, 0.14);
}

.att-btn:active,
.beh-btn:active,
.par-btn:active {
  transform: scale(0.97);
}

.saved-tick.show {
  animation: mc-fade 1.4s ease forwards;
  display: inline !important;
}

@keyframes mc-fade {
  0% { opacity: 0; transform: translateY(-2px); }
  20% { opacity: 1; transform: translateY(0); }
  80% { opacity: 1; }
  100% { opacity: 0; }
}

.mc-selected {
  box-shadow: inset 0 0 0 2px currentColor;
}

@media (min-width: 1024px) {
  .mc-shell {
    display: block !important;
  }

  .mc-mobile-header {
    display: none !important;
  }

  .mc-sidebar {
    position: sticky !important;
    display: flex !important;
    flex-direction: row !important;
    align-items: center;
    gap: 1rem;
    transform: translateX(0) !important;
    width: auto !important;
    height: 4.75rem !important;
    padding: 0 1.5rem;
    border-right: 0 !important;
    border-bottom: 1px solid rgba(203, 213, 225, 0.8) !important;
    z-index: 50;
  }

  .mc-sidebar > div:first-child {
    height: auto !important;
    padding: 0 !important;
    border-bottom: 0 !important;
  }

  .mc-sidebar > div:last-child {
    margin-left: auto;
    padding: 0 !important;
    border-top: 0 !important;
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .mc-sidebar > div:last-child > div:first-child,
  .mc-sidebar > div:last-child > div:nth-child(2) {
    display: none;
  }

  .mc-nav {
    display: flex;
    flex: 0 1 auto !important;
    gap: 0.35rem;
    padding: 0 !important;
  }

  .mc-nav-item {
    min-height: 2.75rem;
    padding-inline: 0.9rem !important;
  }

  .mc-content {
    min-height: calc(100vh - 4.75rem);
  }
}

/* Rehearsal input surface */
.mc-attendance {
  max-width: 1240px;
  margin: 0 auto;
}

.mc-rehearsal-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.5rem 1.75rem;
  border-radius: 1.25rem;
  background: linear-gradient(115deg, #172554 0%, #1e40af 48%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 14px 36px rgba(30, 64, 175, 0.28);
}

.mc-rehearsal-hero::after {
  content: "";
  position: absolute;
  top: -45%;
  right: -8%;
  width: 24rem;
  height: 24rem;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.45), transparent 70%);
  pointer-events: none;
}

.mc-rehearsal-hero > * { position: relative; z-index: 1; }

.mc-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  color: rgba(219, 234, 254, 0.8);
  font-size: 0.84rem;
  font-weight: 600;
}

.mc-crumbs a { color: rgba(219, 234, 254, 0.8) !important; }
.mc-crumbs a:hover { color: #fff !important; }

.mc-quarter {
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.mc-rehearsal-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.7rem;
}

.mc-rehearsal-title h1 {
  color: #fff !important;
  font-size: clamp(2.1rem, 3.6vw, 3.1rem);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(8, 15, 40, 0.35);
}

.mc-class-dot {
  width: 0.95rem;
  height: 0.95rem;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.22);
}

.mc-rehearsal-meta {
  margin-top: 0.55rem;
  color: rgba(226, 232, 240, 0.92) !important;
  font-size: 1.02rem;
  font-weight: 560;
}

.mc-rehearsal-count {
  min-width: 7.5rem;
  padding: 0.85rem 1rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  text-align: center;
  backdrop-filter: blur(6px);
}

.mc-rehearsal-count strong {
  display: block;
  color: #fff;
  font-size: 2.1rem;
  font-weight: 800;
  line-height: 1;
}

.mc-rehearsal-count span {
  color: rgba(219, 234, 254, 0.85);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.mc-mode-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin: 1rem 0;
}

.mc-mode-bar p {
  color: var(--mc-muted);
  font-size: 0.92rem;
  font-weight: 600;
}

.mc-mode-tabs {
  display: inline-flex;
  gap: 0.35rem;
  padding: 0.35rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(203, 213, 225, 0.78);
  box-shadow: var(--mc-shadow-sm);
}

.mc-mode-tabs a {
  min-height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 1rem;
  border-radius: 0.78rem;
  color: var(--mc-soft-ink);
  font-size: 1rem;
  font-weight: 750;
}

.mc-mode-tabs a.is-active {
  background: var(--mc-navy);
  color: #fff;
  box-shadow: 0 12px 22px rgba(15, 23, 42, 0.18);
}

.mc-roster-board {
  overflow: hidden;
  border: 1px solid rgba(203, 213, 225, 0.84);
  border-radius: 1.35rem;
  background: rgba(255,255,255,0.82);
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.13);
}

.mc-roster-head {
  background: rgba(248, 250, 252, 0.8);
}

.mc-student-row {
  min-height: 7.35rem;
  padding: 1rem 1.2rem !important;
  background: rgba(255, 255, 255, 0.78);
  border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.mc-student-row:first-child {
  border-top: 0;
}

.mc-student-row:hover {
  background: #f8fbff !important;
}

.mc-avatar {
  width: 3.5rem !important;
  height: 3.5rem !important;
  border-radius: 1.1rem !important;
  background: #eef3f8 !important;
  color: var(--mc-soft-ink) !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
}

.mc-student-link {
  font-size: 1.18rem !important;
  font-weight: 760 !important;
}

.mc-att-grid {
  gap: 0.75rem !important;
}

.mc-att-option,
.mc-score-btn {
  min-height: 4.75rem !important;
  border: 1px solid transparent !important;
  border-radius: 1.05rem !important;
  background: #fff !important;
  font-size: 1.08rem !important;
  font-weight: 800 !important;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.07), inset 0 1px 0 rgba(255,255,255,0.8) !important;
}

.mc-att-present {
  color: #047857 !important;
  border-color: rgba(5, 150, 105, 0.18) !important;
}

.mc-att-late {
  color: #b45309 !important;
  border-color: rgba(217, 119, 6, 0.18) !important;
}

.mc-att-absent {
  color: #be123c !important;
  border-color: rgba(225, 29, 72, 0.18) !important;
}

.mc-att-option[data-selected="true"],
.mc-score-btn[data-selected="true"] {
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.18) !important;
}

.mc-att-present[data-selected="true"] {
  background: linear-gradient(135deg, #059669, #047857) !important;
}

.mc-att-late[data-selected="true"] {
  background: linear-gradient(135deg, #d97706, #b45309) !important;
}

.mc-att-absent[data-selected="true"] {
  background: linear-gradient(135deg, #e11d48, #be123c) !important;
}

.mc-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(4.75rem, 1fr));
  gap: 0.65rem;
}

.mc-score-btn {
  min-height: 4.35rem !important;
}

.mc-score-btn[data-selected="true"] {
  background: var(--mc-navy) !important;
}

@media (max-width: 900px) {
  .mc-rehearsal-hero,
  .mc-mode-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .mc-rehearsal-count {
    text-align: left;
  }

  .mc-mode-tabs {
    width: 100%;
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 1fr;
  }

  .mc-mode-bar p {
    margin-left: 0.25rem;
  }
}

@media (max-width: 700px) {
  .mc-grade-head {
    display: none;
  }

  .mc-grade-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto;
    column-gap: 0.75rem;
    row-gap: 0.65rem;
  }

  .mc-grade-student {
    grid-column: 1 / -1;
  }

  .mc-grade-student-name {
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
    line-height: 1.25;
  }

  .mc-grade-score {
    width: auto !important;
    justify-content: flex-start;
    padding-left: 3rem;
  }

  .mc-grade-percent {
    width: auto !important;
    min-width: 3.5rem;
  }

  .mc-grade-status {
    grid-column: 1 / -1;
    min-width: 1.5rem;
    min-height: 1rem;
    padding-left: 3rem;
  }

  .mc-student-row {
    min-height: 0;
  }

  .mc-att-option,
  .mc-score-btn {
    min-height: 4rem !important;
    font-size: 0.98rem !important;
  }
}

@media (min-width: 1024px) {
  .mc-attendance .mc-main {
    padding-top: 1rem !important;
  }
}

@media (max-width: 1023px) {
  .mc-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    height: 100dvh;
  }

  .mc-main {
    padding-top: 1rem !important;
  }
}

@media (max-width: 700px) {
  .mc-main {
    padding-left: 0.85rem !important;
    padding-right: 0.85rem !important;
  }

  table {
    min-width: 660px;
  }
}

@media (pointer: coarse) {
  .mc-nav-item {
    min-height: 3.25rem;
  }

  a,
  button {
    touch-action: manipulation;
  }
}

@media (display-mode: standalone) {
  body {
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
  }
}

/* ── Planbook ─────────────────────────────────────────────── */
[x-cloak] { display: none !important; }

.mc-pb-day {
  min-height: 7.5rem !important;
}

.mc-pb-day:hover {
  background-color: #eef6ff !important;
}

.mc-pb-day--sched {
  cursor: copy;
}

.mc-pb-day--sched:hover {
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.35);
}

/* Rendered lesson-plan content (TinyMCE output) */
.mc-prose {
  color: var(--mc-ink);
  font-size: 1rem;
  line-height: 1.65;
}

.mc-prose > :first-child { margin-top: 0; }
.mc-prose > :last-child { margin-bottom: 0; }

.mc-prose p { margin: 0; }

/* Native dropdowns: guarantee a clear right-side chevron + interactive feel everywhere.
   Uses the same data-URI encoding the form reset uses (proven to render in this build). */
select:not([multiple]) {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%23475569' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e") !important;
  background-repeat: no-repeat !important;
  background-position: right 0.6rem center !important;
  background-size: 1.2em 1.2em !important;
  padding-right: 2.25rem;
  cursor: pointer;
}
select:not([multiple]):hover { border-color: #94a3b8; }

.mc-prose h1,
.mc-prose h2,
.mc-prose h3,
.mc-prose h4 {
  font-weight: 750;
  line-height: 1.25;
  color: var(--mc-navy);
  margin: 1.1rem 0 0.5rem;
}

.mc-prose h1 { font-size: 1.5rem; }
.mc-prose h2 { font-size: 1.25rem; }
.mc-prose h3 { font-size: 1.1rem; }
.mc-prose h4 { font-size: 1rem; }

.mc-prose ul,
.mc-prose ol {
  margin: 0.6rem 0;
  padding-left: 1.5rem;
}

.mc-prose ul { list-style: disc; }
.mc-prose ol { list-style: decimal; }
.mc-prose li { margin: 0.2rem 0; }

.mc-prose a {
  color: var(--mc-blue);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.mc-prose a:hover { color: #1d4ed8; }

.mc-prose strong { font-weight: 700; }
.mc-prose em { font-style: italic; }

.mc-prose blockquote {
  border-left: 3px solid var(--mc-line);
  padding-left: 1rem;
  margin: 0.8rem 0;
  color: var(--mc-soft-ink);
}

.mc-prose table {
  min-width: 0;
  width: 100%;
  border-collapse: collapse;
  margin: 0.8rem 0;
  font-size: 0.95rem;
}

.mc-prose th,
.mc-prose td {
  border: 1px solid var(--mc-line);
  padding: 0.45rem 0.7rem;
  text-align: left;
}

.mc-prose th { background: var(--mc-surface-2); font-weight: 700; }

.mc-prose img {
  max-width: 100%;
  height: auto;
  border-radius: 0.6rem;
}

.mc-prose-sm { font-size: 0.95rem; line-height: 1.55; }
.mc-prose-sm h1 { font-size: 1.25rem; }
.mc-prose-sm h2 { font-size: 1.1rem; }
.mc-prose-sm h3 { font-size: 1rem; }

/* 2026 PlanbookOne visual system */
:root {
  --mc-ink: #0f1b33;
  --mc-soft-ink: #475569;
  --mc-muted: #64748b;
  --mc-line: #e8edf4;
  --mc-app: #f5f7fb;
  --mc-navy: #0f1b33;
  --mc-blue: #2563eb;
  --mc-blue-soft: #eaf1fe;
  --mc-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 6px 18px rgba(16, 24, 40, 0.05);
  --mc-shadow-sm: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
}

html,
body {
  background: var(--mc-app) !important;
}

body {
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: -0.006em;
}

.mc-shell {
  background: var(--mc-app) !important;
}

.mc-sidebar {
  background: #ffffff !important;
  border-color: var(--mc-line) !important;
  box-shadow: none !important;
  color: var(--mc-soft-ink);
}

.mc-sidebar > div:first-child {
  min-height: 5.65rem;
  border-color: var(--mc-line) !important;
}

.mc-sidebar .mc-brand { padding: 0.1rem 0; }

.mc-logo-img {
  height: 30px;
  width: auto;
  max-width: 100%;
  display: block;
}

.mc-nav {
  padding: 0.9rem 0.7rem !important;
}

.mc-nav-item {
  min-height: 2.9rem;
  padding-inline: 0.85rem !important;
  border-radius: 0.6rem !important;
  color: var(--mc-muted) !important;
  border: 1px solid transparent !important;
  font-size: 0.92rem;
  font-weight: 600;
}

.mc-nav-item .mc-icon {
  width: 1.2rem !important;
  height: 1.2rem !important;
  color: #94a3b8;
}

.mc-nav-item.bg-slate-900 {
  background: var(--mc-blue-soft) !important;
  color: var(--mc-blue) !important;
  border-color: transparent !important;
  box-shadow: inset 3px 0 0 var(--mc-blue) !important;
}

.mc-nav-item.bg-slate-900 .mc-icon { color: var(--mc-blue) !important; }

.mc-nav-item:not(.bg-slate-900):hover {
  color: var(--mc-ink) !important;
  background: #f1f5f9 !important;
  border-color: transparent !important;
}

.mc-sidebar > div:last-child {
  margin: 0.75rem;
  padding: 0.8rem !important;
  border: 1px solid var(--mc-line) !important;
  border-radius: 0.7rem;
  background: #fff;
}

.mc-sidebar > div:last-child > div {
  color: var(--mc-soft-ink) !important;
}

.mc-sidebar > div:last-child a {
  color: var(--mc-muted) !important;
}

.mc-sidebar > div:last-child .text-slate-700 { color: var(--mc-ink) !important; }
.mc-sidebar > div:last-child .text-slate-400 { color: var(--mc-muted) !important; }

.mc-desktop-header {
  display: none;
  align-items: center;
  justify-content: flex-end;
  gap: 0.75rem;
  min-height: 4.5rem;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--mc-line);
}

.mc-header-icon {
  width: 2.45rem;
  height: 2.45rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.65rem;
  color: #263958;
}

.mc-header-icon:hover { background: #f0f5fb; color: var(--mc-blue); }
.mc-header-icon svg { width: 1.25rem; height: 1.25rem; }
.mc-header-divider { width: 1px; height: 2rem; margin: 0 0.25rem; background: var(--mc-line); }
.mc-header-avatar {
  width: 2.55rem;
  height: 2.55rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--mc-blue);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.mc-main {
  max-width: 1500px !important;
  padding: 1.8rem clamp(1rem, 2.4vw, 2.4rem) 3rem !important;
}

.mc-page-head {
  padding: 0 !important;
  margin: 0 0 1.6rem !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.mc-page-head h1,
.mc-main > div:first-child h1,
.mc-main > h1 {
  color: var(--mc-ink) !important;
  font-weight: 760 !important;
  letter-spacing: -0.03em !important;
}

.mc-quick-actions a {
  min-height: 2.7rem;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0 0.9rem;
  border-radius: 0.62rem;
  font-size: 0.79rem;
  font-weight: 720;
  white-space: nowrap;
}

.mc-quick-actions { display: none; }

.mc-quick-actions svg { width: 1rem; height: 1rem; }
.mc-action-primary { background: var(--mc-blue); color: #fff; box-shadow: 0 7px 18px rgba(8,102,255,.2); }
.mc-action-primary:hover { background: #0457df; }
.mc-action-secondary { background: #fff; color: #1b2b48; border: 1px solid #d5deea; }
.mc-action-secondary:hover { color: var(--mc-blue); border-color: #9cc1ff; background: #f8fbff; }

.mc-stat-card {
  min-height: 7rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mc-stat-icon {
  width: 3.2rem;
  height: 3.2rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  color: var(--mc-blue);
  background: #edf4ff;
}

.mc-stat-icon svg { width: 1.45rem; height: 1.45rem; }
.mc-stat-card:nth-child(2) .mc-stat-icon { color: #0574d8; background: #eaf7ff; }
.mc-stat-card:nth-child(3) .mc-stat-icon { color: #7c3aed; background: #f2edff; }
.mc-stat-card:nth-child(4) .mc-stat-icon { color: #059669; background: #eafaf4; }

.bg-white.border-slate-200,
.bg-white.ring-slate-200,
.rounded-xl.bg-white.border-slate-200,
.rounded-2xl.bg-white.ring-slate-200,
.rounded-xl.bg-white.ring-slate-200 {
  background: #fff !important;
  border-color: var(--mc-line) !important;
  box-shadow: var(--mc-shadow-sm) !important;
}

.rounded-xl,
.rounded-2xl,
.rounded-3xl {
  border-radius: 1rem !important;
}

input,
textarea,
select {
  border-color: #cfd9e7 !important;
  border-radius: 0.65rem !important;
  background: #fff !important;
}

input:focus,
textarea:focus,
select:focus {
  border-color: #5b9bff !important;
  box-shadow: 0 0 0 3px rgba(8, 102, 255, 0.12) !important;
}

.bg-slate-900,
.bg-indigo-600 {
  background: var(--mc-blue) !important;
}

.hover\:bg-slate-800:hover,
.hover\:bg-indigo-700:hover {
  background: #0457df !important;
}

thead.bg-slate-50,
.bg-slate-50 {
  background-color: #f7f9fc !important;
}

table { color: #20324f; }
th { color: #61718c; }
tbody tr:hover { background: #f7faff !important; }

@media (min-width: 1024px) {
  .mc-desktop-header { display: flex !important; }
  .mc-shell {
    display: flex !important;
    align-items: flex-start;
  }

  .mc-sidebar {
    position: sticky !important;
    top: 0 !important;
    width: 15.4rem !important;
    min-width: 15.4rem !important;
    height: 100vh !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0 !important;
    padding: 0 !important;
    border-right: 1px solid var(--mc-line) !important;
    border-bottom: 0 !important;
  }

  .mc-sidebar > div:first-child {
    height: 5.65rem !important;
    padding: 0 1.15rem !important;
    border-bottom: 1px solid var(--mc-line) !important;
  }

  .mc-sidebar > div:last-child {
    margin-left: 0.75rem !important;
    display: block !important;
  }

  .mc-sidebar > div:last-child > div:first-child,
  .mc-sidebar > div:last-child > div:nth-child(2) {
    display: block !important;
  }

  .mc-nav {
    display: block !important;
    flex: 1 1 auto !important;
  }

  .mc-nav-item { margin-bottom: 0.25rem; }
  .mc-content { min-height: 100vh !important; }
}

@media (min-width: 768px) {
  .mc-quick-actions { display: flex !important; }
}

@media (max-width: 1023px) {
  .mc-sidebar { width: 17rem !important; }
  .mc-mobile-header {
    background: #fff !important;
    border-color: var(--mc-line) !important;
  }
  .mc-mobile-header .mc-brand { color: var(--mc-ink) !important; }
}

/* ── Top navigation layout (v3) ───────────────────────────── */
.mc-shell { display: block !important; background: var(--mc-app) !important; }

.mc-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  height: 4.75rem;
  padding: 0 clamp(0.9rem, 2.5vw, 2rem);
  background: #fff;
  border-bottom: 1px solid var(--mc-line);
}

.mc-topbar .mc-brand { flex: 0 0 auto; }
.mc-logo-img { height: 46px; width: auto; max-width: 100%; display: block; }

.mc-topnav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex: 1 1 auto;
  min-width: 0;
  margin-left: 2rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.mc-topnav::-webkit-scrollbar { height: 0; }

.mc-topnav .mc-nav-item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  height: 2.5rem;
  min-height: 0;
  padding: 0 0.8rem !important;
  border-radius: 0.6rem !important;
  color: var(--mc-muted) !important;
  border: 1px solid transparent !important;
  font-weight: 600;
  font-size: 0.9rem;
  white-space: nowrap;
}
.mc-topnav .mc-nav-item .mc-icon { width: 1.15rem !important; height: 1.15rem !important; color: #94a3b8; }
.mc-topnav .mc-nav-item:not(.bg-slate-900):hover { background: #f1f5f9 !important; color: var(--mc-ink) !important; }
.mc-topnav .mc-nav-item.bg-slate-900 { background: var(--mc-blue-soft) !important; color: var(--mc-blue) !important; box-shadow: none !important; }
.mc-topnav .mc-nav-item.bg-slate-900 .mc-icon { color: var(--mc-blue) !important; }

.mc-topbar-right { margin-left: auto; display: flex; align-items: center; gap: 0.7rem; flex: 0 0 auto; }
.mc-year-chip {
  display: inline-flex;
  align-items: center;
  height: 2.1rem;
  padding: 0 0.85rem;
  border-radius: 999px;
  background: #f1f5f9;
  color: var(--mc-soft-ink);
  font-size: 0.86rem;
  font-weight: 700;
  white-space: nowrap;
}
.mc-userbox { line-height: 1.15; }
.mc-account-menu-wrap { position: relative; }
.mc-account-trigger {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 2.75rem;
  padding: 0.25rem 0.45rem;
  margin: -0.25rem -0.45rem;
  border-radius: 0.75rem;
  text-align: left;
}
.mc-account-trigger:hover, .mc-account-trigger:focus-visible { background: #f1f5f9; outline: none; }
.mc-account-chevron { width: 1rem; height: 1rem; color: #64748b; transition: transform 150ms ease; }
.mc-account-chevron.is-open { transform: rotate(180deg); }
.mc-account-menu {
  position: absolute;
  z-index: 80;
  top: calc(100% + 0.65rem);
  right: 0;
  width: 14rem;
  padding: 0.4rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
}
.mc-account-menu-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  min-height: 2.55rem;
  padding: 0.55rem 0.7rem;
  border-radius: 0.6rem;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 650;
}
.mc-account-menu-item:hover { background: #f1f5f9; color: #0f172a; }
.mc-account-menu-item.is-active { background: #eaf2ff; color: #075ee5; }
.mc-account-menu-item.is-danger { color: #be123c; }
.mc-account-menu-item.is-danger:hover { background: #fff1f2; }
.mc-account-menu-item svg { width: 1.05rem; height: 1.05rem; flex: 0 0 auto; }
.mc-account-menu-divider { height: 1px; margin: 0.35rem 0.25rem; background: #e2e8f0; }

.mc-menu-button {
  width: 2.5rem;
  height: 2.5rem;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 0.6rem;
  color: var(--mc-soft-ink);
  flex: 0 0 auto;
}
.mc-menu-button:hover { background: #f1f5f9; }

.mc-main { max-width: 1320px !important; margin: 0 auto !important; }

@media (min-width: 1024px) {
  .mc-shell { display: block !important; }
}

@media (max-width: 1023px) {
  .mc-menu-button { display: inline-flex; order: 3; }
  .mc-topbar-right { order: 2; }
  .mc-topnav {
    position: absolute;
    top: 4.75rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.15rem;
    margin: 0;
    padding: 0.6rem 0.8rem;
    background: #fff;
    border-bottom: 1px solid var(--mc-line);
    box-shadow: var(--mc-shadow);
    max-height: calc(100vh - 4.75rem);
    overflow-y: auto;
    display: none;
  }
  .mc-topnav.is-open { display: flex; }
  .mc-topnav .mc-nav-item { height: 2.9rem; width: 100%; }
  .mc-userbox { display: none; }
  .mc-account-trigger { gap: 0.35rem; }
  .mc-year-chip { display: none; }
}

/* ── Class Scheduler ─────────────────────────────────────── */
.mc-monthnav {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem;
  background: #fff;
  border: 1px solid var(--mc-line);
  border-radius: 0.8rem;
  box-shadow: var(--mc-shadow-sm);
}
.mc-monthnav-arrow {
  width: 2.2rem;
  height: 2.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.55rem;
  color: var(--mc-soft-ink);
}
.mc-monthnav-arrow:hover { background: var(--mc-blue-soft); color: var(--mc-blue); }
.mc-monthnav-arrow svg { width: 1.15rem; height: 1.15rem; }
.mc-monthnav-label {
  min-width: 8.6rem;
  text-align: center;
  font-weight: 750;
  font-size: 0.95rem;
  color: var(--mc-ink);
  letter-spacing: -0.01em;
}
.mc-monthnav-today {
  margin-left: 0.15rem;
  height: 2.2rem;
  padding: 0 0.85rem;
  display: inline-flex;
  align-items: center;
  border-radius: 0.55rem;
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--mc-soft-ink);
  border: 1px solid var(--mc-line);
}
.mc-monthnav-today:hover { background: var(--mc-blue-soft); color: var(--mc-blue); border-color: transparent; }

.mc-cal-day {
  position: relative;
  min-height: 5.75rem;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.4rem 0.5rem;
  border: 0;
  border-right: 1px solid #eef2f7;
  border-bottom: 1px solid #eef2f7;
  background: #fff;
  cursor: pointer;
  transition: background-color 0.12s ease, opacity 0.12s ease;
}
.mc-cal-day.is-empty { background: #fbfcfe; cursor: default; }
.mc-cal-day.is-weekend { background: #fafbfd; }
.mc-cal-day:not(.is-empty):hover { background: var(--mc-blue-soft); }

.mc-cal-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 0.1rem;
  margin-bottom: 0.28rem;
}
.mc-cal-daynum { font-size: 0.78rem; font-weight: 700; color: var(--mc-soft-ink); }
.mc-cal-daynum.is-today {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 999px;
  background: var(--mc-blue);
  color: #fff;
}
.mc-cal-q { font-size: 0.58rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 800; color: #9aa7bd; }

.mc-cal-chips { display: flex; flex-direction: column; gap: 0.15rem; }
.mc-cal-chip {
  display: block;
  width: 100%;
  padding: 0.09rem 0.38rem;
  border-radius: 0.32rem;
  font-size: 0.67rem;
  line-height: 1.45;
  font-weight: 650;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
}
.mc-cal-chip.is-sel { box-shadow: 0 1px 2px rgba(15, 23, 42, 0.16); }

/* Event/context chips on the scheduler (half-days, late starts, etc.) — visually
   distinct from class chips: white with a colored dot. */
.mc-cal-event {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  width: 100%;
  padding: 0.05rem 0.32rem;
  border-radius: 0.32rem;
  font-size: 0.64rem;
  line-height: 1.4;
  font-weight: 600;
  background: #ffffff;
  color: #475569;
  border: 1px dashed #cbd5e1;
  pointer-events: none;
}
.mc-cal-event-dot { width: 0.4rem; height: 0.4rem; border-radius: 9999px; flex: none; }
.mc-cal-event-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ── Gradebook grid ──────────────────────────────────────── */
.mc-gradebook-board { display: grid; grid-template-columns: 13.5rem minmax(0,1fr); overflow: hidden; }
.mc-gradebook-wrap { max-height: calc(100vh - 15rem); overflow: auto; border-left: 1px solid var(--mc-line); }
.mc-gb-students { max-height: calc(100vh - 15rem); overflow: hidden; }
.mc-gradebook { border-collapse: separate; border-spacing: 0; min-width: 100%; width: max-content; font-size: 0.85rem; }
.mc-gradebook thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
  border-bottom: 1px solid var(--mc-line);
  padding: 0.65rem 0.75rem;
  text-align: center;
  vertical-align: bottom;
}
.mc-gb-groups th { top: 0; height: 2.1rem; padding-block: 0.35rem; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em; color: #64748b; border-right: 1px solid #e2e8f0; }
.mc-gb-groups + tr th { top: 2.1rem; }
.mc-gb-col { min-width: 8rem; border-right: 1px solid #eef2f7; }
.mc-gb-col a { display: block; }
.mc-gb-col-name { display: block; font-weight: 700; color: var(--mc-ink); max-width: 9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mc-gb-col-max { display: block; font-size: 0.66rem; font-weight: 600; color: var(--mc-muted); margin-top: 0.1rem; white-space: nowrap; }
.mc-gb-col a:hover .mc-gb-col-name { color: var(--mc-blue); }

.mc-gradebook td, .mc-gradebook tbody th { height: 4.25rem; padding: 0.65rem 1rem; border-right: 1px solid #f1f5f9; border-bottom: 1px solid #e2e8f0; }
.mc-gb-cell { text-align: center; white-space: nowrap; }
.mc-gb-pts { font-weight: 700; color: var(--mc-ink); }
.mc-gb-pct { display: block; font-size: 0.66rem; color: var(--mc-muted); }

.mc-gb-name {
  background: #fff;
  text-align: left;
  white-space: nowrap;
  font-weight: 600;
  color: var(--mc-ink);
  box-shadow: 1px 0 0 var(--mc-line);
  width: 13.5rem;
  min-width: 13.5rem;
  max-width: 13.5rem;
}
.mc-gradebook-names { width: 100%; table-layout: fixed; }
.mc-gradebook-names thead th { height: 5.75rem; z-index: 5; vertical-align: middle; text-align: left; padding-left: 1rem; }
.mc-gradebook-scores .mc-gb-groups + tr th { height: 3.65rem; }
.mc-gradebook tbody tr:nth-child(even) td,
.mc-gradebook tbody tr:nth-child(even) .mc-gb-name { background: #f8fafc; }
.mc-gradebook tbody tr:hover td, .mc-gradebook tbody tr.is-focused td { background: #eef6ff; box-shadow: inset 0 1px #bfdbfe, inset 0 -1px #bfdbfe; }
.mc-gradebook tbody tr:hover .mc-gb-name, .mc-gradebook tbody tr.is-focused .mc-gb-name { background: #dbeafe; box-shadow: inset 4px 0 #2563eb; }
.mc-gb-student-link { display: block; overflow: hidden; text-overflow: ellipsis; color: #0f172a; }
.mc-gb-student-link:hover { color: #1d4ed8; text-decoration: underline; }
.mc-gb-student-avg { display: block; margin-top: 0.2rem; color: #64748b; font-size: 0.67rem; font-weight: 500; }
@media (max-width: 640px) { .mc-gradebook-board { grid-template-columns: 10.5rem minmax(0,1fr); } .mc-gradebook-wrap,.mc-gb-students { max-height: calc(100vh - 12rem); } .mc-gb-name { width:10.5rem;min-width:10.5rem;max-width:10.5rem; } .mc-gradebook td,.mc-gradebook tbody th { padding-inline:.75rem; } }

/* ── Rubric scoring buttons ───────────────────────────────── */
.mc-rb-group {
  display: grid;
  gap: 0.5rem;
  max-width: 30rem;
}
.mc-rb-btn {
  width: 100%;
  height: 3.2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d6deea;
  border-radius: 0.7rem;
  background: #fff;
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--mc-soft-ink);
  -webkit-tap-highlight-color: transparent;
}
.mc-rb-btn:hover { background: #f1f5f9; }
.mc-rb-btn.mc-rb-on {
  background: var(--rb, var(--mc-blue));
  border-color: var(--rb, var(--mc-blue));
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.18);
}

/* Level buttons (named performance levels, each in its own colour) */
.mc-rb-lvl {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-height: 3.6rem;
  padding: 0.35rem 0.4rem;
  border: 1.5px solid color-mix(in srgb, var(--lc) 38%, #ffffff);
  border-radius: 0.7rem;
  background: #fff;
  color: var(--lc);
  font-weight: 700;
  line-height: 1.12;
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}
.mc-rb-lvl-lbl { font-size: 0.8rem; }
.mc-rb-lvl-pt { font-size: 1.1rem; }
.mc-rb-lvl:hover { background: color-mix(in srgb, var(--lc) 9%, #ffffff); }
.mc-rb-lvl.is-on {
  background: var(--lc);
  border-color: var(--lc);
  color: #fff;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.2);
}

/* Weekday quick-add toggles — tidy squares */
.mc-weekday-choice span {
  width: 2.25rem;
  height: 2.25rem;
  min-height: 0;
  border-radius: 0.5rem;
  border-color: #d6deea;
  font-size: 0.85rem;
  font-weight: 700;
  box-shadow: none;
}
.mc-weekday-choice input:checked + span {
  background: var(--mc-blue);
  border-color: var(--mc-blue);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
}

/* Force the attendance/concert hero title white (beats the page-head dark-h1 theme rule) */
.mc-main .mc-rehearsal-hero .mc-rehearsal-title h1,
.mc-main .mc-rehearsal-hero h1 { color: #fff !important; }

/* TinyMCE toolbar — clean gray hover/active */
.tox.tox-tinymce .tox-tbtn { margin-bottom: 6px !important; }
.tox.tox-tinymce .tox-tbtn svg { fill: #475569 !important; }
.tox.tox-tinymce .tox-tbtn:hover { background: #eef2f7 !important; outline: none !important; }
.tox.tox-tinymce .tox-tbtn--enabled,
.tox.tox-tinymce .tox-tbtn--active,
.tox.tox-tinymce .tox-tbtn--enabled:hover { background: #e2e8f0 !important; }

/* Split (list) buttons: highlight BOTH halves so they read as one rounded box */
.tox.tox-tinymce .tox-split-button { border-radius: 5px; }
.tox.tox-tinymce .tox-split-button__main { border-radius: 5px 0 0 5px !important; width: 26px !important; }
.tox.tox-tinymce .tox-split-button__chevron { border-radius: 0 5px 5px 0 !important; width: 18px !important; }
.tox.tox-tinymce .tox-split-button:hover .tox-split-button__main,
.tox.tox-tinymce .tox-split-button:hover .tox-split-button__chevron { background: #eef2f7 !important; outline: none !important; }
.tox.tox-tinymce .tox-split-button__main.tox-tbtn--enabled,
.tox.tox-tinymce .tox-split-button__main.tox-tbtn--enabled + .tox-split-button__chevron { background: #e2e8f0 !important; }
.tox.tox-tinymce .tox-split-button__chevron svg { width: 12px; height: 12px; }
