<div class=""><!---Dashboard Relatórios--->
    <div class="">
        <!--Cabeçalho-->
        <div class="col-md-12">
            <div class="d-flex">
                <label class="my-auto text-value-lg text-primary">Relatórios</label>
            </div>
            <hr>
        </div>
        
        <div class="col-md-12">
            <div class="card">
                <div class="card-header d-flex justify-content-between align-items-center">
                    <h5 class="mb-0">Leads</h5>
                </div>
                  
                <div class="card-body">
                    <!--Filtro-->
                    <form id="pesquisa-relatorio" class="form-inline">
                        
                        <label class="font-weight-normal mr-2" for="emp">Por Empreendimento:</label>
                        <div class="form-group mr-2">
                            <select class="form-control atualizaFiltro" style="min-width: 120px;" id="emp" name="emp" required>
                                <option value="">Selecione</option>
                                <?php foreach($empreendimentos as $empreendimento){ ?>
                                    <option value="<?php e($empreendimento->uuid_empreendimento) ?>"><?php e($empreendimento->emp_nome_fantasia) ?></option>
                                <?php } ?>
                            </select>
                        </div>
                        
                        <label class="font-weight-normal mr-2" for="inputData">Por Data e Hora:</label>
                        <div class="input-group date dateTimeAgenda mr-2" style="min-width: 220px;">
                            <div class="input-group-prepend">
                                <div class="input-group-text input-group-addon">
                                  <i class="fa fa-calendar" aria-hidden="true"></i>
                                </div>
                            </div>
                            <input type="text" class="form-control atualizaFiltro" id="dataHistorico" name="daterange">
                        </div>
                        <button type="button" class="btn btn-primary emp-pesq">Pesquisar</button>
                        <button type="button" class="btn btn-danger my-auto btn-limpar-filtros d-none">Limpar Filtros</button>
                    </form>
                    
                    <hr>
                    <!--LISTAS-->
                    <div class="row">
                        <div class="col-lg-12">
                            <div class="card card-accent-info">
                                <div class="card-header">
                                    <a class="btn btn-primary collapsed" data-toggle="collapse" href="#resumoGeral" aria-expanded="false" aria-controls="resumoGeral">Resumo Geral</a>
                                </div>
                                <div class="card-body collapse" id="resumoGeral">
                                    <div class="row result"></div>
                                </div>
                            </div>
                        </div>
                        <div class="col-lg-12">
                            <div class="card card-accent-info">
                                <div class="card-header">
                                    <a class="btn btn-primary" data-toggle="collapse" href="#origemCapturas" aria-expanded="true" aria-controls="origemCapturas">Origem das Capturas</a>
                                </div>
                                <div class="card-body collapse show" id="origemCapturas">
                                    <div class="nav-tabs-boxed">
                                        <ul class="nav nav-tabs" role="tablist">
                                            <li class="nav-item">
                                                <a class="nav-link active" data-toggle="tab" href="#total-capturas" role="tab" aria-controls="total-capturas" aria-selected="true">Total de Capturas <span class="badge badge-pill badge-success totalCapturas">0</span></a>
                                            </li>
                                            <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#total-facebook" role="tab" aria-controls="total-facebook" aria-selected="false"><i class="fa fa-facebook-official" aria-hidden="true"></i> Facebook <span class="badge badge-pill badge-success totalFacebook">0</span></a></li>
                                            <li class="nav-item"><a class="nav-link" data-toggle="tab" href="#total-google" role="tab" aria-controls="total-google" aria-selected="false"><i class="fa fa-google" aria-hidden="true"></i> Google <span class="badge badge-pill badge-success totalGoogle">0</span></a></li>
                                        </ul>
                                        <div class="tab-content">
                                            <div class="tab-pane active" id="total-capturas" role="tabpanel">
                                                <table id="tbCapturas" class="display table table-striped table-bordered" style="width:100%">
                                                    <thead>
                                                        <tr>
                                                            <th>Nome</th>
                                                            <th>E-mail</th>
                                                            <th>Data da captura</th>
                                                            <th>UTM SOURCE</th>
                                                            <th>UTM MEDIUM</th>
                                                            <th>UTM CAMPAIGN</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                    </tbody>
                                                </table>
                                            </div>
                                            <div class="tab-pane" id="total-facebook" role="tabpanel">
                                                <table id="tbFacebook" class="display table table-striped table-bordered" style="width:100%">
                                                    <thead>
                                                        <tr>
                                                            <th>Nome</th>
                                                            <th>E-mail</th>
                                                            <th>Data da captura</th>
                                                            <th>UTM SOURCE</th>
                                                            <th>UTM MEDIUM</th>
                                                            <th>UTM CAMPAIGN</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                    </tbody>
                                                </table>    
                                            </div>
                                            <div class="tab-pane" id="total-google" role="tabpanel">
                                                <table id="tbGoogle" class="display table table-striped table-bordered" style="width:100%">
                                                    <thead>
                                                        <tr>
                                                            <th>Nome</th>
                                                            <th>E-mail</th>
                                                            <th>Data da captura</th>
                                                            <th>UTM SOURCE</th>
                                                            <th>UTM MEDIUM</th>
                                                            <th>UTM CAMPAIGN</th>
                                                        </tr>
                                                    </thead>
                                                    <tbody>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                        <td><span class="sr-only">Loading...</span></td>
                                                    </tbody>
                                                </table>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>