/* 批量导出学生报告（teacher/admin）——三步：选学科 → 选班级 → 打印全班/勾选学生 → 合并生成 PDF。
   仅前端；渲染复用现有报告打印（analysis 引擎）。合并一份 PDF 有性能上限，超 20 人自动分多份。配色平台蓝 #4f7df3。 */

.br-shell {
  max-width: 940px;
  margin: 0 auto;
  padding: 26px 20px 96px;
}

.br-head { margin: 6px 0 18px; }
.br-head h1 {
  font-size: 25px;
  font-weight: 900;
  color: #1f2a3a;
  margin: 0;
  letter-spacing: -0.01em;
}
.br-head p {
  margin: 8px 0 0;
  color: #5b6b82;
  font-size: 13.5px;
  line-height: 1.7;
  max-width: 70ch;
}

/* 分步卡 */
.br-step {
  background: #fff;
  border: 1px solid #e9eef5;
  border-radius: 16px;
  padding: 18px 20px 20px;
  margin-top: 14px;
  box-shadow: 0 1px 2px rgba(20, 36, 64, 0.03);
}
.br-step[hidden] { display: none; }
.br-step__h { display: flex; align-items: center; gap: 10px; margin-bottom: 15px; }
.br-step__n {
  flex: 0 0 auto;
  width: 25px; height: 25px;
  border-radius: 50%;
  background: #4f7df3;
  color: #fff;
  font-size: 13px; font-weight: 900;
  display: grid; place-items: center;
}
.br-step__t { font-size: 15.5px; font-weight: 800; color: #1f2a3a; }
.br-step__hint { margin-left: auto; font-size: 12px; color: #93a1b6; font-weight: 600; }

/* 通用 chips：学科 / 班级 */
.br-chips { display: flex; flex-wrap: wrap; gap: 10px; }
.br-chip {
  appearance: none;
  border: 1.5px solid #dbe6f3;
  background: #f7fafc;
  color: #3e4d64;
  font: inherit;
  font-size: 14px; font-weight: 800;
  padding: 9px 18px;
  border-radius: 999px;
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s, box-shadow .15s;
  white-space: nowrap;
}
.br-chip:hover { border-color: #b9d0ee; background: #f2f7fd; }
.br-chip[aria-pressed="true"] {
  border-color: #4f7df3;
  background: #eef3fe;
  color: #2a4aa8;
  box-shadow: 0 0 0 3px rgba(79, 125, 243, 0.12);
}
.br-chip .br-chip__n {
  margin-left: 7px;
  font-size: 12px; font-weight: 700;
  color: #93a1b6;
  font-variant-numeric: tabular-nums;
}
.br-chip[aria-pressed="true"] .br-chip__n { color: #6d8fe6; }

/* 学生选择工具条 */
.br-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.br-allclass {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13.5px; font-weight: 800; color: #2a4aa8;
  background: #eef3fe; border: 1.5px solid #cfe0fb;
  border-radius: 10px; padding: 8px 14px; cursor: pointer; user-select: none;
  transition: border-color .15s, background .15s;
}
.br-allclass:hover { border-color: #a9c8f6; }
.br-allclass input { width: 16px; height: 16px; accent-color: #4f7df3; cursor: pointer; }
.br-tools__btn {
  appearance: none; border: 1px solid #dbe6f3; background: #fff; color: #3a4a63;
  font: inherit; font-size: 13px; font-weight: 700; padding: 8px 14px; border-radius: 9px; cursor: pointer;
  transition: border-color .15s, background .15s;
}
.br-tools__btn:hover { border-color: #b9d0ee; background: #f7fafc; }
.br-count { margin-left: auto; font-size: 13.5px; font-weight: 800; color: #3a4a63; font-variant-numeric: tabular-nums; }
.br-count b { color: #4f7df3; }
.br-count .br-count__split { color: #93a1b6; font-weight: 700; }

/* 学生网格 */
.br-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 8px;
  max-height: 420px;
  overflow-y: auto;
  padding: 2px;
}
.br-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 11px;
  border: 1px solid #e6ecf3;
  border-radius: 10px;
  cursor: pointer; background: #fff;
  transition: border-color .12s, background .12s;
  user-select: none;
}
.br-opt:hover { border-color: #c7dbf5; background: #fafcff; }
.br-opt.is-checked { border-color: #9fc0f5; background: #eef3fe; }
.br-opt input { flex: 0 0 auto; width: 16px; height: 16px; accent-color: #4f7df3; cursor: pointer; }
.br-opt__id {
  font-size: 13px; font-weight: 700; color: #26374f;
  font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 动作条 */
.br-actions {
  position: sticky; bottom: 14px;
  display: flex; align-items: center; gap: 16px;
  margin-top: 18px; padding: 14px 18px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border: 1px solid #e6ecf3; border-radius: 14px;
  box-shadow: 0 10px 30px rgba(20, 36, 64, 0.10);
}
.br-actions__hint {
  font-size: 12.5px; color: #6a7a92; line-height: 1.5; max-width: 62ch;
}
.br-generate {
  margin-left: auto; appearance: none; border: 0;
  background: #4f7df3; color: #fff; font: inherit;
  font-size: 14.5px; font-weight: 800; padding: 12px 24px; border-radius: 11px; cursor: pointer;
  white-space: nowrap;
  transition: background .15s, box-shadow .15s, transform .05s;
  box-shadow: 0 6px 16px rgba(79, 125, 243, 0.28);
}
.br-generate:hover:not(:disabled) { background: #3f6ae0; }
.br-generate:active:not(:disabled) { transform: translateY(1px); }
.br-generate:disabled { background: #c3cedd; box-shadow: none; cursor: not-allowed; }

/* 进度 */
.br-progress { margin-top: 16px; background: #fff; border: 1px solid #e6ecf3; border-radius: 14px; padding: 16px 18px; }
.br-progress[hidden] { display: none; }
.br-progress__row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 9px; }
.br-progress__label { font-size: 13.5px; font-weight: 800; color: #26374f; }
.br-progress__count { font-size: 13px; font-weight: 800; color: #4f7df3; font-variant-numeric: tabular-nums; }
.br-progress__track { height: 8px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.br-progress__bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #7aa0f7, #4f7df3); transition: width .3s ease; }
.br-progress.is-indeterminate .br-progress__bar { width: 40%; animation: brIndeterminate 1.1s ease-in-out infinite; }
@keyframes brIndeterminate { 0% { margin-left: -40%; } 100% { margin-left: 100%; } }

/* 空态 */
.br-empty { padding: 22px 8px; color: #93a1b6; font-size: 13.5px; font-weight: 600; }

@media (max-width: 560px) {
  .br-actions { flex-direction: column; align-items: stretch; }
  .br-generate { margin-left: 0; }
  .br-count { margin-left: 0; }
  .br-grid { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
}
