.report-page { background: #EEF2F7; }

/* ── Toolbar ─────────────────────────────────────────────────────────── */

.report-toolbar {
  margin-bottom: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.report-toolbar-group { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Report sheet — official document look ───────────────────────────── */

.report-sheet {
  width: min(980px, 100%);
  margin: 0 auto;
  border: 1px solid #c7d2e0;
  border-top: 4px solid #1E3A8A;
  border-radius: 12px;
  background: var(--white);
  padding: 32px 36px;
  box-shadow: 0 8px 32px rgba(15,23,42,0.09);
}

/* ── Report header ───────────────────────────────────────────────────── */

.report-head {
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 18px;
  margin-bottom: 20px;
}

.report-head h1 {
  font-size: 24px;
  color: #1E3A8A;
  letter-spacing: -0.01em;
}

.report-kicker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 4px;
}

.report-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 5px 12px;
  background: #dbeafe;
  color: #1e40af;
  font-size: 12px;
  font-weight: 600;
}

.report-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 20px;
  color: #334155;
  font-size: 14px;
}

.report-meta-top { margin-top: 12px; }

.report-top-strip {
  margin-top: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  font-size: 13px;
  color: #334155;
}

/* ── SHA explanation ─────────────────────────────────────────────────── */

.sha-explanation {
  margin-top: 8px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
  padding: 9px 12px;
  font-size: 12px;
  color: #0369a1;
  line-height: 1.5;
}

.sha-explanation-icon { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* ── Report sections ─────────────────────────────────────────────────── */

.report-section {
  margin-top: 22px;
  border: 1px solid #e8edf4;
  border-radius: 10px;
  overflow: hidden;
  break-inside: avoid;
}

.report-section h2 {
  background: #f1f5fb;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  color: #1E3A8A;
  letter-spacing: 0.01em;
}

.report-section > .table-wrap,
.report-section > p,
.report-section > ol,
.report-section > .signature-box {
  padding: 14px 16px;
}

.section-table th,
.section-table td {
  font-size: 13px;
  padding: 10px 10px;
}

/* ── Signature block ─────────────────────────────────────────────────── */

.signature-box {
  background: #f8fafc;
}

.report-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.report-form .full { grid-column: 1 / -1; }

.report-form label {
  display: block;
  margin-bottom: 5px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.report-form input,
.report-form textarea {
  width: 100%;
  border: 1.5px solid #cbd5e1;
  border-radius: 8px;
  padding: 9px 11px;
  background: #fff;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.report-form input:focus,
.report-form textarea:focus {
  outline: none;
  border-color: #1E3A8A;
  box-shadow: 0 0 0 3px rgba(30,58,138,0.10);
}

.signoff-action { margin-top: 12px; }

/* ── Recommendations ─────────────────────────────────────────────────── */

.recommendations {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 10px;
}

.recommendations li {
  font-size: 14px;
  color: #1e293b;
  line-height: 1.6;
}

/* ── Digital signature block ─────────────────────────────────────────── */

.digital-signature-block {
  margin-top: 18px;
  border: 2px solid #16A34A;
  border-radius: 10px;
  background: #f0fdf4;
  padding: 16px 20px;
  color: #14532d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.8;
}

/* ── Print styles ────────────────────────────────────────────────────── */

@media print {
  @page { margin: 14mm; }

  body,
  .report-page,
  .site-shell,
  .main-content {
    background: #fff !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: 0 !important;
    display: block !important;
  }

  .sidebar,
  .page-header,
  .report-toolbar,
  .global-footer-hint,
  .demo-mode-badge,
  .judge-helper-btn,
  .judge-helper-popup,
  #global-toast-root,
  button,
  .report-form,
  .signoff-action,
  #download-report,
  #use-stored-report,
  #use-demo-report,
  #finalize-btn {
    display: none !important;
  }

  .signature-box {
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .report-sheet {
    width: 100% !important;
    max-width: none !important;
    border: 0 !important;
    border-top: 3px solid #1E3A8A !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .report-section {
    border: 1px solid #e2e8f0 !important;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .report-section h2 {
    background: #f1f5fb !important;
    color: #1E3A8A !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .badge-pass { background: #dcfce7 !important; color: #15803d !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge-fail { background: #fee2e2 !important; color: #b91c1c !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .badge-flag { background: #fef3c7 !important; color: #b45309 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }

  .sha-explanation {
    background: #f0f9ff !important;
    border: 1px solid #bae6fd !important;
    color: #0369a1 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .digital-signature-block {
    border: 2px solid #16a34a !important;
    background: #f0fdf4 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .report-badge {
    border: 1px solid #94a3b8;
    background: #fff !important;
    color: #0f172a !important;
  }
}
