/* === Fuentes === * Para HTML→PDF con OpenHTMLtoPDF, es preferible registrar las TTF en el renderer. * Aun así, incluimos @font-face por si renderizas en navegador. * Coloca los TTF en /static/fonts/ y ajusta los nombres si procede. */ @font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Regular.ttf") format("truetype"); font-weight: 400; font-style: normal; } @font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-SemiBold.ttf") format("truetype"); font-weight: 600; font-style: normal; } @font-face { font-family: "Open Sans"; src: url("/assets/fonts/OpenSans-Bold.ttf") format("truetype"); font-weight: 700; font-style: normal; } :root { --text: #1f2937; --muted: #6b7280; --border: #e5e7eb; --brand: #0ea5e9; /* azul suave */ --bg-light: #f8fafc; /* gris muy claro */ } @page { size: A4; margin: 18mm 15mm 22mm 15mm; @bottom-right { content: "Página " counter(page) " / " counter(pages); } } html, body { font-family: "Open Sans", Arial, sans-serif; color: var(--text); font-size: 11pt; line-height: 1.35; } * { box-sizing: border-box; } .doc-header { display: table; width: 100%; margin-bottom: 10mm; border-bottom: 2px solid var(--brand); padding-bottom: 6mm; } .brand { display: table-cell; vertical-align: top; width: 60%; } .logo { height: 34px; margin-bottom: 6px; } .brand-meta { margin-top: 4px; } .company-name { font-weight: 700; font-size: 12pt; } .company-meta { color: var(--muted); font-size: 9.5pt; } .doc-title { display: table-cell; vertical-align: top; width: 40%; text-align: right; } .title-main { font-size: 18pt; font-weight: 700; letter-spacing: 0.5px; } .doc-info { margin-top: 6px; margin-left: auto; font-size: 10pt; border-collapse: collapse; } .doc-info td { padding: 3px 0 3px 12px; border-bottom: 1px solid var(--border); } .doc-info td:first-child { color: var(--muted); padding-left: 0; } .right { text-align: right; } .blocks { display: table; width: 100%; table-layout: fixed; margin-bottom: 8mm; } .block { display: table-cell; width: 50%; padding-right: 6mm; vertical-align: top; } .block:last-child { padding-right: 0; } .block-title { font-weight: 600; text-transform: uppercase; font-size: 10pt; color: var(--brand); margin-bottom: 2mm; } .block-body { border: 1px solid var(--border); padding: 4mm; background: var(--bg-light); } .row { margin-bottom: 2mm; display: block; } .row .label { display: inline-block; width: 27%; color: var(--muted); } .row .value { display: inline-block; width: 70%; vertical-align: top; } .table-section .section-title, .notes .section-title { font-weight: 600; font-size: 10.5pt; margin: 6mm 0 2mm 0; } .items { width: 100%; border-collapse: collapse; font-size: 10.5pt; } .items thead th { text-align: left; border-bottom: 2px solid var(--brand); padding: 6px 6px; background: #eef8fe; font-weight: 600; } .items tbody td { border-bottom: 1px solid var(--border); padding: 6px 6px; vertical-align: top; } .items .col-right { text-align: right; } .items .col-center { text-align: center; } .items .col-desc .desc { font-weight: 600; } .items .col-desc .meta { color: var(--muted); font-size: 9.5pt; margin-top: 2px; } .items .group-header td { background: var(--bg-light); color: var(--brand); font-weight: 600; } .totals { margin-top: 6mm; display: block; width: 100%; } .totals-table { margin-left: auto; border-collapse: collapse; min-width: 70mm; } .totals-table td { padding: 4px 0 4px 14px; border-bottom: 1px solid var(--border); } .totals-table td:first-child { color: var(--muted); padding-left: 0; } .totals-table .total-row td { border-bottom: 2px solid var(--brand); padding-top: 6px; padding-bottom: 6px; } .totals-table .right { text-align: right; } .notes .note-text { border: 1px solid var(--border); padding: 4mm; background: #fff; font-size: 10pt; white-space: pre-wrap; } .doc-footer { margin-top: 8mm; padding-top: 4mm; border-top: 1px solid var(--border); display: table; width: 100%; color: var(--muted); font-size: 9pt; } .footer-left { display: table-cell; } .footer-right { display: table-cell; text-align: right; } /* Compatibilidad PDF (OpenHTMLtoPDF) */ .page-number::after { content: counter(page); } .page-count::after { content: counter(pages); }