/* =====================================================================
   coach.css — Tutor Coaching Report view
   ===================================================================== */

* { box-sizing: border-box; }
body {
  /* AC.UX: match the student site — Inter body, serif reserved for
     headings (system.css tokens; literals are the no-system.css fallback) */
  font-family: var(--ipe-font-sans, 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif);
  margin: 0;
  background: #f7f8fa;
  color: #1a1a1a;
}
/* Headings stay serif (site h1/h2 pattern) now that the body is sans. */
.coach-modal h2,
.academy-name {
  font-family: var(--ipe-font-serif, "Source Serif 4", Georgia, serif);
}

.coach-container {
  max-width: 920px;   /* unified page width (matches the student nav pages) */
  margin: 0 auto;
  padding: 30px 28px 24px;
}

.coach-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e8ec;
}
.coach-title {
  /* unified page title (matches .ipe-page h1) */
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: #0a0a0a;
  line-height: 1.2;
  margin: 0;
}
.coach-meta {
  font-size: 13px;
  color: #6b7280;
}

/* ── States ─────────────────────────────────────── */
.coach-state {
  text-align: center;
  padding: 60px 20px;
  color: #6b7280;
}
.coach-state--error {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  color: #991b1b;
}
.coach-state--unauth {
  background: white;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 80px 24px;
}
.coach-state--unauth h2 { font-size: 20px; margin: 0 0 12px; color: #1a1a1a; }
.coach-state--unauth p  { font-size: 14px; max-width: 480px; margin: 0 auto 8px; line-height: 1.5; }

/* Signed-out front door: hide the sidebar auth chip (its copy is written
   for students; the card has the one real sign-in button) and show what's
   inside the console. */
body.console-signedout #auth-widget { display: none; }
.console-entry-points {
  display: flex; flex-direction: column; gap: 9px;
  max-width: 440px; margin: 20px auto 0; text-align: left;
}
.console-entry-points > div { display: flex; gap: 12px; align-items: baseline; font-size: 13.5px; color: #4b5563; line-height: 1.45; }
.console-entry-points b {
  flex: none; width: 72px; font-size: 11px; font-weight: 700;
  color: #1e3a5f; text-transform: uppercase; letter-spacing: 0.05em;
}

.coach-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid #e5e8ec;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Student grid ───────────────────────────────── */
.coach-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
}

.coach-card {
  background: white;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 16px 18px;
  transition: box-shadow 0.15s, border-color 0.15s;
  cursor: pointer;
}
.coach-card:hover {
  border-color: #c0c8d0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}
.coach-card--warn  { border-left: 4px solid #f59e0b; }
.coach-card--risk  { border-left: 4px solid #ef4444; }
.coach-card--ok    { border-left: 4px solid #10b981; }

/* ── Card header ────────────────────────────────── */
.cc-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.cc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e8ec;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  color: #6b7280;
  overflow: hidden;
  flex-shrink: 0;
}
.cc-avatar img { width: 100%; height: 100%; object-fit: cover; }

.cc-name {
  font-size: 16px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cc-exam {
  font-size: 11px;
  background: #f3f4f6;
  color: #4b5563;
  padding: 2px 8px;
  border-radius: 10px;
  font-weight: 500;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.cc-sub {
  font-size: 12px;
  color: #9ca3af;
  margin-bottom: 12px;
}

/* ── Stat row ───────────────────────────────────── */
.cc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 10px 0;
  border-top: 1px solid #f0f2f5;
  border-bottom: 1px solid #f0f2f5;
  margin-bottom: 12px;
}
.cc-stat {
  text-align: center;
}
.cc-stat-num {
  font-size: 18px;
  font-weight: 600;
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}
.cc-stat-label {
  font-size: 10px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ── Score row ──────────────────────────────────── */
.cc-score {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 14px;
}
.cc-score-num   { font-size: 22px; font-weight: 600; }
.cc-score-arrow { color: #9ca3af; }
.cc-score-target{ color: #6b7280; font-size: 13px; }
.cc-delta       { font-size: 12px; font-weight: 500; }
.cc-delta--up   { color: #10b981; }
.cc-delta--down { color: #ef4444; }
.cc-delta--flat { color: #9ca3af; }

/* E13: per-section subscores in card score row */
.cc-subscore-row {
  display: flex; gap: 6px; flex-basis: 100%; margin-top: 4px;
}
.cc-subscore {
  font-size: 11px; padding: 2px 7px; border-radius: 999px;
  font-weight: 600; font-variant-numeric: tabular-nums;
}
.cc-subscore--math { background: #dbeafe; color: #1e40af; }
.cc-subscore--rw   { background: #fef3c7; color: #92400e; }

/* E13: section chip in card sub line ("Full SAT" / "Math only" / "R&W only") */
.cc-section-chip {
  display: inline-block; font-size: 10px; padding: 1px 8px; border-radius: 999px;
  font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase;
  margin-left: 6px; vertical-align: 1px;
}
.cc-section-chip--full { background: #e0e7ff; color: #3730a3; }
.cc-section-chip--math { background: #dbeafe; color: #1e40af; }
.cc-section-chip--rw   { background: #fef3c7; color: #92400e; }

/* E13: per-section tag prefix on weak-skill names */
.cc-skill-tag {
  display: inline-block; font-size: 9px; padding: 1px 5px; border-radius: 6px;
  font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  margin-right: 4px; vertical-align: 1px;
}
.cc-skill-tag--math { background: #dbeafe; color: #1e40af; }
.cc-skill-tag--rw   { background: #fef3c7; color: #92400e; }

/* ── E14: roster toolbar (filter pills + search + sort) ───────── */
.coach-roster-toolbar {
  background: white; border: 1px solid #e5e8ec; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 16px;
}
.cr-pills {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px;
}
.cr-pill {
  font-family: inherit; font-size: 13px; padding: 6px 14px;
  border: 1px solid #d1d5db; background: white; color: #475569;
  border-radius: 999px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.cr-pill:hover:not(.active):not(:disabled) { background: #f1f5f9; }
.cr-pill.active { background: var(--ipe-accent, #1e3a5f); color: white; border-color: var(--ipe-accent, #1e3a5f); }
.cr-pill:disabled { opacity: 0.4; cursor: not-allowed; }
.cr-pill-count {
  font-size: 11px; padding: 1px 7px; background: rgba(0,0,0,0.08); border-radius: 999px;
  font-variant-numeric: tabular-nums;
}
.cr-pill.active .cr-pill-count { background: rgba(255,255,255,0.22); }

.cr-row {
  display: flex; align-items: center; gap: 12px; margin-bottom: 8px;
  flex-wrap: wrap;
}
.cr-search {
  flex: 1; min-width: 180px;
  font-family: inherit; font-size: 13px; padding: 7px 12px;
  border: 1px solid #d1d5db; border-radius: 10px;
  background: white; color: #1a1a1a;
}
.cr-search:focus { outline: none; border-color: var(--ipe-accent, #1e3a5f); box-shadow: 0 0 0 3px rgba(30,58,95,.15); }

.cr-sort-label { font-size: 12px; color: #6b7280; display: inline-flex; align-items: center; gap: 6px; }
.cr-sort {
  font-family: inherit; font-size: 13px; padding: 6px 10px;
  border: 1px solid #d1d5db; border-radius: 10px; background: white;
}

.cr-summary-row { font-size: 12px; color: #6b7280; }
.cr-summary b { color: #1a1a1a; font-weight: 600; }

.coach-grid-empty {
  background: white; border: 1px dashed #d1d5db; border-radius: 10px;
  padding: 32px 16px; text-align: center; color: #9ca3af; font-size: 14px;
}

/* ── E15: Cohort analytics panel ─────────────────────────────── */
.coach-cohort-panel {
  background: white; border: 1px solid #e5e8ec; border-radius: 10px;
  padding: 14px 16px; margin-bottom: 14px;
}
.cohort-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.cohort-title { font-size: 16px; font-weight: 600; margin: 0; color: #1a1a1a; }
.cohort-toggle {
  font-family: inherit; font-size: 12px; padding: 4px 10px;
  border: 1px solid #d1d5db; background: white; color: #475569;
  border-radius: 6px; cursor: pointer;
}
.cohort-toggle:hover { background: #f1f5f9; }

/* shared small action button (e.g. "Open progress report") */
.cohort-head-actions { display: flex; align-items: center; gap: 8px; }
.cohort-action {
  font-family: inherit; font-size: 12px; padding: 4px 10px;
  border: 1px solid var(--ipe-accent, #1e3a5f); background: white; color: var(--ipe-accent, #1e3a5f);
  border-radius: 6px; cursor: pointer; font-weight: 600;
}
.cohort-action:hover { background: #eff6ff; }
.coach-cohort-panel.collapsed .cohort-head { margin-bottom: 0; }

.cohort-body { margin-top: 12px; }

.cohort-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
  margin-bottom: 16px;
}
@media (max-width: 720px) { .cohort-metrics { grid-template-columns: 1fr 1fr; } }
.cohort-metric {
  background: #f7f8fa; border-radius: 10px; padding: 12px;
}
.cohort-metric-num {
  font-size: 22px; font-weight: 700; color: #1a1a1a; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cohort-metric-of { font-size: 13px; color: #9ca3af; font-weight: 500; }
.cohort-metric-label {
  font-size: 11px; color: #6b7280; text-transform: uppercase;
  letter-spacing: 0.04em; margin-top: 4px;
}
.cohort-sub-row {
  display: flex; gap: 6px; margin-top: 6px; flex-wrap: wrap; align-items: center;
}

.cohort-subhead {
  font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: #6b7280; margin: 6px 0 10px;
}
.cohort-skills { display: flex; flex-direction: column; gap: 8px; }
.cohort-skill-row {
  display: grid; grid-template-columns: 1fr 1.5fr 70px;
  align-items: center; gap: 10px;
}
.cohort-skill-bar {
  height: 8px; background: #e5e8ec; border-radius: 6px; overflow: hidden;
}
.cohort-skill-fill {
  height: 100%; background: linear-gradient(90deg, #f59e0b, #dc2626);
  transition: width 0.4s;
}
.cohort-skill-label { font-size: 13px; color: #1a1a1a; }
.cohort-skill-count {
  font-size: 12px; color: #6b7280; text-align: right;
  font-variant-numeric: tabular-nums;
}

/* ── E16: detail modal chart wrap + heatmap container ─────────── */
.cm-chart-wrap {
  background: white; border: 1px solid #e5e8ec; border-radius: 10px;
  padding: 10px; margin-bottom: 10px;
}

/* ── Focus row ──────────────────────────────────── */
.cc-focus-label {
  font-size: 11px;
  color: #9ca3af;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.cc-focus {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.4;
  margin-bottom: 10px;
}
.cc-focus em { color: #dc2626; font-style: normal; font-weight: 500; }

/* ── Signal row ─────────────────────────────────── */
.cc-signal {
  font-size: 12px;
  padding: 6px 10px;
  border-radius: 6px;
  font-weight: 500;
}
.cc-signal--warn { background: #fef3c7; color: #92400e; }
.cc-signal--risk { background: #fee2e2; color: #991b1b; }
.cc-signal--ok   { background: #d1fae5; color: #065f46; }

/* ── Detail modal ──────────────────────────────── */
.coach-modal-bg {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}
.coach-modal-bg.open { display: flex; }
.coach-modal {
  background: white;
  border-radius: 10px;
  max-width: 720px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
}
.coach-modal h2 { margin: 0 0 6px; font-size: 20px; }
.coach-modal .cm-sub { color: #6b7280; font-size: 13px; margin-bottom: 16px; }
/* RD.4: at-risk verdict banner at the top of the student detail */
.cm-flag { display: flex; align-items: center; gap: 9px; font-size: 13.5px; font-weight: 500; border-radius: 8px; padding: 10px 14px; margin: 0 0 16px; }
.cm-flag-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cm-flag--risk { background: #fdecec; color: #b91c1c; }
.cm-flag--risk .cm-flag-dot { background: #dc2626; }
.cm-flag--watch { background: #fef6e7; color: #92400e; }
.cm-flag--watch .cm-flag-dot { background: #d97706; }
.coach-modal-close {
  float: right;
  background: transparent;
  border: 0;
  font-size: 22px;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
}
.coach-modal-close:hover { color: #1a1a1a; }

.cm-section { margin-bottom: 18px; }
.cm-section h3 {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #6b7280;
  margin: 0 0 8px;
}
.cm-section p { margin: 4px 0; font-size: 14px; line-height: 1.5; }

/* AC.F6: student + parent contact block (director view) */
.cm-contact-section { background: #f7f8fa; border: 1px solid #e9edf2; border-radius: 10px; padding: 12px 16px; }
.cm-contact-grid { display: flex; flex-wrap: wrap; gap: 10px 40px; }
.cm-contact-col { min-width: 200px; }
.cm-contact-role { font-size: 11px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: #6b7480; margin-bottom: 5px; }
.cm-contact-line { font-size: 14px; line-height: 1.7; display: flex; align-items: center; gap: 8px; }
.cm-contact-ic { width: 16px; color: #9aa1ab; text-align: center; flex: none; }
.cm-contact-line a { color: var(--ipe-accent, #1e3a5f); text-decoration: none; }
.cm-contact-line a:hover { text-decoration: underline; }

/* AC.F7: director lean detail — at-a-glance stat strip */
.cm-glance { display: flex; flex-wrap: wrap; gap: 12px 32px; }
.cm-glance-item { min-width: 84px; }
.cm-glance-n { font-size: 21px; font-weight: 700; color: #1b1f24; line-height: 1.2; }
.cm-glance-l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: #6b7480; margin-top: 3px; }

/* AC.F7b: director sees the assigned coach's notes (read-only) */
.cm-cnote { background: #f7f8fa; border: 1px solid #e9edf2; border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; }
.cm-cnote:last-child { margin-bottom: 0; }
.cm-cnote-by { font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; color: #6b7480; margin-bottom: 4px; }
.cm-cnote-text { font-size: 14px; line-height: 1.5; color: #1b1f24; white-space: pre-wrap; }

.cm-trend {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 13px;
}
.cm-trend-item {
  padding: 6px 10px;
  background: #f9fafb;
  border-radius: 6px;
  font-variant-numeric: tabular-nums;
}

.cm-skill-row {
  display: flex;
  align-items: center;
  padding: 6px 0;
  font-size: 13px;
  border-top: 1px solid #f0f2f5;
}
.cm-skill-row:first-child { border-top: 0; }
.cm-skill-name { flex: 1; }
.cm-skill-acc {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  min-width: 50px;
  text-align: right;
}
.cm-skill-acc--low  { color: #dc2626; }
.cm-skill-acc--mid  { color: #f59e0b; }
.cm-skill-acc--high { color: #10b981; }

@media (max-width: 720px) {
  .coach-grid { grid-template-columns: 1fr; }
  .coach-header { flex-direction: column; align-items: flex-start; gap: 6px; }
}

/* ── Invite UI (Phase A1) ─────────────────────────────────────────── */
.coach-invite-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  background: linear-gradient(135deg, #fef3c7 0%, #fffbeb 100%);
  border: 1px solid #fde68a;
  border-radius: 10px;
}
.coach-invite-button {
  background: #1a1a1a;
  color: white;
  border: 0;
  padding: 8px 16px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
}
.coach-invite-button:hover { background: #333; }
.coach-invite-button:disabled { opacity: 0.5; cursor: not-allowed; }
.coach-invite-hint {
  font-size: 13px;
  color: #92400e;
}
.coach-pending-box {
  background: white;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.coach-pending-title {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}
.coach-pending-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  border-top: 1px solid #f0f2f5;
  font-size: 13px;
}
.coach-pending-row:first-of-type { border-top: 0; }
.coach-pending-code {
  font-family: monospace;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.06em;
  color: #1a1a1a;
  background: #f9fafb;
  padding: 2px 8px;
  border-radius: 6px;
}
.coach-pending-copy {
  background: transparent;
  border: 1px solid #d0d4d9;
  padding: 4px 10px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-family: inherit;
}
.coach-pending-expiry {
  margin-left: auto;
  color: #666;
  font-size: 12px;
}
.coach-pending-revoke {
  background: transparent;
  border: 0;
  color: #dc2626;
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
}
.coach-pending-revoke:hover { color: #991b1b; }

/* ── Phase 30.A — Phase 16/18/21 field surfacing ── */
.cc-cb-band {
  font-size: 11px;
  font-weight: 600;
  color: #6b7280;
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 6px;
  white-space: nowrap;
  cursor: help;
}
.cc-bonus {
  font-size: 11px;
  font-weight: 600;
  color: #6b21a8;
  background: #f3e8ff;
  padding: 2px 6px;
  border-radius: 6px;
  margin-left: 4px;
  white-space: nowrap;
  cursor: help;
}
.cc-easy-route {
  margin-top: 6px;
  padding: 6px 10px;
  background: #fef2f2;
  border-left: 3px solid #dc2626;
  border-radius: 6px;
  font-size: 11px;
  color: #991b1b;
  font-weight: 600;
  line-height: 1.4;
  cursor: help;
}

/* ── Academy panel (R2) ──────────────────────────────────────────── */
.academy-panel {
  background: #fff;
  border: 1px solid #e5e8ec;
  border-radius: 10px;
  padding: 20px 22px;
  margin-bottom: 18px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.academy-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}
.academy-eyebrow {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6b7280;
  margin-bottom: 2px;
}
.academy-name {
  font-size: 19px;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
}
.academy-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 11px;
  border-radius: 999px;
  white-space: nowrap;
  flex-shrink: 0;
}
.academy-seats-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 6px;
}
.academy-seats-label {
  font-size: 13px;
  font-weight: 600;
  color: #1a1a1a;
}
.academy-seats-count {
  font-size: 13px;
  color: #6b7280;
  font-variant-numeric: tabular-nums;
}
.academy-seatbar {
  height: 8px;
  background: #f0f2f5;
  border-radius: 999px;
  overflow: hidden;
}
.academy-seatbar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.academy-seats-foot {
  margin-top: 7px;
  font-size: 12px;
  color: #6b7280;
}
.academy-full { color: #dc2626; font-weight: 600; }
.academy-actions {
  margin-top: 16px;
  display: flex;
  gap: 10px;
}
.academy-billing-btn {
  background: #1a1a1a;
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.academy-billing-btn:hover { background: #000; }

/* ── Academy seat manager (R4-3) ─────────────────────────────────── */
.academy-manage {
  background: #fff; border: 1px solid #e5e8ec; border-radius: 10px;
  padding: 16px 18px; margin-bottom: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.academy-manage-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.academy-manage-title { font-size: 14px; font-weight: 700; color: #1a1a1a; }
.academy-manage-hint { font-size: 12px; color: #6b7280; }
.academy-mlist { display: flex; flex-direction: column; gap: 6px; }
.academy-mrow { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid #f0f2f5; border-radius: 6px; }
.academy-mname { font-size: 13px; color: #1a1a1a; }
.academy-remove { font-size: 12px; font-weight: 600; color: #991b1b; background: #fee2e2; border: 1px solid #fecaca; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-family: inherit; }
.academy-remove:hover { background: #fecaca; }
.academy-remove:disabled { opacity: 0.6; cursor: default; }
.academy-mempty { font-size: 13px; color: #6b7280; padding: 6px 2px; }

/* ── Academy coaches panel (ORG) ─────────────────────────────────── */
.academy-cyou, .academy-cadmin {
  display: inline-block; font-size: 10px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.05em; border-radius: 999px; padding: 2px 7px; vertical-align: 1px;
}
.academy-cyou { color: #1e40af; background: #dbeafe; }
.academy-cadmin { color: #065f46; background: #d1fae5; }
.academy-crow { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #f0f2f5; border-radius: 6px; flex-wrap: wrap; }
.academy-cname { font-size: 13px; font-weight: 600; color: #1a1a1a; }
.academy-cemail { font-size: 12px; color: #6b7280; flex: 1; min-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.academy-csubj-label { font-size: 12px; color: #6b7280; display: inline-flex; align-items: center; gap: 6px; }
.academy-csubjects, .academy-aselect {
  font-size: 12px; border: 1px solid #d0d4d9; border-radius: 6px; padding: 4px 6px;
  color: #374151; background: #fff; font-family: inherit; cursor: pointer;
}

/* ── Academy per-subject assignment controls (ORG) ───────────────── */
.academy-mrow--assign { align-items: flex-start; }
.academy-mrow--assign .academy-mname { min-width: 140px; padding-top: 3px; }
.academy-massign { flex: 1; display: flex; flex-direction: column; gap: 5px; }
.academy-asubj { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.academy-asubj-label {
  font-size: 10px; font-weight: 700; color: #6b7280; width: 40px;
  text-transform: uppercase; letter-spacing: 0.05em;
}
.academy-anone { font-size: 12px; color: #c3c9d1; }
.academy-achip {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #1a1a1a;
  background: #f3f4f6; border: 1px solid #e5e8ec; border-radius: 999px; padding: 2px 6px 2px 9px;
}
.academy-achip-x {
  background: transparent; border: 0; cursor: pointer; color: #6b7280;
  font-size: 13px; line-height: 1; padding: 0 2px; font-family: inherit;
}
.academy-achip-x:hover { color: #991b1b; }

/* ── ORG: subject-scoped score label on cards ────────────────────── */
.cc-score-seclabel {
  font-size: 11px; font-weight: 700; color: #6b7280;
  text-transform: uppercase; letter-spacing: 0.05em; margin-right: 2px;
}

/* ── Academy console shell (AC.P1) ───────────────────────────────── */
.console-body { margin: 0; background: #f7f8fa; }
.console { display: flex; min-height: 100vh; }
.console-side {
  width: 212px; flex: none; background: #fff;
  border-right: 1px solid var(--ipe-line, #e5e5e5);
  display: flex; flex-direction: column;
  padding: 18px 12px 14px;
  position: sticky; top: 0; height: 100vh; box-sizing: border-box;
}
.console-brand { padding: 2px 10px 16px; }
.console-brand-name { font-family: var(--ipe-font-serif, "Source Serif 4", Georgia, serif); font-size: 17px; font-weight: 600; color: #0a0a0a; line-height: 1.25; }
.console-brand-sub { font-size: 11.5px; color: #9ca3af; margin-top: 2px; }
.console-nav { display: flex; flex-direction: column; gap: 2px; }
.console-nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px; border-radius: 6px;
  font-size: 14px; color: #5f6368; text-decoration: none;
  cursor: pointer; border: 0; background: transparent; font-family: inherit; text-align: left;
}
.console-nav-item:hover { background: #f3f4f6; color: #1a1a1a; }
.console-nav-item.active { background: #f0f2f5; color: #1a1a1a; font-weight: 600; }
.console-nav-count { margin-left: auto; font-size: 11px; color: #9ca3af; font-variant-numeric: tabular-nums; }
.console-nav-ext { margin-left: auto; font-size: 11px; color: #c3c9d1; }
.console-nav-label {
  font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase;
  letter-spacing: 0.06em; padding: 14px 10px 4px;
}
.console-side-foot { margin-top: auto; border-top: 1px solid #f0f2f5; padding-top: 10px; }
.console-side-foot #auth-widget { padding: 0 6px 8px; }
.console-foot-link { display: block; font-size: 12px; color: #6b7280; text-decoration: none; padding: 4px 10px; }
.console-foot-link:hover { color: #1a1a1a; }
.console-main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.console-head { max-width: 980px; margin: 0 auto 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.console-head .coach-title { margin: 0; }
.console-main #coach-content { max-width: 980px; margin: 0 auto; }

@media (max-width: 760px) {
  .console { flex-direction: column; }
  .console-side { width: auto; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 4px; padding: 10px 12px; }
  .console-brand { padding: 0 8px 0 4px; }
  .console-nav { flex-direction: row; flex-wrap: wrap; }
  .console-nav-label { display: none; }
  .console-side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
  .console-main { padding: 18px 14px 50px; }
}

/* ── Academy classes (AC.P2/P3) ───────────────────────────────────── */
.ac-lineup { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.ac-card {
  background: #fff; border: 1px solid #e5e8ec; border-radius: 10px;
  padding: 14px 16px; cursor: pointer;
}
.ac-card:hover { border-color: #c0c8d0; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.ac-card--new {
  display: flex; align-items: center; justify-content: center; min-height: 96px;
  border-style: dashed; color: #9ca3af; font-size: 13.5px; text-align: center;
  box-shadow: none; background: transparent;
}
.ac-card--new:hover { color: #4b5563; }
.ac-card-head { display: flex; align-items: center; gap: 8px; }
.ac-card-name { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.ac-exam { font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.ac-card-sub { font-size: 12px; color: #9ca3af; margin: 3px 0 10px; }
.ac-bar { height: 5px; background: #f0f2f5; border-radius: 3px; overflow: hidden; margin-bottom: 9px; }
.ac-bar-fill { height: 100%; background: #1a1a1a; }
.ac-card-stats { display: flex; gap: 12px; font-size: 12.5px; color: #6b7280; flex-wrap: wrap; align-items: baseline; }
.ac-open { margin-left: auto; color: #1a1a1a; font-weight: 600; font-size: 12px; }

/* ── Level board (AC.P4 — placement → L1/L2/L3) ───────────────────── */
.aclv-legacy {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fef3c7; color: #92400e; border-radius: 8px;
  padding: 11px 14px; font-size: 13px; margin-bottom: 16px;
}
.aclv-legacy span { flex: 1; min-width: 240px; line-height: 1.45; }
.aclv-legacy-btn {
  border: 1px solid #c98a12; background: #fff; color: #92400e;
  border-radius: 6px; padding: 6px 12px; font-size: 12.5px; font-weight: 600;
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.aclv-legacy-btn:hover { background: #fffaf0; }
.aclv-legacy-btn:disabled { opacity: 0.6; }

.aclv-board { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (max-width: 720px) { .aclv-board { grid-template-columns: 1fr; } }
.aclv-col { display: flex; flex-direction: column; gap: 10px; }
.aclv-col-head { display: flex; align-items: center; gap: 8px; margin-bottom: 2px; }
.aclv-subj-badge { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 999px; white-space: nowrap; }
.aclv-subj-name { font-size: 14px; font-weight: 600; color: #1a1a1a; }

.aclv-cell {
  background: #fff; border: 1px solid #e5e8ec; border-radius: 10px;
  padding: 13px 15px; cursor: pointer; transition: border-color .12s, box-shadow .12s;
}
.aclv-cell:hover { border-color: #c0c8d0; box-shadow: 0 4px 12px rgba(0,0,0,0.04); }
.aclv-cell-top { display: flex; align-items: baseline; gap: 8px; }
.aclv-lv { font-size: 12px; font-weight: 700; color: #94a3b8; letter-spacing: .03em; }
.aclv-lv-name { font-size: 15px; font-weight: 600; color: #1a1a1a; }
.aclv-count {
  margin-left: auto; font-size: 13px; font-weight: 700; color: #1a1a1a;
  background: #f0f2f5; border-radius: 999px; min-width: 24px; text-align: center;
  padding: 1px 8px; font-variant-numeric: tabular-nums;
}
.aclv-book { font-size: 12.5px; color: #6b7280; margin: 4px 0 10px; }
.aclv-cell-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; flex-wrap: wrap; }
.aclv-coach { color: #475569; font-weight: 500; }
.aclv-unassigned { color: #b0b6bf; font-weight: 400; }
.aclv-attn { color: #b45309; font-weight: 600; }
.aclv-cell .aclv-open { margin-left: auto; color: #1a1a1a; font-weight: 600; }

/* placement queue */
.aclv-queue { margin-top: 26px; }
.aclv-queue-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.aclv-queue-sub { font-size: 12px; color: #9ca3af; }
.aclv-queue-empty {
  margin-top: 26px; background: #f7f9fb; border: 1px solid #eef1f4; border-radius: 8px;
  padding: 14px 16px; font-size: 13px; color: #6b7280; line-height: 1.5;
}
.aclv-qlist { display: flex; flex-direction: column; gap: 8px; }
.aclv-qrow {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e5e8ec; border-radius: 8px; padding: 10px 14px;
}
.aclv-qname { font-size: 13.5px; color: #1a1a1a; cursor: pointer; min-width: 150px; }
.aclv-qname:hover { text-decoration: underline; }
.aclv-qcells { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-left: auto; }
.aclv-q-placed {
  font-size: 12px; font-weight: 600; color: #1c6e2b; background: #e5f3e7;
  border-radius: 999px; padding: 4px 11px; cursor: pointer;
}
.aclv-q-placed:hover { background: #d7ecda; }
.aclv-q-nodx, .aclv-q-rec { font-size: 12px; color: #9ca3af; padding: 4px 4px; }
.aclv-q-rec { color: #6b7280; }
.aclv-q-place { display: inline-flex; align-items: center; gap: 6px; }
.aclv-q-subj { font-size: 11.5px; font-weight: 700; color: #64748b; }
.aclv-q-score {
  font-size: 12px; font-weight: 700; color: #1a1a1a; font-variant-numeric: tabular-nums;
  background: #f0f2f5; border-radius: 5px; padding: 1px 7px;
}
.aclv-q-lvl, #aclv-cellcoach, .aclv-move {
  font-family: inherit; font-size: 12.5px; border: 1px solid #d7dde3;
  border-radius: 6px; padding: 4px 7px; background: #fff; color: #1a1a1a; cursor: pointer;
}
.aclv-q-btn {
  font-family: inherit; font-size: 12.5px; font-weight: 600; border: 0;
  background: #1a1a1a; color: #fff; border-radius: 6px; padding: 5px 12px; cursor: pointer;
}
.aclv-q-btn:hover { background: #333; }
.aclv-q-btn:disabled { opacity: 0.6; }

/* cell detail */
.aclv-detail-meta { display: flex; gap: 28px; flex-wrap: wrap; margin: 4px 0 6px; }
.aclv-detail-book, .aclv-detail-coach { font-size: 13.5px; color: #1a1a1a; display: flex; align-items: center; gap: 8px; }
.aclv-detail-book-l { font-size: 11px; color: #9ca3af; text-transform: uppercase; letter-spacing: .05em; }
.aclv-detail-blurb { font-size: 13px; color: #6b7280; margin: 2px 0 14px; }
.aclv-place-note { color: #9ca3af; font-size: 11.5px; margin-left: 6px; }

.ac-detail-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.ac-back { border: 0; background: transparent; color: #6b7280; font-size: 13px; cursor: pointer; font-family: inherit; padding: 4px 6px 4px 0; }
.ac-back:hover { color: #1a1a1a; }
.ac-detail-sub { font-size: 12.5px; color: #9ca3af; }
.ac-rename, .ac-delete { font-size: 12.5px; color: #6b7280; background: transparent; border: 0; padding: 4px 8px; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ac-rename:hover { color: #1a1a1a; }
.ac-delete:hover { color: #b91c1c; }
.ac-detail-actions { margin-left: auto; display: flex; gap: 2px; }
.ac-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--ipe-line, #e5e5e5); margin-bottom: 14px; }
.ac-tab { border: 0; background: transparent; font-family: inherit; font-size: 13.5px; color: #6b7280; padding: 8px 12px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.ac-tab.active { color: #1a1a1a; font-weight: 600; border-bottom-color: #1a1a1a; }

.ac-sched { display: flex; flex-direction: column; gap: 6px; overflow-x: auto; }
/* Fixed 7-day grid (weekends included) — scrolls horizontally on narrow
   screens so columns stay aligned with the header. */
.ac-sched-row { display: grid; grid-template-columns: 64px repeat(7, minmax(108px, 1fr)); gap: 6px; min-width: 820px; }
.ac-sched-head { position: sticky; top: 0; }
.ac-sched-cell-h { font-size: 11px; color: #9ca3af; text-align: center; padding: 2px 0; }
.ac-sched-wk { font-size: 11.5px; font-weight: 600; color: #6b7280; padding-top: 8px; }
.ac-sched-wkdate { font-weight: 400; color: #c3c9d1; font-size: 10.5px; }
.ac-sched-cell { background: #fff; border: 1px solid #f0f2f5; border-radius: 8px; padding: 6px; min-height: 44px; display: flex; flex-direction: column; gap: 4px; }
.ac-sched-cell--off { background: #fafbfc; border-color: #f7f8fa; }
.ac-sched-cell--today { border-color: #1a1a1a; }
.ac-chip { position: relative; font-size: 11px; line-height: 1.35; border-radius: 6px; padding: 5px 16px 5px 7px; background: #f0f0f0; color: #525252; }
.ac-chip--math { background: #eef2f8; color: #1e3a5f; }
.ac-chip--rw { background: #fef3c7; color: #92400e; }
.ac-chip--mock, .ac-chip--diag { background: #f0f0f0; color: #525252; }
.ac-chip--review, .ac-chip--packet { background: #e5f3e7; color: #1c6e2b; }
.ac-chip--test { background: #eef2f8; color: #1e3a5f; }
.ac-chip-kind { display: block; font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; opacity: 0.7; }
.ac-chip-x { position: absolute; top: 2px; right: 2px; border: 0; background: transparent; color: inherit; opacity: 0.5; cursor: pointer; font-size: 12px; padding: 1px 3px; font-family: inherit; }
.ac-chip-x:hover { opacity: 1; }
.ac-addblock { border: 1px dashed #d0d4d9; background: transparent; color: #9ca3af; border-radius: 6px; cursor: pointer; font-size: 12px; padding: 2px 0; font-family: inherit; }
.ac-addblock:hover { color: #4b5563; border-color: #9ca3af; }
/* AC.UX: keep the calendar quiet — the + affordance appears on hover only
   (always visible on touch devices, which have no hover). */
@media (hover: hover) {
  .ac-sched-cell .ac-addblock { opacity: 0; transition: opacity 0.12s; }
  .ac-sched-cell:hover .ac-addblock, .ac-sched-cell .ac-addblock:focus-visible { opacity: 1; }
}

.ac-form { display: flex; flex-direction: column; gap: 10px; margin-top: 10px; }
.ac-form label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; color: #4b5563; }
.ac-form input[type="text"], .ac-form input[type="date"], .ac-form input[type="number"], .ac-form select {
  padding: 8px 10px; border: 1px solid #d0d4d9; border-radius: 6px; font-size: 13.5px; font-family: inherit; background: #fff; color: #1a1a1a;
}
.ac-form-row { display: flex; gap: 10px; }
.ac-form-row > label { flex: 1; }
.ac-form-note { font-size: 12px; color: #6b7280; background: #f9fafb; border-radius: 6px; padding: 8px 10px; }

/* Model-class gallery (New class, step 1) */
.ac-gal-blurb { font-size: 13px; color: #6b7280; margin: 0 0 14px; }
.ac-gal-label { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; margin: 14px 0 8px; }
.ac-gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ac-gal-card {
  position: relative; display: flex; flex-direction: column; gap: 5px;
  text-align: left; background: #fff; border: 1px solid var(--ipe-line, #e5e5e5);
  border-radius: 10px; padding: 12px 14px; cursor: pointer; font: inherit; color: inherit;
}
.ac-gal-card:hover { border-color: var(--ipe-accent, #1e3a5f); background: #fbfcfe; }
.ac-gal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ac-gal-name { font-size: 13.5px; font-weight: 600; color: #1a1a1a; }
.ac-gal-meta { font-size: 11.5px; font-weight: 600; color: #1e3a5f; }
.ac-gal-sub { font-size: 11.5px; color: #6b7280; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ac-gal-track { font-size: 11.5px; font-weight: 600; color: #1c6e2b; background: #e5f3e7; border-radius: 6px; padding: 3px 8px; align-self: flex-start; }
.ac-gal-del { align-self: flex-end; font-size: 11px; color: #9ca3af; text-decoration: underline; text-underline-offset: 2px; }
.ac-gal-del:hover { color: #b91c1c; }
@media (max-width: 640px) { .ac-gallery { grid-template-columns: 1fr; } }

/* Day remapping (New class, step 2) */
.ac-form-hint { font-weight: 400; text-transform: none; letter-spacing: 0; color: #9ca3af; }
.ac-remap { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.ac-remap-item { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: #374151; font-weight: 600; }
.ac-remap-arrow { color: #c3c9d1; font-weight: 400; }
.ac-remap-sel { font-size: 12.5px; border: 1px solid #d0d4d9; border-radius: 6px; padding: 4px 6px; color: #374151; background: #fff; font-family: inherit; cursor: pointer; }

/* Model-class preview inside the create-class modal (class time · how it
   runs · target date · week-by-week outline) */
.ac-tpl-preview { display: flex; flex-direction: column; gap: 7px; text-align: left; }
.ac-tpl-stats { font-size: 12px; font-weight: 600; color: #1e3a5f; background: #eef2f8; border-radius: 6px; padding: 5px 9px; align-self: flex-start; }
.ac-tpl-line { font-size: 12.5px; color: #374151; line-height: 1.45; }
.ac-tpl-line b { display: inline-block; min-width: 86px; font-size: 10.5px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; }
.ac-tpl-outline { max-height: 170px; overflow-y: auto; border: 1px solid #e8eaee; border-radius: 6px; background: #fff; padding: 6px 8px; }
.ac-tpl-week { display: flex; gap: 8px; padding: 3px 0; border-top: 1px solid #f3f4f6; font-size: 11.5px; color: #4b5563; }
.ac-tpl-week:first-child { border-top: 0; }
.ac-tpl-wk { flex: none; width: 38px; font-weight: 700; color: #9ca3af; }
.ac-tpl-days { min-width: 0; }
.ac-tpl-day { padding: 1px 0; }
.ac-tpl-dow { display: inline-block; width: 32px; font-weight: 600; color: #1a1a1a; }
.ac-tpl-edit { font-size: 11.5px; color: #1c6e2b; background: #e5f3e7; border-radius: 6px; padding: 5px 9px; }
.ac-form-label { font-size: 11px; font-weight: 700; color: #9ca3af; text-transform: uppercase; letter-spacing: 0.05em; }
.ac-checklist { display: flex; flex-wrap: wrap; gap: 6px 14px; max-height: 150px; overflow-y: auto; }
.ac-checklist label { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: #1a1a1a; }
.ac-btn-primary { padding: 10px 18px; background: #1a1a1a; color: #fff; border: 0; border-radius: 6px; cursor: pointer; font-weight: 600; font-family: inherit; font-size: 14px; }
.ac-btn-ghost { padding: 10px 16px; background: #fff; color: #1a1a1a; border: 1px solid #e5e8ec; border-radius: 6px; cursor: pointer; font-family: inherit; font-size: 14px; }
.ac-btn-ghost:hover { border-color: #c0c8d0; }
.ac-btn-primary:disabled { opacity: 0.6; }

.ac-memberlist { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 6px; }
.ac-member { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid #f0f2f5; border-radius: 8px; font-size: 13px; color: #6b7280; }
.ac-member.in { color: #1a1a1a; border-color: var(--ipe-line, #e5e5e5); background: #fff; }

.ac-matrix { border-collapse: collapse; font-size: 12.5px; min-width: 420px; }
.ac-matrix th { font-size: 11px; color: #9ca3af; font-weight: 600; padding: 4px 8px; text-align: center; white-space: nowrap; }
.ac-matrix-name { padding: 5px 10px 5px 0; color: #1a1a1a; white-space: nowrap; }
.ac-matrix-cell { text-align: center; padding: 5px 8px; color: #c3c9d1; }
.ac-matrix-cell.ok { color: #16a34a; }
.ac-matrix-cell.miss { color: #dc2626; }
.ac-matrix-cell.today { color: #9ca3af; }
.ac-matrix-cell b { color: #1a1a1a; font-variant-numeric: tabular-nums; }

/* AC.UX: schedule cell day number + block legend */
.ac-sched-cell { position: relative; }
.ac-cell-day { position: absolute; top: 4px; right: 6px; font-size: 10px; color: #c3c9d1; pointer-events: none; }
.ac-legend { display: flex; gap: 12px; align-items: center; font-size: 11.5px; color: #6b7280; margin: 2px 0 10px; flex-wrap: wrap; }
.ac-legend span i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; font-style: normal; }
.ac-checklist--col { flex-direction: column; gap: 6px; max-height: 230px; }
/* F3: empty days keep a visible add affordance (hover-only is invisible
   on a blank calendar); days WITH blocks stay quiet until hover. */
@media (hover: hover) {
  .ac-sched-cell .ac-addblock--always { opacity: 1; }
}

/* ── SIMP: class Roster tab + merged Progress subheads ───────────── */
.ac-subhead { font-size: 13px; font-weight: 600; color: #475569; margin: 0 0 8px; }
.ac-roster-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ac-roster { display: flex; flex-direction: column; gap: 6px; }
.ac-rrow { display: flex; align-items: center; gap: 14px; padding: 9px 12px; border: 1px solid #f0f2f5; border-radius: 8px; flex-wrap: wrap; }
.ac-rname { font-size: 13.5px; color: #1a1a1a; min-width: 160px; flex: 1; }
.ac-rsubj { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: #6b7280; }
.ac-rkind { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 4px; font-size: 9px; font-weight: 700; }
.ac-rkind--math { background: #eef2f8; color: #1e3a5f; }
.ac-rkind--rw { background: #fef3c7; color: #92400e; }
.ac-rcoach { font-size: 12.5px; border: 1px solid #d0d4d9; border-radius: 6px; padding: 4px 6px; color: #374151; background: #fff; font-family: inherit; cursor: pointer; }
.ac-rremove { font-size: 12px; color: #6b7280; background: transparent; border: 0; cursor: pointer; font-family: inherit; text-decoration: underline; text-underline-offset: 2px; }
.ac-rremove:hover { color: #b91c1c; }
.ac-ropen { font-size: 12px; color: #1a1a1a; font-weight: 600; }

/* RD.3: plain-text coach cell (no dropdown wall) + inline editor */
.ac-rcoaches { flex: 2; min-width: 220px; font-size: 12.5px; color: #374151; cursor: pointer; border-radius: 6px; padding: 3px 6px; }
.ac-rcoaches[data-edit]:hover { background: #f4f6f9; }
.ac-rc-subj { color: #9ca3af; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; margin-right: 2px; }
.ac-rc-none { color: #c3c9d1; font-style: italic; }
.ac-rc-dot { color: #d0d4d9; margin: 0 4px; }
.ac-redit { color: #1e3a5f; font-weight: 600; font-size: 11.5px; margin-left: 8px; }
.ac-rcoaches--edit { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; cursor: default; }
.ac-rdone { font-size: 12px; font-weight: 600; color: #1e3a5f; background: #eef2f8; border: 0; border-radius: 6px; padding: 5px 12px; cursor: pointer; font-family: inherit; }

/* RD.3: Overview at-a-glance table */
.ac-glance { width: 100%; border-collapse: collapse; font-size: 13px; }
.ac-glance th { text-align: left; font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 12px 8px 0; }
.ac-gl-row { border-top: 1px solid #f0f2f5; cursor: pointer; }
.ac-gl-row:hover { background: #fafafa; }
.ac-gl-row td { padding: 9px 12px 9px 0; vertical-align: middle; white-space: nowrap; }
.ac-gl-name { color: #1a1a1a; font-weight: 500; }
.ac-gl-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: middle; }
.ac-gl-dot--risk { background: #dc2626; }
.ac-gl-dot--watch { background: #d97706; }
.ac-gl-dot--ok { background: #d6dbe1; }
.ac-gl-seen { color: #6b7280; }
.ac-gl-seen--risk { color: #b91c1c; }
.ac-gl-week { color: #6b7280; font-variant-numeric: tabular-nums; }
.ac-gl-score { color: #1a1a1a; font-weight: 500; font-variant-numeric: tabular-nums; }
.ac-gl-open { color: #1a1a1a; font-weight: 600; text-align: right; }

/* ── SIMP: light Students directory table ────────────────────────── */
.sd-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.sd-table th { text-align: left; font-size: 11px; font-weight: 600; color: #94a3b8; text-transform: uppercase; letter-spacing: 0.05em; padding: 4px 10px 8px 0; }
.sd-row { border-top: 1px solid #f0f2f5; cursor: pointer; }
.sd-row:hover { background: #fafafa; }
.sd-row td { padding: 9px 10px 9px 0; vertical-align: middle; }
.sd-name { color: #1a1a1a; font-weight: 500; }
.sd-email { font-size: 11.5px; color: #9ca3af; font-weight: 400; }
.sd-class { color: #6b7280; }
.sd-seen { color: #6b7280; white-space: nowrap; }
.sd-seen.sd-risk { color: #b91c1c; }
.sd-score { font-variant-numeric: tabular-nums; font-weight: 500; color: #1a1a1a; }
.sd-open { color: #1a1a1a; font-weight: 600; text-align: right; white-space: nowrap; }

/* ── RD.2: Home triage board ───────────────────────────────────────── */
.home-strip { display: flex; gap: 12px; margin: 0 0 22px; }
.home-stat {
  flex: 1; background: #fff; border: 1px solid var(--ipe-line, #e5e5e5);
  border-radius: 10px; padding: 14px 16px; text-align: center;
}
.home-stat-n { font-size: 26px; font-weight: 700; color: #1a1a1a; font-variant-numeric: tabular-nums; line-height: 1.1; }
.home-stat-n--risk { color: #b91c1c; }
.home-stat-n--watch { color: #92400e; }
.home-stat-n--good { color: #1c6e2b; }
.home-stat-l { font-size: 11px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 4px; }
.home-h {
  font-family: var(--ipe-font-serif, "Source Serif 4", Georgia, serif);
  font-size: 16px; font-weight: 600; color: #0a0a0a; margin: 0 0 10px;
}

/* Shared "Needs attention" row — Home, class Overview, student detail. */
.attn-list { display: flex; flex-direction: column; }
.attn-row {
  display: grid; align-items: center;
  grid-template-columns: 14px minmax(140px, 1.4fr) minmax(90px, 1fr) minmax(160px, 2fr) auto;
  gap: 12px; width: 100%; text-align: left;
  background: none; border: 0; border-top: 1px solid #f0f2f5;
  padding: 12px 4px; cursor: pointer; font: inherit; color: inherit;
}
.attn-row:first-child { border-top: 0; }
.attn-row:hover { background: #fafafa; }
.attn-dot { width: 9px; height: 9px; border-radius: 50%; }
.attn-dot--risk { background: #dc2626; }
.attn-dot--watch { background: #d97706; }
.attn-name { font-weight: 600; color: #1a1a1a; }
.attn-class { font-size: 12.5px; color: #6b7280; }
.attn-noclass { color: #c3c9d1; }
.attn-reason { font-size: 13px; color: #374151; }
.attn-open { color: #1a1a1a; font-weight: 600; white-space: nowrap; text-align: right; }
.attn-empty {
  background: #f6f8f6; border: 1px solid #e3ebe4; border-radius: 10px;
  padding: 26px; text-align: center; color: #1c6e2b; font-size: 14px; font-weight: 500;
}
@media (max-width: 640px) {
  .attn-row { grid-template-columns: 14px 1fr auto; row-gap: 2px; }
  .attn-class { grid-column: 2; }
  .attn-reason { grid-column: 1 / -1; padding-left: 26px; }
}

/* ── "Show families" showcase — parent/customer walkthrough ─────────── */
.sc-pills { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px; }
.sc-pill {
  font: 600 13px inherit; padding: 7px 14px; border-radius: 999px;
  border: 1px solid #e3e7ec; background: #fff; color: #5f6368; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.sc-pill:hover { border-color: #cbd2da; color: #1a1a1a; }
.sc-pill.active { background: #1b1f24; border-color: #1b1f24; color: #fff; }
.sc-stage { border: 1px solid #e3e7ec; border-radius: 12px; background: #fff; overflow: hidden; }
.sc-frame-wrap { margin: 0; background: #f7f8fa; }
.sc-frame-bar { display: flex; align-items: center; gap: 6px; padding: 8px 14px; border-bottom: 1px solid #eef1f4; background: #f3f4f6; }
.sc-dot { width: 9px; height: 9px; border-radius: 50%; background: #d4d8dd; }
.sc-url { margin-left: 10px; font-size: 11px; color: #9098a1; font-variant-numeric: tabular-nums; }
.sc-frame { display: block; width: 100%; height: 620px; border: 0; background: #eef0f3; }
/* Class materials — book-cover gallery */
.sc-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 20px; }
.sc-book { display: block; text-decoration: none; color: inherit; }
.sc-book-cover {
  display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover;
  border: 1px solid #e3e7ec; border-radius: 8px; background: #f3f4f6;
  box-shadow: 0 1px 3px rgba(20,24,32,.08); transition: transform .15s, box-shadow .15s;
}
.sc-book:hover .sc-book-cover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(20,24,32,.16); }
.sc-book-meta { margin-top: 9px; }
.sc-book-title { font-size: 13.5px; font-weight: 700; color: #1a1a1a; line-height: 1.3; }
.sc-book-level { font-size: 12px; color: #5f6368; margin-top: 2px; }
@media (max-width: 640px) {
  .sc-frame { height: 460px; }
}
