/* Layout helpers para SPA com Sidebar React fixa */
body.layout-sidebar {
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  margin: 0;
  background: #f8f9fa;
}

body.layout-sidebar #sidebar-root {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  overflow-y: hidden;
  padding: 1.5rem 1rem 1.5rem 1.5rem;
  box-sizing: border-box;
  z-index: 1040;
}

body.layout-sidebar #sidebar-root .sidenav {
  margin: 0 !important;
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body.layout-sidebar #spa-root {
  margin-left: 260px;
  width: calc(100% - 260px);
  min-height: 100vh;
  overflow-x: hidden;
  overflow-y: auto;
}

body.layout-sidebar.layout-sidebar--collapsed {
  flex-direction: column;
}

body.layout-sidebar.layout-sidebar--collapsed #spa-root {
  margin-left: 0;
  width: 100%;
}

@media (max-width: 1199.98px) {
  body.layout-sidebar {
    flex-direction: column;
  }

  body.layout-sidebar #sidebar-root {
    position: relative;
    width: 100%;
    height: auto;
    max-height: none;
    margin-bottom: 1rem;
  }

  body.layout-sidebar #spa-root {
    margin-left: 0;
    width: 100%;
  }
}
