/* Profit reporting and partner management reference layout. */
.mrf-profit,.mrf-partners{--mrf-ink:#17243b;--mrf-muted:#7b8fa9;--mrf-line:#e2ebf3;--mrf-teal:#00898c;display:flex;flex-direction:column;gap:12px;min-width:0;color:var(--mrf-ink)}
.mrf-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:14px}.mrf-heading h1{font-size:25px;line-height:1.3;letter-spacing:-.04em;margin:5px 0;font-weight:800}.mrf-heading p{font-size:11px;color:#7c8fa7;margin:0;line-height:1.6}.mrf-heading .mrf-breadcrumb{font-size:10px;color:#8a9cb1}
.mrf-button{display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:7px 12px;min-height:33px;border:1px solid #dbe5ef;border-radius:5px;background:#fff;color:#344b67;font:inherit;font-size:11px;font-weight:600;line-height:1.4;cursor:pointer;text-decoration:none}.mrf-button:disabled{opacity:.5;cursor:not-allowed}.mrf-button.primary{background:linear-gradient(115deg,#009395,#00777e);border-color:#00858a;color:#fff}.mrf-button.outline{background:#fff;color:#008b8b;border-color:#76bfc0}.mrf-button.full{width:100%}.mrf-button.link{background:none;border:0;box-shadow:none;padding:3px 0;min-height:24px;color:#008a8e}.mrf-button:focus-visible,.mrf-tabs button:focus-visible{outline:2px solid #12a295;outline-offset:2px}.mrf-profit .icon,.mrf-partners .icon,.mrf-customer-modal .icon{display:inline-flex;width:17px;height:17px;flex:0 0 17px}.mrf-profit .icon svg,.mrf-partners .icon svg,.mrf-customer-modal .icon svg{width:100%;height:100%}
.mrf-profit-toolbar{display:grid;gap:6px;justify-items:end;max-width:100%}.mrf-profit-toolbar>div{display:flex;gap:6px;align-items:center}.mrf-profit-toolbar input{min-width:0;width:122px;min-height:32px;padding:5px 8px;border:1px solid #dce6f1;border-radius:5px;background:#fff;font-size:11px;color:#3a506c}.mrf-profit-toolbar>small{font-size:10px;color:#8b9eb3}.mrf-profit-toolbar>p{color:#bd4355}.mrf-profit-toolbar [hidden]{display:none}.mrf-tabs{display:flex;gap:6px;align-items:center;border-bottom:1px solid #dde9f0}.mrf-tabs>button{border:0;border-bottom:2px solid transparent;background:none;padding:10px 17px;font-size:12px;color:#62758f;cursor:pointer}.mrf-tabs>button.active{color:#00868b;border-bottom-color:#00868b;font-weight:750}.mrf-profit-body{display:grid;gap:12px;min-width:0}
.mrf-card{background:#fff;border:1px solid #e3ebf3;border-radius:7px;padding:14px;min-width:0}.mrf-card>header{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px}.mrf-card h2,.mrf-card h3{font-size:14px;font-weight:750;line-height:1.45;margin:0 0 10px}.mrf-card header h2,.mrf-card header h3{margin:0}.mrf-card h2 small,.mrf-card header small{font-size:10px;color:#8496ad;font-weight:450;margin-left:8px}.mrf-card h2 em{font-style:normal;font-size:9px;background:#eaf7f5;color:#298e89;padding:3px 8px;border-radius:14px;margin-left:5px}.mrf-muted{font-size:10px!important;line-height:1.6;color:#7f92aa;margin:6px 0 0}.mrf-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;min-width:0}.mrf-kpi{display:flex;align-items:flex-start;gap:12px;border:1px solid #e5edf4;border-radius:6px;background:#fff;padding:16px 13px;min-width:0}.mrf-kpi .mrf-icon{display:grid;place-items:center;width:39px;height:42px;flex:0 0 39px;border-radius:9px;background:#e8f8f3;color:#079b8c}.mrf-kpi .mrf-icon .icon{width:23px;height:23px;flex-basis:23px}.mrf-kpi>div{display:grid;gap:6px;min-width:0}.mrf-kpi>div>span{font-size:10px;color:#788da6;font-weight:600}.mrf-kpi strong{display:block;font-size:clamp(18px,1.85vw,25px);letter-spacing:-.035em;line-height:1.2;overflow-wrap:anywhere;font-weight:800;font-variant-numeric:tabular-nums}.mrf-kpi small{font-size:10px;color:#8b9cb1}.mrf-kpi.primary{background:linear-gradient(120deg,#008e8b,#006c75);color:#fff;border-color:#008185}.mrf-kpi.primary .mrf-icon{background:#ffffff25;color:#fff}.mrf-kpi.primary>div>span,.mrf-kpi.primary small{color:#c8eeea}.mrf-kpi.orange .mrf-icon{background:#fff3e2;color:#fd9a23}.mrf-kpi.red .mrf-icon{background:#ffe8ed;color:#fa5a76}.mrf-kpi.blue .mrf-icon{background:#eaf2ff;color:#357df4}.mrf-kpi.green .mrf-icon{background:#e6faeb;color:#16aa5c}
.mrf-profit-summary{display:grid;grid-template-columns:1.28fr 1fr;gap:12px}.mrf-profit-aside{display:grid;gap:12px}.mrf-ratios{display:grid;grid-template-columns:1fr 1fr;gap:10px}.mrf-ratios article{display:grid;gap:9px;padding:14px;border:1px solid #e4ecf4;border-radius:6px}.mrf-ratios span{font-size:11px;color:#566f8c}.mrf-ratios strong{font-size:23px;line-height:1.2;font-weight:800}.mrf-ratios small{font-size:10px;color:#8c9db2}.mrf-due-callout{display:flex;justify-content:space-between;gap:10px;align-items:center;padding-top:6px}.mrf-due-callout>strong{font-size:25px;letter-spacing:-.04em;font-variant-numeric:tabular-nums}.mrf-due-callout>.mrf-button{font-size:10px}.mrf-note{display:flex;gap:8px;align-items:center;margin:11px 0 0;font-size:11px;color:#6e86a2}.mrf-note .icon{width:15px;height:15px}
.mrf-table-scroll{overflow:auto;min-width:0;max-width:100%}.mrf-table{width:100%;border-collapse:collapse;border-spacing:0;margin:0;font-size:11px;min-width:0!important}.mrf-table th,.mrf-table td{padding:10px 11px;border-bottom:1px solid #eaf0f5;font-size:11px;color:#344b65;white-space:nowrap;text-align:right;vertical-align:middle}.mrf-table th:first-child,.mrf-table td:first-child{text-align:left}.mrf-table thead th{background:#f5f8fb;font-size:10px;font-weight:500;color:#8499b1;padding:9px 11px}.mrf-table tbody th{font-weight:500;text-align:left}.mrf-table tbody tr:last-child>*{border-bottom:0}.mrf-table tbody tr.emphasis>*{background:linear-gradient(100deg,#e2f5f1,#f1fbfa);color:#00888a;font-weight:750}.mrf-table .positive{color:#008b88;font-weight:700}.mrf-table .negative{color:#fa4658;font-weight:650}.mrf-table .orange-text{color:#ff7a25;font-weight:700}.mrf-table .current>*{background:#edf9f6}.mrf-table em{font-style:normal;font-size:9px;padding:3px 7px;color:#0a948c;background:#dff4f0;border-radius:5px;white-space:nowrap}.mrf-monthly-table{min-width:790px!important}.mrf-monthly-table th,.mrf-monthly-table td{padding:12px 9px}.mrf-info-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:12px 0 0;padding:10px 12px;background:#f0f7fc;border:1px solid #e4f0f9;border-radius:5px;color:#7a94b0;font-size:10px}.mrf-info-bar p{margin:3px 0;line-height:1.5}.mrf-info-bar>.mrf-button{white-space:nowrap;font-size:10px}.mrf-connected>div{display:flex;gap:8px;align-items:center}.mrf-connected .mrf-button{flex:1;white-space:nowrap}.mrf-connected p{display:flex;gap:8px;align-items:center;font-size:10px;line-height:1.6;color:#7a90a9;flex:1.8;margin:0 0 0 8px;padding-left:12px;border-left:1px solid #e1eaf3}.mrf-cohort-total{display:grid;gap:5px;text-align:right}.mrf-cohort-total small{font-size:9px!important}.mrf-cohort-total strong{font-size:22px;color:#00868a}.mrf-cohort-table{min-width:650px!important}.mrf-analysis-bottom{display:grid;grid-template-columns:1fr 1fr;gap:12px}.mrf-recovery-ratios{display:grid;grid-template-columns:1fr 1fr;gap:9px}.mrf-recovery-ratios article{display:flex;align-items:center;gap:12px;padding:11px;background:#effbf9;border:1px solid #e3f3f0;border-radius:6px}.mrf-recovery-ratios i{position:relative;width:29px;height:29px;flex:0 0 29px;border-radius:50%;background:conic-gradient(#00a58c var(--ratio),#ddf3ed 0)}.mrf-recovery-ratios i:after{content:"";position:absolute;inset:4px;border-radius:50%;background:#fff}.mrf-recovery-ratios article.orange{background:#fff8f1;border-color:#fff0df}.mrf-recovery-ratios .orange i{background:conic-gradient(#ff892e var(--ratio),#ffead8 0)}.mrf-recovery-ratios article>span{display:grid;gap:4px;font-size:10px;color:#65849a}.mrf-recovery-ratios strong{font-size:24px;color:#008c8c;letter-spacing:-.04em}.mrf-recovery-ratios .orange strong{color:#ff7a22}.mrf-pending-profit{display:flex;align-items:center;gap:12px;padding:3px 0 10px}.mrf-pending-profit>.icon{display:grid;place-items:center;width:42px;height:42px;flex-basis:42px;padding:10px;border-radius:9px;background:#e4f8ec;color:#09a16f}.mrf-pending-profit strong{font-size:26px;letter-spacing:-.035em}
.mrf-partner-filters{display:flex;align-items:center;gap:8px;border:1px solid #e3ebf3;border-radius:7px;background:#fff;padding:10px}.mrf-partner-filters select{width:145px;min-width:0;min-height:34px;padding:7px 10px;border:1px solid #dce6f2;border-radius:5px;background:#fff;color:#3e5672;font-size:11px}.mrf-search{position:relative;flex:1.8;min-width:180px}.mrf-search>.icon{position:absolute;left:11px;top:10px;color:#89a0b8}.mrf-partner-filters .mrf-search>input{width:100%;min-width:0;min-height:34px;border:1px solid #dce6f2;border-radius:5px;padding:7px 10px 7px 34px;font-size:11px;color:#3e5672;background:#fff}.mrf-partner-grid{display:grid;grid-template-columns:minmax(0,2.1fr) minmax(250px,1fr);gap:12px;align-items:start}.mrf-partner-grid.no-detail{grid-template-columns:minmax(0,1fr)}.mrf-partner-list>header small{font-size:10px}.mrf-partner-table{table-layout:fixed}.mrf-partner-table th:nth-child(1){width:25%}.mrf-partner-table th:nth-child(2){width:15%}.mrf-partner-table th:nth-child(3){width:17%}.mrf-partner-table th:nth-child(4){width:18%}.mrf-partner-table th:last-child{width:22px}.mrf-partner-table td{padding:9px 10px;text-align:left;white-space:normal;overflow-wrap:anywhere;font-size:11px}.mrf-partner-table th{text-align:left!important}.mrf-partner-table td:first-child .mrf-button{justify-content:flex-start;text-align:left;font-size:11px;font-weight:700;line-height:1.35;white-space:normal}.mrf-partner-table .selected>*{background:#eaf8f5}.mrf-partner-table .selected>td:first-child{border-left:2px solid #00948c}.mrf-country{display:inline-flex;align-items:center;gap:7px;font-size:10px;white-space:nowrap}.mrf-country .customer-region-flag-wrap{display:inline-flex}.mrf-country .customer-region-flag,.mrf-partner-detail .customer-region-flag{width:17px;height:12px;object-fit:cover;vertical-align:middle}.mrf-partner-detail>header{margin-bottom:18px}.mrf-partner-identity{display:flex;gap:12px;align-items:center;padding-bottom:14px;border-bottom:1px solid #e6edf4}.mrf-partner-identity h3{font-size:22px;margin:0;letter-spacing:-.03em;overflow-wrap:anywhere}.mrf-partner-detail dl{margin:0 0 18px}.mrf-partner-detail dl>div{display:grid;grid-template-columns:72px minmax(0,1fr);gap:10px;padding:11px 0;border-bottom:1px solid #edf2f7;font-size:11px}.mrf-partner-detail dt{color:#8196af}.mrf-partner-detail dd{margin:0;overflow-wrap:anywhere;color:#3e5673;display:flex;align-items:center;gap:7px}.mrf-partner-detail>.mrf-button{margin-top:7px}.mrf-partner-detail>.link{font-size:11px;margin:12px 0 0}.mrf-pagination{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:14px;font-size:10px;color:#7a90a9}.mrf-pagination>div{display:flex;align-items:center;gap:7px}.mrf-pagination select{min-height:29px;border:1px solid #dce6f0;border-radius:5px;font-size:10px;background:#fff;padding:5px}.mrf-pagination .mrf-button{font-size:10px;min-height:28px;padding:4px 8px}.mrf-pagination .active{border-color:#66beba;background:#e9f8f4;color:#008a89}.mrf-partners>.partner-directory-tabs{margin:0}.mrf-empty{padding:28px;text-align:center;color:#8ca1b5;font-size:12px}
.mrf-customer-backdrop{background:#20324866;backdrop-filter:blur(3px)}.modal-panel.mrf-customer-modal{width:min(720px,calc(100vw - 32px));max-width:720px;max-height:calc(100dvh - 40px);padding:0;display:flex;flex-direction:column;overflow:hidden;border-radius:11px;background:#fff;color:#1c2c43;box-shadow:0 25px 75px #142a3b33}.mrf-modal-header{display:flex;gap:12px;align-items:flex-start;padding:18px 22px 13px;flex:none}.mrf-modal-header>div:first-child{flex:1;min-width:0}.mrf-modal-header h2{font-size:22px;letter-spacing:-.04em;margin:0 0 5px}.mrf-modal-header p{margin:0;color:#8396ac;font-size:11px}.mrf-close{border:0;font-size:23px;font-weight:400;padding:0;min-height:25px;width:25px;color:#657b94}.mrf-menu{position:relative}.mrf-menu>summary{cursor:pointer;list-style:none;color:#516a86;font-size:21px;line-height:25px;padding:0 6px}.mrf-menu>summary::-webkit-details-marker{display:none}.mrf-menu>div{position:absolute;right:0;top:30px;z-index:8;display:grid;gap:4px;width:150px;padding:7px;border:1px solid #e0e9f2;border-radius:7px;background:#fff;box-shadow:0 10px 35px #12344926}.mrf-customer-modal #customer-form{display:flex;flex-direction:column;min-height:0;flex:1}.mrf-customer-body{overflow:auto;min-height:0;padding:0 20px 12px;background:#fbfdff}.mrf-customer-body fieldset{display:grid;gap:12px;padding:0;margin:0;border:0;min-width:0}.mrf-customer-body .mrf-card{padding:15px}.mrf-customer-body h3{font-size:15px;margin-bottom:11px}.mrf-customer-body .mrf-card>header{margin-bottom:9px}.mrf-customer-body small{font-size:10px;color:#8b9eb4}.mrf-customer-body b{color:#f36b63}.mrf-field{display:grid;gap:5px;font-size:12px;margin-top:11px;min-width:0;color:#465e7b}.mrf-field>span{font-weight:600}.mrf-field-pair{display:grid;grid-template-columns:1fr 1fr;gap:14px}.mrf-customer-modal .mrf-field :is(input,select,textarea){width:100%;min-width:0;border:1px solid #d6e1ef;border-radius:5px;padding:8px 10px;min-height:36px;color:#28445d;font-size:12px;line-height:1.5;background:#fff;box-shadow:none;font-family:inherit}.mrf-customer-modal .mrf-field textarea{resize:vertical;min-height:68px}.mrf-field input:focus,.mrf-field select:focus,.mrf-field textarea:focus{border-color:#008b8b;outline:2px solid #b8e7df;outline-offset:0}.mrf-field input::placeholder,.mrf-field textarea::placeholder{color:#97a8bc}.mrf-customer-options{margin-top:10px;font-size:11px;color:#8295ad}.mrf-customer-options .check-row{display:flex;align-items:center;gap:8px;margin-top:8px;font-size:11px}.mrf-customer-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 20px;border-top:1px solid #e2eaf2;background:#fff;flex:none}.mrf-customer-footer>p{display:flex;align-items:center;gap:8px;margin:0;font-size:10px;color:#8095af}.mrf-customer-footer>div{display:flex;gap:8px}.mrf-customer-footer .mrf-button{min-width:78px}.mrf-form-error{padding:10px;border:1px solid #f1c4ca;border-radius:5px;background:#fff3f5;color:#b34050;font-size:12px}.mrf-form-error[hidden]{display:none}.mrf-cost-modal{width:min(760px,calc(100vw - 28px));max-height:calc(100dvh - 40px);overflow:auto;padding:18px}.mrf-cost-modal>header{display:flex;align-items:center;justify-content:space-between}.mrf-cost-modal h2{margin:0;font-size:18px}.mrf-cost-modal .mrf-table{min-width:480px!important}.mrf-loading{display:grid;gap:15px;font-size:12px;color:#8a9db2}.mrf-skeletons{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.mrf-skeletons i{height:85px;border-radius:6px;background:linear-gradient(110deg,#edf3f7,#f8fafc,#edf3f7)}
@media(max-width:1100px){.mrf-kpi{padding:13px 10px;gap:8px}.mrf-kpi .mrf-icon{width:31px;height:35px;flex-basis:31px}.mrf-kpi strong{font-size:20px}.mrf-connected>div{flex-wrap:wrap}.mrf-connected p{flex-basis:100%;margin:3px 0 0;padding:5px 0 0;border-left:0}.mrf-partner-filters{flex-wrap:wrap}.mrf-partner-filters .mrf-search{flex-basis:40%}.mrf-partner-filters select{flex:1;width:110px}.mrf-partner-grid{grid-template-columns:minmax(0,1.8fr) minmax(240px,1fr)}}
@media(max-width:800px){.mrf-heading{flex-wrap:wrap;gap:10px}.mrf-heading h1{font-size:24px}.mrf-profit-toolbar{width:100%;justify-items:stretch}.mrf-profit-toolbar>div{flex-wrap:wrap}.mrf-profit-toolbar input{flex:1;min-width:110px;min-height:36px;font-size:12px}.mrf-profit-toolbar .mrf-button{min-height:36px}.mrf-kpis{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}.mrf-kpi{padding:13px 10px}.mrf-kpi strong{font-size:21px}.mrf-profit-summary,.mrf-analysis-bottom,.mrf-partner-grid{grid-template-columns:minmax(0,1fr)}.mrf-card{padding:13px}.mrf-card h2{font-size:15px}.mrf-tabs>button{padding:10px 12px;font-size:12px}.mrf-table th,.mrf-table td{padding:10px 8px}.mrf-info-bar{align-items:flex-start;flex-wrap:wrap}.mrf-info-bar .mrf-button{margin-left:auto}.mrf-due-callout{flex-wrap:wrap}.mrf-connected>div{display:grid;grid-template-columns:1fr 1fr}.mrf-connected p{grid-column:1/-1}.mrf-partner-filters{gap:7px}.mrf-partner-filters .mrf-search{flex-basis:100%;min-width:0}.mrf-partner-filters select{min-width:80px;font-size:12px}.mrf-partner-filters .mrf-search>input{min-height:39px;font-size:13px;padding-left:33px}.mrf-partner-filters .mrf-search>.icon{top:12px}.mrf-partner-detail{position:fixed;z-index:270;inset:auto 10px calc(68px + env(safe-area-inset-bottom,0px));max-height:calc(100dvh - 145px);overflow:auto;box-shadow:0 15px 70px #19384b35}.mrf-partner-detail dl>div{font-size:12px}.mrf-partner-table{min-width:550px!important}.mrf-pagination{flex-wrap:wrap}.mrf-pagination>div{margin-left:auto}.modal-panel.mrf-customer-modal{max-height:calc(100dvh - 24px);width:calc(100vw - 24px);border-radius:10px}.mrf-modal-header{padding:15px 15px 12px}.mrf-modal-header h2{font-size:21px}.mrf-customer-body{padding:0 11px 12px}.mrf-customer-body .mrf-card{padding:12px}.mrf-customer-modal .mrf-field :is(input,select,textarea){font-size:16px;min-height:40px}.mrf-customer-footer{padding:11px 12px;flex-wrap:wrap;gap:9px}.mrf-customer-footer>div{margin-left:auto}.mrf-customer-footer>.mrf-button{min-height:38px}}
@media(max-width:430px){.mrf-kpi{display:block}.mrf-kpi .mrf-icon{float:left;width:28px;height:30px;margin-right:8px}.mrf-kpi>div{display:contents}.mrf-kpi>div>span{display:block;min-height:32px;padding-top:7px}.mrf-kpi strong{clear:both;font-size:20px;margin-top:5px}.mrf-kpi small{display:block;margin-top:5px}.mrf-recovery-ratios{grid-template-columns:minmax(0,1fr)}.mrf-field-pair{grid-template-columns:minmax(0,1fr);gap:0}.mrf-cohort-total strong{font-size:20px}.mrf-due-callout>strong{font-size:24px}.mrf-ratios article{padding:11px}.mrf-partners .mrf-heading>.mrf-button{font-size:11px}.mrf-customer-footer>p{font-size:9px}.mrf-tabs>button{padding:10px 9px}}
@media print{.mrf-customer-backdrop,.mrf-cost-backdrop{display:none!important}}

/* Keep list navigation visible while the row area scrolls. */
.mrf-field{align-content:start}.mrf-partner-list{display:flex;flex-direction:column}.mrf-partner-list .mrf-table-scroll{max-height:clamp(270px,calc(100dvh - 520px),560px)}.mrf-partner-table thead th{position:sticky;top:0;z-index:1}.mrf-partner-table .customer-type-badge{padding:3px 10px;font-size:10px;line-height:1.2;min-height:20px}
@media(max-width:800px){.mrf-partner-list .mrf-table-scroll{max-height:520px}}

@media(max-width:800px){.mrf-profit-toolbar>div{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.mrf-profit-toolbar>div>span{display:none}.mrf-profit-toolbar input{width:100%;min-width:0;font-size:16px!important;min-height:40px}.mrf-profit-toolbar .mrf-button{width:100%;min-height:38px}}

