/* MonitorCore: normalize the title row across every ERP module.
   Page decorators prepend breadcrumbs into legacy flex headers; without a
   dedicated breadcrumb row that third flex item pushes titles off-center. */
body:not(.auth-locked) #app .view :is(
  .icds-module-header, .ic-standard-header, [class*="page-header"]
):has(> :is(.ic-breadcrumb-line, .icds-breadcrumb)) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) max-content !important;
  grid-auto-flow: row !important;
  column-gap: 18px !important;
  row-gap: 10px !important;
  align-items: center !important;
  justify-content: stretch !important;
  text-align: left !important;
  min-width: 0 !important;
}
body:not(.auth-locked) #app .view :is(
  .icds-module-header, .ic-standard-header, [class*="page-header"]
) > :is(.ic-breadcrumb-line, .icds-breadcrumb) {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: start !important;
  margin: 0 !important;
  max-width: 100% !important;
}
/* If both header decorators run, keep a single visible breadcrumb. */
body:not(.auth-locked) #app .view :is(
  .icds-module-header, .ic-standard-header, [class*="page-header"]
):has(> .ic-breadcrumb-line) > .icds-breadcrumb {
  display: none !important;
}
/* Generated headers wrap their title and controls in a single toolbar. */
body:not(.auth-locked) #app .view :is(
  .icds-module-header, .ic-standard-header, [class*="page-header"]
) > .icds-toolbar {
  grid-column: 1 / -1 !important;
  min-width: 0 !important;
  width: 100% !important;
  margin-bottom: 0 !important;
}
body:not(.auth-locked) #app .view :is(
  .icds-module-header, .ic-standard-header, [class*="page-header"]
) > :is([class*="title-block"], [class*="title-row"], [class*="heading"], [class*="header-copy"]) {
  min-width: 0 !important;
  justify-self: start !important;
}
body:not(.auth-locked) #app .view :is(
  .icds-module-header, .ic-standard-header, [class*="page-header"]
) > :is([class*="header-actions"], [class*="page-actions"], [class*="header-controls"]) {
  min-width: 0 !important;
  justify-self: end !important;
  align-self: center !important;
}
@media (max-width: 1100px) {
  body:not(.auth-locked) #app .view :is(
    .icds-module-header, .ic-standard-header, [class*="page-header"]
  ):has(> :is(.ic-breadcrumb-line, .icds-breadcrumb)) {
    grid-template-columns: minmax(0, 1fr) !important;
    row-gap: 10px !important;
  }
  body:not(.auth-locked) #app .view :is(
    .icds-module-header, .ic-standard-header, [class*="page-header"]
  ) > :is([class*="header-actions"], [class*="page-actions"], [class*="header-controls"]) {
    grid-column: 1 !important;
    justify-self: start !important;
    justify-content: flex-start !important;
    max-width: 100% !important;
  }
}

/* Place the List/Grid control and Create action together in the header's right column. */
body:not(.auth-locked) #app .view :is(.icds-module-header,.ic-standard-header,[class*="page-header"]) > .ic-view-switch-create-cluster{grid-column:2!important;justify-self:end!important;min-width:0!important;max-width:100%!important;align-self:center!important}
body:not(.auth-locked) #app .view :is(.icds-module-header,.ic-standard-header,[class*="page-header"]) > .icds-toolbar{grid-column:1/-1!important}
@media(max-width:1100px){body:not(.auth-locked) #app .view :is(.icds-module-header,.ic-standard-header,[class*="page-header"]) > .ic-view-switch-create-cluster{grid-column:1!important;justify-self:start!important}}
