/* Scoped layouts for everyday portal pages; preview and administration stay independent. */
html body.template-saas .saas-app :is(.catalog-workspace,.task-workspace,.account-planhome,.invoice-workspace,.notification-workspace) {
  width:100%!important; max-width:1320px!important; min-width:0!important;
  margin:0 auto!important; padding:20px!important; box-sizing:border-box!important;
}
html body.template-saas .saas-app :is(.catalog-workspace,.task-workspace,.account-planhome,.invoice-workspace,.notification-workspace) h1 {font-size:26px!important;line-height:1.25!important;font-weight:650!important;letter-spacing:-.4px!important;}
html body.template-saas .saas-app :is(.catalog-workspace,.task-workspace,.account-planhome,.invoice-workspace,.notification-workspace) h2 {font-size:18px!important;line-height:1.35!important;font-weight:650!important;}
html body.template-saas .saas-app :is(.catalog-hero,.task-hero,.account-hero,.notification-workspace .ops-hero) {gap:16px!important;min-height:0!important;}
html body.template-saas .saas-app :is(.catalog-hero,.task-hero,.account-hero,.notification-workspace .ops-hero) .auth-note {font-size:13px!important;line-height:1.6!important;max-width:72ch!important;}
html body.template-saas .saas-app :is(.task-section,.task-card,.catalog-table-card,.account-panel,.notification-workspace .portal-overview-panel) {border:1px solid #dce4e9!important;border-radius:6px!important;box-shadow:none!important;min-width:0!important;}
html body.template-saas .saas-app .task-focus {background:#eef6fa!important;color:#203746!important;padding:16px!important;border:1px solid #d5e6ef!important;}
html body.template-saas .saas-app .task-focus span {color:#196385!important;font-size:11px!important;}
html body.template-saas .saas-app .task-focus strong {font-size:17px!important;font-weight:600!important;line-height:1.4!important;}
html body.template-saas .saas-app .cp264-explanation {border:1px solid #dce4e9;border-radius:6px;background:#fff;margin:12px 0;padding:0 14px;min-width:0;}
html body.template-saas .saas-app .cp264-explanation > summary {cursor:pointer;padding:12px 0;min-height:44px;box-sizing:border-box;font-size:13px;font-weight:600;line-height:1.5;color:#224f68;}
html body.template-saas .saas-app .cp264-explanation:not([open]) > :not(summary) {display:none!important;}
html body.template-saas .saas-app .cp264-jump {display:flex;flex-wrap:wrap;gap:8px;margin:12px 0 16px;}
html body.template-saas .saas-app .cp264-jump a {display:inline-flex;align-items:center;min-height:44px;padding:8px 12px;border:1px solid #d4e1e9;border-radius:4px;background:white;color:#225671;font-size:13px;font-weight:600;text-decoration:none;}
html body.template-saas .saas-app .task-section[id] {scroll-margin-top:76px;}
html body.template-saas .saas-app .catalog-workspace [hidden] {display:none!important;}
html body.template-saas:has(.minimal-projects) .cp-global-savebar:not(.is-dirty):not(.is-saving) {display:none!important;}
html body.template-saas .saas-app .cp264-filter-options {grid-column:1/-1;min-width:0;border:1px solid #dce4e9;border-radius:4px;padding:0 10px;background:#fff;}
html body.template-saas .saas-app .cp264-filter-options > summary {min-height:44px;box-sizing:border-box;padding:12px 0;font-size:13px;font-weight:600;cursor:pointer;color:#225671;}
html body.template-saas .saas-app .cp264-filter-options:not([open]) > :not(summary) {display:none!important;}
html body.template-saas .saas-app .cp264-filter-options label {margin:8px 0!important;}
html body.template-saas .saas-app :is(.account-planhome,.invoice-workspace) .account-plan-card {min-height:0!important;height:auto!important;padding:12px!important;gap:5px!important;}
html body.template-saas .saas-app :is(.account-planhome,.invoice-workspace) .account-plan-card strong {font-size:18px!important;line-height:1.4!important;}
html body.template-saas .saas-app [data-catalog-empty] {padding:18px;background:#f2f7fa;border:1px solid #d8e5ed;border-radius:4px;font-size:14px;line-height:1.5;}
html body.template-saas .saas-app :is(.catalog-filterbar,.account-command-strip,.notification-template-panel,.invoice-row-actions,.task-actions,.mp-utility) {flex-wrap:wrap!important;min-width:0!important;}
html body.template-saas .saas-app .catalog-table-wrap {width:100%!important;max-width:100%!important;min-width:0!important;overflow-x:auto!important;}
@media(max-width:1000px){
  html body.template-saas .saas-app :is(.catalog-filterbar,.account-form-grid,.account-layout,.notification-grid,.notification-customer-grid,.catalog-insight-grid) {grid-template-columns:minmax(0,1fr)!important;}
}
@media(max-width:760px){
  html body.template-saas .saas-app :is(.catalog-workspace,.task-workspace,.account-planhome,.invoice-workspace,.notification-workspace) {padding:14px 12px!important;}
  html body.template-saas .saas-app :is(.catalog-hero,.task-hero,.account-hero,.notification-workspace .ops-hero,.invoice-subscription-grid,.invoice-profile-grid,.account-benefit-grid,.account-next-grid,.account-plan-grid,.account-value-grid,.task-grid,.task-list-compact,.catalog-textauto-grid,.notification-workflow-steps) {display:grid!important;grid-template-columns:minmax(0,1fr)!important;}
  html body.template-saas .saas-app :is(.task-kpis,.services-kpis,.account-kpis,.notification-kpi-grid) {display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important;}
  html body.template-saas .saas-app :is(.task-kpis,.services-kpis,.account-kpis,.notification-kpi-grid) article {padding:12px!important;min-width:0!important;}
  html body.template-saas .saas-app :is(.task-kpis,.services-kpis,.account-kpis,.notification-kpi-grid) strong {font-size:23px!important;line-height:1.3!important;}
  html body.template-saas .saas-app :is(.catalog-workspace,.task-workspace,.account-planhome,.invoice-workspace,.notification-workspace,.minimal-projects) :is(p,small,strong,span,code,a) {overflow-wrap:anywhere;}
  html body.template-saas .saas-app :is(.catalog-workspace,.task-workspace,.account-planhome,.invoice-workspace,.notification-workspace,.minimal-projects) :is(.button,button,summary) {min-height:44px!important;white-space:normal!important;line-height:1.4!important;}
  html body.template-saas .saas-app :is(.catalog-workspace,.task-workspace,.account-planhome,.invoice-workspace,.notification-workspace,.minimal-projects) :is(input:not([type=hidden]):not([type=checkbox]):not([type=radio]),select,textarea) {min-width:0!important;max-width:100%!important;box-sizing:border-box!important;font-size:16px!important;line-height:1.5!important;min-height:44px!important;}
  html body.template-saas .saas-app :is(.account-section-head,.task-section-head,.inventory-section-head,.mp-section-head) {display:flex!important;flex-wrap:wrap!important;gap:10px!important;align-items:center!important;}
  html body.template-saas .saas-app :is(.account-command-strip,.project-filter-group) {display:flex!important;flex-wrap:wrap!important;gap:6px!important;}
  html body.template-saas .saas-app .account-command-strip a {display:flex!important;align-items:center!important;min-height:44px!important;font-size:13px!important;}
  html body.template-saas .saas-app :is(.account-invoice-row,.account-invoice-row-rich) {display:grid!important;grid-template-columns:minmax(0,1fr)!important;gap:10px!important;}
  html body.template-saas .saas-app .invoice-row-actions {display:flex!important;justify-content:flex-start!important;gap:8px!important;}
  html body.template-saas .saas-app .notification-table-wrap {width:100%!important;max-width:100%!important;overflow-x:auto!important;}
  html body.template-saas .saas-app .catalog-table {display:block!important;min-width:0!important;width:100%!important;}
  html body.template-saas .saas-app .catalog-table thead {position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip-path:inset(50%)!important;}
  html body.template-saas .saas-app .catalog-table tbody {display:grid!important;gap:12px!important;min-width:0!important;}
  html body.template-saas .saas-app .catalog-table tr:not([hidden]) {display:grid!important;grid-template-columns:minmax(0,1fr)!important;border:1px solid #dce4e9!important;border-radius:5px!important;padding:12px!important;}
  html body.template-saas .saas-app .catalog-table td {display:block!important;width:auto!important;min-width:0!important;max-width:none!important;white-space:normal!important;overflow-wrap:anywhere!important;padding:7px 0!important;border:0!important;font-size:13px!important;line-height:1.5!important;}
  html body.template-saas .saas-app .catalog-table td[data-label]::before {content:attr(data-label);display:block;font-size:11px;font-weight:600;color:#5a6c79;margin-bottom:3px;}
  html body.template-saas .saas-app .catalog-table td:first-child a {font-size:16px!important;line-height:1.5!important;display:inline-block;min-height:30px;}
}
