#inspection-type { width:100%; min-height:42px; padding:8px; border:1px solid #d4d4d4; border-radius:8px; background:#fff; font:inherit; color:inherit; }
#report-records { margin:10px 0; }
#report-records summary { cursor:pointer; font-weight:700; }
.report-record-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; padding-top:12px; }
.report-record-grid label:has(textarea) { grid-column:1/-1; }
#report-dialog { background:#fff; }
#report-dialog .report-brand, .report-brand { width:min(248px,78%); margin:23px 28px 0; }
#report-body { --report-ink:#241f19; --report-subtle:#5d544a; --report-line:#e4dbce; --report-gold:#765225; --report-paper:#f7f3ec; color:var(--report-ink); padding:18px 28px 24px; line-height:1.44; }
#report-body * { box-sizing:border-box; }
#report-body .report-kicker { margin:0 0 3px; color:var(--report-gold); font-size:.67rem; font-weight:800; letter-spacing:.13em; }
#report-body h1 { margin:0 0 16px; font-family:Georgia,serif; font-size:clamp(1.68rem,4vw,2.58rem); line-height:1.13; font-weight:normal; letter-spacing:-.025em; }
#report-body dl { margin:0; }
#report-body dt { color:var(--report-subtle); font-size:.73em; font-weight:700; }
#report-body dd { margin:1px 0 0; overflow-wrap:anywhere; }
#report-body .report-meta { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; padding:12px 14px; border-top:2px solid #9b7139; background:var(--report-paper); font-size:.89rem; }
#report-body .report-meta div:first-child { grid-column:1/-1; }
#report-body .report-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:9px 1px; margin:5px 0 12px; border-bottom:1px solid var(--report-line); }
#report-body .report-summary div { display:flex; align-items:baseline; gap:7px; }
#report-body .report-summary dd { font-weight:700; order:-1; }
#report-body .report-room { margin:0 0 17px; }
#report-body .report-room h2, #report-body .report-final h2 { margin:0 0 4px; padding:7px 0; border-bottom:1px solid var(--report-line); font-family:Georgia,serif; font-weight:normal; font-size:1.37rem; }
#report-body .report-room h2 span { display:inline-block; margin-right:11px; color:var(--report-gold); font-family:system-ui,sans-serif; font-size:.74rem; font-weight:800; letter-spacing:.06em; }
#report-body h3 { margin:0; font-size:.96rem; line-height:1.3; }
#report-body .report-item { margin:0; padding:7px 0; border-bottom:1px solid #f0eae2; }
#report-body .report-item-copy { min-width:0; break-inside:avoid; }
@media (min-width:600px), print {
  #report-body .report-item:has(> .report-photos > figure:only-child) { display:grid; grid-template-columns:minmax(0,1fr) 24%; gap:12px; break-inside:avoid; }
  #report-body .report-item > .report-photos:has(> figure:only-child) { display:block; margin:0; }
}
#report-body .report-item p { margin:3px 0; font-size:.91rem; white-space:pre-wrap; overflow-wrap:anywhere; }
#report-body .report-item-meta { display:flex; flex-wrap:wrap; gap:2px 12px; color:var(--report-subtle); font-size:.78rem; }
#report-body .report-item-meta div { display:flex; align-items:baseline; gap:4px; }
#report-body .report-item-meta dt { font-size:inherit; }
#report-body .report-photos { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin:6px 0 2px; }
#report-body figure { margin:0; break-inside:avoid; }
#report-body figure img { display:block; width:100%; aspect-ratio:4/3; object-fit:contain; border:1px solid var(--report-line); border-radius:4px; background:var(--report-paper); }
#report-body figcaption { margin-top:3px; color:var(--report-subtle); font-size:.73rem; }
#report-body .report-room > h3 { margin-top:10px; }
#report-body .report-final { padding:0 12px 8px; background:var(--report-paper); }
#report-body .report-final dl div { padding-top:7px; break-inside:avoid; }
#report-body .report-final dd { white-space:pre-wrap; font-size:.87rem; }
#report-body .report-footer { display:flex; justify-content:space-between; gap:12px; margin-top:16px; padding-top:8px; border-top:1px solid var(--report-line); color:var(--report-subtle); font-size:.68rem; break-inside:avoid; }
@media(max-width:500px) {
  #report-body { padding-left:14px; padding-right:14px; }
  #report-dialog .report-brand { margin-left:14px; }
  #report-body .report-photos { grid-template-columns:repeat(2,minmax(0,1fr)); }
  #report-body .report-summary div { display:block; }
}
@media print {
  @page { size:A4; margin:15mm; @bottom-right { content: counter(page) ' / ' counter(pages); color:#5d544a; font:9pt system-ui; } }
  #report-dialog .report-brand, .report-brand { width:63mm; margin:0 0 4mm; }
  #report-body { padding:0; print-color-adjust:exact; -webkit-print-color-adjust:exact; }
  #report-body h1 { font-size:26pt; }
  #report-body h2, #report-body h3 { break-after:avoid; }
  #report-body .report-meta, #report-body .report-summary { break-inside:avoid; }
  #report-body .report-photos { grid-template-columns:repeat(3,minmax(0,1fr)); }
}
#report-body .report-administrator { margin:0 0 10px; color:var(--report-gold); font-size:.81rem; font-weight:700; }
#report-body .report-administrator span { color:var(--report-subtle); font-weight:400; }
#report-body .report-parties { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; padding:8px 14px; border-bottom:1px solid var(--report-line); font-size:.89rem; }
#report-body .report-signatures { margin:20px 0 0; padding-top:10px; border-top:1px solid var(--report-line); break-inside:avoid; }
#report-body .report-signatures p { margin:0; font-size:.87rem; }
#report-body .report-signature-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; padding-top:34px; font-size:.84rem; }
#report-body .report-signature-grid div { border-top:1px solid var(--report-subtle); padding-top:5px; overflow-wrap:anywhere; }
#report-body .report-signature-grid span { display:block; color:var(--report-subtle); font-size:.82em; }
@media print { #report-body .report-parties { break-inside:avoid; } }

#report-body .report-cover { margin:8px 0 10px; max-width:340px; }
#report-body .report-cover .report-photos { display:block; }
#report-body .report-cover img { aspect-ratio:2/1; }

/* Laudo de vistoria e impressão A4 */
#report-body .report-heading {
  border-top: 2px solid var(--report-gold);
  padding-top: 12px;
}
#report-body .report-heading h1 { margin-bottom: 14px; }
#report-body .report-meta {
  border: 1px solid var(--report-line);
  border-radius: 5px 5px 0 0;
}
#report-body .report-parties {
  border: 1px solid var(--report-line);
  border-top: 0;
  border-radius: 0 0 5px 5px;
}
#report-body .report-summary {
  padding: 9px 12px;
  margin: 11px 0 18px;
  border: 1px solid var(--report-line);
  border-radius: 4px;
}
#report-body .report-room h2 {
  display: flex;
  align-items: baseline;
  gap: 9px;
  padding: 6px 9px;
  border-left: 2px solid var(--report-gold);
  background: var(--report-paper);
}
#report-body .report-room h2 span { margin-right: 0; }
#report-body .report-item { padding: 8px 3px; }
#report-body .report-cover { max-width: 236px; margin: 9px 3px 5px; }
#report-body .report-cover img { aspect-ratio: 5/3; }
#report-body .report-cover figcaption { margin-top: 4px; }

@media print {
  #report-body { font-size: 10pt; line-height: 1.36; }
  #report-body .report-heading { padding-top: 3mm; }
  #report-body .report-heading h1 { margin-bottom: 4mm; font-size: 25pt; }
  #report-body .report-meta,
  #report-body .report-parties { padding: 2mm 3mm; font-size: 9pt; }
  #report-body .report-summary { margin: 3mm 0 4mm; }
  #report-body .report-room { margin-bottom: 4mm; }
  #report-body .report-room h2 { font-size: 14pt; }
  #report-body .report-item { padding: 2mm 1mm; }
  #report-body .report-item h3 { font-size: 10pt; }
  #report-body .report-item p { font-size: 9.5pt; orphans: 2; widows: 2; }
  #report-body .report-cover { width: 54mm; max-width: 100%; break-inside: avoid; }
}

#report-body .report-narrative { margin: 12px 0 16px; }
#report-body .report-narrative h2 { margin: 0 0 6px; font-size: 1.12em; }
#report-body .report-narrative p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.full-report-review { width: min(760px, calc(100% - 24px)); max-height: 90vh; padding: 0; border: 1px solid #e4dbce; border-radius: 10px; color: #241f19; background: #fff; }
.full-report-review[open] { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.full-report-review::backdrop { background: rgb(25 20 15 / 55%); }
.full-review-bar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; padding: 12px 16px; background: #f7f3ec; }
.full-review-bar h2, .full-review-bar p { margin: 0; }
.full-review-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.full-review-body { padding: 12px 16px; overflow: auto; }
.full-review-body section { margin-bottom: 13px; padding-bottom: 10px; border-bottom: 1px solid #e4dbce; }
.full-review-body label { display: block; font-weight: 700; }
.full-review-body textarea { display: block; box-sizing: border-box; width: 100%; margin-top: 6px; font: inherit; font-weight: 400; }
.full-review-context { font-size: .86em; }
.full-review-suggestion { margin-top: 8px; padding: 10px; border-left: 2px solid #765225; background: #f7f3ec; }
.full-review-suggestion p { white-space: pre-wrap; overflow-wrap: anywhere; }
@media print {
  #report-body .report-narrative p { orphans: 2; widows: 2; }
}

/* Referências de fotos, anexo fotográfico e alternância laudo/anexo */
#report-body .report-photo-refs { margin-top:4px; color:var(--report-gold); font-size:.78rem; font-weight:700; }
#report-body .report-photo-missing { display:block; padding:10px; border:1px dashed var(--report-line); color:var(--report-subtle); font-size:.75rem; }
#report-body .report-cover figure { max-width:236px; }
#report-body .annex-group { margin:8px 0 12px; break-inside:auto; }
#report-body .annex-group h3 { margin:0 0 4px; font-size:.88rem; color:var(--report-subtle); }
#report-body .report-room .report-photos { grid-template-columns:repeat(3,minmax(0,1fr)); }
.report-switch { display:flex; gap:4px; padding:3px; border:1px solid #e4dbce; border-radius:9px; background:#f7f3ec; }
.report-switch button { min-height:38px; padding:6px 12px; border:0; border-radius:7px; background:transparent; font:inherit; cursor:pointer; }
.report-switch button[aria-pressed="true"] { background:#241f19; color:#fff; }
.dialog-tools { flex-wrap:wrap; }
@media (max-width:500px) { #report-body .report-room .report-photos { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media print {
  .report-switch { display:none !important; }
  #report-body .report-room .report-photos { grid-template-columns:repeat(3,minmax(0,1fr)); gap:3mm; }
  #report-body .annex-group h3 { break-after:avoid; }
  #report-body .report-photo-refs { font-size:8.5pt; }
}
@media print {
  html, body { background:#fff !important; }
  #report-body .report-item { break-inside:avoid; }
  #report-body .report-signatures { break-inside:avoid; break-before:auto; }
}
