/* 商务财务卡片限制网格宽度，小屏保留可见的保存入口。 */
.project-page:has([data-reserve-save], .project-finance-details) { grid-template-columns:minmax(0,1fr); min-width:0; }
.project-page:has([data-reserve-save], .project-finance-details)>* { min-width:0; }
.project-page:has([data-reserve-save], .project-finance-details) .project-tabs-shell { min-width:0; overflow:hidden; }
.project-page:has([data-reserve-save], .project-finance-details) .tabs { max-width:100%; overflow-x:auto; }
.project-page:has([data-reserve-save], .project-finance-details) .detail-section-body { min-width:0; }
.project-page:has([data-reserve-save], .project-finance-details) .detail-section-head>div:first-child { flex:1; min-width:0; }
.project-page:has([data-reserve-save], .project-finance-details) .detail-section-head h3 { max-width:none; white-space:normal; overflow:visible; }
.project-page:has([data-reserve-save], .project-finance-details) .detail-section-actions { flex:0 0 auto; width:auto; }
.reserve-management,.reserve-ledger,.reserve-modal { min-width:0; }
.reserve-management .table-shell,.reserve-ledger .table-shell { max-width:100%; overflow:auto; }
.reserve-management table { min-width:760px; }
.reserve-ledger { margin-top:18px; border-top:1px solid #e4edf8; padding-top:14px; }
.reserve-ledger summary { cursor:pointer; color:#526780; margin-bottom:12px; }
.reserve-ledger table { min-width:660px; }
.reserve-empty { margin-top:14px; padding:22px 8px; }
.finance-page:has(.reserve-management) { grid-template-columns:minmax(0,1fr); }
.finance-page:has(.reserve-management)>* { min-width:0; }
@media(max-width:720px) {
  .project-page:has([data-reserve-save], .project-finance-details) .detail-meta .tag { white-space:normal; }
  .project-page:has([data-reserve-save], .project-finance-details) .detail-section-head { flex-wrap:wrap; }
  .project-page:has([data-reserve-save], .project-finance-details) .grid.cols-2 { grid-template-columns:minmax(0,1fr); }
  .detail-section:has([data-reserve-save])>.detail-section-head { flex-wrap:wrap !important; }
  .detail-section:has([data-reserve-save])>.detail-section-head>div:first-child { flex:1 1 100%; }
  .detail-section:has([data-reserve-save]) .detail-section-actions { flex:1 1 100%; flex-wrap:wrap; width:100%; }
  .reserve-modal .grid.cols-2 { grid-template-columns:minmax(0,1fr); }
}

/* 统一财务页的费用表只在卡片内滚动。 */
.project-finance-details { min-width:0; }
.project-finance-details .table-shell { max-width:100%; min-width:0; overflow-x:auto; }
.project-finance-details .grid.cols-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
@media(max-width:720px) { .project-finance-details .grid.cols-3 { grid-template-columns:minmax(0,1fr); } }
