/* ==========================================================================
   Finances pages — page-specific styles on top of the app skin (pages-m2.css).
   Every rule is scoped to its page: body[data-app-page="x"] or a page class.
   --------------------------------------------------------------------------
   Pages and tones (neighbours differ):
     Commission ........ .lp2-comm     violet
     Bills & Airtime ... .lp2-bills    amber   (+ its pop-ups: body[data-app-page="bills"])
     Wallet ............ .lp2-wallet   emerald
       Withdrawal acct . .lp2-wa       slate
       Payout requests . .lp2-payouts  pink
     Payments .......... .lp2-pay      indigo
     Cash Flow Copilot . .lp2-copilot  cyan
     Reports ........... .lp2-reports  blue
   Primary text #000, secondary no lighter than #475569.
   ========================================================================== */

/* ---- Shared bits --------------------------------------------------------- */

/* One Finances entry, several pages: Sales | Receivables | Commission and the
   like (App._finTabs), under the page header. */
.pill-tabs.fin-tabs { margin: 0 0 12px; flex-wrap: nowrap; }
.fin-tabs .pill-tab i { margin-right: 4px; font-size: .8rem; }

.lp2 .lp2-title { min-width: 0; }
.lp2 .lp2-title .page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2 .lp2-title .page-sub { display: block; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* a white card that sits between the kit's list cards */
.lp2 .fin-card {
    background: #fff; border: 1px solid var(--lp2-line, #e7ebf1); border-radius: 18px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); padding: 14px 16px; margin: 0 0 16px;
}
.lp2 .fin-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.lp2 .fin-card-title { font-size: .95rem; font-weight: 800; color: #000; letter-spacing: -.01em; }
.lp2 .fin-card-sub { font-size: .74rem; font-weight: 600; color: #475569; margin-top: 2px; }

/* buttons that sit on a headline card */
.lp2 .fin-hero-acts { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.lp2 .fin-hero-acts .btn { min-height: 38px; border-radius: 12px; padding: 0 14px; font-size: .8rem; font-weight: 800; box-shadow: none; }
.lp2 .fin-hero-acts .fin-btn-light { background: #fff !important; color: var(--lp2-deep) !important; border: 0 !important; }
.lp2 .fin-hero-acts .fin-btn-ghost {
    background: rgba(255, 255, 255, .14) !important; color: #fff !important; border: 1px solid rgba(255, 255, 255, .28) !important;
}
.lp2 .fin-hero-acts .fin-btn-ghost:hover { background: rgba(255, 255, 255, .24) !important; }

/* a status chip on a headline card */
.lp2 .fin-chip-ok { background: rgba(255, 255, 255, .92) !important; color: var(--lp2-deep) !important; border-color: transparent !important; }

/* scrollable pill tabs (no sideways page scroll on phones) */
.lp2 .fin-pills {
    display: flex; flex-wrap: nowrap; gap: 6px; overflow-x: auto; overflow-y: hidden;
    margin: 0 -16px 12px; padding: 2px 16px 4px; scrollbar-width: none; overscroll-behavior-x: contain;
}
.lp2 .fin-pills::-webkit-scrollbar { display: none; }
.lp2 .fin-pills .pill-tab { flex: 0 0 auto; white-space: nowrap; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.lp2 .fin-pills .pill-tab-n { font-size: .66rem; font-weight: 800; border-radius: 999px; padding: 0 7px; line-height: 1.6; }
@media (min-width: 720px) { .lp2 .fin-pills { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; } }

/* tiles on the swipe row that are money going out */
.lp2 .sx-pm-card .fin-neg { color: #be123c; }
.lp2 .sx-pm-card .fin-sub { font-size: .68rem; font-weight: 650; color: #475569; line-height: 1.4; margin-top: 2px; }
.lp2 .sx-pm-card .fin-sub b { color: #000; font-weight: 800; }
.lp2 .sx-pm-card .fin-info {
    margin-left: auto; flex: none; width: 26px; height: 26px; border-radius: 9px; border: 1px solid var(--lp2-line, #e7ebf1);
    background: #fff; color: #475569; display: grid; place-items: center; font-size: .8rem; cursor: pointer;
}
.lp2 .sx-pm-card .fin-info:hover { color: #000; border-color: #94a3b8; }

/* ==========================================================================
   Commission — .lp2-comm (violet)
   ========================================================================== */

.lp2-comm .cmm-people .sx-item { align-items: center; }
.lp2-comm .cmm-split {
    height: 5px; max-width: 240px; margin-top: 8px; border-radius: 99px; overflow: hidden;
    background: color-mix(in srgb, #d97706 26%, #fff);
}
.lp2-comm .cmm-split > i { display: block; height: 100%; border-radius: 99px; background: #059669; }
.lp2-comm .cmm-paid { font-size: .7rem; font-weight: 700; color: #475569; white-space: nowrap; }
.lp2-comm .cmm-settled { color: #047857; }
.lp2-comm .cmm-settled i { font-size: .72rem; }
.lp2-comm .sx-amt.cmm-zero { color: #475569; }
.lp2-comm .lp2-cap em { display: inline-flex; align-items: center; gap: 5px; color: #334155; }
.lp2-comm .cmm-key { display: inline-block; width: 10px; height: 5px; border-radius: 99px; }
.lp2-comm .cmm-key-paid { background: #059669; }
.lp2-comm .cmm-key-owed { background: color-mix(in srgb, #d97706 45%, #fff); margin-left: 6px; }
.lp2-comm .cmm-people { margin-bottom: 18px; }

/* rules: one sentence each, with a switch */
.lp2-comm .cmm-r { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-top: 1px solid #eef1f5; }
.lp2-comm .lp2-day + .cmm-r { border-top: 0; }
.lp2-comm .cmm-r.off .cmm-r-ic,
.lp2-comm .cmm-r.off .cmm-r-body { opacity: .6; }
.lp2-comm .cmm-r-ic {
    width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--sx-c) 13%, #fff); color: color-mix(in srgb, var(--sx-c) 80%, #000);
    font-size: .76rem; font-weight: 800;
}
.lp2-comm .cmm-r-body { flex: 1; min-width: 0; }
.lp2-comm .cmm-r-who { font-size: .86rem; font-weight: 800; color: #000; line-height: 1.3; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp2-comm .cmm-r-who em { font-style: normal; font-weight: 650; color: #334155; }
.lp2-comm .cmm-r-sub { font-size: .74rem; font-weight: 600; color: #475569; margin-top: 2px; line-height: 1.4; }
.lp2-comm .cmm-r-sub b { color: color-mix(in srgb, var(--lp2-h3) 78%, #000); font-weight: 800; }
.lp2-comm .cmm-switch { position: relative; flex: none; width: 42px; height: 24px; cursor: pointer; }
.lp2-comm .cmm-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.lp2-comm .cmm-switch span {
    position: absolute; inset: 0; border-radius: 999px; background: #cbd5e1; transition: background .15s ease;
}
.lp2-comm .cmm-switch span::after {
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 3px rgba(15, 23, 42, .3); transition: transform .15s ease;
}
.lp2-comm .cmm-switch input:checked + span { background: var(--lp2-h3); }
.lp2-comm .cmm-switch input:checked + span::after { transform: translateX(18px); }
.lp2-comm .cmm-switch input:focus-visible + span { outline: 2px solid var(--lp2-h3); outline-offset: 2px; }
.lp2-comm .cmm-del {
    flex: none; width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--lp2-line); background: #fff;
    color: #475569; display: grid; place-items: center; cursor: pointer;
}
.lp2-comm .cmm-del:hover { color: #b91c1c; border-color: #fecaca; background: #fef2f2; }
@media (max-width: 380px) { .lp2-comm .cmm-r-note { display: none; } }

/* the statement pop-up for one person */
body[data-app-page="commissions"] .cmm-sum { display: grid; grid-template-columns: 1.3fr 1fr .7fr; gap: 8px; }
body[data-app-page="commissions"] .cmm-sum > div {
    padding: 10px 12px; border-radius: 14px; background: #f8fafc; border: 1px solid #e7ebf1; min-width: 0;
}
body[data-app-page="commissions"] .cmm-sum span { display: block; font-size: .66rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #334155; }
body[data-app-page="commissions"] .cmm-sum b { display: block; margin-top: 3px; font-size: .98rem; font-weight: 800; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
body[data-app-page="commissions"] .cmm-sum .cmm-sum-main { background: #f5f3ff; border-color: #ddd6fe; }
body[data-app-page="commissions"] .cmm-sum .cmm-sum-main b { color: #5b21b6; }
body[data-app-page="commissions"] .cmm-period { font-size: .76rem; font-weight: 700; color: #334155; }
body[data-app-page="commissions"] .cmm-entries { display: block; max-height: 48vh; overflow-y: auto; }
body[data-app-page="commissions"] .cmm-entries > .data-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-shrink: 0; }
body[data-app-page="commissions"] .cmm-ref { font-family: var(--font-mono); font-size: .8rem; }
body[data-app-page="commissions"] .cmm-entry .data-item-right { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; }
body[data-app-page="commissions"] .cmm-entry .badge { font-size: .6rem; }
body[data-app-page="commissions"] .cmm-entry.is-paid .data-item-amount { color: #334155; }

/* ==========================================================================
   Bills & Airtime — .lp2-bills (amber) and its pop-ups
   (moved here from the <style> block bills.js used to print on every render)
   ========================================================================== */

.lp2-bills .bx-notice { background: #fffbeb; border-color: #fde68a; }
.lp2-bills .bx-notice > i { color: #b45309; }
.lp2-bills .bx-unavail { background: #fff7ed; border-color: #fed7aa; }
.lp2-bills .bx-unavail > i { color: #c2410c; }
.lp2-bills .bx-dim { opacity: .45; pointer-events: none; filter: grayscale(.5); }

/* recent purchases first on phones; beside the catalogue on wide screens */
.lp2-bills .bx-layout { display: flex; flex-direction: column; gap: 4px; }
.lp2-bills .bx-recent { margin-bottom: 14px; }
@media (min-width: 1100px) {
    .lp2-bills .bx-layout:not(.bx-solo) {
        display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 20px; align-items: start;
    }
    .lp2-bills .bx-layout:not(.bx-solo) .bx-recent { order: 2; margin: 0; }
    .lp2-bills .bx-layout:not(.bx-solo) .bx-shop { order: 1; }
}
.lp2-bills .bx-all {
    border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
    font-size: .72rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--lp2-deep);
}
.lp2-bills .bx-all:hover { text-decoration: underline; }

/* rows: the icon wears the network's colour */
.lp2-bills .bx-prow .sx-ico { background: var(--bx-c); color: var(--bx-ink); border-color: transparent; }
.lp2-bills .bx-prow .badge-red { white-space: nowrap; }

/* the catalogue */
.lp2-bills .bx-types { margin-bottom: 12px; }
.lp2-bills .bx-types .pill-tab i { font-size: .8rem; }
.lp2-bills .bx-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 10px; }
@media (min-width: 720px) { .lp2-bills .bx-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; } }
.lp2-bills .bx-card {
    position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left;
    padding: 12px; min-height: 118px; cursor: pointer; font: inherit; color: #000; overflow: hidden;
    background: #fff; border: 1px solid var(--lp2-line); border-radius: 16px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}
.lp2-bills .bx-card::after {
    content: ""; position: absolute; left: 12px; right: 12px; bottom: 0; height: 3px; border-radius: 3px 3px 0 0;
    background: var(--bx-c); opacity: .9;
}
.lp2-bills .bx-card:hover { border-color: color-mix(in srgb, var(--bx-c) 55%, #fff); box-shadow: 0 12px 24px -18px rgba(15, 23, 42, .45); }
.lp2-bills .bx-card:active { transform: scale(.98); }
.lp2-bills .bx-card:focus-visible { outline: 2px solid var(--lp2-h3); outline-offset: 2px; }
.lp2-bills .bx-card-ic {
    width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px;
    background: var(--bx-c); color: var(--bx-ink); font-size: 1.12rem;
    box-shadow: 0 8px 16px -10px var(--bx-c);
}
.lp2-bills .bx-card-name { font-size: .84rem; font-weight: 800; line-height: 1.25; color: #000; }
.lp2-bills .bx-card-sub { font-size: .7rem; font-weight: 650; color: #475569; }

/* ---- pop-ups (all live in body > #modal-container on this page) ---- */

body[data-app-page="bills"] .bx-dhead {
    display: flex; align-items: center; gap: 12px; padding: 12px 14px;
    border: 1px solid #e7ebf1; border-radius: 16px;
    background: linear-gradient(120deg, color-mix(in srgb, var(--bx-c) 10%, #fff), #fff 70%);
}
body[data-app-page="bills"] .bx-dhead-ic {
    width: 42px; height: 42px; flex: none; border-radius: 12px; display: grid; place-items: center;
    background: var(--bx-c); color: var(--bx-ink); font-size: 1.15rem;
}
body[data-app-page="bills"] .bx-dhead-main { flex: 1; min-width: 0; }
body[data-app-page="bills"] .bx-dhead-name { font-size: .95rem; font-weight: 800; color: #000; }
body[data-app-page="bills"] .bx-dhead-sub { font-size: .74rem; font-weight: 600; color: #475569; margin-top: 1px; }
body[data-app-page="bills"] .bx-drows { border: 1px solid #e7ebf1; border-radius: 16px; padding: 2px 14px; background: #fff; }
body[data-app-page="bills"] .bx-drow {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed #e7ebf1; font-size: .84rem;
}
body[data-app-page="bills"] .bx-drow:last-child { border-bottom: 0; }
body[data-app-page="bills"] .bx-drow > span { color: #475569; font-weight: 650; flex: none; }
body[data-app-page="bills"] .bx-drow > b { color: #000; font-weight: 750; text-align: right; min-width: 0; overflow-wrap: anywhere; }
body[data-app-page="bills"] .bx-drow .bx-mono { font-family: var(--font-mono, monospace); font-size: .76rem; }
body[data-app-page="bills"] .bx-dmsg { font-size: .8rem; color: #334155; padding: 9px 0; line-height: 1.5; }
body[data-app-page="bills"] .bx-cut { color: #047857; font-weight: 800; }
body[data-app-page="bills"] .bx-muted { color: #475569; font-weight: 600; }

/* history */
body[data-app-page="bills"] .bx-hist { max-height: 56vh; overflow-y: auto; margin: -2px; padding: 0 2px; }
body[data-app-page="bills"] .bx-trow {
    display: flex; align-items: center; gap: 12px; padding: 11px 4px; cursor: pointer;
    border-bottom: 1px solid #eef1f5;
}
body[data-app-page="bills"] .bx-trow:last-child { border-bottom: 0; }
body[data-app-page="bills"] .bx-trow:hover { background: #fafbfd; }
body[data-app-page="bills"] .bx-trow-ic {
    width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
    background: var(--bx-c); color: var(--bx-ink); font-size: .95rem;
}
body[data-app-page="bills"] .bx-trow-body { flex: 1; min-width: 0; }
body[data-app-page="bills"] .bx-trow-name { font-size: .86rem; font-weight: 750; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-app-page="bills"] .bx-trow-sub { font-size: .72rem; font-weight: 600; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body[data-app-page="bills"] .bx-trow-btn { margin-top: 7px; padding: 4px 10px; font-size: .72rem; min-height: 0; }
body[data-app-page="bills"] .bx-trow-btn.bx-retry { color: #92400e; border-color: #f5d9a8; }
body[data-app-page="bills"] .bx-trow-end { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
body[data-app-page="bills"] .bx-trow-amt { font-size: .86rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; }
body[data-app-page="bills"] .bx-trow-end .badge,
body[data-app-page="bills"] .bx-dhead .badge { font-size: .62rem; white-space: nowrap; }
body[data-app-page="bills"] .bx-pager { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; }
body[data-app-page="bills"] .bx-pager-n { font-size: .76rem; font-weight: 650; color: #334155; white-space: nowrap; }
body[data-app-page="bills"] .bx-pager-solo { text-align: center; margin-top: 12px; }
body[data-app-page="bills"] .bx-hist-empty { padding: 28px 0; }

/* result */
body[data-app-page="bills"] .bx-result { text-align: center; padding: 8px 4px; display: flex; flex-direction: column; gap: 8px; }
body[data-app-page="bills"] .bx-result-ic {
    width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 6px; display: grid; place-items: center;
    background: color-mix(in srgb, var(--bx-r) 12%, #fff); color: var(--bx-r); font-size: 2.2rem;
}
body[data-app-page="bills"] .bx-result-pending .bx-result-ic i { animation: spin 1.4s linear infinite; }
body[data-app-page="bills"] .bx-result h3 { margin: 0; font-size: 1.15rem; font-weight: 800; color: #000; }
body[data-app-page="bills"] .bx-result p { margin: 0 0 4px; font-size: .88rem; color: #334155; }
body[data-app-page="bills"] .bx-result .bx-drows { text-align: left; margin: 6px 0; }

/* purchase form (unchanged classes) */
body[data-app-page="bills"] .bx-act { position: sticky; bottom: 0; z-index: 6; background: var(--surface, #fff); padding: 10px 0 2px; margin-top: 2px; }
body[data-app-page="bills"] .bx-act::before {
    content: ""; position: absolute; left: 0; right: 0; top: -18px; height: 18px; pointer-events: none;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--surface, #fff));
}
body[data-app-page="bills"] .bx-act .btn { margin-top: 0; }
body[data-app-page="bills"] .bx-warn {
    display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; margin-bottom: 14px;
    border: 1px solid rgba(245, 158, 11, .3); background: rgba(245, 158, 11, .09); font-size: .82rem; color: #334155;
}
body[data-app-page="bills"] .bx-warn > i { color: #d97706; font-size: .95rem; line-height: 1.3; flex: none; }
body[data-app-page="bills"] .bx-sec { margin-bottom: 16px; }
body[data-app-page="bills"] .bx-lab { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #334155; margin-bottom: 8px; }
body[data-app-page="bills"] .bx-amts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
body[data-app-page="bills"] .bills-amt-btn {
    border: 1.5px solid #dbe2ea; background: #fff; border-radius: 12px; padding: 13px 6px;
    font-weight: 800; font-size: .98rem; color: #000; cursor: pointer; transition: all .12s;
}
body[data-app-page="bills"] .bills-amt-btn:hover { border-color: #d97706; }
body[data-app-page="bills"] .bills-amt-btn.active { border-color: #b45309; background: #b45309; color: #fff; box-shadow: 0 6px 14px -8px #b45309; }
body[data-app-page="bills"] .bx-money { position: relative; }
body[data-app-page="bills"] .bx-money .bx-cur {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-weight: 700; font-size: .86rem; color: #475569; pointer-events: none;
}
body[data-app-page="bills"] .bx-money input { padding-left: 54px !important; font-size: 1.2rem !important; font-weight: 700 !important; height: 52px; }
body[data-app-page="bills"] .bills-bundle {
    display: flex; align-items: center; gap: 12px; padding: 13px 14px; margin-bottom: 8px; cursor: pointer;
    border: 1.5px solid #e7ebf1; border-radius: 12px; background: #fff; transition: all .12s;
}
body[data-app-page="bills"] .bills-bundle:hover { border-color: #d97706; }
body[data-app-page="bills"] .bills-bundle.active { border-color: #b45309; background: #fffbeb; }
body[data-app-page="bills"] .bx-radio {
    width: 20px; height: 20px; flex: none; border-radius: 50%; border: 2px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center; transition: all .12s;
}
body[data-app-page="bills"] .bills-bundle.active .bx-radio { border-color: #b45309; background: #b45309; }
body[data-app-page="bills"] .bx-radio i { font-size: .7rem; color: #fff; opacity: 0; }
body[data-app-page="bills"] .bills-bundle.active .bx-radio i { opacity: 1; }
body[data-app-page="bills"] .bx-scroll { max-height: 250px; overflow-y: auto; margin: -2px; padding: 2px; }
body[data-app-page="bills"] .bx-acct { border: 1.5px solid rgba(16, 185, 129, .3); background: rgba(16, 185, 129, .07); border-radius: 14px; padding: 14px 16px; margin-bottom: 16px; }
body[data-app-page="bills"] .bx-acct-h { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: .86rem; color: #000; margin-bottom: 10px; }
body[data-app-page="bills"] .bx-sum { border: 1px solid #e7ebf1; border-radius: 14px; padding: 14px 16px; background: #f8fafc; margin-bottom: 14px; }
body[data-app-page="bills"] .bx-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .86rem; margin-bottom: 7px; }
body[data-app-page="bills"] .bx-row .bx-k { color: #475569; }
body[data-app-page="bills"] .bx-row .bx-v { font-weight: 650; color: #000; text-align: right; }
body[data-app-page="bills"] .bx-row .bx-v.bx-cut { color: #047857; font-weight: 800; }
body[data-app-page="bills"] .bx-total { display: flex; justify-content: space-between; align-items: center; padding-top: 11px; margin-top: 3px; border-top: 1px dashed #cbd5e1; }
body[data-app-page="bills"] .bx-total .bx-k { font-weight: 800; font-size: .9rem; color: #000; }
body[data-app-page="bills"] .bx-total .bx-v { font-weight: 800; font-size: 1.3rem; color: #000; letter-spacing: -.01em; }
body[data-app-page="bills"] .bx-cp { display: flex; gap: 8px; align-items: stretch; margin-bottom: 14px; }
body[data-app-page="bills"] .bx-cp input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .06em; font-weight: 650; }
body[data-app-page="bills"] .bx-cp .btn { flex: none; white-space: nowrap; }
body[data-app-page="bills"] .bx-cp-on {
    display: flex; align-items: center; gap: 10px; padding: 11px 13px; margin-bottom: 14px;
    border: 1.5px solid rgba(5, 150, 105, .3); background: rgba(5, 150, 105, .07); border-radius: 12px;
}
body[data-app-page="bills"] .bx-cp-on i.bi-ticket-perforated-fill { color: #059669; font-size: 1.05rem; flex: none; }
body[data-app-page="bills"] .bx-cp-code { font-weight: 800; font-size: .86rem; letter-spacing: .05em; }
body[data-app-page="bills"] .bx-cp-lbl { font-size: .74rem; color: #475569; }
body[data-app-page="bills"] .bx-cp-msg { font-size: .76rem; margin: -8px 0 12px; line-height: 1.45; }

/* ==========================================================================
   Wallet — .lp2-wallet (emerald)
   ========================================================================== */

.lp2-wallet .fin-perf .sx-pm-card { display: flex; flex-direction: column; }
.lp2-wallet .fin-perf .sx-pm-val { margin: 8px 0 4px; }
@media (max-width: 719px) { .lp2-wallet .fin-perf .sx-pm-card { flex-basis: 172px; } }

/* admin fees due: their own callout, with the Pay button */
.lp2-wallet .fin-due {
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    margin: 0 0 16px; padding: 12px 14px; border-radius: 16px;
    background: #fffbeb; border: 1px solid #fcd34d;
}
.lp2-wallet .fin-due.is-blocked { background: #fef2f2; border-color: #fca5a5; }
.lp2-wallet .fin-due-ic {
    width: 38px; height: 38px; flex: none; border-radius: 12px; display: grid; place-items: center;
    background: #fef3c7; color: #b45309; font-size: 1.05rem;
}
.lp2-wallet .fin-due.is-blocked .fin-due-ic { background: #fee2e2; color: #b91c1c; }
.lp2-wallet .fin-due-body { flex: 1 1 200px; min-width: 0; }
.lp2-wallet .fin-due-t { font-size: .88rem; font-weight: 800; color: #000; }
.lp2-wallet .fin-due-t b { color: #92400e; white-space: nowrap; }
.lp2-wallet .fin-due.is-blocked .fin-due-t b { color: #991b1b; }
.lp2-wallet .fin-due-s { font-size: .75rem; font-weight: 600; color: #334155; margin-top: 2px; line-height: 1.45; }
.lp2-wallet .fin-due-btn {
    flex: none; min-height: 38px; border-radius: 12px; padding: 0 14px; font-weight: 800;
    background: #b45309; border: 0; color: #fff;
}
.lp2-wallet .fin-due.is-blocked .fin-due-btn { background: #b91c1c; }
.lp2-wallet .fin-due-btn:hover { filter: brightness(1.06); color: #fff; }
@media (max-width: 480px) { .lp2-wallet .fin-due-btn { width: 100%; } }

/* two sections: stacked on phones (side first), side by side from 1100px */
.lp2 .fin-split { display: flex; flex-direction: column; gap: 4px; }
@media (min-width: 1100px) {
    .lp2 .fin-split { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 20px; align-items: start; }
    .lp2 .fin-split-side { order: 2; }
    .lp2 .fin-split-main { order: 1; }
}

.lp2 .fin-stmt { padding: 14px 14px 10px; }
.lp2 .fin-grp { padding: 6px 0 4px; border-top: 1px solid #eef1f5; }
.lp2 .fin-grp:first-of-type { border-top: 0; }
.lp2 .fin-grp-h {
    display: flex; align-items: center; gap: 6px; margin: 4px 2px 2px;
    font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: #334155;
}
.lp2 .fin-grp-h i { color: var(--lp2-h3); font-size: .78rem; }
.lp2 .fin-line,
.lp2 .fin-total {
    display: flex; align-items: baseline; justify-content: space-between; gap: 12px; width: 100%;
    border: 0; background: none; font: inherit; text-align: left; cursor: pointer;
    padding: 7px 2px; border-radius: 8px; color: #334155; font-size: .84rem; font-weight: 650;
}
.lp2 .fin-line:hover { background: #f8fafc; }
.lp2 .fin-line b { color: #000; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp2 .fin-line.is-out b { color: #be123c; }
.lp2 .fin-total {
    margin-top: 6px; padding: 11px 12px; border-radius: 12px;
    background: color-mix(in srgb, var(--lp2-h3) 8%, #fff); border: 1px solid color-mix(in srgb, var(--lp2-h3) 22%, #fff);
    color: #000; font-weight: 800; font-size: .9rem;
}
.lp2 .fin-total b { color: var(--lp2-deep); font-size: 1rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* the reminder button, compact and clear of the list */
body[data-app-page="wallet"] #wallet-readiness-reopen.fin-checklist {
    position: fixed; right: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); z-index: 180;
    align-items: center; gap: 6px; padding: 9px 13px; border: 0; border-radius: 999px;
    background: #b91c1c; color: #fff; font-size: .78rem; font-weight: 800; line-height: 1;
    box-shadow: 0 12px 26px -10px rgba(185, 28, 28, .6); cursor: pointer;
}
@media (min-width: 768px) { body[data-app-page="wallet"] #wallet-readiness-reopen.fin-checklist { bottom: 24px; right: 24px; } }

/* explainer and withdraw pop-ups */
body[data-app-page="wallet"] .fin-explain,
body[data-app-page="payout-requests"] .fin-explain { font-size: .88rem; line-height: 1.6; color: #1e293b; padding-bottom: 6px; }
body.lp2-app .fin-wd-bal {
    display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
    padding: 12px 14px; border-radius: 14px; background: #ecfdf5; border: 1px solid #a7f3d0;
}
body.lp2-app .fin-wd-bal span { font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #065f46; }
body.lp2-app .fin-wd-bal b { font-size: 1.15rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; }
body.lp2-app .fin-wd .fin-opt { font-weight: 600; color: #475569; }
body.lp2-app .fin-wd-fee { border: 1px solid #e7ebf1; border-radius: 14px; padding: 4px 14px; }
body.lp2-app .fin-wd-fee > div { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; font-size: .84rem; color: #334155; }
body.lp2-app .fin-wd-fee #wd-fee-preview { color: #be123c; }
body.lp2-app .fin-wd-fee .fin-wd-net { border-top: 1px dashed #dbe2ea; font-weight: 800; color: #000; }
body.lp2-app .fin-wd-fee #wd-net-preview { color: #047857; }
body.lp2-app .fin-wd-how {
    display: flex; gap: 10px; align-items: flex-start; font-size: .78rem; line-height: 1.45; color: #334155;
    padding: 10px 12px; border-radius: 12px; background: #f8fafc; border: 1px solid #e7ebf1;
}
body.lp2-app .fin-wd-how i { color: #047857; font-size: .95rem; }

/* ==========================================================================
   Withdrawal account — .lp2-wa (slate)
   ========================================================================== */

.lp2-wa .lp2-hero-val { overflow-wrap: anywhere; font-size: clamp(1.25rem, 4.6vw, 1.7rem); }
.lp2-wa .lp2-stat b { letter-spacing: .01em; }
.lp2-wa .wa-facts { padding: 4px 16px; }
.lp2-wa .wa-fact {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 10px 0; border-top: 1px solid #eef1f5; font-size: .84rem;
}
.lp2-wa .wa-fact:first-child { border-top: 0; }
.lp2-wa .wa-fact span { color: #475569; font-weight: 650; flex: none; }
.lp2-wa .wa-fact b { color: #000; font-weight: 750; text-align: right; overflow-wrap: anywhere; }
.lp2-wa .wa-req.is-approved { background: #ecfdf5; border-color: #a7f3d0; }
.lp2-wa .wa-req.is-approved > i { color: #047857; }
.lp2-wa .wa-req.is-pending { background: #fffbeb; border-color: #fde68a; }
.lp2-wa .wa-req.is-pending > i { color: #b45309; }
.lp2-wa .wa-req.is-rejected { background: #fef2f2; border-color: #fecaca; }
.lp2-wa .wa-req.is-rejected > i { color: #b91c1c; }
.lp2-wa .wa-req-note { margin-top: 4px; color: #475569; font-size: .74rem; }
.lp2-wa .wa-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
@media (max-width: 400px) { .lp2-wa .wa-acts { grid-template-columns: 1fr; } }
.lp2-wa .wa-act {
    display: flex; align-items: center; gap: 11px; text-align: left; cursor: pointer; font: inherit;
    padding: 12px 13px; border-radius: 16px; background: #fff; border: 1px solid var(--lp2-line);
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04); transition: border-color .15s ease, background .15s ease;
}
.lp2-wa .wa-act > i {
    width: 36px; height: 36px; flex: none; border-radius: 11px; display: grid; place-items: center;
    background: #eff6ff; color: #1d4ed8; font-size: 1rem;
}
.lp2-wa .wa-act.is-danger > i { background: #fef2f2; color: #b91c1c; }
.lp2-wa .wa-act span { min-width: 0; }
.lp2-wa .wa-act b { display: block; font-size: .85rem; font-weight: 800; color: #000; }
.lp2-wa .wa-act small { display: block; font-size: .72rem; font-weight: 600; color: #475569; margin-top: 1px; }
.lp2-wa .wa-act:hover:not(:disabled) { border-color: #94a3b8; background: #f8fafc; }
.lp2-wa .wa-act:disabled { opacity: .55; cursor: not-allowed; }
.lp2-wa .lp2-note a { color: var(--lp2-deep); font-weight: 800; }
/* the set-up form keeps its own layout; the card above replaces its banner */
.lp2-wa .withdrawal-account-page { gap: 14px; }
.lp2-wa .wa-form-panel,
.lp2-wa .wa-guidance-panel { border-radius: 18px; border-color: var(--lp2-line); box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }

/* ==========================================================================
   Payout requests — .lp2-payouts (pink)  (+ its pop-ups, also opened from Wallet)
   ========================================================================== */

.lp2-payouts .fr-empty-acts { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; margin-top: 14px; }
.lp2-payouts .fr-empty-acts .btn i { display: inline; font-size: 1rem; margin: 0; opacity: 1; color: inherit; }
body.lp2-app .fr-detail .fr-dhead {
    display: flex; justify-content: space-between; align-items: flex-start; gap: 10px;
    padding: 14px; border-radius: 16px; background: linear-gradient(120deg, #fdf2f8, #fff 70%); border: 1px solid #fbcfe8;
}
body.lp2-app .fr-detail .fr-damt { font-size: 1.4rem; font-weight: 800; color: #000; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
body.lp2-app .fr-detail .fr-dsub { font-size: .76rem; font-weight: 650; color: #475569; margin-top: 2px; }
body.lp2-app .fr-detail .fr-reject {
    display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px;
    background: #fef2f2; border: 1px solid #fecaca; font-size: .8rem; color: #7f1d1d;
}
body.lp2-app .fr-detail .fr-reject i { color: #b91c1c; }
body.lp2-app .fr-detail .fr-drows { border: 1px solid #e7ebf1; border-radius: 16px; padding: 2px 14px; }
body.lp2-app .fr-detail .fr-drow {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 9px 0; border-bottom: 1px dashed #e7ebf1; font-size: .84rem;
}
body.lp2-app .fr-detail .fr-drow:last-child { border-bottom: 0; }
body.lp2-app .fr-detail .fr-drow span { color: #475569; font-weight: 650; flex: none; }
body.lp2-app .fr-detail .fr-drow b { color: #000; font-weight: 750; text-align: right; overflow-wrap: anywhere; }
body.lp2-app .fr-detail .fr-timeline { position: relative; padding-left: 4px; }
body.lp2-app .fr-detail .fr-step { position: relative; display: flex; gap: 10px; padding: 0 0 12px 18px; }
body.lp2-app .fr-detail .fr-step > i {
    position: absolute; left: 0; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: #db2777;
    box-shadow: 0 0 0 3px #fce7f3;
}
body.lp2-app .fr-detail .fr-step::before { content: ""; position: absolute; left: 4px; top: 14px; bottom: 0; width: 2px; background: #f1d5e6; }
body.lp2-app .fr-detail .fr-step:last-child::before { display: none; }
body.lp2-app .fr-detail .fr-step-body { flex: 1; min-width: 0; }
body.lp2-app .fr-detail .fr-step-t { font-size: .82rem; font-weight: 800; color: #000; }
body.lp2-app .fr-detail .fr-step-t span { font-weight: 650; color: #334155; }
body.lp2-app .fr-detail .fr-step-s { font-size: .76rem; color: #475569; margin-top: 1px; line-height: 1.4; }
body.lp2-app .fr-detail .fr-step-when { font-size: .7rem; font-weight: 650; color: #475569; white-space: nowrap; }
body.lp2-app .fr-detail .fr-cancel { color: #b91c1c !important; border-color: #fecaca !important; }
body.lp2-app .fr-form .tab-bar { overflow-x: auto; }
body.lp2-app .fr-form .tab-bar button.active { color: #9d174d; }

/* ==========================================================================
   Payments — .lp2-pay (indigo)
   ========================================================================== */

.lp2-pay .lp2-hero-val small { text-transform: none; }
.lp2-pay .fin-paystats .sx-pm-val { margin: 10px 0 2px; }
.lp2-pay #pay-hist-tabs { margin-top: 0; }
body[data-app-page="payments"] .fin-paydetail .pay-detail-amount { color: #000; font-weight: 800; }

/* ==========================================================================
   Cash Flow Copilot — .lp2-copilot (cyan)
   (these rules replace the ones growth-tools.js used to inject for it)
   ========================================================================== */

.lp2-copilot .lp2-hero-note { max-width: 62ch; }
.lp2-copilot .cfc-meter {
    display: block; height: 7px; margin: 2px 0 9px; border-radius: 99px; overflow: hidden;
    background: rgba(255, 255, 255, .2);
}
.lp2-copilot .cfc-meter > i { display: block; height: 100%; border-radius: 99px; background: #fff; box-shadow: 0 0 12px rgba(255, 255, 255, .6); }
.lp2-copilot .sx-hero-chip i { font-size: .78rem; }

.lp2-copilot .cfc-tile .sx-pm-val small { font-size: .7em; font-weight: 700; color: #475569; }
.lp2-copilot .cfc-tile.is-link { cursor: pointer; }
.lp2-copilot .cfc-tile.is-link:hover { border-color: color-mix(in srgb, var(--sx-c) 45%, #fff); }
.lp2-copilot .sx-pm-card .sx-pm-val.fin-neg { color: #be123c; }
@media (max-width: 719px) { .lp2-copilot .cfc-tiles .sx-pm-card, .lp2-copilot .cfc-projs .sx-pm-card { flex-basis: 176px; } }

.lp2-copilot .cfc-proj { border-top: 3px solid var(--sx-c); }
.lp2-copilot .cfc-proj-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.lp2-copilot .cfc-proj-h b { font-size: .9rem; font-weight: 800; color: #000; }
.lp2-copilot .cfc-st {
    font-size: .64rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; border-radius: 999px; padding: 3px 8px;
    color: color-mix(in srgb, var(--sx-c) 78%, #000); background: color-mix(in srgb, var(--sx-c) 12%, #fff);
}
.lp2-copilot .cfc-proj-lbl { margin-top: 8px; font-size: .66rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #475569; }
.lp2-copilot .cfc-proj .sx-pm-val { margin: 2px 0 6px; }

/* actions: the detail wraps (the kit's rows keep one line of facts) */
.lp2-copilot .cfc-act { align-items: flex-start; }
.lp2-copilot .cfc-act .sx-ref { white-space: normal; }
.lp2-copilot .cfc-act-d { margin-top: 3px; font-size: .76rem; font-weight: 600; color: #334155; line-height: 1.45; }
.lp2-copilot .cfc-act .sx-end { flex-direction: row; align-items: center; gap: 8px; }
.lp2-copilot .cfc-act .badge { font-size: .62rem; }
.lp2-copilot .cfc-go { color: #475569; font-size: .95rem; }
.lp2-copilot .cfc-act:hover .cfc-go { color: var(--sx-c); }
.lp2-copilot .cfc-acts { margin-bottom: 16px; }
@media (max-width: 420px) { .lp2-copilot .cfc-act .badge { display: none; } }

.lp2-copilot .cfc-link {
    border: 0; background: none; padding: 0; cursor: pointer; font: inherit;
    font-size: .72rem; font-weight: 800; letter-spacing: 0; text-transform: none; color: var(--lp2-deep);
}
.lp2-copilot .cfc-low { margin-bottom: 16px; }
.lp2-copilot .cfc-low-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid #eef1f5; }
.lp2-copilot .cfc-low-row:first-child { border-top: 0; }
.lp2-copilot .cfc-low-name { min-width: 0; }
.lp2-copilot .cfc-low-name b { display: block; font-size: .84rem; font-weight: 750; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-copilot .cfc-low-name small { display: block; font-family: var(--font-mono); font-size: .68rem; color: #475569; }
.lp2-copilot .cfc-low-q { flex: none; font-size: .74rem; font-weight: 650; color: #334155; white-space: nowrap; }
.lp2-copilot .cfc-low-q b { color: #92400e; font-weight: 800; }
.lp2-copilot .cfc-low-q.is-out b { color: #b91c1c; }

.lp2-copilot .cfc-check { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-top: 1px solid #eef1f5; }
.lp2-copilot .cfc-check:first-child { border-top: 0; }
.lp2-copilot .cfc-check > i {
    width: 28px; height: 28px; flex: none; border-radius: 9px; display: grid; place-items: center; font-size: .9rem;
}
.lp2-copilot .cfc-check.ok > i { background: #dcfce7; color: #047857; }
.lp2-copilot .cfc-check.bad > i { background: #fee2e2; color: #b91c1c; }
.lp2-copilot .cfc-check b { display: block; font-size: .84rem; font-weight: 800; color: #000; line-height: 1.3; }
.lp2-copilot .cfc-check span { display: block; margin-top: 2px; font-size: .74rem; font-weight: 600; color: #475569; line-height: 1.4; }

/* ==========================================================================
   Reports — .lp2-reports (blue)
   ========================================================================== */

.lp2-reports .rpt-skel-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }

/* one Export button, every export inside */
.lp2-reports .rpt-export { position: relative; }
.lp2-reports .rpt-export > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.lp2-reports .rpt-export > summary::-webkit-details-marker { display: none; }
.lp2-reports .rpt-export-caret { font-size: .7rem; transition: transform .15s ease; }
.lp2-reports .rpt-export[open] .rpt-export-caret { transform: rotate(180deg); }
.lp2-reports .rpt-export-menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(290px, calc(100vw - 32px));
    background: #fff; border: 1px solid #e2e8f0; border-radius: 16px; padding: 6px;
    box-shadow: 0 24px 50px -20px rgba(15, 23, 42, .45);
}
.lp2-reports .rpt-export-menu button {
    display: flex; align-items: center; gap: 11px; width: 100%; text-align: left; cursor: pointer; font: inherit;
    padding: 9px 10px; border: 0; border-radius: 11px; background: none; color: #000;
}
.lp2-reports .rpt-export-menu button:hover,
.lp2-reports .rpt-export-menu button:focus-visible { background: #f1f5f9; outline: none; }
.lp2-reports .rpt-export-menu button > i {
    width: 34px; height: 34px; flex: none; border-radius: 10px; display: grid; place-items: center; font-size: 1rem;
    background: #eff6ff; color: #1d4ed8;
}
.lp2-reports .rpt-export-menu button:nth-child(1) > i { background: #ecfdf5; color: #047857; }
.lp2-reports .rpt-export-menu button:nth-child(2) > i { background: #fef2f2; color: #b91c1c; }
.lp2-reports .rpt-export-menu button:nth-child(3) > i { background: #f5f3ff; color: #6d28d9; }
.lp2-reports .rpt-export-menu b { display: block; font-size: .84rem; font-weight: 800; }
.lp2-reports .rpt-export-menu small { display: block; font-size: .72rem; font-weight: 600; color: #475569; }

/* verdict and spend meter on the headline card */
.lp2-reports .lp2-hero-note { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 8px; }
.lp2-reports .rpt-v {
    display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px;
    font-size: .74rem; font-weight: 800; background: #fff; color: #000;
}
.lp2-reports .rpt-v-good { color: #047857; }
.lp2-reports .rpt-v-warn { color: #92400e; }
.lp2-reports .rpt-v-bad { color: #b91c1c; }
.lp2-reports .rpt-v-quiet { color: #334155; }
.lp2-reports .rpt-m { flex: 1 1 180px; min-width: 0; }
.lp2-reports .rpt-m-top { display: flex; justify-content: space-between; gap: 8px; font-size: .68rem; font-weight: 750; letter-spacing: .04em; text-transform: uppercase; color: rgba(255, 255, 255, .85); }
.lp2-reports .rpt-m-top b { color: #fff; font-size: .78rem; letter-spacing: 0; }
.lp2-reports .rpt-m-track { display: block; height: 7px; margin-top: 5px; border-radius: 99px; overflow: hidden; background: rgba(255, 255, 255, .2); }
.lp2-reports .rpt-m-track > i { display: block; height: 100%; border-radius: 99px; background: #fff; }
.lp2-reports .rpt-m-track > .rpt-m-warn { background: #fcd34d; }
.lp2-reports .rpt-m-track > .rpt-m-bad { background: #fca5a5; }
.lp2-reports .rpt-m-track > .rpt-m-good { background: #6ee7b7; }

.lp2-reports .rpt-tiles2 .fin-sub { margin-top: 4px; }
@media (max-width: 719px) { .lp2-reports .rpt-tiles2 .sx-pm-card { flex-basis: 170px; } }

.lp2-reports .rpt-trend .dsz-chart { margin: 0 -4px; }

/* two cards side by side where there is room */
.lp2-reports .rpt-2up { display: grid; grid-template-columns: minmax(0, 1fr); gap: 0 14px; }
@media (min-width: 900px) { .lp2-reports .rpt-2up { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; } }

.lp2-reports .rpt-mix-total { text-align: right; flex: none; }
.lp2-reports .rpt-mix-total span { display: block; font-size: .64rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: #334155; }
.lp2-reports .rpt-mix-total b { display: block; font-size: 1.02rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp2-reports .rpt-mix-total b.is-in { color: #047857; }
.lp2-reports .rpt-mix-total b.is-out { color: #be123c; }
.lp2-reports .rpt-mix-bar { display: flex; gap: 3px; height: 12px; margin: 2px 0 10px; border-radius: 99px; overflow: hidden; }
.lp2-reports .rpt-mix-bar > i { display: block; min-width: 4px; }
.lp2-reports .rpt-mix-empty { font-size: .8rem; color: #475569; padding: 6px 0 10px; }
.lp2-reports .rpt-mix-row {
    display: flex; align-items: center; gap: 9px; padding: 8px 0; border-top: 1px solid #eef1f5; font-size: .84rem;
}
.lp2-reports .rpt-mix-row:first-child { border-top: 0; }
.lp2-reports .rpt-mix-row.is-zero { opacity: .55; }
.lp2-reports .rpt-dot { width: 10px; height: 10px; flex: none; border-radius: 4px; }
.lp2-reports .rpt-mix-lbl { flex: 1; min-width: 0; color: #1e293b; font-weight: 650; }
.lp2-reports .rpt-mix-row em { font-style: normal; font-size: .72rem; font-weight: 750; color: #475569; min-width: 34px; text-align: right; }
.lp2-reports .rpt-mix-row b { color: #000; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; min-width: 96px; text-align: right; }

.lp2-reports .rpt-owed-row {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    padding: 8px 0; border-top: 1px solid #eef1f5; font-size: .84rem; color: #1e293b; font-weight: 650;
}
.lp2-reports .fin-card-head + .rpt-owed-row { border-top: 0; }
.lp2-reports .rpt-owed-row b { color: #000; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp2-reports .rpt-owed-row.is-in b { color: #b45309; }
.lp2-reports .rpt-owed-row.is-out b { color: #be123c; }
.lp2-reports .rpt-owed-row.is-risk b { color: #92400e; }
.lp2-reports .rpt-owed-row.is-note { color: #475569; font-size: .8rem; }
.lp2-reports .rpt-owed-row.is-note em { font-style: normal; font-size: .72rem; }
.lp2-reports .rpt-owed-row.is-total { margin-top: 4px; border-top: 1px dashed #cbd5e1; font-weight: 800; color: #000; }

/* activity: rows that wrap on phones instead of a clipped table */
.lp2-reports .rpt-feed { margin-bottom: 20px; }
.lp2-reports .rpt-row { display: flex; align-items: flex-start; gap: 10px; padding: 11px 14px; border-top: 1px solid #eef1f5; }
.lp2-reports .lp2-day + .rpt-row { border-top: 0; }
.lp2-reports .rpt-tag2 {
    flex: none; min-width: 46px; text-align: center; margin-top: 1px;
    padding: 2px 6px; border-radius: 7px; font-size: .6rem; font-weight: 800; letter-spacing: .04em; line-height: 1.6;
    color: color-mix(in srgb, var(--t) 80%, #000); background: color-mix(in srgb, var(--t) 11%, #fff);
    border: 1px solid color-mix(in srgb, var(--t) 24%, #fff);
}
.lp2-reports .rpt-row-body { flex: 1; min-width: 0; }
.lp2-reports .rpt-row-desc { font-size: .84rem; font-weight: 700; color: #000; line-height: 1.35; overflow-wrap: anywhere; }
.lp2-reports .rpt-row-meta { margin-top: 2px; font-size: .72rem; font-weight: 600; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-reports .rpt-amt { flex: none; font-size: .86rem; font-weight: 800; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp2-reports .rpt-amt.is-in { color: #047857; }
.lp2-reports .rpt-amt.is-out { color: #be123c; }

/* fee details pop-up */
body[data-app-page="reports"] .rpt-fee-list { border: 1px solid #e7ebf1; border-radius: 16px; padding: 2px 14px; }
body[data-app-page="reports"] .rpt-fee-row {
    display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #eef1f5;
    font-size: .86rem; color: #1e293b; font-weight: 650;
}
body[data-app-page="reports"] .rpt-fee-row:first-child { border-top: 0; }
body[data-app-page="reports"] .rpt-fee-row b { color: #000; font-weight: 800; font-variant-numeric: tabular-nums; }
body[data-app-page="reports"] .rpt-fee-row.is-total { border-top: 1px dashed #cbd5e1; font-weight: 800; color: #000; }

/* ==========================================================================
   Customer price types (B2B / B2C), "Total sold", the drill chip, paid-sale
   corrections and the Sales breakdown page (/sales-details, .lp2-sd).
   assets/js/app/sales-breakdown.js + sales.js
   ========================================================================== */

/* price type chip + two-way switch */
.tier-chip {
    display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
    padding: 1px 7px; border-radius: 999px; font-size: .66rem; font-weight: 800; line-height: 1.5;
    color: #475569; background: #f1f5f9; border: 1px solid #e2e8f0; white-space: nowrap;
}
.tier-chip i { font-size: .72rem; }
.tier-chip.is-w { color: #92400e; background: #fffbeb; border-color: #fde68a; }
.tier-switch { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: #f1f5f9; flex: none; }
.tier-opt {
    display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 12px; border: 0; border-radius: 9px;
    font: inherit; font-size: .8rem; font-weight: 750; color: #475569; background: transparent; cursor: pointer; white-space: nowrap;
}
.tier-opt.is-on { background: #fff; color: #000; box-shadow: 0 1px 2px rgba(15, 23, 42, .14); }
.tier-opt:focus-visible { outline: 2px solid #059669; outline-offset: 1px; }
.sale-tier-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .8rem; font-weight: 700; color: #334155; }
.crm-tier { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 12px 0 4px; padding: 12px 14px; border: 1px solid #e2e8f0; border-radius: 14px; background: #fff; }
.crm-tier b { display: block; font-size: .86rem; color: #000; }
.crm-tier span { display: block; font-size: .74rem; font-weight: 600; color: #64748b; }

/* /sales: what was sold, next to the money in */
.lp2 .sx-hero-sold { position: relative; z-index: 1; display: inline-flex; align-items: baseline; gap: 8px; margin: 4px 0 2px; color: rgba(255, 255, 255, .88); font-size: .8rem; font-weight: 700; }
.lp2 .sx-hero-sold .sx-hero-sold-val { font-size: 1.15rem; font-weight: 800; color: #fff; letter-spacing: -.01em; }
.lp2 .sx-hero-sold .sx-hero-sold-val.sx-masked { letter-spacing: .12em; font-size: 1rem; }
.sales-drill-chip {
    display: flex; align-items: center; gap: 8px; margin: -4px 0 12px; padding: 8px 8px 8px 12px; border-radius: 12px;
    background: #ecfdf5; border: 1px solid #a7f3d0; font-size: .82rem; font-weight: 650; color: #065f46;
}
.sales-drill-chip span { flex: 1 1 auto; min-width: 0; }
.sales-drill-chip b { color: #000; }
.sales-drill-chip button { flex: none; width: 30px; height: 30px; border: 0; border-radius: 9px; background: #fff; color: #065f46; cursor: pointer; }

/* sale editor: what a corrected total means for the money */
.se-money { display: flex; gap: 10px; margin: 10px 0 2px; padding: 10px 12px; border-radius: 12px; background: #eff6ff; border: 1px solid #bfdbfe; font-size: .8rem; color: #1e3a8a; }
.se-money > i { font-size: 1rem; margin-top: 1px; }
.se-money b { color: #000; }
.se-money span { display: block; font-weight: 600; color: #475569; margin-top: 2px; }
.se-money.is-back { background: #fffbeb; border-color: #fde68a; color: #92400e; }
.se-money-opt { display: flex; gap: 8px; align-items: flex-start; margin-top: 8px; padding: 8px 10px; border-radius: 10px; border: 1px solid #dbeafe; background: #fff; cursor: pointer; }
.se-money-opt.is-on { border-color: #2563eb; box-shadow: 0 0 0 1px #2563eb; }
.se-money-opt input { margin-top: 3px; }
.se-money-opt small { display: block; font-size: .74rem; font-weight: 600; color: #64748b; }
.se-history { margin: 6px 0 8px; border: 1px solid var(--border-light, #e2e8f0); border-radius: 12px; background: #fff; }
.se-history summary { display: flex; align-items: center; gap: 8px; padding: 10px 12px; cursor: pointer; font-size: .84rem; font-weight: 750; color: #000; list-style: none; }
.se-history summary::-webkit-details-marker { display: none; }
.se-history summary span { margin-left: auto; font-size: .72rem; font-weight: 800; color: #475569; background: #f1f5f9; border-radius: 999px; padding: 0 8px; }
.se-h-row { padding: 8px 12px 10px; border-top: 1px solid #eef1f5; }
.se-h-when { font-size: .72rem; font-weight: 700; color: #64748b; }
.se-h-row ul { margin: 4px 0 0; padding-left: 18px; font-size: .8rem; color: #1e293b; }
.se-h-row li { margin: 2px 0; }

/* ---- Sales breakdown page ---------------------------------------------------- */
.lp2-sd .sd-head-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
@media (max-width: 519.98px) { .lp2-sd .sd-hide-sm { display: none; } }
.lp2-sd .sd-include {
    display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 12px 0; padding: 10px 14px;
    background: #fff; border: 1px solid var(--lp2-line, #e6eaf0); border-radius: 14px; cursor: pointer;
}
.lp2-sd .sd-include b { display: block; font-size: .84rem; color: #000; }
.lp2-sd .sd-include small { display: block; font-size: .72rem; font-weight: 600; color: #64748b; }
.lp2-sd .sd-tabs { margin-bottom: 12px; }
.lp2-sd .sd-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.lp2-sd .sd-search { flex: 1 1 220px; }
.lp2-sd .sd-sort { display: inline-flex; gap: 2px; padding: 3px; border-radius: 12px; background: #f1f5f9; flex: none; }
.lp2-sd .sd-sort button { height: 34px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: .8rem; font-weight: 750; color: #475569; cursor: pointer; }
.lp2-sd .sd-sort button.is-on { background: #fff; color: #000; box-shadow: 0 1px 2px rgba(15, 23, 42, .14); }
/* sort bar: what to sort by + which way (High to low / Low to high) */
.lp2-sd .sd-sortbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; flex: 0 1 auto; }
.lp2-sd .sd-dir {
    display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px;
    border: 1px solid var(--lp2-line, #e6eaf0); border-radius: 12px; background: #fff;
    font: inherit; font-size: .8rem; font-weight: 750; color: #000; cursor: pointer; white-space: nowrap;
}
.lp2-sd .sd-dir i { font-size: 1rem; color: var(--lp2-deep, #065f46); }
.lp2-sd .sd-dir:hover { background: #f8fafc; }
.lp2-sd .sd-dir:active { transform: scale(.97); }
@media (max-width: 560px) {
    .lp2-sd .sd-sortbar { flex: 1 1 100%; justify-content: space-between; }
    .lp2-sd .sd-sort button { padding: 0 10px; }
}
.lp2-sd .sd-note { margin: 0 0 8px; font-size: .74rem; font-weight: 600; color: #64748b; }
.lp2-sd .sd-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid #eef1f5; background: #fff; }
.lp2-sd .sd-list > .sd-row:first-child { border-top: 0; }
.lp2-sd .sd-row.is-drill { cursor: pointer; }
.lp2-sd .sd-row.is-drill:hover { background: #fafbfd; }
.lp2-sd .sd-row.is-drill:focus-visible { outline: 2px solid #059669; outline-offset: -2px; }
.lp2-sd .sd-row-ic { flex: none; width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 13%, #fff); font-size: .95rem; }
.lp2-sd .sd-row-ic span { font-size: .76rem; font-weight: 800; color: #fff; }
.lp2-sd .sd-row-ic:has(span) { background: var(--c); }
.lp2-sd .sd-row-main { flex: 1 1 auto; min-width: 0; }
.lp2-sd .sd-row-t { display: flex; align-items: center; gap: 6px; min-width: 0; }
.lp2-sd .sd-row-name { font-size: .9rem; font-weight: 750; color: #000; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-sd .sd-row-s { margin-top: 2px; font-size: .74rem; font-weight: 600; color: #475569; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lp2-sd .sd-owed { font-style: normal; color: #b45309; }
.lp2-sd .sd-bar { height: 4px; margin-top: 7px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.lp2-sd .sd-bar i { display: block; height: 100%; border-radius: 999px; background: #059669; }
.lp2-sd .sd-row-r { flex: none; display: flex; flex-direction: column; align-items: flex-end; }
.lp2-sd .sd-row-r b { font-size: .9rem; font-weight: 800; color: #000; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lp2-sd .sd-row-r small { font-size: .7rem; font-weight: 700; color: #64748b; white-space: nowrap; }
.lp2-sd .sd-row-go { flex: none; color: #94a3b8; font-size: .8rem; }
.lp2-sd .sd-tiers { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 8px; }
.lp2-sd .sd-tier { padding: 12px 14px; border-radius: 16px; background: #fff; border: 1px solid var(--lp2-line, #e6eaf0); min-width: 0; }
.lp2-sd .sd-tier-t { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .78rem; font-weight: 800; color: #475569; }
.lp2-sd .sd-tier-v { margin-top: 6px; font-size: 1.1rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; }
.lp2-sd .sd-tier-s { font-size: .72rem; font-weight: 600; color: #64748b; }
.lp2-sd .sd-tier.is-w .sd-bar i { background: #d97706; }
.lp2-sd .sd-tier-note { display: flex; gap: 8px; margin: 0 0 12px; font-size: .76rem; font-weight: 600; color: #475569; }
.lp2-sd .sd-link { border: 0; background: none; padding: 0; font: inherit; font-weight: 800; color: #047857; cursor: pointer; text-decoration: underline; }

/* See breakdown: a solid white pill on the coloured hero (black label, icons in the page's tone) */
.lp2 .lp2-bd-link {
    position: relative; z-index: 1; margin-top: 12px; padding: 7px 13px;
    background: #fff; border: 1px solid #fff; backdrop-filter: none;
    box-shadow: 0 4px 14px rgba(15, 23, 42, .16);
    font: inherit; font-size: .78rem; font-weight: 800; color: #000; cursor: pointer;
    transition: background-color .15s ease, transform .15s ease;
}
.lp2 .lp2-bd-link i { color: var(--lp2-deep, #065f46); }
.lp2 .lp2-bd-link:hover { background: color-mix(in srgb, var(--lp2-h3, #059669) 8%, #fff); }
.lp2 .lp2-bd-link:active { transform: scale(.97); }
.lp2 .lp2-bd-link .bi-chevron-right { font-size: .7rem; }
/* labelled buttons (the shared header rule makes outline buttons 38px squares) */
.lp2.lp2-sd .page-header .sd-head-acts .btn.btn-sm { display: inline-flex; align-items: center; gap: 6px; width: auto; min-width: 38px; padding: 0 12px; white-space: nowrap; flex: none; }
.lp2-sd .sd-tabs .pill-tab { gap: 7px; }

/* Purchase breakdown (/purchases-details, .lp2-pd): paid / part-paid / unpaid bar */
.lp2-pd .pd-status { margin: 12px 0; padding: 12px 14px; background: #fff; border: 1px solid var(--lp2-line, #e6eaf0); border-radius: 14px; }
.lp2-pd .pd-status-bar { display: flex; gap: 3px; height: 10px; border-radius: 999px; overflow: hidden; background: #eef1f5; }
.lp2-pd .pd-status-bar i { display: block; min-width: 4px; height: 100%; }
.lp2-pd .pd-status-key { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: .78rem; font-weight: 600; color: #475569; }
.lp2-pd .pd-status-key span { display: inline-flex; align-items: center; gap: 6px; }
.lp2-pd .pd-status-key i { width: 8px; height: 8px; border-radius: 3px; display: inline-block; }
.lp2-pd .pd-status-key b { color: #000; font-weight: 800; }
.lp2-pd .sd-bar i { background: #4f46e5; }

/* Breakdown tables (/sales-details, /purchases-details): one real table per
   tab. The name column stays put while the figures scroll sideways on a
   phone; money is bare numbers with the currency in the header; a totals
   row closes the table. */
.lp2-sd .bd-tbl { background: #fff; border: 1px solid var(--lp2-line, #e6eaf0); border-radius: 16px; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .04); }
.lp2-sd .bd-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.lp2-sd .bd-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: .84rem; font-variant-numeric: tabular-nums; color: #000; }
.lp2-sd .bd-table th, .lp2-sd .bd-table td { padding: 11px 14px; border-bottom: 1px solid #eef1f5; background: #fff; text-align: left; vertical-align: middle; white-space: nowrap; }
.lp2-sd .bd-table .num { text-align: right; }
.lp2-sd .bd-table thead th {
    padding-top: 10px; padding-bottom: 10px; background: #f8fafc; border-bottom: 1px solid #e6eaf0;
    font-size: .7rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: #334155;
}
.lp2-sd .bd-table thead th small { font-size: .62rem; font-weight: 700; letter-spacing: .02em; color: #64748b; text-transform: none; }
.lp2-sd .bd-th { display: inline-flex; align-items: center; gap: 5px; padding: 0; border: 0; background: none; font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; cursor: pointer; }
.lp2-sd .bd-th i { font-size: .74rem; color: #94a3b8; }
.lp2-sd .bd-th.is-on { color: #000; }
.lp2-sd .bd-th.is-on i { color: var(--lp2-deep, #065f46); }
.lp2-sd .bd-th:hover { color: #000; }
/* the name column stays in view while the figures scroll */
.lp2-sd .bd-table .bd-c-name { position: sticky; left: 0; z-index: 1; min-width: 190px; max-width: 280px; white-space: normal; box-shadow: 1px 0 0 #eef1f5; }
.lp2-sd .bd-table thead .bd-c-name { z-index: 2; }
.lp2-sd .bd-name { display: flex; align-items: center; gap: 9px; min-width: 0; }
.lp2-sd .bd-rank { flex: none; min-width: 18px; font-size: .72rem; font-weight: 700; color: #94a3b8; text-align: right; }
.lp2-sd .bd-ic { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #64748b) 13%, #fff); color: var(--c, #64748b); font-size: .84rem; }
.lp2-sd .bd-ic b { font-size: .66rem; font-weight: 800; }
.lp2-sd .bd-nm { min-width: 0; font-weight: 700; color: #000; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.lp2-sd .bd-nmw { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; min-width: 0; }
.lp2-sd .bd-nmw .tier-chip { font-size: .62rem; padding: 1px 7px; gap: 4px; }
.lp2-sd .bd-nmw .tier-chip i { font-size: .62rem; }
.lp2-sd .bd-table td.bd-main { font-weight: 800; }
.lp2-sd .bd-owed { color: #b45309; font-weight: 700; }
.lp2-sd .bd-nil { color: #cbd5e1; }
.lp2-sd .bd-c-share { min-width: 120px; }
.lp2-sd .bd-share { display: flex; align-items: center; gap: 8px; }
.lp2-sd .bd-share-bar { flex: 1 1 auto; min-width: 54px; height: 6px; border-radius: 999px; background: #eef1f5; overflow: hidden; }
.lp2-sd .bd-share-bar i { display: block; height: 100%; border-radius: inherit; background: var(--lp2-h3, #059669); }
.lp2-sd .bd-share > span:last-child { min-width: 34px; text-align: right; font-size: .76rem; font-weight: 700; color: #475569; }
.lp2-sd .bd-table .bd-c-go { width: 28px; padding-left: 0; padding-right: 10px; color: #94a3b8; text-align: right; }
.lp2-sd .bd-table tbody tr.is-drill { cursor: pointer; }
.lp2-sd .bd-table tbody tr.is-drill:hover > *, .lp2-sd .bd-table tbody tr.is-drill:focus-visible > * { background: #f8fafc; }
.lp2-sd .bd-table tbody tr.is-drill:hover .bd-c-go { color: var(--lp2-deep, #065f46); }
.lp2-sd .bd-table tbody tr:last-child > * { border-bottom: 0; }
.lp2-sd .bd-table tfoot th, .lp2-sd .bd-table tfoot td { background: #f8fafc; border-top: 1px solid #e2e8f0; border-bottom: 0; font-weight: 800; }
.lp2-sd .bd-table tfoot th small { margin-left: 4px; font-size: .72rem; font-weight: 600; color: #64748b; }
.lp2-sd .bd-table tfoot .bd-share-bar { display: none; }
/* the app-wide "#page-content table th" header look must not reach the
   name cells (row headers) or the totals row */
#page-content .lp2-sd .bd-table thead th { background: #f8fafc; color: #334155; font-size: .7rem; letter-spacing: .04em; border-bottom: 1px solid #e6eaf0; }
#page-content .lp2-sd .bd-table tbody th { background: #fff; color: #000; font-size: inherit; font-weight: 700; letter-spacing: normal; text-transform: none; border-bottom: 1px solid #eef1f5; }
#page-content .lp2-sd .bd-table tfoot th { background: #f8fafc; color: #000; font-size: inherit; font-weight: 800; letter-spacing: normal; text-transform: none; border-top: 1px solid #e2e8f0; border-bottom: 0; }
#page-content .lp2-sd .bd-table td { color: #000; }
#page-content .lp2-sd .bd-table tbody tr:hover > * { background: #fff; }
#page-content .lp2-sd .bd-table tbody tr.is-drill:hover > * { background: #f8fafc; }
#page-content .lp2-sd .bd-table tbody tr:last-child > * { border-bottom: 0; }
@media (max-width: 560px) {
    .lp2-sd .bd-table { font-size: .8rem; }
    .lp2-sd .bd-table th, .lp2-sd .bd-table td { padding: 10px 11px; }
    .lp2-sd .bd-table .bd-c-name { min-width: 140px; max-width: 150px; }
    /* currency under the label keeps the money columns narrow */
    .lp2-sd .bd-thl { display: inline-block; text-align: inherit; }
    .lp2-sd .bd-thl small { display: block; margin-top: 1px; }
    .lp2-sd .bd-ic { display: none; }
    .lp2-sd .bd-c-share { min-width: 96px; }
}
.lp2-sd .lt-pager { margin-top: 12px; }

/* ---- Sale details pop-up (.sd2): headline card, document buttons, items,
   then the editable details in three groups ---- */
.sd2 { gap: 14px; }
.sd2-hero { padding: 14px 16px; border-radius: 16px; background: linear-gradient(135deg, #ecfdf5, #fff 72%); border: 1px solid #d3eee2; }
.sd2-hero-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.sd2-total > span { display: block; font-size: .74rem; font-weight: 750; color: #334155; }
.sd2-total > b { display: block; margin-top: 2px; font-size: 1.6rem; font-weight: 800; color: #000; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.sd2-total > em { display: block; margin-top: 4px; font-style: normal; font-size: .76rem; font-weight: 650; color: #475569; }
.sd2-tags { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.sd2-tags .badge { font-size: .76rem; padding: 4px 10px; }
.sd2-method { display: inline-flex; align-items: center; gap: 4px; font-size: .76rem; font-weight: 700; color: #334155; white-space: nowrap; }
.sd2-method i { color: #4338ca; }
.sd2-meta { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px 14px; margin-top: 12px; padding-top: 12px; border-top: 1px dashed #c9e6d8; }
.sd2-meta > div { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.sd2-meta i { flex: none; margin-top: 2px; font-size: .95rem; color: #047857; }
.sd2-meta b { display: block; font-size: .86rem; font-weight: 750; color: #000; overflow-wrap: anywhere; }
.sd2-meta small { display: block; margin-top: 1px; font-size: .74rem; font-weight: 600; color: #475569; overflow-wrap: anywhere; }
.sd2-acts { display: flex; gap: 8px; }
.sd2-act {
    flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
    padding: 10px 6px; border: 1px solid #e3e8ef; border-radius: 13px; background: #fff;
    font: inherit; font-size: .74rem; font-weight: 750; color: #0f172a; cursor: pointer; text-align: center;
    transition: border-color .15s ease, background-color .15s ease;
}
.sd2-act i { font-size: 1.08rem; color: #047857; }
.sd2-act:hover { border-color: #a7dcc4; background: #f4fbf7; }
.sd2-act span { line-height: 1.2; }
.sd2-sec { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1px solid #e6eaf0; border-radius: 16px; background: #fff; }
.sd2-sec-items { gap: 0; }
.sd2-sec-h { display: flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: #334155; }
.sd2-sec-h i { font-size: .95rem; color: #047857; }
.sd2-sec-h em { margin-left: auto; font-style: normal; font-size: .72rem; font-weight: 700; letter-spacing: 0; text-transform: none; color: #64748b; }
.sd2-sec .input-group { margin: 0; }
.sd2-sec .input-row { gap: 10px; }
.sd2-hint { margin-top: 4px; font-size: .72rem; font-weight: 600; color: #64748b; }
.sd2-toggle { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: #f8fafc; border: 1px solid #e6eaf0; }
.sd2-toggle b { display: block; font-size: .84rem; font-weight: 750; color: #000; }
.sd2-toggle small { display: block; font-size: .72rem; font-weight: 600; color: #64748b; }
/* items of a settled sale, as a receipt */
.sd2-lines { display: flex; flex-direction: column; }
.sd2-line { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid #eef1f5; }
.sd2-line:first-child { border-top: 0; padding-top: 2px; }
.sd2-line-n { min-width: 0; }
.sd2-line-n b { display: block; font-size: .88rem; font-weight: 750; color: #000; overflow-wrap: anywhere; }
.sd2-line-n small { display: block; margin-top: 2px; font-size: .74rem; font-weight: 600; color: #64748b; }
.sd2-line-t { flex: none; font-size: .9rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; }
.sd2-sum { display: flex; flex-direction: column; gap: 4px; padding-top: 10px; border-top: 1px solid #e2e8f0; }
.sd2-sum > div { display: flex; justify-content: space-between; font-size: .82rem; font-weight: 650; color: #475569; font-variant-numeric: tabular-nums; }
.sd2-sum > div b { color: #000; }
.sd2-sum .sd2-sum-total { font-size: .98rem; font-weight: 800; color: #000; }
/* the editor's own "Items" label and gate sit inside the section */
.sd2-sec-items .se-gate { margin-bottom: 12px; }
@media (max-width: 420px) {
    .sd2-meta { grid-template-columns: minmax(0, 1fr); }
    .sd2-act { font-size: .7rem; padding: 9px 4px; }
}

/* Purchase item names that come from a linked product: shown, not typed over. */
.modal input.pur-name-locked { background: #f1f5f9 !important; color: #000; font-weight: 700; cursor: default; }

/* ==========================================================================
   Finances › Assets (assets-register.js): the page (.lp2-assets) and its
   pop-ups (.modal .as-*). Teal, the register's colour.
   ========================================================================== */
.lp2-assets .as-year { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 14px; }
.lp2-assets .as-year > div { background: #fff; border: 1px solid #e2e8f0; border-radius: 14px; padding: 12px 14px; min-width: 0; }
.lp2-assets .as-year span { display: block; font-size: .72rem; font-weight: 700; color: #475569; }
.lp2-assets .as-year b { display: block; margin-top: 3px; font-size: 1.02rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 520px) { .lp2-assets .as-year { grid-template-columns: 1fr 1fr; } .lp2-assets .as-year > div:last-child { grid-column: 1 / -1; } }
.lp2-assets .as-note { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; padding: 12px 14px; border-radius: 14px; background: #f0fdfa; border: 1px solid #99f6e4; font-size: .82rem; line-height: 1.5; color: #134e4a; }
.lp2-assets .as-note > i { color: #0f766e; font-size: 1rem; margin-top: 1px; }
.lp2-assets .as-tabs { margin: 0 0 12px; flex-wrap: nowrap; overflow-x: auto; }
.lp2-assets .as-st { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 99px; font-size: .7rem; font-weight: 800; white-space: nowrap; }
.lp2-assets .as-st-on { background: #ccfbf1; color: #115e59; }
.lp2-assets .as-st-done { background: #e0e7ff; color: #3730a3; }
.lp2-assets .as-st-land { background: #ecfccb; color: #3f6212; }
.lp2-assets .as-st-sold { background: #dbeafe; color: #1e40af; }
.lp2-assets .as-st-off { background: #fee2e2; color: #991b1b; }

.modal .as-hero { border-radius: 18px; padding: 16px; background: linear-gradient(135deg, #f0fdfa, #fff); border: 1px solid #ccfbf1; }
.modal .as-hero-top { display: flex; align-items: center; gap: 12px; }
.modal .as-hero-ic { flex: none; width: 42px; height: 42px; border-radius: 13px; display: grid; place-items: center; font-size: 1.15rem; color: var(--c, #0f766e); background: color-mix(in srgb, var(--c, #0f766e) 12%, #fff); }
.modal .as-hero-name { font-size: 1rem; font-weight: 800; color: #000; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.modal .as-hero-sub { font-size: .76rem; font-weight: 600; color: #475569; }
.modal .as-hero-amt { margin-top: 12px; font-size: 1.7rem; font-weight: 800; color: #000; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.modal .as-hero-lbl { font-size: .78rem; font-weight: 700; color: #475569; }
.modal .as-prog { height: 8px; border-radius: 99px; background: #e2e8f0; overflow: hidden; margin-top: 12px; }
.modal .as-prog > i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #14b8a6, #0f766e); }
.modal .as-prog-lbl { display: flex; justify-content: space-between; margin-top: 5px; font-size: .74rem; font-weight: 700; color: #334155; }
.modal .as-disp { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: .84rem; line-height: 1.5; }
.modal .as-disp.is-gain { background: #f0fdf4; border: 1px solid #bbf7d0; color: #14532d; }
.modal .as-disp.is-loss { background: #fef2f2; border: 1px solid #fecaca; color: #7f1d1d; }
.modal .as-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: #e2e8f0; border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.modal .as-fact { background: #fff; padding: 10px 12px; min-width: 0; }
.modal .as-fact:last-child:nth-child(odd) { grid-column: 1 / -1; }
.modal .as-fact span { display: block; font-size: .7rem; font-weight: 700; color: #64748b; }
.modal .as-fact b { display: block; margin-top: 2px; font-size: .86rem; font-weight: 700; color: #000; overflow-wrap: anywhere; }
@media (max-width: 340px) { .modal .as-facts { grid-template-columns: 1fr; } }
.modal .as-sched { border: 1px solid #e2e8f0; border-radius: 14px; overflow: hidden; }
.modal .as-sched table { width: 100%; border-collapse: collapse; font-size: .82rem; }
.modal .as-sched th { background: #f8fafc; color: #334155; font-weight: 800; font-size: .72rem; text-align: left; padding: 8px 10px; border-bottom: 1px solid #e2e8f0; }
.modal .as-sched td { padding: 8px 10px; border-bottom: 1px solid #f1f5f9; color: #0f172a; font-variant-numeric: tabular-nums; }
.modal .as-sched tr:last-child td { border-bottom: 0; }
.modal .as-sched .num { text-align: right; }
.modal .as-sched tr.is-now td { background: #f0fdfa; }
.modal .as-sched small { color: #0f766e; font-weight: 800; }
.modal .as-actions { display: flex; gap: 8px; }
.modal .as-actions .btn { flex: 1 1 auto; }
.modal .as-actions .as-del { flex: none; color: #b91c1c; border-color: #fecaca; }
.modal .as-tip { display: flex; gap: 10px; padding: 12px 14px; border-radius: 14px; background: #f0fdfa; border: 1px solid #99f6e4; font-size: .82rem; line-height: 1.5; color: #134e4a; }
.modal .as-tip > i { color: #0f766e; margin-top: 1px; }
.modal .as-opt { font-weight: 600; color: #64748b; }
.modal .as-preview { display: flex; gap: 8px; align-items: flex-start; font-size: .82rem; line-height: 1.5; color: #134e4a; padding: 10px 12px; border-radius: 12px; background: #f8fafc; border: 1px dashed #cbd5e1; }
.modal .as-preview:empty { display: none; }
.modal .as-preview.is-loss { color: #7f1d1d; }
.modal .as-more { border: 1px solid #e2e8f0; border-radius: 14px; padding: 10px 12px; }
.modal .as-more > summary { cursor: pointer; font-size: .84rem; font-weight: 800; color: #000; }
.modal .as-more[open] > summary { margin-bottom: 10px; }
.modal .as-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.modal .as-ch { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border: 1.5px solid #e2e8f0; border-radius: 14px; cursor: pointer; }
.modal .as-ch:has(input:checked) { border-color: #0f766e; background: #f0fdfa; box-shadow: 0 0 0 3px rgba(20, 184, 166, .14); }
.modal .as-ch input { margin-top: 3px; accent-color: #0f766e; }
.modal .as-ch b { display: block; font-size: .88rem; color: #000; }
.modal .as-ch small { display: block; font-size: .74rem; font-weight: 600; color: #475569; line-height: 1.35; }

/* /reports: fixed assets card and the note under platform charges */
.lp2-reports .rpt-assets { margin-top: 14px; }
.lp2-reports .rpt-as-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.lp2-reports .rpt-as-grid > div { background: #f0fdfa; border: 1px solid #ccfbf1; border-radius: 14px; padding: 12px; min-width: 0; }
.lp2-reports .rpt-as-grid span { display: block; font-size: .72rem; font-weight: 700; color: #115e59; }
.lp2-reports .rpt-as-grid b { display: block; margin-top: 2px; font-size: 1rem; font-weight: 800; color: #000; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lp2-reports .rpt-as-grid small { display: block; font-size: .7rem; font-weight: 600; color: #475569; }
@media (max-width: 640px) { .lp2-reports .rpt-as-grid { grid-template-columns: 1fr 1fr; } }
.rpt-fee-note { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: .76rem; font-weight: 600; color: #334155; line-height: 1.45; }
.rpt-fee-note > i { color: #2563eb; margin-top: 1px; }
.rpt-fee-note a { color: #1d4ed8; font-weight: 800; }
/* the asset pop-up's footer: Edit stays compact so Edit, the main action and delete share one row */
body .modal-overlay .modal-actions .btn.as-edit { flex: 0 0 auto; min-width: 0; padding-left: 16px; padding-right: 16px; }
