/* Independent workspace composition. All colors and type roles inherit the original. */
html.dashboard-v2{--v2-sidebar:196px;--v2-gap:12px;scroll-padding-top:12px}
html.dashboard-v2 [hidden]{display:none!important}
html.dashboard-v2 body{background:var(--bg)}
html.dashboard-v2 .shell{width:calc(100% - var(--v2-sidebar));max-width:none;margin:0 0 0 var(--v2-sidebar);padding:22px 24px 24px;min-width:0}
.v2-sidebar{overflow-y:auto;position:fixed;inset:0 auto 0 0;width:var(--v2-sidebar);z-index:12;display:flex;flex-direction:column;padding:26px 16px 18px;background:var(--control-bg);border-right:1px solid var(--line-soft)}
.v2-identity{display:flex;align-items:center;gap:10px;margin:0 0 48px}
.v2-monogram{width:32px;height:36px;display:grid;place-items:center;border:1px solid var(--frame);color:var(--cyan);font-size:20px;font-weight:650;border-radius:3px}
.v2-identity strong{display:block;font-size:14px;font-weight:600;color:var(--text)}
.v2-identity div>span{display:block;font-size:12px;color:var(--muted);margin-top:3px}
.v2-nav-label{color:var(--muted);font-size:12px;margin:0 12px 10px}
.v2-nav{display:flex;flex-direction:column;gap:6px}
html.dashboard-v2 .v2-nav button{position:relative;display:flex;align-items:center;gap:12px;width:100%;min-height:46px;padding:10px 12px;border:1px solid transparent;border-radius:6px;background:transparent;color:var(--muted);font-size:14px;text-align:left;cursor:pointer}
.v2-nav svg{width:19px;height:19px;flex-shrink:0;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
html.dashboard-v2 .v2-nav button:hover{color:var(--text);background:var(--surface-hover)}
html.dashboard-v2 .v2-nav button[aria-current=page]{color:var(--cyan);border-color:var(--line);background:var(--selected);font-weight:600}
html.dashboard-v2 .v2-nav button[aria-current=page]:before{content:'';position:absolute;left:-17px;width:3px;height:22px;border-radius:0 2px 2px 0;background:var(--cyan)}
html.dashboard-v2 .v2-nav button:disabled{opacity:.45;cursor:not-allowed;background:transparent}
.v2-nav button:focus-visible,.v2-original:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
.v2-sidebar-footer{margin-top:auto;padding-top:26px}
.v2-original{display:flex;justify-content:space-between;gap:10px;color:var(--muted);font-size:12px;text-decoration:none;padding:12px;border-top:1px solid var(--line-soft)}
.v2-original:hover{color:var(--cyan)}
html.dashboard-v2 .filters{position:relative;top:auto;padding:12px 14px;gap:10px;margin:0 0 20px;background:var(--control-bg);border:1px solid var(--line);border-radius:6px;box-shadow:0 6px 16px #00000018;grid-template-columns:auto minmax(0,1fr) auto}
html.dashboard-v2 .filter-toggle{display:inline-flex;grid-column:1;grid-row:1;align-items:center;gap:8px;height:36px;padding:0 10px;border:1px solid var(--control-line);border-radius:4px;background:var(--button-bg);color:var(--button-text);cursor:pointer}
html.dashboard-v2 .filter-actions{grid-column:3;grid-row:1}
html.dashboard-v2 .filters .query-summary{grid-column:2;grid-row:1;background:transparent;border:0;padding:0 2px;color:var(--muted)}
html.dashboard-v2 .filter-fields{grid-column:1/-1;grid-row:2;grid-template-columns:repeat(30,minmax(0,1fr));gap:10px;padding-top:10px;border-top:1px solid var(--line-soft)}
html.dashboard-v2 .filter-fields .field{grid-column:span 6;min-width:0}
html.dashboard-v2 .filter-fields .date-field{grid-column:span 10;min-width:0}
html.dashboard-v2 .filter-fields .field:first-child{grid-column:span 4}
html.dashboard-v2 .filter-fields .amount-unit-field{grid-column:25/-1;grid-row:1}
html.dashboard-v2 .filters[data-expanded=false] .filter-fields{display:none}
html.dashboard-v2 .filters[data-expanded=false] .filter-collapse-label,
html.dashboard-v2 .filters[data-expanded=true] .filter-expand-label{display:none}
html.dashboard-v2 .filter-chevron{display:inline-block;transition:transform .15s}
html.dashboard-v2 .filters[data-expanded=true] .filter-chevron{transform:rotate(180deg)}
html.dashboard-v2 .filters .empty-state{grid-column:1/-1;grid-row:3;margin:0}
html.dashboard-v2 .v2-overview{display:grid;grid-template-columns:minmax(0,1fr);gap:var(--v2-gap);align-items:stretch}
html.dashboard-v2 .v2-overview.v2-metrics-only{grid-template-columns:minmax(0,1fr)}
html.dashboard-v2 .collection-overview{display:contents}
html.dashboard-v2 .collection-metrics{margin:0;padding:16px;border:1px solid var(--frame);border-radius:6px;min-width:0;overflow:visible}
html.dashboard-v2 .collection-metrics-toolbar{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:2px 8px;margin:0 0 12px}
html.dashboard-v2 .collection-metrics-toolbar h2{grid-row:1;grid-column:1}
html.dashboard-v2 .collection-metrics-toolbar p{grid-row:2;grid-column:1/-1}
html.dashboard-v2 .collection-metrics-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;border:0;background:transparent;border-radius:0;overflow:visible}
html.dashboard-v2 .collection-metric-group{border:1px solid var(--line-soft);border-radius:4px;overflow:hidden;background:var(--panel)}
html.dashboard-v2 .collection-metric-group header{grid-template-columns:minmax(0,1fr) auto 20px;gap:3px 6px;padding:10px 10px 8px;min-height:0;background:var(--surface-title)}
html.dashboard-v2 .collection-metric-group h3{grid-column:1;grid-row:1}
html.dashboard-v2 .collection-metric-help{grid-column:3;grid-row:1;height:24px}
html.dashboard-v2 .collection-metric-rate{grid-column:2;grid-row:1;justify-content:flex-start;line-height:1.15}
html.dashboard-v2 .collection-metric-body{container-type:inline-size}
html.dashboard-v2 .collection-metric-part{padding:8px 8px;gap:3px}
html.dashboard-v2 .collection-metric-part dt{font-size:12px;line-height:1.5}
html.dashboard-v2 .collection-metric-part dd b{font-size:18px}
html.dashboard-v2 .collection-metric-debt{padding:0;gap:8px;justify-content:flex-start;background:var(--panel)}
html.dashboard-v2 .collection-metric-debt header{display:flex;justify-content:space-between;padding:10px 12px;background:var(--surface-title)}
html.dashboard-v2 .collection-metric-debt-note{text-align:left;padding:0 12px}
html.dashboard-v2 .collection-metric-amount{justify-content:flex-start;padding:0 12px 12px;gap:3px}
html.dashboard-v2 #collectionMetrics .collection-metric-amount b{font-size:var(--type-number-secondary)}
html.dashboard-v2 .v2-metrics-only .collection-metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
html.dashboard-v2 #collectionTrendCard{padding:12px;min-width:0;gap:8px;border-radius:6px;margin:0}
html.dashboard-v2 #collectionTrendPlot{flex:0 0 auto;display:flex;align-items:center;min-height:0}
html.dashboard-v2 #companyProjectsCard{grid-column:1/-1;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px 16px;padding:12px;border-radius:6px;margin:0}
html.dashboard-v2 #companyProjectsCard .card-head{grid-column:1;grid-row:1;margin:0;align-items:center;min-height:0;border:0;padding:0}
html.dashboard-v2 #companyProjectOverview{grid-column:2;grid-row:1;min-width:350px;padding:0}
html.dashboard-v2 #companyProjectsCard .project-preview-toolbar{grid-column:1/-1;margin:0;border-top:1px solid var(--line-soft);padding-top:8px}
html.dashboard-v2 #companyProjectHighlights{grid-column:1/-1;display:grid;grid-template-columns:1fr;gap:8px}
html.dashboard-v2 .project-preview-group{display:grid;grid-template-columns:136px repeat(3,minmax(0,1fr));gap:12px;align-items:stretch}
html.dashboard-v2 .project-preview-group+.project-preview-group{margin:0;padding:8px 0 0;border-left:0;border-top:1px solid var(--line-soft)}
html.dashboard-v2 .project-preview-group-head{display:flex;flex-direction:column;align-items:flex-start;justify-content:center;gap:3px;margin:0}
html.dashboard-v2 .project-preview-group-head h3{font-size:14px}
html.dashboard-v2 .project-preview-row{padding:6px 10px;min-height:64px;border:1px solid var(--line-soft);border-radius:4px;gap:4px 6px;background:var(--summary-surface)}
html.dashboard-v2 .project-preview-row:hover{background:var(--surface-hover);border-color:var(--frame)}
html.dashboard-v2 .project-preview-info>small{font-size:12px}
html.dashboard-v2 #companyRankTotal{grid-column:1/-1;margin:0;display:flex;align-items:center;gap:8px 20px;flex-wrap:wrap}
html.dashboard-v2 .project-preview-total-head{margin:0}
html.dashboard-v2 #companyProjectHint{grid-column:1/-1;margin:0}
html.dashboard-v2 .report-workspace{margin:0;border-radius:6px;overflow:visible}
html.dashboard-v2 .report-workspace>.detail-section,html.dashboard-v2 .summary-grid{margin:0}
html.dashboard-v2 .report-workspace .card{padding:20px;background:transparent;border:0;box-shadow:none}
html.dashboard-v2 .report-workspace .card-head{padding-bottom:14px;margin-bottom:16px;border-bottom:1px solid var(--line-soft);align-items:center}
/* Community overview includes its project-fee detail table. */
html.dashboard-v2 .v2-overview>#projectFeePanel{margin:0;min-width:0;padding:12px;background:var(--panel);border:1px solid var(--line);border-radius:12px}
html.dashboard-v2 .v2-overview>#projectFeePanel>.card-head{padding-bottom:10px;margin-bottom:12px;border-bottom:1px solid var(--line-soft)}
html.dashboard-v2 #projectFeeTitle{margin:0}
/* Project fee selection shares the page query and stays with its table heading. */
html.dashboard-v2 #projectFeePanel>.card-head{display:block}
html.dashboard-v2 .project-fee-topline{display:grid;grid-template-columns:minmax(0,1fr) 200px auto;align-items:center;gap:12px}
html.dashboard-v2 .project-fee-topline>.card-title{min-width:0;text-wrap:balance}
html.dashboard-v2 .project-fee-topline>.card-actions{flex-wrap:nowrap;justify-content:flex-end;gap:8px}
html.dashboard-v2 #projectFeeFilter{min-width:0}
html.dashboard-v2 #projectFeeFilter .field>label{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
html.dashboard-v2 #projectFeeFilter .picker-control{height:36px}
html.dashboard-v2 #projectFeeFilter .picker-control input{text-overflow:ellipsis;font-size:14px}
html.dashboard-v2 #projectFeeFilter .picker-control input:focus-visible{outline:0;box-shadow:none}
html.dashboard-v2 #projectFeeFilter .picker-menu{right:0;left:auto;width:100%;min-width:200px;max-width:calc(100vw - 48px);max-height:300px;overscroll-behavior:contain}
html.dashboard-v2 #projectFeeFilter .picker-option{min-height:36px}
html.dashboard-v2 #projectFeePanel>.card-head>.card-sub{margin-top:8px}
@media(max-width:1100px){
 html.dashboard-v2 .project-fee-topline{grid-template-columns:minmax(0,1fr) 200px;gap:8px 12px}
 html.dashboard-v2 .project-fee-topline>.card-actions{grid-column:1/-1;justify-content:flex-start;flex-wrap:wrap;width:auto}
}
@media(max-width:760px){
 html.dashboard-v2 .project-fee-topline{grid-template-columns:minmax(0,1fr) 140px;gap:8px}
 html.dashboard-v2 #projectFeeFilter .picker-control{height:40px}
 html.dashboard-v2 #projectFeeFilter .picker-option{min-height:40px}
 html.dashboard-v2 #projectFeeFilter .picker-menu{max-height:min(300px,50dvh)}
}
html.dashboard-v2 .detail-table-wrap,html.dashboard-v2 .finance-table-wrap,html.dashboard-v2 .budget-table-wrap{max-height:520px}
/* The project table is paginated; let the current page show every row. */
html.dashboard-v2 #projectFeePanel>.detail-table-wrap{max-height:none}
html.dashboard-v2 .report-workspace .finance-analysis{gap:28px;grid-template-columns:minmax(0,1.7fr) minmax(240px,1fr)}
html.dashboard-v2 .finance-metrics,html.dashboard-v2 .budget-kpis,html.dashboard-v2 .ops-summary{margin-bottom:20px}
html.dashboard-v2 .data-table th,html.dashboard-v2 .data-table td,html.dashboard-v2 .finance-table th,html.dashboard-v2 .finance-table td,html.dashboard-v2 .budget-table th,html.dashboard-v2 .budget-table td{padding:10px 12px}
html.dashboard-v2 .footer{margin-top:14px;color:var(--muted);text-align:left}
@media(min-width:1700px){html.dashboard-v2 .filter-fields{grid-template-columns:90px repeat(2,minmax(210px,1.2fr)) repeat(5,minmax(95px,1fr)) 108px}html.dashboard-v2 .filter-fields .field{grid-column:auto;grid-row:auto}html.dashboard-v2 .collection-metric-group header{grid-template-columns:minmax(0,1fr) auto 20px;align-items:center}html.dashboard-v2 .collection-metric-rate{grid-column:2;grid-row:1}html.dashboard-v2 .collection-metric-help{grid-column:3;grid-row:1}}
@media(max-width:1350px){html.dashboard-v2{--v2-sidebar:176px}html.dashboard-v2 .shell{padding:18px}html.dashboard-v2 .v2-overview{grid-template-columns:minmax(0,1fr)}html.dashboard-v2 .collection-metrics-grid,html.dashboard-v2 .v2-metrics-only .collection-metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr))}html.dashboard-v2 #collectionTrendPlot{min-height:0}html.dashboard-v2 #companyProjectsCard{grid-template-columns:minmax(0,1fr)}html.dashboard-v2 #companyProjectOverview{grid-column:1;grid-row:2;min-width:0}html.dashboard-v2 .project-preview-group{grid-template-columns:100px repeat(3,minmax(0,1fr));gap:8px}html.dashboard-v2 .report-workspace .finance-analysis{grid-template-columns:minmax(0,1fr) minmax(200px,.7fr)}}
@media(max-width:1000px){html.dashboard-v2 .filter-fields .amount-unit-field{grid-column:span 2;grid-row:auto}html.dashboard-v2 .filter-fields{grid-template-columns:repeat(6,minmax(0,1fr))}html.dashboard-v2 .filter-fields .field{grid-column:span 2}html.dashboard-v2 .filter-fields .date-field{grid-column:span 3}html.dashboard-v2 .filter-fields .field:first-child{grid-column:span 6}html.dashboard-v2 .collection-metrics-grid,html.dashboard-v2 .v2-metrics-only .collection-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}html.dashboard-v2 .project-preview-group{grid-template-columns:minmax(0,1fr)}html.dashboard-v2 .project-preview-group-head{flex-direction:row;justify-content:space-between;align-items:center}html.dashboard-v2 #companyProjectHighlights{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}html.dashboard-v2 .project-preview-group+.project-preview-group{border:0;padding:0}html.dashboard-v2 .report-workspace .finance-analysis{grid-template-columns:minmax(0,1fr)}}
@media(max-width:760px){
 html.dashboard-v2{--v2-sidebar:0px;--v2-gap:12px}
 html.dashboard-v2 .shell{width:100%;margin:0;padding:12px 12px 88px}
 .v2-sidebar{position:static;width:100%;padding:0;border:0;background:transparent;z-index:auto}
 .v2-identity,.v2-nav-label,.v2-original{display:none}
 .v2-sidebar-footer{display:none}
 .v2-nav{position:fixed;inset:auto 0 0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:0;padding:6px 4px calc(6px + env(safe-area-inset-bottom));background:var(--control-bg);border-top:1px solid var(--line);z-index:15;box-shadow:0 -4px 20px #00000020}
 html.dashboard-v2 .v2-nav button{min-height:52px;flex-direction:column;gap:4px;padding:4px 0;border:0;font-size:12px;line-height:1.5;white-space:nowrap;justify-content:center}
 html.dashboard-v2 .v2-nav button[aria-current=page]{border:0}
 html.dashboard-v2 .v2-nav button[aria-current=page]:before{left:calc(50% - 10px);top:-6px;height:2px;width:20px;border-radius:0}
 html.dashboard-v2 .filters{padding:8px;gap:8px;grid-template-columns:auto minmax(0,1fr);margin-bottom:12px}
 html.dashboard-v2 .filter-toggle{height:40px;padding:0 8px}
 html.dashboard-v2 .filter-actions{grid-column:2;grid-row:1;gap:4px}
 html.dashboard-v2 .filter-actions .btn,html.dashboard-v2 .filter-actions .apply{padding:0 8px}
 html.dashboard-v2 .filters .query-summary{grid-column:1/-1;grid-row:3;padding:0 2px}
 html.dashboard-v2 .filters .empty-state{grid-row:4}
 html.dashboard-v2 .filter-fields{grid-template-columns:repeat(2,minmax(0,1fr));padding-top:8px;max-height:calc(100dvh - 230px)}
 html.dashboard-v2 .filter-fields .field{grid-column:span 1}
 html.dashboard-v2 .filter-fields .field:first-child,html.dashboard-v2 .filter-fields .date-field,html.dashboard-v2 .filter-fields .amount-unit-field{grid-column:1/-1}
 html.dashboard-v2 .collection-metrics,html.dashboard-v2 #collectionTrendCard,html.dashboard-v2 #companyProjectsCard{padding:12px}
 html.dashboard-v2 .collection-metrics-grid,html.dashboard-v2 .v2-metrics-only .collection-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
 html.dashboard-v2 .collection-metric-group header{padding:8px;gap:3px;grid-template-columns:minmax(0,1fr) 20px}
 html.dashboard-v2 .collection-metric-help{width:20px;height:24px;padding:2px;grid-column:2}
 html.dashboard-v2 .collection-metric-rate{grid-column:1/-1;grid-row:2}
 html.dashboard-v2 .collection-metric-group h3{font-size:14px}
 html.dashboard-v2 .collection-metric-part{padding:7px 5px}
 html.dashboard-v2 .collection-metric-body dl{grid-template-columns:minmax(0,1fr)}
 html.dashboard-v2 .collection-metric-part+.collection-metric-part{border-left:0;border-top:1px solid var(--line-soft)}
 html.dashboard-v2 .collection-metric-part dt{font-size:12px}
 html.dashboard-v2 .collection-metric-part dt small{display:inline}
 html.dashboard-v2 .collection-metric-part dd b{font-size:18px}
 html.dashboard-v2 .collection-metric-debt header{padding:8px}
 html.dashboard-v2 .collection-metric-debt-note{padding:0 8px}
 html.dashboard-v2 .collection-metric-amount{padding:0 8px 8px}
 html.dashboard-v2 #companyProjectHighlights{grid-template-columns:minmax(0,1fr);gap:8px}
 html.dashboard-v2 .project-preview-group+.project-preview-group{border-top:1px solid var(--line-soft);padding-top:8px}
 html.dashboard-v2 .project-preview-row{min-height:64px}
 html.dashboard-v2 #companyProjectsCard{gap:8px}
 html.dashboard-v2 #companyProjectsCard .card-head{align-items:flex-start}
 html.dashboard-v2 #companyRankTotal{gap:4px}
 html.dashboard-v2 .report-workspace .card{padding:12px}
 html.dashboard-v2 .report-workspace .card-head{padding-bottom:12px;margin-bottom:12px}
 html.dashboard-v2 .finance-metrics,html.dashboard-v2 .budget-kpis,html.dashboard-v2 .ops-summary{margin-bottom:14px}
 html.dashboard-v2 .modal-mask{z-index:30}
 html.dashboard-v2 .toast{bottom:82px}
}
@media(max-width:360px){html.dashboard-v2 .shell{padding-left:8px;padding-right:8px}html.dashboard-v2 .filter-actions .btn,html.dashboard-v2 .filter-actions .apply{padding:0 6px}html.dashboard-v2 .filter-toggle{padding:0 6px}html.dashboard-v2 .collection-metric-group header{padding:7px 6px}}
@media(prefers-reduced-motion:reduce){html.dashboard-v2 *{scroll-behavior:auto!important}}

@media(min-width:761px) and (max-height:620px){
 .v2-sidebar{padding-top:14px}.v2-identity{margin-bottom:16px}
 html.dashboard-v2 .v2-nav button{min-height:40px}
 html.dashboard-v2 .filter-fields{max-height:calc(100dvh - 180px);overflow:auto;padding:8px 2px 2px}
 html.dashboard-v2 .filter-fields .picker-menu{position:static;margin-top:5px;max-height:150px;box-shadow:none}
}

/* One ocean palette: vivid blue actions, mint receipts, amber attention, coral risk. */
html.dashboard-v2{
 --bg:#122b43;--panel:#204462;--panel2:#244a68;--surface-title:#244e6d;
 --line:#426d8c;--line-soft:#345f7c;--frame:#568aaa;--text:#f5fbff;--muted:#c3dbea;
 --cyan:#55c3ff;--blue:#55c3ff;--purple:#c4afff;--green:#35e5ad;--yellow:#ffca45;--red:#ff96a4;
 --surface-hover:#244a68;--selected:#194866;--table-head:#254d6d;
 --success-bg:#125244;--warning-bg:#59451d;--danger-bg:#59344b;
 --control-bg:#173951;--control-line:#75a3c1;--button-bg:#285571;--button-text:#f5fbff;
 --action-text:#062a42;--primary-hover:#7dd0ff;--summary-surface:#193b55;--zebra:#224561;
 --chart-grid:#3e6987;--tip-bg:#234b68;--section-radius:12px;--control-radius:7px;
 --v2-nav-bg:#102c43;--v2-bg-top:#224b69;--v2-accent-soft:#295e83;
}
html.dashboard-v2 body{background:linear-gradient(150deg,var(--v2-bg-top),var(--bg) 55%) fixed;color:var(--text)}
html.dashboard-v2 .shell{background:transparent}
html.dashboard-v2 .v2-sidebar{background:var(--v2-nav-bg);border-color:var(--line-soft)}
html.dashboard-v2 .v2-monogram{color:var(--v2-nav-bg);background:var(--cyan);border:0;border-radius:9px;font-size:20px}
html.dashboard-v2 .v2-nav button{border-radius:8px}
html.dashboard-v2 .v2-nav button[aria-current=page]{background:var(--cyan);color:var(--action-text);border-color:transparent}
html.dashboard-v2 .v2-nav button[aria-current=page]:before{display:none}
html.dashboard-v2 .v2-nav button:hover:not([aria-current]):not(:disabled){background:var(--button-bg);color:var(--text)}
html.dashboard-v2 .filters{background:var(--control-bg);border-color:var(--line);box-shadow:0 8px 18px #06122035;border-radius:10px}
html.dashboard-v2 .filter-toggle{background:var(--button-bg);color:var(--text);border-color:var(--control-line);border-radius:7px}
html.dashboard-v2 :is(.select,.picker-control,.ops-input,.ops-select,.ops-rules input:not([type=checkbox]),.ops-rules select,.finance-controls input,.finance-controls select,.budget-window){background:var(--summary-surface);color:var(--text);border-color:var(--control-line);border-radius:7px}
html.dashboard-v2 :is(.select,.picker-control,.ops-input,.ops-select):focus-within{outline-color:var(--cyan);box-shadow:none}
html.dashboard-v2 .picker-menu{background:var(--panel2);border-color:var(--control-line);border-radius:8px;box-shadow:0 14px 28px #06122080}
html.dashboard-v2 .picker-option:has(input:checked){background:var(--selected);color:var(--text)}
html.dashboard-v2 .picker[data-target="v2Subject"] .picker-option{align-items:flex-start}
html.dashboard-v2 .picker[data-target="v2Subject"] .picker-option input{margin-top:3px}
html.dashboard-v2 .picker[data-target="v2Subject"] .picker-option span{min-width:0;white-space:normal;overflow-wrap:anywhere}
@media(min-width:761px) and (min-height:621px){html.dashboard-v2 .picker[data-target="v2Subject"] .picker-menu{right:auto;width:min(620px,calc(100vw - 260px));min-width:100%}}
html.dashboard-v2 :is(.btn,.ops-btn,.modal-close){background:var(--button-bg);border-color:var(--control-line);color:var(--button-text);border-radius:7px}
html.dashboard-v2 :is(.btn,.ops-btn,.modal-close):hover{background:var(--surface-hover);border-color:var(--cyan);color:var(--text)}
html.dashboard-v2 :is(.btn.primary,.apply){background:var(--cyan);border-color:var(--cyan);color:var(--action-text);border-radius:7px}
html.dashboard-v2 :is(.btn.primary,.apply):hover{background:var(--primary-hover);border-color:var(--primary-hover);color:var(--action-text)}
html.dashboard-v2 #export{background:transparent;color:var(--cyan);border-color:var(--control-line)}
html.dashboard-v2 #export:hover{background:var(--selected)}
html.dashboard-v2 :is(.collection-metrics,.collection-overview>.card,.report-workspace,.modal-card,.ops-dialog){--panel-frame:none;background:var(--panel);border:1px solid var(--line);border-radius:12px;box-shadow:none}
html.dashboard-v2 :is(#collectionTrendCard,#companyProjectsCard){border-color:var(--line);border-radius:12px;background:var(--panel)}
html.dashboard-v2 :is(.modal-mask,.ops-dialog-mask){background:#071321c9}
html.dashboard-v2 :is(.modal-card,.ops-dialog){box-shadow:0 22px 70px #06101c90}
html.dashboard-v2 :is(.card-title,.ops-head h3,.collection-metrics-toolbar h2){color:var(--text)}
html.dashboard-v2 :is(.card-head,.ops-head){border-color:var(--line-soft)}
html.dashboard-v2 .collection-metric-group{border:1px solid color-mix(in srgb,var(--metric-color) 22%,var(--line-soft));border-radius:8px;background:color-mix(in srgb,var(--metric-color) 5%,var(--panel2))}
html.dashboard-v2 .collection-metric-group header{background:transparent;border-bottom:1px solid color-mix(in srgb,var(--metric-color) 12%,var(--line-soft))}
html.dashboard-v2 .collection-metric-rate{color:var(--metric-color)}
html.dashboard-v2 [data-collection-metric=current_collection]{--metric-color:var(--green)}
html.dashboard-v2 [data-collection-metric=past_due_collection]{--metric-color:var(--yellow)}
html.dashboard-v2 [data-collection-metric=historical_collection]{--metric-color:var(--purple)}
html.dashboard-v2 [data-collection-metric=combined_collection]{--metric-color:var(--blue)}
html.dashboard-v2 [data-collection-metric=prepayment_share]{--metric-color:var(--green)}
html.dashboard-v2 [data-collection-metric=total_arrears]{--metric-color:var(--yellow)}
html.dashboard-v2 .collection-metric-debt{background:color-mix(in srgb,var(--yellow) 5%,var(--panel2))}
html.dashboard-v2 .collection-metric-help{color:var(--muted)}
html.dashboard-v2 .collection-metric-preview[aria-pressed=true]{background:var(--selected);color:var(--cyan);border-color:var(--cyan)}
html.dashboard-v2 .project-preview-row{background:var(--summary-surface);border-color:var(--line-soft);border-radius:7px}
html.dashboard-v2 .project-preview-row:hover{background:var(--surface-hover);border-color:var(--control-line)}
html.dashboard-v2 .project-preview-row.is-warning:hover{background:var(--warning-bg);border-color:var(--yellow)}
html.dashboard-v2 :is(.project-preview-track,.category-track,.budget-track){background:var(--line-soft)}
html.dashboard-v2 :is(.project-preview-value>strong,.project-preview-overview>div:first-child strong,.collection-trend-stats>div:first-child strong){color:var(--green)}
html.dashboard-v2 .project-preview-row.is-warning .project-preview-value>strong{color:var(--yellow)}
html.dashboard-v2 .project-preview-overview .has-warning strong{color:var(--yellow)}
html.dashboard-v2 .project-preview-track i{background:var(--green)}
html.dashboard-v2 .is-warning .project-preview-track i{background:var(--yellow)}
html.dashboard-v2 #companyRankTotal{background:var(--summary-surface);border-radius:7px}
html.dashboard-v2 .project-preview-totals b{color:var(--text)}
html.dashboard-v2 .collection-trend-line{stroke:var(--green);stroke-width:3}
html.dashboard-v2 .collection-point{fill:var(--green);stroke:var(--panel);stroke-width:2}
html.dashboard-v2 .collection-point-halo{fill:var(--green)}
html.dashboard-v2 .collection-focus-guide{stroke:var(--green)}
html.dashboard-v2 .collection-target{stroke:var(--blue);opacity:.9}
html.dashboard-v2 .collection-target-label{fill:var(--blue);stroke:var(--panel)}
html.dashboard-v2 .collection-trend-period.is-warning .collection-point{fill:var(--yellow);stroke:var(--warning-bg)}
html.dashboard-v2 .collection-trend-period.is-warning .collection-point-halo{fill:var(--yellow)}
html.dashboard-v2 :is(#collectionTrendArea,#historyTrendPlotArea) stop{stop-color:var(--green)}
html.dashboard-v2 :is(#collectionTrendArea,#historyTrendPlotArea) stop:first-child{stop-opacity:.14}
html.dashboard-v2 .collection-gridline{stroke:var(--chart-grid)}
html.dashboard-v2 .collection-value{fill:var(--text);stroke:var(--panel)}
html.dashboard-v2 #collectionTrendCard .legend>span:before{background:var(--green)}
html.dashboard-v2 #collectionTrendCard .legend>.green:before{background:var(--blue)}
html.dashboard-v2 :is(.mini-tabs,.ops-tabs,.finance-tabs,.budget-view-tabs,.budget-metric-tabs){background:var(--summary-surface);border-color:var(--line);border-radius:7px}
html.dashboard-v2 :is(.mini-tabs button.active,.ops-tabs button.active,.finance-tabs button[aria-pressed=true],.budget-view-tabs button.active,.budget-metric-tabs button.active,.fee-chip.active,.ops-warning-types .active){background:var(--selected);color:var(--cyan);border-color:var(--control-line)}
html.dashboard-v2 :is(.finance-metrics,.budget-kpis,.ops-summary){background:var(--summary-surface);border-radius:10px}
html.dashboard-v2 #financeIncome{color:var(--green)}
html.dashboard-v2 #financeBalance{color:var(--blue)}
html.dashboard-v2 .finance-chart{background:repeating-linear-gradient(to top,transparent 0,transparent 51px,var(--chart-grid) 52px,var(--chart-grid) 53px);border-color:var(--line)}
html.dashboard-v2 :is(.finance-chart-legend i,.finance-chart .column-bars i,.finance-category .category-track i){background:var(--green)}
html.dashboard-v2 :is(.finance-chart-legend .expense,.finance-chart .column-bars .expense,.finance-category.expense .category-track i){background:var(--yellow)}
html.dashboard-v2 .finance-chart .column-bars .planned{background:var(--success-bg);border-color:var(--green)}
html.dashboard-v2 .finance-chart .column-bars .expense.planned{background:var(--warning-bg);border-color:var(--yellow)}
html.dashboard-v2 .finance-chart-legend i.plan{background:transparent;border:1px dashed var(--muted)}
html.dashboard-v2 .finance-chart button:hover{background:var(--surface-hover);outline-color:var(--cyan)}
html.dashboard-v2 .ops-trend-svg>path{stroke:var(--cyan)}
html.dashboard-v2 .ops-trend-svg>line{stroke:var(--chart-grid)}
html.dashboard-v2 .ops-trend-svg text{fill:var(--muted)}
html.dashboard-v2 .ops-trend-svg g circle:last-child{fill:var(--cyan);stroke:var(--panel)}
html.dashboard-v2 :is(.data-table th,.finance-table th,.budget-table th,.ops-table th,.modal-card th){background:var(--table-head);color:var(--text);border-color:var(--line-soft)}
html.dashboard-v2 :is(.data-table,.finance-table,.budget-table,.ops-table,.modal-card table) tbody tr:nth-child(even){background:var(--zebra)}
html.dashboard-v2 :is(.data-table,.finance-table,.budget-table,.ops-table,.modal-card table) tbody tr:hover{background:var(--surface-hover)}
html.dashboard-v2 :is(.data-table tfoot td,.finance-table tfoot td,.budget-table tfoot td,.ops-table tfoot td,.ops-table .ops-total td){background:var(--selected);border-color:var(--control-line);color:var(--text)}
html.dashboard-v2 .detail-table-wrap .data-table tbody td:nth-child(4){color:var(--green)}
html.dashboard-v2 :is(.empty-state,.badge.warn,.pill.warn,.budget-status.warn,.ops-amber){background:var(--warning-bg);color:var(--yellow);border-color:var(--yellow)}
html.dashboard-v2 :is(.hover-tip,.toast){background:var(--tip-bg);border-color:var(--control-line);color:var(--text);box-shadow:0 10px 25px #06122060}
@media(max-width:760px){
 html.dashboard-v2 .v2-sidebar{background:transparent}
 html.dashboard-v2 .v2-nav{background:var(--v2-nav-bg);border-color:var(--line);box-shadow:0 -6px 20px #06122040}
 html.dashboard-v2 .v2-nav button[aria-current=page]{background:var(--selected);color:var(--cyan)}
}

/* Page-specific filters share the existing query controls and their visual scale. */
html.dashboard-v2 .filter-fields{grid-template-columns:repeat(auto-fit,minmax(190px,1fr))}
html.dashboard-v2 .filter-fields .field,
html.dashboard-v2 .filter-fields .field:first-child,
html.dashboard-v2 .filter-fields .amount-unit-field{grid-column:auto;grid-row:auto}
html.dashboard-v2 .filter-fields .field[hidden]{display:none!important}
html.dashboard-v2 .filter-fields .v2-page-field{order:-1}
html.dashboard-v2 .filter-fields .amount-unit-field{order:2}
html.dashboard-v2 .finance-controls,
html.dashboard-v2 .budget-toolbar,
html.dashboard-v2 .ops-toolbar:has([aria-label="统计层级"]){display:none}
@media(max-width:760px){
 html.dashboard-v2 .filter-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
 html.dashboard-v2 .filter-fields .date-field{grid-column:1/-1}
}

/* Collection: foundation fields above a consistent matrix of rates and amounts. */
html.dashboard-v2 #collectionMetrics{padding:12px;align-self:stretch}
html.dashboard-v2 #collectionMetrics .collection-metrics-toolbar{display:flex;align-items:baseline;flex-wrap:wrap;gap:4px 12px;min-height:0;margin:0 0 8px}
html.dashboard-v2 #collectionMetrics .collection-metrics-toolbar h2{flex:none;margin:0}
html.dashboard-v2 #collectionMetrics .collection-metrics-toolbar p{flex:none;order:0;margin:0;font-size:12px;line-height:1.5}
html.dashboard-v2 .collection-metrics-unit{margin-left:auto;color:var(--muted);font-size:12px;white-space:nowrap}
html.dashboard-v2 #collectionMetrics .collection-metrics-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:8px;align-items:stretch}
html.dashboard-v2 #collectionMetrics .collection-metric-group{grid-column:span 2;display:flex;flex-direction:column;gap:0;min-width:0;padding:0;border:1px solid var(--line);border-radius:8px;background:var(--panel2)}
html.dashboard-v2 #collectionMetrics .collection-metric-group header{display:grid;grid-template-columns:minmax(0,1fr) auto 24px;align-items:center;gap:8px;min-height:40px;padding:4px 10px;background:transparent;border-bottom:1px solid var(--line-soft)}
html.dashboard-v2 #collectionMetrics .collection-metric-group h3{grid-column:1;grid-row:1;margin:0;font-size:14px;line-height:1.5;font-weight:600;white-space:nowrap}
html.dashboard-v2 #collectionMetrics .collection-metric-help{grid-column:3;grid-row:1;width:24px;height:24px;padding:4px;flex:none}
html.dashboard-v2 #collectionMetrics .collection-metric-rate{position:static;grid-column:2;grid-row:1;display:inline-flex;align-items:baseline;justify-content:flex-end;gap:2px;inset:auto;font-size:26px;line-height:1.15;letter-spacing:-.02em;white-space:nowrap}
html.dashboard-v2 #collectionMetrics .collection-metric-rate small{font-size:12px;line-height:1;font-weight:500}
html.dashboard-v2 #collectionMetrics .collection-metric-body{flex:1;min-width:0;container-type:normal}
html.dashboard-v2 #collectionMetrics .collection-metric-body dl{display:grid;grid-template-columns:minmax(0,1fr);grid-auto-rows:1fr;height:100%;margin:0}
html.dashboard-v2 #collectionMetrics .collection-metric-part{display:grid;grid-template-columns:minmax(0,1fr) max-content;grid-template-rows:auto;align-items:center;gap:8px;min-height:32px;padding:4px 10px}
html.dashboard-v2 #collectionMetrics .collection-metric-part+.collection-metric-part{border-left:0;border-top:1px solid var(--line-soft)}
html.dashboard-v2 #collectionMetrics .collection-metric-part dt{display:flex;flex-direction:row;align-items:center;justify-content:flex-start;gap:2px;min-width:0;font-size:12px;line-height:1.35;text-align:left}
html.dashboard-v2 #collectionMetrics .collection-metric-part dt>span{min-width:0}
html.dashboard-v2 #collectionMetrics .collection-metric-part dt small{display:block;font-size:12px;line-height:1.35}
html.dashboard-v2 #collectionMetrics .collection-metric-part dd{display:block;min-width:0;margin:0;text-align:right}
html.dashboard-v2 #collectionMetrics .collection-metric-part dd b{font-size:18px;line-height:1.3;letter-spacing:0;font-weight:650;white-space:nowrap}
html.dashboard-v2 #collectionMetrics .collection-metric-part dd>span:not([data-amount-unit-label]){margin-left:4px;font-size:12px}
html.dashboard-v2 #collectionMetrics :is(.collection-metric-part dd,.collection-metric-amount)>[data-amount-unit-label]{display:inline-block;margin-left:4px;color:var(--muted);font-size:12px;font-weight:400;line-height:1.4;white-space:nowrap}
html.dashboard-v2 #collectionMetrics .collection-foundation{grid-column:span 3;--metric-color:var(--blue);background:transparent;border-color:var(--line-soft)}
html.dashboard-v2 #collectionMetrics .collection-metrics-grid:not(:has(.collection-foundation:not([hidden]) ~ .collection-foundation:not([hidden]))) .collection-foundation{grid-column:1/-1}
html.dashboard-v2 #collectionMetrics .collection-foundation header{grid-template-columns:minmax(0,1fr) 24px;min-height:32px;padding:4px 10px;border:0}
html.dashboard-v2 #collectionMetrics .collection-foundation header .collection-metric-help{grid-column:2}
html.dashboard-v2 #collectionMetrics .collection-foundation .collection-metric-body dl{grid-template-columns:repeat(2,minmax(0,1fr));height:auto;padding:0 0 6px}
html.dashboard-v2 #collectionMetrics [data-collection-metric=household_summary] .collection-metric-body dl{grid-template-columns:repeat(3,minmax(0,1fr))}
html.dashboard-v2 #collectionMetrics .collection-foundation .collection-metric-part{display:flex;flex-direction:column;align-items:stretch;gap:0;min-height:0;padding:0 10px}
html.dashboard-v2 #collectionMetrics .collection-foundation .collection-metric-part+.collection-metric-part{border-top:0;border-left:1px solid var(--line-soft)}
html.dashboard-v2 #collectionMetrics .collection-foundation .collection-metric-part dd{text-align:left}
html.dashboard-v2 #collectionMetrics .collection-metric-debt-note{padding:6px 10px 0;margin:0;font-size:12px;line-height:1.5;text-align:left}
html.dashboard-v2 #collectionMetrics .collection-metric-amount{display:flex;align-items:baseline;justify-content:flex-end;margin-top:auto;padding:4px 10px 8px}
html.dashboard-v2 #collectionMetrics .collection-metric-amount b{font-size:24px;line-height:1.3;letter-spacing:0;white-space:nowrap}
@media(min-width:1280px){
 html.dashboard-v2 #collectionMetrics .collection-foundation{display:grid;grid-template-columns:104px minmax(0,1fr);align-items:center}
 html.dashboard-v2 #collectionMetrics .collection-foundation header{height:100%;gap:4px;padding:6px 8px;border-right:1px solid var(--line-soft)}
 html.dashboard-v2 #collectionMetrics .collection-foundation .collection-metric-body dl{padding:6px 0}
}
@media(max-width:1200px){html.dashboard-v2 #collectionMetrics .collection-metric-group{grid-column:span 3}}
@media(max-width:760px){
 html.dashboard-v2 #collectionMetrics{padding:12px}
 html.dashboard-v2 #collectionMetrics .collection-metrics-grid{gap:8px}
 html.dashboard-v2 #collectionMetrics .collection-metric-group{grid-column:1/-1}
 html.dashboard-v2 #collectionMetrics .collection-metrics-toolbar p{order:1;flex-basis:100%}
 html.dashboard-v2 #collectionMetrics [data-collection-metric=basic_data] .collection-metric-body dl{grid-template-columns:minmax(0,1fr);padding-bottom:0}
 html.dashboard-v2 #collectionMetrics [data-collection-metric=basic_data] .collection-metric-part{display:grid;grid-template-columns:minmax(0,1fr) max-content;align-items:center;gap:8px;padding:4px 10px}
 html.dashboard-v2 #collectionMetrics [data-collection-metric=basic_data] .collection-metric-part+.collection-metric-part{border-left:0;border-top:1px solid var(--line-soft)}
 html.dashboard-v2 #collectionMetrics [data-collection-metric=basic_data] .collection-metric-part dd{text-align:right}
}
@media(max-width:360px){
 html.dashboard-v2 #collectionMetrics .collection-metric-group header{gap:4px;padding:4px 8px}
 html.dashboard-v2 #collectionMetrics .collection-metric-part{padding:4px 8px}
 html.dashboard-v2 #collectionMetrics .collection-metric-part dd b{font-size:16px}
 html.dashboard-v2 #collectionMetrics .collection-metric-rate{font-size:26px}
 html.dashboard-v2 #collectionMetrics .collection-foundation .collection-metric-part{padding:0 8px}
}
@media(pointer:coarse){html.dashboard-v2 #collectionMetrics .collection-metric-help{width:28px;height:28px;padding:6px}}

/* The full query floats above the page without changing the filter bar height. */
html.dashboard-v2 #querySummary{cursor:help;border-radius:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-height:none}
html.dashboard-v2 #querySummary:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
html.dashboard-v2 #querySummaryTooltip{position:fixed;inset:auto;margin:0;width:min(520px,calc(100vw - 24px));max-height:520px;overflow:auto;overscroll-behavior:contain;padding:12px 14px;border:1px solid var(--control-line);border-radius:8px;background:var(--panel);color:var(--text);box-shadow:0 10px 28px #00000040;font-size:13px;line-height:1.7;text-align:left;overflow-wrap:anywhere}
html.dashboard-v2 #querySummaryTooltip::backdrop{background:transparent;pointer-events:none}
html.dashboard-v2 #querySummaryTooltip strong{display:block;margin-bottom:6px;color:var(--cyan);font-size:14px;font-weight:600}
html.dashboard-v2 #querySummaryTooltip>div{white-space:pre-line}

/* Historical rates use the same ocean surfaces, chart colors and compact controls. */
html.dashboard-v2 #collectionTrendCard .card-head{display:block;min-width:0;min-height:0;padding:0 0 6px}
html.dashboard-v2 .collection-trend-topline{display:flex;align-items:center;gap:12px;min-width:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:var(--control-line) transparent;overscroll-behavior-x:contain}
html.dashboard-v2 #collectionTrendCard .card-title{flex:1 0 auto;white-space:nowrap}
html.dashboard-v2 #collectionTrendSubtitle{min-width:0;margin-top:2px;line-height:1.4}
html.dashboard-v2 #collectionTrendCard .legend{flex:0 0 auto;flex-wrap:nowrap;white-space:nowrap}
html.dashboard-v2 #collectionTrendAll{flex:0 0 auto;padding:0 10px;height:36px;font-size:13px}
html.dashboard-v2 #collectionTrendCard .collection-trend-stats{grid-template-columns:1.25fr 1fr 1fr;padding:0 0 2px}
html.dashboard-v2 #collectionTrendCard .collection-trend-stats>div{flex-direction:row;align-items:baseline;justify-content:flex-start;gap:12px;padding:0 16px}
html.dashboard-v2 #collectionTrendCard .collection-trend-stats>div:first-child{padding-left:0}
html.dashboard-v2 #collectionTrendCard .collection-trend-stats strong{font-size:20px;line-height:1.2;white-space:nowrap}
html.dashboard-v2 #collectionTrendCard .collection-trend-stats>div:first-child strong{font-size:26px}
html.dashboard-v2 #collectionTrendCard .collection-trend-insight{margin-top:4px;gap:4px 12px;line-height:1.4}
html.dashboard-v2 #collectionTrendPlot .collection-trend-empty{min-height:160px;padding:12px}
html.dashboard-v2 #collectionTrendPlot .chart-scroll-note{margin:4px 0 0;line-height:1.4}
html.dashboard-v2 #companyProjectOverview>div{gap:2px;padding:0 12px}
html.dashboard-v2 #companyProjectOverview>div:first-child{padding-left:0}
html.dashboard-v2 #companyProjectOverview>div:first-child strong{font-size:26px}
@media(max-width:999px){
 html.dashboard-v2 #collectionTrendCard .collection-trend-stats>div{flex-direction:column;gap:2px;padding:0 8px}
 html.dashboard-v2 #collectionTrendCard .collection-trend-stats>div:first-child{padding-left:0}
 html.dashboard-v2 #collectionTrendCard .collection-trend-stats>div>span{font-size:12px;line-height:1.4}
 html.dashboard-v2 #collectionTrendCard .collection-trend-stats>div:first-child strong{font-size:24px}
}
html.dashboard-v2 .collection-history-dialog{width:min(1360px,calc(100vw - 48px));max-width:none;max-height:92dvh;margin:auto;padding:0;overflow:hidden;border:1px solid var(--line);border-radius:12px;background:var(--panel);color:var(--text);box-shadow:0 20px 70px #00000055;font-family:inherit}
.collection-history-dialog::backdrop{background:#061320ba}
.collection-history-dialog .history-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line);background:var(--control-bg)}
.collection-history-dialog h2,.collection-history-dialog h3{margin:0;color:var(--text);font-weight:600}
.collection-history-dialog h2{font-size:18px;line-height:1.4}.collection-history-dialog h3{font-size:15px}
.collection-history-dialog .history-actions{display:flex;gap:8px;flex-shrink:0}
html.dashboard-v2 .collection-history-dialog .btn{height:36px;min-height:36px;padding:0 12px;font-size:14px}
.collection-history-dialog .history-body{max-height:calc(92dvh - 72px);overflow:auto;padding:16px 20px 20px;overscroll-behavior:contain}
.collection-history-dialog .history-scope{margin:0 0 14px;color:var(--muted);font-size:12px;line-height:1.7;overflow-wrap:anywhere}
.collection-history-dialog .history-controls{display:grid;grid-template-columns:1.2fr 1fr 1fr 1fr;gap:12px;margin:0}
.collection-history-dialog .history-controls label{display:flex;flex-direction:column;gap:6px;font-size:12px;color:var(--muted);min-width:0}
html.dashboard-v2 .collection-history-dialog .select{width:100%;min-width:0;height:36px;margin:0;font-size:14px;border-radius:6px;padding:0 9px}
.collection-history-dialog .select:disabled{opacity:.7}
.collection-history-dialog .history-note{margin:10px 0 16px;font-size:12px;line-height:1.6;color:var(--muted)}
.collection-history-dialog .history-error{padding:20px;margin:0;background:var(--warning-bg);border-radius:8px;color:var(--yellow);text-align:center;font-size:14px}
.collection-history-dialog .history-summary{display:flex;flex-wrap:wrap;gap:12px 28px;padding:14px 0;border-top:1px solid var(--line-soft);border-bottom:1px solid var(--line-soft);font-size:13px;color:var(--muted)}
.collection-history-dialog .history-summary>span{display:flex;align-items:baseline;gap:7px}
.collection-history-dialog .history-summary b{font-size:20px;color:var(--green);font-variant-numeric:tabular-nums}
.collection-history-dialog .history-summary small{font-size:12px;color:var(--muted)}
.collection-history-dialog .history-summary .history-warning-text{color:var(--yellow)}
.collection-history-dialog .history-chart-heading,.collection-history-dialog .history-table-heading{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:10px;margin:18px 0 8px}
.collection-history-dialog .history-legend{display:flex;align-items:center;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.collection-history-dialog .history-legend span{display:inline-flex;align-items:center;gap:6px}
.collection-history-dialog .history-legend span:before{content:'';width:16px;border-top:2px solid var(--green)}
.collection-history-dialog .history-target-key:before{border-color:var(--blue)!important;border-top-style:dashed!important}
.collection-history-dialog .history-warning-key:before{border-color:var(--yellow)!important;border-top-style:dotted!important}
.collection-history-dialog .collection-warning-line{stroke:var(--yellow);stroke-width:1;stroke-dasharray:2 5;opacity:.8;pointer-events:none}
.collection-history-dialog #historyTrendPlot{width:100%;min-width:0}
.collection-history-dialog .history-period-detail{display:flex;align-items:baseline;gap:7px 20px;flex-wrap:wrap;padding:10px 12px;border-radius:6px;background:var(--summary-surface);font-size:12px;color:var(--muted);line-height:1.7}
.collection-history-dialog .history-period-detail strong{color:var(--text);font-weight:500}
.collection-history-dialog .history-period-detail b{color:var(--green);font-size:15px}
.collection-history-dialog .history-table-heading>span{font-size:12px;color:var(--muted)}
.collection-history-dialog .history-table-wrap{max-height:360px;overflow:auto;border:1px solid var(--line-soft);border-radius:6px;overscroll-behavior:contain}
.collection-history-dialog table{width:100%;min-width:960px;border-collapse:separate;border-spacing:0;font-size:13px;text-align:left;font-variant-numeric:tabular-nums}
.collection-history-dialog th,.collection-history-dialog td{padding:10px 12px;border-bottom:1px solid var(--line-soft);white-space:nowrap}
.collection-history-dialog th{position:sticky;top:0;z-index:1;background:var(--table-head);color:var(--muted);font-size:12px;font-weight:500}
.collection-history-dialog tbody tr:nth-child(even){background:var(--zebra)}
.collection-history-dialog tbody tr:hover{background:var(--surface-hover)}
.collection-history-dialog tbody tr.is-selected{background:var(--selected)}
.collection-history-dialog .history-rate-cell{color:var(--green);font-weight:600}
.collection-history-dialog tfoot td{background:var(--table-head);color:var(--text);font-weight:600;border-bottom:0}
.collection-history-dialog .history-row-button{padding:0;border:0;background:none;color:var(--cyan);font:inherit;cursor:pointer;text-decoration:underline;text-underline-offset:3px}
.collection-history-dialog .history-status{color:var(--text)}
.collection-history-dialog .history-status.is-warning{color:var(--yellow)}
.collection-history-dialog .history-status.is-success{color:var(--green)}
.collection-history-dialog :is(button,select,input,.history-table-wrap):focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
.collection-history-dialog .history-tooltip{position:fixed;z-index:2;max-width:min(360px,calc(100vw - 24px));padding:10px 12px;border:1px solid var(--control-line);border-radius:6px;background:var(--tip-bg);box-shadow:0 8px 22px #00000040;color:var(--text);font-size:13px;line-height:1.7;pointer-events:none}
@media(max-width:760px){
 html.dashboard-v2 .collection-history-dialog{width:calc(100vw - 16px);max-height:94dvh;border-radius:10px}
 .collection-history-dialog .history-header{padding:12px;gap:8px;flex-wrap:wrap}.collection-history-dialog h2{font-size:17px}
 .collection-history-dialog .history-actions{gap:6px}html.dashboard-v2 .collection-history-dialog .btn{padding:0 9px;font-size:13px}
 .collection-history-dialog .history-body{padding:12px;max-height:calc(94dvh - 104px)}
 .collection-history-dialog .history-controls{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
 .collection-history-dialog .history-summary{gap:10px 18px}.collection-history-dialog .history-summary b{font-size:18px}
 .collection-history-dialog .collection-value:not(.is-key){opacity:0}
 .collection-history-dialog .history-legend{gap:10px}.collection-history-dialog .history-table-wrap{max-height:300px}
 .collection-history-dialog .history-period-detail{gap:5px 12px}.collection-history-dialog .history-period-detail strong{flex-basis:100%}
}


html.dashboard-v2 #collectionMetricTooltip{position:fixed;inset:auto;margin:0;width:min(330px,calc(100vw - 24px));max-height:calc(100dvh - 24px);overflow:auto;overscroll-behavior:contain;padding:12px 14px;border:0;border-radius:10px;background:var(--control-bg);color:var(--text);box-shadow:0 12px 32px #07132170;font-size:13px;line-height:1.65;text-align:left;overflow-wrap:anywhere}
html.dashboard-v2 #collectionMetricTooltip::backdrop{background:transparent;pointer-events:none}
html.dashboard-v2 #collectionMetricTooltip>strong{display:block;color:var(--cyan);font-size:14px;font-weight:650;line-height:1.5;margin-bottom:8px}
html.dashboard-v2 #collectionMetricTooltip .metric-help-section{margin:0;white-space:pre-line}
html.dashboard-v2 #collectionMetricTooltip .metric-help-section+.metric-help-section{margin-top:8px}
html.dashboard-v2 #collectionMetricTooltip .metric-help-tag{display:inline-block;margin-right:6px;padding:0 5px;border-radius:3px;background:var(--selected);color:var(--cyan);font-size:11px;font-weight:600;line-height:1.7;vertical-align:1px;white-space:nowrap}
html.dashboard-v2 #collectionMetricTooltip .formula{color:var(--green)}
html.dashboard-v2 #collectionMetricTooltip .formula .metric-help-tag{background:var(--success-bg);color:var(--green)}
html.dashboard-v2 #collectionMetricTooltip .example{color:var(--yellow)}
html.dashboard-v2 #collectionMetricTooltip :is(.example,.pending) .metric-help-tag{background:var(--warning-bg);color:var(--yellow)}

/* The group scope stays visible while detail inspection uses the same snapshot. */
html.dashboard-v2 #collectionMetrics .collection-metrics-actions{display:flex;align-items:center;gap:12px;margin-left:auto}
html.dashboard-v2 #collectionMetricsDetails{height:36px;padding:0 12px;font-size:13px;white-space:nowrap}
html.dashboard-v2 #collectionMetrics .collection-metrics-note{margin:6px 0 0;color:var(--muted);font-size:12px;line-height:1.6}
.collection-metrics-dialog .metrics-list-controls{display:grid;grid-template-columns:1fr 2fr 100px;gap:12px}
.collection-metrics-dialog .metrics-list-controls label{display:flex;flex-direction:column;gap:6px;min-width:0;color:var(--muted);font-size:12px}
.collection-metrics-dialog table{min-width:880px}
.collection-metrics-dialog :is(td,th):nth-child(n+4){text-align:right}
.collection-metrics-dialog .metrics-company{display:block;margin-top:4px;color:var(--muted);font-size:12px}
.collection-metrics-dialog .metrics-no-results{text-align:center;padding:36px 12px;color:var(--muted)}
.collection-metrics-dialog .metrics-project-heading{display:flex;align-items:flex-start;gap:16px;margin-bottom:16px}
.collection-metrics-dialog .metrics-project-heading p{font-size:12px;color:var(--muted);margin:6px 0 0}
.collection-metrics-dialog .metrics-project-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.collection-metrics-dialog .metrics-project-groups section{min-width:0;padding:12px;background:var(--panel2);border-radius:8px}
.collection-metrics-dialog .metrics-project-groups h4{margin:0 0 8px;font-size:14px;color:var(--text)}
.collection-metrics-dialog .metrics-project-groups dl{margin:0}
.collection-metrics-dialog .metrics-project-groups dl>div{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:12px;padding:8px 0;border-top:1px solid var(--line-soft)}
.collection-metrics-dialog .metrics-project-groups dt{color:var(--muted);font-size:12px;line-height:1.6}
.collection-metrics-dialog .metrics-project-groups dd{margin:0;font-size:16px;text-align:right;font-variant-numeric:tabular-nums;white-space:nowrap}
.collection-metrics-dialog .metrics-project-groups small{font-size:12px;color:var(--muted)}
.collection-metrics-dialog .metrics-rate{color:var(--green)}
@media(max-width:760px){
 html.dashboard-v2 #collectionMetrics .collection-metrics-actions{gap:8px;flex-wrap:wrap;min-width:0;max-width:100%}
 .collection-metrics-dialog .metrics-list-controls{grid-template-columns:minmax(0,1fr) 90px}
 .collection-metrics-dialog .metrics-list-controls label:nth-child(2){grid-column:1/-1;grid-row:2}
 .collection-metrics-dialog .metrics-project-groups{grid-template-columns:minmax(0,1fr)}
 .collection-metrics-dialog .metrics-project-heading{flex-wrap:wrap;gap:12px}
 .collection-metrics-dialog .history-actions{width:100%;justify-content:flex-end}
}

/* Omit passive report notes; keep data scope, validation and requested help. */
html.dashboard-v2 :is(
 .report-note,
 #companyProjectHint,
 .project-preview-group-head > small,
 #projectFeePanel > .card-head > .card-sub,
 #financeCard .finance-caption > .pill,
 #financeChartNote,
 #financeTableNote,
 #financeFootnote,
 #budgetWindowHint,
 #metricsDataNote,
 #historyCoverage,
 #historyRowCount,
 .chart-scroll-note
){display:none!important}

/* Data entry stays accessible from analysis and compact mobile filters. */
.business-management-link{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:12px;color:var(--cyan);text-decoration:none;border:1px solid var(--line);border-radius:6px;background:var(--selected);font-size:14px;margin-bottom:10px}
html.dashboard-v2 .business-entry{display:inline-flex;align-items:center;justify-content:center;text-decoration:none;white-space:nowrap}
html.dashboard-v2 .business-mobile-entry{display:none}
.business-management-link:focus-visible,.business-entry:focus-visible{outline:2px solid var(--cyan);outline-offset:3px}
@media(max-width:760px){html.dashboard-v2 .business-mobile-entry{display:inline-flex}html.dashboard-v2 .filters .filter-actions{flex-wrap:wrap;gap:6px;justify-content:flex-end}html.dashboard-v2 .filter-actions .business-mobile-entry{height:32px;font-size:12px;padding:0 8px}}

/* Project fee paging and the summary of all filtered projects. */
html.dashboard-v2 .project-fee-pagination{display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:14px 0 0;color:var(--muted);font-size:13px}
.project-fee-pagination #feePageInfo{font-variant-numeric:tabular-nums}
.fee-page-controls,.fee-page-controls>label,.fee-page-buttons,.fee-page-jump,.fee-page-jump>label{display:flex;align-items:center;gap:8px}
.fee-page-controls{flex-wrap:wrap;gap:10px 16px}
html.dashboard-v2 .project-fee-pagination :is(select,input){box-sizing:border-box;height:34px;border:1px solid var(--control-line);border-radius:5px;background:var(--control-bg);color:var(--text);font:inherit;padding:0 8px}
.project-fee-pagination select{width:82px}.project-fee-pagination input{width:62px}.fee-page-buttons>span{min-width:64px;text-align:center;font-variant-numeric:tabular-nums}
html.dashboard-v2 .project-fee-pagination .btn{min-height:34px;padding:5px 10px;font-size:13px}
.project-fee-pagination :is(button,select,input):focus-visible{outline:2px solid var(--cyan);outline-offset:2px}
html.dashboard-v2 .project-fee-pagination :disabled{opacity:.45;cursor:not-allowed}
html.dashboard-v2 .fee-list-empty{text-align:center!important;padding:36px;color:var(--muted)}
html.dashboard-v2 #projectFeeTable #projectFeeSummary :is(th,td){background:var(--selected);border-top:1px solid var(--control-line);border-bottom:0;color:var(--text);font-weight:650}
html.dashboard-v2 #projectFeeSummary th{text-align:left;white-space:nowrap}
html.dashboard-v2 #projectFeeSummary th small{display:block;color:var(--muted);font-size:12px;font-weight:400;margin-top:2px}
html.dashboard-v2 #projectFeeSummary td{text-align:right;white-space:nowrap}
html.dashboard-v2 #projectFeeTable #projectFeeSummary :is(.fee-summary-received,.up){color:var(--green)}
html.dashboard-v2 #projectFeeTable #projectFeeSummary :is(.fee-summary-arrears,.fee-summary-warning){color:var(--yellow)}
html.dashboard-v2 #projectFeeTable #projectFeeSummary .down{color:var(--red)}
html.dashboard-v2 #projectFeeTable #projectFeeSummary .muted{color:var(--muted)}
@media(max-width:760px){
 html.dashboard-v2 .project-fee-pagination{gap:10px}.fee-page-controls{gap:10px;width:100%;justify-content:space-between}.fee-page-controls .fee-page-jump{margin-left:auto}
 html.dashboard-v2 .project-fee-pagination :is(select,input,.btn){min-height:40px}
}


/* Collection metrics and their fee composition share a single detail dialog. */
.collection-metrics-dialog .metrics-view-tabs{display:flex;gap:4px;border-bottom:1px solid var(--line);margin-bottom:14px}
.collection-metrics-dialog .metrics-view-tabs button{padding:10px 16px;background:transparent;border:0;border-bottom:2px solid transparent;color:var(--muted);font:inherit;cursor:pointer}
.collection-metrics-dialog .metrics-view-tabs button[aria-selected=true]{color:var(--cyan);border-bottom-color:var(--cyan);font-weight:600}
.collection-metrics-dialog .metrics-fee-subtotal td{background:var(--summary-surface);font-weight:600}
.collection-metrics-dialog #metricsFeeTable{min-width:1180px}
.collection-metrics-dialog #metricsFeeTable th:nth-child(n+3),.collection-metrics-dialog #metricsFeeTable td:nth-child(n+3){text-align:right;white-space:nowrap}
.collection-metrics-dialog #metricsFeeTable :is(td,th):nth-child(-n+2){text-align:left}
.collection-metrics-dialog .metrics-list-controls{margin-bottom:12px;grid-template-columns:1fr 2fr 100px}
.collection-metrics-dialog .history-actions{flex-wrap:wrap}
.collection-metrics-dialog .history-body:has(#metricsProjectView:not([hidden])) .metrics-list-controls{display:flex;justify-content:flex-end}
.collection-metrics-dialog .history-body:has(#metricsFeeView:not([hidden])) .metrics-list-controls{grid-template-columns:minmax(0,1fr) 100px}
@media(max-width:760px){
 .collection-metrics-dialog .history-actions{justify-content:flex-start}
 .collection-metrics-dialog .metrics-list-controls{grid-template-columns:minmax(0,1fr) 90px}
 .collection-metrics-dialog .metrics-list-controls label:nth-child(2){grid-column:1/-1;grid-row:2}
 .collection-metrics-dialog .history-body:has(#metricsFeeView:not([hidden])) .metrics-list-controls{grid-template-columns:minmax(0,1fr) 90px}
 .collection-metrics-dialog .history-body:has(#metricsFeeView:not([hidden])) #metricsSearchField{grid-column:1;grid-row:1}
}

.collection-history-dialog.collection-metrics-dialog[open]{display:flex;flex-direction:column}
.collection-metrics-dialog .history-header{flex-shrink:0}
.collection-metrics-dialog .history-body{min-height:0;max-height:none;overflow:auto}

/* Household columns use community-level counts and share numeric alignment. */
html.dashboard-v2 #projectFeeTable :is(thead th:nth-child(n+9),[data-households]){text-align:right;white-space:nowrap;font-variant-numeric:tabular-nums}
