* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-main);
  color: var(--text-primary);
  font-family: var(--font-family);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

/* Layout Principal (Header no topo, Sidebar + Viewport lado a lado) */
.app-layout {
  display: flex !important;
  flex-direction: row !important;
  min-height: calc(100vh - 60px);
  width: 100%;
}

#app-viewport {
  flex: 1;
  padding: 2rem;
  overflow-y: auto;  
}

.hidden {
  display: none !important;
}

@media (max-width: 760px) {
  body {
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
  }

  .app-layout {
    position: relative;
    flex: 1 1 auto;
    flex-direction: column !important;
    min-height: 0;
    overflow: hidden;
  }

  #app-viewport {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 0;
    padding: .75rem;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
}
