/* V0.1.27h — repaired against ACTUAL TDesign generated DOM.
   .t-layout__content is the content element (not .t-content).
   Contract: fixed header + sidebar, ONLY right work area scrolls. */
html, body {
  width:100%!important;
  height:100%!important;
  margin:0!important;
  min-height:0!important;
  overflow:hidden!important;
  scrollbar-gutter:auto!important;
}
#app, .tdesign-app {
  height:100%!important;
  max-height:100%!important;
  min-height:0!important;
  overflow:hidden!important;
}
.tdesign-app > .shell.t-layout {
  display:flex!important;
  flex-flow:row nowrap!important;
  align-items:stretch!important;
  width:100%!important;
  height:100vh!important;
  height:100dvh!important;
  min-height:0!important;
  max-height:100dvh!important;
  overflow:hidden!important;
}
/* Desktop left navigation: occupies its own column; never moves with content. */
.tdesign-app > .shell.t-layout > .sidebar.t-layout__sider {
  position:relative!important;
  inset:auto!important;
  transform:none!important;
  flex:0 0 210px!important;
  width:210px!important;
  min-width:210px!important;
  max-width:210px!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  align-self:stretch!important;
  overflow:hidden!important;
  scrollbar-width:none!important;
  background:#fff!important;
  z-index:10!important;
}
.tdesign-app > .shell.t-layout > .sidebar::-webkit-scrollbar {display:none!important}
.tdesign-app .sidebar .t-default-menu,
.tdesign-app .sidebar .t-menu,
.tdesign-app .sidebar .t-menu__scroll {
  overflow:visible!important;
  max-height:none!important;
}
/* TDesign generates SECTION.t-layout as the content column. */
.tdesign-app > .shell.t-layout > section.t-layout {
  display:flex!important;
  flex-direction:column!important;
  flex-wrap:nowrap!important;
  flex:1 1 0!important;
  width:0!important;
  min-width:0!important;
  height:100%!important;
  max-height:100%!important;
  min-height:0!important;
  margin:0!important;
  overflow:hidden!important;
}
.tdesign-app > .shell.t-layout > section.t-layout > .topbar.t-layout__header {
  position:relative!important;
  top:auto!important;
  flex:0 0 58px!important;
  height:58px!important;
  min-height:58px!important;
  max-height:58px!important;
  width:100%!important;
  overflow:hidden!important;
  z-index:12!important;
}
/* CORRECT node: DIV.t-layout__content, which old patches missed. */
.tdesign-app > .shell.t-layout > section.t-layout > .t-layout__content {
  display:block!important;
  flex:1 1 0!important;
  height:0!important;
  min-height:0!important;
  max-height:none!important;
  min-width:0!important;
  width:100%!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior-y:contain!important;
  scrollbar-gutter:stable!important;
  -webkit-overflow-scrolling:touch!important;
}
/* Remove narrow centered column; use entire available content width. */
.tdesign-app .shell .t-layout__content > .workspace {
  display:block!important;
  width:100%!important;
  max-width:none!important;
  margin:0!important;
  min-height:0!important;
  height:auto!important;
  max-height:none!important;
  overflow:visible!important;
  contain:none!important;
  padding:22px clamp(16px,2.2vw,40px) 48px!important;
  box-sizing:border-box!important;
}
.tdesign-app .shell .workspace > .view-card,
.tdesign-app .shell .workspace .table-frame {
  min-width:0!important;
  max-width:100%!important;
}
.tdesign-app > .shell.t-layout > section.t-layout > .foot.t-layout__footer {
  flex:0 0 34px!important;
  height:34px!important;
  min-height:34px!important;
  max-height:34px!important;
  overflow:hidden!important;
  padding:7px 12px!important;
}
/* Compact nav in laptop-sized heights without creating a second scrollbar. */
@media (min-width:851px) and (max-height:920px) {
  .tdesign-app .sidebar .brand {height:52px!important;min-height:52px!important}
  .tdesign-app .sidebar .nav-caption {
    height:22px!important;margin:5px 12px 2px!important;
    padding:0 8px!important;font-size:11px!important;
  }
  .tdesign-app .sidebar .t-menu__item {
    height:27px!important;min-height:27px!important;
    margin:0 12px!important;font-size:12px!important;
  }
  .tdesign-app .sidebar .t-default-menu {padding:2px 0!important}
}
/* Mobile navigation is the only place where the menu itself can scroll. */
@media (max-width:850px) {
  .tdesign-app > .shell.t-layout > .sidebar.t-layout__sider {
    position:fixed!important;top:0!important;left:0!important;bottom:0!important;
    width:210px!important;height:100dvh!important;max-height:100dvh!important;
    z-index:35!important;overflow-y:auto!important;overflow-x:hidden!important;
    transform:translateX(-105%)!important;
    transition:transform .2s ease!important;
    overscroll-behavior-y:contain!important;
  }
  .tdesign-app > .shell.t-layout > .sidebar.open {
    transform:translateX(0)!important;
  }
  .tdesign-app > .shell.t-layout > section.t-layout {
    flex:1 1 auto!important;width:100%!important;margin:0!important;min-width:0!important;
  }
  .tdesign-app .shell .t-layout__content > .workspace {
    padding:17px 14px 38px!important;
  }
}
