:root {
  color-scheme: light;
  --bg: #f6f7f9;
  --panel: #ffffff;
  --line: #dfe5ee;
  --text: #1f2937;
  --muted: #6b7280;
  --blue: #2454a6;
  --blue-dark: #1f3f7d;
  --green: #1f7a4d;
  --red: #b91c1c;
  --soft-blue: #eaf1ff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Microsoft YaHei",
    "PingFang SC",
    system-ui,
    sans-serif;
}

.shell {
  display: none;
  width: min(1180px, calc(100% - 32px));
  margin: 24px auto 48px;
}

.is-logged-in .shell {
  display: block;
}

.login-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px 24px;
  background:
    radial-gradient(circle at 18% 12%, rgb(36 84 166 / 0.12), transparent 30%),
    radial-gradient(circle at 88% 18%, rgb(31 122 77 / 0.1), transparent 28%),
    linear-gradient(135deg, #f7fbff 0%, #f9fbf8 52%, #fffdf8 100%);
}

.is-logged-in .login-screen {
  display: none;
}

.login-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
  gap: 18px;
  width: min(1040px, 100%);
  border: 1px solid rgb(219 228 239 / 0.86);
  border-radius: 22px;
  padding: 18px;
  background: rgb(255 255 255 / 0.82);
  box-shadow: 0 28px 70px rgb(15 23 42 / 0.12);
  backdrop-filter: blur(18px);
}

.login-brand-panel,
.login-form-panel {
  border: 1px solid rgb(219 228 239 / 0.8);
  border-radius: 18px;
  background: rgb(255 255 255 / 0.78);
}

.login-brand-panel {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: 34px;
  overflow: hidden;
}

.login-logo-wrap {
  display: flex;
  align-items: center;
  width: min(360px, 100%);
  min-height: 128px;
  margin-bottom: 28px;
}

.login-logo-wrap img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.login-eyebrow {
  width: fit-content;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.login-card h1 {
  max-width: 520px;
  margin: 16px 0 0;
  color: #0f172a;
  font-size: 34px;
  line-height: 1.16;
  letter-spacing: 0;
}

.login-card p {
  max-width: 520px;
  line-height: 1.7;
  color: #475569;
}

.login-brand-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 30px;
}

.login-brand-tags span {
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 7px 11px;
  background: #f8fafc;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.login-form-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 34px;
}

.login-form-panel h2 {
  margin: 16px 0 0;
  color: #0f172a;
  font-size: 26px;
  letter-spacing: 0;
}

.login-account-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.login-account-grid button {
  display: grid;
  gap: 5px;
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  padding: 12px;
  background: #f8fafc;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.login-account-grid button:hover {
  border-color: var(--blue);
  background: #eff6ff;
  box-shadow: 0 12px 28px rgb(37 99 235 / 0.12);
}

.login-account-grid button.selected {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgb(37 99 235 / 0.14);
}

.login-account-grid strong {
  color: var(--blue);
  font-size: 14px;
}

.login-account-grid span {
  color: var(--muted);
  font-size: 13px;
}

.login-password {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.login-password input {
  border: 1px solid #dbe4ef;
  border-radius: 12px;
  padding: 13px 14px;
  background: #f8fafc;
  font: inherit;
}

.login-password input:focus {
  outline: none;
  border-color: #60a5fa;
  background: #fff;
  box-shadow: 0 0 0 4px rgb(96 165 250 / 0.16);
}

.login-password input.input-error {
  border-color: #ef4444;
  background: #fff1f2;
}

.login-form {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.login-form .primary {
  width: 100%;
  justify-content: center;
  min-height: 46px;
  border-radius: 12px;
}

.login-result {
  min-height: 20px;
  color: #dc2626;
  font-size: 13px;
  font-weight: 800;
}

.login-slogan {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 13px 16px;
  background: #f8fbff;
  color: #475569;
}

.login-slogan strong,
.login-slogan span {
  display: inline-flex;
  align-items: center;
  line-height: 1.4;
}

.login-slogan strong {
  color: var(--blue);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.25;
}

h2 {
  font-size: 18px;
}

p {
  color: var(--muted);
  margin-top: 6px;
}

.badge {
  background: var(--soft-blue);
  color: var(--blue);
  border: 1px solid #c8d8ff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.steps {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0;
}

.role-bar {
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) minmax(260px, auto);
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.role-bar label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.role-bar select {
  width: auto;
  min-width: 180px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.role-hint {
  color: var(--muted);
  font-size: 13px;
}

.account-panel {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.account-badge {
  display: grid;
  gap: 2px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 8px 10px;
  background: #f8fbff;
}

.account-badge strong {
  color: var(--blue);
  font-size: 14px;
}

.account-badge span {
  color: #64748b;
  font-size: 12px;
}

.account-manager {
  margin-bottom: 18px;
}

.account-table {
  display: grid;
  gap: 8px;
}

.account-row {
  display: grid;
  grid-template-columns: 1fr 1fr 0.85fr 0.75fr 1.15fr 1.35fr 0.7fr;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.account-row.disabled-account {
  background: #f8fafc;
  opacity: 0.72;
}

.account-row-head {
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.account-row strong {
  color: var(--blue);
}

.account-row span {
  color: #334155;
  font-size: 13px;
  font-weight: 700;
}

.account-row label {
  margin: 0;
}

.account-row input[type="text"],
.account-row input[type="password"],
.account-row input:not([type]) {
  width: 100%;
  min-width: 0;
  border: 1px solid #dbe4ef;
  border-radius: 6px;
  padding: 7px 8px;
  font: inherit;
}

.account-row small {
  color: var(--muted);
  line-height: 1.5;
}

.account-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 10px;
}

.account-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: end;
  margin-top: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.account-add-form label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.account-role-picker span {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-weight: 700;
}

.account-role-picker input {
  width: auto;
}

.account-role-picker.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-role-picker.compact span {
  font-size: 12px;
}

.account-status-toggle {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.account-status-toggle input {
  width: auto;
}

.account-rule-note {
  display: flex;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fffbeb;
}

.account-rule-note strong {
  color: #92400e;
}

.account-rule-note span {
  color: #78350f;
  font-size: 13px;
}

.account-safety-note {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.account-safety-note strong {
  color: #1d4ed8;
}

.account-safety-note span {
  color: #1e3a8a;
}

.role-hidden {
  display: none !important;
}

.management-hidden {
  display: none !important;
}

.management-tabs {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin: 10px 0 16px;
  padding: 10px;
  background: #fff;
}

.management-tabs button {
  min-height: 44px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-weight: 900;
}

.management-tabs button.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.management-tabs button:hover,
.management-tabs button:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.management-tabs button.active:hover,
.management-tabs button.active:focus-visible {
  background: var(--blue-dark);
  color: #fff;
}

.designer-panel {
  margin-bottom: 18px;
}

.system-health-panel {
  margin-bottom: 18px;
}

.backup-center {
  margin-bottom: 18px;
  border-color: #fed7aa;
}

.panel-actions,
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.backup-summary,
.backup-list {
  display: grid;
  gap: 8px;
}

.backup-label-input {
  min-width: 260px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
}

.backup-current-card,
.backup-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.backup-current-card {
  margin-bottom: 10px;
  background: #fff7ed;
}

.backup-current-card span,
.backup-current-card small,
.backup-row small {
  display: block;
  color: var(--muted);
}

.backup-current-card strong {
  display: block;
  margin: 4px 0;
  color: #9a3412;
}

.backup-row {
  display: grid;
  grid-template-columns: minmax(230px, 1fr) 150px minmax(260px, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.backup-head {
  background: #fff7ed;
  color: #9a3412;
  font-weight: 700;
}

.backup-restore-box {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  margin-top: 12px;
}

.backup-restore-box small {
  color: var(--muted);
  line-height: 1.55;
}

.friendly-result {
  display: grid;
  gap: 8px;
  border-radius: 8px;
  padding: 12px 14px;
  line-height: 1.65;
}

.friendly-result strong {
  font-size: 15px;
}

.friendly-result ul {
  margin: 0;
  padding-left: 18px;
}

.friendly-result.ok {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.friendly-result.bad {
  border: 1px solid #fecaca;
  background: #fffafa;
  color: #991b1b;
}

button.danger {
  border-color: #fecaca;
  background: #fffafa;
  color: var(--red);
}

button.danger:hover {
  border-color: var(--red);
  background: #fee2e2;
}

.publish-supervision-panel {
  margin-bottom: 18px;
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
}

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

.supervision-toolbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 12px;
}

.supervision-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.supervision-filters button {
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.supervision-filters button.active,
.supervision-filters button:hover,
.supervision-filters button:focus-visible {
  border-color: #2563eb;
  background: #2563eb;
  color: #fff;
}

.supervision-toolbar label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #64748b;
  font-size: 13px;
  font-weight: 900;
}

.supervision-toolbar select {
  min-width: 140px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  font: inherit;
  font-weight: 800;
}

.supervision-actions {
  display: flex;
  gap: 7px;
  align-items: center;
}

.supervision-table {
  display: grid;
  gap: 12px;
}

.supervision-row {
  display: grid;
  grid-template-columns: 120px minmax(240px, 1fr) 140px 150px 190px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.supervision-head {
  background: #eff6ff;
  color: var(--blue);
  font-weight: 700;
}

.supervision-row strong,
.supervision-row small {
  display: block;
}

.supervision-row small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

.supervision-row mark {
  display: inline-block;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.supervision-row mark.ok {
  background: #dcfce7;
  color: #166534;
}

.supervision-row mark.warn {
  background: #fef3c7;
  color: #92400e;
}

.supervision-row mark.bad {
  background: #fee2e2;
  color: #991b1b;
}

.supervision-teacher-group {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.supervision-teacher-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.supervision-teacher-head strong {
  margin-right: auto;
  color: #0f172a;
  font-size: 16px;
}

.supervision-teacher-head span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eef2ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.supervision-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(310px, 1fr));
  gap: 10px;
}

.supervision-class-card {
  position: relative;
  display: grid;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 18px 12px 12px;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  overflow: hidden;
}

.supervision-class-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: #94a3b8;
}

.supervision-class-card.ok {
  border-color: #bbf7d0;
  box-shadow: inset 0 0 0 1px #dcfce7;
}

.supervision-class-card.ok::before {
  background: linear-gradient(90deg, #22c55e, #86efac);
}

.supervision-class-card.warn {
  border-color: #fde68a;
  box-shadow: inset 0 0 0 1px #fef3c7;
}

.supervision-class-card.warn::before {
  background: linear-gradient(90deg, #f59e0b, #fde047);
}

.supervision-class-card.bad {
  border-color: #fecaca;
  box-shadow: inset 0 0 0 1px #fee2e2;
}

.supervision-class-card.bad::before {
  background: linear-gradient(90deg, #ef4444, #fb7185);
}

.supervision-class-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.supervision-class-top strong,
.supervision-class-top span {
  display: block;
}

.supervision-class-top strong {
  color: #0f172a;
  font-size: 15px;
}

.supervision-class-top span,
.supervision-time span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.supervision-class-top mark {
  align-self: flex-start;
  white-space: nowrap;
  border-radius: 999px;
  padding: 8px 13px;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 20px rgb(15 23 42 / 0.08);
}

.supervision-class-top mark.ok {
  background: #16a34a;
  color: #fff;
}

.supervision-class-top mark.warn {
  background: #f59e0b;
  color: #fff;
}

.supervision-class-top mark.bad {
  background: #dc2626;
  color: #fff;
}

.supervision-time {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
  padding-top: 9px;
}

.supervision-time strong {
  color: #334155;
  font-size: 13px;
}

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

.supervision-progress-grid div {
  display: grid;
  gap: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  background: rgb(255 255 255 / 0.78);
}

.supervision-progress-grid b {
  color: var(--blue);
  font-size: 19px;
  line-height: 1;
}

.supervision-progress-grid small {
  color: #64748b;
  font-size: 11px;
}

.care-score {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 10px;
  background: #f8fafc;
}

.care-score span,
.care-score em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.care-score strong {
  display: block;
  color: #0f172a;
  font-size: 26px;
  line-height: 1;
}

.care-score.excellent {
  border-color: #facc15;
  background: #fffbeb;
}

.care-score.ok {
  border-color: #86efac;
  background: #f0fdf4;
}

.care-score.warn {
  border-color: #93c5fd;
  background: #eff6ff;
}

.care-score.bad {
  border-color: #fecaca;
  background: #fff1f2;
}

.care-meter {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.care-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa, #22c55e, #facc15);
}

.care-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.care-metrics span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #f1f5f9;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.care-metrics b {
  margin-right: 4px;
  color: #0f172a;
}

.teacher-ready-panel {
  margin-bottom: 18px;
  border-color: #bfdbfe;
  background: #f8fbff;
}

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

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

.health-card {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.health-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.health-card strong {
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
}

.health-card small {
  color: var(--muted);
  line-height: 1.5;
}

.health-card.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.health-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.health-card.bad {
  border-color: #fecaca;
  background: #fffafa;
}

.teacher-ready-card {
  display: grid;
  gap: 6px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.teacher-ready-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.teacher-ready-card strong {
  color: var(--blue);
  font-size: 24px;
  line-height: 1;
}

.teacher-ready-card small {
  color: var(--muted);
  line-height: 1.5;
}

.teacher-ready-card.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.teacher-ready-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.teacher-ready-card.next-action {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.teacher-next-wide {
  grid-column: 1 / -1;
}

.teacher-ready-card button {
  width: fit-content;
}

.teacher-class-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: 100%;
  min-height: 188px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.teacher-class-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 8px 22px rgb(37 99 235 / 0.1);
}

.teacher-class-card.selected {
  border-color: #2563eb;
  background: linear-gradient(180deg, #eff6ff 0%, #ffffff 78%);
  box-shadow: 0 0 0 2px rgb(37 99 235 / 0.18), 0 14px 30px rgb(37 99 235 / 0.16);
}

.teacher-class-card.selected::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: #2563eb;
}

.teacher-class-selected-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 8px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.teacher-class-card:disabled {
  cursor: not-allowed;
  opacity: 0.72;
}

.teacher-class-card.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.teacher-class-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.teacher-class-head {
  display: grid;
  gap: 4px;
}

.teacher-report-stage,
.roster-report-type mark,
.report-type-choice mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1;
  font-weight: 900;
  white-space: nowrap;
}

.teacher-report-stage.low,
.roster-report-type mark.low,
.report-type-choice mark.low {
  background: #e0f2fe;
  color: #075985;
  border: 1px solid #7dd3fc;
}

.teacher-report-stage.high,
.roster-report-type mark.high,
.report-type-choice mark.high {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fbbf24;
}

.teacher-class-head strong {
  color: #0f172a;
  font-size: 16px;
}

.teacher-class-head span,
.teacher-class-meta span,
.teacher-class-action span {
  color: #64748b;
  font-size: 12px;
}

.teacher-class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.teacher-class-meta span {
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  color: #1d4ed8;
  font-weight: 800;
}

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

.teacher-class-stats div {
  display: grid;
  gap: 3px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px;
  background: rgb(255 255 255 / 0.72);
}

.teacher-class-stats b {
  color: var(--blue);
  font-size: 20px;
  line-height: 1;
}

.teacher-class-stats small {
  color: #64748b;
  font-size: 11px;
}

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

.teacher-class-statuses span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
}

.teacher-class-statuses b {
  color: #334155;
}

.teacher-class-statuses span.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #15803d;
}

.teacher-class-statuses span.todo {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.teacher-class-draft {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border-top: 1px solid #e2e8f0;
  padding-top: 9px;
}

.teacher-class-draft span {
  border-radius: 999px;
  padding: 5px 8px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #dbe4ef;
  font-size: 11px;
  font-weight: 900;
}

.teacher-class-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-top: 1px solid #e2e8f0;
  padding-top: 10px;
}

.teacher-class-action span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fafc;
  color: #334155;
  border: 1px solid #dbe4ef;
  font-weight: 900;
}

.teacher-class-card.warn .teacher-class-action span,
.teacher-class-card.warn .teacher-class-draft span {
  background: #fff;
  color: #78350f;
  border-color: #fcd34d;
}

.teacher-class-card.ok .teacher-class-action span,
.teacher-class-card.ok .teacher-class-draft span {
  background: #fff;
  color: #14532d;
  border-color: #86efac;
}

.teacher-class-card:disabled .teacher-class-action span,
.teacher-class-card:disabled .teacher-class-draft span {
  background: #f8fafc;
  color: #475569;
  border-color: #cbd5e1;
  opacity: 1;
}

.teacher-class-action em {
  border-radius: 999px;
  padding: 6px 10px;
  background: #1d4ed8;
  color: #fff;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.teacher-class-card:disabled .teacher-class-action em {
  background: #94a3b8;
}

.designer-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
  gap: 16px;
}

.designer-controls {
  display: grid;
  gap: 12px;
}

.designer-controls label {
  max-width: 280px;
}

.module-config-list {
  display: grid;
  gap: 10px;
}

.module-config-row {
  display: grid;
  grid-template-columns: 28px 1fr 150px;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.module-config-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

.module-config-row strong {
  display: block;
  font-size: 14px;
}

.module-config-row small {
  color: var(--muted);
}

.module-config-row select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.designer-preview {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.designer-preview h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.knowledge-editor-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 14px;
}

.knowledge-editor-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #fff;
}

.knowledge-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.knowledge-editor-head span,
.knowledge-editor-head small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.knowledge-editor-head strong {
  display: block;
  margin: 2px 0;
  font-size: 16px;
}

.knowledge-editor-head mark {
  border-radius: 999px;
  padding: 7px 12px;
  background: #dcfce7;
  color: #166534;
  font-weight: 900;
}

.knowledge-editor-head mark.draft {
  background: #fef3c7;
  color: #92400e;
}

.delete-knowledge-map {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff7f7;
}

.knowledge-card-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.knowledge-card-summary div {
  display: grid;
  gap: 2px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.knowledge-card-summary b {
  color: #0f172a;
  font-size: 20px;
}

.knowledge-card-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.knowledge-config-area {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  border-top: 1px dashed #cbd5e1;
  padding-top: 14px;
}

.knowledge-config-area.hidden {
  display: none;
}

.knowledge-modal {
  place-items: stretch center;
  padding: 22px;
}

.knowledge-modal-card {
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
}

.knowledge-modal-body {
  display: grid;
  gap: 14px;
}

.knowledge-summary-field {
  display: grid;
  gap: 6px;
}

.knowledge-level-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.6fr);
  gap: 10px;
}

.knowledge-level-fields label {
  display: grid;
  gap: 6px;
}

.knowledge-level-fields input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  background: #f8fafc;
}

.knowledge-class-linker {
  display: grid;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.knowledge-class-linker-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.knowledge-class-linker-head span {
  color: var(--muted);
  font-size: 12px;
}

.knowledge-class-options {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 8px;
  max-height: 260px;
  overflow: auto;
  padding-right: 4px;
}

.knowledge-class-options label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px;
  background: #fff;
}

.knowledge-class-options label.checked {
  border-color: #60a5fa;
  background: #eff6ff;
}

.knowledge-class-options b,
.knowledge-class-options small {
  display: block;
}

.knowledge-class-options b {
  color: #0f172a;
  font-size: 13px;
}

.knowledge-class-options small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

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

.knowledge-category-editor {
  display: grid;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.knowledge-category-top {
  display: grid;
  grid-template-columns: 1fr 1fr 72px;
  gap: 8px;
}

.knowledge-editor-grid label,
.knowledge-category-editor label {
  display: grid;
  gap: 6px;
}

.knowledge-editor-grid span,
.knowledge-summary-field span,
.knowledge-category-editor span {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.knowledge-editor-grid textarea,
.knowledge-summary-field textarea,
.knowledge-category-editor input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  font: inherit;
  line-height: 1.55;
  background: #f8fafc;
}

.knowledge-editor-grid textarea,
.knowledge-summary-field textarea {
  min-height: 110px;
  resize: vertical;
}

.delivery-template-config {
  display: grid;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.delivery-template-config strong,
.delivery-template-config span {
  display: block;
}

.delivery-template-config span,
.delivery-template-config p {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.delivery-template-config textarea {
  width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.delivery-template-config p {
  margin: 0;
}

.knowledge-editor-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-editor-preview span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}

.knowledge-editor-preview em {
  color: #4338ca;
  font-style: normal;
  font-weight: 900;
}

.comment-model-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 16px;
}

.comment-model-layout h3 {
  margin: 0 0 10px;
  color: #0f172a;
}

.comment-template-editor,
.comment-phrase-editor {
  display: grid;
  gap: 12px;
}

.comment-template-card,
.comment-phrase-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.comment-template-card.compact {
  gap: 8px;
  padding: 10px;
}

.comment-template-head {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(120px, 0.45fr) minmax(150px, 0.72fr) auto;
  gap: 10px;
  align-items: end;
}

.comment-template-name-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: end;
}

.template-color-badge {
  display: grid;
  place-items: center;
  min-height: 38px;
  border-radius: 8px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 900;
}

.template-color-badge.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.template-color-badge.yellow {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.template-color-badge.pink {
  border-color: #fbcfe8;
  background: #fdf2f8;
  color: #be185d;
}

.template-color-badge.orange {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.template-color-badge.purple {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.template-color-badge b {
  font-size: 18px;
  line-height: 1;
}

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

.comment-template-card label,
.comment-phrase-card label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.comment-template-card input,
.comment-template-card textarea,
.comment-phrase-card input,
.comment-phrase-card textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  line-height: 1.55;
}

.comment-template-card.compact textarea {
  min-height: 70px;
  max-height: 112px;
}

.comment-template-card input.readonly-field {
  border-color: #d1d5db;
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.comment-template-card textarea,
.comment-phrase-card textarea {
  resize: vertical;
}

.certificate-config-panel {
  display: grid;
  gap: 16px;
}

.certificate-config-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
  gap: 14px;
  align-items: start;
}

.certificate-config-card,
.certificate-template-card,
.certificate-preview-block {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fbfdff;
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.04);
}

.certificate-config-card {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.certificate-config-card label,
.certificate-template-card label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 900;
}

.certificate-config-card input:not([type="checkbox"]),
.certificate-template-card input {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  line-height: 1.45;
}

.certificate-config-card input:focus,
.certificate-template-card input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgb(96 165 250 / 0.16);
}

.switch-line {
  display: flex !important;
  grid-template-columns: none !important;
  gap: 9px !important;
  align-items: center;
  min-height: 38px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 11px;
  background: #eff6ff;
  color: #1d4ed8 !important;
}

.switch-line input {
  width: 18px;
  height: 18px;
  accent-color: #2563eb;
}

.muted-note {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.65;
}

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

.certificate-template-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
}

.certificate-template-card > div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.certificate-template-card strong {
  color: #0f172a;
  font-size: 15px;
}

.certificate-template-card span {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-preview-block {
  display: grid;
  gap: 10px;
  padding: 14px;
}

.certificate-preview-block h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.certificate-match-preview {
  display: grid;
  gap: 8px;
}

.certificate-match-chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  max-width: 100%;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  padding: 7px 10px;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  font-weight: 800;
}

.certificate-match-chip b {
  border-radius: 999px;
  padding: 2px 6px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  white-space: nowrap;
}

.certificate-match-chip.ge {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.certificate-match-chip.ge b {
  background: #dcfce7;
  color: #15803d;
}

.certificate-match-chip.ncc {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #9a3412;
}

.certificate-match-chip.ncc b {
  background: #ffedd5;
  color: #c2410c;
}

.certificate-match-chip.kindergarten {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1e40af;
}

.certificate-class-table {
  display: grid;
  gap: 7px;
}

.certificate-bulk-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-start;
}

.certificate-bulk-actions button {
  min-height: 32px;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.certificate-class-row {
  display: grid;
  grid-template-columns: 106px minmax(180px, 1.2fr) 104px 132px 120px 132px;
  gap: 8px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 8px;
  background: #fff;
}

.certificate-class-row.head {
  border-color: transparent;
  background: #eff6ff;
  color: #1e40af;
  font-size: 12px;
  font-weight: 900;
}

.certificate-class-enable {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  color: #1f2937;
  font-size: 12px;
  font-weight: 900;
}

.certificate-class-enable input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.certificate-class-name {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.certificate-class-name strong,
.certificate-class-name small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.certificate-class-name strong {
  color: #0f172a;
  font-size: 13px;
}

.certificate-class-name small {
  color: #64748b;
  font-size: 12px;
}

.certificate-class-row select,
.certificate-class-row input[type="text"],
.certificate-class-row input:not([type]) {
  width: 100%;
  min-height: 34px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 7px 8px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  font-size: 12px;
}

.certificate-class-row select:focus,
.certificate-class-row input:focus {
  outline: none;
  border-color: #60a5fa;
  box-shadow: 0 0 0 3px rgb(96 165 250 / 0.14);
}

.exam-analysis-model-editor {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
}

.exam-analysis-card {
  display: grid;
  gap: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #fbfdff;
}

.exam-analysis-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 0.6fr) auto;
  gap: 10px;
  align-items: end;
}

.exam-analysis-title {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.exam-analysis-title span {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 8px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.exam-analysis-title strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-analysis-field-grid {
  display: grid;
  grid-template-columns: 0.8fr 1fr;
  gap: 8px;
}

.exam-analysis-card label {
  display: grid;
  gap: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.exam-analysis-card input,
.exam-analysis-card textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  line-height: 1.55;
}

.exam-analysis-card textarea {
  min-height: 72px;
  resize: vertical;
}

.exam-analysis-card .readonly-field {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}

.comment-stage-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 20px;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.comment-stage-badge.low {
  background: #e0f2fe;
  color: #0369a1;
}

.comment-stage-badge.high {
  background: #ede9fe;
  color: #6d28d9;
}

.comment-stage-badge.common {
  background: #dcfce7;
  color: #047857;
}

.comment-phrase-row-head,
.comment-phrase-row {
  display: grid;
  grid-template-columns: 96px 80px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.comment-phrase-row-head {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.comment-phrase-row-list {
  display: grid;
  gap: 8px;
}

.comment-phrase-row select,
.comment-phrase-row input {
  min-height: 36px;
}

.knowledge-report-preview {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.knowledge-pie-card,
.report-knowledge-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}

.knowledge-pie,
.report-knowledge-pie {
  width: 138px;
  aspect-ratio: 1;
  border-radius: 50%;
  box-shadow: inset 0 0 0 18px rgba(255, 255, 255, 0.52), 0 16px 34px rgba(15, 23, 42, 0.12);
}

.knowledge-pie-info,
.report-knowledge-content {
  display: grid;
  gap: 8px;
}

.knowledge-pie-info p,
.report-knowledge-content p {
  margin: 0;
  color: #475569;
  line-height: 1.7;
}

.knowledge-pie-info div,
.report-knowledge-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.knowledge-pie-info span,
.report-knowledge-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.knowledge-pie-info i,
.report-knowledge-legend i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.report-knowledge-points {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.report-knowledge-points div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.report-knowledge-points strong {
  display: block;
  color: #1e3a8a;
  font-size: 14px;
}

.report-knowledge-points p {
  margin: 8px 0 0;
  color: #475569;
  line-height: 1.65;
}

.mini-report-preview {
  display: grid;
  gap: 8px;
}

.mini-module {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.mini-module strong {
  font-size: 13px;
}

.mini-module span {
  color: var(--muted);
  font-size: 12px;
}

.mini-module.disabled {
  opacity: 0.52;
  background: #f3f4f6;
}

.compact-result {
  min-height: 38px;
  margin-top: 0;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 4px 8px;
  align-items: center;
  min-height: 68px;
  padding: 10px;
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
}

.step span {
  grid-row: span 2;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  background: #e5e7eb;
  border-radius: 999px;
  font-weight: 700;
}

.step strong {
  font-size: 14px;
  line-height: 1.2;
}

.step small {
  color: var(--muted);
  font-size: 12px;
}

.step.active {
  border-color: #8fb1f3;
  background: var(--soft-blue);
}

.step.active span {
  background: var(--blue);
  color: #fff;
}

.step:hover,
.step:focus-visible {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.step:hover span,
.step:focus-visible span,
.step:hover strong,
.step:focus-visible strong,
.step:hover small,
.step:focus-visible small {
  color: #fff;
}

.step:hover span,
.step:focus-visible span {
  background: rgb(255 255 255 / 0.18);
}

.step.active:hover,
.step.active:focus-visible {
  background: var(--blue-dark);
}

.step.disabled {
  cursor: default;
  opacity: 0.58;
}

.step.disabled:hover,
.step.disabled:focus-visible {
  border-color: var(--line);
  background: #fff;
  color: inherit;
}

.step.disabled:hover span,
.step.disabled:focus-visible span {
  background: #e5e7eb;
  color: inherit;
}

.step.disabled:hover small,
.step.disabled:focus-visible small {
  color: var(--muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  margin-top: 14px;
}

.workflow-step {
  display: none;
}

.workflow-step.active {
  display: block;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.upload-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.class-import-layout {
  display: grid;
  grid-template-columns: minmax(380px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
  align-items: stretch;
}

.class-import-overview {
  display: grid;
  gap: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  background: #eff6ff;
}

.overview-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.overview-head strong {
  color: #0f172a;
  font-size: 15px;
}

.overview-head span,
.overview-foot span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

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

.overview-stats div {
  display: grid;
  gap: 3px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 9px;
  background: rgb(255 255 255 / 0.72);
}

.overview-stats b {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.overview-stats small {
  color: #64748b;
  font-size: 11px;
}

.overview-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.overview-foot span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff;
  line-height: 1;
  white-space: nowrap;
}

.overview-foot .ok {
  color: #166534;
  background: #dcfce7;
}

.overview-foot .warn {
  color: #92400e;
  background: #fef3c7;
}

.class-roster-board {
  display: grid;
  gap: 12px;
  margin: 12px 0;
}

.roster-teacher-group {
  display: grid;
  gap: 8px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.roster-teacher-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.roster-teacher-head strong {
  color: #0f172a;
}

.roster-teacher-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.roster-class-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px;
}

.roster-class-card {
  display: grid;
  gap: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.roster-class-card.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.roster-class-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.roster-class-card.stage-high {
  border-left: 4px solid #f59e0b;
}

.roster-class-card.stage-low {
  border-left: 4px solid #38bdf8;
}

.roster-class-card strong {
  display: block;
  color: #0f172a;
  font-size: 13px;
  line-height: 1.35;
}

.roster-class-card span,
.roster-class-card em {
  color: #64748b;
  font-size: 11px;
  font-style: normal;
}

.roster-report-type {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.roster-report-type .configure-report-type {
  min-height: 28px;
  padding: 5px 9px;
}

.roster-class-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.roster-class-meta span,
.roster-class-card em {
  width: fit-content;
  border-radius: 999px;
  padding: 3px 7px;
  background: rgb(255 255 255 / 0.74);
  font-weight: 800;
}

.roster-class-card.ok em {
  color: #166534;
  background: #dcfce7;
}

.roster-class-card.warn em {
  color: #92400e;
  background: #fef3c7;
}

input[type="file"] {
  border: 1px solid var(--line);
  padding: 8px;
  border-radius: 6px;
  background: #fff;
  min-width: 360px;
}

button {
  border: 0;
  background: var(--blue);
  color: #fff;
  border-radius: 6px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 600;
}

button:hover {
  background: var(--blue-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button:disabled:hover {
  background: var(--blue);
}

button.ghost {
  background: #fff;
  color: var(--blue);
  border: 1px solid #b9c9ee;
}

.result {
  min-height: 44px;
  background: #111827;
  color: #d1fae5;
  border-radius: 6px;
  padding: 12px;
  white-space: pre-wrap;
  margin-top: 14px;
  overflow-x: auto;
}

.result.hidden {
  display: none;
}

.inline-result {
  min-height: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  white-space: normal;
  margin-top: 10px;
  overflow: visible;
}

#learningResult.inline-result {
  margin-top: 12px;
}

#commentResult.inline-result,
#commentModalResult.inline-result {
  margin-top: 12px;
}

.table-wrap {
  margin-top: 16px;
  overflow-x: auto;
}

.step-editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(420px, 0.82fr);
  gap: 12px;
  align-items: start;
}

.live-table-wrap {
  margin-top: 0;
  overflow-x: visible;
}

.class-targets {
  display: grid;
  grid-template-columns: minmax(0, 160px) auto repeat(2, minmax(0, 160px));
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.class-targets.high-stage-targets {
  grid-template-columns: minmax(0, 160px) minmax(0, 1fr);
}

.low-stage-target.hidden {
  display: none;
}

.class-targets label {
  gap: 5px;
  font-size: 13px;
}

.class-targets input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.class-targets input.readonly-target,
.class-targets input[readonly] {
  background: #f1f5f9;
  color: #64748b;
  border-color: #cbd5e1;
  cursor: not-allowed;
}

.class-targets .target-lock-button {
  height: 38px;
  min-width: 92px;
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.attendance-upload-row {
  border-top: 1px dashed #cbd5e1;
  margin-top: 2px;
  padding-top: 10px;
}

.exam-score-upload-row {
  border-top: 1px dashed #cbd5e1;
  margin-top: 2px;
  padding-top: 10px;
}

.exam-score-ocr-text {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.exam-score-ocr-text textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 10px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  line-height: 1.55;
  resize: vertical;
}

.exam-score-import-history {
  margin: 12px 0 0;
}

.exam-score-history-card {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #f8fbff;
}

.exam-score-history-card.empty {
  color: #64748b;
}

.exam-score-history-card strong,
.exam-score-history-card span,
.exam-score-history-card small {
  display: block;
}

.exam-score-history-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.exam-score-history-head strong,
.exam-score-history-card.empty strong {
  color: #0f172a;
  font-size: 15px;
}

.exam-score-history-head span,
.exam-score-history-card.empty span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

.exam-score-history-list {
  display: grid;
  gap: 8px;
}

.exam-score-history-item {
  display: grid;
  gap: 7px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #38bdf8;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.exam-score-history-item.warn {
  border-left-color: #f59e0b;
}

.exam-score-history-item.pending {
  border-left-color: #94a3b8;
}

.exam-score-history-main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.exam-score-history-main strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.exam-score-history-main small {
  color: #64748b;
  font-size: 12px;
}

.exam-score-status {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 64px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
}

.exam-score-history-item.warn .exam-score-status {
  background: #fef3c7;
  color: #92400e;
}

.exam-score-history-item.pending .exam-score-status {
  background: #e2e8f0;
  color: #475569;
}

.exam-score-history-meta,
.exam-score-history-preview {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exam-score-history-meta span,
.exam-score-history-preview span {
  border-radius: 6px;
  padding: 4px 7px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.exam-score-history-preview .warn-text {
  background: #fff7ed;
  color: #c2410c;
}

.workflow-step[data-step="3"] .attendance-import-box,
.workflow-step[data-step="3"] #attendanceImportResult {
  display: none !important;
}

.attendance-import-box {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.55fr) auto;
  gap: 10px;
  align-items: end;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 12px;
  background: #eff6ff;
}

.attendance-import-box strong,
.attendance-import-box span {
  display: block;
}

.attendance-import-box strong {
  color: #1d4ed8;
  font-size: 15px;
}

.attendance-import-box span {
  margin-top: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.attendance-import-box label {
  margin: 0;
}

.table-tools {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 12px 108px;
}

.table-tools label {
  min-width: 118px;
  font-size: 13px;
}

.table-tools select {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  background: #fff;
}

.table-tools .compact-action {
  min-width: 96px;
  height: 38px;
  border-radius: 7px;
  padding: 0 14px;
  white-space: nowrap;
}

.attendance-toggle {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
  font-weight: 800;
}

.attendance-toggle.is-editing {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #b45309;
}

.attendance-toggle.is-editing:hover {
  background: #fef3c7;
}

.learning-audit-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
}

.learning-audit-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.learning-audit-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.learning-audit-summary strong {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.learning-audit-summary span {
  color: var(--muted);
  font-size: 13px;
}

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

.learning-audit-lists > div {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.learning-audit-lists h4 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 14px;
}

.learning-audit-lists p {
  display: flex;
  gap: 8px;
  justify-content: space-between;
  margin: 6px 0 0;
  border-radius: 6px;
  padding: 7px 8px;
  background: #fff;
  color: #475569;
  font-size: 13px;
}

.learning-audit-lists p span {
  color: var(--red);
  text-align: right;
}

.learning-audit-lists p.ok span,
.learning-audit-lists p.ok {
  color: var(--green);
}

.live-module-preview {
  position: sticky;
  top: 16px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #f8fafc;
}

.learning-module-preview {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.preview-student-pill {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 13px;
  font-weight: 700;
}

.live-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.live-summary-card {
  display: grid;
  gap: 5px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.live-summary-card span {
  color: var(--muted);
  font-size: 12px;
}

.live-summary-card strong {
  color: var(--blue);
  font-size: 20px;
}

.live-ability-list {
  display: grid;
  gap: 8px;
}

.live-ability-row {
  display: grid;
  grid-template-columns: 76px 1fr 28px;
  gap: 8px;
  align-items: center;
  font-size: 13px;
}

.live-ability-row strong {
  font-weight: 700;
}

.live-ability-row em {
  font-style: normal;
  color: var(--muted);
}

.live-comment-note {
  border-left: 3px solid var(--blue);
  padding-left: 10px;
  color: #374151;
  line-height: 1.65;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 920px;
}

.wide-table {
  table-layout: fixed;
  min-width: 0;
  width: 100%;
}

.wide-table th:nth-child(1),
.wide-table td:nth-child(1) {
  width: 86px;
}

.wide-table th:nth-child(2),
.wide-table td:nth-child(2),
.wide-table th:nth-child(5),
.wide-table td:nth-child(5),
.wide-table th:nth-child(6),
.wide-table td:nth-child(6) {
  width: 58px;
}

.wide-table th:nth-child(3),
.wide-table td:nth-child(3),
.wide-table th:nth-child(4),
.wide-table td:nth-child(4),
.wide-table th:nth-child(7),
.wide-table td:nth-child(7),
.wide-table th:nth-child(8),
.wide-table td:nth-child(8) {
  width: 50px;
}

.wide-table th:nth-child(9),
.wide-table td:nth-child(9) {
  width: 86px;
}

.wide-table th:nth-child(10),
.wide-table td:nth-child(10) {
  width: 56px;
}

.wide-table.high-stage-table th:nth-child(1),
.wide-table.high-stage-table td:nth-child(1) {
  width: 96px;
}

.wide-table.high-stage-table th:nth-child(2),
.wide-table.high-stage-table td:nth-child(2) {
  width: 72px;
}

.wide-table.high-stage-table th:nth-child(3),
.wide-table.high-stage-table td:nth-child(3),
.wide-table.high-stage-table th:nth-child(4),
.wide-table.high-stage-table td:nth-child(4),
.wide-table.high-stage-table th:nth-child(5),
.wide-table.high-stage-table td:nth-child(5),
.wide-table.high-stage-table th:nth-child(6),
.wide-table.high-stage-table td:nth-child(6),
.wide-table.high-stage-table th:nth-child(7),
.wide-table.high-stage-table td:nth-child(7) {
  width: 58px;
}

.wide-table.high-stage-table th:nth-child(8),
.wide-table.high-stage-table td:nth-child(8) {
  width: 104px;
}

.wide-table.high-stage-table th:nth-child(9),
.wide-table.high-stage-table td:nth-child(9) {
  width: 72px;
}

th,
td {
  border-bottom: 1px solid var(--line);
  text-align: left;
  padding: 10px 8px;
  vertical-align: top;
}

th {
  background: #f1f5f9;
  color: #334155;
  font-size: 13px;
}

td {
  font-size: 14px;
}

tr.selected-row td {
  background: #f0f7ff;
}

tr.selected-row td:first-child {
  box-shadow: inset 3px 0 0 var(--blue);
  font-weight: 700;
}

td input,
td select,
label select,
label textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 7px 8px;
  font: inherit;
  background: #fff;
}

td input {
  min-width: 0;
}

.wide-table th,
.wide-table td {
  padding: 7px 3px;
  font-size: 12px;
}

.wide-table td input,
.wide-table td select {
  min-width: 0;
  padding: 5px 2px;
  text-align: center;
  font-size: 12px;
}

.wide-table .small {
  min-width: 0;
  width: 100%;
  padding: 5px 2px;
  font-size: 12px;
}

.ratio-input {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 2px;
}

.ratio-input span {
  color: #9ca3af;
  font-size: 12px;
  white-space: nowrap;
}

.comment-button {
  display: inline-grid;
  width: 84px;
  min-height: 38px;
  min-width: 0;
  place-items: center;
  gap: 1px;
  border-radius: 10px;
  padding: 4px 7px;
  text-align: center;
  vertical-align: middle;
}

.comment-button span {
  display: block;
  overflow: hidden;
  max-width: 100%;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.comment-button b {
  font-size: 13px;
  line-height: 1;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.high-stage-table .comment-button {
  width: 98px;
  min-height: 34px;
  padding: 4px 6px;
  border-radius: 8px;
}

.high-stage-table .comment-button b {
  font-size: 12px;
}

.high-stage-table .comment-button span {
  font-size: 10px;
}

.template-pill.blue,
.template-chip.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.template-pill.green,
.template-chip.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.template-pill.yellow,
.template-chip.yellow {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.template-pill.pink,
.template-chip.pink {
  border-color: #fbcfe8;
  background: #fdf2f8;
  color: #be185d;
}

.template-pill.orange,
.template-chip.orange {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.template-pill.purple,
.template-chip.purple {
  border-color: #ddd6fe;
  background: #f5f3ff;
  color: #6d28d9;
}

.template-pill.empty {
  border-color: #d5dee9;
  background: #f1f5f9;
  color: #8391a6;
}

.comment-button.template-pill.empty {
  display: inline-flex !important;
  height: 28px !important;
  min-height: 28px !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 0 7px !important;
}

.comment-button.template-pill.empty span {
  display: none !important;
}

.wide-table td:nth-child(9) {
  vertical-align: middle;
}

.template-quick-pick {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: 8px;
}

.template-chip {
  display: grid;
  min-width: 0;
  gap: 2px;
  border: 1px solid;
  border-radius: 10px;
  padding: 8px;
  text-align: left;
}

.template-chip b {
  font-size: 18px;
  line-height: 1;
}

.template-chip span {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.template-chip.selected {
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.16);
  transform: translateY(-1px);
}

.live-parent-report-preview {
  width: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  box-shadow: 0 14px 30px rgb(15 23 42 / 0.08);
}

.live-parent-report-preview.parent-report-view {
  border-radius: 8px;
}

.live-parent-report-preview .parent-hero h2,
.live-parent-report-preview .hero-info-tags span,
.live-parent-report-preview .focus-labels span,
.live-parent-report-preview .focus-summary span,
.live-parent-report-preview .parent-section-title strong,
.live-parent-report-preview .parent-section-title span {
  overflow-wrap: anywhere;
}

label {
  display: grid;
  gap: 6px;
  color: #374151;
  font-weight: 600;
}

label textarea,
label select {
  font-weight: 400;
}

.empty {
  color: var(--muted);
  text-align: center;
  padding: 28px 8px;
}

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

.primary {
  min-width: 150px;
}

.small {
  width: auto;
  min-width: 64px;
  padding: 6px 8px;
  font-size: 12px;
}

.progress-pill {
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
  border-radius: 999px;
  padding: 8px 12px;
  font-weight: 700;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(15 23 42 / 0.38);
}

.modal.hidden {
  display: none;
}

.modal-card {
  display: grid;
  gap: 14px;
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  overflow: auto;
  background: #fff;
  border-radius: 8px;
  border: 1px solid var(--line);
  padding: 18px;
  box-shadow: 0 18px 45px rgb(15 23 42 / 0.2);
}

.report-type-modal-card {
  width: min(640px, 100%);
}

.report-type-modal-body {
  display: grid;
  gap: 14px;
}

.report-type-class-summary {
  display: grid;
  gap: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.report-type-class-summary strong {
  color: #0f172a;
  font-size: 16px;
}

.report-type-class-summary span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.report-type-choice-grid {
  display: grid;
  gap: 10px;
}

.report-type-choice {
  display: grid;
  grid-template-columns: 18px auto 1fr;
  align-items: center;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}

.report-type-choice.checked {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgb(37 99 235 / 0.12);
}

.report-type-choice span {
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.comment-supplement-area {
  display: grid;
  gap: 14px;
}

.modal.template-only .comment-supplement-area {
  display: none;
}

.template-preview-panel {
  display: grid;
  gap: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: linear-gradient(135deg, #f8fbff, #fff7ed);
}

.template-preview-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.template-preview-title strong {
  color: #1e3a8a;
}

.template-preview-title span {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.template-preview-grid {
  display: grid;
  gap: 8px;
}

.template-preview-grid section {
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 10px;
  align-items: start;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.template-preview-grid mark {
  display: grid;
  place-items: center;
  min-height: 34px;
  border-radius: 8px;
  background: #2563eb;
  color: #fff;
  font-weight: 900;
}

.template-preview-grid b {
  display: block;
  margin-bottom: 4px;
  color: #0f172a;
}

.template-preview-grid p,
.template-preview-empty span {
  margin: 0;
  color: #475569;
  line-height: 1.6;
}

.template-preview-empty {
  display: grid;
  gap: 4px;
  padding: 6px;
}

.confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgb(15 23 42 / 0.48);
}

.confirm-card {
  display: grid;
  gap: 14px;
  width: min(520px, 100%);
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 18px;
  background: #fff;
  box-shadow: 0 24px 60px rgb(15 23 42 / 0.24);
}

.action-toast-stack {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 120;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
  pointer-events: none;
}

.action-toast {
  position: relative;
  display: grid;
  gap: 5px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 12px 38px 12px 14px;
  background: #f0fdf4;
  color: #14532d;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.18);
  pointer-events: auto;
}

.action-toast.bad {
  border-color: #fecaca;
  background: #fff1f2;
  color: #991b1b;
}

.action-toast strong {
  font-size: 14px;
}

.action-toast span {
  color: inherit;
  font-size: 12px;
  line-height: 1.55;
}

.action-toast button {
  position: absolute;
  top: 7px;
  right: 8px;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: currentColor;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.confirm-card.warning {
  border-color: #fed7aa;
}

.confirm-header {
  display: grid;
  gap: 6px;
}

.confirm-header span {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 10px;
  background: #eff6ff;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
}

.confirm-card.warning .confirm-header span {
  background: #fff7ed;
  color: #c2410c;
}

.confirm-header strong {
  color: #0f172a;
  font-size: 20px;
}

.confirm-body {
  display: grid;
  gap: 8px;
}

.confirm-body p {
  margin: 0;
  color: #374151;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.report-preview {
  display: grid;
  gap: 14px;
  max-width: 960px;
  margin: 0 auto;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 14px;
  --report-primary: #2454a6;
  --report-secondary: #1f7a4d;
  --report-soft: #eaf1ff;
  --report-hero-start: #12315f;
  --report-hero-end: #2563a8;
}

.report-preview.theme-blue-orange {
  --report-primary: #1f5fbf;
  --report-secondary: #d97706;
  --report-soft: #fff4e6;
  --report-hero-start: #144b8f;
  --report-hero-end: #f59e0b;
}

.report-preview.theme-mono {
  --report-primary: #334155;
  --report-secondary: #2563eb;
  --report-soft: #f1f5f9;
  --report-hero-start: #1f2937;
  --report-hero-end: #475569;
}

.report-hero {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  background: linear-gradient(135deg, var(--report-hero-start) 0%, var(--report-hero-end) 100%);
  color: #fff;
  border-radius: 8px;
}

.report-hero p,
.report-hero span {
  color: #dbeafe;
}

.report-hero h2 {
  margin-top: 6px;
  font-size: 28px;
}

.report-mark {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  display: inline-grid;
  gap: 1px;
  align-self: flex-start;
  border: 1px solid rgb(255 255 255 / 0.35);
  border-radius: 999px;
  padding: 8px 12px;
  color: #e0f2fe;
  font-size: 13px;
  font-weight: 800;
}

.report-band {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 16px;
  align-items: center;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
}

.report-band span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 5px;
}

.report-band strong {
  color: var(--report-primary);
  font-size: 18px;
}

.report-band p {
  margin: 0;
}

.report-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.section-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  margin-bottom: 12px;
}

.section-title.compact {
  display: block;
}

.section-title h3,
.report-section h3 {
  margin: 0 0 12px;
  font-size: 18px;
}

.section-title h3 {
  margin: 0;
}

.section-title span {
  color: var(--muted);
  font-size: 12px;
}

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

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

.summary-card {
  display: grid;
  gap: 6px;
  padding: 14px;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
}

.summary-card span,
.summary-card small,
.ability-item small {
  color: var(--muted);
}

.summary-card strong {
  font-size: 24px;
  color: var(--report-primary);
}

.mini-progress,
.bar {
  height: 7px;
  background: #e5e7eb;
  border-radius: 999px;
  overflow: hidden;
}

.mini-progress i,
.bar i {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--report-primary), var(--report-secondary));
  border-radius: 999px;
}

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

.ability-grid.radar-mode {
  position: relative;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 12px;
  background:
    radial-gradient(circle at center, transparent 0 28%, rgb(36 84 166 / 0.08) 29% 30%, transparent 31% 48%, rgb(36 84 166 / 0.08) 49% 50%, transparent 51%),
    #fff;
  border: 1px dashed #b6c3d6;
  border-radius: 8px;
}

.ability-row {
  display: grid;
  grid-template-columns: 1fr 34px;
  gap: 8px 12px;
  align-items: center;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  background: #fff;
}

.parent-report-view .ability-card {
  align-items: start;
  min-height: 148px;
  border-width: 2px;
  box-shadow: 0 12px 22px rgb(15 23 42 / 0.06);
}

.parent-report-view .ability-card.level-s {
  border-color: #facc15;
  background: linear-gradient(135deg, #fffdf0 0%, #fff7d6 100%);
}

.parent-report-view .ability-card.level-a {
  border-color: #f9a8d4;
  background: linear-gradient(135deg, #fff7fb 0%, #fce7f3 100%);
}

.parent-report-view .ability-card.level-b {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
}

.parent-report-view .ability-card.level-c {
  border-color: #86efac;
  background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
}

.parent-report-view .ability-card.level-s .bar i {
  background: linear-gradient(90deg, #f59e0b, #facc15);
}

.parent-report-view .ability-card.level-a .bar i {
  background: linear-gradient(90deg, #ec4899, #f9a8d4);
}

.parent-report-view .ability-card.level-b .bar i {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.parent-report-view .ability-card.level-c .bar i {
  background: linear-gradient(90deg, #10b981, #86efac);
}

.parent-report-view .ability-card.level-s {
  box-shadow: 0 0 0 1px rgb(250 204 21 / 0.36), 0 12px 26px rgb(245 158 11 / 0.2);
}

.parent-report-view .ability-card.level-a {
  box-shadow: 0 0 0 1px rgb(249 168 212 / 0.4), 0 12px 26px rgb(236 72 153 / 0.16);
}

.parent-report-view .ability-card.level-b {
  box-shadow: 0 0 0 1px rgb(147 197 253 / 0.4), 0 12px 26px rgb(37 99 235 / 0.16);
}

.parent-report-view .ability-card.level-c,
.parent-report-view .ability-card.level-d {
  box-shadow: 0 0 0 1px rgb(134 239 172 / 0.42), 0 12px 26px rgb(16 185 129 / 0.16);
}

.ability-row > span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--report-soft);
  color: var(--report-primary);
  font-weight: 700;
}

.ability-row .bar {
  grid-column: 1 / -1;
}

.ability-row strong,
.ability-row small {
  display: block;
}

.ability-row small {
  color: var(--muted);
  margin-top: 3px;
}

.parent-report-view .ability-card small {
  display: -webkit-box;
  overflow: hidden;
  margin-top: 7px;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.ability-action {
  display: inline-grid;
  width: fit-content;
  margin-top: 7px;
  border-radius: 999px;
  padding: 4px 8px;
  background: rgb(255 255 255 / 0.82);
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgb(148 163 184 / 0.28);
}

.two-col {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 18px;
}

.timeline-mode .tag-list {
  display: grid;
  gap: 8px;
}

.timeline-mode .tag-list span {
  border-radius: 6px;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.tag-list span {
  background: #ecfdf5;
  color: var(--report-secondary);
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
}

.info-list {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  margin: 0;
  align-items: start;
}

.info-list dt {
  color: var(--muted);
}

.info-list dd {
  margin: 0;
}

.comment-block {
  display: grid;
  gap: 8px;
}

.comment-block h4 {
  margin: 4px 0 0;
  color: var(--report-primary);
}

.comment-block p,
.report-section p {
  color: #374151;
  line-height: 1.7;
}

.numbered-comment-list {
  display: grid;
  gap: 8px;
  margin: 6px 0 0;
  padding: 0;
  list-style: none;
}

.numbered-comment-list li {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.numbered-comment-list li strong {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 13px;
}

.numbered-comment-list li span {
  color: #374151;
  line-height: 1.7;
}

.goal-list {
  margin: 0;
  padding-left: 22px;
  line-height: 1.8;
}

.goal-card-mode .goal-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.goal-card-mode .goal-list li {
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.quote-mode .comment-block {
  border-left: 4px solid var(--report-primary);
  padding-left: 14px;
}

.knowledge-map {
  display: grid;
  grid-template-columns: 1fr 28px 1fr 28px 1fr 28px 1fr;
  gap: 8px;
  align-items: center;
}

.knowledge-map span {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 58px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: var(--report-soft);
  color: var(--report-primary);
  font-weight: 700;
  text-align: center;
}

.knowledge-map span b {
  display: grid;
  gap: 2px;
  font-size: 13px;
  line-height: 1.25;
}

.knowledge-map span em {
  color: #64748b;
  font-size: 10px;
  font-style: normal;
  font-weight: 800;
}

.knowledge-map i {
  height: 2px;
  background: var(--report-secondary);
}

.knowledge-map.as-list {
  grid-template-columns: 1fr;
}

.knowledge-map.as-list i {
  display: none;
}

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

.material-preview-grid div {
  display: grid;
  gap: 5px;
  place-items: center;
  min-height: 92px;
  border: 1px dashed #b6c3d6;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.material-preview-grid div.has-material-image {
  align-content: start;
  padding: 8px;
  border-style: solid;
  background: #fff;
}

.material-preview-grid img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
}

.material-preview-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.parent-report-view .material-preview-grid strong {
  display: inline-grid;
  gap: 1px;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 10px;
  background: #ecfdf5;
  color: #047857;
  font-size: 13px;
  text-align: center;
}

.paper-analysis-card {
  display: grid;
  gap: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 16px;
  background: linear-gradient(135deg, #f0fdf4, #ffffff);
}

.paper-analysis-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.paper-analysis-head > div:first-child {
  display: grid;
  gap: 5px;
}

.paper-analysis-head span {
  color: #047857;
  font-size: 12px;
  font-weight: 900;
}

.paper-analysis-head strong {
  color: #0f172a;
  font-size: 20px;
  line-height: 1.25;
}

.paper-analysis-head small {
  color: #64748b;
  line-height: 1.6;
}

.paper-score-pill {
  display: grid;
  place-items: center;
  min-width: 112px;
  min-height: 88px;
  border-radius: 8px;
  background: #047857;
  color: #fff;
}

.paper-score-pill b {
  font-size: 24px;
  line-height: 1;
}

.paper-score-pill em {
  color: rgb(255 255 255 / 0.82);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

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

.paper-analysis-grid section {
  display: grid;
  align-content: start;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.paper-analysis-grid mark {
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.paper-analysis-grid p {
  margin: 0;
  color: #334155;
  line-height: 1.7;
}

.paper-analysis-points {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: analysis-point;
}

.paper-analysis-points li {
  display: grid;
  grid-template-columns: 34px minmax(0, 0.88fr) minmax(0, 2.3fr);
  gap: 9px;
  align-items: start;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
  counter-increment: analysis-point;
}

.paper-analysis-points li::before {
  content: counter(analysis-point);
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #047857;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.paper-analysis-points strong {
  color: #047857;
  font-size: 14px;
  line-height: 1.6;
}

.paper-analysis-points span {
  color: #334155;
  line-height: 1.7;
}

.materials-table {
  min-width: 0;
  table-layout: fixed;
}

.materials-table thead {
  display: none;
}

.materials-table,
.materials-table tbody,
.materials-table tr,
.materials-table td {
  display: block;
  width: 100%;
}

.materials-table tr + tr {
  margin-top: 12px;
}

.material-student-card {
  display: grid;
  grid-template-columns: minmax(150px, 0.6fr) minmax(300px, 1.25fr) minmax(360px, 1.6fr);
  gap: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.material-student-side,
.material-score-panel,
.material-analysis-panel {
  display: grid;
  align-content: start;
  gap: 9px;
  min-width: 0;
}

.material-student-side strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 900;
}

.materials-table input,
.materials-table textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 8px;
  font: inherit;
  background: #fff;
}

.materials-table textarea {
  resize: vertical;
  margin-top: 6px;
}

.paper-only-upload {
  min-height: 96px;
}

.score-input-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.score-input-grid label {
  display: grid;
  gap: 4px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.exam-loss-selector {
  display: grid;
  gap: 8px;
  margin: 8px 0 4px;
}

.exam-loss-title {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.exam-loss-group {
  display: grid;
  grid-template-columns: 74px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.exam-loss-group-title {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 5px 9px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.exam-loss-group.green .exam-loss-group-title {
  background: #dcfce7;
  color: #166534;
}

.exam-loss-group.yellow .exam-loss-group-title {
  background: #fef3c7;
  color: #92400e;
}

.exam-loss-group.pink .exam-loss-group-title {
  background: #fce7f3;
  color: #be185d;
}

.exam-loss-group.orange .exam-loss-group-title {
  background: #ffedd5;
  color: #c2410c;
}

.exam-loss-group.purple .exam-loss-group-title {
  background: #ede9fe;
  color: #6d28d9;
}

.exam-loss-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.exam-loss-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 5px 8px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.exam-loss-tag input {
  width: auto;
  margin: 0;
}

.exam-loss-tag span {
  color: #0369a1;
}

.exam-loss-tag.checked {
  border-color: #38bdf8;
  background: #e0f2fe;
  color: #075985;
}

.exam-loss-group.green .exam-loss-tag.checked {
  border-color: #4ade80;
  background: #dcfce7;
  color: #166534;
}

.exam-loss-group.yellow .exam-loss-tag.checked {
  border-color: #fbbf24;
  background: #fef3c7;
  color: #92400e;
}

.exam-loss-group.pink .exam-loss-tag.checked {
  border-color: #f9a8d4;
  background: #fce7f3;
  color: #be185d;
}

.exam-loss-group.orange .exam-loss-tag.checked {
  border-color: #fb923c;
  background: #ffedd5;
  color: #c2410c;
}

.exam-loss-group.purple .exam-loss-tag.checked {
  border-color: #c4b5fd;
  background: #ede9fe;
  color: #6d28d9;
}

.loss-summary-field {
  min-height: 54px;
  background: #f8fafc !important;
}

.analysis-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.analysis-preview-head strong {
  color: #0f172a;
  font-size: 14px;
}

.analysis-preview-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.analysis-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.analysis-edit-grid label {
  display: grid;
  gap: 5px;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.material-uploader {
  display: grid;
  gap: 5px;
  margin-bottom: 7px;
}

.material-autofill-summary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 12px;
  margin: 0 0 12px;
  background: #f8fbff;
}

.material-summary-main strong,
.material-summary-main span {
  display: block;
}

.material-summary-main strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.material-summary-main span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.material-summary-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(72px, 1fr));
  gap: 8px;
}

.material-summary-metrics span {
  display: grid;
  place-items: center;
  min-height: 54px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.material-summary-metrics b {
  color: #0369a1;
  font-size: 18px;
  line-height: 1;
}

.material-summary-metrics em {
  margin-top: 4px;
  color: #475569;
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

@media (max-width: 920px) {
  .material-autofill-summary {
    grid-template-columns: 1fr;
  }

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

.material-source-badge {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  margin-bottom: 7px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
  font-weight: 900;
}

.material-file-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.upload-tile {
  display: grid;
  place-items: center;
  min-height: 86px;
  border: 1px dashed #9fb3d1;
  border-radius: 8px;
  background: #f8fafc;
  color: var(--blue);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  overflow: hidden;
}

.upload-tile input {
  display: none;
}

.upload-tile span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 86px;
  text-align: center;
}

.upload-tile img {
  width: 100%;
  height: 104px;
  object-fit: cover;
}

.upload-tile.has-image {
  border-style: solid;
  background: #fff;
}

.material-uploader small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.clear-material {
  min-width: 46px;
  padding: 4px 6px;
  font-size: 12px;
}

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

.comment-audit-summary > div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #f8fafc;
}

.comment-audit-summary > div.has-issue {
  border-color: #fecaca;
  background: #fff1f2;
  box-shadow: 0 12px 28px rgb(248 113 113 / 0.12);
}

.comment-audit-summary > div.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.comment-audit-summary strong {
  color: var(--blue);
  font-size: 22px;
}

.comment-audit-summary span {
  color: var(--muted);
  font-size: 13px;
}

.comment-audit-toolbar {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
}

.comment-audit-toolbar label {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.comment-audit-toolbar label span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.comment-audit-toolbar select {
  min-width: 150px;
}

.comment-audit-toolbar small {
  color: var(--muted);
}

.comment-audit-list {
  display: grid;
  gap: 10px;
}

.comment-audit-card {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) 180px 72px;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.comment-audit-card.has-issue {
  border-color: #fecaca;
  background: #fffafa;
}

.comment-audit-card.ok {
  border-color: #bbf7d0;
}

.comment-audit-card strong,
.comment-audit-card span {
  display: block;
}

.comment-audit-card span,
.comment-audit-card p {
  color: var(--muted);
  font-size: 13px;
}

.comment-audit-card p {
  overflow: hidden;
  margin: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.audit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.audit-tags span {
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
}

.audit-tags span.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.audit-tags span.missing,
.audit-tags span.fix,
.audit-tags span.short {
  border-color: #fecaca;
  background: #fef2f2;
  color: var(--red);
}

.audit-tags span.repeat {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.audit-tags span.template {
  border-color: #fde68a;
  background: #fffbeb;
  color: #a16207;
}

.comment-compose {
  display: grid;
  gap: 10px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  padding: 12px;
  background: #f8fafc;
}

.comment-compose-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.comment-compose-head strong {
  color: #0f172a;
}

.comment-compose-head span {
  color: var(--muted);
  font-size: 12px;
}

.comment-phrase-bank {
  display: grid;
  gap: 10px;
}

.comment-phrase-group {
  display: grid;
  gap: 8px;
}

.phrase-group-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.phrase-group-title strong {
  border-radius: 999px;
  padding: 4px 9px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 12px;
}

.phrase-group-title span {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.phrase-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.phrase-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  text-align: left;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #334155;
  font-size: 12px;
  line-height: 1.35;
  cursor: pointer;
}

.phrase-chip b {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 3px 6px;
  background: #fef3c7;
  color: #b45309;
  font-size: 12px;
  line-height: 1;
}

.phrase-chip span {
  min-width: 0;
}

.phrase-chip:hover {
  border-color: var(--blue);
  color: var(--blue);
  box-shadow: 0 8px 18px rgb(37 99 235 / 0.12);
}

.preview-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.preview-toolbar select {
  min-width: 160px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}

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

.placeholder-card {
  border: 1px dashed #b6c3d6;
  border-radius: 8px;
  padding: 16px;
  background: #f8fafc;
}

.placeholder-card h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.placeholder-card p {
  line-height: 1.65;
}

.checklist {
  display: grid;
  gap: 10px;
}

.check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 12px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.check-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.check-row ul {
  display: grid;
  gap: 4px;
  margin: 7px 0 0;
  padding-left: 18px;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.check-row span {
  font-weight: 700;
}

.check-row.ok span {
  color: var(--green);
}

.check-row.bad span {
  color: var(--red);
}

.check-row.optional span {
  color: var(--muted);
}

.publish-summary {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fff;
}

.publish-summary strong {
  display: block;
  margin-bottom: 4px;
  font-size: 18px;
}

.publish-summary.ok {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.publish-summary.ok strong {
  color: var(--green);
}

.publish-summary.bad {
  border-color: #fecaca;
  background: #fffafa;
}

.publish-summary.bad strong {
  color: var(--red);
}

.publish-result {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.publish-success,
.publish-error {
  border-radius: 8px;
  padding: 14px;
}

.publish-success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
}

.publish-success span {
  display: inline-block;
  margin-bottom: 5px;
  border-radius: 999px;
  padding: 4px 9px;
  background: #dcfce7;
  color: #047857;
  font-size: 12px;
  font-weight: 800;
}

.publish-success strong {
  display: block;
  color: var(--green);
  font-size: 18px;
}

.publish-success small,
.publish-history-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.delivery-guide {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.delivery-guide strong {
  color: var(--blue);
}

.delivery-guide span {
  border-radius: 999px;
  padding: 5px 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.publish-error {
  border: 1px solid #fecaca;
  background: #fffafa;
  color: var(--red);
}

.publish-link-note {
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 12px;
  background: #fffbeb;
}

.publish-link-note strong {
  display: block;
  color: #92400e;
}

.publish-link-note p {
  color: #78350f;
  line-height: 1.6;
}

.delivery-dashboard {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
}

.delivery-dashboard div {
  display: grid;
  gap: 4px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.delivery-dashboard span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.delivery-dashboard strong {
  color: var(--blue);
  font-size: 22px;
  line-height: 1;
}

.delivery-progress-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 12px;
  background: #eff6ff;
}

.delivery-progress-panel strong {
  display: block;
  color: var(--blue);
}

.delivery-progress-panel span {
  display: block;
  margin-top: 3px;
  color: #475569;
  font-size: 13px;
}

.delivery-progress-panel em {
  color: var(--blue);
  font-style: normal;
  font-size: 20px;
  font-weight: 900;
}

.delivery-progress-bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #dbeafe;
}

.delivery-progress-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #10b981);
}

.delivery-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px;
  background: #f8fbff;
}

.delivery-warning,
.delivery-ready {
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 13px;
  font-weight: 800;
}

.delivery-warning {
  background: #fff7ed;
  color: #c2410c;
}

.delivery-ready {
  background: #ecfdf5;
  color: #047857;
}

.delivery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delivery-filters button {
  width: auto;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 7px 11px;
  background: #fff;
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.delivery-filters button.active {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
  box-shadow: 0 8px 18px rgb(37 99 235 / 0.12);
}

.delivery-card.hidden-by-filter {
  display: none;
}

.delivery-flow-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.delivery-flow-hint span {
  border-radius: 999px;
  padding: 6px 10px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.publish-history-list {
  display: grid;
  gap: 10px;
}

.publish-history-list h3 {
  margin: 4px 0 2px;
  font-size: 16px;
}

.publish-history-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(0, 1.2fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

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

.publish-history-row span,
.history-metrics span {
  color: var(--muted);
  font-size: 13px;
}

.history-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.history-metrics span {
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 4px 8px;
  background: #f8fafc;
}

.report-link-list {
  display: grid;
  gap: 8px;
}

.report-link-list h3,
.delivery-list h3 {
  margin: 4px 0 2px;
  font-size: 16px;
}

.report-link-row {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

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

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

.report-link-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: #475569;
  background: #f8fafc;
}

.report-link-row a {
  border: 1px solid #b9c9ee;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--blue);
  font-weight: 700;
  text-decoration: none;
}

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

.delivery-card {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.delivery-card.copied {
  border-color: #bfdbfe;
  box-shadow: 0 0 0 1px rgb(191 219 254 / 0.5);
}

.delivery-card.sent,
.delivery-card.opened {
  border-color: #bbf7d0;
  box-shadow: 0 0 0 1px rgb(187 247 208 / 0.52);
}

.delivery-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: start;
}

.delivery-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.delivery-status {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border: 1px solid #dbe4ef;
  border-radius: 999px;
  padding: 4px 9px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.delivery-status.copied {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: var(--blue);
}

.delivery-status.sent {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: var(--green);
}

.delivery-status.opened {
  border-color: #a7f3d0;
  background: #ecfdf5;
  color: #047857;
}

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

.delivery-card-head small {
  display: inline-block;
  margin-bottom: 5px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.delivery-card-head span {
  color: var(--muted);
  font-size: 13px;
}

.delivery-card textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  color: #374151;
  background: #f8fafc;
  font: inherit;
  line-height: 1.6;
  resize: vertical;
}

.wechat-message-preview {
  display: grid;
  gap: 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(135deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: inset 4px 0 0 #3b82f6;
  color: #0f172a;
  line-height: 1.55;
}

.wechat-message-preview p {
  margin: 0;
}

.wechat-message-preview .message-greeting {
  font-weight: 800;
}

.wechat-message-preview .message-link {
  color: #2563eb;
  font-weight: 800;
  word-break: break-all;
}

.wechat-message-preview .message-brand {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 4px 9px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 800;
}

.delivery-next-step {
  border-radius: 6px;
  padding: 8px 10px;
  background: #f8fafc;
  color: #475569;
  font-size: 13px;
  line-height: 1.5;
}

.delivery-card.copied .delivery-next-step {
  background: #eff6ff;
  color: #1d4ed8;
}

.delivery-card.sent .delivery-next-step,
.delivery-card.opened .delivery-next-step {
  background: #f0fdf4;
  color: #047857;
}

.delivery-report-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.delivery-report-chips a {
  border-radius: 999px;
  padding: 5px 9px;
  background: #f8fafc;
  color: var(--blue);
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.parent-report-shell {
  width: min(960px, calc(100% - 28px));
  margin: 18px auto 38px;
}

.parent-report-view {
  gap: 12px;
  border: 0;
  background: #fff7ed;
  background-image: url("/kid-pattern.svg");
  background-repeat: repeat;
  background-size: 420px 420px;
  --report-primary: #2563eb;
  --report-secondary: #10b981;
  --report-soft: #eef6ff;
  --report-hero-start: #2f7df6;
  --report-hero-end: #12b981;
  padding: 0;
}

.parent-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px 16px;
  overflow: hidden;
  position: relative;
  min-height: 184px;
  align-items: start;
  padding-bottom: 16px;
  background:
    linear-gradient(rgb(47 125 246 / 0.88), rgb(18 185 129 / 0.78)),
    url("/kid-pattern.svg"),
    linear-gradient(135deg, #2f7df6 0%, #12b981 62%, #fbbf24 100%);
  background-size: auto, 360px 360px, auto;
}

.hero-main {
  position: relative;
  z-index: 2;
}

.parent-hero h2 {
  margin: 8px 0 4px;
  font-size: 34px;
  line-height: 1.15;
}

.report-kicker {
  margin: 0;
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}

.kid-stickers {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.kid-stickers span {
  display: inline-grid;
  place-items: center;
  gap: 2px;
  align-items: center;
  width: 88px;
  min-height: 76px;
  border: 2px solid rgb(255 255 255 / 0.75);
  border-radius: 18px;
  padding: 9px 8px;
  background: rgb(255 255 255 / 0.18);
  color: #fff;
  text-align: center;
  font-size: 17px;
  font-weight: 900;
  line-height: 1.12;
  animation: stickerFloat 3.6s ease-in-out infinite;
  box-shadow: 0 12px 22px rgb(15 23 42 / 0.12);
}

.kid-stickers span.gold {
  background: #fef3c7;
  color: #92400e;
}

.kid-stickers span.green {
  background: #dcfce7;
  color: #047857;
}

.kid-stickers span.blue {
  background: #dbeafe;
  color: #1d4ed8;
}

.kid-stickers span.orange {
  background: #ffedd5;
  color: #c2410c;
}

.kid-stickers span.pink {
  background: #fce7f3;
  color: #be185d;
}

.kid-stickers em {
  font-size: 10px;
  line-height: 1.1;
  opacity: 0.74;
}

.school-slogan {
  position: absolute;
  left: 18px;
  bottom: 22px;
  z-index: 2;
  width: fit-content;
  max-width: min(360px, calc(100% - 220px));
  border-radius: 999px;
  padding: 6px 12px;
  background: rgb(255 255 255 / 0.18);
  color: #e0f2fe;
  font-size: 13px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.24);
}

.kid-stickers span:nth-child(2) {
  animation-delay: 0.35s;
}

.kid-stickers span:nth-child(3) {
  animation-delay: 0.7s;
}

.malu-hero-art {
  position: absolute;
  right: 22px;
  bottom: 10px;
  z-index: 1;
  width: min(180px, 32%);
  max-height: 76px;
  object-fit: contain;
  opacity: 0.95;
  filter: drop-shadow(0 14px 18px rgb(15 23 42 / 0.18));
  pointer-events: none;
}

.honors-section {
  position: relative;
  overflow: hidden;
  border-color: #fbcfe8;
  background: linear-gradient(135deg, #fff7fb, #fffaf0);
}

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

.honor-card {
  position: relative;
  display: grid;
  min-height: 82px;
  align-content: center;
  gap: 4px;
  overflow: hidden;
  border: 1px solid #fbcfe8;
  border-radius: 10px;
  padding: 14px 62px 12px 12px;
  background: #fff;
  animation: stickerFloat 3.8s ease-in-out infinite;
  box-shadow: 0 14px 26px rgb(15 23 42 / 0.08);
}

.honor-card i {
  position: absolute;
  top: 10px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: #fef3c7;
  color: #92400e;
  font-style: normal;
  font-size: 28px;
  box-shadow: 0 10px 18px rgb(245 158 11 / 0.24);
}

.honor-card strong {
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
}

.honor-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
}

.honor-card.gold {
  border-color: #fde68a;
  background: #fffbeb;
  color: #b45309;
}

.honor-card.gold i {
  background: linear-gradient(135deg, #fef3c7, #f59e0b);
  color: #78350f;
}

.honor-card.green {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.honor-card.green i {
  background: linear-gradient(135deg, #dcfce7, #34d399);
  color: #064e3b;
}

.honor-card.blue {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.honor-card.blue i {
  background: linear-gradient(135deg, #dbeafe, #60a5fa);
  color: #1e3a8a;
}

.honor-card.orange {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #c2410c;
}

.honor-card.orange i {
  background: linear-gradient(135deg, #ffedd5, #fb923c);
  color: #7c2d12;
}

.honor-card.pink {
  border-color: #fbcfe8;
  background: #fdf2f8;
  color: #be185d;
}

.honor-card.pink i {
  background: linear-gradient(135deg, #fce7f3, #f472b6);
  color: #831843;
}

.honor-card:nth-child(2) {
  animation-delay: 0.35s;
}

.honor-card:nth-child(3) {
  animation-delay: 0.7s;
}

@keyframes stickerFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

.hero-info-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  max-width: 620px;
  margin-top: 10px;
}

.hero-info-tags span {
  display: inline-grid;
  gap: 1px;
  max-width: 100%;
  border-radius: 999px;
  padding: 6px 11px;
  background: rgb(255 255 255 / 0.18);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.18;
  box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.22);
}

.hero-info-tags span:nth-child(1) {
  background: #fef3c7;
  color: #92400e;
}

.hero-info-tags span:nth-child(2) {
  background: #dcfce7;
  color: #047857;
}

.hero-info-tags span:nth-child(3) {
  background: #dbeafe;
  color: #1d4ed8;
}

.hero-info-tags span:nth-child(4) {
  background: #fce7f3;
  color: #be185d;
}
.parent-band {
  grid-template-columns: 1fr;
  gap: 10px;
  border-color: #fed7aa;
  padding: 14px 16px;
  background: #fffaf0;
}

.focus-labels {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-labels span {
  display: inline-grid;
  gap: 1px;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 11px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 13px;
  font-weight: 800;
}

.parent-report-view em {
  display: block;
  font-style: normal;
  line-height: 1.15;
  opacity: 0.78;
  font-size: 10px;
  font-weight: 800;
}

.focus-labels span:nth-child(3) {
  background: #dcfce7;
  color: #047857;
}

.focus-labels span:nth-child(4) {
  background: #fef3c7;
  color: #b45309;
}

.focus-labels .label-title {
  background: #f97316;
  color: #fff;
}

.focus-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.focus-summary span {
  display: inline-grid;
  gap: 1px;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.parent-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.parent-section-title strong,
.parent-section-title span {
  display: inline-grid;
  gap: 1px;
  align-items: center;
  min-height: 32px;
  border-radius: 999px;
  padding: 6px 12px;
}

.parent-section-title strong {
  color: #fff;
  font-size: 16px;
}

.parent-section-title span {
  border: 1px solid currentColor;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.parent-section-title.blue strong {
  background: #2563eb;
}

.parent-section-title.blue span {
  color: #2563eb;
}

.parent-section-title.green strong {
  background: #10b981;
}

.parent-section-title.green span {
  color: #047857;
}

.parent-section-title.yellow strong {
  background: #f59e0b;
}

.parent-section-title.yellow span {
  color: #b45309;
}

.parent-section-title.orange strong {
  background: #f97316;
}

.parent-section-title.orange span {
  color: #c2410c;
}

.parent-section-title.purple strong {
  background: #7c3aed;
}

.parent-section-title.purple span {
  color: #6d28d9;
}

.parent-section-title.pink strong {
  background: #ec4899;
}

.parent-section-title.pink span {
  color: #be185d;
}

.parent-overview-chart {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  padding: 10px 12px;
  background: linear-gradient(135deg, #eff6ff 0%, #ecfdf5 100%);
}

.parent-overview-chart.perfect {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgb(250 204 21 / 0.35), 0 12px 28px rgb(245 158 11 / 0.22);
}

.parent-overview-chart.great {
  border-color: #f9a8d4;
  box-shadow: 0 0 0 1px rgb(249 168 212 / 0.38), 0 12px 28px rgb(236 72 153 / 0.18);
}

.parent-overview-chart.steady {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgb(147 197 253 / 0.38), 0 12px 28px rgb(37 99 235 / 0.16);
}

.parent-overview-chart.focus {
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgb(134 239 172 / 0.42), 0 12px 28px rgb(16 185 129 / 0.18);
}

.overview-score-stack {
  display: grid;
  justify-items: center;
  gap: 7px;
}

.overview-note {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.overview-note > span {
  display: inline-grid;
  gap: 1px;
  border-radius: 999px;
  padding: 6px 10px;
  background: #fff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}

.completion-ring {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 999px;
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#f59e0b calc(var(--value) * 1%), #dbeafe 0);
}

.completion-ring.great {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#ec4899 calc(var(--value) * 1%), #fce7f3 0);
}

.completion-ring.steady {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#2563eb calc(var(--value) * 1%), #dbeafe 0);
}

.completion-ring.focus {
  background:
    radial-gradient(circle at center, #fff 0 58%, transparent 59%),
    conic-gradient(#10b981 calc(var(--value) * 1%), #dcfce7 0);
}

.completion-ring strong,
.completion-ring span {
  grid-column: 1;
  grid-row: 1;
}

.completion-ring strong {
  transform: translateY(-7px);
  color: var(--report-primary);
  font-size: 24px;
}

.completion-ring span {
  transform: translateY(20px);
  color: var(--muted);
  font-size: 11px;
}

.parent-report-section {
  position: relative;
  overflow: hidden;
  border-color: #f1e6d6;
  box-shadow: 0 10px 24px rgb(15 23 42 / 0.05);
}

.module-mascot {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 0;
  width: 76px;
  height: 76px;
  border: 3px solid #fff;
  border-radius: 24px;
  object-fit: cover;
  opacity: 0.26;
  transform: rotate(4deg);
  box-shadow: 0 10px 22px rgb(15 23 42 / 0.12);
  pointer-events: none;
}

.comment-mascot,
.goal-mascot {
  transform: rotate(-5deg);
}

.parent-report-section > :not(.module-mascot) {
  position: relative;
  z-index: 1;
}

.parent-summary-card {
  min-height: 104px;
  padding: 12px;
}

.parent-summary-card.perfect {
  border-color: #facc15;
  box-shadow: 0 0 0 1px rgb(250 204 21 / 0.35), 0 10px 24px rgb(245 158 11 / 0.2);
}

.parent-summary-card.great {
  border-color: #f9a8d4;
  box-shadow: 0 0 0 1px rgb(249 168 212 / 0.4), 0 10px 24px rgb(236 72 153 / 0.16);
}

.parent-summary-card.steady {
  border-color: #93c5fd;
  box-shadow: 0 0 0 1px rgb(147 197 253 / 0.4), 0 10px 24px rgb(37 99 235 / 0.16);
}

.parent-summary-card.focus {
  border-color: #86efac;
  box-shadow: 0 0 0 1px rgb(134 239 172 / 0.42), 0 10px 24px rgb(16 185 129 / 0.16);
}

.parent-report-view .summary-card > span {
  display: inline-grid;
  gap: 1px;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
  font-weight: 800;
}

.parent-report-view .summary-card:nth-child(2n) > span {
  background: #ecfdf5;
  color: #047857;
}

.parent-report-view .summary-card:nth-child(3n) > span {
  background: #fff7ed;
  color: #c2410c;
}

.parent-report-view .summary-card:nth-child(4n) > span {
  background: #fdf2f8;
  color: #be185d;
}

.performance-badge {
  display: inline-grid;
  grid-template-columns: 24px auto;
  gap: 6px;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  border-radius: 999px;
  padding: 5px 10px 5px 5px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.performance-badge b,
.level-badge b {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: rgb(255 255 255 / 0.82);
  font-size: 13px;
  font-style: normal;
  line-height: 1;
}

.performance-badge span {
  display: inline-grid;
  gap: 1px;
}

.performance-badge.perfect {
  background: #fef3c7;
  color: #92400e;
}

.performance-badge.great {
  background: #fce7f3;
  color: #be185d;
}

.performance-badge.steady {
  background: #dbeafe;
  color: #1d4ed8;
}

.performance-badge.focus {
  background: #dcfce7;
  color: #047857;
}

.parent-comment-block {
  gap: 10px;
}

.parent-numbered-comment-list li {
  border-color: #fbcfe8;
  background: #fff7fb;
}

.parent-numbered-comment-list li strong {
  background: #fce7f3;
  color: #be185d;
}

.parent-comment-block > div:nth-child(2) .parent-numbered-comment-list li {
  border-color: #fed7aa;
  background: #fff7ed;
}

.parent-comment-block > div:nth-child(2) .parent-numbered-comment-list li strong {
  background: #ffedd5;
  color: #c2410c;
}

.parent-comment-block > div:nth-child(3) .parent-numbered-comment-list li {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.parent-comment-block > div:nth-child(3) .parent-numbered-comment-list li strong {
  background: #dcfce7;
  color: #047857;
}

.ability-portrait {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  margin-bottom: 14px;
}

.ability-score {
  display: grid;
  place-items: center;
  min-height: 118px;
  border-radius: 8px;
  background: linear-gradient(135deg, #7c3aed, #2563eb 48%, #10b981);
  color: #fff;
}

.ability-score strong {
  font-size: 38px;
  line-height: 1;
}

.ability-score span {
  margin-top: 6px;
  color: #dbeafe;
  font-size: 12px;
}

.ability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.ability-tags span {
  display: inline-grid;
  gap: 1px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 7px 10px;
  background: #eff6ff;
  color: var(--report-primary);
  font-size: 13px;
  font-weight: 700;
}

.parent-report-view .ability-row {
  grid-template-columns: minmax(0, 1fr) 82px;
}

.ability-row > .level-badge {
  display: grid;
  grid-template-columns: 22px 26px;
  grid-template-rows: auto auto;
  gap: 1px 5px;
  align-items: center;
  justify-content: center;
  width: 78px;
  height: auto;
  min-height: 46px;
  border-radius: 12px;
  padding: 5px 7px;
  color: #fff;
  font-weight: 900;
  box-shadow: 0 10px 18px rgb(15 23 42 / 0.12);
}

.ability-row > .level-badge b {
  grid-row: 1 / 3;
  color: currentColor;
}

.ability-row > .level-badge strong {
  display: block;
  width: auto;
  min-height: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font-size: 18px;
  line-height: 1;
}

.ability-row > .level-badge em {
  color: inherit;
  font-size: 9px;
  opacity: 0.88;
}

.level-badge.level-s {
  background: linear-gradient(135deg, #f59e0b, #facc15);
  color: #78350f;
}

.level-badge.level-a {
  background: linear-gradient(135deg, #ec4899, #f9a8d4);
}

.level-badge.level-b {
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff;
}

.level-badge.level-c {
  background: linear-gradient(135deg, #10b981, #86efac);
  color: #064e3b;
}

.parent-report-view .ability-row > div > strong {
  display: inline-grid;
  gap: 1px;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 9px;
  background: #f3e8ff;
  color: #6d28d9;
  font-size: 13px;
}

.parent-report-view .ability-row:nth-child(2n) > div > strong {
  background: #dcfce7;
  color: #047857;
}

.parent-report-view .ability-row:nth-child(3n) > div > strong {
  background: #e0f2fe;
  color: #0369a1;
}

.parent-report-view .tag-list span {
  border-color: transparent;
  background: #dcfce7;
  color: #047857;
  font-weight: 800;
}

.parent-report-view .tag-list span:nth-child(2n) {
  background: #e0f2fe;
  color: #0369a1;
}

.parent-report-view .tag-list span:nth-child(3n) {
  background: #fef3c7;
  color: #b45309;
}

.parent-report-view .knowledge-map span {
  gap: 2px;
  border-color: transparent;
  background: #ede9fe;
  color: #6d28d9;
  box-shadow: 0 8px 18px rgb(109 40 217 / 0.12);
}

.parent-report-view .knowledge-map span:nth-child(4n + 1) {
  background: #dcfce7;
  color: #047857;
}

.parent-report-view .knowledge-map span:nth-child(4n + 3) {
  background: #e0f2fe;
  color: #0369a1;
}

.parent-report-view .knowledge-map i {
  background: #f59e0b;
}

.parent-report-view .info-list dt {
  display: inline-grid;
  gap: 1px;
  width: fit-content;
  min-height: 26px;
  align-items: center;
  border-radius: 999px;
  padding: 4px 8px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 12px;
  font-weight: 800;
}

.parent-report-view .info-list dd {
  display: inline-grid;
  gap: 1px;
  width: fit-content;
  max-width: 100%;
  min-height: 28px;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow-wrap: anywhere;
  box-shadow: inset 0 0 0 1px #dbe4ef;
}

.parent-report-view .info-list dd:nth-of-type(2n) {
  background: #ecfdf5;
  color: #047857;
  box-shadow: inset 0 0 0 1px #bbf7d0;
}

.parent-report-view .info-list dd:nth-of-type(3n) {
  background: #fff7ed;
  color: #c2410c;
  box-shadow: inset 0 0 0 1px #fed7aa;
}

.parent-comment-block > div {
  border: 1px solid #fbcfe8;
  border-radius: 8px;
  padding: 12px;
  background: #fff7fb;
}

.parent-comment-block h4 {
  display: inline-grid;
  gap: 1px;
  width: fit-content;
  min-height: 30px;
  align-items: center;
  margin-top: 0;
  border-radius: 999px;
  padding: 5px 10px;
  background: #fce7f3;
  color: #be185d;
  font-size: 13px;
}

.parent-comment-block > div:nth-child(2) h4 {
  background: #fff7ed;
  color: #c2410c;
}

.parent-comment-block > div:nth-child(3) h4 {
  background: #ecfdf5;
  color: #047857;
}

.parent-goal-list {
  display: grid;
  gap: 10px;
  padding-left: 0;
  list-style: none;
}

.parent-goal-list li {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 12px;
  background: #fffaf0;
}

.parent-goal-list li strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #fef3c7;
  color: #b45309;
}

.parent-goal-list li span {
  color: #374151;
  line-height: 1.7;
}

.ratio-input input.readonly-attendance,
.ratio-input input[readonly] {
  background: #f1f5f9;
  border-color: #cbd5e1;
  color: #64748b;
  cursor: not-allowed;
  box-shadow: none;
}

.ratio-input input.manual-attendance {
  background: #fff;
  border-color: #38bdf8;
  color: #0f172a;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.16);
}

.th-action-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}

button.tiny {
  min-height: 0;
  border-radius: 999px;
  font-size: 11px;
  line-height: 1;
  padding: 5px 8px;
}

@media (max-width: 720px) {
  .comment-model-layout,
  .comment-template-head,
  .comment-template-name-row,
  .comment-template-text-grid {
    grid-template-columns: 1fr;
  }

  .topbar,
  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  input[type="file"] {
    min-width: 0;
    width: 100%;
  }

  button {
    width: 100%;
  }

  .steps {
    grid-template-columns: 1fr;
  }

  .role-bar,
  .account-panel,
  .delivery-progress-panel,
  .login-account-grid,
  .account-row,
  .account-add-form,
  .backup-row,
  .backup-restore-box,
  .system-health-grid,
  .supervision-card-grid,
  .supervision-row,
  .teacher-ready-grid {
    grid-template-columns: 1fr;
  }

  .account-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .actions {
    flex-direction: column;
  }

  .summary-grid,
  .ability-grid,
  .ability-grid.radar-mode,
  .two-col,
  .report-band,
  .placeholder-grid,
  .designer-layout,
  .step-editor-layout,
  .live-summary-grid,
  .learning-audit-summary,
  .learning-audit-lists,
  .summary-grid.summary-progress-mode,
  .goal-card-mode .goal-list,
  .knowledge-map,
  .material-preview-grid,
  .honor-grid,
  .comment-audit-summary,
  .comment-audit-card,
  .material-student-card,
  .analysis-edit-grid {
    grid-template-columns: 1fr;
  }

  .table-tools,
  .preview-toolbar {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .report-hero {
    flex-direction: column;
  }

  body {
    background: #fff7ed;
  }

  .parent-report-shell {
    width: 100%;
    margin: 0;
  }

  .parent-report-view {
    border-radius: 0;
    background: #fff7ed;
    background-image: url("/kid-pattern.svg");
    background-repeat: repeat;
    background-size: 360px 360px;
    padding: 0 12px 20px;
  }

  .parent-hero {
    grid-template-columns: 1fr;
    margin: 0 -12px;
    border-radius: 0 0 18px 18px;
    min-height: 196px;
    padding: 24px 18px 72px;
  }

  .parent-section-title {
    flex-wrap: wrap;
  }

  .parent-hero h2 {
    font-size: 32px;
  }

  .malu-hero-art {
    right: 12px;
    bottom: 14px;
    width: min(210px, 58%);
    max-height: 72px;
    object-fit: contain;
  }

  .module-mascot {
    width: 58px;
    height: 58px;
    opacity: 0.2;
  }

  .report-mark {
    width: fit-content;
    max-width: 178px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .hero-info-tags {
    max-width: 100%;
  }

  .hero-info-tags span {
    font-size: 12px;
  }

  .kid-stickers {
    gap: 8px;
  }

  .kid-stickers span {
    width: 78px;
    min-height: 68px;
    border-radius: 16px;
    padding: 8px 6px;
    font-size: 15px;
  }

  .school-slogan {
    left: 18px;
    bottom: 24px;
    max-width: min(230px, 58%);
    font-size: 12px;
  }

  .parent-band,
  .parent-report-section {
    padding: 16px;
  }

  .parent-overview-chart,
  .ability-portrait {
    grid-template-columns: 1fr;
  }

  .parent-report-view .summary-grid,
  .parent-report-view .summary-grid.summary-progress-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .parent-report-view .ability-grid,
  .parent-report-view .ability-grid.radar-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .parent-summary-card {
    min-height: 132px;
    padding: 9px;
  }

  .honor-card {
    min-height: 78px;
    padding: 12px 50px 10px 10px;
  }

  .honor-card i {
    right: 8px;
    width: 40px;
    height: 40px;
    font-size: 24px;
  }

  .parent-report-view .ability-card {
    min-height: 156px;
    padding: 9px;
  }

  .parent-report-view .ability-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .ability-row > .level-badge {
    justify-self: start;
    width: 74px;
    min-height: 42px;
  }

  .parent-report-view .summary-card strong {
    font-size: 18px;
  }

  .parent-report-view .summary-card > span,
  .performance-badge {
    max-width: 100%;
  }

  .parent-report-view .summary-card > span,
  .parent-report-view .ability-row > div > strong,
  .parent-report-view .tag-list span,
  .parent-report-view .info-list dd {
    overflow-wrap: anywhere;
  }

  .completion-ring {
    margin: 0 auto;
  }

  .section-title {
    display: block;
  }

  .section-title span {
    display: block;
    margin-top: 4px;
  }

  .summary-card strong {
    font-size: 22px;
  }

  .knowledge-map {
    gap: 8px;
  }

  .knowledge-map span {
    min-height: 46px;
  }

  .material-preview-grid img {
    height: auto;
  }
}

@media (max-width: 420px) {
  .parent-report-view .summary-grid,
  .parent-report-view .summary-grid.summary-progress-mode,
  .parent-report-view .ability-grid,
  .parent-report-view .ability-grid.radar-mode {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .parent-section-title strong,
  .parent-section-title span {
    width: fit-content;
    max-width: 100%;
  }

  .parent-hero h2 {
    font-size: 28px;
  }
}

@media (max-width: 860px) {
  .login-card {
    grid-template-columns: 1fr;
  }

  .login-brand-panel {
    min-height: auto;
  }

  .login-logo-wrap {
    width: min(280px, 100%);
    min-height: 92px;
    margin-bottom: 18px;
  }

  .login-card h1 {
    font-size: 28px;
  }

  .login-slogan {
    display: grid;
  }
}

@media (max-width: 560px) {
  .login-screen {
    padding: 16px;
  }

  .login-card {
    padding: 12px;
    border-radius: 18px;
  }

  .login-brand-panel,
  .login-form-panel {
    padding: 22px;
  }

  .login-account-grid {
    grid-template-columns: 1fr;
  }
}

.parent-report-view.high-stage-report {
  --report-hero-start: #1f2937;
  --report-hero-end: #2563eb;
}

.parent-report-view.high-stage-report .parent-hero {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.94), rgba(37, 99, 235, 0.88)),
    radial-gradient(circle at 85% 15%, rgba(251, 191, 36, 0.28), transparent 34%);
}

.parent-report-view.high-stage-report .malu-hero-art,
.parent-report-view.high-stage-report .module-mascot {
  opacity: 0.16;
}

.parent-report-view.high-stage-report .parent-band {
  border-color: #c7d2fe;
  background: linear-gradient(135deg, #eef2ff, #f8fafc);
}

.parent-report-view.high-stage-report .focus-labels {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.parent-report-view.high-stage-report .focus-labels span {
  background: #ffffff;
  border-color: #dbeafe;
  color: #1e3a8a;
}

.parent-report-view.high-stage-report .focus-labels .label-title {
  background: #1e3a8a;
  color: #fff;
}

.parent-report-view.high-stage-report .focus-summary span {
  background: #e0f2fe;
  color: #075985;
}

.parent-report-view.high-stage-report .parent-overview-chart {
  background: linear-gradient(135deg, #f8fafc, #eff6ff);
  border-color: #bfdbfe;
}

.parent-report-view.high-stage-report .ability-portrait {
  background: linear-gradient(135deg, #111827, #1d4ed8);
}

.parent-report-view.high-stage-report .ability-action {
  color: #1d4ed8;
}

.certificate-report-section {
  display: grid;
  gap: 12px;
  border-color: #f8d6a8;
  background: linear-gradient(135deg, #fffaf2, #ffffff);
}

.certificate-report-head {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: baseline;
  justify-content: space-between;
}

.certificate-report-head strong {
  color: #92400e;
  font-size: 22px;
  letter-spacing: 0;
}

.certificate-report-head strong em {
  display: inline-block;
  margin-left: 8px;
  color: #b45309;
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.certificate-report-head span {
  border: 1px solid #fed7aa;
  border-radius: 999px;
  padding: 5px 9px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 12px;
  font-weight: 900;
}

.certificate-report-canvas {
  --certificate-scale: 1;
  position: relative;
  overflow: hidden;
  width: 100%;
  border: 1px solid #f1d5ad;
  border-radius: 8px;
  background: #fffaf2;
  box-shadow: 0 16px 36px rgb(146 64 14 / 0.1);
}

.certificate-report-canvas img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1276 / 1789;
}

.certificate-text {
  position: absolute;
  z-index: 2;
  display: block;
  max-width: 72%;
  font-size: calc(var(--certificate-size, 28) * var(--certificate-scale, 1) * 1px);
  line-height: 1;
  opacity: 1;
  text-align: center;
  text-rendering: geometricPrecision;
  transform: translate(-50%, -50%);
  transition: opacity 0.18s ease;
  white-space: nowrap;
}

.certificate-report-canvas:not(.certificate-ready) .certificate-text {
  opacity: 0;
}

.certificate-name {
  min-width: calc(180px * var(--certificate-scale, 1));
}

@media (max-width: 760px) {
  .certificate-config-grid,
  .certificate-template-list {
    grid-template-columns: 1fr;
  }

  .certificate-class-row,
  .certificate-class-row.head {
    grid-template-columns: 1fr;
  }

  .certificate-class-row.head {
    display: none;
  }

  .parent-report-view.high-stage-report .focus-labels {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .paper-analysis-head,
  .paper-analysis-grid {
    grid-template-columns: 1fr;
  }

  .paper-score-pill {
    min-height: 70px;
  }
}
