:root {
  --ink: #070509;
  --muted: #79716d;
  --line: #e8dfd9;
  --paper: #fffaf4;
  --panel: #f0ebe5;
  --pink: #f3aebb;
  --pink-soft: #f8c9d2;
  --mint: #ccefe2;
  --mint-dark: #287f72;
  --gold: #f8d8a3;
  --blue: #dcecf9;
  --violet: #c8c2f4;
  --cream: #fff4e5;
  --danger: #be2f4d;
  --shadow: 0 24px 70px rgba(44, 34, 24, 0.1);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 1180px;
  color: var(--ink);
  background: linear-gradient(90deg, #f4eee8 0, #fffaf4 38%, #f3fff8 100%);
  font-family: ui-sans-serif, -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  min-height: 100vh;
}

.rail {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: rgba(244, 236, 229, 0.78);
  border-right: 1px solid rgba(229, 219, 211, 0.8);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
}

.brand-cube {
  width: 48px;
  height: 48px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.54);
  font-weight: 900;
}

.nav-btn {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px rgba(55, 44, 34, 0.08);
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
}

.nav-btn.active {
  background: var(--ink);
  color: white;
}

.nav-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.workspace {
  padding: 40px 48px 56px;
}

.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 52px;
}

h1 {
  margin: 0;
  font-size: 72px;
  line-height: 0.95;
  font-weight: 950;
  white-space: nowrap;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-top: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.account-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 6px 8px 6px 14px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 10px 26px rgba(55, 44, 34, 0.08);
}

.account-badge strong,
.account-badge span {
  white-space: nowrap;
}

.account-badge span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.button-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.pill-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: 24px;
  font-weight: 850;
  white-space: nowrap;
}

.pill-btn {
  background: var(--ink);
  color: white;
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.ghost-btn.compact {
  min-height: 32px;
  padding: 0 12px;
  border-radius: 16px;
  font-size: 12px;
}

.danger-btn {
  background: #f8c4cf;
  color: var(--danger);
}

.icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
}

.auth-card {
  width: min(520px, 100%);
  border-radius: 28px;
  padding: 34px;
  background: rgba(255, 250, 244, 0.94);
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-size: 42px;
  line-height: 1.04;
  margin: 8px 0 10px;
}

.auth-card p {
  margin: 0 0 24px;
  color: var(--muted);
  font-weight: 760;
  line-height: 1.7;
}

.auth-kicker {
  color: var(--mint-dark);
  font-weight: 950;
  letter-spacing: 0;
}

.auth-form {
  display: grid;
  gap: 14px;
}

.auth-form label {
  display: grid;
  gap: 6px;
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  font-weight: 850;
}

.auth-form input {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.86);
  min-height: 46px;
  padding: 10px 16px;
  font-weight: 800;
}

.auth-error {
  margin-bottom: 14px;
  border-radius: 16px;
  padding: 12px 14px;
  background: #fde2e7;
  color: var(--danger);
  font-weight: 850;
}

.auth-loading {
  color: var(--muted);
  font-weight: 850;
}

.layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
  align-items: start;
}

.side-panel {
  border-radius: 28px;
  background: rgba(235, 230, 224, 0.82);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.side-head {
  padding: 22px 20px 14px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.side-title-row,
.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.side-title {
  font-size: 21px;
  font-weight: 900;
}

.count {
  color: var(--muted);
  font-weight: 800;
}

.segmented {
  display: flex;
  padding: 6px;
  gap: 6px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.62);
  margin-top: 16px;
}

.segmented button {
  flex: 1;
  min-height: 38px;
  border-radius: 18px;
  font-weight: 850;
  color: var(--ink);
  background: transparent;
}

.segmented button.active {
  background: var(--ink);
  color: white;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 14px;
}

.search-box {
  width: 100%;
  height: 42px;
  border: 0;
  outline: 0;
  border-radius: 20px;
  padding: 0 16px;
  background: rgba(255, 255, 255, 0.78);
}

.search-editable {
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
  cursor: text;
  -webkit-user-modify: read-write-plaintext-only;
}

.search-editable:empty::before {
  content: attr(data-placeholder);
  color: rgba(30, 25, 25, 0.42);
}

.search-action-btn {
  min-height: 42px;
  border: 0;
  border-radius: 18px;
  padding: 0 12px;
  background: var(--ink);
  color: #fff;
  font-weight: 900;
}

.search-action-btn.clear {
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
}

.class-filter {
  width: 100%;
  height: 42px;
  border: 0;
  outline: 0;
  border-radius: 20px;
  padding: 0 14px;
  margin-top: 14px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 850;
}

.student-filter-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.22fr);
  gap: 10px;
  margin-top: 14px;
}

.student-filter-grid label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

.student-filter-grid span {
  padding-left: 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.student-filter-grid .class-filter {
  margin-top: 0;
  min-width: 0;
}

.list {
  max-height: calc(100vh - 276px);
  overflow: auto;
  padding: 0 12px 16px;
}

.student-card,
.class-card,
.exam-card {
  width: 100%;
  text-align: left;
  border-radius: 22px;
  padding: 16px;
  margin-bottom: 10px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.66);
  box-shadow: 0 12px 28px rgba(45, 36, 28, 0.06);
}

.student-card.active,
.class-card.active,
.exam-card.active {
  background: var(--ink);
  color: white;
}

.exam-card.gold:not(.active) {
  background: #ffdea8;
}

.exam-card.pink:not(.active) {
  background: #f1aebb;
}

.student-card.tone-rose:not(.active),
.class-card.tone-rose:not(.active),
.course-row.tone-rose {
  background: #f5bdca;
  border-color: #e89aab;
}

.student-card.tone-amber:not(.active),
.class-card.tone-amber:not(.active),
.course-row.tone-amber {
  background: #ffdda4;
  border-color: #eec06e;
}

.student-card.tone-lilac:not(.active),
.class-card.tone-lilac:not(.active),
.course-row.tone-lilac {
  background: #cbc4f3;
  border-color: #aca3df;
}

.student-card.tone-mint:not(.active),
.class-card.tone-mint:not(.active),
.course-row.tone-mint {
  background: #bfead8;
  border-color: #8fd0ba;
}

.student-card.tone-sky:not(.active),
.class-card.tone-sky:not(.active),
.course-row.tone-sky {
  background: #c8e4f6;
  border-color: #8fc6e8;
}

.student-card.tone-coral:not(.active),
.class-card.tone-coral:not(.active),
.course-row.tone-coral {
  background: #ffc7b8;
  border-color: #f0a08d;
}

.student-card.tone-lime:not(.active),
.class-card.tone-lime:not(.active),
.course-row.tone-lime {
  background: #d9edaa;
  border-color: #b7d66f;
}

.student-card.tone-orchid:not(.active),
.class-card.tone-orchid:not(.active),
.course-row.tone-orchid {
  background: #efc0e5;
  border-color: #d896c9;
}

.student-card.tone-teal:not(.active),
.class-card.tone-teal:not(.active),
.course-row.tone-teal {
  background: #b8e8e5;
  border-color: #80cdc9;
}

.student-main,
.class-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(255, 255, 255, 0.78);
  color: var(--ink);
  font-weight: 900;
}

.student-name,
.class-name,
.exam-name {
  font-size: 18px;
  font-weight: 950;
}

.subline {
  color: currentColor;
  opacity: 0.65;
  font-size: 13px;
  font-weight: 650;
  margin-top: 5px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.tag {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  font-weight: 800;
  font-size: 13px;
}

.detail {
  min-width: 0;
}

.detail-kicker {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
}

.detail-name {
  margin: 0 0 28px;
  font-size: 26px;
  line-height: 1.15;
  font-weight: 950;
}

.section {
  border-radius: 28px;
  padding: 22px;
  margin-bottom: 18px;
  overflow: hidden;
}

.section.pink {
  background: var(--pink);
}

.section.gold {
  background: var(--gold);
}

.section.violet {
  background: var(--violet);
}

.section.mint {
  background: var(--mint);
}

.section.blue {
  background: var(--blue);
}

.section.student-tone.tone-rose,
.section.course-tone.tone-rose {
  background: #f5bdca;
}

.section.student-tone.tone-amber,
.section.course-tone.tone-amber {
  background: #ffdda4;
}

.section.student-tone.tone-lilac,
.section.course-tone.tone-lilac {
  background: #cbc4f3;
}

.section.student-tone.tone-mint,
.section.course-tone.tone-mint {
  background: #bfead8;
}

.section.student-tone.tone-sky,
.section.course-tone.tone-sky {
  background: #c8e4f6;
}

.section.student-tone.tone-coral,
.section.course-tone.tone-coral {
  background: #ffc7b8;
}

.section.student-tone.tone-lime,
.section.course-tone.tone-lime {
  background: #d9edaa;
}

.section.student-tone.tone-orchid,
.section.course-tone.tone-orchid {
  background: #efc0e5;
}

.section.student-tone.tone-teal,
.section.course-tone.tone-teal {
  background: #b8e8e5;
}

.section h2,
.section h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 950;
}

.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.field {
  min-width: 0;
}

.field.wide {
  grid-column: span 2;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  display: block;
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  font-weight: 850;
  margin: 0 0 6px 4px;
}

.field input,
.field select,
.field textarea {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  min-height: 42px;
  padding: 10px 14px;
  font-weight: 780;
}

.field textarea {
  min-height: 92px;
  resize: vertical;
}

.field input:disabled {
  color: rgba(30, 25, 25, 0.58);
  background: rgba(255, 255, 255, 0.44);
}

.field-hint {
  display: block;
  margin: 6px 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(360px, 0.9fr);
  gap: 24px;
  align-items: start;
}

.account-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-create-form .pill-btn {
  align-self: end;
}

.check-field {
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 16px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(30, 25, 25, 0.72);
  font-weight: 850;
}

.check-field input {
  width: 18px;
  height: 18px;
}

.account-list {
  overflow: hidden;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.68);
}

.account-table-wrap {
  width: 100%;
  overflow-x: auto;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}

.account-table th,
.account-table td {
  padding: 14px 12px;
  border-bottom: 1px solid rgba(105, 86, 88, 0.14);
  text-align: left;
  vertical-align: middle;
  color: rgba(30, 25, 25, 0.74);
  font-size: 13px;
  font-weight: 850;
}

.account-table th {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.account-table tr:last-child td {
  border-bottom: 0;
}

.account-table strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
}

.account-table small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 780;
}

.account-current,
.muted-action {
  display: inline-block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.account-current {
  border-radius: 999px;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.7);
}

.class-term-preview {
  margin-top: 18px;
  border-top: 1px dashed rgba(105, 86, 88, 0.32);
  padding-top: 16px;
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 18px;
  align-items: start;
}

.class-term-preview strong,
.class-term-preview span {
  display: block;
}

.class-term-preview span {
  margin-top: 6px;
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  font-weight: 850;
  line-height: 1.5;
}

.curriculum-board {
  margin-top: 18px;
  border-top: 1px dashed rgba(105, 86, 88, 0.32);
  padding-top: 16px;
}

.curriculum-board h3 {
  margin: 0;
  font-size: 20px;
}

.curriculum-table {
  display: grid;
  gap: 10px;
}

.curriculum-row {
  display: grid;
  grid-template-columns: 86px minmax(120px, 0.7fr) 88px minmax(0, 1.6fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.curriculum-row strong {
  font-size: 15px;
}

.curriculum-row p {
  margin: 0;
  line-height: 1.55;
  color: rgba(25, 20, 18, 0.72);
  font-weight: 650;
}

.lesson-no {
  color: var(--mint-dark);
  font-weight: 950;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.stat {
  border-radius: 22px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.6);
}

.stat b {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 8px;
}

.stat strong {
  font-size: 30px;
  line-height: 1;
  color: var(--mint-dark);
}

.timeline,
.feedback-list {
  display: grid;
  gap: 10px;
}

.record {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.66);
}

.record-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  font-weight: 900;
}

.record-body {
  color: rgba(25, 20, 18, 0.7);
  font-size: 14px;
  line-height: 1.6;
  margin-top: 8px;
}

.communication-list,
.task-list,
.tracking-list,
.template-grid {
  display: grid;
  gap: 12px;
}

.communication-card,
.task-card,
.template-card,
.risk-card {
  width: 100%;
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.communication-grid,
.task-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.opening-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.opening-status-card {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.52);
}

.opening-status-card.done {
  background: rgba(255, 255, 255, 0.74);
}

.opening-status-card b,
.opening-status-card strong {
  display: block;
}

.opening-status-card b {
  color: rgba(30, 25, 25, 0.58);
  font-size: 13px;
  margin-bottom: 8px;
}

.opening-status-card strong {
  font-size: 20px;
  line-height: 1.1;
}

.opening-snapshot {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(240px, 0.8fr);
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.opening-snapshot > div {
  border-radius: 20px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.58);
}

.opening-snapshot span,
.opening-source-row b,
.opening-source-row span {
  display: block;
}

.opening-snapshot span {
  color: rgba(30, 25, 25, 0.58);
  font-size: 13px;
  font-weight: 850;
  margin-bottom: 8px;
}

.opening-snapshot strong {
  display: block;
  font-size: 18px;
  line-height: 1.55;
}

.opening-tags {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
}

.risk-tag {
  background: rgba(255, 255, 255, 0.78);
}

.opening-profile-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.opening-source-row {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: center;
  margin-top: 14px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(30, 25, 25, 0.68);
  font-size: 13px;
  font-weight: 780;
}

.opening-source-row > div:last-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.task-card.done {
  opacity: 0.58;
}

.task-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.task-head strong,
.task-head span {
  display: block;
}

.task-head span {
  margin-top: 4px;
  color: rgba(30, 25, 25, 0.58);
  font-size: 13px;
  font-weight: 800;
}

.compact-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.mini-stat {
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.58);
}

.mini-stat b,
.mini-stat strong {
  display: block;
}

.mini-stat b {
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  margin-bottom: 7px;
}

.mini-stat strong {
  color: var(--mint-dark);
  font-size: 28px;
  line-height: 1;
}

.tracking-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto auto;
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.tracking-row strong,
.tracking-row span {
  display: block;
}

.tracking-row > div > span {
  margin-top: 4px;
  color: rgba(30, 25, 25, 0.58);
  font-size: 13px;
  font-weight: 800;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.admin-dashboard {
  display: grid;
  gap: 18px;
}

.admin-stat-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  align-items: start;
}

.admin-metric-row {
  display: grid;
  grid-template-columns: 78px minmax(120px, 1fr) 74px 64px;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  font-weight: 900;
}

.admin-metric-row span {
  min-width: 0;
}

.admin-metric-row strong,
.admin-metric-row em {
  font-style: normal;
  text-align: right;
  color: rgba(30, 25, 25, 0.72);
}

.admin-teacher-grid,
.admin-status-list {
  display: grid;
  gap: 10px;
}

.teacher-summary-row,
.admin-status-list > div {
  border-radius: 16px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.62);
}

.teacher-summary-row strong,
.teacher-summary-row span,
.admin-status-list b,
.admin-status-list span {
  display: block;
}

.teacher-summary-row span,
.admin-status-list span {
  margin-top: 4px;
  color: rgba(30, 25, 25, 0.66);
  font-size: 13px;
  font-weight: 800;
}

.risk-card {
  border: 1px solid rgba(255, 255, 255, 0.58);
}

.template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.template-card {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 12px;
}

.template-card .field.full {
  grid-column: 1 / -1;
}

.template-card textarea {
  min-height: 120px;
}

.class-feedback-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.class-feedback-card {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.class-feedback-card textarea {
  width: 100%;
  min-height: 112px;
  margin-top: 12px;
  border: 0;
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  font-weight: 760;
}

.full-layout {
  display: grid;
  gap: 18px;
}

.class-list {
  border-radius: 28px;
  background: rgba(235, 230, 224, 0.78);
  padding: 18px;
  box-shadow: var(--shadow);
}

.course-row {
  display: grid;
  grid-template-columns: 190px 1fr 350px;
  align-items: center;
  gap: 20px;
  min-height: 132px;
  padding: 18px;
  border-radius: 8px;
  border: 1px solid #cde3dc;
  background: rgba(255, 255, 255, 0.78);
}

.course-row + .course-row {
  margin-top: 10px;
}

.course-group-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.course-group-btn {
  min-height: 132px;
  border-radius: 8px;
  padding: 16px;
  text-align: left;
  color: var(--ink);
  border: 1px solid rgba(30, 25, 25, 0.08);
  box-shadow: 0 12px 28px rgba(45, 36, 28, 0.06);
}

.course-group-btn.active {
  color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--ink), 0 12px 28px rgba(45, 36, 28, 0.06);
}

.season-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.season-chip {
  border: 1px solid rgba(30, 25, 25, 0.1);
  background: rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  padding: 10px 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: var(--ink);
  box-shadow: 0 8px 20px rgba(45, 36, 28, 0.05);
}

.season-chip span {
  color: var(--muted);
  font-size: 14px;
}

.season-chip.active {
  background: #070509;
  color: #fff;
}

.season-chip.active span {
  color: rgba(255, 255, 255, 0.72);
}

.course-group-btn.tone-rose {
  background: #f5bdca;
  border-color: #e89aab;
}

.course-group-btn.tone-amber {
  background: #ffdda4;
  border-color: #eec06e;
}

.course-group-btn.tone-lilac {
  background: #cbc4f3;
  border-color: #aca3df;
}

.course-group-btn.tone-mint {
  background: #bfead8;
  border-color: #8fd0ba;
}

.course-group-btn.tone-sky {
  background: #c8e4f6;
  border-color: #8fc6e8;
}

.course-group-btn.tone-coral {
  background: #ffc7b8;
  border-color: #f0a08d;
}

.course-group-btn.tone-lime {
  background: #d9edaa;
  border-color: #b7d66f;
}

.course-group-btn.tone-orchid {
  background: #efc0e5;
  border-color: #d896c9;
}

.course-group-btn.tone-teal {
  background: #b8e8e5;
  border-color: #80cdc9;
}

.course-group-label {
  font-size: 32px;
  font-weight: 950;
  line-height: 1;
}

.course-schedule-board {
  margin-top: 18px;
  border-top: 1px dashed rgba(105, 86, 88, 0.32);
  padding-top: 16px;
}

.course-schedule-table {
  display: grid;
  gap: 10px;
}

.course-schedule-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.9fr) minmax(110px, 0.7fr) minmax(110px, 0.7fr) minmax(130px, 0.8fr) minmax(170px, 1fr) minmax(110px, 0.7fr);
  gap: 12px;
  align-items: end;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.62);
}

.course-schedule-row.tone-rose {
  background: #f8ccd5;
}

.course-schedule-row.tone-amber {
  background: #ffe5b8;
}

.course-schedule-row.tone-lilac {
  background: #d8d2f7;
}

.course-schedule-row.tone-mint {
  background: #cef0e0;
}

.course-schedule-row.tone-sky {
  background: #d7ecf8;
}

.course-schedule-row.tone-coral {
  background: #ffd2c5;
}

.course-schedule-row.tone-lime {
  background: #e3f1bf;
}

.course-schedule-row.tone-orchid {
  background: #f4d0ec;
}

.course-schedule-row.tone-teal {
  background: #c9efec;
}

.course-schedule-row > div:first-child {
  align-self: center;
}

.course-schedule-row strong,
.course-schedule-row span {
  display: block;
}

.course-schedule-row strong {
  font-size: 18px;
  font-weight: 950;
}

.course-schedule-row span {
  margin-top: 5px;
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  font-weight: 800;
}

.outline-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.course-count {
  font-size: 34px;
  color: var(--mint-dark);
  font-weight: 950;
}

.mini-progress {
  display: flex;
  gap: 6px;
  margin-top: 14px;
}

.mini-progress span {
  width: 32px;
  height: 5px;
  border-radius: 9px;
  background: rgba(40, 127, 114, 0.16);
}

.mini-progress span.done {
  background: var(--mint-dark);
}

.bubble-group {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.name-bubble {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--mint);
  color: #17655c;
  font-weight: 950;
}

.name-bubble.tone-rose {
  background: #f5bdca;
  color: #7c2540;
}

.name-bubble.tone-amber {
  background: #ffdda4;
  color: #7a4d0d;
}

.name-bubble.tone-lilac {
  background: #cbc4f3;
  color: #403889;
}

.name-bubble.tone-mint {
  background: #bfead8;
  color: #17655c;
}

.name-bubble.tone-sky {
  background: #c8e4f6;
  color: #1f5d88;
}

.name-bubble.tone-coral {
  background: #ffc7b8;
  color: #843721;
}

.name-bubble.tone-lime {
  background: #d9edaa;
  color: #4e6b12;
}

.name-bubble.tone-orchid {
  background: #efc0e5;
  color: #743269;
}

.name-bubble.tone-teal {
  background: #b8e8e5;
  color: #146764;
}

.attendance-toolbar {
  border-radius: 28px;
  background: rgba(235, 230, 224, 0.82);
  padding: 18px;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 18px;
  box-shadow: var(--shadow);
}

.attendance-season-field {
  width: 220px;
}

.attendance-season-field label {
  margin-left: 4px;
}

.season-note {
  color: var(--muted);
  font-size: 15px;
  font-weight: 850;
}

.inclass-toolbar {
  margin-bottom: 18px;
  align-items: flex-end;
}

.lesson-select-field {
  width: min(520px, 100%);
}

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

.term-calendar-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.term-card {
  border-radius: 8px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.64);
}

.term-card.gold {
  background: rgba(255, 219, 168, 0.78);
}

.term-card.mint {
  background: rgba(206, 240, 224, 0.78);
}

.term-card.pink {
  background: rgba(244, 173, 188, 0.62);
}

.term-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-weight: 950;
}

.term-card-head span,
.term-range {
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  font-weight: 850;
}

.term-range {
  margin: 8px 0 12px;
}

.term-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(54px, 1fr));
  gap: 8px;
}

.term-days.compact {
  grid-template-columns: repeat(auto-fit, minmax(58px, 1fr));
}

.term-day {
  min-height: 48px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.term-day.gold {
  background: #ffe1a6;
}

.term-day.mint {
  background: #dff3ec;
}

.term-day.pink {
  background: #f3b8cd;
}

.term-day small {
  color: rgba(30, 25, 25, 0.58);
  font-size: 11px;
  font-weight: 850;
}

.weekly-schedule {
  border-radius: 28px;
  background: rgba(235, 230, 224, 0.82);
  padding: 18px;
  box-shadow: var(--shadow);
}

.week-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 16px;
}

.week-head strong {
  min-width: 280px;
  text-align: center;
  font-size: 22px;
  font-weight: 950;
}

.attendance-grid {
  display: grid;
  grid-template-columns: 112px repeat(7, minmax(118px, 1fr));
  min-height: 0;
  overflow-x: auto;
  gap: 1px;
  background: rgba(168, 156, 148, 0.24);
  border: 1px solid rgba(168, 156, 148, 0.24);
  border-radius: 16px;
}

.schedule-corner,
.day-head,
.time-col,
.schedule-cell {
  background: rgba(255, 250, 244, 0.78);
}

.schedule-corner,
.day-head {
  min-height: 58px;
  padding: 10px 12px;
  display: grid;
  align-content: center;
}

.schedule-corner {
  color: var(--muted);
  font-weight: 850;
}

.day-head span {
  color: var(--muted);
  font-weight: 850;
  font-size: 13px;
}

.day-head strong {
  font-size: 24px;
  font-weight: 950;
  line-height: 1.05;
}

.time-col {
  min-width: 112px;
  padding: 10px 12px;
  color: var(--muted);
  font-weight: 850;
}

.schedule-slot {
  display: grid;
  align-content: center;
  gap: 4px;
  min-height: 86px;
}

.schedule-slot strong {
  color: var(--ink);
  font-size: 17px;
  font-weight: 950;
}

.schedule-slot span {
  font-size: 12px;
  line-height: 1.25;
}

.schedule-cell {
  min-height: 86px;
  min-width: 118px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.calendar-course {
  width: 100%;
  border-radius: 8px;
  border-left: 4px solid rgba(30, 25, 25, 0.2);
  padding: 8px 9px;
  font-weight: 900;
  text-align: left;
  line-height: 1.18;
  box-shadow: 0 8px 18px rgba(45, 36, 28, 0.06);
}

.calendar-course-main {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.calendar-course strong {
  display: block;
  font-size: 13px;
  white-space: normal;
}

.calendar-course span {
  display: block;
  margin-top: 3px;
  color: rgba(30, 25, 25, 0.62);
  font-size: 11px;
  font-weight: 850;
}

.calendar-course .calendar-location {
  color: rgba(30, 25, 25, 0.72);
  font-size: 10px;
}

.preclass-reminder-btn {
  width: 100%;
  min-height: 30px;
  margin-top: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink);
  font-size: 12px;
  font-weight: 950;
}

.reminder-stamp {
  margin-top: 6px;
  font-size: 10px !important;
}

.reminder-monitor {
  background: rgba(255, 255, 255, 0.66);
}

.reminder-log {
  display: grid;
  gap: 8px;
}

.reminder-log-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(220px, 2fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(255, 250, 244, 0.82);
  font-weight: 850;
}

.reminder-log-row span {
  color: var(--muted);
  font-size: 13px;
}

.reminder-log-row em {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.preclass-event-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.preclass-event-card {
  border-radius: 10px;
  padding: 14px;
  border-left: 5px solid rgba(30, 25, 25, 0.18);
  box-shadow: 0 12px 28px rgba(45, 36, 28, 0.07);
}

.preclass-event-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: flex-start;
  margin-bottom: 12px;
}

.preclass-event-head strong,
.preclass-event-head span {
  display: block;
}

.preclass-event-head strong {
  font-size: 18px;
  font-weight: 950;
}

.preclass-event-head span {
  color: rgba(30, 25, 25, 0.66);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.35;
  margin-top: 3px;
}

.preclass-event-head em {
  min-width: 44px;
  min-height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.64);
  color: rgba(30, 25, 25, 0.7);
  font-style: normal;
  font-size: 13px;
  font-weight: 950;
}

.preclass-task-grid {
  display: grid;
  gap: 8px;
}

.preclass-task {
  min-height: 58px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.48);
  display: flex;
  gap: 10px;
  align-items: center;
}

.preclass-task.done {
  background: rgba(245, 255, 238, 0.72);
}

.preclass-task input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  accent-color: var(--ink);
}

.preclass-task strong,
.preclass-task span {
  display: block;
}

.preclass-task strong {
  font-size: 13px;
  font-weight: 950;
}

.preclass-task span {
  color: rgba(30, 25, 25, 0.62);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.35;
  margin-top: 2px;
}

.preclass-notice-button {
  margin-left: auto;
  white-space: nowrap;
}

.calendar-course.tone-rose {
  background: #f5bdca;
  border-color: #e89aab;
}

.calendar-course.tone-amber {
  background: #ffdda4;
  border-color: #eec06e;
}

.calendar-course.tone-lilac {
  background: #cbc4f3;
  border-color: #aca3df;
}

.calendar-course.tone-mint {
  background: #bfead8;
  border-color: #8fd0ba;
}

.calendar-course.tone-sky {
  background: #c8e4f6;
  border-color: #8fc6e8;
}

.calendar-course.tone-coral {
  background: #ffc7b8;
  border-color: #f0a08d;
}

.calendar-course.tone-lime {
  background: #d9edaa;
  border-color: #b7d66f;
}

.calendar-course.tone-orchid {
  background: #efc0e5;
  border-color: #d896c9;
}

.calendar-course.tone-teal {
  background: #b8e8e5;
  border-color: #80cdc9;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(35, 30, 26, 0.36);
  display: grid;
  place-items: center;
  padding: 34px;
  z-index: 20;
}

.modal {
  width: min(1300px, calc(100vw - 80px));
  max-height: calc(100vh - 80px);
  overflow: auto;
  background: #fff;
  border: 3px solid var(--ink);
  padding: 28px;
  box-shadow: 0 30px 110px rgba(0, 0, 0, 0.24);
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.attendance-states {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.state-btn {
  min-height: 44px;
  padding: 0 22px;
  border-radius: 20px;
  background: #eef9e2;
  font-weight: 900;
}

.state-btn.active {
  background: var(--ink);
  color: white;
}

.lesson-workbench {
  box-shadow: var(--shadow);
}

.inclass-lesson-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  border-bottom: 1px solid rgba(168, 156, 148, 0.3);
  padding-bottom: 18px;
  margin-bottom: 18px;
}

.inclass-lesson-head h2 {
  margin-top: 6px;
  font-size: 34px;
}

.inclass-lesson-head > strong {
  margin-top: 8px;
  white-space: nowrap;
  font-size: 18px;
}

.inclass-states {
  justify-content: flex-start;
}

.student-check-grid {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 2px 2px 14px;
  scroll-snap-type: x proximity;
}

.check-card {
  flex: 0 0 300px;
  scroll-snap-align: start;
  border-radius: 18px;
  background: #c8eccb;
  padding: 14px;
}

.check-card.leave {
  background: #f8c4cf;
}

.check-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.student-card-title {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.compact-btn {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.check-card select,
.check-card textarea {
  width: 100%;
  border: 0;
  border-radius: 14px;
  padding: 9px 12px;
  margin-top: 8px;
  background: rgba(255, 255, 255, 0.72);
  outline: 0;
}

.feedback-row {
  display: block;
  margin-top: 8px;
}

.rollcall-summary {
  min-height: 34px;
  margin-top: 8px;
  border-radius: 14px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 900;
}

.feedback-row span {
  display: block;
  margin: 0 0 4px 4px;
  color: rgba(30, 25, 25, 0.62);
  font-size: 12px;
  font-weight: 900;
}

.score-button-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.score-btn {
  min-height: 34px;
  border: 0;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.62);
  color: rgba(17, 13, 20, 0.68);
  font: inherit;
  font-size: 14px;
  font-weight: 950;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.score-btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.86);
}

.score-btn.active {
  background: var(--ink);
  color: white;
}

.parent-feedback-panel {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.parent-feedback-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(260px, 1fr));
  gap: 12px;
}

.parent-feedback-item {
  border-radius: 18px;
  background: rgba(244, 238, 232, 0.74);
  padding: 12px;
}

.parent-feedback-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.parent-feedback-head strong {
  font-size: 17px;
  font-weight: 950;
}

.parent-feedback-item textarea {
  width: 100%;
  min-height: 96px;
  border: 0;
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.55;
  font-weight: 760;
}

.rollcall-panel {
  margin-top: 18px;
  border-top: 1px solid rgba(168, 156, 148, 0.3);
  padding-top: 18px;
}

.rollcall-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.rollcall-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.58);
  color: rgba(30, 25, 25, 0.66);
  font: inherit;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.16s ease, background 0.16s ease, color 0.16s ease;
}

.rollcall-chip:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.86);
}

.rollcall-chip.called {
  background: #eef9e2;
  color: var(--mint-dark);
}

.rollcall-chip.full {
  cursor: not-allowed;
  opacity: 0.56;
}

.rollcall-chip.full:hover {
  transform: none;
}

.rollcall-list {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.rollcall-item {
  flex: 0 0 260px;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.rollcall-item strong {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.rollcall-item strong span {
  border-radius: 999px;
  padding: 4px 8px;
  background: rgba(7, 138, 115, 0.1);
  color: var(--mint-dark);
  font-size: 12px;
  white-space: nowrap;
}

.after-class-panel {
  margin-top: 18px;
  border-top: 1px solid rgba(168, 156, 148, 0.3);
  padding-top: 18px;
}

.after-class-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.after-class-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
  font-weight: 900;
}

.after-class-item.done {
  background: #eef9e2;
  color: var(--mint-dark);
}

.after-class-item > input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.after-class-item > input:not([type]) {
  grid-column: 1 / -1;
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.78);
  outline: 0;
  font-weight: 760;
}

.transfer-panel,
.group-feedback-panel {
  margin-top: 18px;
  border-top: 1px solid rgba(168, 156, 148, 0.3);
  padding-top: 18px;
}

.transfer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.transfer-item {
  display: grid;
  grid-template-columns: 90px 1fr 120px;
  gap: 10px;
  align-items: center;
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.62);
}

.transfer-item span {
  color: rgba(30, 25, 25, 0.64);
  font-size: 13px;
  font-weight: 850;
}

.transfer-item select {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 9px 10px;
  background: rgba(255, 255, 255, 0.78);
  outline: 0;
}

.group-feedback-panel textarea {
  width: 100%;
  min-height: 172px;
  border: 0;
  border-radius: 16px;
  padding: 14px;
  resize: vertical;
  outline: 0;
  background: rgba(255, 255, 255, 0.72);
  line-height: 1.65;
  font-weight: 760;
}

.exam-main {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 44px;
}

.charts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: 82px 1fr 42px;
  align-items: center;
  gap: 12px;
  margin: 13px 0;
  font-weight: 800;
}

.bar-track {
  height: 12px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.65);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--mint-dark);
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  background: rgba(255, 255, 255, 0.62);
  border-radius: 18px;
  overflow: hidden;
}

.score-table-wrap {
  overflow-x: auto;
  border-radius: 18px;
}

.score-table th,
.score-table td {
  padding: 12px;
  border-bottom: 1px solid rgba(168, 156, 148, 0.24);
  text-align: left;
  font-weight: 780;
  white-space: nowrap;
}

.score-table th {
  color: var(--muted);
  font-size: 13px;
}

.score-table th small {
  display: block;
  margin-top: 4px;
  color: rgba(121, 113, 109, 0.78);
  font-size: 11px;
  font-weight: 750;
}

.score-input {
  width: 68px;
  border: 0;
  border-radius: 12px;
  padding: 8px 10px;
  outline: 0;
}

.score-total {
  display: inline-flex;
  min-width: 46px;
  color: var(--mint-dark);
  font-weight: 950;
}

.feedback-preview {
  min-width: 280px;
  max-width: 360px;
  white-space: normal !important;
  line-height: 1.55;
}

.exam-insights {
  margin-top: 18px;
}

.mini-rank-list {
  display: grid;
  gap: 8px;
}

.mini-rank-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  border: 0;
  border-radius: 14px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--ink);
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
}

.mini-rank-item.warning {
  background: rgba(255, 255, 255, 0.5);
}

.mini-rank-item strong {
  color: var(--mint-dark);
  font-size: 20px;
}

.weak-question-panel,
.report-showcase {
  margin-top: 18px;
}

.weak-question-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.weak-question-card {
  border-radius: 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.55);
}

.weak-question-card p {
  margin: 8px 0 0;
  color: rgba(30, 25, 25, 0.66);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.55;
}

.report-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.report-preview-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.report-preview-card {
  flex: 0 0 190px;
  margin: 0;
  border: 0;
  border-radius: 16px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.6);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  text-align: center;
}

.report-preview-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  object-position: top;
  border-radius: 12px;
  display: block;
}

.report-preview-card span {
  display: block;
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 950;
}

.report-preview-card:hover {
  background: rgba(255, 255, 255, 0.82);
  transform: translateY(-1px);
}

.report-modal {
  width: min(980px, calc(100vw - 72px));
  max-height: calc(100vh - 64px);
  overflow: hidden;
  border: 4px solid var(--ink);
  background: var(--paper);
  padding: 24px;
}

.report-modal .modal-head {
  border-bottom: 1px solid var(--line);
  padding-bottom: 14px;
}

.report-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 14px 0;
}

.report-modal-stage {
  max-height: calc(100vh - 220px);
  overflow: auto;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  padding: 10px;
}

.report-modal-stage img {
  width: min(100%, 760px);
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 10px;
}

.question-setup {
  margin-top: 18px;
  border-top: 1px dashed rgba(105, 86, 88, 0.32);
  padding-top: 16px;
}

.question-setup-title {
  margin-bottom: 10px;
  font-weight: 950;
}

.question-setup-grid {
  display: grid;
  gap: 8px;
}

.question-row {
  display: grid;
  grid-template-columns: 74px 92px minmax(120px, 1fr) 110px;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.48);
}

.question-row.question-head {
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  font-weight: 900;
  background: transparent;
  padding-bottom: 0;
}

.question-row input,
.question-row select {
  width: 100%;
  border: 0;
  outline: 0;
  border-radius: 12px;
  min-height: 38px;
  padding: 8px 10px;
  background: rgba(255, 255, 255, 0.78);
  font-weight: 820;
}

.empty {
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.68);
  padding: 28px;
  color: var(--muted);
  font-weight: 800;
}

.compact-empty {
  padding: 16px;
  border-radius: 16px;
  font-size: 13px;
}

.mira-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 22px;
  border-radius: 30px;
  padding: 28px;
  background: linear-gradient(135deg, rgba(204, 239, 226, 0.92), rgba(220, 236, 249, 0.78));
  box-shadow: var(--shadow);
}

.mira-badge {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--mint-dark);
  font-size: 13px;
  font-weight: 950;
  margin-bottom: 16px;
}

.mira-hero h2 {
  margin: 0;
  max-width: 760px;
  font-size: 34px;
  line-height: 1.12;
  font-weight: 950;
}

.mira-hero p {
  max-width: 760px;
  margin: 16px 0 0;
  color: rgba(30, 25, 25, 0.68);
  font-size: 18px;
  line-height: 1.65;
  font-weight: 760;
}

.mira-local-steps {
  border-radius: 22px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.68);
  display: grid;
  gap: 10px;
  align-content: start;
}

.mira-local-steps strong,
.mira-local-steps span {
  display: block;
}

.mira-local-steps strong {
  font-size: 18px;
  font-weight: 950;
}

.mira-local-steps span {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(204, 239, 226, 0.54);
  color: rgba(30, 25, 25, 0.72);
  font-size: 14px;
  font-weight: 900;
}

.mira-layout {
  display: grid;
  grid-template-columns: 440px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.mira-left,
.mira-right {
  min-width: 0;
}

.mira-panel {
  box-shadow: var(--shadow);
}

.mira-scenario-grid {
  display: grid;
  gap: 10px;
}

.mira-scenario {
  width: 100%;
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
  border: 1px solid transparent;
}

.mira-scenario.active {
  background: var(--ink);
  color: white;
}

.mira-scenario strong,
.mira-scenario span {
  display: block;
}

.mira-scenario strong {
  font-size: 17px;
  font-weight: 950;
}

.mira-scenario span {
  margin-top: 6px;
  color: inherit;
  opacity: 0.72;
  font-size: 13px;
  line-height: 1.45;
  font-weight: 760;
}

.mira-filter-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 18px;
}

.mira-context-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.mira-context-list {
  display: grid;
  gap: 10px;
}

.mira-context-list > div {
  border-radius: 16px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.58);
}

.mira-context-list strong,
.mira-context-list span {
  display: block;
}

.mira-context-list strong {
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 950;
}

.mira-context-list span {
  color: rgba(30, 25, 25, 0.68);
  line-height: 1.5;
  font-size: 13px;
  font-weight: 760;
}

.mira-report,
.mira-report-empty {
  min-height: 520px;
  box-shadow: var(--shadow);
}

.mira-empty-inner {
  min-height: 430px;
  display: grid;
  align-content: center;
  justify-items: center;
  text-align: center;
}

.mira-empty-inner h2 {
  font-size: 28px;
  margin-bottom: 12px;
}

.mira-empty-inner p {
  max-width: 560px;
  margin: 0;
  color: rgba(30, 25, 25, 0.68);
  line-height: 1.65;
  font-weight: 760;
}

.mira-code {
  margin-top: 22px;
  display: grid;
  gap: 8px;
}

.mira-code span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.mira-code code {
  border-radius: 14px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.66);
  font-weight: 850;
}

.mira-summary {
  border-radius: 18px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.62);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 780;
  margin-bottom: 18px;
}

.mira-card-section {
  margin-top: 20px;
}

.mira-card-section h3,
.mira-evidence h3 {
  margin-bottom: 12px;
}

.mira-student-grid,
.mira-action-list,
.mira-message-list {
  display: grid;
  gap: 12px;
}

.mira-student-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mira-student-card,
.mira-action-card,
.mira-message-card {
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
}

.mira-student-card p,
.mira-action-card p {
  margin: 10px 0;
  color: rgba(30, 25, 25, 0.7);
  line-height: 1.6;
  font-size: 14px;
  font-weight: 760;
}

.mira-suggestion {
  border-radius: 14px;
  padding: 10px 12px;
  background: rgba(204, 239, 226, 0.58);
  color: var(--mint-dark);
  line-height: 1.55;
  font-size: 14px;
  font-weight: 900;
}

.mira-student-card textarea,
.mira-action-card textarea,
.mira-message-card textarea {
  width: 100%;
  min-height: 92px;
  margin-top: 10px;
  border: 0;
  border-radius: 14px;
  padding: 12px;
  resize: vertical;
  outline: 0;
  background: rgba(255, 255, 255, 0.78);
  line-height: 1.6;
  font-weight: 760;
}

.mira-action-card.done {
  opacity: 0.62;
}

.mira-history-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
}

.mira-history-card {
  flex: 0 0 260px;
  text-align: left;
  border-radius: 18px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.62);
  color: var(--ink);
}

.mira-history-card strong,
.mira-history-card span {
  display: block;
}

.mira-history-card span {
  margin-top: 8px;
  color: rgba(30, 25, 25, 0.62);
  font-size: 13px;
  font-weight: 850;
}

@media (max-width: 900px) {
  body {
    min-width: 0;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .rail {
    position: static;
    height: auto;
    flex-direction: row;
    padding: 12px;
    overflow-x: auto;
  }

  .workspace {
    padding: 24px 18px 40px;
  }

  h1 {
    font-size: 46px;
  }

  .topbar,
  .layout,
  .exam-main {
    grid-template-columns: 1fr;
    display: grid;
  }

  .top-actions,
  .mira-hero,
  .mira-layout,
  .class-term-preview,
  .student-filter-grid,
  .curriculum-row,
  .field-grid,
  .stat-grid,
  .admin-stat-grid,
  .admin-grid,
  .charts,
  .term-calendar-grid,
  .course-group-grid,
  .course-schedule-row,
  .course-row,
  .communication-grid,
  .task-grid,
  .opening-status-grid,
  .opening-snapshot,
  .opening-profile-grid,
  .opening-source-row,
  .compact-metric-grid,
  .risk-grid,
  .admin-teacher-grid,
  .template-grid,
  .template-card,
  .tracking-row,
  .class-feedback-grid,
  .after-class-grid,
  .transfer-list,
  .transfer-item,
  .mira-filter-grid,
  .mira-context-grid,
  .mira-student-grid,
  .account-layout,
  .account-create-form {
    grid-template-columns: 1fr;
  }

  .admin-metric-row {
    grid-template-columns: 70px minmax(88px, 1fr) 64px;
  }

  .admin-metric-row em {
    grid-column: 2 / -1;
    text-align: left;
  }

  .field.wide {
    grid-column: auto;
  }

  .student-check-grid {
    grid-template-columns: 1fr;
  }

  .parent-feedback-list {
    grid-template-columns: 1fr;
  }

  .inclass-toolbar,
  .inclass-lesson-head {
    align-items: stretch;
    display: grid;
    grid-template-columns: 1fr;
  }
}
