<div class="animated fadeIn">
    
    <!--Painel informativo-->
    <div class="row">
        <div class="col-md-12">
            <div class="card card-dismissible fade show" role="card">
                <div class="card-header">
                    <i class="fa fa-align-justify"></i> Painel informativo
                </div>
                <div class="card-body pb-0">
                    <div class="alert alert-primary alert-dismissible fade show" role="alert">
                        <h4 class="alert-heading">Painel de avisos</h4>
                        <strong>Novo canal de comunicação!</strong> Aqui você ficará sabendo das melhorias e novidades do seu painel administrativo.
                    </div>
                    
                    <?php if($informativos){ ?>
                    <!--<div class="row">-->
                    <div class="owl-carousel-cards owl-carousel owl-theme">
                        <?php foreach($informativos as $informativo ){ ?>
                        <?php if($informativo->status == 1){ ?>
                        <!--<div class="col-md-4">-->
                        
                            <div class="alert alert-success alert-dismissible fade show" role="alert">
                                <h4 class="alert-heading"><?php e($informativo->tipo) ?></h4>
                                <strong><?php e($informativo->titulo) ?>.</strong> <?php e($informativo->descricao) ?>
                                <?php if($informativo->link){ ?>
                                <hr>
                                <a href="<?php e($informativo->link) ?>" class="btn btn-sm btn-success"><i class="icon-arrow-right-circle "></i> confira aqui</a>
                                <button class="close" type="button" data-dismiss="alert" aria-label="Close">
                                    <span aria-hidden="true">×</span>
                                </button>
                                <?php } ?>
                            </div>
                        <!--</div>-->
                        <?php } } ?>
                    </div>
                    <!--</div>-->
                    <?php }else{ ?>
                    <div class="alert alert-warning alert-dismissible fade show" role="alert">
                        <h4 class="alert-heading">Nenhum aviso</h4>
                    </div>
                    <?php } ?>
                </div>
            </div>
        </div>
    </div>
    
    <!--Painel informativo-->
    <!--<div class="row">
        <div class="col-md-12">
            <div class="box-title-section">
                <div class="form-inline">
                    <div class="form-group">
                        <label class="mr-1 text-value text-primary">Aguardando Retorno Hoje</label>
                    </div>
                </div>
                <hr>
            </div>
        </div>
        <div class="col-md-12">
            <div class="row">
                <?php foreach($naoAguardandoRetorno as $notificacao ){ ?>
                <div class="col-md-2 col-sm-4">
                    <div class="card">
                        <div class="card-body text-center">
                            <div class="text-muted small text-uppercase font-weight-bold"><?php e($notificacao->name) ?></div>
                            <div class="text-value-lg py-3"><?php e($notificacao->qnt) ?></div>
                            <a href="<?php e($notificacao->link == ''?'#':base_url($notificacao->link)) ?>" _target="_blank" class="btn btn-sm btn-success" ><i class="icon-arrow-right-circle "></i> Atender</a>
                        </div>
                    </div>
                </div>
                <?php } ?>
            </div>
        </div>
    </div>-->
    
    <!--Aguardando atendimento-->
    <!--<div class="row">
        <div class="col-md-12">
            <div class="box-title-section">
                <div class="form-inline">
                    <div class="form-group">
                        <label class="mr-1 text-value text-primary">Aguardando atendimento</label>
                    </div>
                </div>
                <hr>
            </div>
        </div>
        <div class="col-md-12">
            <div class="row">
                <?php foreach($naoAtendidas as $notificacao ){ ?>
                <div class="col-md-2 col-sm-4">
                    <div class="card">
                        <div class="card-body text-center">
                            <div class="text-muted small text-uppercase font-weight-bold"><?php e($notificacao->name) ?></div>
                            <div class="text-value-lg py-3"><?php e($notificacao->qnt) ?></div>
                            <a href="<?php e($notificacao->link == ''?'#':base_url($notificacao->link)) ?>" _target="_blank" class="btn btn-sm btn-success" ><i class="icon-arrow-right-circle "></i> Atender</a>
                        </div>
                    </div>
                </div>
                <?php } ?>
            </div>
        </div>
    </div>-->
    
    <div class="box-title-section">
        <div class="form-inline">
            <div class="form-group">
                <label class="mr-1 text-value text-primary" for="periodo">Relatório geral</label>
            </div>
        </div>
        <hr>
    </div>
    <!-- /.box-title-section-->
    
     <div class="row">
        <div class="col">
            <div class="card text-white bg-primary">
                <div class="card-body pb-0">
                    <a href="#" class="btn btn-transparent p-0 float-right">
                        <i class="icon-user-follow font-2xl"></i>
                    </a>
                    <div class="text-value">Capturas <span class="capturasTotal"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span></div>
                    <div><span class="capturasCompletas"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> Interessados</div>
                </div>
                <div class="chart-wrapper mt-3 mx-3" style="height:70px;">
                    <canvas class="chart" id="card-chart1" height="70"></canvas>
                </div>
            </div>
        </div>
        <!-- /.col-->
        
        <div class="col">
            <div class="card text-white bg-primary">
                <div class="card-body pb-0">
                    <a href="#" class="btn btn-transparent p-0 float-right">
                        <i class="icon-user-following font-2xl"></i>
                    </a>
                    <div class="text-value">Cadastros <span class="usuariosTotal"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span></div>
                    <div><span class="usuariosAtivos"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> Ativos</div>
                </div>
                <div class="chart-wrapper mt-3 mx-3" style="height:70px;">
                    <canvas class="chart" id="card-chart2" height="70"></canvas>
                </div>
            </div>
        </div>
        <!-- /.col-->  
        
        <div class="col">
            <div class="card text-white bg-primary">
                <div class="card-body pb-0">
                    <a href="#" class="btn btn-transparent p-0 float-right">
                        <i class="icon-home font-2xl"></i>
                    </a>
                    <div class="text-value">Imóveis <span class="imoveisTotal"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> </div>
                    <div><span class="imoveisPublicados"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> Publicados</div>
                </div>
                <div class="chart-wrapper mt-3 mx-3" style="height:70px;">
                    <canvas class="chart" id="card-chart3" height="70"></canvas>
                </div>
            </div> 
        </div>
        <!-- /.col-->  
        
        <div class="col">
            <div class="card text-white bg-primary">
                <div class="card-body pb-0">
                    <a href="#" class="btn btn-transparent p-0 float-right">
                        <i class="icon-wallet font-2xl"></i>
                    </a>
                    <div class="text-value">Financiamentos <span class="financiamentosTotal"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> </div>
                    <div><span class="financiamentosSolicitados"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> Solicitados</div>
                </div>
                <div class="chart-wrapper mt-3 mx-3" style="height:70px;">
                    <canvas class="chart" id="card-chart4" height="70"></canvas>
                </div>
            </div> 
        </div>
        <!-- /.col-->  
        
        <div class="col">
            <div class="card text-white bg-primary">
                <div class="card-body pb-0">
                    <a href="#" class="btn btn-transparent p-0 float-right">
                        <i class="icon-speech font-2xl"></i>
                    </a>
                    <div class="text-value">Negociações <span class="negociacoesTotal"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> </div>
                    <div><span class="negociacoesAndamento"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></span> Em andamento</div>
                </div>
                <div class="chart-wrapper mt-3 mx-3" style="height:70px;">
                    <canvas class="chart" id="card-chart5" height="70"></canvas>
                </div>
            </div> 
        </div>
        <!-- /.col-->  
    </div>
    <!-- /.row-->
    
    <div class="box-title-section">
        <div class="form-inline">
            <div class="form-group">
                <label class="mr-1 text-value text-primary" for="periodo">Relatório por período</label>
                <select name="periodo" class="form-control" id="periodo">
                    <option value="dia" >Diário</option>
                    <option value="semana" >Semanal</option>
                    <option value="mes" selected>Mensal</option>
                </select>
            </div>
        </div>
        <hr>
    </div>
    <!-- /.box-title-section-->
    
    <div class="card-group mb-4">
        <div class="card text-white bg-info">
            <div class="card-body">
                <div class="btn-group dropright no-caret float-left">
                    <button class="btn btn-block btn-link dropdown-toggle no-decoration p-0" type="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                        <i class="icon-info icons font-2xl text-white"></i>
                    </button>
                    <div class="dropdown-menu dropdown-menu-right">
                        <a class="dropdown-item" href="#">Avaliação: <strong><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></a>
                        <a class="dropdown-item" href="#">Chega de imobiliária: <strong><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></a>
                        <a class="dropdown-item" href="#">Elleven: <strong><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></a>
                    </div>
                </div>
                <div class="h1 text-muted text-right mb-4">
                    <i class="icon-user-follow"></i>
                </div>
                <div class="text-value capturasAtual"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></div>
                <small class="text-muted text-uppercase font-weight-bold">Capturas</small>
                <div class="progress progress-xs my-2">
                    <div class="progress-bar bg-primary" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
                </div>
                <small class="text-muted">Período anterior <strong class="capturasAnterior"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></small>
                <a href="<?php e(base_url("administrativo/atendimento/leads")); ?>" class="btn btn-sm btn-primary float-right">Ver capturas</a>
            </div>
        </div>
        <div class="card">
            <div class="card-body">
                <div class="h1 text-muted text-right mb-4">
                    <i class="icon-user-following"></i>
                </div>
                <div class="text-value usuariosAtual"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></div>
                <small class="text-muted text-uppercase font-weight-bold">Cadastros</small>
                <div class="progress progress-xs my-2">
                    <div class="progress-bar bg-primary" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
                </div>
                <small class="text-muted">Período anterior <strong class="usuariosAnterior"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></small>
                <a href="<?php e(base_url("administrativo/atendimento/leads")); ?>" class="btn btn-sm btn-primary float-right">Ver cadastros</a>
            </div>
        </div>
        <div class="card">
            <div class="card-body">
                <div class="h1 text-muted text-right mb-4">
                    <i class="icon-home"></i>
                </div>
                <div class="text-value imoveisAtual"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></div>
                <small class="text-muted text-uppercase font-weight-bold">Imóveis</small>
                <div class="progress progress-xs my-2">
                    <div class="progress-bar bg-primary" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
                </div>
                <small class="text-muted">Período anterior <strong class="imoveisAnterior"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></small>
                <a href="<?php e(base_url("administrativo/imoveis/cadastros")); ?>" class="btn btn-sm btn-primary float-right">Ver imóveis</a>
            </div>
        </div>
        <div class="card">
            <div class="card-body">
                <div class="h1 text-muted text-right mb-4">
                    <i class="icon-wallet"></i>
                </div>
                <div class="text-value financiamentosAtual"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></div>
                <small class="text-muted text-uppercase font-weight-bold">Financiamentos</small>
                <div class="progress progress-xs my-2">
                    <div class="progress-bar bg-primary" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
                </div>
                <small class="text-muted">Período anterior <strong class="financiamentosAnterior"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></small>
                <a href="<?php e(base_url("administrativo/financiamentos/solicitacoes")); ?>" class="btn btn-sm btn-primary float-right">Ver financiamentos</a>
            </div>
        </div>
        <div class="card">
            <div class="card-body">
                <div class="h1 text-muted text-right mb-4">
                    <i class="icon-speech "></i>
                </div>
                <div class="text-value negociacoesAtual"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></div>
                <small class="text-muted text-uppercase font-weight-bold">Negociações</small>
                <div class="progress progress-xs my-2">
                    <div class="progress-bar bg-primary" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
                </div>
                <small class="text-muted">Período anterior <strong class="negociacoesAnterior"><i class="fa fa-circle-o-notch fa-spin fa-fw"></i></strong></small>
                <a href="<?php e(base_url("administrativo/Negociacoes/index")); ?>" class="btn btn-sm btn-primary float-right">Ver negociações</a>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-md-12">
            <div class="card-group mb-5">
                
                <div class="card">
                    <div class="card-body">
                        <div class="h1 text-muted text-right mb-4">
                            <i class="icon-home"></i>
                        </div>
                        <div class="text-value"><?php e($imoveis_publicados); ?></div>
                        <small class="text-muted text-uppercase font-weight-bold">Imóveis Publicados</small>
                        <div class="progress progress-xs my-2">
                            <div class="progress-bar bg-primary" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                        
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-body">
                        <div class="h1 text-muted text-right mb-4">
                            <i class="icon-home"></i>
                        </div>
                        <div class="text-value"><?php e(money($valor_total)); ?></div>
                        <small class="text-muted text-uppercase font-weight-bold">Valor total de imóveis captados</small>
                        <div class="progress progress-xs my-2">
                            <div class="progress-bar bg-primary" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                        
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-body">
                        <div class="h1 text-muted text-right mb-4">
                            <i class="icon-home"></i>
                        </div>
                        <div class="text-value"><?php e(money($valor_medio)); ?></div>
                        <small class="text-muted text-uppercase font-weight-bold">Valor médio de imóveis captado</small>
                        <div class="progress progress-xs my-2">
                            <div class="progress-bar bg-primary" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                        
                    </div>
                </div>
                
                <div class="card">
                    <div class="card-body">
                        <div class="h1 text-muted text-right mb-4">
                            <i class="icon-home"></i>
                        </div>
                        <div class="text-value"><?php e(money($ticket_medio)); ?></div>
                        <small class="text-muted text-uppercase font-weight-bold">Comissão Comdono</small>
                        <div class="progress progress-xs my-2">
                            <div class="progress-bar bg-primary" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
                        </div>
                        
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    <div class="row">
        <div class="col-lg-12">
            <div class="card">
                <div class="card-header"><a href="#" data-toggle="collapse" data-target="#collapseExample" aria-expanded="true" class="collapsed"><i class="icon-home"></i> Valor de imóveis captado por áreas</a>
                    <div class="card-header-actions">
                        <a class="card-header-action btn-minimize" href="#" data-toggle="collapse" data-target="#collapseExample" aria-expanded="true" class="collapsed">
                            <i class="icon-arrow-up"></i>
                        </a>
                    </div>
                </div>
                <div class="collapse show" id="collapseExample">
                    <div class="card-body">
                        <div class="table-container table-responsive">
                            <table id="dataTable" class="display table table-striped table-bordered" style="width:100%">
                                <thead>
                                    <tr>
                                        <th>Bairro</th>
                                        <th>Quantidade</th>
                                        <th>Valor Total</th>
                                        <th>Valor Médio</th>
                                        <th>Comissão</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <?php foreach($valor_por_area as $area) { ?>
                                    <tr class="trData" >
                                        <td><?php e($area->bairro); ?></td>
                                        <td><?php e($area->qnt); ?></td>
                                        <td><?php e(money($area->val_total)); ?></td>
                                        <td><?php e(money($area->val_medio)); ?></td>
                                        <td><?php e(money($area->ticket_medio)); ?></td>
                                    </tr>
                                    <?php } ?>
                                </tbody>
                            </table>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    
    
    



</div>