/* Teacher area: class list, class view (code, assignments, students). */

/* ---------- Class list ---------- */

.teach__classes { list-style: none; margin: 0; padding: 0; }
.teach__class-card { height: 100%; gap: 10px; padding: 26px 28px; }
.teach__class-name { font-size: 28px; line-height: 1.1; }
.teach__class-meta { font-size: 14px; color: var(--text-on-dark-muted); }

.teach__new { display: flex; flex-direction: column; gap: 14px; padding: 22px; max-width: 720px; }
.teach__new-form { display: flex; flex-direction: column; gap: 14px; }

/* ---------- Class header ---------- */

.teach__hero {
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
}
.teach__hero-name { font-size: 32px; line-height: 1.1; }
.teach__hero-sub { font-size: 14px; color: var(--text-on-dark-muted); }

.teach__code { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.teach__code-label { font-size: 13px; color: var(--text-on-dark-muted); }
.teach__code-value {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--ink-raised);
  color: var(--paper);
  border-radius: var(--radius-input);
  padding: 8px 14px;
  font-variant-numeric: tabular-nums;
}
.teach__code-value--sm { align-self: flex-start; font-size: 15px; padding: 6px 12px; margin-top: auto; }
.teach__copy { padding: 9px 16px; min-width: 76px; }

/* ---------- Panels ---------- */

.teach__grid { display: flex; gap: 24px; flex-wrap: wrap; align-items: flex-start; }
.teach__panel { flex: 1 1 440px; display: flex; flex-direction: column; gap: 12px; padding: 22px; }
.teach__panel--students { gap: 4px; flex-basis: 100%; }
.teach__panel-title { font-size: 15px; font-weight: 600; }
.teach__panel--students .teach__panel-title { margin-bottom: 8px; }
.teach__empty { font-size: 14px; line-height: 1.5; }

/* "Assign reading" picker */

/* Assignment rows */
.teach__assignment {
  border-top: 1px solid var(--line-soft);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.teach__assignment-title { font-size: 15px; font-weight: 600; }
.teach__meta { font-size: 13px; color: var(--text-muted); }
.teach__assignment-ar { font-size: 22px; flex-shrink: 0; }
.teach__assignment-progress { --row-gap: 10px; font-size: 13px; color: var(--text-muted); flex-wrap: nowrap; }
.teach__remove {
  background: none;
  border: none;
  padding: 0;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.teach__remove:hover { color: var(--clay); }

/* Students table: one column per assignment, scrolling sideways when it's wide. */
.teach__table-wrap { overflow-x: auto; margin: 0 -6px; padding: 0 6px; }
.teach__table { width: 100%; border-collapse: collapse; font-size: 14px; }
.teach__table th, .teach__table td { padding: 10px 8px; text-align: left; vertical-align: middle; }
.teach__table thead th { font-size: 12px; font-weight: 700; color: var(--text-muted); padding-top: 0; padding-bottom: 8px; vertical-align: bottom; }
.teach__table tbody tr { border-top: 1px solid var(--line-soft); }
.teach__student { font-weight: 600; min-width: 120px; overflow-wrap: anywhere; }
.teach__student a { color: var(--ink); }
.teach__student a:hover { color: var(--clay); }
.teach__level, .teach__streak, .teach__practice { white-space: nowrap; color: var(--text-muted); }
.teach__col-reading { min-width: 130px; }
.teach__col-title { display: block; color: var(--ink); }
.teach__col-sub { display: block; font-weight: 400; }
.teach__cell { display: flex; align-items: center; gap: 8px; }
.teach__cell-percent { min-width: 3ch; font-variant-numeric: tabular-nums; }

.teach__status {
  display: inline-block;
  border-radius: var(--radius-pill);
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
  background: var(--green-soft);
  color: var(--green);
}
.teach__status--done { background: var(--green); color: var(--paper); }
.teach__status--behind { background: var(--clay-soft); color: var(--clay); }

/* Class settings (rename, archive, delete) */
.teach__manage { padding: 0; }
.teach__manage-summary { padding: 14px 22px; cursor: pointer; font-size: 14px; font-weight: 600; }
.teach__manage-body { padding: 0 22px 20px; display: flex; flex-direction: column; gap: 14px; }
.teach__rename { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; }
.teach__archived {
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: var(--sand-hover);
  font-size: 14px;
}

/* Assignment form */
.teach__assign-form { display: flex; flex-direction: column; gap: 10px; padding: 6px; }
.teach__assign-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.teach__assign-book { margin: 0; font-size: 15px; }
.teach__instructions { margin: 2px 0 0; font-size: 14px; line-height: 1.45; white-space: pre-line; }
.teach__assignment.is-overdue .teach__meta { color: var(--clay); }
.teach__edit { max-width: 640px; }

@media (max-width: 560px) {
  .teach__hero { padding: 22px; }
  .teach__hero-name { font-size: 28px; }
  .teach__panel { flex-basis: 100%; padding: 18px; }
}

/* Settings */
.teach-settings .card { max-width: 640px; }
.teach-settings__time-zone { max-width: 420px; }

/* A student's page */
.teach-student { gap: 18px; }
.teach-student .teach__panel { flex: none; }
.teach-student__stats { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 12px; }
.teach-student__stat { padding: 16px 18px; display: flex; flex-direction: column-reverse; gap: 4px; }
.teach-student__stat dt { font-size: 13px; color: var(--text-muted); }
.teach-student__stat dd { margin: 0; font-size: 34px; line-height: 1; }
.teach-student__readings { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.teach-student__reading { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.teach-student__reading-progress { display: flex; align-items: center; gap: 10px; width: min(100%, 220px); font-size: 14px; }
.teach-student__reading-progress .progress { flex: 1; }
.teach-student__days {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(14, minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  height: 140px;
}
.teach-student__day { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; }
.teach-student__day-bar { width: 100%; max-width: 28px; height: calc(var(--h) * 1%); min-height: 3px; border-radius: 6px 6px 2px 2px; background: var(--line); }
.teach-student__day.is-goal .teach-student__day-bar { background: var(--green); }
.teach-student__day-label { font-size: 12px; color: var(--text-muted); }
.teach-student__note { margin: 10px 0 0; font-size: 13px; }
.teach-student__practice { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 8px 20px; font-size: 14px; }
.teach-student__practice-value { font-size: 22px; margin-right: 6px; }
.teach-student__remove { display: flex; justify-content: flex-end; }

/* Archived classes on the class list */
.teach__archived-list summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--text-muted); }
.teach__archived-classes { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }

/* Kinds of assignment: the form shows the chosen kind's fields; the list tags each one. */
.teach__kinds { display: inline-flex; gap: 4px; margin: 0; padding: 4px; border: 0; border-radius: var(--radius-pill); background: var(--sand); }
.teach__kind-choice { position: relative; }
.teach__kind-choice input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.teach__kind-choice span { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: var(--radius-pill); font-size: 13px; font-weight: 600; color: var(--text-body); }
.teach__kind-choice input:checked + span { background: var(--ink); color: var(--paper); }
.teach__kind-choice input:focus-visible + span { outline: 2px solid var(--green); outline-offset: 2px; }
.teach__assign-form:has(#assignment_kind_reading:checked) .teach__for:not(.teach__for--reading),
.teach__assign-form:has(#assignment_kind_vocabulary:checked) .teach__for:not(.teach__for--vocabulary),
.teach__assign-form:has(#assignment_kind_speaking:checked) .teach__for:not(.teach__for--speaking) { display: none; }
.teach__for { display: flex; flex-direction: column; gap: 12px; }
.teach__kind { display: inline-block; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--sand); font-family: var(--font-sans); font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; color: var(--text-body); }
.teach__kind--vocabulary { background: var(--green-soft); color: var(--green); }
.teach__kind--speaking { background: #F6E1D3; color: var(--clay-deep); }
.teach__targets { margin: 2px 0 0; font-size: 18px; }

/* Class texts (ClassroomBook). */
.teach__texts { flex: none; display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.teach__texts p { margin: 0; }
.teach__text-list { list-style: none; margin: 0; padding: 0; }
.teach__text-list li { display: flex; justify-content: space-between; align-items: center; gap: 8px 16px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--line-soft); }
.teach__share-select { flex: 1 1 260px; min-width: 0; }
.teach__rights { font-weight: 600; }
.teach__upload { align-items: center; }

/* Class insights (ClassInsights): a reading's preview in the form, and the week's lookups. */
.teach__preview { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--line); }
.teach__preview p { margin: 0; font-size: 14px; }
.teach__preview-empty { margin: 0; font-size: 13px; }
.teach__preview-label { font-size: 12px !important; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.teach__preview-words { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.teach__preview-words li { display: inline-flex; align-items: baseline; gap: 6px; padding: 4px 10px; border-radius: var(--radius-pill); background: var(--sand); }
.teach__preview-words .ar { font-size: 18px; }
.teach__preview-words span:not(.ar) { font-size: 12px; color: var(--text-muted); }
.teach__preview-deck { align-self: flex-start; }
.teach__lookups { flex: none; margin-top: 20px; display: flex; flex-direction: column; gap: 10px; }
.teach__lookups p { margin: 0; }
.teach__lookup-list { margin: 0; padding-left: 22px; columns: 2 220px; column-gap: 28px; }
.teach__lookup-list li { padding: 4px 0; break-inside: avoid; }
.teach__lookup-list .ar { font-size: 19px; }
.teach__lookup-count { font-size: 12px; font-weight: 600; color: var(--green); }

/* Schools (Phase C): seats, the school page, the home grouped by school. */
.seats { display: flex; flex-direction: column; gap: 8px; }
.seats p { margin: 0; }
.seats__count { font-size: 15px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.seats__count strong { font-size: 24px; font-family: var(--font-serif); font-weight: 400; }
.seats__full { font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: var(--radius-pill); background: var(--clay-soft); color: var(--clay); }
.seats__bar { flex: none; }
.seats__period { font-size: 13px; }
.seats__who summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.seats__who p { margin-top: 6px; font-size: 13px; line-height: 1.6; }
.teach__school-group { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.teach__school-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; }
.teach__school-name { font-family: var(--font-serif); font-size: 24px; font-weight: 400; margin: 0; }
.teach__school-invites { display: flex; flex-direction: column; gap: 10px; padding: 16px 20px; margin-bottom: 24px; }
.teach__school-invite { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px; }
.teach__school-invite .row { gap: 8px; }
.teach__visiting { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; margin-bottom: 16px;
                   border-radius: var(--radius-md); background: var(--sand); font-size: 14px; }
.teach__school-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.teach__school-grid .teach__panel { flex: none; }
.teach__people { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.teach__people li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.teach__invite-form { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.teach__invite-row { display: flex; flex-wrap: wrap; gap: 10px; }
.teach__invite-row .field { flex: 1 1 160px; }
.teach__reassign { display: flex; gap: 6px; align-items: center; }
.teach__reassign select { min-width: 0; max-width: 180px; padding: 6px 10px; font-size: 13px; }

/* School logins (Phase D): the form, and printable login cards. */
.teach__logins { flex: none; max-width: 720px; }
.teach__logins-form { display: flex; flex-direction: column; gap: 14px; }
.teach__logins-notes { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-muted); line-height: 1.5; }
.login-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.login-card { display: flex; flex-direction: column; gap: 4px; padding: 16px 18px; border: 1.5px dashed var(--line); border-radius: var(--radius-md); background: var(--card); break-inside: avoid; }
.login-card__brand { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--text-muted); }
.login-card__name { font-size: 18px; }
.login-card__class { font-size: 13px; color: var(--text-muted); }
.login-card__creds { margin: 8px 0 0; display: grid; grid-template-columns: max-content 1fr; gap: 4px 12px; font-size: 13px; }
.login-card__creds dt { color: var(--text-muted); }
.login-card__creds dd { margin: 0; overflow-wrap: anywhere; }
.login-card__creds code { font-size: 16px; font-weight: 700; letter-spacing: .04em; }
.teach-student__login { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.teach-student__login .row { gap: 8px; }
@media print {
  .sidebar, .topbar, .app-flash, .login-cards__header .btn, .screen-header__kicker { display: none !important; }
  .app-main { padding: 0 !important; margin: 0 !important; }
  body { background: #fff !important; }
  .login-card { border-color: #999; background: #fff; }
  .login-cards { grid-template-columns: repeat(2, 1fr); }
}
.teach-student__reset { position: relative; }
.teach-student__reset summary { list-style: none; cursor: pointer; }
.teach-student__reset summary::-webkit-details-marker { display: none; }
.teach-student__reset-body { position: absolute; right: 0; top: calc(100% + 6px); z-index: 5; width: min(280px, 80vw); display: flex; flex-direction: column; gap: 8px;
                             padding: 12px 14px; border-radius: var(--radius-md); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow-md, 0 6px 20px rgba(0,0,0,.12)); font-size: 13px; }

/* Referrals (Phase E): the tutor link, counts and credits. */
.referral__share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 10px 12px; border-radius: var(--radius-md); background: var(--sand); }
.referral__link { flex: 1 1 200px; font-size: 14px; overflow-wrap: anywhere; }
.referral__fine { margin: 0; font-size: 13px; line-height: 1.5; }
.referral__counts { margin: 4px 0 0; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.referral__counts dt { font-size: 13px; color: var(--text-muted); }
.referral__counts dd { margin: 0; font-size: 32px; }
.referral__available { margin: 0; font-size: 15px; }
.referral__available strong { font-size: 32px; font-weight: 400; margin-right: 4px; }
.referral__spend { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.referral__gift { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.referral__gift select { min-width: 200px; }
