#quote-document {
  box-sizing: border-box;
  width: 100%;
  margin: 24px auto;
  padding: 20px;
  overflow-x: auto;
  color: #151515;
  background: #f2f3f5;
  font-family: Arial, Helvetica, sans-serif;
}

#quote-document[hidden] { display: none; }

.quote-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  width: min(210mm, 100%);
  margin: 0 auto 12px;
}

.quote-sheet {
  position: relative;
  box-sizing: border-box;
  width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  padding: 13mm 13mm 34mm;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 3px 18px #0002;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 11pt;
  line-height: 1.35;
}

.quote-header {
  display: grid;
  grid-template-columns: 40% 60%;
  height: auto;
  min-height: 48mm;
  padding: 0;
  border: 0;
  background: transparent;
  gap: 0;
  align-items: start;
}

.quote-brand { padding: 0 8mm 0 0; }
.quote-logo { display: block; width: 49mm; height: auto; }
.quote-company {
  margin: 0;
  text-align: left;
  font-size: 9pt;
  font-style: normal;
  line-height: 1.3;
}
.quote-company strong { font-size: 10pt; font-style: normal; }
.quote-company a { color: inherit; }
.quote-date { margin: 3mm 0 7mm; font-style: normal; }
.quote-sheet h1 { margin: 0 0 2mm; text-align: center; font-size: 15pt; font-weight: 700; letter-spacing: 0; line-height: 1.3; }
.quote-intro { margin: 0 0 3mm; text-align: justify; text-indent: 0; }
.quote-customer { margin: 1.5mm 0; }
.quote-benefits-title { margin: 4mm 0 0; }
.quote-benefits { margin: 2mm 0 5mm; padding-left: 5mm; }
.quote-benefits li { padding-left: 1mm; }

.quote-prices {
  width: 100%;
  margin: 0 0 5mm;
  border-collapse: collapse;
  table-layout: fixed;
  break-inside: avoid;
  font-size: 9.5pt;
  line-height: 1.12;
}
.quote-prices th, .quote-prices td {
  border: 0.45pt solid #222;
  padding: 2.1mm 1.8mm;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.quote-prices th { text-align: center; font-weight: 700; }
.quote-prices th:first-child { width: 42%; }
.quote-prices th:nth-child(2) { width: 18%; }
.quote-prices th:nth-child(3) { width: 22%; }
.quote-prices th:nth-child(4) { width: 18%; }
.quote-prices td:first-child { text-align: left; }
.quote-prices td:not(:first-child) { text-align: center; white-space: nowrap; }

.quote-terms { font-size: 9.5pt; line-height: 1.4; }
.quote-terms > strong { display: block; margin-bottom: 1.5mm; }
.quote-terms p { margin: 2mm 0; text-align: justify; }
.quote-safety { font-weight: 700; }
.quote-footer-art {
  position: absolute;
  right: 0;
  bottom: 0;
  display: block;
  width: 100%;
  height: auto;
  max-height: 28mm;
  object-fit: contain;
  object-position: right bottom;
  pointer-events: none;
}

@media (max-width: 760px) {
  #quote-document { margin: 12px auto; padding: 8px; }
  .quote-sheet { margin-left: 0; }
}

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

@media print {
  body:not(.print-quote) #quote-document { display: none !important; }
  body.print-quote { margin: 0 !important; padding: 0 !important; background: #fff !important; }
  body.print-quote > *:not(#quote-document) { display: none !important; }
  body.print-quote #quote-document {
    display: block !important;
    width: 210mm;
    margin: 0;
    padding: 0;
    overflow: visible;
    background: #fff;
  }
  body.print-quote #quote-document .quote-controls { display: none !important; }
  body.print-quote .quote-sheet {
    width: 210mm;
    height: auto;
    min-height: 297mm;
    margin: 0;
    padding: 13mm 13mm 34mm;
    overflow: visible;
    box-shadow: none;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  body.print-quote .quote-header { display: grid !important; height: auto !important; padding: 0 !important; border: 0 !important; }
  body.print-quote .quote-prices,
  body.print-quote .quote-prices tr,
  body.print-quote .quote-terms { break-inside: avoid; page-break-inside: avoid; }
}

/* The setup scheme starts on a separate sheet after the offer. */
.quote-scheme-sheet { margin-top: 20px; padding: 13mm; }
.quote-scheme-sheet h1 { margin-bottom: 8mm; }
.quote-scheme-sheet p { overflow-wrap: anywhere; }
.quote-scheme { margin-top: 6mm; }
.quote-scheme svg { display: block; width: 100%; height: auto; pointer-events: none; }
@media print {
  body.print-quote .quote-scheme-sheet {
    break-before: page;
    page-break-before: always;
    padding: 13mm;
  }
  body.print-quote .quote-scheme { break-inside: avoid; }
}

#quote-document :is(button, input, select, h1, h2, p, li, th, td, address, strong, b, a, text, tspan) { font-family: Arial, Helvetica, sans-serif; }
.quote-customer { text-align: justify; overflow-wrap: anywhere; }
