/* Insight K9 billing-only presentation. Never unhide payment controls or change
   native loading, disabled, authorization, balance, or status logic. */
body.ik9-billing-page {
    background: #f2f3f5 !important;
    background-image: none !important;
    color: #202326;
    padding: 28px 16px;
}
.latepoint-w .os-invoice-wrapper,
.latepoint-transaction-payment-form,
.ik9-family-billing {
    --ik9-bill-red: #c91823;
    --ik9-bill-dark: #191c1f;
    --ik9-bill-ink: #202326;
    --ik9-bill-muted: #555e66;
    --ik9-bill-line: #d8dde2;
    --ik9-bill-surface: #f5f6f8;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    color: var(--ik9-bill-ink);
    font-size: 16px;
    line-height: 1.55;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
.latepoint-w .os-invoice-wrapper,
.latepoint-transaction-payment-form.clean-layout-content-wrapper {
    max-width: 820px;
    margin: 12px auto 32px;
    background: #fff;
    border: 1px solid var(--ik9-bill-line);
    border-top: 5px solid var(--ik9-bill-red);
    border-radius: 16px;
    box-shadow: 0 8px 28px rgba(25,28,31,.07);
    box-sizing: border-box;
    min-width: 0;
}
.latepoint-w .os-invoice-wrapper .os-invoice-inner {padding: 36px;}
.latepoint-w .os-invoice-wrapper .invoice-document-i {padding: 0;}
.latepoint-w .os-invoice-wrapper .invoice-document {font: inherit; color: var(--ik9-bill-ink);}
.ik9-billing-brand {display: flex; gap: 16px; align-items: center; min-width: 0;}
.ik9-billing-brand img {display: block; width: 72px; height: 72px; object-fit: contain; flex: 0 0 72px; background: #fff; border-radius: 8px;}
.ik9-billing-wordmark {min-width: 0;}
.ik9-billing-wordmark strong {display: block; color: #202326; text-transform: uppercase; font: 800 16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; letter-spacing: .045em; overflow-wrap: anywhere;}
.ik9-billing-wordmark span {display: block; color: #555e66; margin-top: 4px; font: 500 13px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;}
.latepoint-transaction-payment-form > .ik9-billing-brand {padding: 24px 32px; border-bottom: 1px solid #d8dde2;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-heading {display: flex; gap: 28px; align-items: flex-start; justify-content: space-between;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-info {min-width: 0; flex: 1 1 50%;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo {min-width: 0; max-width: 40%; text-align: right;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo > img {height: 86px; width: 160px; max-width: 100%; object-fit: contain; object-position: right top;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo .ik9-billing-brand {flex-direction: column; align-items: flex-end; gap: 8px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo .ik9-billing-wordmark span {display: none;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-title {font-family: inherit; color: var(--ik9-bill-dark); font-size: clamp(28px,4vw,38px); font-weight: 800; line-height: 1.15; margin: 0 0 16px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-data {margin-top: 0; font-size: 14px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-data .invoice-row {gap: 14px; margin: 7px 0;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-data .id-label {color: var(--ik9-bill-muted);}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-data .id-value {font-family: inherit; color: var(--ik9-bill-ink); font-weight: 650; text-align: right; overflow-wrap: anywhere; min-width: 0;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-to-from {display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 24px; margin-top: 28px; padding: 24px 0; border-top: 1px solid var(--ik9-bill-line); border-bottom: 1px solid var(--ik9-bill-line);}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-to-from > div {min-width: 0; overflow-wrap: anywhere;}
.latepoint-w .os-invoice-wrapper .invoice-document .if-heading {font: 750 16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; color: var(--ik9-bill-ink);}
.latepoint-w .os-invoice-wrapper .invoice-document .if-data-block {color: var(--ik9-bill-muted); font-size: 15px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-info {margin: 24px 0; padding: 20px; border-radius: 12px; background: var(--ik9-bill-surface); border: 1px solid var(--ik9-bill-line);}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-amount {font: 750 20px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; color: var(--ik9-bill-ink); overflow-wrap: anywhere;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-pay-link-w {margin-top: 14px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-pay-link-w a,
.latepoint-transaction-payment-form .invoice-make-payment-btn,
.latepoint-transaction-payment-form .clean-layout-content-footer > .latepoint-btn-primary,
.latepoint-transaction-payment-form .latepoint-lightbox-footer > .latepoint-btn-primary {
    color: #fff !important; background: #c91823 !important; border: 1px solid #c91823;
    border-radius: 10px; min-height: 48px; box-sizing: border-box;
    padding: 12px 20px; font: 700 16px/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    text-align: center; text-decoration: none; white-space: normal; overflow-wrap: anywhere;
}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-pay-link-w a:hover,
.latepoint-transaction-payment-form .invoice-make-payment-btn:hover,
.latepoint-transaction-payment-form .clean-layout-content-footer > .latepoint-btn-primary:hover,
.latepoint-transaction-payment-form .latepoint-lightbox-footer > .latepoint-btn-primary:hover {background: #a81420 !important; border-color: #a81420;}
.latepoint-w .os-invoice-wrapper a:focus-visible,
.latepoint-transaction-payment-form a:focus-visible,
.latepoint-transaction-payment-form button:focus-visible,
.ik9-family-billing a:focus-visible {outline: 3px solid #c91823; outline-offset: 4px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-items {margin-top: 28px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-items-table-heading {gap: 18px; font-weight: 700; color: #555e66; padding-bottom: 10px; border-bottom: 1px solid #89939c;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals {padding-left: 0; margin: 24px 0 0 auto; max-width: 420px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals .it-row {gap: 20px; padding: 10px 0; font-size: 16px;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals .it-row .it-column:first-child {min-width: 0; overflow-wrap: anywhere;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals .it-row .it-column:last-child {text-align: right; flex-shrink: 0; font-variant-numeric: tabular-nums;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals .it-row-bold {font: 800 20px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; border-top: 2px solid #202326; color: #202326;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-terms {margin-top: 28px; padding-top: 20px; border-top: 1px solid #d8dde2; font-size: 14px; color: #555e66; overflow-wrap: anywhere;}
.latepoint-w .os-invoice-wrapper .invoice-document .terms-heading {font-weight: 700; color: #202326; margin-bottom: 6px;}
/* Existing status text is retained. Badges replace oversized overlapping stamps. */
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-paid-label,
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-draft-label,
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-voided-label {
    position: static; transform: none; display: table; margin: 0 0 18px; padding: 6px 12px;
    border-radius: 8px; font: 750 14px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;
    letter-spacing: .03em; opacity: 1; max-width: 100%; overflow-wrap: anywhere;
}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-paid-label {color: #216041; background: #edf8f1; border: 1px solid #78a18b;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-draft-label {color: #70510a; background: #fff8e5; border: 1px solid #beaa72;}
.latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-voided-label {color: #a81420; background: #fff1f2; border: 1px solid #cf858b;}
/* Price breakdown rows stay native. In particular, no amount is synthesized. */
.latepoint-w .os-invoice-wrapper .invoice-document .summary-price-item-w,
.latepoint-transaction-payment-form .summary-price-item-w {min-width: 0; gap: 12px;}
.latepoint-w .os-invoice-wrapper .invoice-document .spi-name,
.latepoint-transaction-payment-form .spi-name {min-width: 0; overflow-wrap: anywhere;}
.latepoint-w .os-invoice-wrapper .invoice-document .spi-price,
.latepoint-transaction-payment-form .spi-price {font-variant-numeric: tabular-nums;}
/* Applies both in a standalone document and the native invoice-payment lightbox. */
.latepoint-transaction-payment-form .clean-layout-content-header,
.latepoint-transaction-payment-form .latepoint-lightbox-heading {padding: 24px 32px; border-bottom: 1px solid #d8dde2;}
.latepoint-transaction-payment-form .clean-layout-content-header h2,
.latepoint-transaction-payment-form .latepoint-lightbox-heading h2 {font: 800 26px/1.25 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; color: #202326; margin: 0; padding-right: 28px; overflow-wrap: anywhere;}
.latepoint-transaction-payment-form .clean-layout-content-body,
.latepoint-transaction-payment-form .latepoint-lightbox-content {padding: 28px 32px; min-width: 0;}
.latepoint-transaction-payment-form .clean-layout-content-body.is-dotted:before {background-image: none; height: 0;}
.latepoint-transaction-payment-form .clean-layout-content-footer,
.latepoint-transaction-payment-form .latepoint-lightbox-footer {padding: 20px 32px; border-top: 1px solid #d8dde2; gap: 12px; flex-wrap: wrap;}
.latepoint-transaction-payment-form .invoice-due-amount-wrapper {gap: 20px; flex-wrap: wrap; margin-bottom: 24px;}
.latepoint-transaction-payment-form .invoice-due-amount-wrapper .id-amount {font: 800 36px/1.25 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; color: #202326; overflow-wrap: anywhere;}
.latepoint-transaction-payment-form .invoice-due-amount-wrapper .id-sub-info {font-size: 14px; color: #555e66; margin-top: 8px; overflow-wrap: anywhere;}
.latepoint-transaction-payment-form .invoice-due-amount-wrapper .id-sub-info a {color: #a81420;}
.latepoint-transaction-payment-form .summary-price-breakdown-wrapper .pb-heading .pbh-label {color: #202326; font: 700 16px/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif;}
.latepoint-transaction-payment-form .lp-payment-charge-amount {background: #f5f6f8; color: #202326; border: 1px solid #d8dde2; border-radius: 10px; padding: 16px; margin-bottom: 24px; font-size: 16px; overflow-wrap: anywhere;}
.latepoint-transaction-payment-form .latepoint-message-error {background: #fff1f2; color: #8e1822; border: 1px solid #cf858b; padding: 14px; border-radius: 10px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere;}
.latepoint-transaction-payment-form .payment-confirmation-wrapper {padding: 8px 0;}
.latepoint-transaction-payment-form .payment-confirmation-wrapper h2 {font: 800 26px/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",Arial,sans-serif; color: #202326; overflow-wrap: anywhere;}
.latepoint-transaction-payment-form .payment-confirmation-wrapper .icon-w {background: #edf8f1; color: #216041; border-color: #78a18b;}
.latepoint-transaction-payment-form .payment-info {background: #f5f6f8; border: 1px solid #d8dde2; border-radius: 12px; padding: 16px; margin-top: 24px;}
.latepoint-transaction-payment-form .payment-info-row {display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 8px 0;}
.latepoint-transaction-payment-form .payment-confirmation-wrapper .payment-info .info-label {font-size: 15px; color: #555e66;}
.latepoint-transaction-payment-form .payment-confirmation-wrapper .payment-info .info-value {font-size: 16px; color: #202326; text-align: right; min-width: 0; overflow-wrap: anywhere; font-weight: 650;}
/* Family billing no longer depends on a particular WordPress page ID. */
body .ik9-crm-portal.ik9-family-billing {--ik9-blue: #202326; --ik9-gold: #c91823; border-top-color: #c91823;}
body .ik9-family-billing .ik9-crm-content > h1 {color: #202326; border-left: 4px solid #c91823; padding-left: 14px; font-size: clamp(26px,4vw,36px); line-height: 1.2;}
body .ik9-family-billing .ik9-crm-content h2,
body .ik9-family-billing .ik9-crm-content h3 {color: #202326;}
body .ik9-family-billing .ik9-money-workflow {background: #fff; border: 1px solid #d8dde2; border-radius: 14px; padding: 24px; margin: 24px 0; min-width: 0; box-sizing: border-box;}
body .ik9-family-billing .ik9-money-workflow dl > div {background: #f5f6f8; border-color: #d8dde2; border-radius: 10px; padding: 14px;}
body .ik9-family-billing .ik9-money-workflow dt {color: #555e66; font-size: 14px;}
body .ik9-family-billing .ik9-money-workflow dd {color: #202326; font-size: 22px; font-variant-numeric: tabular-nums;}
body .ik9-family-billing .ik9-money-workflow .ik9-money-actions a,
body .ik9-family-billing .ik9-money-workflow .ik9-money-actions a:visited {background: #c91823 !important; color: #fff !important; min-height: 48px; font-size: 16px; line-height: 1.4; border-radius: 10px; box-sizing: border-box; justify-content: center; padding: 12px 18px;}
body .ik9-family-billing .ik9-money-workflow .ik9-help {font-size: 14px; color: #555e66; line-height: 1.6;}
@media(max-width: 600px) {
    body.ik9-billing-page {padding: 12px 10px;}
    .latepoint-w .os-invoice-wrapper {margin: 0 auto 20px; border-radius: 12px;}
    .latepoint-w .os-invoice-wrapper .os-invoice-inner {padding: 22px 18px;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-heading {flex-direction: column-reverse; gap: 24px;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-info {width: 100%;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo {width: 100%; max-width: none; text-align: left;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo > img {object-position: left top; width: 130px; height: 74px;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo .ik9-billing-brand {flex-direction: row; align-items: center; gap: 14px;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-to-from {gap: 20px; grid-template-columns: 1fr; margin-top: 22px; padding: 20px 0;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-info {padding: 16px;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-pay-link-w a {display: block; width: 100%;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals {max-width: none;}
    .latepoint-transaction-payment-form.clean-layout-content-wrapper {margin: 0 auto 20px;}
    .latepoint-transaction-payment-form > .ik9-billing-brand,
    .latepoint-transaction-payment-form .clean-layout-content-header,
    .latepoint-transaction-payment-form .latepoint-lightbox-heading,
    .latepoint-transaction-payment-form .clean-layout-content-body,
    .latepoint-transaction-payment-form .latepoint-lightbox-content,
    .latepoint-transaction-payment-form .clean-layout-content-footer,
    .latepoint-transaction-payment-form .latepoint-lightbox-footer {padding: 20px 18px;}
    .latepoint-transaction-payment-form .invoice-due-amount-inner {width: 100%; min-width: 0;}
    .latepoint-transaction-payment-form .invoice-make-payment-btn,
    .latepoint-transaction-payment-form .clean-layout-content-footer > .latepoint-btn,
    .latepoint-transaction-payment-form .latepoint-lightbox-footer > .latepoint-btn {width: 100%; margin-left: 0; justify-content: center;}
    .ik9-billing-brand img {width: 56px; height: 56px; flex-basis: 56px;}
    .ik9-billing-wordmark strong {font-size: 15px;}
    .latepoint-transaction-payment-form .payment-info-row {flex-direction: column; gap: 4px;}
    .latepoint-transaction-payment-form .payment-confirmation-wrapper .payment-info .info-value {text-align: left;}
    body .ik9-family-billing .ik9-money-workflow {padding: 18px;}
}
@media(max-width: 380px) {
    body .ik9-family-billing .ik9-money-workflow dl {grid-template-columns: 1fr;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals .it-row {gap: 10px;}
}
@media(prefers-reduced-motion: reduce) {
    .latepoint-transaction-payment-form .payment-confirmation-wrapper [class*="a-"] {animation: none !important; opacity: 1; transform: none;}
}
@media print {
    body.ik9-billing-page {background: #fff !important; padding: 0;}
    .latepoint-w .os-invoice-wrapper {max-width: none; border: 0; box-shadow: none; margin: 0;}
    .latepoint-w .os-invoice-wrapper .os-invoice-inner {padding: 0;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-pay-link-w,
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-controls {display: none !important;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-heading {flex-direction: row;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-logo {width: auto; max-width: 40%;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-to-from {grid-template-columns: repeat(2,minmax(0,1fr));}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-totals,
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-due-info,
    .latepoint-w .os-invoice-wrapper .ik9-tip-paid {break-inside: avoid;}
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-paid-label,
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-draft-label,
    .latepoint-w .os-invoice-wrapper .invoice-document .invoice-status-voided-label {color: #202326; border-color: #202326;}
}

.latepoint-transaction-payment-form .clean-layout-content-body.is-dotted {padding-top: 28px;}
.latepoint-transaction-payment-form .full-summary-info-w {padding-top: 20px;}
@media(max-width: 600px) {
.latepoint-transaction-payment-form .clean-layout-content-body.is-dotted {padding-top: 20px;}
.latepoint-transaction-payment-form .clean-layout-content-footer > .latepoint-btn,
.latepoint-transaction-payment-form .latepoint-lightbox-footer > .latepoint-btn {flex: 1 0 100%;}
}
/* Keep success as a small semantic indicator, not a green branded header. */
.latepoint-transaction-payment-form .payment-confirmation-wrapper .icon-w {background: transparent; border: 0;}
.latepoint-transaction-payment-form .payment-confirmation-wrapper .icon-w i {background: #edf8f1; color: #216041; border: 1px solid #78a18b;}
