

/* ESB GLOBAL FLUID WIDTH START */

/*
   Global authenticated workspace width.

   Sidebar open:
   content begins after full sidebar.

   Sidebar collapsed:
   content begins after 68px icon rail.

   All pages use the complete remaining horizontal space.
*/

@media (min-width:1001px){

    html body[data-auth-state="authenticated"]
    main{

        width:auto !important;

        max-width:none !important;

        min-width:0 !important;

        box-sizing:border-box !important;
    }


    html body[data-auth-state="authenticated"]
    :not(.im-sidebar-collapsed) main{

        margin-left:
            var(--sidebar-width,246px) !important;
    }


    html body[data-auth-state="authenticated"].im-sidebar-collapsed
    main{

        margin-left:68px !important;
    }


    html.im-sidebar-collapsed
    body[data-auth-state="authenticated"]
    main{

        margin-left:68px !important;
    }
}


/* Main app surface */

html body[data-auth-state="authenticated"]
#app,

html body[data-auth-state="authenticated"]
#app.content{

    width:100% !important;

    max-width:none !important;

    min-width:0 !important;

    box-sizing:border-box !important;
}


/* Direct page wrappers should not artificially cap width */

html body[data-auth-state="authenticated"]
#app > section,

html body[data-auth-state="authenticated"]
#app > div{

    max-width:100%;

    min-width:0;

    box-sizing:border-box;
}


/* Tables/forms may scroll internally instead of forcing page overflow */

html body[data-auth-state="authenticated"]
#app .table-wrap,

html body[data-auth-state="authenticated"]
#app .qr-table-wrap{

    max-width:100% !important;

    min-width:0 !important;
}


/* Keep charts and canvases inside available content width */

html body[data-auth-state="authenticated"]
#app svg,

html body[data-auth-state="authenticated"]
#app canvas{

    max-width:100%;
}


/* Mobile/tablet keeps its existing navigation behavior */

@media (max-width:1000px){

    html body[data-auth-state="authenticated"]
    main{

        margin-left:0 !important;

        width:100% !important;

        max-width:none !important;

        min-width:0 !important;
    }


    html body[data-auth-state="authenticated"]
    #app,

    html body[data-auth-state="authenticated"]
    #app.content{

        width:100% !important;

        max-width:none !important;

        min-width:0 !important;
    }
}


/* ESB GLOBAL FLUID WIDTH END */
@media screen {
  html body[data-auth-state="authenticated"] header.topbar {
    height:48px!important;min-height:48px!important;max-height:48px!important;
    flex-wrap:nowrap!important;align-items:center!important;overflow:visible!important;
  }
  html body[data-auth-state="authenticated"] header.topbar>div:first-child {
    display:flex;align-items:center;flex-wrap:nowrap!important;gap:8px;min-width:0;flex:1 1 auto;overflow:hidden;
  }
  html body[data-auth-state="authenticated"] header.topbar #page-title {
    flex:0 1 auto;min-width:0;margin:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
  }
  html body[data-auth-state="authenticated"] header.topbar #page-subtitle {
    display:none!important;
  }
  html body[data-auth-state="authenticated"] header.topbar .top-actions {
    display:flex!important;align-items:center!important;flex-wrap:nowrap!important;gap:8px!important;flex:0 0 auto!important;min-width:0!important;
  }
  html body[data-auth-state="authenticated"] header.topbar :is(#mobile-menu,#sb-module-back,#sb-module-forward) {
    position:static!important;inset:auto!important;transform:none!important;
    display:inline-grid;place-items:center;flex:0 0 36px;width:36px;height:36px;
    padding:0;margin:0;border:1px solid var(--line);border-radius:9px;
    background:var(--panel);color:var(--ink);line-height:1;cursor:pointer;
  }
  html body[data-auth-state="authenticated"] header.topbar :is(#mobile-menu,#sb-module-back,#sb-module-forward)[hidden] {display:none!important}
  html body[data-auth-state="authenticated"] main,
  html body[data-auth-state="authenticated"] #app {
    min-width:0;
    max-width:100%;
    overflow-x:clip !important;
  }
}
@media screen and (min-width:1001px){
  html body[data-auth-state="authenticated"] header.topbar #mobile-menu{display:none!important}
}
