
/* ELEMENTARY v3.2.3 — deterministic legacy workspace browser repair */
:root{
  --eo-runtime-page-gap:22px;
}

/* The global shell must stay visible above every legacy document */
body.eo-legacy-bridge-active .eo-legacy-shell-bridge{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
}
body.eo-legacy-bridge-active .eo-legacy-header{
  position:fixed!important;
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
  top:0!important;
  right:0!important;
  left:var(--eo-sidebar-expanded)!important;
  width:auto!important;
  height:var(--eo-header-height)!important;
  min-height:var(--eo-header-height)!important;
  max-height:var(--eo-header-height)!important;
  margin:0!important;
  transform:none!important;
  z-index:1000!important;
}
body.eo-legacy-bridge-active .eo-sidebar{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
  z-index:1010!important;
}
html[data-eo-sidebar="compact"] body.eo-legacy-bridge-active .eo-legacy-header{
  left:var(--eo-sidebar-compact)!important;
}

/* Hide obsolete company/version fragments that leak above the real navigation */
.eo-sidebar-scroll > .eo-obsolete-sidebar-meta{
  display:none!important;
}

/* Runtime canvas created by the browser repair */
body.eo-legacy-bridge-active > .eo-runtime-page-canvas{
  position:relative!important;
  inset:auto!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:calc(100dvh - var(--eo-header-height))!important;
  margin:0!important;
  padding:var(--eo-runtime-page-gap) clamp(18px,2vw,34px) 48px!important;
  overflow:visible!important;
  transform:none!important;
  z-index:1!important;
}
body.eo-legacy-bridge-active > .eo-runtime-page-canvas > .eo-runtime-page-root{
  position:relative!important;
  inset:auto!important;
  display:block!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  transform:none!important;
  float:none!important;
  overflow:visible!important;
}

/* Exact legacy wrapper names plus broad structural fallbacks */
body.eo-legacy-bridge-active .eo-runtime-page-root :where(
  .wrap,
  .wrapper,
  .page,
  .page-wrap,
  .page-wrapper,
  .main,
  .content,
  .container,
  .shell,
  .layout,
  .workspace,
  .bc,
  .bc-wrap,
  .bc-shell,
  .bc-main,
  .bc-content,
  .blockage-wrap,
  .blockage-shell,
  .blockage-main,
  .blockage-content,
  .commercial-wrap,
  .commercial-shell,
  .commercial-main,
  .commercial-content,
  [data-page],
  [data-content]
){
  position:relative!important;
  inset:auto!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding-top:0!important;
  transform:none!important;
  float:none!important;
  grid-template-columns:minmax(0,1fr)!important;
}

/* Any structural ancestor marked by the repair is forced to normal document flow */
body.eo-legacy-bridge-active .eo-runtime-normalized-node{
  position:relative!important;
  inset:auto!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  margin-left:0!important;
  margin-right:0!important;
  transform:none!important;
  float:none!important;
  grid-template-columns:minmax(0,1fr)!important;
}

body.eo-legacy-bridge-active .eo-runtime-page-root h1{
  width:auto!important;
  max-width:none!important;
  margin:0 0 8px!important;
  padding:0!important;
  font-size:clamp(30px,3vw,46px)!important;
  line-height:1.03!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}
body.eo-legacy-bridge-active .eo-runtime-page-root :is(h2,h3){
  max-width:none!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
}

/* KPI, filter and table regions recover the available width */
body.eo-legacy-bridge-active .eo-runtime-kpi-region{
  display:grid!important;
  grid-template-columns:repeat(5,minmax(110px,1fr))!important;
  gap:10px!important;
  width:100%!important;
  max-width:none!important;
  margin:18px 0!important;
}
body.eo-legacy-bridge-active .eo-runtime-kpi-region > *{
  width:auto!important;
  min-width:0!important;
  max-width:none!important;
}
body.eo-legacy-bridge-active .eo-runtime-filter-region{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(160px,1fr)) auto!important;
  align-items:end!important;
  gap:10px!important;
  width:100%!important;
  max-width:none!important;
  margin:0 0 14px!important;
}
body.eo-legacy-bridge-active .eo-runtime-filter-region :is(input,select,button){
  width:100%!important;
  min-width:0!important;
  max-width:none!important;
}
body.eo-legacy-bridge-active .eo-runtime-table-region{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  overflow-x:auto!important;
  scrollbar-gutter:stable!important;
}
body.eo-legacy-bridge-active .eo-runtime-table-region table{
  width:100%!important;
  min-width:860px!important;
  max-width:none!important;
  table-layout:auto!important;
}
body.eo-legacy-bridge-active .eo-runtime-table-region :is(th,td){
  width:auto!important;
  max-width:none!important;
  word-break:normal!important;
  overflow-wrap:normal!important;
  white-space:normal!important;
}

/* Remove empty legacy placeholders and duplicate shells */
body.eo-legacy-bridge-active .eo-runtime-hidden-duplicate,
body.eo-legacy-bridge-active .eo-runtime-empty-spacer{
  display:none!important;
}

/* Browser layout self-test fallback */
body[data-eo-layout-state="fallback"] > .eo-runtime-page-canvas,
body[data-eo-layout-state="fallback"] .eo-runtime-page-root{
  width:100%!important;
  max-width:none!important;
  min-width:0!important;
  display:block!important;
}
body[data-eo-layout-state="fallback"] .eo-runtime-page-root *{
  max-width:100%!important;
}
body[data-eo-layout-state="fallback"] .eo-runtime-table-region table{
  max-width:none!important;
}

@media(max-width:1100px){
  body.eo-legacy-bridge-active .eo-runtime-kpi-region{
    grid-template-columns:repeat(3,minmax(110px,1fr))!important;
  }
  body.eo-legacy-bridge-active .eo-runtime-filter-region{
    grid-template-columns:repeat(2,minmax(150px,1fr))!important;
  }
}
@media(max-width:768px){
  body.eo-legacy-bridge-active .eo-legacy-header{
    left:0!important;
  }
  body.eo-legacy-bridge-active > .eo-runtime-page-canvas{
    padding:14px 11px 88px!important;
  }
  body.eo-legacy-bridge-active .eo-runtime-kpi-region,
  body.eo-legacy-bridge-active .eo-runtime-filter-region{
    grid-template-columns:1fr!important;
  }
}
