/* ==========================================================================
   助学金材料收集平台 · 设计系统
   宣纸底色 / 松绿主色 / 朱砂点缀 / 宋体标题 / 发丝线
   ========================================================================== */

:root {
  --paper: #f2eee2;
  --paper-deep: #ebe5d6;
  --surface: #fcfaf3;
  --surface-2: #f7f2e7;
  --surface-3: #f1ebdc;
  --ink: #1b211c;
  --ink-2: #343b34;
  --muted: #6e746b;
  --faint: #90958c;
  --line: #d9d2c1;
  --line-soft: #e7e1d2;
  --green: #1e4b3a;
  --green-2: #2b6049;
  --green-3: #4f7a62;
  --green-wash: #e8eee7;
  --green-mist: #f0f4ee;
  --red: #a9432e;
  --red-2: #c05a43;
  --red-wash: #f5e7e1;
  --amber: #93652b;
  --amber-wash: #f4ead6;
  --blue: #3c5d72;
  --blue-wash: #e7edf0;
  --radius: 3px;
  --radius-lg: 5px;
  --shadow: 0 1px 0 rgba(27, 33, 28, 0.04);
  --shadow-lift: 0 18px 40px -24px rgba(27, 33, 28, 0.35);
  --serif: "Songti SC", "STSong", "Noto Serif SC", "SimSun", serif;
  --sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", sans-serif;
  --mono: "SFMono-Regular", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
  --nav-w: 248px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 600px at 85% -10%, rgba(255, 255, 255, 0.55), transparent 60%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-2); }
img { max-width: 100%; display: block; }
.icon { width: 16px; height: 16px; flex: 0 0 auto; }
.card-title > .icon { width: 17px; height: 17px; color: var(--green-3); }
.demo-box summary .icon { width: 14px; height: 14px; color: var(--green-3); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
strong { font-weight: 600; }
::selection { background: rgba(30, 75, 58, 0.16); }

.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); letter-spacing: -0.01em; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12.5px; }
.tiny { font-size: 11.5px; letter-spacing: 0.08em; }
.nowrap { white-space: nowrap; }
.tnum { font-variant-numeric: tabular-nums; }
.ink { color: var(--ink); }
.green { color: var(--green); }
.red { color: var(--red); }
.center { text-align: center; }
.right { text-align: right; }
.hr { height: 1px; background: var(--line); border: 0; margin: 22px 0; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- 布局 */

.shell { display: grid; grid-template-columns: var(--nav-w) minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 20px 18px;
  border-right: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 30%),
    var(--paper-deep);
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 0 6px 24px; color: var(--ink); }
.brand:hover { color: var(--ink); }
.brand-seal {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center;
  background: var(--green); color: var(--surface);
  font-family: var(--serif); font-size: 24px; line-height: 1;
  border-radius: 2px;
  box-shadow: inset 0 0 0 1px rgba(252, 250, 243, 0.25), inset 0 0 0 4px var(--green), inset 0 0 0 5px rgba(252, 250, 243, 0.28);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-family: var(--serif); font-size: 18px; letter-spacing: 0.12em; font-weight: 600; }
.brand-text small { font-size: 10.5px; color: var(--muted); letter-spacing: 0.18em; margin-top: 3px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label {
  font-size: 10px; letter-spacing: 0.22em; color: var(--faint);
  padding: 16px 12px 8px;
}
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px;
  border-left: 2px solid transparent;
  border-radius: 0 2px 2px 0;
  color: var(--ink-2);
  font-size: 13.5px;
  transition: background 160ms var(--ease), color 160ms var(--ease);
}
.nav-item .nav-icon { width: 17px; height: 17px; color: var(--faint); flex: 0 0 auto; }
.nav-item:hover { background: rgba(30, 75, 58, 0.06); color: var(--green); }
.nav-item:hover .nav-icon { color: var(--green-3); }
.nav-item.active {
  background: rgba(30, 75, 58, 0.09);
  border-left-color: var(--green);
  color: var(--green);
  font-weight: 600;
}
.nav-item.active .nav-icon { color: var(--green); }
.nav-item .nav-count {
  margin-left: auto; min-width: 20px; height: 19px; padding: 0 6px;
  display: inline-grid; place-items: center;
  font-size: 10.5px; font-weight: 600; letter-spacing: 0;
  color: var(--surface); background: var(--red); border-radius: 10px;
}

.sidebar-foot { margin-top: auto; padding-top: 18px; }
.user-card {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 10px;
  border-top: 1px solid var(--line);
}
.avatar {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green-wash); color: var(--green);
  font-family: var(--serif); font-size: 15px; font-weight: 600;
  line-height: 1; letter-spacing: 0;
  border: 1px solid rgba(30, 75, 58, 0.14);
}
.user-meta { min-width: 0; flex: 1; line-height: 1.35; }
.user-meta strong { display: block; font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-meta span { display: block; font-size: 10.5px; color: var(--faint); letter-spacing: 0.08em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-actions { margin-left: auto; display: flex; gap: 2px; }
.icon-btn {
  width: 30px; height: 30px; display: grid; place-items: center;
  border: 0; background: transparent; color: var(--faint); border-radius: 2px;
}
.icon-btn:hover { background: rgba(30, 75, 58, 0.08); color: var(--green); }
.icon-btn svg { width: 16px; height: 16px; }
.sidebar-note {
  margin: 14px 8px 0; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 10.5px; color: var(--faint); line-height: 1.7; letter-spacing: 0.04em;
}

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(242, 238, 226, 0.92);
  backdrop-filter: blur(10px);
}
.topbar-inner {
  display: flex; align-items: center; gap: 18px;
  padding: 15px 44px;
}
.topbar-title { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.topbar-title .crumb { font-size: 10.5px; letter-spacing: 0.16em; color: var(--faint); }
.topbar-title strong { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 0.06em; }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.deadline-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 11px; border: 1px solid var(--line); border-radius: 2px;
  background: var(--surface); font-size: 11.5px; color: var(--ink-2); white-space: nowrap;
}
.deadline-pill svg { width: 14px; height: 14px; color: var(--red); }
.deadline-pill strong { color: var(--red); font-weight: 600; }
.mobile-toggle { display: none; }

.content { padding: 34px 44px 52px; width: 100%; max-width: 1460px; margin: 0 auto; }
.foot {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 18px 44px 26px; color: var(--faint);
  font-size: 10.5px; letter-spacing: 0.1em;
  border-top: 1px solid var(--line-soft);
}
.foot a { color: var(--faint); }

/* ---------------------------------------------------------------- 页头 */

.page-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 28px; margin-bottom: 26px;
}
.page-head h1 {
  font-family: var(--serif); font-size: clamp(28px, 2.6vw, 38px);
  font-weight: 600; line-height: 1.22; letter-spacing: 0.03em;
}
.eyebrow {
  display: flex; align-items: center; gap: 8px;
  font-size: 10.5px; color: var(--muted); letter-spacing: 0.18em;
  text-transform: uppercase; margin-bottom: 10px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--green-3); }
.lede { margin-top: 10px; color: var(--muted); max-width: 68ch; font-size: 13.5px; }
.page-head-meta { display: flex; align-items: center; gap: 12px; padding-bottom: 4px; flex-wrap: wrap; }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- 卡片 / 通用 */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-pad { padding: 24px 26px; }
.card-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 20px 24px 14px;
}
.card-head + .card-body { padding-top: 0; }
.card-body { padding: 0 24px 22px; }
.card-title {
  font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 0.04em;
  display: flex; align-items: center; gap: 9px;
}
.card-sub { color: var(--muted); font-size: 12px; margin-top: 4px; }
.card-flush { border-top: 1px solid var(--line-soft); }
.section-rule { border-top: 2px solid var(--ink); padding-top: 14px; }
.section-rule .card-title { font-size: 19px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 40px; padding: 0 17px;
  border: 1px solid transparent; border-radius: 2px;
  background: transparent; color: var(--ink);
  font-size: 13px; font-weight: 500; letter-spacing: 0.04em;
  transition: background 160ms var(--ease), border-color 160ms var(--ease), color 160ms var(--ease), transform 120ms var(--ease);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--green); border-color: var(--green); color: #fbf8ef; }
.btn--primary:hover { background: var(--green-2); border-color: var(--green-2); color: #fff; }
.btn--ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn--ghost:hover { border-color: var(--green-3); color: var(--green); background: var(--green-mist); }
.btn--danger { background: transparent; border-color: rgba(169, 67, 46, 0.35); color: var(--red); }
.btn--danger:hover { background: var(--red-wash); border-color: var(--red); }
.btn--dark { background: var(--ink); border-color: var(--ink); color: var(--surface); }
.btn--dark:hover { background: #2c332c; color: #fff; }
.btn--sm { min-height: 33px; padding: 0 12px; font-size: 12px; }
.btn--lg { min-height: 48px; padding: 0 24px; font-size: 14px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: 0.45; pointer-events: none; }
.btn-link { border: 0; background: none; padding: 0; color: var(--green); font-size: 12.5px; }
.btn-link:hover { text-decoration: underline; }
.btn-row { display: flex; gap: 9px; flex-wrap: wrap; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 23px; padding: 0 9px;
  border-radius: 11px; border: 1px solid transparent;
  font-size: 10.5px; font-weight: 500; letter-spacing: 0.06em;
  white-space: nowrap;
}
.pill i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill--muted { color: var(--muted); background: #efeadf; border-color: #e3ddcd; }
.pill--green { color: var(--green); background: var(--green-wash); border-color: rgba(30, 75, 58, 0.14); }
.pill--amber { color: var(--amber); background: var(--amber-wash); border-color: rgba(147, 101, 43, 0.16); }
.pill--red { color: var(--red); background: var(--red-wash); border-color: rgba(169, 67, 46, 0.16); }
.pill--blue { color: var(--blue); background: var(--blue-wash); border-color: rgba(60, 93, 114, 0.14); }
.tag {
  display: inline-flex; align-items: center; height: 21px; padding: 0 7px;
  border: 1px solid var(--line); border-radius: 2px;
  font-size: 10px; color: var(--muted); letter-spacing: 0.05em; background: var(--surface-2);
}
.tag--req { color: var(--red); border-color: rgba(169, 67, 46, 0.28); background: var(--red-wash); }
.tag--num { font-family: var(--mono); }

.banner {
  display: flex; gap: 13px; align-items: flex-start;
  padding: 15px 17px; margin-bottom: 20px;
  border: 1px solid var(--line); border-left: 3px solid var(--muted);
  background: var(--surface); border-radius: 2px;
}
.banner svg { width: 18px; height: 18px; flex: 0 0 18px; margin-top: 1px; }
.banner-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.banner-body { font-size: 12.5px; color: var(--muted); }
.banner--green { border-left-color: var(--green); background: var(--green-mist); }
.banner--green svg { color: var(--green); }
.banner--amber { border-left-color: var(--amber); background: var(--amber-wash); }
.banner--amber svg { color: var(--amber); }
.banner--red { border-left-color: var(--red); background: var(--red-wash); }
.banner--red svg { color: var(--red); }
.banner--blue { border-left-color: var(--blue); background: var(--blue-wash); }
.banner--blue svg { color: var(--blue); }

.empty { padding: 52px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 30px; height: 30px; color: var(--faint); margin: 0 auto 12px; }
.empty h3 { font-family: var(--serif); font-size: 18px; color: var(--ink); margin-bottom: 6px; }

/* ---------------------------------------------------------------- 表单 */

.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field--wide { grid-column: 1 / -1; }
.field label, .field-label {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--ink-2); letter-spacing: 0.04em;
}
.field label.check-row { justify-content: flex-start; align-items: flex-start; font-size: 12.5px; letter-spacing: 0; }
.field label .req, .field-label .req { color: var(--red); font-size: 10px; letter-spacing: 0.08em; }
.field input[type="text"], .field input[type="password"], .field input[type="tel"],
.field input[type="date"], .field input[type="month"], .field input[type="number"],
.field input[type="email"], .field select, .field textarea {
  width: 100%; min-height: 42px; padding: 9px 12px;
  background: #fffdf7; border: 1px solid var(--line); border-radius: 2px;
  color: var(--ink); font-size: 13.5px;
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease), background 160ms var(--ease);
}
.field input[readonly], .field input:disabled, .field select:disabled, .field textarea[readonly] {
  background: var(--surface-2); color: var(--muted); cursor: default;
}
.field input::placeholder, .field textarea::placeholder { color: #b0b3ab; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-3);
  box-shadow: 0 0 0 3px rgba(30, 75, 58, 0.08);
  background: #fffefb;
}
.field textarea { min-height: 86px; resize: vertical; line-height: 1.65; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e746b' stroke-width='1.4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 32px;
}
.field .help { font-size: 11px; color: var(--faint); line-height: 1.6; }
.field-error { font-size: 11px; color: var(--red); min-height: 0; display: none; }
.field.has-error .field-error { display: block; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: rgba(169, 67, 46, 0.55); }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap input { padding-right: 52px !important; }
.input-suffix {
  position: absolute; right: 12px; font-size: 11.5px; color: var(--faint); pointer-events: none;
}
.input-wrap .icon-slot { position: absolute; left: 12px; color: var(--faint); display: flex; }
.input-wrap .icon-slot svg { width: 15px; height: 15px; }
.input-wrap.has-icon input { padding-left: 36px !important; }
.counter { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.counter.over { color: var(--red); }
.field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px 22px; }
.form-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid--base { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-grid--base .span-2,
.form-grid--base .span-3 { grid-column: span 1; }
.form-grid--base .span-4,
.form-grid--base .span-6 { grid-column: 1 / -1; }

.segmented {
  display: inline-flex; width: 100%; border: 1px solid var(--line); border-radius: 2px;
  overflow: hidden; background: #fffdf7;
}
.segmented label {
  display: block; flex: 1 1 0; min-width: 0; position: relative; cursor: pointer;
  justify-content: flex-start; align-items: stretch; gap: 0;
}
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 40px; font-size: 12.5px; color: var(--muted);
  border-right: 1px solid var(--line-soft);
  transition: background 150ms var(--ease), color 150ms var(--ease);
}
.segmented label:last-child span { border-right: 0; }
.segmented input:checked + span {
  background: var(--green-wash); color: var(--green); font-weight: 500;
  box-shadow: inset 0 0 0 1px rgba(30, 75, 58, 0.22);
}
.segmented input:checked + span::before {
  content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--green);
  margin-right: 6px; flex: 0 0 5px;
}
.segmented input:focus-visible + span { box-shadow: inset 0 0 0 2px rgba(30, 75, 58, 0.25); }
.segmented input:disabled + span { opacity: 0.55; cursor: default; }

.choice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.choice-card {
  position: relative; display: block; cursor: pointer;
  padding: 16px 15px; border: 1px solid var(--line); border-radius: 2px;
  background: #fffdf7; transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.choice-card:hover { border-color: var(--green-3); }
.choice-card input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--green); background: var(--green-mist); box-shadow: inset 0 0 0 1px var(--green); }
.choice-card .choice-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13.5px; font-weight: 600; }
.choice-card .choice-title .dot {
  width: 14px; height: 14px; border: 1px solid var(--line); border-radius: 50%;
  background: #fffdf7; display: grid; place-items: center; flex: 0 0 14px;
}
.choice-card:has(input:checked) .dot { border-color: var(--green); background: var(--green); }
.choice-card:has(input:checked) .dot::after { content: ""; width: 5px; height: 5px; border-radius: 50%; background: var(--surface); }
.choice-card .choice-amount { display: block; font-family: Georgia, var(--serif); font-size: 25px; color: var(--green); margin: 9px 0 2px; line-height: 1.1; font-variant-numeric: tabular-nums; }
.choice-card .choice-amount small { font-family: var(--sans); font-size: 11px; color: var(--muted); font-weight: 400; margin-left: 2px; }
.choice-card .choice-note { display: block; font-size: 10.5px; color: var(--muted); line-height: 1.6; }
.amount-readout { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); background: #fffdf7; }
.amount-readout > div { padding: 7px 9px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 2px; }
.amount-readout > div:last-child { border-right: 0; }
.amount-readout span { font-size: 9px; color: var(--faint); letter-spacing: 0.05em; white-space: nowrap; }
.amount-readout strong { font-family: Georgia, var(--serif); font-size: 15px; font-weight: 500; color: var(--green); line-height: 1.2; }
.amount-readout strong::after { content: " 元"; font-family: var(--sans); font-size: 8.5px; color: var(--faint); font-weight: 400; }

.reason-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
.reason-chip {
  display: flex; align-items: flex-start; gap: 9px; padding: 10px 11px;
  border: 1px solid var(--line); border-radius: 2px; background: #fffdf7;
  cursor: pointer; transition: border-color 150ms var(--ease), background 150ms var(--ease);
}
.reason-chip:hover { border-color: var(--green-3); }
.reason-chip:has(input:checked) { border-color: rgba(30, 75, 58, 0.45); background: var(--green-mist); }
.reason-chip input { margin: 3px 0 0; accent-color: var(--green); width: 14px; height: 14px; flex: 0 0 14px; }
.reason-chip .code { font-family: var(--mono); font-size: 10.5px; color: var(--green); width: 14px; flex: 0 0 14px; padding-top: 1px; }
.reason-chip .txt { font-size: 12px; line-height: 1.5; }
.reason-chip .txt small { display: block; color: var(--faint); font-size: 10px; margin-top: 2px; }

.check-row { display: flex; align-items: flex-start; gap: 10px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.check-row input { margin-top: 3px; width: 15px; height: 15px; accent-color: var(--green); flex: 0 0 15px; }
.check-row a { text-decoration: underline; text-underline-offset: 3px; }

/* ---------------------------------------------------------------- 学生端 */

.student-layout {
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 268px;
  gap: 18px;
  align-items: start;
}
.step-rail { position: sticky; top: 82px; }
.step-rail-head { font-size: 10px; letter-spacing: 0.2em; color: var(--faint); padding: 2px 0 14px; }
.step-mobile-caption { display: none; }
.stepper { display: flex; flex-direction: column; position: relative; }
.step-item {
  position: relative; display: grid; grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px; padding: 0 0 24px; border: 0; background: none; text-align: left;
  color: var(--muted); cursor: pointer;
}
.step-item:not(:last-child)::after {
  content: ""; position: absolute; left: 16px; top: 34px; bottom: 4px;
  width: 1px; background: var(--line);
}
.step-item .step-no {
  width: 33px; height: 33px; display: grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--paper); color: var(--faint);
  font-family: Georgia, var(--serif); font-size: 13px; line-height: 1;
  transition: all 160ms var(--ease);
}
.step-item .step-label { display: block; font-size: 13.5px; color: var(--ink-2); font-weight: 500; line-height: 1.4; padding-top: 3px; }
.step-item .step-desc { display: block; font-size: 10.5px; color: var(--faint); line-height: 1.5; margin-top: 3px; }
.step-item:hover .step-no { border-color: var(--green-3); color: var(--green); }
.step-item.active .step-no { background: var(--green); border-color: var(--green); color: var(--surface); }
.step-item.active .step-label { color: var(--green); font-weight: 600; }
.step-item.done .step-no { background: var(--green-wash); border-color: rgba(30, 75, 58, 0.25); color: var(--green); }
.step-item.done .step-no span { display: none; }
.step-item.done .step-no::after { content: ""; width: 9px; height: 5px; border-left: 1.5px solid var(--green); border-bottom: 1.5px solid var(--green); transform: rotate(-45deg) translate(1px, -1px); }
.step-item.active .step-no { background: var(--green); border-color: var(--green); color: var(--surface); }
.step-item.active .step-no::after { display: none; }
.step-item.active .step-no span { display: block; }

.form-paper {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  position: relative;
}
.form-paper::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--green) 0 64px, var(--red) 64px 88px, transparent 88px);
}
.step-panel { display: none; padding: 30px 32px 8px; }
.step-panel.is-active { display: block; animation: rise 260ms var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
.step-head { display: flex; gap: 18px; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--line-soft); margin-bottom: 24px; }
.step-head .big-no {
  font-family: Georgia, var(--serif); font-size: 34px; line-height: 0.95;
  color: var(--green); letter-spacing: -0.02em; min-width: 46px;
}
.step-head h2 { font-family: var(--serif); font-size: 23px; font-weight: 600; letter-spacing: 0.04em; }
.step-head p { color: var(--muted); font-size: 12.5px; margin-top: 5px; max-width: 64ch; }
.sub-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 30px 0 15px; }
.sub-head:first-of-type { margin-top: 0; }
.sub-head h3 { font-family: var(--serif); font-size: 16px; font-weight: 600; letter-spacing: 0.05em; display: flex; align-items: center; gap: 9px; }
.sub-head h3::before { content: ""; width: 3px; height: 15px; background: var(--green); display: inline-block; }
.sub-head p { font-size: 11.5px; color: var(--faint); }
.step-note {
  display: flex; gap: 9px; padding: 11px 13px; margin-bottom: 18px;
  background: var(--green-mist); border-left: 2px solid var(--green-3);
  font-size: 11.5px; color: var(--muted); line-height: 1.65;
}
.step-note svg { width: 15px; height: 15px; flex: 0 0 15px; color: var(--green-3); margin-top: 1px; }
.is-hidden { display: none !important; }
.form-nav {
  display: flex; align-items: center; flex-wrap: wrap; gap: 9px;
  padding: 18px 32px 20px; margin-top: 22px;
  border-top: 1px solid var(--line-soft); background: var(--surface-2);
}
.form-nav .spacer { flex: 1; }
.form-nav .save-state { flex: 1 0 100%; order: -1; font-size: 11px; color: var(--faint); margin-right: auto; }
.form-nav .btn { min-height: 38px; }
.form-nav .save-state strong { color: var(--green); font-weight: 500; }

.form-aside { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 14px; }
.aside-card { background: var(--surface); border: 1px solid var(--line); padding: 18px 17px; }
.aside-card h3 { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: 0.05em; display: flex; align-items: center; gap: 8px; }
.aside-card h3 svg { width: 15px; height: 15px; color: var(--green-3); }
.aside-card .aside-sub { font-size: 10.5px; color: var(--faint); margin-top: 4px; }
.progress-wrap { display: flex; align-items: center; gap: 15px; margin: 15px 0 13px; }
.progress-ring { position: relative; width: 78px; height: 78px; flex: 0 0 78px; }
.progress-ring svg { width: 78px; height: 78px; transform: rotate(-90deg); }
.progress-ring .ring-bg { fill: none; stroke: var(--line-soft); stroke-width: 5; }
.progress-ring .ring-fg { fill: none; stroke: var(--green); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset 400ms var(--ease); }
.progress-ring .ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1; }
.progress-ring .ring-text strong { font-family: Georgia, var(--serif); font-size: 19px; font-weight: 500; color: var(--green); }
.progress-ring .ring-text span { font-size: 8.5px; color: var(--faint); letter-spacing: 0.1em; margin-top: 3px; }
.progress-meta strong { display: block; font-size: 13px; font-weight: 600; }
.progress-meta span { font-size: 10.5px; color: var(--muted); line-height: 1.6; display: block; }
.mini-steps { display: flex; flex-direction: column; gap: 7px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.mini-step { display: flex; align-items: center; gap: 8px; font-size: 11px; color: var(--muted); }
.mini-step .tick { width: 14px; height: 14px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; flex: 0 0 14px; background: #fffdf7; }
.mini-step.done { color: var(--ink-2); }
.mini-step.done .tick { background: var(--green); border-color: var(--green); }
.mini-step.done .tick::after { content: ""; width: 6px; height: 3px; border-left: 1.3px solid var(--surface); border-bottom: 1.3px solid var(--surface); transform: rotate(-45deg) translate(0px, -1px); }

.deadline-block { margin-top: 14px; }
.deadline-date { display: flex; align-items: baseline; gap: 8px; }
.deadline-date strong { font-family: Georgia, var(--serif); font-size: 30px; font-weight: 500; line-height: 1; color: var(--red); letter-spacing: -0.02em; }
.deadline-date span { font-size: 11px; color: var(--muted); }
.deadline-bar { height: 3px; background: var(--line-soft); margin: 12px 0 8px; overflow: hidden; }
.deadline-bar i { display: block; height: 100%; background: var(--red); }
.deadline-note { font-size: 10.5px; color: var(--faint); line-height: 1.6; }

.material-list { display: flex; flex-direction: column; gap: 8px; margin-top: 13px; }
.material-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.material-item .mi-icon { width: 15px; height: 15px; flex: 0 0 15px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; background: #fffdf7; color: var(--faint); }
.material-item.done { color: var(--ink-2); }
.material-item.done .mi-icon { background: var(--green); border-color: var(--green); color: var(--surface); }
.material-item.done .mi-icon::after { content: ""; width: 6px; height: 3px; border-left: 1.2px solid var(--surface); border-bottom: 1.2px solid var(--surface); transform: rotate(-45deg) translate(0, -1px); }
.material-item .mi-optional { margin-left: auto; font-size: 9.5px; color: var(--faint); letter-spacing: 0.08em; }
.help-card { background: var(--green); color: #eef2e9; border-color: var(--green); }
.help-card h3 { color: #f7f3e7; }
.help-card h3 svg { color: #c9d6c8; }
.help-card p { font-size: 11.5px; color: #c9d6c8; line-height: 1.7; margin-top: 8px; }
.help-card a { color: #f7f3e7; text-decoration: underline; text-underline-offset: 3px; }
.help-card .hr { background: rgba(244, 240, 230, 0.18); margin: 14px 0; }

/* 上传 */
.upload-card { border: 1px solid var(--line); background: var(--surface); margin-bottom: 14px; }
.upload-head { display: flex; align-items: flex-start; gap: 12px; padding: 15px 16px 12px; }
.upload-head .u-no { font-family: Georgia, var(--serif); font-size: 16px; color: var(--green); min-width: 24px; line-height: 1.4; }
.upload-head h4 { font-size: 13.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.upload-head p { font-size: 10.5px; color: var(--faint); line-height: 1.6; margin-top: 3px; }
.paper-forms {
  margin: 16px 0 18px; border: 1px solid rgba(30, 75, 58, 0.2);
  background: #fffdf7;
}
.paper-forms-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 14px;
  padding: 13px 16px 11px; border-bottom: 1px solid var(--line-soft);
}
.paper-forms-head h3 {
  font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: 0.04em;
}
.paper-forms-head p { font-size: 10.5px; color: var(--faint); line-height: 1.65; margin-top: 3px; }
.paper-forms-head .tag { flex: 0 0 auto; margin-top: 1px; }
.paper-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.paper-form-card {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 10px;
  padding: 13px 16px; border-bottom: 1px solid var(--line-soft);
}
.paper-form-card:nth-child(odd) { border-right: 1px solid var(--line-soft); }
.pf-no {
  font-family: Georgia, var(--serif); font-size: 18px; color: var(--green);
  line-height: 1.25; flex: 0 0 34px;
}
.pf-body { flex: 1 1 150px; min-width: 0; }
.pf-body strong { display: block; font-size: 12px; font-weight: 600; line-height: 1.5; }
.pf-body p { font-size: 10px; color: var(--faint); line-height: 1.6; margin-top: 2px; }
.pf-links { flex: 0 0 auto; display: flex; gap: 5px; }
.pf-links .btn { min-height: 29px; padding: 0 9px; font-size: 10.5px; }
.pf-links .btn svg { width: 13px; height: 13px; }
.paper-forms > .help { padding: 0 16px 12px; font-size: 10px; color: var(--faint); line-height: 1.65; }
.dropzone {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 0 16px 14px; padding: 17px 14px;
  border: 1px dashed var(--line); border-radius: 2px;
  background: var(--surface-2); color: var(--muted);
  font-size: 11.5px; text-align: center; cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease), color 150ms var(--ease);
}
.dropzone:hover, .dropzone.is-drag { border-color: var(--green-3); background: var(--green-mist); color: var(--green); }
.dropzone svg { width: 17px; height: 17px; }
.dropzone strong { color: var(--green); font-weight: 500; }
.dropzone.is-busy { pointer-events: none; opacity: 0.65; }
.upload-progress { height: 2px; background: var(--line-soft); margin: 0 16px 14px; display: none; }
.upload-progress.is-on { display: block; }
.upload-progress i { display: block; height: 100%; width: 0; background: var(--green); transition: width 120ms linear; }
.file-list { border-top: 1px solid var(--line-soft); }
.file-item { display: flex; align-items: center; gap: 11px; padding: 10px 16px; border-bottom: 1px solid var(--line-soft); }
.file-item:last-child { border-bottom: 0; }
.file-thumb {
  width: 42px; height: 34px; flex: 0 0 42px; border: 1px solid var(--line);
  background: var(--surface-2); display: grid; place-items: center; overflow: hidden;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.file-thumb svg { width: 16px; height: 16px; color: var(--faint); }
.file-meta { min-width: 0; line-height: 1.4; }
.file-meta strong { display: block; font-size: 11.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-meta span { font-size: 10px; color: var(--faint); }
.file-actions { margin-left: auto; display: flex; gap: 3px; }
.file-actions button, .file-actions a { width: 27px; height: 27px; display: grid; place-items: center; border: 0; background: transparent; color: var(--faint); border-radius: 2px; }
.file-actions button:hover, .file-actions a:hover { background: var(--green-wash); color: var(--green); }
.file-actions .danger:hover { background: var(--red-wash); color: var(--red); }
.file-actions svg { width: 14px; height: 14px; }

/* 核对提交 */
.review-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.review-block { border: 1px solid var(--line); background: var(--surface-2); padding: 15px 16px; }
.review-block h4 { font-family: var(--serif); font-size: 14px; font-weight: 600; letter-spacing: 0.05em; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line-soft); }
.review-row { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0; font-size: 11.5px; }
.review-row dt { color: var(--faint); flex: 0 0 auto; }
.review-row dd { text-align: right; color: var(--ink-2); word-break: break-all; }
.review-block--wide { grid-column: 1 / -1; }
.consent { margin-top: 18px; padding: 16px 17px; border: 1px solid var(--line); background: #fffdf7; }
.consent .check-row { font-size: 12px; line-height: 1.7; }
.issue-list { display: flex; flex-direction: column; gap: 0; border: 1px solid rgba(169, 67, 46, 0.25); background: var(--red-wash); }
.issue-item { display: flex; align-items: flex-start; gap: 9px; padding: 9px 12px; border-bottom: 1px solid rgba(169, 67, 46, 0.12); font-size: 11.5px; color: var(--red); line-height: 1.55; }
.issue-item:last-child { border-bottom: 0; }
.issue-item button { border: 0; background: none; padding: 0; color: var(--red); text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.issue-item--warning { background: var(--amber-wash); border-color: rgba(147, 101, 43, 0.2); color: var(--amber); }
.issue-panel { margin: 18px 0; display: none; }
.issue-panel.is-on { display: block; }
.issue-panel h4 { font-size: 12px; font-weight: 600; margin-bottom: 9px; color: var(--red); display: flex; justify-content: space-between; }

/* ---------------------------------------------------------------- 管理员总览 */

.stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat-card { position: relative; padding: 19px 20px 17px; background: var(--surface); border: 1px solid var(--line); overflow: hidden; }
.stat-card::after { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 34px; background: var(--green); }
.stat-card.stat--red::after { background: var(--red); }
.stat-card.stat--amber::after { background: var(--amber); }
.stat-card.stat--faint::after { background: var(--faint); }
.stat-label { display: flex; align-items: center; gap: 7px; font-size: 10.5px; color: var(--muted); letter-spacing: 0.12em; }
.stat-label svg { width: 14px; height: 14px; color: var(--faint); }
.stat-value { font-family: Georgia, var(--serif); font-size: 42px; line-height: 1.05; font-weight: 500; color: var(--ink); margin: 8px 0 2px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.stat-value small { font-family: var(--sans); font-size: 11px; color: var(--faint); font-weight: 400; margin-left: 5px; letter-spacing: 0.04em; }
.stat-note { font-size: 10.5px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.stat-note .up { color: var(--green); }

.dash-grid { display: flex; flex-direction: column; gap: 18px; }
.dash-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; width: 100%; }
.dash-rail { order: -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; width: 100%; }
.dash-rail > .countdown { display: flex; flex-direction: column; }
.dash-rail > .countdown .cd-note { margin-top: auto; }
.rail-card--wide { grid-column: 1 / -1; }
.rail-body--kpi { padding: 14px 18px 16px; }
.rail-kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.rail-kpi { min-width: 0; padding: 0 16px; border-left: 1px solid var(--line-soft); }
.rail-kpi:first-child { border-left: 0; padding-left: 0; }
.rail-kpi strong {
  color: var(--ink); font-family: var(--serif); font-size: 24px; font-weight: 600;
  line-height: 1.1; font-variant-numeric: tabular-nums;
}
.rail-kpi-unit { margin-left: 2px; color: var(--faint); font-size: 10px; }
.rail-kpi-label {
  display: block; margin-top: 3px; color: var(--muted); font-size: 10.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.dash-rail--pair { grid-template-columns: minmax(300px, 0.75fr) minmax(0, 2.25fr); align-items: stretch; }
.dash-rail--pair .countdown { display: flex; flex-direction: column; }
.dash-rail--pair .cd-note { margin-top: auto; }
.dash-row { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }

.bar-chart { display: flex; flex-direction: column; gap: 17px; padding: 6px 0 2px; }
.bar-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) 52px; gap: 12px; align-items: center; }
.bar-label { font-size: 11.5px; color: var(--ink-2); }
.bar-label small { display: block; font-size: 9.5px; color: var(--faint); margin-top: 1px; }
.bar-track { height: 14px; background: var(--surface-3); position: relative; overflow: hidden; }
.bar-fill { height: 100%; background: var(--green); transition: width 500ms var(--ease); }
.bar-fill--2 { background: var(--green-3); }
.bar-fill--3 { background: #9db6a5; }
.bar-value { text-align: right; font-family: Georgia, var(--serif); font-size: 16px; color: var(--ink); }
.bar-value small { font-family: var(--sans); font-size: 9.5px; color: var(--faint); display: block; line-height: 1.3; }

.donut-wrap { display: flex; align-items: center; gap: 24px; padding: 6px 0 2px; }
.donut { position: relative; width: 142px; height: 142px; flex: 0 0 142px; border-radius: 50%; }
.donut::after { content: ""; position: absolute; inset: 26px; background: var(--surface); border-radius: 50%; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; z-index: 1; line-height: 1.1; }
.donut-center strong { font-family: Georgia, var(--serif); font-size: 28px; font-weight: 500; }
.donut-center span { font-size: 9.5px; color: var(--faint); letter-spacing: 0.1em; margin-top: 3px; }
.legend { display: flex; flex-direction: column; gap: 9px; min-width: 0; flex: 1; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.legend-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.legend-item strong { margin-left: auto; color: var(--ink); font-weight: 500; font-variant-numeric: tabular-nums; }
.legend-item > span:nth-child(2) { white-space: nowrap; flex: 0 1 auto; }
.legend-item span:last-child { width: 40px; text-align: right; font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; }

.countdown {
  position: relative;
  overflow: hidden;
  padding: 15px 17px 14px 19px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.countdown::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--green);
}
.countdown.is-over::before { background: var(--red); }
.cd-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cd-label { display: flex; align-items: center; gap: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: 0.08em; color: var(--muted); }
.cd-label svg { width: 13px; height: 13px; color: var(--green); }
.cd-state {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-wash);
  color: var(--green);
  font-size: 10px; font-weight: 700; letter-spacing: 0.04em;
  white-space: nowrap;
}
.cd-state::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.countdown.is-over .cd-label svg, .countdown.is-over .cd-icon { color: var(--red); }
.countdown.is-over .cd-state { background: var(--red-wash); color: var(--red); }
.cd-main { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cd-icon {
  width: 38px; height: 38px; flex: 0 0 38px;
  display: grid; place-items: center;
  border-radius: 10px;
  background: var(--green-wash);
  color: var(--green);
}
.cd-icon svg { width: 19px; height: 19px; }
.countdown.is-over .cd-icon { background: var(--red-wash); }
.cd-copy { min-width: 0; }
.cd-date {
  display: flex; align-items: baseline; gap: 6px;
  color: var(--ink);
  font-size: 15px; font-weight: 700; letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.cd-time { color: var(--muted); font-size: 12px; font-weight: 500; }
.cd-sub { margin-top: 1px; color: var(--faint); font-size: 10px; line-height: 1.5; }
.cd-days { display: flex; align-items: baseline; gap: 5px; line-height: 1; }
.cd-days strong { font-family: Georgia, var(--serif); font-size: 28px; font-weight: 500; color: var(--ink); letter-spacing: -0.03em; }
.cd-days span { color: var(--muted); font-size: 11px; }
.cd-note { margin-top: 12px; padding-top: 9px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 10px; line-height: 1.65; }

.quick-list { display: flex; flex-direction: column; }
.quick-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-2); }
.quick-item:last-child { border-bottom: 0; }
.quick-item .qi-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; background: var(--green-mist); color: var(--green); border: 1px solid rgba(30, 75, 58, 0.1); }
.quick-item .qi-icon svg { width: 14px; height: 14px; }
.quick-item strong { display: block; font-size: 12px; font-weight: 500; }
.quick-item small { display: block; font-size: 10px; color: var(--faint); margin-top: 1px; }
.quick-item .arrow { margin-left: auto; color: var(--faint); }
.quick-item .arrow svg { width: 14px; height: 14px; }

/* ---------------------------------------------------------------- 表格 */

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--surface); }
.inline-select {
  width: auto;
  max-width: 150px;
  min-height: 28px;
  padding: 3px 22px 3px 7px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.4;
  vertical-align: middle;
}
.inline-select:focus { border-color: var(--green-3); outline: none; box-shadow: 0 0 0 2px var(--green-wash); }
.inline-select:disabled { background: var(--surface-2); color: var(--faint); cursor: not-allowed; }
.student-card .inline-select { max-width: 190px; }
@media (max-width: 1180px) {
  .table-wrap--students .inline-select { max-width: 120px; }
}
table.data { width: 100%; border-collapse: collapse; min-width: 760px; }
.data thead th {
  text-align: left; padding: 11px 13px;
  font-size: 10px; font-weight: 500; letter-spacing: 0.14em; color: var(--faint);
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data tbody td { padding: 13px; border-bottom: 1px solid var(--line-soft); font-size: 12.5px; vertical-align: middle; }
.data tbody tr:last-child td { border-bottom: 0; }
.data tbody tr { transition: background 130ms var(--ease); }
.data tbody tr:hover { background: rgba(30, 75, 58, 0.035); }
.data tbody tr.is-selected { background: var(--green-mist); }
.data .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.data td .small, .data .cell-sub { display: block; max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data .actions { text-align: right; white-space: nowrap; }
table.data--recent { min-width: 0; }
.data--recent th:nth-child(1) { width: auto; }
.data--recent th:nth-child(2) { width: 100px; }
.data--recent th:nth-child(3) { width: 136px; }
.data--recent th:nth-child(4) { width: 64px; }
.data--recent th, .data--recent td { padding-left: 10px; padding-right: 10px; }
.data .checkbox { width: 34px; }
.data input[type="checkbox"] { width: 14px; height: 14px; accent-color: var(--green); }
.cell-person { display: flex; align-items: center; gap: 10px; min-width: 150px; }
.cell-person .avatar { width: 30px; height: 30px; flex: 0 0 30px; font-family: var(--sans); font-size: 13px; font-weight: 600; line-height: 1; padding-top: 1px; }
.cell-person strong { display: block; font-size: 12.5px; font-weight: 600; line-height: 1.35; }
.cell-person div > span { display: block; font-size: 10px; color: var(--faint); font-family: var(--mono); margin-top: 1px; }
.cell-sub { display: block; font-size: 10px; color: var(--faint); margin-top: 2px; }
.mat-count { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--muted); }
.mat-count .mat-bar { width: 32px; height: 3px; background: var(--line-soft); }
.mat-count .mat-bar i { display: block; height: 100%; background: var(--green-3); }
.mat-count.is-full { color: var(--green); }

.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.toolbar .search { position: relative; flex: 1 1 250px; max-width: 360px; }
.toolbar .search input {
  width: 100%; height: 40px; padding: 0 12px 0 36px;
  border: 1px solid var(--line); background: var(--surface); border-radius: 2px; font-size: 12.5px;
}
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--faint); }
.toolbar select {
  height: 40px; padding: 0 30px 0 11px; border: 1px solid var(--line);
  background-color: var(--surface); border-radius: 2px; font-size: 12px; color: var(--ink-2);
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%236e746b' stroke-width='1.4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center;
}
.toolbar .spacer { flex: 1; }
.toolbar .result { font-size: 11px; color: var(--faint); letter-spacing: 0.04em; }

.bulkbar {
  display: none; align-items: center; gap: 10px; padding: 10px 13px;
  border: 1px solid rgba(30, 75, 58, 0.18); background: var(--green-mist); margin-bottom: 12px;
}
.bulkbar.is-on { display: flex; }
.bulkbar strong { font-size: 12px; color: var(--green); }
.bulkbar .spacer { flex: 1; }

.pagination { display: flex; align-items: center; gap: 5px; justify-content: flex-end; margin-top: 16px; }
.pagination a, .pagination span {
  min-width: 30px; height: 30px; display: grid; place-items: center; padding: 0 8px;
  border: 1px solid var(--line); background: var(--surface); font-size: 11.5px; color: var(--muted);
}
.pagination .current { background: var(--green); border-color: var(--green); color: var(--surface); }
.pagination .disabled { opacity: 0.4; }
.pagination .meta { border: 0; background: none; margin-right: 8px; color: var(--faint); font-size: 10.5px; }

/* ---------------------------------------------------------------- 详情页 */

.detail-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 20px; }
.detail-head .avatar { width: 54px; height: 54px; flex: 0 0 54px; font-size: 21px; }
.detail-head h1 { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: 0.04em; line-height: 1.2; }
.detail-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 7px; font-size: 11.5px; color: var(--muted); }
.detail-meta .sep { color: var(--line); }
.detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(330px, 1fr); gap: 18px; align-items: start; }
.detail-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.detail-side { position: sticky; top: 82px; display: flex; flex-direction: column; gap: 14px; }
.section-card { background: var(--surface); border: 1px solid var(--line); }
.section-card > summary {
  display: flex; align-items: center; gap: 10px; padding: 15px 19px;
  cursor: pointer; list-style: none; border-bottom: 1px solid transparent;
}
.section-card > summary::-webkit-details-marker { display: none; }
.section-card[open] > summary { border-bottom-color: var(--line-soft); }
.section-card > summary h3 { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: 0.05em; }
.section-card > summary .sum-meta { margin-left: auto; font-size: 10.5px; color: var(--faint); display: flex; align-items: center; gap: 8px; }
.section-card > summary .chev { width: 13px; height: 13px; color: var(--faint); transition: transform 160ms var(--ease); }
.section-card[open] > summary .chev { transform: rotate(90deg); }
.section-body { padding: 17px 19px 19px; }
.dl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 26px; }
.dl-row { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-bottom: 1px dotted var(--line); font-size: 12px; }
.dl-row:last-child { border-bottom: 0; }
.dl-row dt { color: var(--faint); font-size: 11px; }
.dl-row dd { color: var(--ink-2); word-break: break-all; }
.dl-row--wide { grid-column: 1 / -1; }
.dl-row .yes { color: var(--green); font-weight: 500; }
.dl-row .no { color: var(--faint); }

.att-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.att-card { display: flex; align-items: center; gap: 10px; padding: 10px; border: 1px solid var(--line); background: var(--surface-2); }
.att-card .file-thumb { width: 52px; height: 42px; flex: 0 0 52px; }
.att-card .att-meta { min-width: 0; line-height: 1.45; }
.att-card .att-meta strong { display: block; font-size: 11.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.att-card .att-meta span { font-size: 9.5px; color: var(--faint); }
.att-card .att-actions { margin-left: auto; display: flex; gap: 2px; }
.att-card .att-actions a { width: 26px; height: 26px; display: grid; place-items: center; color: var(--faint); border-radius: 2px; }
.att-card .att-actions a:hover { background: var(--green-wash); color: var(--green); }
.att-card .att-actions svg { width: 14px; height: 14px; }
.att-missing { padding: 12px 14px; border: 1px dashed rgba(169, 67, 46, 0.35); background: var(--red-wash); font-size: 11.5px; color: var(--red); display: flex; gap: 8px; align-items: center; }
.att-missing svg { width: 15px; height: 15px; flex: 0 0 15px; }

.review-card { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--green); }
.review-card-head { padding: 17px 19px 13px; border-bottom: 1px solid var(--line-soft); }
.review-card-head h2 { font-family: var(--serif); font-size: 18px; font-weight: 600; letter-spacing: 0.04em; }
.review-card-head p { font-size: 10.5px; color: var(--faint); margin-top: 3px; }
.review-card-body { padding: 16px 19px 19px; display: flex; flex-direction: column; gap: 14px; }
.review-card .field label { font-size: 11px; }
.review-card .field input, .review-card .field select, .review-card .field textarea { min-height: 38px; font-size: 12.5px; }
.review-card .field textarea { min-height: 62px; }
.review-actions { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.review-actions .row { display: flex; gap: 8px; }
.review-actions .row .btn { flex: 1; }
.review-hint { font-size: 10px; color: var(--faint); line-height: 1.65; }
.readiness { display: flex; align-items: center; gap: 10px; padding: 11px 13px; border: 1px solid var(--line); background: var(--surface-2); }
.readiness .ready-icon { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 50%; background: var(--green-wash); color: var(--green); }
.readiness .ready-icon svg { width: 15px; height: 15px; }
.readiness.is-bad .ready-icon { background: var(--red-wash); color: var(--red); }
.readiness strong { display: block; font-size: 11.5px; }
.readiness span { display: block; font-size: 10px; color: var(--faint); margin-top: 1px; }
.issue-box { max-height: 190px; overflow: auto; border: 1px solid rgba(169, 67, 46, 0.22); background: var(--red-wash); }
.issue-box .issue-item { font-size: 10.5px; }
.issue-box .issue-item strong { font-weight: 500; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.tl-item { display: grid; grid-template-columns: 9px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; position: relative; }
.tl-item:not(:last-child)::before { content: ""; position: absolute; left: 4px; top: 12px; bottom: 0; width: 1px; background: var(--line); }
.tl-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); margin-top: 4px; }
.tl-item:first-child .tl-dot { background: var(--green); }
.tl-body strong { display: block; font-size: 11.5px; font-weight: 500; }
.tl-body span { font-size: 10px; color: var(--faint); }

/* ---------------------------------------------------------------- 导出 */

.export-hero {
  display: flex; align-items: center; gap: 22px; padding: 24px 26px; margin-bottom: 20px;
  background: var(--green); color: #f4f0e4; border: 1px solid var(--green);
}
.export-hero .eh-seal {
  width: 56px; height: 56px; flex: 0 0 56px; display: grid; place-items: center;
  border: 1px solid rgba(244, 240, 228, 0.35); color: #f4f0e4;
  font-family: var(--serif); font-size: 24px;
}
.export-hero h2 { font-family: var(--serif); font-size: 24px; font-weight: 600; letter-spacing: 0.05em; }
.export-hero p { font-size: 11.5px; color: #c9d6c8; margin-top: 4px; }
.export-hero .btn { margin-left: auto; background: #f4f0e4; border-color: #f4f0e4; color: var(--green); }
.export-hero .btn:hover { background: #fff; color: var(--green); }
.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.export-card { display: flex; flex-direction: column; padding: 18px; background: var(--surface); border: 1px solid var(--line); }
.export-card .ec-top { display: flex; align-items: flex-start; gap: 12px; }
.file-badge {
  width: 38px; height: 44px; flex: 0 0 38px;
  display: grid; place-items: center; border: 1px solid var(--line);
  background: var(--surface-2); color: var(--green);
  font-family: var(--mono); font-size: 8.5px; letter-spacing: 0.04em;
  position: relative;
}
.file-badge::after { content: ""; position: absolute; top: -1px; right: -1px; border-style: solid; border-width: 0 9px 9px 0; border-color: transparent var(--paper) transparent transparent; }
.file-badge--macro { color: var(--red); }
.export-card h3 { font-family: var(--serif); font-size: 15px; font-weight: 600; letter-spacing: 0.03em; }
.export-card .ec-sub { font-size: 10px; color: var(--faint); margin-top: 2px; }
.export-card .ec-desc { font-size: 11px; color: var(--muted); line-height: 1.65; margin: 12px 0 14px; flex: 1; }
.export-card .ec-foot { display: flex; align-items: center; gap: 8px; padding-top: 11px; border-top: 1px solid var(--line-soft); }
.export-card .ec-count { font-size: 10.5px; color: var(--faint); }
.export-card .ec-count strong { color: var(--ink); font-weight: 500; font-family: Georgia, var(--serif); font-size: 14px; margin-right: 2px; }
.export-card .btn { margin-left: auto; }
.validation-block { margin-top: 18px; }
.validation-head { display: flex; align-items: center; gap: 12px; margin-bottom: 11px; }
.validation-head h2 { font-family: var(--serif); font-size: 19px; font-weight: 600; }
.validation-counts { display: flex; gap: 14px; margin-left: auto; font-size: 11px; color: var(--muted); }
.validation-counts strong { font-family: Georgia, var(--serif); font-size: 16px; margin-right: 3px; }
.validation-counts .b { color: var(--red); }
.validation-counts .w { color: var(--amber); }
.issue-table { width: 100%; border-collapse: collapse; font-size: 11.5px; border: 1px solid var(--line); background: var(--surface); }
.issue-table th { text-align: left; padding: 9px 11px; font-size: 9.5px; letter-spacing: 0.12em; color: var(--faint); background: var(--surface-2); border-bottom: 1px solid var(--line); }
.issue-table td { padding: 9px 11px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.issue-table tr:last-child td { border-bottom: 0; }
.issue-table .who { font-weight: 500; white-space: nowrap; }
.issue-table .why { color: var(--muted); }

/* ---------------------------------------------------------------- 设置 */

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr); gap: 18px; align-items: start; }
.settings-main { display: flex; flex-direction: column; gap: 16px; }
.settings-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 82px; }
.settings-section { padding: 20px 22px; background: var(--surface); border: 1px solid var(--line); }
.settings-section h2 { font-family: var(--serif); font-size: 17px; font-weight: 600; letter-spacing: 0.04em; display: flex; align-items: center; gap: 9px; }
.settings-section h2::before { content: ""; width: 3px; height: 15px; background: var(--green); }
.settings-section .ss-sub { font-size: 10.5px; color: var(--faint); margin: 3px 0 16px 12px; }
.settings-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 18px; }
.settings-form-grid .span-2 { grid-column: 1 / -1; }
.settings-actions { display: flex; gap: 9px; align-items: center; padding: 16px 22px; border: 1px solid var(--line); background: var(--surface-2); }
.settings-actions .spacer { flex: 1; }
.side-card { padding: 17px 18px; background: var(--surface); border: 1px solid var(--line); }
.side-card h3 { font-family: var(--serif); font-size: 14.5px; font-weight: 600; letter-spacing: 0.04em; display: flex; align-items: center; gap: 8px; }
.side-card h3 svg { width: 15px; height: 15px; color: var(--green-3); }
.side-card p { font-size: 10.5px; color: var(--muted); line-height: 1.7; margin-top: 7px; }
.side-card .btn { margin-top: 11px; }
.danger-zone { border-color: rgba(169, 67, 46, 0.25); }
.danger-zone h3 { color: var(--red); }
.danger-zone h3 svg { color: var(--red); }

/* ---------------------------------------------------------------- 登录 / 注册 */

.auth { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(430px, 0.92fr); min-height: 100vh; }
.auth-visual {
  position: relative; overflow: hidden; min-height: 100vh;
  background: #1c3a2d url("/static/img/login-hero.jpg") center / cover no-repeat;
}
.auth-visual::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(17, 43, 32, 0.93) 0%, rgba(20, 48, 36, 0.78) 42%, rgba(24, 54, 40, 0.28) 100%);
}
.auth-visual::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)' opacity='.05'/%3E%3C/svg%3E");
  pointer-events: none;
}
.auth-visual-inner {
  position: relative; z-index: 1; height: 100%; min-height: 100vh;
  display: flex; flex-direction: column; padding: 42px 54px 34px; color: #f4f0e4;
}
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand .brand-seal { background: rgba(244, 240, 228, 0.1); border: 1px solid rgba(244, 240, 228, 0.4); box-shadow: none; color: #f4f0e4; }
.auth-brand .brand-text strong { color: #f4f0e4; }
.auth-brand .brand-text small { color: #b9cabb; }
.auth-copy { margin-top: auto; margin-bottom: auto; max-width: 540px; padding: 40px 0; }
.auth-eyebrow { display: flex; align-items: center; gap: 10px; font-size: 10.5px; letter-spacing: 0.22em; color: #c9d6c8; }
.auth-eyebrow::before { content: ""; width: 28px; height: 1px; background: #c9d6c8; }
.auth-copy h1 { font-family: var(--serif); font-size: clamp(36px, 3.6vw, 52px); font-weight: 500; line-height: 1.24; letter-spacing: 0.05em; margin: 22px 0 18px; color: #f8f4e8; max-width: 540px; }
.auth-copy h1 em { font-style: normal; color: #cfa78d; }
.auth-copy p { font-size: 13px; line-height: 1.85; color: #c3d0c2; max-width: 410px; }
.auth-steps { display: flex; flex-direction: column; gap: 13px; margin-top: 30px; }
.auth-step { display: flex; align-items: center; gap: 13px; font-size: 12px; color: #d6dfd2; }
.auth-step .n { font-family: Georgia, var(--serif); font-size: 12px; color: #cfa78d; width: 24px; }
.auth-step .line { width: 36px; height: 1px; background: rgba(244, 240, 228, 0.25); }
.auth-visual-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; font-size: 9.5px; letter-spacing: 0.14em; color: #9fb3a1; border-top: 1px solid rgba(244, 240, 228, 0.18); padding-top: 16px; }
.auth-seal { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid rgba(244, 240, 228, 0.35); font-family: var(--serif); font-size: 18px; color: #e4d2bf; }

.auth-panel { display: flex; align-items: center; justify-content: center; padding: 42px 48px; background: var(--paper); position: relative; }
.auth-card { width: 100%; max-width: 392px; }
.auth-card-head { margin-bottom: 28px; }
.auth-card-head .eyebrow { margin-bottom: 12px; }
.auth-card-head h2 { font-family: var(--serif); font-size: 30px; font-weight: 600; letter-spacing: 0.06em; }
.auth-card-head p { font-size: 12px; color: var(--muted); margin-top: 8px; }
.auth-form { display: flex; flex-direction: column; gap: 16px; }
.auth-form .field label { font-size: 11.5px; }
.auth-form .field input { min-height: 46px; background: #fffdf7; }
.auth-submit { margin-top: 4px; min-height: 47px; }
.auth-links { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; font-size: 11.5px; }
.auth-links a { color: var(--green); }
.auth-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 16px; color: var(--faint); font-size: 9.5px; letter-spacing: 0.16em; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.demo-box { border: 1px solid var(--line); background: var(--surface-2); }
.demo-box summary { padding: 11px 13px; font-size: 11px; color: var(--muted); cursor: pointer; list-style: none; display: flex; align-items: center; gap: 7px; }
.demo-box summary::-webkit-details-marker { display: none; }
.demo-box summary::after { content: "+"; margin-left: auto; font-family: var(--mono); color: var(--faint); }
.demo-box[open] summary::after { content: "−"; }
.demo-body { padding: 0 13px 13px; font-size: 10.5px; color: var(--muted); line-height: 1.9; border-top: 1px solid var(--line-soft); margin-top: 2px; padding-top: 10px; }
.demo-body code { font-family: var(--mono); color: var(--ink); background: var(--surface-3); padding: 1px 5px; border-radius: 2px; }
.auth-note { margin-top: 24px; font-size: 10px; color: var(--faint); line-height: 1.8; }
.auth-note strong { color: var(--muted); font-weight: 500; }
.register-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.register-grid .span-2 { grid-column: 1 / -1; }

/* ---------------------------------------------------------------- 弹层 / 提示 */

dialog.modal {
  width: min(560px, calc(100vw - 32px)); padding: 0;
  border: 1px solid var(--line); border-radius: 3px;
  background: var(--surface); color: var(--ink);
  box-shadow: var(--shadow-lift);
}
dialog.modal::backdrop { background: rgba(22, 30, 24, 0.46); backdrop-filter: blur(2px); }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 12px; }
.modal-head h3 { font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: 0.04em; }
.modal-head p { font-size: 11px; color: var(--faint); margin-top: 3px; }
.modal-body { padding: 0 22px 6px; font-size: 12.5px; color: var(--muted); line-height: 1.7; }
.modal-body textarea { width: 100%; min-height: 92px; margin-top: 9px; padding: 10px 12px; border: 1px solid var(--line); background: #fffdf7; border-radius: 2px; resize: vertical; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 16px 22px 20px; }
.modal-close { margin-left: auto; border: 0; background: none; color: var(--faint); width: 26px; height: 26px; display: grid; place-items: center; }
.modal-close:hover { color: var(--ink); }
dialog.preview-modal { width: min(980px, calc(100vw - 30px)); max-height: 90vh; padding: 0; border: 1px solid var(--line); background: var(--surface); }
dialog.preview-modal::backdrop { background: rgba(22, 30, 24, 0.62); }
.preview-head { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 12px; }
.preview-head strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.preview-head .modal-close { margin-left: auto; }
.preview-body { background: #e8e2d4; display: flex; align-items: center; justify-content: center; min-height: 320px; max-height: calc(90vh - 56px); overflow: auto; }
.preview-body img { max-width: 100%; max-height: calc(90vh - 56px); object-fit: contain; }
.preview-body iframe { width: 100%; height: calc(90vh - 56px); border: 0; background: #fff; }

#toast-root { position: fixed; top: 18px; right: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 9px;
  min-width: 240px; max-width: 380px; padding: 11px 14px;
  background: var(--ink); color: #f4f0e4; font-size: 12px; line-height: 1.55;
  border-left: 3px solid var(--green-3); box-shadow: var(--shadow-lift);
  animation: toast-in 220ms var(--ease) both; pointer-events: auto;
}
.toast svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 1px; }
.toast--ok { border-left-color: #7fb08d; }
.toast--err { border-left-color: #d16a54; }
.toast--info { border-left-color: #c9b98d; }
.toast.is-out { animation: toast-out 180ms var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { from { opacity: 1; } to { opacity: 0; transform: translateY(-4px); } }

/* ---------------------------------------------------------------- 说明页 */

.guide-page { max-width: 900px; margin: 0 auto; padding: 34px 24px 70px; }
.guide-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-bottom: 22px; border-bottom: 1px solid var(--line); margin-bottom: 34px; }
.guide-top .brand { padding: 0; }
.guide-hero { border-left: 3px solid var(--green); padding-left: 24px; margin-bottom: 34px; }
.guide-hero h1 { font-family: var(--serif); font-size: 36px; font-weight: 600; letter-spacing: 0.04em; line-height: 1.3; }
.guide-hero p { color: var(--muted); margin-top: 10px; max-width: 66ch; }
.guide-section { margin: 34px 0; }
.guide-section h2 { font-family: var(--serif); font-size: 22px; font-weight: 600; letter-spacing: 0.04em; display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.guide-section h2 span { font-family: Georgia, var(--serif); font-size: 13px; color: var(--green-3); }
.guide-section p, .guide-section li { font-size: 13px; color: var(--ink-2); line-height: 1.9; }
.guide-section ul { margin: 10px 0 0 18px; list-style: disc; }
.guide-section li { margin-bottom: 5px; }
.guide-table { width: 100%; border-collapse: collapse; margin-top: 14px; border: 1px solid var(--line); background: var(--surface); }
.guide-table th { text-align: left; font-size: 10px; letter-spacing: 0.12em; color: var(--faint); padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); }
.guide-table td { font-size: 12px; padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
.guide-table tr:last-child td { border-bottom: 0; }
.guide-callout { padding: 15px 18px; border: 1px solid var(--line); border-left: 3px solid var(--amber); background: var(--amber-wash); font-size: 12px; color: var(--ink-2); line-height: 1.8; margin: 18px 0; }
.guide-callout strong { color: var(--amber); }

/* ---------------------------------------------------------------- 错误页 */

.error-page { min-height: 100vh; display: grid; place-items: center; padding: 30px; }
.error-card { text-align: center; max-width: 520px; }
.error-card .big { font-family: Georgia, var(--serif); font-size: 88px; line-height: 1; color: var(--green); opacity: 0.2; }
.error-card h1 { font-family: var(--serif); font-size: 27px; margin: 10px 0 8px; }
.error-card p { color: var(--muted); font-size: 13px; margin-bottom: 22px; }

/* ---------------------------------------------------------------- 审核详情新版 */

.review-panel { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--green); margin-bottom: 18px; }
.review-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 18px 24px; border-bottom: 1px solid var(--line-soft); flex-wrap: wrap; }
.review-panel-head h2 { font-family: var(--serif); font-size: 21px; font-weight: 600; letter-spacing: 0.04em; }
.review-panel-head p { font-size: 11px; color: var(--faint); margin-top: 4px; }
.review-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.review-code-tag { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px; border: 1px solid var(--line); background: var(--surface-2); font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.review-code-tag b { font-size: 12px; color: var(--green); letter-spacing: 0.12em; }
.review-panel .readiness { padding: 4px 0; background: transparent; border: 0; min-width: 0; }
.review-panel .readiness .ready-icon { width: 26px; height: 26px; flex-basis: 26px; }
.review-panel .readiness .ready-icon svg { width: 13px; height: 13px; }
.review-panel .readiness strong { font-size: 11px; }
.review-panel .readiness span { font-size: 9.5px; }
.review-panel-body { padding: 16px 24px 18px; }
.review-issues { margin-bottom: 14px; border: 1px solid var(--line); background: var(--surface-2); }
.review-issues summary { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; cursor: pointer; list-style: none; font-size: 11.5px; color: var(--ink-2); }
.review-issues summary::-webkit-details-marker { display: none; }
.review-issues[open] summary { border-bottom: 1px solid var(--line-soft); }
.review-issue-count { display: flex; gap: 10px; font-size: 10.5px; }
.review-issues .issue-box { max-height: 150px; border: 0; }
.review-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px 16px; }
.review-form-grid .field--span-2 { grid-column: span 2; }
.review-form-grid .field--full { grid-column: 1 / -1; }
.review-panel .field label { font-size: 11px; }
.review-panel .field input, .review-panel .field select, .review-panel .field textarea { min-height: 38px; font-size: 12.5px; padding: 7px 10px; }
.review-panel .field textarea { min-height: 60px; }
.review-panel .field .help { font-size: 9.5px; }
.letter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.field label.letter-chip, .letter-chip { display: flex; align-items: center; justify-content: flex-start; gap: 6px; padding: 6px 8px; border: 1px solid var(--line); background: #fffdf7; cursor: pointer; min-width: 0; }
.letter-chip:hover { border-color: var(--green-3); }
.letter-chip:has(input:checked) { border-color: rgba(30, 75, 58, 0.4); background: var(--green-mist); }
.letter-chip input { width: 13px; height: 13px; accent-color: var(--green); flex: 0 0 13px; margin: 0; }
.letter-chip .code { font-family: var(--mono); font-size: 10px; color: var(--green); flex: 0 0 10px; }
.letter-chip .txt { font-size: 10px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-fix { border: 1px solid var(--line); background: var(--surface-2); padding: 9px 11px; }
.identity-fix summary { cursor: pointer; font-size: 11px; color: var(--muted); }
.identity-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.identity-grid .field { gap: 4px; }
.review-action-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.review-action-bar .spacer { flex: 1; }
.review-action-bar .btn-link { color: var(--faint); font-size: 11px; }
.review-action-bar .btn-link:hover { color: var(--red); }
.review-panel .review-hint { margin-top: 8px; }

.detail-content { display: flex; flex-direction: column; gap: 16px; }
.detail-info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.section-card--wide { width: 100%; }
.material-check { border: 1px solid var(--line); background: var(--surface-2); padding: 12px 14px; margin-bottom: 6px; }
.material-check-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.material-check-head strong { font-size: 12px; font-weight: 600; }
.material-check-paper {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line);
}
.material-check-paper .mcp-label { font-size: 10px; color: var(--faint); letter-spacing: 0.03em; }
.material-check-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.mat-pill { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line); background: #fffdf7; font-size: 10.5px; color: var(--muted); min-width: 0; overflow: hidden; }
.mat-pill > svg { width: 12px; height: 12px; flex: 0 0 12px; color: var(--faint); }
.mat-pill > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mat-pill.done { border-color: rgba(30, 75, 58, 0.18); background: var(--green-wash); color: var(--green); }
.mat-pill.done > svg { color: var(--green); }

/* ---------------------------------------------------------------- 账号页 */

.account-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr); gap: 16px; align-items: start; max-width: 1020px; }
.account-side { display: flex; flex-direction: column; gap: 14px; }
.account-info { margin-top: 10px; display: flex; flex-direction: column; }
.account-info > div { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: 11.5px; }
.account-info > div:last-child { border-bottom: 0; }
.account-info dt { color: var(--faint); flex: 0 0 auto; }
.account-info dd { color: var(--ink-2); text-align: right; word-break: break-all; }
.account-tips { list-style: disc; padding-left: 16px; margin-top: 9px; font-size: 11px; color: var(--muted); line-height: 1.85; }

/* ---------------------------------------------------------------- 移动端列表 / 细节 */

.student-card-list, .recent-card-list { display: none; }
.mobile-list-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 2px 0 10px; border-bottom: 1px solid var(--line-soft); margin-bottom: 2px; }
.mobile-list-head .check-row { font-size: 11.5px; }
.mobile-list-head .check-row input { width: 14px; height: 14px; margin-top: 1px; }
.validation-ok {
  display: flex; align-items: center; gap: 12px;
  padding: 18px 22px; border: 1px solid var(--line); background: var(--surface);
}
.validation-ok > svg { width: 24px; height: 24px; color: var(--green); flex: 0 0 24px; }
.validation-ok h3 { font-size: 16px; margin: 0 0 2px; font-weight: 600; }
.validation-ok p { margin: 0; }

/* ---------------------------------------------------------------- 响应式 */

@media (max-width: 1320px) {
  .student-layout { grid-template-columns: 160px minmax(0, 1fr) 250px; gap: 18px; }
  .content { padding: 30px 34px 46px; }
  .topbar-inner { padding: 14px 34px; }
  .foot { padding: 16px 34px 24px; }
  .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .student-layout { grid-template-columns: 180px minmax(0, 1fr); }
  .form-aside { position: static; grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .form-aside .aside-card:first-child { grid-row: span 2; }
  .dash-grid { grid-template-columns: minmax(0, 1fr); }
  .dash-rail { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-side { position: static; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
  .settings-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-side { position: static; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .auth-visual-inner { padding: 34px 40px 28px; }
  .auth-panel { padding: 34px 36px; }
}

@media (max-width: 1020px) {
  :root { --nav-w: 216px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row { grid-template-columns: minmax(0, 1fr); }
  .export-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid--base { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar {
    position: fixed; inset: 0 auto 0 0; width: 268px; transform: translateX(-100%);
    transition: transform 200ms var(--ease); box-shadow: var(--shadow-lift);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; background: rgba(22, 30, 24, 0.4); z-index: 25;
  }
  .mobile-toggle {
    display: grid; place-items: center; width: 34px; height: 34px;
    border: 1px solid var(--line); background: var(--surface); color: var(--ink-2);
  }
  .mobile-toggle svg { width: 16px; height: 16px; }
  .topbar-inner { padding: 12px 20px; gap: 12px; }
  .topbar-title .crumb { display: none; }
  .topbar-title strong { font-size: 15px; }
  .deadline-pill { display: none; }
  .content { padding: 24px 20px 40px; }
  .foot { padding: 14px 20px 22px; flex-direction: column; gap: 4px; }
  .page-head { flex-direction: column; align-items: flex-start; gap: 16px; }
  .student-layout { grid-template-columns: minmax(0, 1fr); }
  .step-rail { position: static; }
  .step-rail-head { display: none; }
  .step-mobile-caption {
    display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
    padding: 2px 2px 10px;
  }
  .step-mobile-caption strong { font-family: var(--serif); font-size: 13px; font-weight: 600; color: var(--green); letter-spacing: 0.04em; }
  .step-mobile-caption span { font-size: 9.5px; color: var(--faint); letter-spacing: 0.08em; }
  .stepper { flex-direction: row; overflow: visible; gap: 6px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .step-item { display: flex; justify-content: center; gap: 0; padding: 0 0 6px; min-width: 0; flex: 1 1 0; }
  .step-item::after { display: none; }
  .step-item .step-no { width: 30px; height: 30px; font-size: 11px; }
  .step-item > span:not(.step-no) { display: none; }
  .form-paper::before { height: 2px; }
  .step-panel { padding: 22px 20px 6px; }
  .step-head { gap: 13px; padding-bottom: 17px; margin-bottom: 19px; }
  .step-head .big-no { font-size: 26px; min-width: 34px; }
  .step-head h2 { font-size: 20px; }
  .form-nav { padding: 16px 20px 18px; }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid--base { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-aside { grid-template-columns: minmax(0, 1fr); }
  .form-aside .aside-card:first-child { grid-row: auto; }
  .review-grid { grid-template-columns: minmax(0, 1fr); }
  .review-block--wide { grid-column: auto; }
  .choice-grid { grid-template-columns: minmax(0, 1fr); }
  .reason-grid { grid-template-columns: minmax(0, 1fr); }
  .detail-head { flex-wrap: wrap; }
  .detail-actions { margin-left: 0; width: 100%; }
  .detail-side { grid-template-columns: minmax(0, 1fr); }
  .settings-side { grid-template-columns: minmax(0, 1fr); }
  .dash-rail { grid-template-columns: minmax(0, 1fr); }
  .rail-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
  .rail-kpi { border-left: 0; padding: 0; }
  .export-grid { grid-template-columns: minmax(0, 1fr); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-visual { display: none; }
  .auth-panel { min-height: 100vh; padding: 32px 22px; align-items: flex-start; padding-top: 52px; }
  .auth-card { max-width: 440px; }
  .register-grid { grid-template-columns: minmax(0, 1fr); }
  .register-grid .span-2 { grid-column: auto; }
  .toolbar .search { max-width: none; flex-basis: 100%; }
  .bulkbar { flex-wrap: wrap; }
  .export-hero { flex-wrap: wrap; }
  .export-hero .btn { margin-left: 0; width: 100%; }
  .stat-grid { gap: 10px; }
  .stat-card { padding: 15px 15px 13px; }
  .stat-value { font-size: 34px; }
  .donut-wrap { gap: 16px; }
  .donut { width: 118px; height: 118px; flex-basis: 118px; }
  .donut::after { inset: 22px; }
}

@media (max-width: 620px) {
  .topbar-actions .btn--ghost span { display: none; }
  .page-head h1 { font-size: 27px; }
  .stat-grid { grid-template-columns: minmax(0, 1fr); }
  .form-grid, .form-grid--base, .form-grid--3 { grid-template-columns: minmax(0, 1fr); }
  .form-grid--base .span-2, .form-grid--base .span-3, .form-grid--base .span-6 { grid-column: auto; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .dl-grid { grid-template-columns: minmax(0, 1fr); }
  .att-grid { grid-template-columns: minmax(0, 1fr); }
  .step-rail { margin: 0 -4px; }
  .step-item { min-width: 0; padding-right: 0; }
  .step-item .step-no { width: 28px; height: 28px; }
  .form-nav { flex-wrap: wrap; }
  .form-nav .save-state { width: 100%; order: 5; margin-top: 4px; }
  .form-nav .btn { flex: 1; }
  .form-nav .spacer { display: none; }
  .export-hero { padding: 20px; }
  .export-hero h2 { font-size: 20px; }
  .dash-row { grid-template-columns: minmax(0, 1fr); }
  .bar-row { grid-template-columns: 54px minmax(0, 1fr) 42px; gap: 8px; }
  .guide-hero h1 { font-size: 27px; }
  .guide-top .brand-text small { display: none; }
  .auth-card-head h2 { font-size: 26px; }
  .modal-body { font-size: 12px; }
}

@media print {
  .sidebar, .topbar, .form-nav, .form-aside, .step-rail, .detail-actions, .review-card, .foot { display: none !important; }
  .shell { display: block; }
  .content { padding: 0; }
  body { background: #fff; }
  .card, .section-card, .form-paper { border-color: #bbb; box-shadow: none; }
  .detail-grid { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important; animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important; scroll-behavior: auto !important;
  }
}

/* 审核详情新版 · 响应式 */
@media (max-width: 1180px) {
  .review-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .letter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .detail-info-grid { grid-template-columns: minmax(0, 1fr); }
  .review-head-right { width: 100%; justify-content: flex-start; }
}
@media (max-width: 900px) {
  .review-panel-head { padding: 16px 20px; }
  .review-panel-body { padding: 14px 20px 16px; }
  .review-form-grid { grid-template-columns: minmax(0, 1fr); }
  .review-form-grid .field--span-2 { grid-column: auto; }
  .letter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .material-check-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .review-action-bar { justify-content: flex-end; }
  .review-action-bar .spacer { display: none; }
  .review-action-bar .btn-link { width: 100%; text-align: left; order: 5; }
  .identity-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .review-head-right { flex-direction: column; align-items: flex-start; }
  .review-panel .readiness { width: 100%; }
  .letter-grid { grid-template-columns: minmax(0, 1fr); }
  .material-check-head { flex-direction: column; align-items: flex-start; }
}

/* 移动端：学生名单 / 最近提交卡片式列表 */
@media (max-width: 900px) {
  .table-wrap--students, .recent-table-wrap { display: none; }
  .student-card-list, .recent-card-list { display: flex; flex-direction: column; }
  .student-card-list { gap: 10px; }
  .student-card {
    background: var(--surface); border: 1px solid var(--line); padding: 12px 14px;
  }
  .student-card-head { display: flex; align-items: center; gap: 10px; }
  .student-card-head .cell-person { flex: 1; min-width: 0; min-height: 0; }
  .student-card-head .cell-person .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
  .student-card-head .pill { flex: 0 0 auto; }
  .student-check { display: flex; align-items: center; }
  .student-check input { width: 15px; height: 15px; accent-color: var(--green); }
  .student-card-body {
    display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 14px;
    margin: 10px 0 0; padding-top: 10px; border-top: 1px solid var(--line-soft);
  }
  .sc-row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; min-width: 0; }
  .sc-row--wide { grid-column: 1 / -1; }
  .sc-row span { font-size: 10px; color: var(--faint); flex: 0 0 auto; }
  .sc-row strong { font-size: 10.5px; font-weight: 500; color: var(--ink-2); text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .student-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px solid var(--line-soft); }
  .student-card.is-selected { background: var(--green-mist); border-color: rgba(30, 75, 58, 0.25); }
  .recent-card { display: flex; align-items: center; gap: 10px; padding: 12px 4px; border-bottom: 1px solid var(--line-soft); color: var(--ink); }
  .recent-card:last-child { border-bottom: 0; }
  .recent-card:hover { background: var(--green-mist); }
  .rc-person { display: flex; align-items: center; gap: 9px; min-width: 0; flex: 1; }
  .rc-person .avatar { width: 30px; height: 30px; flex-basis: 30px; font-size: 12px; }
  .rc-person strong { display: block; font-size: 12.5px; line-height: 1.35; }
  .rc-person span { display: block; font-size: 9.5px; color: var(--faint); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .rc-right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
  .rc-meta { font-size: 9.5px; color: var(--faint); white-space: nowrap; }
}

@media (max-width: 620px) {
  .settings-form-grid { grid-template-columns: minmax(0, 1fr); }
  .settings-form-grid .span-2 { grid-column: auto; }
  .account-grid { grid-template-columns: minmax(0, 1fr); max-width: none; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat-card { padding: 14px 14px 12px; }
  .stat-value { font-size: 32px; }
  .stat-label { font-size: 9.5px; letter-spacing: 0.08em; }
  .stat-note { font-size: 9.5px; line-height: 1.5; }
  .sub-head { flex-direction: column; align-items: flex-start; gap: 4px; }
  .sub-head p { font-size: 10.5px; line-height: 1.55; }
  .sub-head .btn-link { margin-top: 2px; }
  .letter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .student-card-body { gap: 6px 10px; }
}

/* ---------------------------------------------------------------- 管理员新增 / 编辑学生 */
.admin-edit-head { margin-bottom: 18px; }
.admin-edit-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 302px;
  gap: 18px; align-items: start;
}
.admin-edit-form {
  background: var(--surface); border: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(36, 42, 36, 0.02);
}
.edit-section { padding: 23px 25px 25px; border-bottom: 1px solid var(--line); }
.edit-section:last-of-type { border-bottom: 0; }
.edit-section-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 20px; }
.edit-no {
  width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center;
  border: 1px solid rgba(30, 75, 58, 0.35); color: var(--green);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.03em;
  background: var(--green-mist);
}
.edit-section-head h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 600;
  letter-spacing: 0.05em; line-height: 1.3;
}
.edit-section-head p { font-size: 11px; color: var(--faint); line-height: 1.7; margin-top: 4px; }
.edit-sub-head { margin-top: 24px; margin-bottom: 12px; }
.edit-application-grid { margin-top: 20px; }
.admin-letter-grid { margin-bottom: 4px; }
.giveup-row { align-items: center; min-height: 42px; }
.giveup-row input { margin-top: 0; }
.field-error.is-visible { display: block; }
.edit-actions {
  display: flex; align-items: center; gap: 10px; padding: 15px 25px;
  background: var(--surface-2); border-top: 1px solid var(--line);
}
.edit-actions .btn { flex: 0 0 auto; }
.edit-error-list {
  margin: 9px 0 0 18px; padding: 0; font-size: 11px; line-height: 1.75;
  color: var(--red); list-style: disc;
}
.admin-edit-side { display: grid; gap: 14px; position: sticky; top: 82px; }
.side-list { margin-top: 11px; }
.side-list > div {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  padding: 6px 0; border-bottom: 1px dotted var(--line); font-size: 10.5px;
}
.side-list > div:last-child { border-bottom: 0; }
.side-list dt { color: var(--faint); flex: 0 0 auto; }
.side-list dd { color: var(--ink-2); text-align: right; word-break: break-all; }
.side-list .pill { font-size: 9px; }
.side-form { display: flex; flex-direction: column; gap: 8px; margin-top: 11px; }
.side-form input {
  width: 100%; min-height: 36px; padding: 8px 10px;
  border: 1px solid var(--line); background: #fffdf7; border-radius: 2px;
  color: var(--ink); font-size: 12px;
}
.side-form input:focus {
  outline: none; border-color: var(--green-3);
  box-shadow: 0 0 0 3px rgba(30, 75, 58, 0.08);
}
.side-form .btn { align-self: flex-start; margin-top: 3px; }
.side-form input[type="file"] {
  min-height: 0; padding: 6px; font-size: 10px; background: #fff;
  color: var(--muted); cursor: pointer;
}
.admin-photo { display: flex; justify-content: center; margin: 10px 0 8px; }
.admin-photo img, .admin-photo-empty {
  width: 118px; height: 165px; border: 1px solid var(--line);
  border-radius: 6px; background: var(--surface-2);
}
.admin-photo img { display: block; object-fit: cover; }
.admin-photo-empty {
  display: grid; place-items: center; border-style: dashed;
  color: var(--faint); font-size: 11px;
}
.admin-materials {
  margin-top: 18px; background: var(--surface); border: 1px solid var(--line);
}
.admin-upload {
  display: grid; grid-template-columns: minmax(150px, 0.8fr) minmax(240px, 1.5fr) auto;
  gap: 14px; align-items: end; padding: 14px;
  border: 1px dashed rgba(30, 75, 58, 0.28); background: var(--surface-2);
  margin-bottom: 20px;
}
.admin-upload .field { gap: 6px; }
.admin-upload .field label { font-size: 10.5px; }
.admin-upload .field input[type="file"] {
  width: 100%; min-height: 40px; padding: 7px 10px;
  border: 1px solid var(--line); background: #fffdf7; border-radius: 2px;
  color: var(--muted); font-size: 11px;
}
.admin-upload .field input[type="file"]::file-selector-button {
  margin-right: 9px; padding: 5px 9px; border: 1px solid var(--line);
  background: var(--surface); color: var(--ink-2); font-size: 10.5px;
  border-radius: 2px; cursor: pointer;
}
.admin-upload .help { margin-top: 1px; }
.admin-upload > .btn { margin-bottom: 1px; white-space: nowrap; }
.edit-note {
  display: flex; align-items: flex-start; gap: 7px;
  margin: -2px 0 16px; padding: 9px 12px;
  border: 1px dashed rgba(30, 75, 58, 0.22); background: var(--surface-2);
  color: var(--muted); font-size: 10.5px; line-height: 1.65;
}
.edit-note svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--green-3); margin-top: 1px; }
.admin-upload--detail {
  grid-template-columns: minmax(180px, 0.9fr) minmax(250px, 1.4fr) auto;
  margin: 16px 0 20px; border-style: solid; background: #fffdf7;
}
.admin-att-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.admin-att-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  margin-bottom: 8px;
}
.admin-att-head h3 {
  font-family: var(--serif); font-size: 13.5px; font-weight: 600; letter-spacing: 0.04em;
}
.admin-att-empty {
  display: flex; align-items: center; gap: 8px; padding: 17px 15px;
  border: 1px dashed var(--line); color: var(--faint); font-size: 11.5px;
}
.admin-att-empty svg { width: 16px; height: 16px; }
.att-card .att-cat { display: inline-block; color: var(--green); font-size: 9px; line-height: 1.5; border: 1px solid rgba(30, 75, 58, 0.2); background: var(--green-mist); padding: 0 5px; margin: 1px 0 2px; }
.att-card .att-actions form { display: flex; align-items: center; }
.att-card .att-actions button {
  width: 26px; height: 26px; padding: 0; display: grid; place-items: center;
  border: 0; border-radius: 2px; background: transparent; color: var(--faint);
  cursor: pointer;
}
.att-card .att-actions button:hover { background: var(--red-wash); color: var(--red); }
.att-card .att-actions button svg { width: 14px; height: 14px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.btn--icon { width: 33px; min-width: 33px; padding: 0; display: inline-grid; place-items: center; }
.btn--icon svg { width: 14px; height: 14px; }
.btn--danger-ghost { color: var(--faint); }
.btn--danger-ghost:hover {
  color: var(--red) !important; background: var(--red-wash) !important;
  border-color: rgba(169, 67, 46, 0.35) !important;
}
.data .actions .row-actions { flex-wrap: nowrap; }

@media (max-width: 1180px) {
  .admin-edit-layout { grid-template-columns: minmax(0, 1fr) 270px; }
  .admin-upload, .admin-upload--detail {
    grid-template-columns: minmax(150px, 0.9fr) minmax(210px, 1.3fr);
  }
  .admin-upload > .btn, .admin-upload--detail > .btn { grid-column: 1 / -1; justify-self: start; }
}
@media (max-width: 1020px) {
  .admin-edit-layout { grid-template-columns: minmax(0, 1fr); }
  .admin-edit-side { position: static; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .edit-actions { position: static; }
}
@media (max-width: 900px) {
  .admin-upload, .admin-upload--detail { grid-template-columns: minmax(0, 1fr); }
  .admin-upload > .btn, .admin-upload--detail > .btn { justify-self: start; }
  .student-card-foot .row-actions { gap: 4px; }
  .student-card-foot .row-actions .btn { min-height: 30px; font-size: 10.5px; }
  .student-card-foot .row-actions .btn--icon { width: 30px; min-width: 30px; }
}
@media (max-width: 620px) {
  .edit-section { padding: 19px 16px 22px; }
  .edit-section-head { gap: 10px; margin-bottom: 17px; }
  .edit-section-head h2 { font-size: 17px; }
  .edit-actions { padding: 13px 16px; flex-wrap: wrap; }
  .edit-actions .small { flex: 1 0 100%; }
  .edit-actions .spacer { display: none; }
  .edit-actions .btn { flex: 1 1 auto; }
  .admin-edit-side { grid-template-columns: minmax(0, 1fr); }
  .admin-upload, .admin-upload--detail { padding: 12px; }
  .admin-upload > .btn, .admin-upload--detail > .btn { width: 100%; }
  .admin-att-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-edit-head .page-head-meta { width: 100%; }
}


@media (max-width: 620px) {
  .paper-forms-head { flex-direction: column; gap: 6px; }
  .paper-form-grid { grid-template-columns: minmax(0, 1fr); }
  .paper-form-card:nth-child(odd) { border-right: 0; }
  .pf-links { flex: 1 0 100%; margin-left: 44px; }
  .paper-forms > .help { padding: 0 14px 11px; }
}
/* 学生列表：待建账号标记与批量入口 */
.tag--account {
  color: var(--amber); border-color: rgba(147, 101, 43, 0.22);
  background: var(--amber-wash); height: 18px; font-size: 9px; padding: 0 5px;
}
.btn-count {
  min-width: 17px; height: 17px; padding: 0 4px; display: inline-grid; place-items: center;
  border-radius: 9px; background: var(--red); color: #fff;
  font-family: var(--mono); font-size: 9px; line-height: 1;
}
.cell-person strong {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; line-height: 1.35; min-width: 0;
}
.cell-person strong .tag { flex: 0 0 auto; }

/* ---------------------------------------------------------------- 批量导入 / 批量建账号 */
.import-grid {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(270px, 1fr);
  gap: 18px; align-items: start;
}
.import-card { background: var(--surface); border: 1px solid var(--line); }
.import-card-head { display: flex; align-items: flex-start; gap: 12px; padding: 21px 22px 17px; }
.import-card-head h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: 0.04em;
}
.import-card-head p { font-size: 10.5px; color: var(--faint); line-height: 1.7; margin-top: 4px; }
.import-drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  min-height: 186px; margin: 0 22px; padding: 22px;
  border: 1px dashed rgba(30, 75, 58, 0.3); background: var(--surface-2);
  cursor: pointer; text-align: center; color: var(--muted);
  transition: border-color 160ms var(--ease), background 160ms var(--ease);
}
.import-drop:hover, .import-drop.is-drag {
  border-color: var(--green-3); background: var(--green-mist); color: var(--green);
}
.import-drop input { display: none; }
.import-drop svg { width: 29px; height: 29px; color: var(--green-3); }
.import-drop strong { font-size: 13px; font-weight: 600; color: var(--green); }
.import-drop span { font-size: 10.5px; color: var(--faint); }
.import-file-name { margin: 9px 22px 0; font-size: 10.5px; color: var(--faint); }
.import-file-name.has-file { color: var(--green); }
.import-note {
  display: flex; align-items: flex-start; gap: 8px; margin: 14px 22px 0; padding: 10px 12px;
  border-left: 2px solid var(--amber); background: var(--amber-wash);
  font-size: 10px; color: var(--muted); line-height: 1.65;
}
.import-note svg { width: 14px; height: 14px; flex: 0 0 14px; color: var(--amber); margin-top: 1px; }
.import-actions { margin-top: 18px; padding: 14px 22px; }
.import-actions .btn { flex: 0 0 auto; }
.import-side { display: grid; gap: 14px; }
.import-steps { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.import-steps li {
  display: flex; flex-direction: column; gap: 2px; padding-left: 15px;
  border-left: 1px solid var(--line); position: relative;
}
.import-steps li::before {
  content: ""; position: absolute; left: -3px; top: 5px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--green-3);
}
.import-steps b { font-size: 11px; font-weight: 600; color: var(--ink-2); }
.import-steps span { font-size: 10px; color: var(--faint); line-height: 1.55; }
.import-errors {
  margin-bottom: 18px; padding: 14px 17px;
  border: 1px solid rgba(169, 67, 46, 0.28); background: var(--red-wash);
}
.import-errors h3 {
  display: flex; align-items: center; gap: 7px;
  color: var(--red); font-size: 13px; font-weight: 600;
}
.import-errors h3 svg { width: 16px; height: 16px; }
.import-errors ol {
  margin: 9px 0 0 18px; padding: 0; max-height: 260px; overflow: auto;
  font-size: 11px; line-height: 1.7; color: var(--red);
}
.import-guide { margin-top: 18px; background: var(--surface); border: 1px solid var(--line); }
.import-guide-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 16px 18px; border-bottom: 1px solid var(--line-soft);
}
.import-guide-head h2 { font-family: var(--serif); font-size: 16px; font-weight: 600; }
.import-table { min-width: 600px; }
.import-table td:first-child { white-space: nowrap; font-weight: 500; }

.account-batch { background: var(--surface); border: 1px solid var(--line); }
.account-batch-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 20px 22px 17px; border-bottom: 1px solid var(--line-soft);
}
.account-batch-head > div { display: flex; align-items: flex-start; gap: 12px; }
.account-batch-head h2 {
  font-family: var(--serif); font-size: 19px; font-weight: 600; letter-spacing: 0.04em;
}
.account-batch-head p { font-size: 10.5px; color: var(--faint); line-height: 1.7; margin-top: 4px; }
.account-select-all { flex: 0 0 auto; padding-top: 4px; font-size: 11.5px !important; }
.account-pick-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 10px; padding: 16px 22px;
}
.account-pick {
  display: flex; align-items: center; gap: 9px; min-width: 0; padding: 10px 11px;
  border: 1px solid var(--line); background: #fffdf7; cursor: pointer;
  transition: border-color 150ms var(--ease), background 150ms var(--ease);
}
.account-pick:hover { border-color: var(--green-3); background: var(--green-mist); }
.account-pick:has(input:checked) {
  border-color: rgba(30, 75, 58, 0.4); background: var(--green-mist);
}
.account-pick input { width: 14px; height: 14px; accent-color: var(--green); flex: 0 0 14px; }
.account-pick .avatar { width: 28px; height: 28px; flex: 0 0 28px; font-size: 12px; font-family: var(--sans); }
.account-pick-body { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.account-pick-body strong {
  font-size: 11.5px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-pick-body span {
  font-size: 9.5px; color: var(--faint);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-options { padding: 0 22px 18px; border-top: 1px solid var(--line-soft); }
.account-options h3 { font-family: var(--serif); font-size: 14px; font-weight: 600; padding: 15px 0 9px; }
.account-mode {
  display: flex; align-items: flex-start; flex-wrap: wrap; gap: 9px 11px; padding: 11px 12px;
  border: 1px solid var(--line); background: #fffdf7; margin-bottom: 8px;
}
.account-mode:has(input[type="radio"]:checked) {
  border-color: rgba(30, 75, 58, 0.38); background: var(--green-mist);
}
.account-mode > input[type="radio"] {
  width: 14px; height: 14px; margin-top: 3px; accent-color: var(--green); flex: 0 0 14px;
}
.account-mode > span { flex: 1 1 180px; min-width: 0; }
.account-mode strong { display: block; font-size: 11.5px; font-weight: 600; }
.account-mode small { display: block; margin-top: 2px; font-size: 10px; color: var(--faint); line-height: 1.55; }
.account-password-input {
  width: 180px; min-height: 36px; padding: 7px 10px; margin-left: 25px;
  border: 1px solid var(--line); background: #fffdf7; border-radius: 2px; font-size: 12px;
}
.account-password-input:disabled { background: var(--surface-2); color: var(--faint); }
.account-actions { padding: 14px 22px; }
.account-empty { background: var(--surface); border: 1px solid var(--line); padding-bottom: 28px; }
.credential-card {
  margin-bottom: 18px; border: 1px solid rgba(30, 75, 58, 0.28); background: var(--green-mist);
}
.credential-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  padding: 19px 22px 14px;
}
.credential-head h2 { font-family: var(--serif); font-size: 20px; font-weight: 600; margin-top: 4px; }
.credential-head p { font-size: 10.5px; color: var(--muted); line-height: 1.65; margin-top: 4px; }
.credential-head .btn { flex: 0 0 auto; }
.credential-list {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 10px; padding: 0 22px;
}
.credential-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 9px 11px; background: rgba(255, 253, 247, 0.75);
  border: 1px solid rgba(30, 75, 58, 0.14);
}
.credential-person { display: flex; align-items: center; gap: 8px; min-width: 0; }
.credential-person .avatar {
  width: 28px; height: 28px; flex: 0 0 28px; font-size: 12px;
  font-family: var(--sans); background: var(--surface);
}
.credential-person strong { display: block; font-size: 11.5px; font-weight: 600; }
.credential-person span {
  display: block; font-size: 9.5px; color: var(--faint);
  font-family: var(--mono); margin-top: 1px;
}
.credential-password {
  font-family: var(--mono); font-size: 12px; color: var(--green);
  letter-spacing: 0.04em; flex: 0 0 auto;
}
.credential-hint { padding: 9px 22px 14px; }

@media (max-width: 1020px) {
  .import-grid { grid-template-columns: minmax(0, 1fr); }
  .import-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .account-pick-list, .credential-list { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 620px) {
  .import-card-head { padding: 17px 16px 13px; }
  .import-drop { margin: 0 16px; min-height: 160px; }
  .import-file-name { margin: 8px 16px 0; }
  .import-note { margin: 12px 16px 0; }
  .import-actions { padding: 13px 16px; }
  .import-actions .small { display: none; }
  .import-side { grid-template-columns: minmax(0, 1fr); }
  .account-batch-head { flex-direction: column; gap: 8px; padding: 17px 16px 13px; }
  .account-select-all { padding-top: 0; }
  .account-pick-list { padding: 13px 16px; }
  .account-options { padding: 0 16px 14px; }
  .account-password-input { width: 100%; margin-left: 0; }
  .account-actions { padding: 13px 16px; }
  .credential-head { flex-direction: column; padding: 16px; }
  .credential-head .btn { width: 100%; }
  .credential-list { padding: 0 16px; }
  .credential-hint { padding-left: 16px; padding-right: 16px; }
  .import-table { min-width: 520px; }
}

/* 4-1 家庭成员明细编辑器 */
.member-editor {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.member-rows { display: grid; }
.member-row {
  display: grid;
  grid-template-columns: 1.05fr .55fr .9fr 1.6fr 1fr 1fr 1fr 32px;
  gap: 7px;
  align-items: center;
  min-width: 880px;
  padding: 7px 10px;
  border-top: 1px solid var(--line-soft);
}
.member-row--head {
  border-top: 0;
  background: var(--wash);
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  padding-top: 9px;
  padding-bottom: 9px;
}
.member-row input {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 12.5px;
}
.member-row input:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 3px var(--green-wash);
}
.member-remove {
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--red);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}
.member-remove:hover { background: var(--red-wash); border-color: rgba(169, 67, 46, .3); }
.member-add { margin: 10px; }
input[data-income-auto][readonly] {
  background: var(--wash);
  color: var(--muted);
  cursor: default;
}
.income-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
  padding: 14px;
  border: 1px solid rgba(47, 91, 215, .18);
  border-radius: var(--radius);
  background: var(--blue-wash, #f4f7fc);
}
.income-summary-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  padding-left: 12px;
  border-left: 3px solid var(--blue, #2f5bd7);
}
.income-summary-item:first-child { border-left: 0; padding-left: 0; }
.income-summary-item span { color: var(--muted); font-size: 12px; }
.income-summary-item strong {
  color: var(--ink);
  font-family: var(--serif, inherit);
  font-size: 20px;
  font-variant-numeric: tabular-nums;
}
.income-auto-note {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(47, 91, 215, .14);
  border-radius: 8px;
  background: var(--blue-wash, #f4f7fc);
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.65;
}
.income-auto-note svg { width: 15px; height: 15px; flex: 0 0 15px; margin-top: 2px; color: var(--blue, #2f5bd7); }
@media (max-width: 700px) {
  .member-row { min-width: 800px; padding: 6px 8px; }
  .member-row input { height: 32px; font-size: 12px; }
  .income-summary { grid-template-columns: minmax(0, 1fr); }
  .income-summary-item { border-left: 0; padding-left: 0; }
}

/* 管理员：4-1 家庭成员明细 */
.table-wrap { overflow-x: auto; }
.member-view {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 12.5px;
}
.member-view th, .member-view td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line-soft);
  text-align: left;
  vertical-align: top;
}
.member-view th {
  color: var(--muted);
  background: var(--wash);
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.member-view tr:last-child td { border-bottom: 0; }

/* 管理员：官方表格预览 */
.form-preview-card {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  overflow: hidden;
}
.form-preview-head {
  display: flex;
  gap: 18px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 17px 20px 14px;
  border-bottom: 1px solid var(--line-soft);
}
.form-preview-head h2 { margin: 3px 0 4px; font-size: 17px; }
.form-preview-head p { margin: 0; max-width: 700px; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.form-preview-tabs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; }
.form-preview-tabs button {
  height: 30px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.form-preview-tabs button.is-active { border-color: var(--green); color: var(--green); background: var(--green-wash); font-weight: 700; }
.form-preview-frame {
  display: block;
  width: 100%;
  height: 760px;
  border: 0;
  background: #e9e7df;
}
.form-preview-foot {
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 760px) {
  .form-preview-head { flex-direction: column; }
  .form-preview-tabs { justify-content: flex-start; }
  .form-preview-frame { height: 560px; }
  .form-preview-foot { flex-direction: column; align-items: flex-start; }
}

/* 官方表格 PNG 预览（比 iframe PDF 更稳定，移动端也不依赖 PDF 插件） */
.form-preview-image-link {
  display: block;
  background: #e9e7df;
  text-align: center;
  text-decoration: none;
}
.form-preview-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 980px;
  object-fit: contain;
  object-position: top center;
  background: #fff;
}
.form-preview-image-hint {
  display: block;
  padding: 7px 12px 9px;
  color: var(--muted);
  font-size: 11.5px;
  background: #e9e7df;
}
.form-preview-image-link:hover .form-preview-image-hint { color: var(--green); }
@media (max-width: 760px) {
  .form-preview-image { max-height: none; }
}

/* ==========================================================================
   排版精修：更紧凑的公报式表单、可收起的官方表格预览
   ========================================================================== */

html { scroll-behavior: smooth; }

h1, h2, h3, .page-head h1, .step-head h2, .card-title {
  text-wrap: balance;
}
p, .lede, .step-head p, .banner-body, .help {
  text-wrap: pretty;
}
.data, .member-view, .recent-table {
  font-variant-numeric: tabular-nums;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:focus-visible, a:focus-visible, button:focus-visible,
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid rgba(30, 75, 58, 0.45);
  outline-offset: 2px;
}

@media (min-width: 901px) {
  :root { --nav-w: 240px; }
  .topbar-inner { padding: 14px 38px; }
  .content { padding: 30px 38px 48px; max-width: 1520px; }
  .page-head { margin-bottom: 22px; }
  .page-head h1 { font-size: clamp(30px, 2.35vw, 36px); }
  .lede { max-width: 64ch; font-size: 13px; }
  .student-layout { grid-template-columns: 156px minmax(0, 1fr) 252px; gap: 16px; }
  .step-panel { padding: 26px 30px 6px; }
  .step-head { padding-bottom: 18px; margin-bottom: 20px; }
  .step-head h2 { font-size: 22px; }
  .form-grid { gap: 16px 20px; }
  .field { gap: 6px; }
  .field input[type="text"], .field input[type="password"], .field input[type="tel"],
  .field input[type="date"], .field input[type="month"], .field input[type="number"],
  .field input[type="email"], .field select, .field textarea {
    min-height: 40px; padding: 8px 11px;
  }
  .sub-head { margin: 26px 0 13px; }
  .form-nav {
    position: sticky; bottom: 0; z-index: 8;
    margin-top: 18px; padding: 14px 30px 16px;
    background: rgba(247, 242, 231, 0.95);
    backdrop-filter: blur(8px);
    box-shadow: 0 -10px 22px -22px rgba(27, 33, 28, 0.55);
  }
}

/* 宽屏下把基本信息改成横向标签，压缩纵向空白；窄屏仍用上方标签 */
@media (min-width: 1440px) {
  .form-grid--base { column-gap: 26px; row-gap: 13px; align-items: start; }
  .form-grid--base .field {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    grid-template-rows: auto auto;
    align-items: center;
    gap: 3px 12px;
  }
  .form-grid--base .field > label:not(.check-row) {
    grid-column: 1; grid-row: 1;
    justify-content: flex-end; align-items: center;
    text-align: right; gap: 2px;
    font-size: 12px; line-height: 1.4; letter-spacing: 0.02em;
  }
  .form-grid--base .field > label .req { font-size: 0; }
  .form-grid--base .field > label .req::after { content: "*"; font-size: 12px; color: var(--red); }
  .form-grid--base .field > input,
  .form-grid--base .field > select,
  .form-grid--base .field > textarea,
  .form-grid--base .field > .input-wrap,
  .form-grid--base .field > .segmented { grid-column: 2; grid-row: 1; }
  .form-grid--base .field > .help,
  .form-grid--base .field > .field-error { grid-column: 2; grid-row: 2; margin: 0; }
  .form-grid--base .field > .help:empty,
  .form-grid--base .field > .field-error:empty { display: none; }
  .form-grid--base .field--wide { grid-column: 1 / -1; }
  .form-grid--base input, .form-grid--base select, .form-grid--base textarea { font-size: 12.5px; }
}

/* 官方表格预览：默认露出首屏，展开后再看完整页面 */
.form-preview-body {
  position: relative;
  max-height: 430px;
  overflow: hidden;
  background: #e9e7df;
  transition: max-height 280ms var(--ease);
}
.form-preview-body.is-open { max-height: 5000px; }
.form-preview-body::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0; height: 120px;
  background: linear-gradient(180deg, rgba(233, 231, 223, 0), #e9e7df 82%);
  pointer-events: none;
  transition: opacity 180ms var(--ease);
}
.form-preview-body.is-open::after { opacity: 0; }
.form-preview-image { max-height: none; }
.form-preview-foot { flex-wrap: wrap; }
.form-preview-foot .btn-row { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 760px) {
  .form-preview-body { max-height: 340px; }
  .form-preview-foot .btn-row { width: 100%; justify-content: flex-start; }
  .form-preview-foot .btn-row .btn { flex: 1 1 auto; }
}

/* 移动端成员明细：给出横向滑动提示，避免误以为表格被裁切 */
@media (max-width: 700px) {
  .member-editor { position: relative; }
  .member-editor::before {
    content: "左右滑动可查看完整成员表格 →";
    display: block; padding: 8px 10px 0;
    font-size: 10px; letter-spacing: 0.04em; color: var(--faint);
  }
}


/* 小节标题：长标题与说明不再互相挤压 */
.sub-head {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 4px 14px;
}
.sub-head p { flex: 1 1 100%; margin-top: 2px; }
.sub-head > .btn-link { margin-left: auto; }
.form-preview-body { max-height: 360px; }
@media (max-width: 760px) { .form-preview-body { max-height: 300px; } }
@media (min-width: 1440px) {
  .form-grid--base .field { grid-template-columns: 116px minmax(0, 1fr); }
  .form-grid--base .field--wide { grid-template-columns: 116px minmax(0, 1fr); }
}

/* 已提交/已通过的表单不再需要常驻底部操作条，避免遮挡阅读 */
#aid-form[data-readonly="1"] .form-nav {
  position: static;
  box-shadow: none;
  backdrop-filter: none;
}

@media (min-width: 1440px) {
  .form-grid--base .field input,
  .form-grid--base .field select,
  .form-grid--base .field textarea { font-size: 12.5px; }
}

/* 学生核对页：预览卡在窄栏中把操作按钮放成独立一行 */
.form-preview-card--student .form-preview-head { flex-wrap: wrap; }
.form-preview-card--student .form-preview-tabs {
  width: 100%;
  justify-content: flex-start;
}


.form-preview-loading {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  background: #e9e7df;
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.06em;
}

/* 4-1 + 4-2 合并下载 */
.paper-form-combined {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 14px;
  padding: 13px 15px;
  border: 1px solid rgba(30, 75, 58, .22);
  background: var(--green-mist);
}
.paper-form-combined strong { display: block; font-size: 13px; color: var(--ink); }
.paper-form-combined p { margin: 3px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.55; }
.paper-form-combined .pf-links { flex: 0 0 auto; }
@media (max-width: 620px) {
  .paper-form-combined { flex-direction: column; align-items: flex-start; }
}


.tag--filled { color: var(--green); border-color: rgba(30, 75, 58, .22); background: var(--green-wash); }
