.fullwidth,
.fullwidth .shell,
.fullwidth .container,
.fullwidth .footer {
  max-width: 100% !important;
  width: 100% !important;
  border-radius: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: none !important;
}

.portal-layout{
  display:flex;
  min-height:100vh;
}

.sidebar{
  width:260px;
}

.container,
.shell {
  max-width: 1100px; /* Ajustado para ser consistente con las páginas del portal */
  margin: 0 auto;
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

.container.has-fullwidth-header,
.shell.has-fullwidth-header {
  overflow: visible;
}

.main-content{
  flex:1;
  padding:24px;
}

/* Shared page shell for portal screens */
body {
  display: flex;
  flex-direction: column;
}
/* Corrección para páginas con panel lateral fijo (sticky) */
/*
  Se utiliza :has() para aplicar el estilo al <html> solo cuando el <body> tiene la clase 'fullwidth'.
  Esto es necesario para anular el 'overflow-x: hidden' de base.css, que impide el funcionamiento de 'position: sticky'.
*/
html:has(body.fullwidth) {
  overflow-x: visible;
}
body.fullwidth {
  display: block;
  overflow-x: visible;
}

body > .container,
body > .shell {
  flex: 1 0 auto;
}

.container,
.shell {
  width: min(1100px, 100%);
  margin-left: auto;
  margin-right: auto;
}
