/* Cotizador Novo — fixed quote format (A4), based on COT. N.E 46. Scoped under .qdoc. */
@font-face { font-family: 'Caladea'; src: url('/fonts/Caladea-Regular.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: block; }
@font-face { font-family: 'Caladea'; src: url('/fonts/Caladea-Bold.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: block; }

.qdoc { --pw: 210mm; --ph: 297mm; --mt: 9mm; --mr: 10mm; --mb: 8mm; --ml: 10mm; }
.qdoc, .qdoc * { box-sizing: border-box; }
.qdoc .page {
  width: var(--pw); height: var(--ph); padding: var(--mt) var(--mr) var(--mb) var(--ml);
  background: #fff; color: #000; position: relative; overflow: hidden;
  font-family: 'Caladea', 'Cambria', Georgia, serif; font-size: 7.5pt; line-height: 1.2;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.qdoc .inner { width: calc(var(--pw) - var(--ml) - var(--mr)); font-family: 'Caladea', 'Cambria', Georgia, serif; font-size: 7.5pt; line-height: 1.2; color: #000; }
.qdoc b, .qdoc .b { font-weight: 700; }
.qdoc img.logo { height: auto; border-radius: 0; box-shadow: none; }

/* Header (page 1) */
.qdoc .head { display: flex; align-items: flex-start; gap: 12mm; }
.qdoc .head .logo { width: 44mm; display: block; margin-top: 1mm; }
.qdoc .head .meta { flex: 1; line-height: 1.25; }
.qdoc .head .date { margin-bottom: 1.6mm; display: flex; justify-content: space-between; gap: 6mm; }
.qdoc .head .num { font-weight: 700; white-space: nowrap; }
.qdoc .ref { margin: 2mm 0 2.2mm; }

/* Header (pages 2+) */
.qdoc .head2 { display: flex; align-items: center; gap: 8mm; padding-bottom: 2mm; margin-bottom: 2.2mm; border-bottom: 0.6pt solid #000; }
.qdoc .head2 .logo { width: 30mm; display: block; }
.qdoc .head2 .meta { flex: 1; line-height: 1.3; }
.qdoc .head2 .pg { white-space: nowrap; font-weight: 700; align-self: flex-start; }

/* Items table */
.qdoc table.q { width: 100%; border-collapse: collapse; font-size: 7pt; table-layout: fixed; border: 0.8pt solid #000; }
.qdoc table.q th { background: #cfcfcf; font-weight: 700; text-align: center; padding: 1.6pt 1pt; border: 0.6pt solid #000; font-size: 6.5pt; }
.qdoc table.q td { padding: 1.1pt 3pt; vertical-align: middle; background: #f2f2f2; border-left: 0.6pt solid #000; border-right: 0.6pt solid #000; overflow-wrap: anywhere; }
.qdoc table.q tr.it td { border-bottom: 0.3pt solid #c8c8c8; }
.qdoc table.q td.c { text-align: center; }
.qdoc table.q td.r { text-align: right; white-space: nowrap; }
.qdoc table.q tr.grp td { font-weight: 700; text-align: center; padding: 2pt 3pt 1.4pt; border-top: 0.6pt solid #000; border-bottom: 0.3pt solid #c8c8c8; }
.qdoc table.q tr.grp td .cont { font-weight: 400; font-style: italic; }
.qdoc table.q.tot { border-top: 0; }
.qdoc table.q.tot td { background: #cfcfcf; font-weight: 700; border: 0.6pt solid #000; padding: 1.5pt 3pt; }
.qdoc table.q .cj { white-space: nowrap; }
.qdoc col.c1 { width: 51%; } .qdoc col.c2 { width: 8.6%; } .qdoc col.c3 { width: 6.6%; } .qdoc col.c4 { width: 4.2%; }
.qdoc col.c5 { width: 5.2%; } .qdoc col.c6 { width: 7.4%; } .qdoc col.c7 { width: 8.4%; } .qdoc col.c8 { width: 8.6%; }

/* Policies */
.qdoc .pol { margin-top: 2.6mm; font-size: 6.6pt; line-height: 1.22; }
.qdoc .pol h3 { font-size: 7pt; margin: 0 0 1.2mm; }
.qdoc .pol p { margin: 0 0 1mm; }
.qdoc .pol .cols { column-count: 2; column-gap: 5mm; }
.qdoc .pol .cols p { break-inside: avoid; }
.qdoc .disc { margin-top: 1.6mm; background: #c9c9c9; border: 0.6pt solid #555; font-size: 6.3pt; text-align: center; padding: 1.4pt 4pt; line-height: 1.25; }

/* Bank + signature + brands */
.qdoc .foot { display: flex; gap: 14mm; margin-top: 2.6mm; font-size: 6.8pt; line-height: 1.25; }
.qdoc .foot a { color: #0563c1; text-decoration: underline; }
.qdoc .sign .att { margin-bottom: 4.5mm; }
.qdoc .brands { margin-top: 3mm; width: 100%; display: block; }
.qdoc .pfoot { position: absolute; right: var(--mr); bottom: 3.2mm; font-size: 6pt; color: #555; }

/* Offscreen measuring box */
.qmeasure { position: absolute !important; left: -10000px; top: 0; visibility: hidden; pointer-events: none; }

/* Screen preview: pages stacked with shadow, scaled to fit */
.qpreview { --s: 1; }
.qpreview .qscale { transform: scale(var(--s)); transform-origin: top left; width: 210mm; }
.qpreview .page { box-shadow: 0 2px 14px rgba(0,0,0,.18); margin-bottom: 6mm; }

@media print {
  @page { size: A4; margin: 0; }
  html, body { background: #fff !important; margin: 0 !important; padding: 0 !important; }
  body > *:not(#print-root) { display: none !important; }
  #print-root { display: block !important; }
  #print-root .qscale { transform: none !important; width: auto !important; height: auto !important; }
  #print-root .qwrap { height: auto !important; width: auto !important; }
  #print-root .page { box-shadow: none !important; margin: 0 !important; break-after: page; page-break-after: always; }
  #print-root .page:last-child { break-after: auto; page-break-after: auto; }
}
