<div class="container">
    <hr class="col-md-12 col-xs-12" style="padding-left:0px;padding-right:0px;">
    @if ($producto == 16)
        <h4 class="titulo-fidelitas">Totales de Monitoreo al {{$fecha_hasta_dmy}}</h4>
    @else
        <h4 class="titulo-fidelitas">Totales de Consultas del {{$fecha_desde_dmy}} al {{$fecha_hasta_dmy}}</h4>
    @endif
    <table class="table table-striped" id="tabla_totales1">
        <tr>
            <td class="text-left"><b>Total General</b></th>
            <td class="text-right"><b>{{$total_gral}}</b></th>
        </tr>
    </table>
    <table class="table table-striped" id="tabla_totales">
        <thead>
            <tr>
                <th class="text-left">Usuario</th>
                <th class="text-right">Total</th>
            </tr>

        </thead>
        <tbody>
            @foreach($totales as $key => $consulta)
                <tr>
                    <td class="text-left">{{$key}}</td>
                    <td class="text-right">{{$consulta}}</td>
                </tr>
            @endforeach

        </tbody>
    </table>

    <hr class="col-md-12 col-xs-12" style="padding-left:0px;padding-right:0px;">
    @if ($producto == 16)
        <h4 class="titulo-fidelitas">Detalle de Monitoreo al {{$fecha_hasta_dmy}}</h4>
    @else
        <h4 class="titulo-fidelitas">Detalle de Consultas del {{$fecha_desde_dmy}} al {{$fecha_hasta_dmy}}</h4>
    @endif
    <table class="table table-striped" id="tabla_registros">
        <thead>
            <tr>
                <th class="text-left">Nombre</th>
                <th class="text-center">CUIT</th>
                <th class="text-center hidden">Producto</th>
                <th class="text-center hidden">Fecha</th>
                @if ($producto == 16)
                    <th class="text-center">Fecha vigencia Monitoreo</th>
                @else
                    <th class="text-center">Fecha Consulta</th>
                @endif
                <th class="text-right">Usuario</th>
            </tr>
        </thead>
        <tbody>
            @foreach($registros as $consulta)
                <tr>
                    <td class="text-left">{{$consulta->nombre_persona}}</td>
                    <td class="text-center">{{$consulta->cuit_consultado}}</td>
                    <td class="text-center hidden">{{$consulta->nombre_producto}}</td>
                    <td class="text-center hidden">{{$consulta->fecha_oculta}}</td>
                    <td class="text-center">{{$consulta->fecha}}</td>
                    <td class="text-right">{{$consulta->username}}</td>
                </tr>
            @endforeach
        </tbody>
    </table>
</div>