.print-page {
    background: #f4f7fb;
    min-height: 100vh;
    padding: 24px;
}

.print-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin: 0 auto 18px;
    max-width: 900px;
}

.print-actions .btn {
    align-items: center;
    border: 1px solid transparent;
    border-radius: 7px;
    cursor: pointer;
    display: inline-flex;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: 700;
    justify-content: center;
    min-height: 38px;
    padding: 9px 16px;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.print-actions .btn:hover {
    box-shadow: 0 8px 18px rgba(15, 95, 159, .16);
    transform: translateY(-1px);
}

.print-actions .btn-light {
    background: #ffffff;
    border-color: #d4dce8;
    color: #1f2937;
}

.print-actions .btn-light:hover {
    background: #f8fafc;
    border-color: #b9c5d6;
}

.print-actions .btn-primary {
    background: #0f5f9f;
    border-color: #0f5f9f;
    color: #ffffff;
}

.print-actions .btn-primary:hover {
    background: #0b4f86;
    border-color: #0b4f86;
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }

    html,
    body {
        background: #fff;
        color: #111;
        font-family: Arial, Helvetica, sans-serif;
        font-size: 11px;
        margin: 0;
        padding: 0;
    }

    .print-actions,
    .topbar,
    .sidebar,
    .action-group,
    .btn {
        display: none;
    }

    .print-page {
        padding: 0;
    }

    .invoice-document {
        border: 2px solid #111;
        box-sizing: border-box;
        margin: 0 auto;
        max-width: none;
        width: 100%;
    }

    .invoice-image-header,
    .invoice-image-footer {
        line-height: 0;
        width: 100%;
    }

    .invoice-image-header {
        border-bottom: 2px solid #111;
    }

    .invoice-image-footer {
        border-top: 2px solid #111;
    }

    .invoice-image-header img,
    .invoice-image-footer img {
        display: block;
        height: auto;
        width: 100%;
    }

    .invoice-print-title {
        background: #fff;
        border-bottom: 2px solid #111;
        font-size: 18px;
        font-weight: 800;
        letter-spacing: .04em;
        padding: 8px;
        text-align: center;
    }

    .invoice-header {
        align-items: center;
        border-bottom: 2px solid #111;
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
    }

    .invoice-brand {
        align-items: center;
        display: flex;
        gap: 8px;
    }

    .invoice-brand img {
        height: 42px;
        object-fit: contain;
        width: 64px;
    }

    .invoice-brand h2 {
        font-size: 17px;
        line-height: 1.15;
        margin: 0;
    }

    .invoice-brand p {
        margin: 1px 0 0;
    }

    .invoice-header h1 {
        border: 2px solid #111;
        font-size: 17px;
        margin: 0;
        padding: 7px 12px;
    }

    .invoice-party-grid,
    .invoice-meta,
    .invoice-bottom-grid {
        display: grid;
    }

    .invoice-party-grid {
        grid-template-columns: 1fr 1fr;
    }

    .invoice-party-grid > div {
        border-bottom: 2px solid #111;
        min-height: 112px;
        padding: 8px 10px;
    }

    .invoice-party-grid > div:first-child {
        border-right: 2px solid #111;
    }

    .invoice-party-grid h3,
    .invoice-party-grid p {
        margin: 0 0 3px;
    }

    .invoice-meta {
        grid-template-columns: 1fr 1fr;
    }

    .invoice-meta div {
        border-bottom: 2px solid #111;
        padding: 7px 10px;
    }

    .invoice-meta div:first-child {
        border-right: 2px solid #111;
    }

    .invoice-table {
        border-collapse: collapse;
        page-break-inside: avoid;
        width: 100%;
    }

    .invoice-table th,
    .invoice-table td {
        border-bottom: 2px solid #111;
        border-right: 2px solid #111;
        padding: 6px 8px;
        vertical-align: top;
    }

    .invoice-table th:last-child,
    .invoice-table td:last-child {
        border-right: 0;
    }

    .invoice-table th {
        background: #f2f2f2;
        font-size: 10px;
        text-align: center;
    }

    .invoice-lower-grid {
        border-bottom: 2px solid #111;
        page-break-inside: avoid;
    }

    .invoice-total-table {
        border-collapse: collapse;
        width: 100%;
    }

    .invoice-total-table td {
        border-bottom: 2px solid #111;
        border-right: 2px solid #111;
        padding: 2px 6px;
    }

    .invoice-total-table td:first-child {
        width: 64%;
    }

    .invoice-total-table td:last-child {
        border-right: 0;
        font-weight: 700;
        text-align: right;
        width: 36%;
    }

    .invoice-amount-word-row,
    .invoice-payment-row {
        display: grid;
        grid-template-columns: 34% 66%;
    }

    .invoice-amount-word-row > *,
    .invoice-payment-row > * {
        border-bottom: 2px solid #111;
        border-right: 2px solid #111;
        padding: 5px 6px;
    }

    .invoice-amount-word-row > *:last-child,
    .invoice-payment-row > *:last-child {
        border-right: 0;
    }

    .invoice-bank-signature-grid {
        display: grid;
        grid-template-columns: 34% 66%;
        min-height: 150px;
    }

    .bank-details-block {
        border-right: 2px solid #111;
        padding: 6px;
    }

    .bank-details-block h3,
    .bank-details-block p {
        margin: 0 0 4px;
    }

    .signature-block {
        display: grid;
        grid-template-rows: auto 1fr auto;
        min-height: 150px;
        page-break-inside: avoid;
        text-align: center;
    }

    .for-row {
        border-bottom: 2px solid #111;
        display: grid;
        grid-template-columns: 18% 82%;
    }

    .for-row strong {
        border-right: 2px solid #111;
        padding: 5px 6px;
    }

    .for-row strong:last-child {
        border-right: 0;
    }

    .signature-block img {
        align-self: center;
        justify-self: center;
        max-height: 82px;
        max-width: 260px;
        object-fit: contain;
    }

    .authorized-signature-label {
        padding: 6px;
    }

    .invoice-footer {
        background: #f2f2f2;
        border-top: 2px solid #111;
        font-weight: 700;
        padding: 6px;
        text-align: center;
    }
}
