#ticket-impressao-modal {
  position: fixed;
  inset: 0;
  z-index: 100000;
  overflow: auto;
  background: #000b;
  padding: 20px;
  color: #111;
  font-family: Arial, sans-serif;
}

.ticket-acoes {
  position: sticky;
  top: 0;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto 12px;
  padding: 12px 16px;
  border-radius: 8px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 2px 12px #0004;
}

.ticket-acoes button {
  border: 0;
  border-radius: 5px;
  padding: 10px 16px;
  margin-left: 8px;
  cursor: pointer;
  font-size: 16px;
}

.ticket-acoes .btn-imprimir {
  background: #075ca8;
  color: #fff;
  font-weight: 700;
}

#ticket-folha {
  width: 210mm;
  min-height: 297mm;
  margin: auto;
  padding: 7mm;
  background: #fff;
  box-sizing: border-box;
}

.ticket-via {
  height: 137mm;
  box-sizing: border-box;
  padding: 4mm 6mm;
  border: 1px dashed #333;
  overflow: hidden;
  font-size: 14px;
  line-height: 1.34;
  page-break-inside: avoid;
}

.ticket-via + .ticket-via {
  margin-top: 5mm;
}

.ticket-via header {
  text-align: center;
  line-height: 1.08;
}

.ticket-via header img {
  display: block;
  height: 20mm;
  max-width: 78mm;
  margin: -2mm auto 0;
  object-fit: contain;
  filter: grayscale(1) contrast(2.4);
}

.ticket-titulo {
  margin-top: 0;
  font-size: 24px;
  font-weight: 900;
  letter-spacing: .3px;
}

.ticket-identificacao-via {
  font-size: 18px !important;
}

.ticket-meta {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr;
  gap: 7px;
  margin: 2.5mm 0 1.5mm;
  padding: 1.8mm 0;
  border-top: 2px dotted #222;
  border-bottom: 2px dotted #222;
  font-size: 13px;
}

.ticket-via h2 {
  margin: 1.6mm 0 1mm;
  padding-bottom: .9mm;
  border-bottom: 2px solid #111;
  font-size: 18px;
  font-weight: 900;
}

.ticket-via h2 span {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin-right: 6px;
  border-radius: 3px;
  background: #111;
  color: #fff;
}

.dados-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr 1fr 1fr;
  gap: 1mm 3mm;
}

.dados-grid.cliente,
.dados-grid.hospedagem {
  grid-template-columns: 2fr 1fr 1fr;
}

.ticket-pet {
  margin-top: 1mm;
}

.pet-separador {
  font-weight: 800;
  border-top: 1px dotted #555;
  padding-top: 1mm;
}

.observacao {
  min-height: 7mm;
  margin-top: 1.2mm;
  padding: 1.2mm;
  border: 1px solid #999;
}

.ticket-adicionais {
  display: grid;
  gap: 1mm;
  margin-top: 1mm;
  font-size: 13px;
}

.ticket-total-geral {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2mm 0 1mm;
  padding: 2mm;
  border: 2px solid #111;
  font-size: 20px;
  font-weight: 900;
}

.ticket-total-geral strong {
  font-size: 28px;
}

.assinatura {
  text-align: center;
  font-size: 11px;
}

.assinatura div {
  width: 58%;
  height: 8mm;
  margin: 0 auto 1mm;
  border-bottom: 1px solid #111;
}

@media (max-width: 850px) {
  #ticket-impressao-modal {
    padding: 8px;
  }

  .ticket-acoes {
    align-items: stretch;
    flex-direction: column;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  body > *:not(#ticket-impressao-modal) {
    display: none !important;
  }

  #ticket-impressao-modal {
    position: static;
    overflow: visible;
    padding: 0;
    background: #fff;
  }

  .ticket-acoes {
    display: none !important;
  }

  #ticket-folha {
    width: 210mm;
    min-height: 297mm;
    margin: 0;
    padding: 7mm;
  }
}
