/* 结果中心专用样式，配合 core.css 使用 */

/* ---- 页头右侧的数据范围提示。三种角色同一个页面，得随时看得见自己在看哪一片 ---- */
.scope-chip {
  display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 10px;
  border: 1px solid #d5e8fb; border-radius: 13px; background: #f2f8ff;
  color: var(--primary-deep); font-size: 12px;
}
.scope-chip b { font-weight: 600; }

#mode-note { margin-bottom: 14px; }

.filter-bar .grade-picks {
  display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px;
}
.filter-bar .grade-picks button {
  height: 28px; padding: 0 10px; border: 1px solid var(--border); border-radius: 14px;
  background: #fff; color: var(--sub); font-size: 12px; cursor: pointer;
}
.filter-bar .grade-picks button:hover { border-color: var(--primary); color: var(--primary); }
.filter-bar .grade-picks button.on {
  border-color: var(--primary); background: #eaf5ff; color: var(--primary-deep); font-weight: 600;
}

/* ---- 视图切换 ---- */
.view-seg { display: flex; gap: 8px; margin-bottom: 14px; }
.view-seg button {
  height: 34px; padding: 0 16px; border: 1px solid var(--border); border-radius: 4px;
  background: #fff; color: var(--sub); cursor: pointer; font-size: 13px;
}
.view-seg button:hover { color: var(--primary); border-color: var(--primary); }
.view-seg button.on { color: #fff; background: var(--primary); border-color: var(--primary); }
.view-seg button b { margin-left: 6px; font-weight: 600; }

/* ---- 判定图例 ---- */
.lv-legend {
  display: flex; align-items: center; flex-wrap: wrap; gap: 8px 18px;
  padding: 10px 16px; border-bottom: 1px solid var(--border); background: #fcfdfe;
  color: var(--muted); font-size: 12px;
}
.lv-legend .lg { display: inline-flex; align-items: center; gap: 6px; }
.lv-legend .sw {
  width: 20px; height: 14px; border-radius: 3px; border: 1px solid rgba(0, 0, 0, .05);
}
.lv-legend .grow { margin-left: auto; }

/* ---- 结果表 ---- */
.res-table td, .res-table th { vertical-align: middle; }
.res-table td { height: 58px; }
.res-table .stu-name { color: var(--text); font-weight: 500; }
.res-table .stu-sub { margin-top: 2px; color: var(--light); font-size: 12px; }
.res-table .where { color: var(--sub); }
.res-table .where small { display: block; margin-top: 2px; color: var(--light); font-size: 12px; }

/* 五项结果：一格里五个等宽小块，颜色即判定。悬停出全称与结论 */
.item-row { display: flex; gap: 4px; }
.item-cell {
  flex: 1; min-width: 0; height: 26px; display: grid; place-items: center;
  border-radius: 3px; font-size: 12px; white-space: nowrap; cursor: default;
  border: 1px solid transparent;
}
.item-cell.k-normal { color: #0f9b56; background: #e8f7ef; border-color: #cdeedd; }
.item-cell.k-attention { color: var(--primary-deep); background: #eaf5ff; border-color: #cfe4fb; }
.item-cell.k-risk { color: #d98200; background: #fff4e6; border-color: #ffe0b2; }
.item-cell.k-high { color: var(--danger); background: #fff1f0; border-color: #ffcdc7; }
.item-cell.k-unknown,
.item-cell.k-done { color: var(--sub); background: #f2f3f5; border-color: #e6e8eb; }
.item-cell.k-missed {
  color: var(--danger); background: #fff5f4; border-color: #ffcdc7; font-weight: 600;
}
.item-cell.k-pending { color: var(--light); background: #fafbfc; border-color: #eef0f2; }

.res-table .n-focus { color: var(--text); font-weight: 600; }
.res-table .n-focus.zero { color: var(--light); font-weight: 400; }
.res-table .n-retest { color: var(--danger); font-weight: 600; }
.res-table .n-retest.zero { color: var(--light); font-weight: 400; }
.res-table .pub-at { margin-top: 2px; color: var(--light); font-size: 12px; }
.res-table .act-text { color: var(--light); font-size: 12px; }
/*
 * 操作列的两个动作（查看详情 / 筛查报告）竖排。
 * 并排放不下：.table-action 是无边框文字按钮，两个各约 68px，
 * 在 11% 的列宽里会折成参差的两行，竖排反而整齐且不受表格总宽影响。
 */
.res-table .act-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.res-table .act-stack .table-action { padding: 1px 0; white-space: nowrap; }
.res-table tr.is-sel td { background: #f5faff; }

/* ---- 汇总表（平台侧的机构产出 / 学校积压） ---- */
.board-table td { height: 56px; }
.board-table .b-name { color: var(--text); font-weight: 500; }
.board-table .b-sub { margin-top: 2px; color: var(--light); font-size: 12px; }
.board-table tr.is-idle td { background: #fcfcfd; }
.board-table tr.is-idle .b-name { color: var(--muted); font-weight: 400; }
.board-table .rate-cell { display: flex; align-items: center; gap: 9px; }
.board-table .rate-cell strong { color: var(--text); font-weight: 600; font-size: 13px; min-width: 44px; }
.board-table .zero { color: var(--light); }

/* 计划表的操作列有两个动作，竖着排 —— 横排会被「整批发布 24 份」挤到换行 */
.board-table .act-col { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }

/* 已发布 / 待发布 / 筛查中的堆叠条，一眼看出这所学校卡在哪一段 */
.mix-bar {
  display: flex; height: 8px; border-radius: 5px; overflow: hidden;
  background: #f0f0f0; margin-bottom: 6px;
}
.mix-bar i { display: block; height: 100%; }
.mix-bar i.s-published { background: var(--success); }
.mix-bar i.s-reviewing { background: var(--warn); }
.mix-bar i.s-screening { background: var(--primary); }
.mix-bar i.s-none { background: #dcdee2; }
.mix-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--muted); font-size: 12px; }
.mix-legend em { font-style: normal; color: var(--text); font-weight: 600; }

/* ---- 报告抽屉 ---- */
.rp-drawer .sec { padding: 14px 0; border-top: 1px solid var(--border); }
.rp-drawer .sec:first-child { border-top: 0; padding-top: 0; }
.rp-drawer .sec > h3 { margin: 0 0 10px; color: var(--text); font-size: 15px; font-weight: 600; }
.rp-head {
  padding: 14px 16px; border-radius: 8px; background: var(--body);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.rp-head h2 { margin: 0; color: var(--text); font-size: 16px; }
.rp-head .sub { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.rp-head .right { text-align: right; flex: none; }
.rp-head .right .k { color: var(--muted); font-size: 12px; }
.rp-head .right .v { margin-top: 3px; color: var(--text); font-size: 14px; font-weight: 600; }

.rp-table { width: 100%; border-collapse: collapse; }
.rp-table th {
  height: 36px; padding: 0 10px; text-align: left; background: #f8f8f9;
  border-bottom: 1px solid var(--border); color: var(--sub); font-size: 13px; font-weight: 500;
}
.rp-table td {
  padding: 10px; border-bottom: 1px solid #f0f0f0; font-size: 13px; vertical-align: top;
}
.rp-table tr:last-child td { border-bottom: 0; }
.rp-table .i-name { color: var(--text); font-weight: 500; }
.rp-table .vals { color: var(--sub); line-height: 1.8; }
.rp-table .vals span { color: var(--muted); }
.rp-table .vals b { color: var(--text); font-weight: 600; }
/*
 * 判定档位的名字很长（「健康风险提示·建议复检」），抽屉里这一列摆不下一行。
 * .tag 默认定高 + inline-flex，长文案会溢出成两截色块，所以这里放开高度让它换行。
 */
.rp-table .tag {
  height: auto; min-height: 21px; padding: 3px 7px;
  white-space: normal; line-height: 1.5; text-align: center;
}
.rp-table .advice { margin-top: 4px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.rp-table tr.is-pending td { background: #fcfcfd; }
