﻿/* Shared print design. Loaded last so screen themes and mobile breakpoints
   cannot override paper geometry, colours or document grids. */
:root, html, body {
    --theme-bg:#fff; --theme-card:#fff; --theme-raised:#f1f5f7;
    --theme-input:#fff; --theme-text:#172b38; --theme-secondary:#334b5c;
    --theme-muted:#576c79; --theme-line:#d2dde3;
    color-scheme:light!important;
}
html, body, body .tf-main, body .tf-content {
    display:block!important; position:static!important; transform:none!important;
    width:auto!important; min-width:0!important; max-width:none!important;
    height:auto!important; min-height:0!important; max-height:none!important;
    overflow:visible!important; margin:0!important; background:#fff!important;
    color:#172b38!important; box-shadow:none!important;
}
html, body { padding:0!important; font-family:Tahoma,Arial,sans-serif!important;
    font-size:var(--pt-font,10pt)!important; line-height:1.5!important; }
body .tf-main { padding:0!important; }
body .tf-content, body>.sheet, body>.tf-report-sheet {
    /* Inset protects against edge-to-edge output even when browser margins are disabled. */
    padding:3mm!important; box-sizing:border-box!important;
}
*, *::before, *::after { box-sizing:border-box; }
.tf-navbar,.tf-topbar,.tf-sidebar,.tf-footer,.sidebar-overlay,#sidebarOverlay,
.tf-bottom-nav,.tf-staff-bottom-nav,.tf-app-drawer,.tf-app-drawer-overlay,
#tf-webpush-banner,.tf-pagesize-bar,.tf-pagination-bar,.report-print-tools,
.cv-print-actions,.cv-heading .btn,.fd-noprint,.br-no-print,.statement-no-print,
.tfx-actions,.tfx-page>nav,.bar,.modal,.swal2-container { display:none!important; }
body.report-print-page button,body.report-print-page .btn,
body.report-print-page form,body.report-print-page input,
body.report-print-page select,body.report-print-page textarea { display:none!important; }
.fd-page,.cv-detail,.statement-page,.tb-page,.tfx-page,.sheet {
    width:100%!important; min-width:0!important; max-width:none!important;
    margin:0!important; box-shadow:none!important; color:#172b38!important;
}
body>.sheet { border:0!important; border-radius:0!important; }
.tf-card,.cv-info,.cv-ledger,.br-group,.tfx-card {
    box-shadow:none!important; background:#fff!important; color:#172b38!important;
}
.table-responsive,.table-scroll,.table-wrapper,.tf-table-wrap,.br-scroll,.cv-table,
.ca-panel,.cv-ledger { overflow:visible!important; max-height:none!important; }
table { width:100%!important; min-width:0!important; border-collapse:collapse!important;
    color:#172b38!important; background:#fff!important; font-variant-numeric:tabular-nums; }
th,td { position:static!important; white-space:normal; overflow-wrap:anywhere;
    color:#172b38!important; border-color:#d2dde3!important; box-shadow:none!important;
    padding:2.3mm 2.8mm!important; vertical-align:top; font-size:var(--pt-font,10pt); }
th { background:var(--pt-accent,#173d53)!important; color:#fff!important; font-weight:700; }
tbody tr:nth-child(even) td { background:#f7f9fa!important; }
thead { display:table-header-group!important; } tfoot { display:table-row-group!important; }
tr { break-inside:avoid; page-break-inside:avoid; }
h1,h2,h3 { color:var(--pt-accent,#173d53)!important; line-height:1.35;
    break-after:avoid; page-break-after:avoid; }
h1 { font-size:18pt!important; } h2 { font-size:12pt!important; } h3 { font-size:11pt!important; }
a { color:inherit!important; text-decoration:none!important; }
.badge,.fd-chip { box-shadow:none!important; color:#172b38!important; background:#eef3f6!important; }
.pt-header,.fd-invoice-header,.top {
    display:flex!important; align-items:flex-start!important; justify-content:space-between;
    gap:6mm!important; padding:4mm 0 4mm!important; margin:0 0 5mm!important;
    border-top:2.5mm solid var(--pt-accent,#173d53)!important; border-bottom:1mm solid #b89450!important;
    color:#172b38!important; background:#fff!important; break-inside:avoid;
}
.pt-header>div,.fd-invoice-header>div:first-child,.top>div {
    flex:1 1 0; min-width:0!important; overflow-wrap:anywhere;
}
.pt-header .pt-name,.fd-invoice-header h1 { font-size:16pt!important; margin:0 0 2mm!important; }
.pt-header small,.fd-invoice-contact { color:#576c79!important; font-size:8pt!important;
    white-space:normal!important; overflow-wrap:anywhere; line-height:1.6; }
.pt-header img,.top img,.fd-invoice-header img { max-height:18mm!important; max-width:38mm!important;
    object-fit:contain; flex-shrink:0; }
.fd-invoice-header .invoice-document { flex:0 0 36mm!important; min-width:0;
    text-align:end; overflow-wrap:anywhere; }
.invoice-document h2 { font-size:18pt!important; margin:0 0 2mm!important; }
.fd-invoice-header { border-top:0!important; padding-top:0!important; }
.fd-invoice-header .invoice-document { flex-basis:46mm!important; }
.invoice-document h2 { white-space:nowrap; }
.invoice-caption { display:block; font-size:8pt!important; color:#576c79!important; }
.invoice-reference { display:block; font-size:16pt!important; font-weight:700; }
.fd-invoice-meta { display:grid!important; grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)!important;
    gap:5mm!important; padding:4mm!important; margin:0 0 5mm!important;
    background:#f3f6f8!important; border:1px solid #d2dde3!important; border-radius:2mm; break-inside:avoid; }
.invoice-client { font-size:12pt!important; overflow-wrap:anywhere; }
.invoice-section { margin:0 0 5mm!important; break-inside:auto!important; }
.invoice-section h2 { border-inline-start:3px solid #b89450;
    padding:2mm 3mm!important; margin:4mm 0 2mm!important; background:#eef3f6; }
.fd-invoice-table { table-layout:fixed!important; }
.fd-invoice-table th,.fd-invoice-table td { font-size:9pt!important; line-height:1.5; }
.invoice-money { white-space:nowrap!important; direction:ltr; text-align:end!important; }
.fd-invoice-total { display:flex!important; justify-content:space-between; gap:5mm;
    margin:5mm 0!important; padding:4mm 5mm!important; border:2px solid var(--pt-accent,#173d53)!important;
    border-radius:2mm; background:var(--pt-accent,#173d53)!important; color:#fff!important; break-inside:avoid; }
.fd-invoice-total * { color:#fff!important; }
.invoice-total-amount { font-size:20pt!important; }
.cv-heading { display:block!important; background:#fff!important; padding:0!important;
    margin:0 0 5mm!important; border-radius:0!important; text-align:center; }
.cv-heading h1 { margin:0!important; color:var(--pt-accent,#173d53)!important; }
.cv-info { display:grid!important; grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    gap:0!important; padding:0!important; border:1px solid #d2dde3!important;
    border-radius:2mm!important; background:#fff!important; break-inside:auto!important; }
.cv-info>div { min-width:0; padding:3mm 4mm!important; border-bottom:1px solid #e2e9ed;
    break-inside:avoid; background:#fff!important; }
.cv-info dt { font-size:8.5pt!important; color:#576c79!important; margin:0 0 1mm!important; }
.cv-info dd { font-size:11pt!important; color:#172b38!important; margin:0!important;
    white-space:pre-wrap; overflow-wrap:anywhere; }
.cv-info .cv-wide { grid-column:1/-1!important; }
.cv-info .cv-amount { background:#fff8e6!important; border:2px solid var(--pt-accent,#173d53)!important; border-inline-start:2mm solid #b89450!important; }
.cv-info .cv-amount dd { font-size:17pt!important; font-weight:700; font-variant-numeric:tabular-nums; }
.cv-detail>p { display:block!important; font-size:9pt!important; padding:2mm 0; }
.pt-sign { display:flex!important; gap:7mm!important; margin:10mm 0 4mm!important; break-inside:avoid; }
.pt-sign>div { flex:1; min-width:0; text-align:center; font-size:9pt; color:#334b5c; }
.pt-sign i { height:8mm!important; border-bottom:1px solid #a9bbc6!important; margin-bottom:2mm!important; }
.pt-foot,.foot { margin-top:5mm!important; padding-top:3mm!important; border-top:1px solid #d2dde3!important;
    color:#576c79!important; font-size:8pt!important; line-height:1.6; overflow-wrap:anywhere; break-inside:avoid; }
.report-print-brand,.statement-print-brand,.tb-brand { display:none!important; }
body.report-print-page .report-print-title { display:block!important; margin:0 0 4mm; font-size:16pt; }
body.report-print-page table { font-size:9pt!important; }
body.report-print-page td,body.report-print-page th { font-size:9pt!important; padding:2mm!important; }
.report-print-title { display:none; }
.sheet .top { margin-bottom:5mm!important; }.sheet td:first-child { width:30%; color:#576c79!important; }
.sheet .pax { padding-inline-start:6mm; columns:2; column-gap:8mm; }
.sheet .pax li { break-inside:avoid; padding:1mm 0; }

.report-print-summary { display:none; }
body.report-print-page .report-print-summary { display:flex!important; flex-wrap:wrap; gap:2mm 6mm; padding:3mm; margin:0 0 4mm; background:#f1f5f7; border:1px solid #d2dde3; break-inside:avoid; }
.report-print-summary:empty { display:none!important; }
.report-print-summary>div { display:flex; gap:2mm; }
.report-print-summary dt { font-weight:700; }.report-print-summary dd { margin:0; }
.report-print-heading { break-inside:avoid; }
.tfx-scroll { overflow:visible!important; max-height:none!important; }
.arv-filters,.arv-chips { display:none!important; }
.arv-stats,.tfx-stats { display:grid!important; grid-template-columns:repeat(4,minmax(0,1fr))!important; gap:3mm; break-inside:avoid; }
.arv-stat,.tfx-stat { background:#f1f5f7!important; color:#172b38!important; border:1px solid #d2dde3; border-radius:2mm; padding:3mm; box-shadow:none!important; }

/* Keep identical print contrast in both saved screen themes. */
html[data-theme] body { --theme-page:#fff!important; --theme-card:#fff!important; --theme-text:#172b38!important; --theme-raised:#f1f5f7!important; --theme-secondary:#334b5c!important; --theme-line:#d2dde3!important; }
html[data-theme] .tf-content table :is(td,th) { color:#172b38!important; background:#fff!important; }
html[data-theme] .tf-content table th { color:#fff!important; background:var(--pt-accent,#173d53)!important; }
html[data-theme] .tf-content table tbody tr:nth-child(even) td { background:#f7f9fa!important; }
html[data-theme] :is(.tf-badge,.badge,.hotel-badge,.fd-badge) { --badge-bg:#eef3f6; --badge-text:#172b38; --badge-border:#c5d3db; background:#eef3f6!important; color:#172b38!important; border-color:#c5d3db!important; }

body.report-print-page :is(.tfx-head,.tb-heading,.arv-head,.tf-page-title) h1 { display:none!important; }
body.report-print-page .tf-page-title-icon { display:none!important; }
body.report-print-page canvas,body.report-print-page svg { max-width:100%!important; }
.report-print-page .tb-table-wrap { overflow:visible!important; }
/* Financial reports need compact summaries and enough width for transaction details. */
body.report-print-page .statement-summary,body.report-print-page .tb-summary { margin:3mm 0!important; gap:2mm!important; }
body.report-print-page .statement-summary>div,body.report-print-page .tb-card { padding:2mm 3mm!important; }
body.report-print-page .statement-summary strong,body.report-print-page .tb-card strong { font-size:13pt!important; }
body.report-print-page .statement-meta { margin:3mm 0!important; padding:2mm 3mm!important; }
body.report-print-page .statement-table-card { padding:0!important; border:0!important; }
body.report-print-page #statementTable { table-layout:fixed!important; }
body.report-print-page #statementTable th:nth-child(8) { width:40%!important; }
body.report-print-page #statementTable th:nth-child(1) { width:10%!important; }
body.report-print-page #statementTable th:nth-child(2) { width:7%!important; }
body.report-print-page #statementTable :is(td,th),body.report-print-page .tb-table :is(td,th) { padding:1.5mm 2mm!important; line-height:1.35!important; }
body.report-print-page .tb-period { margin:2mm 0!important; }
/* Supplier requests keep dates and totals readable on a single short booking sheet. */

/* Status stamp on invoices and vouchers. */
.pt-stamp { display:inline-block; margin-top:2mm; padding:1mm 4mm; border:1.5px solid #b89450; color:#8a6a2c!important; border-radius:2mm; font-weight:800; font-size:9pt; letter-spacing:.08em; }
.pt-stamp.paid { border-color:#16794a; color:#16794a!important; }
.pt-stamp.unpaid { border-color:#b91c1c; color:#b91c1c!important; }
.invoice-section-total { background:#f3f6f8!important; border-bottom:1px solid #d2dde3!important; }
.invoice-pnr { font-size:8pt; color:#576c79!important; }
