/* ===========================================================================
   Tisk faktury – rozložení podle vzoru (daňový doklad).
   Načítá se pouze při tisku (media="print").
   =========================================================================== */

@page { size: A4 portrait; margin: 12mm 14mm; }

body { background: #fff; }

.invoice {
    color: #000;
    font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-size: 9pt;
    line-height: 1.35;
}

.inv-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    margin-bottom: 12px;
}
.inv-title { font-size: 15pt; font-weight: 700; }
.inv-number { font-size: 13pt; font-weight: 700; white-space: nowrap; }

.inv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.col-left, .col-right { display: flex; flex-direction: column; min-width: 0;
}
/* Pozor: bez minmax(0, …) / min-width: 0 tlačí obsah sloupce do šířky a tisk
   se ořezává na pravém okraji (mizí i sloupec „Celkem“). */

.party { border: 1px solid #9aa3ad; padding: 7px 9px; }
.party-label { font-size: 7.5pt; text-transform: uppercase; letter-spacing: .05em; color: #444; margin-bottom: 2px; }
.party-name { font-weight: 700; font-size: 11pt; }
.col-left .party-name { font-size: 13pt; }

.contact-block, .bank-block { margin-top: 10px; }
.inv-qr { text-align: center; margin-top: 10px; }
.inv-qr .qr { width: 32mm; height: 32mm; }
.qr-caption { font-size: 7.5pt; color: #444; }

.contact-table, .bank-table, .meta-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.contact-table th, .bank-table th, .meta-table th {
    text-align: left;
    font-weight: 400;
    color: #333;
    width: 34%;
    padding: 1px 4px 1px 0;
    vertical-align: top;
}
.contact-table td, .bank-table td, .meta-table td { padding: 1px 0; vertical-align: top; }
.meta-table { margin-top: 8px; }
.meta-table + .meta-table { margin-top: 14px; }

.boxed { border: 1px solid #000; padding: 0 5px; display: inline-block; }

.items { width: 100%; border-collapse: collapse; margin-top: 14px; }
.items th {
    background: #eeeeee;
    border: 1px solid #9aa3ad;
    padding: 4px 6px;
    text-align: left;
    font-size: 8.5pt;
}
.items td { border: 1px solid #c9ced4; padding: 4px 6px; }
.items th, .items td { overflow-wrap: anywhere; }
.items .num { text-align: right; }
.items .c { text-align: center; }

.inv-bottom { display: flex; justify-content: space-between; gap: 18px; margin-top: 14px; align-items: flex-start; }
.inv-note { flex: 1 1 auto; min-width: 0; }
.vat-note { font-style: italic; font-size: 9pt; }
.note { margin-top: 8px; white-space: pre-line; }

.inv-totals { flex: 0 0 auto; min-width: 0; max-width: 70mm; }
.trow { display: flex; justify-content: space-between; gap: 10px; padding: 1.5px 0; }
.trow.strong { border-top: 1px solid #000; margin-top: 3px; padding-top: 3px; font-weight: 700; }
.trow.big { border-top: 2px solid #000; margin-top: 3px; padding-top: 4px; font-weight: 700; font-size: 11pt; }

.inv-foot {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
    margin-top: 30px;
}
.sign {
    border-top: 1px dashed #666;
    width: 62mm;
    padding-top: 4px;
    font-size: 8pt;
    color: #444;
    text-align: center;
}
.footer-note { font-size: 8pt; color: #444; max-width: 80mm; text-align: right; }

/* patička s odkazem na aplikaci (vytištěný doklad) */
.inv-credit {
    margin-top: 6mm;
    padding-top: 2px;
    border-top: 1px solid #ccc;
    font-size: 7.5pt;
    color: #777;
    text-align: center;
}
.inv-credit a { color: inherit; text-decoration: none; }

.items tr { break-inside: avoid; }
.invoice { orphans: 3; widows: 3; }
