* {
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #d8d8d8;
  font-family: Arial, sans-serif;
}

.topbar {
  background: #111;
  padding: 12px 20px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.formSetor {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px;
  border: 1px solid #444;
  background: #1a1a1a;
}

.formSetor strong {
  width: 100%;
  color: #fff;
  font-size: 11px;
  letter-spacing: 1px;
}

.topbar input,
.topbar select,
.topbar button {
  height: 30px;
  font-size: 12px;
  padding: 0 8px;
}

#paginaPdf {
  width: 100%;
}

#ficha {
  width: 960px;
  height: 680px;
  margin: 35px auto;
  position: relative;
  overflow: hidden;
  background: #fbf7e6;
}

.background {
  position: absolute;
  inset: 0;
  width: 960px;
  height: 680px;
  z-index: 0;
}

.logoReal {
  position: absolute;
  z-index: 5;
  top: 22px;
  left: 22px;
  width: 245px;
}

.box {
  position: absolute;
  z-index: 2;
  border: 2px solid #111;
}

.esquerda {
  left: 2px;
  top: 2px;
  width: 365px;
  height: 506px;
  border-right: 2px solid #111;
  border-top: 0;
  border-left: 0;
  border-bottom: 0;
}

.imagens {
  left: 367px;
  top: 18px;
  width: 577px;
  height: 490px;
}

.observacoes {
  left: 20px;
  top: 554px;
  width: 347px;
  height: 108px;
  border-top: 2px solid #111;
}

.tamanho {
  left: 367px;
  top: 508px;
  width: 230px;
  height: 154px;
}

.gravacao {
  left: 597px;
  top: 508px;
  width: 122px;
  height: 154px;
}

.aprovacao {
  left: 719px;
  top: 508px;
  width: 225px;
  height: 154px;
}

.titulo {
  position: absolute;
  z-index: 5;
  font-family: Georgia, serif;
  font-weight: bold;
  font-size: 14px;
}

.infoTitulo { left: 17px; top: 82px; }
.materiaisTitulo { left: 17px; top: 252px; }
.pedrasTitulo { left: 17px; top: 354px; }
.obsTitulo { left: 22px; top: 558px; }
.tamanhoTitulo { left: 370px; top: 512px; }
.gravacaoTitulo { left: 600px; top: 512px; }
.aprovacaoTitulo { left: 722px; top: 512px; }

.linhaCampo {
  position: absolute;
  z-index: 5;
  height: 18px;
  border-bottom: 1px solid #999;
  font-family: Georgia, serif;
  font-size: 13px;
}

.linhaCampo span {
  background: #fbf7e6;
  padding-right: 4px;
}

.linhaCampo b {
  font-family: Arial, sans-serif;
  font-size: 11px;
  font-weight: normal;
  margin-left: 6px;
}

.modeloLinha { left: 17px; top: 113px; width: 340px; }
.clienteLinha { left: 17px; top: 143px; width: 340px; }
.dataLinha { left: 17px; top: 173px; width: 340px; }
.acabamentoLinha { left: 17px; top: 203px; width: 340px; }
.pesoLinha { left: 17px; top: 233px; width: 340px; }
.metalLinha { left: 17px; top: 282px; width: 340px; }
.corLinha { left: 17px; top: 312px; width: 340px; }

.tabelaPedras {
  position: absolute;
  z-index: 5;
  left: 20px;
  top: 373px;
  width: 347px;
  border-collapse: collapse;
  table-layout: fixed;
  font-family: Georgia, serif;
  font-size: 8px;
}

.tabelaPedras th,
.tabelaPedras td {
  border: 2px solid #111;
  text-align: center;
  height: 19px;
  padding: 0;
}

.tabelaPedras th {
  height: 18px;
}

.tabelaPedras td {
  font-family: Arial, sans-serif;
  font-size: 10px;
}

.observacoesTexto {
  position: absolute;
  z-index: 5;
  left: 28px;
  top: 585px;
  width: 320px;
  height: 65px;
  font-family: Arial, sans-serif;
  font-size: 11px;
  white-space: pre-wrap;
}

#areaImagens img {
  position: absolute;
  z-index: 4;
  object-fit: contain;
}

#viewSuperior { left: 390px; top: 67px; width: 255px; height: 168px; }
#viewSide { left: 640px; top: 67px; width: 260px; height: 168px; }
#viewFront { left: 390px; top: 313px; width: 255px; height: 170px; }
#viewPerspective { left: 640px; top: 313px; width: 260px; height: 170px; }

.medida {
  position: absolute;
  z-index: 9;
  font-family: Arial, sans-serif;
  font-size: 9px;
  font-weight: bold;
  color: #111;
  background: transparent;
  border: 0;
  white-space: nowrap;
  line-height: 1;
}

.medida small {
  font-weight: bold;
  margin-right: 3px;
}

.cotaLinha {
  position: absolute;
  z-index: 8;
  background: #1f4ed8;
}

.cotaLinha.horizontal::before,
.cotaLinha.horizontal::after {
  content: "";
  position: absolute;
  top: -5px;
  width: 2px;
  height: 12px;
  background: #1f4ed8;
}

.cotaLinha.horizontal::before {
  left: 0;
}

.cotaLinha.horizontal::after {
  right: 0;
}

.cotaLinha.vertical::before,
.cotaLinha.vertical::after {
  content: "";
  position: absolute;
  left: -5px;
  width: 12px;
  height: 2px;
  background: #1f4ed8;
}

.cotaLinha.vertical::before {
  top: 0;
}

.cotaLinha.vertical::after {
  bottom: 0;
}

.aroPerspectiva {
  position: absolute;
  z-index: 9;
  left: 815px;
  top: 468px;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: bold;
  white-space: nowrap;
}

.linhaInferior {
  position: absolute;
  z-index: 5;
  height: 20px;
  border-bottom: 1px solid #999;
  font-family: Georgia, serif;
  font-size: 10px;
}

.linhaInferior span {
  background: #fbf7e6;
  padding-right: 4px;
}

.linhaInferior b {
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: normal;
}

.aroBr { left: 370px; top: 550px; width: 215px; }
.aroEua { left: 370px; top: 590px; width: 215px; }
.aroDiametro { left: 370px; top: 626px; width: 215px; }

.gravLocal { left: 600px; top: 550px; width: 110px; }
.gravTexto { left: 600px; top: 605px; width: 110px; }

.linhaAssinatura {
  position: absolute;
  z-index: 5;
  width: 205px;
  border-top: 1px solid #999;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 10px;
  padding-top: 3px;
}

.linhaAssinatura b {
  display: block;
  font-family: Arial, sans-serif;
  font-size: 10px;
  font-weight: normal;
  margin-bottom: 2px;
}

.linhaAssinatura span {
  display: block;
}

.designer { left: 728px; top: 550px; }
.gerente { left: 728px; top: 590px; }
.clienteAprov { left: 728px; top: 626px; }

.sem-aro .tamanho,
.sem-aro .gravacao,
.sem-aro .tamanhoTitulo,
.sem-aro .gravacaoTitulo,
.sem-aro .aroBr,
.sem-aro .aroEua,
.sem-aro .aroDiametro,
.sem-aro .gravLocal,
.sem-aro .gravTexto {
  display: none;
}

.sem-aro .observacoes {
  width: 699px;
}

.sem-aro .observacoesTexto {
  width: 670px;
}

.upload-1 #viewSuperior {
  left: 390px;
  top: 55px;
  width: 520px;
  height: 430px;
}

.upload-1 #viewSide,
.upload-1 #viewFront,
.upload-1 #viewPerspective {
  display: none;
}

.upload-2 #viewSuperior {
  left: 390px;
  top: 145px;
  width: 260px;
  height: 250px;
}

.upload-2 #viewSide {
  left: 655px;
  top: 145px;
  width: 260px;
  height: 250px;
}

.upload-2 #viewFront,
.upload-2 #viewPerspective {
  display: none;
}

.default-ilustrativa #areaImagens::after {
  content: "IMAGEM ILUSTRATIVA";
  position: absolute;
  z-index: 9;
  left: 390px;
  top: 460px;
  width: 520px;
  text-align: center;
  font-family: Georgia, serif;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
}

@media print {
  body {
    margin: 0;
    background: white;
  }

  .topbar {
    display: none;
  }

  #paginaPdf {
    width: 100vw;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5cm;
  }

  #ficha {
    margin: 0;
    background: #fbf7e6 !important;
    transform: scale(0.98);
    transform-origin: center center;
  }

  @page {
    size: A4 landscape;
    margin: 0;
  }
}