﻿.invoice-toolbar {
    margin-bottom: 24px;
    text-align: center;
}

.print-hide {
    display: block;
}

@media print {
    .print-hide {
        display: none !important;
    }
}

.invoice-box {
    max-width: 900px;
    margin: 40px auto;
    background: #fff;
    padding: 18px 18px 18px 18px;
    font-size: 16px;
    line-height: 1.8;
    color: #003366;
    position: relative;
}

.invoice-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2.5px solid #20c997;
    gap: 2rem;
}

    .invoice-header .company-logo {
        max-height: 170px;
        max-width: 280px;
        padding: 0.5rem 3.2rem;
        margin-top: -15px;
    }

    .invoice-header .company-details {
        font-size: 1.07rem;
        color: #003366;
        font-weight: 600;
        line-height: 1.6;
    }

.invoice-info-row {
    display: flex;
    justify-content: space-between;
    gap: 2.5rem;
    margin-bottom: 1.5rem;
    margin-top: 1.2rem;
}

.invoice-info-block {
    border-radius: 1rem;
    flex: 1 1 0;
    min-width: 0;
}

.invoice-info-title {
    font-size: 1.09rem;
    font-weight: 700;
    color: #0d6efd;
    margin-bottom: 0.7rem;
    letter-spacing: 0.5px;
}

.invoice-info-list {
    font-size: 1.07rem;
    color: #003366;
    margin: 0;
    padding: 0;
    list-style: none;
}

.invoice-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin-top: 16px;
    background: #fff;
    border-radius: 0.9rem;
    box-shadow: 0 2px 12px #20c99713;
    overflow: hidden;
}

    .invoice-table th, .invoice-table td {
        padding: 13px 16px;
        border-bottom: 1.5px solid #e3eafc;
        text-align: left;
        font-size: 1.09rem;
    }

    .invoice-table th {
        background: linear-gradient(90deg, #0d6efd12 0%, #20c99711 100%);
        color: #003366;
        font-weight: 800;
        font-size: 1.11rem;
        border-top: 1.5px solid #e3eafc;
        letter-spacing: 0.5px;
    }

    .invoice-table tr:last-child td {
        border-bottom: none;
    }

    .invoice-table td {
        color: #003366;
        font-weight: 500;
    }

.invoice-totals {
    margin-top: 28px;
    display: flex;
    justify-content: flex-end;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.invoice-totals-table {
    min-width: 260px;
    background: #f8fafc;
    border-radius: 1rem;
    padding: 1.1rem 1.3rem;
    box-shadow: 0 2px 12px #20c99711;
    font-size: 1.07rem;
}

    .invoice-totals-table tr td {
        padding: 6px 0;
        border: none;
    }

    .invoice-totals-table .label {
        color: #003366;
        font-weight: 600;
    }

    .invoice-totals-table .value {
        color: #0d6efd;
        font-weight: 800;
        font-size: 1.13rem;
    }

.invoice-bank-details {
    margin-top: 0.5rem;
    background: #e3fcec;
    border-radius: 1rem;
    padding: 1.3rem 1.5rem;
    color: #003366;
    font-size: 1.09rem;
    box-shadow: 0 2px 12px #20c99711;
}

.invoice-signatures {
    margin-top: 1.2rem;
    display: flex;
    justify-content: space-between;
    gap: 2.5rem;
}

.invoice-sign-block {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 180px;
}

.invoice-sign-label {
    font-size: 1.05rem;
    color: #888;
    font-weight: 600;
    margin-bottom: 0.7rem;
}

.invoice-sign-space {
    min-width: 160px;
    min-height: 44px;
    border-bottom: 1.5px dashed #bbb;
}

@media print {
    body * {
        visibility: hidden;
    }

    .invoice-box, .invoice-box * {
        visibility: visible;
    }

    .invoice-box {
        position: absolute;
        left: 0;
        top: 0;
        width: 100vw;
        min-width: 0;
        box-shadow: none;
        border-radius: 0;
        margin: 0;
        padding: 10px 3px 10px 3px;
        background: #fff !important;
    }

    .print-hide {
        display: none !important;
    }
}

@media (max-width: 700px) {
    .invoice-box {
        padding: 10px 2px 8px 2px;
    }

    .invoice-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .invoice-info-row {
        flex-direction: column;
        gap: 1rem;
    }

    .invoice-signatures {
        flex-direction: column;
        gap: 1.2rem;
    }
}
