.invoice-preview-container {
    width: 100%;
    overflow-x: auto;
}

.invoice-paper {
    width: 794px;
    min-height: 1100px;
    padding: 60px;
    background: #fff;
    box-sizing: border-box;
    color: rgb(51,51,51);
    font-size: .9rem;
    border: 0;
    font-family: "HelveticaNeue-Light", "Helvetica Neue Light", "Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif; 
    font-weight: 400;
}

.invoice-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    border: 0;
}

.invoice-header > h1 { font-size: 2rem; font-weight: 600; color: rgb(51,51,51); line-height: 1.2; }
.summary-notes > h3 { font-size: .8rem; font-weight: 700; color: rgb(51,51,51); line-height: 1; }

.parent-container {
  position: relative; 
  height: 100%;
}

.bottom-element {
  position: absolute;
  bottom: 0;
  left: 0; /* Optional: aligns it to the bottom-left edge */
}

.client-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
    border: 0;
}

.company, 
.customer,
.elements,
.payments {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

.company,
.customer,
.elements { margin: 8px 0 0 0; }

/* Business and customer invoice details */
.invoice-paper .company li,
.invoice-paper .customer li {
    height: auto;
    min-height: 0;
    margin: 0;
    padding: 0;
    line-height: 1.5;
}

.elements li {
    margin: 0;
    font-size: .9rem;
    height: 20px;
}

.payments li {
    margin: 0;
    font-size: .9rem;
    height: 20px;
}

.invoice-items { margin-bottom: 20px; }

.preview-items-header,
.preview-item-row {
    display: flex;
    padding: 6px;
}

#previewTradingAs:empty {
    display: none;
}

#previewTerms { font-size: .8rem; }

.summary-notes { margin-top: .5rem; }

.preview-items-header {
    color: #fff;
    background: #000;
    font-size: .75rem;
    font-weight: 600;
}

.col-desc { padding-left: 15px; }

.preview-item-row {
    border-bottom: 1px solid #505050;
    border-left: 1px solid #505050;
    border-right: 1px solid #505050;
    padding-left: 8px;
}

.col-desc {
    flex: 3;
}

.col-qty,
.col-price,
.col-tax,
.col-total {
    flex: 1;
    text-align: center;
}

.col-total { text-align: right; padding-right: 8px; }

.preview-empty-message {
    padding: 22px;
    color: #888;
    text-align: center;
    font-style: italic;
}

#previewClientName { line-height: 1.3; }

#previewCompanyAddress,
#previewClientAddress {
    white-space: pre-line;
    line-height: 1.3;
    height: auto;
    margin: 0;
}

.invoice-summary {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    margin-top: 30px;
}

.summary-notes {
    flex: 1;
}

.summary-totals {
    width: 280px;
}

.payment-instructions { margin-top: 30px; }

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

.totals-table td {
    padding: 6px 0;
}

.totals-table td:last-child {
    text-align: right;
}

.totals-table .grand-total td {
    font-weight: bold;
    font-size: 1.1rem;
    border-top: thin solid #505050;
    border-bottom: thin solid #505050;
    padding-top: 10px;
}

.invoice-footer { margin-top: 30px; width: 100%; text-align: center; }

.jobbuddy-credit {
    margin-top: 12px;
    font-size: 10px;
    color: #888;
    text-align: center;
    letter-spacing: 0.2px;
}