/* ---------------------------------
  CORE LAYOUT AND STRUCTURE STYLES
  Estrutura principal do site/app
---------------------------------- */
:root {}

/* ---------------------------
   BODY BASE
---------------------------- */
body {
  background-color: var(--color-background-light);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
}

body[data-modal="1"] {
  overflow: hidden; /* Evita scroll quando modal está ativo */
}

/* ---------------------------
   FIXED CORE LAYERS
   Notificações, Sidebar, Modal
---------------------------- */
#notify,
#loading,
#modal,
#sidebar {
  position: fixed;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  pointer-events: none; /* Desabilita interação quando escondido */
  }

/* Z-INDEX LAYERS ORDERING */
#sidebar { z-index: 3000; }
#modal   { z-index: 7000; }
#loading { z-index: 8000; }
#notify  { z-index: 9000; }

/* ---------------------------
   MAIN STRUCTURE WRAPPER
---------------------------- */
#main {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
  margin: 0 auto auto auto;
}

/* Garante que header e footer não cresçam */
header,
footer {
  flex-shrink: 0;
}

/* ---------------------------
   CONTENT AREA
---------------------------- */
#content {
  display: block;
  width: 100%;
  max-width: 100vw !important;
  padding: 0;
  margin: auto;
  transition: all 0.2s ease;
}

/* Loading state do conteúdo */
#content[data-loading='1'] {
  pointer-events: none;
  opacity: 0;
  transform: translateY(-20px);
}

#content[data-loading='0'] {
  pointer-events: all;
  opacity: 1;
  transform: translateY(0px);
}