/* ===================== 基础 ===================== */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  font-family: "Microsoft YaHei", "PingFang SC", system-ui, sans-serif;
  color: #111;
  background: #f3f4f6;
  -webkit-text-size-adjust: 100%;
}
.screen { display: none; min-height: 100vh; }
.screen.active { display: block; }

/* ===================== 按钮 ===================== */
.btn {
  display: inline-block;
  padding: 10px 22px;
  font-size: 16px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.btn-primary { background: #c0392b; color: #fff; }
.btn-primary:hover { background: #a93226; }
.btn-line { background: #fff; color: #333; border-color: #c9ccd1; }
.btn-line:hover { background: #f0f1f3; }
.btn-danger { background: #fff; color: #c0392b; border-color: #c0392b; }
.btn-danger:hover { background: #fdecea; }
.btn:active { transform: translateY(1px); }

/* ===================== 封面 ===================== */
.cover-wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 20px 60px;
  text-align: center;
}
.cover-title {
  font-size: 24px;
  font-weight: 700;
  color: #000;
  line-height: 1.5;
  margin: 24px 0 18px;
}
.cloud-status {
  font-size: 14px;
  color: #555;
  margin-bottom: 22px;
}
.qr-block {
  text-align: center;
  margin: 22px 0;
}
.qr-box {
  width: 150px; height: 150px;
  margin: 0 auto 14px;
  border: 1px solid #ddd;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.qr-box svg, .qr-box img { width: 140px; height: 140px; }
.qr-link { display: inline-block; }
.site-url { font-size: 13px; color: #444; margin: 10px auto 0; word-break: break-all; max-width: 360px; }
.cover-actions { display: flex; gap: 16px; justify-content: center; margin: 18px 0 26px; }
.notice {
  font-size: 15px; color: #000;
  background: #fff; border: 1px solid #e3e5e8;
  border-radius: 8px; padding: 12px 16px; margin: 0 auto 40px; max-width: 560px;
  line-height: 1.6;
}
.cover-footer {
  font-size: 14px; color: #000; line-height: 1.9; margin-top: 30px;
}

/* ===================== 面板（密码/基本信息） ===================== */
.panel, .panel.wide {
  max-width: 460px; margin: 60px auto; background: #fff;
  border-radius: 12px; padding: 28px 26px; box-shadow: 0 4px 18px rgba(0,0,0,.06);
}
.panel.wide { max-width: 560px; }
.panel h2 { margin: 0 0 6px; font-size: 20px; }
.hint { font-size: 13px; color: #777; margin: 0 0 16px; }
.form-row { display: flex; align-items: center; gap: 12px; margin: 14px 0; }
.form-row label { width: 150px; flex: none; font-size: 15px; }
.form-row input {
  flex: 1; padding: 9px 12px; border: 1px solid #cdd1d6; border-radius: 8px; font-size: 15px;
}
.unit { color: #666; font-size: 14px; }
.seg { display: flex; gap: 10px; }
.seg-btn {
  padding: 9px 26px; border: 1px solid #cdd1d6; background: #fff; border-radius: 8px; cursor: pointer; font-size: 15px;
}
.seg-btn.active { background: #c0392b; color: #fff; border-color: #c0392b; }
.pw-input { width: 100%; padding: 11px 12px; border: 1px solid #cdd1d6; border-radius: 8px; font-size: 16px; letter-spacing: 3px; }
.panel-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 22px; }
.err { color: #c0392b; font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ===================== 题目填写 ===================== */
.q-wrap { max-width: 640px; margin: 0 auto; padding: 22px 16px 40px; }
.progress { height: 8px; background: #e3e5e8; border-radius: 6px; overflow: hidden; }
.progress-bar { height: 100%; width: 0; background: #c0392b; transition: width .2s; }
.q-nav { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.q-nav .nav-item {
  width: 34px; height: 34px; border-radius: 6px; border: 1px solid #cfd3d8; background: #fff;
  font-size: 13px; cursor: pointer; color: #333;
}
.q-nav .nav-item.answered { background: #e8f3ea; border-color: #7bbf86; }
.q-nav .nav-item.current { background: #c0392b; color: #fff; border-color: #c0392b; }
.q-card { background: #fff; border-radius: 12px; padding: 24px 22px; box-shadow: 0 4px 18px rgba(0,0,0,.06); }
.q-head { font-size: 18px; margin-bottom: 20px; line-height: 1.6; }
.q-no { font-weight: 700; margin-right: 8px; color: #c0392b; }
.q-max { display: inline-block; margin-left: 10px; font-size: 14px; color: #777; }
.q-input-row { display: flex; align-items: center; gap: 12px; }
.q-input-row label { font-size: 16px; }
.q-score { padding: 9px 14px; font-size: 16px; border: 1px solid #cdd1d6; border-radius: 8px; min-width: 120px; }
.q-actions { display: flex; gap: 12px; justify-content: space-between; margin-top: 24px; }

/* ===================== 查看报告 ===================== */
.view-wrap { max-width: 760px; margin: 0 auto; padding: 24px 16px 50px; }
.view-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.view-head h2 { margin: 0; flex: 1; }
.view-list-title { font-size: 14px; color: #666; margin-bottom: 10px; }
.student-select { position: relative; max-width: 460px; }
.student-select-btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; border: 1px solid #cdd1d6; background: #fff; border-radius: 8px;
  cursor: pointer; font-size: 14px; color: #333;
}
.student-select-btn.open { border-color: #c0392b; }
.student-select-caret { color: #999; font-size: 12px; }
.student-select-panel {
  position: absolute; z-index: 20; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid #cdd1d6; border-radius: 8px;
  max-height: 320px; overflow-y: auto; box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.student-option {
  display: flex; align-items: center; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid #f0f1f3; cursor: pointer; font-size: 14px;
}
.student-option:last-child { border-bottom: none; }
.student-option:hover { background: #f7f8fa; }
.student-option.active { background: #c0392b; color: #fff; }
.student-option-label { flex: 1; text-align: left; }
.student-option-del {
  flex: 0 0 auto; margin-left: 10px; padding: 4px 9px; border: 1px solid #c0392b;
  background: #fff; color: #c0392b; border-radius: 6px; cursor: pointer; font-size: 12px;
}
.student-option-del:hover { background: #fdecea; }
.student-option-empty { padding: 12px; color: #888; font-size: 14px; }
.view-detail { margin-top: 22px; border-top: 1px solid #e3e5e8; padding-top: 18px; }
.view-detail-head { font-size: 17px; font-weight: 700; margin-bottom: 14px; }
.report-buttons { display: flex; flex-wrap: wrap; gap: 10px; }

/* ===================== 学校测量统计面板 ===================== */
.school-panel { margin: 18px 0 8px; padding: 14px 16px; border: 1px solid #e3e5e8; border-radius: 10px; background: #fff; }
.school-panel-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; color: #111; }
.school-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.school-select { padding: 9px 12px; border: 1px solid #cdd1d6; border-radius: 8px; font-size: 15px; min-width: 220px; flex: 1 1 240px; max-width: 380px; }
.school-tip { font-size: 13px; color: #777; margin-top: 8px; line-height: 1.6; }

/* ===================== 报告弹层 ===================== */
.modal { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 50; overflow: auto; }
.modal.open { display: block; }
.modal-bar { position: sticky; top: 0; background: #fff; padding: 12px 18px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid #e3e5e8; }
.modal-bar span { flex: 1; font-size: 16px; font-weight: 700; }
.modal-body { background: #fff; padding: 24px; }

/* ===================== Toast ===================== */
.toast {
  position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%);
  background: rgba(0,0,0,.82); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .25s; z-index: 99;
}
.toast.show { opacity: 1; }

/* ===================== 打印报表样式 ===================== */
.report-pages { background: #fff; }
.page { width: 794px; min-height: 1123px; padding: 40px 44px; box-sizing: border-box; margin: 0 auto 24px; border: 1px solid #ddd; background:#fff; }
/* 每页顶部居中的文档标题行（黑体小四号） */
.page-banner { font-family: "SimHei","黑体",sans-serif; font-weight: bold; font-size: 12pt; text-align: center; margin-bottom: 6px; }
/* 某某测量统计结果（黑体小四号、居中） */
.page-head { font-family: "SimHei","黑体",sans-serif; font-weight: bold; font-size: 12pt; text-align: center; margin-bottom: 14px; }
.tbl-title { font-weight: bold; font-size: 12pt; margin: 10px 0 4px; }
/* 总量表汇总表标题（表1/表2）居中 */
.tbl-title.total-title { text-align: center; }
/* 统计表：宋体5号，表头居中 */
.score-tbl { border-collapse: collapse; font-size: 10.5pt; margin: 0 auto; font-family: "SimSun","宋体",serif; }
.score-tbl td, .score-tbl th { border: 1px solid #000; padding: 2px 6px; text-align: center; vertical-align: middle; min-width: 26px; font-family: "SimSun","宋体",serif; font-size: 10.5pt; }
.score-tbl th { font-weight: normal; }
/* 表格之间的空行：表1↔表2 空4行；表2↔折线图 空5行（按5号字行高约15.75pt/行） */
.gap-4l { height: 63pt; }
.gap-5l { height: 78.75pt; }
.tbl-gap { height: 14px; }
.sub-block { margin-bottom: 22px; }
.chart-wrap { margin-top: 8px; text-align: center; }
/* 图下序号与名称：宋体5号 */
.chart-cap { font-family: "SimSun","宋体",serif; font-size: 10.5pt; text-align: center; margin-top: 6px; }
.report-doc { width: 794px; padding: 40px 44px; font-family: "SimSun","宋体",serif; font-size: 10.5pt; line-height: 1.9; background:#fff; color:#000; }
/* 测量报告第一行：4号黑体居中 */
.rp-title { font-family: "SimHei","黑体",sans-serif; font-weight: bold; font-size: 14pt; text-align: center; margin-bottom: 14px; }
.rp-intro { margin: 8px 0 12px; text-indent: 2em; }
.rp-body2 { margin: 8px 0 12px; text-indent: 2em; }
.rp-sec { margin: 8px 0; text-indent: 2em; }
.rp-section { margin: 12px 0 4px; }
.rp-line { margin: 6px 0; }

@media (max-width: 560px) {
  .cover-title { font-size: 19px; }
  .form-row { flex-direction: column; align-items: stretch; }
  .form-row label { width: auto; }
  .page, .report-doc { width: 100%; padding: 16px; min-height: auto; }
  .q-nav .nav-item { width: 30px; height: 30px; }
}
