:root {
  color-scheme: light;
  --bg: #f4f7fb;
  --card: #ffffff;
  --ink: #172033;
  --muted: #647089;
  --line: #dfe6f1;
  --primary: #246bfe;
  --primary-dark: #174bc1;
  --soft: #eef4ff;
  --soft-2: #f7faff;
  --success: #138a54;
  --warn: #b7791f;
  --shadow: 0 18px 45px rgba(31, 45, 71, 0.1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(36, 107, 254, 0.12), transparent 28rem),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "PingFang SC", Inter, system-ui, -apple-system, sans-serif;
}

body:not(.is-admin) .admin-only,
body:not(.is-admin) .db-editor {
  display: none;
}

body.is-teacher .teacher-class-grid {
  grid-template-columns: 1fr;
}

.tools-page {
  min-height: 100vh;
  padding: 0;
  overflow: hidden;
}

.tools-workspace {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.tools-sidebar {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 100vh;
  padding: 18px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 10px 0 30px rgba(31, 45, 71, 0.06);
}

.tools-brand h1 {
  font-size: 24px;
  letter-spacing: 0;
}

.tools-brand p:not(.eyebrow) {
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.tool-tabs {
  display: grid;
  gap: 8px;
}

.tool-tab {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 54px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
}

.tool-tab.active,
.tool-tab:hover {
  border-color: rgba(36, 107, 254, 0.5);
  background: var(--soft);
}

.tool-tab span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 24px;
  border-radius: 6px;
  background: #fff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.tool-tab strong,
.tool-tab small {
  display: block;
}

.tool-tab strong {
  margin-top: 0;
  font-size: 16px;
}

.tool-tab small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.tools-legacy {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.tools-legacy strong {
  font-size: 13px;
}

.tools-legacy a {
  color: var(--primary);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.tool-stage {
  min-width: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 14px;
}

.tool-stage-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 62px;
  padding: 0 8px 12px;
}

.tool-stage-head h2 {
  font-size: 22px;
}

.tool-frame-wrap {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 28px rgba(31, 45, 71, 0.07);
}

.tool-frame-wrap iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.login-page {
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
  background: #f1f2ef;
  color: #1b2028;
}

.login-page::before {
  position: fixed;
  inset: 0 auto 0 0;
  width: 8px;
  background: #b3212d;
  content: "";
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(380px, 0.88fr);
  align-items: center;
  gap: 72px;
  width: min(1180px, calc(100% - 96px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 56px 0;
}

.login-brand {
  position: relative;
  align-self: stretch;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 32px 72px 32px 16px;
  border-right: 1px solid #cfd3cf;
}

.login-brand::after {
  position: absolute;
  top: 50%;
  right: -4px;
  width: 7px;
  height: 56px;
  background: #b3212d;
  content: "";
  transform: translateY(-50%);
}

.login-brand-logo {
  display: block;
  width: min(520px, 100%);
  height: auto;
  object-fit: contain;
}

.login-motto {
  display: grid;
  grid-template-columns: minmax(36px, 68px) max-content minmax(36px, 68px);
  align-items: center;
  justify-content: center;
  gap: 18px;
  width: 100%;
  margin-top: 56px;
}

.login-motto::after {
  display: block;
  width: 100%;
  height: 1px;
  background: #b3212d;
  content: "";
}

.login-motto-mark {
  display: block;
  width: 100%;
  height: 1px;
  background: #b3212d;
}

.login-motto p {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 18px;
  font-family: "STSong", "Songti SC", "SimSun", serif;
  font-size: 30px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0;
  color: #17243b;
}

.login-motto p span {
  display: block;
  white-space: nowrap;
}

.login-motto p span:last-child {
  margin-left: 0;
  color: inherit;
}

.login-panel {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding: 40px;
  border: 1px solid #d8dbd7;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(25, 31, 42, 0.1);
}

.login-panel::before {
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: #b3212d;
  content: "";
}

.login-heading {
  padding-bottom: 2px;
}

.login-panel h1 {
  margin: 0;
  color: #1b2028;
  font-size: 34px;
  font-weight: 800;
  line-height: 1.24;
  letter-spacing: 0;
}

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

.login-form label {
  margin: 0;
}

.login-form label > span {
  margin-bottom: 8px;
  color: #4d5666;
  font-size: 13px;
  font-weight: 700;
}

.login-form input {
  height: 50px;
  padding: 0 14px;
  border: 1px solid #cfd4dc;
  border-radius: 4px;
  background: #fbfcfd;
  color: #1b2028;
}

.login-form input:focus {
  border-color: #263d78;
  box-shadow: 0 0 0 3px rgba(38, 61, 120, 0.12);
}

.login-form .primary-button {
  min-height: 50px;
  margin-top: 2px;
  border-radius: 4px;
  background: #263d78;
  box-shadow: none;
  font-size: 15px;
}

.login-form .primary-button:hover {
  background: #1b2e61;
}

.login-form .hint {
  min-height: 22px;
  margin: -4px 0 0;
  color: #747c89;
  font-size: 12px;
  line-height: 1.65;
}

.login-updates {
  margin-top: 26px;
  padding-top: 20px;
  border-top: 1px solid #e0e2df;
}

.login-updates-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.login-updates-heading strong {
  color: #1b2028;
  font-size: 15px;
}

.login-updates-heading span {
  color: #b3212d;
  font-size: 12px;
  font-weight: 800;
}

.login-updates ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.login-updates li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  color: #687180;
  font-size: 12px;
  line-height: 1.6;
}

.login-updates li[hidden] {
  display: none !important;
}

.login-updates time {
  color: #263d78;
  font-weight: 800;
  white-space: nowrap;
}

.login-updates li > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .login-page::before {
    width: 5px;
  }

  .login-shell {
    grid-template-columns: 1fr;
    gap: 34px;
    width: min(640px, calc(100% - 48px));
    padding: 40px 0;
  }

  .login-brand {
    align-self: auto;
    padding: 8px 4px 34px;
    border-right: 0;
    border-bottom: 1px solid #cfd3cf;
  }

  .login-brand::after {
    top: auto;
    right: auto;
    bottom: -4px;
    left: 0;
    width: 56px;
    height: 7px;
    transform: none;
  }

  .login-brand-logo {
    width: min(430px, 82%);
  }

  .login-motto {
    grid-template-columns: minmax(28px, 56px) max-content minmax(28px, 56px);
    gap: 14px;
    margin-top: 30px;
  }

  .login-motto-mark {
    width: 100%;
  }

  .login-motto p {
    gap: 16px;
    font-size: 26px;
  }

  .login-motto p span:last-child {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .login-shell {
    gap: 24px;
    width: calc(100% - 32px);
    padding: 28px 0;
  }

  .login-brand {
    padding: 4px 4px 26px;
  }

  .login-brand-logo {
    width: min(360px, 94%);
  }

  .login-motto {
    grid-template-columns: 24px max-content 24px;
    gap: 10px;
    margin-top: 24px;
  }

  .login-motto-mark {
    width: 100%;
    height: 1px;
  }

  .login-motto p {
    gap: 12px;
    font-size: 21px;
  }

  .login-motto p span:last-child {
    margin-left: 0;
  }

  .login-panel {
    padding: 30px 22px 26px;
  }

  .login-panel h1 {
    font-size: 30px;
  }

  .login-form {
    margin-top: 24px;
  }

  .login-updates li {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 8px;
  }
}

button, input, textarea, select { font: inherit; }
button { cursor: pointer; border: 0; }
button:disabled { opacity: 0.65; cursor: not-allowed; }

.app-shell {
  width: min(1360px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero, .layout, .panel-heading, .actions, .mini-actions { display: flex; }
.hero {
  align-items: stretch;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1, h2, p { margin: 0; }
h1 { font-size: clamp(32px, 5vw, 54px); letter-spacing: -0.04em; }
h2 { font-size: 20px; }
.hero-desc { margin-top: 10px; color: var(--muted); font-size: 17px; }

.hero-card {
  width: min(400px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255,255,255,0.72);
  box-shadow: var(--shadow);
}
.hero-card strong { display: block; margin-bottom: 8px; }
.hero-card span { color: var(--muted); line-height: 1.7; }

.layout { align-items: flex-start; gap: 16px; }
.form-panel { flex: 1 1 auto; min-width: 0; }
.side-stack { flex: 0 0 420px; min-width: 0; }
body:not(.is-admin) .form-panel { max-width: none; }

.panel {
  margin-bottom: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 28px rgba(31, 45, 71, 0.07);
}

.panel-heading {
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.panel-heading.sub { margin-top: 22px; }
.panel-heading.compact-heading { margin-bottom: 10px; }
.panel-heading > div:first-child { display: flex; align-items: center; gap: 10px; }

.section-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-weight: 900;
}

.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }

label { display: block; margin-bottom: 12px; }
label > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

input, textarea, select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--ink);
  outline: 0;
  transition: border 0.15s ease, box-shadow 0.15s ease;
}
input, select { height: 44px; padding: 0 13px; }
textarea { resize: vertical; padding: 12px 13px; line-height: 1.65; }
input:disabled { background: #f3f6fb; color: var(--muted); }
input:focus, textarea:focus, select:focus { border-color: rgba(36,107,254,0.65); box-shadow: 0 0 0 4px rgba(36,107,254,0.1); }

.class-summary, .empty-box {
  margin: 2px 0 12px;
  padding: 12px 14px;
  border: 1px dashed #c9d6eb;
  border-radius: 14px;
  background: var(--soft-2);
  color: var(--muted);
  line-height: 1.7;
}

.primary-button, .secondary-button, .ghost-button, .file-button, .compare-button, .danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 12px;
  padding: 0 16px;
  font-weight: 900;
}
.primary-button { background: var(--primary); color: #fff; box-shadow: 0 10px 20px rgba(36,107,254,0.18); }
.primary-button:hover { background: var(--primary-dark); }
.secondary-button { background: #172033; color: #fff; }
.compare-button { background: #138a54; color: #fff; box-shadow: 0 10px 20px rgba(19,138,84,0.15); }
.ghost-button, .file-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }
a.ghost-button { text-decoration: none; }
.ghost-button[data-copy-state="working"],
.ghost-button[data-copy-state="copied"] {
  border-color: rgba(36,107,254,0.35);
  background: var(--soft);
  color: var(--primary);
}
.ghost-button[data-copy-state="success"] {
  border-color: rgba(19,138,84,0.35);
  background: rgba(19,138,84,0.08);
  color: var(--success);
}
.ghost-button[data-copy-state="error"] {
  border-color: rgba(163,49,49,0.35);
  background: rgba(163,49,49,0.08);
  color: #a33131;
}
.small { min-height: 34px; padding: 0 10px; border-radius: 10px; font-size: 13px; }
.full { width: 100%; margin-top: 8px; }
.file-button { margin: 0; }
.file-button input { display: none; }
.actions { align-items: center; gap: 10px; margin-top: 8px; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0 0; background: linear-gradient(transparent, #fff 30%); }
.mini-actions { align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.hint { margin-top: 10px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.campus-global-status {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(36,107,254,0.22);
  border-radius: 8px;
  background: #eef5ff;
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}
.campus-global-status[data-tone="success"] {
  border-color: rgba(19,138,84,0.25);
  background: rgba(19,138,84,0.08);
  color: var(--success);
}
.campus-global-status[data-tone="error"] {
  border-color: rgba(163,49,49,0.28);
  background: rgba(163,49,49,0.08);
  color: #a33131;
}

.maintenance-banner {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid #efb85b;
  border-radius: 8px;
  background: #fff8e8;
  color: #8a4d00;
  font-size: 13px;
  font-weight: 900;
}

.maintenance-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dbe7ff;
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.maintenance-switch input {
  width: 16px;
  height: 16px;
}

.is-maintenance-mode .maintenance-switch {
  border-color: #efb85b;
  background: #fff3d3;
  color: #8a4d00;
}

.status-text { color: var(--muted); font-size: 13px; font-weight: 800; }
.busy .status-text { color: var(--primary); }
.busy .status-text::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 999px;
  background: var(--primary);
  animation: pulse 1.2s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 0.35; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1); }
}

.student-checklist { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.student-check-card {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}
.student-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}
.student-check-card input { width: 18px; height: 18px; margin-top: 0; }
.student-check-body { min-width: 0; }
.student-check-body strong { display: block; margin-bottom: 0; font-size: 18px; }
.added-student-card {
  align-items: flex-start;
}
.added-student-card input {
  width: 100%;
  height: 38px;
  margin-top: 8px;
}

.temporary-students {
  grid-column: 1 / -1;
  margin-top: 4px;
  padding: 14px;
  border: 1px dashed #c9d6eb;
  border-radius: 14px;
  background: var(--soft-2);
}

.temporary-student-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.temporary-student-grid label {
  margin-bottom: 0;
}

.student-notes-wrap {
  margin: 12px 0 4px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.mini-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.mini-section-title span {
  color: var(--muted);
  font-size: 13px;
}

.student-notes {
  display: grid;
  gap: 10px;
}

.student-note-card {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 0;
}

.student-note-card > span {
  margin: 0;
  padding-top: 10px;
  color: var(--ink);
  font-weight: 900;
}

.db-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.db-stats div {
  padding: 10px 8px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  text-align: center;
}
.db-stats strong { display: block; font-size: 20px; color: var(--primary); }
.db-stats span { color: var(--muted); font-size: 12px; }
.db-editor { margin-top: 14px; }
.db-editor summary { cursor: pointer; color: var(--primary); font-weight: 900; margin-bottom: 10px; }

.template-manager {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.template-version-list {
  display: grid;
  gap: 8px;
  max-height: 220px;
  overflow: auto;
  margin-bottom: 12px;
}

.template-version-item {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
  color: var(--ink);
  text-align: left;
}

.template-version-item.active {
  border-color: rgba(36,107,254,0.55);
  background: var(--soft);
}

.template-version-item strong,
.template-version-item span {
  display: block;
}

.template-version-item span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.template-editor textarea {
  min-height: 220px;
}

.template-actions {
  justify-content: flex-start;
}

.history-list { display: grid; gap: 8px; }
.history-item {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}
.history-item strong, .history-item span, .history-item small { display: block; }
.history-item span { color: var(--muted); margin-top: 3px; }
.history-item small { color: #8a96aa; margin-top: 6px; }
.usage-summary {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-bottom: 8px;
}
.usage-summary div {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px;
  background: var(--soft-2);
}
.usage-summary strong { display: block; font-size: 18px; color: var(--primary); }
.usage-summary span { color: var(--muted); font-size: 12px; font-weight: 700; }

.output-panel { margin-top: 0; }
.after-output-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.output {
  min-height: 320px;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}
.busy .output { border-color: rgba(36,107,254,0.45); }

.result-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.compare-output {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.compare-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(34, 50, 84, 0.07);
}

.compare-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.compare-card-head strong {
  display: block;
  color: var(--ink);
  font-size: 16px;
}

.compare-card-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.compare-card-head span {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.compare-card pre {
  min-height: 320px;
  margin: 0;
  padding: 16px;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.75;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
}

.compare-card .result-actions {
  margin: 0;
  padding: 10px 12px 12px;
  background: #fff;
}

.wechat-preview {
  width: 100%;
}

.wechat-phone {
  border: 1px solid #d8e0ea;
  border-radius: 12px;
  overflow: hidden;
  background: #ededed;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

.wechat-phone.compact {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.wechat-bar {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid #d9d9d9;
  background: #f6f6f6;
  color: #1f2933;
  font-weight: 800;
}

.wechat-chat {
  min-height: 460px;
  padding: 18px 16px 22px 54px;
  background: #ededed;
}

.wechat-bubble {
  display: block;
  width: min(620px, 100%);
  min-height: 420px;
  margin-left: auto;
  border: 1px solid #95d66c;
  border-radius: 8px;
  background: #95ec69;
  color: #111827;
  padding: 14px 16px;
  resize: vertical;
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.72;
  font-size: 15px;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.wechat-bubble:focus {
  outline: none;
  box-shadow:
    0 0 0 3px rgba(36,107,254,0.14),
    0 1px 2px rgba(0,0,0,0.08);
}

.compare-card .wechat-chat {
  min-height: 560px;
  max-height: 680px;
  overflow: auto;
  padding-left: 42px;
}

.compare-card .wechat-bubble {
  width: 100%;
  min-height: 520px;
  font-size: 14px;
}

.compare-card.loading pre {
  color: var(--muted);
}

.compare-card.has-error pre {
  color: #a33131;
}

.image-feedback-layout {
  align-items: flex-start;
}

.image-side {
  flex: 0 0 330px;
}

.image-actions {
  justify-content: flex-start;
  margin-top: 12px;
}

.template-inline-editor {
  display: grid;
  gap: 12px;
  margin: 12px 0 18px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.template-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.template-editor-head strong,
.template-editor-head span {
  display: block;
}

.template-editor-head strong {
  font-size: 15px;
}

.template-editor-head span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.template-inline-editor .compact-grid {
  gap: 10px;
}

.template-inline-editor textarea {
  min-height: 230px;
  line-height: 1.65;
  resize: vertical;
}

.template-save-line {
  display: flex;
  justify-content: flex-end;
}

.status-text[data-tone="success"] {
  color: #138a54;
}

.status-text[data-tone="warn"] {
  color: #a66b00;
}

.status-text[data-tone="error"] {
  color: #a33131;
}

.status-text[data-tone="busy"] {
  color: var(--primary);
}

.image-upload-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.image-upload-item {
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.image-upload-item img {
  width: 118px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
}

.image-upload-item strong,
.image-upload-item span {
  display: block;
}

.image-upload-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14px;
}

.image-upload-item span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.privacy-note {
  display: grid;
  gap: 6px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(19, 138, 84, 0.22);
  border-radius: 8px;
  background: rgba(19, 138, 84, 0.06);
}

.privacy-note span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.mini-student-card {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  margin-bottom: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.mini-student-card input[type="checkbox"] {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
  padding: 0;
  accent-color: var(--primary);
  box-shadow: none;
}

.mini-student-card > span {
  min-width: 0;
  margin-bottom: 0;
}

.mini-student-card strong {
  font-size: 16px;
  line-height: 1.35;
}

.compact-students {
  gap: 8px;
}

.image-action-status {
  min-width: 180px;
  padding-left: 2px;
  color: var(--muted);
}

.busy .image-action-status {
  color: var(--primary);
}

a.ghost-button {
  text-decoration: none;
}

.settlement-shell {
  max-width: 1480px;
}

.settlement-hero h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.hero-actions {
  justify-content: flex-start;
  margin-top: 14px;
}

.settlement-flow {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255,255,255,0.92);
  box-shadow: 0 10px 28px rgba(31, 45, 71, 0.07);
}

.flow-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  color: var(--ink);
  font-weight: 900;
}

.flow-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 12px;
}

.flow-step.active,
.flow-step:hover {
  border-color: rgba(36,107,254,0.4);
  background: var(--soft);
}

.settlement-panel {
  border-radius: 16px;
}

.settlement-import-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(420px, 1.5fr);
  gap: 16px;
  align-items: stretch;
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.upload-drop {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 190px;
  margin: 0;
  padding: 24px;
  border: 1px dashed #b9c8df;
  border-radius: 14px;
  background: #f8fbff;
  text-align: center;
  cursor: pointer;
}

.upload-drop input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-drop strong {
  font-size: 20px;
}

.upload-drop span {
  max-width: 360px;
  color: var(--muted);
  line-height: 1.6;
}

.settlement-settings {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fbfdff;
}

.settlement-kpis,
.settlement-total-band,
.issue-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.settlement-kpis div,
.settlement-total-band div,
.issue-stats div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fbfdff;
}

.settlement-kpis strong,
.settlement-total-band strong,
.issue-stats strong {
  display: block;
  color: var(--primary);
  font-size: 22px;
}

.settlement-kpis span,
.settlement-total-band span,
.issue-stats span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.audit-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.audit-layout .issue-stats {
  grid-template-columns: 1fr;
  margin-top: 0;
}

.issue-filters {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.issue-filter {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
}

.issue-filter.active {
  border-color: rgba(36,107,254,0.45);
  background: var(--soft);
  color: var(--primary);
}

.issue-filter span {
  color: var(--muted);
  font-size: 12px;
}

.review-guide {
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #c9d6eb;
  border-radius: 12px;
  background: #f8fbff;
  color: var(--muted);
  line-height: 1.6;
}

.issue-list {
  display: grid;
  gap: 12px;
}

.teacher-audit-groups {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.teacher-audit-empty,
.teacher-audit-card {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.teacher-audit-empty {
  padding: 16px;
  color: var(--muted);
  font-weight: 800;
}

.teacher-audit-card {
  overflow: hidden;
}

.teacher-audit-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.teacher-audit-head strong {
  font-size: 18px;
}

.teacher-audit-head span {
  color: var(--muted);
  font-weight: 900;
}

.teacher-audit-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.teacher-audit-table th,
.teacher-audit-table td {
  text-align: left;
}

.teacher-audit-table th:nth-child(2),
.teacher-audit-table td:nth-child(2),
.teacher-audit-table th:nth-child(3),
.teacher-audit-table td:nth-child(3),
.teacher-audit-table th:nth-child(4),
.teacher-audit-table td:nth-child(4) {
  text-align: right;
}

.issue-card {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.issue-card.danger {
  border-left-color: #c53030;
}

.issue-card.warn {
  border-left-color: #b7791f;
}

.issue-card.info {
  border-left-color: #246bfe;
}

.issue-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.issue-card-head span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.issue-card-head strong {
  display: block;
  font-size: 16px;
}

.issue-card p {
  padding: 12px 14px 0;
  color: var(--muted);
  line-height: 1.65;
}

.issue-action {
  margin: 12px 14px 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--soft-2);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 800;
}

.mini-table,
.settlement-table {
  width: 100%;
  border-collapse: collapse;
}

.mini-table {
  margin-top: 12px;
}

.mini-table th,
.mini-table td,
.settlement-table th,
.settlement-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 12px;
  text-align: right;
  vertical-align: middle;
  white-space: nowrap;
}

.mini-table th:first-child,
.mini-table td:first-child,
.mini-table th:nth-child(2),
.mini-table td:nth-child(2),
.settlement-table th:first-child,
.settlement-table td:first-child {
  text-align: left;
}

.mini-table th,
.settlement-table th {
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
}

.settlement-table td strong,
.settlement-table td small {
  display: block;
}

.settlement-table td small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.adjustment-panel {
  margin-top: 16px;
}

.adjustment-table input {
  min-width: 96px;
  height: 34px;
  border-radius: 8px;
  text-align: right;
}

.settlement-summary-empty {
  padding: 22px;
  border: 1px dashed #c9d6eb;
  border-radius: 14px;
  background: var(--soft-2);
  color: var(--muted);
  text-align: center;
}

.settlement-ready,
.settlement-blocked {
  margin: 14px 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 900;
}

.settlement-ready {
  border: 1px solid rgba(19,138,84,0.25);
  background: rgba(19,138,84,0.08);
  color: var(--success);
}

.settlement-blocked {
  border: 1px solid rgba(197,48,48,0.24);
  background: rgba(197,48,48,0.08);
  color: #9b2c2c;
}

.table-scroll {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.campus-page {
  background: #f6f8fb;
}

.campus-loading {
  position: fixed;
  inset: 0;
  z-index: 220;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(246, 248, 251, 0.88);
  backdrop-filter: blur(4px);
  transition: opacity 0.18s ease, visibility 0.18s ease;
}

.campus-loading.is-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.campus-loading-card {
  width: min(420px, 100%);
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}

.campus-loading-card strong,
.campus-loading-card span {
  display: block;
}

.campus-loading-card strong {
  font-size: 18px;
}

.campus-loading-card span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.campus-loading-bar {
  position: relative;
  height: 8px;
  margin-top: 16px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft);
}

.campus-loading-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  width: 42%;
  border-radius: inherit;
  background: var(--primary);
  animation: campus-loading-slide 1.2s ease-in-out infinite;
}

@keyframes campus-loading-slide {
  0% { transform: translateX(-105%); }
  55% { transform: translateX(100%); }
  100% { transform: translateX(245%); }
}

.campus-shell {
  width: min(1440px, calc(100% - 28px));
}

.campus-topbar {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.campus-topbar h1 {
  font-size: clamp(30px, 4vw, 46px);
  letter-spacing: 0;
}

.v2-stage-context {
  display: block;
  padding: 10px 0 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.v2-stage-context-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.v2-stage-date-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-height: 58px;
  white-space: nowrap;
}

.v2-stage-approval-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  font-size: 11px;
}

.campus-user-card {
  width: min(360px, 100%);
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 22px rgba(31,45,71,0.06);
}

.campus-user-card strong,
.campus-user-card span {
  display: block;
}

.campus-user-card span {
  margin: 5px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.campus-tabs {
  display: flex;
  gap: 8px;
  margin: 12px 0 16px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.campus-tab {
  min-height: 38px;
  padding: 0 16px;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  font-weight: 900;
}

.campus-tab.active,
.campus-tab:hover {
  background: var(--soft);
  color: var(--primary);
}

.v2-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border: 1px solid rgba(36, 107, 254, 0.25);
  border-radius: 999px;
  background: #f0f5ff;
  color: var(--primary-dark);
  font-size: 12px;
  font-weight: 900;
}

.stage-management-layout {
  display: grid;
  gap: 14px;
}

.stage-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.stage-tab-shell {
  position: relative;
  min-width: 0;
}

.stage-tab-shell .stage-tab {
  width: 100%;
  height: 100%;
  padding-right: 66px;
}

.stage-tab-adjust,
.stage-tab-pending {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 1;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  line-height: 24px;
}

.stage-tab-adjust {
  border: 1px solid rgba(36, 107, 254, 0.3);
  background: #fff;
  color: var(--primary);
  cursor: pointer;
}

.stage-tab-adjust:hover,
.stage-tab-adjust:focus-visible {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.stage-tab-pending {
  border: 1px solid rgba(239, 184, 91, 0.55);
  background: #fff8e8;
  color: #8a4d00;
}

.stage-tab {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

.stage-tab.active,
.stage-tab:hover,
.stage-tab:focus-visible {
  border-color: rgba(36, 107, 254, 0.55);
  background: var(--soft);
  color: var(--primary-dark);
}

.stage-tab span,
.stage-tab strong {
  display: block;
}

.stage-date-modal {
  width: min(620px, 100%);
}

.stage-date-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 20px 20px 4px;
}

.stage-date-request-list {
  display: grid;
  gap: 10px;
  padding: 20px;
}

.stage-date-request {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.stage-date-request strong,
.stage-date-request span,
.stage-date-request p {
  display: block;
}

.stage-date-request span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.stage-date-request p {
  margin-top: 8px;
  color: var(--ink);
  font-size: 13px;
}

.stage-date-request p b {
  margin: 0 6px;
  color: var(--primary);
}

.stage-tab span,
.stage-roster-head p,
.stage-roster-row span,
.stage-roster-note,
.stage-class-item small {
  color: var(--muted);
  font-size: 12px;
}

.stage-class-workspace {
  display: grid;
  grid-template-columns: minmax(250px, 0.55fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.stage-class-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-2);
}

.stage-class-filters label {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.stage-class-filters span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stage-class-list,
.stage-roster-list {
  display: grid;
  gap: 7px;
}

.stage-class-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.stage-class-item.active {
  border-color: rgba(36, 107, 254, 0.55);
  background: var(--soft-2);
}

.stage-class-select {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 2px;
  background: transparent;
  text-align: left;
}

.stage-class-select strong,
.stage-class-select span,
.stage-class-select small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stage-class-select span { color: var(--muted); font-size: 12px; }
.stage-class-scheduled { color: var(--success) !important; font-weight: 900; }
.stage-class-actions { display: flex; gap: 5px; align-items: start; }

.stage-roster-head {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.stage-roster-head h3 { margin: 4px 0 0; font-size: 20px; }
.stage-roster-head p { margin: 5px 0 0; }

.stage-roster-toolbar {
  display: flex;
  gap: 8px;
  margin: 12px 0;
}

.stage-roster-toolbar select { min-width: 0; flex: 1; }

.stage-roster-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.stage-roster-row > div { min-width: 0; }
.stage-roster-row span { display: block; margin-top: 3px; }
.stage-roster-note { margin: 12px 0 0; line-height: 1.5; }

.student-list-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 10px;
  margin: 0 0 14px;
  padding: 0 16px;
}

.student-list-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.student-list-filters span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.student-list-filters select {
  width: 100%;
  min-width: 0;
}

.campus-archive-layout.student-list-layout {
  grid-template-columns: minmax(0, 1fr);
}

.student-list-layout .archive-students-panel {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.student-list-layout .student-filter-summary,
.student-list-layout .student-list-filters {
  margin-left: 0;
  margin-right: 0;
}

.student-list-layout .v2-student-directory {
  overflow: visible;
  border: 0;
  background: transparent;
}

.student-directory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 9px;
}

.student-directory-item {
  display: grid;
  gap: 9px;
  min-width: 0;
  min-height: 92px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.student-directory-item:hover {
  border-color: rgba(36, 107, 254, 0.45);
  box-shadow: 0 5px 14px rgba(31, 45, 71, 0.08);
  transform: translateY(-1px);
}

.student-directory-head,
.student-directory-meta,
.student-directory-signals {
  display: flex;
  align-items: center;
  min-width: 0;
}

.student-directory-head {
  justify-content: space-between;
  gap: 8px;
}

.student-directory-head .text-link-button {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 15px;
  font-weight: 900;
}

.student-directory-head > span {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.student-directory-meta {
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.student-directory-meta span:first-child {
  flex: 0 0 auto;
  color: var(--ink);
}

.student-directory-meta span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-directory-signals {
  justify-content: space-between;
  gap: 8px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
}

.student-directory-signal {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-directory-signal::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin: 0 5px 1px 0;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.student-directory-signal.is-positive,
.student-directory-signal.is-scheduled { color: var(--success); }
.student-directory-signal.is-empty { color: var(--muted); }

.student-alpha-index {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  position: sticky;
  top: 8px;
  z-index: 4;
  margin-bottom: 16px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 5px 16px rgba(31, 45, 71, 0.07);
}

.student-alpha-index a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.student-alpha-index a:hover,
.student-alpha-index a:focus-visible {
  background: var(--soft);
  color: var(--primary);
}

.student-alpha-groups {
  display: grid;
  gap: 22px;
}

.student-alpha-group {
  min-width: 0;
  scroll-margin-top: 64px;
}

.student-alpha-group-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 9px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.student-alpha-group-head strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.student-alpha-group-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

@media (max-width: 820px) {
  .v2-stage-context-main { grid-template-columns: 1fr; }
  .v2-stage-date-actions { justify-content: flex-start; min-height: 34px; }
  .stage-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stage-date-form { grid-template-columns: 1fr; }
  .stage-date-request { align-items: flex-start; flex-direction: column; }
  .stage-class-filters { grid-template-columns: 1fr; }
  .student-list-filters { grid-template-columns: 1fr; }
  .stage-class-workspace { grid-template-columns: 1fr; }
}

.campus-view {
  display: none;
}

.campus-view.active {
  display: block;
}

.campus-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.campus-kpi {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
}

.campus-kpi span,
.campus-kpi small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.campus-kpi strong {
  display: block;
  margin: 6px 0 4px;
  font-size: 28px;
  line-height: 1;
}

.campus-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.55fr);
  gap: 14px;
  align-items: start;
}

.campus-grid.wide-left {
  grid-template-columns: minmax(0, 1.25fr) minmax(420px, 0.75fr);
}

.campus-grid.single-panel {
  grid-template-columns: minmax(0, 1fr);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.compact-list {
  gap: 7px;
}

.alert-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.alert-item.lost {
  grid-template-columns: minmax(0, 1fr) auto;
}

.alert-item > div {
  min-width: 0;
}

.alert-item strong b {
  color: #b7791f;
  font-size: 16px;
}

.alert-item.warn {
  border-color: rgba(183,121,31,0.35);
  background: rgba(183,121,31,0.08);
}

.alert-item.danger {
  border-color: rgba(197,48,48,0.36);
  background: rgba(197,48,48,0.08);
}

.alert-item.lost {
  border-color: rgba(45,55,72,0.22);
  background: #f8fafc;
}

.alert-item small {
  display: block;
  color: var(--muted);
  line-height: 1.45;
}

.alert-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.campus-archive-layout {
  display: grid;
  grid-template-columns: 292px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.archive-sidebar {
  position: sticky;
  top: 12px;
}

.teacher-selector,
.class-type-list {
  display: grid;
  gap: 6px;
}

.teacher-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  padding: 7px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.teacher-row.active {
  border-color: rgba(36,107,254,0.42);
  background: var(--soft);
}

.teacher-filter-button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.teacher-edit-button {
  min-height: 26px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.teacher-edit-button:hover {
  border-color: rgba(36,107,254,0.38);
  color: var(--primary);
}

.teacher-row strong,
.teacher-row span,
.class-type-item strong,
.class-type-item span {
  display: block;
}

.teacher-row strong,
.class-type-item strong {
  font-size: 14px;
  line-height: 1.2;
}

.teacher-row span,
.class-type-item span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.archive-class-filter {
  margin-top: 12px;
}

.class-type-list {
  max-height: 520px;
  overflow: auto;
  padding-right: 4px;
}

.class-type-group-title {
  margin: 8px 2px 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.class-type-group-title-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.class-type-item {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.class-type-item.active {
  border-color: rgba(36,107,254,0.45);
  background: var(--soft);
  color: var(--primary);
}

.class-type-with-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}

.class-type-select-button {
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
}

.class-type-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 4px;
  max-width: 104px;
}

.ghost-button.tiny {
  min-height: 24px;
  padding: 3px 6px;
  border-radius: 6px;
  font-size: 11px;
  line-height: 1.15;
}

.student-filter-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.student-filter-summary span {
  color: var(--muted);
  font-weight: 900;
}

.student-filter-summary small {
  flex-basis: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.history-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 8px;
}

.history-filter-button {
  min-height: 32px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.history-filter-button.active {
  border-color: #0f766e;
  background: #0f766e;
  color: #fff;
}

.history-filter-label {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.student-derived-tags {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-left: 6px;
  vertical-align: middle;
}

.student-derived-tags small {
  padding: 2px 5px;
  border: 1px solid #b7d9d3;
  border-radius: 999px;
  background: #effaf7;
  color: #0f766e;
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.student-name-search {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.student-name-search input {
  width: 224px;
  min-height: 34px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.student-name-search input:focus {
  outline: 2px solid rgba(36, 107, 254, 0.2);
  border-color: var(--primary);
}

.student-search-assignment {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.4;
}

.student-ledger-table table {
  min-width: 920px;
  table-layout: fixed;
}

.student-ledger-table select[multiple] {
  min-width: 260px;
  min-height: 140px;
  padding: 6px;
}

.student-ledger-table th:nth-child(1),
.student-ledger-table td:nth-child(1) {
  width: 96px;
}

.student-ledger-table th:nth-child(2),
.student-ledger-table td:nth-child(2) {
  width: 82px;
  text-align: right;
}

.student-ledger-table th:nth-child(3),
.student-ledger-table td:nth-child(3) {
  width: 70px;
}

.student-ledger-table th:nth-child(4),
.student-ledger-table td:nth-child(4) {
  width: 82px;
  text-align: right;
}

.student-ledger-table th:nth-child(5),
.student-ledger-table td:nth-child(5) {
  width: 72px;
}

.student-ledger-table th:nth-child(6),
.student-ledger-table td:nth-child(6),
.student-ledger-table th:nth-child(8),
.student-ledger-table td:nth-child(8),
.student-ledger-table th:nth-child(9),
.student-ledger-table td:nth-child(9) {
  width: 92px;
  text-align: right;
}

.student-ledger-table th:nth-child(7),
.student-ledger-table td:nth-child(7) {
  width: 96px;
}

.student-ledger-table th:nth-child(10),
.student-ledger-table td:nth-child(10) {
  width: 150px;
}

.student-ledger-table th,
.student-ledger-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.teacher-student-grid {
  min-width: 920px;
  table-layout: fixed;
}

.teacher-student-grid th:nth-child(1),
.teacher-student-grid td:nth-child(1) {
  width: 96px;
}

.teacher-student-grid th:nth-child(2),
.teacher-student-grid td:nth-child(2),
.teacher-student-grid th:nth-child(3),
.teacher-student-grid td:nth-child(3) {
  width: 86px;
  text-align: right;
}

.teacher-student-grid th:nth-child(4),
.teacher-student-grid td:nth-child(4),
.teacher-student-grid th:nth-child(5),
.teacher-student-grid td:nth-child(5) {
  width: 74px;
}

.teacher-student-grid th:nth-child(6),
.teacher-student-grid td:nth-child(6) {
  width: 260px;
}

.teacher-student-grid th:nth-child(7),
.teacher-student-grid td:nth-child(7) {
  width: 160px;
}

.teacher-self-summary {
  grid-template-columns: 1fr;
}

.text-link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--primary);
  font: inherit;
  font-weight: 900;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.enrollment-table {
  overflow: visible;
}

.enrollment-table-scroll {
  max-height: min(640px, calc(100vh - 300px));
  overflow: auto;
  scrollbar-gutter: stable both-edges;
}

.enrollment-table-scroll table {
  min-width: 1280px;
  table-layout: fixed;
}

.enrollment-table-scroll thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fbff;
}

.enrollment-table-scroll th,
.enrollment-table-scroll td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.enrollment-ledger-grid {
  width: 100%;
  border-collapse: collapse;
}

.enrollment-ledger-grid th,
.enrollment-ledger-grid td {
  vertical-align: top;
}

.enrollment-ledger-grid .ledger-col-index {
  width: 52px;
  text-align: center;
}

.enrollment-ledger-grid .ledger-col-business {
  width: 96px;
}

.enrollment-ledger-grid .ledger-col-product {
  width: 92px;
}

.enrollment-ledger-grid .ledger-col-class {
  width: 130px;
}

.enrollment-ledger-grid .ledger-col-student {
  width: 112px;
}

.enrollment-ledger-grid .ledger-col-detail {
  width: 84px;
  min-width: 84px;
  text-align: center;
}

.enrollment-ledger-grid .ledger-col-approval {
  width: 82px;
}

.enrollment-ledger-grid .ledger-col-registration-grade,
.enrollment-ledger-grid .ledger-col-current-grade {
  width: 86px;
}

.enrollment-ledger-grid .ledger-col-lessons,
.enrollment-ledger-grid .ledger-col-amount,
.enrollment-ledger-grid .ledger-col-balance {
  width: 96px;
  text-align: right;
}

.enrollment-ledger-grid .ledger-col-note {
  width: 230px;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.45;
}
.ledger-pagination {
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 2px 2px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.class-picker {
  position: relative;
  min-width: 210px;
}

.class-picker summary {
  max-width: 260px;
  min-height: 32px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

.class-picker[open] summary {
  border-color: rgba(36,107,254,0.42);
  background: var(--soft);
  color: var(--primary);
}

.class-picker select[multiple] {
  display: block;
  margin-top: 8px;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.42);
}

.modal-overlay[hidden] {
  display: none;
}

.student-detail-modal {
  width: min(920px, 100%);
  max-height: min(820px, calc(100vh - 48px));
  overflow: auto;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
}

.student-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.student-detail-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex: 0 0 auto;
}

.detail-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-section-title-row h3 {
  margin: 0;
}

.lesson-formula-modal {
  width: min(860px, 100%);
}

.lesson-formula-body {
  padding: 20px;
}

.lesson-formula-section + .lesson-formula-section {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.lesson-formula-section h3 {
  margin: 0 0 12px;
  font-size: 17px;
}

.lesson-formula-symbols {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.lesson-formula-symbols div,
.lesson-formula-equation {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.lesson-formula-symbols dt {
  color: var(--ink);
  font-weight: 900;
}

.lesson-formula-symbols dd {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.55;
}

.lesson-formula-equation + .lesson-formula-equation {
  margin-top: 10px;
}

.lesson-formula-equation strong,
.lesson-formula-equation span {
  display: block;
}

.lesson-formula-equation strong {
  color: var(--ink);
  font-size: 15px;
}

.lesson-formula-equation span,
.lesson-formula-note {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.6;
}

.lesson-formula-note {
  padding: 12px;
  border-left: 3px solid #0f766e;
  background: #f0fdfa;
}

.student-detail-head h2 {
  margin: 2px 0 4px;
  font-size: 28px;
}

.student-detail-head .student-detail-id {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  user-select: text;
  overflow-wrap: anywhere;
}
.student-detail-head p {
  color: var(--muted);
  font-weight: 900;
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  padding: 16px 20px 0;
}

.detail-stat-grid div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.detail-stat-grid strong,
.detail-stat-grid span,
.detail-stat-grid small {
  display: block;
}

.detail-stat-grid strong {
  font-size: 20px;
}

.detail-stat-grid span,
.detail-stat-grid small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.student-detail-section {
  padding: 16px 20px 0;
}

.student-detail-section h3 {
  margin-bottom: 10px;
  font-size: 16px;
}

.detail-fields,
.detail-payment-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.detail-fields-compact {
  margin-top: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-fields-text {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-fields label span,
.detail-payment-grid label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.detail-fields input,
.detail-fields select,
.detail-fields textarea,
.detail-payment-grid input,
.detail-payment-grid select {
  width: 100%;
  min-width: 0;
}

.detail-fields textarea {
  min-height: 96px;
}

.detail-fields select[multiple] {
  height: auto;
  min-height: 138px;
  padding: 8px;
}

.detail-payment-grid {
  grid-template-columns: 1.2fr repeat(4, minmax(0, 1fr)) auto;
  align-items: end;
}

.detail-payment-note {
  grid-column: span 2;
}

.enrollment-detail-modal {
  width: min(980px, 100%);
}

.lesson-confirm-modal {
  width: min(1040px, 100%);
}

.lesson-attendance-table {
  padding: 16px 20px 20px;
  overflow-x: auto;
}

.lesson-attendance-table table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

.lesson-attendance-table th,
.lesson-attendance-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.lesson-attendance-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  background: #f7faff;
}

.lesson-attendance-table td:first-child {
  min-width: 150px;
}

.lesson-attendance-table td:first-child strong,
.lesson-attendance-table td:first-child span {
  display: block;
}

.lesson-attendance-table td:first-child span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.lesson-attendance-table select,
.lesson-attendance-table input {
  width: 100%;
  min-width: 0;
}

.lesson-attendance-table input[type="number"] {
  max-width: 88px;
}

.enrollment-payment-methods {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.enrollment-payment-methods-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.enrollment-payment-methods-head strong {
  color: var(--ink);
  font-size: 13px;
}

.enrollment-payment-methods-head small,
.enrollment-payment-total-text {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.enrollment-payment-channel-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.enrollment-payment-total {
  max-width: 260px;
}

.enrollment-payment-total input[readonly] {
  background: #f0f4f8;
  color: var(--ink);
  font-weight: 900;
}

.enrollment-payment-total-text {
  margin: 0;
}
.enrollment-form-grid {
  grid-template-columns: 1.2fr 1.4fr repeat(4, minmax(0, 1fr));
}

.enrollment-referral-field {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.enrollment-referral-field > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.enrollment-referral-options {
  display: grid;
  gap: 4px;
  max-height: 154px;
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdff;
}

.enrollment-referral-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0;
  cursor: pointer;
}

.detail-payment-grid .enrollment-referral-option input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.detail-payment-grid .enrollment-referral-option span {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
}

.enrollment-referral-empty {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.5;
}

.enrollment-balance-summary {
  margin: 0 0 10px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--line);
}

.enrollment-balance-summary strong,
.enrollment-balance-summary span,
.enrollment-balance-summary small {
  display: block;
}

.enrollment-balance-summary strong {
  color: var(--ink);
  font-size: 15px;
}

.enrollment-balance-summary span,
.enrollment-balance-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}
.detail-record-list {
  display: grid;
  gap: 8px;
}

.detail-record-list div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.detail-record-list strong,
.detail-record-list span {
  display: block;
}

.detail-record-list span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.45;
}

.detail-record-list small {
  display: block;
  margin-top: 6px;
  color: #667085;
  line-height: 1.5;
}

.change-log-list span {
  line-height: 1.65;
}

.student-detail-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 18px 20px 20px;
}

.detail-save-status {
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  white-space: nowrap;
}

.detail-save-status[data-tone="busy"] {
  color: #2563eb;
}

.detail-save-status[data-tone="success"] {
  color: #047857;
}

.detail-save-status[data-tone="error"] {
  color: #b91c1c;
}

.danger-button {
  border: 0;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  background: #c53030;
  color: #fff;
  font-weight: 900;
}

.campus-list,
.lesson-list {
  display: grid;
  gap: 8px;
}

.schedule-planner-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 14px;
}

.schedule-lessons-panel {
  grid-column: 1 / -1;
}

.schedule-class-summary {
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.roster-save-hidden {
  display: none;
}

.schedule-class-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
}

.schedule-class-title-row strong {
  min-width: 0;
  font-size: 18px;
}

.schedule-save-roster-button {
  flex: 0 0 auto;
  min-height: 34px;
  padding-inline: 12px;
}

.summer-schedule-workspace {
  display: grid;
  grid-template-columns: minmax(680px, 1fr) minmax(320px, 390px);
  gap: 14px;
  align-items: start;
}

.schedule-class-panel {
  position: sticky;
  top: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.schedule-add-student-panel {
  margin-bottom: 8px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.schedule-add-student-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 40px;
  padding: 8px 10px;
  cursor: pointer;
  list-style: none;
}

.schedule-add-student-summary::-webkit-details-marker {
  display: none;
}

.schedule-add-student-summary::after {
  content: "\5C55\5F00";
  flex: 0 0 auto;
  min-width: 38px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 1000;
  text-align: right;
}

.schedule-add-student-panel[open] .schedule-add-student-summary::after {
  content: "\6536\8D77";
}

.schedule-add-student-summary span,
.schedule-add-student-summary strong,
.schedule-add-student-summary small,
.schedule-add-student-summary em {
  display: block;
  min-width: 0;
}

.schedule-add-student-summary strong {
  color: var(--ink);
  font-size: 13px;
}

.schedule-add-student-summary small,
.schedule-add-student-summary em {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
}

.schedule-add-student-summary em {
  flex: 0 0 auto;
  white-space: nowrap;
}

.schedule-student-picker-body {
  padding: 0 10px 10px;
  border-top: 1px solid var(--line);
}

.schedule-student-picker-head,
.schedule-student-picker-actions,
.schedule-student-select-all,
.schedule-student-option {
  display: flex;
  align-items: center;
}

.schedule-student-picker-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.schedule-student-picker-head strong,
.schedule-student-picker-head small,
.schedule-student-option strong,
.schedule-student-option small {
  display: block;
}

.schedule-student-picker-head small,
.schedule-student-option small,
.schedule-student-picker-actions small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.schedule-student-select-all {
  flex: 0 0 auto;
  gap: 5px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.schedule-student-picker-list {
  display: grid;
  gap: 5px;
  max-height: 240px;
  overflow: auto;
  padding-right: 3px;
}

.schedule-student-option {
  gap: 8px;
  min-height: 38px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
}

.schedule-student-option:has(input:checked) {
  border-color: rgba(36, 107, 254, 0.48);
  background: var(--soft);
}

.schedule-student-option input,
.schedule-student-select-all input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.schedule-student-picker-actions {
  justify-content: space-between;
  gap: 8px;
  margin-top: 9px;
}

.schedule-student-picker-actions small {
  margin: 0;
}

.schedule-class-students .campus-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.schedule-class-students .campus-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-height: 44px;
  padding: 7px 8px;
  border-radius: 8px;
}

.schedule-class-students .campus-list-item strong {
  min-width: 0;
}

.schedule-class-students .campus-list-item .text-link-button {
  max-width: 100%;
  overflow: hidden;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-class-students .campus-list-item span {
  margin-top: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.schedule-class-students .campus-list-item .ghost-button.small {
  min-height: 26px;
  padding: 4px 7px;
  font-size: 11px;
}

.schedule-class-students .campus-list-item.roster-future-student {
  border-color: #f2c97d;
  background: #fff8e8;
}

.roster-future-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid #efb85b;
  border-radius: 999px;
  background: #fff3d3;
  color: #9a5b00;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  font-weight: 900;
  color: var(--muted);
}

.inline-check input {
  min-width: auto;
  width: 16px;
  height: 16px;
}

.campus-list-item,
.lesson-card,
.class-card {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.campus-list-item {
  padding: 12px;
}

.campus-list-item strong,
.campus-list-item span,
.lesson-card strong,
.lesson-card span {
  display: block;
}

.campus-list-item span,
.lesson-card span {
  margin-top: 4px;
  color: var(--muted);
  line-height: 1.5;
}

.campus-list-item.warn {
  border-color: rgba(183,121,31,0.35);
  background: rgba(183,121,31,0.08);
}

.campus-process {
  display: grid;
  gap: 8px;
}

.campus-process span {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
  font-weight: 900;
}

.campus-two-tables {
  display: grid;
  grid-template-columns: minmax(320px, 0.42fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.editable-table {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.editable-table table {
  width: 100%;
  border-collapse: collapse;
}

.editable-table th,
.editable-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.editable-table th {
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
}

.editable-table input,
.editable-table select {
  min-width: 96px;
  height: 34px;
  border-radius: 8px;
  background: #fff;
}

.compact-table input {
  min-width: 88px;
}

.class-editor {
  display: grid;
  gap: 10px;
}

.class-card {
  padding: 12px;
}

.class-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  margin-bottom: 10px;
}

.class-card-head input {
  height: 38px;
  font-weight: 900;
}

.class-card select[multiple] {
  min-height: 92px;
  padding: 8px;
}

.class-student-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.class-student-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.class-student-chips span {
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--soft);
  color: var(--primary);
  font-size: 12px;
  font-weight: 900;
}

.left-actions {
  justify-content: flex-start;
  margin: 0 0 12px;
}

.lesson-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
}

.lesson-card.done {
  border-color: rgba(19,138,84,0.25);
  background: rgba(19,138,84,0.06);
}

.compact-upload {
  margin-bottom: 14px;
}

.backup-actions {
  display: grid;
  gap: 10px;
}

.source-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.source-summary div {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.source-summary strong,
.source-summary span,
.source-summary small {
  display: block;
}

.source-summary strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.source-summary span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.source-summary small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.teacher-stats-summary {
  display: block;
  width: 100%;
  margin-bottom: 14px;
}

.enrollment-table table {
  min-width: 980px;
  table-layout: fixed;
}

.summer-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summer-schedule-board {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  min-width: 0;
}

.schedule-period-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

.schedule-period-card {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: left;
  cursor: pointer;
}

button.schedule-period-card {
  color: inherit;
}

.schedule-period-card:hover,
.schedule-period-card:focus-visible {
  border-color: #9dbbff;
  background: #f8fbff;
}

.schedule-period-card.active {
  border-color: #9dbbff;
  background: #eef5ff;
  box-shadow: inset 3px 0 0 var(--primary);
}

.schedule-period-card strong,
.schedule-period-card span,
.schedule-period-card small {
  display: block;
}

.schedule-period-card strong {
  font-size: 16px;
  color: var(--ink);
}

.schedule-period-card span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.schedule-period-card small {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-month-switcher {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
}

.schedule-month-switcher button {
  min-width: 58px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.schedule-month-switcher button:hover,
.schedule-month-switcher button:focus-visible {
  border-color: #9dbbff;
  color: var(--primary);
  background: #f8fbff;
}

.schedule-month-switcher button.active {
  border-color: #1d4ed8;
  color: #1d4ed8;
  background: #eef5ff;
  box-shadow: inset 0 -2px 0 #1d4ed8;
}

.teacher-combined-schedule > .schedule-month-switcher {
  margin: 0 0 2px;
}

.schedule-overall-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.summer-teacher-switcher {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.summer-teacher-switcher button {
  min-height: 34px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--muted);
  font-weight: 1000;
  cursor: pointer;
}

.summer-teacher-switcher button.active {
  border-color: #9dbbff;
  background: #eef5ff;
  color: var(--primary);
}

.summer-teacher-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: -2px 0 10px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.summer-teacher-actions span {
  margin-right: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.summer-teacher-stats {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.summer-session-summary {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-width: 0;
  margin-bottom: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.summer-session-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.summer-session-metrics > div {
  display: flex;
  align-items: baseline;
  gap: 8px;
  white-space: nowrap;
}

.summer-session-summary strong {
  color: var(--ink);
  font-size: 22px;
  line-height: 1;
}

.summer-session-summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
}

.summer-session-summary small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summer-session-summary .summer-stat-box.summer-activity-conversion {
  border-color: #99d8c9;
  background: #f1fbf7;
}

.summer-activity-conversion-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 9px;
}

.summer-activity-conversion-actions .activity-conversion-action {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 12px;
}
.summer-stat-tags {
  margin-top: 0;
}

.summer-stat-box {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfdff;
}

.summer-stat-box strong,
.summer-stat-box span,
.summer-stat-box small {
  display: block;
}

.summer-stat-box strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1.1;
}

.summer-stat-box span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.summer-stat-box small {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.summer-stat-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 9px;
}

.summer-stat-tags em {
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 11px;
  font-style: normal;
  font-weight: 900;
  line-height: 1.2;
}

.lesson-review-panel,
.schedule-consumption-actions {
  grid-column: 1 / -1;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.lesson-review-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.lesson-review-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid #dbe7ff;
  border-radius: 7px;
  background: #fff;
}

.lesson-review-item strong,
.lesson-review-item span {
  display: block;
}

.lesson-review-item span,
.schedule-consumption-actions span,
.schedule-consumption-state {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.schedule-consumption-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
}

.lesson-consumption-check {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.lesson-consumption-check.is-leave {
  color: #9a5b00;
}

.lesson-consumption-check.is-makeup {
  color: #075985;
}

.lesson-consumption-check.is-absent {
  color: #b91c1c;
}

.lesson-consumption-check.is-trial {
  color: #6d28d9;
}

.lesson-consumption-pill {
  padding: 3px 7px;
  border: 1px solid #dbe7ff;
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.lesson-consumption-pill.status-leave {
  border-color: #efb85b;
  background: #fff3d3;
  color: #9a5b00;
}

.lesson-consumption-pill.status-makeup {
  border-color: #7dd3fc;
  background: #e0f2fe;
  color: #075985;
}

.lesson-consumption-pill.status-absent {
  border-color: #fca5a5;
  background: #fee2e2;
  color: #b91c1c;
}

.lesson-consumption-pill.status-trial {
  border-color: #c4b5fd;
  background: #f3e8ff;
  color: #6d28d9;
}

.lesson-consumption-pill.correction-pending {
  border-color: #fca5a5;
  background: #fff1f2;
  color: #b91c1c;
}

.lesson-correction-review-panel {
  border-color: #fecaca;
  background: #fff7f7;
}

.lesson-review-item small {
  display: block;
  margin-top: 3px;
  color: #8a4b4b;
  font-size: 11px;
  font-weight: 800;
}

.enrollment-approval-item {
  align-items: flex-start;
  flex-wrap: wrap;
}

.enrollment-approval-body {
  flex: 1 1 420px;
  min-width: 0;
}

.enrollment-approval-heading {
  color: var(--ink);
  font-size: 14px;
}

.enrollment-approval-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px 10px;
  margin-top: 9px;
}

.enrollment-approval-detail-grid div {
  min-width: 0;
  padding-left: 8px;
  border-left: 2px solid #dbe7ff;
}

.enrollment-approval-detail-grid small,
.enrollment-approval-detail-grid strong {
  display: block;
  overflow-wrap: anywhere;
}

.enrollment-approval-detail-grid small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.enrollment-approval-detail-grid strong {
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.enrollment-approval-actions {
  flex: 0 0 auto;
  padding-top: 2px;
}

.schedule-class-students .campus-list-item.attendance-leave {
  border-color: #f2c97d;
  background: #fff8e8;
}

.schedule-class-students .campus-list-item.attendance-makeup {
  border-color: #93c5fd;
  background: #eff6ff;
}

.schedule-class-students .campus-list-item.attendance-absent {
  border-color: #fecaca;
  background: #fff1f2;
}

.schedule-class-students .campus-list-item.attendance-trial {
  border-color: #ddd6fe;
  background: #faf5ff;
}

.schedule-consumption-state.done {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(34, 197, 94, 0.32);
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.1);
  color: #047857;
  font-size: 13px;
  font-weight: 950;
}

.schedule-consumption-state.todo {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 8px;
  background: rgba(245, 158, 11, 0.12);
  color: #92400e;
  font-size: 13px;
  font-weight: 950;
}

.schedule-consumption-state.pending {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 8px;
  background: rgba(251, 191, 36, 0.14);
  color: #b45309;
  font-size: 13px;
  font-weight: 950;
}

.schedule-consumption-state.warn {
  display: block;
  width: 100%;
  padding: 7px 9px;
  border: 1px solid rgba(197, 48, 48, 0.28);
  border-radius: 8px;
  background: rgba(197, 48, 48, 0.08);
  color: #9b2c2c;
}

.summer-manage-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.summer-manage-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.summer-manage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px;
}

.summer-manage-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 3px;
  align-items: center;
  min-height: 0;
  padding: 5px 6px;
  border: 1px solid #dbe7ff;
  border-radius: 6px;
  background: #fff;
}

.summer-manage-row > strong,
.summer-manage-row > .text-link-button {
  justify-self: start;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.summer-manage-row small {
  margin-top: 0;
  font-size: 10px;
  line-height: 1.2;
}

.summer-manage-actions {
  display: flex;
  justify-content: flex-start;
  gap: 3px;
}

.ghost-button.tiny {
  min-height: 21px;
  padding: 2px 6px;
  border-radius: 5px;
  font-size: 10px;
}

.ghost-button.danger {
  border-color: #fecaca;
  color: #b91c1c;
  background: #fff8f8;
}

.teacher-consumption-summary {
  margin-bottom: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.teacher-consumption-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.teacher-consumption-head h3 {
  margin: 0;
  font-size: 18px;
}

.teacher-consumption-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.teacher-consumption-definition {
  flex: 0 1 auto;
  max-width: min(560px, 58%);
  padding: 8px 10px;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.45;
}

.teacher-consumption-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.teacher-consumption-card {
  min-width: 0;
  padding: 12px;
  border: 1px solid #dbe7ff;
  border-radius: 8px;
  background: #fbfdff;
}

.teacher-consumption-card.is-total {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.teacher-consumption-card.activity-conversion {
  border-color: #99d8c9;
  background: #f1fbf7;
}

.teacher-consumption-card.activity-conversion .teacher-consumption-progress i {
  background: #0f766e;
}

.activity-conversion-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.activity-conversion-action {
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #86cbb9;
  border-radius: 6px;
  background: #fff;
  color: #075f50;
  font: inherit;
  font-weight: 900;
  text-align: center;
  cursor: pointer;
}

.activity-conversion-action:hover {
  border-color: #0f766e;
  background: #e5f6ef;
}

.activity-conversion-action:focus-visible,
.activity-conversion-student:focus-visible {
  outline: 3px solid #99f6e4;
  outline-offset: 2px;
}

.activity-conversion-modal {
  width: min(680px, 100%);
}

.activity-conversion-list {
  display: grid;
  gap: 8px;
  padding: 14px 20px 20px;
}

.activity-conversion-student {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid #d8e8e2;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.activity-conversion-student:hover {
  border-color: #0f766e;
  background: #f1fbf7;
}

.activity-conversion-student.is-unlinked {
  cursor: default;
  background: #fafafa;
}

.activity-conversion-student span,
.activity-conversion-student small {
  min-width: 0;
}

.activity-conversion-student strong,
.activity-conversion-student small {
  display: block;
}

.activity-conversion-student strong {
  font-size: 15px;
}

.activity-conversion-student span small,
.activity-conversion-student > small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.activity-conversion-student > small {
  flex: 0 0 auto;
  color: #075f50;
}

.teacher-consumption-name {
  min-width: 0;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.teacher-consumption-name strong,
.teacher-consumption-name small {
  display: block;
  white-space: nowrap;
}

.teacher-consumption-name strong {
  color: var(--ink);
  font-size: 14px;
}

.teacher-consumption-name small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.teacher-consumption-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.teacher-consumption-metric + .teacher-consumption-metric {
  margin-top: 10px;
}

.teacher-consumption-metric-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.teacher-consumption-metric-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.teacher-consumption-metric-head strong {
  color: var(--ink);
  font-size: 18px;
  line-height: 1;
  white-space: nowrap;
}

.teacher-consumption-metric small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}

.teacher-consumption-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.teacher-consumption-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

.teacher-consumption-card.student-lessons .teacher-consumption-progress i {
  background: #0f766e;
}

.teacher-consumption-card.student-counts .teacher-consumption-progress i {
  background: #7c3aed;
}

.summer-teacher-calendar {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summer-teacher-calendar-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.summer-teacher-calendar-head h3 {
  margin: 3px 0 0;
  font-size: 20px;
}

.summer-teacher-calendar-head p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.summer-calendar-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
}

.reschedule-availability {
  font-size: 12px;
  font-weight: 700;
}

.reschedule-availability.is-ready {
  color: #1d4ed8;
}

.reschedule-availability.is-empty {
  color: var(--muted);
}

.summer-months {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin-top: 14px;
}

.summer-month-calendar {
  min-width: 0;
  overflow-x: auto;
}

.summer-month-title {
  margin-bottom: 12px;
  font-size: 28px;
  font-weight: 1000;
  letter-spacing: 0;
  color: var(--ink);
}

.source-summary .teacher-consumption-head,
.source-summary .teacher-consumption-head > div,
.source-summary .teacher-consumption-grid,
.source-summary .teacher-consumption-name,
.source-summary .teacher-consumption-metric,
.source-summary .teacher-consumption-metric-head,
.source-summary .activity-conversion-actions {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.source-summary .teacher-consumption-progress {
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: #e5e7eb;
}

.schedule-stage-progress,
.teacher-period-progress {
  grid-column: 1 / -1;
}

.teacher-period-progress {
  margin-bottom: 10px;
}

.summer-month-title-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.summer-month-title-row .summer-month-title {
  margin: 0;
  white-space: nowrap;
}

.summer-month-title-data {
  min-width: 0;
}

.summer-month-title-data .teacher-consumption-summary {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.summer-month-title-data .teacher-consumption-head {
  margin-bottom: 8px;
}

.summer-month-title-data .teacher-consumption-head h3 {
  font-size: 16px;
}

.summer-month-title-data .teacher-consumption-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 8px;
}

.summer-month-title-data .teacher-consumption-card {
  padding: 10px;
}

.summer-month-title-data .teacher-consumption-metric-head {
  align-items: flex-start;
  flex-direction: column;
  gap: 4px;
}

.summer-month-title-data .teacher-consumption-metric-head strong {
  font-size: 15px;
}
.summer-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
  gap: 1px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--line);
}

.summer-calendar-head,
.summer-calendar-cell {
  min-width: 96px;
  background: #fff;
}

.summer-calendar-head {
  padding: 9px 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 1000;
  text-align: center;
  background: #f7faff;
}

.summer-calendar-cell {
  min-height: 380px;
  padding: 8px;
}

.summer-calendar-cell.is-empty {
  background: #fafcff;
}

.summer-calendar-date {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 1000;
}

.summer-calendar-lessons {
  display: grid;
  grid-template-rows: repeat(4, 74px);
  gap: 5px;
  margin-top: 7px;
}

.summer-calendar-slot {
  min-height: 74px;
  max-height: 74px;
  display: grid;
  align-content: start;
  gap: 4px;
  overflow: hidden;
}

.summer-calendar-slot.is-empty {
  border: 1px solid transparent;
}

.summer-calendar-placeholder {
  min-height: 74px;
  display: block;
}

.summer-calendar-lesson {
  min-width: 0;
  min-height: 74px;
  padding: 6px 7px;
  border: 1px solid #dbe7ff;
  border-radius: 7px;
  background: #f8fbff;
}

.summer-calendar-button {
  width: 100%;
  cursor: pointer;
  text-align: left;
}

.summer-calendar-lesson.needs-consumption {
  border-color: #f59e0b;
  background: #fff8e8;
}

.summer-calendar-lesson.pending-review {
  border-color: #93c5fd;
  background: #eff6ff;
}

.summer-calendar-lesson.mismatch {
  border-color: #f97316;
  background: #fff7ed;
}

.summer-calendar-lesson.confirmed {
  border-color: #86efac;
  background: #f0fdf4;
}

.summer-calendar-lesson.summer {
  border-color: #d9ead3;
  background: #f6fbf2;
}

.summer-calendar-lesson.awaiting-both,
.summer-calendar-lesson.summer.awaiting-both {
  border-color: #f59e0b;
  background: #fff7d6;
  box-shadow: inset 4px 0 0 #f59e0b;
}

.summer-calendar-lesson.action-needed,
.summer-calendar-lesson.summer.action-needed {
  border-color: #ea580c;
  background: #ffedd5;
  box-shadow: inset 4px 0 0 #ea580c;
}

.summer-calendar-lesson.pending-review,
.summer-calendar-lesson.summer.pending-review {
  border-color: #38bdf8;
  background: #ecfeff;
  box-shadow: inset 4px 0 0 #0891b2;
}

.summer-calendar-lesson.waiting-other,
.summer-calendar-lesson.summer.waiting-other {
  border-color: #a78bfa;
  background: #f5f3ff;
  box-shadow: inset 4px 0 0 #7c3aed;
}

.summer-calendar-lesson.mismatch,
.summer-calendar-lesson.summer.mismatch {
  border-color: #ef4444;
  background: #fff1f2;
  box-shadow: inset 4px 0 0 #dc2626;
}

.summer-calendar-lesson.confirmed,
.summer-calendar-lesson.summer.confirmed {
  border-color: #22c55e;
  background: #f0fdf4;
  box-shadow: inset 4px 0 0 #16a34a;
}

.summer-calendar-button.active,
.summer-calendar-button.active.summer {
  position: relative;
  z-index: 2;
  outline: 3px solid rgba(15, 23, 42, 0.22);
  outline-offset: 1px;
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.18);
}

.summer-calendar-button.active::after,
.summer-calendar-button.active.summer::after {
  content: "";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  border: 2px solid #fff;
  border-radius: 999px;
  background: #111827;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.24);
}

.summer-calendar-lesson span,
.summer-calendar-lesson strong,
.summer-calendar-lesson small {
  display: block;
}

.summer-calendar-lesson span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.summer-calendar-lesson strong {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.25;
  word-break: break-word;
}

.summer-calendar-lesson small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.teacher-calendar-grid {
  grid-template-columns: repeat(7, minmax(124px, 1fr));
}

.teacher-month-switcher {
  margin-bottom: 0;
}

.summer-plan-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  overflow: hidden;
}

.summer-plan-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.summer-plan-head strong,
.summer-plan-head span,
.summer-plan-head em {
  display: block;
}

.summer-plan-head strong {
  font-size: 18px;
}

.summer-plan-head span,
.summer-plan-head em {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 900;
}

.summer-plan-card p {
  padding: 12px 14px 0;
  color: var(--muted);
  line-height: 1.6;
}

.summer-lessons {
  display: grid;
  gap: 8px;
  padding: 12px 14px 14px;
}

.summer-lessons div {
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.summer-lessons b,
.summer-lessons span,
.summer-lessons small {
  display: block;
}

.summer-lessons b {
  color: var(--primary);
}

.summer-lessons span {
  margin-top: 3px;
  font-weight: 900;
}

.summer-lessons small {
  margin-top: 3px;
  color: var(--muted);
  line-height: 1.45;
}

body.is-campus-readonly .admin-only-campus {
  display: none;
}

body.is-campus-teacher-mode .campus-tabs [data-view="enrollment"],
body.is-campus-teacher-mode .campus-tabs [data-view="dashboard"],
body.is-campus-teacher-mode .campus-tabs [data-view="imports"],
body.is-campus-teacher-mode [data-view-panel="dashboard"],
body.is-campus-teacher-mode [data-view-panel="enrollment"],
body.is-campus-teacher-mode [data-view-panel="imports"],
body.is-campus-teacher-mode #addTeacherBtn,
body.is-campus-teacher-mode #saveCampusBtn,
body.is-campus-teacher-mode #addStudentBtn,
body.is-campus-teacher-mode .archive-sidebar input[data-teacher],
body.is-campus-teacher-mode #refreshSourceFilesBtn2 {
  display: none !important;
}

@media (max-width: 1120px) {
  .layout { flex-direction: column; }
  .side-stack { width: 100%; flex-basis: auto; }
  .settlement-import-grid, .audit-layout { grid-template-columns: 1fr; }
  .settlement-kpis, .settlement-total-band { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .campus-grid,
  .campus-grid.wide-left,
  .dashboard-grid,
  .campus-two-tables,
  .campus-archive-layout {
    grid-template-columns: 1fr;
  }
  .archive-sidebar {
    position: static;
  }
  .campus-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .source-summary,
  .summer-plan-grid {
    grid-template-columns: 1fr;
  }
  .summer-schedule-workspace,
  .schedule-class-students .campus-list {
    grid-template-columns: 1fr;
  }
  .schedule-class-panel {
    position: static;
  }
  .summer-teacher-stats {
    grid-template-columns: 1fr;
  }
  .summer-session-summary {
    grid-template-columns: 1fr;
  }
  .summer-session-summary > div:first-child {
    flex-wrap: wrap;
  }
  .summer-months {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .tools-page {
    overflow: auto;
  }
  .tools-workspace {
    grid-template-columns: 1fr;
    min-height: 100vh;
  }
  .tools-sidebar {
    min-height: auto;
    padding: 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .tool-tabs {
    grid-template-columns: 1fr;
  }
  .tools-legacy {
    margin-top: 0;
  }
  .tool-stage {
    height: calc(100vh - 240px);
    min-height: 560px;
    padding: 10px;
  }
  .app-shell { width: min(100% - 20px, 1360px); padding-top: 18px; }
  .hero { flex-direction: column; }
  .grid.two, .grid.three, .student-checklist, .compare-output, .student-note-card, .after-output-grid, .temporary-student-grid { grid-template-columns: 1fr; }
  .panel { padding: 16px; border-radius: 16px; }
  .db-stats { grid-template-columns: repeat(2, 1fr); }
  .settlement-flow { overflow-x: auto; }
  .flow-step { flex: 1 0 auto; }
  .settlement-kpis, .settlement-total-band { grid-template-columns: 1fr; }
  .issue-card-head { align-items: flex-start; flex-direction: column; }
  .campus-shell {
    width: min(100% - 20px, 1440px);
  }
  .campus-topbar {
    flex-direction: column;
  }
  .campus-user-card {
    width: 100%;
  }
  .campus-tabs {
    overflow-x: auto;
  }
  .campus-tab {
    flex: 0 0 auto;
  }
  .campus-kpis {
    grid-template-columns: 1fr;
  }
  .summer-teacher-calendar-head {
    flex-direction: column;
  }
  .teacher-consumption-head {
    flex-direction: column;
  }
  .teacher-consumption-definition {
    max-width: none;
    width: 100%;
  }

  .summer-month-title-row {
    grid-template-columns: 1fr;
  }
  .summer-teacher-calendar-head p {
    text-align: left;
  }
  .summer-manage-list {
    grid-template-columns: 1fr;
  }
  .modal-overlay {
    padding: 10px;
  }
  .student-detail-head {
    flex-direction: column;
  }
  .student-detail-head-actions {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  .detail-stat-grid,
  .detail-fields,
  .detail-fields-compact,
  .detail-fields-text,
  .detail-payment-grid {
    grid-template-columns: 1fr;
  }
  .enrollment-payment-channel-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-payment-note {
    grid-column: auto;
  }
  .student-detail-actions {
    flex-direction: column-reverse;
  }
  .lesson-card {
    align-items: flex-start;
    flex-direction: column;
  }
}

.sico-tools-page .tools-brand .eyebrow,
.is-sico-tool .campus-topbar .eyebrow {
  color: #0f766e;
}

.sico-tools-page .tool-tab.active {
  border-color: rgba(15, 118, 110, 0.35);
  background: rgba(15, 118, 110, 0.08);
}

.is-sico-tool .campus-kpi strong,
.is-sico-tool .summer-month-title {
  color: #0f766e;
}

/* Future lessons can be moved by permitted campus roles. */
.summer-calendar-button.is-reschedulable {
  cursor: grab;
  touch-action: none;
  user-select: none;
  box-shadow: inset 3px 0 0 #2563eb;
}

.summer-calendar-button.is-reschedulable:hover {
  outline: 2px solid #2563eb;
  outline-offset: 1px;
}

.summer-calendar-button.is-reschedule-locked {
  cursor: default;
}

.summer-calendar-button.is-reschedulable:active,
.summer-calendar-button.is-reschedulable.is-dragging {
  cursor: grabbing;
}

.summer-calendar-button.is-dragging {
  opacity: 0.42;
}

.summer-calendar-slot[data-reschedule-drop-date] {
  transition: background-color 120ms ease, outline-color 120ms ease;
}

.summer-calendar-slot.is-reschedule-drop-target {
  outline: 2px dashed #2563eb;
  outline-offset: 2px;
  background: #eff6ff;
}

.reschedule-modal {
  width: min(680px, 100%);
}

.reschedule-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  padding: 20px;
}

.reschedule-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.reschedule-form label > span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.reschedule-form input,
.reschedule-form select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  color: var(--ink);
  font: inherit;
}

.reschedule-form input:focus,
.reschedule-form select:focus {
  border-color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.14);
  outline-offset: 1px;
}

.reschedule-form .reschedule-reason,
.reschedule-form .reschedule-note {
  grid-column: 1 / -1;
}

.reschedule-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.reschedule-undo-toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 110;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border: 1px solid #93c5fd;
  border-radius: 8px;
  background: #eff6ff;
  box-shadow: 0 14px 36px rgba(15, 23, 42, 0.16);
  color: #1e3a8a;
  font-weight: 900;
}

.reschedule-undo-toast[hidden] {
  display: none;
}

@media (max-width: 680px) {
  .reschedule-form {
    grid-template-columns: 1fr;
  }

  .reschedule-undo-toast {
    right: 12px;
    bottom: 12px;
  }
}


.account-management-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.8fr);
  gap: 16px;
  align-items: start;
}

.account-editor-panel {
  position: sticky;
  top: 14px;
}

.account-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.account-form label {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.account-form label > span:first-child {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-form input,
.account-form select {
  width: 100%;
  min-width: 0;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.account-form input:focus,
.account-form select:focus {
  border-color: #2563eb;
  outline: 2px solid rgba(37, 99, 235, 0.14);
  outline-offset: 1px;
}

.account-form input:disabled {
  background: #f8fafc;
  color: var(--muted);
}

.account-password-field,
.account-active-field,
.account-form-actions {
  grid-column: 1 / -1;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  font-weight: 800;
}

.checkbox-field input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.account-form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.account-count {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.account-table-wrap {
  overflow-x: auto;
}

.account-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}

.account-table th,
.account-table td {
  padding: 11px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 13px;
}

.account-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.account-table td:first-child strong,
.account-table td:first-child span {
  display: block;
}

.account-table td:first-child span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.account-table tr.is-selected {
  background: #eff6ff;
}

.account-actions {
  display: flex;
  gap: 6px;
  white-space: nowrap;
}

.account-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 7px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 900;
}

.account-status.is-active {
  background: #ecfdf5;
  color: #047857;
}

.account-status.is-disabled {
  background: #fff1f2;
  color: #be123c;
}

.account-login-history {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.account-login-list {
  display: grid;
  gap: 8px;
}

.account-login-item {
  display: grid;
  grid-template-columns: minmax(150px, 0.8fr) minmax(120px, 0.6fr) minmax(0, 1.6fr);
  gap: 12px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
}

.account-login-item span,
.account-login-item small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.empty-row,
.empty-state {
  color: var(--muted);
  text-align: center;
}

@media (max-width: 900px) {
  .account-management-layout {
    grid-template-columns: 1fr;
  }

  .account-editor-panel {
    position: static;
  }
}

@media (max-width: 600px) {
  .account-form {
    grid-template-columns: 1fr;
  }

  .account-login-item {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
.schedule-class-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.schedule-class-form .reschedule-note { grid-column: 1 / -1; }

.schedule-weekday-time-slots {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  background: #fbfdff;
}

.schedule-weekday-time-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.schedule-weekday-time-heading > div {
  display: grid;
  gap: 3px;
}

.schedule-weekday-time-heading strong {
  color: var(--ink);
  font-size: 13px;
}

.schedule-weekday-time-heading span {
  color: var(--muted);
  font-size: 12px;
}

.schedule-weekday-time-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 18px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.schedule-weekday-time-row > strong {
  padding-bottom: 10px;
  color: var(--ink);
  font-size: 13px;
}

.schedule-weekday-time-row label {
  display: grid;
  gap: 5px;
}

.schedule-weekday-time-row label > span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.schedule-weekday-time-row input {
  width: 100%;
}

.schedule-time-separator {
  padding-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

[data-view-panel="summer"] [data-add-summer-type],
[data-view-panel="summer"] [data-add-summer-class],
[data-view-panel="summer"] [data-add-summer-class-for-type] {
  display: none !important;
}

.reschedule-operation-picker,
.schedule-weekday-picker {
  grid-column: 1 / -1;
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.reschedule-operation-picker legend,
.schedule-weekday-picker legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.reschedule-operation-picker label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}

.reschedule-operation-picker input,
.schedule-weekday-options input {
  width: 16px;
  height: 16px;
  padding: 0;
}

.schedule-weekday-options {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.schedule-weekday-options label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schedule-student-picker {
  grid-column: 1 / -1;
}

.reschedule-form .schedule-student-picker select {
  height: 150px;
  padding: 6px;
}

.schedule-plan-preview-summary,
.schedule-plan-ready,
.schedule-plan-conflicts,
.schedule-plan-preview-list {
  margin: 16px 20px 0;
}

.v2-schedule-stage-context {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  gap: 8px;
  margin: 14px 20px 0;
  padding: 10px 12px;
  border-left: 3px solid var(--primary);
  background: var(--soft-2);
}

.v2-schedule-stage-context span,
.v2-schedule-stage-context small {
  color: var(--muted);
  font-size: 12px;
}

.v2-schedule-stage-context small {
  text-align: right;
}

.schedule-plan-preview-summary,
.schedule-plan-ready,
.schedule-plan-conflicts {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.schedule-plan-ready {
  border-color: #86b99b;
  background: #f3fbf6;
  color: #185c38;
}

.schedule-plan-conflicts {
  border-color: #e3a5a5;
  background: #fff6f6;
  color: #8b2525;
}

.schedule-plan-conflicts p {
  margin: 0;
}

.schedule-plan-preview-list {
  display: block;
  max-height: min(440px, calc(100vh - 330px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.schedule-plan-preview-list > div {
  display: grid;
  grid-template-columns: 100px minmax(160px, 1fr) 130px;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 9px 14px;
  border-bottom: 1px solid var(--line);
}

.schedule-plan-preview-list > div:last-of-type {
  border-bottom: 0;
}

.schedule-plan-preview-header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 38px !important;
  background: #f3f6fb;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.schedule-plan-preview-row:nth-child(odd) {
  background: #fbfdff;
}

.schedule-plan-preview-row > :last-child,
.schedule-plan-preview-header > :last-child {
  text-align: right;
  white-space: nowrap;
}

.schedule-plan-preview-list > small {
  display: block;
  padding: 10px 14px;
  color: var(--muted);
}

@media (max-width: 760px) {
  .schedule-class-form { grid-template-columns: 1fr; }
  .schedule-weekday-time-heading { align-items: flex-start; flex-direction: column; }
  .schedule-weekday-time-row { grid-template-columns: 56px minmax(0, 1fr) 14px minmax(0, 1fr); gap: 6px; }
}

@media (max-width: 500px) {
  .schedule-weekday-time-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .schedule-weekday-time-row > strong { grid-column: 1 / -1; padding-bottom: 0; }
  .schedule-time-separator { display: none; }
}

@media (max-width: 760px) {
  .v2-schedule-stage-context { grid-template-columns: auto minmax(0, 1fr); }
  .v2-schedule-stage-context small { grid-column: 1 / -1; text-align: left; }
  .schedule-weekday-options { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .schedule-plan-preview-list > div { grid-template-columns: 64px minmax(0, 1fr) 88px; gap: 6px; padding-inline: 8px; font-size: 12px; }
}

@media (max-width: 640px) {
  .detail-section-title-row {
    align-items: flex-start;
  }

  .lesson-formula-symbols {
    grid-template-columns: 1fr;
  }
}

.payroll-view {
  min-width: 0;
}

.payroll-panel {
  padding: 0;
  overflow: hidden;
}

.payroll-heading {
  align-items: flex-start;
  padding: 18px 20px;
  margin: 0;
  border-bottom: 1px solid var(--line);
  background: #fbfdff;
}

.payroll-heading h2,
.payroll-heading p {
  margin: 0;
}

.payroll-heading p {
  margin-top: 5px;
  color: var(--muted);
  font-size: 13px;
}

.payroll-month-actions,
.payroll-subactions {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
}

.payroll-month-actions label,
.payroll-subactions label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.payroll-month-actions input,
.payroll-subactions input,
.payroll-table input,
.payroll-table select {
  box-sizing: border-box;
  min-width: 0;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font: inherit;
}

.payroll-stage-list {
  display: grid;
  grid-template-columns: repeat(6, minmax(120px, 1fr));
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}

.payroll-stage {
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 2px 7px;
  min-width: 120px;
  min-height: 66px;
  padding: 12px;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #fff;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
}

.payroll-stage:last-child {
  border-right: 0;
}

.payroll-stage > span {
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

.payroll-stage strong,
.payroll-stage small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payroll-stage strong {
  align-self: end;
  font-size: 13px;
}

.payroll-stage small {
  color: var(--muted);
  font-size: 11px;
}

.payroll-stage:hover,
.payroll-stage.active {
  background: #eff6ff;
}

.payroll-stage.active {
  box-shadow: inset 0 -3px 0 #2563eb;
}

.payroll-stage.confirmed > span {
  background: #dcfce7;
  color: #15803d;
}

.payroll-stage.stale > span {
  background: #fef3c7;
  color: #b45309;
}

.payroll-step-content {
  padding: 20px;
}

.payroll-step-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.payroll-step-heading div {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.payroll-step-heading span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
}

.payroll-step-heading h2,
.payroll-step-heading p {
  margin: 0;
}

.payroll-step-heading h2 {
  font-size: 18px;
}

.payroll-step-heading p {
  max-width: 680px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.payroll-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.payroll-metric {
  min-height: 78px;
  padding: 12px;
  border: 1px solid #dbe5f0;
  border-radius: 6px;
  background: #fff;
}

.payroll-metric span,
.payroll-metric small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.payroll-metric strong {
  display: block;
  margin: 7px 0 4px;
  color: #0f2b45;
  font-size: 20px;
  letter-spacing: 0;
}

.payroll-table-wrap {
  margin-top: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.payroll-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

.payroll-table th,
.payroll-table td {
  padding: 10px 9px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  font-size: 12px;
}

.payroll-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #526275;
  font-weight: 900;
}

.payroll-table tbody tr:last-child td {
  border-bottom: 0;
}

.payroll-table td small {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.payroll-table input {
  width: 104px;
}

.payroll-fixed-table input {
  width: 92px;
}

.payroll-commission-table input {
  width: 116px;
}

.payroll-detail-table {
  max-height: 560px;
}

.payroll-detail-table .payroll-table {
  min-width: 1080px;
}

.payroll-detail-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.payroll-detail-heading span {
  color: var(--muted);
  font-size: 12px;
}

.payroll-payslip-heading {
  align-items: center;
}

.payroll-payslip-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.payroll-payslip {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.payroll-payslip > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.payroll-payslip > header strong,
.payroll-payslip > header span {
  display: block;
}

.payroll-payslip > header strong {
  color: var(--ink);
  font-size: 15px;
}

.payroll-payslip > header span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.payroll-payslip-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 6px;
}

.payroll-payslip-items {
  padding: 5px 12px;
}

.payroll-payslip-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  min-height: 37px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f5;
  font-size: 12px;
}

.payroll-payslip-row:last-child {
  border-bottom: 0;
}

.payroll-payslip-row span {
  color: var(--muted);
}

.payroll-payslip-row strong {
  color: var(--ink);
  text-align: right;
}

.payroll-payslip-row.subtotal {
  font-weight: 800;
}

.payroll-payslip-row.deduction strong {
  color: #a33131;
}

.payroll-payslip-row.total {
  border-bottom: 0;
  color: #0f2b45;
  font-size: 14px;
}

.payroll-payslip-row.total span,
.payroll-payslip-row.total strong {
  color: inherit;
}

.payroll-payslip-row.company-cost {
  border-top: 1px dashed var(--line);
  border-bottom: 0;
}

.payroll-payslip > p {
  margin: 0;
  padding: 0 12px 12px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.payroll-commission-maintenance {
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.payroll-commission-add-grid {
  display: grid;
  grid-template-columns: minmax(220px, 2fr) minmax(140px, 1fr) minmax(120px, 0.8fr) auto;
  gap: 10px;
  align-items: end;
}

.payroll-commission-add-grid label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payroll-commission-add-grid select,
.payroll-inline-select {
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0 8px;
  background: #fff;
  color: var(--text);
}

.payroll-consumption-commission-table .payroll-table {
  min-width: 1240px;
}

.payroll-commission-header-filter {
  display: grid;
  min-width: 112px;
  gap: 5px;
}

.payroll-commission-header-filter span {
  color: #526275;
  font-size: 12px;
  font-weight: 900;
}

.payroll-commission-header-filter select {
  width: 100%;
  min-width: 0;
  height: 30px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--text);
  font: inherit;
  font-size: 12px;
}

.payroll-commission-actions {
  display: flex;
  gap: 6px;
  min-width: 116px;
}

.payroll-commission-actions button {
  white-space: nowrap;
}

.payroll-detail-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-top: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  background: #f8fafc;
}

.payroll-pricing-filters {
  grid-template-columns: repeat(3, minmax(160px, 1fr)) auto;
}

.payroll-commission-filters {
  grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
}

.payroll-multi-filter {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payroll-multi-filter details {
  position: relative;
}

.payroll-multi-filter summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  list-style: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.payroll-multi-filter summary::-webkit-details-marker {
  display: none;
}

.payroll-multi-filter summary::after {
  margin-left: 8px;
  color: var(--muted);
  content: "▾";
}

.payroll-multi-filter details[open] summary {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.payroll-multi-filter-menu {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  left: 0;
  display: grid;
  width: max-content;
  min-width: 100%;
  max-width: min(320px, 80vw);
  max-height: 260px;
  padding: 6px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.16);
}

.payroll-detail-filters .payroll-multi-filter-menu label {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 5px 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

.payroll-detail-filters .payroll-multi-filter-menu label:hover {
  background: #f1f5f9;
}

.payroll-detail-filters .payroll-multi-filter-menu input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 0;
}

.payroll-pricing-exception {
  display: block;
  margin-top: 14px;
}

.payroll-pricing-summary-table .payroll-table {
  min-width: 1180px;
}

.payroll-detail-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.payroll-detail-filters select {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 0 8px;
  color: var(--text);
}

.payroll-filter-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px 18px;
  margin-top: 10px;
  padding: 10px 12px;
  border-left: 3px solid #2563eb;
  background: #eff6ff;
  font-size: 13px;
}

.payroll-filter-summary strong {
  color: #1d4ed8;
}

.payroll-filter-summary small {
  margin-left: auto;
  color: var(--muted);
}

.payroll-exception,
.payroll-lock-note {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #fbbf24;
  border-radius: 6px;
  background: #fffbeb;
  color: #92400e;
  font-size: 13px;
}

.payroll-exception ul,
.payroll-confirm-bar ul {
  margin: 4px 0 0;
  padding-left: 18px;
}

.payroll-clear {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-left: 3px solid #16a34a;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
}

.payroll-error-text {
  color: #be123c;
  font-weight: 800;
}

.payroll-confirm-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.payroll-confirm-bar strong,
.payroll-confirm-bar span {
  display: block;
}

.payroll-confirm-bar span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.payroll-lock-note {
  margin: 14px 20px 0;
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.payroll-lock-note em {
  color: #b45309;
  font-style: normal;
  font-weight: 800;
}

.payroll-audit {
  padding: 14px 20px 18px;
  border-top: 1px solid var(--line);
  background: #fafafa;
}

.payroll-audit strong {
  font-size: 13px;
}

.payroll-audit ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin: 8px 0 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .payroll-heading,
  .payroll-step-heading,
  .payroll-confirm-bar {
    align-items: flex-start;
  }

  .payroll-metrics {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .payroll-detail-filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .payroll-pricing-filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .payroll-commission-filters {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .payroll-commission-add-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }

  .payroll-stage-list {
    grid-template-columns: repeat(6, 148px);
  }
}

@media (max-width: 600px) {
  .payroll-heading,
  .payroll-step-content {
    padding: 14px;
  }

  .payroll-month-actions,
  .payroll-subactions,
  .payroll-confirm-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .payroll-month-actions .secondary-button,
  .payroll-subactions .secondary-button,
  .payroll-confirm-bar .secondary-button {
    width: 100%;
  }

  .payroll-metrics {
    grid-template-columns: 1fr;
  }

  .payroll-payslip-list {
    grid-template-columns: 1fr;
  }

  .payroll-payslip > header {
    align-items: flex-start;
    flex-direction: column;
  }

  .payroll-detail-filters {
    grid-template-columns: 1fr;
  }

  .payroll-pricing-filters {
    grid-template-columns: 1fr;
  }

  .payroll-commission-filters {
    grid-template-columns: 1fr;
  }

  .payroll-commission-add-grid {
    grid-template-columns: 1fr;
  }

  .payroll-commission-add-grid .primary-button {
    width: 100%;
  }

  .payroll-filter-summary {
    align-items: flex-start;
    flex-direction: column;
  }

  .payroll-filter-summary small {
    margin-left: 0;
  }
}
.stage-data-transfer { display: grid; gap: 16px; }
.stage-transfer-panel { display: grid; gap: 16px; }
.stage-transfer-panel .panel-heading p { margin: 6px 0 0; color: var(--muted); font-size: 13px; }
.stage-transfer-stage-picker { display: grid; gap: 4px; min-width: 150px; }
.stage-transfer-stage-picker span { color: var(--muted); font-size: 12px; }
.stage-transfer-toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 12px 14px; border: 1px solid var(--line); background: var(--surface-soft); }
.stage-transfer-file-button { position: relative; overflow: hidden; cursor: pointer; }
.stage-transfer-file-button input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.stage-transfer-toolbar-note { color: var(--muted); font-size: 13px; }
.stage-transfer-preview, .stage-transfer-requests { border-top: 1px solid var(--line); padding-top: 16px; }
.stage-transfer-summary { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.stage-transfer-summary span { padding: 7px 10px; border: 1px solid var(--line); background: var(--surface-soft); color: var(--ink); font-size: 13px; }
.stage-transfer-ready { padding: 12px 14px; border-left: 3px solid var(--success); background: color-mix(in srgb, var(--success) 8%, white); color: var(--ink); }
.stage-transfer-errors { padding: 12px 14px; border-left: 3px solid var(--danger); background: color-mix(in srgb, var(--danger) 8%, white); color: var(--ink); }
.stage-transfer-errors strong { display: block; margin-bottom: 6px; }
.stage-transfer-errors p { margin: 4px 0; font-size: 13px; }
.stage-transfer-operation-list { display: grid; gap: 6px; max-height: 380px; overflow: auto; margin: 14px 0; }
.stage-transfer-operation { display: grid; grid-template-columns: 150px minmax(0, 1fr) minmax(180px, auto); gap: 10px; align-items: center; padding: 9px 10px; border-bottom: 1px solid var(--line); font-size: 13px; }
.stage-transfer-operation span, .stage-transfer-operation small, .stage-transfer-request span, .stage-transfer-request small { color: var(--muted); }
.stage-transfer-request { display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.stage-transfer-request > div:first-child { display: grid; gap: 4px; }
.stage-transfer-request span, .stage-transfer-request small { font-size: 12px; }
@media (max-width: 760px) {
  .stage-transfer-operation { grid-template-columns: 1fr; gap: 4px; }
  .stage-transfer-request { align-items: flex-start; flex-direction: column; }
}
