/* ============================================
   VARIABLES
   ============================================ */
:root {
    --sidebar-width: 260px;
    --sidebar-collapsed: 72px;
    --topbar-height: 36px;
    --azul-900: #0A1628;
    --azul-800: #0D1F3C;
    --azul-700: #0F2847;
    --azul-600: #133564;
    --azul-500: #1A4480;
    --azul-400: #2563A0;
    --azul-300: #3B82B8;
    --azul-200: #6BA3D6;
    --azul-100: #A8C8E8;
    --azul-50:  #D6E6F5;
    --accent:    #00D4AA;
    --danger:    #EF4444;
    --warning:   #F59E0B;
    --success:   #10B981;
    --blanco:    #FFFFFF;
    --gris-50:   #F8FAFC;
    --gris-100:  #F1F5F9;
    --gris-200:  #E2E8F0;
    --gris-300:  #CBD5E1;
    --gris-400:  #94A3B8;
    --gris-500:  #64748B;
    --gris-600:  #475569;
    --gris-700:  #334155;
    --gris-800:  #1E293B;
    --gris-900:  #0F172A;
    --transicion: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background: var(--gris-50);
    color: var(--gris-800);
    overflow: hidden;
    height: 100vh;
}

/* ============================================
   GLOBAL FOCUS - identico en todas las paginas
   ============================================ */
input:focus,
select:focus,
textarea:focus {
    border-color: var(--azul-400) !important;
    box-shadow: 0 0 0 3px rgba(37,99,160,0.12) !important;
    outline: none !important;
}
*:focus,
*:focus-visible {
    outline: none !important;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   LAYOUT GENERAL
   ============================================ */
.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* Elementos decorativos heredados del login - sacarlos del flujo */
.bg-layer, #particles-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    margin-left: var(--sidebar-width);
    transition: var(--transicion);
}

body.sidebar-collapsed .main-wrapper {
    margin-left: var(--sidebar-collapsed);
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--azul-900);
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: var(--transicion);
    overflow: hidden;
}

body.sidebar-collapsed .sidebar {
    width: var(--sidebar-collapsed);
}

/* Header del sidebar */
.sidebar-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 2px 8px;
    height: auto;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    overflow: hidden;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    background: linear-gradient(135deg, var(--accent), var(--azul-300));
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    color: var(--azul-900);
    font-weight: 800;
}

.sidebar-logo .logo-text {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blanco);
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

body.sidebar-collapsed .sidebar-logo .logo-text,
body.sidebar-collapsed .sidebar-empresa,
body.sidebar-collapsed .sidebar-sucursal {
    opacity: 0;
    pointer-events: none;
}

.sidebar-empresa {
    font-size: 0.6rem;
    color: var(--gris-400);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    display: block;
    line-height: 1.3;
}
.sidebar-sucursal {
    font-size: 0.55rem;
    color: var(--azul-300);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
    display: block;
    line-height: 1.3;
    margin-top: 1px;
}
    transition: opacity 0.2s ease;
}

.sidebar-toggle {
    background: rgba(255,255,255,0.05);
    border: none;
    color: var(--gris-400);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    transition: var(--transicion);
    flex-shrink: 0;
}

.sidebar-toggle:hover {
    background: rgba(255,255,255,0.1);
    color: var(--blanco);
}

body.sidebar-collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

/* Navegación */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 0;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
}

.nav-list {
    padding: 0 8px;
}

.nav-section-title {
    padding: 16px 12px 6px;
}

.nav-section-title .nav-text {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: var(--gris-500);
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

body.sidebar-collapsed .nav-section-title .nav-text {
    opacity: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 12px;
    border-radius: 8px;
    color: var(--gris-300);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transicion);
    white-space: nowrap;
    position: relative;
}

.nav-link:hover {
    background: rgba(255,255,255,0.06);
    color: var(--blanco);
}

.nav-link i:first-child {
    font-size: 0.95rem;
    width: 20px;
    text-align: center;
    flex-shrink: 0;
}

.nav-link .nav-text {
    opacity: 1;
    transition: opacity 0.2s ease;
}

body.sidebar-collapsed .nav-link .nav-text {
    opacity: 0;
    pointer-events: none;
}

.nav-link .nav-arrow {
    margin-left: auto;
    font-size: 0.65rem;
    transition: transform 0.3s ease;
    opacity: 1;
}

body.sidebar-collapsed .nav-link .nav-arrow {
    opacity: 0;
}

.nav-item.active > .nav-link {
    background: rgba(0,212,170,0.1);
    color: var(--accent);
}

/* Submenús */
.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    padding-left: 20px;
}

.nav-item.open > .submenu {
    max-height: 600px;
}

.nav-item.open > .nav-link .nav-arrow {
    transform: rotate(180deg);
}

.submenu .nav-link {
    padding: 7px 12px;
    font-size: 0.82rem;
    color: var(--gris-400);
}

.submenu .nav-link::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--gris-600);
    flex-shrink: 0;
    transition: var(--transicion);
}

.submenu .nav-link:hover::before {
    background: var(--accent);
}

/* Tooltip cuando está colapsado */
body.sidebar-collapsed .nav-item.has-submenu > .nav-link::after {
    content: attr(data-tooltip);
    position: absolute;
    left: calc(var(--sidebar-collapsed) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--azul-800);
    color: var(--blanco);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 200;
}

body.sidebar-collapsed .nav-item.has-submenu > .nav-link:hover::after {
    opacity: 1;
}

/* Pie del sidebar */
.sidebar-footer {
    border-top: 1px solid rgba(255,255,255,0.06);
    padding: 8px;
    flex-shrink: 0;
}

.logout-link {
    color: var(--danger) !important;
}

.logout-link:hover {
    background: rgba(239,68,68,0.1) !important;
}

/* ============================================
   TOPBAR
   ============================================ */
.topbar {
    height: var(--topbar-height);
    background: var(--blanco);
    border-bottom: 1px solid var(--gris-200);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    flex-shrink: 0;
    z-index: 50;
}

.topbar-hamburger {
    display: none;
    background: none;
    border: none;
    color: var(--gris-600);
    font-size: 1.15rem;
    cursor: pointer;
    padding: 4px;
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--gris-400);
}

.breadcrumb-sep {
    font-size: 0.6rem;
}

.breadcrumb-item.active {
    color: var(--gris-800);
    font-weight: 600;
}

.topbar-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 12px;
}

.topbar-search {
    position: relative;
}

.topbar-search .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gris-400);
    font-size: 0.85rem;
}

.topbar-search input {
    padding: 4px 12px 4px 36px;
    background: var(--gris-50);
    border: 1px solid var(--gris-200);
    border-radius: 8px;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.85rem;
    color: var(--gris-800);
    width: 220px;
    outline: none;
    transition: var(--transicion);
}

.topbar-search input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,212,170,0.1);
    width: 280px;
}

.topbar-search input::placeholder {
    color: var(--gris-400);
}

.topbar-btn {
    position: relative;
    background: none;
    border: none;
    color: var(--gris-500);
    font-size: 1.1rem;
    cursor: pointer;
    padding: 4px;
    border-radius: 8px;
    transition: var(--transicion);
}

.topbar-btn:hover {
    background: var(--gris-50);
    color: var(--gris-700);
}

.notification-badge {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 18px;
    height: 18px;
    background: var(--danger);
    color: var(--blanco);
    font-size: 0.65rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transicion);
}

.topbar-user:hover {
    background: var(--gris-50);
}

.user-avatar {
    width: 24px;
    height: 24px;
    background: linear-gradient(135deg, var(--accent), var(--azul-300));
    color: var(--azul-900);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 800;
}

.user-info {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--gris-800);
    line-height: 1.1;
}

.user-role {
    font-size: 0.65rem;
    color: var(--gris-400);
    line-height: 1.1;
}

.user-arrow {
    font-size: 0.65rem;
    color: var(--gris-400);
}

/* ============================================
   AREA DE CONTENIDO
   ============================================ */
.content-area {
    flex: 1;
    overflow-y: auto;
    padding: 24px;
}

.content-area::-webkit-scrollbar {
    width: 6px;
}

.content-area::-webkit-scrollbar-track {
    background: transparent;
}

.content-area::-webkit-scrollbar-thumb {
    background: var(--gris-300);
    border-radius: 6px;
}

/* ============================================
   TARJETAS KPI
   ============================================ */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--blanco);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--gris-100);
    transition: var(--transicion);
}

.kpi-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    transform: translateY(-2px);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.kpi-data {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.kpi-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--gris-900);
    line-height: 1.2;
}

.kpi-label {
    font-size: 0.78rem;
    color: var(--gris-400);
    margin-top: 2px;
}

.kpi-trend {
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 3px;
    padding: 4px 8px;
    border-radius: 6px;
}

.kpi-trend.up {
    color: var(--success);
    background: rgba(16,185,129,0.1);
}

.kpi-trend.down {
    color: var(--danger);
    background: rgba(239,68,68,0.1);
}

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--blanco);
    border-radius: 12px;
    border: 1px solid var(--gris-100);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--gris-100);
}

.card-title {
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--gris-800);
}

.card-action {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    transition: var(--transicion);
}

.card-action:hover {
    text-decoration: underline;
}

.card-body {
    padding: 20px;
}

.card-body.no-padding {
    padding: 0;
}

.content-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 24px;
}

.content-grid-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

/* ============================================
   GRÁFICO DE BARRAS CSS
   ============================================ */
.chart-container {
    padding: 8px 0;
}

.chart-bars {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    height: 200px;
    padding: 0 8px;
}

.bar-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    height: 100%;
}

.bar-label {
    font-size: 0.72rem;
    color: var(--gris-400);
    margin-top: 8px;
    font-weight: 600;
}

.bar-pair {
    flex: 1;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    width: 100%;
}

.bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    min-height: 8px;
    transition: height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.bar-ventas {
    background: linear-gradient(to top, #00D4AA, #00E5BD);
}

.bar-compras {
    background: linear-gradient(to top, var(--azul-400), var(--azul-300));
}

.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: 16px;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: var(--gris-500);
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 3px;
}

.legend-dot.ventas {
    background: #00D4AA;
}

.legend-dot.compras {
    background: var(--azul-400);
}

/* ============================================
   TABLA DE DATOS
   ============================================ */
.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead th {
    padding: 10px 20px;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gris-500);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: var(--gris-50);
    border-bottom: 1px solid var(--gris-100);
}

.data-table tbody td {
    padding: 12px 20px;
    font-size: 0.84rem;
    color: var(--gris-700);
    border-bottom: 1px solid var(--gris-100);
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover {
    background: var(--gris-50);
}

.mono {
    font-family: 'Courier New', monospace;
    font-size: 0.82rem;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 600;
}

.badge-success {
    background: rgba(16,185,129,0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245,158,11,0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239,68,68,0.1);
    color: var(--danger);
}

/* ============================================
   TOP PRODUCTOS
   ============================================ */
.top-products {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.top-product-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.tp-position {
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--gris-100);
    color: var(--gris-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 800;
    flex-shrink: 0;
}

.top-product-item:nth-child(1) .tp-position {
    background: rgba(0,212,170,0.15);
    color: var(--accent);
}

.top-product-item:nth-child(2) .tp-position {
    background: rgba(59,130,246,0.15);
    color: #3B82F6;
}

.top-product-item:nth-child(3) .tp-position {
    background: rgba(251,191,36,0.15);
    color: #F59E0B;
}

.tp-info {
    flex: 1;
    min-width: 0;
}

.tp-name {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--gris-700);
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tp-sales {
    font-size: 0.72rem;
    color: var(--gris-400);
}

.tp-total {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--gris-800);
    flex-shrink: 0;
}

/* ============================================
   ALERTAS DE STOCK
   ============================================ */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.alert-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.82rem;
}

.alert-item.alert-danger {
    background: rgba(239,68,68,0.05);
    border-left: 3px solid var(--danger);
}

.alert-item.alert-warning {
    background: rgba(245,158,11,0.05);
    border-left: 3px solid var(--warning);
}

.alert-item i {
    margin-top: 2px;
    flex-shrink: 0;
}

.alert-danger i {
    color: var(--danger);
}

.alert-warning i {
    color: var(--warning);
}

.alert-name {
    font-weight: 600;
    color: var(--gris-700);
    display: block;
}

.alert-detail {
    font-size: 0.75rem;
    color: var(--gris-400);
}

/* ============================================
   ACTIVIDAD RECIENTE
   ============================================ */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.activity-item {
    display: flex;
    gap: 10px;
}

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 6px;
}

.activity-text {
    font-size: 0.82rem;
    color: var(--gris-600);
    line-height: 1.5;
}

.activity-text strong {
    color: var(--gris-800);
}

.activity-time {
    font-size: 0.72rem;
    color: var(--gris-400);
    display: block;
    margin-top: 2px;
}

/* ============================================
   SIDEBAR OVERLAY (móvil)
   ============================================ */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 90;
}

.sidebar-overlay.active {
    display: block;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1200px) {
    .content-grid-3 {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .content-grid {
        grid-template-columns: 1fr;
    }

    .content-grid-3 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: var(--sidebar-width) !important;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .main-wrapper {
        margin-left: 0 !important;
    }

    .topbar-hamburger {
        display: flex;
    }

    .topbar-search {
        display: none;
    }

    .user-info {
        display: none;
    }

    .user-arrow {
        display: none;
    }

    .content-area {
        padding: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   NAVEGACION ENTRE PAGINAS
   ============================================ */
.content-area > *:not(#pageProveedores) {
    transition: opacity 0.2s ease;
}

.content-area.modulo-activo {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 8px 24px 12px;
}

.content-area.modulo-activo > *:not(#pageProveedores):not(#pageBancos):not(#pageSucursales):not(#pageCategorias):not(#pageCondicionesPago):not(#pageFormasPago):not(#pageEmpresas):not(#pageTiposDocumento):not(#pageTiposDocumentoSUNAT):not(#pageCorrelativosDocumentos):not(#pageVendedores):not(#pageUnidadesMedida):not(#pageUbigeo):not(#pageCargos):not(#pageEmpleados):not(#pageChoferes):not(#pageAreas):not(#pageUsuarios):not(#pageRoles):not(#pageTransportistas):not(#pageVehiculos):not(#pageFamilias):not(#pageSubfamilias):not(#pageArticulos):not(#pageListaPrecios):not(#pagePedidos):not(#pageOrdenesCompra):not(#pageConsPedidos):not(#pageConsOC):not(#pageConsGuias):not(#pageConsGuiasSalida):not(#pageClientes):not(#pageMotivosGuia):not(#pageGuiasRemision):not(#pageGuiasSalida):not(#pageTipoCambio):not(#pageRespaldo):not(#pageSaldosIniciales):not(#pageCostosIniciales):not(#pageStockValorizado):not(#pageStockCorteFecha):not(#pageStockMinimoActual):not(#pageArticulosSinMovimiento):not(#pageKardexValorizado):not(#pageKardexArticulo):not(#pageRotacionInventario):not(#pageMargenArticulo):not(#pageConciliacionFisica):not(#pageCuentasBancarias) {
    display: none !important;
}

.content-area.modulo-activo > #pageProveedores,
.content-area.modulo-activo > #pageBancos,
.content-area.modulo-activo > #pageCategorias,
.content-area.modulo-activo > #pageCondicionesPago,
.content-area.modulo-activo > #pageEmpresas,
.content-area.modulo-activo > #pageTiposDocumento,
.content-area.modulo-activo > #pageVendedores,
.content-area.modulo-activo > #pageUnidadesMedida,
.content-area.modulo-activo > #pageUbigeo,
.content-area.modulo-activo > #pageCargos,
.content-area.modulo-activo > #pageEmpleados,
.content-area.modulo-activo > #pageChoferes,
.content-area.modulo-activo > #pageAreas,
.content-area.modulo-activo > #pageUsuarios,
.content-area.modulo-activo > #pageRoles,
.content-area.modulo-activo > #pageTransportistas,
.content-area.modulo-activo > #pageVehiculos,
.content-area.modulo-activo > #pageFamilias,
.content-area.modulo-activo > #pageSubfamilias,
.content-area.modulo-activo > #pageArticulos,
.content-area.modulo-activo > #pageListaPrecios,
.content-area.modulo-activo > #pagePedidos,
.content-area.modulo-activo > #pageOrdenesCompra,
.content-area.modulo-activo > #pageMotivosGuia,
.content-area.modulo-activo > #pageGuiasRemision,
.content-area.modulo-activo > #pageGuiasSalida,
.content-area.modulo-activo > #pageTipoCambio,
.content-area.modulo-activo > #pageClientes {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.content-area.modulo-activo > #pageFormasPago {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.content-area.modulo-activo > #pageConsPedidos,
.content-area.modulo-activo > #pageConsOC,
.content-area.modulo-activo > #pageConsGuias,
.content-area.modulo-activo > #pageConsGuiasSalida {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}

.content-area.modulo-activo > #pageTiposDocumentoSUNAT,
.content-area.modulo-activo > #pageCorrelativosDocumentos,
.content-area.modulo-activo > #pageRespaldo,
.content-area.modulo-activo > #pageSucursales,
.content-area.modulo-activo > #pageSaldosIniciales,
.content-area.modulo-activo > #pageCostosIniciales,
.content-area.modulo-activo > #pageStockValorizado,
.content-area.modulo-activo > #pageStockCorteFecha,
.content-area.modulo-activo > #pageStockMinimoActual,
.content-area.modulo-activo > #pageArticulosSinMovimiento,
.content-area.modulo-activo > #pageKardexValorizado,
.content-area.modulo-activo > #pageKardexArticulo,
.content-area.modulo-activo > #pageRotacionInventario,
.content-area.modulo-activo > #pageMargenArticulo,
.content-area.modulo-activo > #pageConciliacionFisica,
.content-area.modulo-activo > #pageCuentasBancarias {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
}
.gc-ctx-item:hover { background: #f1f5f9; }
#gcCtxMenu .gc-ctx-item:last-child { border-top: 1px solid #e2e8f0; }