:root {
    --lp-ink: #183d3d;
    --lp-ink-deep: #0c2d2f;
    --lp-teal: #2f6260;
    --lp-sage: #83906b;
    --lp-sage-light: #dce0cf;
    --lp-sun: #ed9635;
    --lp-sun-deep: #d9771f;
    --lp-sand: #f2ebdc;
    --lp-cream: #fbf8f0;
    --lp-white: #ffffff;
    --lp-text: #273b3a;
    --lp-muted: #667271;
    --lp-border: #dce2dc;
    --lp-shadow: 0 22px 65px rgba(12, 45, 47, .13);
}

html { scroll-behavior: smooth; }
body { margin: 0; color: var(--lp-text); background: var(--lp-cream); font-family: "Segoe UI", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
a { text-underline-offset: .2em; }
.site-container { max-width: 1180px; }
.skip-link { position: fixed; top: -4rem; left: 1rem; z-index: 2000; padding: .75rem 1rem; color: #fff; background: var(--lp-ink-deep); border-radius: .35rem; }
.skip-link:focus { top: 1rem; }

.site-header { position: relative; z-index: 1000; background: rgba(251, 248, 240, .97); border-bottom: 1px solid rgba(24, 61, 61, .1); transition: box-shadow .2s ease; }
.site-header.is-scrolled { position: sticky; top: 0; box-shadow: 0 8px 30px rgba(12, 45, 47, .08); }
.navbar { min-height: 98px; padding: .45rem 0; }
.navbar-brand img { width: 118px; height: 82px; object-fit: contain; }
.navbar-toggler { border-color: rgba(24, 61, 61, .25); }
.nav-link { position: relative; margin: 0 .35rem; color: var(--lp-ink) !important; font-size: .92rem; font-weight: 650; }
.nav-link::after { position: absolute; right: .55rem; bottom: .15rem; left: .55rem; height: 2px; content: ""; background: var(--lp-sun); transform: scaleX(0); transition: transform .2s ease; }
.nav-link:hover::after, .nav-link:focus::after { transform: scaleX(1); }

.btn { border-radius: .35rem; padding: .72rem 1.25rem; font-weight: 700; letter-spacing: .01em; }
.btn-brand { color: #fff; background: var(--lp-ink); border-color: var(--lp-ink); }
.btn-brand:hover, .btn-brand:focus { color: #fff; background: var(--lp-ink-deep); border-color: var(--lp-ink-deep); transform: translateY(-1px); }
.btn-outline-brand { color: var(--lp-ink); border-color: rgba(24, 61, 61, .45); }
.btn-outline-brand:hover, .btn-outline-brand:focus { color: #fff; background: var(--lp-ink); border-color: var(--lp-ink); }
.btn-sun { color: var(--lp-ink-deep); background: var(--lp-sun); border-color: var(--lp-sun); box-shadow: 0 12px 30px rgba(237, 150, 53, .2); }
.btn-sun:hover, .btn-sun:focus { color: var(--lp-ink-deep); background: #f5a64a; border-color: #f5a64a; transform: translateY(-1px); }

.hero-section { position: relative; min-height: 650px; overflow: hidden; color: #fff; background: linear-gradient(118deg, var(--lp-ink-deep) 0%, #204f4e 58%, #46706a 100%); display: flex; align-items: center; padding: 5.8rem 0 6.2rem; }
.hero-section::before { position: absolute; inset: auto -10% -44% 42%; width: 800px; height: 500px; content: ""; background: #d69b59; border-radius: 52% 48% 0 0; opacity: .17; transform: rotate(-8deg); }
.hero-section::after { position: absolute; inset: auto -8% -51% 30%; width: 930px; height: 540px; content: ""; background: #101f20; border-radius: 52% 48% 0 0; opacity: .23; transform: rotate(8deg); }
.hero-texture { position: absolute; inset: 0; opacity: .28; background-image: radial-gradient(circle at 15% 20%, rgba(255,255,255,.12) 0 1px, transparent 1.5px); background-size: 26px 26px; mask-image: linear-gradient(to right, #000, transparent 70%); }
.eyebrow { display: inline-flex; align-items: center; gap: .65rem; margin-bottom: 1.2rem; color: #f4bd76; font-size: .78rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.eyebrow::before { width: 32px; height: 2px; content: ""; background: currentColor; }
.eyebrow-dark { color: var(--lp-sun-deep); }
.hero-section h1 { max-width: 760px; margin-bottom: 1.5rem; font-family: Georgia, "Times New Roman", serif; font-size: clamp(3.15rem, 6.7vw, 5.8rem); font-weight: 400; line-height: .96; letter-spacing: -.045em; }
.hero-section h1 span { color: #f4b25e; font-style: italic; }
.hero-lead { max-width: 610px; color: rgba(255,255,255,.81); font-size: 1.19rem; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1.5rem; margin-top: 2rem; }
.text-link { color: #fff; font-weight: 700; text-decoration: none; }
.text-link:hover { color: #f4bd76; }
.hero-trust { display: flex; flex-wrap: wrap; gap: 1.4rem; margin-top: 2.5rem; color: rgba(255,255,255,.72); font-size: .86rem; }
.hero-trust span { display: inline-flex; align-items: center; gap: .45rem; }
.hero-trust svg { width: 20px; height: 20px; fill: none; stroke: #f4bd76; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.account-preview { position: relative; z-index: 2; max-width: 430px; margin-left: auto; overflow: hidden; color: var(--lp-text); background: var(--lp-white); border: 1px solid rgba(255,255,255,.45); border-radius: 1rem; box-shadow: 0 32px 80px rgba(0,0,0,.27); transform: rotate(1.5deg); }
.account-preview::before { position: absolute; top: 0; left: 0; width: 100%; height: 5px; content: ""; background: linear-gradient(90deg, var(--lp-sun), #f4c277); }
.preview-top { display: flex; align-items: center; justify-content: space-between; padding: 1.4rem 1.65rem; border-bottom: 1px solid var(--lp-border); color: var(--lp-ink); font-weight: 800; }
.status-pill { padding: .4rem .65rem; color: #397044; background: #e9f2e7; border-radius: 100px; font-size: .72rem; }
.status-pill i { display: inline-block; width: 7px; height: 7px; margin-right: .25rem; background: #569863; border-radius: 50%; }
.preview-body { padding: 1.8rem 1.65rem 1.65rem; }
.preview-label { margin: 0 0 .4rem; color: var(--lp-muted); font-size: .78rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.payment-row { display: flex; align-items: end; justify-content: space-between; margin-bottom: 1.25rem; }
.payment-row strong { color: var(--lp-ink-deep); font-family: Georgia, serif; font-size: 2.3rem; font-weight: 500; }
.payment-row span { margin-bottom: .4rem; color: var(--lp-muted); font-size: .86rem; }
.progress { height: 8px; margin-bottom: .7rem; background: #e9ece7; }
.progress-bar { background: var(--lp-sun); }
.preview-meta { display: flex; justify-content: space-between; margin-bottom: 1.5rem; color: var(--lp-muted); font-size: .82rem; }
.preview-meta strong { color: var(--lp-ink); }
.preview-foot { display: flex; align-items: center; gap: .7rem; padding: 1rem 1.65rem; background: #f5f6f2; border-top: 1px solid var(--lp-border); font-size: .78rem; }
.preview-foot span { display: flex; flex-direction: column; }
.preview-foot small { color: var(--lp-muted); }
.receipt-icon { display: grid !important; width: 30px; height: 30px; place-items: center; color: #fff; background: #569863; border-radius: 50%; font-weight: 800; }

.assurance-strip { position: relative; z-index: 3; padding: 1.9rem 0; color: var(--lp-ink); background: var(--lp-sand); border-bottom: 1px solid #e2d8c3; }
.assurance-item { display: flex; align-items: center; gap: 1rem; }
.assurance-item > span { color: var(--lp-sun-deep); font-family: Georgia, serif; font-size: 1.4rem; font-style: italic; }
.assurance-item p { margin: 0; color: var(--lp-muted); font-size: .84rem; line-height: 1.45; }
.assurance-item strong { display: block; color: var(--lp-ink); font-size: .92rem; }

.section-pad { padding: 7rem 0; background: var(--lp-cream); }
.section-heading { max-width: 700px; }
.section-heading h2, .process-section h2, .portal-panel h2 { color: var(--lp-ink-deep); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 4vw, 4rem); font-weight: 400; line-height: 1.06; letter-spacing: -.035em; }
.section-heading > p { max-width: 590px; margin: 1.3rem auto 0; color: var(--lp-muted); font-size: 1.05rem; line-height: 1.7; }
.feature-grid { margin-top: 3.5rem; }
.feature-card { height: 100%; padding: 2.3rem; background: #fff; border: 1px solid var(--lp-border); border-radius: .7rem; box-shadow: 0 12px 35px rgba(24,61,61,.04); transition: transform .2s ease, box-shadow .2s ease; }
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--lp-shadow); }
.feature-card-accent { color: #fff; background: var(--lp-teal); border-color: var(--lp-teal); }
.feature-icon { display: grid; width: 52px; height: 52px; margin-bottom: 1.65rem; place-items: center; color: var(--lp-sun-deep); background: #fbeddc; border-radius: 50%; }
.feature-icon svg { width: 27px; height: 27px; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; }
.feature-card-accent .feature-icon { color: var(--lp-ink-deep); background: #f3b765; }
.feature-card h3 { margin-bottom: .8rem; color: var(--lp-ink-deep); font-family: Georgia, serif; font-size: 1.42rem; }
.feature-card-accent h3 { color: #fff; }
.feature-card p { margin: 0; color: var(--lp-muted); line-height: 1.7; }
.feature-card-accent p { color: rgba(255,255,255,.74); }

.process-section { padding: 7rem 0; color: rgba(255,255,255,.72); background: var(--lp-ink-deep); }
.process-section h2 { color: #fff; }
.process-section .col-lg-5 > p { max-width: 440px; margin: 1.4rem 0 2rem; font-size: 1.04rem; line-height: 1.7; }
.process-list { margin: 0; padding: 0; list-style: none; }
.process-list li { display: grid; grid-template-columns: 58px 1fr; gap: 1.25rem; padding: 1.3rem 0; border-bottom: 1px solid rgba(255,255,255,.12); }
.process-list li:first-child { border-top: 1px solid rgba(255,255,255,.12); }
.process-list > li > span { display: grid; width: 45px; height: 45px; place-items: center; color: var(--lp-ink-deep); background: var(--lp-sun); border-radius: 50%; font-family: Georgia, serif; font-size: 1.25rem; }
.process-list h3 { margin: .15rem 0 .35rem; color: #fff; font-size: 1.05rem; font-weight: 750; }
.process-list p { margin: 0; font-size: .93rem; line-height: 1.6; }

.portal-section { padding: 7rem 0; background: var(--lp-sand); }
.portal-panel { padding: clamp(2rem, 5vw, 4.5rem); background: rgba(255,255,255,.6); border: 1px solid #ddd2be; border-radius: 1rem; }
.portal-panel .col-lg-7 > p { max-width: 620px; margin: 1.25rem 0 0; color: var(--lp-muted); line-height: 1.75; }
.coming-soon-card { padding: 2rem; background: #fff; border-top: 4px solid var(--lp-sun); border-radius: .55rem; box-shadow: var(--lp-shadow); }
.coming-soon-label { color: var(--lp-sun-deep); font-size: .72rem; font-weight: 850; letter-spacing: .13em; text-transform: uppercase; }
.coming-soon-card h3 { margin: .7rem 0; color: var(--lp-ink); font-family: Georgia, serif; font-size: 1.45rem; }
.coming-soon-card p { color: var(--lp-muted); font-size: .9rem; line-height: 1.6; }

.site-footer { padding: 3rem 0; color: rgba(255,255,255,.65); background: #092426; font-size: .86rem; }
.footer-logo { width: 92px; height: 64px; object-fit: contain; filter: brightness(1.15); }
.footer-copy { margin-top: .45rem; }
.footer-label { margin-bottom: .35rem; color: #fff; font-weight: 750; }
.footer-link { color: #fff; text-decoration: none; }
.footer-link:hover { color: #f4bd76; }
.footer-divider { margin: 0 .45rem; }
.footer-legal { margin-top: .65rem; color: rgba(255,255,255,.4); }

@media (max-width: 991.98px) {
    .portal-page .site-header.is-scrolled { position: relative; top: auto; }
    .navbar { min-height: 82px; }
    .navbar-brand img { width: 94px; height: 66px; }
    .navbar-collapse { padding: 1rem 0 1.4rem; border-top: 1px solid var(--lp-border); }
    .nav-link { padding: .75rem 0; }
    .nav-link::after { display: none; }
    .hero-section { padding: 4.8rem 0; }
    .account-preview { margin: 1rem auto 0; transform: none; }
    .section-pad, .process-section, .portal-section { padding: 5rem 0; }
}
@media (max-width: 767.98px) {
    .hero-section h1 { font-size: clamp(3rem, 15vw, 4.7rem); }
    .hero-actions { align-items: flex-start; flex-direction: column; }
    .hero-trust { align-items: flex-start; flex-direction: column; gap: .75rem; }
    .assurance-item { padding: .4rem 0; }
    .section-heading { text-align: left !important; }
    .section-heading > p { margin-left: 0; }
    .portal-panel { border-radius: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
/* Administrator authentication and workspace */
.auth-section, .admin-section { min-height: 70vh; padding: 5rem 0; background: linear-gradient(145deg, var(--lp-sand), var(--lp-cream) 52%, #e5eadf); }
.auth-card { max-width: 520px; padding: clamp(2rem, 5vw, 3.3rem); background: #fff; border: 1px solid var(--lp-border); border-top: 5px solid var(--lp-sun); border-radius: .8rem; box-shadow: var(--lp-shadow); }
.auth-card-heading h1, .admin-heading h1 { color: var(--lp-ink-deep); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 5vw, 3.8rem); font-weight: 400; letter-spacing: -.035em; }
.auth-card-heading p, .admin-heading p { color: var(--lp-muted); }
.auth-card .form-label { color: var(--lp-ink); font-size: .88rem; font-weight: 750; }
.auth-card .form-control { min-height: 50px; border-color: #cdd6d0; border-radius: .35rem; }
.auth-card .form-control:focus { border-color: var(--lp-teal); box-shadow: 0 0 0 .2rem rgba(47, 98, 96, .14); }
.auth-help { margin-top: 1.4rem; color: var(--lp-muted); font-size: .8rem; line-height: 1.6; text-align: center; }
.admin-summary-card, .admin-next-card { height: 100%; padding: 1.8rem; background: #fff; border: 1px solid var(--lp-border); border-radius: .65rem; box-shadow: 0 12px 35px rgba(24,61,61,.05); }
.admin-summary-card span { display: block; color: var(--lp-muted); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.admin-summary-card strong { display: block; margin: .45rem 0; color: var(--lp-ink-deep); font-family: Georgia, serif; font-size: 2.2rem; }
.admin-summary-card small { color: var(--lp-muted); }
.admin-next-card { border-left: 5px solid var(--lp-sun); }
.closing-card h2, .admin-summary-card h2, .admin-next-card h2 { margin: .6rem 0; color: var(--lp-ink); font-family: Georgia, serif; }
.admin-next-card p { color: var(--lp-muted); line-height: 1.7; }
/* Guided payment-plan workflow */
.plan-form-section { display: grid; grid-template-columns: 42px 1fr; gap: 1rem; margin-top: 2rem; padding-top: 2rem; border-top: 1px solid var(--lp-border); }
.plan-form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: 0; }
.plan-form-number { display: grid; width: 38px; height: 38px; place-items: center; color: #fff; background: var(--lp-ink); border-radius: 50%; font-weight: 800; }
.plan-form-body h2 { margin: .1rem 0 .35rem; color: var(--lp-ink-deep); font-family: Georgia, serif; font-size: 1.65rem; }
.plan-form-body h3 { color: var(--lp-ink); font-size: 1rem; font-weight: 800; }
.plan-form-section-advanced { margin-top: 2.5rem; padding: 1.5rem; background: #f4f5f0; border: 1px solid var(--lp-border); border-radius: .55rem; }
.calculation-panel, .schedule-preview { height: 100%; padding: .85rem 1rem; background: #f4f5f0; border: 1px solid var(--lp-border); border-radius: .4rem; }
.calculation-panel { display: flex; flex-direction: column; justify-content: center; }
.calculation-panel span { color: var(--lp-muted); font-size: .78rem; font-weight: 800; text-transform: uppercase; }
.calculation-panel strong { color: var(--lp-ink-deep); font-family: Georgia, serif; font-size: 1.5rem; }
.calculation-panel-total { flex-direction: row; align-items: center; justify-content: space-between; color: #fff; background: var(--lp-ink); }
.calculation-panel-total span, .calculation-panel-total strong { color: #fff; }
.client-picker { position: relative; }
.client-results { position: absolute; z-index: 20; right: 0; left: 0; display: none; max-height: 18rem; overflow-y: auto; box-shadow: var(--lp-shadow); }
.client-results.show { display: block; }
.client-results small { display: block; color: var(--lp-muted); }
.selected-client-chip { display: inline-flex; align-items: center; gap: .55rem; padding: .45rem .65rem; color: var(--lp-ink); background: var(--lp-sage-light); border-radius: 100px; font-size: .86rem; }
.selected-client-chip button { padding: 0; color: var(--lp-ink); background: none; border: 0; font-size: 1.15rem; line-height: 1; }
@media (max-width: 575.98px) { .plan-form-section { grid-template-columns: 1fr; } .plan-form-number { margin-bottom: -.25rem; } }

/* Payment-plan dashboard */
.dashboard-section { padding-top: 3.5rem; }
.dashboard-container { max-width: 1580px; padding-right: clamp(1rem, 3vw, 3rem); padding-left: clamp(1rem, 3vw, 3rem); }
.dashboard-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; }
.dashboard-heading h1 { margin-bottom: .35rem; }
.dashboard-actions { display: flex; flex-wrap: wrap; gap: .65rem; }
.dashboard-summary { display: flex; flex-wrap: wrap; gap: 1.5rem; margin: 2rem 0 1rem; color: var(--lp-muted); font-size: .88rem; }
.dashboard-summary span + span { padding-left: 1.5rem; border-left: 1px solid var(--lp-border); }
.dashboard-summary strong { color: var(--lp-ink-deep); }
.dashboard-table-card { overflow: hidden; background: #fff; border: 1px solid var(--lp-border); border-radius: .25rem; box-shadow: none; }
.dashboard-table { min-width: 1100px; color: var(--lp-text); font-size: .88rem; }
.dashboard-table thead th {
    padding: .9rem 1rem;
    color: var(--lp-muted);
    background: #fff;
    border-bottom: 1px solid var(--lp-border);
    font-size: 1rem;
    font-weight: 525;
    letter-spacing: 0;
    text-transform: none;
    white-space: nowrap;
}
.dashboard-table tbody td { padding: 1.05rem 1rem; border-color: #e8ece8; }
.dashboard-plan-row { transition: background-color .15s ease; }
.dashboard-table tbody tr:nth-child(odd) > td { background-color: #fafafa; } .dashboard-table tbody tr:nth-child(even) > td { background-color: #fff; } .dashboard-table tbody .dashboard-plan-row:hover > td { background-color: #f6f6f3; }
.dashboard-table tbody .dashboard-plan-row.test-daily-billing > td { background-color: #fff9df; }
.dashboard-table tbody .dashboard-plan-row.test-daily-billing > td:first-child { box-shadow: inset 4px 0 #d8b84e; }
.dashboard-table tbody .dashboard-plan-row.ready-to-close > td { background-color: #eef7ed; }
.dashboard-table tbody .dashboard-plan-row.ready-to-close > td:first-child { box-shadow: inset 4px 0 #4f8a52; }
.dashboard-client-link { color: var(--lp-ink-deep); font-weight: 400; font-size: 1.1rem; text-decoration: none; }
.dashboard-client-link:hover { color: var(--lp-sun-deep); text-decoration: underline; }
.dashboard-plan-link { color: var(--lp-teal); font-weight: 500; font-size: 1.1rem; text-decoration: none; }
.dashboard-plan-link:hover { color: var(--lp-sun-deep); text-decoration: underline; }
.co-client-count { display: inline-grid; min-width: 1.7rem; height: 1.7rem; margin-left: .35rem; padding: 0 .35rem; place-items: center; color: var(--lp-ink); background: var(--lp-sage-light); border-radius: 100px; font-size: .72rem; font-weight: 800; }
.dashboard-status { display: inline-block; padding: .34rem .62rem; border-radius: 100px; font-size: .72rem; font-weight: 800; white-space: nowrap; }
.dashboard-table .dashboard-status { min-width: 7rem; padding: .45rem .75rem; border-radius: .2rem; text-align: center; }
.invoice-delivery-marker{display:inline-flex;align-items:center;padding:.2rem .45rem;border:1px solid currentColor;border-left-width:4px;border-radius:.12rem;font-size:.68rem;font-weight:800;letter-spacing:.04em;line-height:1.15;text-transform:uppercase;white-space:nowrap}.invoice-delivery-marker.is-viewed{color:#32683c;background:#f2f8f0}.invoice-delivery-marker.is-sent{color:#315f68;background:#eef6f7}.invoice-delivery-marker.is-unsent{color:#68716f;background:#f5f6f5}
.notice-ledger{min-width:1100px}.notice-ledger td{padding-top:.55rem;padding-bottom:.55rem}.notice-ledger-category{font-size:.78rem;font-weight:700;color:var(--lp-muted);white-space:nowrap}.notice-ledger-summary{min-width:18rem;max-width:42rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.notice-ledger-summary a{font-weight:700}
.status-current { color: #32683c; background: #e8f2e6; }
.status-ready-to-close { color: #2f6b38; background: #dff0dc; }
.status-due-soon { color: #725718; background: #fff1c8; }
.status-due { color: #864f10; background: #fde2bf; }
.status-past-due, .status-default-eligible { color: #8a2d28; background: #f8d9d5; }
.status-draft, .status-closed { color: #586260; background: #e8ecea; }
.money-cell { color: var(--lp-ink-deep); font-variant-numeric: tabular-nums; font-weight: 700; text-align: right; white-space: nowrap; }
.dashboard-monthly-column { width: 5.75rem; min-width: 5.75rem; }
.dashboard-monthly-column span { display: block; white-space: nowrap; }
.money-cell.balance-due { color: #9a461b; }
.muted-value { color: #8a9492; }
.dashboard-email { color: var(--lp-teal); }
.dashboard-empty { padding: 4rem 1rem !important; color: var(--lp-muted); text-align: center; }
.dashboard-empty strong, .dashboard-empty span { display: block; }
.dashboard-empty strong { margin-bottom: .35rem; color: var(--lp-ink); font-family: Georgia, serif; font-size: 1.3rem; }
.dashboard-pagination { margin-top: 1.25rem; }
@media (max-width: 991.98px) { .dashboard-heading { align-items: flex-start; flex-direction: column; } }
@media (max-width: 575.98px) { .dashboard-summary span + span { padding-left: 0; border-left: 0; } .dashboard-summary { gap: .75rem 1.25rem; } }
.amendment-history-table { min-width: 1080px; font-size: .87rem; }
.amendment-history-table th { color: var(--lp-muted); font-size: .72rem; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.amendment-entry { padding: 1.1rem 0; border-top: 1px solid var(--lp-border); }
.amendment-entry-heading { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1rem; }
.amendment-entry-heading span { color: var(--lp-muted); font-size: .82rem; }
.amendment-change-list { display: grid; grid-template-columns: repeat(auto-fit,minmax(280px,1fr)); gap: .4rem 1.5rem; margin: .85rem 0 0; padding: 0; list-style: none; color: var(--lp-muted); font-size: .85rem; }
.amendment-change-list strong { color: var(--lp-text); }
/* Manual payment workflow */
.payment-entry-form .form-label { color: var(--lp-ink); font-size: .86rem; font-weight: 750; }
.payment-choice { padding: 1.2rem; background: #fff8e8; border: 1px solid #ead3a7; border-radius: .5rem; }
.payment-choice legend { float: none; width: auto; margin-bottom: .45rem; color: var(--lp-ink-deep); font-family: Georgia,serif; font-size: 1.25rem; }
.payment-preview-total { display: flex; align-items: baseline; justify-content: space-between; padding: 1rem 0; border-bottom: 1px solid var(--lp-border); }
.payment-preview-total strong { color: var(--lp-ink-deep); font-family: Georgia,serif; font-size: 2rem; }
.payment-allocation-list { margin: 0; padding: 0; list-style: none; }
.payment-allocation-list li, .payment-preview-summary > div { display: flex; justify-content: space-between; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--lp-border); }
.payment-allocation-list small { display: block; color: var(--lp-muted); }
.payment-allocation-pending { color: #8a5415; }
.payment-allocation-shortfall, .payment-preview-summary .payment-outstanding-due dt, .payment-preview-summary .payment-outstanding-due dd { color: #8b1e2d; }
.payment-preview-summary { margin: 1rem 0 0; }.payment-preview-summary dt { color: var(--lp-muted); font-weight: 600; }.payment-preview-summary dd { margin: 0; font-weight: 800; }
.payment-preview-summary .open-invoices-total { margin: 0 -.75rem; padding: .9rem .75rem; border-radius: .65rem; background: #fff3df; border-bottom-color: #f0c47d; }
.payment-preview-summary .open-invoices-total dt, .payment-preview-summary .open-invoices-total dd { color: #9a461b; }.payment-preview-summary .open-invoices-total dd { font-size: 1.15rem; }
.invoice-details-card { height: auto; padding-top: 1rem; padding-bottom: 1rem; }
.invoice-details-card h2 { margin-top: 0; font-size: 1.35rem; }
.invoice-details-card dt { color: var(--lp-muted); font-size: .75rem; letter-spacing: .05em; text-transform: uppercase; }
.dashboard-actions-menu { width: 1%; text-align: left; white-space: nowrap; }
.dashboard-menu-button { width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--lp-border); border-radius: 50%; color: var(--lp-ink); font-size: 1.35rem; line-height: 1; }
.dashboard-menu-button:hover, .dashboard-menu-button:focus { color: #fff; background: var(--lp-teal); border-color: var(--lp-teal); }
.dashboard-actions-menu .dropdown-item { font-size: .88rem; }
.dashboard-actions-menu .dropdown-menu { z-index: 1080; }
.secure-message-star { display: inline-block; min-width: 1.5rem; color: #8a9491; font-size: 1.6rem; line-height: 1; text-align: center; }
.secure-message-star.is-starred { color: var(--lp-sun-deep); }
.dashboard-table-card.dropdown-open { position: relative; z-index: 20; overflow: visible; padding-bottom: 11rem; }
.dashboard-table-card.dropdown-open .table-responsive { overflow: visible; }
.template-variable-list { display: flex; flex-wrap: wrap; gap: .5rem; padding: .75rem; background: var(--lp-sage-light); border-radius: .5rem; }
.template-variable-button { padding: .35rem .55rem; color: var(--lp-ink); background: #fff; border: 1px solid rgba(23, 63, 64, .24); border-radius: .35rem; font-family: monospace; }
.template-variable-button:hover, .template-variable-button:focus { color: var(--lp-ink); background: #f8fbf9; border-color: var(--lp-ink); }
.email-template-preview { max-width: 680px; overflow: hidden; border: 1px solid var(--lp-border); border-radius: .65rem; background: #fff; box-shadow: 0 10px 28px rgba(23,63,64,.08); }
.email-preview-header { padding: 1rem 1.5rem; background: var(--lp-ink-deep); }
.email-preview-header img { width: 100px; height: auto; }
.email-preview-body { padding: 1.5rem; }
.email-preview-signature { display: flex; align-items: center; gap: 1rem; padding: 1.1rem 1.5rem; color: var(--lp-muted); background: var(--lp-sage-light); font-size: .82rem; }
.email-preview-signature img { width: 72px; height: auto; }
.settings-tabs { gap: .2rem; border-bottom-color: var(--lp-border); }
.settings-tabs .nav-link { color: var(--lp-muted); font-weight: 750; }
.settings-tabs .nav-link.active { color: var(--lp-ink-deep); border-color: var(--lp-border) var(--lp-border) #fff; }
.settings-tab-content > .tab-pane { padding-top: .25rem; }
.cron-tabs .nav-link { color: var(--lp-teal); }
.cron-tabs .nav-link.active { color: #fff; background: var(--lp-teal); }
.copy-command { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: 1rem; background: #102f30; border-radius: .5rem; }
.copy-command code { display: block; overflow-wrap: anywhere; color: #f7f3df; white-space: pre-wrap; }
.copy-command .btn { flex: 0 0 auto; background: #fff; }
@media (max-width: 575.98px) { .settings-tabs { flex-wrap: nowrap; overflow-x: auto; } .settings-tabs .nav-link { white-space: nowrap; } .copy-command { flex-direction: column; } }

.dashboard-table-card .table-responsive, [data-drag-scroll] { cursor: grab; }
.dashboard-table-card .table-responsive.is-dragging, [data-drag-scroll].is-dragging { cursor: grabbing; user-select: none; }

/* Client-plan list and administrator portal view */
.client-plan-table { min-width: 1180px; }
.client-edit-icon { display: inline-grid; width: 2.25rem; height: 2.25rem; place-items: center; color: var(--lp-teal); border: 1px solid var(--lp-border); border-radius: 50%; text-decoration: none; font-size: 1rem; }
.client-edit-icon:hover, .client-edit-icon:focus { color: #fff; background: var(--lp-teal); border-color: var(--lp-teal); }
.client-private-notes { min-width: 13rem; max-width: 20rem; color: var(--lp-muted); }
.portal-admin-banner { position: relative; z-index: 1100; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .65rem 1rem; color: #fff; background: #9a461b; font-size: .9rem; }
.portal-admin-banner form { margin: 0; }
@media (max-width: 575.98px) { .portal-admin-banner { align-items: flex-start; flex-direction: column; } }

/* Dashboard current-balance breakdown */
.current-balance-cell { min-width: 9.5rem; vertical-align: middle; }
.current-balance-total { display: block; color: var(--lp-ink-deep); font-size: 1.08rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.current-balance-cell.balance-due .current-balance-total { color: #9a461b; }
.current-balance-line, .current-balance-empty, .current-balance-more { display: block; margin-top: .22rem; font-size: .76rem; font-variant-numeric: tabular-nums; line-height: 1.25; white-space: nowrap; }
.current-balance-line { color: var(--lp-teal); text-decoration: none; }
.current-balance-line:hover, .current-balance-line:focus { color: var(--lp-sun-deep); text-decoration: underline; }
.current-balance-line.is-overdue { color: #9a461b; font-weight: 750; }
.current-balance-empty { color: var(--lp-muted); }
.current-balance-more { padding: 0; color: var(--lp-teal); background: transparent; border: 0; text-align: left; }
.current-balance-more:hover, .current-balance-more:focus { color: var(--lp-sun-deep); text-decoration: underline; }

/* Invoice detail financial summary */
.status-paid { color: #32683c; background: #e8f2e6; }
.status-partially-paid { color: #725718; background: #fff1c8; }
.status-issued { color: #864f10; background: #fde2bf; }
.status-voided, .status-closed-terminated { color: #586260; background: #e8ecea; }
.invoice-date-overdue { color: #9a461b; font-weight: 800; }
.invoice-charges-card h2, .invoice-financial-summary h2 { font-size: 1.45rem; }
.invoice-financial-summary { position: sticky; top: 1rem; }
.invoice-financial-summary .invoice-summary-primary { margin-top: .2rem; border-top: 2px solid var(--lp-border); }
.invoice-financial-summary .invoice-summary-primary dt, .invoice-financial-summary .invoice-summary-primary dd { color: var(--lp-ink-deep); font-weight: 800; }
.invoice-financial-summary .invoice-summary-balance { margin: .35rem -.75rem -.1rem; padding: 1rem .75rem; background: var(--lp-sage-light); border: 0; border-radius: .55rem; }
.invoice-financial-summary .invoice-summary-balance dt { color: var(--lp-ink-deep); font-size: 1rem; font-weight: 800; }
.invoice-financial-summary .invoice-summary-balance dd { color: var(--lp-ink-deep); font-family: Georgia,serif; font-size: 1.55rem; }
.invoice-financial-summary .invoice-summary-balance.has-balance { background: #fff3df; }
.invoice-financial-summary .invoice-summary-balance.has-balance dt, .invoice-financial-summary .invoice-summary-balance.has-balance dd { color: #9a461b; }
@media (max-width: 991.98px) { .invoice-financial-summary { position: static; } }
/* Client payment-method tabs */
.portal-payment-tabs { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: 1rem; border-bottom: 2px solid var(--lp-border); }
.portal-payment-tab { flex: 1 1 8rem; padding: .85rem 1rem; color: var(--lp-muted); background: #f4f5f1; border: 1px solid var(--lp-border); border-bottom: 0; border-radius: .55rem .55rem 0 0; font-weight: 800; }
.portal-payment-tab:hover, .portal-payment-tab:focus { color: var(--lp-teal); background: #fff; }
.portal-payment-tab.active { color: var(--lp-ink-deep); background: #fff; box-shadow: inset 0 -3px 0 var(--lp-sun); }
.portal-payment-tab .badge { margin-left: .35rem; font-size: .62rem; vertical-align: middle; }
.portal-payment-panel { padding: 1.5rem; background: #fff; border: 1px solid var(--lp-border); border-top: 0; border-radius: 0 0 .65rem .65rem; }
.portal-payment-panel[hidden] { display: none; }
.portal-payment-panel h3 { color: var(--lp-ink-deep); font-family: Georgia,serif; }
.portal-payment-amount { color: var(--lp-text) !important; font-size: 1.05rem; }
.portal-payment-amount strong { color: #32683c; font-size: 1.25rem; }
.portal-payment-instructions { padding-top: 1.2rem; border-top: 1px solid var(--lp-border); }
.portal-payment-logo { display: block; width: auto; max-width: min(100%,420px); max-height: 220px; margin-bottom: 1rem; object-fit: contain; }
.offline-payment-confirmation { padding: 1.2rem; background: #f4f7f2; border: 1px solid var(--lp-border); border-radius: .55rem; }
@media (max-width: 575.98px) { .portal-payment-tabs { flex-direction: column; border-bottom: 0; } .portal-payment-tab { width: 100%; border-bottom: 1px solid var(--lp-border); border-radius: .45rem; } .portal-payment-panel { border-top: 1px solid var(--lp-border); border-radius: .55rem; } }

/* ===== Admin Sidebar ===== */

.admin-shell {
    display: flex;
    min-height: 100vh;
    background: #f5f7f6;
}

.admin-sidebar {
    width: 220px;
    flex: 0 0 220px;
    background: #173f40;
    color: #fff;
    display: flex;
    flex-direction: column;
    padding: 1rem;
}

.admin-workspace {
    flex: 1;
    min-width: 0;
}

.admin-sidebar-brand {
    text-align: center;
    margin-bottom: 1.5rem;
}

.admin-sidebar-brand img {
    width: 120px;
    height: auto;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .7rem .8rem;
    border-radius: .5rem;
    color: rgba(255,255,255,.82);
    text-decoration: none;
    font-weight: 400;
    transition: background .15s;
}

.admin-sidebar-link:hover {
    background: rgba(255,255,255,.08);
    color: #fff;
}

.admin-sidebar-link.active {
    background: rgba(255,255,255,.12);
    color: #fff;
}

.admin-sidebar-link span {
    width: 20px;
    text-align: center;
}

.admin-sidebar-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,.12);
}

.admin-sidebar-account {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1rem;
}

.admin-sidebar-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

.admin-sidebar-user strong,
.admin-sidebar-user small {
    display: block;
}

.admin-sidebar-user small {
    color: rgba(255,255,255,.65);
}

.admin-sidebar-footer-links {
    display: flex;
    flex-direction: column;
}

.admin-sidebar-footer-link,
.admin-sidebar-signout {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .65rem .25rem;
    color: #f4bd76;
    text-decoration: none;
    background: none;
    border: 0;
    font-weight: 400;
    text-align: left;
}

.admin-sidebar-footer-link:hover,
.admin-sidebar-signout:hover {
    color: #ffd79a;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
}

.admin-main {
    padding: 0rem;
}

@media (max-width: 991px) {
    .admin-shell {
        display: block;
    }

    .admin-sidebar {
        width: 100%;
    }
}

/* Admin sidebar layout cleanup */
body.admin-layout .admin-section {
    min-height: 0;
    padding: 0;
    background: transparent;
}

body.admin-layout .admin-section > .container,
body.admin-layout .admin-section > .site-container {
    max-width: none;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Keep sidebar to viewport height instead of stretching with long pages */
.admin-sidebar {
    position: sticky;
    top: 0;
    align-self: flex-start;
    height: 100vh;
    overflow-y: auto;
    box-sizing: border-box;
}

.dashboard-status.status-ready-to-close {
    background: #fff3cd;
    color: #7a263a;
    border: 1px solid #e5c35b;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.15rem 0.4rem;
}
.admin-notice-link {
    margin-bottom: .65rem;
}

.admin-sidebar-link .admin-notice-badge {
    width: auto;
    min-width: max-content;
    margin-left: auto;
    padding: .15rem .5rem;
    border-radius: 999px;
    background: #f3c969;
    color: #173f40;
    font-size: .75rem;
    line-height: 1.35;
    text-align: center;
}

.admin-notice-link-background {
    background: rgba(255,255,255,.08);
}

.secure-message-star {
    position: relative;
    top: -2px;
}

.portal-message-alert {
    border: 2px solid var(--lp-sun-deep);
    border-left: 7px solid var(--lp-sun-deep);
    color: var(--lp-ink);
}

.portal-message-alert > div > div > strong {
    color: var(--lp-ink-deep);
    font-weight: 700;
}

.secure-message-thread { display: flex; flex-direction: column; gap: 1rem; margin-bottom: 1.5rem; }
.secure-message-bubble { width: min(82%, 850px); padding: 1rem; border: 1px solid var(--lp-border); border-radius: 1rem; }
.secure-message-bubble.is-admin { margin-right: auto; background: #f4f6f5; border-bottom-left-radius: .2rem; }
.secure-message-bubble.is-client { margin-left: auto; background: #fff9e8; border-color: #ead9a4; border-bottom-right-radius: .2rem; }
.secure-message-meta { display: flex; justify-content: space-between; gap: 1rem; margin-bottom: .45rem; }
.secure-message-meta span, .secure-message-tracking { color: var(--lp-muted); font-size: .82rem; }
.secure-message-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.secure-message-thumbnail { display: block; width: fit-content; max-width: 180px; margin-top: .85rem; padding: 0; overflow: hidden; border: 1px solid var(--lp-border); border-radius: .65rem; background: #fff; cursor: zoom-in; }
.secure-message-thumbnail img { display: block; width: 100%; max-height: 150px; object-fit: cover; }
.secure-message-attachment { display: flex; align-items: center; gap: .5rem; margin-top: .75rem; }
.secure-message-tracking { display: block; margin-top: .5rem; }
.secure-message-preview { max-width: 100%; max-height: 75vh; object-fit: contain; }
@media (max-width: 575.98px) { .secure-message-bubble { width: 94%; } .secure-message-meta { flex-direction: column; gap: .15rem; } }

/* Spacing between messages inside the expanded older-message section */
#olderMessages .secure-message-bubble {
    margin-bottom: 1rem;
}

/* Older messages show/collapse button */
.secure-message-history-toggle {
    width: 100%;
    padding: .55rem 1rem;
    border-radius: .75rem;
    font-weight: 600;
    text-align: center;
}

/* Small CSS-drawn arrow */
.secure-message-history-toggle .history-chevron {
    display: inline-block;
    width: 7px;
    height: 7px;
    margin-right: .6rem;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

/* Turn arrow upward when older messages are expanded */
.secure-message-history-toggle[aria-expanded="true"] .history-chevron {
    transform: rotate(225deg) translate(-2px, -2px);
}

.secure-message-history-toggle:hover {
    background-color: var(--lp-sun);
    color: #332a18;
}

.admin-sidebar-divider {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    margin-top: .75rem;
    padding-top: 1rem;
}

.form-check-input:checked {
    background-color: #173f40;
    border-color: #173f40;
}

.admin-sidebar-offcanvas {
    --bs-offcanvas-bg: #173f40;
    --bs-offcanvas-color: #fff;
}
/* Reports */
.report-summary-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(175px,1fr));gap:1rem}.report-summary-card{padding:1rem 1.1rem;background:#fff;border:1px solid var(--lp-border);border-left:4px solid var(--lp-sun);border-radius:.3rem}.report-summary-card span{display:block;color:var(--lp-muted);font-size:.8rem;font-weight:700;text-transform:uppercase;letter-spacing:.035em}.report-summary-card strong{display:block;margin-top:.25rem;color:var(--lp-ink-deep);font-family:Georgia,serif;font-size:1.45rem;font-variant-numeric:tabular-nums}.report-table{min-width:100%}.report-table thead th{color:var(--lp-muted);font-size:.75rem;text-transform:uppercase;letter-spacing:.035em;white-space:nowrap}.report-table td{padding-top:.65rem;padding-bottom:.65rem}.report-table tbody tr:hover td{background:#f7faf7}.report-empty{padding:3rem!important;text-align:center;color:var(--lp-muted)}.report-tabs{flex-wrap:nowrap;overflow-x:auto}.report-tabs .nav-link{white-space:nowrap}.report-scope{color:var(--lp-muted);font-size:.9rem}.report-summary-link{text-decoration:none;transition:border-color .15s ease,transform .15s ease,box-shadow .15s ease}.report-summary-link:hover{border-color:var(--lp-sun-deep);transform:translateY(-1px);box-shadow:0 .25rem .75rem rgba(20,55,55,.09)}.report-summary-link.active{border-color:var(--lp-sun-deep);background:#fff8e4;box-shadow:inset 0 0 0 1px var(--lp-sun-deep)}.report-aging-state{color:var(--lp-muted);font-size:.9rem;font-weight:600}.report-aging-state a{margin-left:.45rem}
@media print{.admin-sidebar,.admin-topbar,.report-actions,.report-tabs,.report-filter-card,.report-pagination{display:none!important}.admin-shell,.admin-workspace,.admin-main,.report-page{display:block!important;background:#fff!important}.report-page{padding:.3in!important;box-sizing:border-box!important}.report-page .dashboard-container{max-width:none!important;padding:0!important}.report-summary-grid{grid-template-columns:repeat(5,1fr);gap:.35rem}.report-summary-card{padding:.5rem;border:1px solid #aaa}.report-summary-card strong{font-size:1rem}.report-table-card{padding:0!important;border:0!important;box-shadow:none!important}.report-table{min-width:0!important;width:100%;font-size:8pt}.report-table th,.report-table td{padding:.25rem!important}.report-table a{color:#000!important;text-decoration:none!important}.table-responsive{overflow:visible!important}@page{size:landscape;margin:.35in}}

/* Shared administrator formatting editor and safely rendered content */
.formatting-toolbar{flex-wrap:wrap}.formatting-editor textarea{font-family:inherit}.formatted-text{overflow-wrap:anywhere}.formatted-text>:last-child{margin-bottom:0}.formatted-text .text-large{font-size:1.2em}.formatted-text ul,.formatted-text ol{padding-left:1.5rem}.secure-message-body.formatted-text{white-space:normal}