/* 安全管理·报表导出（safety_report 视图）—— 按 PHMS 系统风格（v44 设计令牌）
 * 画布 #f3f4f6 / 白卡 / 主色 #2563eb·#1e3a5f / 圆角软阴影 / Apple 风轻量感。
 * 全部类以 .sr- 作用域前缀，互不污染其它模块。 */

.sr-report { max-width: 1000px; margin: 0 auto; padding: 4px 2px 24px; }

/* 页头 */
.sr-head { margin: 6px 0 16px; }
.sr-h1 { font-size: 20px; font-weight: 700; color: #1e3a5f; letter-spacing: .3px; margin: 0 0 4px; }
.sr-sub { margin: 0; color: #6b7280; font-size: 13px; line-height: 1.6; }

/* 通用白卡 */
.sr-card {
  background: #fff; border: 1px solid #eef0f4; border-radius: 12px;
  box-shadow: 0 1px 3px rgba(30,58,95,.05); padding: 16px; margin-bottom: 14px;
}

/* 报表类型：分段控件（复用 .view-toggle 外观，子项用 label） */
.sr-types { margin-bottom: 0; }
.sr-types .sr-type-opt {
  display: flex; align-items: center; gap: 6px; padding: 7px 16px;
  font-size: 13px; color: #6b7280; cursor: pointer; user-select: none;
}
.sr-types .sr-type-opt input { accent-color: #2563eb; margin: 0; }
.sr-types .sr-type-opt.active { background: #1e3a5f; color: #fff; border-radius: 0; }
.sr-types .sr-type-opt.active input { accent-color: #fff; }
.sr-types .sr-type-opt:first-child.active { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.sr-types .sr-type-opt:last-child.active { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

/* 筛选网格 */
.sr-filters-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px 16px; align-items: end;
}
.sr-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.sr-field > label { font-size: 12px; color: #6b7280; font-weight: 500; }
.sr-field input[type=date],
.sr-field select {
  width: 100%; padding: 9px 10px; border: 1px solid #d1d5db; border-radius: 8px;
  font-size: 13px; background: #fff; color: #1f2937; font-family: inherit;
}
.sr-field input[type=date]:focus,
.sr-field select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.sr-field--checks { flex-direction: row; align-items: center; gap: 18px; flex-wrap: wrap; }
.sr-check { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #374151; cursor: pointer; white-space: nowrap; }
.sr-check input { accent-color: #2563eb; width: 15px; height: 15px; }
.sr-field--clear { justify-content: flex-end; }
.sr-link {
  background: none; border: none; color: #2563eb; font-size: 13px; cursor: pointer;
  padding: 8px 4px; text-decoration: underline; text-underline-offset: 2px;
}
.sr-link:hover { color: #1d4ed8; }

/* 预览卡 */
.sr-preview-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.sr-preview-title { font-size: 15px; font-weight: 600; color: #1e3a5f; }
.sr-preview-sub { font-size: 12px; color: #9ca3af; }
.sr-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 16px; }
.sr-stat { background: #f8fafc; border: 1px solid #eef0f4; border-radius: 10px; padding: 14px 16px; text-align: center; }
.sr-stat-k { font-size: 12px; color: #6b7280; margin-top: 6px; }
.sr-stat-v { font-size: 26px; font-weight: 800; color: #2563eb; line-height: 1.1; }
.sr-stat-size { font-size: 22px; }
.sr-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.sr-actions .btn-secondary,
.sr-actions .btn-export { font-size: 14px; padding: 10px 20px; }
.sr-actions .btn-export { min-width: 140px; justify-content: center; }
.sr-msg { min-height: 18px; font-size: 13px; margin-top: 10px; color: #6b7280; }
.sr-msg:empty { margin-top: 0; }

/* 预览摘要抽屉 */
.sr-drawer { margin-top: 14px; background: #f8fafc; border: 1px solid #eef0f4; border-radius: 10px; padding: 14px 16px; }
.sr-drawer-title { font-size: 13px; font-weight: 600; color: #1e3a5f; margin-bottom: 8px; }
.sr-drawer-body { margin: 0; font-size: 13px; line-height: 1.7; color: #374151; white-space: pre-wrap; font-family: inherit; }

@media (max-width: 640px) {
  .sr-stats { grid-template-columns: 1fr; }
  .sr-filters-grid { grid-template-columns: 1fr 1fr; }
  .sr-field--clear { justify-content: flex-start; }
}
