/* ==========================================================================
   MÓDULO: RESULTADOS (Tabelas e Hub)
   ========================================================================== */

/* Globais e Utilitários */
.market-a3-error-msg { text-align: center; padding: 20px; color: red; border: 1px dashed red; border-radius: 8px; }
.market-a3-empty-state { text-align: center; padding: 40px; color: #777; border: 1px dashed #ccc; border-radius: 8px; font-weight: bold; }
.txt-center { text-align: center !important; }
.txt-right { text-align: right !important; }

/* 1. App Wiclax (Tabela Dinâmica) */
.a3-wiclax-app, .a3-res-wrap, .a3-hub-wrap { font-family: 'Inter', -apple-system, sans-serif; max-width: 100%; color: #111; }
.a3-wiclax-title { font-size: 24px; font-weight: 900; text-transform: uppercase; margin-bottom: 20px; border-bottom: 3px solid #199618; padding-bottom: 10px; display: inline-block; }
.a3-wiclax-topbar { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; background: #f8f9fa; padding: 15px 20px; border-radius: 8px; border: 1px solid #eaeaea; margin-bottom: 20px; }
.a3-wiclax-topbar select, .a3-wiclax-topbar input { flex: 1; min-width: 150px; padding: 10px 15px !important; border: 1px solid #ccc !important; border-radius: 6px !important; font-size: 14px !important; height: 42px !important; outline: none; background: #fff !important; }
.a3-wiclax-topbar input { flex: 2; min-width: 200px; }
.a3-counter-box { background: #111; color: #fff; padding: 10px 20px; border-radius: 6px; font-weight: 800; font-size: 14px; white-space: nowrap; }
.a3-counter-box span { color: #199618; font-size: 16px; }
.a3-btn-refresh { background: #fff; border: 1px solid #ccc; border-radius: 6px; cursor: pointer; padding: 0 15px; height: 42px; }

.a3-table-wrapper { overflow-x: auto; background: #fff; border-radius: 8px; border: 1px solid #eaeaea; }
.a3-table { width: 100%; border-collapse: collapse; min-width: 900px; margin: 0 !important; }
.a3-table thead { background: #111; color: #fff; }
.a3-table th { padding: 12px 15px; text-align: left; font-size: 12px; font-weight: 800; text-transform: uppercase; white-space: nowrap; border: none !important; }
.a3-table td { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; font-size: 13px; color: #333; vertical-align: middle; border-left:none; border-right:none; }
.a3-table tbody tr:hover { background: #f4f9f4; }
.w-50 { width: 50px; } .w-60 { width: 60px; } .w-40 { width: 40px; }

.a3-pos-badge { font-weight: 900; font-size: 16px; color: #111; }
.a3-num-badge { background: #eee; padding: 4px 8px; border-radius: 4px; font-weight: 800; color: #555; }
.a3-nome-atleta { font-weight: 800; font-size: 14px; display: block; color: #000; text-transform: uppercase; }
.a3-nome-equipe { font-size: 11px; color: #777; }
.col-sexo { font-weight: bold; color: #777; }
.col-cat { font-size: 11px; font-weight: 800; color: #555; }
.col-pos-cat { color: #111; }
.col-t-bruto { color: #666; }
.a3-time-highlight { font-size: 15px; font-weight: 900; color: #199618; }
.col-vel { color: #888; font-weight: bold; }

/* 2. Hub Filter Bar & Classic Table */
.a3-voltar-wrap { margin-bottom: 20px; }
.a3-btn-voltar { display: inline-flex; align-items: center; padding: 10px 15px; background: #fff; border: 1px solid #ddd; color: #333; font-weight: 600; border-radius: 6px; text-decoration: none; font-size: 13px; box-shadow: 0 2px 4px rgba(0,0,0,0.02); transition: 0.2s; }
.a3-hub-titulo-evento { margin-top: 0; color: #111; text-transform: uppercase; font-weight: 900; font-size: 26px; margin-bottom: 20px; }

.a3-filter-bar { display: flex; gap: 12px; background: #fff; padding: 15px; border-radius: 8px; border: 1px solid #eaeaea; margin-bottom: 25px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); align-items: center; flex-wrap: nowrap; }
.a3-f-input { padding: 10px 12px; border-radius: 6px; border: 1px solid #ddd; outline: none; font-size: 13px; background: #fafafa; flex: 1; color: #333; min-width: 120px; }
.a3-f-search { flex: 2; min-width: 200px; }
.a3-f-actions { display: flex; gap: 8px; flex-shrink: 0; }
.a3-btn-filt { background: #111; color: #fff; padding: 10px 20px; border: none; border-radius: 6px; font-weight: 800; cursor: pointer; text-transform: uppercase; font-size: 12px; }
.a3-btn-clear { background: #f4f4f4; color: #555; padding: 10px 15px; border-radius: 6px; font-weight: 700; text-decoration: none; display: flex; align-items: center; justify-content: center; text-transform: uppercase; font-size: 12px; border: 1px solid #ddd; }

.a3-classic-table-wrapper { overflow-x: auto; background: #fff; border-radius: 8px; box-shadow: 0 5px 20px rgba(0,0,0,0.06); border: 1px solid #eaeaea; }
.a3-classic-table { width: 100%; border-collapse: collapse; font-size: 14px; color: #333; text-align: left; }
.a3-classic-table thead { background-color: #1a1a1a; color: #fff; }
.a3-classic-table th { padding: 16px 15px; font-weight: 700; text-transform: uppercase; font-size: 12px; border-bottom: 3px solid #199618; white-space: nowrap; }
.a3-classic-table td { padding: 14px 15px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.a3-classic-table tbody tr:nth-child(even) { background-color: #fafbfc; }
.a3-classic-table tbody tr:hover { background-color: #f0fdf4; }

.col-pos { text-align: center; font-weight: 900; color: #111; font-size: 15px; }
.col-num { text-align: center; color: #777; font-weight: 600; }
.col-nome { font-weight: 800; color: #111; text-transform: uppercase; }
.col-center { color: #555; }
.col-mod { font-weight: bold; color: #005a87; }
.col-cat-hub { font-size: 12px; color: #666; }
.col-tempo { text-align: right; font-weight: 900; color: #199618; font-size: 16px; letter-spacing: -0.5px; }
.col-pace { text-align: right; color: #888; font-size: 13px; font-weight: 500; }

/* 3. Hub Grid (Eventos) */
.a3-hub-search-box { width: 100%; padding: 18px 25px; border: 2px solid #eaeaea; border-radius: 8px; font-size: 16px; outline: none; margin-bottom: 35px; box-shadow: 0 4px 15px rgba(0,0,0,0.03); background: #fff; transition: all 0.3s; }
.a3-hub-search-box:focus { border-color: #199618; box-shadow: 0 4px 15px rgba(25,150,24,0.1); }
.a3-hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 30px; }
.a3-hub-card { border: 1px solid #eaeaea; border-radius: 12px; overflow: hidden; transition: all 0.3s ease; background: #fff; text-decoration: none !important; display: flex; flex-direction: column; box-shadow: 0 5px 15px rgba(0,0,0,0.04); }
.a3-hub-card:hover { transform: translateY(-5px); box-shadow: 0 15px 35px rgba(0,0,0,0.1); border-color: #199618; }
.a3-hub-img { width: 100%; height: 220px; object-fit: cover; background: #f4f4f4; border-bottom: 1px solid #eee; }
.a3-hub-content { padding: 25px; display: flex; flex-direction: column; flex-grow: 1; }
.a3-hub-title { font-size: 18px; font-weight: 900; margin: 0 0 10px 0; color: #111; line-height: 1.3; text-transform: uppercase; }
.a3-hub-date { font-size: 13px; color: #777; margin-bottom: 25px; font-weight: 500; }
.a3-hub-btn { margin-top: auto; background: #f0fdf4; color: #199618; text-align: center; padding: 14px; font-weight: 800; border-radius: 6px; text-transform: uppercase; font-size: 13px; transition: all 0.2s; }
.a3-hub-card:hover .a3-hub-btn { background: #199618; color: #fff; }

/* Banner de Evento Encerrado */
.market-a3-banner-encerrado { margin: 30px 0; padding: 25px; background: #f8f9fa; border-left: 5px solid #199618; border-radius: 6px; }
.market-a3-banner-encerrado h3 { margin-top: 0; color: #111; font-weight: 900; text-transform: uppercase; }
.market-a3-banner-encerrado p { color: #555; margin-bottom: 20px; }
.a3-btn-resultados-oficiais { display: block; background: #199618; color: #fff; width: 100%; text-align: center; padding: 15px; font-weight: 800; border-radius: 6px; text-decoration: none; }

/* Responsividade Mobile */
@media(max-width: 900px) {
    .a3-filter-bar { flex-wrap: wrap; }
    .a3-f-search { flex: 1 1 100%; } 
    .a3-f-input { flex: 1 1 calc(33.333% - 12px); } 
}
@media(max-width: 768px) { 
    .a3-wiclax-topbar { flex-direction: column; align-items: stretch; } 
}
@media(max-width: 600px) {
    .a3-f-input { flex: 1 1 100%; } 
    .a3-f-actions { flex: 1 1 100%; justify-content: stretch; }
    .a3-btn-filt, .a3-btn-clear { flex: 1; text-align: center; }
}