/* 上传数据页 —— 复用 welcome.css 的 :root 令牌与 topbar */
.up-shell {
  width: min(880px, calc(100% - 40px));
  margin: 26px auto 60px;
}

.up-head h1 {
  margin: 0 0 8px;
  font-size: var(--fs-title, 32px);
  font-weight: 900;
  color: var(--ink);
}
.up-head p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: var(--fs-md, 16px);
  line-height: 1.7;
}

/* stepper */
.up-steps {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
}
.up-step {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: var(--fs-sm, 14px);
  font-weight: 700;
}
.up-step__n {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #eef2f8;
  color: #8493aa;
  font-size: 12px;
  font-weight: 900;
}
.up-step.is-active {
  border-color: #b9d0f6;
  background: #f3f8ff;
  color: #1f3554;
}
.up-step.is-active .up-step__n {
  background: var(--blue);
  color: #fff;
}
.up-step.is-done .up-step__n {
  background: var(--green);
  color: #fff;
}
.up-step.is-done { color: #2f7a55; }

/* card / panel */
.up-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.up-panel { display: none; }
.up-panel.is-active { display: block; }
.up-panel__body { padding: 24px 26px; }
.up-panel__body h2 {
  margin: 0 0 10px;
  font-size: var(--fs-lg, 18px);
  font-weight: 900;
  color: var(--ink);
}
.up-lead {
  margin: 0 0 14px;
  color: #43526b;
  font-size: var(--fs-sm, 14px);
  line-height: 1.7;
}
.up-em { color: var(--orange); }
.up-need {
  margin: 0 0 16px;
  padding: 12px 16px 12px 30px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: #43526b;
  font-size: var(--fs-sm, 14px);
  line-height: 1.75;
}
.up-need b { color: #1f3554; }

/* dropzone */
.up-drop {
  border: 1.5px dashed #c4d2ea;
  border-radius: 12px;
  background: #fbfdff;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.up-drop:hover, .up-drop:focus-visible {
  border-color: var(--blue);
  background: #f2f7ff;
  outline: none;
}
.up-drop.is-drag {
  border-color: var(--blue);
  background: #eaf2ff;
}
.up-drop__inner {
  padding: 30px 20px;
  text-align: center;
}
.up-drop__icon {
  font-size: 30px;
  line-height: 1;
  margin-bottom: 8px;
}
.up-drop__title {
  margin: 0 0 4px;
  font-size: var(--fs-md, 16px);
  font-weight: 700;
  color: #2b3a52;
}
.up-link { color: var(--blue); text-decoration: underline; }
.up-drop__hint {
  margin: 0;
  font-size: var(--fs-sm, 14px);
  color: #8493aa;
}

/* 上传区下方一行：没有合适的格式？下载 Excel 模板 */
.up-template-line {
  margin: 12px 0 0;
  font-size: var(--fs-sm, 14px);
  color: #8493aa;
}
.up-linkbtn {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-weight: 700;
  color: var(--blue);
  text-decoration: underline;
  cursor: pointer;
}
.up-linkbtn:hover { color: #1c49bf; }

.up-secondary-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 12px;
}
.up-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: #47597a;
  border-radius: 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: var(--fs-sm, 14px);
  font-weight: 700;
  cursor: pointer;
}
.up-ghost:hover { background: #f4f7fb; }

/* 统一「返回」按钮：精致 chevron 图标 + 文字（图标随字色 currentColor） */
.back-btn { display: inline-flex; align-items: center; gap: 6px; }
.back-link { display: inline-flex; align-items: center; gap: 5px; text-decoration: none; }
.back-link span { text-decoration: underline; }
.back-ic { width: 1em; height: 1em; flex: 0 0 auto; }
.back-btn .back-ic { opacity: 0.85; transition: transform 0.15s ease; }
.back-btn:hover .back-ic { transform: translateX(-2px); }

/* validation result */
.up-result {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}
.up-result__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  font-weight: 800;
  font-size: 14px;
}
.up-result__head.ok { background: #eefaf3; color: #1f8a53; border-bottom: 1px solid #cdeed9; }
.up-result__head.err { background: #fdecec; color: #c23838; border-bottom: 1px solid #f6d2d2; }
.up-result__badge {
  width: 20px; height: 20px; flex: 0 0 auto;
  display: grid; place-items: center; border-radius: 50%;
  color: #fff; font-size: 12px; font-weight: 900;
}
.up-result__head.ok .up-result__badge { background: #22a35a; }
.up-result__head.err .up-result__badge { background: #d64545; }
.up-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
}
.up-stat {
  flex: 1;
  min-width: 110px;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  background: #fbfcfe;
}
.up-stat b { display: block; font-size: 20px; font-weight: 900; color: var(--blue); }
.up-stat span { font-size: 12px; color: #8493aa; font-weight: 700; }
.up-msgs { padding: 0 16px 14px; }
.up-msg {
  display: flex; gap: 7px; align-items: flex-start;
  font-size: var(--fs-sm, 14px); line-height: 1.55; margin: 6px 0;
}
.up-msg--warn { color: #9a6a12; }
.up-msg--err { color: #c23838; }
.up-msg--ok { color: #2f7a55; }
.up-preview {
  margin: 0 16px 16px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.up-preview table { border-collapse: collapse; width: 100%; font-size: 12px; white-space: nowrap; }
.up-preview th, .up-preview td { padding: 6px 10px; border-bottom: 1px solid #eef2f7; border-right: 1px solid #eef2f7; text-align: left; }
.up-preview th { background: #f6f8fb; color: #5d6b82; font-weight: 800; position: sticky; top: 0; }
.up-preview td.is-id { color: #1f3554; font-weight: 700; }
.up-preview .up-maxrow td { background: #fff8ee; color: #9a6a12; font-weight: 700; }

/* files list (step 2) */
.up-files { margin-top: 16px; display: flex; flex-direction: column; gap: 8px; }
.up-file {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 12px;
  background: #fbfcfe;
}
.up-file__type {
  flex: 0 0 auto; width: 40px; height: 30px; border-radius: 6px;
  display: grid; place-items: center; font-size: 10px; font-weight: 900; color: #fff;
}
.up-file__type.pdf { background: #d64545; }
.up-file__type.img { background: #3b82c4; }
.up-file__name { flex: 1; font-size: var(--fs-sm, 14px); color: #2b3a52; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.up-file__size { font-size: 11px; color: #8493aa; flex: 0 0 auto; }
.up-file__x { border: 0; background: transparent; color: #b3bdcc; cursor: pointer; font-size: 18px; line-height: 1; padding: 2px 6px; }
.up-file__x:hover { color: #d64545; }
.up-match { margin-top: 12px; padding: 11px 14px; border-radius: 9px; background: #f8fafc; border: 1px solid var(--line); font-size: var(--fs-sm, 14px); color: #5d6b82; line-height: 1.6; }

/* form (step 3) */
.up-form { display: flex; flex-direction: column; gap: 14px; max-width: 560px; }
.up-field { display: flex; flex-direction: column; gap: 6px; }
.up-field > span { font-size: var(--fs-sm, 14px); font-weight: 700; color: #43526b; }
.up-field > span i { color: #d64545; font-style: normal; }
.up-field input {
  height: 42px; border: 1px solid var(--line); border-radius: 9px;
  padding: 0 13px; font: inherit; font-size: var(--fs-md, 16px); color: var(--ink); background: #fff;
}
.up-field input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(79,125,243,.14); }
.up-field-2 { display: flex; gap: 12px; }
.up-field-2 .up-field { flex: 1; }
.up-consent { display: flex; gap: 9px; align-items: flex-start; font-size: var(--fs-sm, 14px); color: #5d6b82; line-height: 1.55; }
.up-consent input { margin-top: 2px; width: 16px; height: 16px; flex: 0 0 auto; }
.up-error { color: #c23838; font-size: var(--fs-sm, 14px); margin: 2px 0 0; font-weight: 700; }

/* footer */
.up-panel__foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 26px; border-top: 1px solid var(--line); background: #fbfcfe;
}
.up-foot-right { display: flex; gap: 10px; align-items: center; }
.up-foot-hint { font-size: var(--fs-sm, 14px); color: #8493aa; }
.up-primary {
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 9px; padding: 0 20px; height: 42px;
  background: linear-gradient(135deg, #5b8cf6, #3f6fe6); color: #fff;
  font: inherit; font-size: 14px; font-weight: 800; cursor: pointer;
  box-shadow: 0 4px 14px rgba(63,111,230,.28);
}
.up-primary:hover { filter: brightness(1.05); }
.up-primary:disabled { background: #c3ccdb; box-shadow: none; cursor: not-allowed; }

/* done */
.up-done__body { text-align: center; padding: 40px 26px; }
.up-done__check {
  width: 60px; height: 60px; margin: 0 auto 14px; border-radius: 50%;
  background: linear-gradient(135deg, #38c67a, #14a45f); color: #fff;
  display: grid; place-items: center; font-size: 30px; font-weight: 900;
  box-shadow: 0 8px 22px rgba(20,164,95,.3);
}
.up-done__msg { color: #43526b; font-size: 14px; line-height: 1.7; max-width: 460px; margin: 0 auto 14px; }
.up-done__ref { font-size: var(--fs-sm, 14px); color: #5d6b82; margin-bottom: 6px; }
.up-done__ref b { color: #1f3554; font-family: ui-monospace, monospace; }
.up-done__meta { font-size: 12px; color: #8493aa; margin-bottom: 20px; }
.up-done__home { display: inline-flex; text-decoration: none; margin: 0 auto; }

.up-legal {
  margin: 18px 4px 0;
  font-size: 12px;
  color: #8493aa;
  line-height: 1.6;
}

.up-banner {
  margin: 0 0 16px;
  padding: 11px 16px;
  border-radius: 10px;
  background: #fff6ea;
  border: 1px solid #ffe0b8;
  color: #9a6a12;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}
.up-parse-spin {
  width: 16px; height: 16px; flex: 0 0 auto;
  border-radius: 50%; border: 3px solid #cfe0d6; border-top-color: #22a35a;
  animation: upspin .8s linear infinite; display: inline-block;
}
.up-consent a { color: var(--blue); text-decoration: underline; }

/* overlay */
.up-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(16, 24, 39, .5); backdrop-filter: blur(3px);
  display: grid; place-items: center;
}
.up-overlay[hidden] { display: none; }
.up-overlay__card {
  background: #fff; border-radius: 14px; padding: 28px 34px; text-align: center;
  width: min(360px, 90vw); box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.up-overlay__card p { margin: 14px 0 12px; font-size: 14px; color: #2b3a52; font-weight: 700; }
.up-spinner {
  width: 40px; height: 40px; margin: 0 auto; border-radius: 50%;
  border: 4px solid #e6ecf5; border-top-color: var(--blue);
  animation: upspin .8s linear infinite;
}
@keyframes upspin { to { transform: rotate(360deg); } }
.up-progress { height: 6px; border-radius: 999px; background: #eef2f8; overflow: hidden; }
.up-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #5b8cf6, #3f6fe6); transition: width .3s; }

@media (max-width: 620px) {
  .up-step__t { display: none; }
  .up-step { flex: 0 0 auto; padding: 10px; justify-content: center; }
  .up-steps { justify-content: space-between; }
  .up-field-2 { flex-direction: column; }
  .up-panel__foot { flex-direction: column; align-items: stretch; }
  .up-foot-right { justify-content: space-between; }
}

/* ============================================================
   考试卡片式上传（以考试为单位）
   ============================================================ */

/* 顶部：成绩格式要求（可折叠）+ 模板下载 */
.up-format { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 18px; }
.up-format__toggle {
  border: 1px solid var(--line); background: #fff; color: #47597a;
  border-radius: 8px; padding: 7px 13px; font: inherit; font-size: var(--fs-sm, 14px);
  font-weight: 700; cursor: pointer;
}
.up-format__toggle:hover { background: #f4f7fb; }
.up-format__toggle.is-open span { display: inline-block; transform: rotate(180deg); }
.up-format__body {
  flex-basis: 100%; margin: 4px 0 0; padding: 14px 16px;
  background: #f8fafc; border: 1px solid #e6ecf4; border-radius: 12px;
}
.up-format__body .up-lead { margin-top: 0; }
.up-need__note { margin: 10px 0 0; font-size: 13px; color: #8493aa; line-height: 1.6; }

/* 考试卡片列表 */
.up-exams { display: flex; flex-direction: column; gap: 16px; }

.up-exam {
  border: 1px solid #e1e9f3; border-radius: 14px; background: #fff;
  padding: 16px 16px 18px; box-shadow: 0 6px 18px rgba(20, 36, 64, 0.05);
}
.up-exam__head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.up-exam__icon { display: inline-flex; line-height: 0; flex: 0 0 auto; }
.up-ico { display: block; width: 18px; height: 18px; flex: 0 0 auto; }
.up-ico--exam { width: 24px; height: 24px; }
.up-exam__label .up-ico { margin-right: -2px; }
.up-exam__name {
  flex: 1 1 auto; min-width: 0; border: 1px solid transparent; background: transparent;
  font: inherit; font-size: 17px; font-weight: 800; color: var(--ink, #1f3554);
  padding: 6px 8px; border-radius: 8px;
}
.up-exam__name:hover { background: #f4f7fb; }
.up-exam__name:focus { outline: none; background: #fff; border-color: var(--blue, #2357d8); box-shadow: 0 0 0 3px rgba(35, 87, 216, 0.12); }
.up-exam__status { flex: 0 0 auto; font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.up-exam__status.is-idle  { background: #eef2f7; color: #7a889d; }
.up-exam__status.is-warn  { background: #fff4e5; color: #c2570a; }
.up-exam__status.is-ready { background: #e7f8ee; color: #128a4e; }
.up-exam__status.is-err   { background: #fdecec; color: #d02c2c; }
.up-exam__del { flex: 0 0 auto; border: 0; background: none; color: #9aa6b8; font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; padding: 4px 6px; }
.up-exam__del:hover { color: #d02c2c; }

.up-exam__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .up-exam__grid { grid-template-columns: 1fr; } }
.up-exam__col { min-width: 0; }
.up-exam__label { font-size: 13.5px; font-weight: 800; color: #43526b; margin-bottom: 8px; display: flex; align-items: center; gap: 8px; }
.up-req { color: #e0554c; font-style: normal; }
.up-optional { font-size: 11.5px; font-weight: 700; color: #8493aa; background: #eef2f7; border-radius: 999px; padding: 2px 8px; }

/* 卡片内的小号 drop/结果 */
.up-drop--sm { padding: 18px 14px; }
.up-drop--sm .up-drop__icon { font-size: 22px; }
.up-drop--sm .up-drop__title { font-size: 14px; }
.up-result--sm { margin-top: 10px; }
.up-result--sm .up-stats { gap: 10px; }
.up-result__redo { margin-left: auto; font-size: 12px; }

/* 新建考试按钮 */
.up-addexam {
  margin-top: 16px; width: 100%; border: 1.5px dashed #c4d2e6; background: #fbfdff;
  color: #3a63d0; border-radius: 12px; padding: 13px; font: inherit; font-size: 15px;
  font-weight: 800; cursor: pointer;
}
.up-addexam:hover { background: #f2f6ff; border-color: #7ea0e6; }

.up-preview__title { margin: 0 16px 6px; font-size: 12.5px; font-weight: 800; color: #5d6b82; }

/* 第二步·联系方式：左信任要点 + 右表单的分栏布局，充分利用宽度 */
.up-contact { display: grid; grid-template-columns: 0.82fr 1.18fr; gap: 40px; align-items: start; }
@media (max-width: 680px) { .up-contact { grid-template-columns: 1fr; gap: 22px; } }
.up-contact__aside h2 { margin: 0 0 8px; }
.up-contact__aside .up-lead { margin: 0; }
.up-contact__points { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.up-contact__points li { display: flex; gap: 11px; align-items: flex-start; }
.up-contact__ck { flex: 0 0 auto; width: 22px; height: 22px; margin-top: 1px; border-radius: 50%; background: #e7f6ee; color: #1f9d57; display: grid; place-items: center; font-size: 12px; font-weight: 900; }
.up-contact__points b { display: block; font-size: 14px; color: #1f3554; font-weight: 800; margin-bottom: 2px; }
.up-contact__points small { color: #7a889d; font-size: 12.5px; line-height: 1.5; }
.up-contact__main .up-form { max-width: none; }
@media (min-width: 681px) { .up-contact__aside { border-right: 1px solid #eef2f7; padding-right: 36px; } }
