/* Documents: «Δελτίο μετρήσεων» and «Δελτίο παραγγελίας προς προμηθευτή».
   On screen they look like paper; in print they become A4 pages with numbered footers. */

.doc-tools { display: grid; gap: 12px; margin-bottom: 18px; }
.paper { background: #fff; color: #000; border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.08); padding: 28px; font-size: 15px; line-height: 1.35; }
.paper h1 { font-size: 24px; letter-spacing: 0; }
.paper h2 { font-size: 17px; }
.doc-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; border-bottom: 4px solid #000; padding-bottom: 12px; margin-bottom: 12px; }
.doc-brand { font-weight: 900; font-size: 13px; letter-spacing: .08em; }
.doc-stamp { border: 3px solid #000; padding: 6px 10px; font-weight: 900; font-size: 14px; text-align: center; align-self: start; max-width: 15rem; }
.doc-stamp.draft { border-color: #b8231a; color: #b8231a; }
.doc-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2px 18px; font-size: 13px; margin: 8px 0 14px; }
.doc-meta div span { color: #444; }
.doc-legend { font-size: 12px; border: 1px solid #999; padding: 6px 10px; margin-bottom: 14px; }
.doc-item { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 16px; border-top: 2px solid #000; padding: 12px 0; break-inside: avoid; page-break-inside: avoid; }
.doc-item .doc-sketch svg { width: 190px; height: auto; }
.doc-item h2 { display: flex; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.doc-item .code { background: #000; color: #fff; padding: 1px 7px; border-radius: 4px; font-size: 15px; }
.doc-dims { font-size: 20px; font-weight: 900; margin: 4px 0; }
.doc-table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 4px; }
.doc-table th { text-align: left; font-weight: 600; color: #333; width: 38%; padding: 3px 6px 3px 0; vertical-align: top; }
.doc-table td { font-weight: 700; padding: 3px 0; }
.doc-table .unk { color: #8f5b00; font-style: italic; }
.doc-photos { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.doc-photos img { width: 110px; height: 110px; object-fit: cover; border: 1px solid #999; }
.doc-lines { width: 100%; border-collapse: collapse; font-size: 13px; }
.doc-lines th, .doc-lines td { border: 1px solid #000; padding: 6px; text-align: left; vertical-align: top; }
.doc-lines th { background: #eee; }
.doc-lines .q { font-size: 18px; font-weight: 900; text-align: center; margin: 0; }
.doc-lines .dims { font-size: 16px; font-weight: 900; white-space: nowrap; }
.doc-foot { border-top: 2px solid #000; margin-top: 16px; padding-top: 8px; font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.doc-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 30px; font-size: 13px; }
.doc-sign div { border-top: 1px solid #000; padding-top: 4px; }
.doc-ref { font-size: 12px; color: #333; border: 1px dashed #777; padding: 6px 8px; margin-top: 6px; }
.doc-watermark { color: #b8231a; font-weight: 900; }
@media (max-width: 560px) {
  .paper { padding: 16px; font-size: 14px; }
  .doc-head { grid-template-columns: minmax(0, 1fr); }
  .doc-item { grid-template-columns: minmax(0, 1fr); }
  .doc-item .doc-sketch svg { width: 100%; max-width: 230px; }
  .doc-meta { grid-template-columns: minmax(0, 1fr); }
  .doc-lines { font-size: 12px; }
}

@media print {
  @page {
    size: A4; margin: 14mm 12mm 16mm;
    @bottom-right { content: "Σελίδα " counter(page) " από " counter(pages); font-size: 9pt; font-family: system-ui, Arial, sans-serif; }
    @bottom-left { content: string(docid); font-size: 9pt; font-family: system-ui, Arial, sans-serif; }
  }
  html, body { background: #fff !important; font-size: 11pt; }
  .topbar, .bottombar, .no-print, .doc-tools, .overlay, .banner { display: none !important; }
  .page { max-width: none; padding: 0; margin: 0; }
  .paper { border: 0; box-shadow: none; padding: 0; font-size: 10.5pt; }
  .doc-id { string-set: docid content(); }
  .doc-item { break-inside: avoid; }
  .doc-lines tr { break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
@media print { .table-scroll { overflow: visible; } }

/* «Οικονομική προσφορά» for the customer: the parts of Διαχρονική's old quote, in the colours of its logo. */
.qd {
  --qd-blue: #0e599a; --qd-blue-2: #0a467a; --qd-red: #941a1d; --qd-ink: #17202a; --qd-muted: #5b6672; --qd-line: #d9e0e8; --qd-soft: #f1f5f9;
  color: var(--qd-ink); font-size: 13.5px; line-height: 1.42; padding: 34px 38px 28px;
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.qd h1, .qd h2, .qd h3 { letter-spacing: 0; }
.qd-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-bottom: 14px; border-bottom: 3px solid var(--qd-blue); }
.qd-logo { width: 96px; height: auto; flex: none; }
.qd-company { display: grid; gap: 1px; text-align: right; font-size: 12px; color: var(--qd-muted); }
.qd-company strong { font-size: 15.5px; color: var(--qd-blue); margin-bottom: 3px; }
.qd-title { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin: 22px 0 18px; }
.qd-eyebrow { margin: 0 0 2px; color: var(--qd-red); font-style: italic; font-size: 12.5px; }
.qd-title h1 { font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--qd-ink); }
.qd-title h1::after { content: ""; display: block; width: 64px; height: 4px; margin-top: 9px; border-radius: 2px; background: var(--qd-red); }
.qd-ref { display: grid; grid-template-columns: auto auto; gap: 3px 16px; margin: 0; font-size: 12.5px; }
.qd-ref div { display: contents; }
.qd-ref dt { color: var(--qd-muted); }
.qd-ref dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.qd-ref small { font-weight: 600; color: var(--qd-muted); }
.qd-parties { display: grid; grid-template-columns: 1.25fr 1.25fr 1fr; gap: 10px; margin-bottom: 20px; }
.qd-parties section { display: grid; align-content: start; gap: 1px; padding: 10px 12px; border-radius: 10px; background: var(--qd-soft); border-left: 3px solid var(--qd-blue); font-size: 12.5px; color: var(--qd-muted); }
.qd-parties h2 { font-size: 11px; font-weight: 700; color: var(--qd-blue); margin-bottom: 2px; }
.qd-parties strong { font-size: 14px; color: var(--qd-ink); }
.qd-items-head, .qd-item { display: grid; grid-template-columns: 24px 118px minmax(0, 1fr) 150px 104px; column-gap: 12px; }
.qd-items-head { padding: 7px 10px; border-radius: 8px 8px 0 0; background: var(--qd-blue); color: #fff; font-size: 11.5px; font-weight: 700; }
.qd-items-head span:first-child { grid-column: 1 / 4; }
.qd-items-head span:nth-child(2), .qd-items-head span:nth-child(3) { text-align: right; }
.qd-item { align-items: start; padding: 12px 10px; border-bottom: 1px solid var(--qd-line); break-inside: avoid; page-break-inside: avoid; }
.qd-no { grid-column: 1; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--qd-ink); color: #fff; font-size: 11px; font-weight: 700; }
.qd-pic { grid-column: 2; padding: 4px; border: 1px solid var(--qd-line); border-radius: 8px; background: #fff; }
.qd-pic svg { display: block; width: 100%; height: auto; }
.qd-desc { grid-column: 3; min-width: 0; }
.qd-item.no-pic .qd-desc { grid-column: 2 / 4; }
.qd-desc strong { display: block; font-size: 14.5px; line-height: 1.3; }
.qd-desc p { margin: 3px 0 0; font-size: 12.5px; color: var(--qd-muted); }
.qd-desc .qd-note { color: var(--qd-red); font-weight: 700; }
.qd-code { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 5px; background: var(--qd-ink); color: #fff; font-size: 11px; font-weight: 700; vertical-align: 1px; }
.qd-dims { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; margin-bottom: 5px; }
.qd-dims span { padding: 1px 9px; border-radius: 999px; border: 1px solid #c9d8e8; background: #eef4fa; color: var(--qd-blue); font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.qd-dims small { color: var(--qd-muted); font-size: 11px; }
.qd-money { display: contents; }
.qd-qty { grid-column: 4; text-align: right; color: var(--qd-muted); font-size: 12.5px; white-space: nowrap; font-variant-numeric: tabular-nums; padding-top: 1px; }
.qd-money strong { grid-column: 5; text-align: right; font-size: 14.5px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qd-option { margin-top: 14px; padding: 6px 10px; border-left: 4px solid var(--qd-red); background: #fbf2f2; color: var(--qd-red); font-weight: 700; break-after: avoid; page-break-after: avoid; }
.qd-empty { padding: 14px 10px; color: var(--qd-muted); }
.qd-summary { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; margin-top: 24px; break-inside: avoid; page-break-inside: avoid; }
.qd-block + .qd-block, .qd-block + .qd-small { margin-top: 14px; }
.qd-block h3 { margin-bottom: 6px; font-size: 13px; font-weight: 700; color: var(--qd-blue); }
.qd-block ul { margin: 0; padding-left: 1.1em; font-size: 12px; color: #39434e; }
.qd-block li + li { margin-top: 2px; }
.qd-notes { padding: 8px 10px; border: 1px dashed #c3cdd8; border-radius: 8px; font-size: 12.5px; }
.qd-plan { width: 100%; border-collapse: collapse; font-size: 12px; }
.qd-plan th { width: 46px; padding: 5px 0; text-align: left; color: var(--qd-blue); font-weight: 700; }
.qd-plan td { padding: 5px 0; color: #39434e; }
.qd-plan .qd-amt { text-align: right; font-weight: 700; color: var(--qd-ink); white-space: nowrap; padding-left: 10px; font-variant-numeric: tabular-nums; }
.qd-plan .qd-amt small { font-weight: 600; color: var(--qd-muted); }
.qd-plan tr + tr th, .qd-plan tr + tr td { border-top: 1px solid #e8edf2; }
.qd-small { font-size: 11.5px; color: var(--qd-muted); }
.qd-analysis { border: 1px solid var(--qd-line); border-radius: 12px; overflow: hidden; }
.qd-analysis h3 { padding: 8px 12px; border-bottom: 1px solid var(--qd-line); background: var(--qd-soft); color: var(--qd-blue); font-size: 13px; font-weight: 700; }
.qd-analysis table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.qd-analysis th { padding: 6px 12px; text-align: left; font-weight: 600; color: #39434e; }
.qd-analysis td { padding: 6px 12px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qd-analysis td small { display: block; font-size: 10.5px; color: var(--qd-muted); }
.qd-analysis tr + tr th, .qd-analysis tr + tr td { border-top: 1px solid #edf1f5; }
.qd-analysis .qd-sub th, .qd-analysis .qd-sub td { font-weight: 700; color: var(--qd-ink); }
.qd-analysis .qd-opt-row td { color: var(--qd-red); font-weight: 700; font-size: 11.5px; }
.qd-incl { margin: 0; padding: 8px 12px; border-top: 1px solid #edf1f5; font-size: 11.5px; font-style: italic; color: var(--qd-muted); }
.qd-final { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 12px 14px; background: var(--qd-blue); color: #fff; }
.qd-final + .qd-final { border-top: 1px solid rgba(255, 255, 255, .3); background: var(--qd-blue-2); }
.qd-final span { font-size: 12.5px; font-weight: 700; }
.qd-final strong { font-size: 21px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.qd-sign { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; margin-top: 34px; break-inside: avoid; page-break-inside: avoid; }
.qd-sign div { display: grid; }
.qd-sign span { font-size: 11.5px; font-weight: 700; color: var(--qd-blue); }
.qd-sign strong { margin-top: 52px; padding-top: 6px; border-top: 1.5px solid var(--qd-ink); font-size: 13px; font-weight: 600; }
.qd-printed { margin: 18px 0 0; text-align: right; font-size: 10.5px; color: var(--qd-muted); }
@media (max-width: 680px) {
  .qd { padding: 18px 14px; font-size: 13px; }
  .qd-head { flex-direction: column; align-items: flex-start; gap: 10px; }
  .qd-company { text-align: left; }
  .qd-logo { width: 72px; }
  .qd-title { flex-direction: column; align-items: flex-start; }
  .qd-title h1 { font-size: 24px; }
  .qd-parties { grid-template-columns: minmax(0, 1fr); }
  .qd-items-head { display: none; }
  .qd-item { grid-template-columns: 22px 84px minmax(0, 1fr); row-gap: 8px; border-top: 1px solid var(--qd-line); border-bottom: 0; }
  .qd-item.no-pic .qd-desc { grid-column: 2 / 4; }
  .qd-qty { grid-column: 2 / 3; text-align: left; }
  .qd-money strong { grid-column: 3; }
  .qd-summary { grid-template-columns: minmax(0, 1fr); }
  .qd-sign { gap: 18px; }
}
@media print {
  .paper.qd { padding: 0; font-size: 9.6pt; }
  .qd-title h1 { font-size: 22pt; }
  .qd-item { padding: 9px 8px; }
  .qd-items-head, .qd-item { grid-template-columns: 20px 104px minmax(0, 1fr) 128px 92px; }
}
