/* Orbit.performance-sheet — 月度绩效评分表的版式样式（员工信息块 / 考评人摘要 / 分节考核点卡 / 最终结果块）。
   与 apps/web/modules/hr/performance/styles.css 的同一段规则同源：两个页面共用这一份，
   主站看板「我的绩效考核」与 HR 模块的评分表才会长得一模一样。改样式只改这个文件。 */
.performance-template-preview { margin: 14px 16px 16px; padding: 16px; border: 1px solid var(--accent-dim); border-radius: 12px; background: var(--sidebar-bg); }
.performance-template-preview h4 { margin: 0 0 6px; color: var(--bad-text); }
.performance-template-preview > p { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.performance-template-meta { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 9px; overflow: hidden; background: var(--bg); }
.performance-template-meta div { padding: 8px 10px; border-right: 1px solid var(--line); font-size: 12px; }
.performance-template-meta div:last-child { border-right: 0; }
.performance-template-meta strong { display: block; color: var(--ink); }
.performance-template-table { width: 100%; margin-top: 12px; border-collapse: collapse; background: var(--bg); font-size: 12px; }
.performance-template-table th, .performance-template-table td { padding: 8px; border: 1px solid var(--line); vertical-align: top; text-align: left; line-height: 1.5; }
.performance-template-table .template-section td { background: var(--surface-band); color: var(--on-inverse); font-weight: 700; }
.performance-template-table .template-score { text-align: center; white-space: nowrap; font-weight: 700; }
.performance-template-rule { margin-top: 12px; padding: 10px 12px; border-radius: 8px; background: var(--bad-bg); color: var(--bad-text); font-size: 13px; line-height: 1.6; }
.performance-template-score-sheet { margin: 0 16px 16px; }
.performance-template-library-controls { display: grid; grid-template-columns: minmax(220px, 320px) minmax(280px, 380px) minmax(0, 1fr); gap: 12px; align-items: end; margin: 16px; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-muted); }
.performance-template-library-controls label { display: grid; gap: 6px; color: var(--text-soft); font-size: 13px; font-weight: 700; }
.performance-template-library-controls select { min-height: 38px; font: inherit; }
.performance-template-profile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; color: var(--text-soft); font-size: 13px; }
.performance-template-profile strong { color: var(--ink); }
.performance-template-profile small { flex-basis: 100%; color: var(--muted); line-height: 1.5; }
/* 模板库的操作行与设置表单：两者都横跨整个网格，否则会被塞进上面那三列的窄格里。 */
.performance-template-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.performance-template-settings { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; align-items: end; margin: 0; padding: 12px; border: 1px dashed var(--line-strong, var(--line)); border-radius: 10px; background: var(--bg); }
.performance-template-settings input, .performance-template-settings select { min-height: 38px; font: inherit; padding: 0 10px; }
.performance-template-settings-actions { grid-column: 1 / -1; display: flex; gap: 8px; }
/* 这两个块是 .performance-template-library-controls 的网格子项，
   一旦给了 display 就会盖掉浏览器对 [hidden] 的默认 display:none，所以必须显式关掉。 */
.performance-template-actions[hidden], .performance-template-settings[hidden] { display: none; }
.performance-template-score-sheet h4 { margin: 0; color: var(--bad-text); }
.performance-template-score-sheet .template-score-actions { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 10px 0; }
.performance-template-score-sheet select, .performance-template-score-sheet textarea, .my-perf-sheet select, .my-perf-sheet textarea { width: 100%; min-width: 92px; font: inherit; }
.performance-template-score-sheet textarea, .my-perf-sheet textarea { min-height: 58px; resize: vertical; }
.performance-template-score-sheet .template-final { text-align: center; font-weight: 700; color: var(--bad-text); }
.performance-template-score-sheet .template-total, .template-total { display: flex; justify-content: flex-end; gap: 8px; align-items: baseline; margin: 12px 0; font-size: 14px; }
.performance-template-score-sheet .template-total strong, .my-perf-sheet .template-total strong { color: var(--bad-text); font-size: 24px; }
.template-score-block { margin-top: 16px; }
.template-score-block h5 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0; padding: 9px 12px; border-radius: 8px 8px 0 0; background: linear-gradient(135deg, var(--accent), var(--bad)); color: var(--on-accent); font-size: 14px; }
.performance-section-title { min-width: 0; flex: 1 1 auto; }
.performance-section-header-actions, .template-criterion-actions { display: inline-flex; align-items: center; gap: 6px; }
.performance-section-fold { display: grid; width: 30px; min-width: 30px; height: 30px; min-height: 30px; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: rgb(var(--inverse-rgb) / .82); box-shadow: none; }
.performance-section-fold:hover, .performance-section-fold:focus-visible { border-color: transparent; background: rgb(var(--inverse-rgb) / .16); color: var(--on-accent); transform: none; }
.performance-section-fold svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s ease; }
.template-score-block.is-collapsed .performance-section-fold svg { transform: rotate(-90deg); }
.template-score-block.is-collapsed > :not(h5) { display: none; }
.template-criterion-add { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgb(var(--inverse-rgb) / .52); border-radius: 6px; background: rgb(var(--inverse-rgb) / .12); color: var(--on-accent); font-size: 12px; font-weight: 600; }
.template-criterion-add:hover { border-color: var(--on-accent); background: rgb(var(--inverse-rgb) / .22); }
.template-criterion-remove { flex: 0 0 auto; padding: 4px 8px; border: 1px solid rgb(var(--accent-soft-rgb) / .7); border-radius: 6px; background: rgb(var(--bad-rgb) / .42); color: var(--on-accent); font-size: 12px; font-weight: 600; }
.template-criterion-remove:hover { border-color: var(--on-accent); background: rgb(var(--bad-rgb) / .72); }
.template-score-block .performance-template-meta { border-radius: 0 0 9px 9px; }
.template-score-block .performance-template-table th:first-child { min-width: 300px; }
.template-score-card-list { display: grid; gap: 10px; padding: 10px; border: 1px solid var(--line); border-top: 0; border-radius: 0 0 9px 9px; background: var(--bg); }
.template-score-card { overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); box-shadow: 0 2px 8px rgb(var(--overlay-rgb) / .07); }
.template-score-card.is-selected { border-color: var(--accent); box-shadow: 0 0 0 2px rgb(var(--bad-rgb) / .14), 0 3px 10px rgb(var(--overlay-rgb) / .09); }
.template-score-card > header { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto 30px; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-muted); }
.template-score-index { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; background: var(--accent-soft); color: var(--bad); font-size: 12px; font-weight: 700; }
.template-score-card > header strong { display: block; color: var(--ink); font-size: 15px; }
.template-score-card > header small { display: block; margin-top: 2px; color: var(--disabled-text); font-size: 12px; }
.template-score-card > header b { color: var(--bad); font-size: 20px; }
.template-score-card > header em { margin-left: 2px; font-size: 12px; font-style: normal; font-weight: 400; }
.performance-criterion-fold { display: grid; width: 30px; min-width: 30px; height: 30px; min-height: 30px; place-items: center; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--icon-gray); box-shadow: none; }
.performance-criterion-fold:hover, .performance-criterion-fold:focus-visible { border-color: transparent; background: var(--hover-bg); color: var(--nav-muted); transform: none; }
.performance-criterion-fold svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .16s ease; }
.template-score-card.is-collapsed > header { border-bottom: 0; }
.template-score-card.is-collapsed > :not(header) { display: none; }
.template-score-card.is-collapsed .performance-criterion-fold svg { transform: rotate(-90deg); }
.template-score-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0; }
.template-score-detail-grid div { min-height: 58px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.template-score-detail-grid div:nth-child(2n) { border-right: 0; }
.template-score-detail-grid div:last-child { grid-column: 1 / -1; border-bottom: 0; }
.template-score-detail-grid dt, .template-score-detail-grid dd { margin: 0; }
.template-score-detail-grid dt { color: var(--disabled-text); font-size: 12px; }
.template-score-detail-grid dd { margin-top: 4px; color: var(--ink); font-size: 13px; line-height: 1.55; }
.template-score-standard { display: block; border-top: 1px solid var(--line); background: var(--warn-bg); }
.template-score-standard div { padding: 10px 12px; }
.template-score-standard div + div { border-left: 1px solid var(--line); }
.template-score-standard span { color: var(--warn-text); font-size: 12px; font-weight: 700; }
.template-score-standard p { margin: 4px 0 0; color: var(--warn-text); font-size: 12px; line-height: 1.55; }
.template-score-custom-standard { padding: 10px 12px 12px; border-top: 1px solid var(--line); background: var(--bg); }
.template-score-custom-standard > span { display: block; margin-bottom: 7px; color: var(--text-soft); font-size: 12px; font-weight: 700; }
.template-score-custom-standard table { width: 100%; border-collapse: collapse; font-size: 12px; }
.template-score-custom-standard th, .template-score-custom-standard td { padding: 7px 8px; border: 1px solid var(--line); text-align: left; vertical-align: top; line-height: 1.5; }
.template-score-custom-standard th { background: var(--surface-muted); color: var(--text-soft); }
.template-score-custom-standard td:first-child, .template-score-custom-standard td:nth-child(2) { white-space: nowrap; }
/* 只读「关联数据」块：把同月「考勤/假勤纪律」数据贴到考点描述区（服务端读时派生，见
   services/platform-api/src/performance-discipline-linkage.mjs）。与下方可编辑的评分说明刻意区分：
   浅底 + 顶部标题条，不改动评分说明本身；无数据时后端给 null、前端不渲染，故不会出现空壳。 */
/* 只读「关联数据」块：本考点的**评分依据**，做成卡片里一块独立、明显的带框卡片。 */
.template-score-linked-data { margin: 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--head); overflow: hidden; }
.template-score-linked-data-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--info-bg); }
.template-score-linked-data-title { color: var(--text-soft); font-size: 12px; font-weight: 700; }
.template-score-linked-data-hint { margin-left: 8px; color: var(--accent); font-size: 11px; font-weight: 700; }
.template-score-linked-data-badge { padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--disabled-text); font-size: 11px; font-weight: 600; white-space: nowrap; }
.template-score-linked-data-badge[data-linked-status="final"] { border-color: var(--ok-dim); background: var(--ok-bg); color: var(--ok-strong); }
/* 每条关联字段占一行：左标签（宽度随内容、次数列自然很窄）、右值占其余宽度；值加粗、计数用强调色，突出焦点。 */
.template-score-linked-data-rows { display: grid; margin: 0; background: var(--bg); }
.template-score-linked-data-rows > div { display: flex; align-items: baseline; gap: 12px; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.template-score-linked-data-rows > div:last-child { border-bottom: 0; }
.template-score-linked-data-rows dt { flex: 0 1 auto; max-width: 40%; color: var(--disabled-text); font-size: 12px; }
.template-score-linked-data-rows dd { flex: 1 1 auto; min-width: 45%; margin: 0; color: var(--ink); font-size: 13px; font-weight: 700; line-height: 1.5; }
.template-score-linked-data-rows > div:first-child dd { color: var(--accent); font-size: 16px; }
/* A/B 考点的**评分依据**：员工上传附件后由 AI 生成分析，供评分人参考；与「关联数据」块同族（红虚线框）。 */
.template-score-evidence { margin: 12px; border: 1px dashed var(--accent); border-radius: 8px; background: var(--head); overflow: hidden; }
.template-score-evidence-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); background: var(--info-bg); }
.template-score-evidence-title { color: var(--text-soft); font-size: 12px; font-weight: 700; }
.template-score-evidence-title small { margin-left: 8px; color: var(--accent); font-size: 11px; font-weight: 700; }
.template-score-evidence-empty { padding: 9px 12px; color: var(--disabled-text); font-size: 12px; }
.template-score-evidence-upload { display: inline-flex; align-items: center; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg); color: var(--text-soft); font-size: 11px; font-weight: 600; cursor: pointer; }
.template-score-evidence-upload:hover { border-color: var(--accent); color: var(--accent); }
.template-score-evidence-list { display: grid; }
.template-score-evidence-item { padding: 7px 12px; border-bottom: 1px solid var(--line); }
.template-score-evidence-row { display: flex; align-items: baseline; gap: 10px; }
.template-score-evidence-ai-note { margin-top: 6px; padding: 8px 10px; border-radius: 6px; background: var(--info-bg); color: var(--text-soft); font-size: 12px; line-height: 1.55; }
.template-score-evidence-ai-note span { margin-right: 6px; color: var(--accent); font-weight: 700; }
.template-score-evidence-ai-note small { margin-left: 4px; color: var(--muted); font-size: 11px; }
.template-score-evidence-item:last-child { border-bottom: 0; }
.template-score-evidence-name { flex: 1 1 auto; min-width: 0; color: var(--ink); font-size: 13px; word-break: break-all; }
.template-score-evidence-size { flex: 0 0 auto; color: var(--disabled-text); font-size: 11px; }
.template-score-evidence-action { flex: 0 0 auto; padding: 2px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: var(--text-soft); font-size: 11px; cursor: pointer; }
.template-score-evidence-action:hover { border-color: var(--accent); color: var(--accent); }
.template-score-evidence-empty { padding: 9px 12px; color: var(--disabled-text); font-size: 12px; }
.template-score-evidence-ai { padding: 7px 12px 9px; border-top: 1px solid var(--line); background: var(--warn-bg); color: var(--warn); font-size: 11px; }
.template-score-input-stack { display: grid; padding: 12px; background: var(--sidebar-bg); }
.template-score-role-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 112px; gap: 14px; align-items: start; padding: 5px 0; border-bottom: 1px solid var(--accent-soft); }
.template-score-role-row:last-child { border-bottom: 0; }
.template-score-role-row label { color: var(--text-soft); font-size: 12px; font-weight: 600; }
.template-score-role-row label > span, .template-hr-score-row label > span { display: block; }
.template-score-role-row select, .template-score-role-row textarea { margin-top: 5px; background: var(--bg); }
.template-score-role-row label > select, .template-hr-score-row label > select { width: 100%; box-sizing: border-box; }
.template-score-role-row textarea { min-height: 52px; }
.template-hr-score-row { display: grid; grid-template-columns: 190px minmax(0, 1fr) 112px; gap: 14px; align-items: start; padding: 12px; background: var(--surface-muted); }
.template-hr-score-row label { color: var(--text-soft); font-size: 12px; font-weight: 600; }
.template-hr-score-row select, .template-hr-score-row textarea { margin-top: 5px; background: var(--bg); }
.template-hr-score-row textarea { min-height: 52px; }
.template-hr-score-note { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: start; }
.template-score-note-field { min-width: 0; color: var(--text-soft); font-size: 12px; font-weight: 600; }
.template-score-note-field > span { display: block; line-height: 14px; }
.template-score-note-input { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 6px; margin-top: 5px; }
.template-score-note-input.is-note-only { grid-template-columns: minmax(0, 1fr); }
.template-score-note-input textarea { min-width: 0; min-height: 52px; margin-top: 0 !important; }
.template-score-attachment { display: grid; min-height: 52px; place-items: center; padding: 0; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--bg); color: var(--text-soft); line-height: 1; }
.template-score-attachment svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.template-score-attachment:hover:not(:disabled), .template-score-attachment:focus-visible { border-color: var(--accent); background: var(--bad-bg); color: var(--bad); }
.template-score-attachment:disabled { opacity: .45; cursor: not-allowed; }
.template-score-note-field small { display: block; margin-top: 4px; color: var(--disabled-text); font-size: 11px; font-weight: 400; line-height: 1.4; }
.template-attachment-card { width: min(640px, calc(100vw - 32px)); max-width: 640px; }
.template-attachment-dialog-body { padding: 4px 2px 2px; }
.template-attachment-dialog-body > .muted { margin: 0 0 14px; font-size: 13px; line-height: 1.55; }
.template-attachment-upload { display: inline-flex; min-height: 40px; align-items: center; gap: 7px; padding: 0 13px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--on-accent); font-size: 13px; font-weight: 700; cursor: pointer; }
.template-attachment-upload:hover { background: var(--bad); border-color: var(--bad); }
.template-attachment-upload:has(input:disabled) { opacity: .5; cursor: not-allowed; }
.template-attachment-upload input { position: absolute; width: 1px; height: 1px; overflow: hidden; opacity: 0; pointer-events: none; }
.template-attachment-upload-icon { display: grid; place-items: center; }
.template-attachment-upload svg, .template-attachment-file-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; }
.template-attachment-list { display: grid; gap: 8px; margin: 16px 0 0; padding: 0; list-style: none; }
.template-attachment-item { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.template-attachment-file-icon { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 8px; background: var(--bad-bg); color: var(--bad); }
.template-attachment-item strong, .template-attachment-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.template-attachment-item strong { color: var(--ink); font-size: 13px; }
.template-attachment-item small { margin-top: 3px; color: var(--muted); font-size: 11px; }
.template-attachment-item-actions { display: inline-flex; gap: 6px; }
.template-attachment-item-actions button { min-height: 32px; padding: 5px 9px; font-size: 12px; }
.template-attachment-item-actions .danger { border-color: var(--accent-dim); color: var(--bad); }
.template-attachment-empty { padding: 18px; border: 1px dashed var(--line-strong); border-radius: 8px; color: var(--muted); font-size: 13px; text-align: center; }
.template-attachment-notice { margin: 14px 0 0; padding: 9px 10px; border-radius: 7px; background: var(--warn-bg); color: var(--warn-text); font-size: 12px; line-height: 1.55; }
.template-score-card-final { display: flex; flex-direction: column; justify-content: center; align-items: center; color: var(--text-soft); font-size: 12px; }
.template-score-card-final strong { margin-top: 6px; color: var(--bad-text); font-size: 22px; }
.template-point-title { display: block; color: var(--ink); margin-bottom: 6px; }
.template-point-detail { color: var(--muted); font-size: 12px; line-height: 1.55; }
.template-point-detail p { margin: 2px 0; }
.template-hr-note { margin: 0; padding: 9px 12px; border: 1px solid var(--line); border-top: 0; background: var(--warn-bg); color: var(--warn-text); font-size: 12px; line-height: 1.5; }
.template-result-block { padding: 0 12px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); }
.template-result-block h5 { margin: 0 -12px; border-radius: 7px 7px 0 0; background: linear-gradient(135deg, var(--bad), var(--bad-strong)); }
.template-personnel-block { margin-top: 16px; }
.template-personnel-summary { display: grid; grid-template-columns: minmax(170px, .9fr) minmax(0, 3.1fr); overflow: hidden; border: 1px solid var(--line); border-radius: 9px; background: var(--bg); }
.template-personnel-identity { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 16px 18px; border-right: 1px solid var(--line); background: var(--surface-muted); }
.template-personnel-identity span, .template-personnel-grid dt { color: var(--disabled-text); font-size: 12px; }
.template-personnel-identity strong { color: var(--ink); font-size: 22px; line-height: 1.2; }
.template-personnel-identity small { color: var(--text-soft); font-size: 12px; }
.template-personnel-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0; }
.template-personnel-grid div { min-height: 58px; padding: 10px 12px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.template-personnel-grid div:nth-child(4n) { border-right: 0; }
.template-personnel-grid div:nth-child(n + 5) { border-bottom: 0; }
.template-personnel-grid dt, .template-personnel-grid dd { margin: 0; }
.template-personnel-grid dd { margin-top: 4px; color: var(--ink); font-size: 14px; font-weight: 600; }
.template-reviewer-summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 12px 0 0; overflow: hidden; border: 1px solid var(--accent-dim); border-radius: 8px; background: var(--bad-bg); }
.template-reviewer-summary div { padding: 9px 12px; border-right: 1px solid var(--accent-dim); }
.template-reviewer-summary div:last-child { border-right: 0; }
.template-reviewer-summary span { display: block; color: var(--bad-text); font-size: 12px; font-weight: 600; }
.template-reviewer-summary strong { display: block; margin-top: 4px; color: var(--ink); font-size: 14px; }
/* 窄屏（≤760px）的评分表重排。原来留在 HR 模块的 styles.css 里，HR 换了样式表来源后
   主站看板就拿不到这层响应式，窄屏下表会横向溢出，所以跟版式一起搬到这里。 */
@media (max-width: 760px) { .performance-template-meta { grid-template-columns: 1fr 1fr; } .performance-template-meta div:nth-child(2) { border-right: 0; } .performance-template-table { min-width: 760px; } .performance-template-preview { margin-top: 12px; } .template-personnel-summary { grid-template-columns: 1fr; } .template-personnel-identity { border-right: 0; border-bottom: 1px solid var(--line); } .template-personnel-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .template-personnel-grid div:nth-child(4n) { border-right: 1px solid var(--line); } .template-personnel-grid div:nth-child(2n) { border-right: 0; } .template-personnel-grid div:nth-child(n + 5) { border-bottom: 1px solid var(--line); } .template-personnel-grid div:nth-last-child(-n + 1) { border-bottom: 0; } .template-reviewer-summary { grid-template-columns: 1fr; } .template-reviewer-summary div { border-right: 0; border-bottom: 1px solid var(--line); } .template-reviewer-summary div:last-child { border-bottom: 0; } .template-score-detail-grid { grid-template-columns: 1fr; } .template-score-detail-grid div, .template-score-detail-grid div:nth-child(2n) { border-right: 0; } .template-score-detail-grid div:last-child { grid-column: auto; } .template-score-standard { grid-template-columns: 1fr; } .template-score-standard div + div { border-top: 1px solid var(--line); border-left: 0; } .template-score-role-row, .template-hr-score-row { grid-template-columns: 1fr 1fr; } .template-score-role-row > strong, .template-hr-score-row > strong { grid-column: 1 / -1; padding-top: 0; } .template-score-role-row .template-score-note-field, .template-hr-score-note, .template-score-card-final { grid-column: 1 / -1; } .template-hr-score-note { grid-template-columns: 1fr; } .template-score-card-final { min-height: 72px; border-top: 1px solid var(--line); } .template-attachment-card { width: calc(100vw - 20px); } .template-attachment-item { grid-template-columns: 34px minmax(0, 1fr); } .template-attachment-item-actions { grid-column: 1 / -1; justify-content: flex-end; } }

/* —— 评分表的「全屏 / 导出长图」：看板与 HR 模块共用（脚本在 platform/performance-sheet-tools.js）—— */
.sheet-tools { display: inline-flex; align-items: center; gap: 6px; flex: none; }
.sheet-tool { display: inline-flex; width: 30px; min-width: 30px; height: 30px; align-items: center; justify-content: center; padding: 0; border: 1px solid var(--line); border-radius: var(--radius-xs); background: var(--panel); color: var(--icon-gray); cursor: pointer; }
.sheet-tool:hover, .sheet-tool:focus-visible { border-color: var(--line-strong); background: var(--hover-bg); color: var(--nav-muted); }
.sheet-tool:disabled { opacity: .5; cursor: progress; }
.sheet-tool svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* HR 只读评分表的关闭按钮是浮在右上角的 48px 圆形按钮（top 28px / 右对齐），
   全屏与导出长图两个图标**竖排在它正下方**：右边缘与关闭按钮同心（30px 图标居中 = 偏移 (48-30)/2 = 9px），
   top = 关闭按钮 top 28px + 直径 48px + 间距 8px。 */
.historical-detail-dialog.performance-template-preview > .sheet-tools.is-float { position: fixed; z-index: 30; top: calc(28px + 48px + 8px); right: calc(max(18px, calc((100vw - 1100px) / 2 - 96px)) + 9px); flex-direction: column; }
/* 窄屏关闭按钮移到 top 14px / right 14px，工具条照样竖排在其正下方。 */
@media (max-width: 760px) { .historical-detail-dialog.performance-template-preview > .sheet-tools.is-float { top: calc(14px + 48px + 8px); right: calc(14px + 9px); } }

/* 全屏 = 浏览器页面内铺满视口（.is-browser-fullscreen，脚本在 platform/shell.js）。
   刻意不用 Fullscreen API：那个会把整个系统窗口切进桌面全屏，而这里要的只是这块表铺满浏览器。 */
.my-perf-sheet.is-browser-fullscreen,
.historical-detail-dialog.performance-template-preview.is-browser-fullscreen {
  position: fixed; z-index: 90; inset: 0;
  width: 100vw; max-width: none; height: 100vh; max-height: none; padding: 0; margin: 0; border: 0; border-radius: 0; overflow: auto; background: var(--bg);
}
body.sheet-fullscreen-open { overflow: hidden; }

/* 导出长图时的容器：不裁剪、不滚动，让评分表按完整内容排版。样式表会被一起塞进 SVG，
   这几条在「先量高度」那一步就要生效，所以放在共享样式表里而不是临时注入。 */
.sheet-export-root { box-sizing: border-box; }
.sheet-export-root > .my-perf-sheet,
.sheet-export-root > .historical-detail-dialog.performance-template-preview { width: 100%; max-width: none; height: auto; max-height: none; margin: 0; border-radius: 0; overflow: visible; }
.sheet-export-root .my-perf-rows { height: auto; max-height: none; overflow: visible; }
.sheet-export-root .sheet-export-control.is-placeholder { color: var(--icon-gray); }


/* 部分标题行上的「本部分 X 分」与小计（ORBIT-20261008-181）。
   标题行是深红底白字，所以这枚胶囊用半透明白底，保证在渐变上仍可读。 */
.performance-section-total { flex: 0 0 auto; padding: 2px 8px; border: 1px solid rgb(var(--inverse-rgb) / .5); border-radius: 999px; background: rgb(var(--inverse-rgb) / .18); color: var(--on-accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
/* 最终结果块里的三部分小计：得分 / 总分 + 项数 */
.template-section-subtotals { display: grid; gap: 6px; margin: 10px 0; }
.template-section-subtotals > div { display: flex; align-items: baseline; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-muted); font-size: 13px; }
.template-section-subtotals > div > span { flex: 1 1 auto; min-width: 0; color: var(--text-soft); font-weight: 700; }
.template-section-subtotals > div > strong { color: var(--bad-text); font-size: 17px; }
.template-section-subtotals > div > em { color: var(--disabled-text); font-style: normal; }
.template-section-subtotals > div > small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.performance-draft-subtotals { flex: 1 1 100%; display: block; }
