/* Quotation document (A4 pages) - used by the live preview, print and PDF export */
.doc-root {
  --acc: #4dcbf5;
  --acc-ink: #fff;
  --stripe: #dce6f1;
  --name: #4f81bd;
  --doc-font: "Times New Roman", serif;
  --doc-size: 11.5pt;
  --gap: 3mm;
}
.page {
  width: 210mm;
  height: 297mm;
  background: #fff;
  color: #000;
  margin: 0 auto 10mm;
  padding: 7mm 12mm 6mm;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
  font-family: var(--doc-font);
  font-size: var(--doc-size);
  line-height: 1.22;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .35);
  box-sizing: border-box;
  text-align: left;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}
.page *, .page *::before, .page *::after { box-sizing: border-box; }

/* header */
.pg-head { flex: none; margin-bottom: 4mm; }
.ph-top { display: flex; align-items: flex-start; gap: 4mm; }
.ph-logo { flex: 0 0 auto; width: 44mm; display: flex; align-items: center; height: 24mm; }
.ph-logo img { max-width: 42mm; max-height: 22mm; width: auto; height: auto; display: block; }
.ph-co { flex: 1 1 auto; font-size: .8em; line-height: 1.25; }
.ph-name { color: var(--name); font-weight: 700; font-size: 1.42em; margin-bottom: .6mm; letter-spacing: .1px; }
.ph-info { flex: 0 0 auto; width: 64mm; font-size: .8em; line-height: 1.32; }
.ph-rule { border-top: 2.2px solid #000; margin: 1.6mm -6mm 1.2mm; }
.ph-sub { display: flex; justify-content: space-between; align-items: flex-start; font-size: .8em; line-height: 1.25; }
.ph-left { font-family: Calibri, Arial, sans-serif; font-size: .92em; padding-top: .4mm; }
.ph-right { width: 64mm; }

/* footer */
.pg-foot { flex: none; margin-top: 2mm; }
.pf-rule { border-top: 2.2px solid #000; margin: 0 -6mm 1.5mm; }
.pf-row { display: flex; justify-content: space-between; font-size: .8em; font-weight: 700; min-height: 1em; }

/* body */
.page-body { flex: 1 1 auto; min-height: 0; overflow: hidden; }
.blk { margin: 0 0 var(--gap); }
.blk:last-child { margin-bottom: 0; }
.rt p, .rt div { margin: 0 0 .28em; }
.rt p:last-child, .rt div:last-child { margin-bottom: 0; }
.rt ul, .rt ol { margin: .1em 0 .3em; padding-left: 1.6em; }
.rt li { margin: 0 0 .12em; padding-left: .2em; }
.rt h1, .rt h2, .rt h3, .rt h4 { margin: .2em 0 .25em; }
.rt h1 { font-size: 1.6em; } .rt h2 { font-size: 1.35em; } .rt h3 { font-size: 1.15em; } .rt h4 { font-size: 1.05em; }

.blk-heading { font-weight: 700; }
.blk-heading.lv1 { font-size: 1.9em; margin-top: 1mm; }
.blk-heading.lv2 { font-size: 1.3em; }
.blk-heading.lv3 { font-size: 1.12em; }

.st-banner { background: var(--acc); color: var(--acc-ink); border: 1px solid #000; padding: 1.2mm 4mm 1.6mm; margin-left: auto; margin-right: auto; text-align: center; }
.st-banner .rt p, .st-banner .rt div { margin: 0; }
.st-box { border: 1px solid #000; padding: 2mm 3mm; margin-left: auto; margin-right: auto; }
.st-highlight .rt > * { display: table; background: #ff0; font-weight: 700; padding: 0 1mm; margin-bottom: .1em; }
.st-note { font-size: .9em; font-style: italic; margin-left: auto; margin-right: auto; }

.blk-boxes { display: flex; align-items: stretch; }
.blk-boxes .box { flex: 1 1 0; min-width: 0; padding: 1mm 2.2mm 1.4mm; line-height: 1.3; }
.blk-boxes .box p, .blk-boxes .box div { margin: 0; }
.bx-accent .box { background: var(--acc); color: var(--acc-ink); border: 1px solid #000; }
.bx-bordered .box { border: 1px solid #000; }

table.qt { width: 100%; border-collapse: collapse; table-layout: fixed; }
table.qt td { border: 1px solid #000; padding: .25mm 1.6mm .45mm; vertical-align: top; word-wrap: break-word; overflow-wrap: anywhere; }
table.qt td.b { font-weight: 700; }
table.qt tr.t-title td { background: var(--acc); color: var(--acc-ink); font-weight: 700; font-size: 1.08em; padding-top: .5mm; padding-bottom: .6mm; }
table.qt tr.t-head td { background: var(--acc); color: var(--acc-ink); font-weight: 700; }
table.qt tr.stripe td { background: var(--stripe); }

.blk-image img { display: inline-block; max-width: 100%; height: auto; vertical-align: top; }
.blk-image .cap { font-size: .9em; font-style: italic; margin-top: 1mm; }
.img-ph { border: 2px dashed #b9c3cf; color: #7a8796; padding: 8mm; text-align: center; font-family: "Segoe UI", Arial, sans-serif; font-size: 10pt; }
.blk-signature img { display: block; height: auto; margin: 1mm 0; }

/* screen-only helpers */
.tk-empty::after { content: "[" attr(data-k) "]"; color: #c62828; background: #fdecea; border: 1px dashed #ef9a9a; border-radius: 2px; font: 600 7.5pt/1.3 "Segoe UI", Arial, sans-serif; padding: 0 3px; white-space: nowrap; }
.pv-doc .blk { cursor: pointer; transition: outline-color .2s; outline: 1.5px dashed transparent; outline-offset: 1mm; }
.pv-doc .blk:hover { outline-color: rgba(11, 132, 216, .55); }
.pv-doc .blk.flash { animation: blkflash 1.4s ease; }
@keyframes blkflash { 0%, 60% { outline-color: #0b84d8; background-color: rgba(11, 132, 216, .08); } 100% { outline-color: transparent; } }
.pv-doc .overflowing { outline: 2px solid #e53935 !important; }

/* print */
#print-root { display: none; }
#print-root.measuring { display: block; position: absolute; left: -30000px; top: 0; visibility: hidden; }
.pdf-render-host { position: fixed; left: 0; top: 0; z-index: -10; pointer-events: none; }
.pdf-render-host .page { box-shadow: none; margin: 0; }

@page { size: A4; margin: 0; }
@media print {
  html, body { background: #fff !important; height: auto !important; overflow: visible !important; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block !important; position: static; visibility: visible; }
  #print-root .page { margin: 0; box-shadow: none; break-after: page; page-break-after: always; }
  #print-root .page:last-child { break-after: auto; page-break-after: auto; }
  .tk-empty::after { content: none !important; }
}

/* ============================ MODERN DESIGN ============================ */
.theme-modern .page { line-height: 1.32; padding: 8mm 13mm 6mm; color: #1d2733; }
/* header */
.theme-modern .pg-head { margin-bottom: 5mm; }
.mh-top { display: flex; align-items: center; gap: 5mm; }
.mh-logo { flex: none; width: 38mm; display: flex; align-items: center; }
.mh-logo img { max-width: 38mm; max-height: 18mm; width: auto; height: auto; display: block; }
.mh-co { flex: 1 1 auto; min-width: 0; padding-left: 4mm; border-left: 1px solid var(--line); }
.mh-name { color: var(--dark); font-weight: 700; font-size: 1.45em; letter-spacing: .4px; line-height: 1.15; }
.mh-addr { color: var(--muted); font-size: .76em; line-height: 1.35; margin-top: .8mm; }
.mh-info { flex: none; text-align: right; color: var(--muted); font-size: .72em; line-height: 1.45; }
.mh-bar { height: 1.3mm; margin: 2.6mm 0 0; background: linear-gradient(90deg, var(--dark) 0%, var(--dark) 55%, var(--acc) 100%); border-radius: 1mm; }
.mh-sub { display: flex; justify-content: space-between; align-items: center; background: var(--tint); padding: 1.2mm 3mm; font-size: .78em; color: var(--dark); border-radius: 0 0 1.2mm 1.2mm; }
.mh-left { font-weight: 700; letter-spacing: .3px; }
.mh-right span { white-space: nowrap; }
.mh-right i { display: inline-block; width: 1px; height: .9em; background: #9fb0c2; margin: 0 2.5mm; vertical-align: -1px; }
/* footer */
.theme-modern .pf-rule { border-top: 1px solid var(--line); margin: 0 0 1.6mm; }
.theme-modern .pf-row { font-size: .74em; font-weight: 400; color: var(--muted); }
.theme-modern .pf-num { color: var(--dark); font-weight: 700; }

/* headings */
.theme-modern .blk-heading { color: var(--dark); }
.theme-modern .blk-heading.lv1 { font-size: 2em; letter-spacing: .6px; margin: 1mm 0 2mm; }
.theme-modern .blk-heading.lv2, .theme-modern .blk-heading.lv3 { border-left: 1.3mm solid var(--acc); padding: .3mm 0 .3mm 2.6mm; margin-top: 1.5mm; }
.theme-modern .blk-heading.lv2 { font-size: 1.28em; }
.theme-modern .blk-heading.lv3 { font-size: 1.1em; }
.theme-modern .blk-heading[style*="center"] { border-left: 0; padding-left: 0; }

/* text styles */
.theme-modern .st-title .rt p { font-size: 2.3em; font-weight: 700; letter-spacing: 7px; color: var(--dark); text-transform: uppercase; margin: 0; }
.theme-modern .st-title::after { content: ""; display: block; width: 22mm; height: 1mm; background: var(--acc); margin: 1.6mm auto 0; border-radius: 1mm; }
.theme-modern .st-title[style*="left"]::after { margin-left: 0; }
.theme-modern .st-banner { background: var(--dark); color: #fff; border: 0; border-radius: 1.5mm; padding: 2.5mm 5mm; }
.theme-modern .st-box { border: 1px solid var(--line); border-radius: 1.5mm; padding: 2.5mm 4mm; }
.theme-modern .st-panel, .st-panel { background: var(--tint); border-left: 1.3mm solid var(--acc); border-radius: 0 1.5mm 1.5mm 0; padding: 2.4mm 4mm; }
.theme-modern .st-highlight .rt > * { display: block; background: none; color: var(--dark); font-size: 1.28em; font-weight: 700; border-left: 1.3mm solid var(--acc); padding: .3mm 0 .3mm 2.6mm; }
.theme-modern .st-note { color: var(--muted); font-size: .86em; }
.theme-modern .rt ul { padding-left: 1.4em; }
.theme-modern .rt ul li::marker { color: var(--acc); }

/* boxes */
.theme-modern .bx-accent .box { background: var(--dark); color: #fff; border: 0; border-radius: 1.5mm; padding: 2.4mm 3.5mm; }
.theme-modern .bx-bordered .box { border: 1px solid var(--line); border-radius: 1.5mm; padding: 2.4mm 3.5mm; }
.bx-tiles .box { background: var(--tint); border: 1px solid var(--line); border-radius: 1.5mm; padding: 2mm 3.5mm; color: var(--dark); }
.bx-tiles .box > p:first-child { font-size: .72em; text-transform: uppercase; letter-spacing: .8px; color: var(--muted); font-weight: 600; margin-bottom: .6mm; }
.bx-tiles .box > p:not(:first-child) { font-size: 1.12em; font-weight: 700; }
.bx-cards .box { background: #fff; border: 1px solid var(--line); border-top: 1.2mm solid var(--acc); border-radius: 1.5mm; padding: 2.4mm 3.5mm 2.8mm; line-height: 1.38; }
.bx-cards .box > p:first-child { font-size: .74em; text-transform: uppercase; letter-spacing: .9px; color: var(--acc); font-weight: 700; margin-bottom: 1mm; filter: brightness(.75); }

/* tables */
.theme-modern table.qt td { border: 1px solid var(--line); padding: .9mm 2.4mm 1mm; }
.theme-modern table.qt tr.t-title td { background: var(--dark); color: #fff; font-size: .92em; text-transform: uppercase; letter-spacing: .8px; padding: 1.3mm 2.4mm; border-color: var(--dark); }
.theme-modern table.qt tr.t-head td { background: var(--head-bg); color: var(--dark); font-weight: 700; }
.theme-modern table.qt tr.stripe td { background: var(--stripe); }
.theme-modern table.qt td.lbl { background: var(--tint); color: #3f4c5a; }
.theme-modern table.qt td.b { color: #12202e; }

/* ---------- price table in the quotation (totals rows, number columns) ---------- */
table.qt tr.t-foot td { background: var(--head-bg, #e1ecf6); font-weight: 700; }
.theme-modern table.qt tr.t-foot td { background: var(--head-bg); color: var(--dark); }
.theme-modern table.qt tr.t-foot:last-child td { background: var(--dark); color: #fff; border-color: var(--dark); letter-spacing: .3px; }
table.qt.qt-num td { padding-left: 1.4mm; padding-right: 1.4mm; }
table.qt.qt-num tr.t-head td { font-size: .92em; vertical-align: middle; }
