/* Specificity intentionally matches the records enhancer: U2 lost to its row layout. */
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));
  align-items:start;gap:18px 20px;padding:20px;margin:16px 0 22px;
  background:#fff;border:1px solid #dfe7ef;border-radius:14px;box-sizing:border-box;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar>label{
  display:flex;flex-direction:column;align-items:stretch;gap:8px;flex:none;
  min-width:0;max-width:none;width:100%;margin:0;
  font-size:12px;font-weight:600;line-height:1.5;color:#355578;white-space:normal;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar>label:has(select[aria-label="Wybierz obiekt"],select[aria-label="Wybierz kontrolera"]){
  grid-column:1/-1;min-width:0;max-width:none;flex:none;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar>label>:is(select,input){
  box-sizing:border-box;display:block;width:100%;min-width:0;max-width:100%;flex:none;
  min-height:46px;margin:0;padding:11px 36px 11px 13px;
  border:1px solid #ccdced;border-radius:9px;background-color:#fbfdff;color:#163b63;
  font:400 14px/1.4 "Segoe UI",system-ui,sans-serif;text-overflow:ellipsis;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar>button{
  align-self:start;min-height:46px;margin-top:26px;padding:11px 18px;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar>label>.p-filter-full-value{
  box-sizing:border-box;display:block;flex:none;min-width:0;max-width:100%;width:100%;
  margin:0;padding:8px 12px;background:#f1f6fc;border:0;border-radius:7px;
  color:#355578;white-space:normal;overflow-wrap:anywhere;font-size:12px;line-height:1.6;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar>label>.p-filter-full-value[hidden]{display:none}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-heading{
  display:flex;flex-wrap:wrap;align-items:start;gap:12px 20px;min-width:0;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-heading>:is(h1,p,details){
  min-width:0;max-width:100%;white-space:normal;overflow-wrap:anywhere;
}
body.portal-active :is(#module-analytics,#module-planning).module-page>.p-heading>.p-muted{
  flex:1 0 100%;margin:0;line-height:1.7;
}
body.portal-active .p-chart-modern{min-width:0}
body.portal-active .p-chart-modern .p-chart-graph{min-width:0;width:100%}
body.portal-active .p-chart-modern .p-chart-svg{min-height:0;max-width:100%;overflow:hidden}
body.portal-active .p-chart-modern .p-chart-readout{white-space:normal;overflow-wrap:anywhere;line-height:1.6}
body.portal-active .p-chart-modern .p-chart-point-select{display:flex;flex-direction:column;align-items:stretch;gap:7px;min-width:0!important;max-width:100%!important}
body.portal-active .p-chart-modern .p-chart-point-select>select{width:100%;min-width:0;max-width:100%}
/* Shared feedback for actual controls, not passive information cards. No continuous animations. */
:is(body.portal-active,body.portal-invoices,.apcoa-login-page body) :is(button,a[href],summary,[role="button"]){
  transition:background-color 160ms ease,border-color 160ms ease,box-shadow 160ms ease,transform 160ms ease;
}
:is(body.portal-active,body.portal-invoices,.apcoa-login-page body) :is(button,a[href],summary,[role="button"]):focus-visible{
  outline:3px solid #669ee3;outline-offset:3px;
}
@media(hover:hover) and (pointer:fine){
  :is(body.portal-active,body.portal-invoices,.apcoa-login-page body) :is(button,a[href],summary,[role="button"]):not(:disabled):not([aria-disabled="true"]):not(svg *):hover{
    transform:translateY(-2px);box-shadow:0 6px 16px #244d7920;border-color:#91b5df;
  }
  body:is(.portal-active,.portal-invoices) :is(button.p-shortcut,.r-select-card,.kw-area-tabs>button):not(:disabled):hover{
    background-color:#eef5ff;border-color:#8cb5e6;box-shadow:0 8px 20px #234d7924;
  }
}
:is(body.portal-active,body.portal-invoices,.apcoa-login-page body) :is(button,a[href],summary,[role="button"]):not(:disabled):active{transform:translateY(0)}
@media(max-width:1100px){
  body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:650px){
  body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar{grid-template-columns:minmax(0,1fr);padding:16px;gap:16px}
  body.portal-active :is(#module-analytics,#module-planning).module-page>.p-toolbar>button{margin-top:0;width:100%}
}
@media(prefers-reduced-motion:reduce){
  :is(body.portal-active,body.portal-invoices,.apcoa-login-page body) :is(button,a[href],summary,[role="button"]){transition:none!important;transform:none!important}
}
