.invoice-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 30px;
    background: #fff;
    border: 1px solid #ddd;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    font-family: 'Courier New', Courier, monospace;
    box-sizing: border-box;
    position: relative;
}
.invoice-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    gap: 15px;
}
.invoice-logo-header-center {
    flex: 1;
    text-align: center;
}
.invoice-logo-img {
    max-height: 110px;
    max-width: 100%;
    height: auto;
    display: inline-block;
}
.logo-text {
    font-size: 32px;
    font-weight: bold;
    color: #628830;
}
.invoice-header-box {
    background-color: #628830;
    color: #fff;
    padding: 15px 30px;
    border-radius: 4px;
}
.invoice-header-box h2 {
    margin: 0;
    color: #fff;
    font-size: 24px;
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-bottom: 25px;
    border: 1px solid #628830;
    padding: 15px;
    border-radius: 4px;
}
.form-field {
    display: flex;
    flex-direction: column;
}
.span-2 {
    grid-column: span 2;
}
.form-field label {
    font-size: 10px;
    font-weight: bold;
    color: #628830;
    margin-bottom: 3px;
}
.inv-input {
    border: none;
    border-bottom: 1px solid #ccc;
    outline: none;
    font-size: 14px;
    padding: 3px 0;
}
.table-header {
    background: #628830;
    color: #fff;
    padding: 10px 15px;
    font-weight: bold;
    font-size: 14px;
    border-radius: 4px 4px 0 0;
}
.flex-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.work-textarea {
    width: 100%;
    height: 100px;
    border: 1px solid #ddd;
    border-top: none;
    padding: 10px;
    font-size: 14px;
    outline: none;
    resize: none;
    box-sizing: border-box;
}
.invoice-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}
.invoice-table th, .invoice-table td {
    border: 1px solid #ddd;
    padding: 8px;
    text-align: left;
    box-sizing: border-box;
}
.invoice-table th {
    background: #f4f6f9;
    font-size: 11px;
    color: #628830;
}
.table-inp {
    width: 100%;
    border: none;
    outline: none;
    font-size: 14px;
    box-sizing: border-box;
}
.add-row-btn {
    background: #fff;
    color: #628830;
    border: 1px solid #fff;
    padding: 2px 8px;
    font-size: 11px;
    cursor: pointer;
    border-radius: 3px;
}
.total-row-display {
    text-align: right;
    font-size: 14px;
    margin-bottom: 25px;
}
.totals-block {
    margin-left: auto;
    width: 300px;
    border: 1px solid #ddd;
    padding: 15px;
    background: #f9fbfd;
    border-radius: 4px;
    margin-bottom: 25px;
    box-sizing: border-box;
}
.tot-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 13px;
}
.subtotal-row {
    border-top: 1px solid #ddd;
    padding-top: 6px;
    font-weight: bold;
}
.grand-total-row {
    border-top: 2px solid #628830;
    padding-top: 8px;
    font-size: 16px;
    color: #628830;
}

/* Updated Stacked Signatures Styles */
.signatures-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 40px;
    margin-bottom: 40px;
    max-width: 650px;
}
.sig-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    align-items: flex-end;
}
.sig-box, .sig-date-box {
    display: flex;
    flex-direction: column;
}
.sig-box label, .sig-date-box label {
    font-size: 11px;
    font-weight: bold;
    color: #555;
    margin-bottom: 8px;
}
.sig-canvas-container {
    position: relative;
    border: 1px dashed #628830;
    background: #fafafa;
    border-radius: 4px;
    height: 90px;
}
.sig-canvas {
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
}
.clear-sig-btn {
    position: absolute;
    right: 5px;
    bottom: 5px;
    background: rgba(255,255,255,0.85);
    border: 1px solid #ccc;
    font-size: 10px;
    padding: 2px 6px;
    cursor: pointer;
    border-radius: 3px;
}
.sig-date-input {
    border: none;
    border-bottom: 1px solid #000;
    font-family: inherit;
    font-size: 14px;
    padding: 5px 0;
    outline: none;
    background: transparent;
    width: 100%;
    box-sizing: border-box;
}

.actions-bar {
    display: flex;
    gap: 15px;
    justify-content: center;
}
.action-btn {
    padding: 12px 25px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
}
.print-btn {
    background: #628830;
    color: #fff;
}
.pdf-btn {
    background: #28a745;
    color: #fff;
}

@media print {
    header,
    footer,
    .elementor-location-header,
    .elementor-location-footer,
    .actions-bar,
    .clear-sig-btn,
    [id*=\"cookie\"],
    [class*=\"cookie\"],
    [id*=\"cli\"],
    [class*=\"cli\"],
    .cookielawinfo-cookie-bar,
    #cookie-law-info-bar,
    #cookie-law-info-again,
    .cookiez-consent-badge,
    #cookiez-consent-badge,
    .cookiez-wrapper,
    .cookiez,
    .cc-window,
    .cc-banner,
    .wt-cli-cookie-bar {
        display: none !important;
    }

    .invoice-container {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
        overflow: visible !important;
    }

    html,
    body {
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        background: #fff !important;
        overflow: visible !important;
    }

    tr {
        page-break-inside: avoid !important;
        page-break-after: auto !important;
    }

    .invoice-table th, 
    .invoice-table td {
        word-wrap: break-word !important;
        overflow: visible !important;
    }

    .table-inp {
        background: transparent !important;
        border: none !important;
        overflow: visible !important;
    }

    .paper-input[type=\"date\"],
    .paper-input[type=\"text\"] {
        width: 250px !important;
    }

    .sig-canvas-container {
        border: none !important;
        background: transparent !important;
    }
    
    * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}
