<!DOCTYPE html>
<html lang="pt-BR">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" type="image/x-icon" href="<?php echo e(asset('favicon.ico')); ?>">
    <title><?php echo $__env->yieldContent('title', 'LABRE-DX Contest'); ?> — Resultados</title>
    <style>
        * { box-sizing: border-box; margin: 0; padding: 0; }
        body { font-family: Arial, sans-serif; background: #f4f6fa; color: #333; }
 
        .header { background: #1B4F8C; color: #fff; padding: 1rem 2rem; }
        .header-inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
        .header h1 { font-size: 1.3rem; }
        .header p  { font-size: .82rem; opacity: .85; margin-top: .2rem; }
        .header-nav { display: flex; gap: .5rem; flex-wrap: wrap; }
        .header-nav a { color: #fff; text-decoration: none; background: rgba(255,255,255,.15);
                        padding: .35rem .8rem; border-radius: 4px; font-size: .82rem; white-space: nowrap; }
        .header-nav a:hover { background: rgba(255,255,255,.3); }
        .header-nav a.active { background: rgba(255,255,255,.35); font-weight: bold; }
 
        .container { max-width: 1200px; margin: 1.5rem auto; padding: 0 1rem 3rem; }
 
        .card { background: #fff; border-radius: 8px; box-shadow: 0 2px 12px rgba(0,0,0,.07); padding: 1.5rem; margin-bottom: 1.25rem; }
 
        .stats { display: flex; gap: .75rem; margin-bottom: 1.25rem; flex-wrap: wrap; }
        .stat  { background: #1B4F8C; color: #fff; border-radius: 8px; padding: .65rem 1.1rem; min-width: 130px; }
        .stat-num { font-size: 1.6rem; font-weight: 900; }
        .stat-lbl { font-size: .75rem; opacity: .85; }
        .stat.green { background: #2E7D32; }
        .stat.gold  { background: #B8860B; }
 
        .search-bar { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
        .search-bar input, .search-bar select {
            padding: .45rem .8rem; border: 1px solid #ddd; border-radius: 5px;
            font-size: .88rem; background: #fff;
        }
        .search-bar input { flex: 1; min-width: 180px; }
        .search-bar button { padding: .45rem 1rem; background: #1B4F8C; color: #fff;
                             border: none; border-radius: 5px; cursor: pointer; font-size: .88rem; }
        .search-bar button:hover { background: #163d73; }
 
        table { width: 100%; border-collapse: collapse; font-size: .85rem; }
        th { background: #1B4F8C; color: #fff; padding: .5rem .6rem; text-align: left; font-size: .78rem; }
        td { padding: .4rem .6rem; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
        tr:hover td { background: #f8f9fb; }
        tr.ouro td  { background: #fffde7; }
        tr.prata td { background: #f5f5f5; }
        tr.bronze td{ background: #fdf3e7; }
        .rk  { font-weight: 900; color: #1B4F8C; text-align: center; }
        .call{ font-weight: bold; color: #1B4F8C; }
        .score { font-weight: 700; text-align: right; }
        .badge-novo { background: #2E7D32; color: #fff; font-size: .68rem; padding: .15rem .4rem; border-radius: 3px; margin-left: .3rem; }
        .badge-inv  { background: #c62828; color: #fff; font-size: .68rem; padding: .15rem .4rem; border-radius: 3px; }
        .badge-val  { background: #2E7D32; color: #fff; font-size: .68rem; padding: .15rem .4rem; border-radius: 3px; }
 
        .cat-header { background: #e8f0fb; font-weight: 700; font-size: .8rem;
                      padding: .4rem .6rem; color: #1B4F8C; border-top: 2px solid #1B4F8C;
                      display: flex; justify-content: space-between; }
 
        .footer { text-align: center; color: #aaa; font-size: .78rem; margin-top: 2rem; }
 
        @media (max-width: 600px) {
            .header-inner { flex-direction: column; align-items: flex-start; }
            .stats { gap: .4rem; }
            .stat  { min-width: 100px; }
            table  { font-size: .75rem; }
            th, td { padding: .3rem .4rem; }
        }
    </style>
    <?php echo $__env->yieldPushContent('styles'); ?>
</head>
<body>
 
<div class="header">
    <div class="header-inner">
        <div>
            <h1>🏆 LABRE-DX Contest — Resultados</h1>
            <?php if(isset($contest) && $contest): ?>
                <p><?php echo e($contest->name ?? ''); ?>

                   <?php if($contest->start_date): ?>
                       | <?php echo e(\Carbon\Carbon::parse($contest->start_date)->format('d/m/Y')); ?>

                       – <?php echo e(\Carbon\Carbon::parse($contest->end_date)->format('d/m/Y')); ?>

                   <?php endif; ?>
                </p>
            <?php endif; ?>
        </div>
        <nav class="header-nav">
            <a href="https://www.labre.org.br/contest/" target="_blank">
                🏠 Home
            </a>
            <a href="<?php echo e(route('public.resultados.resultado')); ?>"
               class="<?php echo e(request()->routeIs('public.resultados.resultado') ? 'active' : ''); ?>">
                🥇 Resultado
            </a>
            <a href="<?php echo e(route('public.resultados.records')); ?>"
               class="<?php echo e(request()->routeIs('public.resultados.records') ? 'active' : ''); ?>">
                📋 Records
            </a>
            <a href="<?php echo e(route('public.resultados.callsign')); ?>"
               class="<?php echo e(request()->routeIs('public.resultados.callsign') ? 'active' : ''); ?>">
                🔍 Meu LOG
            </a>
            <a href="<?php echo e(route('public.resultados.clubes')); ?>"
               class="<?php echo e(request()->routeIs('public.resultados.clubes') ? 'active' : ''); ?>">
                🏛️ Clubes
            </a>
            <a href="<?php echo e(route('public.logs.lista')); ?>">📡 LOGs Recebidos</a>
            <a href="<?php echo e(route('login')); ?>">🔐 Login</a>
 
            
            <?php if(isset($contests) && $contests->count() > 1): ?>
            <form method="GET" action="<?php echo e(url()->current()); ?>" style="display:inline-flex;align-items:center;gap:.3rem;margin:0">
                <?php $__currentLoopData = request()->except('ano'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $k => $v): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <input type="hidden" name="<?php echo e($k); ?>" value="<?php echo e($v); ?>">
                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                <select name="ano" onchange="this.form.submit()"
                        style="padding:.3rem .6rem;border-radius:4px;border:1px solid rgba(255,255,255,.4);
                               background:rgba(255,255,255,.15);color:#fff;font-size:.82rem;cursor:pointer">
                    <?php $__currentLoopData = $contests; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $ct): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php $anoOpt = \Carbon\Carbon::parse($ct->start_date)->year; ?>
                        <option value="<?php echo e($anoOpt); ?>"
                            style="background:#1B4F8C;color:#fff"
                            <?php echo e((isset($contest) && \Carbon\Carbon::parse($contest->start_date)->year == $anoOpt) ? 'selected' : ''); ?>>
                            <?php echo e($ct->name); ?> <?php echo e($anoOpt); ?>

                        </option>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </select>
            </form>
            <?php endif; ?>
        </nav>
    </div>
</div>
 
<div class="container">
    <?php echo $__env->yieldContent('content'); ?>
</div>
 
<div class="footer">
    LABRE-DX Contest &mdash; Sistema de Apuração &mdash; Desenvolvido por PY6MV
</div>
 
<?php echo $__env->yieldPushContent('scripts'); ?>
</body>
</html>
<?php /**PATH C:\laragon\www\projetos\labre-contest\resources\views/public/resultados/layout.blade.php ENDPATH**/ ?>