/* ========================================================= 
   VIEWPORT FULL - Eliminar márgenes negros completamente
   
   Este archivo asegura que el sistema abarque 100% de la pantalla
   sin márgenes, espacios en blanco o barras fantasma
========================================================= */

/* RESETS CRÍTICOS - MÁS AGRESIVO */
html, body {
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    overflow-y: auto !important;
    overflow-x: visible !important;
    position: static !important;
    display: block !important;
}

html {
    height: 100% !important;
}

body {
    height: auto !important;
    min-height: 100% !important;
}

/* Universal box-sizing */
*, *::before, *::after {
    box-sizing: border-box;
}

/* LOGIN - Contenedor flexible */
.contenedor-login {
    display: flex !important;
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100vh !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    position: relative !important;
    flex-wrap: nowrap !important;
}

/* Paneles login */
.panel-izquierdo,
.panel-derecho {
    flex: 1 !important;
    overflow: auto !important;
    height: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* DASHBOARD - Layout fijo */
.panel-lateral {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    width: 70px !important;
    height: 100vh !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    z-index: 1000 !important;
    padding: 0 !important;
    margin: 0 !important;
}

.contenido-principal {
    position: absolute !important;
    left: 70px !important;
    top: 0 !important;
    width: calc(100% - 70px) !important;
    max-width: calc(100vw - 70px) !important;
    min-height: 100vh !important;
    overflow-x: auto !important;
    overflow-y: auto !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* Tablas con scroll */
.tabla-scroll {
    width: 100%;
    overflow-x: auto;
    overflow-y: auto;
}

/* Menú móvil */
.panel-menu-movil {
    position: fixed !important;
    z-index: 10000 !important; /* Sincronizado con estilos.css */
}

/* Overlay menú */
.overlay-menu {
    position: fixed !important;
    z-index: 9999 !important;
}

/* IMPORTANTE: Remover restricciones que causen margen */
body {
    overflow-x: auto !important;  /* No hidden */
    max-width: 100% !important;
}

html {
    width: 100% !important;
    max-width: 100% !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    html, body {
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .contenedor-login {
        width: 100vw !important;
        max-width: 100vw !important;
        height: auto !important;
        min-height: 100vh !important;
        flex-direction: column !important;
    }
    
    .panel-izquierdo {
        display: none !important;
    }
    
    .panel-derecho {
        width: 100vw !important;
        max-width: 100vw !important;
        min-height: 100vh !important;
    }
    
    .contenido-principal {
        position: static !important;
        left: auto !important;
        width: 100vw !important;
        max-width: 100vw !important;
    }
    
    .panel-lateral {
        display: none !important;
    }
}
