/* Report rendering style for modal and printable report page */

body {
  margin: 0;
  background: #ffffff;
  color: #1f2937;
}

.report-page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px;
  box-sizing: border-box;
}

.report-theme {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: #1f2937;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.report-theme h4 {
  color: #1f3a60;
  font-size: 15px;
}

.status-text {
  font-size: 12px;
  color: #6b7280;
  margin-top: 6px;
  line-height: 1.7;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  text-align: center;
  color: #6b7280;
}

.empty-state p {
  margin: 0;
}

.report-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.2px;
  margin: 0 0 10px;
}

.report-summary {
  background: #f8fafc;
  border: 1px solid #dbe5f0;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.7;
  margin-bottom: 10px;
}

.report-kpi {
  margin-left: 12px;
}

.report-kpi-pass {
  color: #0f8a55;
}

.report-kpi-fail {
  color: #c53030;
}

.report-kpi-pending {
  color: #8a6d1f;
}

.report-project-block {
  border-left: 4px solid #2a78ff;
  background: #f8fbff;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 10px;
}

.report-project-row {
  font-size: 13px;
  line-height: 1.65;
  margin: 2px 0;
  text-align: left;
}

.report-project-row strong {
  font-weight: 700;
}

.report-template-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin: 8px 0 6px;
}

.report-table-wrap {
  margin-top: 10px;
}

.report-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
}

.report-table thead th {
  background: #eef3fb;
  color: #1f3a60;
  font-weight: 700;
  text-align: center;
  border: 1px solid #d4deeb;
  padding: 7px 8px;
  font-size: 12px;
}

.report-table tbody td {
  border: 1px solid #dbe3ef;
  padding: 6px 8px;
  font-size: 12px;
  text-align: center;
  vertical-align: middle;
}

.report-chip {
  display: inline-block;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  line-height: 1.6;
  font-weight: 700;
}

.report-chip-pass {
  background: #e8faf3;
  color: #0f8a55;
  border: 1px solid #b6ead2;
}

.report-chip-fail {
  background: #fdeaea;
  color: #c53030;
  border: 1px solid #f6c0c0;
}

.report-chip-warn {
  background: #fff7e6;
  color: #8a6d1f;
  border: 1px solid #f0d9a8;
}

.report-chip-muted {
  background: #f3f4f6;
  color: #6b7280;
  border: 1px solid #e5e7eb;
}

@page {
  size: auto;
  margin: 12mm;
}

@media print {
  body {
    background: #ffffff;
  }

  .report-page {
    max-width: none;
    padding: 0;
  }

  .report-title {
    font-size: 22px;
  }

  .report-summary,
  .report-project-block {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-table {
    break-inside: auto;
  }

  .report-table tr,
  .report-table td,
  .report-table th {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}
