<div class="main-content home">
<div class="container-medium">
<div class="main-sublinks-wrapper">
   <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
      <li class="nav-item" role="presentation">
         <button class="nav-link active" id="pills-home-tab" data-toggle="pill" data-target="#pills-home" type="button" role="tab" aria-controls="pills-home" aria-selected="true">Resumo</button>
      </li>
      <li class="nav-item" role="presentation">
         <button class="nav-link" id="pills-contact-tab" data-toggle="pill" data-target="#pills-contact" type="button" role="tab" aria-controls="pills-contact" aria-selected="false">Histórico</button>
      </li>      
   </ul>
   <div class="tab-content" id="pills-tabContent">
      <div class="tab-pane fade show active" id="pills-home" role="tabpanel" aria-labelledby="pills-home-tab">
         <div class="card">
            <div class="div-block-2">
               <div class="div-block">
                  <div class="icon-24 color-1"></div>
                  <div>
                     <h4 user-username="" class="white"><?php echo $usuario[0]->nome ?></h4>
                     <div user-email=""><?php echo $usuario[0]->email ?></div>
                     <a class="white" href="<?php echo site_url('usuarios/editarconta/'); ?>">Editar</a>
                  </div>
               </div>
            </div>
         </div>
         <div class="w-layout-grid grid-4 mt-24">
            <div id="w-node-_0ea1822e-c190-6053-e5ab-02b116f0916b-b4edabe8" class="card degrade">
               <div class="icon-24 mb-20 color-1"></div>
               <div>Saldo total</div>
               <h3 class="white">R$ <span balance-w-bonus=""><?php echo $financeiro[0]->saldo ?></span></h3>
            </div>
            <div id="w-node-_0ea1822e-c190-6053-e5ab-02b116f09174-b4edabe8" class="card degrade">
               <div class="icon-24 mb-20 color-2"></div>
               <div>Saldo real</div>
               <h3 class="white">R$ <span balance-w-bonus=""><?php echo $financeiro[0]->saldo ?></span></h3>
            </div>
            <div id="w-node-_0ea1822e-c190-6053-e5ab-02b116f0917d-b4edabe8" class="card degrade">
               <div class="icon-24 mb-20 color-3"></div>
               <div>Saldo bônus</div>
               <h3 active-referrals="" class="white">R$ <span balance-w-bonus=""><?php echo $financeiro[0]->bonus ?></span></h3>
            </div>
            <div id="w-node-_0ea1822e-c190-6053-e5ab-02b116f09186-b4edabe8" class="card degrade">
               <div class="icon-24 mb-20 color-4"></div>
               <div>Indicações</div>
               <h3 active-referrals="" class="white"><?php echo $total_indicados; ?></h3>
            </div>
         </div>

        <!-- <div class="card-line mt-24">
               <h3 class="white">Rollover</h3>
               <div>Saldo mínimo para a liberação do bônus</div>
               <div class="card mt-16">
                  <div class="eng-info-rollover mb-16">
                     <div>Desbloqueado R$ <span rollover-amount-traded="">-</span></div>
                     <div>R$ <span rollover-amount="">-</span></div>
                  </div>
                  <div class="eng-line-rollover">
                     <div rollover-percentage-bar="" class="line-rollover"></div>
                  </div>
                  <div class="eng-info-rollover mt-16">
                     <div><span rollover-percentage="">0</span>%</div>
                     <div>Restam R$ <span rollover-amount-left="">-</span></div>
                  </div>
               </div>
         </div>
      </div>-->
      <div class="tab-pane fade" id="pills-profile" role="tabpanel" aria-labelledby="pills-profile-tab">...</div>
      <div class="tab-pane fade" id="pills-contact" role="tabpanel" aria-labelledby="pills-contact-tab">
         <div class="card-line mt-24">
            <h3 class="white">Historico</h3>
            <div>Acompanhe o seu historico</div>
            <div class="card mt-16">
               <?php if (empty($historico)): ?>
               <div class="card-body">
                  <h2 class="font mb-2 text-center" >Você ainda não movimentou a sua conta.</h2>
               </div>
               <?php else: ?>   
               <table>
                  <thead>
                     <tr>
                        <th>Tipo</th>
                        <th>Jogo</th>
                        <th>IP</th>
                        <th>Saldo</th>
                        <th>Debito</th>
                        <th>Crédito</th>
                        <th>Data e Hora</th>
                     </tr>
                  </thead>
                  <tbody>
                     <?php foreach ($historico as $hist): ?>  
                     <tr>
                        <td><?php echo $hist->pagina; ?></td>
                        <td><?php echo $hist->game_name; ?></td>
                        <td><?php echo $hist->ip; ?></td>
                        <td><?php echo $hist->saldo; ?></td>
                        <td><?php echo $hist->debito; ?></td>
                        <td><?php echo $hist->credito; ?></td>
                        <td><?php echo $hist->data_hora; ?></td>
                     </tr>
                     <?php endforeach; ?>
                  </tbody>
               </table>
               <?php endif; ?>
            </div>
         </div>
      </div>
   </div>
</div>
</div>
