/* Relatório de atendimento: sempre claro, pronto para imprimir em A4.
   Compartilhado entre o painel web e o app Android. */
.report-page { background: #e9e7e4; min-height: 100vh; padding: 16px 12px 40px; }
.report-toolbar { max-width: 860px; margin: 0 auto 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.report-toolbar .btn, .report-toolbar button { background: #fff; color: #1d1b19; border-color: #cfcac3; }
.report-toolbar .primary { background: #d9232a; border-color: #d9232a; color: #fff; }
.report {
  color-scheme: light;
  max-width: 860px; margin: 0 auto; background: #fff; color: #1d1b19;
  padding: 32px; border-radius: 6px; box-shadow: 0 2px 12px rgba(0, 0, 0, .08);
  font-size: 13.5px;
}
.report a { color: #d9232a; }
.rep-head { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid #d9232a; padding-bottom: 16px; flex-wrap: wrap; }
.rep-company { display: flex; gap: 14px; align-items: flex-start; }
.rep-company img { max-height: 64px; max-width: 150px; object-fit: contain; }
.rep-company .name { font-size: 1.15rem; font-weight: 800; }
.rep-company div { line-height: 1.5; }
.rep-title { text-align: right; }
.rep-title .kind { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: #6b665f; }
.rep-title .os { font-size: 1.4rem; font-weight: 800; color: #d9232a; }
.report section { margin-top: 22px; break-inside: auto; }
.report h2 {
  font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: #d9232a;
  border-bottom: 1px solid #e3dfd9; padding-bottom: 5px; margin-bottom: 10px;
}
.report h3 { font-size: .95rem; margin: 14px 0 6px; }
.report dl.kv { grid-template-columns: max-content 1fr; }
.report dl.kv dt { color: #6b665f; }
.rep-cols { display: grid; gap: 6px 28px; }
@media (min-width: 640px) { .rep-cols { grid-template-columns: 1fr 1fr; } }
.rep-text { white-space: pre-wrap; margin: 0 0 8px; }
.rep-text.empty-text { color: #8a847c; font-style: italic; }
.report table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.report th, .report td { border: 1px solid #e3dfd9; padding: 6px 8px; text-align: left; vertical-align: top; }
.report th { background: #f4f2ef; font-weight: 700; }
.report .badge { font-size: .75rem; }
.report .b-C { background: #e3f3e9; color: #1e7a45; }
.report .b-NC { background: #fde8e6; color: #b42318; }
.report .b-AUS { background: #fdf0dc; color: #a15c07; }
.report .b-NA { background: #eceff3; color: #5f6b7a; }
.report .b-none { background: #f4f2ef; color: #8a847c; }
.report .st-agendada { background: #e5eefa; color: #1f5fa8; }
.report .st-em_andamento { background: #fdf0dc; color: #a15c07; }
.report .st-concluida { background: #e3f3e9; color: #1e7a45; }
.report .st-cancelada { background: #eceff3; color: #5f6b7a; }
.pend { border: 1px solid #f3c9c4; border-left: 4px solid #b42318; border-radius: 6px; padding: 10px 12px; margin-bottom: 8px; break-inside: avoid; }
.pend.aus { border-color: #f1d9b5; border-left-color: #a15c07; }
.pend .sub { font-size: .8rem; color: #6b665f; }
.rep-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.rep-photos.small { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); margin-top: 8px; }
.rep-photo { margin: 0; border: 1px solid #e3dfd9; border-radius: 6px; overflow: hidden; break-inside: avoid; }
.rep-photo img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; cursor: zoom-in; }
.rep-photo figcaption { padding: 6px 8px; font-size: 12px; display: grid; gap: 2px; }
.rep-photo figcaption span { color: #6b665f; }
.rep-sign { display: grid; gap: 24px; }
@media (min-width: 640px) { .rep-sign { grid-template-columns: 1fr 1fr; } }
.rep-sign .box { text-align: center; }
.rep-sign img { max-width: 100%; max-height: 110px; }
.rep-sign .line { border-top: 1px solid #1d1b19; padding-top: 6px; margin-top: 4px; }
.rep-foot { margin-top: 28px; padding-top: 10px; border-top: 1px solid #e3dfd9; font-size: 11px; color: #8a847c; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; }

@media (max-width: 640px) {
  .report { padding: 18px 14px; }
  .rep-title { text-align: left; }
}

@media print {
  @page { size: A4; margin: 12mm; }
  body, .report-page { background: #fff !important; padding: 0 !important; }
  .no-print, #toast { display: none !important; }
  .report { box-shadow: none; padding: 0; max-width: none; border-radius: 0; }
  .rep-photos { grid-template-columns: repeat(3, 1fr); }
  .rep-photos.small { grid-template-columns: repeat(4, 1fr); }
  .rep-cols, .rep-sign { grid-template-columns: 1fr 1fr; }
  .report h2 { break-after: avoid; }
}
