html, body, #root {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

#root {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

*, *::before, *::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
}

/* Desktop: sidebar fixa + conteúdo ao lado (fallback se MUI Drawer falhar) */
@media (min-width: 900px) {
  .app-layout-root {
    display: flex !important;
    flex-direction: row !important;
    align-items: stretch !important;
    width: 100% !important;
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .app-sidebar {
    width: 280px !important;
    min-width: 280px !important;
    max-width: 280px !important;
    flex: 0 0 280px !important;
  }

  .app-layout-main {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    width: auto !important;
    max-width: calc(100vw - 280px) !important;
  }

  .app-layout-content {
    width: 100% !important;
  }
}

/* Evita texto de avisos/notificações estourar layout */
.MuiListItemText-root {
  overflow: hidden;
  word-break: break-word;
}

.MuiTypography-root {
  overflow-wrap: anywhere;
}
