#divpdf {
    background: #f5f5f5;
    margin-top: 20px;
}

#invoice {
    color: #121212;
    font-family: Arial, Helvetica, sans-serif;
    padding: 0;
}

.invoice-print-wrapper {
    background: #f5f5f5;
    padding: 20px;
}

.invoice-sheet {
    min-width: 0 !important;
    width: 100%;
}

#invoice .card,
#divpdf .card {
    background: #fff;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(18, 18, 18, .08);
    margin-bottom: 24px;
}

#invoice .card-body,
#divpdf .card-body {
    padding: 0;
}

.invoice {
    background: #fff;
    min-height: 680px;
    overflow: visible !important;
    padding: 32px;
    position: relative;
}

.invoice > div:first-child {
    min-width: 0 !important;
}

.invoice > div:empty {
    display: none !important;
}

.invoice header {
    border-bottom: 2px solid #121212;
    margin-bottom: 28px;
    padding: 0 0 22px;
}

.invoice header .row,
.invoice .contacts {
    align-items: flex-start;
    display: flex;
    gap: 24px;
    justify-content: space-between;
}

.invoice header .col,
.invoice .contacts .col {
    flex: 1 1 0;
    min-width: 0;
}

.invoice header img {
    display: block;
    height: auto;
    max-height: 72px;
    max-width: 190px;
    object-fit: contain;
}

.invoice .company-details {
    color: #454545;
    font-size: 13px;
    line-height: 1.55;
    text-align: right;
}

.invoice .company-details .name {
    color: #121212;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 8px;
}

.invoice .company-details .name a,
.invoice .invoice-details .invoice-id,
.invoice .invoice-details .to {
    color: #121212;
    text-decoration: none;
}

.invoice .contacts {
    background: #fafafa;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    margin-bottom: 28px;
    padding: 18px;
}

.invoice .invoice-to {
    color: #454545;
    font-size: 13px;
    line-height: 1.55;
    text-align: left;
}

.invoice .invoice-to .text-dark,
.invoice .invoice-to .text-gray-light {
    color: #6b7280;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    margin-bottom: 6px;
    text-transform: uppercase;
}

.invoice .invoice-to .to {
    color: #121212;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
}

.invoice .invoice-details {
    color: #454545;
    font-size: 13px;
    line-height: 1.55;
    text-align: right;
}

.invoice .invoice-details .invoice-id {
    font-size: 22px;
    font-weight: 800;
    line-height: 1.2;
    margin: 0 0 8px;
}

.invoice .invoice-details .to {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.35;
    margin: 0 0 8px;
}

.invoice main {
    padding-bottom: 28px;
}

.invoice table {
    border-collapse: separate;
    border-spacing: 0;
    margin-bottom: 24px;
    table-layout: fixed;
    width: 100%;
}

.invoice table th:first-child,
.invoice table td:first-child {
    width: 34%;
}

.invoice table th {
    background: #121212;
    border: 0;
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .02em;
    padding: 12px 10px;
    text-transform: uppercase;
    white-space: normal;
}

.invoice table th:first-child {
    border-top-left-radius: 8px;
}

.invoice table th:last-child {
    border-top-right-radius: 8px;
}

.invoice table td {
    background: #fff;
    border-bottom: 1px solid #ededed;
    color: #242424;
    font-size: 13px;
    padding: 13px 10px;
    vertical-align: top;
}

.invoice table tbody tr:nth-child(even) td {
    background: #fbfbfb;
}

.invoice table td h3 {
    color: #121212;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    overflow-wrap: anywhere;
}

.invoice table .qty,
.invoice table .total,
.invoice table .unit {
    font-size: 13px;
    text-align: center;
}

.invoice table tbody .total {
    background: #f6f6f6;
    color: #121212;
    font-weight: 700;
}

.invoice table tfoot td {
    background: #fff;
    border-bottom: 0;
    border-top: 1px solid #e5e5e5;
    color: #242424;
    font-size: 13px;
    font-weight: 600;
    padding: 10px;
    text-align: right;
    white-space: nowrap;
}

.invoice table tfoot tr:first-child td {
    border-top: 2px solid #121212;
}

.invoice table tfoot tr:last-child td {
    border-top: 2px solid #121212;
    color: #121212;
    font-size: 16px;
    font-weight: 800;
}

.invoice table tfoot tr td:first-child {
    border-top-color: transparent;
}

.invoice main .notices {
    background: #f7f6f1;
    border: 1px solid #ece7dc;
    border-left: 4px solid #121212;
    border-radius: 8px;
    color: #454545;
    font-size: 13px;
    line-height: 1.5;
    padding: 14px 16px;
}

.invoice main .notices .notice {
    font-size: 13px;
}

.invoice footer {
    border-top: 1px solid #e5e5e5;
    color: #777;
    font-size: 11px;
    line-height: 1.45;
    padding: 14px 0 0;
    text-align: center;
    width: 100%;
}

@media screen and (max-width: 700px) {
    .invoice {
        padding: 22px;
    }

    .invoice header .row,
    .invoice .contacts {
        display: block;
    }

    .invoice .company-details,
    .invoice .invoice-details {
        margin-top: 18px;
        text-align: left;
    }
}

@media print {
    @page {
        margin: 12mm;
    }

    html,
    body {
        margin: 0 !important;
        padding: 0 !important;
    }

    #divpdf {
        background: #fff;
        margin: 0;
    }

    #invoice .card,
    #divpdf .card {
        box-shadow: none;
        margin: 0;
    }

    .invoice {
        font-size: 11px !important;
        min-height: auto;
        overflow: visible !important;
        padding: 18px;
    }

    .invoice table th,
    .invoice table td {
        padding: 8px;
    }

    .invoice table tr,
    .invoice .contacts,
    .invoice main .notices {
        page-break-inside: avoid;
    }

    .invoice footer {
        position: static;
    }
}
