:root {
  --primary: #2857a4;
  --primary-dark: #1e4588;
  --primary-deep: #173b72;
  --primary-soft: #edf3fc;
  --primary-pale: #f6f8fd;
  --accent: #4b76bd;
  --ink: #1c2b42;
  --text: #33435a;
  --muted: #738197;
  --line: #e3e8f0;
  --line-strong: #d5deeb;
  --surface: #ffffff;
  --background: #f5f7fb;
  --success: #267a5a;
  --success-soft: #eaf6f0;
  --warning: #9a611c;
  --warning-soft: #fff6e8;
  --danger: #b54747;
  --danger-soft: #fff0f0;
  --shadow-sm: 0 2px 8px rgba(25, 48, 85, 0.05);
  --shadow-md: 0 12px 36px rgba(27, 50, 87, 0.10);
  --radius-sm: 7px;
  --radius: 12px;
  --radius-lg: 20px;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--background);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--background);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--background);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

button:not(:disabled),
select:not(:disabled),
label[for] {
  cursor: pointer;
}

button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

a {
  color: var(--primary);
  text-decoration: none;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--ink);
  line-height: 1.35;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

::selection {
  color: var(--primary-deep);
  background: #dce8fa;
}

:focus-visible {
  outline: 3px solid rgba(40, 87, 164, 0.24);
  outline-offset: 2px;
}

.noscript {
  position: fixed;
  z-index: 1000;
  inset: 0 0 auto;
  padding: 14px;
  color: #fff;
  text-align: center;
  background: var(--danger);
}

.icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.icon svg {
  width: 100%;
  height: 100%;
}

.button {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-weight: 600;
  line-height: 1.35;
  white-space: nowrap;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.button:not(:disabled):active {
  transform: translateY(1px);
}

.button-primary {
  color: #fff;
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 3px 8px rgba(40, 87, 164, 0.15);
}

.button-primary:not(:disabled):hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  box-shadow: 0 5px 13px rgba(40, 87, 164, 0.22);
}

.button-secondary {
  color: #40516a;
  background: #fff;
  border-color: var(--line-strong);
}

.button-secondary:not(:disabled):hover {
  color: var(--primary);
  background: var(--primary-pale);
  border-color: #afc2e0;
}

.button-quiet {
  min-height: 36px;
  padding: 6px 9px;
  color: #61728a;
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.button-quiet:not(:disabled):hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.button-danger {
  color: #fff;
  background: var(--danger);
  border-color: var(--danger);
}

.button-danger:not(:disabled):hover {
  background: #9c3939;
  border-color: #9c3939;
}

.button-danger-outline {
  color: var(--danger);
  background: #fff;
  border-color: #e5bcbc;
}

.button-danger-outline:not(:disabled):hover {
  background: var(--danger-soft);
  border-color: var(--danger);
}

.button-export {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #d8e4f6;
}

.button-export:not(:disabled):hover {
  background: #e0eafa;
  border-color: #b9cce8;
}

.button-block {
  width: 100%;
}

.button-large {
  min-height: 46px;
  padding: 11px 20px;
}

.button-table {
  min-height: 32px;
  gap: 5px;
  padding: 5px 8px;
  color: #53667e;
  background: #fff;
  border-color: var(--line);
  font-size: 12px;
  font-weight: 500;
}

.button-table .icon {
  width: 14px;
  height: 14px;
}

.button-table-primary {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #d3e0f3;
}

.button-table-danger {
  color: var(--danger);
  background: #fff;
  border-color: #efd0d0;
}

.icon-button {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: #6a7a90;
  background: transparent;
  border: 0;
  border-radius: 50%;
  transition: color 150ms ease, background-color 150ms ease;
}

.icon-button:hover {
  color: var(--primary);
  background: var(--primary-soft);
}

.danger-icon:hover {
  color: var(--danger);
  background: var(--danger-soft);
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}

.spinner-large {
  width: 30px;
  height: 30px;
  color: var(--primary);
  border-width: 3px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* 登录页 */
.login-page {
  display: grid;
  min-height: 100vh;
  min-height: 100dvh;
  grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
  background: #fff;
}

.login-intro {
  position: relative;
  display: flex;
  overflow: hidden;
  min-height: 620px;
  flex-direction: column;
  padding: clamp(32px, 5vw, 72px) clamp(40px, 7vw, 110px);
  background:
    radial-gradient(circle at 82% 22%, rgba(89, 132, 198, 0.16), transparent 31%),
    radial-gradient(circle at 10% 90%, rgba(119, 157, 211, 0.13), transparent 30%),
    linear-gradient(145deg, #f1f5fc 0%, #e8eef8 100%);
}

.login-intro::before {
  position: absolute;
  top: 18%;
  right: -120px;
  width: 410px;
  height: 410px;
  border: 1px solid rgba(59, 99, 160, 0.10);
  border-radius: 50%;
  content: "";
}

.login-intro::after {
  position: absolute;
  right: 12%;
  bottom: 12%;
  width: 180px;
  height: 180px;
  border: 40px solid rgba(255, 255, 255, 0.32);
  border-radius: 50%;
  content: "";
}

.intro-brand,
.login-mobile-brand,
.app-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-deep);
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-mark {
  display: inline-flex;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 10px;
}

.brand-mark svg {
  width: 29px;
  height: 29px;
}

.brand-mark-large {
  width: 45px;
  height: 45px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-sm);
}

.brand-mark-large svg {
  width: 33px;
  height: 33px;
}

.intro-copy {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: auto 0;
  padding: 70px 0;
}

.eyebrow,
.page-eyebrow {
  margin-bottom: 13px;
  color: var(--primary);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.intro-copy h1 {
  margin-bottom: 24px;
  color: #18365f;
  font-size: clamp(34px, 3.4vw, 51px);
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.intro-copy > p:last-child {
  max-width: 470px;
  margin: 0;
  color: #62738d;
  font-size: 16px;
  line-height: 1.9;
}

.intro-features {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  color: #506581;
  font-size: 13px;
}

.intro-features span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.intro-features span::before {
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
  content: "";
}

.intro-footer {
  position: relative;
  z-index: 1;
  margin: 26px 0 0;
  color: #91a0b5;
  font-size: 12px;
  letter-spacing: 0.3em;
}

.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 48px clamp(32px, 6vw, 92px) 26px;
  background: #fff;
}

.login-card {
  width: 100%;
  max-width: 410px;
  margin: auto;
}

.login-mobile-brand {
  display: none;
}

.login-kicker {
  margin-bottom: 7px;
  color: var(--primary);
  font-size: 14px;
  font-weight: 600;
}

.login-card h2 {
  margin-bottom: 10px;
  font-size: 28px;
  letter-spacing: 0.01em;
}

.login-description {
  margin-bottom: 36px;
  color: var(--muted);
}

.form-field {
  margin-bottom: 20px;
}

.form-field > label,
.dynamic-label {
  display: block;
  margin-bottom: 7px;
  color: #3a4a60;
  font-size: 13px;
  font-weight: 600;
  white-space: pre-line;
}

.input-with-icon {
  position: relative;
}

.input-with-icon > svg {
  position: absolute;
  top: 50%;
  left: 14px;
  width: 19px;
  height: 19px;
  color: #92a0b2;
  pointer-events: none;
  transform: translateY(-50%);
}

.input-with-icon > input {
  width: 100%;
  height: 48px;
  padding: 10px 14px 10px 44px;
  color: var(--ink);
  background: #fbfcfe;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.input-with-icon > input::placeholder,
.form-control::placeholder {
  color: #a4afbd;
}

.input-with-icon > input:focus,
.form-control:focus {
  background: #fff;
  border-color: #6d91ca;
  box-shadow: 0 0 0 3px rgba(40, 87, 164, 0.10);
}

.form-error {
  margin: -4px 0 16px;
  padding: 9px 12px;
  color: #a33e3e;
  background: var(--danger-soft);
  border-radius: 6px;
  font-size: 13px;
}

.login-card .button-large {
  margin-top: 5px;
}

.login-help {
  margin: 24px 0 0;
  color: #99a5b5;
  font-size: 12px;
  text-align: center;
}

.login-copyright {
  margin: 35px 0 0;
  color: #a6b0be;
  font-size: 12px;
  letter-spacing: 0.05em;
}

/* 全局工作区 */
.app-view {
  min-height: 100vh;
  min-height: 100dvh;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 6px rgba(30, 48, 75, 0.025);
  backdrop-filter: blur(12px);
}

.topbar-inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 auto;
  padding: 10px 28px;
}

.admin-topbar {
  max-width: 1800px;
}

.teacher-topbar {
  max-width: 900px;
}

.app-brand-name {
  font-size: 17px;
}

.account-area {
  display: flex;
  align-items: center;
  gap: 14px;
}

.role-pill {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 3px 10px;
  color: var(--primary);
  background: var(--primary-soft);
  border: 1px solid #e0e8f6;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.user-meta {
  display: flex;
  flex-direction: column;
  padding-right: 15px;
  border-right: 1px solid var(--line);
  line-height: 1.4;
}

.user-meta strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.user-meta span {
  color: var(--muted);
  font-size: 11px;
}

.teacher-main {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 28px 24px 20px;
}

.backoffice-main {
  width: 100%;
  max-width: 1800px;
  margin: 0 auto;
  padding: 30px 28px 20px;
}

.teacher-welcome,
.workspace-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 25px;
}

.teacher-welcome h1,
.workspace-heading h1 {
  margin-bottom: 8px;
  font-size: 26px;
  letter-spacing: 0.01em;
}

.page-eyebrow {
  margin-bottom: 6px;
  letter-spacing: 0.05em;
}

.page-description {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.new-record-button {
  min-height: 44px;
}

.category-tabs-wrap {
  position: relative;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--line-strong);
}

.category-tabs {
  display: flex;
  gap: 7px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.category-tab {
  position: relative;
  min-width: 104px;
  min-height: 47px;
  flex: 1 0 104px;
  padding: 10px 20px;
  color: #64748a;
  background: transparent;
  border: 0;
  border-radius: 8px 8px 0 0;
  font-size: 15px;
  font-weight: 600;
  white-space: nowrap;
  transition: color 150ms ease, background-color 150ms ease;
}

.category-tab::after {
  position: absolute;
  right: 20px;
  bottom: -1px;
  left: 20px;
  height: 3px;
  background: transparent;
  border-radius: 3px 3px 0 0;
  content: "";
}

.category-tab:hover {
  color: var(--primary);
  background: var(--primary-pale);
}

.category-tab.is-active {
  color: var(--primary);
  background: var(--primary-soft);
}

.category-tab.is-active::after {
  background: var(--primary);
}

.department-navigation {
  margin-bottom: 12px;
}

.department-tabs {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 7px;
  margin-bottom: 8px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.department-subtabs {
  margin-bottom: 0;
  background: var(--primary-pale);
}

.department-tab {
  min-width: 0;
  min-height: 34px;
  padding: 6px 5px;
  text-align: center;
  line-height: 1.35;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #64748a;
  background: transparent;
  font-size: 12px;
  white-space: normal;
}

.department-tab:hover {
  color: var(--primary);
  background: var(--primary-pale);
}

.department-tab.is-active {
  color: #fff;
  border-color: var(--primary);
  background: var(--primary);
  font-weight: 650;
}

.app-footer {
  margin-top: 30px;
  padding: 18px 0 4px;
  color: #99a5b5;
  border-top: 1px solid var(--line);
  font-size: 12px;
  text-align: center;
}

/* 教师端记录 */
.teacher-status-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-bottom: 22px;
  padding: 17px 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.teacher-status-item {
  display: flex;
  min-width: 0;
  align-items: center;
  flex-direction: column;
  gap: 1px;
  padding: 0 5px;
  color: var(--muted);
  border-right: 1px solid var(--line);
  font-size: 11px;
  text-align: center;
}

.teacher-status-item:last-child {
  border-right: 0;
}

.teacher-status-count {
  font-size: 21px;
  font-weight: 700;
  line-height: 1.4;
}

.text-draft { color: #697a91; }
.text-pending { color: #a06b24; }
.text-returned { color: var(--danger); }
.text-school { color: var(--primary); }
.text-done { color: var(--success); }
.text-total { color: var(--ink); }
.text-neutral { color: var(--muted); }

.records-section {
  min-height: 260px;
}

.section-heading,
.table-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 15px;
}

.section-heading h2,
.table-panel-heading h2 {
  margin: 0 0 2px;
  font-size: 17px;
}

.section-heading p,
.table-panel-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.record-card-list {
  display: grid;
  gap: 12px;
}

.record-card {
  padding: 19px 20px 13px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.record-card:hover {
  border-color: #cbd7e8;
  box-shadow: 0 5px 17px rgba(28, 51, 85, 0.07);
}

.record-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.record-card-title {
  min-width: 0;
  padding: 0;
  text-align: left;
  background: none;
  border: 0;
}

.record-card-title h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.record-card-title:hover h3 {
  color: var(--primary);
}

.status-badge {
  display: inline-flex;
  min-height: 25px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  padding: 3px 9px;
  border: 1px solid transparent;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.status-draft {
  color: #617185;
  background: #f1f3f6;
  border-color: #e3e7ec;
}

.status-pending {
  color: #97611c;
  background: var(--warning-soft);
  border-color: #f0dfc4;
}

.status-returned {
  color: #ac4343;
  background: var(--danger-soft);
  border-color: #f0d1d1;
}

.status-school {
  color: var(--primary);
  background: var(--primary-soft);
  border-color: #d8e4f5;
}

.status-done {
  color: var(--success);
  background: var(--success-soft);
  border-color: #cfe9dc;
}

.status-neutral {
  color: var(--muted);
  background: #f3f5f8;
}

.record-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.return-reason {
  display: flex;
  gap: 10px;
  margin-top: 14px;
  padding: 11px 13px;
  color: #9a4747;
  background: #fff7f6;
  border-left: 3px solid #d98686;
  border-radius: 5px;
}

.return-reason > .icon {
  margin-top: 3px;
}

.return-reason strong {
  font-size: 12px;
}

.return-reason p {
  margin: 2px 0 0;
  font-size: 12px;
  white-space: pre-wrap;
  word-break: break-word;
}

.record-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 13px;
  padding-top: 11px;
  border-top: 1px solid #edf0f5;
}

.record-card-actions .button {
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12px;
}

/* 动态表单 */
.back-button {
  margin: 0 0 12px -8px;
}

.editor-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.editor-heading h2 {
  margin-bottom: 7px;
  font-size: 22px;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 8px;
}

.alert > .icon {
  margin-top: 3px;
}

.alert strong {
  display: block;
  margin-bottom: 3px;
}

.alert p {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
}

.alert-warning {
  color: #8f4f3d;
  background: #fff7f1;
  border-color: #efdbcd;
}

.record-form {
  display: grid;
  gap: 16px;
}

.form-group {
  min-width: 0;
  margin: 0;
  padding: 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.form-group legend {
  padding: 0 8px;
  color: var(--ink);
  font-size: 16px;
  font-weight: 700;
}

.dynamic-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 19px 18px;
}

.dynamic-field {
  min-width: 0;
}

.dynamic-field.field-wide {
  grid-column: 1 / -1;
}

.dynamic-label {
  min-height: 20px;
  margin-bottom: 7px;
  line-height: 1.5;
}

.required-mark {
  color: var(--danger);
}

.form-control {
  display: block;
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

select.form-control {
  padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, #7a899b 50%), linear-gradient(135deg, #7a899b 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-repeat: no-repeat;
  background-size: 5px 5px, 5px 5px;
  appearance: none;
}

textarea.form-control {
  min-height: 102px;
  resize: vertical;
  line-height: 1.7;
}

.form-control.is-readonly {
  color: #596a81;
  background: #f5f7fa;
  border-color: #e3e8ef;
  cursor: default;
}

.form-control:disabled {
  color: #8793a3;
  background-color: #f4f6f9;
}

.field-hint {
  margin: 5px 0 0;
  color: #929dad;
  font-size: 11px;
}

.file-input {
  position: absolute;
  overflow: hidden;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.file-picker {
  display: flex;
  min-height: 74px;
  align-items: center;
  justify-content: center;
  gap: 13px;
  padding: 13px 16px;
  color: #63758d;
  background: #fafbfe;
  border: 1px dashed #b9c7dc;
  border-radius: 8px;
  text-align: left;
  transition: background-color 150ms ease, border-color 150ms ease;
}

.file-picker > .icon {
  width: 25px;
  height: 25px;
  color: var(--primary);
}

.file-picker strong,
.file-picker span {
  display: block;
}

.file-picker strong {
  margin-bottom: 2px;
  color: #435671;
  font-size: 13px;
}

.file-picker span {
  color: #8b98aa;
  font-size: 11px;
}

.file-picker:hover {
  background: var(--primary-pale);
  border-color: var(--primary);
}

.file-input:focus-visible + .file-picker {
  outline: 3px solid rgba(40, 87, 164, 0.20);
  outline-offset: 2px;
}

.file-picker.is-disabled {
  background: #f5f6f8;
  border-color: #d9dfe7;
  cursor: not-allowed;
  opacity: 0.72;
}

.attachment-list {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}

.attachment-item {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
  padding: 8px 9px;
  background: #f7f9fc;
  border: 1px solid #e7ecf3;
  border-radius: 7px;
}

.attachment-item > .icon {
  width: 17px;
  height: 17px;
  color: #7589a5;
}

.attachment-info {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  line-height: 1.45;
}

.attachment-name {
  overflow: hidden;
  color: #3c4e67;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-size {
  color: #939faf;
  font-size: 10px;
}

.attachment-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 2px;
}

.attachment-actions .icon-button {
  width: 31px;
  height: 31px;
}

.upload-progress {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
  padding: 9px 11px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 6px;
  font-size: 12px;
}

.editor-actions {
  display: flex;
  justify-content: flex-end;
  gap: 11px;
  padding: 4px 0 0;
}

.editor-tip {
  margin: -5px 0 0;
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}

/* 后台筛选及数据条 */
.workspace-heading {
  align-items: center;
}

.workspace-nav {
  display: flex;
  flex: 0 0 auto;
  gap: 9px;
}

.stats-strip {
  display: flex;
  overflow-x: auto;
  margin: -3px 0 16px;
  padding: 12px 8px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.stat-item {
  display: flex;
  min-width: 118px;
  flex: 1 0 118px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 1px 16px;
  border-right: 1px solid var(--line);
}

.stat-item:last-child {
  border-right: 0;
}

.stat-value {
  font-size: 21px;
  font-weight: 700;
}

.stat-label {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.stats-context {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -3px 0 16px;
  padding: 11px 14px;
  color: #6f7e91;
  background: #f0f4fa;
  border-radius: 8px;
  font-size: 12px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 15px;
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.search-control {
  position: relative;
  min-width: 230px;
  flex: 1;
}

.search-control > .icon {
  position: absolute;
  top: 50%;
  left: 12px;
  width: 17px;
  height: 17px;
  color: #8997aa;
  pointer-events: none;
  transform: translateY(-50%);
}

.search-control input {
  width: 100%;
  height: 39px;
  padding: 8px 12px 8px 38px;
  color: var(--ink);
  background: #fafbfd;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
}

.search-control input:focus {
  background: #fff;
  border-color: #7495ca;
  box-shadow: 0 0 0 3px rgba(40, 87, 164, 0.08);
}

.filter-select {
  width: 146px;
  height: 39px;
  flex: 0 0 auto;
  padding: 7px 29px 7px 10px;
  color: #4b5d75;
  background-color: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  outline: none;
}

.department-select {
  width: 138px;
}

.filter-bar .button-export {
  min-height: 39px;
  margin-left: auto;
  font-size: 12px;
}

/* 原 Excel 字段表格 */
.table-panel {
  min-width: 0;
  padding: 17px 17px 11px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.table-panel-heading {
  margin-bottom: 13px;
  padding: 0 2px;
}

.table-scroll {
  position: relative;
  overflow: auto;
  width: 100%;
  max-height: calc(100vh - 335px);
  min-height: 170px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  scrollbar-color: #bdc8d7 #f1f4f8;
  scrollbar-width: thin;
}

.table-scroll::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.table-scroll::-webkit-scrollbar-track {
  background: #f1f4f8;
}

.table-scroll::-webkit-scrollbar-thumb {
  background: #bdc8d7;
  border: 2px solid #f1f4f8;
  border-radius: 8px;
}

.records-table,
.users-table {
  width: max-content;
  min-width: 100%;
  border-spacing: 0;
  border-collapse: separate;
  color: #3a4a5e;
  font-size: 12px;
  table-layout: fixed;
}

.records-table th,
.records-table td,
.users-table th,
.users-table td {
  min-width: 138px;
  max-width: 220px;
  height: 44px;
  padding: 9px 12px;
  border-right: 1px solid #e6eaf0;
  border-bottom: 1px solid #e6eaf0;
  text-align: left;
  vertical-align: middle;
}

.records-table th:last-child,
.records-table td:last-child,
.users-table th:last-child,
.users-table td:last-child {
  border-right: 0;
}

.records-table tbody tr:last-child td,
.users-table tbody tr:last-child td {
  border-bottom: 0;
}

.records-table thead th,
.users-table thead th {
  position: sticky;
  z-index: 5;
  top: 0;
  height: 52px;
  color: #31435c;
  background: #edf2f8;
  border-bottom-color: #cfd9e6;
  font-weight: 700;
  line-height: 1.45;
  white-space: pre-line;
}

.records-table .column-wide {
  width: 230px;
  min-width: 230px;
  max-width: 230px;
}

.records-table .sticky-column {
  position: sticky;
  z-index: 3;
  left: 0;
  width: 138px;
  min-width: 138px;
  max-width: 138px;
  background: #fff;
  box-shadow: 3px 0 5px rgba(35, 54, 80, 0.045);
}

.records-table thead .sticky-column {
  z-index: 8;
  background: #e7eef7;
}

.records-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.records-table tbody tr:nth-child(even) td.sticky-column {
  background: #fbfcfe;
}

.records-table tbody tr:hover td,
.records-table tbody tr:focus td {
  background: #f3f7fd;
}

.records-table tbody tr:hover td.sticky-column,
.records-table tbody tr:focus td.sticky-column {
  background: #f3f7fd;
}

.record-row {
  cursor: pointer;
  outline: none;
}

.cell-truncate {
  display: block;
  overflow: hidden;
  max-width: 100%;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.records-table .has-attachment {
  color: var(--primary);
}

.records-table .attachment-column {
  width: 100px;
  min-width: 100px;
  max-width: 100px;
  text-align: center;
}

.table-attachment-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 5px;
  color: var(--primary);
  background: transparent;
  border: 0;
  border-radius: 4px;
  font-size: 12px;
}

.table-attachment-button:hover {
  background: var(--primary-soft);
}

.table-attachment-button .icon {
  width: 14px;
  height: 14px;
}

.records-table .status-column {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  text-align: center;
}

.records-table .operation-column {
  width: 235px;
  min-width: 235px;
  max-width: 235px;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}

.table-scroll-hint {
  padding: 9px 2px 0;
  color: #929ead;
  font-size: 11px;
}

/* 状态面板 */
.state-panel {
  display: flex;
  min-height: 230px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 35px 20px;
  color: var(--muted);
  background: #fff;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
  text-align: center;
}

.state-panel > .icon {
  width: 38px;
  height: 38px;
  margin-bottom: 13px;
  color: #a5b2c3;
}

.state-panel h3 {
  margin-bottom: 6px;
  font-size: 16px;
}

.state-panel p {
  max-width: 440px;
  margin-bottom: 16px;
  font-size: 13px;
}

.loading-state {
  gap: 15px;
  border-style: solid;
}

.loading-state p {
  margin: 0;
}

.error-state > .icon {
  color: var(--danger);
}

/* 模态框及完整记录 */
.modal-overlay {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: rgba(20, 32, 51, 0.45);
  backdrop-filter: blur(3px);
  animation: fade-in 150ms ease;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  display: flex;
  overflow: hidden;
  width: 100%;
  max-width: 510px;
  max-height: calc(100vh - 56px);
  max-height: calc(100dvh - 56px);
  flex-direction: column;
  background: #fff;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 15px;
  box-shadow: 0 24px 75px rgba(18, 34, 59, 0.24);
  animation: modal-in 180ms ease;
}

.modal-dialog.modal-wide {
  max-width: 900px;
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
}

.modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.modal-close {
  width: 34px;
  height: 34px;
  font-size: 0;
}

.modal-close > span:last-child {
  display: none;
}

.modal-body {
  overflow-y: auto;
  padding: 22px;
  overscroll-behavior: contain;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: 23px -22px -22px;
  padding: 15px 22px;
  background: #fafbfd;
  border-top: 1px solid var(--line);
}

.detail-summary {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin: -2px 0 20px;
  padding: 16px 18px;
  background: var(--primary-pale);
  border: 1px solid #e4eaf4;
  border-radius: 9px;
}

.detail-category {
  margin-bottom: 4px;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.detail-summary h3 {
  margin: 0;
  font-size: 17px;
  word-break: break-word;
}

.detail-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 7px;
}

.detail-field {
  display: grid;
  min-width: 0;
  grid-template-columns: minmax(100px, 0.42fr) minmax(0, 1fr);
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-field.detail-wide {
  grid-column: 1 / -1;
}

.detail-field dt,
.detail-field dd {
  min-width: 0;
  margin: 0;
  padding: 11px 12px;
  font-size: 12px;
  white-space: pre-line;
  word-break: break-word;
}

.detail-field dt {
  color: #66768c;
  background: #f7f9fc;
  border-right: 1px solid var(--line);
  font-weight: 600;
}

.detail-field dd {
  color: #2f4057;
  background: #fff;
}

.detail-field .attachment-list {
  margin: 0;
}

.detail-field .attachment-item {
  padding: 6px 8px;
}

.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}

.log-section {
  margin-top: 24px;
}

.log-section h3 {
  margin-bottom: 13px;
  font-size: 15px;
}

.log-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.log-timeline li {
  position: relative;
  display: flex;
  gap: 12px;
  padding-bottom: 17px;
}

.log-timeline li:not(:last-child)::before {
  position: absolute;
  top: 12px;
  bottom: -1px;
  left: 4px;
  width: 1px;
  background: #dbe2ec;
  content: "";
}

.log-dot {
  position: relative;
  z-index: 1;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  margin-top: 6px;
  background: var(--primary);
  border: 2px solid #e2eaf7;
  border-radius: 50%;
  box-sizing: content-box;
}

.log-body {
  min-width: 0;
  flex: 1;
}

.log-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.log-title strong {
  color: #3b4c64;
  font-size: 13px;
}

.log-title time {
  color: #929ead;
  font-size: 11px;
  white-space: nowrap;
}

.log-body p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 12px;
  white-space: pre-wrap;
}

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

.detail-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
  padding-top: 17px;
  border-top: 1px solid var(--line);
}

.action-description {
  margin-bottom: 18px;
  color: #5e6f86;
  line-height: 1.8;
  word-break: break-word;
}

.action-description.centered {
  margin-bottom: 7px;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
}

.confirm-illustration {
  display: flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  margin: 0 auto 15px;
  color: var(--primary);
  background: var(--primary-soft);
  border-radius: 50%;
}

.confirm-illustration .icon {
  width: 27px;
  height: 27px;
}

.confirm-title {
  margin-bottom: 8px;
  font-size: 17px;
  text-align: center;
}

.confirm-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

/* 用户管理 */
.user-management-layout {
  display: grid;
  grid-template-columns: 310px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.user-create-panel,
.user-list-panel {
  min-width: 0;
  padding: 20px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.user-create-panel h2,
.user-list-panel h2 {
  margin-bottom: 5px;
  font-size: 17px;
}

.panel-description {
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 12px;
}

.user-create-form .form-field {
  margin-bottom: 15px;
}

.user-create-form .button-block {
  margin-top: 5px;
}

.users-table th,
.users-table td {
  min-width: 110px;
}

.users-table th:first-child,
.users-table td:first-child {
  min-width: 140px;
}

.account-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  white-space: nowrap;
}

.account-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  content: "";
}

.account-status.is-active {
  color: var(--success);
}

.account-status.is-active::before {
  background: var(--success);
}

.account-status.is-disabled {
  color: #8b96a4;
}

.account-status.is-disabled::before {
  background: #9ca7b4;
}

/* 消息提示 */
.toast-region {
  position: fixed;
  z-index: 200;
  top: 82px;
  right: 24px;
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 10px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  color: #315f4e;
  background: #fff;
  border: 1px solid #cce3d8;
  border-left: 4px solid var(--success);
  border-radius: 9px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 200ms ease, transform 200ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-error {
  color: #974141;
  border-color: #eed1d1;
  border-left-color: var(--danger);
}

.toast > .icon {
  margin-top: 2px;
}

.toast > span:last-child {
  min-width: 0;
  word-break: break-word;
}

/* 中等屏幕 */
@media (max-width: 1100px) {
  .login-page {
    grid-template-columns: minmax(0, 1fr) minmax(390px, 0.85fr);
  }

  .login-intro {
    padding-right: 55px;
    padding-left: 55px;
  }

  .intro-copy h1 {
    font-size: 37px;
  }

  .filter-bar {
    flex-wrap: wrap;
  }

  .search-control {
    min-width: 280px;
  }

  .filter-bar .button-export {
    margin-left: 0;
  }

  .table-scroll {
    max-height: calc(100vh - 365px);
  }

  .user-management-layout {
    grid-template-columns: 280px minmax(0, 1fr);
  }
}

/* 手机及窄屏教师端 */
@media (max-width: 720px) {
  body {
    font-size: 14px;
  }

  .login-page {
    display: block;
    background: linear-gradient(180deg, #edf3fc 0, #f8faff 240px, #fff 430px);
  }

  .login-intro {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    min-height: 100dvh;
    justify-content: flex-start;
    padding: 50px 24px 24px;
    background: transparent;
  }

  .login-card {
    max-width: 440px;
    padding: 26px 23px;
    background: #fff;
    border: 1px solid rgba(218, 226, 238, 0.8);
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(34, 58, 94, 0.08);
  }

  .login-mobile-brand {
    display: flex;
    margin-bottom: 35px;
    font-size: 17px;
  }

  .login-card h2 {
    font-size: 24px;
  }

  .login-description {
    margin-bottom: 27px;
  }

  .login-copyright {
    margin-top: 28px;
  }

  .topbar-inner {
    min-height: 61px;
    padding: 9px 16px;
  }

  .app-brand {
    gap: 8px;
  }

  .app-brand .brand-mark {
    width: 34px;
    height: 34px;
  }

  .app-brand .brand-mark svg {
    width: 25px;
    height: 25px;
  }

  .app-brand-name {
    font-size: 15px;
    letter-spacing: 0;
  }

  .account-area {
    gap: 7px;
  }

  .user-meta,
  .role-pill {
    display: none;
  }

  .logout-button {
    width: 38px;
    height: 38px;
    min-height: 38px;
    padding: 0;
  }

  .logout-button > span:last-child {
    display: none;
  }

  .teacher-main,
  .backoffice-main {
    padding: 21px 15px 16px;
  }

  .teacher-welcome,
  .workspace-heading {
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 19px;
  }

  .teacher-welcome h1,
  .workspace-heading h1 {
    font-size: 22px;
  }

  .page-description {
    font-size: 12px;
  }

  .new-record-button {
    min-height: 42px;
    padding: 9px 12px;
    font-size: 12px;
  }

  .category-tabs-wrap {
    margin-right: -15px;
    margin-bottom: 18px;
    margin-left: -15px;
    padding-left: 8px;
  }

  .category-tabs {
    gap: 2px;
    padding-right: 15px;
  }

  .category-tab {
    min-width: 82px;
    min-height: 44px;
    flex-basis: 82px;
    padding: 9px 15px;
    font-size: 14px;
  }

  .category-tab::after {
    right: 15px;
    left: 15px;
  }

  .teacher-status-strip {
    margin-bottom: 18px;
    padding: 13px 4px;
  }

  .teacher-status-item {
    padding: 0 2px;
    font-size: 9px;
    line-height: 1.4;
  }

  .teacher-status-count {
    font-size: 19px;
  }

  .record-card {
    padding: 16px 15px 11px;
  }

  .record-card-title h3 {
    font-size: 15px;
  }

  .record-card-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .record-card-actions .button {
    min-width: 0;
    min-height: 40px;
    padding: 7px 6px;
  }

  .record-card-actions .button:only-child {
    grid-column: 1 / -1;
  }

  .form-group {
    padding: 17px 14px;
  }

  .dynamic-form-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 17px;
  }

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

  .form-control {
    min-height: 46px;
    font-size: 16px;
  }

  select.form-control {
    padding-right: 36px;
  }

  textarea.form-control {
    min-height: 112px;
  }

  .file-picker {
    min-height: 83px;
    justify-content: flex-start;
  }

  .editor-heading {
    gap: 12px;
  }

  .editor-heading h2 {
    font-size: 20px;
  }

  .editor-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .editor-actions .button {
    min-width: 0;
    min-height: 48px;
    padding: 10px 8px;
  }

  .editor-tip {
    text-align: center;
  }

  .workspace-heading {
    flex-direction: column;
  }

  .workspace-nav {
    width: 100%;
  }

  .workspace-nav .button {
    flex: 1;
  }

  .stats-strip {
    padding: 10px 3px;
  }

  .stat-item {
    min-width: 104px;
    flex-basis: 104px;
    flex-direction: column;
    gap: 0;
    padding: 1px 10px;
  }

  .filter-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 11px;
  }

  .search-control {
    min-width: 0;
    grid-column: 1 / -1;
  }

  .filter-select,
  .department-select {
    width: 100%;
  }

  .filter-bar .button-export {
    grid-column: 1 / -1;
  }

  .table-panel {
    padding: 13px 10px 10px;
  }

  .table-panel-heading h2 {
    font-size: 15px;
  }

  .table-scroll {
    max-height: 62vh;
  }

  .table-scroll-hint {
    line-height: 1.6;
  }

  .modal-overlay {
    align-items: flex-end;
    padding: 12px 0 0;
  }

  .modal-dialog,
  .modal-dialog.modal-wide {
    width: 100%;
    max-width: none;
    max-height: calc(100dvh - 24px);
    border-radius: 16px 16px 0 0;
  }

  .modal-header {
    padding: 16px 17px;
  }

  .modal-body {
    padding: 17px 15px calc(20px + env(safe-area-inset-bottom));
  }

  .modal-footer {
    margin: 20px -15px calc(-20px - env(safe-area-inset-bottom));
    padding: 13px 15px calc(13px + env(safe-area-inset-bottom));
  }

  .detail-summary {
    padding: 13px;
  }

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

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

  .detail-field {
    grid-template-columns: minmax(95px, 0.42fr) minmax(0, 1fr);
  }

  .detail-field dt,
  .detail-field dd {
    padding: 10px;
  }

  .detail-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .user-management-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .toast-region {
    top: 70px;
    right: 16px;
    left: 16px;
    width: auto;
  }
}

/* 模拟微信注册与身份绑定 */
.wechat-register-page {
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--text);
  background: linear-gradient(180deg, #eef7f1 0%, var(--background) 42%);
}

.wechat-register-content {
  min-height: 100vh;
  min-height: 100dvh;
}

.register-header {
  border-bottom: 1px solid rgba(40, 87, 164, 0.08);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

.register-header-inner {
  max-width: 940px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin: 0 auto;
  padding: 14px 18px;
}

.register-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--primary-deep);
  font-size: 14px;
  font-weight: 700;
}

.register-brand-mark {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  background: var(--primary);
}

.register-brand-mark .icon,
.register-brand-mark svg {
  width: 18px;
  height: 18px;
}

.register-stage {
  width: min(620px, calc(100% - 28px));
  margin: 28px auto 20px;
}

.registration-steps {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.registration-steps li {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  color: #8a9695;
  font-size: 12px;
}

.registration-steps li::before {
  content: "";
  position: absolute;
  z-index: 0;
  top: 14px;
  left: -50%;
  width: 100%;
  height: 1px;
  background: #d7e2de;
}

.registration-steps li:first-child::before { display: none; }
.registration-steps li.is-current { color: #178051; font-weight: 700; }
.registration-steps li.is-complete { color: #36916a; }

.registration-step-number {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  z-index: 1;
  border: 1px solid #d7e2de;
  border-radius: 50%;
  background: #fff;
  font-size: 11px;
}

.is-current .registration-step-number,
.is-complete .registration-step-number {
  border-color: #2e9b66;
  color: #fff;
  background: #2e9b66;
}

.registration-step-number .icon,
.registration-step-number svg { width: 14px; height: 14px; }

.registration-card {
  position: relative;
  padding: 26px 22px;
  border: 1px solid rgba(39, 92, 70, 0.1);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 18px 45px rgba(34, 74, 58, 0.09);
}

.registration-card h1 {
  margin: 6px 0 7px;
  color: #203b34;
  font-size: 23px;
}

.simulation-badge {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 6px;
  color: #277853;
  background: #eaf6ef;
  font-size: 10px;
  font-weight: 700;
}

.registration-description {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.7;
}

.simulation-notice {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 17px;
  padding: 11px 12px;
  border: 1px solid #e3e2ce;
  border-radius: 9px;
  color: #807242;
  background: #fffbeb;
  font-size: 11px;
  line-height: 1.6;
}

.simulation-notice p { margin: 0; }
.simulation-notice .icon { flex: 0 0 auto; margin-top: 2px; }

.simulated-wechat-account {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
  padding: 13px;
  border-radius: 11px;
  color: #334b43;
  background: #f3f8f5;
  font-size: 13px;
  font-weight: 600;
}

.simulated-wechat-avatar {
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #2e9b66;
}

.binding-wechat-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 19px;
  padding: 11px 12px;
  border-radius: 10px;
  background: #f3f8f5;
}

.binding-wechat-summary > div { display: grid; gap: 2px; }
.binding-wechat-summary span { color: var(--muted); font-size: 10px; }
.binding-wechat-summary strong { color: #2d5748; font-size: 13px; }
.binding-form-grid { display: grid; grid-template-columns: 1fr; gap: 0 13px; }
.registration-back-login { margin-top: 13px; }

.button-wechat {
  color: #fff;
  background: #249b5f;
  border-color: #249b5f;
}

.button-wechat:hover:not(:disabled) { background: #1f8652; border-color: #1f8652; }
.register-footer { padding: 5px 18px 24px; color: #899690; font-size: 10px; text-align: center; }

/* 分级人员名册 */
.roster-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin: 13px 0 15px;
  padding: 11px;
  border-radius: 9px;
  background: var(--primary-pale);
}

.roster-filters select {
  width: auto;
  min-width: 150px;
  flex: 1;
}

.roster-only .user-list-panel { width: 100%; }
.roster-only .users-table th,
.roster-only .users-table td { min-width: 125px; }

@media (min-width: 680px) {
  .register-stage { margin-top: 38px; }
  .registration-card { padding: 31px 32px; }
  .binding-form-grid { grid-template-columns: 1fr 1fr; }
  .binding-form-grid .form-field:first-child { grid-column: 1 / -1; }
}

@media (max-width: 390px) {
  .login-panel {
    padding-right: 15px;
    padding-left: 15px;
  }

  .login-card {
    padding: 23px 19px;
  }

  .app-brand-name {
    font-size: 14px;
  }

  .teacher-main,
  .backoffice-main {
    padding-right: 12px;
    padding-left: 12px;
  }

  .teacher-welcome {
    gap: 8px;
  }

  .new-record-button .icon {
    display: none;
  }

  .teacher-status-item {
    font-size: 8px;
  }

  .record-card-actions .button .icon {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .topbar,
  .filter-bar,
  .workspace-heading,
  .category-tabs-wrap,
  .stats-strip,
  .table-scroll-hint,
  .app-footer,
  .operation-column {
    display: none !important;
  }

  .backoffice-main {
    max-width: none;
    padding: 0;
  }

  .table-panel {
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  .table-scroll {
    overflow: visible;
    max-height: none;
  }
}
