.badge.partial {
    background: #eef0ff;
    color: #3f4eae;
}

.payment-history {
    margin-top: 18px;
}

.allocation-lines {
    display: grid;
    gap: 4px;
    min-width: 150px;
}

.allocation-lines span {
    white-space: nowrap;
}

.balance-due {
    color: #916a00;
}

.mark-paid-option {
    align-items: flex-start;
    background: #edf8f4;
    border: 1px solid #c7e4dc;
    border-radius: 9px;
    cursor: pointer;
    display: flex;
    gap: 11px;
    padding: 13px 14px;
}

.mark-paid-option input {
    margin: 2px 0 0;
    min-width: auto;
    width: 17px;
}

.mark-paid-option span {
    display: grid;
    gap: 4px;
}

.mark-paid-option small {
    color: #68736f;
    font-weight: 400;
}

.shipping-option {
    background: #f7f9f8;
    border: 1px solid #d9e1de;
    border-radius: 9px;
    padding: 13px 14px;
}

.shipping-toggle {
    align-items: flex-start;
    cursor: pointer;
    display: flex;
    gap: 11px;
}

.shipping-toggle input {
    margin: 2px 0 0;
    min-width: auto;
    width: 17px;
}

.shipping-toggle span {
    display: grid;
    gap: 4px;
}

.shipping-toggle small {
    color: #68736f;
    font-weight: 400;
}

.shipping-address {
    margin-top: 13px;
}

.modal.wide-modal {
    width: min(1180px, calc(100vw - 32px));
}

.line-items {
    background: #fff;
}

.line-items table {
    min-width: 900px;
    table-layout: fixed;
}

.line-items th:nth-child(1) { width: 32%; }
.line-items th:nth-child(2) { width: 12%; }
.line-items th:nth-child(3) { width: 9%; }
.line-items th:nth-child(4) { width: 9%; }
.line-items th:nth-child(5) { width: 13%; }
.line-items th:nth-child(6) { width: 9%; }
.line-items th:nth-child(7) { width: 12%; }
.line-items th:nth-child(8) { width: 4%; }

.line-items th,
.line-items td {
    padding: 12px 14px;
    vertical-align: middle;
}

.line-items .product-picker,
.line-items .line-number {
    min-height: 40px;
    width: 100%;
}

.line-items .line-number {
    font-variant-numeric: tabular-nums;
    text-align: right;
}

.line-readonly {
    color: #46534f;
    display: inline-flex;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
    min-height: 40px;
    padding: 11px 0;
}

.line-readonly.gst {
    background: #edf7f4;
    border-radius: 999px;
    color: #087f5b;
    justify-content: center;
    min-height: auto;
    padding: 5px 9px;
}

.line-items .line-total {
    color: #17211e;
    font-size: 14px;
    font-weight: 700;
    white-space: nowrap;
}

.line-items .remove-line {
    align-items: center;
    border-radius: 7px;
    display: inline-flex;
    font-size: 18px;
    height: 32px;
    justify-content: center;
    width: 32px;
}

.line-items .remove-line:hover {
    background: #fff1ef;
}

#content .stats:has(+ .table-card) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

#content .customer-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 600px) {
    #content .stats:has(+ .table-card) {
        grid-template-columns: 1fr;
    }

    #content .customer-stats {
        grid-template-columns: 1fr;
    }
}
