/* CK Metrics Budget refinement — Sept. 1, 2026 */

/* Empty means empty: don't leave the KPI grid occupying space. */
#metricGrid[hidden],.metric-grid[hidden]{display:none!important}

/* One clean Category Detail panel. The KPI row + Spending Overview already carry status totals. */
#scopeDetailPanel .panel-head h2{letter-spacing:-.25px}
#scopeBudgetStatus{display:none!important}
.scope-budget-cards{display:none!important}
.scope-detail-section{margin-top:0!important}
.scope-detail-section>.detail-section-title:first-child{display:none!important}
.scope-detail-section+.scope-detail-section{margin-top:18px;padding-top:18px!important;border-top:1px solid #e5edef!important}
.scope-central-section{background:transparent!important;border:0!important;border-radius:0!important;padding:0!important}
.scope-central-section .detail-section-title{margin-top:0!important}
.scope-category-wrap{margin-top:4px}

/* Budget period control mirrors Attendance's Year / Period rhythm. */
.budget-period-control{display:flex;flex-direction:column;gap:3px;min-width:146px}
.budget-period-control>span{padding-left:2px;font-size:8px;font-weight:900;letter-spacing:.07em;text-transform:uppercase;color:#82949d}
.budget-period-control .year-select{height:46px;min-width:146px;border-radius:10px;background-color:#fff}

/* Use the established campus identity colors in comparison views. */
.scope-campus-row.budget-colored-row{cursor:help}
.budget-campus-dot{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--budget-row-color);margin-right:7px;vertical-align:1px;box-shadow:0 0 0 2px color-mix(in srgb,var(--budget-row-color) 14%,white)}
.budget-colored-row .combined-bar .actual-layer,.budget-colored-row .combined-bar .bar-fill.spent{background:var(--budget-row-color)!important}
.budget-colored-row .combined-bar .pace-layer,.budget-colored-row .combined-bar .bar-fill.pace{background:color-mix(in srgb,var(--budget-row-color) 38%,white)!important}
.budget-colored-row[data-budget-overview="Central"]{background:linear-gradient(90deg,rgba(23,60,81,.035),transparent 42%)}
.budget-colored-row[data-budget-overview="Central"] .scope-campus-name{color:#173c51}

/* Category tables should stay in their cards instead of spilling past the right edge. */
.scope-category-table{width:100%;min-width:0!important;table-layout:fixed}
.scope-category-table .cat-row,.scope-category-table .cat-row.closed-cat{grid-template-columns:minmax(135px,1.2fr) minmax(120px,1.25fr) repeat(4,minmax(66px,.62fr))!important;min-width:0!important;width:100%;gap:7px!important}
.scope-category-table .cat-row>div{min-width:0}
.scope-category-table .cat-name{overflow-wrap:anywhere}
.scope-category-table .num{overflow:hidden;text-overflow:ellipsis}

/* Comparison header can now include Central, while the donut remains campus-only. */
.scope-campus-name{display:flex;align-items:center;min-width:0}
.budget-efficiency-panel[hidden]{display:none!important}

@media(max-width:1180px){
  .budget-period-control{min-width:138px}
  .budget-period-control .year-select{min-width:138px}
}
@media(max-width:820px){
  .budget-period-control{min-width:150px}
  .budget-period-control .year-select{min-width:150px;max-width:none}
}
@media(max-width:590px){
  .budget-period-control{width:100%}
  .budget-period-control .year-select{width:100%;max-width:none}
  .scope-category-table .cat-row,.scope-category-table .cat-row.closed-cat{grid-template-columns:1fr 1fr!important}
}
