:root {
  /* Teacher palette: ivory canvas, navy navigation, teal actions. */
  --navy: #12344d;
  --ink: #16364d;
  --text-secondary: #415a6b;
  --muted: #5d6c79;
  --primary: #00838a;
  --primary-hover: #006f76;
  --primary-strong: #006b72;
  --primary-soft: #e8f4f3;
  --primary-soft-hover: #daeeec;
  --primary-border: #a9cfcb;
  --canvas: #f6f4ef;
  --panel: #ffffff;
  --surface: #faf9f6;
  --surface-muted: #f0efea;
  --line: #dedfd9;
  --control-line: #85979b;
  --sidebar: #123650;
  --sidebar-deep: #102f48;
  --sidebar-text: #edf5f6;
  --sidebar-muted: #b1c8d2;
  --coral: #ff806b;
  --on-primary: #ffffff;
  --inverse-muted: #d5e9eb;
  --green: #21724f;
  --green-soft: #eaf5ee;
  --green-line: #c0ddcb;
  --warning: #95611a;
  --warning-soft: #fff3df;
  --warning-line: #e6c99a;
  --red: #b13f4b;
  --red-soft: #fff0f1;
  --red-line: #e7bac0;
  --purple: #6b5691;
  --purple-soft: #f0edf6;
  --purple-line: #d8cde8;
  --text: var(--ink);
  --blue: var(--primary);
  --sky: var(--primary-soft);
  --shadow: 0 12px 34px rgba(18, 52, 77, .07);
  --focus-ring: 0 0 0 4px rgba(0, 131, 138, .16);
  --radius: 18px;
  --chart-1: #00838a;
  --chart-2: #368f76;
  --chart-3: #87a88e;
  --chart-4: #d4a453;
  --chart-5: #d47f60;
  --chart-6: #b96977;
  --chart-7: #826e9e;
  --chart-8: #b59cc0;
  --chart-9: #6c879e;
  --chart-10: #437c91;
  --chart-11: #60846e;
  --chart-12: #9f8768;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans KR", sans-serif;
  background: var(--canvas);
  color: var(--ink);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.site-header {
  height: 74px;
  background: rgba(255, 255, 255, .95);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(22px, calc((100vw - 1480px) / 2));
  backdrop-filter: blur(14px);
}
.site-header.sticky {
  position: sticky;
  top: 0;
  z-index: 20;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--navy);
  text-decoration: none;
}
.logo {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--primary), var(--primary));
  color:var(--on-primary);
  display: grid;
  place-items: center;
  font-weight: 900;
  font-size: 23px;
  box-shadow: 0 10px 22px rgba(18,52,77,0.182);
}
.brand-copy { display: grid; line-height: 1; }
.brand-copy b { font-size: 21px; }
.brand-copy small {
  font-size: 8px;
  letter-spacing: .18em;
  color: var(--muted);
  margin-top: 6px;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.secure {
  font-size: 11px;
  color: var(--green);
  background: var(--green-soft);
  padding: 8px 12px;
  border-radius: 999px;
  font-weight: 800;
}
.admin-chip {
  font-size: 12px;
  font-weight: 800;
  color: var(--text-secondary);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 8px 12px;
  border-radius: 999px;
}

.login-page { min-height: 100vh; background: var(--canvas); }
.hero {
  max-width: 1440px;
  margin: auto;
  min-height: calc(100vh - 74px);
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, .72fr);
  gap: 55px;
  padding: 65px 46px 70px;
  position: relative;
  overflow: hidden;
}
.hero:before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--primary-soft), transparent 68%);
  left: -170px;
  top: 15px;
}
.copy {
  position: relative;
  z-index: 1;
  padding-top: 54px;
}
.eyebrow, .label {
  font-size: 10px;
  letter-spacing: .22em;
  font-weight: 900;
  color: var(--primary-strong);
}
.copy h1 {
  font-size: 48px;
  line-height: 1.12;
  letter-spacing: -.055em;
  color: var(--navy);
  margin: 15px 0;
}
.copy > p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 620px;
  margin: 0;
}
.meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin: 31px 0 0;
}
.meta > div {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 145px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  box-shadow: 0 9px 25px rgba(18,52,77,0.039);
}
.meta i { font-style: normal; font-size: 23px; }
.meta span { display: grid; }
.meta small { font-size: 9px; color: var(--muted); }
.meta b { font-size: 14px; color: var(--ink); margin-top: 3px; }

.panel {
  align-self: center;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 31px;
  box-shadow: 0 24px 60px rgba(18,52,77,0.091);
  position: relative;
  z-index: 2;
}
.panel h2 {
  font-size: 28px;
  color: var(--ink);
  margin: 8px 0;
}
.panel .intro {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 24px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}
.field span {
  font-size: 12px;
  font-weight: 850;
  color: var(--text-secondary);
}
.field span small {
  margin-left: 6px;
  font-weight: 600;
  color: var(--muted);
}
.field input,
.field select,
.filters input,
.filters select,
.class-form input,
.class-form select,
.class-form textarea {
  height: 51px;
  border: 1px solid var(--control-line);
  border-radius: 14px;
  padding: 0 15px;
  background: var(--surface);
  outline: none;
  color: var(--text-secondary);
  width: 100%;
}
.field input:focus,
.filters input:focus,
.filters select:focus,
.class-form input:focus {
  border-color: var(--primary-border);
  box-shadow: 0 0 0 4px rgba(0,131,138,.16);
  background: var(--panel);
}

.primary {
  width: 100%;
  min-height: 53px;
  border: 0;
  border-radius: 15px;
  font-weight: 900;
  background: linear-gradient(120deg, var(--primary-hover), var(--primary));
  color:var(--on-primary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  margin-top: 8px;
  box-shadow: 0 13px 27px rgba(0,131,138,.18);
  transition: transform .18s;
}
.primary:hover { transform: translateY(-2px); }
.primary.full { margin-top: 18px; }
.primary:disabled {
  opacity: .65;
  cursor: wait;
  transform: none;
}

.secondary-btn,
.ghost-btn {
  border-radius: 12px;
  font-weight: 800;
  padding: 10px 14px;
  transition: transform .18s;
}
.secondary-btn:hover,
.ghost-btn:hover { transform: translateY(-1px); }
.secondary-btn {
  border: 1px solid var(--line);
  background: var(--surface-muted);
  color: var(--text-secondary);
}
.ghost-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--muted);
}

.note {
  display: flex;
  gap: 8px;
  margin-top: 15px;
  background: var(--surface);
  border-radius: 13px;
  padding: 11px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
}
.note b { color: var(--green); }
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 16px;
  padding: 4px;
  border-radius: 14px;
  background: var(--surface-muted);
}
.auth-tab {
  border: 0;
  border-radius: 11px;
  padding: 10px 12px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  cursor: pointer;
}
.auth-tab.active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 4px 12px rgba(18,52,77,0.078);
}
.roster-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
}
.roster-manual-form {
  margin: 0 0 16px;
  padding: 14px 16px 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}
.roster-upload-label {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}
.form-error {
  min-height: 18px;
  margin: 10px 0 0;
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.app-shell { min-height: 100vh; }
.workspace {
  max-width: 1560px;
  margin: 0 auto;
  padding: 28px 24px 48px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(340px, .78fr);
  gap: 24px;
  align-items: start;
}

.catalog-panel,
.builder-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 28px;
  box-shadow: 0 18px 44px rgba(18,52,77,0.052);
}
.catalog-panel { padding: 28px; }
.builder-panel {
  position: sticky;
  top: 92px;
  max-height: calc(100vh - 110px);
  overflow-x: hidden;
  overflow-y: auto;
  -ms-overflow-style: none;
  scrollbar-width: none;
}
.builder-panel::-webkit-scrollbar { display: none; }
.builder-scroll { padding: 28px; }

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 18px;
}
.section-heading h1,
.builder-panel h2 {
  margin: 8px 0;
  color: var(--ink);
  letter-spacing: -.03em;
}
.section-heading h1 { font-size: 30px; }
.builder-panel h2 { font-size: 24px; }
.muted {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}
.muted.compact { font-size: 12px; margin-bottom: 18px; }

.dashboard-stats,
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 22px;
}
.dashboard-stats article,
.stats-grid article {
  background: linear-gradient(160deg, var(--panel), var(--surface));
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(18,52,77,0.033);
}
.dashboard-stats span,
.stats-grid span {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.dashboard-stats strong,
.stats-grid strong {
  display: block;
  margin-top: 8px;
  font-size: 28px;
  color: var(--ink);
  letter-spacing: -.04em;
}
.stats-grid article.accent {
  background: linear-gradient(145deg, var(--navy), var(--primary-strong));
  border-color: transparent;
}
.stats-grid article.accent span,
.stats-grid article.accent strong { color:var(--on-primary); }

.recent-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin: 8px 0 12px;
}
.recent-heading h2 {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}
.recent-heading span {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.class-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 8px;
}
.class-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  background: var(--surface);
}
.class-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.class-status {
  font-size: 10px;
  font-weight: 900;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
}
.class-date { font-size: 11px; color: var(--muted); }
.class-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--ink);
}
.class-code-line {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}
.class-metrics {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.class-metrics span {
  font-size: 11px;
  font-weight: 800;
  color: var(--text-secondary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 6px 9px;
}

.catalog-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 28px 0;
}

.filters {
  display: grid;
  grid-template-columns: 1.4fr repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.filters select,
.filters input { height: 46px; }

.table-wrap {
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: auto;
  background: var(--surface);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 860px;
}
th, td {
  padding: 14px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}
th {
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--muted);
  background: var(--surface);
  position: sticky;
  top: 0;
}
tr.selected { background: var(--primary-soft); }
tr:hover td { background: var(--surface); }
.check-cell { width: 44px; }
.course-check {
  width: 18px;
  height: 18px;
  accent-color: var(--blue);
}
.course-code {
  display: block;
  font-size: 11px;
  font-weight: 800;
  color: var(--primary-strong);
  margin-bottom: 4px;
}
.course-title {
  display: block;
  font-size: 14px;
  color: var(--ink);
}
.cell-sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
}
.tag-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.tag {
  font-size: 10px;
  font-weight: 800;
  color: var(--text-secondary);
  background: var(--primary-soft);
  border-radius: 999px;
  padding: 4px 8px;
}
.slide-cell { min-width: 110px; }
.slide-preview-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 12px;
  padding: 4px 8px 4px 4px;
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 11px;
}
.slide-preview-button img {
  width: 42px;
  height: 32px;
  object-fit: cover;
  border-radius: 8px;
  background: var(--primary-soft);
}
.no-slides,
.pending-slides {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}
.pending-slides { color: var(--warning); }
.status-badge {
  display: inline-flex;
  font-size: 10px;
  font-weight: 900;
  border-radius: 999px;
  padding: 5px 8px;
}
.status-badge.verified { background: var(--green-soft); color: var(--green); }
.status-badge.supported { background: var(--primary-soft); color: var(--primary-strong); }
.status-badge.pending { background: var(--warning-soft); color: var(--warning); }
.status-badge.required { background: var(--surface-muted); color: var(--muted); }
.json-button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-secondary);
  font-weight: 900;
}
.empty-state {
  padding: 28px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.selected-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}
.selected-item {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: var(--surface);
}
.selected-index {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 900;
}
.selected-copy { display: grid; gap: 2px; }
.selected-copy strong { font-size: 13px; color: var(--ink); }
.selected-copy span { font-size: 11px; color: var(--muted); }
.reorder-actions { display: flex; gap: 4px; }
.mini-button {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-secondary);
  font-weight: 900;
}
.mini-button.remove { color: var(--red); }
.selection-empty {
  border: 1px dashed var(--line);
  border-radius: 14px;
  padding: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 14px;
}

.class-form { margin-top: 16px; }
.field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}
.form-divider {
  height: 1px;
  background: var(--line);
  margin: 8px 0 16px;
}
.inline-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 10px;
}
.inline-heading h3 {
  margin: 0;
  font-size: 15px;
  color: var(--ink);
}
.inline-heading span {
  font-size: 11px;
  color: var(--muted);
  font-weight: 800;
}

.creation-result { margin-top: 22px; }
.success {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.check {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-soft);
  color: var(--green);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
}
.success small {
  font-size: 10px;
  color: var(--green);
  font-weight: 900;
}
.success h3 {
  font-size: 18px;
  margin: 3px 0 0;
  color: var(--ink);
}
.ticket {
  background: linear-gradient(145deg, var(--navy), var(--primary-strong));
  color:var(--on-primary);
  border-radius: 22px;
  padding: 20px;
  box-shadow: 0 18px 38px rgba(18,52,77,0.163);
  margin-bottom: 12px;
}
.ticket-head {
  display: flex;
  justify-content: space-between;
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--inverse-muted);
}
.ticket-head b {
  letter-spacing: 0;
  color: var(--green);
  background: var(--green-soft);
  padding: 5px 8px;
  border-radius: 999px;
}
.ticket-course { margin: 16px 0 12px; }
.ticket-course small {
  display: block;
  font-size: 9px;
  color: var(--inverse-muted);
}
.ticket-course strong {
  display: block;
  font-size: 18px;
  margin-top: 5px;
}
.ticket dl {
  display: grid;
  gap: 8px;
  margin: 0;
}
.ticket dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}
.ticket dt { font-size: 9px; color: var(--inverse-muted); }
.ticket dd {
  margin: 0;
  font-size: 12px;
  font-weight: 800;
}
#ticketCodes {
  width: 100%;
  min-height: 120px;
  border: 1px solid var(--control-line);
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
  background: var(--surface);
  color: var(--text-secondary);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.result-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.learner-link {
  display: grid;
  place-items: center;
  text-decoration: none;
  text-align: center;
}

.slide-dialog,
.json-dialog,
.class-manager-dialog {
  width: min(920px, calc(100vw - 32px));
  border: 0;
  border-radius: 22px;
  padding: 0;
  box-shadow: 0 30px 70px rgba(18,52,77,0.163);
}
.slide-dialog::backdrop,
.json-dialog::backdrop,
.class-manager-dialog::backdrop {
  background: rgba(18,52,77,0.53);
}
.class-manager-dialog {
  width: min(1040px, calc(100vw - 32px));
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--surface);
}
.class-manager-body {
  padding: 18px 22px 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.manager-section {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 28px rgba(18,52,77,0.052);
}
.manager-section-full { grid-column: 1 / -1; }
.manager-section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 15px;
}
.manager-section-heading h3 {
  margin: 3px 0 0;
  color: var(--ink);
  font-size: 17px;
}
.manager-kicker {
  color: var(--primary-strong);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .16em;
}
.manager-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 12px;
}
.manager-form .field { min-width: 0; }
.manager-form .field input,
.manager-form .field select,
.managed-batch input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--control-line);
  border-radius: 11px;
  padding: 0 12px;
  background: var(--surface);
  color: var(--ink);
}
.manager-wide { grid-column: 1 / -1; }
.manager-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.manager-actions .btn { width: auto; min-height: 42px; margin: 0; }
.manager-actions.align-end { align-items: end; padding-bottom: 16px; }
.btn.danger {
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  color: var(--red);
}
.manager-summary,
.manager-help {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
}
.manager-help { margin: -5px 0 14px; line-height: 1.6; }
.managed-batch-list { display: grid; gap: 10px; }
.managed-batch {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 120px auto;
  gap: 10px;
  align-items: end;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 13px;
  background: var(--surface);
}
.managed-batch.cancelled { background: var(--surface-muted); opacity: .78; }
.managed-batch label { display: grid; gap: 6px; }
.managed-batch label > span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}
.managed-batch-meta {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 11px;
}
.managed-batch-actions { display: flex; gap: 7px; }
.managed-batch-actions .btn { width: auto; min-height: 40px; margin: 0; }
.managed-learner-list { display: grid; gap: 11px; }
.managed-learner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 15px;
  background: linear-gradient(145deg, var(--panel) 0%, var(--surface) 100%);
}
.learner-ticket-link { display: grid; gap: 4px; min-width: 0; text-align: right; }
.learner-ticket-link strong { color: var(--text-secondary); font-size: 12px; overflow-wrap: anywhere; }
.learner-ticket-link span { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.learner-monitor-link { align-items: center; justify-content: space-between; gap: 10px; margin: 12px 0; }
.learner-monitor-link .manager-help { margin: 0; }
.learner-monitor-link .btn { flex-shrink: 0; }
.learner-identity,
.learner-identity { justify-content: flex-start; min-width: 0; }
.learner-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 13px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  font-size: 15px;
  font-weight: 900;
}
.learner-identity-copy { min-width: 0; display: grid; gap: 3px; }
.learner-identity-copy strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.learner-identity-copy span {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.learner-progress-track {
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: var(--surface-muted);
}
.learner-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--primary), var(--green));
  transition: width .25s ease;
}
.learner-detail-section {
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: 13px;
  background: var(--panel);
}
.learner-detail-section h4 { margin: 0; color: var(--ink); font-size: 12px; }
.learner-detail-heading { margin-bottom: 10px; }
.learner-detail-heading > span { color: var(--muted); font-size: 10px; }
.learner-detail-heading .btn { width: auto; min-height: 32px; margin: 0; }
.ai-history-load-more {
  width: 100%;
  min-height: 34px;
  margin: 0 0 9px;
}
.learner-course-progress-list { display: grid; gap: 8px; margin-top: 10px; }
.learner-course-progress {
  display: grid;
  gap: 7px;
  border-radius: 10px;
  padding: 10px;
  background: var(--surface);
}
.learner-course-progress-heading div { color: var(--text-secondary); font-size: 11px; font-weight: 800; }
.learner-course-progress-heading strong { color: var(--green); font-size: 11px; }
.learner-course-progress p { margin: 0; color: var(--muted); font-size: 9px; }
.learner-ai-message-list {
  display: grid;
  gap: 8px;
  max-height: 430px;
  overflow: auto;
  padding-right: 3px;
}
.learner-ai-message {
  border-left: 3px solid var(--primary-border);
  border-radius: 0 10px 10px 0;
  padding: 10px;
  background: var(--surface);
}
.learner-ai-message.prompt { border-color: var(--purple); background: var(--purple-soft); }
.learner-ai-message.response { border-color: var(--green); background: var(--green-soft); }
.learner-ai-message-heading { align-items: flex-start; }
.learner-ai-message-heading strong { color: var(--text-secondary); font-size: 10px; }
.learner-ai-message-heading span { color: var(--muted); font-size: 9px; text-align: right; }
.learner-ai-message p {
  margin: 7px 0 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.learner-ai-message small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; }
.evaluation-score {
  display: flex;
  align-items: baseline;
  gap: 9px;
  border-radius: 10px;
  padding: 10px;
  background: var(--surface-muted);
}
.evaluation-score.completed { background: var(--green-soft); }
.evaluation-score.failed { background: var(--red-soft); }
.evaluation-score strong { color: var(--primary-strong); font-size: 17px; }
.evaluation-score span { color: var(--muted); font-size: 10px; }
.evaluation-summary { color: var(--text-secondary); font-size: 11px; line-height: 1.65; }
.evaluation-error {
  border-radius: 9px;
  padding: 8px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 10px;
}
.evaluation-value-block { margin-top: 10px; }
.evaluation-value-block > strong { color: var(--text-secondary); font-size: 11px; }
.evaluation-value-block ul { margin: 6px 0 0; padding-left: 18px; }
.evaluation-value-block li { margin: 4px 0; color: var(--text-secondary); font-size: 10px; line-height: 1.55; }
.learner-error { display: grid; gap: 5px; color: var(--red); }
.learner-error span { color: var(--muted); }
.manager-empty {
  border: 1px dashed var(--line);
  border-radius: 13px;
  padding: 20px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}
.class-manage-button {
  width: 100%;
  margin-top: 13px;
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding: 22px 22px 0;
}
.dialog-heading h2 {
  margin: 6px 0 0;
  font-size: 22px;
  color: var(--ink);
}
.icon-button {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-muted);
  font-size: 20px;
  color: var(--text-secondary);
}
.json-meta {
  padding: 8px 22px 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.slide-stage {
  margin: 16px 22px;
  min-height: 360px;
  border-radius: 18px;
  background: var(--navy);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.slide-stage img {
  max-width: 100%;
  max-height: 520px;
  display: block;
}
.slide-loading {
  color: var(--inverse-muted);
  font-size: 13px;
  font-weight: 700;
  padding: 24px;
}
.slide-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 0 22px 22px;
}
.slide-numbers {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
.slide-numbers button {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-secondary);
  font-weight: 800;
}
.slide-numbers button.active {
  background: var(--blue);
  border-color: var(--blue);
  color:var(--on-primary);
}
#jsonContent {
  margin: 16px 22px 22px;
  max-height: 60vh;
  overflow: auto;
  background: var(--navy);
  color: var(--inverse-muted);
  border-radius: 16px;
  padding: 16px;
  font-size: 12px;
  line-height: 1.55;
}

.toast {
  position: fixed;
  right: 25px;
  bottom: 25px;
  left: auto;
  transform: translateY(15px);
  background: var(--navy);
  color:var(--on-primary);
  padding: 13px 17px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 700;
  opacity: 0;
  transition: .25s;
  z-index: 100;
  pointer-events: none;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .2);
}
.toast.show {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 760px) {
  .result-actions,
  .class-manager-body,
  .manager-form {
    grid-template-columns: 1fr;
  }
  .manager-section-full,
  .manager-wide {
    grid-column: 1;
  }
  .managed-batch {
    grid-template-columns: 1fr;
  }
  .managed-batch-meta { grid-column: 1; }
  .managed-learner { align-items: flex-start; flex-direction: column; gap: 10px; }
  .learner-ticket-link { text-align: left; }
    .learner-ai-message-heading,
  .learner-course-progress-heading {
    align-items: flex-start;
    flex-direction: column;
  }
  .learner-ai-message-heading span { text-align: left; }
  .manager-actions,
  .managed-batch-actions { flex-wrap: wrap; }
}

@media (max-width: 1180px) {
  .workspace { grid-template-columns: 1fr; }
  .builder-panel {
    position: static;
    max-height: none;
  }
  .class-card-grid { grid-template-columns: 1fr 1fr; }
  .filters { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 30px;
  }
  .copy { padding-top: 25px; }
  .panel { max-width: 600px; width: 100%; margin: auto; }
  .dashboard-stats,
  .stats-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 620px) {
  .site-header { height: 66px; padding: 0 15px; }
  .brand-copy small,
  .secure { display: none; }
  .hero { padding: 25px 15px 43px; gap: 25px; }
  .copy h1 { font-size: 34px; }
  .copy > p { font-size: 14px; }
  .meta { display: grid; grid-template-columns: 1fr 1fr; }
  .meta > div { min-width: 0; }
  .meta > div:last-child { grid-column: 1 / -1; }
  .login-panel { padding: 22px; border-radius: 22px; }
  .login-panel h2 { font-size: 24px; }
  .workspace { padding: 0; }
  .catalog-panel,
  .builder-scroll { padding: 18px; }
  .class-card-grid,
  .field-pair,
  .result-actions { grid-template-columns: 1fr; }
  .filters { grid-template-columns: 1fr; }
}

/* Course Studio shell (Admin prototype) */
.studio-app {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--canvas);
}
.studio-app .sidebar {
  background: linear-gradient(160deg, var(--sidebar), var(--sidebar-deep));
  backdrop-filter: blur(18px);
  border-right: 1px solid var(--sidebar);
  padding: 22px 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  z-index: 10;
}
.studio-app .brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 8px 22px;
}
.studio-app .brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--primary), var(--primary));
  display: grid;
  place-items: center;
  color:var(--on-primary);
  font-size: 22px;
  box-shadow: 0 8px 20px rgba(18,52,77,0.163);
}
.studio-app .brand strong { font-size: 21px; color: var(--sidebar-text); }
.studio-app .brand small {
  display: block;
  color: var(--sidebar-muted);
  font-size: 11px;
  font-weight: 800;
  margin-top: 1px;
  letter-spacing: 0;
}
.nav-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--sidebar-muted);
  font-weight: 900;
  padding: 17px 12px 7px;
}
.nav-btn {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--sidebar-text);
  padding: 11px 12px;
  border-radius: 11px;
  text-align: left;
  display: flex;
  gap: 11px;
  align-items: center;
  font-weight: 760;
  margin: 2px 0;
  transition: .2s;
}
.nav-btn:hover { background: rgba(255, 255, 255, .09); color: var(--on-primary); }
.nav-btn.active {
  background: linear-gradient(90deg, #0b727d, #126b79);
  color: var(--on-primary);
  box-shadow: inset 3px 0 var(--coral);
}
.nav-icon { width: 22px; text-align: center; }
.sidebar-foot { margin-top: auto; }
.side-card {
  background: var(--surface);
  border: 1px solid #ecd9cd;
  border-radius: 15px;
  padding: 14px;
}
.side-card strong { font-size: 13px; color: var(--ink); }
.side-card p {
  font-size: 11px;
  line-height: 1.55;
  color: var(--muted);
  margin: 8px 0 12px;
}
.side-card button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px;
  background: var(--primary);
  color:var(--on-primary);
  font-weight: 900;
}

.shell { min-width: 0; }
.studio-app .topbar {
  height: 64px;
  background: rgba(250, 249, 246, .94);
  backdrop-filter: blur(15px);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 8;
}
.searchbox {
  width: min(430px, 50vw);
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--control-line);
  background: var(--panel);
  border-radius: 11px;
  padding: 10px 13px;
  color: var(--muted);
}
.searchbox input {
  border: 0;
  outline: 0;
  width: 100%;
  color: var(--ink);
  background: transparent;
}
.top-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}
.icon-btn {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 10px;
  width: 38px;
  height: 38px;
  color: var(--text-secondary);
  font-size: 15px;
}
.user {
  display: flex;
  align-items: center;
  gap: 9px;
}
.user-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #ffe2cf;
  font-size: 18px;
}
.user strong {
  font-size: 13px;
  color: var(--ink);
}
.user small {
  display: block;
  color: var(--muted);
  font-size: 10px;
}

.content { padding: 25px 28px 38px; }
.page { display: none; }
.page.active { display: block; }
/* Course Builder V7 host styles removed — builder UI deleted from this machine. */
.page-head {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}
.page-head h1 {
  font-size: 26px;
  margin: 0 0 7px;
  color: var(--ink);
}
.page-head p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.page-actions {
  margin-left: auto;
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
}
.btn {
  border: 0;
  border-radius: 11px;
  padding: 11px 16px;
  font-weight: 850;
}
.btn.primary {
  background: linear-gradient(135deg, var(--primary), #008187);
  color:var(--on-primary);
  box-shadow: 0 8px 18px rgba(0,131,138,.16);
}
.btn.secondary {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text-secondary);
}
.btn.ghost {
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.btn.small {
  padding: 8px 11px;
  font-size: 12px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 16px;
}
.stat-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 17px;
  box-shadow: 0 12px 34px rgba(18,52,77,0.078);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.stat-card small {
  color: var(--muted);
  font-weight: 760;
}
.stat-card .stat-sub {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: var(--primary-strong);
}
.stat-card strong {
  display: block;
  font-size: 27px;
  margin-top: 7px;
  color: var(--ink);
}
.stat-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  background: var(--primary-soft);
  color: var(--primary-strong);
  flex: 0 0 auto;
}
.stat-card:nth-child(2) .stat-icon { background: var(--green-soft); color: var(--green); }
.stat-card:nth-child(3) .stat-icon { background: var(--primary-soft); color: var(--primary-strong); }
.stat-card:nth-child(4) .stat-icon { background: var(--warning-soft); color: var(--warning); }

.grid-3 {
  display: grid;
  grid-template-columns: 1.35fr .85fr 1.1fr;
  gap: 14px;
  margin-bottom: 16px;
}
.content .panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: var(--shadow);
  padding: 17px;
  min-width: 0;
}
.panel-head {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  gap: 10px;
}
.panel-head h3 {
  font-size: 16px;
  margin: 0;
  color: var(--ink);
}
.panel-head button,
.panel-head a,
.panel-head .panel-hint {
  margin-left: auto;
  color: var(--primary-strong);
  font-size: 11px;
  font-weight: 800;
  border: 0;
  background: none;
  text-decoration: none;
  cursor: pointer;
}
.panel-head .panel-hint {
  color: var(--muted);
  cursor: default;
  font-weight: 700;
}
.donut-wrap {
  display: flex;
  gap: 18px;
  align-items: center;
}
.donut-holder {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.donut {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: conic-gradient(var(--line) 0 100%);
  display: grid;
  place-items: center;
}
.donut::before {
  content: "";
  width: 105px;
  height: 105px;
  background: white;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--surface-muted);
}
.donut-label {
  position: absolute;
  text-align: center;
  pointer-events: none;
}
.donut-label strong {
  font-size: 25px;
  display: block;
  color: var(--ink);
}
.donut-label small {
  font-size: 11px;
  color: var(--muted);
}
.legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 14px;
  font-size: 11px;
  color: var(--muted);
  flex: 1;
  min-width: 0;
}
.legend span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 6px;
  vertical-align: middle;
}
.legend b {
  float: right;
  color: var(--muted);
  margin-left: 6px;
}
.class-stat-list { display: grid; gap: 9px; }
.class-stat {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.class-stat strong {
  margin-left: auto;
  font-size: 17px;
  color: var(--ink);
}
.class-stat.home-highlight { background: var(--primary-soft); }
.activity-list { display: grid; gap: 13px; }
.activity-item {
  display: grid;
  grid-template-columns: 31px 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: var(--text-secondary);
}
.activity-item time {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
}
.activity-icon {
  width: 31px;
  height: 31px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary-strong);
  flex: 0 0 auto;
}
.stub-panel h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--ink);
}
.stub-panel .muted { margin: 0 0 16px; font-size: 12px; }
.filter-row {
  display: grid;
  grid-template-columns: minmax(260px, 1.6fr) repeat(3, minmax(130px, .7fr));
  gap: 11px;
  margin-bottom: 14px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}
.course-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.card-cover {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary-soft), var(--primary-soft));
  display: grid;
  place-items: center;
  font-size: 48px;
  position: relative;
}
.card-cover-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity .16s ease;
}
.card-cover-image.is-ready { opacity: 1; }
.card-cover-fallback { line-height: 1; }
.card-cover.image-error .card-cover-image { display: none; }
.card-cover.image-error::after { content: '📘'; }
.card-cover .code {
  position: absolute;
  left: 10px;
  top: 9px;
  background: rgba(255, 255, 255, .9);
  padding: 5px 7px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: 900;
  color: var(--primary-strong);
}
.course-card-body { padding: 14px; }
.course-card-body h4 {
  margin: 7px 0 9px;
  font-size: 14px;
  line-height: 1.45;
  min-height: 40px;
  color: var(--ink);
}
.course-card-body p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.55;
  min-height: 48px;
  margin: 0;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: var(--muted);
  margin-top: 10px;
}
.card-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 12px;
}
.course-card-actions {
  grid-template-columns: minmax(0, .9fr) minmax(0, 1.35fr) minmax(0, 1fr);
  align-items: center;
}
.course-card-actions .btn.small {
  box-sizing: border-box;
  width: 100%;
  height: 38px;
  min-height: 38px;
  max-height: 38px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 0 10px;
  line-height: 1.2;
  white-space: nowrap;
  border-width: 1px;
  border-style: solid;
  box-shadow: none;
  vertical-align: middle;
}
.course-card-actions .btn.ghost.small {
  border-color: transparent;
}
.course-card-actions .btn.primary.small {
  border-color: transparent;
  box-shadow: none;
}
.course-card-actions .btn.secondary.small {
  border-color: var(--line);
}
.card-cover.is-interactive {
  cursor: pointer;
}
.card-cover.is-interactive:focus-visible {
  outline: 3px solid var(--primary);
  outline-offset: -3px;
}
.card-cover.is-interactive:hover .card-cover-image {
  filter: brightness(0.96);
}
.student-preview-dialog {
  width: min(1200px, calc(100vw - 32px));
  max-width: calc(100vw - 32px);
  height: min(860px, calc(100dvh - 32px));
  max-height: calc(100dvh - 32px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: 0 24px 64px rgba(18, 52, 77, 0.28);
}
.student-preview-dialog::backdrop {
  background: rgba(12, 28, 42, 0.48);
}
.student-preview-stage {
  position: relative;
  height: calc(100% - 92px);
  min-height: 420px;
  background: #edf5fb;
}
.student-preview-stage iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #f2f8fd;
}
.student-preview-stage .slide-loading {
  position: absolute;
  inset: 0;
}
.course-entry-cell {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.form-grid,
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.settings-grid .field label {
  font-size: 11px;
  font-weight: 900;
  color: var(--text-secondary);
  display: block;
  margin-bottom: 7px;
}
.settings-grid .field input {
  height: 44px;
}
.analytics-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-bottom: 16px;
}

.table-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 17px;
  box-shadow: 0 12px 34px rgba(18,52,77,0.078);
  overflow: hidden;
}
.table-toolbar {
  display: flex;
  align-items: center;
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  gap: 10px;
  flex-wrap: wrap;
}
.table-toolbar h3 {
  margin: 0;
  font-size: 16px;
  color: var(--ink);
}
.tabs {
  display: flex;
  gap: 4px;
  margin-left: 18px;
}
.tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 800;
}
.tab.active {
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.toolbar-spacer { margin-left: auto; }
.select,
.input {
  border: 1px solid var(--control-line);
  border-radius: 9px;
  background: white;
  padding: 9px 10px;
  color: var(--text-secondary);
  outline: none;
}
.table-scroll { overflow: auto; }
.table-panel table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 720px;
}
.table-panel th,
.table-panel td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}
.table-panel th {
  background: var(--surface);
  color: var(--muted);
  font-size: 10px;
}
.course-cell {
  display: flex;
  gap: 10px;
  align-items: center;
  min-width: 280px;
  white-space: normal;
}
.course-thumb {
  width: 43px;
  height: 34px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--primary-soft));
  display: grid;
  place-items: center;
  font-size: 16px;
  flex: 0 0 auto;
}
.course-cell strong {
  font-size: 12px;
  display: block;
  color: var(--ink);
}
.course-cell small {
  display: block;
  color: var(--muted);
  margin-top: 3px;
}
.pill {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 850;
  background: var(--primary-soft);
  color: var(--primary-strong);
}
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.orange { background: var(--warning-soft); color: var(--warning); }
.pill.purple { background: var(--purple-soft); color: var(--purple); }
.pill.red { background: var(--red-soft); color: var(--red); }
.row-actions {
  display: flex;
  gap: 5px;
}
.row-actions button {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  padding: 4px;
}

#builderPage .workspace {
  max-width: none;
  margin: 0;
  padding: 0;
}
#builderPage .builder-panel {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 110px);
}
.builder-recent { margin-top: 22px; }

@media (max-width: 1200px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .grid-3 .panel:last-child { grid-column: 1 / -1; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .analytics-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 850px) {
  .studio-app { display: block; }
  .studio-app .sidebar {
    height: auto;
    position: relative;
  }
  .nav-area {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
  }
  .content { padding: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-3 .panel:last-child { grid-column: auto; }
  .studio-app .topbar { padding: 0 16px; }
  .searchbox { width: min(220px, 42vw); }
  .user strong,
  .user small { display: none; }
  .filter-row { grid-template-columns: 1fr 1fr; }
  .cards,
  .form-grid,
  .settings-grid { grid-template-columns: 1fr; }
  .tabs { margin-left: 0; width: 100%; flex-wrap: wrap; }
}

/* Course-aware teacher evaluation report. */
.learner-evaluation-detail { color:var(--text-secondary); font-size:14px; line-height:1.7; }
.learner-evaluation-detail h5 { font-size:15px; margin:0 0 12px; color:var(--ink); }
.evaluation-report-summary { display:grid; grid-template-columns:150px minmax(0,1fr); gap:20px; margin:16px 0; align-items:start; }
.evaluation-report-summary .evaluation-score { display:flex; flex-direction:column; align-items:flex-start; gap:6px; padding:16px; background:var(--primary-soft); border-radius:12px; }
.evaluation-report-summary .evaluation-score strong { font-size:28px; }
.evaluation-report-summary .evaluation-score span { font-size:12px; }
.learner-evaluation-detail .evaluation-summary { font-size:14px; line-height:1.8; margin:0; white-space:pre-wrap; }
.evaluation-notice { padding:12px 16px; background:var(--surface-muted); border-radius:8px; font-size:13px; }
.evaluation-notice.stale { background:var(--warning-soft); color:var(--warning); border:1px solid var(--warning-line); }
.evaluation-current { color:var(--green); font-size:13px; }
.evaluation-meta { color:var(--muted); font-size:12px; }
.evaluation-basis { padding:14px 16px; border:1px solid var(--line); border-radius:10px; margin:16px 0; }
.evaluation-basis p { margin:5px 0; }
.evaluation-criteria { margin:24px 0; }
.evaluation-criterion { padding:16px 0; border-bottom:1px solid var(--line); }
.evaluation-criterion-head { display:flex; align-items:center; justify-content:space-between; gap:12px; }
.evaluation-criterion-status { flex-shrink:0; border-radius:5px; background:var(--surface-muted); padding:2px 8px; font-size:12px; }
.evaluation-criterion-status.teacher_review,.evaluation-criterion-status.insufficient_evidence { background:var(--warning-soft); color:var(--warning); }
.evaluation-criterion p { margin:8px 0; }
.evaluation-criterion-score { font-size:12px; color:var(--muted); }
.evaluation-meter { height:5px; border-radius:5px; background:var(--line); max-width:320px; overflow:hidden; }
.evaluation-meter span { display:block; height:100%; background:var(--primary-strong); }
.evaluation-feedback-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; margin:24px 0; }
.evaluation-feedback-item { padding:12px 14px; margin:10px 0; background:var(--surface); border-radius:8px; }
.evaluation-feedback-item p { margin:6px 0; }
.evaluation-guidance { color:var(--primary-strong); }
.evaluation-evidence-item,.evaluation-history { border:1px solid var(--line); border-radius:8px; margin:10px 0; padding:12px 16px; }
.evaluation-evidence-item summary,.evaluation-history summary { cursor:pointer; font-weight:600; }
.evaluation-response { padding:10px 12px; border-left:3px solid var(--primary-border); margin:10px 0; background:var(--surface); }
.evaluation-response strong { font-size:12px; color:var(--muted); }
.evaluation-response p { margin:4px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.evaluation-stale-label { color:var(--warning); }
@media(max-width:700px) { .evaluation-report-summary,.evaluation-feedback-grid { grid-template-columns:1fr; } .evaluation-criterion-head { align-items:flex-start; } }

#studentDetail > .learner-detail-section + .learner-detail-section { margin-top: 12px; }
.evaluation-summary-cell { min-width: 200px; max-width: 360px; white-space: normal; overflow-wrap: anywhere; }

/* Operation status colors are separate from difficulty and error colors. */
.class-status.closed,
.class-status.ended,
.class-status.archived,
.class-status.cancelled {
  background: var(--surface-muted);
  color: var(--muted);
}
.class-status.draft,
.class-status.scheduled {
  background: var(--warning-soft);
  color: var(--warning);
}

/* Color-only interaction states; the existing layout stays in place. */
:where(.studio-app, .login-page, dialog) :where(button, a, input, select, textarea, summary):focus-visible {
  outline: 2px solid var(--primary-strong);
  outline-offset: 3px;
}
.sidebar :where(button, a):focus-visible { outline-color: var(--sidebar-text); }
.searchbox:focus-within { border-color: var(--primary); box-shadow: var(--focus-ring); }
:where(input, textarea)::placeholder { color: var(--muted); opacity: 1; }
:where(input, select, textarea) { accent-color: var(--primary); }
.btn.primary:not(:disabled):hover,
.primary:not(:disabled):hover,
.side-card button:not(:disabled):hover { background: var(--primary-hover); }
.btn.secondary:not(:disabled):hover,
.secondary-btn:not(:disabled):hover,
.ghost-btn:not(:disabled):hover,
.icon-btn:not(:disabled):hover,
.icon-button:not(:disabled):hover { background: var(--primary-soft); border-color: var(--primary-border); }
.btn.ghost:not(:disabled):hover { background: var(--primary-soft-hover); }
.btn.danger:not(:disabled):hover { background: var(--red-soft); color: var(--red); border-color: var(--red); }
tr.selected:hover td { background: var(--primary-soft-hover); }
:is(.btn, .primary, .secondary-btn, .ghost-btn, .mini-button):disabled {
  background: var(--surface-muted);
  color: var(--muted);
  border-color: var(--line);
  box-shadow: none;
  opacity: 1;
  cursor: not-allowed;
}
:is(.studio-app, .login-page, dialog) :is(input, select, textarea):disabled,
:is(.studio-app, .login-page, dialog) :is(input, textarea)[readonly] { background: var(--surface-muted); color: var(--muted); }

/* Stage 3: teacher home, class operations and guided creation.
   Keep the sidebar and #coursesPage geometry under their existing rules. */
:is(#homePage, #builderPage) { min-width: 0; }
.teacher-page-head { align-items: center; margin-bottom: 24px; }
.teacher-page-head .page-actions { flex-wrap: nowrap; align-items: center; }
:is(#homePage, #builderPage) .btn.primary,
#managedParticipation .btn.primary { width: auto; min-height: 42px; margin: 0; justify-content: center; gap: 8px; }
.teacher-page-head p.teacher-kicker, .teacher-kicker { margin: 0 0 6px; color: var(--primary-strong); font-size: 12px; font-weight: 800; }
.teacher-page-head h1 { font-size: 28px; }
.teacher-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.teacher-summary-card { display: flex; flex-direction: column; gap: 9px; min-width: 0; padding: 19px 20px; text-align: left; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; color: var(--ink); }
.teacher-summary-card > span { font-size: 13px; font-weight: 750; }
.teacher-summary-card > strong { font-size: 30px; line-height: 1.2; font-weight: 850; }
.teacher-summary-card > small { color: var(--muted); font-size: 11px; line-height: 1.5; }
button.teacher-summary-card:hover { border-color: var(--primary); background: var(--primary-soft); }
.teacher-summary-card:nth-child(2) > strong { color: var(--primary-strong); }
.teacher-home-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(275px, 1fr); align-items: start; gap: 20px; margin-bottom: 32px; }
#homePage .panel { padding: 20px; box-shadow: none; }
#homePage .panel-head { align-items: center; justify-content: space-between; margin-bottom: 18px; }
#homePage .panel-head h2, .teacher-material-heading h2 { margin: 0; color: var(--ink); font-size: 18px; }
#homePage .panel-head button { font-size: 12px; padding: 8px 0 8px 8px; white-space: nowrap; }
.home-class-list { display: grid; gap: 12px; }
.teacher-class { display: flex; flex-direction: column; min-width: 0; padding: 22px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; }
.teacher-class.compact { padding: 17px; background: var(--surface); border-radius: 12px; }
.teacher-class-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.teacher-class-code { color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.teacher-class h3 { margin: 0 0 8px; color: var(--ink); font-size: 18px; line-height: 1.5; overflow-wrap: anywhere; }
.teacher-class.compact h3 { font-size: 16px; }
.teacher-class-period { margin: 0 0 14px; color: var(--muted); font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.teacher-class-metrics { display: flex; flex-wrap: wrap; gap: 8px 14px; color: var(--text-secondary); font-size: 12px; margin-bottom: 18px; }
.teacher-class-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.teacher-class-actions .btn { min-height: 40px; padding: 9px 13px; font-size: 12px; }
.teacher-class .class-status.preparing { color: var(--warning); background: var(--warning-soft); }
.teacher-class .class-status.cancelled { color: var(--red); background: var(--red-soft); }
.teacher-next-actions { display: grid; gap: 18px; }
.teacher-next-item + .teacher-next-item { padding-top: 18px; border-top: 1px solid var(--line); }
.teacher-next-item > strong { color: var(--ink); font-size: 14px; line-height: 1.7; }
.teacher-next-item > p { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 8px 0 12px; }
.teacher-next-item .btn { font-size: 12px; text-align: left; background: var(--primary-soft); border-color: transparent; color: var(--primary-strong); }
.teacher-help-note { background: var(--primary-soft); color: var(--text-secondary); border-radius: 12px; padding: 16px; font-size: 12px; line-height: 1.9; margin: 20px 0 0; }
.teacher-help-note strong { color: var(--ink); font-size: 13px; }
.teacher-help-note ol { padding-left: 20px; margin: 9px 0 0; }
.teacher-help-note li + li { margin-top: 6px; }
.teacher-material-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.teacher-material-heading p, .teacher-footnote { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 7px 0 0; }
#homePage .teacher-footnote { margin-top: 18px; }
#homePage .table-toolbar { flex-wrap: wrap; }
#homePage .table-panel, #homePage .table-scroll { min-width: 0; max-width: 100%; }
.class-load-notice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; margin: 0 0 18px; border: 1px solid var(--warning-line); background: var(--warning-soft); color: var(--warning); border-radius: 12px; font-size: 13px; line-height: 1.7; }
.class-load-notice .btn { font-size: 12px; }
.class-list-toolbar { display: flex; gap: 12px; margin-bottom: 18px; }
.class-list-search { flex: 1; }
.class-list-toolbar .input { width: 100%; min-height: 46px; }
.class-list-toolbar .select { min-height: 46px; }
.class-filter-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.class-filter-tabs button { display: inline-flex; align-items: center; gap: 7px; min-height: 40px; border: 1px solid var(--line); border-radius: 10px; padding: 8px 13px; background: var(--panel); color: var(--text-secondary); font-size: 13px; font-weight: 750; }
.class-filter-tabs button.active { color: var(--primary-strong); border-color: var(--primary); background: var(--primary-soft); }
.class-filter-tabs span { font-size: 11px; font-variant-numeric: tabular-nums; }
.teacher-list-summary { margin: 18px 0 14px; color: var(--muted); font-size: 12px; scroll-margin-top: 85px; }
.teacher-class-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.teacher-empty { grid-column: 1 / -1; text-align: center; padding: 44px 20px; border: 1px dashed var(--line); border-radius: 14px; background: var(--panel); }
.teacher-empty h3 { margin: 0 0 8px; font-size: 18px; color: var(--ink); }
.teacher-empty p { color: var(--muted); font-size: 13px; line-height: 1.8; margin: 0 0 20px; }
.teacher-pagination { display: flex; justify-content: center; align-items: center; flex-wrap: wrap; gap: 14px; margin: 20px 0; }
.teacher-pagination span { color: var(--muted); font-size: 12px; text-align: center; }
.class-create-panel { min-width: 0; }
.creation-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.creation-heading h2 { color: var(--ink); font-size: 23px; margin: 0; scroll-margin-top: 85px; }
.creation-draft-note { color: var(--muted); font-size: 12px; line-height: 1.8; margin: 10px 0 18px; }
.class-create-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; list-style: none; margin: 0 0 22px; padding: 0; }
.class-create-steps button { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 58px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--muted); font-size: 14px; font-weight: 750; }
.class-create-steps button > span { display: inline-grid; place-items: center; width: 26px; height: 26px; flex-shrink: 0; border-radius: 50%; background: var(--surface-muted); font-size: 12px; }
.class-create-steps [aria-current='step'] { color: var(--primary-strong); border-color: var(--primary); background: var(--primary-soft); }
.class-create-steps [aria-current='step'] > span { color: var(--on-primary); background: var(--primary); }
.creation-step-panel { min-width: 0; padding: 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--panel); }
.creation-section-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.creation-section-heading h3 { color: var(--ink); font-size: 18px; line-height: 1.6; margin: 0 0 5px; scroll-margin-top: 90px; }
.creation-section-heading p { color: var(--muted); font-size: 13px; margin: 0; line-height: 1.8; }
.creation-section-heading > span { color: var(--muted); font-size: 12px; white-space: nowrap; }
#classCreatePanel .filters { grid-template-columns: minmax(200px, 1.5fr) repeat(2, minmax(0, 1fr)); }
#classCreatePanel .filters .search-field { grid-row: span 2; align-self: start; }
#classCreatePanel .filters label { min-width: 0; }
#classCreatePanel .filters input, #classCreatePanel .filters select { min-width: 0; }
#classCreatePanel .table-wrap { border-radius: 12px; max-width: 100%; }
#classCreatePanel .table-wrap table { min-width: 810px; }
#classCreatePanel .empty-state { position: sticky; left: 0; width: 100%; }
.creation-selection { margin-top: 24px; padding: 18px; border: 1px solid var(--primary-border); border-radius: 12px; background: var(--primary-soft); }
.creation-selection > h3 { margin: 0 0 14px; color: var(--ink); font-size: 16px; }
.creation-selection .selected-list { max-height: 330px; overflow: auto; }
.creation-selection .selected-item { background: var(--panel); }
.creation-selection .selection-empty { background: var(--panel); margin-bottom: 0; }
.creation-step-actions { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding-top: 22px; margin-top: 22px; border-top: 1px solid var(--line); }
.creation-step-actions > span { color: var(--muted); font-size: 12px; line-height: 1.8; }
.creation-step-actions .btn { flex-shrink: 0; }
.creation-details-form { max-width: 700px; margin-top: 8px; }
.creation-details-form .field-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.creation-details-form .field { margin-bottom: 20px; }
.creation-details-form .field > span { font-size: 14px; }
.creation-details-form input { min-width: 0; max-width: 100%; }
.creation-details-form .inline-heading { margin: 22px 0 18px; }
#classCreatePanel .form-error:empty { display: none; }
#classCreatePanel .form-error:not(:empty) { padding: 12px 16px; border: 1px solid var(--red-line); border-radius: 10px; background: var(--red-soft); margin: 0 0 18px; }
.class-review-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0 0 24px; }
.class-review-summary > div { padding: 17px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.class-review-summary dt { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.class-review-summary dd { margin: 0; color: var(--ink); font-size: 15px; font-weight: 700; line-height: 1.7; overflow-wrap: anywhere; }
.class-review-courses { padding-left: 24px; color: var(--ink); font-size: 14px; line-height: 2; }
.class-onboarding { list-style: none; display: flex; flex-wrap: wrap; gap: 12px; padding: 0; margin: 24px 0; color: var(--muted); font-size: 13px; }
.class-onboarding li { padding: 10px 13px; border-radius: 8px; background: var(--surface-muted); }
.class-onboarding li.done { color: var(--green); background: var(--green-soft); }
.creation-result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 24px; }
.created-ticket-details { margin: 22px 0; padding: 18px; border: 1px solid var(--line); border-radius: 12px; }
.created-ticket-details > summary { cursor: pointer; font-size: 14px; color: var(--ink); font-weight: 750; }
.created-ticket-details[open] > summary { margin-bottom: 12px; }
#classCreatePanel .text-button { background: none; border: 0; padding: 10px 0; color: var(--primary-strong); font-weight: 750; font-size: 13px; }
#classManagerDialog > .dialog-heading { position: sticky; top: 0; z-index: 3; background: var(--panel); padding: 18px 22px; }
#classManagerDialog .dialog-heading > div { min-width: 0; }
#classManagerDialog h2 { overflow-wrap: anywhere; }
#closeClassManager { flex-shrink: 0; }
#classManagerDialog #classManagerMeta { overflow-wrap: anywhere; }
.class-manager-links { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 22px 0; }
.class-manager-links button { padding: 9px 13px; border: 1px solid var(--line); border-radius: 9px; background: var(--panel); color: var(--primary-strong); font-size: 12px; font-weight: 750; }
#classManagerLoadState { margin: 18px 22px; }
#classManagerDialog .manager-section { scroll-margin-top: 110px; min-width: 0; }
#classManagerDialog .manager-form input, #classManagerDialog .manager-form select { min-width: 0; max-width: 100%; }
#classManagerDialog .manager-section-heading { flex-wrap: wrap; }
#managedParticipation .creation-result-actions { margin: 16px 0 0; }
#participationStatus { color: var(--primary-strong); font-size: 13px; line-height: 1.8; }
#participationGuideText { white-space: pre-line; overflow-wrap: anywhere; background: var(--surface); padding: 18px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font-size: 13px; line-height: 1.9; }
#classManagerDialog .form-error .btn { margin-top: 8px; }
:is(#homePage, #builderPage, #classManagerDialog) [hidden] { display: none !important; }
@media (max-width: 1150px) {
  .teacher-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-home-grid { grid-template-columns: minmax(0, 1fr); }
  .teacher-next-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teacher-next-item + .teacher-next-item { padding-top: 0; border-top: 0; }
}
@media (max-width: 650px) {
  .teacher-page-head { flex-direction: column; align-items: stretch; }
  .teacher-page-head .page-actions { margin-left: 0; justify-content: flex-start; }
  .teacher-page-head h1 { font-size: 25px; }
  .teacher-summary { gap: 10px; }
  .teacher-summary-card { padding: 16px 13px; }
  .teacher-summary-card > span { font-size: 12px; }
  .teacher-summary-card > strong { font-size: 27px; }
  .teacher-home-grid, .teacher-class-grid, .teacher-next-actions { grid-template-columns: minmax(0, 1fr); }
  .teacher-next-item + .teacher-next-item { padding-top: 18px; border-top: 1px solid var(--line); }
  #homePage .panel { padding: 16px; }
  .teacher-material-heading, .creation-heading, .creation-section-heading { align-items: flex-start; flex-direction: column; }
  .teacher-material-heading h2 { font-size: 17px; }
  .class-list-toolbar { flex-direction: column; }
  .class-list-toolbar select { width: 100%; }
  .class-filter-tabs { gap: 7px; }
  .class-filter-tabs button { padding: 8px 11px; font-size: 12px; }
  .creation-step-panel { padding: 17px; }
  .class-create-steps { gap: 7px; }
  .class-create-steps button { flex-direction: column; gap: 7px; padding: 12px 4px; font-size: 12px; }
  #classCreatePanel .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #classCreatePanel .filters .search-field { grid-row: auto; grid-column: 1 / -1; }
  .creation-details-form .field-pair, .class-review-summary { grid-template-columns: minmax(0, 1fr); }
  .creation-step-actions { flex-wrap: wrap; }
  .creation-step-actions > span { width: 100%; }
  .creation-step-actions > .btn.primary { flex: 1; }
  .creation-selection { padding: 12px; }
  .creation-selection .selected-item { flex-wrap: wrap; }
  .creation-selection .selected-copy { flex-basis: calc(100% - 50px); }
  .creation-selection .reorder-actions { margin-left: auto; }
  .creation-result-actions { align-items: stretch; flex-direction: column; }
  .created-ticket-details { padding: 13px; }
  #classManagerDialog > .dialog-heading { padding: 16px; }
  #classManagerDialog .class-manager-body { padding: 16px; }
  #classManagerDialog .manager-section { padding: 14px; }
  .class-manager-links { padding: 12px 16px 0; }
}
/* The shared login panel centers itself; dashboard panels start at the top. */
#homePage .teacher-home-grid > .panel { align-self: start; max-width: none; width: 100%; margin: 0; }
#managedParticipation .manager-actions { flex-wrap: wrap; }
@media (prefers-reduced-motion: reduce) {
  :is(#homePage, #builderPage) .btn { transition: none; }
}

#classManagerDialog .manager-help { font-size: 13px; line-height: 1.8; }
#classCreatePanel :is(h2, h3)[tabindex='-1']:focus,
#classManagerDialog .manager-section[tabindex='-1']:focus { outline: none; }
