.revenue-plan{min-width:0}.revenue-plan .rp-heading{display:flex;align-items:center;justify-content:space-between;gap:1rem;flex-wrap:wrap}.revenue-plan .rp-rates{display:grid;grid-template-columns:repeat(auto-fit,minmax(145px,1fr));gap:16px}.revenue-plan .rp-rates label{display:grid;gap:6px}.revenue-plan .rp-rates .muted{font-size:.82rem}.revenue-plan .rp-input{display:flex;align-items:center;gap:8px;font-size:.84rem}.revenue-plan .rp-input input{width:7.5ch;min-width:7.5ch}.revenue-plan .rp-amounts{display:flex;gap:20px;flex-wrap:wrap}.revenue-plan .rp-amounts input{width:12ch}.revenue-plan .rp-project{display:grid;grid-template-columns:repeat(auto-fit,minmax(245px,1fr));gap:16px;margin-top:20px}.revenue-plan fieldset{border:1px solid var(--line,#304755);border-radius:12px;padding:16px;min-width:0}.revenue-plan fieldset label{margin-top:12px}.revenue-plan [hidden]{display:none!important}.revenue-plan .actions{align-items:end}.revenue-plan td small,.revenue-plan th small{display:block;font-weight:400;color:var(--muted,#9cb7c6);margin-top:4px}.revenue-plan .metrics{grid-template-columns:repeat(auto-fit,minmax(210px,1fr))}.revenue-plan .rp-chart{width:100%;min-width:600px;height:auto;color:#a9bdc9}.revenue-plan .rp-chart text{fill:currentColor;font:12px sans-serif}.revenue-plan #rp-chart{overflow:auto}.revenue-plan .rp-actual{fill:#6ed1e8;color:#6ed1e8}.revenue-plan .rp-future{fill:#aaa1f2;color:#aaa1f2}.revenue-plan .rp-earned{fill:#edc868;color:#edc868}.revenue-plan .rp-legend{display:flex;flex-wrap:wrap;gap:20px;font-size:.88rem}.revenue-plan .table-wrap{max-width:100%;overflow:auto}.revenue-plan .table-wrap table{font-size:.87rem}.revenue-plan #rp-status{font-size:.85rem;color:var(--muted,#a9bdc9)}.revenue-plan #rp-status.error-text{color:#ffaaa8}@media(max-width:600px){.revenue-plan .actions>label{width:100%}.revenue-plan .actions input,.revenue-plan .actions select{width:100%}.revenue-plan .rp-amounts{display:grid;grid-template-columns:1fr}.revenue-plan .rp-project{grid-template-columns:1fr}}
.revenue-plan.stack,.revenue-plan .stack{gap:14px}
.revenue-plan .panel{padding:16px}
.revenue-plan .rp-heading{gap:10px}
.revenue-plan h2{font-size:1.35rem}
.revenue-plan h2 small,.revenue-plan h3 small{font-size:.82rem;font-weight:400;margin-left:8px;color:var(--muted)}
.revenue-plan .rp-toolbar{display:flex;flex-wrap:wrap;gap:12px;align-items:end}
.revenue-plan .rp-toolbar>label{flex:1 1 180px;max-width:300px;min-width:0}
.revenue-plan .rp-controls{gap:10px}
.revenue-plan .rp-plan-actions{flex:1 1 230px}
.revenue-plan .rp-plan-actions>summary{text-align:right;align-content:center;min-height:44px;font-size:.9rem;color:var(--cyan)}
.revenue-plan .rp-plan-actions[open]{flex-basis:100%}
.revenue-plan .rp-plan-actions .actions{padding-top:8px}
.revenue-plan .rp-rates{grid-template-columns:repeat(auto-fit,minmax(135px,1fr));gap:12px}
.revenue-plan .metrics{gap:12px}
.revenue-plan .metric{padding:16px}
.revenue-plan .metric strong{margin-top:6px}
.revenue-plan .table-wrap table{font-size:.9rem;font-variant-numeric:tabular-nums}
.revenue-plan th,.revenue-plan td{padding:8px 10px}
.revenue-plan td small,.revenue-plan th small{font-size:.81rem;margin-top:2px}
.revenue-plan .rp-chart{display:block;width:100%;max-height:220px;min-width:560px}
.revenue-plan #rp-chart{max-height:224px}
.revenue-plan .rp-legend{margin:0;gap:16px}
.revenue-plan .rp-summary-tables{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:start}
.revenue-plan #rp-source-time{font-size:.82rem;line-height:1.45}
.revenue-plan #rp-plant-search{max-width:300px}
.revenue-plan #rp-sources .table-wrap{max-height:420px}
.revenue-plan #rp-sources thead{position:sticky;top:0;background:var(--panel);z-index:1}
.revenue-plan .rp-earned-help{font-size:.85rem;color:var(--muted)}
.revenue-plan .rp-earned-help summary{min-height:24px}
@media(max-width:1200px){.revenue-plan .rp-summary-tables{grid-template-columns:minmax(0,1fr)}}
@media(max-width:600px){.revenue-plan .rp-toolbar>label{flex-basis:100%;max-width:none}.revenue-plan .rp-plan-actions>summary{text-align:left}.revenue-plan .rp-rates{grid-template-columns:repeat(2,minmax(0,1fr))}.revenue-plan .rp-amounts{gap:12px}.revenue-plan .rp-input{flex-wrap:wrap}.revenue-plan .rp-rates .rp-input input{width:100%;min-width:0}.revenue-plan .rp-heading h3 small{display:block;margin:4px 0 0}.revenue-plan .metrics{grid-template-columns:minmax(0,1fr)}}

.revenue-plan .metrics .metric.rp-actual{border-top:3px solid #6ed1e8;background:linear-gradient(135deg,#183646,var(--panel) 80%)}
.revenue-plan .metrics .metric.rp-earned{border-top:3px solid #edc868;background:linear-gradient(135deg,#3a3423,var(--panel) 80%)}
.revenue-plan .metrics .metric.rp-future{border-top:3px solid #aaa1f2;background:linear-gradient(135deg,#302b49,var(--panel) 80%)}
.revenue-plan .metrics .metric strong{color:inherit}
.revenue-plan #rp-chart .rp-chart{height:210px;max-height:210px;min-width:600px}
.revenue-plan .rp-chart text{font-size:14px}
.revenue-plan #rp-results .rp-heading>label{display:flex;align-items:center;gap:10px}
.revenue-plan .rp-summary-tables th{min-width:85px}

@media(min-width:601px) and (max-width:1450px){.revenue-plan .metrics:has(.metric:nth-child(4)){grid-template-columns:repeat(2,minmax(0,1fr))}}

.revenue-plan .rp-topline{display:flex;align-items:end;flex-wrap:wrap;gap:12px}
.revenue-plan .rp-topline>label{flex:1 1 165px;max-width:240px;min-width:0}
.revenue-plan .rp-files{margin-left:auto;align-items:end;flex-wrap:wrap}
.revenue-plan .rp-files .button{min-height:44px;display:flex;align-items:center;padding:10px 16px;border:1px solid var(--line);border-radius:9px;cursor:pointer;background:#203445;color:#e8f2f6}
.revenue-plan .rp-range{display:flex;gap:10px;flex-wrap:wrap;align-items:end}
.revenue-plan .rp-range input{width:155px;max-width:100%}
.revenue-plan .rp-range input[type=number]{width:95px}
.revenue-plan .rp-basis{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.revenue-plan .rp-basis select{width:auto;max-width:100%}
.revenue-plan .rp-accrued{color:#78d5a7;fill:#78d5a7}
.revenue-plan .metrics .metric.rp-accrued{border-top:3px solid #78d5a7;background:linear-gradient(135deg,#193c31,var(--panel) 80%)}
.revenue-plan td.rp-actual,.revenue-plan th.rp-actual{background:#6ed1e809}
.revenue-plan td.rp-earned,.revenue-plan th.rp-earned{background:#edc86809}
.revenue-plan td.rp-future,.revenue-plan th.rp-future{background:#aaa1f209}
.revenue-plan td.rp-accrued,.revenue-plan th.rp-accrued{background:#78d5a709}
.revenue-plan #rp-chart .rp-chart{width:auto;min-width:100%;height:210px;max-height:none}
.revenue-plan #rp-chart{max-height:240px}
.revenue-plan .rp-tall-table{max-height:480px}
.revenue-plan .rp-summary-tables{align-items:stretch}
.revenue-plan .rp-summary-tables>.panel{display:flex;flex-direction:column}
.revenue-plan .rp-summary-tables>.panel>.table-wrap{height:420px;flex:1 1 420px}
.revenue-plan .rp-summary-tables>.panel>.rp-heading{min-height:84px}
.revenue-plan .rp-summary-tables thead,.revenue-plan .rp-tall-table thead{position:sticky;top:0;background:var(--panel);z-index:1}
@media(max-width:600px){.revenue-plan .rp-topline>label{flex-basis:100%;max-width:none}.revenue-plan .rp-files{margin-left:0}.revenue-plan .rp-range{width:100%}.revenue-plan .rp-range label{flex:1;min-width:0}.revenue-plan .rp-range input{width:100%}.revenue-plan .rp-summary-tables>.panel>.table-wrap{flex-basis:360px;height:360px}}

.revenue-plan .rp-billable{color:#93adff;fill:#93adff}.revenue-plan .metrics .metric.rp-billable{border-top:3px solid #93adff;background:linear-gradient(135deg,#232d49,var(--panel) 80%)}.revenue-plan td.rp-billable,.revenue-plan th.rp-billable{background:#93adff09}

/* Use available content width, including the portal sidebar, rather than monitor width. */
.revenue-plan{container-type:inline-size}
.revenue-plan .rp-summary-tables{grid-template-columns:minmax(0,1fr)}
@container(min-width:2100px){.revenue-plan .rp-summary-tables{grid-template-columns:repeat(2,minmax(0,1fr))}}
.revenue-plan .rp-input input{width:12ch;min-width:12ch;padding-right:24px}
.revenue-plan .rp-amounts input{width:19ch;min-width:19ch;padding-right:24px}
.revenue-plan .rp-project{grid-template-columns:repeat(auto-fit,minmax(280px,1fr))}
.revenue-plan .rp-rates{grid-template-columns:repeat(auto-fit,minmax(175px,1fr))}
.revenue-plan input[readonly]{background:#142532;color:var(--muted);border-style:dashed}
.revenue-plan .rp-commission{color:#ffb272;background:#ffb27209;font-variant-numeric:tabular-nums}
.revenue-plan .rp-project-field>small{font-size:.82rem}
@media(max-width:600px){.revenue-plan .rp-project{grid-template-columns:minmax(0,1fr)}.revenue-plan .rp-rates{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Keep twelve months visible; longer ranges keep a bounded scroll area. */
.revenue-plan{overflow-anchor:none}
.revenue-plan .rp-summary-tables.rp-fit-months>.panel>.table-wrap{height:auto;flex:1 1 auto;min-height:420px}
