/* ==================== 打印 / 导出 PDF 专用样式（主站 style.css 与 m_teacher.html 共用同一份）====================
   从 style.css 的 @media print 段原样抽出（2026-10-09）。
   目的：老师表(m_teacher)导出 PDF 必须与主站导出「一模一样」——
        两边共用同一套 printRoot HTML 结构 + 同一份 CSS，不可能出现版式差异。
   修改打印版式时只改本文件，两边同时生效，勿各改一处。 */

/* ==================== 打印 / 导出 PDF 专用样式 ==================== */
/* 屏幕态：print-root 完全隐藏 */
.print-root{display:none}

/* 打印态：隐藏所有屏幕元素，仅渲染打印专用容器 */
@media print {
  /* @page：边距严格按需求 — 上20mm 下20mm 左10mm 右10mm */
  @page { size: A4 landscape; margin: 20mm 10mm 20mm 10mm; }
  @page :first { margin: 20mm 10mm 20mm 10mm; }
  /* 🔴🔴 10-10 两端一致性关键：根字号必须显式钉死为 16px。
     原因：下面 `.print-root th/td { font-size: inherit !important }` 让表格字号**继承根字号**，
     而老师算分工作台 m_teacher.html 屏幕态设了 `html,body{font-size:14px}`（移动端排版基准），
     电脑端 index.html 是浏览器默认 16px →
     同一份 printRoot HTML 在两端的表头/单元格字号被算成 6.56pt vs 6.75pt，
     逐页像素比对出现 8~11% 偏差（用户肉眼能看出「字体大小不太一样」）。
     打印态把根字号统一为 16px 即完全一致；屏幕态不受影响。 */
  html { font-size: 16px !important; }
  html, body { margin: 0; padding: 0; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact; }
  /* 🔴🔴 10-10 两端一致性关键（第 2 处）：把 body 的**背景绘制区域**彻底消除。
     症状：老师算分工作台 m_teacher.html 的 body 设了 `background:var(--bg)`（#eef1f8 浅灰），
     打印态下屏幕内容虽被 `body > *:not(.print-root){display:none}` 隐藏，
     但 body 自身仍带着高度与浅灰底 → Chromium 在内容区多画**一个白色/浅色填充矩形**
     （实测 rect = 28.5,57 → 813.72,539，正好是 @page 内容区），
     压在表格下面 → 逐页像素比对多出 8~11% 差异，且绘制对象数 1160 vs 电脑端 1159。
     解决：打印态把 body 背景设为 transparent（而非 #fff）+ 高度归零，两端绘制对象数即完全相等。
     电脑端不受影响（原本 body 在打印态高度就是 0）。 */
  body { background: transparent !important; height: auto !important; min-height: 0 !important; }
  body > *:not(.print-root) { display: none !important; }
  body.printing { background: transparent !important; padding: 0; }
  /* 📌 10-09 修：显示规则用 #printRoot id 选择器，不依赖 body.printing。
     原写法挂在 body.printing 上，而 afterprint / print 媒体变更会移除该类 ——
     典型踩坑：老师点「打印」后取消（或手机端导出 PDF），printing 类已被清掉，
     再次点击导出会得到全空白 PDF。id 选择器无状态依赖，任何时刻进入 print 媒体都能正常渲染。 */
  #printRoot { display: block !important; padding: 0; box-sizing: border-box; width: 100%; }

  .print-root { font-family: "Microsoft YaHei","PingFang SC",sans-serif; color: #1a2238; font-size: 9pt; line-height: 1.4; }

  /* CSS 重置继承：避免原主表的 th/td 大字号覆盖 */
  .print-root th, .print-root td, .print-root thead th, .print-root tbody td {
    font-size: inherit !important; font-weight: 400 !important; line-height: 1.3 !important;
  }
  .print-root * { box-sizing: border-box; }

  /* ==================== 通用 ==================== */
  a { color: inherit; text-decoration: none; }
  table { page-break-inside: auto; border-collapse: collapse !important; }
  tr { page-break-inside: avoid; page-break-after: auto; }
  .print-brand-bar { height: 6px; background: linear-gradient(90deg,#185fa5 0%,#378add 60%,#d85a30 100%); margin-bottom: 0; }

  /* 列精简：在 print 版中隐藏非关键列 */
  .print-hide-col { display: none !important; }

  /* ==================== 封面页 ==================== */
  .print-cover {
    page-break-after: always; break-after: page;
    padding: 0 4mm; position: relative; min-height: 155mm; height: 155mm;
    box-sizing: border-box; width: 100%;
  }
  .print-cover-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-22deg); font-size: 56pt; color: rgba(24,95,165,.07); font-weight: 700; letter-spacing: 8px; pointer-events: none; white-space: nowrap; z-index: 0; }
  .print-cover-inner { position: relative; z-index: 1; padding-top: 10mm; }
  .print-cover-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12mm; }
  .print-cover-logo { width: 30px; height: 30px; background: #185fa5; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16pt; font-weight: 700; }
  .print-cover-brand-name { font-size: 11pt; color: #185fa5; font-weight: 600; letter-spacing: 2px; }
  .print-cover-main { text-align: center; margin-bottom: 14mm; }
  .print-cover-eyebrow { font-size: 9pt; color: #888; letter-spacing: 6px; margin-bottom: 6mm; }
  .print-cover-title { font-size: 30pt; color: #185fa5; font-weight: 700; letter-spacing: 2px; line-height: 1.25; margin-bottom: 4mm; }
  .print-cover-subtitle { font-size: 13pt; color: #555; letter-spacing: 1px; }
  .print-cover-stu-card { border: 0.5px solid #c8d8e6; border-radius: 6px; padding: 5mm 6mm; margin: 0 auto; max-width: 150mm; background: #f5f9fd; display: grid; grid-template-columns: 1fr 1fr; column-gap: 8mm; row-gap: 3mm; }
  .print-cover-stu-row { display: flex; align-items: baseline; gap: 4mm; }
  /* 毕业高中独占一行：跨两列 */
  .print-cover-stu-row.print-cover-stu-full { grid-column: span 2; }
  .print-cover-stu-label { font-size: 10pt; color: #666; min-width: 22mm; flex: 0 0 auto; }
  .print-cover-stu-val { font-size: 12pt; color: #1a2238; font-weight: 600; }
  .print-cover-stu-val.hi { color: #185fa5; font-size: 14pt; font-weight: 700; }
  .print-cover-foot { position: absolute; bottom: 10mm; left: 4mm; right: 4mm; display: flex; justify-content: space-between; align-items: center; padding-top: 4mm; border-top: 0.5px solid #d8e3ef; font-size: 9pt; color: #666; }
  .print-cover-badge { display: inline-block; padding: 1.5mm 3mm; border-radius: 3mm; background: #fcecec; color: #a32d2d; font-size: 9pt; font-weight: 600; letter-spacing: 1px; }

  /* ==================== 主表页 ==================== */
  .print-pages { padding: 0; width: 100%; }
  .print-page-hdr { display: flex; justify-content: space-between; align-items: flex-start; padding: 0.6mm 0 1mm; border-bottom: 1.5px solid #185fa5; margin-bottom: 1.5mm; gap: 3mm; }
  .print-page-hdr-l { flex: 1; min-width: 0; }
  .print-page-hdr-brand { font-size: 6.5pt; color: #185fa5; font-weight: 600; letter-spacing: 2px; margin-bottom: 0.6mm; }
  .print-page-hdr-title { font-size: 11pt; color: #185fa5; font-weight: 700; letter-spacing: 1px; line-height: 1.15; margin-bottom: 1mm; }
  .print-page-hdr-stu { font-size: 7.5pt; color: #444; line-height: 1.3; }
  .print-page-hdr-stu b { color: #1a2238; font-weight: 600; }
  .print-page-hdr-warn { flex: 0 0 auto; max-width: 44mm; background: #fff8e6; border-left: 3px solid #d85a30; border-radius: 0 2px 2px 0; padding: 1mm 2mm; font-size: 6.5pt; color: #7a3a18; line-height: 1.3; }
  .print-page-hdr-warn b { display: block; color: #a32d2d; margin-bottom: 0.4mm; font-size: 7pt; letter-spacing: 1px; }

  /* 主表：用户要求"小五+每页多放学生"→ 字号 7pt（小五以下）+ 行高 8mm + 紧凑 padding */
  .print-body { margin-bottom: 2mm; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 6.6pt; table-layout: fixed; }
  .print-table th, .print-table td { border: 0.5px solid #d8e3ef; padding: 0.3mm 0.6mm; text-align: center; vertical-align: middle; line-height: 1.1; }
  /* 数据单元格：允许必要换行，但行内不硬塞 */
  .print-table tbody td { white-space: normal; word-break: break-all; word-wrap: break-word; }
  /* 表头：行高适中 + 内容自动换行 */
  .print-table thead th { background: #185fa5 !important; color: #fff !important; font-weight: 600 !important; font-size: 6.8pt !important; border: 0.5px solid #144a85; padding: 1.2mm 0.6mm; white-space: normal; word-break: keep-all; line-height: 1.15; height: auto !important; min-height: 4mm; }
  /* 主数据行：行高 4mm 内（长文本 2 行自动增高），配合 459 行 → ≈ 12 页 */
  .print-table tbody tr { page-break-inside: avoid; }
  .print-table tbody td { padding-top: 0.5mm; padding-bottom: 0.5mm; }
  /* 偶数行斑马纹：去掉 !important，让彩色徽章（b-star-*）的 background 优先级胜出 */
  .print-table tbody tr:nth-child(even) td { background: #f5f9fd; }
  .print-table td b { color: #185fa5; font-weight: 600; }
  /* 我的入围分：用户要求红色字体（醒目显示该生分数） */
  .print-table td.cell-mine { color: #d8233a !important; font-weight: 700 !important; font-size: 7.5pt !important; }
  /* 26入围分=0 时灰色 "无公示" */
  .print-table td.s-mute { color: #9aa3b2; font-style: italic; }
  /* 26入围建议徽章（不再内嵌 HTML，直接用 td class 控制样式）*/
  .print-table td.b-star-3, .print-table td.b-star-2, .print-table td.b-star-1, .print-table td.b-star-rw, .print-table td.b-none {
    font-weight: 700; color: #fff; padding: 0.3mm 0 !important;
  }
  .print-table td.b-star-3 { background: #a32d2d !important; }
  .print-table td.b-star-2 { background: #d85a30 !important; }
  .print-table td.b-star-1 { background: #378add !important; }
  .print-table td.b-star-rw { background: #1d9e75 !important; }
  .print-table td.b-none { background: #9aa3b2 !important; }
  /* 26校测形式：单列文字版，加粗让文字清晰（用户要求"文字要看清"）*/
  .print-table td[data-col="26校测形式"] { font-weight: 600; color: #185fa5; }
  /* 文理：读取原表数据，普通样式（与屏幕主表一致）*/
  /* 26入围建议徽章 */
  .print-table .badge { display: inline-block; padding: 0.3mm 1.2mm; border-radius: 2px; font-size: 6.5pt; font-weight: 700; color: #fff; letter-spacing: 0.2px; line-height: 1.1; white-space: nowrap; }
  .print-table .b-star-3 { background: #a32d2d; }
  .print-table .b-star-2 { background: #d85a30; }
  .print-table .b-star-1 { background: #378add; }
  .print-table .b-star-rw { background: #1d9e75; }
  .print-table .b-none { background: #9aa3b2; color: #fff; padding: 0.3mm 1.2mm; border-radius: 2px; font-size: 6.5pt; }

  /* ==================== 校测形式拆分4 列（红蓝绿橙底白字） ==================== */
  .print-table .xc-th { background: #185fa5 !important; }
  .print-table .xc-h-m { background: #a32d2d !important; }   /* 表头·面试：红 */
  .print-table .xc-h-b { background: #185fa5 !important; }   /* 表头·笔试：深蓝 */
  .print-table .xc-h-d { background: #1d9e75 !important; }   /* 表头·技能：绿 */
  .print-table .xc-h-h { background: #d85a30 !important; }   /* 表头·其他：橙 */
  .print-table .xc-cell { padding: 0.5mm 0 !important; text-align: center; vertical-align: middle; }
  .print-table .xc-pill { display: inline-block; width: 6mm; height: 3.6mm; line-height: 3.6mm; border-radius: 2px; font-size: 8pt; font-weight: 700; color: #fff; text-align: center; letter-spacing: 0; }
  .print-table .xc-pill-m { background: #a32d2d; }  /* 面试红 */
  .print-table .xc-pill-b { background: #185fa5; }  /* 笔试深蓝 */
  .print-table .xc-pill-d { background: #1d9e75; }  /* 技能绿 */
  .print-table .xc-pill-h { background: #d85a30; }  /* 其他橙 */
  .print-table .xc-no { color: #c8d1de; font-size: 8pt; }

  /* ==================== 末页：老师卡 ==================== */
  .print-endpage { page-break-before: always; break-before: page; padding: 0; min-height: 155mm; box-sizing: border-box; width: 100%; }
  .print-end-h2 { text-align: center; font-size: 20pt; color: #185fa5; margin: 4mm 0 2mm; letter-spacing: 2px; font-weight: 700; }
  .print-end-sub { text-align: center; font-size: 10pt; color: #666; margin-bottom: 5mm; letter-spacing: 1px; }
  .print-disclaim { font-size: 10pt; color: #3a2a18; background: linear-gradient(90deg,#fff8e6 0%,#fff 100%); border-left: 3px solid #d85a30; border-radius: 0 4px 4px 0; padding: 3mm 4mm; margin-bottom: 5mm; line-height: 1.7; }
  .print-disclaim b { color: #a32d2d; }
  .print-teacher-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 5mm; margin-bottom: 5mm; }
  .print-teacher-card { border: 0.5px solid #d8e3ef; border-radius: 4px; overflow: hidden; background: #fff; text-align: center; }
  .print-teacher-top { height: 4mm; background: linear-gradient(90deg,#185fa5,#378add); }
  .print-teacher-avatar { width: 22mm; height: 22mm; margin: -11mm auto 0; border-radius: 50%; background: #185fa5; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14pt; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(24,95,165,.2); }
  .print-teacher-name { font-size: 12pt; color: #1a2238; font-weight: 700; margin: 3mm 0 1mm; }
  .print-teacher-role { font-size: 8.5pt; color: #888; margin-bottom: 2mm; }
  .print-teacher-wx { display: inline-block; background: #f5f9fd; border: 0.5px solid #d8e3ef; border-radius: 3px; padding: 1mm 3mm; font-size: 8.5pt; color: #185fa5; font-family: Consolas,monospace; margin-bottom: 2mm; }
  .print-teacher-qr { width: 28mm; height: 28mm; margin: 0 auto 3mm; border: 0.5px solid #d8e3ef; border-radius: 3px; display: flex; align-items: center; justify-content: center; color: #9aa3b2; font-size: 7.5pt; background: #fff; overflow: hidden; }
  .print-teacher-qr img { width: 100%; height: 100%; object-fit: contain; display: block;
    /* 部分老师上传的二维码是深底浅块（反色），打印时变全黑——强制反色恢复白底深块可扫 */
    filter: invert(1);
  }
  .print-teacher-empty-body { padding: 18mm 4mm; text-align: center; color: #888; font-size: 11pt; line-height: 1.6; }
  .print-teacher-slogan { font-size: 8.5pt; color: #666; padding: 2mm 3mm 3mm; border-top: 0.5px solid #eef2f7; background: #fafbff; }
  .print-end-tip { text-align: center; font-size: 9pt; color: #888; margin-top: 4mm; padding-top: 3mm; border-top: 0.5px dashed #d8e3ef; }

  /* ==================== 页码：不再显示，让主表数据自然连续 ==================== */

/* ==================== html2canvas 截图态（仅 m_teacher 微信端导 PDF 用）====================
   html2canvas 要求元素在屏幕上真实可见且有尺寸，而 .print-root 屏幕态是 display:none。
   截图前临时给 html 加 .print-shooting 类：解除隐藏 + 按 A4 横向固定版式宽度。截完立刻移除。 */
.print-shooting, .print-shooting body { background:#fff !important; }
.print-shooting .print-root {
  display: block !important; position: absolute !important; left: 0; top: 0;
  width: 1123px !important; background:#fff; z-index: 99999;
}
.print-shooting #printRoot { display: block !important; }
.print-shooting body > *:not(.print-root) { visibility: hidden !important; }

/* ==================== 屏幕截图态镜像（html2canvas 用）====================
   ⚠️ 上面的打印规则全部包在 @media print 内，屏幕上一条都不生效；
      html2canvas 截图时若不补这份镜像，打印容器会退化成无样式的裸 HTML
      （表现为 canvas 高度塌陷 → 切页全为 0 → 只导出 1 页空白）。
   做法：把 @media print 内的规则逐条加上 .print-shooting 前缀，在截图期间生效；
   截完移除该类即失效，不影响任何屏幕显示。
   规则由 print.css 自动镜像生成，请勿手工编辑本段。*/
.print-shooting #printRoot { display: block !important; }

  /* @page：边距严格按需求 — 上20mm 下20mm 左10mm 右10mm */
  html, body { margin: 0; padding: 0; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; color-adjust: exact; }
  body > *:not(.print-root) { display: none !important; }
  body.printing { background: #fff !important; padding: 0; }
  /* 📌 10-09 修：显示规则用 #printRoot id 选择器，不依赖 body.printing。
     原写法挂在 body.printing 上，而 afterprint / print 媒体变更会移除该类 ——
     典型踩坑：老师点「打印」后取消（或手机端导出 PDF），printing 类已被清掉，
     再次点击导出会得到全空白 PDF。id 选择器无状态依赖，任何时刻进入 print 媒体都能正常渲染。 */
  #printRoot { display: block !important; padding: 0; box-sizing: border-box; width: 100%; }

  .print-root { font-family: "Microsoft YaHei","PingFang SC",sans-serif; color: #1a2238; font-size: 9pt; line-height: 1.4; }

  /* CSS 重置继承：避免原主表的 th/td 大字号覆盖 */
  .print-shooting .print-root th, .print-shooting .print-root td, .print-shooting .print-root thead th, .print-shooting .print-root tbody td {
    font-size: inherit !important; font-weight: 400 !important; line-height: 1.3 !important;
  }
  .print-root * { box-sizing: border-box; }

  /* ==================== 通用 ==================== */
  a { color: inherit; text-decoration: none; }
  table { page-break-inside: auto; border-collapse: collapse !important; }
  tr { page-break-inside: avoid; page-break-after: auto; }
  .print-brand-bar { height: 6px; background: linear-gradient(90deg,#185fa5 0%,#378add 60%,#d85a30 100%); margin-bottom: 0; }

  /* 列精简：在 print 版中隐藏非关键列 */
  .print-hide-col { display: none !important; }

  /* ==================== 封面页 ==================== */
  .print-shooting .print-cover {
    page-break-after: always; break-after: page;
    padding: 0 4mm; position: relative; min-height: 155mm; height: 155mm;
    box-sizing: border-box; width: 100%;
  }
  .print-cover-watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%) rotate(-22deg); font-size: 56pt; color: rgba(24,95,165,.07); font-weight: 700; letter-spacing: 8px; pointer-events: none; white-space: nowrap; z-index: 0; }
  .print-cover-inner { position: relative; z-index: 1; padding-top: 10mm; }
  .print-cover-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 12mm; }
  .print-cover-logo { width: 30px; height: 30px; background: #185fa5; border-radius: 7px; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 16pt; font-weight: 700; }
  .print-cover-brand-name { font-size: 11pt; color: #185fa5; font-weight: 600; letter-spacing: 2px; }
  .print-cover-main { text-align: center; margin-bottom: 14mm; }
  .print-cover-eyebrow { font-size: 9pt; color: #888; letter-spacing: 6px; margin-bottom: 6mm; }
  .print-cover-title { font-size: 30pt; color: #185fa5; font-weight: 700; letter-spacing: 2px; line-height: 1.25; margin-bottom: 4mm; }
  .print-cover-subtitle { font-size: 13pt; color: #555; letter-spacing: 1px; }
  .print-cover-stu-card { border: 0.5px solid #c8d8e6; border-radius: 6px; padding: 5mm 6mm; margin: 0 auto; max-width: 150mm; background: #f5f9fd; display: grid; grid-template-columns: 1fr 1fr; column-gap: 8mm; row-gap: 3mm; }
  .print-cover-stu-row { display: flex; align-items: baseline; gap: 4mm; }
  /* 毕业高中独占一行：跨两列 */
  .print-cover-stu-row.print-cover-stu-full { grid-column: span 2; }
  .print-cover-stu-label { font-size: 10pt; color: #666; min-width: 22mm; flex: 0 0 auto; }
  .print-cover-stu-val { font-size: 12pt; color: #1a2238; font-weight: 600; }
  .print-cover-stu-val.hi { color: #185fa5; font-size: 14pt; font-weight: 700; }
  .print-cover-foot { position: absolute; bottom: 10mm; left: 4mm; right: 4mm; display: flex; justify-content: space-between; align-items: center; padding-top: 4mm; border-top: 0.5px solid #d8e3ef; font-size: 9pt; color: #666; }
  .print-cover-badge { display: inline-block; padding: 1.5mm 3mm; border-radius: 3mm; background: #fcecec; color: #a32d2d; font-size: 9pt; font-weight: 600; letter-spacing: 1px; }

  /* ==================== 主表页 ==================== */
  .print-pages { padding: 0; width: 100%; }
  .print-page-hdr { display: flex; justify-content: space-between; align-items: flex-start; padding: 0.6mm 0 1mm; border-bottom: 1.5px solid #185fa5; margin-bottom: 1.5mm; gap: 3mm; }
  .print-page-hdr-l { flex: 1; min-width: 0; }
  .print-page-hdr-brand { font-size: 6.5pt; color: #185fa5; font-weight: 600; letter-spacing: 2px; margin-bottom: 0.6mm; }
  .print-page-hdr-title { font-size: 11pt; color: #185fa5; font-weight: 700; letter-spacing: 1px; line-height: 1.15; margin-bottom: 1mm; }
  .print-page-hdr-stu { font-size: 7.5pt; color: #444; line-height: 1.3; }
  .print-page-hdr-stu b { color: #1a2238; font-weight: 600; }
  .print-page-hdr-warn { flex: 0 0 auto; max-width: 44mm; background: #fff8e6; border-left: 3px solid #d85a30; border-radius: 0 2px 2px 0; padding: 1mm 2mm; font-size: 6.5pt; color: #7a3a18; line-height: 1.3; }
  .print-page-hdr-warn b { display: block; color: #a32d2d; margin-bottom: 0.4mm; font-size: 7pt; letter-spacing: 1px; }

  /* 主表：用户要求"小五+每页多放学生"→ 字号 7pt（小五以下）+ 行高 8mm + 紧凑 padding */
  .print-body { margin-bottom: 2mm; }
  .print-table { width: 100%; border-collapse: collapse; font-size: 6.6pt; table-layout: fixed; }
  .print-table th, .print-table td { border: 0.5px solid #d8e3ef; padding: 0.3mm 0.6mm; text-align: center; vertical-align: middle; line-height: 1.1; }
  /* 数据单元格：允许必要换行，但行内不硬塞 */
  .print-table tbody td { white-space: normal; word-break: break-all; word-wrap: break-word; }
  /* 表头：行高适中 + 内容自动换行 */
  .print-table thead th { background: #185fa5 !important; color: #fff !important; font-weight: 600 !important; font-size: 6.8pt !important; border: 0.5px solid #144a85; padding: 1.2mm 0.6mm; white-space: normal; word-break: keep-all; line-height: 1.15; height: auto !important; min-height: 4mm; }
  /* 主数据行：行高 4mm 内（长文本 2 行自动增高），配合 459 行 → ≈ 12 页 */
  .print-table tbody tr { page-break-inside: avoid; }
  .print-table tbody td { padding-top: 0.5mm; padding-bottom: 0.5mm; }
  /* 偶数行斑马纹：去掉 !important，让彩色徽章（b-star-*）的 background 优先级胜出 */
  .print-table tbody tr:nth-child(even) td { background: #f5f9fd; }
  .print-table td b { color: #185fa5; font-weight: 600; }
  /* 我的入围分：用户要求红色字体（醒目显示该生分数） */
  .print-table td.cell-mine { color: #d8233a !important; font-weight: 700 !important; font-size: 7.5pt !important; }
  /* 26入围分=0 时灰色 "无公示" */
  .print-table td.s-mute { color: #9aa3b2; font-style: italic; }
  /* 26入围建议徽章（不再内嵌 HTML，直接用 td class 控制样式）*/
  .print-shooting .print-table td.b-star-3, .print-shooting .print-table td.b-star-2, .print-shooting .print-table td.b-star-1, .print-shooting .print-table td.b-star-rw, .print-shooting .print-table td.b-none {
    font-weight: 700; color: #fff; padding: 0.3mm 0 !important;
  }
  .print-table td.b-star-3 { background: #a32d2d !important; }
  .print-table td.b-star-2 { background: #d85a30 !important; }
  .print-table td.b-star-1 { background: #378add !important; }
  .print-table td.b-star-rw { background: #1d9e75 !important; }
  .print-table td.b-none { background: #9aa3b2 !important; }
  /* 26校测形式：单列文字版，加粗让文字清晰（用户要求"文字要看清"）*/
  .print-table td[data-col="26校测形式"] { font-weight: 600; color: #185fa5; }
  /* 文理：读取原表数据，普通样式（与屏幕主表一致）*/
  /* 26入围建议徽章 */
  .print-table .badge { display: inline-block; padding: 0.3mm 1.2mm; border-radius: 2px; font-size: 6.5pt; font-weight: 700; color: #fff; letter-spacing: 0.2px; line-height: 1.1; white-space: nowrap; }
  .print-table .b-star-3 { background: #a32d2d; }
  .print-table .b-star-2 { background: #d85a30; }
  .print-table .b-star-1 { background: #378add; }
  .print-table .b-star-rw { background: #1d9e75; }
  .print-table .b-none { background: #9aa3b2; color: #fff; padding: 0.3mm 1.2mm; border-radius: 2px; font-size: 6.5pt; }

  /* ==================== 校测形式拆分4 列（红蓝绿橙底白字） ==================== */
  .print-table .xc-th { background: #185fa5 !important; }
  .print-table .xc-h-m { background: #a32d2d !important; }   /* 表头·面试：红 */
  .print-table .xc-h-b { background: #185fa5 !important; }   /* 表头·笔试：深蓝 */
  .print-table .xc-h-d { background: #1d9e75 !important; }   /* 表头·技能：绿 */
  .print-table .xc-h-h { background: #d85a30 !important; }   /* 表头·其他：橙 */
  .print-table .xc-cell { padding: 0.5mm 0 !important; text-align: center; vertical-align: middle; }
  .print-table .xc-pill { display: inline-block; width: 6mm; height: 3.6mm; line-height: 3.6mm; border-radius: 2px; font-size: 8pt; font-weight: 700; color: #fff; text-align: center; letter-spacing: 0; }
  .print-table .xc-pill-m { background: #a32d2d; }  /* 面试红 */
  .print-table .xc-pill-b { background: #185fa5; }  /* 笔试深蓝 */
  .print-table .xc-pill-d { background: #1d9e75; }  /* 技能绿 */
  .print-table .xc-pill-h { background: #d85a30; }  /* 其他橙 */
  .print-table .xc-no { color: #c8d1de; font-size: 8pt; }

  /* ==================== 末页：老师卡 ==================== */
  .print-endpage { page-break-before: always; break-before: page; padding: 0; min-height: 155mm; box-sizing: border-box; width: 100%; }
  .print-end-h2 { text-align: center; font-size: 20pt; color: #185fa5; margin: 4mm 0 2mm; letter-spacing: 2px; font-weight: 700; }
  .print-end-sub { text-align: center; font-size: 10pt; color: #666; margin-bottom: 5mm; letter-spacing: 1px; }
  .print-disclaim { font-size: 10pt; color: #3a2a18; background: linear-gradient(90deg,#fff8e6 0%,#fff 100%); border-left: 3px solid #d85a30; border-radius: 0 4px 4px 0; padding: 3mm 4mm; margin-bottom: 5mm; line-height: 1.7; }
  .print-disclaim b { color: #a32d2d; }
  .print-teacher-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 5mm; margin-bottom: 5mm; }
  .print-teacher-card { border: 0.5px solid #d8e3ef; border-radius: 4px; overflow: hidden; background: #fff; text-align: center; }
  .print-teacher-top { height: 4mm; background: linear-gradient(90deg,#185fa5,#378add); }
  .print-teacher-avatar { width: 22mm; height: 22mm; margin: -11mm auto 0; border-radius: 50%; background: #185fa5; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 14pt; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 4px rgba(24,95,165,.2); }
  .print-teacher-name { font-size: 12pt; color: #1a2238; font-weight: 700; margin: 3mm 0 1mm; }
  .print-teacher-role { font-size: 8.5pt; color: #888; margin-bottom: 2mm; }
  .print-teacher-wx { display: inline-block; background: #f5f9fd; border: 0.5px solid #d8e3ef; border-radius: 3px; padding: 1mm 3mm; font-size: 8.5pt; color: #185fa5; font-family: Consolas,monospace; margin-bottom: 2mm; }
  .print-teacher-qr { width: 28mm; height: 28mm; margin: 0 auto 3mm; border: 0.5px solid #d8e3ef; border-radius: 3px; display: flex; align-items: center; justify-content: center; color: #9aa3b2; font-size: 7.5pt; background: #fff; overflow: hidden; }
  .print-teacher-qr img { width: 100%; height: 100%; object-fit: contain; display: block;
    /* 部分老师上传的二维码是深底浅块（反色），打印时变全黑——强制反色恢复白底深块可扫 */
    filter: invert(1);
  }
  .print-teacher-empty-body { padding: 18mm 4mm; text-align: center; color: #888; font-size: 11pt; line-height: 1.6; }
  .print-teacher-slogan { font-size: 8.5pt; color: #666; padding: 2mm 3mm 3mm; border-top: 0.5px solid #eef2f7; background: #fafbff; }
  .print-end-tip { text-align: center; font-size: 9pt; color: #888; margin-top: 4mm; padding-top: 3mm; border-top: 0.5px dashed #d8e3ef; }

  /* ==================== 页码：不再显示，让主表数据自然连续 ==================== */

/* ==================== html2canvas 截图态（仅 m_teacher 微信端导 PDF 用）====================
   html2canvas 要求元素在屏幕上真实可见且有尺寸，而 .print-root 屏幕态是 display:none。
   截图前临时给 html 加 .print-shooting 类：解除隐藏 + 按 A4 横向固定版式宽度。截完立刻移除。 */
.print-shooting, .print-shooting body { background:#fff !important; }
.print-shooting .print-shooting .print-root {
  display: block !important; position: absolute !important; left: 0; top: 0;
  width: 1123px !important; background:#fff; z-index: 99999;
}
.print-shooting #printRoot { display: block !important; }
.print-shooting body > *:not(.print-root) { visibility: hidden !important; 
