/* Styling for the report body the model produces.
 *
 * The class names (patient-block, pr/pl/pv, section-heading, echo-list,
 * cath-table, diagnosis-block) are dictated by the system prompt in
 * lib/report-generator.js, so these rules are ported from the live
 * core/css/style.css to keep generated reports looking identical. */

.report-paper {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  font-family: Arial, sans-serif;
  color: #111;
}

.report-paper__header img,
.report-paper__footer img { width: 100%; display: block; }

.report-body { padding: 14px 22px; }

.report-sig { padding: 12px 22px 18px; border-top: 1px solid #cdd6e0; margin-top: 16px; }
.report-sig p { font-size: 12px; color: #333; margin: 0 0 2px; }
.report-sig__image { max-height: 60px; width: auto; margin: 4px 0; }
.report-sig__name { font-weight: 700; font-size: 14px; color: var(--brand-primary); }
.report-sig__quals { font-size: 10px; color: #666; }

.report-body h2 {
  font-size: 14px; font-weight: 700; text-align: center; letter-spacing: 1px;
  color: var(--brand-primary); margin: 0 0 2px; text-transform: uppercase;
}
.report-body h4 {
  font-size: 11px; font-weight: 400; text-align: center; color: #666;
  margin: 0 0 12px; font-style: italic;
}

.report-body .patient-block {
  background: #f5f8fc; border-left: 3px solid var(--brand-primary);
  padding: 8px 12px; margin: 10px 0 14px;
}
.report-body .pr { display: flex; margin: 3px 0; font-size: 12px; flex-wrap: wrap; }
.report-body .pl { font-weight: 700; color: var(--brand-primary); min-width: 190px; flex-shrink: 0; }
.report-body .pv { color: #111; }

.report-body .salutation { font-size: 12px; color: #333; margin: 0 0 14px; font-style: italic; }
.report-body .section { margin: 0 0 12px; }
.report-body .section-heading {
  font-size: 11px; font-weight: 700; color: var(--brand-primary);
  text-transform: uppercase; letter-spacing: .7px;
  border-bottom: 1.5px solid var(--brand-primary); padding-bottom: 2px; margin-bottom: 6px;
}

.report-body ul { margin: 3px 0; padding-left: 16px; }
.report-body li { margin: 2px 0; font-size: 12px; }
.report-body ul.echo-list { list-style: none; padding-left: 0; }
.report-body ul.echo-list li { display: flex; margin: 3px 0; flex-wrap: wrap; }
.report-body .echo-label { font-weight: 600; color: #222; min-width: 220px; flex-shrink: 0; font-size: 11.5px; }
.report-body .echo-value { color: #111; font-size: 12px; }

.report-body .diagnosis-block {
  background: #fff8e1; border-left: 3px solid #e6a817; padding: 6px 12px; margin: 8px 0 12px;
}

.report-body table.cath-table { border-collapse: collapse; width: 100%; font-size: 11px; margin: 6px 0; }
.report-body table.cath-table th {
  background: var(--brand-primary); color: #fff; padding: 5px 8px; text-align: left; font-weight: 600;
}
.report-body table.cath-table td { border: 1px solid #ccd6e0; padding: 4px 8px; vertical-align: top; }
.report-body table.cath-table tr:nth-child(even) td { background: #f5f8fc; }
.report-body strong { font-weight: 700; }

/* Editing puts the body into contenteditable; make the target obvious. */
.report-body[contenteditable="true"] {
  outline: 2px dashed var(--brand-primary);
  outline-offset: 4px;
  background: #fffdf5;
}

.print-page { background: #fff; }
.report-paper--print { border: none; border-radius: 0; max-width: 210mm; margin: 0 auto; }

@media print {
  .report-paper { border: none; }
  .print-page { background: #fff; }
}
