/*
 * Estilos de romaneios, comprovantes e fichas para visualização e impressão em páginas A4.
 */

.document-pages {
  width: 210mm;
  margin: auto;
}
.document-page {
  width: 210mm;
  height: 277mm;
  max-width: none;
  padding: 8mm 10mm;
  margin: 0 auto 20px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 3px 15px #0002;
}
.document-header {
  position: static;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8mm;
  padding: 0 0 5mm;
  margin: 0 0 4mm;
  border-bottom: 2px solid #143c62;
  color: #143c62;
  background: white;
}
.document-header img {
  width: 38mm;
  height: 20mm;
  object-fit: contain;
}
.document-header h1 {
  font-size: 17px;
  margin: 3px 0;
  line-height: 1.3;
}
.document-header strong {
  letter-spacing: 2px;
  font-size: 13px;
}
.document-header span {
  font-size: 13px;
}
.document-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.document-text {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-size: 12px;
  line-height: 1.5;
  margin: 0 0 3mm;
}
.document-block {
  break-inside: avoid;
}
.document-block h2 {
  font-size: 14px;
  margin: 2mm 0;
}
.document-table {
  table-layout: fixed;
  width: 100%;
  font-size: 11px;
  margin: 0 0 4mm;
  border: 1px solid #ced9e3;
}
.document-table th {
  font-size: 10px;
  text-transform: none;
  background: #eaf0f5;
  padding: 2mm;
  color: #143c62;
  white-space: normal;
}
.document-table td {
  font-size: 11px;
  padding: 2mm;
  vertical-align: middle;
  overflow-wrap: anywhere;
  border-bottom: 1px solid #ced9e3;
}
.document-barcode-cell {
  text-align: center;
}
.document-barcode-cell .romaneio-barcode {
  display: block;
  width: 48mm;
  max-width: 100%;
  height: 16mm;
  padding: 0;
  object-fit: contain;
  background: white;
  margin: 0 auto;
}
.document-barcode-cell span {
  font-size: 10px;
  display: block;
  margin-top: 1mm;
}
.document-footer {
  flex: none;
  height: 34mm;
  padding-top: 10mm;
  box-sizing: border-box;
}
.document-footer .signatures {
  display: flex;
  gap: 10mm;
  margin: 0;
  min-height: 13mm;
}
.document-footer .signatures > div {
  font-size: 11px;
  line-height: 1.4;
  padding-top: 2mm;
}
.document-footer .signatures strong {
  display: block;
  font-size: 10px;
  font-weight: 400;
}
.document-footer > p {
  text-align: center;
  font-size: 9px;
  color: #65758b;
  margin: 3mm 0 0;
}
.document-photo {
  width: 100%;
  height: 70mm;
  object-fit: contain;
}
.romaneio-panel > .toolbar {
  max-width: 210mm;
}
.document-page .romaneio-photos {
  break-before: auto;
}
@page {
  size: A4 portrait;
  margin: 10mm 0;
}
@media print {
  body.romaneio-open .romaneio-panel {
    display: block !important;
  }
  .document-pages {
    width: 210mm;
  }
  .romaneio-panel .document-page {
    height: 277mm;
    width: 210mm;
    padding: 8mm 10mm;
    margin: 0;
    break-after: page;
    box-shadow: none;
    overflow: hidden;
  }
  .document-page:last-child {
    break-after: auto;
  }
  .document-header {
    display: flex !important;
  }
  .document-table th {
    print-color-adjust: exact;
  }
  .document-content {
    overflow: hidden;
  }
  .document-page .romaneio-photos {
    break-before: auto;
  }
  .document-footer {
    display: block !important;
  }
  .document-barcode-cell .romaneio-barcode {
    width: 48mm;
    height: 16mm;
    padding: 0;
  }
  .document-table tr {
    break-inside: avoid;
  }
}

/* Reprodução do formulário Volkswagen fornecido para lotes de até 18 itens. */
.vw-pages {
  width: 215.9mm;
  margin: auto;
}
.vw-page {
  width: 215.9mm;
  height: 279.4mm;
  padding: 12.7mm;
  margin: 0 auto 20px;
  box-sizing: border-box;
  overflow: hidden;
  background: #fff;
  color: #000;
  font-family: Calibri, Arial, sans-serif;
  font-size: 12pt;
  box-shadow: 0 3px 15px #0002;
  page: volkswagenRomaneio;
}
.vw-logo {
  display: block;
  width: 19.05mm;
  height: 21.17mm;
  object-fit: contain;
  margin: 0 0 1mm;
}
.vw-page table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.vw-page td,
.vw-page th {
  border: 0.35mm solid #000;
  color: #000;
  background: #fff;
  padding: 0.7mm 1mm;
  line-height: 1.05;
}
.vw-company-table th {
  height: 10mm;
  font-size: 17pt;
  font-weight: 400;
  text-align: center;
  background: #d9d9d9;
}
.vw-company-table td {
  height: 5.5mm;
  font-size: 12pt;
}
.vw-company-table .vw-date-line,
.vw-company-table .vw-note,
.vw-company-table .vw-warning {
  text-align: center;
}
.vw-company-table .vw-date-line {
  height: 8mm;
  font-size: 14pt;
  background: #d9d9d9;
}
.vw-company-table .vw-note {
  font-weight: 700;
}
.vw-company-table .vw-warning {
  height: 12mm;
  font-weight: 700;
  font-size: 12pt;
}
.vw-items-table {
  margin-top: 1.5mm;
}
.vw-items-table th {
  height: 7mm;
  padding: 0.4mm;
  text-align: center;
  vertical-align: middle;
  font-size: 12pt;
  font-weight: 400;
}
.vw-items-table thead tr:nth-child(2) th {
  background: #bfbfbf;
}
.vw-items-table tbody tr {
  height: 5.7mm;
}
.vw-items-table td {
  height: 5.7mm;
  padding: 0.35mm 0.7mm;
  vertical-align: middle;
  text-align: center;
  font-size: 9pt;
  overflow: hidden;
}
.vw-items-table th:nth-child(2),
.vw-items-table td:nth-child(2) {
  text-align: left;
}
.vw-signatures {
  width: 76mm;
  margin: 9mm auto 0;
}
.vw-signatures div {
  text-align: center;
  min-width: 0;
}
.vw-signatures span {
  display: block;
  min-height: 4mm;
  border-bottom: 0.3mm solid #000;
  font-size: 7pt;
}
.vw-signatures strong {
  display: block;
  padding-top: 1mm;
  font-size: 12pt;
}
.vw-photo-page > p {
  margin: 0 0 3mm;
  font-weight: 700;
  font-size: 12pt;
}
.vw-photo-page table td {
  position: relative;
  width: 33.333%;
  height: 34.9mm;
  padding: 2mm;
  vertical-align: top;
}
.vw-photo-page table td > strong {
  position: absolute;
  top: 1mm;
  left: 1.5mm;
  z-index: 1;
}
.vw-photo-page table img {
  display: block;
  width: 100%;
  height: 30mm;
  object-fit: contain;
}
@page volkswagenRomaneio {
  size: letter portrait;
  margin: 0;
}
@media print {
  .volkswagen-romaneio .vw-pages {
    width: 215.9mm;
  }
  .volkswagen-romaneio .vw-page {
    display: block !important;
    width: 215.9mm;
    height: 279.4mm;
    margin: 0;
    padding: 12.7mm;
    box-shadow: none;
    break-after: page;
    print-color-adjust: exact;
  }
  .volkswagen-romaneio .vw-page:last-child {
    break-after: auto;
  }
}

.document-footer .signatures:empty {
  display: none;
}
.document-photo-page .document-footer {
  height: 12mm;
  padding-top: 2mm;
}
.annex-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
}
.annex-table td {
  width: 50%;
  height: 66mm;
  padding: 3mm;
  border: 1px solid #cdd9e4;
  text-align: center;
  vertical-align: top;
  box-sizing: border-box;
}
.annex-photo {
  display: block;
  width: 100%;
  height: 40mm;
  object-fit: contain;
  margin: 0 auto 2mm;
}
.annex-caption {
  font-size: 10px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.annex-caption strong {
  color: #143c62;
}
.annex-empty {
  background: #f8fafb;
}
@media print {
  .document-photo-page .document-footer {
    height: 12mm;
    padding-top: 2mm;
  }
  .annex-table td {
    height: 66mm;
  }
  .annex-photo {
    height: 40mm;
  }
}

/* Documentos com a mesma identidade institucional da aplicação. */
.document-page {
  border-top: 4mm solid #004693;
  background: #fff;
}
.document-header {
  position: relative;
  border-bottom: 1.2mm solid #004693;
  color: #004693;
}
.document-header::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1.2mm;
  width: 34mm;
  height: 1.2mm;
  background: #f4a220;
}
.document-header h1,
.document-block h2 {
  color: #004693;
}
.document-header strong {
  font-family: 'Days One', sans-serif;
  font-weight: 400;
  color: #004693;
}
.document-header span {
  color: #52657b;
}
.document-table {
  border-color: #d4deea;
}
.document-table th {
  background: #eaf1f9;
  color: #004693;
  border-bottom: 1px solid #d4deea;
}
.document-table td {
  border-color: #d4deea;
}
.document-footer .signatures > div {
  border-top: 1px solid #172b43;
}
.document-footer > p {
  color: #52657b;
}
.annex-table td {
  border-color: #d4deea;
}
.annex-caption strong {
  color: #004693;
}
.annex-empty {
  background: #f3f6fa;
}
@media print {
  .document-page {
    border-top-color: #004693;
    print-color-adjust: exact;
  }
  .document-header::after,
  .document-table th {
    print-color-adjust: exact;
  }
}
